diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/index.ts b/src/Umbraco.Web.UI.Client/libs/modal/token/create-dictionary-modal.token.ts similarity index 87% rename from src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/index.ts rename to src/Umbraco.Web.UI.Client/libs/modal/token/create-dictionary-modal.token.ts index 16ab4fd003..3e635f2cc4 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/index.ts +++ b/src/Umbraco.Web.UI.Client/libs/modal/token/create-dictionary-modal.token.ts @@ -12,7 +12,7 @@ export interface UmbCreateDictionaryModalResult { name?: string; } -export const UMB_CREATE_DICTIONARY_MODAL_TOKEN = new UmbModalToken< +export const UMB_CREATE_DICTIONARY_MODAL = new UmbModalToken< UmbCreateDictionaryModalData, UmbCreateDictionaryModalResult >('Umb.Modal.CreateDictionary', { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dashboards/dictionary/dashboard-translation-dictionary.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dashboards/dictionary/dashboard-translation-dictionary.element.ts index 8107a3c8f4..82c6e54a68 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dashboards/dictionary/dashboard-translation-dictionary.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dashboards/dictionary/dashboard-translation-dictionary.element.ts @@ -4,7 +4,7 @@ import { customElement, state } from 'lit/decorators.js'; import { when } from 'lit/directives/when.js'; import { UmbTableConfig, UmbTableColumn, UmbTableItem } from '../../../../backoffice/shared/components/table'; import { UmbDictionaryRepository } from '../../dictionary/repository/dictionary.repository'; -import { UMB_CREATE_DICTIONARY_MODAL_TOKEN } from '../../dictionary/entity-actions/create/'; +import { UMB_CREATE_DICTIONARY_MODAL } from '../../../../../libs/modal/token/create-dictionary-modal.token'; import { UmbLitElement } from '@umbraco-cms/internal/lit-element'; import { DictionaryOverviewResponseModel, LanguageResponseModel } from '@umbraco-cms/backoffice/backend-api'; import { UmbModalContext, UMB_MODAL_CONTEXT_TOKEN } from '@umbraco-cms/backoffice/modal'; @@ -157,7 +157,7 @@ export class UmbDashboardTranslationDictionaryElement extends UmbLitElement { // TODO: what to do if modal service is not available? if (!this.#modalContext) return; - const modalHandler = this.#modalContext?.open(UMB_CREATE_DICTIONARY_MODAL_TOKEN, { unique: null }); + const modalHandler = this.#modalContext?.open(UMB_CREATE_DICTIONARY_MODAL, { unique: null }); // TODO: get type from modal result const { name } = await modalHandler.onSubmit(); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create-dictionary-modal-layout.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create-dictionary-modal-layout.element.ts index 984a59dacf..a41b18efc3 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create-dictionary-modal-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create-dictionary-modal-layout.element.ts @@ -2,7 +2,10 @@ import { html } from 'lit'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { customElement, query } from 'lit/decorators.js'; import { when } from 'lit/directives/when.js'; -import { UmbCreateDictionaryModalData, UmbCreateDictionaryModalResult } from '.'; +import { + UmbCreateDictionaryModalData, + UmbCreateDictionaryModalResult, +} from '../../../../../../libs/modal/token/create-dictionary-modal.token'; import { UmbModalBaseElement } from '@umbraco-cms/internal/modal'; @customElement('umb-create-dictionary-modal') diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create.action.ts index 0f9020988f..db492774a7 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/create/create.action.ts @@ -4,7 +4,7 @@ import { UmbSectionSidebarContext, UMB_SECTION_SIDEBAR_CONTEXT_TOKEN, } from '../../../../../backoffice/shared/components/section/section-sidebar/section-sidebar.context'; -import { UMB_CREATE_DICTIONARY_MODAL_TOKEN } from '.'; +import { UMB_CREATE_DICTIONARY_MODAL } from '../../../../../../libs/modal/token/create-dictionary-modal.token'; import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; import { UmbControllerHostInterface } from '@umbraco-cms/backoffice/controller'; import { UmbContextConsumerController } from '@umbraco-cms/backoffice/context-api'; @@ -38,7 +38,7 @@ export default class UmbCreateDictionaryEntityAction extends UmbEntityActionBase // TODO: how can we get the current entity detail in the modal? Passing the observable // feels a bit hacky. Works, but hacky. - const modalHandler = this.#modalContext?.open(UMB_CREATE_DICTIONARY_MODAL_TOKEN, { + const modalHandler = this.#modalContext?.open(UMB_CREATE_DICTIONARY_MODAL, { unique: this.unique, parentName: this.#sectionSidebarContext.headline, });