diff --git a/package-lock.json b/package-lock.json index df927ee676..a627d84fa5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23087,7 +23087,9 @@ "src/packages/documents": { "name": "@umbraco-backoffice/document" }, - "src/packages/embedded-media": {}, + "src/packages/embedded-media": { + "name": "@umbraco-backoffice/embedded-media" + }, "src/packages/extension-insights": { "name": "@umbraco-backoffice/extension-insights" }, diff --git a/package.json b/package.json index 46c2ecf12d..4380d296c4 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,7 @@ "./tiny-mce": "./dist-cms/packages/tiny-mce/index.js", "./tree": "./dist-cms/packages/core/tree/index.js", "./ufm": "./dist-cms/packages/ufm/index.js", + "./user-change-password": "./dist-cms/packages/user/change-password/index.js", "./user-group": "./dist-cms/packages/user/user-group/index.js", "./user-permission": "./dist-cms/packages/user/user-permission/index.js", "./user": "./dist-cms/packages/user/user/index.js", diff --git a/src/packages/code-editor/code-editor-modal/code-editor-modal.stories.ts b/src/packages/code-editor/code-editor-modal/code-editor-modal.stories.ts index cfaaaef4e6..6d25717e21 100644 --- a/src/packages/code-editor/code-editor-modal/code-editor-modal.stories.ts +++ b/src/packages/code-editor/code-editor-modal/code-editor-modal.stories.ts @@ -1,5 +1,3 @@ -import '../confirm/confirm-modal.element.js'; - import type { UmbCodeEditorModalData } from './code-editor-modal.token.js'; import type { Meta, Story } from '@storybook/web-components'; import { html } from '@umbraco-cms/backoffice/external/lit'; diff --git a/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.stories.ts b/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.stories.ts index 3b31ce1429..5f34ce845e 100644 --- a/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.stories.ts +++ b/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.stories.ts @@ -1,4 +1,3 @@ -import '../../../components/body-layout/body-layout.element.js'; import './icon-picker-modal.element.js'; import type { UmbIconPickerModalElement } from './icon-picker-modal.element.js'; diff --git a/src/packages/core/modal/token/index.ts b/src/packages/core/modal/token/index.ts index 6dd5fd266d..7fcdaada28 100644 --- a/src/packages/core/modal/token/index.ts +++ b/src/packages/core/modal/token/index.ts @@ -1,2 +1 @@ -export * from './change-password-modal.token.js'; export * from './modal-token.js'; diff --git a/src/packages/embedded-media/modal/embedded-media-modal.stories.ts b/src/packages/embedded-media/modal/embedded-media-modal.stories.ts index c0e8636587..35e21f4aea 100644 --- a/src/packages/embedded-media/modal/embedded-media-modal.stories.ts +++ b/src/packages/embedded-media/modal/embedded-media-modal.stories.ts @@ -1,4 +1,3 @@ -import '../../../components/body-layout/body-layout.element.js'; import './embedded-media-modal.element.js'; import type { UmbEmbeddedMediaModalData } from './embedded-media-modal.token.js'; diff --git a/src/packages/user/change-password/change-user-password.action.ts b/src/packages/user/change-password/entity-action/change-user-password.action.ts similarity index 91% rename from src/packages/user/change-password/change-user-password.action.ts rename to src/packages/user/change-password/entity-action/change-user-password.action.ts index fbf0e35929..6e836d9bf8 100644 --- a/src/packages/user/change-password/change-user-password.action.ts +++ b/src/packages/user/change-password/entity-action/change-user-password.action.ts @@ -1,8 +1,9 @@ +import { UMB_CHANGE_PASSWORD_MODAL } from '../modal/index.js'; import { UmbChangeUserPasswordRepository } from '@umbraco-cms/backoffice/user'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action'; import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; -import { UMB_MODAL_MANAGER_CONTEXT, UMB_CHANGE_PASSWORD_MODAL } from '@umbraco-cms/backoffice/modal'; +import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal'; import { UMB_CURRENT_USER_CONTEXT, UmbCurrentUserRepository } from '@umbraco-cms/backoffice/current-user'; export class UmbChangeUserPasswordEntityAction extends UmbEntityActionBase { diff --git a/src/packages/user/change-password/entity-action/manifests.ts b/src/packages/user/change-password/entity-action/manifests.ts new file mode 100644 index 0000000000..01148ac695 --- /dev/null +++ b/src/packages/user/change-password/entity-action/manifests.ts @@ -0,0 +1,22 @@ +import { UMB_USER_ENTITY_TYPE } from '@umbraco-cms/backoffice/user'; + +export const manifests: Array = [ + { + type: 'entityAction', + kind: 'default', + alias: 'Umb.EntityAction.User.ChangePassword', + name: 'Change User Password Entity Action', + weight: 600, + api: () => import('./change-user-password.action.js'), + forEntityTypes: [UMB_USER_ENTITY_TYPE], + meta: { + icon: 'icon-key', + label: '#user_changePassword', + }, + conditions: [ + { + alias: 'Umb.Condition.User.AllowChangePassword', + }, + ], + }, +]; diff --git a/src/packages/user/change-password/index.ts b/src/packages/user/change-password/index.ts new file mode 100644 index 0000000000..28d9f38fba --- /dev/null +++ b/src/packages/user/change-password/index.ts @@ -0,0 +1 @@ +export * from './modal/index.js'; diff --git a/src/packages/user/change-password/manifests.ts b/src/packages/user/change-password/manifests.ts index 02d2d6af5d..a779cde6a9 100644 --- a/src/packages/user/change-password/manifests.ts +++ b/src/packages/user/change-password/manifests.ts @@ -1,28 +1,4 @@ -import { UMB_USER_ENTITY_TYPE } from '@umbraco-cms/backoffice/user'; +import { manifests as entityActionManifests } from './entity-action/manifests.js'; +import { manifests as modalManifests } from './modal/manifests.js'; -export const manifests: Array = [ - { - type: 'entityAction', - kind: 'default', - alias: 'Umb.EntityAction.User.ChangePassword', - name: 'Change User Password Entity Action', - weight: 600, - api: () => import('./change-user-password.action.js'), - forEntityTypes: [UMB_USER_ENTITY_TYPE], - meta: { - icon: 'icon-key', - label: '#user_changePassword', - }, - conditions: [ - { - alias: 'Umb.Condition.User.AllowChangePassword', - }, - ], - }, - { - type: 'modal', - alias: 'Umb.Modal.ChangePassword', - name: 'Change Password Modal', - js: () => import('./change-password-modal.element.js'), - }, -]; +export const manifests: Array = [...entityActionManifests, ...modalManifests]; diff --git a/src/packages/user/change-password/change-password-modal.element.ts b/src/packages/user/change-password/modal/change-password-modal.element.ts similarity index 98% rename from src/packages/user/change-password/change-password-modal.element.ts rename to src/packages/user/change-password/modal/change-password-modal.element.ts index 09a0819e60..bdff723460 100644 --- a/src/packages/user/change-password/change-password-modal.element.ts +++ b/src/packages/user/change-password/modal/change-password-modal.element.ts @@ -1,9 +1,9 @@ +import type { UmbChangePasswordModalData, UmbChangePasswordModalValue } from './change-password-modal.token.js'; import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user'; import { UmbUserItemRepository } from '@umbraco-cms/backoffice/user'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import type { CSSResultGroup } from '@umbraco-cms/backoffice/external/lit'; import { css, html, nothing, customElement, state } from '@umbraco-cms/backoffice/external/lit'; -import type { UmbChangePasswordModalData, UmbChangePasswordModalValue } from '@umbraco-cms/backoffice/modal'; import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; @customElement('umb-change-password-modal') diff --git a/src/packages/core/modal/token/change-password-modal.token.ts b/src/packages/user/change-password/modal/change-password-modal.token.ts similarity index 85% rename from src/packages/core/modal/token/change-password-modal.token.ts rename to src/packages/user/change-password/modal/change-password-modal.token.ts index d6a41803fb..8c8cf1b9a6 100644 --- a/src/packages/core/modal/token/change-password-modal.token.ts +++ b/src/packages/user/change-password/modal/change-password-modal.token.ts @@ -1,4 +1,4 @@ -import { UmbModalToken } from './modal-token.js'; +import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; export interface UmbChangePasswordModalData { user: { diff --git a/src/packages/user/change-password/modal/index.ts b/src/packages/user/change-password/modal/index.ts new file mode 100644 index 0000000000..dbfc55d6cf --- /dev/null +++ b/src/packages/user/change-password/modal/index.ts @@ -0,0 +1 @@ +export * from './change-password-modal.token.js'; diff --git a/src/packages/user/change-password/modal/manifests.ts b/src/packages/user/change-password/modal/manifests.ts new file mode 100644 index 0000000000..f08d08322a --- /dev/null +++ b/src/packages/user/change-password/modal/manifests.ts @@ -0,0 +1,8 @@ +export const manifests: Array = [ + { + type: 'modal', + alias: 'Umb.Modal.ChangePassword', + name: 'Change Password Modal', + js: () => import('./change-password-modal.element.js'), + }, +]; diff --git a/src/packages/user/current-user/profile/change-password-current-user.action.ts b/src/packages/user/current-user/profile/change-password-current-user.action.ts index b37cfaeaa7..9a780e13f6 100644 --- a/src/packages/user/current-user/profile/change-password-current-user.action.ts +++ b/src/packages/user/current-user/profile/change-password-current-user.action.ts @@ -3,7 +3,8 @@ import { UmbCurrentUserRepository } from '../repository/index.js'; import { UmbActionBase } from '@umbraco-cms/backoffice/action'; import type { UmbCurrentUserAction, UmbCurrentUserActionArgs } from '@umbraco-cms/backoffice/extension-registry'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UMB_CHANGE_PASSWORD_MODAL, UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal'; +import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal'; +import { UMB_CHANGE_PASSWORD_MODAL } from '@umbraco-cms/backoffice/user-change-password'; export class UmbChangePasswordCurrentUserAction extends UmbActionBase> implements UmbCurrentUserAction diff --git a/src/packages/user/vite.config.ts b/src/packages/user/vite.config.ts index f498904a85..aba6f508c2 100644 --- a/src/packages/user/vite.config.ts +++ b/src/packages/user/vite.config.ts @@ -11,12 +11,13 @@ export default defineConfig({ ...getDefaultConfig({ dist, entry: { + 'current-user/index': 'current-user/index.ts', + 'umbraco-package': 'umbraco-package.ts', + 'change-password/index': 'change-password/index.ts', 'user-group/index': 'user-group/index.ts', 'user-permission/index': 'user-permission/index.ts', 'user/index': 'user/index.ts', - 'current-user/index': 'current-user/index.ts', manifests: 'manifests.ts', - 'umbraco-package': 'umbraco-package.ts', }, }), }); diff --git a/tsconfig.json b/tsconfig.json index bdb2097f8f..cbd0efbdab 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -122,6 +122,7 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js "@umbraco-cms/backoffice/tiny-mce": ["./src/packages/tiny-mce/index.ts"], "@umbraco-cms/backoffice/tree": ["./src/packages/core/tree/index.ts"], "@umbraco-cms/backoffice/ufm": ["./src/packages/ufm/index.ts"], + "@umbraco-cms/backoffice/user-change-password": ["./src/packages/user/change-password/index.ts"], "@umbraco-cms/backoffice/user-group": ["./src/packages/user/user-group/index.ts"], "@umbraco-cms/backoffice/user-permission": ["./src/packages/user/user-permission/index.ts"], "@umbraco-cms/backoffice/user": ["./src/packages/user/user/index.ts"],