DEV: Clean up imports (#28060)
* `@ember/owner` instead of `@ember/application` * `discourse-i18n` instead of `I18n` * `{ service } from "@ember/service"` instead of `inject as service`
This commit is contained in:
parent
c4845acf5e
commit
038e5deb2a
|
@ -1,7 +1,7 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
|
|
|
@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
|||
import { fn } from "@ember/helper";
|
||||
import { on } from "@ember/modifier";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { not } from "truth-helpers";
|
||||
import DButton from "discourse/components/d-button";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { LinkTo } from "@ember/routing";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import concatClass from "discourse/helpers/concat-class";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import HorizontalOverflowNav from "discourse/components/horizontal-overflow-nav";
|
||||
import NavItem from "discourse/components/nav-item";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
|
|
|
@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { cancel } from "@ember/runloop";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
||||
import SiteSettingFilter from "discourse/lib/site-setting-filter";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
|
||||
export default class AdminPluginsShowIndexRoute extends Route {
|
||||
@service router;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import SiteSetting from "admin/models/site-setting";
|
||||
|
||||
export default class AdminPluginsShowSettingsRoute extends Route {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { sanitize } from "discourse/lib/text";
|
||||
import AdminPlugin from "admin/models/admin-plugin";
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { getOwner as emberGetOwner, setOwner } from "@ember/application";
|
||||
import { getOwner as emberGetOwner, setOwner } from "@ember/owner";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
|
||||
let _default = {};
|
||||
|
||||
/**
|
||||
* Works similarly to { getOwner } from `@ember/application`, but has a fallback
|
||||
* Works similarly to { getOwner } from `@ember/owner`, but has a fallback
|
||||
* when the passed object doesn't have an owner.
|
||||
*
|
||||
* This exists for historical reasons. Ideally, any uses of it should be updated to use
|
||||
* the official `@ember/application` implementation.
|
||||
* the official `@ember/owner` implementation.
|
||||
*/
|
||||
export function getOwnerWithFallback(obj) {
|
||||
if (emberGetOwner) {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
|||
import { array, fn } from "@ember/helper";
|
||||
import { action } from "@ember/object";
|
||||
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import DropdownMenu from "discourse/components/dropdown-menu";
|
||||
import BookmarkModal from "discourse/components/modal/bookmark";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import EmberObject, { computed } from "@ember/object";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { next, schedule, throttle } from "@ember/runloop";
|
||||
import { BasePlugin } from "@uppy/core";
|
||||
import $ from "jquery";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { getCustomHTML } from "discourse/helpers/custom-html";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { schedule, scheduleOnce } from "@ember/runloop";
|
||||
import { isBlank } from "@ember/utils";
|
||||
import $ from "jquery";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import ItsATrap from "@discourse/itsatrap";
|
||||
import {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { fn } from "@ember/helper";
|
|||
import { on } from "@ember/modifier";
|
||||
import { action, getProperties } from "@ember/object";
|
||||
import { LinkTo } from "@ember/routing";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { or } from "truth-helpers";
|
||||
import Form from "discourse/components/form";
|
||||
import formatDate from "discourse/helpers/format-date";
|
||||
|
@ -13,7 +13,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { GROUP_SMTP_SSL_MODES } from "discourse/lib/constants";
|
||||
import emailProviderDefaultSettings from "discourse/lib/email-provider-default-settings";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class GroupSmtpEmailSettings extends Component {
|
||||
@service currentUser;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { hash } from "@ember/helper";
|
||||
import { action } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { modifier as modifierFn } from "ember-modifier";
|
||||
import { and, eq, not, or } from "truth-helpers";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import ClickTrack from "discourse/lib/click-track";
|
||||
|
||||
export default Component.extend({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { Input } from "@ember/component";
|
||||
import { on } from "@ember/modifier";
|
||||
import { action } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { Promise } from "rsvp";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { action } from "@ember/object";
|
||||
import { readOnly } from "@ember/object/computed";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import CreateInvite from "discourse/components/modal/create-invite";
|
||||
import { longDateNoYear } from "discourse/lib/formatter";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { action, set } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { classify, dasherize } from "@ember/string";
|
||||
import ExplainReviewableModal from "discourse/components/modal/explain-reviewable";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import avatar from "discourse/helpers/bound-avatar-template";
|
||||
import { userPath } from "discourse/lib/url";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { fn } from "@ember/helper";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { service } from "@ember/service";
|
||||
import { and, not, or } from "truth-helpers";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import DropdownMenu from "discourse/components/dropdown-menu";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import { alias, or } from "@ember/object/computed";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { NotificationLevels } from "discourse/lib/notification-levels";
|
||||
import { getTopicFooterButtons } from "discourse/lib/register-topic-footer-button";
|
||||
import { getTopicFooterDropdowns } from "discourse/lib/register-topic-footer-dropdown";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import { on } from "@ember/object/evented";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { cached, tracked } from "@glimmer/tracking";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { action } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { wantsNewWindow } from "discourse/lib/intercept-click";
|
||||
import UserMenuTab, { CUSTOM_TABS_CLASSES } from "discourse/lib/user-menu/tab";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import { on } from "@ember/object/evented";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { later } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import $ from "jquery";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import { modifier } from "ember-modifier";
|
||||
|
|
|
@ -17,7 +17,7 @@ import FKSection from "discourse/form-kit/components/fk/section";
|
|||
import { VALIDATION_TYPES } from "discourse/form-kit/lib/constants";
|
||||
import FKFieldData from "discourse/form-kit/lib/fk-field-data";
|
||||
import FKFormData from "discourse/form-kit/lib/fk-form-data";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
class FKForm extends Component {
|
||||
@service dialog;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getOwner, setOwner } from "@ember/application";
|
||||
import Helper from "@ember/component/helper";
|
||||
import { registerDestructor } from "@ember/destroyable";
|
||||
import { getOwner, setOwner } from "@ember/owner";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* eslint-disable ember/no-private-routing-service */
|
||||
import { getOwner } from "@ember/application";
|
||||
import { A } from "@ember/array";
|
||||
import Helper from "@ember/component/helper";
|
||||
import { assert, runInDebug } from "@ember/debug";
|
||||
import { computed, get } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { join } from "@ember/runloop";
|
||||
|
||||
function getCurrentRouteInfos(router) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { setOwner } from "@ember/application";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import Handlebars from "handlebars";
|
||||
import {
|
||||
createHelperContext,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { getOwner, setOwner } from "@ember/application";
|
||||
import { getOwner, setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { TrackedArray } from "@ember-compat/tracked-built-ins";
|
||||
import { NotificationLevels } from "discourse/lib/notification-levels";
|
||||
|
|
|
@ -5,8 +5,8 @@ styleguide to use them, and eventually to generate dummy data
|
|||
in a placeholder component. It should not be used for any other case.
|
||||
*/
|
||||
|
||||
import { setOwner } from "@ember/application";
|
||||
import ApplicationInstance from "@ember/application/instance";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { getLoadedFaker } from "discourse/lib/load-faker";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { setOwner } from "@ember/application";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { debounce } from "@ember/runloop";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { getHashtagTypeClasses } from "discourse/lib/hashtag-type-registry";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import Component from "@ember/component";
|
||||
import Controller from "@ember/controller";
|
||||
import EmberObject, { computed } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import Route from "@ember/routing/route";
|
||||
import Service from "@ember/service";
|
||||
import RestAdapter from "discourse/adapters/rest";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner, setOwner } from "@ember/application";
|
||||
import { getOwner, setOwner } from "@ember/owner";
|
||||
import { run, throttle } from "@ember/runloop";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { headerOffset } from "discourse/lib/offset-calculator";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { computed } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { dasherize } from "@ember/string";
|
||||
|
||||
export default function (name) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { setOwner } from "@ember/application";
|
||||
import { inject as controller } from "@ember/controller";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import {
|
||||
CLOSE_INITIATED_BY_BUTTON,
|
||||
CLOSE_INITIATED_BY_ESC,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { schedule } from "@ember/runloop";
|
||||
|
||||
let counter = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { setOwner } from "@ember/application";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import AboutSectionLink from "discourse/lib/sidebar/common/community-section/about-section-link";
|
||||
import BadgesSectionLink from "discourse/lib/sidebar/common/community-section/badges-section-link";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { setOwner } from "@ember/application";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import SidebarSectionForm from "discourse/components/modal/sidebar-section-form";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { setOwner } from "@ember/application";
|
||||
import { inject as controller } from "@ember/controller";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { BookmarkFormData } from "discourse/lib/bookmark-form-data";
|
||||
import Bookmark from "discourse/models/bookmark";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable ember/no-private-routing-service */
|
||||
import { setOwner } from "@ember/application";
|
||||
import EmberObject from "@ember/object";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { next, schedule } from "@ember/runloop";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import $ from "jquery";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { setOwner } from "@ember/application";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import { until } from "discourse/lib/formatter";
|
||||
import { emojiUnescape } from "discourse/lib/text";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
|
||||
export async function waitForClosedKeyboard(context) {
|
||||
if (!window.visualViewport) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { warn } from "@ember/debug";
|
||||
import EmberObject from "@ember/object";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { run } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import Uppy from "@uppy/core";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { setOwner } from "@ember/application";
|
||||
import { warn } from "@ember/debug";
|
||||
import EmberObject from "@ember/object";
|
||||
import { setOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import Uppy from "@uppy/core";
|
||||
import { isVideo } from "discourse/lib/uploads";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { getOwner, setOwner } from "@ember/application";
|
||||
import { warn } from "@ember/debug";
|
||||
import EmberObject from "@ember/object";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import { getOwner, setOwner } from "@ember/owner";
|
||||
import { Promise } from "rsvp";
|
||||
import { getOwnerWithFallback } from "discourse-common/lib/get-owner";
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { getOwner, setOwner } from "@ember/application";
|
||||
import { A } from "@ember/array";
|
||||
import EmberObject, { computed, get, getProperties } from "@ember/object";
|
||||
import { dependentKeyCompat } from "@ember/object/compat";
|
||||
import { alias, equal, filterBy, gt, mapBy, or } from "@ember/object/computed";
|
||||
import Evented from "@ember/object/evented";
|
||||
import { getOwner, setOwner } from "@ember/owner";
|
||||
import { cancel } from "@ember/runloop";
|
||||
import { service } from "@ember/service";
|
||||
import { camelize } from "@ember/string";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { service } from "@ember/service";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Service, { inject as service } from "@ember/service";
|
||||
import Service, { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import Bookmark from "discourse/models/bookmark";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import Service, { service } from "@ember/service";
|
||||
import $ from "jquery";
|
||||
import { getAndClearUnhandledThemeErrors } from "discourse/app";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Service, { inject as service } from "@ember/service";
|
||||
import Service, { service } from "@ember/service";
|
||||
|
||||
export default class RestrictedRouting extends Service {
|
||||
@service currentUser;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { scheduleOnce } from "@ember/runloop";
|
||||
|
||||
export default class ComponentConnector {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { next } from "@ember/runloop";
|
||||
|
||||
export default class Connector {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { Promise } from "rsvp";
|
||||
import { h } from "virtual-dom";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner, setOwner } from "@ember/application";
|
||||
import { get } from "@ember/object";
|
||||
import { getOwner, setOwner } from "@ember/owner";
|
||||
import { camelize } from "@ember/string";
|
||||
import { Promise } from "rsvp";
|
||||
import { h } from "virtual-dom";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import Sinon from "sinon";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, fillIn, settled, visit } from "@ember/test-helpers";
|
||||
import { skip, test } from "qunit";
|
||||
import { Promise } from "rsvp";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import Site from "discourse/models/site";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, settled, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { setDefaultHomepage } from "discourse/lib/utilities";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner, setOwner } from "@ember/application";
|
||||
import { getOwner, setOwner } from "@ember/owner";
|
||||
import Service, { service } from "@ember/service";
|
||||
import { test } from "qunit";
|
||||
import RestModel from "discourse/models/rest";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import {
|
||||
currentRouteName,
|
||||
getSettledState,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { on } from "@ember/modifier";
|
||||
import { action } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, settled, triggerKeyEvent, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import DModal, {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, currentURL, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import NotificationFixtures from "discourse/tests/fixtures/notification-fixtures";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, currentURL, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import sinon from "sinon";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import {
|
||||
click,
|
||||
find,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { action } from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render, triggerEvent } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { click, render } from "@ember/test-helpers";
|
|||
import { module, test } from "qunit";
|
||||
import Form from "discourse/components/form";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
module("Integration | Component | FormKit | Layout | Submit", function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import HomeLogo from "discourse/components/header/home-logo";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import LigthDarkImg from "discourse/components/light-dark-img";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, fillIn, render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import ReorderCategories from "discourse/components/modal/reorder-categories";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, fillIn, render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import RequestGroupMembershipForm from "discourse/components/modal/request-group-membership-form";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// deprecated in favor of discourse/tests/integration/components/home-logo-test.gjs
|
||||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import MountWidget from "discourse/components/mount-widget";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import EmberObject from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, render, triggerEvent } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { click, render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { render, settled } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import RenderGlimmerContainer from "discourse/components/render-glimmer-container";
|
||||
|
|
|
@ -3,7 +3,7 @@ import Application from "../app";
|
|||
import "./loader-shims";
|
||||
/* eslint-enable simple-import-sort/imports */
|
||||
|
||||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import {
|
||||
getSettledState,
|
||||
isSettled,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { settled } from "@ember/test-helpers";
|
||||
import { setupTest } from "ember-qunit";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import EmberObject from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { next } from "@ember/runloop";
|
||||
import { settled } from "@ember/test-helpers";
|
||||
import { setupTest } from "ember-qunit";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { setupTest } from "ember-qunit";
|
||||
import { module, test } from "qunit";
|
||||
import { buildQuote } from "discourse/lib/quote";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { setupTest } from "ember-qunit";
|
||||
import $ from "jquery";
|
||||
import { module, test } from "qunit";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import EmberObject from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { setupTest } from "ember-qunit";
|
||||
import { module, test } from "qunit";
|
||||
import sinon from "sinon";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { setupTest } from "ember-qunit";
|
||||
import { emojiSearch } from "pretty-text/emoji";
|
||||
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { setupTest } from "ember-qunit";
|
||||
import { module, test } from "qunit";
|
||||
import Validator from "discourse/form-kit/lib/validator";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
module("Unit | Lib | FormKit | Validator", function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwner } from "@ember/application";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { setupTest } from "ember-qunit";
|
||||
import { module, test } from "qunit";
|
||||
import {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue