DEV: Move discourse-common/ helpers to discourse/ (#30728)

`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/helpers/*` into
`discourse/helpers/*`, removes `discourse-common` from the Ember
resolver config, and adds shims for the imports.
This commit is contained in:
David Taylor 2025-01-13 09:36:11 +00:00 committed by GitHub
parent 47c8197ea1
commit 979325c500
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
99 changed files with 123 additions and 86 deletions

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import DButton from "discourse/components/d-button";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class AdminConfigAreaCard extends Component {

View File

@ -3,7 +3,7 @@ import { action } from "@ember/object";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import DButton from "discourse/components/d-button";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
export default class AdminNotice extends Component {
@service currentUser;

View File

@ -6,8 +6,8 @@ import { LinkTo } from "@ember/routing";
import { service } from "@ember/service";
import DToggleSwitch from "discourse/components/d-toggle-switch";
import PluginOutlet from "discourse/components/plugin-outlet";
import icon from "discourse/helpers/d-icon";
import { popupAjaxError } from "discourse/lib/ajax-error";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import SiteSetting from "admin/models/site-setting";
import PluginCommitHash from "./plugin-commit-hash";

View File

@ -6,8 +6,8 @@ import { LinkTo } from "@ember/routing";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
import dIcon from "discourse/helpers/d-icon";
import { ajax } from "discourse/lib/ajax";
import dIcon from "discourse-common/helpers/d-icon";
import { bind } from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n";

View File

@ -7,7 +7,7 @@ import {
PrimaryButton,
} from "discourse/components/d-page-action-button";
import concatClass from "discourse/helpers/concat-class";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class AdminSectionLandingItem extends Component {

View File

@ -7,9 +7,9 @@ import { htmlSafe } from "@ember/template";
import { and, not } from "truth-helpers";
import CookText from "discourse/components/cook-text";
import DToggleSwitch from "discourse/components/d-toggle-switch";
import dIcon from "discourse/helpers/d-icon";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import dIcon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import DTooltip from "float-kit/components/d-tooltip";

View File

@ -5,9 +5,9 @@ import { eq } from "truth-helpers";
import ConditionalLoadingSection from "discourse/components/conditional-loading-section";
import DButton from "discourse/components/d-button";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import AdminNotice from "admin/components/admin-notice";

View File

@ -1,5 +1,5 @@
import RadioButton from "discourse/components/radio-button";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
const InstallThemeItem = <template>

View File

@ -10,10 +10,10 @@ import ConditionalLoadingSection from "discourse/components/conditional-loading-
import CopyButton from "discourse/components/copy-button";
import DButton from "discourse/components/d-button";
import DModal from "discourse/components/d-modal";
import dIcon from "discourse/helpers/d-icon";
import withEventValue from "discourse/helpers/with-event-value";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import dIcon from "discourse-common/helpers/d-icon";
import { POPULAR_THEMES } from "discourse-common/lib/popular-themes";
import { i18n } from "discourse-i18n";
import InstallThemeItem from "admin/components/install-theme-item";

View File

@ -1,5 +1,5 @@
import { on } from "@ember/modifier";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
<template>
<li

View File

@ -4,7 +4,7 @@ import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import DButton from "discourse/components/d-button";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import ChildTreeNode from "admin/components/schema-theme-setting/editor/child-tree-node";
export default class SchemaThemeSettingNewEditorChildTree extends Component {

View File

@ -5,7 +5,7 @@ import { on } from "@ember/modifier";
import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { gt } from "truth-helpers";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import ChildTree from "admin/components/schema-theme-setting/editor/child-tree";
export default class SchemaThemeSettingNewEditorTreeNode extends Component {

View File

@ -2,7 +2,7 @@ import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import { eq } from "truth-helpers";
import DButton from "discourse/components/d-button";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import TreeNode from "admin/components/schema-theme-setting/editor/tree-node";
<template>

View File

@ -4,8 +4,8 @@ import { getOwner } from "@ember/owner";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { service } from "@ember/service";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import UppyUpload from "discourse/lib/uppy/uppy-upload";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class TagsUploader extends Component {

View File

@ -5,8 +5,8 @@ import { action } from "@ember/object";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import DropdownMenu from "discourse/components/dropdown-menu";
import icon from "discourse/helpers/d-icon";
import { popupAjaxError } from "discourse/lib/ajax-error";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import AdminConfigAreaCard from "admin/components/admin-config-area-card";
import DMenu from "float-kit/components/d-menu";

View File

@ -7,7 +7,7 @@ import { action } from "@ember/object";
import { htmlSafe } from "@ember/template";
import PluginOutlet from "discourse/components/plugin-outlet";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import escape from "discourse-common/lib/escape";
import { iconHTML } from "discourse-common/lib/icon-library";
import { i18n } from "discourse-i18n";

View File

@ -132,7 +132,6 @@ function lookupModuleBySuffix(suffix) {
moduleSuffixTrie = new SuffixTrie("/");
const searchPaths = [
"discourse/", // Includes themes/plugins
"discourse-common/",
"select-kit/",
"admin/",
];

View File

@ -1,6 +1,7 @@
import "./deprecation-workflow";
import "decorator-transforms/globals";
import "./loader-shims";
import "./discourse-common-loader-shims";
import "./global-compat";
import { registerDiscourseImplicitInjections } from "discourse/lib/implicit-injections";

View File

@ -5,8 +5,8 @@ import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import AboutPageUsers from "discourse/components/about-page-users";
import PluginOutlet from "discourse/components/plugin-outlet";
import dIcon from "discourse/helpers/d-icon";
import { number } from "discourse/lib/formatter";
import dIcon from "discourse-common/helpers/d-icon";
import escape from "discourse-common/lib/escape";
import I18n, { i18n } from "discourse-i18n";

View File

@ -1,6 +1,6 @@
import avatar from "discourse/helpers/bound-avatar-template";
import dIcon from "discourse/helpers/d-icon";
import formatDate from "discourse/helpers/format-date";
import dIcon from "discourse-common/helpers/d-icon";
const ActionsSummary = <template>
{{#each @data.actionsSummary as |as|}}

View File

@ -1,6 +1,6 @@
import { LinkTo } from "@ember/routing";
import { or } from "truth-helpers";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
<template>

View File

@ -5,10 +5,10 @@ import { htmlSafe } from "@ember/template";
import { isEmpty } from "@ember/utils";
import { eq, not } from "truth-helpers";
import DButton from "discourse/components/d-button";
import dIcon from "discourse/helpers/d-icon";
import iconOrImage from "discourse/helpers/icon-or-image";
import number from "discourse/helpers/number";
import { emojiUnescape, sanitize } from "discourse/lib/text";
import dIcon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import PluginOutlet from "./plugin-outlet";

View File

@ -1,9 +1,9 @@
import Component from "@glimmer/component";
import icon from "discourse/helpers/d-icon";
import {
NO_REMINDER_ICON,
WITH_REMINDER_ICON,
} from "discourse/models/bookmark";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class BookmarkIcon extends Component {

View File

@ -7,12 +7,12 @@ 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";
import icon from "discourse/helpers/d-icon";
import { popupAjaxError } from "discourse/lib/ajax-error";
import {
TIME_SHORTCUT_TYPES,
timeShortcuts,
} from "discourse/lib/time-shortcut";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import DMenu from "float-kit/components/d-menu";

View File

@ -10,7 +10,7 @@ import BulkTopicActions, {
import DismissNew from "discourse/components/modal/dismiss-new";
import DismissReadModal from "discourse/components/modal/dismiss-read";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
import DMenu from "float-kit/components/d-menu";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
import { service } from "@ember/service";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import getURL from "discourse-common/lib/get-url";
export default class DBreadcrumbsItem extends Component {

View File

@ -7,8 +7,8 @@ import { htmlSafe } from "@ember/template";
import { or } from "truth-helpers";
import GlimmerComponentWithDeprecatedParentView from "discourse/components/glimmer-component-with-deprecated-parent-view";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import element from "discourse/helpers/element";
import icon from "discourse-common/helpers/d-icon";
import deprecated from "discourse-common/lib/deprecated";
import { i18n } from "discourse-i18n";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class DToggleSwitch extends Component {

View File

@ -5,7 +5,7 @@ import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import DButton from "discourse/components/d-button";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class DiscourseBanner extends Component {

View File

@ -3,8 +3,8 @@ import { concat } from "@ember/helper";
import { action } from "@ember/object";
import EmojiPickerContent from "discourse/components/emoji-picker/content";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import replaceEmoji from "discourse/helpers/replace-emoji";
import icon from "discourse-common/helpers/d-icon";
import DMenu from "float-kit/components/d-menu";
export default class EmojiPicker extends Component {

View File

@ -4,8 +4,8 @@ import { Input } from "@ember/component";
import { on } from "@ember/modifier";
import { modifier } from "ember-modifier";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import noop from "discourse/helpers/noop";
import icon from "discourse-common/helpers/d-icon";
export default class FilterInput extends Component {
@tracked isFocused = false;

View File

@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import { htmlSafe } from "@ember/template";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
export default class FormTemplateFieldMultiSelect extends Component {
@action

View File

@ -4,9 +4,9 @@ import { getOwner } from "@ember/owner";
import { dasherize } from "@ember/string";
import { htmlSafe } from "@ember/template";
import PickFilesButton from "discourse/components/pick-files-button";
import icon from "discourse/helpers/d-icon";
import { isAudio, isImage, isVideo } from "discourse/lib/uploads";
import UppyUpload from "discourse/lib/uppy/uppy-upload";
import icon from "discourse-common/helpers/d-icon";
import { bind } from "discourse-common/utils/decorators";
export default class FormTemplateFieldUpload extends Component {

View File

@ -1,4 +1,4 @@
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import Logo from "./logo";
const HomeLogoContents = <template>

View File

@ -3,7 +3,7 @@ import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { service } from "@ember/service";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class SidebarToggle extends Component {

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
import icon from "discourse/helpers/d-icon";
import { extractLinkMeta } from "discourse/lib/render-topic-featured-link";
import icon from "discourse-common/helpers/d-icon";
export default class FeaturedLink extends Component {
get meta() {

View File

@ -7,10 +7,10 @@ import { htmlSafe } from "@ember/template";
import { and, gt, not, or } from "truth-helpers";
import categoryLink from "discourse/helpers/category-link";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import { wantsNewWindow } from "discourse/lib/intercept-click";
import renderTags from "discourse/lib/render-tags";
import DiscourseURL from "discourse/lib/url";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import PluginOutlet from "../../plugin-outlet";
import FeaturedLink from "./featured-link";

View File

@ -5,7 +5,7 @@ import { action } from "@ember/object";
import { service } from "@ember/service";
import { eq } from "truth-helpers";
import avatar from "discourse/helpers/bound-avatar-template";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import getURL from "discourse-common/lib/get-url";
export default class Participant extends Component {

View File

@ -3,9 +3,9 @@ import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { service } from "@ember/service";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import TopicStatusIcons from "discourse/helpers/topic-status-icons";
import { escapeExpression } from "discourse/lib/utilities";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class Status extends Component {

View File

@ -3,12 +3,12 @@ import { hash } from "@ember/helper";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import PluginOutlet from "discourse/components/plugin-outlet";
import icon from "discourse/helpers/d-icon";
import {
addExtraUserClasses,
renderAvatar,
} from "discourse/helpers/user-avatar";
import { applyValueTransformer } from "discourse/lib/transformer";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import UserTip from "../../user-tip";
import UserStatusBubble from "./user-status-bubble";

View File

@ -1,4 +1,4 @@
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
const InputTip = <template>
<div

View File

@ -6,9 +6,9 @@ import { service } from "@ember/service";
import DropdownMenu from "discourse/components/dropdown-menu";
import NavigationItem from "discourse/components/navigation-item";
import PluginOutlet from "discourse/components/plugin-outlet";
import icon from "discourse/helpers/d-icon";
import { filterTypeForMode } from "discourse/lib/filter-mode";
import { applyValueTransformer } from "discourse/lib/transformer";
import icon from "discourse-common/helpers/d-icon";
import DMenu from "float-kit/components/d-menu";
export default class NavigationBarComponent extends Component {

View File

@ -6,8 +6,8 @@ import DButton from "discourse/components/d-button";
import DropdownMenu from "discourse/components/dropdown-menu";
import PluginOutlet from "discourse/components/plugin-outlet";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import { allLevels, buttonDetails } from "discourse/lib/notification-levels";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import DMenu from "float-kit/components/d-menu";

View File

@ -4,7 +4,7 @@ import { action } from "@ember/object";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import discourseLater from "discourse-common/lib/later";
import { i18n } from "discourse-i18n";

View File

@ -3,7 +3,7 @@ import { concat } from "@ember/helper";
import { service } from "@ember/service";
import { and, not } from "truth-helpers";
import DButton from "discourse/components/d-button";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class PostMenuRepliesButton extends Component {

View File

@ -1,4 +1,4 @@
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
const PoweredByDiscourse = <template>

View File

@ -1,4 +1,4 @@
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
const PrivateMessageGlyph = <template>

View File

@ -1,7 +1,7 @@
import { hash } from "@ember/helper";
import PluginOutlet from "discourse/components/plugin-outlet";
import UserLink from "discourse/components/user-link";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
const ReviewableCreatedByName = <template>

View File

@ -1,6 +1,6 @@
import UserLink from "discourse/components/user-link";
import avatar from "discourse/helpers/avatar";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
const ReviewableCreatedBy = <template>
<div class="created-by">

View File

@ -1,4 +1,4 @@
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import getURL from "discourse-common/lib/get-url";
import { i18n } from "discourse-i18n";

View File

@ -5,8 +5,8 @@ import { on } from "@ember/modifier";
import { action } from "@ember/object";
import DButton from "discourse/components/d-button";
import DModal from "discourse/components/d-modal";
import icon from "discourse/helpers/d-icon";
import withEventValue from "discourse/helpers/with-event-value";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import DropdownSelectBox from "select-kit/components/dropdown-select-box";

View File

@ -6,7 +6,7 @@ import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
import { service } from "@ember/service";
import { isEmpty } from "@ember/utils";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { bind } from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n";
import MoreSectionLink from "./more-section-link";

View File

@ -7,8 +7,8 @@ import { action } from "@ember/object";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import withEventValue from "discourse/helpers/with-event-value";
import icon from "discourse-common/helpers/d-icon";
import discourseLater from "discourse-common/lib/later";
import { i18n } from "discourse-i18n";
import IconPicker from "select-kit/components/icon-picker";

View File

@ -1,5 +1,5 @@
import { on } from "@ember/modifier";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
const SidebarSectionLinkButton = <template>
<div class="sidebar-section-link-wrapper">

View File

@ -4,7 +4,7 @@ import { htmlSafe } from "@ember/template";
import { eq } from "truth-helpers";
import { isHex } from "discourse/components/sidebar/section-link";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
export default class SidebarSectionLinkPrefix extends Component {
get prefixValue() {

View File

@ -8,7 +8,7 @@ import { schedule } from "@ember/runloop";
import { service } from "@ember/service";
import { eq, or } from "truth-helpers";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import deprecated from "discourse-common/lib/deprecated";
import { bind } from "discourse-common/utils/decorators";
import SectionLinkPrefix from "./section-link-prefix";

View File

@ -6,11 +6,11 @@ import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { service } from "@ember/service";
import { isEmpty } from "@ember/utils";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import {
getCollapsedSidebarSectionKey,
getSidebarSectionContentId,
} from "discourse/lib/sidebar/helpers";
import icon from "discourse-common/helpers/d-icon";
import { bind } from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n";
import DropdownSelectBox from "select-kit/components/dropdown-select-box";

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { schedule } from "@ember/runloop";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class TableHeaderToggle extends Component {

View File

@ -6,7 +6,7 @@ import { and, not, or } from "truth-helpers";
import DButton from "discourse/components/d-button";
import DropdownMenu from "discourse/components/dropdown-menu";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import getURL from "discourse-common/lib/get-url";
import DMenu from "float-kit/components/d-menu";

View File

@ -1,4 +1,4 @@
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
const ActionList = <template>
{{#if @postNumbers}}

View File

@ -1,5 +1,5 @@
import { on } from "@ember/modifier";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
const BulkSelectCell = <template>

View File

@ -7,7 +7,7 @@ import PluginOutlet from "discourse/components/plugin-outlet";
import NewListHeaderControls from "discourse/components/topic-list/new-list-header-controls";
import TopicBulkSelectDropdown from "discourse/components/topic-list/topic-bulk-select-dropdown";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class SortableColumn extends Component {

View File

@ -1,6 +1,6 @@
import { gt } from "truth-helpers";
import icon from "discourse/helpers/d-icon";
import number from "discourse/helpers/number";
import icon from "discourse-common/helpers/d-icon";
const LikesCell = <template>
<td class="num likes topic-list-data">

View File

@ -1,6 +1,6 @@
import { gt } from "truth-helpers";
import icon from "discourse/helpers/d-icon";
import number from "discourse/helpers/number";
import icon from "discourse-common/helpers/d-icon";
const OpLikesCell = <template>
<td class="num likes">

View File

@ -1,4 +1,4 @@
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
const ParticipantGroups = <template>

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
import { service } from "@ember/service";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { bind } from "discourse-common/utils/decorators";
import { i18n } from "discourse-i18n";

View File

@ -6,8 +6,8 @@ import { service } from "@ember/service";
import { and } from "truth-helpers";
import DButton from "discourse/components/d-button";
import avatar from "discourse/helpers/bound-avatar-template";
import dIcon from "discourse/helpers/d-icon";
import { groupPath } from "discourse/lib/url";
import dIcon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class PrivateMessageMap extends Component {

View File

@ -14,10 +14,10 @@ import TopicViews from "discourse/components/topic-map/topic-views";
import TopicViewsChart from "discourse/components/topic-map/topic-views-chart";
import avatar from "discourse/helpers/bound-avatar-template";
import concatClass from "discourse/helpers/concat-class";
import dIcon from "discourse/helpers/d-icon";
import number from "discourse/helpers/number";
import { ajax } from "discourse/lib/ajax";
import { emojiUnescape } from "discourse/lib/text";
import dIcon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
import DMenu from "float-kit/components/d-menu";

View File

@ -5,7 +5,7 @@ import { action } from "@ember/object";
import { service } from "@ember/service";
import { and } from "truth-helpers";
import PluginOutlet from "discourse/components/plugin-outlet";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class TopicStatus extends Component {

View File

@ -13,11 +13,11 @@ import TopicAdminMenu from "discourse/components/topic-admin-menu";
import UserTip from "discourse/components/user-tip";
import ageWithTooltip from "discourse/helpers/age-with-tooltip";
import categoryLink from "discourse/helpers/category-link";
import icon from "discourse/helpers/d-icon";
import discourseTags from "discourse/helpers/discourse-tags";
import topicFeaturedLink from "discourse/helpers/topic-featured-link";
import { headerOffset } from "discourse/lib/offset-calculator";
import { actionDescriptionHtml } from "discourse/widgets/post-small-action";
import icon from "discourse-common/helpers/d-icon";
import { bind, debounce } from "discourse-common/utils/decorators";
import domUtils from "discourse-common/utils/dom-utils";
import { i18n } from "discourse-i18n";

View File

@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { cached } from "@glimmer/tracking";
import { gte } from "truth-helpers";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class UserFlagPercentage extends Component {

View File

@ -1,5 +1,5 @@
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { avatarUrl, translateSize } from "discourse-common/lib/avatar-utils";
const avatarPx = translateSize("medium");

View File

@ -1,8 +1,8 @@
import Component from "@glimmer/component";
import { htmlSafe } from "@ember/template";
import icon from "discourse/helpers/d-icon";
import formatDuration from "discourse/helpers/format-duration";
import number from "discourse/helpers/number";
import icon from "discourse-common/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class UserStat extends Component {

View File

@ -0,0 +1,37 @@
import { importSync } from "@embroider/macros";
import loaderShim from "discourse-common/lib/loader-shim";
// Soon-to-be-deprecated discourse-common imports
loaderShim("discourse-common/helpers/base-path", () =>
importSync("discourse/helpers/base-path")
);
loaderShim("discourse-common/helpers/base-url", () =>
importSync("discourse/helpers/base-url")
);
loaderShim("discourse-common/helpers/bound-i18n", () =>
importSync("discourse/helpers/bound-i18n")
);
loaderShim("discourse-common/helpers/component-for-collection", () =>
importSync("discourse/helpers/component-for-collection")
);
loaderShim("discourse-common/helpers/component-for-row", () =>
importSync("discourse/helpers/component-for-row")
);
loaderShim("discourse-common/helpers/d-icon", () =>
importSync("discourse/helpers/d-icon")
);
loaderShim("discourse-common/helpers/fa-icon", () =>
importSync("discourse/helpers/fa-icon")
);
loaderShim("discourse-common/helpers/get-url", () =>
importSync("discourse/helpers/get-url")
);
loaderShim("discourse-common/helpers/html-safe", () =>
importSync("discourse/helpers/html-safe")
);
loaderShim("discourse-common/helpers/i18n-yes-no", () =>
importSync("discourse/helpers/i18n-yes-no")
);
loaderShim("discourse-common/helpers/i18n", () =>
importSync("discourse/helpers/i18n")
);

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
export default class FKAlert extends Component {
get type() {

View File

@ -7,7 +7,7 @@ import DropdownMenu from "discourse/components/dropdown-menu";
import FKControlMenuContainer from "discourse/form-kit/components/fk/control/menu/container";
import FKControlMenuDivider from "discourse/form-kit/components/fk/control/menu/divider";
import FKControlMenuItem from "discourse/form-kit/components/fk/control/menu/item";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
export default class FKControlMenu extends Component {
static controlType = "menu";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
import { concat } from "@ember/helper";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
export default class FKErrorsSummary extends Component {

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
export default class FKErrors extends Component {
concatErrors(errors) {

View File

@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
let globalI = 1;

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import devToolsState from "../state";
export default class PluginOutletDebugButton extends Component {

View File

@ -4,7 +4,7 @@ import { array, hash } from "@ember/helper";
import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import DTooltip from "float-kit/components/d-tooltip";
import devToolsState from "../state";
import ArgsTable from "./args-table";

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
export default class PluginOutletDebugButton extends Component {
get safeModeActive() {

View File

@ -3,9 +3,9 @@ import { tracked } from "@glimmer/tracking";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { htmlSafe } from "@ember/template";
import icon from "discourse/helpers/d-icon";
import draggable from "discourse/modifiers/draggable";
import onResize from "discourse/modifiers/on-resize";
import icon from "discourse-common/helpers/d-icon";
import I18n from "discourse-i18n";
import PluginOutletDebugButton from "./plugin-outlet-debug/button";
import SafeModeButton from "./safe-mode/button";

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import I18n from "discourse-i18n";
export default class VerboseLocalizationButton extends Component {

View File

@ -4,8 +4,8 @@ import { on } from "@ember/modifier";
import { action, set } from "@ember/object";
import PluginOutlet from "discourse/components/plugin-outlet";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon";
import withEventValue from "discourse/helpers/with-event-value";
import icon from "discourse-common/helpers/d-icon";
export default class Radio extends Component {
constructor() {

View File

@ -3,7 +3,7 @@ import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { or } from "truth-helpers";
import DButton from "discourse/components/d-button";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
const DDefaultToast = <template>
<div

View File

@ -5,7 +5,7 @@ import { service } from "@ember/service";
import { modifier } from "ember-modifier";
import { and } from "truth-helpers";
import concatClass from "discourse/helpers/concat-class";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import DFloatBody from "float-kit/components/d-float-body";
import { TOOLTIP } from "float-kit/lib/constants";
import DTooltipInstance from "float-kit/lib/d-tooltip-instance";

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { hash } from "@ember/helper";
import { LinkTo } from "@ember/routing";
import { service } from "@ember/service";
import icon from "discourse-common/helpers/d-icon";
import icon from "discourse/helpers/d-icon";
import { i18n } from "discourse-i18n";
import {
ALL_CATEGORIES_ID,