diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts index d7b1b6b3d8..9b1d6e8823 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts @@ -21,7 +21,7 @@ import { UmbMemberTypeStore, UMB_MEMBER_TYPE_STORE_CONTEXT_ALIAS } from './membe import { UmbDocumentStore, UMB_DOCUMENT_STORE_CONTEXT_ALIAS } from './documents/documents/document.store'; import { UmbMediaStore, UMB_MEDIA_STORE_CONTEXT_ALIAS } from './media/media/media.store'; import { UmbMemberGroupStore, UMB_MEMBER_GROUP_STORE_CONTEXT_ALIAS } from './members/member-groups/member-group.store'; -import { UmbDictionaryStore } from './translation/dictionary/dictionary.store'; +import { UmbDictionaryStore, UMB_DICTIONARY_STORE_CONTEXT_ALIAS } from './translation/dictionary/dictionary.store'; import { UmbDocumentBlueprintStore } from './documents/document-blueprints/document-blueprint.store'; import { UmbSectionStore, UMB_SECTION_STORE_CONTEXT_ALIAS } from './shared/components/section/section.store'; @@ -75,7 +75,7 @@ export class UmbBackofficeElement extends UmbLitElement { this.provideContext(UMB_MEMBER_GROUP_STORE_CONTEXT_ALIAS, new UmbMemberGroupStore(this)); this.provideContext(UMB_SECTION_STORE_CONTEXT_ALIAS, new UmbSectionStore()); this.provideContext(UMB_CURRENT_USER_HISTORY_STORE_CONTEXT_ALIAS, new UmbCurrentUserHistoryStore()); - this.provideContext('umbDictionaryStore', new UmbDictionaryStore(this)); + this.provideContext(UMB_DICTIONARY_STORE_CONTEXT_ALIAS, new UmbDictionaryStore(this)); this.provideContext('umbDocumentBlueprintStore', new UmbDocumentBlueprintStore(this)); } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/dictionary.store.ts b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/dictionary.store.ts index 6b056b7c07..dae11fae8f 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/dictionary.store.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/dictionary.store.ts @@ -2,6 +2,9 @@ import { map, Observable } from 'rxjs'; import { UmbDataStoreBase } from '../../../core/stores/store'; import { DictionaryResource, EntityTreeItem } from '@umbraco-cms/backend-api'; import { tryExecuteAndNotify } from '@umbraco-cms/resources'; +import { UmbContextAlias } from '@umbraco-cms/context-api'; + +export const STORE_ALIAS = 'umbDictionaryStore'; /** * @export @@ -10,7 +13,7 @@ import { tryExecuteAndNotify } from '@umbraco-cms/resources'; * @description - Data Store for Dictionary Items. */ export class UmbDictionaryStore extends UmbDataStoreBase { - public readonly storeAlias = 'umbDictionaryStore'; + public readonly storeAlias = STORE_ALIAS; /** * @description - Get the root of the tree. @@ -48,3 +51,5 @@ export class UmbDictionaryStore extends UmbDataStoreBase { return this.items.pipe(map((items) => items.filter((item) => item.parentKey === key))); } } + +export const UMB_DICTIONARY_STORE_CONTEXT_ALIAS = new UmbContextAlias(STORE_ALIAS); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/tree/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/tree/manifests.ts index 398b5bb5b0..f399178b43 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/tree/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/tree/manifests.ts @@ -1,3 +1,4 @@ +import { STORE_ALIAS } from '../dictionary.store'; import type { ManifestTree, ManifestTreeItemAction } from '@umbraco-cms/models'; const treeAlias = 'Umb.Tree.Dictionary'; @@ -7,7 +8,7 @@ const tree: ManifestTree = { alias: treeAlias, name: 'Dictionary Tree', meta: { - storeAlias: 'umbDictionaryStore', + storeAlias: STORE_ALIAS, }, };