DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733)

`discourse-common` was created in the past to share logic between the
'wizard' app and the main 'discourse' app. Since then, the wizard has
been consolidated into the main app, so the separation of
`discourse-common` is no longer useful.

This commit moves `discourse-common/(lib|utils)/*` into
`discourse/lib/*`, adds shims for the imports, and updates existing
uses in core.
This commit is contained in:
David Taylor 2025-01-13 13:02:49 +00:00 committed by GitHub
parent b28fafd372
commit 0ed4b09527
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
855 changed files with 1287 additions and 1239 deletions

View File

@ -5,7 +5,7 @@ import { service } from "@ember/service";
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner"; import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item"; import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminConfigAreaEmptyList from "admin/components/admin-config-area-empty-list"; import AdminConfigAreaEmptyList from "admin/components/admin-config-area-empty-list";
import AdminFilteredSiteSettings from "admin/components/admin-filtered-site-settings"; import AdminFilteredSiteSettings from "admin/components/admin-filtered-site-settings";

View File

@ -2,7 +2,7 @@ import Component from "@ember/component";
import { scheduleOnce } from "@ember/runloop"; import { scheduleOnce } from "@ember/runloop";
import { classNames } from "@ember-decorators/component"; import { classNames } from "@ember-decorators/component";
import { observes, on } from "@ember-decorators/object"; import { observes, on } from "@ember-decorators/object";
import discourseDebounce from "discourse-common/lib/debounce"; import discourseDebounce from "discourse/lib/debounce";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
@classNames("admin-backups-logs") @classNames("admin-backups-logs")

View File

@ -5,7 +5,7 @@ import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { SYSTEM_FLAG_IDS } from "discourse/lib/constants"; import { SYSTEM_FLAG_IDS } from "discourse/lib/constants";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminFlagItem from "admin/components/admin-flag-item"; import AdminFlagItem from "admin/components/admin-flag-item";

View File

@ -5,8 +5,8 @@ import { cancel } from "@ember/runloop";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner"; import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
import discourseDebounce from "discourse/lib/debounce";
import SiteSettingFilter from "discourse/lib/site-setting-filter"; import SiteSettingFilter from "discourse/lib/site-setting-filter";
import discourseDebounce from "discourse-common/lib/debounce";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminSiteSettingsFilterControls from "admin/components/admin-site-settings-filter-controls"; import AdminSiteSettingsFilterControls from "admin/components/admin-site-settings-filter-controls";
import SiteSetting from "admin/components/site-setting"; import SiteSetting from "admin/components/site-setting";

View File

@ -7,7 +7,7 @@ import BackButton from "discourse/components/back-button";
import Form from "discourse/components/form"; import Form from "discourse/components/form";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminConfigAreaCard from "admin/components/admin-config-area-card"; import AdminConfigAreaCard from "admin/components/admin-config-area-card";
import MultiSelect from "select-kit/components/multi-select"; import MultiSelect from "select-kit/components/multi-select";

View File

@ -1,6 +1,6 @@
import Component from "@ember/component"; import Component from "@ember/component";
import { classNames } from "@ember-decorators/component"; import { classNames } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
@classNames("penalty-history") @classNames("penalty-history")
export default class AdminPenaltyHistory extends Component { export default class AdminPenaltyHistory extends Component {

View File

@ -1,9 +1,7 @@
import Component from "@ember/component"; import Component from "@ember/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { equal } from "@ember/object/computed"; import { equal } from "@ember/object/computed";
import discourseComputed, { import discourseComputed, { afterRender } from "discourse/lib/decorators";
afterRender,
} from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
const ACTIONS = ["delete", "delete_replies", "edit", "none"]; const ACTIONS = ["delete", "delete_replies", "edit", "none"];

View File

@ -2,7 +2,7 @@ import Component from "@ember/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { equal } from "@ember/object/computed"; import { equal } from "@ember/object/computed";
import { tagName } from "@ember-decorators/component"; import { tagName } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
const CUSTOM_REASON_KEY = "custom"; const CUSTOM_REASON_KEY = "custom";

View File

@ -8,7 +8,7 @@ import { eq } from "truth-helpers";
import BackButton from "discourse/components/back-button"; import BackButton from "discourse/components/back-button";
import Form from "discourse/components/form"; import Form from "discourse/components/form";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminConfigAreaCard from "admin/components/admin-config-area-card"; import AdminConfigAreaCard from "admin/components/admin-config-area-card";
import Permalink from "admin/models/permalink"; import Permalink from "admin/models/permalink";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { number } from "discourse/lib/formatter"; import { number } from "discourse/lib/formatter";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse/lib/helpers";
import Report from "admin/models/report"; import Report from "admin/models/report";
import Chart from "./chart"; import Chart from "./chart";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse/lib/helpers";
import hexToRGBA from "admin/lib/hex-to-rgba"; import hexToRGBA from "admin/lib/hex-to-rgba";
import Report from "admin/models/report"; import Report from "admin/models/report";
import Chart from "./chart"; import Chart from "./chart";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { number } from "discourse/lib/formatter"; import { number } from "discourse/lib/formatter";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse/lib/helpers";
import Report from "admin/models/report"; import Report from "admin/models/report";
import Chart from "./chart"; import Chart from "./chart";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { number } from "discourse/lib/formatter"; import { number } from "discourse/lib/formatter";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse/lib/helpers";
import hexToRGBA from "admin/lib/hex-to-rgba"; import hexToRGBA from "admin/lib/hex-to-rgba";
import Report from "admin/models/report"; import Report from "admin/models/report";
import Chart from "./chart"; import Chart from "./chart";

View File

@ -2,7 +2,7 @@ import Component from "@ember/component";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import { classNames } from "@ember-decorators/component"; import { classNames } from "@ember-decorators/component";
import { setting } from "discourse/lib/computed"; import { setting } from "discourse/lib/computed";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import I18n, { i18n } from "discourse-i18n"; import I18n, { i18n } from "discourse-i18n";
@classNames("admin-report-storage-stats") @classNames("admin-report-storage-stats")

View File

@ -6,7 +6,7 @@ import {
classNames, classNames,
tagName, tagName,
} from "@ember-decorators/component"; } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
@tagName("td") @tagName("td")
@classNames("admin-report-table-cell") @classNames("admin-report-table-cell")

View File

@ -5,7 +5,7 @@ import {
classNames, classNames,
tagName, tagName,
} from "@ember-decorators/component"; } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
@tagName("th") @tagName("th")
@classNames("admin-report-table-header") @classNames("admin-report-table-header")

