@umbraco-cms/backoffice 17.8.1 → 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/block/block-rte/components/ref-rte-block/ref-rte-block.element.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
2
2
|
import type { UmbBlockDataType } from '../../../block/index.js';
|
|
3
3
|
import type { UmbBlockEditorCustomViewConfiguration } from '../../../block-custom-view/index.js';
|
|
4
|
+
declare const UmbRefRteBlockElement_base: import("../../../../../libs/extension-api/index.js").HTMLElementConstructor<import("../../../block/index.js").UmbBlockRefNameSlotElement> & typeof UmbLitElement;
|
|
4
5
|
/**
|
|
5
6
|
* @element umb-ref-rte-block
|
|
7
|
+
* @slot name - Content rendered in the block's primary label area (the `name` slot of the inner `uui-ref-node`). The expected projection is a `<umb-ufm-render>` element owned by the parent block-rte entry.
|
|
6
8
|
*/
|
|
7
|
-
export declare class UmbRefRteBlockElement extends
|
|
8
|
-
#private;
|
|
9
|
-
constructor();
|
|
10
|
-
label?: string;
|
|
9
|
+
export declare class UmbRefRteBlockElement extends UmbRefRteBlockElement_base {
|
|
11
10
|
icon?: string;
|
|
12
11
|
index?: number;
|
|
13
12
|
unpublished?: boolean;
|
|
@@ -4,24 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { UMB_BLOCK_RTE_ENTRY_CONTEXT } from '../../context/block-rte-entry.context-token.js';
|
|
8
7
|
import { css, customElement, html, property } from '../../../../../external/lit/index.js';
|
|
9
8
|
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
9
|
+
import { UmbBlockRefNameSlotMixin } from '../../../block/index.js';
|
|
10
10
|
/**
|
|
11
11
|
* @element umb-ref-rte-block
|
|
12
|
+
* @slot name - Content rendered in the block's primary label area (the `name` slot of the inner `uui-ref-node`). The expected projection is a `<umb-ufm-render>` element owned by the parent block-rte entry.
|
|
12
13
|
*/
|
|
13
|
-
let UmbRefRteBlockElement = class UmbRefRteBlockElement extends UmbLitElement {
|
|
14
|
-
//
|
|
15
|
-
#blockContext;
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.consumeContext(UMB_BLOCK_RTE_ENTRY_CONTEXT, (blockContext) => {
|
|
19
|
-
this.#blockContext = blockContext;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
#onUfmResolved = (event) => {
|
|
23
|
-
this.#blockContext?.setName(event.detail.text);
|
|
24
|
-
};
|
|
14
|
+
let UmbRefRteBlockElement = class UmbRefRteBlockElement extends UmbBlockRefNameSlotMixin(UmbLitElement) {
|
|
25
15
|
render() {
|
|
26
16
|
const blockValue = { ...this.content, $settings: this.settings, $index: this.index };
|
|
27
17
|
return html `
|
|
@@ -31,13 +21,7 @@ let UmbRefRteBlockElement = class UmbRefRteBlockElement extends UmbLitElement {
|
|
|
31
21
|
.href=${this.config?.showContentEdit ? this.config?.editContentPath : undefined}>
|
|
32
22
|
<div class="selection-background" aria-hidden="true"> </div>
|
|
33
23
|
<umb-icon slot="icon" .name=${this.icon}></umb-icon>
|
|
34
|
-
|
|
35
|
-
slot="name"
|
|
36
|
-
inline
|
|
37
|
-
.markdown=${this.label}
|
|
38
|
-
.value=${blockValue}
|
|
39
|
-
@umb-ufm-resolved=${this.#onUfmResolved}>
|
|
40
|
-
</umb-ufm-render>
|
|
24
|
+
${this.renderNameSlot(blockValue, 'name')}
|
|
41
25
|
</uui-ref-node>
|
|
42
26
|
`;
|
|
43
27
|
}
|
|
@@ -52,7 +36,8 @@ let UmbRefRteBlockElement = class UmbRefRteBlockElement extends UmbLitElement {
|
|
|
52
36
|
}
|
|
53
37
|
|
|
54
38
|
:host([unpublished]) umb-icon,
|
|
55
|
-
:host([unpublished]) umb-ufm-render
|
|
39
|
+
:host([unpublished]) umb-ufm-render,
|
|
40
|
+
:host([unpublished]) ::slotted([slot='name']) {
|
|
56
41
|
opacity: 0.6;
|
|
57
42
|
}
|
|
58
43
|
|
|
@@ -66,20 +51,19 @@ let UmbRefRteBlockElement = class UmbRefRteBlockElement extends UmbLitElement {
|
|
|
66
51
|
z-index: 0;
|
|
67
52
|
}
|
|
68
53
|
|
|
69
|
-
umb-ufm-render
|
|
54
|
+
umb-ufm-render,
|
|
55
|
+
::slotted([slot='name']) {
|
|
70
56
|
user-select: none;
|
|
71
57
|
}
|
|
72
58
|
|
|
73
59
|
umb-icon,
|
|
74
|
-
umb-ufm-render
|
|
60
|
+
umb-ufm-render,
|
|
61
|
+
::slotted([slot='name']) {
|
|
75
62
|
z-index: 1;
|
|
76
63
|
}
|
|
77
64
|
`,
|
|
78
65
|
]; }
|
|
79
66
|
};
|
|
80
|
-
__decorate([
|
|
81
|
-
property({ type: String })
|
|
82
|
-
], UmbRefRteBlockElement.prototype, "label", void 0);
|
|
83
67
|
__decorate([
|
|
84
68
|
property({ type: String })
|
|
85
69
|
], UmbRefRteBlockElement.prototype, "icon", void 0);
|
|
@@ -17,7 +17,7 @@ export class UmbBlockRteEntryContext extends UmbBlockEntryContext {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
_needsLegacyLabelRenderer() {
|
|
20
|
-
// RTE
|
|
20
|
+
// The RTE block entry element renders the canonical `<umb-ufm-render>` (projected into <umb-ref-rte-block>'s name slot)
|
|
21
21
|
// and pushes resolved text via `setName()`. No hidden virtual renderer needed.
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { nothing } from '../../../../../external/lit/index.js';
|
|
2
1
|
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
3
2
|
import type { UmbPropertyEditorUiElement } from '../../../../core/property-editor/index.js';
|
|
4
3
|
import '../ref-single-block/index.js';
|
|
@@ -14,7 +13,7 @@ export declare class UmbBlockSingleEntryElement extends UmbLitElement implements
|
|
|
14
13
|
set index(value: number | undefined);
|
|
15
14
|
get contentKey(): string | undefined;
|
|
16
15
|
set contentKey(value: string | undefined);
|
|
17
|
-
private _contentKey
|
|
16
|
+
private _contentKey;
|
|
18
17
|
private _contentTypeAlias?;
|
|
19
18
|
private _contentTypeName?;
|
|
20
19
|
private _showContentEdit;
|
|
@@ -31,8 +30,8 @@ export declare class UmbBlockSingleEntryElement extends UmbLitElement implements
|
|
|
31
30
|
private _isReadOnly;
|
|
32
31
|
constructor();
|
|
33
32
|
connectedCallback(): void;
|
|
34
|
-
render(): import("lit-html").TemplateResult<1> |
|
|
35
|
-
static styles: import("lit").CSSResult[];
|
|
33
|
+
render(): import("lit-html").TemplateResult<1> | undefined;
|
|
34
|
+
static readonly styles: import("lit").CSSResult[];
|
|
36
35
|
}
|
|
37
36
|
export default UmbBlockSingleEntryElement;
|
|
38
37
|
declare global {
|
|
@@ -10,7 +10,7 @@ import { css, customElement, html, nothing, property, state, when } from '../../
|
|
|
10
10
|
import { stringOrStringArrayContains } from '../../../../core/utils/index.js';
|
|
11
11
|
import { UmbLitElement, umbDestroyOnDisconnect } from '../../../../core/lit-element/index.js';
|
|
12
12
|
import { UmbDataPathBlockElementDataQuery } from '../../../block/index.js';
|
|
13
|
-
import { renderHiddenUfm } from '../../../../ufm/index.js';
|
|
13
|
+
import { renderHiddenUfm, renderUfm } from '../../../../ufm/index.js';
|
|
14
14
|
import { UmbObserveValidationStateController } from '../../../../core/validation/index.js';
|
|
15
15
|
import { UUIBlinkAnimationValue, UUIBlinkKeyframes } from '../../../../../external/uui/index.js';
|
|
16
16
|
import '../ref-single-block/index.js';
|
|
@@ -78,15 +78,17 @@ let UmbBlockSingleEntryElement = class UmbBlockSingleEntryElement extends UmbLit
|
|
|
78
78
|
};
|
|
79
79
|
this.#extensionSlotRenderMethod = (ext) => {
|
|
80
80
|
ext.component?.setAttribute('part', 'component');
|
|
81
|
-
return html
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
return html `
|
|
82
|
+
${this.#renderHiddenUfm()}
|
|
83
|
+
${when(this._exposed || this._isReadOnly, () => ext.component, () => html `
|
|
84
|
+
<div style="min-height: var(--uui-size-16);">
|
|
85
|
+
${ext.component}
|
|
86
|
+
<umb-block-overlay-expose-button
|
|
87
|
+
.contentTypeName=${this._contentTypeName}
|
|
88
|
+
@click=${this.#expose}></umb-block-overlay-expose-button>
|
|
89
|
+
</div>
|
|
90
|
+
`)}
|
|
91
|
+
`;
|
|
90
92
|
};
|
|
91
93
|
this.#renderBuiltinBlockView = () => {
|
|
92
94
|
if (this._unsupported) {
|
|
@@ -189,34 +191,45 @@ let UmbBlockSingleEntryElement = class UmbBlockSingleEntryElement extends UmbLit
|
|
|
189
191
|
}
|
|
190
192
|
#expose;
|
|
191
193
|
#onUfmResolved;
|
|
192
|
-
#
|
|
193
|
-
|
|
194
|
+
get #blockValue() {
|
|
195
|
+
return {
|
|
194
196
|
...this._blockViewProps.content,
|
|
195
197
|
$settings: this._blockViewProps.settings,
|
|
196
198
|
};
|
|
197
|
-
|
|
199
|
+
}
|
|
200
|
+
#renderUfm() {
|
|
201
|
+
return renderUfm(this._label, this.#blockValue, this.#onUfmResolved, 'name');
|
|
202
|
+
}
|
|
203
|
+
#renderHiddenUfm() {
|
|
204
|
+
return renderHiddenUfm(this._label, this.#blockValue, this.#onUfmResolved);
|
|
198
205
|
}
|
|
199
206
|
#extensionSlotFilterMethod;
|
|
200
207
|
#extensionSlotRenderMethod;
|
|
201
208
|
#renderRefBlock() {
|
|
202
|
-
return html
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
return html `
|
|
210
|
+
<umb-ref-single-block
|
|
211
|
+
.icon=${this._icon}
|
|
212
|
+
.unpublished=${!this._exposed}
|
|
213
|
+
.config=${this._blockViewProps.config}
|
|
214
|
+
.content=${this._blockViewProps.content}
|
|
215
|
+
.settings=${this._blockViewProps.settings}
|
|
216
|
+
${umbDestroyOnDisconnect()}>
|
|
217
|
+
${this.#renderUfm()}
|
|
218
|
+
</umb-ref-single-block>
|
|
219
|
+
`;
|
|
210
220
|
}
|
|
211
221
|
#renderInlineBlock() {
|
|
212
|
-
return html
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
return html `
|
|
223
|
+
<umb-inline-single-block
|
|
224
|
+
.icon=${this._icon}
|
|
225
|
+
.unpublished=${!this._exposed}
|
|
226
|
+
.config=${this._blockViewProps.config}
|
|
227
|
+
.content=${this._blockViewProps.content}
|
|
228
|
+
.settings=${this._blockViewProps.settings}
|
|
229
|
+
${umbDestroyOnDisconnect()}>
|
|
230
|
+
${this.#renderUfm()}
|
|
231
|
+
</umb-inline-single-block>
|
|
232
|
+
`;
|
|
220
233
|
}
|
|
221
234
|
#renderUnsupportedBlock() {
|
|
222
235
|
return html `
|
|
@@ -225,29 +238,26 @@ let UmbBlockSingleEntryElement = class UmbBlockSingleEntryElement extends UmbLit
|
|
|
225
238
|
.config=${this._blockViewProps.config}
|
|
226
239
|
.content=${this._blockViewProps.content}
|
|
227
240
|
.settings=${this._blockViewProps.settings}
|
|
228
|
-
${umbDestroyOnDisconnect()}
|
|
241
|
+
${umbDestroyOnDisconnect()}>
|
|
242
|
+
</umb-unsupported-single-block>
|
|
229
243
|
`;
|
|
230
244
|
}
|
|
231
245
|
#renderBuiltinBlockView;
|
|
232
246
|
#renderBlock() {
|
|
233
|
-
return this.contentKey && (this._contentTypeAlias || this._unsupported)
|
|
234
|
-
|
|
235
|
-
<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
: nothing}
|
|
248
|
-
</div>
|
|
249
|
-
`
|
|
250
|
-
: nothing;
|
|
247
|
+
return when(this.contentKey && (this._contentTypeAlias || this._unsupported), () => html `
|
|
248
|
+
<div class="umb-block-single__block">
|
|
249
|
+
<umb-extension-slot
|
|
250
|
+
type="blockEditorCustomView"
|
|
251
|
+
default-element=${this._inlineEditingMode ? 'umb-inline-single-block' : 'umb-ref-single-block'}
|
|
252
|
+
.renderMethod=${this.#extensionSlotRenderMethod}
|
|
253
|
+
.fallbackRenderMethod=${this.#renderBuiltinBlockView}
|
|
254
|
+
.props=${this._blockViewProps}
|
|
255
|
+
.filter=${this.#extensionSlotFilterMethod}
|
|
256
|
+
single></umb-extension-slot>
|
|
257
|
+
${this.#renderActionBar()}
|
|
258
|
+
${when(!this._showContentEdit && this._contentInvalid, () => html `<uui-badge attention color="invalid" label="Invalid content">!</uui-badge>`)}
|
|
259
|
+
</div>
|
|
260
|
+
`);
|
|
251
261
|
}
|
|
252
262
|
#renderActionBar() {
|
|
253
263
|
if (!this._showActions)
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
2
2
|
import type { UmbBlockDataType } from '../../../block/index.js';
|
|
3
3
|
import '../../../block/workspace/views/edit/block-workspace-view-edit-content-no-router.element.js';
|
|
4
|
+
declare const UmbInlineSingleBlockElement_base: import("../../../../../libs/extension-api/index.js").HTMLElementConstructor<import("../../../block/index.js").UmbBlockRefNameSlotElement> & typeof UmbLitElement;
|
|
4
5
|
/**
|
|
5
6
|
* @element umb-inline-single-block
|
|
7
|
+
* @slot name - Content rendered as the block's primary label. The expected projection is a `<umb-ufm-render>` element owned by the parent block-single entry.
|
|
6
8
|
*/
|
|
7
|
-
export declare class UmbInlineSingleBlockElement extends
|
|
9
|
+
export declare class UmbInlineSingleBlockElement extends UmbInlineSingleBlockElement_base {
|
|
8
10
|
#private;
|
|
9
|
-
label?: string;
|
|
10
11
|
icon?: string;
|
|
11
12
|
unpublished?: boolean;
|
|
12
13
|
content?: UmbBlockDataType;
|
|
@@ -18,7 +19,7 @@ export declare class UmbInlineSingleBlockElement extends UmbLitElement {
|
|
|
18
19
|
private _variantName?;
|
|
19
20
|
constructor();
|
|
20
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
21
|
-
static styles: import("lit").CSSResult[];
|
|
22
|
+
static readonly styles: import("lit").CSSResult[];
|
|
22
23
|
}
|
|
23
24
|
export default UmbInlineSingleBlockElement;
|
|
24
25
|
declare global {
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { UMB_BLOCK_SINGLE_ENTRY_CONTEXT } from '../../context/index.js';
|
|
8
|
-
import { UMB_BLOCK_WORKSPACE_ALIAS } from '../../../block/index.js';
|
|
8
|
+
import { UMB_BLOCK_WORKSPACE_ALIAS, UmbBlockRefNameSlotMixin } from '../../../block/index.js';
|
|
9
9
|
import { css, customElement, html, nothing, property, state, when } from '../../../../../external/lit/index.js';
|
|
10
10
|
import { UmbExtensionApiInitializer, UmbExtensionsApiInitializer } from '../../../../../libs/extension-api/index.js';
|
|
11
11
|
import { umbExtensionsRegistry } from '../../../../core/extension-registry/index.js';
|
|
@@ -18,8 +18,9 @@ const apiArgsCreator = (manifest) => {
|
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* @element umb-inline-single-block
|
|
21
|
+
* @slot name - Content rendered as the block's primary label. The expected projection is a `<umb-ufm-render>` element owned by the parent block-single entry.
|
|
21
22
|
*/
|
|
22
|
-
let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbLitElement {
|
|
23
|
+
let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbBlockRefNameSlotMixin(UmbLitElement) {
|
|
23
24
|
#blockContext;
|
|
24
25
|
#contentKey;
|
|
25
26
|
constructor() {
|
|
@@ -28,9 +29,6 @@ let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbL
|
|
|
28
29
|
this.#expose = () => {
|
|
29
30
|
this._workspaceContext?.expose();
|
|
30
31
|
};
|
|
31
|
-
this.#onUfmResolved = (event) => {
|
|
32
|
-
this.#blockContext?.setName(event.detail.text);
|
|
33
|
-
};
|
|
34
32
|
this.consumeContext(UMB_BLOCK_SINGLE_ENTRY_CONTEXT, (blockContext) => {
|
|
35
33
|
this.#blockContext = blockContext;
|
|
36
34
|
this.observe(this.#blockContext?.unique, (contentKey) => {
|
|
@@ -74,7 +72,6 @@ let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbL
|
|
|
74
72
|
this._workspaceContext.load(this.#contentKey);
|
|
75
73
|
}
|
|
76
74
|
#expose;
|
|
77
|
-
#onUfmResolved;
|
|
78
75
|
render() {
|
|
79
76
|
return html `
|
|
80
77
|
<div id="host">
|
|
@@ -107,19 +104,13 @@ let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbL
|
|
|
107
104
|
<span id="icon">
|
|
108
105
|
<umb-icon .name=${this.icon}></umb-icon>
|
|
109
106
|
</span>
|
|
110
|
-
<div id="info">
|
|
111
|
-
<umb-ufm-render
|
|
112
|
-
id="name"
|
|
113
|
-
inline
|
|
114
|
-
.markdown=${this.label}
|
|
115
|
-
.value=${blockValue}
|
|
116
|
-
@umb-ufm-resolved=${this.#onUfmResolved}>
|
|
117
|
-
</umb-ufm-render>
|
|
118
|
-
</div>
|
|
107
|
+
<div id="info">${this.renderNameSlot(blockValue)}</div>
|
|
119
108
|
</span>
|
|
120
|
-
${when(this.unpublished, () => html
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
${when(this.unpublished, () => html `
|
|
110
|
+
<uui-tag slot="name" look="secondary" title=${this.localize.term('blockEditor_notExposedDescription')}>
|
|
111
|
+
<umb-localize key="blockEditor_notExposedLabel"></umb-localize>
|
|
112
|
+
</uui-tag>
|
|
113
|
+
`)}
|
|
123
114
|
`;
|
|
124
115
|
}
|
|
125
116
|
#renderInside() {
|
|
@@ -127,16 +118,20 @@ let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbL
|
|
|
127
118
|
return html `<umb-view-loader></umb-view-loader>`;
|
|
128
119
|
}
|
|
129
120
|
if (this._exposed === false) {
|
|
130
|
-
return html
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
121
|
+
return html `
|
|
122
|
+
<uui-button id="exposeButton" draggable="false" @click=${this.#expose}>
|
|
123
|
+
<uui-icon name="icon-add"></uui-icon>
|
|
124
|
+
<umb-localize
|
|
125
|
+
key="blockEditor_createThisFor"
|
|
126
|
+
.args=${[this._ownerContentTypeName, this._variantName]}></umb-localize>
|
|
127
|
+
</uui-button>
|
|
128
|
+
`;
|
|
136
129
|
}
|
|
137
130
|
else {
|
|
138
|
-
return html
|
|
139
|
-
|
|
131
|
+
return html `
|
|
132
|
+
<umb-block-workspace-view-edit-content-no-router draggable="false">
|
|
133
|
+
</umb-block-workspace-view-edit-content-no-router>
|
|
134
|
+
`;
|
|
140
135
|
}
|
|
141
136
|
}
|
|
142
137
|
static { this.styles = [
|
|
@@ -241,7 +236,8 @@ let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbL
|
|
|
241
236
|
padding-left: var(--uui-size-2, 6px);
|
|
242
237
|
}
|
|
243
238
|
|
|
244
|
-
#name
|
|
239
|
+
#name,
|
|
240
|
+
::slotted([slot='name']) {
|
|
245
241
|
font-weight: 700;
|
|
246
242
|
}
|
|
247
243
|
|
|
@@ -255,22 +251,21 @@ let UmbInlineSingleBlockElement = class UmbInlineSingleBlockElement extends UmbL
|
|
|
255
251
|
:host(:not([disabled])) #open-part:hover #icon {
|
|
256
252
|
color: var(--uui-color-interactive-emphasis);
|
|
257
253
|
}
|
|
258
|
-
:host(:not([disabled])) #open-part:hover #name
|
|
254
|
+
:host(:not([disabled])) #open-part:hover #name,
|
|
255
|
+
:host(:not([disabled])) #open-part:hover ::slotted([slot='name']) {
|
|
259
256
|
color: var(--uui-color-interactive-emphasis);
|
|
260
257
|
}
|
|
261
258
|
|
|
262
259
|
:host([disabled]) #icon {
|
|
263
260
|
color: var(--uui-color-disabled-contrast);
|
|
264
261
|
}
|
|
265
|
-
:host([disabled]) #name
|
|
262
|
+
:host([disabled]) #name,
|
|
263
|
+
:host([disabled]) ::slotted([slot='name']) {
|
|
266
264
|
color: var(--uui-color-disabled-contrast);
|
|
267
265
|
}
|
|
268
266
|
`,
|
|
269
267
|
]; }
|
|
270
268
|
};
|
|
271
|
-
__decorate([
|
|
272
|
-
property({ type: String, reflect: false })
|
|
273
|
-
], UmbInlineSingleBlockElement.prototype, "label", void 0);
|
|
274
269
|
__decorate([
|
|
275
270
|
property({ type: String, reflect: false })
|
|
276
271
|
], UmbInlineSingleBlockElement.prototype, "icon", void 0);
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
2
2
|
import type { UmbBlockDataType } from '../../../block/index.js';
|
|
3
3
|
import type { UmbBlockEditorCustomViewConfiguration } from '../../../block-custom-view/index.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
declare const UmbRefSingleBlockElement_base: import("../../../../../libs/extension-api/index.js").HTMLElementConstructor<import("../../../block/index.js").UmbBlockRefNameSlotElement> & typeof UmbLitElement;
|
|
5
|
+
/**
|
|
6
|
+
* @element umb-ref-single-block
|
|
7
|
+
* @slot name - Content rendered in the block's primary label area (the `name` slot of the inner `uui-ref-node`). The expected projection is a `<umb-ufm-render>` element owned by the parent block-single entry.
|
|
8
|
+
*/
|
|
9
|
+
export declare class UmbRefSingleBlockElement extends UmbRefSingleBlockElement_base {
|
|
8
10
|
icon?: string;
|
|
9
11
|
unpublished?: boolean;
|
|
10
12
|
content?: UmbBlockDataType;
|
|
11
13
|
settings?: UmbBlockDataType;
|
|
12
14
|
config?: UmbBlockEditorCustomViewConfiguration;
|
|
13
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
-
static styles: import("lit").CSSResult[];
|
|
16
|
+
static readonly styles: import("lit").CSSResult[];
|
|
15
17
|
}
|
|
16
18
|
export default UmbRefSingleBlockElement;
|
|
17
19
|
declare global {
|
package/dist-cms/packages/block/block-single/components/ref-single-block/ref-single-block.element.js
CHANGED
|
@@ -4,21 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { UMB_BLOCK_SINGLE_ENTRY_CONTEXT } from '../../context/index.js';
|
|
8
7
|
import { css, customElement, html, property, when } from '../../../../../external/lit/index.js';
|
|
9
8
|
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.#blockContext = blockContext;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
#onUfmResolved = (event) => {
|
|
20
|
-
this.#blockContext?.setName(event.detail.text);
|
|
21
|
-
};
|
|
9
|
+
import { UmbBlockRefNameSlotMixin } from '../../../block/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* @element umb-ref-single-block
|
|
12
|
+
* @slot name - Content rendered in the block's primary label area (the `name` slot of the inner `uui-ref-node`). The expected projection is a `<umb-ufm-render>` element owned by the parent block-single entry.
|
|
13
|
+
*/
|
|
14
|
+
let UmbRefSingleBlockElement = class UmbRefSingleBlockElement extends UmbBlockRefNameSlotMixin(UmbLitElement) {
|
|
22
15
|
render() {
|
|
23
16
|
const blockValue = { ...this.content, $settings: this.settings };
|
|
24
17
|
return html `
|
|
@@ -27,16 +20,12 @@ let UmbRefSingleBlockElement = class UmbRefSingleBlockElement extends UmbLitElem
|
|
|
27
20
|
.readonly=${!(this.config?.showContentEdit ?? false)}
|
|
28
21
|
.href=${this.config?.showContentEdit ? this.config?.editContentPath : undefined}>
|
|
29
22
|
<umb-icon slot="icon" .name=${this.icon}></umb-icon>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</umb-ufm-render>
|
|
37
|
-
${when(this.unpublished, () => html `<uui-tag slot="name" look="secondary" title=${this.localize.term('blockEditor_notExposedDescription')}
|
|
38
|
-
><umb-localize key="blockEditor_notExposedLabel"></umb-localize
|
|
39
|
-
></uui-tag>`)}
|
|
23
|
+
${this.renderNameSlot(blockValue, 'name')}
|
|
24
|
+
${when(this.unpublished, () => html `
|
|
25
|
+
<uui-tag slot="name" look="secondary" title=${this.localize.term('blockEditor_notExposedDescription')}>
|
|
26
|
+
<umb-localize key="blockEditor_notExposedLabel"></umb-localize>
|
|
27
|
+
</uui-tag>
|
|
28
|
+
`)}
|
|
40
29
|
</uui-ref-node>
|
|
41
30
|
`;
|
|
42
31
|
}
|
|
@@ -52,15 +41,13 @@ let UmbRefSingleBlockElement = class UmbRefSingleBlockElement extends UmbLitElem
|
|
|
52
41
|
vertical-align: text-top;
|
|
53
42
|
}
|
|
54
43
|
:host([unpublished]) umb-icon,
|
|
55
|
-
:host([unpublished]) umb-ufm-render
|
|
44
|
+
:host([unpublished]) umb-ufm-render,
|
|
45
|
+
:host([unpublished]) ::slotted([slot='name']) {
|
|
56
46
|
opacity: 0.6;
|
|
57
47
|
}
|
|
58
48
|
`,
|
|
59
49
|
]; }
|
|
60
50
|
};
|
|
61
|
-
__decorate([
|
|
62
|
-
property({ type: String, reflect: false })
|
|
63
|
-
], UmbRefSingleBlockElement.prototype, "label", void 0);
|
|
64
51
|
__decorate([
|
|
65
52
|
property({ type: String, reflect: false })
|
|
66
53
|
], UmbRefSingleBlockElement.prototype, "icon", void 0);
|
package/dist-cms/packages/content/content/controller/merge-content-variant-data.controller.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { _sortContentValuesByVariant } from '../utils/sort-content-values-by-variant.function.js';
|
|
1
2
|
import { UmbControllerBase } from '../../../../libs/class-api/index.js';
|
|
2
3
|
import { createExtensionApi } from '../../../../libs/extension-api/index.js';
|
|
3
4
|
import { umbExtensionsRegistry } from '../../../core/extension-registry/index.js';
|
|
4
|
-
import { UmbVariantId } from '../../../core/variant/index.js';
|
|
5
|
+
import { UmbVariantId, umbVariantObjectSortCompare } from '../../../core/variant/index.js';
|
|
5
6
|
/**
|
|
6
7
|
* @function defaultCompareVariantMethod
|
|
7
8
|
* @param {UmbVariantDataModel} a - the first variant to compare.
|
|
@@ -28,7 +29,7 @@ export class UmbMergeContentVariantDataController extends UmbControllerBase {
|
|
|
28
29
|
result.values = await this.#processValues(persistedData?.values, currentData.values, variantsToStore);
|
|
29
30
|
if (currentData.variants) {
|
|
30
31
|
// Notice for variants we do not want to include all the variants that we are processing. but just the once selected for the process. (Not include invariant if we are in a variant document) [NL]
|
|
31
|
-
result.variants = this.#processVariants(persistedData?.variants, currentData.variants, selectedVariants, defaultCompareVariantMethod);
|
|
32
|
+
result.variants = this.#processVariants(persistedData?.variants, currentData.variants, selectedVariants, defaultCompareVariantMethod).sort(umbVariantObjectSortCompare);
|
|
32
33
|
}
|
|
33
34
|
this.destroy();
|
|
34
35
|
return result;
|
|
@@ -44,7 +45,7 @@ export class UmbMergeContentVariantDataController extends UmbControllerBase {
|
|
|
44
45
|
// Make array of unique values, based on persistedValues and draftValues. Both alias, culture and segment has to be taken into account. [NL]
|
|
45
46
|
const uniqueValues = [...(persistedValues ?? []), ...(draftValues ?? [])].filter((n, i, self) => i === self.findIndex((v) => v.alias === n.alias && v.culture === n.culture && v.segment === n.segment));
|
|
46
47
|
// Map unique values to their respective draft values.
|
|
47
|
-
|
|
48
|
+
const values = (await Promise.all(uniqueValues.map((value) => {
|
|
48
49
|
const persistedValue = persistedValues?.find((x) => x.alias === value.alias && x.culture === value.culture && x.segment === value.segment);
|
|
49
50
|
// Should this value be saved?
|
|
50
51
|
if (variantsToStore.some((x) => x.equal(UmbVariantId.CreateFromPartial(value)))) {
|
|
@@ -56,6 +57,7 @@ export class UmbMergeContentVariantDataController extends UmbControllerBase {
|
|
|
56
57
|
return Promise.resolve(persistedValue);
|
|
57
58
|
}
|
|
58
59
|
}))).filter((x) => x !== undefined);
|
|
60
|
+
return _sortContentValuesByVariant(values);
|
|
59
61
|
}
|
|
60
62
|
/**
|
|
61
63
|
* Builds and saves a value based on selected variants and variants to store.
|
|
@@ -9,6 +9,7 @@ export * from './property-dataset-context/index.js';
|
|
|
9
9
|
export * from './publishing/index.js';
|
|
10
10
|
export * from './rollback/index.js';
|
|
11
11
|
export * from './tree/index.js';
|
|
12
|
+
export * from './utils/index.js';
|
|
12
13
|
export * from './workspace/index.js';
|
|
13
14
|
export type * from './configuration/index.js';
|
|
14
15
|
export type * from './repository/index.js';
|
|
@@ -7,7 +7,6 @@ export declare class UmbContentWorkspaceDataManager<ModelType extends UmbContent
|
|
|
7
7
|
} ? ModelType['variants'][0] : never> extends UmbElementWorkspaceDataManager<ModelType> {
|
|
8
8
|
#private;
|
|
9
9
|
constructor(host: UmbControllerHost, variantScaffold?: ModelVariantType);
|
|
10
|
-
protected _sortCurrentData<GivenType extends Partial<ModelType> = Partial<ModelType>>(persistedData: Partial<ModelType>, currentData: GivenType): GivenType;
|
|
11
10
|
/**
|
|
12
11
|
* Sets the variant scaffold data
|
|
13
12
|
* @param {ModelVariantType} variantScaffold The variant scaffold data
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UmbElementWorkspaceDataManager } from './element-data-manager.js';
|
|
2
2
|
import { appendToFrozenArray, jsonStringComparison } from '../../../../libs/observable-api/index.js';
|
|
3
|
-
import { UmbVariantId,
|
|
3
|
+
import { UmbVariantId, umbVariantObjectSortCompare } from '../../../core/variant/index.js';
|
|
4
4
|
export class UmbContentWorkspaceDataManager extends UmbElementWorkspaceDataManager {
|
|
5
5
|
//
|
|
6
6
|
//#repository;
|
|
@@ -9,21 +9,6 @@ export class UmbContentWorkspaceDataManager extends UmbElementWorkspaceDataManag
|
|
|
9
9
|
super(host);
|
|
10
10
|
this.#variantScaffold = variantScaffold;
|
|
11
11
|
}
|
|
12
|
-
_sortCurrentData(persistedData, currentData) {
|
|
13
|
-
currentData = super._sortCurrentData(persistedData, currentData);
|
|
14
|
-
// Sort the variants in the same order as the persisted data:
|
|
15
|
-
const persistedVariants = persistedData.variants;
|
|
16
|
-
if (persistedVariants && currentData.variants) {
|
|
17
|
-
return {
|
|
18
|
-
...currentData,
|
|
19
|
-
variants: [...currentData.variants].sort(function (a, b) {
|
|
20
|
-
return (persistedVariants.findIndex((x) => umbVariantObjectCompare(x, a)) -
|
|
21
|
-
persistedVariants.findIndex((x) => umbVariantObjectCompare(x, b)));
|
|
22
|
-
}),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return currentData;
|
|
26
|
-
}
|
|
27
12
|
/**
|
|
28
13
|
* Sets the variant scaffold data
|
|
29
14
|
* @param {ModelVariantType} variantScaffold The variant scaffold data
|
|
@@ -85,7 +70,7 @@ export class UmbContentWorkspaceDataManager extends UmbElementWorkspaceDataManag
|
|
|
85
70
|
...variantId.toObject(),
|
|
86
71
|
...variant,
|
|
87
72
|
...update,
|
|
88
|
-
}, (x) => variantId.compare(x));
|
|
73
|
+
}, (x) => variantId.compare(x)).sort(umbVariantObjectSortCompare);
|
|
89
74
|
this.updateCurrent({ variants: newVariants });
|
|
90
75
|
}
|
|
91
76
|
#updateInvariantData(update) {
|
|
@@ -6,7 +6,6 @@ export declare class UmbElementWorkspaceDataManager<ModelType extends UmbElement
|
|
|
6
6
|
protected _varies?: boolean;
|
|
7
7
|
protected _variesByCulture?: boolean;
|
|
8
8
|
protected _variesBySegment?: boolean;
|
|
9
|
-
protected _sortCurrentData<GivenType extends Partial<ModelType> = Partial<ModelType>>(persistedData: Partial<ModelType>, currentData: GivenType): GivenType;
|
|
10
9
|
initiatePropertyValueChange(): void;
|
|
11
10
|
finishPropertyValueChange: () => void;
|
|
12
11
|
setVariesByCulture(vary: boolean | undefined): void;
|