From bf324ff10d9f894cc2985ebf0461a78c412bc1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 2 Dec 2024 21:27:29 +0100 Subject: [PATCH] relation-type --- .../relations/relation-types/collection/constants.ts | 1 + .../packages/relations/relation-types/collection/index.ts | 1 - .../relations/relation-types/collection/repository/index.ts | 1 - .../src/packages/relations/relation-types/constants.ts | 3 +++ .../src/packages/relations/relation-types/index.ts | 1 + .../relations/relation-types/repository/constants.ts | 1 + .../relations/relation-types/repository/detail/constants.ts | 4 ++-- .../relations/relation-types/repository/detail/index.ts | 1 - .../relations/relation-types/repository/detail/manifests.ts | 3 ++- .../repository/detail/relation-type-detail.repository.ts | 2 +- .../detail/relation-type-detail.store.context-token.ts | 6 ++++++ .../repository/detail/relation-type-detail.store.ts | 6 +----- .../relations/relation-types/workspace/constants.ts | 1 + .../relation-types/workspace/relation-type/constants.ts | 2 ++ 14 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/constants.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/constants.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.context-token.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/constants.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/relation-type/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/constants.ts index 8eb94e7ee4d3..778b2c736590 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/constants.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/constants.ts @@ -1 +1,2 @@ export const UMB_RELATION_TYPE_COLLECTION_ALIAS = 'Umb.Collection.RelationType'; +export * from './repository/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/index.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/index.ts index 6dcf6dd58e76..6e33b5669d14 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/index.ts @@ -1,2 +1 @@ export { UmbRelationTypeCollectionRepository } from './repository/index.js'; -export { UMB_RELATION_TYPE_COLLECTION_ALIAS } from './constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/index.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/index.ts index 142b3908432f..2a25f0eeb88c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/collection/repository/index.ts @@ -1,2 +1 @@ -export { UMB_RELATION_TYPE_COLLECTION_REPOSITORY_ALIAS } from './constants.js'; export { UmbRelationTypeCollectionRepository } from './relation-type-collection.repository.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/constants.ts new file mode 100644 index 000000000000..4d5ec74befad --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/constants.ts @@ -0,0 +1,3 @@ +export * from './collection/constants.js'; +export * from './repository/constants.js'; +export * from './workspace/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/index.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/index.ts index b12dbb13488d..51ec6a8fd856 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/index.ts @@ -1,3 +1,4 @@ export * from './collection/index.js'; +export * from './constants.js'; export * from './entity.js'; export * from './repository/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/constants.ts new file mode 100644 index 000000000000..0f60420161b0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/constants.ts @@ -0,0 +1 @@ +export * from './detail/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/constants.ts index a1025f4c1ca5..f5f91bcb29d4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/constants.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/constants.ts @@ -1,2 +1,2 @@ -export const UMB_RELATION_TYPE_DETAIL_REPOSITORY_ALIAS = 'Umb.Repository.RelationType.Detail'; -export const UMB_RELATION_TYPE_DETAIL_STORE_ALIAS = 'Umb.Store.RelationType.Detail'; +export { UMB_RELATION_TYPE_DETAIL_REPOSITORY_ALIAS, UMB_RELATION_TYPE_DETAIL_STORE_ALIAS } from './manifests.js'; +export { UMB_RELATION_TYPE_DETAIL_STORE_CONTEXT } from './relation-type-detail.store.context-token.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/index.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/index.ts index 19e0e34ac89d..c9ca04be1bc0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/index.ts @@ -1,2 +1 @@ export { UmbRelationTypeDetailRepository } from './relation-type-detail.repository.js'; -export { UMB_RELATION_TYPE_DETAIL_REPOSITORY_ALIAS } from './constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/manifests.ts index 50b278ac8820..8a9cbd10c8f2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/manifests.ts @@ -1,4 +1,5 @@ -import { UMB_RELATION_TYPE_DETAIL_REPOSITORY_ALIAS, UMB_RELATION_TYPE_DETAIL_STORE_ALIAS } from './constants.js'; +export const UMB_RELATION_TYPE_DETAIL_REPOSITORY_ALIAS = 'Umb.Repository.RelationType.Detail'; +export const UMB_RELATION_TYPE_DETAIL_STORE_ALIAS = 'Umb.Store.RelationType.Detail'; export const manifests: Array = [ { diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.repository.ts index 9624de75be7b..013234458fd4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.repository.ts @@ -1,6 +1,6 @@ import type { UmbRelationTypeDetailModel } from '../../types.js'; import { UmbRelationTypeDetailServerDataSource } from './relation-type-detail.server.data-source.js'; -import { UMB_RELATION_TYPE_DETAIL_STORE_CONTEXT } from './relation-type-detail.store.js'; +import { UMB_RELATION_TYPE_DETAIL_STORE_CONTEXT } from './relation-type-detail.store.context-token.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbReadDetailRepository } from '@umbraco-cms/backoffice/repository'; import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.context-token.ts new file mode 100644 index 000000000000..44d1c585a216 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.context-token.ts @@ -0,0 +1,6 @@ +import type UmbRelationTypeDetailStore from './relation-type-detail.store.js'; +import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; + +export const UMB_RELATION_TYPE_DETAIL_STORE_CONTEXT = new UmbContextToken( + 'UmbRelationTypeDetailStore', +); diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.ts index 5f3f3a375dfc..ed79f4e7e372 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/repository/detail/relation-type-detail.store.ts @@ -1,5 +1,5 @@ import type { UmbRelationTypeDetailModel } from '../../types.js'; -import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; +import { UMB_RELATION_TYPE_DETAIL_STORE_CONTEXT } from './relation-type-detail.store.context-token.js'; import { UmbDetailStoreBase } from '@umbraco-cms/backoffice/store'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; @@ -20,7 +20,3 @@ export class UmbRelationTypeDetailStore extends UmbDetailStoreBase( - 'UmbRelationTypeDetailStore', -); diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/constants.ts new file mode 100644 index 000000000000..104dbb5b7c5c --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/constants.ts @@ -0,0 +1 @@ +export * from './relation-type/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/relation-type/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/relation-type/constants.ts new file mode 100644 index 000000000000..1d94ed4e0e33 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/relations/relation-types/workspace/relation-type/constants.ts @@ -0,0 +1,2 @@ +export { UMB_RELATION_TYPE_WORKSPACE_ALIAS } from './manifests.js'; +export { UMB_RELATION_TYPE_WORKSPACE_CONTEXT } from './relation-type-workspace.context-token.js';