View File

@ -2,8 +2,8 @@ import Component from "@ember/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import { classNameBindings, classNames } from "@ember-decorators/component"; import { classNameBindings, classNames } from "@ember-decorators/component";
import { makeArray } from "discourse-common/lib/helpers"; import discourseComputed from "discourse/lib/decorators";
import discourseComputed from "discourse-common/utils/decorators"; import { makeArray } from "discourse/lib/helpers";
const PAGES_LIMIT = 8; const PAGES_LIMIT = 8;

View File

@ -4,12 +4,12 @@ import { alias, and, equal, notEmpty, or } from "@ember/object/computed";
import { next } from "@ember/runloop"; import { next } from "@ember/runloop";
import { isPresent } from "@ember/utils"; import { isPresent } from "@ember/utils";
import { classNameBindings, classNames } from "@ember-decorators/component"; import { classNameBindings, classNames } from "@ember-decorators/component";
import discourseComputed from "discourse/lib/decorators";
import { exportEntity } from "discourse/lib/export-csv"; import { exportEntity } from "discourse/lib/export-csv";
import { outputExportResult } from "discourse/lib/export-result"; import { outputExportResult } from "discourse/lib/export-result";
import { makeArray } from "discourse/lib/helpers";
import ReportLoader from "discourse/lib/reports-loader"; import ReportLoader from "discourse/lib/reports-loader";
import { isTesting } from "discourse-common/config/environment"; import { isTesting } from "discourse-common/config/environment";
import { makeArray } from "discourse-common/lib/helpers";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import Report, { DAILY_LIMIT_DAYS, SCHEMA_VERSION } from "admin/models/report"; import Report, { DAILY_LIMIT_DAYS, SCHEMA_VERSION } from "admin/models/report";

View File

@ -8,7 +8,7 @@ import { htmlSafe } from "@ember/template";
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner"; import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
import dIcon from "discourse/helpers/d-icon"; import dIcon from "discourse/helpers/d-icon";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminReports extends Component { export default class AdminReports extends Component {

View File

@ -2,8 +2,8 @@ import Component from "@ember/component";
import { action, computed } from "@ember/object"; import { action, computed } from "@ember/object";
import { next } from "@ember/runloop"; import { next } from "@ember/runloop";
import { fmt } from "discourse/lib/computed"; import { fmt } from "discourse/lib/computed";
import discourseComputed from "discourse/lib/decorators";
import { isDocumentRTL } from "discourse/lib/text-direction"; import { isDocumentRTL } from "discourse/lib/text-direction";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminThemeEditor extends Component { export default class AdminThemeEditor extends Component {

View File

@ -8,7 +8,7 @@ import DButton from "discourse/components/d-button";
import DModal from "discourse/components/d-modal"; import DModal from "discourse/components/d-modal";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { extractError } from "discourse/lib/ajax-error"; import { extractError } from "discourse/lib/ajax-error";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
const BULK_DELETE_CHANNEL = "/bulk-user-delete"; const BULK_DELETE_CHANNEL = "/bulk-user-delete";

View File

@ -5,7 +5,7 @@ import { service } from "@ember/service";
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner"; import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminConfigAreaCard from "admin/components/admin-config-area-card"; import AdminConfigAreaCard from "admin/components/admin-config-area-card";
import AdminConfigAreaEmptyList from "admin/components/admin-config-area-empty-list"; import AdminConfigAreaEmptyList from "admin/components/admin-config-area-empty-list";

View File

@ -2,7 +2,7 @@ import Component from "@ember/component";
import { action, computed } from "@ember/object"; import { action, computed } from "@ember/object";
import { reads } from "@ember/object/computed"; import { reads } from "@ember/object/computed";
import { service } from "@ember/service"; import { service } from "@ember/service";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class EmailStylesEditor extends Component { export default class EmailStylesEditor extends Component {

View File

@ -3,8 +3,8 @@ import { action } from "@ember/object";
import { notEmpty } from "@ember/object/computed"; import { notEmpty } from "@ember/object/computed";
import { getOwner } from "@ember/owner"; import { getOwner } from "@ember/owner";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import discourseComputed from "discourse/lib/decorators";
import UppyUpload from "discourse/lib/uppy/uppy-upload"; import UppyUpload from "discourse/lib/uppy/uppy-upload";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
const DEFAULT_GROUP = "default"; const DEFAULT_GROUP = "default";

View File

@ -4,8 +4,8 @@ import { schedule } from "@ember/runloop";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { classNameBindings } from "@ember-decorators/component"; import { classNameBindings } from "@ember-decorators/component";
import EmojiPickerDetached from "discourse/components/emoji-picker/detached"; import EmojiPickerDetached from "discourse/components/emoji-picker/detached";
import discourseComputed from "discourse/lib/decorators";
import { emojiUrlFor } from "discourse/lib/text"; import { emojiUrlFor } from "discourse/lib/text";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
@classNameBindings(":value-list", ":emoji-list") @classNameBindings(":value-list", ":emoji-list")

View File

@ -1,7 +1,7 @@
import Component from "@ember/component"; import Component from "@ember/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { classNames } from "@ember-decorators/component"; import { classNames } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
@classNames("inline-edit") @classNames("inline-edit")
export default class InlineEditCheckbox extends Component { export default class InlineEditCheckbox extends Component {

View File

@ -14,7 +14,7 @@ import dIcon from "discourse/helpers/d-icon";
import withEventValue from "discourse/helpers/with-event-value"; import withEventValue from "discourse/helpers/with-event-value";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { POPULAR_THEMES } from "discourse-common/lib/popular-themes"; import { POPULAR_THEMES } from "discourse/lib/popular-themes";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import InstallThemeItem from "admin/components/install-theme-item"; import InstallThemeItem from "admin/components/install-theme-item";
import { COMPONENTS, THEMES } from "admin/models/theme"; import { COMPONENTS, THEMES } from "admin/models/theme";

View File

@ -1,8 +1,8 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { bind } from "discourse/lib/decorators";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import { bind } from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class MergeUsersProgress extends Component { export default class MergeUsersProgress extends Component {

View File

@ -4,7 +4,7 @@ import { schedule } from "@ember/runloop";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { tagName } from "@ember-decorators/component"; import { tagName } from "@ember-decorators/component";
import { fmt } from "discourse/lib/computed"; import { fmt } from "discourse/lib/computed";
import discourseComputed, { bind } from "discourse-common/utils/decorators"; import discourseComputed, { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import Permalink from "admin/models/permalink"; import Permalink from "admin/models/permalink";

View File

@ -6,7 +6,7 @@ import { service } from "@ember/service";
import { gt } from "truth-helpers"; import { gt } from "truth-helpers";
import DButton from "discourse/components/d-button"; import DButton from "discourse/components/d-button";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { cloneJSON } from "discourse-common/lib/object"; import { cloneJSON } from "discourse/lib/object";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import Tree from "admin/components/schema-theme-setting/editor/tree"; import Tree from "admin/components/schema-theme-setting/editor/tree";
import FieldInput from "admin/components/schema-theme-setting/field"; import FieldInput from "admin/components/schema-theme-setting/field";

View File

@ -3,7 +3,7 @@ import { action } from "@ember/object";
import { schedule } from "@ember/runloop"; import { schedule } from "@ember/runloop";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { classNames, tagName } from "@ember-decorators/component"; import { classNames, tagName } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ScreenedIpAddress from "admin/models/screened-ip-address"; import ScreenedIpAddress from "admin/models/screened-ip-address";

View File

@ -4,7 +4,7 @@ import { action } from "@ember/object";
import { empty } from "@ember/object/computed"; import { empty } from "@ember/object/computed";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { classNameBindings } from "@ember-decorators/component"; import { classNameBindings } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
@classNameBindings(":simple-list", ":value-list") @classNameBindings(":simple-list", ":value-list")
export default class SimpleList extends Component { export default class SimpleList extends Component {

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import { hash } from "@ember/helper"; import { hash } from "@ember/helper";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse/lib/helpers";
import ListSetting from "select-kit/components/list-setting"; import ListSetting from "select-kit/components/list-setting";
export default class CompactList extends Component { export default class CompactList extends Component {

View File

@ -5,7 +5,7 @@ import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import DButton from "discourse/components/d-button"; import DButton from "discourse/components/d-button";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse/lib/helpers";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ListSetting from "select-kit/components/list-setting"; import ListSetting from "select-kit/components/list-setting";

View File

@ -1,6 +1,6 @@
import Component from "@ember/component"; import Component from "@ember/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class TagGroupList extends Component { export default class TagGroupList extends Component {
@discourseComputed("value") @discourseComputed("value")

View File

@ -1,6 +1,6 @@
import Component from "@ember/component"; import Component from "@ember/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class TagList extends Component { export default class TagList extends Component {
@discourseComputed("value") @discourseComputed("value")

View File

@ -4,8 +4,8 @@ import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import DButton from "discourse/components/d-button"; import DButton from "discourse/components/d-button";
import concatClass from "discourse/helpers/concat-class"; import concatClass from "discourse/helpers/concat-class";
import { bind } from "discourse/lib/decorators";
import highlightHTML from "discourse/lib/highlight-html"; import highlightHTML from "discourse/lib/highlight-html";
import { bind } from "discourse-common/utils/decorators";
export default class SiteTextSummary extends Component { export default class SiteTextSummary extends Component {
@action @action

View File

@ -8,8 +8,8 @@ import { htmlSafe } from "@ember/template";
import PluginOutlet from "discourse/components/plugin-outlet"; import PluginOutlet from "discourse/components/plugin-outlet";
import concatClass from "discourse/helpers/concat-class"; import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon"; import icon from "discourse/helpers/d-icon";
import escape from "discourse-common/lib/escape"; import escape from "discourse/lib/escape";
import { iconHTML } from "discourse-common/lib/icon-library"; import { iconHTML } from "discourse/lib/icon-library";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
const MAX_COMPONENTS = 4; const MAX_COMPONENTS = 4;

View File

@ -4,7 +4,7 @@ import { equal, gt, gte } from "@ember/object/computed";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { classNames } from "@ember-decorators/component"; import { classNames } from "@ember-decorators/component";
import DeleteThemesConfirm from "discourse/components/modal/delete-themes-confirm"; import DeleteThemesConfirm from "discourse/components/modal/delete-themes-confirm";
import discourseComputed, { bind } from "discourse-common/utils/decorators"; import discourseComputed, { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import { COMPONENTS, THEMES } from "admin/models/theme"; import { COMPONENTS, THEMES } from "admin/models/theme";

View File

@ -2,8 +2,8 @@ import Component from "@ember/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { empty, reads } from "@ember/object/computed"; import { empty, reads } from "@ember/object/computed";
import { classNames } from "@ember-decorators/component"; import { classNames } from "@ember-decorators/component";
import { makeArray } from "discourse-common/lib/helpers"; import discourseComputed from "discourse/lib/decorators";
import discourseComputed from "discourse-common/utils/decorators"; import { makeArray } from "discourse/lib/helpers";
@classNames("value-list") @classNames("value-list")
export default class ValueList extends Component { export default class ValueList extends Component {

View File

@ -6,7 +6,7 @@ import { isEmpty } from "@ember/utils";
import { classNames, tagName } from "@ember-decorators/component"; import { classNames, tagName } from "@ember-decorators/component";
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import WatchedWord from "admin/models/watched-word"; import WatchedWord from "admin/models/watched-word";

View File

@ -5,7 +5,7 @@ import { gt, readOnly } from "@ember/object/computed";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { bind } from "discourse-common/utils/decorators"; import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class WebhookEvents extends Component { export default class WebhookEvents extends Component {

View File

@ -5,7 +5,7 @@ import { service } from "@ember/service";
import { isBlank } from "@ember/utils"; import { isBlank } from "@ember/utils";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ApiKeyUrlsModal from "../components/modal/api-key-urls"; import ApiKeyUrlsModal from "../components/modal/api-key-urls";

View File

@ -5,8 +5,8 @@ import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { computedI18n, setting } from "discourse/lib/computed"; import { computedI18n, setting } from "discourse/lib/computed";
import getURL from "discourse-common/lib/get-url"; import discourseComputed from "discourse/lib/decorators";
import discourseComputed from "discourse-common/utils/decorators"; import getURL from "discourse/lib/get-url";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminBackupsIndexController extends Controller { export default class AdminBackupsIndexController extends Controller {

View File

@ -5,7 +5,7 @@ import { service } from "@ember/service";
import { isNone } from "@ember/utils"; import { isNone } from "@ember/utils";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import getURL from "discourse-common/lib/get-url"; import getURL from "discourse/lib/get-url";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import BadgePreviewModal from "../../components/modal/badge-preview"; import BadgePreviewModal from "../../components/modal/badge-preview";

View File

@ -1,8 +1,8 @@
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { action, computed } from "@ember/object"; import { action, computed } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import discourseLater from "discourse/lib/later";
import { clipboardCopy } from "discourse/lib/utilities"; import { clipboardCopy } from "discourse/lib/utilities";
import discourseLater from "discourse-common/lib/later";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminCustomizeColorsShowController extends Controller { export default class AdminCustomizeColorsShowController extends Controller {

View File

@ -1,7 +1,7 @@
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import EmberObject, { action } from "@ember/object"; import EmberObject, { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ColorSchemeSelectBaseModal from "admin/components/modal/color-scheme-select-base"; import ColorSchemeSelectBaseModal from "admin/components/modal/color-scheme-select-base";

View File

@ -1,7 +1,7 @@
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminCustomizeEmailStyleEditController extends Controller { export default class AdminCustomizeEmailStyleEditController extends Controller {

View File

@ -2,8 +2,8 @@ import Controller, { inject as controller } from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse/lib/decorators";
import { bufferedProperty } from "discourse/mixins/buffered-content"; import { bufferedProperty } from "discourse/mixins/buffered-content";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminCustomizeEmailTemplatesEditController extends Controller.extend( export default class AdminCustomizeEmailTemplatesEditController extends Controller.extend(

View File

@ -2,7 +2,7 @@ import Controller from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { url } from "discourse/lib/computed"; import { url } from "discourse/lib/computed";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminCustomizeThemesEditController extends Controller { export default class AdminCustomizeThemesEditController extends Controller {

View File

@ -12,8 +12,8 @@ import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { url } from "discourse/lib/computed"; import { url } from "discourse/lib/computed";
import { makeArray } from "discourse-common/lib/helpers"; import discourseComputed from "discourse/lib/decorators";
import discourseComputed from "discourse-common/utils/decorators"; import { makeArray } from "discourse/lib/helpers";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ThemeSettingsEditor from "admin/components/theme-settings-editor"; import ThemeSettingsEditor from "admin/components/theme-settings-editor";
import { COMPONENTS, THEMES } from "admin/models/theme"; import { COMPONENTS, THEMES } from "admin/models/theme";

View File

@ -1,5 +1,5 @@
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { THEMES } from "admin/models/theme"; import { THEMES } from "admin/models/theme";
export default class AdminCustomizeThemesController extends Controller { export default class AdminCustomizeThemesController extends Controller {

View File

@ -2,9 +2,9 @@ import { inject as controller } from "@ember/controller";
import { computed } from "@ember/object"; import { computed } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { setting } from "discourse/lib/computed"; import { setting } from "discourse/lib/computed";
import getURL from "discourse-common/lib/get-url"; import discourseComputed from "discourse/lib/decorators";
import { makeArray } from "discourse-common/lib/helpers"; import getURL from "discourse/lib/get-url";
import discourseComputed from "discourse-common/utils/decorators"; import { makeArray } from "discourse/lib/helpers";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminDashboard from "admin/models/admin-dashboard"; import AdminDashboard from "admin/models/admin-dashboard";
import Report from "admin/models/report"; import Report from "admin/models/report";

View File

@ -1,5 +1,5 @@
import { computed } from "@ember/object"; import { computed } from "@ember/object";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import AdminDashboardTabController from "./admin-dashboard-tab"; import AdminDashboardTabController from "./admin-dashboard-tab";
export default class AdminDashboardModerationController extends AdminDashboardTabController { export default class AdminDashboardModerationController extends AdminDashboardTabController {

View File

@ -1,8 +1,8 @@
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { action, get } from "@ember/object"; import { action, get } from "@ember/object";
import discourseDebounce from "discourse/lib/debounce";
import discourseComputed from "discourse/lib/decorators";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import discourseComputed from "discourse-common/utils/decorators";
export default class AdminDashboardReportsController extends Controller { export default class AdminDashboardReportsController extends Controller {
filter = null; filter = null;

View File

@ -2,7 +2,7 @@ import Controller, { inject as controller } from "@ember/controller";
import { action, computed } from "@ember/object"; import { action, computed } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { setting } from "discourse/lib/computed"; import { setting } from "discourse/lib/computed";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import AdminDashboard from "admin/models/admin-dashboard"; import AdminDashboard from "admin/models/admin-dashboard";
import VersionCheck from "admin/models/version-check"; import VersionCheck from "admin/models/version-check";

View File

@ -1,7 +1,7 @@
import { action } from "@ember/object"; import { action } from "@ember/object";
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import AdminEmailLogsController from "admin/controllers/admin-email-logs";
export default class AdminEmailBouncedController extends AdminEmailLogsController { export default class AdminEmailBouncedController extends AdminEmailLogsController {

View File

@ -1,7 +1,7 @@
import { action } from "@ember/object"; import { action } from "@ember/object";
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import AdminEmailLogsController from "admin/controllers/admin-email-logs";
import IncomingEmail from "admin/models/incoming-email"; import IncomingEmail from "admin/models/incoming-email";

View File

@ -1,7 +1,7 @@
import { action } from "@ember/object"; import { action } from "@ember/object";
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import AdminEmailLogsController from "admin/controllers/admin-email-logs";
import IncomingEmail from "admin/models/incoming-email"; import IncomingEmail from "admin/models/incoming-email";

View File

@ -1,6 +1,6 @@
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import AdminEmailLogsController from "admin/controllers/admin-email-logs";
export default class AdminEmailSentController extends AdminEmailLogsController { export default class AdminEmailSentController extends AdminEmailLogsController {

View File

@ -1,6 +1,6 @@
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import AdminEmailLogsController from "admin/controllers/admin-email-logs";
export default class AdminEmailSkippedController extends AdminEmailLogsController { export default class AdminEmailSkippedController extends AdminEmailLogsController {

View File

@ -2,7 +2,7 @@ import Controller, { inject as controller } from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import { service } from "@ember/service"; import { service } from "@ember/service";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class AdminEmbeddingIndexController extends Controller { export default class AdminEmbeddingIndexController extends Controller {
@service router; @service router;

View File

@ -2,10 +2,10 @@ import Controller from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { exportEntity } from "discourse/lib/export-csv"; import { exportEntity } from "discourse/lib/export-csv";
import { outputExportResult } from "discourse/lib/export-result"; import { outputExportResult } from "discourse/lib/export-result";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ScreenedIpAddress from "admin/models/screened-ip-address"; import ScreenedIpAddress from "admin/models/screened-ip-address";

View File

@ -2,9 +2,9 @@ import Controller from "@ember/controller";
import EmberObject, { action } from "@ember/object"; import EmberObject, { action } from "@ember/object";
import { scheduleOnce } from "@ember/runloop"; import { scheduleOnce } from "@ember/runloop";
import { service } from "@ember/service"; import { service } from "@ember/service";
import discourseComputed from "discourse/lib/decorators";
import { exportEntity } from "discourse/lib/export-csv"; import { exportEntity } from "discourse/lib/export-csv";
import { outputExportResult } from "discourse/lib/export-result"; import { outputExportResult } from "discourse/lib/export-result";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminStaffActionLogComponent from "../components/modal/staff-action-log-change"; import AdminStaffActionLogComponent from "../components/modal/staff-action-log-change";
import StaffActionLogDetailsModal from "../components/modal/staff-action-log-details"; import StaffActionLogDetailsModal from "../components/modal/staff-action-log-details";

View File

@ -3,9 +3,9 @@ import { action } from "@ember/object";
import { or } from "@ember/object/computed"; import { or } from "@ember/object/computed";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { clipboardCopy } from "discourse/lib/utilities"; import { clipboardCopy } from "discourse/lib/utilities";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import Permalink from "admin/models/permalink"; import Permalink from "admin/models/permalink";

View File

@ -1,5 +1,5 @@
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class AdminReportsShowController extends Controller { export default class AdminReportsShowController extends Controller {
queryParams = ["start_date", "end_date", "filters", "chart_grouping", "mode"]; queryParams = ["start_date", "end_date", "filters", "chart_grouping", "mode"];

View File

@ -1,5 +1,5 @@
import Controller, { inject as controller } from "@ember/controller"; import Controller, { inject as controller } from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class AdminSiteSettingsCategoryController extends Controller { export default class AdminSiteSettingsCategoryController extends Controller {
@controller adminSiteSettings; @controller adminSiteSettings;

View File

@ -3,9 +3,9 @@ import { action } from "@ember/object";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { debounce } from "discourse/lib/decorators";
import SiteSettingFilter from "discourse/lib/site-setting-filter"; import SiteSettingFilter from "discourse/lib/site-setting-filter";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import { debounce } from "discourse-common/utils/decorators";
export default class AdminSiteSettingsController extends Controller { export default class AdminSiteSettingsController extends Controller {
@service router; @service router;

View File

@ -2,8 +2,8 @@ import Controller from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse/lib/decorators";
import { bufferedProperty } from "discourse/mixins/buffered-content"; import { bufferedProperty } from "discourse/mixins/buffered-content";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminSiteTextEdit extends Controller.extend( export default class AdminSiteTextEdit extends Controller.extend(

View File

@ -2,8 +2,8 @@ import { tracked } from "@glimmer/tracking";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import discourseDebounce from "discourse/lib/debounce";
import { disableImplicitInjections } from "discourse/lib/implicit-injections"; import { disableImplicitInjections } from "discourse/lib/implicit-injections";
import discourseDebounce from "discourse-common/lib/debounce";
import ReseedModal from "admin/components/modal/reseed"; import ReseedModal from "admin/components/modal/reseed";
let lastSearch; let lastSearch;

View File

@ -4,9 +4,9 @@ import { alias, empty, sort } from "@ember/object/computed";
import { next } from "@ember/runloop"; import { next } from "@ember/runloop";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse/lib/decorators";
import { grantableBadges } from "discourse/lib/grant-badge-utils"; import { grantableBadges } from "discourse/lib/grant-badge-utils";
import UserBadge from "discourse/models/user-badge"; import UserBadge from "discourse/models/user-badge";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminUser from "admin/models/admin-user"; import AdminUser from "admin/models/admin-user";

View File

@ -7,9 +7,9 @@ import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import CanCheckEmailsHelper from "discourse/lib/can-check-emails-helper"; import CanCheckEmailsHelper from "discourse/lib/can-check-emails-helper";
import { fmt, propertyNotEqual, setting } from "discourse/lib/computed"; import { fmt, propertyNotEqual, setting } from "discourse/lib/computed";
import discourseComputed from "discourse/lib/decorators";
import getURL from "discourse/lib/get-url";
import DiscourseURL, { userPath } from "discourse/lib/url"; import DiscourseURL, { userPath } from "discourse/lib/url";
import getURL from "discourse-common/lib/get-url";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminUser from "admin/models/admin-user"; import AdminUser from "admin/models/admin-user";
import DeletePostsConfirmationModal from "../components/modal/delete-posts-confirmation"; import DeletePostsConfirmationModal from "../components/modal/delete-posts-confirmation";

View File

@ -4,9 +4,9 @@ import { action, computed } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import CanCheckEmailsHelper from "discourse/lib/can-check-emails-helper"; import CanCheckEmailsHelper from "discourse/lib/can-check-emails-helper";
import { computedI18n, setting } from "discourse/lib/computed"; import { computedI18n, setting } from "discourse/lib/computed";
import discourseDebounce from "discourse/lib/debounce";
import discourseComputed, { bind } from "discourse/lib/decorators";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
import discourseComputed, { bind } from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import BulkUserDeleteConfirmation from "admin/components/bulk-user-delete-confirmation"; import BulkUserDeleteConfirmation from "admin/components/bulk-user-delete-confirmation";
import AdminUser from "admin/models/admin-user"; import AdminUser from "admin/models/admin-user";

View File

@ -5,7 +5,7 @@ import { schedule } from "@ember/runloop";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { fmt } from "discourse/lib/computed"; import { fmt } from "discourse/lib/computed";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import WatchedWordTestingModal from "admin/components/modal/watched-word-testing"; import WatchedWordTestingModal from "admin/components/modal/watched-word-testing";
import WatchedWord from "admin/models/watched-word"; import WatchedWord from "admin/models/watched-word";

View File

@ -2,8 +2,8 @@ import Controller from "@ember/controller";
import EmberObject, { action } from "@ember/object"; import EmberObject, { action } from "@ember/object";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { observes } from "@ember-decorators/object"; import { observes } from "@ember-decorators/object";
import discourseDebounce from "discourse/lib/debounce";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import discourseDebounce from "discourse-common/lib/debounce";
export default class AdminWatchedWordsController extends Controller { export default class AdminWatchedWordsController extends Controller {
filter = null; filter = null;

View File

@ -4,7 +4,7 @@ import { alias } from "@ember/object/computed";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminWebHooksEditController extends Controller { export default class AdminWebHooksEditController extends Controller {

View File

@ -1,7 +1,7 @@
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { dasherize } from "@ember/string"; import { dasherize } from "@ember/string";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class AdminController extends Controller { export default class AdminController extends Controller {
@service router; @service router;

View File

@ -1,6 +1,6 @@
import { htmlSafe } from "@ember/template"; import { htmlSafe } from "@ember/template";
import { registerRawHelper } from "discourse-common/lib/helpers"; import { registerRawHelper } from "discourse/lib/helpers";
import { renderIcon } from "discourse-common/lib/icon-library"; import { renderIcon } from "discourse/lib/icon-library";
registerRawHelper("check-icon", checkIcon); registerRawHelper("check-icon", checkIcon);

View File

@ -1,6 +1,6 @@
import Helper from "@ember/component/helper"; import Helper from "@ember/component/helper";
import { htmlSafe } from "@ember/template"; import { htmlSafe } from "@ember/template";
import { iconHTML } from "discourse-common/lib/icon-library"; import { iconHTML } from "discourse/lib/icon-library";
export default class DispositionIcon extends Helper { export default class DispositionIcon extends Helper {
compute([disposition]) { compute([disposition]) {

View File

@ -1,5 +1,5 @@
import { htmlHelper } from "discourse/lib/helpers";
import { escapeExpression } from "discourse/lib/utilities"; import { escapeExpression } from "discourse/lib/utilities";
import { htmlHelper } from "discourse-common/lib/helpers";
export default htmlHelper((str) => export default htmlHelper((str) =>
escapeExpression(str).replace(/\n/g, "<br>") escapeExpression(str).replace(/\n/g, "<br>")

View File

@ -1,4 +1,4 @@
import { registerRawHelper } from "discourse-common/lib/helpers"; import { registerRawHelper } from "discourse/lib/helpers";
registerRawHelper("value-at-tl", valueAtTl); registerRawHelper("value-at-tl", valueAtTl);

View File

@ -1,6 +1,6 @@
import { dependentKeyCompat } from "@ember/object/compat"; import { dependentKeyCompat } from "@ember/object/compat";
import { isPresent } from "@ember/utils"; import { isPresent } from "@ember/utils";
import { deepEqual } from "discourse-common/lib/object"; import { deepEqual } from "discourse/lib/object";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class SettingObjectHelper { export default class SettingObjectHelper {

View File

@ -10,8 +10,8 @@ import JsonSchemaEditorModal from "discourse/components/modal/json-schema-editor
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { fmt, propertyNotEqual } from "discourse/lib/computed"; import { fmt, propertyNotEqual } from "discourse/lib/computed";
import { SITE_SETTING_REQUIRES_CONFIRMATION_TYPES } from "discourse/lib/constants"; import { SITE_SETTING_REQUIRES_CONFIRMATION_TYPES } from "discourse/lib/constants";
import { deepEqual } from "discourse/lib/object";
import { splitString } from "discourse/lib/utilities"; import { splitString } from "discourse/lib/utilities";
import { deepEqual } from "discourse-common/lib/object";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import SiteSettingDefaultCategoriesModal from "../components/modal/site-setting-default-categories"; import SiteSettingDefaultCategoriesModal from "../components/modal/site-setting-default-categories";

View File

@ -1,6 +1,6 @@
import { cached, tracked } from "@glimmer/tracking"; import { cached, tracked } from "@glimmer/tracking";
import { capitalize, dasherize } from "@ember/string"; import { capitalize, dasherize } from "@ember/string";
import { snakeCaseToCamelCase } from "discourse-common/lib/case-converter"; import { snakeCaseToCamelCase } from "discourse/lib/case-converter";
import I18n, { i18n } from "discourse-i18n"; import I18n, { i18n } from "discourse-i18n";
export default class AdminPlugin { export default class AdminPlugin {

View File

@ -3,11 +3,11 @@ import { Promise } from "rsvp";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { propertyNotEqual } from "discourse/lib/computed"; import { propertyNotEqual } from "discourse/lib/computed";
import discourseComputed from "discourse/lib/decorators";
import getURL from "discourse/lib/get-url";
import { userPath } from "discourse/lib/url"; import { userPath } from "discourse/lib/url";
import Group from "discourse/models/group"; import Group from "discourse/models/group";
import User from "discourse/models/user"; import User from "discourse/models/user";
import getURL from "discourse-common/lib/get-url";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class AdminUser extends User { export default class AdminUser extends User {

View File

@ -1,8 +1,8 @@
import { computed } from "@ember/object"; import { computed } from "@ember/object";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { fmt } from "discourse/lib/computed"; import { fmt } from "discourse/lib/computed";
import discourseComputed from "discourse/lib/decorators";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import discourseComputed from "discourse-common/utils/decorators";
import AdminUser from "admin/models/admin-user"; import AdminUser from "admin/models/admin-user";
export default class ApiKey extends RestModel { export default class ApiKey extends RestModel {

View File

@ -1,6 +1,6 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { not } from "@ember/object/computed"; import { not } from "@ember/object/computed";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class BackupStatus extends EmberObject { export default class BackupStatus extends EmberObject {
@not("restoreEnabled") restoreDisabled; @not("restoreEnabled") restoreDisabled;

View File

@ -1,7 +1,7 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { observes, on } from "@ember-decorators/object"; import { observes, on } from "@ember-decorators/object";
import { propertyNotEqual } from "discourse/lib/computed"; import { propertyNotEqual } from "discourse/lib/computed";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class ColorSchemeColor extends EmberObject { export default class ColorSchemeColor extends EmberObject {

View File

@ -3,7 +3,7 @@ import ArrayProxy from "@ember/array/proxy";
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { not } from "@ember/object/computed"; import { not } from "@ember/object/computed";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ColorSchemeColor from "admin/models/color-scheme-color"; import ColorSchemeColor from "admin/models/color-scheme-color";

View File

@ -1,6 +1,6 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import getURL from "discourse-common/lib/get-url"; import getURL from "discourse/lib/get-url";
import AdminUser from "admin/models/admin-user"; import AdminUser from "admin/models/admin-user";
export default class EmailLog extends EmberObject { export default class EmailLog extends EmberObject {

View File

@ -1,5 +1,5 @@
import discourseComputed from "discourse/lib/decorators";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class FlagType extends RestModel { export default class FlagType extends RestModel {

View File

@ -1,8 +1,8 @@
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse/lib/decorators";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import discourseComputed from "discourse-common/utils/decorators";
export default class Permalink extends RestModel { export default class Permalink extends RestModel {
static findAll(filter) { static findAll(filter) {

View File

@ -2,7 +2,10 @@ import EmberObject from "@ember/object";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { renderAvatar } from "discourse/helpers/user-avatar"; import { renderAvatar } from "discourse/helpers/user-avatar";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse/lib/decorators";
import { durationTiny, number } from "discourse/lib/formatter"; import { durationTiny, number } from "discourse/lib/formatter";
import getURL from "discourse/lib/get-url";
import { makeArray } from "discourse/lib/helpers";
import round from "discourse/lib/round"; import round from "discourse/lib/round";
import { import {
escapeExpression, escapeExpression,
@ -10,9 +13,6 @@ import {
formatUsername, formatUsername,
toNumber, toNumber,
} from "discourse/lib/utilities"; } from "discourse/lib/utilities";
import getURL from "discourse-common/lib/get-url";
import { makeArray } from "discourse-common/lib/helpers";
import discourseComputed from "discourse-common/utils/decorators";
import I18n, { i18n } from "discourse-i18n"; import I18n, { i18n } from "discourse-i18n";
// Change this line each time report format change // Change this line each time report format change

View File

@ -1,6 +1,6 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class ScreenedEmail extends EmberObject { export default class ScreenedEmail extends EmberObject {

View File

@ -1,7 +1,7 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { equal } from "@ember/object/computed"; import { equal } from "@ember/object/computed";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class ScreenedIpAddress extends EmberObject { export default class ScreenedIpAddress extends EmberObject {

View File

@ -1,6 +1,6 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
export default class ScreenedUrl extends EmberObject { export default class ScreenedUrl extends EmberObject {

View File

@ -1,7 +1,7 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import SettingObjectHelper from "admin/lib/setting-object-helper"; import SettingObjectHelper from "admin/lib/setting-object-helper";

View File

@ -1,7 +1,7 @@
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse/lib/decorators";
import { escapeExpression } from "discourse/lib/utilities"; import { escapeExpression } from "discourse/lib/utilities";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import AdminUser from "admin/models/admin-user"; import AdminUser from "admin/models/admin-user";

View File

@ -2,8 +2,8 @@ import { get } from "@ember/object";
import { gt, or } from "@ember/object/computed"; import { gt, or } from "@ember/object/computed";
import { isBlank, isEmpty } from "@ember/utils"; import { isBlank, isEmpty } from "@ember/utils";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse/lib/decorators";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import discourseComputed from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n"; import { i18n } from "discourse-i18n";
import ThemeSettings from "admin/models/theme-settings"; import ThemeSettings from "admin/models/theme-settings";

View File

@ -1,5 +1,5 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse/lib/decorators";
export default class Tl3Requirements extends EmberObject { export default class Tl3Requirements extends EmberObject {
@discourseComputed("days_visited", "time_period") @discourseComputed("days_visited", "time_period")

Some files were not shown because too many files have changed in this diff Show More