mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
DEV: Sort imports alphabetically (#11382)
This commit is contained in:
parent
d1d87b6fa3
commit
bbe5d8d5cf
1070 changed files with 3158 additions and 3158 deletions
|
@ -1,5 +1,5 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import { Promise } from "rsvp";
|
||||
/* global Pikaday:true */
|
||||
import { propertyNotEqual } from "discourse/lib/computed";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import computed, { observes } from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import EmberObject from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import { Promise } from "rsvp";
|
||||
import { cookAsync } from "discourse/lib/text";
|
||||
import discourseDebounce from "discourse/lib/debounce";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import { propertyNotEqual } from "discourse/lib/computed";
|
||||
import { schedule } from "@ember/runloop";
|
||||
|
||||
export default Component.extend({
|
||||
timeFormat: "HH:mm:ss",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import LocalDateBuilder from "../lib/local-date-builder";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
|
||||
const DATE_TEMPLATE = `
|
||||
<span>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import I18n from "I18n";
|
||||
import DateWithZoneHelper from "./date-with-zone-helper";
|
||||
import I18n from "I18n";
|
||||
|
||||
const TIME_FORMAT = "LLL";
|
||||
const DATE_FORMAT = "LL";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import sinon from "sinon";
|
||||
import I18n from "I18n";
|
||||
import LocalDateBuilder from "./local-date-builder";
|
||||
import sinon from "sinon";
|
||||
|
||||
const UTC = "Etc/UTC";
|
||||
const SYDNEY = "Australia/Sydney";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
|
||||
function initialize(api) {
|
||||
const messageBus = api.container.lookup("message-bus:main");
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import Component from "@ember/component";
|
||||
import {
|
||||
CLOSED,
|
||||
COMPOSER_TYPE,
|
||||
EDITING,
|
||||
KEEP_ALIVE_DURATION_SECONDS,
|
||||
REPLYING,
|
||||
} from "discourse/plugins/discourse-presence/discourse/lib/presence";
|
||||
import { cancel, throttle } from "@ember/runloop";
|
||||
import { gt, readOnly } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseComputed, {
|
||||
observes,
|
||||
on,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import {
|
||||
REPLYING,
|
||||
CLOSED,
|
||||
EDITING,
|
||||
COMPOSER_TYPE,
|
||||
KEEP_ALIVE_DURATION_SECONDS,
|
||||
} from "discourse/plugins/discourse-presence/discourse/lib/presence";
|
||||
import { gt, readOnly } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Component.extend({
|
||||
// Passed in variables
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import discourseComputed, { on } from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import { TOPIC_TYPE } from "discourse/plugins/discourse-presence/discourse/lib/presence";
|
||||
import { gt } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseComputed, { on } from "discourse-common/utils/decorators";
|
||||
import { TOPIC_TYPE } from "discourse/plugins/discourse-presence/discourse/lib/presence";
|
||||
|
||||
export default Component.extend({
|
||||
topic: null,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { cancel, later } from "@ember/runloop";
|
||||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Service from "@ember/service";
|
||||
import Presence, {
|
||||
CLOSED,
|
||||
} from "discourse/plugins/discourse-presence/discourse/lib/presence";
|
||||
import Service from "@ember/service";
|
||||
|
||||
const PresenceManager = Service.extend({
|
||||
presences: null,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import I18n from "I18n";
|
||||
import Component from "@ember/component";
|
||||
import { mapBy } from "@ember/object/computed";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import I18n from "I18n";
|
||||
import { PIE_CHART_TYPE } from "discourse/plugins/poll/controllers/poll-ui-builder";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { mapBy } from "@ember/object/computed";
|
||||
|
||||
export default Component.extend({
|
||||
// Arguments:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import I18n from "I18n";
|
||||
import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import { action } from "@ember/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { propertyEqual } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
|
||||
export default Component.extend({
|
||||
// Arguments:
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { action } from "@ember/object";
|
||||
import { classify } from "@ember/string";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import I18n from "I18n";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { action } from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { classify } from "@ember/string";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
model: null,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import Controller from "@ember/controller";
|
||||
import EmberObject from "@ember/object";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
export const BAR_CHART_TYPE = "bar";
|
||||
export const PIE_CHART_TYPE = "pie";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
|
||||
function initializePollUIBuilder(api) {
|
||||
api.modifyClass("controller:composer", {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import WidgetGlue from "discourse/widgets/glue";
|
||||
import { getRegister } from "discourse-common/lib/get-owner";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
|
||||
function initializePolls(api) {
|
||||
const register = getRegister(api);
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import I18n from "I18n";
|
||||
import { h } from "virtual-dom";
|
||||
import { PIE_CHART_TYPE } from "discourse/plugins/poll/controllers/poll-ui-builder";
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { avatarFor } from "discourse/widgets/post";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import evenRound from "discourse/plugins/poll/lib/even-round";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import { h } from "virtual-dom";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { relativeAge } from "discourse/lib/formatter";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import round from "discourse/lib/round";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { avatarFor } from "discourse/widgets/post";
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import { PIE_CHART_TYPE } from "discourse/plugins/poll/controllers/poll-ui-builder";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import evenRound from "discourse/plugins/poll/lib/even-round";
|
||||
|
||||
function optionHtml(option) {
|
||||
const $node = $(`<span>${option.html}</span>`);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import {
|
||||
acceptance,
|
||||
updateCurrentUser,
|
||||
exists,
|
||||
updateCurrentUser,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
|
||||
acceptance("Poll Builder - polls are disabled", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import {
|
||||
acceptance,
|
||||
updateCurrentUser,
|
||||
exists,
|
||||
queryAll,
|
||||
updateCurrentUser,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
|
||||
acceptance("Poll Builder - polls are enabled", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Rendering polls with pie charts", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||
import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Poll quote", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||
import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Rendering polls with bar charts - desktop", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||
import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Rendering polls with bar charts - mobile", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import {
|
||||
moduleForWidget,
|
||||
widgetTest,
|
||||
} from "discourse/tests/helpers/widget-test";
|
||||
import EmberObject from "@ember/object";
|
||||
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
moduleForWidget("discourse-poll-standard-results");
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import {
|
||||
moduleForWidget,
|
||||
widgetTest,
|
||||
} from "discourse/tests/helpers/widget-test";
|
||||
import EmberObject from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
let requests = 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
sectionById,
|
||||
findNote,
|
||||
sectionById,
|
||||
} from "discourse/plugins/styleguide/discourse/lib/styleguide";
|
||||
import { createData } from "discourse/plugins/styleguide/discourse/lib/dummy-data";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue