mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:44:40 +08:00
DEV: Sort imports
Automatically generated by `eslint --fix` to satisfy the updated configuration
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import { inject as service } from "@ember/service";
|
||||
import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import { action } from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
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 { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class PollBreakdownModal extends Component {
|
||||
@service dialog;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { gt, or } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import EmberObject, { action } from "@ember/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { gt, or } from "@ember/object/computed";
|
||||
import { observes } from "@ember-decorators/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
export const BAR_CHART_TYPE = "bar";
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import { mapBy } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import { PIE_CHART_TYPE } from "../components/modal/poll-ui-builder";
|
||||
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";
|
||||
import { next } from "@ember/runloop";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import { PIE_CHART_TYPE } from "../components/modal/poll-ui-builder";
|
||||
|
||||
@classNames("poll-breakdown-chart-container")
|
||||
export default class PollBreakdownChart extends Component {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import { propertyEqual } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
|
||||
@tagName("")
|
||||
export default class PollBreakdownOption extends Component {
|
||||
|
@ -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 { bind, observes } from "discourse-common/utils/decorators";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
|
||||
const PLUGIN_ID = "discourse-poll";
|
||||
let _glued = [];
|
||||
|
@ -1,21 +1,21 @@
|
||||
import I18n from "I18n";
|
||||
import { PIE_CHART_TYPE } from "../components/modal/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 { getOwner } from "@ember/application";
|
||||
import { h } from "virtual-dom";
|
||||
import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { relativeAge } from "discourse/lib/formatter";
|
||||
import round from "discourse/lib/round";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import { applyLocalDates } from "discourse/lib/local-dates";
|
||||
import round from "discourse/lib/round";
|
||||
import hbs from "discourse/widgets/hbs-compiler";
|
||||
import { avatarFor } from "discourse/widgets/post";
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import evenRound from "discourse/plugins/poll/lib/even-round";
|
||||
import PollBreakdownModal from "../components/modal/poll-breakdown";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { PIE_CHART_TYPE } from "../components/modal/poll-ui-builder";
|
||||
|
||||
const FETCH_VOTERS_COUNT = 25;
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
count,
|
||||
exists,
|
||||
query,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
|
||||
acceptance("Poll breakdown", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
updateCurrentUser,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
import { test } from "qunit";
|
||||
|
||||
acceptance("Poll Builder - polls are disabled", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,12 +1,12 @@
|
||||
import I18n from "I18n";
|
||||
import { click } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
updateCurrentUser,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { click } from "@ember/test-helpers";
|
||||
import I18n from "I18n";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
import { test } from "qunit";
|
||||
|
||||
acceptance("Poll Builder - polls are enabled", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Poll in a post reply history", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
count,
|
||||
query,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
|
||||
acceptance("Rendering polls with pie charts", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Poll quote", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import {
|
||||
acceptance,
|
||||
count,
|
||||
exists,
|
||||
publishToMessageBus,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
|
||||
acceptance("Poll results", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Rendering polls with bar charts - desktop", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Rendering polls with bar charts - mobile", function (needs) {
|
||||
needs.user();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { module, test } from "qunit";
|
||||
import { click, fillIn, render } from "@ember/test-helpers";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
|
||||
async function setupBuilder(context) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
|
||||
export async function displayPollBuilderButton() {
|
||||
await visit("/");
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { render } from "@ember/test-helpers";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { count } from "discourse/tests/helpers/qunit-helpers";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
|
||||
module(
|
||||
"Integration | Component | Widget | discourse-poll-option",
|
||||
|
@ -1,9 +1,9 @@
|
||||
import EmberObject from "@ember/object";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import EmberObject from "@ember/object";
|
||||
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
|
||||
module(
|
||||
"Integration | Component | Widget | discourse-poll-standard-results",
|
||||
|
@ -1,15 +1,15 @@
|
||||
import EmberObject from "@ember/object";
|
||||
import { click, render } from "@ember/test-helpers";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { click, render } from "@ember/test-helpers";
|
||||
import pretender, { response } from "discourse/tests/helpers/create-pretender";
|
||||
import {
|
||||
count,
|
||||
exists,
|
||||
query,
|
||||
queryAll,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import pretender, { response } from "discourse/tests/helpers/create-pretender";
|
||||
import EmberObject from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
|
||||
let requests = 0;
|
||||
|
Reference in New Issue
Block a user