@umbraco-cms/backoffice 17.8.2 → 17.9.0-rc
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/custom-elements.json +504 -245
- package/dist-cms/apps/app/app-auth.controller.d.ts +8 -0
- package/dist-cms/apps/app/app-auth.controller.js +48 -2
- package/dist-cms/apps/app/app.element.js +11 -1
- package/dist-cms/assets/lang/da.js +3 -0
- package/dist-cms/assets/lang/en.js +5 -0
- package/dist-cms/assets/lang/nb.js +1 -0
- package/dist-cms/assets/lang/pt.js +1 -0
- package/dist-cms/assets/lang/vi.js +1 -0
- package/dist-cms/external/uui/package.json +1 -1
- package/dist-cms/libs/extension-api/functions/has-init-export.function.d.ts +1 -1
- package/dist-cms/libs/extension-api/functions/has-init-export.function.js +1 -1
- package/dist-cms/libs/extension-api/functions/has-on-unload-export.function.d.ts +1 -1
- package/dist-cms/libs/extension-api/functions/has-on-unload-export.function.js +1 -1
- package/dist-cms/libs/extension-api/models/entry-point.interface.d.ts +1 -2
- package/dist-cms/packages/block/block/components/block-ref-name-slot/block-ref-name-slot.mixin.d.ts +32 -0
- package/dist-cms/packages/block/block/components/block-ref-name-slot/block-ref-name-slot.mixin.js +67 -0
- package/dist-cms/packages/block/block/components/index.d.ts +1 -0
- package/dist-cms/packages/block/block/components/index.js +1 -0
- package/dist-cms/packages/block/block/context/block-manager.context.js +2 -1
- package/dist-cms/packages/block/block/property-value-resolver/block-value-resolver.api.js +2 -1
- package/dist-cms/packages/block/block/utils/block-expose-sort-compare.function.d.ts +10 -0
- package/dist-cms/packages/block/block/utils/block-expose-sort-compare.function.js +17 -0
- package/dist-cms/packages/block/block/workspace/block-element-manager.js +3 -3
- package/dist-cms/packages/block/block-grid/components/block-grid-block/block-grid-block.element.d.ts +7 -5
- package/dist-cms/packages/block/block-grid/components/block-grid-block/block-grid-block.element.js +11 -24
- package/dist-cms/packages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.d.ts +7 -3
- package/dist-cms/packages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.js +11 -19
- package/dist-cms/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.js +3 -3
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.d.ts +2 -2
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.js +11 -6
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/Umbraco.BlockGrid.js +1 -1
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.d.ts +1 -1
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.js +3 -13
- package/dist-cms/packages/block/block-list/components/inline-list-block/inline-list-block.element.d.ts +3 -9
- package/dist-cms/packages/block/block-list/components/inline-list-block/inline-list-block.element.js +37 -67
- package/dist-cms/packages/block/block-list/components/ref-list-block/ref-list-block.element.d.ts +3 -10
- package/dist-cms/packages/block/block-list/components/ref-list-block/ref-list-block.element.js +4 -44
- package/dist-cms/packages/block/block-list/property-editors/block-list-editor/Umbraco.BlockList.js +1 -1
- package/dist-cms/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.js +2 -2
- package/dist-cms/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.d.ts +1 -1
- package/dist-cms/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.js +12 -6
- package/dist-cms/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.d.ts +3 -4
- package/dist-cms/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.js +10 -26
- package/dist-cms/packages/block/block-rte/context/block-rte-entry.context.js +1 -1
- package/dist-cms/packages/block/block-single/components/block-single-entry/block-single-entry.element.d.ts +3 -4
- package/dist-cms/packages/block/block-single/components/block-single-entry/block-single-entry.element.js +58 -48
- package/dist-cms/packages/block/block-single/components/inline-single-block/inline-single-block.element.d.ts +4 -3
- package/dist-cms/packages/block/block-single/components/inline-single-block/inline-single-block.element.js +27 -32
- package/dist-cms/packages/block/block-single/components/ref-single-block/ref-single-block.element.d.ts +7 -5
- package/dist-cms/packages/block/block-single/components/ref-single-block/ref-single-block.element.js +14 -27
- package/dist-cms/packages/content/content/controller/merge-content-variant-data.controller.js +5 -3
- package/dist-cms/packages/content/content/index.d.ts +1 -0
- package/dist-cms/packages/content/content/index.js +1 -0
- package/dist-cms/packages/content/content/manager/content-data-manager.d.ts +0 -1
- package/dist-cms/packages/content/content/manager/content-data-manager.js +2 -17
- package/dist-cms/packages/content/content/manager/element-data-manager.d.ts +0 -1
- package/dist-cms/packages/content/content/manager/element-data-manager.js +1 -25
- package/dist-cms/packages/content/content/rollback/modal/content-rollback-modal.element.js +9 -3
- package/dist-cms/packages/content/content/rollback/types.d.ts +1 -0
- package/dist-cms/packages/content/content/utils/append-content-value.function.d.ts +14 -0
- package/dist-cms/packages/content/content/utils/append-content-value.function.js +23 -0
- package/dist-cms/packages/content/content/utils/index.d.ts +1 -0
- package/dist-cms/packages/content/content/utils/index.js +1 -0
- package/dist-cms/packages/content/content/utils/sort-content-values-by-variant.function.d.ts +11 -0
- package/dist-cms/packages/content/content/utils/sort-content-values-by-variant.function.js +20 -0
- package/dist-cms/packages/content/content/workspace/content-detail-workspace-base.d.ts +6 -0
- package/dist-cms/packages/content/content/workspace/content-detail-workspace-base.js +15 -3
- package/dist-cms/packages/content/content/workspace/content-type-variance-change-redirect.controller.d.ts +32 -0
- package/dist-cms/packages/content/content/workspace/content-type-variance-change-redirect.controller.js +77 -0
- package/dist-cms/packages/content/content/workspace/resolve-stale-variant-route.function.d.ts +40 -0
- package/dist-cms/packages/content/content/workspace/resolve-stale-variant-route.function.js +63 -0
- package/dist-cms/packages/content/content-type/global-components/content-type-workspace-editor-header.element.d.ts +1 -0
- package/dist-cms/packages/content/content-type/global-components/content-type-workspace-editor-header.element.js +24 -1
- package/dist-cms/packages/content/content-type/global-components/input-content-type-collection-configuration/input-content-type-collection-configuration.element.d.ts +7 -0
- package/dist-cms/packages/content/content-type/global-components/input-content-type-collection-configuration/input-content-type-collection-configuration.element.js +25 -8
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-group.element.d.ts +7 -0
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-group.element.js +15 -3
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-properties.element.d.ts +8 -0
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-properties.element.js +29 -1
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-property.element.d.ts +7 -0
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-property.element.js +15 -7
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-tab.element.d.ts +8 -0
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor-tab.element.js +31 -2
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor.element.d.ts +1 -0
- package/dist-cms/packages/content/content-type/workspace/views/design/content-type-design-editor.element.js +26 -7
- package/dist-cms/packages/core/auth/auth-provider.extension.d.ts +7 -7
- package/dist-cms/packages/core/auth/auth.context.d.ts +23 -0
- package/dist-cms/packages/core/auth/auth.context.js +145 -23
- package/dist-cms/packages/core/auth/controllers/auth-session-timeout.controller.js +29 -1
- package/dist-cms/packages/core/auth/modals/umb-app-auth-modal.element.js +5 -0
- package/dist-cms/packages/core/backend-api/types.gen.d.ts +1 -0
- package/dist-cms/packages/core/collection/default/collection-default.context.d.ts +8 -0
- package/dist-cms/packages/core/collection/default/collection-default.context.js +26 -6
- package/dist-cms/packages/core/components/dropdown/dropdown.element.js +6 -3
- package/dist-cms/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.d.ts +0 -1
- package/dist-cms/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.js +1 -8
- package/dist-cms/packages/core/components/input-entity/input-entity.element.d.ts +6 -6
- package/dist-cms/packages/core/components/input-entity/input-entity.element.js +28 -37
- package/dist-cms/packages/core/components/input-time-zone/input-time-zone.element.d.ts +6 -2
- package/dist-cms/packages/core/components/input-time-zone/input-time-zone.element.js +13 -19
- package/dist-cms/packages/core/components/input-with-alias/input-with-alias.element.d.ts +4 -0
- package/dist-cms/packages/core/components/input-with-alias/input-with-alias.element.js +5 -0
- package/dist-cms/packages/core/components/multiple-color-picker-input/multiple-color-picker-input.element.d.ts +6 -6
- package/dist-cms/packages/core/components/multiple-color-picker-input/multiple-color-picker-input.element.js +9 -18
- package/dist-cms/packages/core/components/multiple-text-string-input/input-multiple-text-string.element.js +6 -4
- package/dist-cms/packages/core/entity-action/default/types.d.ts +0 -1
- package/dist-cms/packages/core/entity-action/global-components/entity-actions-dropdown/entity-actions-dropdown.element.js +2 -5
- package/dist-cms/packages/core/entity-bulk-action/entity-bulk-action.element.js +13 -1
- package/dist-cms/packages/core/entity-create-option-action/entity-create-option-action.extension.d.ts +0 -1
- package/dist-cms/packages/core/extension-registry/extensions/mfa-login-provider.extension.d.ts +1 -1
- package/dist-cms/packages/core/menu/menu-tree-structure-workspace-context-base.js +5 -1
- package/dist-cms/packages/core/menu/menu-tree-structure-workspace-context.test-utils.d.ts +2 -0
- package/dist-cms/packages/core/menu/menu-tree-structure-workspace-context.test-utils.js +5 -0
- package/dist-cms/packages/core/menu/menu-variant-tree-structure-workspace-context-base.js +5 -1
- package/dist-cms/packages/core/menu/menu-variant-tree-structure-workspace-context.test-utils.d.ts +2 -0
- package/dist-cms/packages/core/menu/menu-variant-tree-structure-workspace-context.test-utils.js +5 -0
- package/dist-cms/packages/core/modal/common/discard-changes/discard-changes-modal.element.js +6 -1
- package/dist-cms/packages/core/notification/notification-handler.d.ts +1 -1
- package/dist-cms/packages/core/notification/notification-handler.js +2 -1
- package/dist-cms/packages/core/property-editor/extensions/property-editor-ui.extension.d.ts +0 -1
- package/dist-cms/packages/core/property-editor-data-source/input/input-property-editor-data-source.element.d.ts +6 -6
- package/dist-cms/packages/core/property-editor-data-source/input/input-property-editor-data-source.element.js +15 -19
- package/dist-cms/packages/core/repository/repository-details.manager.d.ts +3 -1
- package/dist-cms/packages/core/repository/repository-details.manager.js +17 -2
- package/dist-cms/packages/core/resources/api-interceptor.controller.d.ts +2 -1
- package/dist-cms/packages/core/resources/api-interceptor.controller.js +23 -18
- package/dist-cms/packages/core/resources/resource.controller.js +1 -1
- package/dist-cms/packages/core/resources/try-execute/api-error-was-notified.function.js +8 -7
- package/dist-cms/packages/core/resources/types.d.ts +5 -0
- package/dist-cms/packages/core/resources/umb-error.js +3 -3
- package/dist-cms/packages/core/section/components/input-section/input-section.element.d.ts +6 -6
- package/dist-cms/packages/core/section/components/input-section/input-section.element.js +6 -19
- package/dist-cms/packages/core/server/server.context.d.ts +6 -1
- package/dist-cms/packages/core/server/server.context.js +6 -1
- package/dist-cms/packages/core/sorter/sorter.controller.js +1 -1
- package/dist-cms/packages/core/validation/components/form-validation-message.element.js +2 -1
- package/dist-cms/packages/core/validation/const.d.ts +1 -0
- package/dist-cms/packages/core/validation/const.js +1 -0
- package/dist-cms/packages/core/validation/context/server-model-validator.context.js +11 -1
- package/dist-cms/packages/core/validation/utils/index.d.ts +1 -0
- package/dist-cms/packages/core/validation/utils/index.js +1 -0
- package/dist-cms/packages/core/validation/utils/is-above-zero-and-below-minimum.function.d.ts +7 -0
- package/dist-cms/packages/core/validation/utils/is-above-zero-and-below-minimum.function.js +9 -0
- package/dist-cms/packages/core/variant/index.d.ts +1 -0
- package/dist-cms/packages/core/variant/index.js +1 -0
- package/dist-cms/packages/core/variant/variant-object-sort-compare.function.d.ts +22 -0
- package/dist-cms/packages/core/variant/variant-object-sort-compare.function.js +29 -0
- package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/submit.action.js +21 -11
- package/dist-cms/packages/core/workspace/components/workspace-header-name-editable/workspace-header-name-editable.element.d.ts +1 -0
- package/dist-cms/packages/core/workspace/components/workspace-header-name-editable/workspace-header-name-editable.element.js +26 -3
- package/dist-cms/packages/core/workspace/contexts/tokens/submittable-workspace-context.interface.d.ts +2 -0
- package/dist-cms/packages/core/workspace/controllers/resolve-stale-variant-route.function.d.ts +3 -0
- package/dist-cms/packages/core/workspace/controllers/resolve-stale-variant-route.function.js +7 -0
- package/dist-cms/packages/core/workspace/controllers/workspace-stale-variant-redirect.controller.d.ts +3 -0
- package/dist-cms/packages/core/workspace/controllers/workspace-stale-variant-redirect.controller.js +8 -0
- package/dist-cms/packages/core/workspace/entity-detail/entity-detail-workspace-base.d.ts +8 -1
- package/dist-cms/packages/core/workspace/entity-detail/entity-detail-workspace-base.js +13 -1
- package/dist-cms/packages/core/workspace/entity-detail/global-components/entity-detail-workspace-editor.element.js +1 -1
- package/dist-cms/packages/core/workspace/extensions/workspace-action-menu-item.model.d.ts +1 -1
- package/dist-cms/packages/core/workspace/namable/namable-workspace-context.interface.d.ts +2 -0
- package/dist-cms/packages/core/workspace/workspace-property-dataset/invariant-workspace-property-dataset-context.d.ts +2 -1
- package/dist-cms/packages/core/workspace/workspace-property-dataset/invariant-workspace-property-dataset-context.js +6 -1
- package/dist-cms/packages/data-type/components/data-type-input/data-type-input.element.d.ts +6 -6
- package/dist-cms/packages/data-type/components/data-type-input/data-type-input.element.js +27 -34
- package/dist-cms/packages/data-type/workspace/views/details/data-type-details-workspace-property-editor-picker.element.d.ts +1 -0
- package/dist-cms/packages/data-type/workspace/views/details/data-type-details-workspace-property-editor-picker.element.js +19 -6
- package/dist-cms/packages/data-type/workspace/views/details/data-type-details-workspace-view.element.d.ts +1 -0
- package/dist-cms/packages/data-type/workspace/views/details/data-type-details-workspace-view.element.js +8 -0
- package/dist-cms/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.d.ts +1 -0
- package/dist-cms/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.js +7 -0
- package/dist-cms/packages/documents/document-blueprints/workspace/document-blueprint-workspace-editor.element.js +1 -9
- package/dist-cms/packages/documents/document-blueprints/workspace/views/info/document-blueprint-workspace-view-info.element.js +1 -0
- package/dist-cms/packages/documents/document-types/components/input-document-type/input-document-type.element.d.ts +8 -7
- package/dist-cms/packages/documents/document-types/components/input-document-type/input-document-type.element.js +28 -20
- package/dist-cms/packages/documents/document-types/workspace/document-type/views/settings/document-type-workspace-view-settings.element.d.ts +1 -0
- package/dist-cms/packages/documents/document-types/workspace/document-type/views/settings/document-type-workspace-view-settings.element.js +13 -1
- package/dist-cms/packages/documents/document-types/workspace/document-type/views/structure/document-type-workspace-view-structure.element.d.ts +1 -0
- package/dist-cms/packages/documents/document-types/workspace/document-type/views/structure/document-type-workspace-view-structure.element.js +8 -0
- package/dist-cms/packages/documents/document-types/workspace/document-type/views/templates/document-type-workspace-view-templates.element.d.ts +1 -0
- package/dist-cms/packages/documents/document-types/workspace/document-type/views/templates/document-type-workspace-view-templates.element.js +6 -0
- package/dist-cms/packages/documents/documents/components/input-document/input-document.element.d.ts +6 -6
- package/dist-cms/packages/documents/documents/components/input-document/input-document.element.js +11 -19
- package/dist-cms/packages/documents/documents/entity-actions/move-to/repository/document-move.server.data-source.js +1 -1
- package/dist-cms/packages/documents/documents/entity-bulk-actions/move-to/repository/move-to.repository.js +5 -2
- package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/document-schedule-modal.element.d.ts +1 -0
- package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/document-schedule-modal.element.js +62 -19
- package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/document-schedule-modal.token.d.ts +5 -0
- package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/mirror-schedules.function.d.ts +9 -0
- package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/mirror-schedules.function.js +13 -0
- package/dist-cms/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.js +13 -0
- package/dist-cms/packages/documents/documents/rollback/modal/rollback-modal.element.js +9 -3
- package/dist-cms/packages/documents/documents/rollback/repository/rollback.repository.js +1 -0
- package/dist-cms/packages/documents/documents/user-permissions/document-property-value/workspace-context/property-value-user-permission-workspace-context-base.d.ts +1 -0
- package/dist-cms/packages/documents/documents/user-permissions/document-property-value/workspace-context/property-value-user-permission-workspace-context-base.js +20 -1
- package/dist-cms/packages/documents/documents/workspace/context/document-workspace.context.d.ts +1 -0
- package/dist-cms/packages/documents/documents/workspace/context/document-workspace.context.js +11 -1
- package/dist-cms/packages/documents/documents/workspace/document-workspace-editor.element.js +1 -9
- package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.js +1 -0
- package/dist-cms/packages/language/components/input-language/input-language.element.d.ts +6 -6
- package/dist-cms/packages/language/components/input-language/input-language.element.js +15 -19
- package/dist-cms/packages/language/workspace/language/views/language-details-workspace-view.element.d.ts +1 -0
- package/dist-cms/packages/language/workspace/language/views/language-details-workspace-view.element.js +9 -0
- package/dist-cms/packages/management-api/detail/cache-invalidation.manager.js +12 -1
- package/dist-cms/packages/management-api/detail/cache.d.ts +17 -0
- package/dist-cms/packages/management-api/detail/cache.js +25 -0
- package/dist-cms/packages/management-api/detail/detail-data.request-manager.js +5 -25
- package/dist-cms/packages/management-api/item/cache-invalidation.manager.js +12 -1
- package/dist-cms/packages/management-api/item/cache.d.ts +17 -0
- package/dist-cms/packages/management-api/item/cache.js +25 -0
- package/dist-cms/packages/management-api/item/item-data.request-manager.js +2 -22
- package/dist-cms/packages/media/media/collection/media-collection.context.d.ts +2 -1
- package/dist-cms/packages/media/media/collection/media-collection.context.js +5 -16
- package/dist-cms/packages/media/media/components/input-media/input-media.element.d.ts +6 -6
- package/dist-cms/packages/media/media/components/input-media/input-media.element.js +11 -19
- package/dist-cms/packages/media/media/components/input-rich-media/input-rich-media.element.d.ts +8 -7
- package/dist-cms/packages/media/media/components/input-rich-media/input-rich-media.element.js +35 -34
- package/dist-cms/packages/media/media/dropzone/media-dropzone.manager.js +54 -29
- package/dist-cms/packages/media/media/dropzone/modals/dropzone-media-type-picker/dropzone-media-type-picker-modal.element.js +43 -15
- package/dist-cms/packages/media/media/property-editors/media-picker/Umbraco.MediaPicker.js +1 -1
- package/dist-cms/packages/media/media-types/components/input-media-type/input-media-type.element.d.ts +14 -6
- package/dist-cms/packages/media/media-types/components/input-media-type/input-media-type.element.js +49 -26
- package/dist-cms/packages/media/media-types/workspace/views/structure/media-type-workspace-view-structure.element.d.ts +1 -0
- package/dist-cms/packages/media/media-types/workspace/views/structure/media-type-workspace-view-structure.element.js +8 -0
- package/dist-cms/packages/members/member/components/input-member/input-member.element.d.ts +6 -6
- package/dist-cms/packages/members/member/components/input-member/input-member.element.js +11 -19
- package/dist-cms/packages/members/member-group/components/input-member-group/input-member-group.element.d.ts +6 -6
- package/dist-cms/packages/members/member-group/components/input-member-group/input-member-group.element.js +21 -22
- package/dist-cms/packages/members/member-type/components/input-member-type/input-member-type.element.d.ts +6 -6
- package/dist-cms/packages/members/member-type/components/input-member-type/input-member-type.element.js +6 -19
- package/dist-cms/packages/multi-url-picker/components/input-multi-url/input-multi-url.element.d.ts +8 -7
- package/dist-cms/packages/multi-url-picker/components/input-multi-url/input-multi-url.element.js +23 -20
- package/dist-cms/packages/multi-url-picker/property-editor/Umbraco.MultiUrlPicker.js +1 -1
- package/dist-cms/packages/performance-profiling/dashboard-performance-profiling.element.d.ts +3 -3
- package/dist-cms/packages/performance-profiling/dashboard-performance-profiling.element.js +20 -8
- package/dist-cms/packages/property-editors/content-picker/Umbraco.MultiNodeTreePicker.js +1 -1
- package/dist-cms/packages/property-editors/content-picker/components/input-content/input-content.element.d.ts +6 -6
- package/dist-cms/packages/property-editors/content-picker/components/input-content/input-content.element.js +1 -15
- package/dist-cms/packages/property-editors/content-picker/property-editor-ui-content-picker.element.d.ts +0 -2
- package/dist-cms/packages/property-editors/content-picker/property-editor-ui-content-picker.element.js +0 -12
- package/dist-cms/packages/property-editors/entity-data-picker/input/input-entity-data.element.d.ts +6 -6
- package/dist-cms/packages/property-editors/entity-data-picker/input/input-entity-data.element.js +11 -19
- package/dist-cms/packages/property-editors/entity-data-picker/property-editor/Umbraco.EntityDataPicker.js +1 -0
- package/dist-cms/packages/property-editors/entity-data-picker/property-editor/entity-data-picker-property-editor-ui.element.d.ts +0 -2
- package/dist-cms/packages/property-editors/entity-data-picker/property-editor/entity-data-picker-property-editor-ui.element.js +0 -12
- package/dist-cms/packages/property-editors/multiple-text-string/Umbraco.MultipleTextString.js +1 -1
- package/dist-cms/packages/static-file/components/input-static-file/input-static-file.element.d.ts +6 -6
- package/dist-cms/packages/static-file/components/input-static-file/input-static-file.element.js +7 -21
- package/dist-cms/packages/templating/partial-views/workspace/manifests.js +1 -5
- package/dist-cms/packages/templating/partial-views/workspace/partial-view-workspace-editor.element.d.ts +1 -5
- package/dist-cms/packages/templating/partial-views/workspace/partial-view-workspace-editor.element.js +4 -14
- package/dist-cms/packages/templating/partial-views/workspace/partial-view-workspace.context.d.ts +1 -0
- package/dist-cms/packages/templating/partial-views/workspace/partial-view-workspace.context.js +24 -0
- package/dist-cms/packages/templating/partial-views/workspace/views/code-editor/partial-view-code-editor-workspace-view.element.d.ts +1 -5
- package/dist-cms/packages/templating/partial-views/workspace/views/code-editor/partial-view-code-editor-workspace-view.element.js +6 -16
- package/dist-cms/packages/templating/scripts/workspace/views/code-editor/script-code-editor-workspace-view.element.d.ts +1 -0
- package/dist-cms/packages/templating/scripts/workspace/views/code-editor/script-code-editor-workspace-view.element.js +6 -0
- package/dist-cms/packages/templating/stylesheets/global-components/stylesheet-input/stylesheet-input.element.d.ts +6 -6
- package/dist-cms/packages/templating/stylesheets/global-components/stylesheet-input/stylesheet-input.element.js +5 -16
- package/dist-cms/packages/templating/stylesheets/workspace/views/code-editor/stylesheet-code-editor-workspace-view.element.d.ts +1 -0
- package/dist-cms/packages/templating/stylesheets/workspace/views/code-editor/stylesheet-code-editor-workspace-view.element.js +7 -1
- package/dist-cms/packages/templating/templates/global-components/input-template/input-template.element.d.ts +13 -6
- package/dist-cms/packages/templating/templates/global-components/input-template/input-template.element.js +33 -25
- package/dist-cms/packages/templating/templates/global-components/template-card/template-card.element.d.ts +7 -0
- package/dist-cms/packages/templating/templates/global-components/template-card/template-card.element.js +26 -10
- package/dist-cms/packages/templating/templates/workspace/manifests.js +1 -5
- package/dist-cms/packages/templating/templates/workspace/template-workspace-editor.element.d.ts +1 -5
- package/dist-cms/packages/templating/templates/workspace/template-workspace-editor.element.js +16 -15
- package/dist-cms/packages/templating/templates/workspace/template-workspace.context.d.ts +1 -0
- package/dist-cms/packages/templating/templates/workspace/template-workspace.context.js +24 -0
- package/dist-cms/packages/templating/templates/workspace/views/code-editor/template-code-editor-workspace-view.element.d.ts +1 -5
- package/dist-cms/packages/templating/templates/workspace/views/code-editor/template-code-editor-workspace-view.element.js +9 -19
- package/dist-cms/packages/tiptap/extensions/media-upload/media-upload.tiptap-api.js +3 -3
- package/dist-cms/packages/ufm/utils/index.d.ts +1 -0
- package/dist-cms/packages/ufm/utils/index.js +1 -0
- package/dist-cms/packages/ufm/utils/render-ufm.function.d.ts +12 -0
- package/dist-cms/packages/ufm/utils/render-ufm.function.js +22 -0
- package/dist-cms/packages/user/current-user/conditions/group-id/group-id.condition-config.d.ts +4 -4
- package/dist-cms/packages/user/current-user/current-user.context.d.ts +1 -0
- package/dist-cms/packages/user/current-user/current-user.context.js +14 -3
- package/dist-cms/packages/user/current-user/user-entry-point/user-entry-point-extension-initializer.js +11 -1
- package/dist-cms/packages/user/user/collection/user-collection-header.element.js +1 -1
- package/dist-cms/packages/user/user/components/user-input/user-input.element.d.ts +8 -7
- package/dist-cms/packages/user/user/components/user-input/user-input.element.js +46 -44
- package/dist-cms/packages/user/user-group/collection/repository/user-group-collection.repository.d.ts +16 -0
- package/dist-cms/packages/user/user-group/collection/repository/user-group-collection.repository.js +23 -0
- package/dist-cms/packages/user/user-group/components/input-user-group/user-group-input.element.d.ts +6 -6
- package/dist-cms/packages/user/user-group/components/input-user-group/user-group-input.element.js +5 -16
- package/dist-cms/packages/user/user-group/modals/user-group-picker/user-group-picker-modal.element.js +1 -1
- package/dist-cms/packages/webhook/components/input-webhook-headers.element.d.ts +7 -0
- package/dist-cms/packages/webhook/components/input-webhook-headers.element.js +27 -3
- package/dist-cms/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.d.ts +1 -0
- package/dist-cms/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.js +16 -5
- package/dist-cms/packages/webhook/webhook/workspace/webhook-workspace-editor.element.d.ts +1 -0
- package/dist-cms/packages/webhook/webhook/workspace/webhook-workspace-editor.element.js +19 -1
- package/dist-cms/packages/webhook/webhook-event/input-webhook-events.element.d.ts +7 -0
- package/dist-cms/packages/webhook/webhook-event/input-webhook-events.element.js +34 -12
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/examples/multi-brand-block-views/README.md +27 -0
- package/examples/multi-brand-block-views/article-teaser-block-view.element.ts +53 -0
- package/examples/multi-brand-block-views/block-view-base.element.ts +78 -0
- package/examples/multi-brand-block-views/block-view.styles.ts +95 -0
- package/examples/multi-brand-block-views/block-view.utils.ts +60 -0
- package/examples/multi-brand-block-views/entry-point.ts +17 -0
- package/examples/multi-brand-block-views/hero-block-view.element.ts +88 -0
- package/examples/multi-brand-block-views/image-block-view.element.ts +48 -0
- package/examples/multi-brand-block-views/index.ts +67 -0
- package/examples/multi-brand-block-views/layout-block-view.element.ts +55 -0
- package/examples/multi-brand-block-views/material-showcase-block-view.element.ts +106 -0
- package/examples/multi-brand-block-views/product-teaser-block-view.element.ts +96 -0
- package/examples/multi-brand-block-views/text-block-view.element.ts +53 -0
- package/package.json +3 -2
- package/umbraco-package-schema.json +69 -28
- package/vscode-html-custom-data.json +250 -140
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, customElement, property, css, repeat, nothing, when, state, ref, } from '../../../../external/lit/index.js';
|
|
8
8
|
import { UmbChangeEvent } from '../../event/index.js';
|
|
9
|
-
import { UmbFormControlMixin } from '../../validation/index.js';
|
|
9
|
+
import { isAboveZeroAndBelowMinimum, UMB_VALIDATION_EMPTY_LOCALIZATION_KEY, UmbFormControlMixin, } from '../../validation/index.js';
|
|
10
10
|
import { UmbSorterController } from '../../sorter/index.js';
|
|
11
11
|
import { UmbLitElement } from '../../lit-element/index.js';
|
|
12
12
|
import { getTimeZoneList, getTimeZoneOffset } from '../../utils/index.js';
|
|
@@ -16,21 +16,6 @@ import { DateTime } from '../../../../external/luxon/index.js';
|
|
|
16
16
|
*/
|
|
17
17
|
let UmbInputTimeZoneElement = class UmbInputTimeZoneElement extends UmbFormControlMixin(UmbLitElement, []) {
|
|
18
18
|
#sorter;
|
|
19
|
-
/**
|
|
20
|
-
* This is a minimum amount of selected items in this input.
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @attr
|
|
23
|
-
*/
|
|
24
|
-
set min(value) {
|
|
25
|
-
this.#min = value;
|
|
26
|
-
}
|
|
27
|
-
get min() {
|
|
28
|
-
if (this.required && this.#min < 1) {
|
|
29
|
-
return 1;
|
|
30
|
-
}
|
|
31
|
-
return this.#min;
|
|
32
|
-
}
|
|
33
|
-
#min;
|
|
34
19
|
/**
|
|
35
20
|
* Disables the input
|
|
36
21
|
* @type {boolean}
|
|
@@ -89,7 +74,12 @@ let UmbInputTimeZoneElement = class UmbInputTimeZoneElement extends UmbFormContr
|
|
|
89
74
|
this.dispatchEvent(new UmbChangeEvent());
|
|
90
75
|
},
|
|
91
76
|
});
|
|
92
|
-
|
|
77
|
+
/**
|
|
78
|
+
* This is a minimum amount of selected items in this input.
|
|
79
|
+
* @type {number}
|
|
80
|
+
* @attr
|
|
81
|
+
*/
|
|
82
|
+
this.min = 0;
|
|
93
83
|
this.#disabled = false;
|
|
94
84
|
this.#readonly = false;
|
|
95
85
|
this._timeZonePickerValue = '';
|
|
@@ -99,7 +89,8 @@ let UmbInputTimeZoneElement = class UmbInputTimeZoneElement extends UmbFormContr
|
|
|
99
89
|
...tz,
|
|
100
90
|
offset: getTimeZoneOffset(tz.value, now), // Format offset as string
|
|
101
91
|
}));
|
|
102
|
-
this.addValidator('
|
|
92
|
+
this.addValidator('valueMissing', () => this.requiredMessage ?? UMB_VALIDATION_EMPTY_LOCALIZATION_KEY, () => !this.readonly && !!this.required && this.value.length === 0);
|
|
93
|
+
this.addValidator('rangeUnderflow', () => this.localize.term('validation_entriesShort', this.min, this.min - this.value.length), () => isAboveZeroAndBelowMinimum(this.value.length, this.min));
|
|
103
94
|
this.addValidator('rangeOverflow', () => this.localize.term('validation_entriesExceed', this.max, this.value.length - (this.max || 0)), () => !!this.max && this.value.length > this.max);
|
|
104
95
|
}
|
|
105
96
|
getFormElement() {
|
|
@@ -207,7 +198,7 @@ let UmbInputTimeZoneElement = class UmbInputTimeZoneElement extends UmbFormContr
|
|
|
207
198
|
};
|
|
208
199
|
__decorate([
|
|
209
200
|
property({ type: Number })
|
|
210
|
-
], UmbInputTimeZoneElement.prototype, "min",
|
|
201
|
+
], UmbInputTimeZoneElement.prototype, "min", void 0);
|
|
211
202
|
__decorate([
|
|
212
203
|
property({ type: Number })
|
|
213
204
|
], UmbInputTimeZoneElement.prototype, "max", void 0);
|
|
@@ -220,6 +211,9 @@ __decorate([
|
|
|
220
211
|
__decorate([
|
|
221
212
|
property({ type: Boolean })
|
|
222
213
|
], UmbInputTimeZoneElement.prototype, "required", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
property({ type: String, attribute: 'required-message' })
|
|
216
|
+
], UmbInputTimeZoneElement.prototype, "requiredMessage", void 0);
|
|
223
217
|
__decorate([
|
|
224
218
|
property({ type: Array, reflect: false })
|
|
225
219
|
], UmbInputTimeZoneElement.prototype, "value", null);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { UmbLitElement } from '../../lit-element/index.js';
|
|
2
2
|
declare const UmbInputWithAliasElement_base: import("../../../../libs/extension-api/index.js").HTMLElementConstructor<import("../../validation/index.js").UmbFormControlMixinElement<string | undefined>> & typeof UmbLitElement;
|
|
3
|
+
/**
|
|
4
|
+
* @element umb-input-with-alias
|
|
5
|
+
* @slot append - Content shown at the end of the input, after the alias.
|
|
6
|
+
*/
|
|
3
7
|
export declare class UmbInputWithAliasElement extends UmbInputWithAliasElement_base {
|
|
4
8
|
#private;
|
|
5
9
|
name?: string;
|
|
@@ -11,6 +11,10 @@ import { UMB_VALIDATION_EMPTY_LOCALIZATION_KEY, UmbFormControlMixin } from '../.
|
|
|
11
11
|
import { UmbLitElement } from '../../lit-element/index.js';
|
|
12
12
|
import { UUIInputEvent } from '../../../../external/uui/index.js';
|
|
13
13
|
const DEFAULT_ALIAS_PATTERN = '^[A-Za-z][A-Za-z0-9_-]{0,254}$';
|
|
14
|
+
/**
|
|
15
|
+
* @element umb-input-with-alias
|
|
16
|
+
* @slot append - Content shown at the end of the input, after the alias.
|
|
17
|
+
*/
|
|
14
18
|
let UmbInputWithAliasElement = class UmbInputWithAliasElement extends UmbFormControlMixin(UmbLitElement) {
|
|
15
19
|
constructor() {
|
|
16
20
|
super(...arguments);
|
|
@@ -121,6 +125,7 @@ let UmbInputWithAliasElement = class UmbInputWithAliasElement extends UmbFormCon
|
|
|
121
125
|
</uui-input-lock>
|
|
122
126
|
`
|
|
123
127
|
: html `<span id="alias" class="muted" slot="append">${this.alias}</span>`}
|
|
128
|
+
<slot name="append" slot="append"></slot>
|
|
124
129
|
</uui-input>
|
|
125
130
|
`;
|
|
126
131
|
}
|
|
@@ -14,12 +14,12 @@ export declare class UmbMultipleColorPickerInputElement extends UmbMultipleColor
|
|
|
14
14
|
*/
|
|
15
15
|
min?: number;
|
|
16
16
|
/**
|
|
17
|
-
* Min validation message.
|
|
17
|
+
* Min validation message. When not set, a localized message stating the minimum and how many more items are needed is used.
|
|
18
18
|
* @type {string}
|
|
19
19
|
* @attr
|
|
20
|
-
* @default
|
|
20
|
+
* @default undefined
|
|
21
21
|
*/
|
|
22
|
-
minMessage
|
|
22
|
+
minMessage?: string;
|
|
23
23
|
/**
|
|
24
24
|
* This is a maximum amount of selected items in this input.
|
|
25
25
|
* @type {number}
|
|
@@ -28,12 +28,12 @@ export declare class UmbMultipleColorPickerInputElement extends UmbMultipleColor
|
|
|
28
28
|
*/
|
|
29
29
|
max?: number;
|
|
30
30
|
/**
|
|
31
|
-
* Max validation message.
|
|
31
|
+
* Max validation message. When not set, a localized message stating the maximum and how many items are over it is used.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @attr
|
|
34
|
-
* @default
|
|
34
|
+
* @default undefined
|
|
35
35
|
*/
|
|
36
|
-
maxMessage
|
|
36
|
+
maxMessage?: string;
|
|
37
37
|
/**
|
|
38
38
|
* Disables the input
|
|
39
39
|
* @type {boolean}
|
|
@@ -10,6 +10,7 @@ import { UmbChangeEvent } from '../../event/index.js';
|
|
|
10
10
|
import { UmbLitElement } from '../../lit-element/index.js';
|
|
11
11
|
import { UmbSorterController } from '../../sorter/index.js';
|
|
12
12
|
import { UMB_PROPERTY_DATASET_CONTEXT } from '../../property/index.js';
|
|
13
|
+
import { isAboveZeroAndBelowMinimum } from '../../validation/index.js';
|
|
13
14
|
/**
|
|
14
15
|
* @element umb-multiple-color-picker-input
|
|
15
16
|
*/
|
|
@@ -34,20 +35,6 @@ let UmbMultipleColorPickerInputElement = class UmbMultipleColorPickerInputElemen
|
|
|
34
35
|
this.dispatchEvent(new UmbChangeEvent());
|
|
35
36
|
},
|
|
36
37
|
});
|
|
37
|
-
/**
|
|
38
|
-
* Min validation message.
|
|
39
|
-
* @type {string}
|
|
40
|
-
* @attr
|
|
41
|
-
* @default
|
|
42
|
-
*/
|
|
43
|
-
this.minMessage = 'This field needs more items';
|
|
44
|
-
/**
|
|
45
|
-
* Max validation message.
|
|
46
|
-
* @type {string}
|
|
47
|
-
* @attr
|
|
48
|
-
* @default
|
|
49
|
-
*/
|
|
50
|
-
this.maxMessage = 'This field exceeds the allowed amount of items';
|
|
51
38
|
/**
|
|
52
39
|
* Disables the input
|
|
53
40
|
* @type {boolean}
|
|
@@ -70,8 +57,10 @@ let UmbMultipleColorPickerInputElement = class UmbMultipleColorPickerInputElemen
|
|
|
70
57
|
this.showLabels = !!value;
|
|
71
58
|
}, 'observeUseLabel');
|
|
72
59
|
});
|
|
73
|
-
this.addValidator('rangeUnderflow', () => this.minMessage
|
|
74
|
-
|
|
60
|
+
this.addValidator('rangeUnderflow', () => this.minMessage ||
|
|
61
|
+
this.localize.term('validation_entriesShort', this.min, (this.min ?? 0) - this._items.length), () => isAboveZeroAndBelowMinimum(this._items.length, this.min));
|
|
62
|
+
this.addValidator('rangeOverflow', () => this.maxMessage ||
|
|
63
|
+
this.localize.term('validation_entriesExceed', this.max, this._items.length - (this.max ?? 0)), () => !!this.max && this._items.length > this.max);
|
|
75
64
|
}
|
|
76
65
|
set items(items) {
|
|
77
66
|
this._items = items ?? [];
|
|
@@ -135,7 +124,9 @@ let UmbMultipleColorPickerInputElement = class UmbMultipleColorPickerInputElemen
|
|
|
135
124
|
`;
|
|
136
125
|
}
|
|
137
126
|
#renderAddButton() {
|
|
138
|
-
if (this.disabled
|
|
127
|
+
if (this.disabled)
|
|
128
|
+
return nothing;
|
|
129
|
+
if (this.readonly && this._items.length > 0)
|
|
139
130
|
return nothing;
|
|
140
131
|
return html `
|
|
141
132
|
<uui-button
|
|
@@ -143,7 +134,7 @@ let UmbMultipleColorPickerInputElement = class UmbMultipleColorPickerInputElemen
|
|
|
143
134
|
label=${this.localize.term('general_add')}
|
|
144
135
|
look="placeholder"
|
|
145
136
|
color="default"
|
|
146
|
-
?disabled=${this.
|
|
137
|
+
?disabled=${this.readonly}
|
|
147
138
|
@click=${this.#onAdd}></uui-button>
|
|
148
139
|
`;
|
|
149
140
|
}
|
|
@@ -8,7 +8,7 @@ import { css, html, nothing, repeat, customElement, property, state } from '../.
|
|
|
8
8
|
import { UmbChangeEvent } from '../../event/index.js';
|
|
9
9
|
import { UmbLitElement } from '../../lit-element/index.js';
|
|
10
10
|
import { UmbSorterController } from '../../sorter/index.js';
|
|
11
|
-
import { UmbFormControlMixin } from '../../validation/index.js';
|
|
11
|
+
import { isAboveZeroAndBelowMinimum, UmbFormControlMixin } from '../../validation/index.js';
|
|
12
12
|
/**
|
|
13
13
|
* @element umb-input-multiple-text-string
|
|
14
14
|
*/
|
|
@@ -92,7 +92,7 @@ let UmbInputMultipleTextStringElement = class UmbInputMultipleTextStringElement
|
|
|
92
92
|
() => this.items.length > 0
|
|
93
93
|
);
|
|
94
94
|
*/
|
|
95
|
-
this.addValidator('rangeUnderflow', () => this.minMessage, () =>
|
|
95
|
+
this.addValidator('rangeUnderflow', () => this.minMessage, () => isAboveZeroAndBelowMinimum(this._items.length, this.min));
|
|
96
96
|
this.addValidator('rangeOverflow', () => this.maxMessage, () => !!this.max && this._items.length > this.max);
|
|
97
97
|
}
|
|
98
98
|
get items() {
|
|
@@ -166,7 +166,9 @@ let UmbInputMultipleTextStringElement = class UmbInputMultipleTextStringElement
|
|
|
166
166
|
`;
|
|
167
167
|
}
|
|
168
168
|
#renderAddButton() {
|
|
169
|
-
if (this.disabled
|
|
169
|
+
if (this.disabled)
|
|
170
|
+
return nothing;
|
|
171
|
+
if (this.readonly && this._items.length > 0)
|
|
170
172
|
return nothing;
|
|
171
173
|
if (this.max === 1 && this._items.length > 0)
|
|
172
174
|
return nothing;
|
|
@@ -176,7 +178,7 @@ let UmbInputMultipleTextStringElement = class UmbInputMultipleTextStringElement
|
|
|
176
178
|
id="action"
|
|
177
179
|
label="Add"
|
|
178
180
|
look="placeholder"
|
|
179
|
-
?disabled=${this.
|
|
181
|
+
?disabled=${this.readonly}
|
|
180
182
|
@click=${this.#onAdd}></uui-button>
|
|
181
183
|
`;
|
|
182
184
|
}
|
|
@@ -17,7 +17,6 @@ export interface MetaEntityActionDefaultKind extends MetaEntityAction {
|
|
|
17
17
|
/**
|
|
18
18
|
* The action requires additional input from the user.
|
|
19
19
|
* A dialog will prompt the user for more information or to make a choice.
|
|
20
|
-
* @type {boolean}
|
|
21
20
|
* @memberof MetaEntityActionDefaultKind
|
|
22
21
|
*/
|
|
23
22
|
additionalOptions?: boolean;
|
|
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { UmbEntityActionListElement } from '../../entity-action-list.element.js';
|
|
8
8
|
import { html, customElement, property, css, query } from '../../../../../external/lit/index.js';
|
|
9
9
|
import { UmbLitElement } from '../../../lit-element/index.js';
|
|
10
|
-
import { UUIScrollContainerElement } from '../../../../../external/uui/index.js';
|
|
11
10
|
let UmbEntityActionsDropdownElement = class UmbEntityActionsDropdownElement extends UmbLitElement {
|
|
12
11
|
constructor() {
|
|
13
12
|
super(...arguments);
|
|
@@ -17,7 +16,6 @@ let UmbEntityActionsDropdownElement = class UmbEntityActionsDropdownElement exte
|
|
|
17
16
|
this._dropdownElement?.closeDropdown();
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
|
-
#scrollContainerElement;
|
|
21
19
|
#entityActionListElement;
|
|
22
20
|
// Event handler as arrow function to maintain consistent reference
|
|
23
21
|
#onActionExecuted;
|
|
@@ -37,12 +35,11 @@ let UmbEntityActionsDropdownElement = class UmbEntityActionsDropdownElement exte
|
|
|
37
35
|
}
|
|
38
36
|
// First create dropdown content when the dropdown is opened.
|
|
39
37
|
// Programmatically create the elements so they are cached if the dropdown is opened again
|
|
40
|
-
|
|
38
|
+
// TODO: Clean up after a timeout. [NL]
|
|
41
39
|
this.#entityActionListElement = new UmbEntityActionListElement();
|
|
42
40
|
this.#entityActionListElement.addEventListener('action-executed', this.#onActionExecuted);
|
|
43
41
|
this.#entityActionListElement.setAttribute('label', this.label ?? '');
|
|
44
|
-
this
|
|
45
|
-
this._dropdownElement?.appendChild(this.#scrollContainerElement);
|
|
42
|
+
this._dropdownElement?.appendChild(this.#entityActionListElement);
|
|
46
43
|
}
|
|
47
44
|
render() {
|
|
48
45
|
return html `<umb-dropdown
|
|
@@ -12,7 +12,19 @@ let UmbEntityBulkActionDefaultElement = class UmbEntityBulkActionDefaultElement
|
|
|
12
12
|
if (!this.api)
|
|
13
13
|
return;
|
|
14
14
|
event.stopPropagation();
|
|
15
|
-
|
|
15
|
+
try {
|
|
16
|
+
await this.api.execute();
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
// The action did not complete, so it must not be announced as executed: consumers treat that
|
|
20
|
+
// event as "done" and tear down the selection — and with it this element — which would cut short
|
|
21
|
+
// any notification the failure is still presenting.
|
|
22
|
+
// A dismissed modal rejects with a reason rather than an Error; that is a cancellation, not a failure.
|
|
23
|
+
if (error instanceof Error) {
|
|
24
|
+
console.error('Error executing action:', error);
|
|
25
|
+
}
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
16
28
|
this.dispatchEvent(new UmbActionExecutedEvent());
|
|
17
29
|
}
|
|
18
30
|
render() {
|
package/dist-cms/packages/core/extension-registry/extensions/mfa-login-provider.extension.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface ManifestMfaLoginProvider extends ManifestElement {
|
|
|
3
3
|
type: 'mfaLoginProvider';
|
|
4
4
|
/**
|
|
5
5
|
* The provider names that this provider is for.
|
|
6
|
-
* @examples
|
|
6
|
+
* @examples ["Umbraco.GoogleAuthenticator"]
|
|
7
7
|
*/
|
|
8
8
|
forProviderName: string;
|
|
9
9
|
meta?: MetaMfaLoginProvider;
|
|
@@ -12,6 +12,7 @@ import { UMB_SECTION_CONTEXT } from '../section/index.js';
|
|
|
12
12
|
import { UMB_SUBMITTABLE_TREE_ENTITY_WORKSPACE_CONTEXT, UMB_WORKSPACE_EDIT_PATH_PATTERN, UMB_WORKSPACE_PATH_PATTERN, } from '../workspace/index.js';
|
|
13
13
|
// TODO: introduce base class for all menu structure workspaces to handle ancestors and parent
|
|
14
14
|
export class UmbMenuTreeStructureWorkspaceContextBase extends UmbContextBase {
|
|
15
|
+
#treeRepository;
|
|
15
16
|
#workspaceContext;
|
|
16
17
|
#args;
|
|
17
18
|
#structure;
|
|
@@ -151,7 +152,10 @@ export class UmbMenuTreeStructureWorkspaceContextBase extends UmbContextBase {
|
|
|
151
152
|
console.warn('[UmbMenuTreeStructureWorkspaceContextBase] entityType not available');
|
|
152
153
|
return;
|
|
153
154
|
}
|
|
154
|
-
const treeRepository = await createExtensionApiByAlias(this, this.#args.treeRepositoryAlias)
|
|
155
|
+
const treeRepository = await (this.#treeRepository ??= createExtensionApiByAlias(this, this.#args.treeRepositoryAlias).catch((error) => {
|
|
156
|
+
this.#treeRepository = undefined;
|
|
157
|
+
throw error;
|
|
158
|
+
}));
|
|
155
159
|
const { data: root } = await treeRepository.requestTreeRoot();
|
|
156
160
|
if (root) {
|
|
157
161
|
structureItems = [
|
|
@@ -46,7 +46,9 @@ export declare class UmbTestTreeRepository {
|
|
|
46
46
|
static root: UmbTreeRootModel;
|
|
47
47
|
static ancestors: Array<UmbTreeItemModel>;
|
|
48
48
|
static requestTreeItemAncestorsCalls: Array<UmbEntityModel>;
|
|
49
|
+
static createdCount: number;
|
|
49
50
|
static reset(): void;
|
|
51
|
+
constructor();
|
|
50
52
|
requestTreeRoot(): Promise<{
|
|
51
53
|
data: UmbTreeRootModel;
|
|
52
54
|
}>;
|
|
@@ -110,11 +110,16 @@ export class UmbTestTreeRepository {
|
|
|
110
110
|
static { this.root = DEFAULT_TEST_ROOT; }
|
|
111
111
|
static { this.ancestors = []; }
|
|
112
112
|
static { this.requestTreeItemAncestorsCalls = []; }
|
|
113
|
+
static { this.createdCount = 0; }
|
|
113
114
|
static reset() {
|
|
115
|
+
UmbTestTreeRepository.createdCount = 0;
|
|
114
116
|
UmbTestTreeRepository.root = DEFAULT_TEST_ROOT;
|
|
115
117
|
UmbTestTreeRepository.ancestors = [];
|
|
116
118
|
UmbTestTreeRepository.requestTreeItemAncestorsCalls = [];
|
|
117
119
|
}
|
|
120
|
+
constructor() {
|
|
121
|
+
UmbTestTreeRepository.createdCount++;
|
|
122
|
+
}
|
|
118
123
|
async requestTreeRoot() {
|
|
119
124
|
return { data: UmbTestTreeRepository.root };
|
|
120
125
|
}
|
|
@@ -13,6 +13,7 @@ import { UMB_SECTION_CONTEXT } from '../section/index.js';
|
|
|
13
13
|
import { UMB_SUBMITTABLE_TREE_ENTITY_WORKSPACE_CONTEXT, UMB_VARIANT_WORKSPACE_CONTEXT, UMB_WORKSPACE_EDIT_PATH_PATTERN, UMB_WORKSPACE_EDIT_VARIANT_PATH_PATTERN, UMB_WORKSPACE_PATH_PATTERN, } from '../workspace/index.js';
|
|
14
14
|
// TODO: introduce base class for all menu structure workspaces to handle ancestors and parent
|
|
15
15
|
export class UmbMenuVariantTreeStructureWorkspaceContextBase extends UmbContextBase {
|
|
16
|
+
#treeRepository;
|
|
16
17
|
#workspaceContext;
|
|
17
18
|
#args;
|
|
18
19
|
#structure;
|
|
@@ -172,7 +173,10 @@ export class UmbMenuVariantTreeStructureWorkspaceContextBase extends UmbContextB
|
|
|
172
173
|
return;
|
|
173
174
|
}
|
|
174
175
|
// TODO: introduce variant tree item model
|
|
175
|
-
const treeRepository = await createExtensionApiByAlias(this, this.#args.treeRepositoryAlias)
|
|
176
|
+
const treeRepository = await (this.#treeRepository ??= createExtensionApiByAlias(this, this.#args.treeRepositoryAlias).catch((error) => {
|
|
177
|
+
this.#treeRepository = undefined;
|
|
178
|
+
throw error;
|
|
179
|
+
}));
|
|
176
180
|
const { data: root } = await treeRepository.requestTreeRoot();
|
|
177
181
|
if (root) {
|
|
178
182
|
structureItems = [
|
package/dist-cms/packages/core/menu/menu-variant-tree-structure-workspace-context.test-utils.d.ts
CHANGED
|
@@ -20,7 +20,9 @@ export declare class UmbTestVariantTreeRepository {
|
|
|
20
20
|
static root: UmbTreeRootModel;
|
|
21
21
|
static ancestors: Array<UmbTestVariantTreeItemModel>;
|
|
22
22
|
static requestTreeItemAncestorsCalls: Array<UmbEntityModel>;
|
|
23
|
+
static createdCount: number;
|
|
23
24
|
static reset(): void;
|
|
25
|
+
constructor();
|
|
24
26
|
requestTreeRoot(): Promise<{
|
|
25
27
|
data: UmbTreeRootModel;
|
|
26
28
|
}>;
|
package/dist-cms/packages/core/menu/menu-variant-tree-structure-workspace-context.test-utils.js
CHANGED
|
@@ -31,11 +31,16 @@ export class UmbTestVariantTreeRepository {
|
|
|
31
31
|
static { this.root = DEFAULT_TEST_ROOT; }
|
|
32
32
|
static { this.ancestors = []; }
|
|
33
33
|
static { this.requestTreeItemAncestorsCalls = []; }
|
|
34
|
+
static { this.createdCount = 0; }
|
|
34
35
|
static reset() {
|
|
36
|
+
UmbTestVariantTreeRepository.createdCount = 0;
|
|
35
37
|
UmbTestVariantTreeRepository.root = DEFAULT_TEST_ROOT;
|
|
36
38
|
UmbTestVariantTreeRepository.ancestors = [];
|
|
37
39
|
UmbTestVariantTreeRepository.requestTreeItemAncestorsCalls = [];
|
|
38
40
|
}
|
|
41
|
+
constructor() {
|
|
42
|
+
UmbTestVariantTreeRepository.createdCount++;
|
|
43
|
+
}
|
|
39
44
|
async requestTreeRoot() {
|
|
40
45
|
return { data: UmbTestVariantTreeRepository.root };
|
|
41
46
|
}
|
package/dist-cms/packages/core/modal/common/discard-changes/discard-changes-modal.element.js
CHANGED
|
@@ -10,16 +10,21 @@ import { UmbTextStyles } from '../../../style/index.js';
|
|
|
10
10
|
let UmbDiscardChangesModalElement = class UmbDiscardChangesModalElement extends UmbModalBaseElement {
|
|
11
11
|
render() {
|
|
12
12
|
return html `
|
|
13
|
-
<uui-dialog-layout
|
|
13
|
+
<uui-dialog-layout
|
|
14
|
+
data-mark="discard-changes-modal"
|
|
15
|
+
class="uui-text"
|
|
16
|
+
headline=${this.localize.term('prompt_unsavedChanges')}>
|
|
14
17
|
<umb-localize key="prompt_unsavedChangesWarning"></umb-localize>
|
|
15
18
|
<uui-button
|
|
16
19
|
slot="actions"
|
|
17
20
|
id="cancel"
|
|
21
|
+
data-mark="action:stay"
|
|
18
22
|
label=${this.localize.term('prompt_stay')}
|
|
19
23
|
@click=${this._rejectModal}></uui-button>
|
|
20
24
|
<uui-button
|
|
21
25
|
slot="actions"
|
|
22
26
|
id="confirm"
|
|
27
|
+
data-mark="action:discard-changes"
|
|
23
28
|
color="danger"
|
|
24
29
|
look="primary"
|
|
25
30
|
label=${this.localize.term('prompt_discardChanges')}
|
|
@@ -26,7 +26,7 @@ export declare class UmbNotificationHandler {
|
|
|
26
26
|
*/
|
|
27
27
|
close(...args: any): void;
|
|
28
28
|
/**
|
|
29
|
-
* @returns {Promise<unknown>} A promise that resolves
|
|
29
|
+
* @returns {Promise<unknown>} A promise that resolves once the notification closes, whether through `close()`, the user dismissing it, or its duration running out. It resolves with the value given to `close()`, if any.
|
|
30
30
|
* @memberof UmbNotificationHandler
|
|
31
31
|
*/
|
|
32
32
|
onClose(): Promise<any>;
|
|
@@ -23,6 +23,7 @@ export class UmbNotificationHandler {
|
|
|
23
23
|
const notification = document.createElement('uui-toast-notification');
|
|
24
24
|
notification.color = this.color;
|
|
25
25
|
notification.autoClose = this.duration;
|
|
26
|
+
notification.addEventListener('closed', () => this._closeResolver(), { once: true });
|
|
26
27
|
const element = document.createElement(this._elementName);
|
|
27
28
|
element.data = this._data;
|
|
28
29
|
element.notificationHandler = this;
|
|
@@ -38,7 +39,7 @@ export class UmbNotificationHandler {
|
|
|
38
39
|
this.element.open = false;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
|
-
* @returns {Promise<unknown>} A promise that resolves
|
|
42
|
+
* @returns {Promise<unknown>} A promise that resolves once the notification closes, whether through `close()`, the user dismissing it, or its duration running out. It resolves with the value given to `close()`, if any.
|
|
42
43
|
* @memberof UmbNotificationHandler
|
|
43
44
|
*/
|
|
44
45
|
onClose() {
|
|
@@ -11,12 +11,12 @@ export declare class UmbInputPropertyEditorDataSourceElement extends UmbInputPro
|
|
|
11
11
|
set min(value: number);
|
|
12
12
|
get min(): number;
|
|
13
13
|
/**
|
|
14
|
-
* Min validation message.
|
|
14
|
+
* Min validation message. When not set, a localized message stating the minimum and how many more items are needed is used.
|
|
15
15
|
* @type {string}
|
|
16
16
|
* @attr
|
|
17
|
-
* @default
|
|
17
|
+
* @default undefined
|
|
18
18
|
*/
|
|
19
|
-
minMessage
|
|
19
|
+
minMessage?: string;
|
|
20
20
|
/**
|
|
21
21
|
* This is a maximum amount of selected items in this input.
|
|
22
22
|
* @type {number}
|
|
@@ -26,12 +26,12 @@ export declare class UmbInputPropertyEditorDataSourceElement extends UmbInputPro
|
|
|
26
26
|
set max(value: number);
|
|
27
27
|
get max(): number;
|
|
28
28
|
/**
|
|
29
|
-
* Max validation message.
|
|
29
|
+
* Max validation message. When not set, a localized message stating the maximum and how many items are over it is used.
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @attr
|
|
32
|
-
* @default
|
|
32
|
+
* @default undefined
|
|
33
33
|
*/
|
|
34
|
-
maxMessage
|
|
34
|
+
maxMessage?: string;
|
|
35
35
|
set selection(uniques: Array<string>);
|
|
36
36
|
get selection(): Array<string>;
|
|
37
37
|
set value(uniques: string);
|
|
@@ -11,6 +11,7 @@ import { UmbChangeEvent } from '../../event/index.js';
|
|
|
11
11
|
import { UmbLitElement } from '../../lit-element/index.js';
|
|
12
12
|
import { UmbSorterController } from '../../sorter/index.js';
|
|
13
13
|
import { UUIFormControlMixin } from '../../../../external/uui/index.js';
|
|
14
|
+
import { isAboveZeroAndBelowMinimum } from '../../validation/index.js';
|
|
14
15
|
let UmbInputPropertyEditorDataSourceElement = class UmbInputPropertyEditorDataSourceElement extends UUIFormControlMixin(UmbLitElement, '') {
|
|
15
16
|
#sorter;
|
|
16
17
|
/**
|
|
@@ -33,6 +34,7 @@ let UmbInputPropertyEditorDataSourceElement = class UmbInputPropertyEditorDataSo
|
|
|
33
34
|
*/
|
|
34
35
|
set max(value) {
|
|
35
36
|
this.#pickerInputContext.max = value;
|
|
37
|
+
this.#updateSorterEnabled();
|
|
36
38
|
}
|
|
37
39
|
get max() {
|
|
38
40
|
return this.#pickerInputContext.max;
|
|
@@ -61,14 +63,17 @@ let UmbInputPropertyEditorDataSourceElement = class UmbInputPropertyEditorDataSo
|
|
|
61
63
|
}
|
|
62
64
|
set readonly(value) {
|
|
63
65
|
this.#readonly = value;
|
|
64
|
-
|
|
66
|
+
this.#updateSorterEnabled();
|
|
67
|
+
}
|
|
68
|
+
#readonly;
|
|
69
|
+
#updateSorterEnabled() {
|
|
70
|
+
if (this.readonly || this.max === 1) {
|
|
65
71
|
this.#sorter.disable();
|
|
66
72
|
}
|
|
67
73
|
else {
|
|
68
74
|
this.#sorter.enable();
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
|
-
#readonly;
|
|
72
77
|
set dataSourceTypes(value) {
|
|
73
78
|
this.#pickerInputContext.setDataSourceTypes(value);
|
|
74
79
|
}
|
|
@@ -93,25 +98,13 @@ let UmbInputPropertyEditorDataSourceElement = class UmbInputPropertyEditorDataSo
|
|
|
93
98
|
this.dispatchEvent(new UmbChangeEvent());
|
|
94
99
|
},
|
|
95
100
|
});
|
|
96
|
-
/**
|
|
97
|
-
* Min validation message.
|
|
98
|
-
* @type {string}
|
|
99
|
-
* @attr
|
|
100
|
-
* @default
|
|
101
|
-
*/
|
|
102
|
-
this.minMessage = 'This field needs more items';
|
|
103
|
-
/**
|
|
104
|
-
* Max validation message.
|
|
105
|
-
* @type {string}
|
|
106
|
-
* @attr
|
|
107
|
-
* @default
|
|
108
|
-
*/
|
|
109
|
-
this.maxMessage = 'This field exceeds the allowed amount of items';
|
|
110
101
|
this.#readonly = false;
|
|
111
102
|
this._items = [];
|
|
112
103
|
this.#pickerInputContext = new UmbPropertyEditorDataSourcePickerInputContext(this);
|
|
113
|
-
this.addValidator('rangeUnderflow', () => this.minMessage
|
|
114
|
-
|
|
104
|
+
this.addValidator('rangeUnderflow', () => this.minMessage ||
|
|
105
|
+
this.localize.term('validation_entriesShort', this.min, (this.min ?? 0) - this.#pickerInputContext.getSelection().length), () => isAboveZeroAndBelowMinimum(this.#pickerInputContext.getSelection().length, this.min));
|
|
106
|
+
this.addValidator('rangeOverflow', () => this.maxMessage ||
|
|
107
|
+
this.localize.term('validation_entriesExceed', this.max, this.#pickerInputContext.getSelection().length - (this.max ?? 0)), () => !!this.max && this.#pickerInputContext.getSelection().length > this.max);
|
|
115
108
|
this.observe(this.#pickerInputContext.selection, (selection) => (this.value = selection.join(',')), null);
|
|
116
109
|
this.observe(this.#pickerInputContext.selectedItems, (selectedItems) => (this._items = selectedItems), null);
|
|
117
110
|
this.observe(this.#pickerInputContext.statuses, (statuses) => (this._statuses = statuses), null);
|
|
@@ -129,6 +122,8 @@ let UmbInputPropertyEditorDataSourceElement = class UmbInputPropertyEditorDataSo
|
|
|
129
122
|
return html `${this.#renderItems()} ${this.#renderAddButton()}`;
|
|
130
123
|
}
|
|
131
124
|
#renderAddButton() {
|
|
125
|
+
if (this.readonly && this.selection.length > 0)
|
|
126
|
+
return nothing;
|
|
132
127
|
if (this.max > 0 && this.selection.length >= this.max)
|
|
133
128
|
return nothing;
|
|
134
129
|
return html `
|
|
@@ -136,7 +131,8 @@ let UmbInputPropertyEditorDataSourceElement = class UmbInputPropertyEditorDataSo
|
|
|
136
131
|
id="btn-add"
|
|
137
132
|
look="placeholder"
|
|
138
133
|
@click=${this.#openPicker}
|
|
139
|
-
label="${this.localize.term('general_choose')}"
|
|
134
|
+
label="${this.localize.term('general_choose')}"
|
|
135
|
+
?disabled=${this.readonly}></uui-button>
|
|
140
136
|
`;
|
|
141
137
|
}
|
|
142
138
|
#renderItems() {
|
|
@@ -54,7 +54,9 @@ export declare class UmbRepositoryDetailsManager<DetailType extends {
|
|
|
54
54
|
*/
|
|
55
55
|
addUnique(unique: string): void;
|
|
56
56
|
/**
|
|
57
|
-
* Add an entry to the manager
|
|
57
|
+
* Add an entry to the manager. Once added, the entry follows the repository store, if the repository
|
|
58
|
+
* provides one, so the data passed in is replaced when the store emits the same entry. An empty store
|
|
59
|
+
* value keeps the entry as it is.
|
|
58
60
|
* @param {DetailType} data - The entry to add.
|
|
59
61
|
* @memberof UmbRepositoryDetailsManager
|
|
60
62
|
*/
|
|
@@ -112,7 +112,9 @@ export class UmbRepositoryDetailsManager extends UmbControllerBase {
|
|
|
112
112
|
this.#uniques.appendOne(unique);
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
|
-
* Add an entry to the manager
|
|
115
|
+
* Add an entry to the manager. Once added, the entry follows the repository store, if the repository
|
|
116
|
+
* provides one, so the data passed in is replaced when the store emits the same entry. An empty store
|
|
117
|
+
* value keeps the entry as it is.
|
|
116
118
|
* @param {DetailType} data - The entry to add.
|
|
117
119
|
* @memberof UmbRepositoryDetailsManager
|
|
118
120
|
*/
|
|
@@ -128,7 +130,20 @@ export class UmbRepositoryDetailsManager extends UmbControllerBase {
|
|
|
128
130
|
unique,
|
|
129
131
|
});
|
|
130
132
|
this.#uniques.appendOne(unique);
|
|
131
|
-
|
|
133
|
+
void this.#observeAddedEntry(unique);
|
|
134
|
+
}
|
|
135
|
+
// Follows the store so a change saved elsewhere in this client is reflected right away, rather than only after
|
|
136
|
+
// the entity-updated event has re-requested it. The entry was not loaded through the store, so it may not be there:
|
|
137
|
+
async #observeAddedEntry(unique) {
|
|
138
|
+
await this.#init;
|
|
139
|
+
const observable = await this.repository?.byUnique?.(unique);
|
|
140
|
+
if (!observable || !this.getUniques().includes(unique))
|
|
141
|
+
return;
|
|
142
|
+
this.observe(observable, (data) => {
|
|
143
|
+
if (data) {
|
|
144
|
+
this.#entries.updateOne(unique, data);
|
|
145
|
+
}
|
|
146
|
+
}, 'observeEntry_' + unique);
|
|
132
147
|
}
|
|
133
148
|
/**
|
|
134
149
|
* Get all entries in the manager
|