@umbraco-cms/backoffice 14.0.0-40e04294 → 14.0.0-43239cee
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 +0 -3
- package/dist-cms/assets/lang/da-dk.js +3 -0
- package/dist-cms/assets/lang/da-dk.ts +3 -0
- package/dist-cms/assets/lang/en-us.js +21 -18
- package/dist-cms/assets/lang/en-us.ts +21 -18
- package/dist-cms/custom-elements.json +288 -19
- 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 +1 -9
- package/dist-cms/mocks/data/media.data.d.ts +2 -1
- package/dist-cms/mocks/data/media.data.js +11 -0
- package/dist-cms/mocks/data/user-group.data.d.ts +17 -0
- package/dist-cms/mocks/data/user-group.data.js +61 -0
- package/dist-cms/mocks/data/user.data.d.ts +15 -0
- package/dist-cms/mocks/data/{users.data.js → user.data.js} +27 -41
- package/dist-cms/mocks/handlers/dictionary.handlers.js +2 -2
- package/dist-cms/mocks/handlers/media.handlers.js +8 -0
- package/dist-cms/mocks/handlers/partial-views.handlers.js +3 -3
- package/dist-cms/mocks/handlers/user-group/collection.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/user-group/collection.handlers.js +10 -0
- package/dist-cms/mocks/handlers/user-group/detail.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/user-group/detail.handlers.js +37 -0
- package/dist-cms/mocks/handlers/user-group/index.js +4 -0
- package/dist-cms/mocks/handlers/user-group/item.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/user-group/item.handlers.js +13 -0
- package/dist-cms/mocks/handlers/user-group/slug.d.ts +1 -0
- package/dist-cms/mocks/handlers/user-group/slug.js +1 -0
- package/dist-cms/mocks/handlers/user.handlers.js +15 -1
- 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 +3 -2
- package/dist-cms/packages/core/extension-registry/models/index.d.ts +5 -1
- package/dist-cms/packages/core/extension-registry/models/index.js +2 -0
- package/dist-cms/packages/core/extension-registry/models/user-granular-permission.model.d.ts +8 -0
- package/dist-cms/packages/core/extension-registry/models/user-granular-permission.model.js +1 -0
- package/dist-cms/packages/core/extension-registry/models/user-permission.model.d.ts +11 -0
- package/dist-cms/packages/core/extension-registry/models/user-permission.model.js +1 -0
- package/dist-cms/packages/core/localization/index.d.ts +3 -0
- package/dist-cms/packages/core/localization/index.js +3 -0
- package/dist-cms/packages/core/localization/localize-date.element.d.ts +28 -0
- package/dist-cms/packages/core/localization/localize-date.element.js +42 -0
- package/dist-cms/packages/core/localization/localize-number.element.d.ts +28 -0
- package/dist-cms/packages/core/localization/localize-number.element.js +42 -0
- package/dist-cms/packages/core/localization/localize-relative-time.element.d.ts +34 -0
- package/dist-cms/packages/core/localization/localize-relative-time.element.js +54 -0
- package/dist-cms/packages/core/localization/localize.element.js +1 -1
- package/dist-cms/packages/core/modal/common/entity-user-permission-settings/entity-user-permission-settings-modal.element.d.ts +19 -0
- package/dist-cms/packages/core/modal/common/entity-user-permission-settings/entity-user-permission-settings-modal.element.js +97 -0
- package/dist-cms/packages/core/modal/common/manifests.js +6 -0
- package/dist-cms/packages/core/modal/common/tree-picker/tree-picker-modal.element.js +5 -3
- package/dist-cms/packages/core/modal/token/entity-user-permission-settings-modal.token.d.ts +7 -0
- package/dist-cms/packages/core/modal/token/entity-user-permission-settings-modal.token.js +4 -0
- package/dist-cms/packages/core/modal/token/index.d.ts +1 -0
- package/dist-cms/packages/core/modal/token/index.js +1 -0
- package/dist-cms/packages/core/picker-input/picker-input.context.js +1 -3
- package/dist-cms/packages/core/tree/tree.context.js +3 -2
- package/dist-cms/packages/documents/documents/components/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/components/index.js +1 -0
- package/dist-cms/packages/documents/documents/components/input-document/input-document.context.d.ts +6 -0
- package/dist-cms/packages/documents/documents/components/input-document/input-document.context.js +7 -0
- package/dist-cms/packages/documents/documents/components/input-document/input-document.element.d.ts +7 -12
- package/dist-cms/packages/documents/documents/components/input-document/input-document.element.js +51 -64
- package/dist-cms/packages/documents/documents/components/input-document-granular-permission/input-document-granular-permission.element.d.ts +23 -0
- package/dist-cms/packages/documents/documents/components/input-document-granular-permission/input-document-granular-permission.element.js +102 -0
- package/dist-cms/packages/documents/documents/entity-actions/create/manifests.js +9 -0
- package/dist-cms/packages/documents/documents/entity-actions/manifests.js +1 -1
- package/dist-cms/packages/documents/documents/entity-actions/permissions.action.d.ts +2 -1
- package/dist-cms/packages/documents/documents/entity-actions/permissions.action.js +22 -2
- package/dist-cms/packages/documents/documents/index.d.ts +2 -0
- package/dist-cms/packages/documents/documents/index.js +2 -0
- package/dist-cms/packages/documents/documents/manifests.d.ts +4 -0
- package/dist-cms/packages/documents/documents/manifests.js +2 -0
- package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.d.ts +4 -0
- package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.js +6 -0
- package/dist-cms/packages/documents/documents/recycle-bin/manifests.d.ts +4 -0
- package/dist-cms/packages/documents/documents/repository/document.repository.js +4 -4
- package/dist-cms/packages/documents/documents/repository/manifests.d.ts +3 -2
- package/dist-cms/packages/documents/documents/repository/manifests.js +9 -1
- package/dist-cms/packages/documents/documents/user-permissions/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/user-permissions/index.js +1 -0
- package/dist-cms/packages/documents/documents/user-permissions/manifests.d.ts +19 -0
- package/dist-cms/packages/documents/documents/user-permissions/manifests.js +196 -0
- package/dist-cms/packages/documents/documents/workspace/views/info/document-info-workspace-view.element.js +29 -28
- package/dist-cms/packages/documents/manifests.d.ts +4 -0
- 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 +2 -1
- package/dist-cms/packages/media/manifests.js +1 -0
- package/dist-cms/packages/media/media/components/index.d.ts +1 -0
- package/dist-cms/packages/media/media/components/index.js +1 -0
- package/dist-cms/packages/media/media/components/input-media/input-media.context.d.ts +6 -0
- package/dist-cms/packages/media/media/components/input-media/input-media.context.js +7 -0
- package/dist-cms/packages/media/media/components/input-media/input-media.element.d.ts +7 -15
- package/dist-cms/packages/media/media/components/input-media/input-media.element.js +50 -72
- package/dist-cms/packages/media/media/index.d.ts +2 -0
- 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 +2 -0
- package/dist-cms/packages/media/media/repository/manifests.d.ts +3 -2
- package/dist-cms/packages/media/media/repository/manifests.js +9 -1
- package/dist-cms/packages/media/media/repository/media-item.store.d.ts +20 -0
- package/dist-cms/packages/media/media/repository/media-item.store.js +23 -0
- package/dist-cms/packages/media/media/repository/media.repository.d.ts +6 -0
- package/dist-cms/packages/media/media/repository/media.repository.js +22 -0
- package/dist-cms/packages/media/media/repository/sources/media-item.server.data.d.ts +24 -0
- package/dist-cms/packages/media/media/repository/sources/media-item.server.data.js +31 -0
- package/dist-cms/packages/media/media/user-permissions/index.d.ts +1 -0
- package/dist-cms/packages/media/media/user-permissions/index.js +1 -0
- package/dist-cms/packages/media/media/user-permissions/manifests.d.ts +4 -0
- package/dist-cms/packages/media/media/user-permissions/manifests.js +27 -0
- package/dist-cms/packages/users/current-user/conditions/index.d.ts +1 -0
- package/dist-cms/packages/users/current-user/conditions/index.js +1 -0
- package/dist-cms/packages/users/current-user/conditions/user-permission.condition.d.ts +18 -0
- package/dist-cms/packages/users/current-user/conditions/user-permission.condition.js +23 -0
- package/dist-cms/packages/users/current-user/index.d.ts +1 -0
- package/dist-cms/packages/users/current-user/index.js +1 -0
- package/dist-cms/packages/users/current-user/manifests.js +7 -1
- 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 +4 -2
- package/dist-cms/packages/users/index.js +4 -2
- package/dist-cms/packages/users/manifests.d.ts +2 -0
- package/dist-cms/packages/users/manifests.js +3 -0
- 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 +1 -0
- package/dist-cms/packages/users/user-groups/components/index.js +1 -0
- package/dist-cms/packages/users/user-groups/entity-actions/manifests.d.ts +2 -0
- package/dist-cms/packages/users/user-groups/entity-actions/manifests.js +19 -0
- package/dist-cms/packages/users/user-groups/index.d.ts +2 -0
- package/dist-cms/packages/users/user-groups/index.js +2 -0
- package/dist-cms/packages/users/user-groups/manifests.d.ts +1 -1
- package/dist-cms/packages/users/user-groups/manifests.js +2 -0
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-default-permission-list.element.d.ts +16 -0
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-default-permission-list.element.js +69 -0
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-granular-permission-list.element.d.ts +14 -0
- package/dist-cms/packages/users/user-groups/workspace/components/user-group-granular-permission-list.element.js +31 -0
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace-editor.element.d.ts +2 -0
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace-editor.element.js +57 -56
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace.context.d.ts +12 -0
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace.context.js +20 -0
- 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 +18 -11
- 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 +3 -0
- package/dist-cms/packages/users/users/components/index.js +3 -0
- package/dist-cms/packages/users/users/components/user-input/user-input.element.js +2 -2
- package/dist-cms/packages/users/users/components/user-permission-setting/user-permission-setting.element.d.ts +15 -0
- package/dist-cms/packages/users/users/components/user-permission-setting/user-permission-setting.element.js +66 -0
- package/dist-cms/packages/users/users/index.d.ts +2 -0
- package/dist-cms/packages/users/users/index.js +2 -0
- package/dist-cms/packages/users/users/modals/user-picker/user-picker-modal.element.d.ts +3 -1
- package/dist-cms/packages/users/users/modals/user-picker/user-picker-modal.element.js +20 -25
- package/dist-cms/packages/users/users/repository/index.d.ts +1 -0
- package/dist-cms/packages/users/users/repository/index.js +1 -0
- package/dist-cms/packages/users/users/repository/user.repository.js +1 -1
- package/dist-cms/packages/users/users/workspace/user-workspace-editor.element.js +73 -56
- package/dist-cms/packages/users/utils.d.ts +5 -2
- package/dist-cms/packages/users/utils.js +14 -14
- package/dist-cms/shared/auth/auth-flow.d.ts +0 -4
- package/dist-cms/shared/auth/auth-flow.js +6 -25
- package/dist-cms/shared/repository/repository-items.manager.js +5 -0
- package/dist-cms/shared/umb-events/index.d.ts +1 -0
- package/dist-cms/shared/umb-events/index.js +1 -0
- package/dist-cms/shared/umb-events/selected.event.d.ts +3 -0
- package/dist-cms/shared/umb-events/selected.event.js +6 -0
- package/dist-cms/tinymce/CHANGELOG.md +48 -0
- 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 +63 -8
- package/dist-cms/tinymce/plugins/lists/plugin.min.js +2 -2
- package/dist-cms/tinymce/plugins/media/plugin.js +3 -23
- 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 +13 -4
- 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 +51 -11
- 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 +54 -14
- 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 +51 -11
- 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 +51 -11
- package/dist-cms/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/dist-cms/tinymce/themes/silver/theme.js +158 -55
- package/dist-cms/tinymce/themes/silver/theme.min.js +2 -2
- package/dist-cms/tinymce/tinymce.d.ts +4 -6
- package/dist-cms/tinymce/tinymce.js +911 -691
- package/dist-cms/tinymce/tinymce.min.js +2 -2
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package-schema.json +154 -0
- package/dist-cms/vscode-html-custom-data.json +167 -18
- package/package.json +2 -2
- package/dist-cms/mocks/data/user-groups.data.d.ts +0 -9
- package/dist-cms/mocks/data/user-groups.data.js +0 -21
- package/dist-cms/mocks/data/users.data.d.ts +0 -16
- package/dist-cms/mocks/handlers/user-group.handlers.js +0 -17
- /package/dist-cms/mocks/handlers/{user-group.handlers.d.ts → user-group/index.d.ts} +0 -0
package/dist-cms/packages/users/user-groups/workspace/user-group-workspace-editor.element.js
CHANGED
|
@@ -4,17 +4,16 @@ 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 { UMB_USER_GROUP_ENTITY_TYPE } from '../index.js';
|
|
7
8
|
import { UMB_USER_GROUP_WORKSPACE_CONTEXT } from './user-group-workspace.context.js';
|
|
8
9
|
import { UUIInputEvent } from '../../../../external/uui/index.js';
|
|
9
10
|
import { css, html, nothing, customElement, state } from '../../../../external/lit/index.js';
|
|
10
|
-
// TODO: import from package when available
|
|
11
|
-
//import { UmbUserInputElement } from '../../users/components/user-input/user-input.element.js';
|
|
12
11
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
13
|
-
import { UMB_CONFIRM_MODAL, UMB_MODAL_MANAGER_CONTEXT_TOKEN, } from '../../../core/modal/index.js';
|
|
14
12
|
import { UmbTextStyles } from '../../../../shared/style/index.js';
|
|
13
|
+
import './components/user-group-default-permission-list.element.js';
|
|
14
|
+
import './components/user-group-granular-permission-list.element.js';
|
|
15
15
|
export let UmbUserGroupWorkspaceEditorElement = class UmbUserGroupWorkspaceEditorElement extends UmbLitElement {
|
|
16
16
|
#workspaceContext;
|
|
17
|
-
#modalContext;
|
|
18
17
|
constructor() {
|
|
19
18
|
super();
|
|
20
19
|
this.consumeContext(UMB_USER_GROUP_WORKSPACE_CONTEXT, (instance) => {
|
|
@@ -22,31 +21,26 @@ export let UmbUserGroupWorkspaceEditorElement = class UmbUserGroupWorkspaceEdito
|
|
|
22
21
|
this.observe(this.#workspaceContext.data, (userGroup) => (this._userGroup = userGroup));
|
|
23
22
|
this.observe(this.#workspaceContext.userIds, (userKeys) => (this._userKeys = userKeys));
|
|
24
23
|
});
|
|
25
|
-
this.consumeContext(UMB_MODAL_MANAGER_CONTEXT_TOKEN, (instance) => {
|
|
26
|
-
this.#modalContext = instance;
|
|
27
|
-
});
|
|
28
24
|
}
|
|
29
|
-
#
|
|
30
|
-
|
|
25
|
+
#onSectionsChange(event) {
|
|
26
|
+
event.stopPropagation();
|
|
27
|
+
const target = event.target;
|
|
28
|
+
this.#workspaceContext?.updateProperty('sections', target.value);
|
|
31
29
|
}
|
|
32
|
-
#
|
|
33
|
-
|
|
30
|
+
#onDocumentStartNodeChange(event) {
|
|
31
|
+
event.stopPropagation();
|
|
32
|
+
const target = event.target;
|
|
33
|
+
this.#workspaceContext?.updateProperty('documentStartNodeId', target.selectedIds[0]);
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
await modalContext.onSubmit();
|
|
45
|
-
if (!this._userGroup || !this._userGroup.id)
|
|
46
|
-
return;
|
|
47
|
-
await this.#workspaceContext.delete(this._userGroup?.id);
|
|
48
|
-
//TODO: should we check if it actually succeeded in deleting the user group?
|
|
49
|
-
history.pushState(null, '', 'section/users/view/user-groups');
|
|
35
|
+
#onMediaStartNodeChange(event) {
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
const target = event.target;
|
|
38
|
+
this.#workspaceContext?.updateProperty('mediaStartNodeId', target.selectedIds[0]);
|
|
39
|
+
}
|
|
40
|
+
#onUsersChange(event) {
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
const target = event.target;
|
|
43
|
+
this.#workspaceContext?.updateUserKeys(target.selectedIds);
|
|
50
44
|
}
|
|
51
45
|
#onNameChange(event) {
|
|
52
46
|
if (event instanceof UUIInputEvent) {
|
|
@@ -77,7 +71,7 @@ export let UmbUserGroupWorkspaceEditorElement = class UmbUserGroupWorkspaceEdito
|
|
|
77
71
|
</a>
|
|
78
72
|
<uui-input
|
|
79
73
|
id="name"
|
|
80
|
-
label
|
|
74
|
+
label=${this.localize.term('general_name')}
|
|
81
75
|
.value=${this._userGroup?.name ?? ''}
|
|
82
76
|
@input="${this.#onNameChange}"></uui-input>
|
|
83
77
|
</div>
|
|
@@ -86,53 +80,60 @@ export let UmbUserGroupWorkspaceEditorElement = class UmbUserGroupWorkspaceEdito
|
|
|
86
80
|
#renderLeftColumn() {
|
|
87
81
|
if (!this._userGroup)
|
|
88
82
|
return nothing;
|
|
89
|
-
return html `
|
|
90
|
-
|
|
91
|
-
<
|
|
83
|
+
return html `
|
|
84
|
+
<uui-box>
|
|
85
|
+
<div slot="headline"><umb-localize key="user_assignAccess"></umb-localize></div>
|
|
86
|
+
<umb-workspace-property-layout
|
|
87
|
+
label=${this.localize.term('main_sections')}
|
|
88
|
+
description=${this.localize.term('user_sectionsHelp')}>
|
|
92
89
|
<umb-input-section
|
|
93
90
|
slot="editor"
|
|
94
91
|
.value=${this._userGroup.sections ?? []}
|
|
95
|
-
@change=${
|
|
92
|
+
@change=${this.#onSectionsChange}></umb-input-section>
|
|
96
93
|
</umb-workspace-property-layout>
|
|
97
94
|
<umb-workspace-property-layout
|
|
98
|
-
label
|
|
99
|
-
description
|
|
100
|
-
<
|
|
95
|
+
label=${this.localize.term('defaultdialogs_selectContentStartNode')}
|
|
96
|
+
description=${this.localize.term('user_startnodehelp')}>
|
|
97
|
+
<umb-input-document
|
|
98
|
+
slot="editor"
|
|
99
|
+
max="1"
|
|
100
|
+
.selectedIds=${this._userGroup.documentStartNodeId ? [this._userGroup.documentStartNodeId] : []}
|
|
101
|
+
@change=${this.#onDocumentStartNodeChange}></umb-input-document>
|
|
101
102
|
</umb-workspace-property-layout>
|
|
102
103
|
<umb-workspace-property-layout
|
|
103
|
-
label
|
|
104
|
-
description
|
|
105
|
-
<
|
|
104
|
+
label=${this.localize.term('defaultdialogs_selectMediaStartNode')}
|
|
105
|
+
description=${this.localize.term('user_mediastartnodehelp')}>
|
|
106
|
+
<umb-input-media
|
|
107
|
+
slot="editor"
|
|
108
|
+
max="1"
|
|
109
|
+
.selectedIds=${this._userGroup.mediaStartNodeId ? [this._userGroup.mediaStartNodeId] : []}
|
|
110
|
+
@change=${this.#onMediaStartNodeChange}></umb-input-media>
|
|
106
111
|
</umb-workspace-property-layout>
|
|
107
112
|
</uui-box>
|
|
108
113
|
|
|
109
114
|
<uui-box>
|
|
110
|
-
<div slot="headline"
|
|
111
|
-
<
|
|
115
|
+
<div slot="headline"><umb-localize key="user_permissionsDefault"></umb-localize></div>
|
|
116
|
+
<umb-user-group-default-permission-list></umb-user-group-default-permission-list>
|
|
112
117
|
</uui-box>
|
|
113
118
|
|
|
119
|
+
<!-- Temp disabled because it is work in progress
|
|
114
120
|
<uui-box>
|
|
115
|
-
<div slot="headline"
|
|
116
|
-
<
|
|
117
|
-
</uui-box
|
|
121
|
+
<div slot="headline"><umb-localize key="user_permissionsGranular"></umb-localize></div>
|
|
122
|
+
<umb-user-group-granular-permission-list></umb-user-group-granular-permission-list>
|
|
123
|
+
</uui-box>
|
|
124
|
+
-->
|
|
125
|
+
`;
|
|
118
126
|
}
|
|
119
127
|
#renderRightColumn() {
|
|
120
128
|
return html `<uui-box>
|
|
121
|
-
<div slot="headline"
|
|
122
|
-
|
|
123
|
-
<umb-user-input
|
|
124
|
-
@change=${(e) => this.#onUsersChange(e.target.selectedIds)}
|
|
125
|
-
.selectedIds=${this._userKeys ?? []}></umb-user-input>
|
|
129
|
+
<div slot="headline"><umb-localize key="sections_users"></umb-localize></div>
|
|
130
|
+
<umb-user-input @change=${this.#onUsersChange} .selectedIds=${this._userKeys ?? []}></umb-user-input>
|
|
126
131
|
</uui-box>
|
|
127
|
-
<uui-box>
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
color="danger"
|
|
133
|
-
look="secondary"
|
|
134
|
-
label="Delete"></uui-button>
|
|
135
|
-
</uui-box>`;
|
|
132
|
+
<uui-box headline="Actions">
|
|
133
|
+
<umb-entity-action-list
|
|
134
|
+
.entityType=${UMB_USER_GROUP_ENTITY_TYPE}
|
|
135
|
+
.unique=${this._userGroup?.id}></umb-entity-action-list
|
|
136
|
+
></uui-box>`;
|
|
136
137
|
}
|
|
137
138
|
static { this.styles = [
|
|
138
139
|
UmbTextStyles,
|
|
@@ -20,5 +20,17 @@ export declare class UmbUserGroupWorkspaceContext extends UmbWorkspaceContext<Um
|
|
|
20
20
|
delete(id: string): Promise<void>;
|
|
21
21
|
updateProperty<Alias extends keyof UserGroupResponseModel>(alias: Alias, value: UserGroupResponseModel[Alias]): void;
|
|
22
22
|
updateUserKeys(keys: Array<string>): void;
|
|
23
|
+
/**
|
|
24
|
+
* Adds a permission to the user group permission array.
|
|
25
|
+
* @param {string} permissionAlias
|
|
26
|
+
* @memberof UmbUserGroupWorkspaceContext
|
|
27
|
+
*/
|
|
28
|
+
addPermission(permissionAlias: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Removes a permission from the user group permission array.
|
|
31
|
+
* @param {string} permissionAlias
|
|
32
|
+
* @memberof UmbUserGroupWorkspaceContext
|
|
33
|
+
*/
|
|
34
|
+
removePermission(permissionAlias: string): void;
|
|
23
35
|
}
|
|
24
36
|
export declare const UMB_USER_GROUP_WORKSPACE_CONTEXT: UmbContextToken<UmbSaveableWorkspaceContextInterface<unknown>, UmbUserGroupWorkspaceContext>;
|
|
@@ -83,5 +83,25 @@ export class UmbUserGroupWorkspaceContext extends UmbWorkspaceContext {
|
|
|
83
83
|
updateUserKeys(keys) {
|
|
84
84
|
this.#userIds.next(keys);
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Adds a permission to the user group permission array.
|
|
88
|
+
* @param {string} permissionAlias
|
|
89
|
+
* @memberof UmbUserGroupWorkspaceContext
|
|
90
|
+
*/
|
|
91
|
+
addPermission(permissionAlias) {
|
|
92
|
+
const permissions = this.#data.getValue()?.permissions ?? [];
|
|
93
|
+
const newValue = [...permissions, permissionAlias];
|
|
94
|
+
this.#data.update({ permissions: newValue });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Removes a permission from the user group permission array.
|
|
98
|
+
* @param {string} permissionAlias
|
|
99
|
+
* @memberof UmbUserGroupWorkspaceContext
|
|
100
|
+
*/
|
|
101
|
+
removePermission(permissionAlias) {
|
|
102
|
+
const permissions = this.#data.getValue()?.permissions ?? [];
|
|
103
|
+
const newValue = permissions.filter((alias) => alias !== permissionAlias);
|
|
104
|
+
this.#data.update({ permissions: newValue });
|
|
105
|
+
}
|
|
86
106
|
}
|
|
87
107
|
export const UMB_USER_GROUP_WORKSPACE_CONTEXT = new UmbContextToken('UmbWorkspaceContext', (context) => context.getEntityType?.() === 'user-group');
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { UmbUserGroupWorkspaceContext } from './user-group-workspace.context.js';
|
|
8
8
|
import { UmbUserGroupWorkspaceEditorElement } from './user-group-workspace-editor.element.js';
|
|
9
|
-
import { UmbTextStyles } from
|
|
9
|
+
import { UmbTextStyles } from '../../../../shared/style/index.js';
|
|
10
10
|
import { html, customElement, state } from '../../../../external/lit/index.js';
|
|
11
11
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
12
12
|
import { UmbWorkspaceIsNewRedirectController } from '../../../core/workspace/index.js';
|
|
@@ -85,18 +85,19 @@ export let UmbUserCollectionHeaderElement = class UmbUserCollectionHeaderElement
|
|
|
85
85
|
return html `
|
|
86
86
|
<uui-button
|
|
87
87
|
@click=${this._showInviteOrCreate}
|
|
88
|
-
label=${this._isCloud ? '
|
|
88
|
+
label=${this.localize.term(this._isCloud ? 'user_inviteUser' : 'user_createUser')}
|
|
89
89
|
look="outline"></uui-button>
|
|
90
|
-
<uui-input @input=${this._updateSearch} label
|
|
90
|
+
<uui-input @input=${this._updateSearch} label=${this.localize.term('visuallyHiddenTexts_userSearchLabel')} placeholder=${this.localize.term('visuallyHiddenTexts_userSearchLabel')} id="input-search"></uui-input>
|
|
91
91
|
<div>
|
|
92
92
|
<!-- TODO: we should consider using the uui-combobox. We need to add a multiple options to it first -->
|
|
93
93
|
<umb-dropdown margin="8">
|
|
94
94
|
<uui-button @click=${this.#onDropdownClick} slot="trigger" label="status">
|
|
95
|
-
|
|
95
|
+
<umb-localize key="general_status"></umb-localize>:
|
|
96
|
+
<umb-localize key=${'user_state' + this._stateFilterSelection}></umb-localize>
|
|
96
97
|
</uui-button>
|
|
97
98
|
<div slot="dropdown" class="filter-dropdown">
|
|
98
99
|
${this._stateFilterOptions.map((option) => html `<uui-checkbox
|
|
99
|
-
label=${option}
|
|
100
|
+
label=${this.localize.term('user_state' + option)}
|
|
100
101
|
@change=${this.#onStateFilterChange}
|
|
101
102
|
name="state"
|
|
102
103
|
value=${option}></uui-checkbox>`)}
|
|
@@ -105,19 +106,25 @@ export let UmbUserCollectionHeaderElement = class UmbUserCollectionHeaderElement
|
|
|
105
106
|
|
|
106
107
|
<!-- TODO: we should consider using the uui-combobox. We need to add a multiple options to it first -->
|
|
107
108
|
<umb-dropdown margin="8">
|
|
108
|
-
<uui-button @click=${this.#onDropdownClick} slot="trigger" label
|
|
109
|
+
<uui-button @click=${this.#onDropdownClick} slot="trigger" label=${this.localize.term('general_groups')}>
|
|
110
|
+
<umb-localize key="general_groups"></umb-localize>:
|
|
111
|
+
<!-- TODO: show the value here -->
|
|
112
|
+
</uui-button>
|
|
109
113
|
<div slot="dropdown" class="filter-dropdown">
|
|
110
|
-
|
|
111
|
-
<uui-checkbox label="
|
|
112
|
-
<uui-checkbox label="
|
|
113
|
-
<uui-checkbox label="
|
|
114
|
+
<!-- TODO: GET THESE FROM SERVER (not localized) -->
|
|
115
|
+
<uui-checkbox label="Administrators"></uui-checkbox>
|
|
116
|
+
<uui-checkbox label="Editors"></uui-checkbox>
|
|
117
|
+
<uui-checkbox label="Sensitive Data"></uui-checkbox>
|
|
118
|
+
<uui-checkbox label="Translators"></uui-checkbox>
|
|
119
|
+
<uui-checkbox label="Writers"></uui-checkbox>
|
|
114
120
|
</div>
|
|
115
121
|
</umb-dropdown>
|
|
116
122
|
|
|
117
123
|
<!-- TODO: we should consider using the uui-combobox. We need to add a multiple options to it first -->
|
|
118
124
|
<umb-dropdown margin="8">
|
|
119
|
-
<uui-button @click=${this.#onDropdownClick} slot="trigger" label
|
|
120
|
-
|
|
125
|
+
<uui-button @click=${this.#onDropdownClick} slot="trigger" label=${this.localize.term('general_orderBy')}>
|
|
126
|
+
<umb-localize key="general_orderBy"></umb-localize>:
|
|
127
|
+
<b>${this._orderBy}</b>
|
|
121
128
|
</uui-button>
|
|
122
129
|
<div slot="dropdown" class="filter-dropdown" name="orderBy">
|
|
123
130
|
<uui-radio-group name="radioGroup" @change=${this.#onOrderByChange}>
|
package/dist-cms/packages/users/users/collection/views/grid/user-collection-grid-view.element.js
CHANGED
|
@@ -4,7 +4,7 @@ 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 {
|
|
7
|
+
import { getDisplayStateFromUserStatus } from '../../../../utils.js';
|
|
8
8
|
import { css, html, nothing, customElement, state, repeat, ifDefined } from '../../../../../../external/lit/index.js';
|
|
9
9
|
import { UmbTextStyles } from "../../../../../../shared/style/index.js";
|
|
10
10
|
import { UMB_COLLECTION_CONTEXT_TOKEN } from '../../../../../core/collection/index.js';
|
|
@@ -52,22 +52,22 @@ export let UmbUserCollectionGridViewElement = class UmbUserCollectionGridViewEle
|
|
|
52
52
|
if (user.state && user.state === UserStateModel.ACTIVE) {
|
|
53
53
|
return nothing;
|
|
54
54
|
}
|
|
55
|
-
const statusLook =
|
|
55
|
+
const statusLook = getDisplayStateFromUserStatus(user.state);
|
|
56
56
|
return html `<uui-tag
|
|
57
57
|
slot="tag"
|
|
58
58
|
size="s"
|
|
59
59
|
look="${ifDefined(statusLook?.look)}"
|
|
60
60
|
color="${ifDefined(statusLook?.color)}">
|
|
61
|
-
|
|
61
|
+
<umb-localize key=${'user_' + statusLook.key}></umb-localize>
|
|
62
62
|
</uui-tag>`;
|
|
63
63
|
}
|
|
64
64
|
#renderUserLoginDate(user) {
|
|
65
65
|
if (!user.lastLoginDate) {
|
|
66
|
-
return html `<div class="user-login-time">${`${user.name}
|
|
66
|
+
return html `<div class="user-login-time">${`${user.name} ${this.localize.term('user_noLogin')}`}</div>`;
|
|
67
67
|
}
|
|
68
68
|
return html `<div class="user-login-time">
|
|
69
|
-
<
|
|
70
|
-
${user.lastLoginDate}
|
|
69
|
+
<umb-localize key="user_lastLogin"></umb-localize><br/>
|
|
70
|
+
${this.localize.date(user.lastLoginDate)}
|
|
71
71
|
</div>`;
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
@@ -4,15 +4,15 @@ 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 {
|
|
7
|
+
import { getDisplayStateFromUserStatus } from '../../../../../../utils.js';
|
|
8
8
|
import { html, LitElement, nothing, customElement, property } from '../../../../../../../../external/lit/index.js';
|
|
9
9
|
export let UmbUserTableStatusColumnLayoutElement = class UmbUserTableStatusColumnLayoutElement extends LitElement {
|
|
10
10
|
render() {
|
|
11
11
|
return html `${this.value.status && this.value.status !== 'enabled'
|
|
12
12
|
? html `<uui-tag
|
|
13
13
|
size="s"
|
|
14
|
-
look="${
|
|
15
|
-
color="${
|
|
14
|
+
look="${getDisplayStateFromUserStatus(this.value.status).look}"
|
|
15
|
+
color="${getDisplayStateFromUserStatus(this.value.status).color}">
|
|
16
16
|
${this.value.status}
|
|
17
17
|
</uui-tag>`
|
|
18
18
|
: nothing}`;
|
|
@@ -5,7 +5,7 @@ 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 { UmbUserPickerContext } from './user-input.context.js';
|
|
8
|
-
import { css, html, customElement, property, state } from '../../../../../external/lit/index.js';
|
|
8
|
+
import { css, html, customElement, property, state, ifDefined } from '../../../../../external/lit/index.js';
|
|
9
9
|
import { FormControlMixin } from '../../../../../external/uui/index.js';
|
|
10
10
|
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
11
11
|
export let UmbUserInputElement = class UmbUserInputElement extends FormControlMixin(UmbLitElement) {
|
|
@@ -81,7 +81,7 @@ export let UmbUserInputElement = class UmbUserInputElement extends FormControlMi
|
|
|
81
81
|
if (!item.id)
|
|
82
82
|
return;
|
|
83
83
|
return html `
|
|
84
|
-
<uui-ref-node-user name=${item.name}>
|
|
84
|
+
<uui-ref-node-user name=${ifDefined(item.name)}>
|
|
85
85
|
<uui-action-bar slot="actions">
|
|
86
86
|
<uui-button @click=${() => this.#pickerContext.requestRemoveItem(item.id)} label="Remove ${item.name}"
|
|
87
87
|
>Remove</uui-button
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
2
|
+
export declare class UmbUserPermissionSettingElement extends UmbLitElement {
|
|
3
|
+
#private;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
allowed: boolean;
|
|
7
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
8
|
+
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
9
|
+
}
|
|
10
|
+
export default UmbUserPermissionSettingElement;
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'umb-user-permission-setting': UmbUserPermissionSettingElement;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, customElement, property } from '../../../../../external/lit/index.js';
|
|
8
|
+
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
9
|
+
import { UmbTextStyles } from '../../../../../shared/style/index.js';
|
|
10
|
+
import { UmbChangeEvent } from '../../../../../shared/umb-events/index.js';
|
|
11
|
+
export let UmbUserPermissionSettingElement = class UmbUserPermissionSettingElement extends UmbLitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.label = '';
|
|
15
|
+
this.description = '';
|
|
16
|
+
this.allowed = false;
|
|
17
|
+
}
|
|
18
|
+
#onChange(event) {
|
|
19
|
+
event.stopPropagation();
|
|
20
|
+
this.allowed = event.target.checked;
|
|
21
|
+
this.dispatchEvent(new UmbChangeEvent());
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return html `<div id="setting">
|
|
25
|
+
<uui-toggle label=${this.label} ?checked=${this.allowed} @change=${this.#onChange}>
|
|
26
|
+
<div id="meta">
|
|
27
|
+
<div id="name">${this.label}</div>
|
|
28
|
+
<small>${this.description}</small>
|
|
29
|
+
</div>
|
|
30
|
+
</uui-toggle>
|
|
31
|
+
</div>`;
|
|
32
|
+
}
|
|
33
|
+
static { this.styles = [
|
|
34
|
+
UmbTextStyles,
|
|
35
|
+
css `
|
|
36
|
+
#setting {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
border-bottom: 1px solid var(--uui-color-divider);
|
|
40
|
+
padding: var(--uui-size-space-3) 0 var(--uui-size-space-4) 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#meta {
|
|
44
|
+
margin-left: var(--uui-size-space-4);
|
|
45
|
+
line-height: 1.2em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#name {
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
}
|
|
51
|
+
`,
|
|
52
|
+
]; }
|
|
53
|
+
};
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ type: String, attribute: true })
|
|
56
|
+
], UmbUserPermissionSettingElement.prototype, "label", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
property({ type: String, attribute: true })
|
|
59
|
+
], UmbUserPermissionSettingElement.prototype, "description", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
property({ type: Boolean, attribute: true })
|
|
62
|
+
], UmbUserPermissionSettingElement.prototype, "allowed", void 0);
|
|
63
|
+
UmbUserPermissionSettingElement = __decorate([
|
|
64
|
+
customElement('umb-user-permission-setting')
|
|
65
|
+
], UmbUserPermissionSettingElement);
|
|
66
|
+
export default UmbUserPermissionSettingElement;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { PropertyValueMap } from '../../../../../external/lit/index.js';
|
|
1
2
|
import { UmbUserPickerModalData, UmbUserPickerModalResult } from '../../../../core/modal/index.js';
|
|
2
3
|
import { UmbModalBaseElement } from '../../../../../shared/modal/index.js';
|
|
3
4
|
export declare class UmbUserPickerModalElement extends UmbModalBaseElement<UmbUserPickerModalData, UmbUserPickerModalResult> {
|
|
4
5
|
#private;
|
|
5
6
|
private _users;
|
|
6
|
-
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
7
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
8
10
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
9
11
|
}
|
|
@@ -4,38 +4,33 @@ 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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { umbExtensionsRegistry } from '../../../../core/extension-registry/index.js';
|
|
11
|
-
import { UmbObserverController } from '../../../../../libs/observable-api/index.js';
|
|
7
|
+
import { UmbUserRepository } from '../../repository/user.repository.js';
|
|
8
|
+
import { UmbTextStyles } from '../../../../../shared/style/index.js';
|
|
9
|
+
import { css, html, customElement, state, ifDefined } from '../../../../../external/lit/index.js';
|
|
12
10
|
import { UmbModalBaseElement } from '../../../../../shared/modal/index.js';
|
|
13
11
|
import { UmbSelectionManagerBase } from '../../../../../shared/utils/index.js';
|
|
14
12
|
export let UmbUserPickerModalElement = class UmbUserPickerModalElement extends UmbModalBaseElement {
|
|
15
|
-
#selectionManager;
|
|
16
|
-
#userRepository;
|
|
17
13
|
constructor() {
|
|
18
|
-
super();
|
|
14
|
+
super(...arguments);
|
|
19
15
|
this._users = [];
|
|
20
16
|
this.#selectionManager = new UmbSelectionManagerBase();
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
this.#userRepository = new UmbUserRepository(this);
|
|
18
|
+
}
|
|
19
|
+
#selectionManager;
|
|
20
|
+
#userRepository;
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
super.connectedCallback();
|
|
23
|
+
// TODO: in theory this config could change during the lifetime of the modal, so we could observe it
|
|
24
|
+
this.#selectionManager.setMultiple(this.data?.multiple ?? false);
|
|
25
|
+
this.#selectionManager.setSelection(this.data?.selection ?? []);
|
|
26
|
+
}
|
|
27
|
+
firstUpdated(_changedProperties) {
|
|
28
|
+
super.firstUpdated(_changedProperties);
|
|
29
|
+
this.#requestUsers();
|
|
34
30
|
}
|
|
35
|
-
async #
|
|
31
|
+
async #requestUsers() {
|
|
36
32
|
if (!this.#userRepository)
|
|
37
33
|
return;
|
|
38
|
-
// TODO is this the correct end point?
|
|
39
34
|
const { data } = await this.#userRepository.requestCollection();
|
|
40
35
|
if (data) {
|
|
41
36
|
this._users = data.items;
|
|
@@ -53,12 +48,12 @@ export let UmbUserPickerModalElement = class UmbUserPickerModalElement extends U
|
|
|
53
48
|
<uui-box>
|
|
54
49
|
${this._users.map((user) => html `
|
|
55
50
|
<uui-menu-item
|
|
56
|
-
label=${user.name}
|
|
51
|
+
label=${ifDefined(user.name)}
|
|
57
52
|
selectable
|
|
58
53
|
@selected=${() => this.#selectionManager.select(user.id)}
|
|
59
54
|
@deselected=${() => this.#selectionManager.deselect(user.id)}
|
|
60
55
|
?selected=${this.#selectionManager.isSelected(user.id)}>
|
|
61
|
-
<uui-avatar slot="icon" name=${user.name}></uui-avatar>
|
|
56
|
+
<uui-avatar slot="icon" name=${ifDefined(user.name)}></uui-avatar>
|
|
62
57
|
</uui-menu-item>
|
|
63
58
|
`)}
|
|
64
59
|
</uui-box>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './user.repository.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './user.repository.js';
|
|
@@ -45,7 +45,7 @@ export class UmbUserRepository {
|
|
|
45
45
|
]);
|
|
46
46
|
}
|
|
47
47
|
// COLLECTION
|
|
48
|
-
async requestCollection(filter = { skip: 0, take:
|
|
48
|
+
async requestCollection(filter = { skip: 0, take: 100000 }) {
|
|
49
49
|
//TODO: missing observable
|
|
50
50
|
return this.#collectionSource.filterCollection(filter);
|
|
51
51
|
}
|