@deenruv/admin-ui 1.0.0
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/LICENSE +23 -0
- package/catalog/catalog.module.d.ts +43 -0
- package/catalog/catalog.routes.d.ts +4 -0
- package/catalog/components/apply-facet-dialog/apply-facet-dialog.component.d.ts +16 -0
- package/catalog/components/asset-detail/asset-detail.component.d.ts +28 -0
- package/catalog/components/asset-list/asset-list.component.d.ts +23 -0
- package/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.d.ts +35 -0
- package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.d.ts +40 -0
- package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql.d.ts +4 -0
- package/catalog/components/collection-contents/collection-contents.component.d.ts +39 -0
- package/catalog/components/collection-data-table/collection-data-table.component.d.ts +80 -0
- package/catalog/components/collection-detail/collection-detail.component.d.ts +71 -0
- package/catalog/components/collection-list/collection-breadcrumb.pipe.d.ts +11 -0
- package/catalog/components/collection-list/collection-list-bulk-actions.d.ts +8 -0
- package/catalog/components/collection-list/collection-list.component.d.ts +25 -0
- package/catalog/components/collection-tree/array-to-tree.d.ts +19 -0
- package/catalog/components/collection-tree/collection-tree-node.component.d.ts +44 -0
- package/catalog/components/collection-tree/collection-tree.component.d.ts +22 -0
- package/catalog/components/collection-tree/collection-tree.service.d.ts +33 -0
- package/catalog/components/collection-tree/collection-tree.types.d.ts +7 -0
- package/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.d.ts +10 -0
- package/catalog/components/create-facet-value-dialog/create-facet-value-dialog.component.d.ts +19 -0
- package/catalog/components/create-product-option-group-dialog/create-product-option-group-dialog.component.d.ts +18 -0
- package/catalog/components/create-product-variant-dialog/create-product-variant-dialog.component.d.ts +27 -0
- package/catalog/components/facet-detail/facet-detail.component.d.ts +76 -0
- package/catalog/components/facet-list/facet-list-bulk-actions.d.ts +7 -0
- package/catalog/components/facet-list/facet-list.component.d.ts +19 -0
- package/catalog/components/generate-product-variants/generate-product-variants.component.d.ts +65 -0
- package/catalog/components/move-collections-dialog/move-collections-dialog.component.d.ts +23 -0
- package/catalog/components/option-value-input/option-value-input.component.d.ts +48 -0
- package/catalog/components/product-detail/product-detail.component.d.ts +75 -0
- package/catalog/components/product-list/product-list-bulk-actions.d.ts +7 -0
- package/catalog/components/product-list/product-list.component.d.ts +18 -0
- package/catalog/components/product-list/product-list.graphql.d.ts +1 -0
- package/catalog/components/product-options-editor/product-options-editor.component.d.ts +47 -0
- package/catalog/components/product-variant-detail/product-variant-detail.component.d.ts +79 -0
- package/catalog/components/product-variant-detail/product-variant-detail.graphql.d.ts +3 -0
- package/catalog/components/product-variant-list/product-variant-list-bulk-actions.d.ts +6 -0
- package/catalog/components/product-variant-list/product-variant-list.component.d.ts +14 -0
- package/catalog/components/product-variant-list/product-variant-list.graphql.d.ts +1 -0
- package/catalog/components/product-variant-quick-jump/product-variant-quick-jump.component.d.ts +18 -0
- package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +88 -0
- package/catalog/components/product-variants-table/product-variants-table.component.d.ts +55 -0
- package/catalog/components/update-product-option-dialog/update-product-option-dialog.component.d.ts +25 -0
- package/catalog/components/variant-price-detail/variant-price-detail.component.d.ts +20 -0
- package/catalog/components/variant-price-strategy-detail/variant-price-strategy-detail.component.d.ts +10 -0
- package/catalog/index.d.ts +5 -0
- package/catalog/providers/product-detail/product-detail.service.d.ts +286 -0
- package/catalog/providers/product-detail/replace-last.d.ts +6 -0
- package/catalog/providers/routing/product-variants-resolver.d.ts +8 -0
- package/catalog/public_api.d.ts +48 -0
- package/core/app.component.d.ts +19 -0
- package/core/app.component.module.d.ts +9 -0
- package/core/app.config.d.ts +3 -0
- package/core/common/base-detail.component.d.ts +146 -0
- package/core/common/base-entity-resolver.d.ts +45 -0
- package/core/common/base-list.component.d.ts +138 -0
- package/core/common/component-registry-types.d.ts +65 -0
- package/core/common/deactivate-aware.d.ts +8 -0
- package/core/common/detail-breadcrumb.d.ts +12 -0
- package/core/common/generated-types.d.ts +20279 -0
- package/core/common/introspection-result-wrapper.d.ts +1 -0
- package/core/common/introspection-result.d.ts +7 -0
- package/core/common/single-search-selection-model.d.ts +16 -0
- package/core/common/title-setter.d.ts +4 -0
- package/core/common/utilities/bulk-action-utils.d.ts +49 -0
- package/core/common/utilities/configurable-operation-utils.d.ts +48 -0
- package/core/common/utilities/create-updated-translatable.d.ts +25 -0
- package/core/common/utilities/custom-field-default-value.d.ts +6 -0
- package/core/common/utilities/find-translation.d.ts +14 -0
- package/core/common/utilities/get-default-ui-language.d.ts +3 -0
- package/core/common/utilities/interpolate-description.d.ts +7 -0
- package/core/common/utilities/selection-manager.d.ts +30 -0
- package/core/common/utilities/string-to-color.d.ts +4 -0
- package/core/common/version.d.ts +1 -0
- package/core/components/alerts/alerts.component.d.ts +11 -0
- package/core/components/app-shell/app-shell.component.d.ts +41 -0
- package/core/components/base-nav/base-nav.component.d.ts +30 -0
- package/core/components/breadcrumb/breadcrumb.component.d.ts +27 -0
- package/core/components/channel-switcher/channel-switcher.component.d.ts +21 -0
- package/core/components/main-nav/main-nav.component.d.ts +22 -0
- package/core/components/notification/notification.component.d.ts +37 -0
- package/core/components/overlay-host/overlay-host.component.d.ts +12 -0
- package/core/components/settings-nav/settings-nav.component.d.ts +11 -0
- package/core/components/theme-switcher/theme-switcher.component.d.ts +16 -0
- package/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +30 -0
- package/core/components/user-menu/user-menu.component.d.ts +12 -0
- package/core/core.module.d.ts +39 -0
- package/core/data/check-jobs-link.d.ts +19 -0
- package/core/data/client-state/client-defaults.d.ts +32 -0
- package/core/data/client-state/client-resolvers.d.ts +12 -0
- package/core/data/data.module.d.ts +17 -0
- package/core/data/definitions/administrator-definitions.d.ts +14 -0
- package/core/data/definitions/auth-definitions.d.ts +4 -0
- package/core/data/definitions/client-definitions.d.ts +17 -0
- package/core/data/definitions/collection-definitions.d.ts +13 -0
- package/core/data/definitions/customer-definitions.d.ts +23 -0
- package/core/data/definitions/facet-definitions.d.ts +13 -0
- package/core/data/definitions/order-definitions.d.ts +39 -0
- package/core/data/definitions/product-definitions.d.ts +49 -0
- package/core/data/definitions/promotion-definitions.d.ts +6 -0
- package/core/data/definitions/settings-definitions.d.ts +69 -0
- package/core/data/definitions/shared-definitions.d.ts +3 -0
- package/core/data/definitions/shipping-definitions.d.ts +8 -0
- package/core/data/omit-typename-link.d.ts +11 -0
- package/core/data/providers/administrator-data.service.d.ts +19 -0
- package/core/data/providers/auth-data.service.d.ts +9 -0
- package/core/data/providers/base-data.service.d.ts +26 -0
- package/core/data/providers/client-data.service.d.ts +26 -0
- package/core/data/providers/collection-data.service.d.ts +25 -0
- package/core/data/providers/customer-data.service.d.ts +36 -0
- package/core/data/providers/data.service.d.ts +86 -0
- package/core/data/providers/facet-data.service.d.ts +19 -0
- package/core/data/providers/fetch-adapter.d.ts +14 -0
- package/core/data/providers/interceptor.d.ts +49 -0
- package/core/data/providers/order-data.service.d.ts +48 -0
- package/core/data/providers/product-data.service.d.ts +86 -0
- package/core/data/providers/promotion-data.service.d.ts +11 -0
- package/core/data/providers/settings-data.service.d.ts +74 -0
- package/core/data/providers/shipping-method-data.service.d.ts +17 -0
- package/core/data/query-result.d.ts +43 -0
- package/core/data/server-config.d.ts +39 -0
- package/core/data/utils/add-custom-fields.d.ts +7 -0
- package/core/data/utils/get-server-location.d.ts +4 -0
- package/core/data/utils/is-entity-create-or-update-mutation.d.ts +6 -0
- package/core/data/utils/remove-readonly-custom-fields.d.ts +17 -0
- package/core/data/utils/transform-relation-custom-field-inputs.d.ts +8 -0
- package/core/extension/add-action-bar-dropdown-menu-item.d.ts +25 -0
- package/core/extension/add-action-bar-item.d.ts +21 -0
- package/core/extension/add-nav-menu-item.d.ts +56 -0
- package/core/extension/components/angular-route.component.d.ts +26 -0
- package/core/extension/components/route.component.d.ts +20 -0
- package/core/extension/providers/page-metadata.service.d.ts +9 -0
- package/core/extension/register-alert.d.ts +11 -0
- package/core/extension/register-bulk-action.d.ts +49 -0
- package/core/extension/register-custom-detail-component.d.ts +55 -0
- package/core/extension/register-dashboard-widget.d.ts +17 -0
- package/core/extension/register-data-table-component.d.ts +45 -0
- package/core/extension/register-form-input-component.d.ts +51 -0
- package/core/extension/register-history-entry-component.d.ts +66 -0
- package/core/extension/register-page-tab.d.ts +23 -0
- package/core/extension/register-route-component.d.ts +109 -0
- package/core/extension/types.d.ts +11 -0
- package/core/index.d.ts +5 -0
- package/core/providers/alerts/alerts.service.d.ts +150 -0
- package/core/providers/auth/auth.service.d.ts +40 -0
- package/core/providers/breadcrumb/breadcrumb.service.d.ts +39 -0
- package/core/providers/bulk-action-registry/bulk-action-registry.service.d.ts +9 -0
- package/core/providers/bulk-action-registry/bulk-action-types.d.ts +149 -0
- package/core/providers/channel/channel.service.d.ts +16 -0
- package/core/providers/component-registry/component-registry.service.d.ts +13 -0
- package/core/providers/currency/currency.service.d.ts +10 -0
- package/core/providers/custom-detail-component/custom-detail-component-types.d.ts +26 -0
- package/core/providers/custom-detail-component/custom-detail-component.service.d.ts +9 -0
- package/core/providers/custom-field-component/custom-field-component.service.d.ts +25 -0
- package/core/providers/custom-history-entry-component/history-entry-component-types.d.ts +81 -0
- package/core/providers/custom-history-entry-component/history-entry-component.service.d.ts +10 -0
- package/core/providers/dashboard-widget/dashboard-widget-types.d.ts +56 -0
- package/core/providers/dashboard-widget/dashboard-widget.service.d.ts +24 -0
- package/core/providers/data-table/data-table-filter-collection.d.ts +48 -0
- package/core/providers/data-table/data-table-filter.d.ts +108 -0
- package/core/providers/data-table/data-table-sort-collection.d.ts +24 -0
- package/core/providers/data-table/data-table-sort.d.ts +14 -0
- package/core/providers/guard/auth.guard.d.ts +17 -0
- package/core/providers/health-check/health-check.service.d.ts +40 -0
- package/core/providers/i18n/custom-http-loader.d.ts +21 -0
- package/core/providers/i18n/custom-message-format-compiler.d.ts +15 -0
- package/core/providers/i18n/i18n.service.d.ts +39 -0
- package/core/providers/job-queue/job-queue.service.d.ts +22 -0
- package/core/providers/local-storage/local-storage.service.d.ts +66 -0
- package/core/providers/localization/localization.service.d.ts +21 -0
- package/core/providers/modal/modal.service.d.ts +67 -0
- package/core/providers/modal/modal.types.d.ts +69 -0
- package/core/providers/nav-builder/nav-builder-types.d.ts +279 -0
- package/core/providers/nav-builder/nav-builder.service.d.ts +64 -0
- package/core/providers/notification/notification.service.d.ts +105 -0
- package/core/providers/overlay-host/overlay-host.service.d.ts +25 -0
- package/core/providers/page/page.service.d.ts +61 -0
- package/core/providers/permissions/permissions.service.d.ts +26 -0
- package/core/public_api.d.ts +313 -0
- package/core/shared/components/action-bar/action-bar.component.d.ts +17 -0
- package/core/shared/components/action-bar-dropdown-menu/action-bar-dropdown-menu.component.d.ts +15 -0
- package/core/shared/components/action-bar-items/action-bar-base.component.d.ts +29 -0
- package/core/shared/components/action-bar-items/action-bar-items.component.d.ts +11 -0
- package/core/shared/components/address-form/address-form.component.d.ts +10 -0
- package/core/shared/components/affixed-input/affixed-input.component.d.ts +10 -0
- package/core/shared/components/affixed-input/percentage-suffix-input.component.d.ts +22 -0
- package/core/shared/components/asset-file-input/asset-file-input.component.d.ts +39 -0
- package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +97 -0
- package/core/shared/components/asset-gallery/asset-gallery.types.d.ts +3 -0
- package/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.d.ts +60 -0
- package/core/shared/components/asset-preview/asset-preview.component.d.ts +61 -0
- package/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.d.ts +22 -0
- package/core/shared/components/asset-preview-links/asset-preview-links.component.d.ts +8 -0
- package/core/shared/components/asset-search-input/asset-search-input.component.d.ts +26 -0
- package/core/shared/components/assets/assets.component.d.ts +36 -0
- package/core/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.d.ts +28 -0
- package/core/shared/components/bulk-action-menu/bulk-action-menu.component.d.ts +34 -0
- package/core/shared/components/card/card.component.d.ts +13 -0
- package/core/shared/components/channel-assignment-control/channel-assignment-control.component.d.ts +32 -0
- package/core/shared/components/channel-badge/channel-badge.component.d.ts +7 -0
- package/core/shared/components/chart/chart.component.d.ts +28 -0
- package/core/shared/components/chart/tooltip-plugin.d.ts +21 -0
- package/core/shared/components/chip/chip.component.d.ts +38 -0
- package/core/shared/components/configurable-input/configurable-input.component.d.ts +43 -0
- package/core/shared/components/currency-code-selector/currency-code-selector.component.d.ts +21 -0
- package/core/shared/components/currency-input/currency-input.component.d.ts +53 -0
- package/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.d.ts +20 -0
- package/core/shared/components/custom-field-control/custom-field-control.component.d.ts +31 -0
- package/core/shared/components/customer-label/customer-label.component.d.ts +7 -0
- package/core/shared/components/data-table/data-table-column.component.d.ts +11 -0
- package/core/shared/components/data-table/data-table.component.d.ts +107 -0
- package/core/shared/components/data-table-2/data-table-column.component.d.ts +25 -0
- package/core/shared/components/data-table-2/data-table-custom-component.service.d.ts +52 -0
- package/core/shared/components/data-table-2/data-table-custom-field-column.component.d.ts +18 -0
- package/core/shared/components/data-table-2/data-table-search.component.d.ts +10 -0
- package/core/shared/components/data-table-2/data-table2.component.d.ts +134 -0
- package/core/shared/components/data-table-column-picker/data-table-column-picker.component.d.ts +19 -0
- package/core/shared/components/data-table-filter-label/data-table-filter-label.component.d.ts +11 -0
- package/core/shared/components/data-table-filter-presets/add-filter-preset-button.component.d.ts +25 -0
- package/core/shared/components/data-table-filter-presets/data-table-filter-presets.component.d.ts +30 -0
- package/core/shared/components/data-table-filter-presets/filter-preset.service.d.ts +34 -0
- package/core/shared/components/data-table-filter-presets/rename-filter-preset-dialog.component.d.ts +9 -0
- package/core/shared/components/data-table-filters/custom-filter-component.directive.d.ts +8 -0
- package/core/shared/components/data-table-filters/data-table-filters.component.d.ts +30 -0
- package/core/shared/components/datetime-picker/constants.d.ts +5 -0
- package/core/shared/components/datetime-picker/datetime-picker.component.d.ts +100 -0
- package/core/shared/components/datetime-picker/datetime-picker.service.d.ts +37 -0
- package/core/shared/components/datetime-picker/types.d.ts +11 -0
- package/core/shared/components/dropdown/dropdown-item.directive.d.ts +9 -0
- package/core/shared/components/dropdown/dropdown-menu.component.d.ts +42 -0
- package/core/shared/components/dropdown/dropdown-trigger.directive.d.ts +11 -0
- package/core/shared/components/dropdown/dropdown.component.d.ts +39 -0
- package/core/shared/components/duplicate-entity-dialog/duplicate-entity-dialog.component.d.ts +33 -0
- package/core/shared/components/duplicate-entity-dialog/duplicate-entity-dialog.graphql.d.ts +2 -0
- package/core/shared/components/edit-note-dialog/edit-note-dialog.component.d.ts +18 -0
- package/core/shared/components/empty-placeholder/empty-placeholder.component.d.ts +6 -0
- package/core/shared/components/entity-info/entity-info.component.d.ts +11 -0
- package/core/shared/components/extension-host/extension-host-config.d.ts +9 -0
- package/core/shared/components/extension-host/extension-host.component.d.ts +28 -0
- package/core/shared/components/extension-host/extension-host.service.d.ts +23 -0
- package/core/shared/components/extension-host/host-external-frame.d.ts +28 -0
- package/core/shared/components/facet-value-chip/facet-value-chip.component.d.ts +11 -0
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +49 -0
- package/core/shared/components/focal-point-control/focal-point-control.component.d.ts +24 -0
- package/core/shared/components/form-field/form-field-control.directive.d.ts +15 -0
- package/core/shared/components/form-field/form-field.component.d.ts +32 -0
- package/core/shared/components/form-item/form-item.component.d.ts +11 -0
- package/core/shared/components/formatted-address/formatted-address.component.d.ts +13 -0
- package/core/shared/components/help-tooltip/help-tooltip.component.d.ts +7 -0
- package/core/shared/components/history-entry-detail/history-entry-detail.component.d.ts +5 -0
- package/core/shared/components/items-per-page-controls/items-per-page-controls.component.d.ts +11 -0
- package/core/shared/components/labeled-data/labeled-data.component.d.ts +6 -0
- package/core/shared/components/language-code-selector/language-code-selector.component.d.ts +20 -0
- package/core/shared/components/language-selector/language-selector.component.d.ts +11 -0
- package/core/shared/components/localized-text/localized-text.component.d.ts +13 -0
- package/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.d.ts +24 -0
- package/core/shared/components/modal-dialog/dialog-buttons.directive.d.ts +14 -0
- package/core/shared/components/modal-dialog/dialog-component-outlet.component.d.ts +14 -0
- package/core/shared/components/modal-dialog/dialog-title.directive.d.ts +14 -0
- package/core/shared/components/modal-dialog/modal-dialog.component.d.ts +44 -0
- package/core/shared/components/object-tree/object-tree.component.d.ts +32 -0
- package/core/shared/components/order-state-label/order-state-label.component.d.ts +17 -0
- package/core/shared/components/page/page.component.d.ts +21 -0
- package/core/shared/components/page-block/page-block.component.d.ts +5 -0
- package/core/shared/components/page-body/page-body.component.d.ts +5 -0
- package/core/shared/components/page-detail-layout/page-detail-layout.component.d.ts +5 -0
- package/core/shared/components/page-detail-layout/page-detail-sidebar.component.d.ts +5 -0
- package/core/shared/components/page-entity-info/page-entity-info.component.d.ts +10 -0
- package/core/shared/components/page-header/page-header.component.d.ts +5 -0
- package/core/shared/components/page-header-description/page-header-description.component.d.ts +5 -0
- package/core/shared/components/page-header-tabs/page-header-tabs.component.d.ts +14 -0
- package/core/shared/components/page-title/page-title.component.d.ts +16 -0
- package/core/shared/components/pagination-controls/pagination-controls.component.d.ts +11 -0
- package/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.d.ts +38 -0
- package/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.graphql.d.ts +1 -0
- package/core/shared/components/product-search-input/product-search-input.component.d.ts +28 -0
- package/core/shared/components/product-variant-selector/product-variant-selector.component.d.ts +58 -0
- package/core/shared/components/radio-card/radio-card-fieldset.component.d.ts +24 -0
- package/core/shared/components/radio-card/radio-card.component.d.ts +22 -0
- package/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.d.ts +21 -0
- package/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.d.ts +19 -0
- package/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.component.d.ts +31 -0
- package/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.d.ts +34 -0
- package/core/shared/components/rich-text-editor/prosemirror/custom-nodes.d.ts +5 -0
- package/core/shared/components/rich-text-editor/prosemirror/inputrules.d.ts +8 -0
- package/core/shared/components/rich-text-editor/prosemirror/keymap.d.ts +3 -0
- package/core/shared/components/rich-text-editor/prosemirror/menu/links.d.ts +4 -0
- package/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.d.ts +16 -0
- package/core/shared/components/rich-text-editor/prosemirror/menu/menu-plugin.d.ts +9 -0
- package/core/shared/components/rich-text-editor/prosemirror/menu/menu.d.ts +3 -0
- package/core/shared/components/rich-text-editor/prosemirror/menu/sub-menu-with-icon.d.ts +14 -0
- package/core/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.d.ts +7 -0
- package/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.d.ts +5 -0
- package/core/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.d.ts +7 -0
- package/core/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.d.ts +13 -0
- package/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.d.ts +34 -0
- package/core/shared/components/rich-text-editor/prosemirror/types.d.ts +9 -0
- package/core/shared/components/rich-text-editor/prosemirror/utils.d.ts +9 -0
- package/core/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.d.ts +21 -0
- package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +42 -0
- package/core/shared/components/select-toggle/select-toggle.component.d.ts +15 -0
- package/core/shared/components/simple-dialog/simple-dialog.component.d.ts +14 -0
- package/core/shared/components/split-view/split-view.component.d.ts +23 -0
- package/core/shared/components/split-view/split-view.directive.d.ts +13 -0
- package/core/shared/components/status-badge/status-badge.component.d.ts +6 -0
- package/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.d.ts +25 -0
- package/core/shared/components/table-row-action/table-row-action.component.d.ts +12 -0
- package/core/shared/components/tag-selector/tag-selector.component.d.ts +24 -0
- package/core/shared/components/timeline-entry/timeline-entry.component.d.ts +19 -0
- package/core/shared/components/title-input/title-input.component.d.ts +6 -0
- package/core/shared/components/ui-extension-point/ui-extension-point.component.d.ts +27 -0
- package/core/shared/components/zone-selector/zone-selector.component.d.ts +51 -0
- package/core/shared/directives/disabled.directive.d.ts +14 -0
- package/core/shared/directives/if-default-channel-active.directive.d.ts +16 -0
- package/core/shared/directives/if-directive-base.d.ts +27 -0
- package/core/shared/directives/if-multichannel.directive.d.ts +28 -0
- package/core/shared/directives/if-permissions.directive.d.ts +37 -0
- package/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.d.ts +19 -0
- package/core/shared/dynamic-form-inputs/code-editor-form-input/base-code-editor-form-input.component.d.ts +30 -0
- package/core/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.d.ts +22 -0
- package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +23 -0
- package/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.d.ts +28 -0
- package/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.d.ts +25 -0
- package/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.d.ts +33 -0
- package/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.d.ts +22 -0
- package/core/shared/dynamic-form-inputs/default-form-inputs.d.ts +19 -0
- package/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.d.ts +58 -0
- package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +23 -0
- package/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.d.ts +24 -0
- package/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.d.ts +19 -0
- package/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.d.ts +25 -0
- package/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.d.ts +34 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +23 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.d.ts +25 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.d.ts +18 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.d.ts +26 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.d.ts +26 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.d.ts +23 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.d.ts +22 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.d.ts +10 -0
- package/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.d.ts +19 -0
- package/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +30 -0
- package/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.d.ts +21 -0
- package/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.d.ts +20 -0
- package/core/shared/pipes/asset-preview.pipe.d.ts +22 -0
- package/core/shared/pipes/channel-label.pipe.d.ts +7 -0
- package/core/shared/pipes/custom-field-description.pipe.d.ts +11 -0
- package/core/shared/pipes/custom-field-label.pipe.d.ts +13 -0
- package/core/shared/pipes/duration.pipe.d.ts +22 -0
- package/core/shared/pipes/file-size.pipe.d.ts +18 -0
- package/core/shared/pipes/has-permission.pipe.d.ts +27 -0
- package/core/shared/pipes/locale-base.pipe.d.ts +21 -0
- package/core/shared/pipes/locale-currency-name.pipe.d.ts +21 -0
- package/core/shared/pipes/locale-currency.pipe.d.ts +25 -0
- package/core/shared/pipes/locale-date.pipe.d.ts +23 -0
- package/core/shared/pipes/locale-language-name.pipe.d.ts +21 -0
- package/core/shared/pipes/locale-region-name.pipe.d.ts +21 -0
- package/core/shared/pipes/sentence-case.pipe.d.ts +10 -0
- package/core/shared/pipes/sort.pipe.d.ts +12 -0
- package/core/shared/pipes/state-i18n-token.pipe.d.ts +9 -0
- package/core/shared/pipes/string-to-color.pipe.d.ts +7 -0
- package/core/shared/pipes/time-ago.pipe.d.ts +21 -0
- package/core/shared/providers/routing/can-deactivate-detail-guard.d.ts +11 -0
- package/core/shared/shared.module.d.ts +168 -0
- package/core/validators/unicode-pattern.validator.d.ts +2 -0
- package/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.d.ts +22 -0
- package/customer/components/address-card/address-card.component.d.ts +28 -0
- package/customer/components/address-detail-dialog/address-detail-dialog.component.d.ts +17 -0
- package/customer/components/customer-detail/customer-detail.component.d.ts +70 -0
- package/customer/components/customer-group-detail/customer-group-detail.component.d.ts +26 -0
- package/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.d.ts +24 -0
- package/customer/components/customer-group-list/customer-group-list-bulk-actions.d.ts +1 -0
- package/customer/components/customer-group-list/customer-group-list.component.d.ts +29 -0
- package/customer/components/customer-group-member-list/customer-group-member-list-bulk-actions.d.ts +3 -0
- package/customer/components/customer-group-member-list/customer-group-member-list.component.d.ts +39 -0
- package/customer/components/customer-history/customer-history-entry-host.component.d.ts +18 -0
- package/customer/components/customer-history/customer-history.component.d.ts +51 -0
- package/customer/components/customer-list/customer-list-bulk-actions.d.ts +1 -0
- package/customer/components/customer-list/customer-list.component.d.ts +12 -0
- package/customer/components/customer-status-label/customer-status-label.component.d.ts +7 -0
- package/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.d.ts +16 -0
- package/customer/customer.module.d.ts +24 -0
- package/customer/customer.routes.d.ts +4 -0
- package/customer/index.d.ts +5 -0
- package/customer/public_api.d.ts +18 -0
- package/dashboard/components/dashboard/dashboard.component.d.ts +34 -0
- package/dashboard/components/dashboard-widget/dashboard-widget.component.d.ts +13 -0
- package/dashboard/dashboard.module.d.ts +13 -0
- package/dashboard/dashboard.routes.d.ts +2 -0
- package/dashboard/default-widgets.d.ts +5 -0
- package/dashboard/index.d.ts +5 -0
- package/dashboard/public_api.d.ts +10 -0
- package/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.d.ts +18 -0
- package/dashboard/widgets/order-chart-widget/order-chart-widget.component.d.ts +17 -0
- package/dashboard/widgets/order-summary-widget/order-summary-widget.component.d.ts +32 -0
- package/dashboard/widgets/test-widget/test-widget.component.d.ts +10 -0
- package/dashboard/widgets/welcome-widget/welcome-widget.component.d.ts +22 -0
- package/esm2022/catalog/catalog.module.mjs +331 -0
- package/esm2022/catalog/catalog.routes.mjs +144 -0
- package/esm2022/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +30 -0
- package/esm2022/catalog/components/asset-detail/asset-detail.component.mjs +77 -0
- package/esm2022/catalog/components/asset-list/asset-list.component.mjs +120 -0
- package/esm2022/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.mjs +102 -0
- package/esm2022/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.mjs +83 -0
- package/esm2022/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql.mjs +69 -0
- package/esm2022/catalog/components/collection-contents/collection-contents.component.mjs +124 -0
- package/esm2022/catalog/components/collection-data-table/collection-data-table.component.mjs +95 -0
- package/esm2022/catalog/components/collection-detail/collection-detail.component.mjs +263 -0
- package/esm2022/catalog/components/collection-list/collection-breadcrumb.pipe.mjs +19 -0
- package/esm2022/catalog/components/collection-list/collection-list-bulk-actions.mjs +97 -0
- package/esm2022/catalog/components/collection-list/collection-list.component.mjs +157 -0
- package/esm2022/catalog/components/collection-tree/array-to-tree.mjs +56 -0
- package/esm2022/catalog/components/collection-tree/collection-tree-node.component.mjs +125 -0
- package/esm2022/catalog/components/collection-tree/collection-tree.component.mjs +49 -0
- package/esm2022/catalog/components/collection-tree/collection-tree.service.mjs +68 -0
- package/esm2022/catalog/components/collection-tree/collection-tree.types.mjs +2 -0
- package/esm2022/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.mjs +23 -0
- package/esm2022/catalog/components/create-facet-value-dialog/create-facet-value-dialog.component.mjs +44 -0
- package/esm2022/catalog/components/create-product-option-group-dialog/create-product-option-group-dialog.component.mjs +44 -0
- package/esm2022/catalog/components/create-product-variant-dialog/create-product-variant-dialog.component.mjs +80 -0
- package/esm2022/catalog/components/facet-detail/facet-detail.component.mjs +338 -0
- package/esm2022/catalog/components/facet-list/facet-list-bulk-actions.mjs +148 -0
- package/esm2022/catalog/components/facet-list/facet-list.component.mjs +91 -0
- package/esm2022/catalog/components/generate-product-variants/generate-product-variants.component.mjs +133 -0
- package/esm2022/catalog/components/move-collections-dialog/move-collections-dialog.component.mjs +100 -0
- package/esm2022/catalog/components/option-value-input/option-value-input.component.mjs +156 -0
- package/esm2022/catalog/components/product-detail/product-detail.component.mjs +321 -0
- package/esm2022/catalog/components/product-list/product-list-bulk-actions.mjs +144 -0
- package/esm2022/catalog/components/product-list/product-list.component.mjs +159 -0
- package/esm2022/catalog/components/product-list/product-list.graphql.mjs +37 -0
- package/esm2022/catalog/components/product-options-editor/product-options-editor.component.mjs +207 -0
- package/esm2022/catalog/components/product-variant-detail/product-variant-detail.component.mjs +266 -0
- package/esm2022/catalog/components/product-variant-detail/product-variant-detail.graphql.mjs +129 -0
- package/esm2022/catalog/components/product-variant-list/product-variant-list-bulk-actions.mjs +123 -0
- package/esm2022/catalog/components/product-variant-list/product-variant-list.component.mjs +118 -0
- package/esm2022/catalog/components/product-variant-list/product-variant-list.graphql.mjs +51 -0
- package/esm2022/catalog/components/product-variant-quick-jump/product-variant-quick-jump.component.mjs +53 -0
- package/esm2022/catalog/components/product-variants-editor/product-variants-editor.component.mjs +292 -0
- package/esm2022/catalog/components/product-variants-table/product-variants-table.component.mjs +72 -0
- package/esm2022/catalog/components/update-product-option-dialog/update-product-option-dialog.component.mjs +64 -0
- package/esm2022/catalog/components/variant-price-detail/variant-price-detail.component.mjs +59 -0
- package/esm2022/catalog/components/variant-price-strategy-detail/variant-price-strategy-detail.component.mjs +33 -0
- package/esm2022/catalog/deenruv-admin-ui-catalog.mjs +5 -0
- package/esm2022/catalog/providers/product-detail/product-detail.service.mjs +236 -0
- package/esm2022/catalog/providers/product-detail/replace-last.mjs +18 -0
- package/esm2022/catalog/providers/routing/product-variants-resolver.mjs +28 -0
- package/esm2022/catalog/public_api.mjs +50 -0
- package/esm2022/core/app.component.mjs +94 -0
- package/esm2022/core/app.component.module.mjs +19 -0
- package/esm2022/core/app.config.mjs +11 -0
- package/esm2022/core/common/base-detail.component.mjs +208 -0
- package/esm2022/core/common/base-entity-resolver.mjs +60 -0
- package/esm2022/core/common/base-list.component.mjs +186 -0
- package/esm2022/core/common/component-registry-types.mjs +2 -0
- package/esm2022/core/common/deactivate-aware.mjs +2 -0
- package/esm2022/core/common/detail-breadcrumb.mjs +26 -0
- package/esm2022/core/common/generated-types.mjs +1371 -0
- package/esm2022/core/common/introspection-result-wrapper.mjs +3 -0
- package/esm2022/core/common/introspection-result.mjs +329 -0
- package/esm2022/core/common/single-search-selection-model.mjs +51 -0
- package/esm2022/core/common/title-setter.mjs +14 -0
- package/esm2022/core/common/utilities/bulk-action-utils.mjs +271 -0
- package/esm2022/core/common/utilities/configurable-operation-utils.mjs +116 -0
- package/esm2022/core/common/utilities/create-updated-translatable.mjs +58 -0
- package/esm2022/core/common/utilities/custom-field-default-value.mjs +28 -0
- package/esm2022/core/common/utilities/find-translation.mjs +9 -0
- package/esm2022/core/common/utilities/get-default-ui-language.mjs +12 -0
- package/esm2022/core/common/utilities/interpolate-description.mjs +27 -0
- package/esm2022/core/common/utilities/selection-manager.mjs +96 -0
- package/esm2022/core/common/utilities/string-to-color.mjs +36 -0
- package/esm2022/core/common/version.mjs +3 -0
- package/esm2022/core/components/alerts/alerts.component.mjs +26 -0
- package/esm2022/core/components/app-shell/app-shell.component.mjs +104 -0
- package/esm2022/core/components/base-nav/base-nav.component.mjs +298 -0
- package/esm2022/core/components/breadcrumb/breadcrumb.component.mjs +33 -0
- package/esm2022/core/components/channel-switcher/channel-switcher.component.mjs +50 -0
- package/esm2022/core/components/main-nav/main-nav.component.mjs +62 -0
- package/esm2022/core/components/notification/notification.component.mjs +85 -0
- package/esm2022/core/components/overlay-host/overlay-host.component.mjs +22 -0
- package/esm2022/core/components/settings-nav/settings-nav.component.mjs +27 -0
- package/esm2022/core/components/theme-switcher/theme-switcher.component.mjs +39 -0
- package/esm2022/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.mjs +75 -0
- package/esm2022/core/components/user-menu/user-menu.component.mjs +37 -0
- package/esm2022/core/core.module.mjs +165 -0
- package/esm2022/core/data/check-jobs-link.mjs +32 -0
- package/esm2022/core/data/client-state/client-defaults.mjs +33 -0
- package/esm2022/core/data/client-state/client-resolvers.mjs +136 -0
- package/esm2022/core/data/data.module.mjs +135 -0
- package/esm2022/core/data/definitions/administrator-definitions.mjs +135 -0
- package/esm2022/core/data/definitions/auth-definitions.mjs +40 -0
- package/esm2022/core/data/definitions/client-definitions.mjs +137 -0
- package/esm2022/core/data/definitions/collection-definitions.mjs +184 -0
- package/esm2022/core/data/definitions/customer-definitions.mjs +261 -0
- package/esm2022/core/data/definitions/facet-definitions.mjs +155 -0
- package/esm2022/core/data/definitions/order-definitions.mjs +594 -0
- package/esm2022/core/data/definitions/product-definitions.mjs +828 -0
- package/esm2022/core/data/definitions/promotion-definitions.mjs +76 -0
- package/esm2022/core/data/definitions/settings-definitions.mjs +735 -0
- package/esm2022/core/data/definitions/shared-definitions.mjs +33 -0
- package/esm2022/core/data/definitions/shipping-definitions.mjs +98 -0
- package/esm2022/core/data/omit-typename-link.mjs +20 -0
- package/esm2022/core/data/providers/administrator-data.service.mjs +53 -0
- package/esm2022/core/data/providers/auth-data.service.mjs +20 -0
- package/esm2022/core/data/providers/base-data.service.mjs +66 -0
- package/esm2022/core/data/providers/client-data.service.mjs +82 -0
- package/esm2022/core/data/providers/collection-data.service.mjs +84 -0
- package/esm2022/core/data/providers/customer-data.service.mjs +125 -0
- package/esm2022/core/data/providers/data.service.mjs +90 -0
- package/esm2022/core/data/providers/facet-data.service.mjs +63 -0
- package/esm2022/core/data/providers/fetch-adapter.mjs +34 -0
- package/esm2022/core/data/providers/interceptor.mjs +162 -0
- package/esm2022/core/data/providers/order-data.service.mjs +135 -0
- package/esm2022/core/data/providers/product-data.service.mjs +257 -0
- package/esm2022/core/data/providers/promotion-data.service.mjs +50 -0
- package/esm2022/core/data/providers/settings-data.service.mjs +246 -0
- package/esm2022/core/data/providers/shipping-method-data.service.mjs +58 -0
- package/esm2022/core/data/query-result.mjs +77 -0
- package/esm2022/core/data/server-config.mjs +78 -0
- package/esm2022/core/data/utils/add-custom-fields.mjs +84 -0
- package/esm2022/core/data/utils/get-server-location.mjs +17 -0
- package/esm2022/core/data/utils/is-entity-create-or-update-mutation.mjs +45 -0
- package/esm2022/core/data/utils/remove-readonly-custom-fields.mjs +30 -0
- package/esm2022/core/data/utils/transform-relation-custom-field-inputs.mjs +46 -0
- package/esm2022/core/deenruv-admin-ui-core.mjs +5 -0
- package/esm2022/core/extension/add-action-bar-dropdown-menu-item.mjs +35 -0
- package/esm2022/core/extension/add-action-bar-item.mjs +31 -0
- package/esm2022/core/extension/add-nav-menu-item.mjs +75 -0
- package/esm2022/core/extension/components/angular-route.component.mjs +67 -0
- package/esm2022/core/extension/components/route.component.mjs +80 -0
- package/esm2022/core/extension/providers/page-metadata.service.mjs +20 -0
- package/esm2022/core/extension/register-alert.mjs +22 -0
- package/esm2022/core/extension/register-bulk-action.mjs +59 -0
- package/esm2022/core/extension/register-custom-detail-component.mjs +65 -0
- package/esm2022/core/extension/register-dashboard-widget.mjs +36 -0
- package/esm2022/core/extension/register-data-table-component.mjs +51 -0
- package/esm2022/core/extension/register-form-input-component.mjs +61 -0
- package/esm2022/core/extension/register-history-entry-component.mjs +76 -0
- package/esm2022/core/extension/register-page-tab.mjs +36 -0
- package/esm2022/core/extension/register-route-component.mjs +95 -0
- package/esm2022/core/extension/types.mjs +2 -0
- package/esm2022/core/providers/alerts/alerts.service.mjs +114 -0
- package/esm2022/core/providers/auth/auth.service.mjs +124 -0
- package/esm2022/core/providers/breadcrumb/breadcrumb.service.mjs +109 -0
- package/esm2022/core/providers/bulk-action-registry/bulk-action-registry.service.mjs +28 -0
- package/esm2022/core/providers/bulk-action-registry/bulk-action-types.mjs +2 -0
- package/esm2022/core/providers/channel/channel.service.mjs +39 -0
- package/esm2022/core/providers/component-registry/component-registry.service.mjs +25 -0
- package/esm2022/core/providers/currency/currency.service.mjs +21 -0
- package/esm2022/core/providers/custom-detail-component/custom-detail-component-types.mjs +2 -0
- package/esm2022/core/providers/custom-detail-component/custom-detail-component.service.mjs +27 -0
- package/esm2022/core/providers/custom-field-component/custom-field-component.service.mjs +38 -0
- package/esm2022/core/providers/custom-history-entry-component/history-entry-component-types.mjs +2 -0
- package/esm2022/core/providers/custom-history-entry-component/history-entry-component.service.mjs +22 -0
- package/esm2022/core/providers/dashboard-widget/dashboard-widget-types.mjs +2 -0
- package/esm2022/core/providers/dashboard-widget/dashboard-widget.service.mjs +91 -0
- package/esm2022/core/providers/data-table/data-table-filter-collection.mjs +295 -0
- package/esm2022/core/providers/data-table/data-table-filter.mjs +114 -0
- package/esm2022/core/providers/data-table/data-table-sort-collection.mjs +115 -0
- package/esm2022/core/providers/data-table/data-table-sort.mjs +34 -0
- package/esm2022/core/providers/guard/auth.guard.mjs +38 -0
- package/esm2022/core/providers/health-check/health-check.service.mjs +34 -0
- package/esm2022/core/providers/i18n/custom-http-loader.mjs +39 -0
- package/esm2022/core/providers/i18n/custom-message-format-compiler.mjs +31 -0
- package/esm2022/core/providers/i18n/i18n.service.mjs +78 -0
- package/esm2022/core/providers/job-queue/job-queue.service.mjs +91 -0
- package/esm2022/core/providers/local-storage/local-storage.service.mjs +97 -0
- package/esm2022/core/providers/localization/localization.service.mjs +31 -0
- package/esm2022/core/providers/modal/modal.service.mjs +96 -0
- package/esm2022/core/providers/modal/modal.types.mjs +2 -0
- package/esm2022/core/providers/nav-builder/nav-builder-types.mjs +2 -0
- package/esm2022/core/providers/nav-builder/nav-builder.service.mjs +174 -0
- package/esm2022/core/providers/notification/notification.service.mjs +157 -0
- package/esm2022/core/providers/overlay-host/overlay-host.service.mjs +48 -0
- package/esm2022/core/providers/page/page.service.mjs +63 -0
- package/esm2022/core/providers/permissions/permissions.service.mjs +46 -0
- package/esm2022/core/public_api.mjs +315 -0
- package/esm2022/core/shared/components/action-bar/action-bar.component.mjs +54 -0
- package/esm2022/core/shared/components/action-bar-dropdown-menu/action-bar-dropdown-menu.component.mjs +69 -0
- package/esm2022/core/shared/components/action-bar-items/action-bar-base.component.mjs +72 -0
- package/esm2022/core/shared/components/action-bar-items/action-bar-items.component.mjs +50 -0
- package/esm2022/core/shared/components/address-form/address-form.component.mjs +24 -0
- package/esm2022/core/shared/components/affixed-input/affixed-input.component.mjs +19 -0
- package/esm2022/core/shared/components/affixed-input/percentage-suffix-input.component.mjs +86 -0
- package/esm2022/core/shared/components/asset-file-input/asset-file-input.component.mjs +97 -0
- package/esm2022/core/shared/components/asset-gallery/asset-gallery.component.mjs +96 -0
- package/esm2022/core/shared/components/asset-gallery/asset-gallery.types.mjs +2 -0
- package/esm2022/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.mjs +144 -0
- package/esm2022/core/shared/components/asset-preview/asset-preview.component.mjs +229 -0
- package/esm2022/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.mjs +49 -0
- package/esm2022/core/shared/components/asset-preview-links/asset-preview-links.component.mjs +25 -0
- package/esm2022/core/shared/components/asset-search-input/asset-search-input.component.mjs +102 -0
- package/esm2022/core/shared/components/assets/assets.component.mjs +109 -0
- package/esm2022/core/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.mjs +56 -0
- package/esm2022/core/shared/components/bulk-action-menu/bulk-action-menu.component.mjs +100 -0
- package/esm2022/core/shared/components/card/card.component.mjs +32 -0
- package/esm2022/core/shared/components/channel-assignment-control/channel-assignment-control.component.mjs +116 -0
- package/esm2022/core/shared/components/channel-badge/channel-badge.component.mjs +19 -0
- package/esm2022/core/shared/components/chart/chart.component.mjs +100 -0
- package/esm2022/core/shared/components/chart/tooltip-plugin.mjs +143 -0
- package/esm2022/core/shared/components/chip/chip.component.mjs +47 -0
- package/esm2022/core/shared/components/configurable-input/configurable-input.component.mjs +161 -0
- package/esm2022/core/shared/components/currency-code-selector/currency-code-selector.component.mjs +64 -0
- package/esm2022/core/shared/components/currency-input/currency-input.component.mjs +155 -0
- package/esm2022/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.mjs +44 -0
- package/esm2022/core/shared/components/custom-field-control/custom-field-control.component.mjs +88 -0
- package/esm2022/core/shared/components/customer-label/customer-label.component.mjs +17 -0
- package/esm2022/core/shared/components/data-table/data-table-column.component.mjs +29 -0
- package/esm2022/core/shared/components/data-table/data-table.component.mjs +177 -0
- package/esm2022/core/shared/components/data-table-2/data-table-column.component.mjs +64 -0
- package/esm2022/core/shared/components/data-table-2/data-table-custom-component.service.mjs +26 -0
- package/esm2022/core/shared/components/data-table-2/data-table-custom-field-column.component.mjs +52 -0
- package/esm2022/core/shared/components/data-table-2/data-table-search.component.mjs +21 -0
- package/esm2022/core/shared/components/data-table-2/data-table2.component.mjs +308 -0
- package/esm2022/core/shared/components/data-table-column-picker/data-table-column-picker.component.mjs +44 -0
- package/esm2022/core/shared/components/data-table-filter-label/data-table-filter-label.component.mjs +32 -0
- package/esm2022/core/shared/components/data-table-filter-presets/add-filter-preset-button.component.mjs +69 -0
- package/esm2022/core/shared/components/data-table-filter-presets/data-table-filter-presets.component.mjs +80 -0
- package/esm2022/core/shared/components/data-table-filter-presets/filter-preset.service.mjs +79 -0
- package/esm2022/core/shared/components/data-table-filter-presets/rename-filter-preset-dialog.component.mjs +20 -0
- package/esm2022/core/shared/components/data-table-filters/custom-filter-component.directive.mjs +16 -0
- package/esm2022/core/shared/components/data-table-filters/data-table-filters.component.mjs +220 -0
- package/esm2022/core/shared/components/datetime-picker/constants.mjs +20 -0
- package/esm2022/core/shared/components/datetime-picker/datetime-picker.component.mjs +226 -0
- package/esm2022/core/shared/components/datetime-picker/datetime-picker.service.mjs +201 -0
- package/esm2022/core/shared/components/datetime-picker/types.mjs +2 -0
- package/esm2022/core/shared/components/dropdown/dropdown-item.directive.mjs +28 -0
- package/esm2022/core/shared/components/dropdown/dropdown-menu.component.mjs +202 -0
- package/esm2022/core/shared/components/dropdown/dropdown-trigger.directive.mjs +25 -0
- package/esm2022/core/shared/components/dropdown/dropdown.component.mjs +58 -0
- package/esm2022/core/shared/components/duplicate-entity-dialog/duplicate-entity-dialog.component.mjs +111 -0
- package/esm2022/core/shared/components/duplicate-entity-dialog/duplicate-entity-dialog.graphql.mjs +38 -0
- package/esm2022/core/shared/components/edit-note-dialog/edit-note-dialog.component.mjs +32 -0
- package/esm2022/core/shared/components/empty-placeholder/empty-placeholder.component.mjs +16 -0
- package/esm2022/core/shared/components/entity-info/entity-info.component.mjs +26 -0
- package/esm2022/core/shared/components/extension-host/extension-host-config.mjs +7 -0
- package/esm2022/core/shared/components/extension-host/extension-host.component.mjs +81 -0
- package/esm2022/core/shared/components/extension-host/extension-host.service.mjs +99 -0
- package/esm2022/core/shared/components/extension-host/host-external-frame.mjs +41 -0
- package/esm2022/core/shared/components/facet-value-chip/facet-value-chip.component.mjs +26 -0
- package/esm2022/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +150 -0
- package/esm2022/core/shared/components/focal-point-control/focal-point-control.component.mjs +71 -0
- package/esm2022/core/shared/components/form-field/form-field-control.directive.mjs +37 -0
- package/esm2022/core/shared/components/form-field/form-field.component.mjs +73 -0
- package/esm2022/core/shared/components/form-item/form-item.component.mjs +21 -0
- package/esm2022/core/shared/components/formatted-address/formatted-address.component.mjs +38 -0
- package/esm2022/core/shared/components/help-tooltip/help-tooltip.component.mjs +16 -0
- package/esm2022/core/shared/components/history-entry-detail/history-entry-detail.component.mjs +16 -0
- package/esm2022/core/shared/components/items-per-page-controls/items-per-page-controls.component.mjs +28 -0
- package/esm2022/core/shared/components/labeled-data/labeled-data.component.mjs +13 -0
- package/esm2022/core/shared/components/language-code-selector/language-code-selector.component.mjs +72 -0
- package/esm2022/core/shared/components/language-selector/language-selector.component.mjs +30 -0
- package/esm2022/core/shared/components/localized-text/localized-text.component.mjs +24 -0
- package/esm2022/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.mjs +61 -0
- package/esm2022/core/shared/components/modal-dialog/dialog-buttons.directive.mjs +23 -0
- package/esm2022/core/shared/components/modal-dialog/dialog-component-outlet.component.mjs +29 -0
- package/esm2022/core/shared/components/modal-dialog/dialog-title.directive.mjs +23 -0
- package/esm2022/core/shared/components/modal-dialog/modal-dialog.component.mjs +69 -0
- package/esm2022/core/shared/components/object-tree/object-tree.component.mjs +56 -0
- package/esm2022/core/shared/components/order-state-label/order-state-label.component.mjs +47 -0
- package/esm2022/core/shared/components/page/page.component.mjs +38 -0
- package/esm2022/core/shared/components/page-block/page-block.component.mjs +11 -0
- package/esm2022/core/shared/components/page-body/page-body.component.mjs +11 -0
- package/esm2022/core/shared/components/page-detail-layout/page-detail-layout.component.mjs +11 -0
- package/esm2022/core/shared/components/page-detail-layout/page-detail-sidebar.component.mjs +15 -0
- package/esm2022/core/shared/components/page-entity-info/page-entity-info.component.mjs +16 -0
- package/esm2022/core/shared/components/page-header/page-header.component.mjs +11 -0
- package/esm2022/core/shared/components/page-header-description/page-header-description.component.mjs +11 -0
- package/esm2022/core/shared/components/page-header-tabs/page-header-tabs.component.mjs +26 -0
- package/esm2022/core/shared/components/page-title/page-title.component.mjs +40 -0
- package/esm2022/core/shared/components/pagination-controls/pagination-controls.component.mjs +26 -0
- package/esm2022/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.mjs +138 -0
- package/esm2022/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.graphql.mjs +44 -0
- package/esm2022/core/shared/components/product-search-input/product-search-input.component.mjs +104 -0
- package/esm2022/core/shared/components/product-variant-selector/product-variant-selector.component.mjs +62 -0
- package/esm2022/core/shared/components/radio-card/radio-card-fieldset.component.mjs +54 -0
- package/esm2022/core/shared/components/radio-card/radio-card.component.mjs +53 -0
- package/esm2022/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.mjs +37 -0
- package/esm2022/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.mjs +35 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.component.mjs +136 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.mjs +44 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/custom-nodes.mjs +97 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/inputrules.mjs +61 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/keymap.mjs +118 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/menu/links.mjs +69 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.mjs +41 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/menu/menu-plugin.mjs +12 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/menu/menu.mjs +247 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/menu/sub-menu-with-icon.mjs +16 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.mjs +98 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.mjs +22 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.mjs +96 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.mjs +164 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +155 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/types.mjs +2 -0
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/utils.mjs +26 -0
- package/esm2022/core/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.mjs +59 -0
- package/esm2022/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +106 -0
- package/esm2022/core/shared/components/select-toggle/select-toggle.component.mjs +35 -0
- package/esm2022/core/shared/components/simple-dialog/simple-dialog.component.mjs +24 -0
- package/esm2022/core/shared/components/split-view/split-view.component.mjs +62 -0
- package/esm2022/core/shared/components/split-view/split-view.directive.mjs +28 -0
- package/esm2022/core/shared/components/status-badge/status-badge.component.mjs +16 -0
- package/esm2022/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.mjs +70 -0
- package/esm2022/core/shared/components/table-row-action/table-row-action.component.mjs +28 -0
- package/esm2022/core/shared/components/tag-selector/tag-selector.component.mjs +60 -0
- package/esm2022/core/shared/components/timeline-entry/timeline-entry.component.mjs +54 -0
- package/esm2022/core/shared/components/title-input/title-input.component.mjs +21 -0
- package/esm2022/core/shared/components/ui-extension-point/ui-extension-point.component.mjs +142 -0
- package/esm2022/core/shared/components/zone-selector/zone-selector.component.mjs +99 -0
- package/esm2022/core/shared/directives/disabled.directive.mjs +41 -0
- package/esm2022/core/shared/directives/if-default-channel-active.directive.mjs +37 -0
- package/esm2022/core/shared/directives/if-directive-base.mjs +73 -0
- package/esm2022/core/shared/directives/if-multichannel.directive.mjs +43 -0
- package/esm2022/core/shared/directives/if-permissions.directive.mjs +66 -0
- package/esm2022/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.mjs +23 -0
- package/esm2022/core/shared/dynamic-form-inputs/code-editor-form-input/base-code-editor-form-input.component.mjs +62 -0
- package/esm2022/core/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.mjs +59 -0
- package/esm2022/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.mjs +85 -0
- package/esm2022/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.mjs +45 -0
- package/esm2022/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.mjs +32 -0
- package/esm2022/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.mjs +47 -0
- package/esm2022/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.mjs +32 -0
- package/esm2022/core/shared/dynamic-form-inputs/default-form-inputs.mjs +44 -0
- package/esm2022/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.mjs +271 -0
- package/esm2022/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +34 -0
- package/esm2022/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.mjs +39 -0
- package/esm2022/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.mjs +21 -0
- package/esm2022/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.mjs +49 -0
- package/esm2022/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.mjs +66 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.mjs +84 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.mjs +66 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.mjs +54 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.mjs +87 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.mjs +87 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.mjs +60 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.mjs +29 -0
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.mjs +14 -0
- package/esm2022/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.mjs +21 -0
- package/esm2022/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +40 -0
- package/esm2022/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.mjs +28 -0
- package/esm2022/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.mjs +24 -0
- package/esm2022/core/shared/pipes/asset-preview.pipe.mjs +42 -0
- package/esm2022/core/shared/pipes/channel-label.pipe.mjs +23 -0
- package/esm2022/core/shared/pipes/custom-field-description.pipe.mjs +30 -0
- package/esm2022/core/shared/pipes/custom-field-label.pipe.mjs +39 -0
- package/esm2022/core/shared/pipes/duration.pipe.mjs +49 -0
- package/esm2022/core/shared/pipes/file-size.pipe.mjs +47 -0
- package/esm2022/core/shared/pipes/has-permission.pipe.mjs +54 -0
- package/esm2022/core/shared/pipes/locale-base.pipe.mjs +55 -0
- package/esm2022/core/shared/pipes/locale-currency-name.pipe.mjs +60 -0
- package/esm2022/core/shared/pipes/locale-currency.pipe.mjs +56 -0
- package/esm2022/core/shared/pipes/locale-date.pipe.mjs +90 -0
- package/esm2022/core/shared/pipes/locale-language-name.pipe.mjs +51 -0
- package/esm2022/core/shared/pipes/locale-region-name.pipe.mjs +51 -0
- package/esm2022/core/shared/pipes/sentence-case.pipe.mjs +30 -0
- package/esm2022/core/shared/pipes/sort.pipe.mjs +34 -0
- package/esm2022/core/shared/pipes/state-i18n-token.pipe.mjs +54 -0
- package/esm2022/core/shared/pipes/string-to-color.pipe.mjs +18 -0
- package/esm2022/core/shared/pipes/time-ago.pipe.mjs +52 -0
- package/esm2022/core/shared/providers/routing/can-deactivate-detail-guard.mjs +33 -0
- package/esm2022/core/shared/shared.module.mjs +707 -0
- package/esm2022/core/validators/unicode-pattern.validator.mjs +8 -0
- package/esm2022/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.mjs +39 -0
- package/esm2022/customer/components/address-card/address-card.component.mjs +97 -0
- package/esm2022/customer/components/address-detail-dialog/address-detail-dialog.component.mjs +28 -0
- package/esm2022/customer/components/customer-detail/customer-detail.component.mjs +441 -0
- package/esm2022/customer/components/customer-group-detail/customer-group-detail.component.mjs +90 -0
- package/esm2022/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.mjs +46 -0
- package/esm2022/customer/components/customer-group-list/customer-group-list-bulk-actions.mjs +9 -0
- package/esm2022/customer/components/customer-group-list/customer-group-list.component.mjs +148 -0
- package/esm2022/customer/components/customer-group-member-list/customer-group-member-list-bulk-actions.mjs +27 -0
- package/esm2022/customer/components/customer-group-member-list/customer-group-member-list.component.mjs +91 -0
- package/esm2022/customer/components/customer-history/customer-history-entry-host.component.mjs +62 -0
- package/esm2022/customer/components/customer-history/customer-history.component.mjs +89 -0
- package/esm2022/customer/components/customer-list/customer-list-bulk-actions.mjs +9 -0
- package/esm2022/customer/components/customer-list/customer-list.component.mjs +108 -0
- package/esm2022/customer/components/customer-status-label/customer-status-label.component.mjs +17 -0
- package/esm2022/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.mjs +31 -0
- package/esm2022/customer/customer.module.mjs +146 -0
- package/esm2022/customer/customer.routes.mjs +50 -0
- package/esm2022/customer/deenruv-admin-ui-customer.mjs +5 -0
- package/esm2022/customer/public_api.mjs +20 -0
- package/esm2022/dashboard/components/dashboard/dashboard.component.mjs +124 -0
- package/esm2022/dashboard/components/dashboard-widget/dashboard-widget.component.mjs +32 -0
- package/esm2022/dashboard/dashboard.module.mjs +34 -0
- package/esm2022/dashboard/dashboard.routes.mjs +9 -0
- package/esm2022/dashboard/deenruv-admin-ui-dashboard.mjs +5 -0
- package/esm2022/dashboard/default-widgets.mjs +31 -0
- package/esm2022/dashboard/public_api.mjs +12 -0
- package/esm2022/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.mjs +73 -0
- package/esm2022/dashboard/widgets/order-chart-widget/order-chart-widget.component.mjs +66 -0
- package/esm2022/dashboard/widgets/order-summary-widget/order-summary-widget.component.mjs +68 -0
- package/esm2022/dashboard/widgets/test-widget/test-widget.component.mjs +22 -0
- package/esm2022/dashboard/widgets/welcome-widget/welcome-widget.component.mjs +39 -0
- package/esm2022/deenruv-admin-ui.mjs +5 -0
- package/esm2022/login/components/login/login.component.mjs +97 -0
- package/esm2022/login/deenruv-admin-ui-login.mjs +5 -0
- package/esm2022/login/login.module.mjs +21 -0
- package/esm2022/login/login.routes.mjs +11 -0
- package/esm2022/login/providers/login.guard.mjs +31 -0
- package/esm2022/login/public_api.mjs +6 -0
- package/esm2022/marketing/components/promotion-detail/promotion-detail.component.mjs +269 -0
- package/esm2022/marketing/components/promotion-list/promotion-list-bulk-actions.mjs +78 -0
- package/esm2022/marketing/components/promotion-list/promotion-list.component.mjs +128 -0
- package/esm2022/marketing/deenruv-admin-ui-marketing.mjs +5 -0
- package/esm2022/marketing/marketing.module.mjs +75 -0
- package/esm2022/marketing/marketing.routes.mjs +32 -0
- package/esm2022/marketing/public_api.mjs +7 -0
- package/esm2022/order/common/get-refundable-payments.mjs +19 -0
- package/esm2022/order/common/modify-order-types.mjs +2 -0
- package/esm2022/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.mjs +61 -0
- package/esm2022/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +80 -0
- package/esm2022/order/components/coupon-code-selector/coupon-code-selector.component.mjs +62 -0
- package/esm2022/order/components/draft-order-detail/draft-order-detail.component.mjs +183 -0
- package/esm2022/order/components/draft-order-variant-selector/draft-order-variant-selector.component.mjs +59 -0
- package/esm2022/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +79 -0
- package/esm2022/order/components/fulfillment-card/fulfillment-card.component.mjs +48 -0
- package/esm2022/order/components/fulfillment-detail/fulfillment-detail.component.mjs +50 -0
- package/esm2022/order/components/fulfillment-state-label/fulfillment-state-label.component.mjs +28 -0
- package/esm2022/order/components/line-fulfillment/line-fulfillment.component.mjs +62 -0
- package/esm2022/order/components/line-refunds/line-refunds.component.mjs +28 -0
- package/esm2022/order/components/modification-detail/modification-detail.component.mjs +71 -0
- package/esm2022/order/components/order-custom-fields-card/order-custom-fields-card.component.mjs +64 -0
- package/esm2022/order/components/order-data-table/order-data-table.component.mjs +59 -0
- package/esm2022/order/components/order-data-table/order-total-column.component.mjs +20 -0
- package/esm2022/order/components/order-detail/order-detail.component.mjs +602 -0
- package/esm2022/order/components/order-editor/order-editor.component.mjs +485 -0
- package/esm2022/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.mjs +93 -0
- package/esm2022/order/components/order-history/order-history-entry-host.component.mjs +62 -0
- package/esm2022/order/components/order-history/order-history.component.mjs +184 -0
- package/esm2022/order/components/order-list/order-list.component.mjs +154 -0
- package/esm2022/order/components/order-modification-summary/order-modification-summary.component.mjs +76 -0
- package/esm2022/order/components/order-payment-card/order-payment-card.component.mjs +43 -0
- package/esm2022/order/components/order-process-graph/constants.mjs +2 -0
- package/esm2022/order/components/order-process-graph/order-process-edge.component.mjs +45 -0
- package/esm2022/order/components/order-process-graph/order-process-graph.component.mjs +96 -0
- package/esm2022/order/components/order-process-graph/order-process-node.component.mjs +53 -0
- package/esm2022/order/components/order-process-graph/types.mjs +2 -0
- package/esm2022/order/components/order-process-graph-dialog/order-process-graph-dialog.component.mjs +21 -0
- package/esm2022/order/components/order-state-select-dialog/order-state-select-dialog.component.mjs +28 -0
- package/esm2022/order/components/order-table/order-table.component.mjs +96 -0
- package/esm2022/order/components/payment-detail/payment-detail.component.mjs +18 -0
- package/esm2022/order/components/payment-for-refund-selector/payment-for-refund-selector.component.mjs +24 -0
- package/esm2022/order/components/payment-state-label/payment-state-label.component.mjs +28 -0
- package/esm2022/order/components/refund-detail/refund-detail.component.mjs +18 -0
- package/esm2022/order/components/refund-order-dialog/refund-order-dialog.component.mjs +173 -0
- package/esm2022/order/components/refund-state-label/refund-state-label.component.mjs +27 -0
- package/esm2022/order/components/select-address-dialog/select-address-dialog.component.mjs +89 -0
- package/esm2022/order/components/select-address-dialog/select-address-dialog.graphql.mjs +14 -0
- package/esm2022/order/components/select-customer-dialog/select-customer-dialog.component.mjs +65 -0
- package/esm2022/order/components/select-shipping-method-dialog/select-shipping-method-dialog.component.mjs +30 -0
- package/esm2022/order/components/seller-orders-card/seller-orders-card.component.mjs +39 -0
- package/esm2022/order/components/seller-orders-card/seller-orders-card.graphql.mjs +25 -0
- package/esm2022/order/components/settle-refund-dialog/settle-refund-dialog.component.mjs +24 -0
- package/esm2022/order/components/simple-item-list/simple-item-list.component.mjs +15 -0
- package/esm2022/order/deenruv-admin-ui-order.mjs +5 -0
- package/esm2022/order/order.module.mjs +244 -0
- package/esm2022/order/order.routes.mjs +56 -0
- package/esm2022/order/providers/order-transition.service.mjs +112 -0
- package/esm2022/order/providers/routing/order.guard.mjs +57 -0
- package/esm2022/order/public_api.mjs +53 -0
- package/esm2022/public_api.mjs +5 -0
- package/esm2022/react/components/react-custom-column.component.mjs +25 -0
- package/esm2022/react/components/react-custom-detail.component.mjs +23 -0
- package/esm2022/react/components/react-form-input.component.mjs +24 -0
- package/esm2022/react/components/react-route.component.mjs +26 -0
- package/esm2022/react/deenruv-admin-ui-react.mjs +5 -0
- package/esm2022/react/directives/react-component-host.directive.mjs +54 -0
- package/esm2022/react/public_api.mjs +27 -0
- package/esm2022/react/react-components/ActionBar.mjs +26 -0
- package/esm2022/react/react-components/Card.mjs +28 -0
- package/esm2022/react/react-components/CdsIcon.mjs +30 -0
- package/esm2022/react/react-components/FormField.mjs +28 -0
- package/esm2022/react/react-components/Link.mjs +30 -0
- package/esm2022/react/react-components/PageBlock.mjs +24 -0
- package/esm2022/react/react-components/PageDetailLayout.mjs +26 -0
- package/esm2022/react/react-components/RichTextEditor.mjs +73 -0
- package/esm2022/react/react-hooks/use-detail-component-data.mjs +48 -0
- package/esm2022/react/react-hooks/use-form-control.mjs +66 -0
- package/esm2022/react/react-hooks/use-injector.mjs +33 -0
- package/esm2022/react/react-hooks/use-page-metadata.mjs +41 -0
- package/esm2022/react/react-hooks/use-query.mjs +198 -0
- package/esm2022/react/react-hooks/use-rich-text-editor.mjs +50 -0
- package/esm2022/react/react-hooks/use-route-params.mjs +39 -0
- package/esm2022/react/register-react-custom-detail-component.mjs +33 -0
- package/esm2022/react/register-react-data-table-component.mjs +64 -0
- package/esm2022/react/register-react-form-input-component.mjs +27 -0
- package/esm2022/react/register-react-route-component.mjs +25 -0
- package/esm2022/react/types.mjs +2 -0
- package/esm2022/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.mjs +57 -0
- package/esm2022/settings/components/admin-detail/admin-detail.component.mjs +205 -0
- package/esm2022/settings/components/administrator-list/administrator-list-bulk-actions.mjs +9 -0
- package/esm2022/settings/components/administrator-list/administrator-list.component.mjs +120 -0
- package/esm2022/settings/components/channel-detail/channel-detail.component.mjs +202 -0
- package/esm2022/settings/components/channel-list/channel-list-bulk-actions.mjs +16 -0
- package/esm2022/settings/components/channel-list/channel-list.component.mjs +81 -0
- package/esm2022/settings/components/country-detail/country-detail.component.mjs +126 -0
- package/esm2022/settings/components/country-list/country-list-bulk-actions.mjs +10 -0
- package/esm2022/settings/components/country-list/country-list.component.mjs +91 -0
- package/esm2022/settings/components/global-settings/global-settings.component.mjs +102 -0
- package/esm2022/settings/components/payment-method-detail/payment-method-detail.component.mjs +206 -0
- package/esm2022/settings/components/payment-method-list/payment-method-list-bulk-actions.mjs +56 -0
- package/esm2022/settings/components/payment-method-list/payment-method-list.component.mjs +99 -0
- package/esm2022/settings/components/permission-grid/permission-grid.component.mjs +81 -0
- package/esm2022/settings/components/profile/profile.component.mjs +96 -0
- package/esm2022/settings/components/role-detail/role-detail.component.mjs +119 -0
- package/esm2022/settings/components/role-list/role-list-bulk-actions.mjs +9 -0
- package/esm2022/settings/components/role-list/role-list.component.mjs +82 -0
- package/esm2022/settings/components/seller-detail/seller-detail.component.mjs +119 -0
- package/esm2022/settings/components/seller-list/seller-list-bulk-actions.mjs +9 -0
- package/esm2022/settings/components/seller-list/seller-list.component.mjs +75 -0
- package/esm2022/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.mjs +30 -0
- package/esm2022/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +256 -0
- package/esm2022/settings/components/shipping-method-list/shipping-method-list-bulk-actions.mjs +54 -0
- package/esm2022/settings/components/shipping-method-list/shipping-method-list.component.mjs +99 -0
- package/esm2022/settings/components/shipping-method-test-result/shipping-method-test-result.component.mjs +30 -0
- package/esm2022/settings/components/stock-location-detail/stock-location-detail.component.mjs +137 -0
- package/esm2022/settings/components/stock-location-list/stock-location-list-bulk-actions.mjs +68 -0
- package/esm2022/settings/components/stock-location-list/stock-location-list.component.mjs +87 -0
- package/esm2022/settings/components/tax-category-detail/tax-category-detail.component.mjs +114 -0
- package/esm2022/settings/components/tax-category-list/tax-category-list-bulk-actions.mjs +10 -0
- package/esm2022/settings/components/tax-category-list/tax-category-list.component.mjs +69 -0
- package/esm2022/settings/components/tax-rate-detail/tax-rate-detail.component.mjs +137 -0
- package/esm2022/settings/components/tax-rate-list/tax-rate-list-bulk-actions.mjs +10 -0
- package/esm2022/settings/components/tax-rate-list/tax-rate-list.component.mjs +83 -0
- package/esm2022/settings/components/test-address-form/test-address-form.component.mjs +48 -0
- package/esm2022/settings/components/test-order-builder/test-order-builder.component.mjs +71 -0
- package/esm2022/settings/components/test-shipping-methods/test-shipping-methods.component.mjs +52 -0
- package/esm2022/settings/components/zone-detail/zone-detail.component.mjs +117 -0
- package/esm2022/settings/components/zone-list/zone-list-bulk-actions.mjs +10 -0
- package/esm2022/settings/components/zone-list/zone-list.component.mjs +143 -0
- package/esm2022/settings/components/zone-member-list/zone-member-controls.directive.mjs +16 -0
- package/esm2022/settings/components/zone-member-list/zone-member-list-bulk-actions.mjs +26 -0
- package/esm2022/settings/components/zone-member-list/zone-member-list-header.directive.mjs +16 -0
- package/esm2022/settings/components/zone-member-list/zone-member-list.component.mjs +95 -0
- package/esm2022/settings/deenruv-admin-ui-settings.mjs +5 -0
- package/esm2022/settings/providers/routing/profile-resolver.mjs +30 -0
- package/esm2022/settings/public_api.mjs +51 -0
- package/esm2022/settings/settings.module.mjs +467 -0
- package/esm2022/settings/settings.routes.mjs +232 -0
- package/esm2022/system/components/health-check/health-check.component.mjs +18 -0
- package/esm2022/system/components/job-list/job-list.component.mjs +72 -0
- package/esm2022/system/components/job-state-label/job-state-label.component.mjs +46 -0
- package/esm2022/system/deenruv-admin-ui-system.mjs +5 -0
- package/esm2022/system/public_api.mjs +7 -0
- package/esm2022/system/system.module.mjs +22 -0
- package/esm2022/system/system.routes.mjs +20 -0
- package/fesm2022/deenruv-admin-ui-catalog.mjs +5171 -0
- package/fesm2022/deenruv-admin-ui-catalog.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-core.mjs +22758 -0
- package/fesm2022/deenruv-admin-ui-core.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-customer.mjs +1400 -0
- package/fesm2022/deenruv-admin-ui-customer.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-dashboard.mjs +454 -0
- package/fesm2022/deenruv-admin-ui-dashboard.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-login.mjs +157 -0
- package/fesm2022/deenruv-admin-ui-login.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-marketing.mjs +566 -0
- package/fesm2022/deenruv-admin-ui-marketing.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-order.mjs +3664 -0
- package/fesm2022/deenruv-admin-ui-order.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-react.mjs +999 -0
- package/fesm2022/deenruv-admin-ui-react.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-settings.mjs +4067 -0
- package/fesm2022/deenruv-admin-ui-settings.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui-system.mjs +164 -0
- package/fesm2022/deenruv-admin-ui-system.mjs.map +1 -0
- package/fesm2022/deenruv-admin-ui.mjs +11 -0
- package/fesm2022/deenruv-admin-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/login/components/login/login.component.d.ts +37 -0
- package/login/index.d.ts +5 -0
- package/login/login.module.d.ts +9 -0
- package/login/login.routes.d.ts +2 -0
- package/login/providers/login.guard.d.ts +15 -0
- package/login/public_api.d.ts +4 -0
- package/marketing/components/promotion-detail/promotion-detail.component.d.ts +70 -0
- package/marketing/components/promotion-list/promotion-list-bulk-actions.d.ts +6 -0
- package/marketing/components/promotion-list/promotion-list.component.d.ts +13 -0
- package/marketing/index.d.ts +5 -0
- package/marketing/marketing.module.d.ts +14 -0
- package/marketing/marketing.routes.d.ts +4 -0
- package/marketing/public_api.d.ts +5 -0
- package/order/common/get-refundable-payments.d.ts +9 -0
- package/order/common/modify-order-types.d.ts +29 -0
- package/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.d.ts +19 -0
- package/order/components/cancel-order-dialog/cancel-order-dialog.component.d.ts +24 -0
- package/order/components/coupon-code-selector/coupon-code-selector.component.d.ts +22 -0
- package/order/components/draft-order-detail/draft-order-detail.component.d.ts +51 -0
- package/order/components/draft-order-variant-selector/draft-order-variant-selector.component.d.ts +24 -0
- package/order/components/fulfill-order-dialog/fulfill-order-dialog.component.d.ts +28 -0
- package/order/components/fulfillment-card/fulfillment-card.component.d.ts +12 -0
- package/order/components/fulfillment-detail/fulfillment-detail.component.d.ts +23 -0
- package/order/components/fulfillment-state-label/fulfillment-state-label.component.d.ts +7 -0
- package/order/components/line-fulfillment/line-fulfillment.component.d.ts +26 -0
- package/order/components/line-refunds/line-refunds.component.d.ts +9 -0
- package/order/components/modification-detail/modification-detail.component.d.ts +34 -0
- package/order/components/order-custom-fields-card/order-custom-fields-card.component.d.ts +21 -0
- package/order/components/order-data-table/order-data-table.component.d.ts +15 -0
- package/order/components/order-data-table/order-total-column.component.d.ts +7 -0
- package/order/components/order-detail/order-detail.component.d.ts +68 -0
- package/order/components/order-editor/order-editor.component.d.ts +99 -0
- package/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.d.ts +51 -0
- package/order/components/order-history/order-history-entry-host.component.d.ts +18 -0
- package/order/components/order-history/order-history.component.d.ts +92 -0
- package/order/components/order-list/order-list.component.d.ts +21 -0
- package/order/components/order-modification-summary/order-modification-summary.component.d.ts +19 -0
- package/order/components/order-payment-card/order-payment-card.component.d.ts +67 -0
- package/order/components/order-process-graph/constants.d.ts +1 -0
- package/order/components/order-process-graph/order-process-edge.component.d.ts +21 -0
- package/order/components/order-process-graph/order-process-graph.component.d.ts +32 -0
- package/order/components/order-process-graph/order-process-node.component.d.ts +26 -0
- package/order/components/order-process-graph/types.d.ts +4 -0
- package/order/components/order-process-graph-dialog/order-process-graph-dialog.component.d.ts +13 -0
- package/order/components/order-state-select-dialog/order-state-select-dialog.component.d.ts +13 -0
- package/order/components/order-table/order-table.component.d.ts +43 -0
- package/order/components/payment-detail/payment-detail.component.d.ts +8 -0
- package/order/components/payment-for-refund-selector/payment-for-refund-selector.component.d.ts +14 -0
- package/order/components/payment-state-label/payment-state-label.component.d.ts +7 -0
- package/order/components/refund-detail/refund-detail.component.d.ts +8 -0
- package/order/components/refund-order-dialog/refund-order-dialog.component.d.ts +46 -0
- package/order/components/refund-state-label/refund-state-label.component.d.ts +7 -0
- package/order/components/select-address-dialog/select-address-dialog.component.d.ts +27 -0
- package/order/components/select-address-dialog/select-address-dialog.graphql.d.ts +1 -0
- package/order/components/select-customer-dialog/select-customer-dialog.component.d.ts +32 -0
- package/order/components/select-shipping-method-dialog/select-shipping-method-dialog.component.d.ts +18 -0
- package/order/components/seller-orders-card/seller-orders-card.component.d.ts +24 -0
- package/order/components/seller-orders-card/seller-orders-card.graphql.d.ts +1 -0
- package/order/components/settle-refund-dialog/settle-refund-dialog.component.d.ts +11 -0
- package/order/components/simple-item-list/simple-item-list.component.d.ts +9 -0
- package/order/index.d.ts +5 -0
- package/order/order.module.d.ts +52 -0
- package/order/order.routes.d.ts +3 -0
- package/order/providers/order-transition.service.d.ts +32 -0
- package/order/providers/routing/order.guard.d.ts +13 -0
- package/order/public_api.d.ts +51 -0
- package/package.json +133 -0
- package/public_api.d.ts +4 -0
- package/react/components/react-custom-column.component.d.ts +17 -0
- package/react/components/react-custom-detail.component.d.ts +24 -0
- package/react/components/react-form-input.component.d.ts +20 -0
- package/react/components/react-route.component.d.ts +10 -0
- package/react/directives/react-component-host.directive.d.ts +23 -0
- package/react/index.d.ts +5 -0
- package/react/public_api.d.ts +25 -0
- package/react/react-components/ActionBar.d.ts +23 -0
- package/react/react-components/Card.d.ts +24 -0
- package/react/react-components/CdsIcon.d.ts +45 -0
- package/react/react-components/FormField.d.ts +27 -0
- package/react/react-components/Link.d.ts +22 -0
- package/react/react-components/PageBlock.d.ts +21 -0
- package/react/react-components/PageDetailLayout.d.ts +23 -0
- package/react/react-components/RichTextEditor.d.ts +62 -0
- package/react/react-hooks/use-detail-component-data.d.ts +32 -0
- package/react/react-hooks/use-form-control.d.ts +29 -0
- package/react/react-hooks/use-injector.d.ts +24 -0
- package/react/react-hooks/use-page-metadata.d.ts +30 -0
- package/react/react-hooks/use-query.d.ts +163 -0
- package/react/react-hooks/use-rich-text-editor.d.ts +37 -0
- package/react/react-hooks/use-route-params.d.ts +22 -0
- package/react/register-react-custom-detail-component.d.ts +38 -0
- package/react/register-react-data-table-component.d.ts +83 -0
- package/react/register-react-form-input-component.d.ts +9 -0
- package/react/register-react-route-component.d.ts +32 -0
- package/react/types.d.ts +17 -0
- package/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.d.ts +20 -0
- package/settings/components/admin-detail/admin-detail.component.d.ts +64 -0
- package/settings/components/administrator-list/administrator-list-bulk-actions.d.ts +1 -0
- package/settings/components/administrator-list/administrator-list.component.d.ts +29 -0
- package/settings/components/channel-detail/channel-detail.component.d.ts +46 -0
- package/settings/components/channel-list/channel-list-bulk-actions.d.ts +1 -0
- package/settings/components/channel-list/channel-list.component.d.ts +13 -0
- package/settings/components/country-detail/country-detail.component.d.ts +29 -0
- package/settings/components/country-list/country-list-bulk-actions.d.ts +1 -0
- package/settings/components/country-list/country-list.component.d.ts +11 -0
- package/settings/components/global-settings/global-settings.component.d.ts +29 -0
- package/settings/components/payment-method-detail/payment-method-detail.component.d.ts +64 -0
- package/settings/components/payment-method-list/payment-method-list-bulk-actions.d.ts +3 -0
- package/settings/components/payment-method-list/payment-method-list.component.d.ts +11 -0
- package/settings/components/permission-grid/permission-grid.component.d.ts +28 -0
- package/settings/components/profile/profile.component.d.ts +28 -0
- package/settings/components/role-detail/role-detail.component.d.ts +31 -0
- package/settings/components/role-list/role-list-bulk-actions.d.ts +1 -0
- package/settings/components/role-list/role-list.component.d.ts +17 -0
- package/settings/components/seller-detail/seller-detail.component.d.ts +31 -0
- package/settings/components/seller-list/seller-list-bulk-actions.d.ts +1 -0
- package/settings/components/seller-list/seller-list.component.d.ts +11 -0
- package/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.d.ts +12 -0
- package/settings/components/shipping-method-detail/shipping-method-detail.component.d.ts +76 -0
- package/settings/components/shipping-method-list/shipping-method-list-bulk-actions.d.ts +3 -0
- package/settings/components/shipping-method-list/shipping-method-list.component.d.ts +12 -0
- package/settings/components/shipping-method-test-result/shipping-method-test-result.component.d.ts +12 -0
- package/settings/components/stock-location-detail/stock-location-detail.component.d.ts +32 -0
- package/settings/components/stock-location-list/stock-location-list-bulk-actions.d.ts +3 -0
- package/settings/components/stock-location-list/stock-location-list.component.d.ts +12 -0
- package/settings/components/tax-category-detail/tax-category-detail.component.d.ts +32 -0
- package/settings/components/tax-category-list/tax-category-list-bulk-actions.d.ts +1 -0
- package/settings/components/tax-category-list/tax-category-list.component.d.ts +11 -0
- package/settings/components/tax-rate-detail/tax-rate-detail.component.d.ts +39 -0
- package/settings/components/tax-rate-list/tax-rate-list-bulk-actions.d.ts +1 -0
- package/settings/components/tax-rate-list/tax-rate-list.component.d.ts +11 -0
- package/settings/components/test-address-form/test-address-form.component.d.ts +25 -0
- package/settings/components/test-order-builder/test-order-builder.component.d.ts +31 -0
- package/settings/components/test-shipping-methods/test-shipping-methods.component.d.ts +23 -0
- package/settings/components/zone-detail/zone-detail.component.d.ts +31 -0
- package/settings/components/zone-list/zone-list-bulk-actions.d.ts +1 -0
- package/settings/components/zone-list/zone-list.component.d.ts +26 -0
- package/settings/components/zone-member-list/zone-member-controls.directive.d.ts +8 -0
- package/settings/components/zone-member-list/zone-member-list-bulk-actions.d.ts +3 -0
- package/settings/components/zone-member-list/zone-member-list-header.directive.d.ts +8 -0
- package/settings/components/zone-member-list/zone-member-list.component.d.ts +40 -0
- package/settings/index.d.ts +5 -0
- package/settings/providers/routing/profile-resolver.d.ts +8 -0
- package/settings/public_api.d.ts +49 -0
- package/settings/settings.module.d.ts +45 -0
- package/settings/settings.routes.d.ts +3 -0
- package/static/assets/.gitkeep +0 -0
- package/static/assets/logo-login.webp +0 -0
- package/static/assets/logo-top.webp +0 -0
- package/static/deenruv-ui-config.json +290 -0
- package/static/favicon.ico +0 -0
- package/static/fonts/fonts.scss +253 -0
- package/static/fonts/inter-cyrillic-ext.woff2 +0 -0
- package/static/fonts/inter-cyrillic.woff2 +0 -0
- package/static/fonts/inter-greek-ext.woff2 +0 -0
- package/static/fonts/inter-greek.woff2 +0 -0
- package/static/fonts/inter-latin-ext.woff2 +0 -0
- package/static/fonts/inter-latin.woff2 +0 -0
- package/static/fonts/inter-vietnamese.woff2 +0 -0
- package/static/i18n-messages/ar.json +814 -0
- package/static/i18n-messages/cs.json +814 -0
- package/static/i18n-messages/de.json +814 -0
- package/static/i18n-messages/en.json +814 -0
- package/static/i18n-messages/es.json +814 -0
- package/static/i18n-messages/fa.json +814 -0
- package/static/i18n-messages/fr.json +814 -0
- package/static/i18n-messages/he.json +814 -0
- package/static/i18n-messages/hr.json +814 -0
- package/static/i18n-messages/it.json +814 -0
- package/static/i18n-messages/nb.json +812 -0
- package/static/i18n-messages/ne.json +814 -0
- package/static/i18n-messages/pl.json +814 -0
- package/static/i18n-messages/pt_BR.json +814 -0
- package/static/i18n-messages/pt_PT.json +814 -0
- package/static/i18n-messages/ru.json +814 -0
- package/static/i18n-messages/sv.json +807 -0
- package/static/i18n-messages/uk.json +814 -0
- package/static/i18n-messages/zh_Hans.json +814 -0
- package/static/i18n-messages/zh_Hant.json +814 -0
- package/static/index.html +14 -0
- package/static/polyfills.ts +66 -0
- package/static/styles/_mixins.scss +60 -0
- package/static/styles/_variables.scss +11 -0
- package/static/styles/component/prosemirror.scss +511 -0
- package/static/styles/global/_buttons.scss +147 -0
- package/static/styles/global/_clarity.scss +140 -0
- package/static/styles/global/_forms.scss +187 -0
- package/static/styles/global/_global.scss +41 -0
- package/static/styles/global/_overrides.scss +165 -0
- package/static/styles/global/_sass-overrides.scss +8 -0
- package/static/styles/global/_utilities.scss +155 -0
- package/static/styles/rtl.scss +143 -0
- package/static/styles/styles.scss +19 -0
- package/static/styles/theme/dark.scss +591 -0
- package/static/styles/theme/default.scss +254 -0
- package/static/styles/ui-extension-theme.scss +13 -0
- package/static/theme.min.css +1 -0
- package/system/components/health-check/health-check.component.d.ts +8 -0
- package/system/components/job-list/job-list.component.d.ts +19 -0
- package/system/components/job-state-label/job-state-label.component.d.ts +9 -0
- package/system/index.d.ts +5 -0
- package/system/public_api.d.ts +5 -0
- package/system/system.module.d.ts +11 -0
- package/system/system.routes.d.ts +2 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { MenuItem } from 'prosemirror-menu';
|
|
2
|
+
import { Plugin, TextSelection } from 'prosemirror-state';
|
|
3
|
+
import { addColumnAfter, addColumnBefore, addRowAfter, addRowBefore, deleteColumn, deleteRow, deleteTable, isInTable, mergeCells, splitCell, tableNodes, tableNodeTypes, toggleHeaderCell, toggleHeaderColumn, toggleHeaderRow, } from 'prosemirror-tables';
|
|
4
|
+
import { renderClarityIcon } from '../menu/menu-common';
|
|
5
|
+
export const tableContextMenuPlugin = (contextMenuService) => new Plugin({
|
|
6
|
+
view: () => ({
|
|
7
|
+
update: view => {
|
|
8
|
+
if (!view.hasFocus()) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const { doc, selection } = view.state;
|
|
12
|
+
let tableNode;
|
|
13
|
+
let tableNodePos = 0;
|
|
14
|
+
doc.nodesBetween(selection.from, selection.to, (n, pos, parent) => {
|
|
15
|
+
if (n.type.name === 'table') {
|
|
16
|
+
tableNode = n;
|
|
17
|
+
tableNodePos = pos;
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
if (tableNode) {
|
|
22
|
+
const node = view.nodeDOM(tableNodePos);
|
|
23
|
+
if (node instanceof Element) {
|
|
24
|
+
function createMenuItem(label, commandFn, iconClass) {
|
|
25
|
+
const enabled = commandFn(view.state);
|
|
26
|
+
return {
|
|
27
|
+
label,
|
|
28
|
+
enabled,
|
|
29
|
+
iconClass,
|
|
30
|
+
onClick: () => {
|
|
31
|
+
contextMenuService.clearContextMenu();
|
|
32
|
+
view.focus();
|
|
33
|
+
commandFn(view.state, view.dispatch);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const separator = {
|
|
38
|
+
label: '',
|
|
39
|
+
separator: true,
|
|
40
|
+
enabled: true,
|
|
41
|
+
onClick: () => {
|
|
42
|
+
/**/
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
contextMenuService.setContextMenu({
|
|
46
|
+
ref: selection,
|
|
47
|
+
title: 'Table',
|
|
48
|
+
iconShape: 'table',
|
|
49
|
+
element: node,
|
|
50
|
+
coords: view.coordsAtPos(tableNodePos),
|
|
51
|
+
items: [
|
|
52
|
+
createMenuItem('Insert column before', addColumnBefore, 'add-column'),
|
|
53
|
+
createMenuItem('Insert column after', addColumnAfter, 'add-column'),
|
|
54
|
+
createMenuItem('Insert row before', addRowBefore, 'add-row'),
|
|
55
|
+
createMenuItem('Insert row after', addRowAfter, 'add-row'),
|
|
56
|
+
createMenuItem('Merge cells', mergeCells),
|
|
57
|
+
createMenuItem('Split cell', splitCell),
|
|
58
|
+
separator,
|
|
59
|
+
createMenuItem('Toggle header column', toggleHeaderColumn),
|
|
60
|
+
createMenuItem('Toggle header row', toggleHeaderRow),
|
|
61
|
+
separator,
|
|
62
|
+
createMenuItem('Delete column', deleteColumn),
|
|
63
|
+
createMenuItem('Delete row', deleteRow),
|
|
64
|
+
createMenuItem('Delete table', deleteTable),
|
|
65
|
+
],
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
contextMenuService.clearContextMenu();
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
});
|
|
75
|
+
export function getTableNodes() {
|
|
76
|
+
return tableNodes({
|
|
77
|
+
tableGroup: 'block',
|
|
78
|
+
cellContent: 'block+',
|
|
79
|
+
cellAttributes: {
|
|
80
|
+
background: {
|
|
81
|
+
default: null,
|
|
82
|
+
getFromDOM(dom) {
|
|
83
|
+
return dom.style.backgroundColor || null;
|
|
84
|
+
},
|
|
85
|
+
setDOMAttr(value, attrs) {
|
|
86
|
+
if (value) {
|
|
87
|
+
attrs.style = (attrs.style || '') + `background-color: ${value};`;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
export function getTableMenu(schema) {
|
|
95
|
+
function item(label, cmd, iconShape) {
|
|
96
|
+
return new MenuItem({
|
|
97
|
+
label,
|
|
98
|
+
select: cmd,
|
|
99
|
+
run: cmd,
|
|
100
|
+
render: iconShape ? renderClarityIcon({ shape: iconShape, label }) : undefined,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function separator() {
|
|
104
|
+
return new MenuItem({
|
|
105
|
+
select: state => isInTable(state),
|
|
106
|
+
run: state => {
|
|
107
|
+
/**/
|
|
108
|
+
},
|
|
109
|
+
render: view => {
|
|
110
|
+
const el = document.createElement('div');
|
|
111
|
+
el.classList.add('menu-separator');
|
|
112
|
+
return el;
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return [
|
|
117
|
+
item('Insert column before', addColumnBefore),
|
|
118
|
+
item('Insert column after', addColumnAfter),
|
|
119
|
+
item('Insert row before', addRowBefore),
|
|
120
|
+
item('Insert row after', addRowAfter),
|
|
121
|
+
item('Merge cells', mergeCells),
|
|
122
|
+
item('Split cell', splitCell),
|
|
123
|
+
separator(),
|
|
124
|
+
item('Toggle header column', toggleHeaderColumn),
|
|
125
|
+
item('Toggle header row', toggleHeaderRow),
|
|
126
|
+
item('Toggle header cells', toggleHeaderCell),
|
|
127
|
+
separator(),
|
|
128
|
+
item('Delete column', deleteColumn),
|
|
129
|
+
item('Delete row', deleteRow),
|
|
130
|
+
item('Delete table', deleteTable),
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
export function addTable(state, dispatch, { rowsCount, colsCount, withHeaderRow, cellContent }) {
|
|
134
|
+
const offset = state.tr.selection.anchor + 1;
|
|
135
|
+
const nodes = createTable(state, rowsCount, colsCount, withHeaderRow, cellContent);
|
|
136
|
+
const tr = state.tr.replaceSelectionWith(nodes).scrollIntoView();
|
|
137
|
+
const resolvedPos = tr.doc.resolve(offset);
|
|
138
|
+
tr.setSelection(TextSelection.near(resolvedPos));
|
|
139
|
+
dispatch(tr);
|
|
140
|
+
}
|
|
141
|
+
function createTable(state, rowsCount, colsCount, withHeaderRow, cellContent) {
|
|
142
|
+
const types = tableNodeTypes(state.schema);
|
|
143
|
+
const headerCells = [];
|
|
144
|
+
const cells = [];
|
|
145
|
+
const createCell = (cellType, _cellContent) => _cellContent ? cellType.createChecked(null, _cellContent) : cellType.createAndFill();
|
|
146
|
+
for (let index = 0; index < colsCount; index += 1) {
|
|
147
|
+
const cell = createCell(types.cell, cellContent);
|
|
148
|
+
if (cell) {
|
|
149
|
+
cells.push(cell);
|
|
150
|
+
}
|
|
151
|
+
if (withHeaderRow) {
|
|
152
|
+
const headerCell = createCell(types.header_cell, cellContent);
|
|
153
|
+
if (headerCell) {
|
|
154
|
+
headerCells.push(headerCell);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const rows = [];
|
|
159
|
+
for (let index = 0; index < rowsCount; index += 1) {
|
|
160
|
+
rows.push(types.row.createChecked(null, withHeaderRow && index === 0 ? headerCells : cells));
|
|
161
|
+
}
|
|
162
|
+
return types.table.createChecked(null, rows);
|
|
163
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ZWNvcmF0aW9uLCBEZWNvcmF0aW9uU2V0IH0gZnJvbSAncHJvc2VtaXJyb3Itdmlldyc7XG5cbmltcG9ydCB7IENvbnRleHRNZW51SXRlbSwgQ29udGV4dE1lbnVTZXJ2aWNlIH0gZnJvbSAnLi4vY29udGV4dC1tZW51L2NvbnRleHQtbWVudS5zZXJ2aWNlJztcbmltcG9ydCB7IGJ1aWxkTWVudUl0ZW1zIH0gZnJvbSAnLi4vbWVudS9tZW51JztcbmltcG9ydCB7IHJlbmRlckNsYXJpdHlJY29uIH0gZnJvbSAnLi4vbWVudS9tZW51LWNvbW1vbic7XG5cbmV4cG9ydCBjb25zdCB0YWJsZUNvbnRleHRNZW51UGx1Z2luID0gKGNvbnRleHRNZW51U2VydmljZTogQ29udGV4dE1lbnVTZXJ2aWNlKSA9PlxuICAgIG5ldyBQbHVnaW4oe1xuICAgICAgICB2aWV3OiAoKSA9PiAoe1xuICAgICAgICAgICAgdXBkYXRlOiB2aWV3ID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIXZpZXcuaGFzRm9jdXMoKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHsgZG9jLCBzZWxlY3Rpb24gfSA9IHZpZXcuc3RhdGU7XG4gICAgICAgICAgICAgICAgbGV0IHRhYmxlTm9kZTogTm9kZSB8IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBsZXQgdGFibGVOb2RlUG9zID0gMDtcbiAgICAgICAgICAgICAgICBkb2Mubm9kZXNCZXR3ZWVuKHNlbGVjdGlvbi5mcm9tLCBzZWxlY3Rpb24udG8sIChuLCBwb3MsIHBhcmVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAobi50eXBlLm5hbWUgPT09ICd0YWJsZScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhYmxlTm9kZSA9IG47XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWJsZU5vZGVQb3MgPSBwb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAodGFibGVOb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5vZGUgPSB2aWV3Lm5vZGVET00odGFibGVOb2RlUG9zKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUgaW5zdGFuY2VvZiBFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjcmVhdGVNZW51SXRlbShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogc3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1hbmRGbjogKHN0YXRlOiBFZGl0b3JTdGF0ZSwgZGlzcGF0Y2g/OiAodHI6IFRyYW5zYWN0aW9uKSA9PiB2b2lkKSA9PiBib29sZWFuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb25DbGFzcz86IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICk6IENvbnRleHRNZW51SXRlbSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5hYmxlZCA9IGNvbW1hbmRGbih2aWV3LnN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbkNsYXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0TWVudVNlcnZpY2UuY2xlYXJDb250ZXh0TWVudSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlldy5mb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZEZuKHZpZXcuc3RhdGUsIHZpZXcuZGlzcGF0Y2gpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzZXBhcmF0b3I6IENvbnRleHRNZW51SXRlbSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogJycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VwYXJhdG9yOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJsZWQ6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiovXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0TWVudVNlcnZpY2Uuc2V0Q29udGV4dE1lbnUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZjogc2VsZWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnVGFibGUnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb25TaGFwZTogJ3RhYmxlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50OiBub2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3Jkczogdmlldy5jb29yZHNBdFBvcyh0YWJsZU5vZGVQb3MpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZU1lbnVJdGVtKCdJbnNlcnQgY29sdW1uIGJlZm9yZScsIGFkZENvbHVtbkJlZm9yZSwgJ2FkZC1jb2x1bW4nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlTWVudUl0ZW0oJ0luc2VydCBjb2x1bW4gYWZ0ZXInLCBhZGRDb2x1bW5BZnRlciwgJ2FkZC1jb2x1bW4nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlTWVudUl0ZW0oJ0luc2VydCByb3cgYmVmb3JlJywgYWRkUm93QmVmb3JlLCAnYWRkLXJvdycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVNZW51SXRlbSgnSW5zZXJ0IHJvdyBhZnRlcicsIGFkZFJvd0FmdGVyLCAnYWRkLXJvdycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVNZW51SXRlbSgnTWVyZ2UgY2VsbHMnLCBtZXJnZUNlbGxzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlTWVudUl0ZW0oJ1NwbGl0IGNlbGwnLCBzcGxpdENlbGwpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXBhcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZU1lbnVJdGVtKCdUb2dnbGUgaGVhZGVyIGNvbHVtbicsIHRvZ2dsZUhlYWRlckNvbHVtbiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZU1lbnVJdGVtKCdUb2dnbGUgaGVhZGVyIHJvdycsIHRvZ2dsZUhlYWRlclJvdyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlcGFyYXRvcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlTWVudUl0ZW0oJ0RlbGV0ZSBjb2x1bW4nLCBkZWxldGVDb2x1bW4pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVNZW51SXRlbSgnRGVsZXRlIHJvdycsIGRlbGV0ZVJvdyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZU1lbnVJdGVtKCdEZWxldGUgdGFibGUnLCBkZWxldGVUYWJsZSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dE1lbnVTZXJ2aWNlLmNsZWFyQ29udGV4dE1lbnUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICB9KSxcbiAgICB9KTtcblxuZXhwb3J0IGZ1bmN0aW9uIGdldFRhYmxlTm9kZXMoKSB7XG4gICAgcmV0dXJuIHRhYmxlTm9kZXMoe1xuICAgICAgICB0YWJsZUdyb3VwOiAnYmxvY2snLFxuICAgICAgICBjZWxsQ29udGVudDogJ2Jsb2NrKycsXG4gICAgICAgIGNlbGxBdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgICAgICAgICAgICBnZXRGcm9tRE9NKGRvbSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKGRvbSBhcyBIVE1MRWxlbWVudCkuc3R5bGUuYmFja2dyb3VuZENvbG9yIHx8IG51bGw7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBzZXRET01BdHRyKHZhbHVlLCBhdHRycykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzLnN0eWxlID0gKGF0dHJzLnN0eWxlIHx8ICcnKSArIGBiYWNrZ3JvdW5kLWNvbG9yOiAke3ZhbHVlfTtgO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRUYWJsZU1lbnUoc2NoZW1hOiBTY2hlbWEpIHtcbiAgICBmdW5jdGlvbiBpdGVtKFxuICAgICAgICBsYWJlbDogc3RyaW5nLFxuICAgICAgICBjbWQ6IChzdGF0ZTogRWRpdG9yU3RhdGUsIGRpc3BhdGNoPzogKHRyOiBUcmFuc2FjdGlvbikgPT4gdm9pZCkgPT4gYm9vbGVhbixcbiAgICAgICAgaWNvblNoYXBlPzogc3RyaW5nLFxuICAgICkge1xuICAgICAgICByZXR1cm4gbmV3IE1lbnVJdGVtKHtcbiAgICAgICAgICAgIGxhYmVsLFxuICAgICAgICAgICAgc2VsZWN0OiBjbWQsXG4gICAgICAgICAgICBydW46IGNtZCxcbiAgICAgICAgICAgIHJlbmRlcjogaWNvblNoYXBlID8gcmVuZGVyQ2xhcml0eUljb24oeyBzaGFwZTogaWNvblNoYXBlLCBsYWJlbCB9KSA6IHVuZGVmaW5lZCxcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2VwYXJhdG9yKCk6IE1lbnVFbGVtZW50IHtcbiAgICAgICAgcmV0dXJuIG5ldyBNZW51SXRlbSh7XG4gICAgICAgICAgICBzZWxlY3Q6IHN0YXRlID0+IGlzSW5UYWJsZShzdGF0ZSksXG4gICAgICAgICAgICBydW46IHN0YXRlID0+IHtcbiAgICAgICAgICAgICAgICAvKiovXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVuZGVyOiB2aWV3ID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xuICAgICAgICAgICAgICAgIGVsL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2VsbCA9IGNyZWF0ZUNlbGwodHlwZXMuY2VsbCwgY2VsbENvbnRlbnQpO1xuXG4gICAgICAgIGlmIChjZWxsKSB7XG4gICAgICAgICAgICBjZWxscy5wdXNoKGNlbGwpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHdpdGhIZWFkZXJSb3cpIHtcbiAgICAgICAgICAgIGNvbnN0IGhlYWRlckNlbGwgPSBjcmVhdGVDZWxsKHR5cGVzLmhlYWRlcl9jZWxsLCBjZWxsQ29udGVudCk7XG5cbiAgICAgICAgICAgIGlmIChoZWFkZXJDZWxsKSB7XG4gICAgICAgICAgICAgICAgaGVhZGVyQ2VsbHMucHVzaChoZWFkZXJDZWxsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNvbnN0IHJvd3M6IE5vZGVbXSA9IFtdO1xuXG4gICAgZm9yIChsZXQgaW5kZXggPSAwOyBpbmRleCA8IHJvd3NDb3VudDsgaW5kZXggKz0gMSkge1xuICAgICAgICByb3dzLnB1c2godHlwZXMucm93LmNyZWF0ZUNoZWNrZWQobnVsbCwgd2l0aEhlYWRlclJvdyAmJiBpbmRleCA9PT0gMCA/IGhlYWRlckNlbGxzIDogY2VsbHMpKTtcbiAgICB9XG5cbiAgICByZXR1cm4gdHlwZXMudGFibGUuY3JlYXRlQ2hlY2tlZChudWxsLCByb3dzKTtcbn1cbiJdfQ==
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { baseKeymap } from 'prosemirror-commands';
|
|
3
|
+
import { dropCursor } from 'prosemirror-dropcursor';
|
|
4
|
+
import { gapCursor } from 'prosemirror-gapcursor';
|
|
5
|
+
import { history } from 'prosemirror-history';
|
|
6
|
+
import { keymap } from 'prosemirror-keymap';
|
|
7
|
+
import { DOMParser, DOMSerializer, Schema } from 'prosemirror-model';
|
|
8
|
+
import { schema } from 'prosemirror-schema-basic';
|
|
9
|
+
import { addListNodes } from 'prosemirror-schema-list';
|
|
10
|
+
import { EditorState, Plugin } from 'prosemirror-state';
|
|
11
|
+
import { columnResizing, fixTables, tableEditing } from 'prosemirror-tables';
|
|
12
|
+
import { EditorView } from 'prosemirror-view';
|
|
13
|
+
import { ModalService } from '../../../../providers/modal/modal.service';
|
|
14
|
+
import { iframeNode, iframeNodeView, linkMark } from './custom-nodes';
|
|
15
|
+
import { buildInputRules } from './inputrules';
|
|
16
|
+
import { buildKeymap } from './keymap';
|
|
17
|
+
import { customMenuPlugin } from './menu/menu-plugin';
|
|
18
|
+
import { imageContextMenuPlugin } from './plugins/image-plugin';
|
|
19
|
+
import { linkSelectPlugin } from './plugins/link-select-plugin';
|
|
20
|
+
import { rawEditorPlugin } from './plugins/raw-editor-plugin';
|
|
21
|
+
import { getTableNodes, tableContextMenuPlugin } from './plugins/tables-plugin';
|
|
22
|
+
import * as i0 from "@angular/core";
|
|
23
|
+
import * as i1 from "./context-menu/context-menu.service";
|
|
24
|
+
export class ProsemirrorService {
|
|
25
|
+
constructor(injector, contextMenuService) {
|
|
26
|
+
this.injector = injector;
|
|
27
|
+
this.contextMenuService = contextMenuService;
|
|
28
|
+
// Mix the nodes from prosemirror-schema-list into the basic schema to
|
|
29
|
+
// create a schema with list support.
|
|
30
|
+
this.mySchema = new Schema({
|
|
31
|
+
nodes: addListNodes(schema.spec.nodes, 'paragraph block*', 'block')
|
|
32
|
+
.append(getTableNodes())
|
|
33
|
+
.addToEnd('iframe', iframeNode),
|
|
34
|
+
marks: schema.spec.marks.update('link', linkMark),
|
|
35
|
+
});
|
|
36
|
+
this.enabled = true;
|
|
37
|
+
/**
|
|
38
|
+
* This is a Document used for processing incoming text. It ensures that malicious HTML is not executed by the
|
|
39
|
+
* actual document that is attached to the browser DOM, which could cause XSS attacks.
|
|
40
|
+
*/
|
|
41
|
+
this.detachedDoc = null;
|
|
42
|
+
}
|
|
43
|
+
createEditorView(options) {
|
|
44
|
+
this.editorView = new EditorView(options.element, {
|
|
45
|
+
state: this.getStateFromText(''),
|
|
46
|
+
dispatchTransaction: tr => {
|
|
47
|
+
if (!this.enabled) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.editorView.updateState(this.editorView.state.apply(tr));
|
|
51
|
+
if (tr.docChanged) {
|
|
52
|
+
const content = this.getTextFromState(this.editorView.state);
|
|
53
|
+
options.onTextInput(content);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
editable: () => options.isReadOnly(),
|
|
57
|
+
handleDOMEvents: {
|
|
58
|
+
focus: view => {
|
|
59
|
+
this.contextMenuService.setVisibility(true);
|
|
60
|
+
},
|
|
61
|
+
blur: view => {
|
|
62
|
+
this.contextMenuService.setVisibility(false);
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
nodeViews: {
|
|
66
|
+
iframe: iframeNodeView,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
update(text) {
|
|
71
|
+
if (this.editorView) {
|
|
72
|
+
const currentText = this.getTextFromState(this.editorView.state);
|
|
73
|
+
if (text !== currentText) {
|
|
74
|
+
let state = this.getStateFromText(text);
|
|
75
|
+
if (document.body.contains(this.editorView.dom)) {
|
|
76
|
+
const fix = fixTables(state);
|
|
77
|
+
if (fix) {
|
|
78
|
+
state = state.apply(fix.setMeta('addToHistory', false));
|
|
79
|
+
}
|
|
80
|
+
this.editorView.updateState(state);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
destroy() {
|
|
86
|
+
if (this.editorView) {
|
|
87
|
+
this.editorView.destroy();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
setEnabled(enabled) {
|
|
91
|
+
if (this.editorView) {
|
|
92
|
+
this.enabled = enabled;
|
|
93
|
+
// Updating the state causes ProseMirror to check the
|
|
94
|
+
// `editable()` function from the contructor config object
|
|
95
|
+
// newly.
|
|
96
|
+
this.editorView.updateState(this.editorView.state);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
getStateFromText(text) {
|
|
100
|
+
const doc = this.getDetachedDoc();
|
|
101
|
+
const div = doc.createElement('div');
|
|
102
|
+
div.innerHTML = text ?? '';
|
|
103
|
+
return EditorState.create({
|
|
104
|
+
doc: DOMParser.fromSchema(this.mySchema).parse(div),
|
|
105
|
+
plugins: this.configurePlugins({ schema: this.mySchema, floatingMenu: false }),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
getTextFromState(state) {
|
|
109
|
+
const doc = this.getDetachedDoc();
|
|
110
|
+
const div = doc.createElement('div');
|
|
111
|
+
const fragment = DOMSerializer.fromSchema(this.mySchema).serializeFragment(state.doc.content);
|
|
112
|
+
div.appendChild(fragment);
|
|
113
|
+
return div.innerHTML;
|
|
114
|
+
}
|
|
115
|
+
configurePlugins(options) {
|
|
116
|
+
const plugins = [
|
|
117
|
+
buildInputRules(options.schema),
|
|
118
|
+
keymap(buildKeymap(options.schema, options.mapKeys)),
|
|
119
|
+
keymap(baseKeymap),
|
|
120
|
+
dropCursor(),
|
|
121
|
+
gapCursor(),
|
|
122
|
+
linkSelectPlugin,
|
|
123
|
+
columnResizing({}),
|
|
124
|
+
tableEditing({ allowTableNodeSelection: true }),
|
|
125
|
+
tableContextMenuPlugin(this.contextMenuService),
|
|
126
|
+
imageContextMenuPlugin(this.contextMenuService, this.injector.get(ModalService)),
|
|
127
|
+
rawEditorPlugin(this.contextMenuService, this.injector.get(ModalService)),
|
|
128
|
+
customMenuPlugin({
|
|
129
|
+
floatingMenu: options.floatingMenu,
|
|
130
|
+
injector: this.injector,
|
|
131
|
+
schema: options.schema,
|
|
132
|
+
}),
|
|
133
|
+
];
|
|
134
|
+
if (options.history !== false) {
|
|
135
|
+
plugins.push(history());
|
|
136
|
+
}
|
|
137
|
+
return plugins.concat(new Plugin({
|
|
138
|
+
props: {
|
|
139
|
+
attributes: { class: 'vdr-prosemirror' },
|
|
140
|
+
},
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
getDetachedDoc() {
|
|
144
|
+
if (!this.detachedDoc) {
|
|
145
|
+
this.detachedDoc = document.implementation.createHTMLDocument();
|
|
146
|
+
}
|
|
147
|
+
return this.detachedDoc;
|
|
148
|
+
}
|
|
149
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProsemirrorService, deps: [{ token: i0.Injector }, { token: i1.ContextMenuService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
150
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProsemirrorService }); }
|
|
151
|
+
}
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProsemirrorService, decorators: [{
|
|
153
|
+
type: Injectable
|
|
154
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1.ContextMenuService }] });
|
|
155
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvc2VtaXJyb3Iuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvcmljaC10ZXh0LWVkaXRvci9wcm9zZW1pcnJvci9wcm9zZW1pcnJvci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQVksTUFBTSxlQUFlLENBQUM7QUFDckQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2xELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUNwRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDbEQs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VudCB0aGF0IGlzIGF0dGFjaGVkIHRvIHRoZSBicm93c2VyIERPTSwgd2hpY2ggY291bGQgY2F1c2UgWFNTIGF0dGFja3MuXG4gICAgICovXG4gICAgcHJpdmF0ZSBkZXRhY2hlZERvYzogRG9jdW1lbnQgfCBudWxsID0gbnVsbDtcblxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgaW5qZWN0b3I6IEluamVjdG9yLCBwcml2YXRlIGNvbnRleHRNZW51U2VydmljZTogQ29udGV4dE1lbnVTZXJ2aWNlKSB7fVxuXG4gICAgY29udGV4dE1lbnVJdGVtcyQ6IE9ic2VydmFibGU8c3RyaW5nPjtcblxuICAgIGNyZWF0ZUVkaXRvclZpZXcob3B0aW9uczogQ3JlYXRlRWRpdG9yVmlld09wdGlvbnMpIHtcbiAgICAgICAgdGhpcy5lZGl0b3JWaWV3ID0gbmV3IEVkaXRvclZpZXcob3B0aW9ucy5lbGVtZW50LCB7XG4gICAgICAgICAgICBzdGF0ZTogdGhpcy5nZXRTdGF0ZUZyb21UZXh0KCcnKSxcbiAgICAgICAgICAgIGRpc3BhdGNoVHJhbnNhY3Rpb246IHRyID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuZW5hYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuZWRpdG9yVmlldy51cGRhdGVTdGF0ZSh0aGlzLmVkaXRvclZpZXcuc3RhdGUuYXBwbHkodHIpKTtcbiAgICAgICAgICAgICAgICBpZiAodHIuZG9jQ2hhbmdlZCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb250ZW50ID0gdGhpcy5nZXRUZXh0RnJvbVN0YXRlKHRoaXMuZWRpdG9yVmlldy5zdGF0ZSk7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25UZXh0SW5wdXQoY29udGVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVkaXRhYmxlOiAoKSA9PiBvcHRpb25zLmlzUmVhZE9ubHkoKSxcbiAgICAgICAgICAgIGhhbmRsZURPTUV2ZW50czoge1xuICAgICAgICAgICAgICAgIGZvY3VzOiB2aWV3ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZXh0TWVudVNlcnZpY2Uuc2V0VmlzaWJpbGl0eSh0cnVlKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGJsdXI6IHZpZXcgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRleHRNZW51U2VydmljZS5zZXRWaXNpYmlsaXR5KGZhbHNlKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG5vZGVWaWV3czoge1xuICAgICAgICAgICAgICAgIGlmcmFtZTogaWZyYW1lTm9kZVZpZXcsXG4gICAgICAgICAgICB9LFxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB1cGRhdGUodGV4dDogc3RyaW5nKSB7XG4gICAgICAgIGlmICh0aGlzLmVkaXRvclZpZXcpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRUZXh0ID0gdGhpcy5nZXRUZXh0RnJvbVN0YXRlKHRoaXMuZWRpdG9yVmlldy5zdGF0ZSk7XG4gICAgICAgICAgICBpZiAodGV4dCAhPT0gY3VycmVudFRleHQpIHtcbiAgICAgICAgICAgICAgICBsZXQgc3RhdGUgPSB0aGlzLmdldFN0YXRlRnJvbVRleHQodGV4dCk7XG4gICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LmJvZHkuY29udGFpbnModGhpcy5lZGl0b3JWaWV3LmRvbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZml4ID0gZml4VGFibGVzKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZpeCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGU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AgICBnYXBDdXJzb3IoKSxcbiAgICAgICAgICAgIGxpbmtTZWxlY3RQbHVnaW4sXG4gICAgICAgICAgICBjb2x1bW5SZXNpemluZyh7fSksXG4gICAgICAgICAgICB0YWJsZUVkaXRpbmcoeyBhbGxvd1RhYmxlTm9kZVNlbGVjdGlvbjogdHJ1ZSB9KSxcbiAgICAgICAgICAgIHRhYmxlQ29udGV4dE1lbnVQbHVnaW4odGhpcy5jb250ZXh0TWVudVNlcnZpY2UpLFxuICAgICAgICAgICAgaW1hZ2VDb250ZXh0TWVudVBsdWdpbih0aGlzLmNvbnRleHRNZW51U2VydmljZSwgdGhpcy5pbmplY3Rvci5nZXQoTW9kYWxTZXJ2aWNlKSksXG4gICAgICAgICAgICByYXdFZGl0b3JQbHVnaW4odGhpcy5jb250ZXh0TWVudVNlcnZpY2UsIHRoaXMuaW5qZWN0b3IuZ2V0KE1vZGFsU2VydmljZSkpLFxuICAgICAgICAgICAgY3VzdG9tTWVudVBsdWdpbih7XG4gICAgICAgICAgICAgICAgZmxvYXRpbmdNZW51OiBvcHRpb25zLmZsb2F0aW5nTWVudSxcbiAgICAgICAgICAgICAgICBpbmplY3RvcjogdGhpcy5pbmplY3RvcixcbiAgICAgICAgICAgICAgICBzY2hlbWE6IG9wdGlvbnMuc2NoZW1hLFxuICAgICAgICAgICAgfSksXG4gICAgICAgIF07XG4gICAgICAgIGlmIChvcHRpb25zLmhpc3RvcnkgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICBwbHVnaW5zLnB1c2goaGlzdG9yeSgpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBwbHVnaW5zLmNvbmNhdChcbiAgICAgICAgICAgIG5ldyBQbHVnaW4oe1xuICAgICAgICAgICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXM6IHsgY2xhc3M6ICd2ZHItcHJvc2VtaXJyb3InIH0sXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICApO1xuICAgIH1cblxuICAgIHByaXZhdGUgZ2V0RGV0YWNoZWREb2MoKSB7XG4gICAgICAgIGlmICghdGhpcy5kZXRhY2hlZERvYykge1xuICAgICAgICAgICAgdGhpcy5kZXRhY2hlZERvYyA9IGRvY3VtZW50LmltcGxlbWVudGF0aW9uLmNyZWF0ZUhUTUxEb2N1bWVudCgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLmRldGFjaGVkRG9jO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL3JpY2gtdGV4dC1lZGl0b3IvcHJvc2VtaXJyb3IvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE1lbnVJdGVtIH0gZnJvbSAncHJvc2VtaXJyb3ItbWVudSc7XG5pbXBvcnQgeyBTY2hlbWEgfSBmcm9tICdwcm9zZW1pcnJvci1tb2RlbCc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgU2V0dXBPcHRpb25zIHtcbiAgICBzY2hlbWE6IFNjaGVtYTtcbiAgICBtYXBLZXlzPzogS2V5bWFwO1xuICAgIG1lbnVCYXI/OiBib29sZWFuO1xuICAgIGhpc3Rvcnk/OiBib29sZWFuO1xuICAgIGZsb2F0aW5nTWVudT86IGJvb2xlYW47XG59XG5cbmV4cG9ydCB0eXBlIEtleW1hcCA9IFJlY29yZDxzdHJpbmcsIHN0cmluZyB8IGZhbHNlPjtcbiJdfQ==
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieve the start and end position of a mark
|
|
3
|
+
* "Borrowed" from [tiptap](https://github.com/scrumpy/tiptap)
|
|
4
|
+
*/
|
|
5
|
+
export const getMarkRange = (pmPosition = null, type = null) => {
|
|
6
|
+
if (!pmPosition || !type) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
const start = pmPosition.parent.childAfter(pmPosition.parentOffset);
|
|
10
|
+
if (!start.node) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const mark = start.node.marks.find(({ type: markType }) => markType === type);
|
|
14
|
+
if (!mark) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
let startIndex = pmPosition.index();
|
|
18
|
+
let startPos = pmPosition.start() + start.offset;
|
|
19
|
+
while (startIndex > 0 && mark.isInSet(pmPosition.parent.child(startIndex - 1).marks)) {
|
|
20
|
+
startIndex -= 1;
|
|
21
|
+
startPos -= pmPosition.parent.child(startIndex).nodeSize;
|
|
22
|
+
}
|
|
23
|
+
const endPos = startPos + start.node.nodeSize;
|
|
24
|
+
return { from: startPos, to: endPos };
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL3JpY2gtdGV4dC1lZGl0b3IvcHJvc2VtaXJyb3IvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sWUFBWSxHQUFHLENBQ3hCLGFBQWlDLElBQUksRUFDckMsT0FBb0MsSUFBSSxFQUNKLEVBQUU7SUFDdEMsSUFBSSxDQUFDLFVBQVUsSUFBSSxDQUFDLElBQUksRUFBRSxDQUFDO1FBQ3ZCLE9BQU8sS0F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nRQb3MgPSBwbVBvc2l0aW9uLnN0YXJ0KCkgKyBzdGFydC5vZmZzZXQ7XG4gICAgd2hpbGUgKHN0YXJ0SW5kZXggPiAwICYmIG1hcmsuaXNJblNldChwbVBvc2l0aW9uLnBhcmVudC5jaGlsZChzdGFydEluZGV4IC0gMSkubWFya3MpKSB7XG4gICAgICAgIHN0YXJ0SW5kZXggLT0gMTtcbiAgICAgICAgc3RhcnRQb3MgLT0gcG1Qb3NpdGlvbi5wYXJlbnQuY2hpbGQoc3RhcnRJbmRleCkubm9kZVNpemU7XG4gICAgfVxuXG4gICAgY29uc3QgZW5kUG9zID0gc3RhcnRQb3MgKyBzdGFydC5ub2RlLm5vZGVTaXplO1xuXG4gICAgcmV0dXJuIHsgZnJvbTogc3RhcnRQb3MsIHRvOiBlbmRQb3MgfTtcbn07XG4iXX0=
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { UntypedFormControl } from '@angular/forms';
|
|
3
|
+
import { HtmlEditorFormInputComponent } from '../../../dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../modal-dialog/dialog-buttons.directive";
|
|
6
|
+
import * as i2 from "../../../dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component";
|
|
7
|
+
import * as i3 from "@ngx-translate/core";
|
|
8
|
+
export class RawHtmlDialogComponent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.formControl = new UntypedFormControl();
|
|
11
|
+
this.config = {
|
|
12
|
+
name: '',
|
|
13
|
+
type: '',
|
|
14
|
+
list: false,
|
|
15
|
+
required: true,
|
|
16
|
+
ui: { component: HtmlEditorFormInputComponent.id },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
ngOnInit() {
|
|
20
|
+
this.formControl.setValue(this.process(this.html));
|
|
21
|
+
}
|
|
22
|
+
process(str) {
|
|
23
|
+
const div = document.createElement('div');
|
|
24
|
+
div.innerHTML = str.trim();
|
|
25
|
+
return this.format(div, 0).innerHTML.trim();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Taken from https://stackoverflow.com/a/26361620/772859
|
|
29
|
+
*/
|
|
30
|
+
format(node, level = 0) {
|
|
31
|
+
const indentBefore = new Array(level++ + 1).join('\t');
|
|
32
|
+
const indentAfter = new Array(level - 1).join('\t');
|
|
33
|
+
let textNode;
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
35
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
36
|
+
textNode = document.createTextNode('\n' + indentBefore);
|
|
37
|
+
node.insertBefore(textNode, node.children[i]);
|
|
38
|
+
this.format(node.children[i], level);
|
|
39
|
+
if (node.lastElementChild === node.children[i]) {
|
|
40
|
+
textNode = document.createTextNode('\n' + indentAfter);
|
|
41
|
+
node.appendChild(textNode);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return node;
|
|
45
|
+
}
|
|
46
|
+
cancel() {
|
|
47
|
+
this.resolveWith(undefined);
|
|
48
|
+
}
|
|
49
|
+
select() {
|
|
50
|
+
this.resolveWith(this.formControl.value);
|
|
51
|
+
}
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RawHtmlDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RawHtmlDialogComponent, selector: "vdr-raw-html-dialog", ngImport: i0, template: "<vdr-dynamic-form-input\n [def]=\"config\"\n [control]=\"formControl\"\n ></vdr-dynamic-form-input>\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"cancel()\">\n {{ 'common.cancel' | translate }}\n </button>\n <button type=\"submit\" (click)=\"select()\" class=\"btn btn-primary\" [disabled]=\"formControl.invalid\">\n {{ 'common.update' | translate }}\n </button>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "component", type: i2.DynamicFormInputComponent, selector: "vdr-dynamic-form-input", inputs: ["def", "readonly", "control"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RawHtmlDialogComponent, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{ selector: 'vdr-raw-html-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-dynamic-form-input\n [def]=\"config\"\n [control]=\"formControl\"\n ></vdr-dynamic-form-input>\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"cancel()\">\n {{ 'common.cancel' | translate }}\n </button>\n <button type=\"submit\" (click)=\"select()\" class=\"btn btn-primary\" [disabled]=\"formControl.invalid\">\n {{ 'common.update' | translate }}\n </button>\n</ng-template>\n" }]
|
|
58
|
+
}] });
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF3LWh0bWwtZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvcmljaC10ZXh0LWVkaXRvci9yYXctaHRtbC1kaWFsb2cvcmF3LWh0bWwtZGlhbG9nLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvcmljaC10ZXh0LWVkaXRvci9yYXctaHRtbC1kaWFsb2cvcmF3LWh0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Vzb2x2ZVdpdGgodGhpcy5mb3JtQ29udHJvbC52YWx1ZSk7XG4gICAgfVxufVxuIiwiPHZkci1keW5hbWljLWZvcm0taW5wdXRcbiAgICAgICAgICAgICAgICAgICAgICBbZGVmXT1cImNvbmZpZ1wiXG4gICAgICAgICAgICAgICAgICAgICAgW2NvbnRyb2xdPVwiZm9ybUNvbnRyb2xcIlxuICAgICAgICAgICAgICAgICAgPjwvdmRyLWR5bmFtaWMtZm9ybS1pbnB1dD5cbjxuZy10ZW1wbGF0ZSB2ZHJEaWFsb2dCdXR0b25zPlxuICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIGNsYXNzPVwiYnRuIGJ0bi1zZWNvbmRhcnlcIiAoY2xpY2spPVwiY2FuY2VsKClcIj5cbiAgICAgICB7eyAnY29tbW9uLmNhbmNlbCcgfCB0cmFuc2xhdGUgfX1cbiAgICA8L2J1dHRvbj5cbiAgICA8YnV0dG9uIHR5cGU9XCJzdWJtaXRcIiAoY2xpY2spPVwic2VsZWN0KClcIiBjbGFzcz1cImJ0biBidG4tcHJpbWFyeVwiIFtkaXNhYmxlZF09XCJmb3JtQ29udHJvbC5pbnZhbGlkXCI+XG4gICAgICAgIHt7ICdjb21tb24udXBkYXRlJyB8IHRyYW5zbGF0ZSB9fVxuICAgIDwvYnV0dG9uPlxuPC9uZy10ZW1wbGF0ZT5cbiJdfQ==
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewChild, } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { ContextMenuService } from './prosemirror/context-menu/context-menu.service';
|
|
4
|
+
import { ProsemirrorService } from './prosemirror/prosemirror.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "./prosemirror/prosemirror.service";
|
|
7
|
+
import * as i2 from "./prosemirror/context-menu/context-menu.service";
|
|
8
|
+
import * as i3 from "@clr/angular";
|
|
9
|
+
import * as i4 from "@angular/common";
|
|
10
|
+
import * as i5 from "./prosemirror/context-menu/context-menu.component";
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* A rich text (HTML) editor based on Prosemirror (https://prosemirror.net/)
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```HTML
|
|
17
|
+
* <vdr-rich-text-editor
|
|
18
|
+
* [(ngModel)]="description"
|
|
19
|
+
* label="Description"
|
|
20
|
+
* ></vdr-rich-text-editor>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @docsCategory components
|
|
24
|
+
*/
|
|
25
|
+
export class RichTextEditorComponent {
|
|
26
|
+
set readonly(value) {
|
|
27
|
+
this._readonly = !!value;
|
|
28
|
+
this.prosemirrorService.setEnabled(!this._readonly);
|
|
29
|
+
}
|
|
30
|
+
constructor(changeDetector, prosemirrorService, viewContainerRef, contextMenuService) {
|
|
31
|
+
this.changeDetector = changeDetector;
|
|
32
|
+
this.prosemirrorService = prosemirrorService;
|
|
33
|
+
this.viewContainerRef = viewContainerRef;
|
|
34
|
+
this.contextMenuService = contextMenuService;
|
|
35
|
+
this._readonly = false;
|
|
36
|
+
}
|
|
37
|
+
get menuElement() {
|
|
38
|
+
return this.viewContainerRef.element.nativeElement.querySelector('.ProseMirror-menubar');
|
|
39
|
+
}
|
|
40
|
+
ngAfterViewInit() {
|
|
41
|
+
this.prosemirrorService.createEditorView({
|
|
42
|
+
element: this.editorEl.nativeElement,
|
|
43
|
+
onTextInput: content => {
|
|
44
|
+
this.onChange(content);
|
|
45
|
+
this.changeDetector.markForCheck();
|
|
46
|
+
},
|
|
47
|
+
isReadOnly: () => !this._readonly,
|
|
48
|
+
});
|
|
49
|
+
if (this.value) {
|
|
50
|
+
this.prosemirrorService.update(this.value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
ngOnDestroy() {
|
|
54
|
+
this.prosemirrorService.destroy();
|
|
55
|
+
}
|
|
56
|
+
registerOnChange(fn) {
|
|
57
|
+
this.onChange = fn;
|
|
58
|
+
}
|
|
59
|
+
registerOnTouched(fn) {
|
|
60
|
+
this.onTouch = fn;
|
|
61
|
+
}
|
|
62
|
+
setDisabledState(isDisabled) {
|
|
63
|
+
this.prosemirrorService.setEnabled(!isDisabled);
|
|
64
|
+
}
|
|
65
|
+
writeValue(value) {
|
|
66
|
+
if (value !== this.value) {
|
|
67
|
+
this.value = value;
|
|
68
|
+
if (this.prosemirrorService) {
|
|
69
|
+
this.prosemirrorService.update(value);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RichTextEditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ProsemirrorService }, { token: i0.ViewContainerRef }, { token: i2.ContextMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RichTextEditorComponent, selector: "vdr-rich-text-editor", inputs: { label: "label", readonly: "readonly" }, host: { properties: { "class.readonly": "this._readonly" } }, providers: [
|
|
75
|
+
{
|
|
76
|
+
provide: NG_VALUE_ACCESSOR,
|
|
77
|
+
useExisting: RichTextEditorComponent,
|
|
78
|
+
multi: true,
|
|
79
|
+
},
|
|
80
|
+
ProsemirrorService,
|
|
81
|
+
ContextMenuService,
|
|
82
|
+
], viewQueries: [{ propertyName: "editorEl", first: true, predicate: ["editor"], descendants: true, static: true }], ngImport: i0, template: "<label *ngIf=\"label\" class=\"rich-text-label\">{{ label }}</label>\n<div #editor></div>\n<vdr-context-menu [editorMenuElement]=\"menuElement\"></vdr-context-menu>\n", styles: [":host{display:block;margin-bottom:.5rem}:host.readonly ::ng-deep .ProseMirror-menubar{display:none}.context-menu{position:fixed}\n"], dependencies: [{ kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["id", "for"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.ContextMenuComponent, selector: "vdr-context-menu", inputs: ["editorMenuElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
83
|
+
}
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RichTextEditorComponent, decorators: [{
|
|
85
|
+
type: Component,
|
|
86
|
+
args: [{ selector: 'vdr-rich-text-editor', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
87
|
+
{
|
|
88
|
+
provide: NG_VALUE_ACCESSOR,
|
|
89
|
+
useExisting: RichTextEditorComponent,
|
|
90
|
+
multi: true,
|
|
91
|
+
},
|
|
92
|
+
ProsemirrorService,
|
|
93
|
+
ContextMenuService,
|
|
94
|
+
], template: "<label *ngIf=\"label\" class=\"rich-text-label\">{{ label }}</label>\n<div #editor></div>\n<vdr-context-menu [editorMenuElement]=\"menuElement\"></vdr-context-menu>\n", styles: [":host{display:block;margin-bottom:.5rem}:host.readonly ::ng-deep .ProseMirror-menubar{display:none}.context-menu{position:fixed}\n"] }]
|
|
95
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.ProsemirrorService }, { type: i0.ViewContainerRef }, { type: i2.ContextMenuService }], propDecorators: { label: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}], readonly: [{
|
|
98
|
+
type: Input
|
|
99
|
+
}], _readonly: [{
|
|
100
|
+
type: HostBinding,
|
|
101
|
+
args: ['class.readonly']
|
|
102
|
+
}], editorEl: [{
|
|
103
|
+
type: ViewChild,
|
|
104
|
+
args: ['editor', { static: true }]
|
|
105
|
+
}] } });
|
|
106
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmljaC10ZXh0LWVkaXRvci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoi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