@umbraco-cms/backoffice 14.0.0--preview004-b3446294 → 14.0.0--preview003
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/apps/app/app.element.js +3 -0
- package/dist-cms/assets/lang/da-dk.js +0 -3
- package/dist-cms/assets/lang/da-dk.ts +0 -3
- package/dist-cms/assets/lang/en-us.js +18 -21
- package/dist-cms/assets/lang/en-us.ts +18 -21
- package/dist-cms/custom-elements.json +19 -288
- package/dist-cms/external/tinymce/index.js +36 -36
- package/dist-cms/mocks/browser-handlers.js +1 -1
- package/dist-cms/mocks/data/entity.data.d.ts +1 -1
- package/dist-cms/mocks/data/entity.data.js +9 -1
- package/dist-cms/mocks/data/media.data.d.ts +1 -2
- package/dist-cms/mocks/data/media.data.js +0 -11
- package/dist-cms/mocks/data/user-groups.data.d.ts +9 -0
- package/dist-cms/mocks/data/user-groups.data.js +21 -0
- package/dist-cms/mocks/data/users.data.d.ts +16 -0
- package/dist-cms/mocks/data/{user.data.js → users.data.js} +41 -27
- package/dist-cms/mocks/handlers/dictionary.handlers.js +2 -2
- package/dist-cms/mocks/handlers/media.handlers.js +0 -8
- package/dist-cms/mocks/handlers/partial-views.handlers.js +3 -3
- package/dist-cms/mocks/handlers/user-group.handlers.js +17 -0
- package/dist-cms/mocks/handlers/user.handlers.js +1 -15
- package/dist-cms/packages/core/components/input-list-base/input-list-base.js +1 -1
- package/dist-cms/packages/core/components/input-section/input-section.element.d.ts +2 -2
- package/dist-cms/packages/core/components/input-section/input-section.element.js +5 -5
- package/dist-cms/packages/core/extension-registry/conditions/types.d.ts +2 -3
- package/dist-cms/packages/core/extension-registry/models/index.d.ts +1 -5
- package/dist-cms/packages/core/extension-registry/models/index.js +0 -2
- package/dist-cms/packages/core/localization/index.d.ts +0 -3
- package/dist-cms/packages/core/localization/index.js +0 -3
- package/dist-cms/packages/core/localization/localize.element.js +1 -1
- package/dist-cms/packages/core/modal/common/manifests.js +0 -6
- package/dist-cms/packages/core/modal/common/tree-picker/tree-picker-modal.element.js +3 -5
- package/dist-cms/packages/core/modal/token/index.d.ts +0 -1
- package/dist-cms/packages/core/modal/token/index.js +0 -1
- package/dist-cms/packages/core/picker-input/picker-input.context.js +3 -1
- package/dist-cms/packages/core/tree/tree.context.js +2 -3
- package/dist-cms/packages/documents/documents/components/index.d.ts +0 -1
- package/dist-cms/packages/documents/documents/components/index.js +0 -1
- package/dist-cms/packages/documents/documents/components/input-document/input-document.element.d.ts +12 -7
- package/dist-cms/packages/documents/documents/components/input-document/input-document.element.js +64 -51
- package/dist-cms/packages/documents/documents/entity-actions/create/manifests.js +0 -9
- package/dist-cms/packages/documents/documents/entity-actions/manifests.js +1 -1
- package/dist-cms/packages/documents/documents/entity-actions/permissions.action.d.ts +1 -2
- package/dist-cms/packages/documents/documents/entity-actions/permissions.action.js +2 -22
- package/dist-cms/packages/documents/documents/index.d.ts +0 -2
- package/dist-cms/packages/documents/documents/index.js +0 -2
- package/dist-cms/packages/documents/documents/manifests.d.ts +0 -4
- package/dist-cms/packages/documents/documents/manifests.js +0 -2
- package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.d.ts +0 -4
- package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.js +0 -6
- package/dist-cms/packages/documents/documents/recycle-bin/manifests.d.ts +0 -4
- package/dist-cms/packages/documents/documents/repository/document.repository.js +4 -4
- package/dist-cms/packages/documents/documents/repository/manifests.d.ts +2 -3
- package/dist-cms/packages/documents/documents/repository/manifests.js +1 -9
- package/dist-cms/packages/documents/documents/workspace/views/info/document-info-workspace-view.element.js +28 -29
- package/dist-cms/packages/documents/manifests.d.ts +0 -4
- package/dist-cms/packages/log-viewer/workspace/views/overview/components/log-viewer-saved-searches-overview.element.js +1 -1
- package/dist-cms/packages/media/manifests.d.ts +1 -2
- package/dist-cms/packages/media/manifests.js +0 -1
- package/dist-cms/packages/media/media/components/index.d.ts +0 -1
- package/dist-cms/packages/media/media/components/index.js +0 -1
- package/dist-cms/packages/media/media/components/input-media/input-media.element.d.ts +15 -7
- package/dist-cms/packages/media/media/components/input-media/input-media.element.js +72 -50
- package/dist-cms/packages/media/media/index.d.ts +0 -2
- package/dist-cms/packages/media/media/index.js +1 -1
- package/dist-cms/packages/media/media/manifests.d.ts +1 -1
- package/dist-cms/packages/media/media/manifests.js +0 -2
- package/dist-cms/packages/media/media/repository/manifests.d.ts +2 -3
- package/dist-cms/packages/media/media/repository/manifests.js +1 -9
- package/dist-cms/packages/media/media/repository/media.repository.d.ts +0 -6
- package/dist-cms/packages/media/media/repository/media.repository.js +0 -22
- package/dist-cms/packages/users/current-user/index.d.ts +0 -1
- package/dist-cms/packages/users/current-user/index.js +0 -1
- package/dist-cms/packages/users/current-user/manifests.js +1 -7
- package/dist-cms/packages/users/current-user/modals/current-user/current-user-modal.element.js +7 -7
- package/dist-cms/packages/users/index.d.ts +2 -4
- package/dist-cms/packages/users/index.js +2 -4
- package/dist-cms/packages/users/manifests.d.ts +0 -2
- package/dist-cms/packages/users/manifests.js +0 -3
- package/dist-cms/packages/users/user-groups/collection/user-group-collection-header.element.js +2 -2
- package/dist-cms/packages/users/user-groups/collection/user-group-collection-view.element.js +6 -6
- package/dist-cms/packages/users/user-groups/components/index.d.ts +0 -1
- package/dist-cms/packages/users/user-groups/components/index.js +0 -1
- package/dist-cms/packages/users/user-groups/index.d.ts +0 -2
- package/dist-cms/packages/users/user-groups/index.js +0 -2
- package/dist-cms/packages/users/user-groups/manifests.d.ts +1 -1
- package/dist-cms/packages/users/user-groups/manifests.js +0 -2
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace-editor.element.d.ts +0 -2
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace-editor.element.js +56 -57
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace.context.d.ts +0 -12
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace.context.js +0 -20
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace.element.js +1 -1
- package/dist-cms/packages/users/users/collection/user-collection-header.element.js +11 -18
- package/dist-cms/packages/users/users/collection/views/grid/user-collection-grid-view.element.js +6 -6
- package/dist-cms/packages/users/users/collection/views/table/column-layouts/status/user-table-status-column-layout.element.js +3 -3
- package/dist-cms/packages/users/users/components/index.d.ts +0 -3
- package/dist-cms/packages/users/users/components/index.js +0 -3
- package/dist-cms/packages/users/users/components/user-input/user-input.element.js +2 -2
- package/dist-cms/packages/users/users/index.d.ts +0 -2
- package/dist-cms/packages/users/users/index.js +0 -2
- package/dist-cms/packages/users/users/modals/user-picker/user-picker-modal.element.d.ts +1 -3
- package/dist-cms/packages/users/users/modals/user-picker/user-picker-modal.element.js +25 -20
- package/dist-cms/packages/users/users/repository/user.repository.js +1 -1
- package/dist-cms/packages/users/users/workspace/user-workspace-editor.element.js +56 -73
- package/dist-cms/packages/users/utils.d.ts +2 -5
- package/dist-cms/packages/users/utils.js +14 -14
- package/dist-cms/shared/auth/auth-flow.d.ts +4 -0
- package/dist-cms/shared/auth/auth-flow.js +25 -6
- package/dist-cms/shared/repository/repository-items.manager.js +0 -5
- package/dist-cms/shared/umb-events/index.d.ts +0 -1
- package/dist-cms/shared/umb-events/index.js +0 -1
- package/dist-cms/tinymce/CHANGELOG.md +0 -48
- package/dist-cms/tinymce/composer.json +1 -1
- package/dist-cms/tinymce/models/dom/model.js +1 -1
- package/dist-cms/tinymce/models/dom/model.min.js +1 -1
- package/dist-cms/tinymce/package.json +1 -1
- package/dist-cms/tinymce/plugins/accordion/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/accordion/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/advlist/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/advlist/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/anchor/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/anchor/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/autolink/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/autolink/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/autoresize/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/autoresize/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/autosave/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/autosave/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/charmap/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/charmap/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/code/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/code/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/codesample/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/codesample/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/directionality/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/directionality/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/emoticons/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/emoticons/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/fullscreen/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/fullscreen/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/help/plugin.js +5 -5
- package/dist-cms/tinymce/plugins/help/plugin.min.js +2 -2
- package/dist-cms/tinymce/plugins/image/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/image/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/importcss/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/importcss/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/insertdatetime/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/link/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/link/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/lists/plugin.js +8 -63
- package/dist-cms/tinymce/plugins/lists/plugin.min.js +2 -2
- package/dist-cms/tinymce/plugins/media/plugin.js +23 -3
- package/dist-cms/tinymce/plugins/media/plugin.min.js +2 -2
- package/dist-cms/tinymce/plugins/nonbreaking/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/pagebreak/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/pagebreak/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/preview/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/preview/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/quickbars/plugin.js +4 -13
- package/dist-cms/tinymce/plugins/quickbars/plugin.min.js +2 -2
- package/dist-cms/tinymce/plugins/save/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/save/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/searchreplace/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/table/plugin.js +2 -2
- package/dist-cms/tinymce/plugins/table/plugin.min.js +2 -2
- package/dist-cms/tinymce/plugins/template/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/template/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/visualblocks/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/visualblocks/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/visualchars/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/visualchars/plugin.min.js +1 -1
- package/dist-cms/tinymce/plugins/wordcount/plugin.js +1 -1
- package/dist-cms/tinymce/plugins/wordcount/plugin.min.js +1 -1
- package/dist-cms/tinymce/skins/ui/oxide/content.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide/content.inline.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide/content.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide/skin.css +11 -51
- package/dist-cms/tinymce/skins/ui/oxide/skin.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide-dark/content.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide-dark/content.inline.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/oxide-dark/skin.css +14 -54
- package/dist-cms/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5/content.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5/content.inline.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5/skin.css +11 -51
- package/dist-cms/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5-dark/content.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5-dark/content.inline.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
- package/dist-cms/tinymce/skins/ui/tinymce-5-dark/skin.css +11 -51
- package/dist-cms/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/dist-cms/tinymce/themes/silver/theme.js +55 -158
- package/dist-cms/tinymce/themes/silver/theme.min.js +2 -2
- package/dist-cms/tinymce/tinymce.d.ts +6 -4
- package/dist-cms/tinymce/tinymce.js +644 -864
- package/dist-cms/tinymce/tinymce.min.js +2 -2
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package-schema.json +0 -154
- package/dist-cms/vscode-html-custom-data.json +18 -167
- package/package.json +2 -2
- package/dist-cms/mocks/data/user-group.data.d.ts +0 -17
- package/dist-cms/mocks/data/user-group.data.js +0 -61
- package/dist-cms/mocks/data/user.data.d.ts +0 -15
- package/dist-cms/mocks/handlers/user-group/collection.handlers.d.ts +0 -1
- package/dist-cms/mocks/handlers/user-group/collection.handlers.js +0 -10
- package/dist-cms/mocks/handlers/user-group/detail.handlers.d.ts +0 -1
- package/dist-cms/mocks/handlers/user-group/detail.handlers.js +0 -37
- package/dist-cms/mocks/handlers/user-group/index.js +0 -4
- package/dist-cms/mocks/handlers/user-group/item.handlers.d.ts +0 -1
- package/dist-cms/mocks/handlers/user-group/item.handlers.js +0 -13
- package/dist-cms/mocks/handlers/user-group/slug.d.ts +0 -1
- package/dist-cms/mocks/handlers/user-group/slug.js +0 -1
- package/dist-cms/packages/core/extension-registry/models/user-granular-permission.model.d.ts +0 -8
- package/dist-cms/packages/core/extension-registry/models/user-granular-permission.model.js +0 -1
- package/dist-cms/packages/core/extension-registry/models/user-permission.model.d.ts +0 -11
- package/dist-cms/packages/core/extension-registry/models/user-permission.model.js +0 -1
- package/dist-cms/packages/core/localization/localize-date.element.d.ts +0 -28
- package/dist-cms/packages/core/localization/localize-date.element.js +0 -42
- package/dist-cms/packages/core/localization/localize-number.element.d.ts +0 -28
- package/dist-cms/packages/core/localization/localize-number.element.js +0 -42
- package/dist-cms/packages/core/localization/localize-relative-time.element.d.ts +0 -34
- package/dist-cms/packages/core/localization/localize-relative-time.element.js +0 -54
- package/dist-cms/packages/core/modal/common/entity-user-permission-settings/entity-user-permission-settings-modal.element.d.ts +0 -19
- package/dist-cms/packages/core/modal/common/entity-user-permission-settings/entity-user-permission-settings-modal.element.js +0 -97
- package/dist-cms/packages/core/modal/token/entity-user-permission-settings-modal.token.d.ts +0 -7
- package/dist-cms/packages/core/modal/token/entity-user-permission-settings-modal.token.js +0 -4
- package/dist-cms/packages/documents/documents/components/input-document/input-document.context.d.ts +0 -6
- package/dist-cms/packages/documents/documents/components/input-document/input-document.context.js +0 -7
- package/dist-cms/packages/documents/documents/components/input-document-granular-permission/input-document-granular-permission.element.d.ts +0 -23
- package/dist-cms/packages/documents/documents/components/input-document-granular-permission/input-document-granular-permission.element.js +0 -102
- package/dist-cms/packages/documents/documents/user-permissions/index.d.ts +0 -1
- package/dist-cms/packages/documents/documents/user-permissions/index.js +0 -1
- package/dist-cms/packages/documents/documents/user-permissions/manifests.d.ts +0 -19
- package/dist-cms/packages/documents/documents/user-permissions/manifests.js +0 -196
- package/dist-cms/packages/media/media/components/input-media/input-media.context.d.ts +0 -6
- package/dist-cms/packages/media/media/components/input-media/input-media.context.js +0 -7
- package/dist-cms/packages/media/media/repository/media-item.store.d.ts +0 -20
- package/dist-cms/packages/media/media/repository/media-item.store.js +0 -23
- package/dist-cms/packages/media/media/repository/sources/media-item.server.data.d.ts +0 -24
- package/dist-cms/packages/media/media/repository/sources/media-item.server.data.js +0 -31
- package/dist-cms/packages/media/media/user-permissions/index.d.ts +0 -1
- package/dist-cms/packages/media/media/user-permissions/index.js +0 -1
- package/dist-cms/packages/media/media/user-permissions/manifests.d.ts +0 -4
- package/dist-cms/packages/media/media/user-permissions/manifests.js +0 -27
- package/dist-cms/packages/users/current-user/conditions/index.d.ts +0 -1
- package/dist-cms/packages/users/current-user/conditions/index.js +0 -1
- package/dist-cms/packages/users/current-user/conditions/user-permission.condition.d.ts +0 -18
- package/dist-cms/packages/users/current-user/conditions/user-permission.condition.js +0 -23
- package/dist-cms/packages/users/user-groups/entity-actions/manifests.d.ts +0 -2
- package/dist-cms/packages/users/user-groups/entity-actions/manifests.js +0 -19
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-default-permission-list.element.d.ts +0 -16
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-default-permission-list.element.js +0 -69
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-granular-permission-list.element.d.ts +0 -14
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-granular-permission-list.element.js +0 -31
- package/dist-cms/packages/users/users/components/user-permission-setting/user-permission-setting.element.d.ts +0 -15
- package/dist-cms/packages/users/users/components/user-permission-setting/user-permission-setting.element.js +0 -66
- package/dist-cms/packages/users/users/repository/index.d.ts +0 -1
- package/dist-cms/packages/users/users/repository/index.js +0 -1
- package/dist-cms/shared/umb-events/selected.event.d.ts +0 -3
- package/dist-cms/shared/umb-events/selected.event.js +0 -6
- /package/dist-cms/mocks/handlers/{user-group/index.d.ts → user-group.handlers.d.ts} +0 -0
|
@@ -8,7 +8,7 @@ import * as serverHandlers from './handlers/server.handlers.js';
|
|
|
8
8
|
import { handlers as upgradeHandlers } from './handlers/upgrade.handlers.js';
|
|
9
9
|
import { handlers as userHandlers } from './handlers/user.handlers.js';
|
|
10
10
|
import { handlers as telemetryHandlers } from './handlers/telemetry.handlers.js';
|
|
11
|
-
import { handlers as userGroupsHandlers } from './handlers/user-group
|
|
11
|
+
import { handlers as userGroupsHandlers } from './handlers/user-group.handlers.js';
|
|
12
12
|
import { handlers as examineManagementHandlers } from './handlers/examine-management.handlers.js';
|
|
13
13
|
import { handlers as modelsBuilderHandlers } from './handlers/modelsbuilder.handlers.js';
|
|
14
14
|
import { handlers as healthCheckHandlers } from './handlers/health-check.handlers.js';
|
|
@@ -8,6 +8,6 @@ export declare class UmbEntityData<T extends UmbEntityBase> extends UmbData<T> {
|
|
|
8
8
|
insert(item: T): T;
|
|
9
9
|
save(id: string, saveItem: T): T;
|
|
10
10
|
trash(ids: Array<string>): T[];
|
|
11
|
-
delete(ids: Array<string>):
|
|
11
|
+
delete(ids: Array<string>): (string | undefined)[];
|
|
12
12
|
updateData(updateItem: T): void;
|
|
13
13
|
}
|
|
@@ -60,11 +60,19 @@ export class UmbEntityData extends UmbData {
|
|
|
60
60
|
return trashedItems;
|
|
61
61
|
}
|
|
62
62
|
delete(ids) {
|
|
63
|
+
const deletedKeys = this.data
|
|
64
|
+
.filter((item) => {
|
|
65
|
+
if (!item.id)
|
|
66
|
+
throw new Error('Item has no id');
|
|
67
|
+
ids.includes(item.id);
|
|
68
|
+
})
|
|
69
|
+
.map((item) => item.id);
|
|
63
70
|
this.data = this.data.filter((item) => {
|
|
64
71
|
if (!item.id)
|
|
65
72
|
throw new Error('Item has no id');
|
|
66
|
-
|
|
73
|
+
ids.indexOf(item.id) === -1;
|
|
67
74
|
});
|
|
75
|
+
return deletedKeys;
|
|
68
76
|
}
|
|
69
77
|
updateData(updateItem) {
|
|
70
78
|
const itemIndex = this.data.findIndex((item) => item.id === updateItem.id);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { MediaDetails } from '../../packages/media/media/index.js';
|
|
2
2
|
import { UmbEntityData } from './entity.data.js';
|
|
3
|
-
import { ContentTreeItemResponseModel,
|
|
3
|
+
import { ContentTreeItemResponseModel, PagedMediaTreeItemResponseModel } from '../../external/backend-api/index.js';
|
|
4
4
|
export declare const data: Array<MediaDetails>;
|
|
5
5
|
declare class UmbMediaData extends UmbEntityData<MediaDetails> {
|
|
6
6
|
#private;
|
|
7
7
|
constructor();
|
|
8
|
-
getItems(ids: Array<string>): Array<MediaItemResponseModel>;
|
|
9
8
|
getTreeRoot(): PagedMediaTreeItemResponseModel;
|
|
10
9
|
getTreeItemChildren(id: string): PagedMediaTreeItemResponseModel;
|
|
11
10
|
getTreeItem(ids: Array<string>): Array<ContentTreeItemResponseModel>;
|
|
@@ -179,13 +179,6 @@ export const data = [
|
|
|
179
179
|
variants: [],
|
|
180
180
|
},
|
|
181
181
|
];
|
|
182
|
-
const createMediaItem = (item) => {
|
|
183
|
-
return {
|
|
184
|
-
id: item.id,
|
|
185
|
-
name: item.name,
|
|
186
|
-
icon: item.icon,
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
182
|
// Temp mocked database
|
|
190
183
|
// TODO: all properties are optional in the server schema. I don't think this is correct.
|
|
191
184
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -195,10 +188,6 @@ class UmbMediaData extends UmbEntityData {
|
|
|
195
188
|
constructor() {
|
|
196
189
|
super(data);
|
|
197
190
|
}
|
|
198
|
-
getItems(ids) {
|
|
199
|
-
const items = this.data.filter((item) => ids.includes(item.id ?? ''));
|
|
200
|
-
return items.map((item) => createMediaItem(item));
|
|
201
|
-
}
|
|
202
191
|
getTreeRoot() {
|
|
203
192
|
const items = this.data.filter((item) => item.parentId === null);
|
|
204
193
|
const treeItems = items.map((item) => createContentTreeItem(item));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UmbEntityData } from './entity.data.js';
|
|
2
|
+
import { PagedUserGroupResponseModel, UserGroupResponseModel } from '../../external/backend-api/index.js';
|
|
3
|
+
declare class UmbUserGroupsData extends UmbEntityData<UserGroupResponseModel> {
|
|
4
|
+
constructor(data: Array<UserGroupResponseModel>);
|
|
5
|
+
getAll(): PagedUserGroupResponseModel;
|
|
6
|
+
}
|
|
7
|
+
export declare const data: Array<UserGroupResponseModel>;
|
|
8
|
+
export declare const umbUserGroupsData: UmbUserGroupsData;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UmbEntityData } from './entity.data.js';
|
|
2
|
+
// Temp mocked database
|
|
3
|
+
class UmbUserGroupsData extends UmbEntityData {
|
|
4
|
+
constructor(data) {
|
|
5
|
+
super(data);
|
|
6
|
+
}
|
|
7
|
+
getAll() {
|
|
8
|
+
return {
|
|
9
|
+
total: this.data.length,
|
|
10
|
+
items: this.data,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export const data = [
|
|
15
|
+
{
|
|
16
|
+
id: 'c630d49e-4e7b-42ea-b2bc-edc0edacb6b1',
|
|
17
|
+
name: 'Administrators',
|
|
18
|
+
icon: 'umb:medal',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
export const umbUserGroupsData = new UmbUserGroupsData(data);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UmbData } from './data.js';
|
|
2
|
+
import { UmbLoggedInUser } from '../../shared/auth/index.js';
|
|
3
|
+
import { PagedUserResponseModel, UserResponseModel } from '../../external/backend-api/index.js';
|
|
4
|
+
declare class UmbUsersData extends UmbData<UserResponseModel> {
|
|
5
|
+
constructor(data: UserResponseModel[]);
|
|
6
|
+
getAll(): PagedUserResponseModel;
|
|
7
|
+
getById(id: string): UserResponseModel | undefined;
|
|
8
|
+
getCurrentUser(): UmbLoggedInUser;
|
|
9
|
+
save(id: string, saveItem: UserResponseModel): UserResponseModel;
|
|
10
|
+
protected updateData(updateItem: UserResponseModel): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const data: Array<UserResponseModel & {
|
|
13
|
+
type: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const umbUsersData: UmbUsersData;
|
|
16
|
+
export {};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { UserStateModel, } from '../../external/backend-api/index.js';
|
|
4
|
-
const createUserItem = (item) => {
|
|
5
|
-
return {
|
|
6
|
-
name: item.name,
|
|
7
|
-
id: item.id,
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
import { UmbData } from './data.js';
|
|
2
|
+
import { UserStateModel } from '../../external/backend-api/index.js';
|
|
10
3
|
// Temp mocked database
|
|
11
|
-
class
|
|
4
|
+
class UmbUsersData extends UmbData {
|
|
12
5
|
constructor(data) {
|
|
13
6
|
super(data);
|
|
14
7
|
}
|
|
@@ -18,19 +11,11 @@ class UmbUserData extends UmbEntityData {
|
|
|
18
11
|
items: this.data,
|
|
19
12
|
};
|
|
20
13
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return items.map((item) => createUserItem(item));
|
|
24
|
-
}
|
|
25
|
-
setUserGroups(data) {
|
|
26
|
-
const users = this.data.filter((user) => data.userIds?.includes(user.id ?? ''));
|
|
27
|
-
users.forEach((user) => {
|
|
28
|
-
user.userGroupIds = data.userGroupIds;
|
|
29
|
-
});
|
|
14
|
+
getById(id) {
|
|
15
|
+
return this.data.find((user) => user.id === id);
|
|
30
16
|
}
|
|
31
17
|
getCurrentUser() {
|
|
32
18
|
const firstUser = this.data[0];
|
|
33
|
-
const permissions = firstUser.userGroupIds?.length ? umbUserGroupData.getPermissions(firstUser.userGroupIds) : [];
|
|
34
19
|
return {
|
|
35
20
|
id: firstUser.id,
|
|
36
21
|
name: firstUser.name,
|
|
@@ -42,9 +27,42 @@ class UmbUserData extends UmbEntityData {
|
|
|
42
27
|
languages: [],
|
|
43
28
|
contentStartNodeIds: firstUser.contentStartNodeIds,
|
|
44
29
|
mediaStartNodeIds: firstUser.mediaStartNodeIds,
|
|
45
|
-
permissions,
|
|
30
|
+
permissions: [],
|
|
46
31
|
};
|
|
47
32
|
}
|
|
33
|
+
save(id, saveItem) {
|
|
34
|
+
const foundIndex = this.data.findIndex((item) => item.id === id);
|
|
35
|
+
if (foundIndex !== -1) {
|
|
36
|
+
// update
|
|
37
|
+
this.data[foundIndex] = saveItem;
|
|
38
|
+
this.updateData(saveItem);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// new
|
|
42
|
+
this.data.push(saveItem);
|
|
43
|
+
}
|
|
44
|
+
return saveItem;
|
|
45
|
+
}
|
|
46
|
+
updateData(updateItem) {
|
|
47
|
+
const itemIndex = this.data.findIndex((item) => item.id === updateItem.id);
|
|
48
|
+
const item = this.data[itemIndex];
|
|
49
|
+
console.log('updateData', updateItem, itemIndex, item);
|
|
50
|
+
if (!item)
|
|
51
|
+
return;
|
|
52
|
+
const itemKeys = Object.keys(item);
|
|
53
|
+
const newItem = {};
|
|
54
|
+
for (const [key] of Object.entries(updateItem)) {
|
|
55
|
+
if (itemKeys.indexOf(key) !== -1) {
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
newItem[key] = updateItem[key];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
this.data[itemIndex] = newItem;
|
|
64
|
+
console.log('updateData', this.data[itemIndex]);
|
|
65
|
+
}
|
|
48
66
|
}
|
|
49
67
|
export const data = [
|
|
50
68
|
{
|
|
@@ -62,11 +80,7 @@ export const data = [
|
|
|
62
80
|
updateDate: '2/10/2022',
|
|
63
81
|
createDate: '3/13/2022',
|
|
64
82
|
failedLoginAttempts: 946,
|
|
65
|
-
userGroupIds: [
|
|
66
|
-
'c630d49e-4e7b-42ea-b2bc-edc0edacb6b1',
|
|
67
|
-
'9d24dc47-a4bf-427f-8a4a-b900f03b8a12',
|
|
68
|
-
'f4626511-b0d7-4ab1-aebc-a87871a5dcfa',
|
|
69
|
-
],
|
|
83
|
+
userGroupIds: ['c630d49e-4e7b-42ea-b2bc-edc0edacb6b1'],
|
|
70
84
|
},
|
|
71
85
|
{
|
|
72
86
|
id: '82e11d3d-b91d-43c9-9071-34d28e62e81d',
|
|
@@ -137,4 +151,4 @@ export const data = [
|
|
|
137
151
|
userGroupIds: ['c630d49e-4e7b-42ea-b2bc-edc0edacb6b1'],
|
|
138
152
|
},
|
|
139
153
|
];
|
|
140
|
-
export const umbUsersData = new
|
|
154
|
+
export const umbUsersData = new UmbUsersData(data);
|
|
@@ -125,8 +125,8 @@ export const handlers = [
|
|
|
125
125
|
const id = req.params.id;
|
|
126
126
|
if (!id)
|
|
127
127
|
return;
|
|
128
|
-
umbDictionaryData.delete([id]);
|
|
129
|
-
return res(ctx.status(200));
|
|
128
|
+
const deletedKeys = umbDictionaryData.delete([id]);
|
|
129
|
+
return res(ctx.status(200), ctx.json(deletedKeys));
|
|
130
130
|
}),
|
|
131
131
|
// TODO => handle properly, querystring breaks handler
|
|
132
132
|
rest.get('/umbraco/management/api/v1/dictionary/:id/export', (req, res, ctx) => {
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
const { rest } = window.MockServiceWorker;
|
|
2
2
|
import { umbMediaData } from '../data/media.data.js';
|
|
3
|
-
import { umbracoPath } from '../../shared/utils/index.js';
|
|
4
3
|
// TODO: add schema
|
|
5
4
|
export const handlers = [
|
|
6
|
-
rest.get(umbracoPath('/media/item'), (req, res, ctx) => {
|
|
7
|
-
const ids = req.url.searchParams.getAll('id');
|
|
8
|
-
if (!ids)
|
|
9
|
-
return;
|
|
10
|
-
const items = umbMediaData.getItems(ids);
|
|
11
|
-
return res(ctx.status(200), ctx.json(items));
|
|
12
|
-
}),
|
|
13
5
|
rest.get('/umbraco/management/api/v1/media/details/:id', (req, res, ctx) => {
|
|
14
6
|
console.warn('Please move to schema');
|
|
15
7
|
const id = req.params.id;
|
|
@@ -40,14 +40,14 @@ const detailHandlers = [
|
|
|
40
40
|
const path = req.url.searchParams.get('path');
|
|
41
41
|
if (!path)
|
|
42
42
|
return res(ctx.status(400));
|
|
43
|
-
umbPartialViewsData.delete([path]);
|
|
44
|
-
return res(ctx.status(200));
|
|
43
|
+
const response = umbPartialViewsData.delete([path]);
|
|
44
|
+
return res(ctx.status(200), ctx.json(response));
|
|
45
45
|
}),
|
|
46
46
|
rest.put(umbracoPath('/partial-view'), (req, res, ctx) => {
|
|
47
47
|
const requestBody = req.json();
|
|
48
48
|
if (!requestBody)
|
|
49
49
|
return res(ctx.status(400, 'no body found'));
|
|
50
|
-
umbPartialViewsData.updateData(requestBody);
|
|
50
|
+
const response = umbPartialViewsData.updateData(requestBody);
|
|
51
51
|
return res(ctx.status(200));
|
|
52
52
|
}),
|
|
53
53
|
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { rest } = window.MockServiceWorker;
|
|
2
|
+
import { umbUserGroupsData } from '../data/user-groups.data.js';
|
|
3
|
+
import { umbracoPath } from '../../shared/utils/index.js';
|
|
4
|
+
const slug = '/user-group';
|
|
5
|
+
export const handlers = [
|
|
6
|
+
rest.get(umbracoPath(`${slug}`), (req, res, ctx) => {
|
|
7
|
+
const response = umbUserGroupsData.getAll();
|
|
8
|
+
return res(ctx.status(200), ctx.json(response));
|
|
9
|
+
}),
|
|
10
|
+
rest.get(umbracoPath(`${slug}/:id`), (req, res, ctx) => {
|
|
11
|
+
const id = req.params.id;
|
|
12
|
+
if (!id)
|
|
13
|
+
return;
|
|
14
|
+
const userGroup = umbUserGroupsData.getById(id);
|
|
15
|
+
return res(ctx.status(200), ctx.json(userGroup));
|
|
16
|
+
}),
|
|
17
|
+
];
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
const { rest } = window.MockServiceWorker;
|
|
2
|
-
import { umbUsersData } from '../data/
|
|
2
|
+
import { umbUsersData } from '../data/users.data.js';
|
|
3
3
|
import { umbracoPath } from '../../shared/utils/index.js';
|
|
4
4
|
const slug = '/user';
|
|
5
5
|
export const handlers = [
|
|
6
|
-
rest.get(umbracoPath(`${slug}/item`), (req, res, ctx) => {
|
|
7
|
-
const ids = req.url.searchParams.getAll('id');
|
|
8
|
-
if (!ids)
|
|
9
|
-
return;
|
|
10
|
-
const items = umbUsersData.getItems(ids);
|
|
11
|
-
return res(ctx.status(200), ctx.json(items));
|
|
12
|
-
}),
|
|
13
|
-
rest.post(umbracoPath(`${slug}/set-user-groups`), async (req, res, ctx) => {
|
|
14
|
-
const data = await req.json();
|
|
15
|
-
if (!data)
|
|
16
|
-
return;
|
|
17
|
-
umbUsersData.setUserGroups(data);
|
|
18
|
-
return res(ctx.status(200));
|
|
19
|
-
}),
|
|
20
6
|
rest.get(umbracoPath(`${slug}/filter`), (req, res, ctx) => {
|
|
21
7
|
//TODO: Implementer filter
|
|
22
8
|
const response = umbUsersData.getAll();
|
|
@@ -42,7 +42,7 @@ export class UmbInputListBaseElement extends UmbLitElement {
|
|
|
42
42
|
}
|
|
43
43
|
renderButton() {
|
|
44
44
|
return html `<uui-button id="add-button" look="placeholder" @click=${this._openPicker} label="open">
|
|
45
|
-
|
|
45
|
+
Add
|
|
46
46
|
</uui-button>`;
|
|
47
47
|
}
|
|
48
48
|
renderContent() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UmbInputListBaseElement } from '../input-list-base/input-list-base.js';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class UmbInputPickerSectionElement extends UmbInputListBaseElement {
|
|
3
3
|
private _sections;
|
|
4
4
|
connectedCallback(): void;
|
|
5
5
|
private _observeSections;
|
|
@@ -9,6 +9,6 @@ export declare class UmbInputSectionElement extends UmbInputListBaseElement {
|
|
|
9
9
|
}
|
|
10
10
|
declare global {
|
|
11
11
|
interface HTMLElementTagNameMap {
|
|
12
|
-
'umb-input-section':
|
|
12
|
+
'umb-input-section': UmbInputPickerSectionElement;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -5,11 +5,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { UmbInputListBaseElement } from '../input-list-base/input-list-base.js';
|
|
8
|
-
import { UmbTextStyles } from
|
|
8
|
+
import { UmbTextStyles } from "../../../../shared/style/index.js";
|
|
9
9
|
import { css, html, nothing, customElement, state } from '../../../../external/lit/index.js';
|
|
10
10
|
import { UMB_SECTION_PICKER_MODAL } from '../../modal/index.js';
|
|
11
11
|
import { umbExtensionsRegistry } from '../../extension-registry/index.js';
|
|
12
|
-
export let
|
|
12
|
+
export let UmbInputPickerSectionElement = class UmbInputPickerSectionElement extends UmbInputListBaseElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this._sections = [];
|
|
@@ -84,7 +84,7 @@ export let UmbInputSectionElement = class UmbInputSectionElement extends UmbInpu
|
|
|
84
84
|
};
|
|
85
85
|
__decorate([
|
|
86
86
|
state()
|
|
87
|
-
],
|
|
88
|
-
|
|
87
|
+
], UmbInputPickerSectionElement.prototype, "_sections", void 0);
|
|
88
|
+
UmbInputPickerSectionElement = __decorate([
|
|
89
89
|
customElement('umb-input-section')
|
|
90
|
-
],
|
|
90
|
+
], UmbInputPickerSectionElement);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { SectionAliasConditionConfig } from './section-alias.condition.js';
|
|
2
2
|
import type { SwitchConditionConfig } from './switch.condition.js';
|
|
3
3
|
import type { WorkspaceAliasConditionConfig } from '../../workspace/index.js';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
export type ConditionTypes = SectionAliasConditionConfig | WorkspaceAliasConditionConfig | SwitchConditionConfig | UserPermissionConditionConfig | UmbConditionConfigBase;
|
|
4
|
+
import { UmbConditionConfigBase } from '../../../../libs/extension-api/index.js';
|
|
5
|
+
export type ConditionTypes = SectionAliasConditionConfig | WorkspaceAliasConditionConfig | SwitchConditionConfig | UmbConditionConfigBase;
|
|
@@ -28,8 +28,6 @@ import type { ManifestWorkspace } from './workspace.model.js';
|
|
|
28
28
|
import type { ManifestWorkspaceAction } from './workspace-action.model.js';
|
|
29
29
|
import type { ManifestWorkspaceEditorView } from './workspace-editor-view.model.js';
|
|
30
30
|
import type { ManifestWorkspaceViewCollection } from './workspace-view-collection.model.js';
|
|
31
|
-
import type { ManifestUserPermission } from './user-permission.model.js';
|
|
32
|
-
import type { ManifestUserGranularPermission } from './user-granular-permission.model.js';
|
|
33
31
|
import type { ManifestBase, ManifestBundle, ManifestCondition, ManifestEntryPoint } from '../../../../libs/extension-api/index.js';
|
|
34
32
|
export * from './collection-view.model.js';
|
|
35
33
|
export * from './dashboard-collection.model.js';
|
|
@@ -61,6 +59,4 @@ export * from './workspace-action.model.js';
|
|
|
61
59
|
export * from './workspace-view-collection.model.js';
|
|
62
60
|
export * from './workspace-editor-view.model.js';
|
|
63
61
|
export * from './workspace.model.js';
|
|
64
|
-
export
|
|
65
|
-
export * from './user-granular-permission.model.js';
|
|
66
|
-
export type ManifestTypes = ManifestBundle<ManifestTypes> | ManifestCondition | ManifestCollectionView | ManifestDashboard | ManifestDashboardCollection | ManifestEntityAction | ManifestEntityBulkAction | ManifestEntryPoint | ManifestExternalLoginProvider | ManifestGlobalContext | ManifestHeaderApp | ManifestHeaderAppButtonKind | ManifestHealthCheck | ManifestItemStore | ManifestMenu | ManifestMenuItem | ManifestMenuItemTreeKind | ManifestModal | ManifestPackageView | ManifestPropertyAction | ManifestPropertyEditorSchema | ManifestPropertyEditorUi | ManifestRepository | ManifestSection | ManifestSectionSidebarApp | ManifestSectionSidebarAppMenuKind | ManifestSectionView | ManifestStore | ManifestTheme | ManifestTinyMcePlugin | ManifestLocalization | ManifestTree | ManifestTreeItem | ManifestTreeStore | ManifestUserProfileApp | ManifestWorkspace | ManifestWorkspaceAction | ManifestWorkspaceEditorView | ManifestWorkspaceViewCollection | ManifestUserPermission | ManifestUserGranularPermission | ManifestBase;
|
|
62
|
+
export type ManifestTypes = ManifestBundle<ManifestTypes> | ManifestCondition | ManifestCollectionView | ManifestDashboard | ManifestDashboardCollection | ManifestEntityAction | ManifestEntityBulkAction | ManifestEntryPoint | ManifestExternalLoginProvider | ManifestGlobalContext | ManifestHeaderApp | ManifestHeaderAppButtonKind | ManifestHealthCheck | ManifestItemStore | ManifestMenu | ManifestMenuItem | ManifestMenuItemTreeKind | ManifestModal | ManifestPackageView | ManifestPropertyAction | ManifestPropertyEditorSchema | ManifestPropertyEditorUi | ManifestRepository | ManifestSection | ManifestSectionSidebarApp | ManifestSectionSidebarAppMenuKind | ManifestSectionView | ManifestStore | ManifestTheme | ManifestTinyMcePlugin | ManifestLocalization | ManifestTree | ManifestTreeItem | ManifestTreeStore | ManifestUserProfileApp | ManifestWorkspace | ManifestWorkspaceAction | ManifestWorkspaceEditorView | ManifestWorkspaceViewCollection | ManifestBase;
|
|
@@ -28,5 +28,3 @@ export * from './workspace-action.model.js';
|
|
|
28
28
|
export * from './workspace-view-collection.model.js';
|
|
29
29
|
export * from './workspace-editor-view.model.js';
|
|
30
30
|
export * from './workspace.model.js';
|
|
31
|
-
export * from './user-permission.model.js';
|
|
32
|
-
export * from './user-granular-permission.model.js';
|
|
@@ -31,7 +31,7 @@ export let UmbLocalizeElement = class UmbLocalizeElement extends UmbLitElement {
|
|
|
31
31
|
return localizedValue;
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return this.text
|
|
34
|
+
return this.text
|
|
35
35
|
? html `${unsafeHTML(this.text)}`
|
|
36
36
|
: this.debug
|
|
37
37
|
? html `<span style="color:red">${this.key}</span>`
|
|
@@ -59,11 +59,5 @@ const modals = [
|
|
|
59
59
|
name: 'Tree Picker Modal',
|
|
60
60
|
loader: () => import('./tree-picker/tree-picker-modal.element.js'),
|
|
61
61
|
},
|
|
62
|
-
{
|
|
63
|
-
type: 'modal',
|
|
64
|
-
alias: 'Umb.Modal.EntityUserPermissionSettings',
|
|
65
|
-
name: 'Entity User Permission Settings Modal',
|
|
66
|
-
loader: () => import('./entity-user-permission-settings/entity-user-permission-settings-modal.element.js'),
|
|
67
|
-
},
|
|
68
62
|
];
|
|
69
63
|
export const manifests = [...modals];
|
|
@@ -4,10 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, customElement, state } from '../../../../../external/lit/index.js';
|
|
8
|
-
import { UmbTextStyles } from
|
|
7
|
+
import { css, html, customElement, state } from '../../../../../external/lit/index.js';
|
|
8
|
+
import { UmbTextStyles } from "../../../../../shared/style/index.js";
|
|
9
9
|
import { UmbModalBaseElement } from '../../../../../shared/modal/index.js';
|
|
10
|
-
import { UmbSelectedEvent } from '../../../../../shared/umb-events/index.js';
|
|
11
10
|
export let UmbTreePickerModalElement = class UmbTreePickerModalElement extends UmbModalBaseElement {
|
|
12
11
|
constructor() {
|
|
13
12
|
super(...arguments);
|
|
@@ -23,7 +22,6 @@ export let UmbTreePickerModalElement = class UmbTreePickerModalElement extends U
|
|
|
23
22
|
e.stopPropagation();
|
|
24
23
|
const element = e.target;
|
|
25
24
|
this._selection = element.selection;
|
|
26
|
-
this.dispatchEvent(new UmbSelectedEvent());
|
|
27
25
|
}
|
|
28
26
|
#submit() {
|
|
29
27
|
this.modalContext?.submit({ selection: this._selection });
|
|
@@ -50,7 +48,7 @@ export let UmbTreePickerModalElement = class UmbTreePickerModalElement extends U
|
|
|
50
48
|
</umb-body-layout>
|
|
51
49
|
`;
|
|
52
50
|
}
|
|
53
|
-
static { this.styles = [UmbTextStyles]; }
|
|
51
|
+
static { this.styles = [UmbTextStyles, css ``]; }
|
|
54
52
|
};
|
|
55
53
|
__decorate([
|
|
56
54
|
state()
|
|
@@ -33,4 +33,3 @@ export * from './data-type-picker-modal.token.js';
|
|
|
33
33
|
export * from './workspace-modal.token.js';
|
|
34
34
|
export * from './data-type-picker-flow-modal.token.js';
|
|
35
35
|
export * from './data-type-picker-flow-data-type-picker-modal.token.js';
|
|
36
|
-
export * from './entity-user-permission-settings-modal.token.js';
|
|
@@ -33,4 +33,3 @@ export * from './data-type-picker-modal.token.js';
|
|
|
33
33
|
export * from './workspace-modal.token.js';
|
|
34
34
|
export * from './data-type-picker-flow-modal.token.js';
|
|
35
35
|
export * from './data-type-picker-flow-data-type-picker-modal.token.js';
|
|
36
|
-
export * from './entity-user-permission-settings-modal.token.js';
|
|
@@ -48,6 +48,9 @@ export class UmbPickerInputContext {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
async requestRemoveItem(unique) {
|
|
51
|
+
await this.#init;
|
|
52
|
+
if (!this.repository)
|
|
53
|
+
throw new Error('Repository is not initialized');
|
|
51
54
|
// TODO: id won't always be available on the model, so we need to get the unique property from somewhere. Maybe the repository?
|
|
52
55
|
const item = this.#itemManager.getItems().find((item) => this.#getUnique(item) === unique);
|
|
53
56
|
if (!item)
|
|
@@ -64,6 +67,5 @@ export class UmbPickerInputContext {
|
|
|
64
67
|
#removeItem(unique) {
|
|
65
68
|
const newSelection = this.getSelection().filter((value) => value !== unique);
|
|
66
69
|
this.setSelection(newSelection);
|
|
67
|
-
this.host.dispatchEvent(new UmbChangeEvent());
|
|
68
70
|
}
|
|
69
71
|
}
|
|
@@ -3,7 +3,6 @@ import { UmbBooleanState } from '../../../libs/observable-api/index.js';
|
|
|
3
3
|
import { UmbBaseController } from '../../../libs/controller-api/index.js';
|
|
4
4
|
import { createExtensionClass } from '../../../libs/extension-api/index.js';
|
|
5
5
|
import { UmbSelectionManagerBase } from '../../../shared/utils/index.js';
|
|
6
|
-
import { UmbSelectedEvent } from '../../../shared/umb-events/index.js';
|
|
7
6
|
export class UmbTreeContextBase extends UmbBaseController {
|
|
8
7
|
#selectionManager;
|
|
9
8
|
#selectable;
|
|
@@ -63,11 +62,11 @@ export class UmbTreeContextBase extends UmbBaseController {
|
|
|
63
62
|
if (!this.getSelectable())
|
|
64
63
|
return;
|
|
65
64
|
this.#selectionManager.select(unique);
|
|
66
|
-
this._host.getHostElement().dispatchEvent(new
|
|
65
|
+
this._host.getHostElement().dispatchEvent(new CustomEvent('selected'));
|
|
67
66
|
}
|
|
68
67
|
deselect(unique) {
|
|
69
68
|
this.#selectionManager.deselect(unique);
|
|
70
|
-
this._host.getHostElement().dispatchEvent(new
|
|
69
|
+
this._host.getHostElement().dispatchEvent(new CustomEvent('selected'));
|
|
71
70
|
}
|
|
72
71
|
async requestTreeRoot() {
|
|
73
72
|
await this.#init;
|
package/dist-cms/packages/documents/documents/components/input-document/input-document.element.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
2
2
|
declare const UmbInputDocumentElement_base: (new (...args: any[]) => import("../../../../../external/uui/index.js").FormControlMixinInterface) & typeof UmbLitElement;
|
|
3
3
|
export declare class UmbInputDocumentElement extends UmbInputDocumentElement_base {
|
|
4
|
-
#private;
|
|
5
4
|
/**
|
|
6
5
|
* This is a minimum amount of selected items in this input.
|
|
7
6
|
* @type {number}
|
|
8
7
|
* @attr
|
|
9
|
-
* @default
|
|
8
|
+
* @default undefined
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
|
-
set min(value: number);
|
|
10
|
+
min?: number;
|
|
13
11
|
/**
|
|
14
12
|
* Min validation message.
|
|
15
13
|
* @type {boolean}
|
|
@@ -21,10 +19,9 @@ export declare class UmbInputDocumentElement extends UmbInputDocumentElement_bas
|
|
|
21
19
|
* This is a maximum amount of selected items in this input.
|
|
22
20
|
* @type {number}
|
|
23
21
|
* @attr
|
|
24
|
-
* @default
|
|
22
|
+
* @default undefined
|
|
25
23
|
*/
|
|
26
|
-
|
|
27
|
-
set max(value: number);
|
|
24
|
+
max?: number;
|
|
28
25
|
/**
|
|
29
26
|
* Max validation message.
|
|
30
27
|
* @type {boolean}
|
|
@@ -32,12 +29,20 @@ export declare class UmbInputDocumentElement extends UmbInputDocumentElement_bas
|
|
|
32
29
|
* @default
|
|
33
30
|
*/
|
|
34
31
|
maxMessage: string;
|
|
32
|
+
private _selectedIds;
|
|
35
33
|
get selectedIds(): Array<string>;
|
|
36
34
|
set selectedIds(ids: Array<string>);
|
|
37
35
|
set value(idsString: string);
|
|
38
36
|
private _items?;
|
|
37
|
+
private _modalContext?;
|
|
38
|
+
private _documentStore?;
|
|
39
|
+
private _pickedItemsObserver?;
|
|
39
40
|
constructor();
|
|
40
41
|
protected getFormElement(): undefined;
|
|
42
|
+
private _observePickedDocuments;
|
|
43
|
+
private _openPicker;
|
|
44
|
+
private _removeItem;
|
|
45
|
+
private _setSelection;
|
|
41
46
|
render(): import("lit-html").TemplateResult<1>;
|
|
42
47
|
private _renderItem;
|
|
43
48
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|