From 58a955ba2f1fe5c88727ced8c41ccb31ae6c4603 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Thu, 4 Jul 2024 21:18:23 +0200 Subject: [PATCH] split consts --- .../src/packages/user/user-group/collection/constants.ts | 1 + .../src/packages/user/user-group/collection/index.ts | 2 +- .../src/packages/user/user-group/collection/manifests.ts | 2 +- .../user/user/repository/new-password/constants.ts | 1 + .../packages/user/user/repository/new-password/index.ts | 2 +- .../user/user/repository/new-password/manifests.ts | 3 +-- .../src/packages/user/user/repository/unlock/constants.ts | 1 + .../src/packages/user/user/repository/unlock/index.ts | 2 +- .../src/packages/user/user/repository/unlock/manifests.ts | 3 +-- .../src/packages/user/user/workspace/constants.ts | 1 + .../src/packages/user/user/workspace/manifests.ts | 7 ++----- .../packages/user/user/workspace/user-workspace.context.ts | 2 +- 12 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/constants.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/constants.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/constants.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/constants.ts new file mode 100644 index 0000000000..6f62fec463 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/constants.ts @@ -0,0 +1 @@ +export const UMB_USER_GROUP_COLLECTION_ALIAS = 'Umb.Collection.UserGroup'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/index.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/index.ts index 3d9a00e23f..5e5906d375 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/index.ts @@ -1,2 +1,2 @@ export * from './repository/index.js'; -export { UMB_USER_GROUP_COLLECTION_ALIAS } from './manifests.js'; +export { UMB_USER_GROUP_COLLECTION_ALIAS } from './constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/manifests.ts index 22e5af0529..4b7b4fa7bc 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/manifests.ts @@ -4,9 +4,9 @@ import { } from './repository/manifests.js'; import { manifests as collectionViewManifests } from './views/manifests.js'; import { manifests as collectionActionManifests } from './action/manifests.js'; +import { UMB_USER_GROUP_COLLECTION_ALIAS } from './constants.js'; import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const UMB_USER_GROUP_COLLECTION_ALIAS = 'Umb.Collection.UserGroup'; const collection: ManifestTypes = { type: 'collection', alias: UMB_USER_GROUP_COLLECTION_ALIAS, diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/constants.ts new file mode 100644 index 0000000000..0f9b79f131 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/constants.ts @@ -0,0 +1 @@ +export const UMB_NEW_USER_PASSWORD_REPOSITORY_ALIAS = 'Umb.Repository.User.NewPassword'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/index.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/index.ts index 587c0a2286..fe80fd4883 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/index.ts @@ -1,2 +1,2 @@ export { UmbNewUserPasswordRepository } from './new-user-password.repository.js'; -export { UMB_NEW_USER_PASSWORD_REPOSITORY_ALIAS } from './manifests.js'; +export { UMB_NEW_USER_PASSWORD_REPOSITORY_ALIAS } from './constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/manifests.ts index 8f5a1c94ae..49e526ae71 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/new-password/manifests.ts @@ -1,7 +1,6 @@ +import { UMB_NEW_USER_PASSWORD_REPOSITORY_ALIAS } from './constants.js'; import type { ManifestRepository, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const UMB_NEW_USER_PASSWORD_REPOSITORY_ALIAS = 'Umb.Repository.User.NewPassword'; - const newPasswordRepository: ManifestRepository = { type: 'repository', alias: UMB_NEW_USER_PASSWORD_REPOSITORY_ALIAS, diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/constants.ts new file mode 100644 index 0000000000..aea1c7add0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/constants.ts @@ -0,0 +1 @@ +export const UMB_UNLOCK_USER_REPOSITORY_ALIAS = 'Umb.Repository.User.Unlock'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/index.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/index.ts index 5cde89cdb1..205835f739 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/index.ts @@ -1,2 +1,2 @@ export { UmbUnlockUserRepository } from './unlock-user.repository.js'; -export { UMB_UNLOCK_USER_REPOSITORY_ALIAS } from './manifests.js'; +export { UMB_UNLOCK_USER_REPOSITORY_ALIAS } from './constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/manifests.ts index df50e64fd8..56cbf5bd57 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/repository/unlock/manifests.ts @@ -1,7 +1,6 @@ +import { UMB_UNLOCK_USER_REPOSITORY_ALIAS } from './constants.js'; import type { ManifestRepository, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const UMB_UNLOCK_USER_REPOSITORY_ALIAS = 'Umb.Repository.User.Unlock'; - const unlockRepository: ManifestRepository = { type: 'repository', alias: UMB_UNLOCK_USER_REPOSITORY_ALIAS, diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/constants.ts new file mode 100644 index 0000000000..8988a6f2c0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/constants.ts @@ -0,0 +1 @@ +export const UMB_USER_WORKSPACE_ALIAS = 'Umb.Workspace.User'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/manifests.ts index 6f92fb8546..d2c5c90ec4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/manifests.ts @@ -1,14 +1,12 @@ import { UMB_USER_ENTITY_TYPE } from '../entity.js'; +import { UMB_USER_WORKSPACE_ALIAS } from './constants.js'; import { UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace'; import type { ManifestWorkspaces, ManifestWorkspaceActions, - ManifestWorkspaceView, ManifestTypes, } from '@umbraco-cms/backoffice/extension-registry'; -export const UMB_USER_WORKSPACE_ALIAS = 'Umb.Workspace.User'; - const workspace: ManifestWorkspaces = { type: 'workspace', kind: 'routable', @@ -20,7 +18,6 @@ const workspace: ManifestWorkspaces = { }, }; -const workspaceViews: Array = []; const workspaceActions: Array = [ { type: 'workspaceAction', @@ -42,4 +39,4 @@ const workspaceActions: Array = [ }, ]; -export const manifests: Array = [workspace, ...workspaceViews, ...workspaceActions]; +export const manifests: Array = [workspace, ...workspaceActions]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/user-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/user-workspace.context.ts index 5529398983..d5e1be971f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/user-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/workspace/user-workspace.context.ts @@ -2,7 +2,7 @@ import type { UmbUserDetailModel, UmbUserStartNodesModel, UmbUserStateEnum } fro import { UMB_USER_ENTITY_TYPE } from '../entity.js'; import { UmbUserDetailRepository } from '../repository/index.js'; import { UmbUserAvatarRepository } from '../repository/avatar/index.js'; -import { UMB_USER_WORKSPACE_ALIAS } from './manifests.js'; +import { UMB_USER_WORKSPACE_ALIAS } from './constants.js'; import { UmbUserWorkspaceEditorElement } from './user-workspace-editor.element.js'; import type { UmbSubmittableWorkspaceContext } from '@umbraco-cms/backoffice/workspace'; import { UmbSubmittableWorkspaceContextBase, UmbWorkspaceRouteManager } from '@umbraco-cms/backoffice/workspace';