@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
package/dist-cms/packages/core/workspace/controllers/resolve-stale-variant-route.function.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UMB_WORKSPACE_PATH_VARIANT_DELIMITER } from './constants.js';
|
|
2
2
|
import { UMB_MODAL_ROUTE_PATH_SEGMENT } from '../../router/index.js';
|
|
3
|
+
import { UmbDeprecation } from '../../utils/index.js';
|
|
3
4
|
import { UmbVariantId } from '../../variant/index.js';
|
|
4
5
|
/**
|
|
5
6
|
* Checks whether the variant part of a workspace URL refers to variant options that no longer exist —
|
|
@@ -7,8 +8,14 @@ import { UmbVariantId } from '../../variant/index.js';
|
|
|
7
8
|
* Split-view parts are resolved individually and deduplicated.
|
|
8
9
|
* @param {UmbStaleVariantRouteResolverArgs} args - The current path, workspace route, variant options and app culture.
|
|
9
10
|
* @returns {string | null} The corrected path without the query string, or null when the URL is valid or not applicable.
|
|
11
|
+
* @deprecated Deprecated since v17.9. This is specific to content workspaces and no longer used by the core. Scheduled for removal in Umbraco 20.
|
|
10
12
|
*/
|
|
11
13
|
export function resolveStaleVariantRoute(args) {
|
|
14
|
+
new UmbDeprecation({
|
|
15
|
+
deprecated: 'resolveStaleVariantRoute is deprecated.',
|
|
16
|
+
removeInVersion: '20.0.0',
|
|
17
|
+
solution: 'It is specific to content workspaces and is no longer used by the core; there is no replacement.',
|
|
18
|
+
}).warn();
|
|
12
19
|
const { currentPath, workspaceRoute, variants, appCulture } = args;
|
|
13
20
|
if (variants.length === 0)
|
|
14
21
|
return null;
|
|
@@ -3,6 +3,7 @@ import { UmbControllerBase } from '../../../../libs/class-api/index.js';
|
|
|
3
3
|
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* The accessors providing the current workspace state to {@link UmbWorkspaceStaleVariantRedirectController}.
|
|
6
|
+
* @deprecated Deprecated since v17.9. Scheduled for removal in Umbraco 20.
|
|
6
7
|
*/
|
|
7
8
|
export interface UmbWorkspaceStaleVariantRedirectControllerArgs {
|
|
8
9
|
getWorkspaceRoute: () => string | undefined;
|
|
@@ -13,6 +14,8 @@ export interface UmbWorkspaceStaleVariantRedirectControllerArgs {
|
|
|
13
14
|
* Redirects the workspace URL to the best matching variant when its variant part no longer maps to an
|
|
14
15
|
* existing variant option — e.g. after the content type's variance changed. Re-validates on every
|
|
15
16
|
* navigation, as closing a modal restores the pre-modal URL, which may hold a stale variant.
|
|
17
|
+
* @deprecated Deprecated since v17.9. A URL referring to a variant that does not exist should show Not Found
|
|
18
|
+
* rather than be redirected silently. Scheduled for removal in Umbraco 20.
|
|
16
19
|
*/
|
|
17
20
|
export declare class UmbWorkspaceStaleVariantRedirectController extends UmbControllerBase {
|
|
18
21
|
#private;
|
package/dist-cms/packages/core/workspace/controllers/workspace-stale-variant-redirect.controller.js
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { resolveStaleVariantRoute } from './resolve-stale-variant-route.function.js';
|
|
2
2
|
import { UmbControllerBase } from '../../../../libs/class-api/index.js';
|
|
3
|
+
import { UmbDeprecation } from '../../utils/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* Redirects the workspace URL to the best matching variant when its variant part no longer maps to an
|
|
5
6
|
* existing variant option — e.g. after the content type's variance changed. Re-validates on every
|
|
6
7
|
* navigation, as closing a modal restores the pre-modal URL, which may hold a stale variant.
|
|
8
|
+
* @deprecated Deprecated since v17.9. A URL referring to a variant that does not exist should show Not Found
|
|
9
|
+
* rather than be redirected silently. Scheduled for removal in Umbraco 20.
|
|
7
10
|
*/
|
|
8
11
|
export class UmbWorkspaceStaleVariantRedirectController extends UmbControllerBase {
|
|
9
12
|
#args;
|
|
10
13
|
constructor(host, args) {
|
|
11
14
|
super(host);
|
|
15
|
+
new UmbDeprecation({
|
|
16
|
+
deprecated: 'UmbWorkspaceStaleVariantRedirectController is deprecated.',
|
|
17
|
+
removeInVersion: '20.0.0',
|
|
18
|
+
solution: 'A URL referring to a variant that does not exist should show Not Found rather than be redirected.',
|
|
19
|
+
}).warn();
|
|
12
20
|
this.#args = args;
|
|
13
21
|
}
|
|
14
22
|
#onChangeState = () => this.redirect();
|
|
@@ -5,7 +5,7 @@ import type { UmbEntityDetailWorkspaceContextArgs, UmbEntityDetailWorkspaceConte
|
|
|
5
5
|
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
|
|
6
6
|
import { type UmbEntityModel, type UmbEntityUnique } from '../../entity/index.js';
|
|
7
7
|
import type { UmbDetailRepository, UmbRepositoryResponse, UmbRepositoryResponseWithAsObservable } from '../../repository/index.js';
|
|
8
|
-
import { UmbStateManager } from '../../utils/index.js';
|
|
8
|
+
import { UmbReadOnlyGuardManager, UmbStateManager, type UmbGuardRule } from '../../utils/index.js';
|
|
9
9
|
import { UmbValidationContext } from '../../validation/index.js';
|
|
10
10
|
export declare abstract class UmbEntityDetailWorkspaceContextBase<DetailModelType extends UmbEntityModel = UmbEntityModel, DetailRepositoryType extends UmbDetailRepository<DetailModelType> = UmbDetailRepository<DetailModelType>, CreateArgsType extends UmbEntityDetailWorkspaceContextCreateArgs<DetailModelType> = UmbEntityDetailWorkspaceContextCreateArgs<DetailModelType>> extends UmbSubmittableWorkspaceContextBase<DetailModelType> implements UmbSubmittableTreeEntityWorkspaceContext {
|
|
11
11
|
#private;
|
|
@@ -22,6 +22,12 @@ export declare abstract class UmbEntityDetailWorkspaceContextBase<DetailModelTyp
|
|
|
22
22
|
readonly persistedData: import("rxjs").Observable<DetailModelType | undefined>;
|
|
23
23
|
readonly loading: UmbStateManager<import("../../utils/index.js").UmbState>;
|
|
24
24
|
readonly forbidden: UmbStateManager<import("../../utils/index.js").UmbState>;
|
|
25
|
+
/**
|
|
26
|
+
* Decides whether the entity is read-only. A rule with `permitted: true` makes the entity read-only, and its
|
|
27
|
+
* `message` explains why. A read-only entity can't be submitted. Rules are cleared whenever the workspace loads or
|
|
28
|
+
* creates an entity, so they apply to that entity only.
|
|
29
|
+
*/
|
|
30
|
+
readonly readOnlyGuard: UmbReadOnlyGuardManager<UmbGuardRule>;
|
|
25
31
|
protected _getDataPromise?: Promise<UmbRepositoryResponse<DetailModelType> | UmbRepositoryResponseWithAsObservable<DetailModelType>>;
|
|
26
32
|
protected _detailRepository?: DetailRepositoryType;
|
|
27
33
|
readonly _internal_createUnderParent: import("rxjs").Observable<UmbEntityModel | undefined>;
|
|
@@ -162,6 +168,7 @@ export declare abstract class UmbEntityDetailWorkspaceContextBase<DetailModelTyp
|
|
|
162
168
|
*/
|
|
163
169
|
protected _scaffoldProcessData(data: DetailModelType): Promise<DetailModelType>;
|
|
164
170
|
protected _processIncomingData(data: DetailModelType): Promise<DetailModelType>;
|
|
171
|
+
requestSubmit(): Promise<void>;
|
|
165
172
|
submit(): Promise<void>;
|
|
166
173
|
/**
|
|
167
174
|
* Deletes the entity.
|
|
@@ -9,7 +9,7 @@ import { UmbObjectState, UmbStringState } from '../../../../libs/observable-api/
|
|
|
9
9
|
import { UmbEntityUpdatedEvent, UmbRequestReloadChildrenOfEntityEvent, UmbRequestReloadStructureForEntityEvent, } from '../../entity-action/index.js';
|
|
10
10
|
import { UmbExtensionApiInitializer } from '../../../../libs/extension-api/index.js';
|
|
11
11
|
import { umbExtensionsRegistry } from '../../extension-registry/index.js';
|
|
12
|
-
import { UmbStateManager } from '../../utils/index.js';
|
|
12
|
+
import { UmbReadOnlyGuardManager, UmbStateManager } from '../../utils/index.js';
|
|
13
13
|
import { UmbValidationContext } from '../../validation/index.js';
|
|
14
14
|
import { UmbId } from '../../id/index.js';
|
|
15
15
|
import { UmbApiError } from '../../resources/index.js';
|
|
@@ -40,6 +40,12 @@ export class UmbEntityDetailWorkspaceContextBase extends UmbSubmittableWorkspace
|
|
|
40
40
|
this.persistedData = this._data.persisted;
|
|
41
41
|
this.loading = new UmbStateManager(this);
|
|
42
42
|
this.forbidden = new UmbStateManager(this);
|
|
43
|
+
/**
|
|
44
|
+
* Decides whether the entity is read-only. A rule with `permitted: true` makes the entity read-only, and its
|
|
45
|
+
* `message` explains why. A read-only entity can't be submitted. Rules are cleared whenever the workspace loads or
|
|
46
|
+
* creates an entity, so they apply to that entity only.
|
|
47
|
+
*/
|
|
48
|
+
this.readOnlyGuard = new UmbReadOnlyGuardManager(this);
|
|
43
49
|
this.#createUnderParent = new UmbObjectState(undefined);
|
|
44
50
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
45
51
|
this._internal_createUnderParent = this.#createUnderParent.asObservable();
|
|
@@ -370,6 +376,11 @@ export class UmbEntityDetailWorkspaceContextBase extends UmbSubmittableWorkspace
|
|
|
370
376
|
async _processIncomingData(data) {
|
|
371
377
|
return data;
|
|
372
378
|
}
|
|
379
|
+
async requestSubmit() {
|
|
380
|
+
if (this.readOnlyGuard.getPermitted())
|
|
381
|
+
return;
|
|
382
|
+
return super.requestSubmit();
|
|
383
|
+
}
|
|
373
384
|
async submit() {
|
|
374
385
|
await this.#init;
|
|
375
386
|
const currentData = this.getData();
|
|
@@ -474,6 +485,7 @@ export class UmbEntityDetailWorkspaceContextBase extends UmbSubmittableWorkspace
|
|
|
474
485
|
}
|
|
475
486
|
resetState() {
|
|
476
487
|
super.resetState();
|
|
488
|
+
this.readOnlyGuard.clearRules();
|
|
477
489
|
this.loading.clear();
|
|
478
490
|
this.forbidden.clear();
|
|
479
491
|
this._data.clear();
|
|
@@ -110,7 +110,7 @@ let UmbEntityDetailWorkspaceEditorElement = class UmbEntityDetailWorkspaceEditor
|
|
|
110
110
|
<umb-workspace-editor
|
|
111
111
|
?loading=${this._isLoading}
|
|
112
112
|
.backPath=${(this.showBackToParentButton ? this._navigationParentItemPath : undefined) ?? this.#backPath}
|
|
113
|
-
class="${this._exists === false ? 'hide' : ''}">
|
|
113
|
+
class="${this._exists === false || this._isForbidden ? 'hide' : ''}">
|
|
114
114
|
<slot name="header" slot="header"></slot>
|
|
115
115
|
${this.#renderEntityActions()}
|
|
116
116
|
<slot></slot>
|
|
@@ -5,7 +5,7 @@ export interface ManifestWorkspaceActionMenuItem<MetaType extends MetaWorkspaceA
|
|
|
5
5
|
type: 'workspaceActionMenuItem';
|
|
6
6
|
/**
|
|
7
7
|
* Define which workspace actions this menu item should be shown for.
|
|
8
|
-
* @examples [[
|
|
8
|
+
* @examples [["Umb.WorkspaceAction.Document.Save", "Umb.WorkspaceAction.Document.SaveAndPublish"], "Umb.WorkspaceAction.Document.Save"]
|
|
9
9
|
* @required
|
|
10
10
|
*/
|
|
11
11
|
forWorkspaceActions: string | string[];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { UmbWorkspaceContext } from '../workspace-context.interface.js';
|
|
2
2
|
import type { UmbNameWriteGuardManager } from './name-write-guard.manager.js';
|
|
3
3
|
import type { Observable } from '../../../../external/rxjs/index.js';
|
|
4
|
+
import type { UmbGuardRule, UmbReadOnlyGuardManager } from '../../utils/index.js';
|
|
4
5
|
export interface UmbNamableWorkspaceContext extends UmbWorkspaceContext {
|
|
5
6
|
name: Observable<string | undefined>;
|
|
6
7
|
getName(): string | undefined;
|
|
7
8
|
setName(name: string): void;
|
|
8
9
|
nameWriteGuard?: UmbNameWriteGuardManager;
|
|
10
|
+
readonly readOnlyGuard?: UmbReadOnlyGuardManager<UmbGuardRule>;
|
|
9
11
|
}
|
|
@@ -5,7 +5,8 @@ import { UmbContextBase } from '../../../../libs/class-api/index.js';
|
|
|
5
5
|
import { UmbVariantId } from '../../variant/index.js';
|
|
6
6
|
import { type Observable } from '../../../../libs/observable-api/index.js';
|
|
7
7
|
/**
|
|
8
|
-
* A property dataset context that hooks directly into the workspace context.
|
|
8
|
+
* A property dataset context that hooks directly into the workspace context. It is read-only while the workspace
|
|
9
|
+
* entity is read-only.
|
|
9
10
|
*/
|
|
10
11
|
export declare class UmbInvariantWorkspacePropertyDatasetContext<WorkspaceType extends UmbInvariantDatasetWorkspaceContext = UmbInvariantDatasetWorkspaceContext> extends UmbContextBase implements UmbPropertyDatasetContext, UmbNameablePropertyDatasetContext {
|
|
11
12
|
#private;
|
|
@@ -3,7 +3,8 @@ import { UmbContextBase } from '../../../../libs/class-api/index.js';
|
|
|
3
3
|
import { UmbVariantContext, UmbVariantId } from '../../variant/index.js';
|
|
4
4
|
import { UmbBooleanState } from '../../../../libs/observable-api/index.js';
|
|
5
5
|
/**
|
|
6
|
-
* A property dataset context that hooks directly into the workspace context.
|
|
6
|
+
* A property dataset context that hooks directly into the workspace context. It is read-only while the workspace
|
|
7
|
+
* entity is read-only.
|
|
7
8
|
*/
|
|
8
9
|
export class UmbInvariantWorkspacePropertyDatasetContext extends UmbContextBase {
|
|
9
10
|
#readOnly;
|
|
@@ -33,6 +34,10 @@ export class UmbInvariantWorkspacePropertyDatasetContext extends UmbContextBase
|
|
|
33
34
|
this.#workspace = workspace;
|
|
34
35
|
this.name = this.#workspace.name;
|
|
35
36
|
this.#variantContext.setVariantId(this.getVariantId());
|
|
37
|
+
this.#observeReadOnly();
|
|
38
|
+
}
|
|
39
|
+
#observeReadOnly() {
|
|
40
|
+
this.observe(this.#workspace.readOnlyGuard?.permitted, (isReadOnly) => this.#readOnly.setValue(isReadOnly ?? false), null);
|
|
36
41
|
}
|
|
37
42
|
get properties() {
|
|
38
43
|
return this.#workspace.values;
|
|
@@ -11,12 +11,12 @@ export declare class UmbDataTypeInputElement extends UmbDataTypeInputElement_bas
|
|
|
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 UmbDataTypeInputElement extends UmbDataTypeInputElement_bas
|
|
|
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,9 +11,24 @@ import { UmbChangeEvent } from '../../../core/event/index.js';
|
|
|
11
11
|
import { UmbLitElement } from '../../../core/lit-element/index.js';
|
|
12
12
|
import { UmbSorterController } from '../../../core/sorter/index.js';
|
|
13
13
|
import { UUIFormControlMixin } from '../../../../external/uui/index.js';
|
|
14
|
+
import { isAboveZeroAndBelowMinimum } from '../../../core/validation/index.js';
|
|
14
15
|
// TODO: Rename to 'umb-input-data-type'. [LK]
|
|
15
16
|
let UmbDataTypeInputElement = class UmbDataTypeInputElement extends UUIFormControlMixin(UmbLitElement, '') {
|
|
16
|
-
#sorter
|
|
17
|
+
#sorter = new UmbSorterController(this, {
|
|
18
|
+
getUniqueOfElement: (element) => {
|
|
19
|
+
return element.id;
|
|
20
|
+
},
|
|
21
|
+
getUniqueOfModel: (modelEntry) => {
|
|
22
|
+
return modelEntry;
|
|
23
|
+
},
|
|
24
|
+
identifier: 'Umb.SorterIdentifier.InputDataType',
|
|
25
|
+
itemSelector: 'uui-ref-node-data-type',
|
|
26
|
+
containerSelector: 'uui-ref-list',
|
|
27
|
+
onChange: ({ model }) => {
|
|
28
|
+
this.selection = model;
|
|
29
|
+
this.dispatchEvent(new UmbChangeEvent());
|
|
30
|
+
},
|
|
31
|
+
});
|
|
17
32
|
/**
|
|
18
33
|
* This is a minimum amount of selected items in this input.
|
|
19
34
|
* @type {number}
|
|
@@ -34,6 +49,12 @@ let UmbDataTypeInputElement = class UmbDataTypeInputElement extends UUIFormContr
|
|
|
34
49
|
*/
|
|
35
50
|
set max(value) {
|
|
36
51
|
this.#pickerContext.max = value;
|
|
52
|
+
if (value === 1) {
|
|
53
|
+
this.#sorter.disable();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.#sorter.enable();
|
|
57
|
+
}
|
|
37
58
|
}
|
|
38
59
|
get max() {
|
|
39
60
|
return this.#pickerContext.max;
|
|
@@ -51,41 +72,13 @@ let UmbDataTypeInputElement = class UmbDataTypeInputElement extends UUIFormContr
|
|
|
51
72
|
get value() {
|
|
52
73
|
return this.selection.join(',');
|
|
53
74
|
}
|
|
54
|
-
#pickerContext;
|
|
75
|
+
#pickerContext = new UmbDataTypePickerInputContext(this);
|
|
55
76
|
constructor() {
|
|
56
77
|
super();
|
|
57
|
-
this
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
getUniqueOfModel: (modelEntry) => {
|
|
62
|
-
return modelEntry;
|
|
63
|
-
},
|
|
64
|
-
identifier: 'Umb.SorterIdentifier.InputDataType',
|
|
65
|
-
itemSelector: 'uui-ref-node-data-type',
|
|
66
|
-
containerSelector: 'uui-ref-list',
|
|
67
|
-
onChange: ({ model }) => {
|
|
68
|
-
this.selection = model;
|
|
69
|
-
this.dispatchEvent(new UmbChangeEvent());
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
/**
|
|
73
|
-
* Min validation message.
|
|
74
|
-
* @type {string}
|
|
75
|
-
* @attr
|
|
76
|
-
* @default
|
|
77
|
-
*/
|
|
78
|
-
this.minMessage = 'This field needs more items';
|
|
79
|
-
/**
|
|
80
|
-
* Max validation message.
|
|
81
|
-
* @type {string}
|
|
82
|
-
* @attr
|
|
83
|
-
* @default
|
|
84
|
-
*/
|
|
85
|
-
this.maxMessage = 'This field exceeds the allowed amount of items';
|
|
86
|
-
this.#pickerContext = new UmbDataTypePickerInputContext(this);
|
|
87
|
-
this.addValidator('rangeUnderflow', () => this.minMessage, () => !!this.min && this.#pickerContext.getSelection().length < this.min);
|
|
88
|
-
this.addValidator('rangeOverflow', () => this.maxMessage, () => !!this.max && this.#pickerContext.getSelection().length > this.max);
|
|
78
|
+
this.addValidator('rangeUnderflow', () => this.minMessage ||
|
|
79
|
+
this.localize.term('validation_entriesShort', this.min, (this.min ?? 0) - this.#pickerContext.getSelection().length), () => isAboveZeroAndBelowMinimum(this.#pickerContext.getSelection().length, this.min));
|
|
80
|
+
this.addValidator('rangeOverflow', () => this.maxMessage ||
|
|
81
|
+
this.localize.term('validation_entriesExceed', this.max, this.#pickerContext.getSelection().length - (this.max ?? 0)), () => !!this.max && this.#pickerContext.getSelection().length > this.max);
|
|
89
82
|
this.observe(this.#pickerContext.selection, (selection) => (this.value = selection.join(',')), null);
|
|
90
83
|
this.observe(this.#pickerContext.selectedItems, (selectedItems) => (this._items = selectedItems), null);
|
|
91
84
|
}
|
|
@@ -9,6 +9,7 @@ export declare class UmbDataTypeDetailsWorkspacePropertyEditorPickerElement exte
|
|
|
9
9
|
propertyEditorUiName?: string;
|
|
10
10
|
propertyEditorUiAlias?: string;
|
|
11
11
|
propertyEditorSchemaAlias?: string;
|
|
12
|
+
readonly: boolean;
|
|
12
13
|
constructor();
|
|
13
14
|
protected getFormElement(): undefined;
|
|
14
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -19,6 +19,7 @@ let UmbDataTypeDetailsWorkspacePropertyEditorPickerElement = class UmbDataTypeDe
|
|
|
19
19
|
#addButton;
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
|
+
this.readonly = false;
|
|
22
23
|
this.consumeContext(UMB_DATA_TYPE_WORKSPACE_CONTEXT, (workspaceContext) => {
|
|
23
24
|
this.#workspaceContext = workspaceContext;
|
|
24
25
|
});
|
|
@@ -68,19 +69,27 @@ let UmbDataTypeDetailsWorkspacePropertyEditorPickerElement = class UmbDataTypeDe
|
|
|
68
69
|
alias=${alias}
|
|
69
70
|
property-editor-schema-alias=${this.propertyEditorSchemaAlias}
|
|
70
71
|
standalone
|
|
72
|
+
?readonly=${this.readonly}
|
|
71
73
|
?error=${error}
|
|
72
|
-
@open=${this.#openPropertyEditorUIPicker}>
|
|
74
|
+
@open=${this.readonly ? nothing : this.#openPropertyEditorUIPicker}>
|
|
73
75
|
${this.propertyEditorUiIcon
|
|
74
76
|
? html `<umb-icon name=${this.propertyEditorUiIcon} slot="icon"></umb-icon>`
|
|
75
77
|
: nothing}
|
|
76
|
-
|
|
77
|
-
<uui-button
|
|
78
|
-
label=${this.localize.term('general_change')}
|
|
79
|
-
@click=${this.#openPropertyEditorUIPicker}></uui-button>
|
|
80
|
-
</uui-action-bar>
|
|
78
|
+
${this.#renderPropertyEditorUiActions()}
|
|
81
79
|
</umb-ref-property-editor-ui>
|
|
82
80
|
`;
|
|
83
81
|
}
|
|
82
|
+
#renderPropertyEditorUiActions() {
|
|
83
|
+
if (this.readonly)
|
|
84
|
+
return nothing;
|
|
85
|
+
return html `
|
|
86
|
+
<uui-action-bar slot="actions">
|
|
87
|
+
<uui-button
|
|
88
|
+
label=${this.localize.term('general_change')}
|
|
89
|
+
@click=${this.#openPropertyEditorUIPicker}></uui-button>
|
|
90
|
+
</uui-action-bar>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
84
93
|
#renderChooseButton() {
|
|
85
94
|
return html `
|
|
86
95
|
<uui-button
|
|
@@ -89,6 +98,7 @@ let UmbDataTypeDetailsWorkspacePropertyEditorPickerElement = class UmbDataTypeDe
|
|
|
89
98
|
look="placeholder"
|
|
90
99
|
color="default"
|
|
91
100
|
required
|
|
101
|
+
?disabled=${this.readonly}
|
|
92
102
|
@click=${this.#openPropertyEditorUIPicker}
|
|
93
103
|
${ref(this.#addButtonRefChanged)}></uui-button>
|
|
94
104
|
`;
|
|
@@ -121,6 +131,9 @@ __decorate([
|
|
|
121
131
|
__decorate([
|
|
122
132
|
property({ type: String })
|
|
123
133
|
], UmbDataTypeDetailsWorkspacePropertyEditorPickerElement.prototype, "propertyEditorSchemaAlias", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: Boolean })
|
|
136
|
+
], UmbDataTypeDetailsWorkspacePropertyEditorPickerElement.prototype, "readonly", void 0);
|
|
124
137
|
UmbDataTypeDetailsWorkspacePropertyEditorPickerElement = __decorate([
|
|
125
138
|
customElement('umb-data-type-details-workspace-property-editor-picker')
|
|
126
139
|
], UmbDataTypeDetailsWorkspacePropertyEditorPickerElement);
|
|
@@ -9,6 +9,7 @@ export declare class UmbDataTypeDetailsWorkspaceViewEditElement extends UmbLitEl
|
|
|
9
9
|
private _propertyEditorDataSourceAlias?;
|
|
10
10
|
private _supportsDataSource;
|
|
11
11
|
private _supportedDataSourceTypes;
|
|
12
|
+
private _isReadOnly;
|
|
12
13
|
constructor();
|
|
13
14
|
render(): import("lit-html").TemplateResult<1>;
|
|
14
15
|
static styles: import("lit").CSSResult[];
|
|
@@ -18,6 +18,7 @@ let UmbDataTypeDetailsWorkspaceViewEditElement = class UmbDataTypeDetailsWorkspa
|
|
|
18
18
|
this._propertyEditorDataSourceAlias = null;
|
|
19
19
|
this._supportsDataSource = false;
|
|
20
20
|
this._supportedDataSourceTypes = [];
|
|
21
|
+
this._isReadOnly = false;
|
|
21
22
|
this.consumeContext(UMB_DATA_TYPE_WORKSPACE_CONTEXT, (workspaceContext) => {
|
|
22
23
|
this.#workspaceContext = workspaceContext;
|
|
23
24
|
this.#observeDataType();
|
|
@@ -43,6 +44,7 @@ let UmbDataTypeDetailsWorkspaceViewEditElement = class UmbDataTypeDetailsWorkspa
|
|
|
43
44
|
this.observe(this.#workspaceContext.propertyEditorDataSourceAlias, (value) => {
|
|
44
45
|
this._propertyEditorDataSourceAlias = value;
|
|
45
46
|
});
|
|
47
|
+
this.observe(this.#workspaceContext.readOnlyGuard.permitted, (isReadOnly) => (this._isReadOnly = isReadOnly ?? false), '_observeIsReadOnly');
|
|
46
48
|
}
|
|
47
49
|
#observePropertyEditorUIManifest() {
|
|
48
50
|
if (!this._propertyEditorUiAlias)
|
|
@@ -70,6 +72,7 @@ let UmbDataTypeDetailsWorkspaceViewEditElement = class UmbDataTypeDetailsWorkspa
|
|
|
70
72
|
.propertyEditorUiAlias=${this._propertyEditorUiAlias}
|
|
71
73
|
.propertyEditorUiIcon=${this._propertyEditorUiIcon}
|
|
72
74
|
.propertyEditorSchemaAlias=${this._propertyEditorSchemaAlias}
|
|
75
|
+
?readonly=${this._isReadOnly}
|
|
73
76
|
${umbBindToValidation(this, '$.editorUiAlias', this._propertyEditorUiAlias)}>
|
|
74
77
|
</umb-data-type-details-workspace-property-editor-picker>
|
|
75
78
|
</umb-property-layout>
|
|
@@ -88,6 +91,8 @@ let UmbDataTypeDetailsWorkspaceViewEditElement = class UmbDataTypeDetailsWorkspa
|
|
|
88
91
|
.dataSourceTypes=${this._supportedDataSourceTypes}
|
|
89
92
|
slot="editor"
|
|
90
93
|
max="1"
|
|
94
|
+
?readonly=${this._isReadOnly}
|
|
95
|
+
?disabled=${this._isReadOnly}
|
|
91
96
|
@change=${this.#onDataSourceChange}
|
|
92
97
|
required
|
|
93
98
|
${umbBindToValidation(this, '$.editorDataSourceAlias', this._propertyEditorDataSourceAlias)}></umb-input-property-editor-data-source>
|
|
@@ -145,6 +150,9 @@ __decorate([
|
|
|
145
150
|
__decorate([
|
|
146
151
|
state()
|
|
147
152
|
], UmbDataTypeDetailsWorkspaceViewEditElement.prototype, "_supportedDataSourceTypes", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
state()
|
|
155
|
+
], UmbDataTypeDetailsWorkspaceViewEditElement.prototype, "_isReadOnly", void 0);
|
|
148
156
|
UmbDataTypeDetailsWorkspaceViewEditElement = __decorate([
|
|
149
157
|
customElement('umb-data-type-details-workspace-view')
|
|
150
158
|
], UmbDataTypeDetailsWorkspaceViewEditElement);
|
package/dist-cms/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare class UmbWorkspaceViewDictionaryEditorElement extends UmbLitEleme
|
|
|
5
5
|
private _languages;
|
|
6
6
|
private _currentUserLanguageAccess?;
|
|
7
7
|
private _currentUserHasAccessToAllLanguages?;
|
|
8
|
+
private _isReadOnly;
|
|
8
9
|
constructor();
|
|
9
10
|
firstUpdated(): Promise<void>;
|
|
10
11
|
render(): import("lit-html").TemplateResult<1>;
|
package/dist-cms/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.js
CHANGED
|
@@ -18,6 +18,7 @@ let UmbWorkspaceViewDictionaryEditorElement = class UmbWorkspaceViewDictionaryEd
|
|
|
18
18
|
this._languages = [];
|
|
19
19
|
this._currentUserLanguageAccess = [];
|
|
20
20
|
this._currentUserHasAccessToAllLanguages = false;
|
|
21
|
+
this._isReadOnly = false;
|
|
21
22
|
this.#languageCollectionRepository = new UmbLanguageCollectionRepository(this);
|
|
22
23
|
this.consumeContext(UMB_DICTIONARY_WORKSPACE_CONTEXT, (_instance) => {
|
|
23
24
|
this.#workspaceContext = _instance;
|
|
@@ -48,8 +49,11 @@ let UmbWorkspaceViewDictionaryEditorElement = class UmbWorkspaceViewDictionaryEd
|
|
|
48
49
|
this.observe(this.#workspaceContext?.dictionary, (dictionary) => {
|
|
49
50
|
this._dictionary = dictionary;
|
|
50
51
|
});
|
|
52
|
+
this.observe(this.#workspaceContext?.readOnlyGuard.permitted, (isReadOnly) => (this._isReadOnly = isReadOnly ?? false), '_observeIsReadOnly');
|
|
51
53
|
}
|
|
52
54
|
#isReadOnly(culture) {
|
|
55
|
+
if (this._isReadOnly)
|
|
56
|
+
return true;
|
|
53
57
|
if (!this.#currentUserContext)
|
|
54
58
|
return true;
|
|
55
59
|
if (!culture)
|
|
@@ -107,6 +111,9 @@ __decorate([
|
|
|
107
111
|
__decorate([
|
|
108
112
|
state()
|
|
109
113
|
], UmbWorkspaceViewDictionaryEditorElement.prototype, "_currentUserHasAccessToAllLanguages", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
state()
|
|
116
|
+
], UmbWorkspaceViewDictionaryEditorElement.prototype, "_isReadOnly", void 0);
|
|
110
117
|
UmbWorkspaceViewDictionaryEditorElement = __decorate([
|
|
111
118
|
customElement('umb-workspace-view-dictionary-editor')
|
|
112
119
|
], UmbWorkspaceViewDictionaryEditorElement);
|
|
@@ -9,7 +9,7 @@ import { UmbDocumentBlueprintWorkspaceSplitViewElement } from './document-bluepr
|
|
|
9
9
|
import { customElement, state, css, html } from '../../../../external/lit/index.js';
|
|
10
10
|
import { UmbLitElement } from '../../../core/lit-element/index.js';
|
|
11
11
|
import { UmbTextStyles } from '../../../core/style/index.js';
|
|
12
|
-
import {
|
|
12
|
+
import { UMB_WORKSPACE_PATH_VARIANT_DELIMITER } from '../../../core/workspace/index.js';
|
|
13
13
|
import { UMB_APP_LANGUAGE_CONTEXT } from '../../../language/index.js';
|
|
14
14
|
// TODO: Refactor across all four content workspace editors (document, document blueprint, media, member) to use a base component. [NL]
|
|
15
15
|
let UmbDocumentBlueprintWorkspaceEditorElement = class UmbDocumentBlueprintWorkspaceEditorElement extends UmbLitElement {
|
|
@@ -24,15 +24,9 @@ let UmbDocumentBlueprintWorkspaceEditorElement = class UmbDocumentBlueprintWorks
|
|
|
24
24
|
// TODO: Refactor: when having a split view/variants context token, we can rename the split view/variants component to a generic and make this component generic as well. [NL]
|
|
25
25
|
this._splitViewElement = new UmbDocumentBlueprintWorkspaceSplitViewElement();
|
|
26
26
|
this._loading = true;
|
|
27
|
-
this.#staleVariantRedirect = new UmbWorkspaceStaleVariantRedirectController(this, {
|
|
28
|
-
getWorkspaceRoute: () => this.#workspaceRoute,
|
|
29
|
-
getVariants: () => this.#variants,
|
|
30
|
-
getAppCulture: () => this.#appCulture,
|
|
31
|
-
});
|
|
32
27
|
this._gotWorkspaceRoute = (e) => {
|
|
33
28
|
this.#workspaceRoute = e.target.absoluteRouterPath;
|
|
34
29
|
this.#workspaceContext?.splitView.setWorkspaceRoute(this.#workspaceRoute);
|
|
35
|
-
this.#staleVariantRedirect.redirect();
|
|
36
30
|
};
|
|
37
31
|
this.consumeContext(UMB_APP_LANGUAGE_CONTEXT, (instance) => {
|
|
38
32
|
this.#appLanguage = instance;
|
|
@@ -52,14 +46,12 @@ let UmbDocumentBlueprintWorkspaceEditorElement = class UmbDocumentBlueprintWorks
|
|
|
52
46
|
this.#observeLoading();
|
|
53
47
|
});
|
|
54
48
|
}
|
|
55
|
-
#staleVariantRedirect;
|
|
56
49
|
#observeVariants() {
|
|
57
50
|
if (!this.#workspaceContext)
|
|
58
51
|
return;
|
|
59
52
|
this.observe(this.#workspaceContext.variantOptions, (variants) => {
|
|
60
53
|
this.#variants = variants;
|
|
61
54
|
this.#generateRoutes();
|
|
62
|
-
this.#staleVariantRedirect.redirect();
|
|
63
55
|
}, '_observeVariants');
|
|
64
56
|
}
|
|
65
57
|
#observeLoading() {
|
|
@@ -24,6 +24,7 @@ let UmbDocumentBlueprintWorkspaceViewInfoElement = class UmbDocumentBlueprintWor
|
|
|
24
24
|
new UmbModalRouteRegistrationController(this, UMB_WORKSPACE_MODAL)
|
|
25
25
|
.addAdditionalPath('general/:entityType')
|
|
26
26
|
.onSetup((params) => {
|
|
27
|
+
this.#workspaceContext?.contentTypeVarianceChangeRedirect.trackVarianceChange();
|
|
27
28
|
return { data: { entityType: params.entityType, preset: {} } };
|
|
28
29
|
})
|
|
29
30
|
.observeRouteBuilder((routeBuilder) => {
|
|
@@ -24,12 +24,12 @@ export declare class UmbInputDocumentTypeElement extends UmbInputDocumentTypeEle
|
|
|
24
24
|
set min(value: number);
|
|
25
25
|
get min(): number;
|
|
26
26
|
/**
|
|
27
|
-
* Min validation message.
|
|
27
|
+
* Min validation message. When not set, a localized message stating the minimum and how many more items are needed is used.
|
|
28
28
|
* @type {string}
|
|
29
29
|
* @attr
|
|
30
|
-
* @default
|
|
30
|
+
* @default undefined
|
|
31
31
|
*/
|
|
32
|
-
minMessage
|
|
32
|
+
minMessage?: string;
|
|
33
33
|
/**
|
|
34
34
|
* This is a maximum amount of selected items in this input.
|
|
35
35
|
* @type {number}
|
|
@@ -39,17 +39,18 @@ export declare class UmbInputDocumentTypeElement extends UmbInputDocumentTypeEle
|
|
|
39
39
|
set max(value: number);
|
|
40
40
|
get max(): number;
|
|
41
41
|
/**
|
|
42
|
-
* Max validation message.
|
|
42
|
+
* Max validation message. When not set, a localized message stating the maximum and how many items are over it is used.
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @attr
|
|
45
|
-
* @default
|
|
45
|
+
* @default undefined
|
|
46
46
|
*/
|
|
47
|
-
maxMessage
|
|
47
|
+
maxMessage?: string;
|
|
48
48
|
set selection(uniques: Array<string>);
|
|
49
49
|
get selection(): Array<string>;
|
|
50
50
|
set value(uniques: string | undefined);
|
|
51
51
|
get value(): string | undefined;
|
|
52
|
-
readonly
|
|
52
|
+
get readonly(): boolean | undefined;
|
|
53
|
+
set readonly(value: boolean | undefined);
|
|
53
54
|
private _items?;
|
|
54
55
|
private _statuses?;
|
|
55
56
|
private _editPath;
|