@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,64 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { createUpdatedTranslatable, } from '@deenruv/admin-ui/core';
|
|
4
|
+
import { normalizeString } from '@deenruv/common/lib/normalize-string';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@clr/angular";
|
|
7
|
+
import * as i2 from "@angular/common";
|
|
8
|
+
import * as i3 from "@angular/forms";
|
|
9
|
+
import * as i4 from "@deenruv/admin-ui/core";
|
|
10
|
+
import * as i5 from "@ngx-translate/core";
|
|
11
|
+
export class UpdateProductOptionDialogComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.updateVariantName = true;
|
|
14
|
+
this.codeInputTouched = false;
|
|
15
|
+
}
|
|
16
|
+
ngOnInit() {
|
|
17
|
+
const currentTranslation = this.productOption.translations.find(t => t.languageCode === this.activeLanguage);
|
|
18
|
+
this.name = currentTranslation?.name ?? '';
|
|
19
|
+
this.code = this.productOption.code;
|
|
20
|
+
this.customFieldsForm = new UntypedFormGroup({});
|
|
21
|
+
if (this.customFields) {
|
|
22
|
+
const cfCurrentTranslation = (currentTranslation && currentTranslation.customFields) || {};
|
|
23
|
+
for (const fieldDef of this.customFields) {
|
|
24
|
+
const key = fieldDef.name;
|
|
25
|
+
const value = fieldDef.type === 'localeString'
|
|
26
|
+
? cfCurrentTranslation[key]
|
|
27
|
+
: this.productOption.customFields[key];
|
|
28
|
+
this.customFieldsForm.addControl(fieldDef.name, new UntypedFormControl(value));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
update() {
|
|
33
|
+
const result = createUpdatedTranslatable({
|
|
34
|
+
translatable: this.productOption,
|
|
35
|
+
languageCode: this.activeLanguage,
|
|
36
|
+
updatedFields: {
|
|
37
|
+
code: this.code,
|
|
38
|
+
name: this.name,
|
|
39
|
+
customFields: this.customFieldsForm.value,
|
|
40
|
+
},
|
|
41
|
+
customFieldConfig: this.customFields,
|
|
42
|
+
defaultTranslation: {
|
|
43
|
+
languageCode: this.activeLanguage,
|
|
44
|
+
name: '',
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
this.resolveWith({ ...result, autoUpdate: this.updateVariantName });
|
|
48
|
+
}
|
|
49
|
+
cancel() {
|
|
50
|
+
this.resolveWith();
|
|
51
|
+
}
|
|
52
|
+
updateCode(nameValue) {
|
|
53
|
+
if (!this.codeInputTouched && !this.productOption.code) {
|
|
54
|
+
this.code = normalizeString(nameValue, '-');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UpdateProductOptionDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: UpdateProductOptionDialogComponent, selector: "vdr-update-product-option-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ 'catalog.update-product-option' | translate }}</ng-template>\n<vdr-form-field [label]=\"'catalog.option-name' | translate\" for=\"name\">\n <input\n id=\"name\"\n type=\"text\"\n #nameInput=\"ngModel\"\n [(ngModel)]=\"name\"\n required\n (input)=\"updateCode($event.target.value)\"\n />\n</vdr-form-field>\n<vdr-form-field [label]=\"'common.code' | translate\" for=\"code\">\n <input id=\"code\" type=\"text\" #codeInput=\"ngModel\" required [(ngModel)]=\"code\" pattern=\"[a-z0-9_-]+\" />\n</vdr-form-field>\n<clr-checkbox-wrapper>\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"updateVariantName\" />\n <label>{{ 'catalog.auto-update-option-variant-name' | translate }}</label>\n</clr-checkbox-wrapper>\n<section *ngIf=\"customFields.length\">\n <label>{{ 'common.custom-fields' | translate }}</label>\n <vdr-tabbed-custom-fields\n entityName=\"ProductOption\"\n [customFields]=\"customFields\"\n [customFieldsFormGroup]=\"customFieldsForm\"\n [readonly]=\"!(['UpdateCatalog', 'UpdateProduct'] | hasPermission)\"\n ></vdr-tabbed-custom-fields>\n</section>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button\n type=\"submit\"\n (click)=\"update()\"\n [disabled]=\"\n nameInput.invalid ||\n codeInput.invalid ||\n (nameInput.pristine && codeInput.pristine && customFieldsForm.pristine)\n \"\n class=\"btn btn-primary\"\n >\n {{ 'catalog.update-product-option' | translate }}\n </button>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.ClrLabel, selector: "label", inputs: ["id", "for"] }, { kind: "directive", type: i1.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: i1.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"], outputs: ["readOnlyToggleChange"] }, { kind: "directive", type: i4.FormFieldControlDirective, selector: "input, textarea, select, vdr-currency-input" }, { kind: "directive", type: i4.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i4.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "component", type: i4.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i4.HasPermissionPipe, name: "hasPermission" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
59
|
+
}
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UpdateProductOptionDialogComponent, decorators: [{
|
|
61
|
+
type: Component,
|
|
62
|
+
args: [{ selector: 'vdr-update-product-option-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'catalog.update-product-option' | translate }}</ng-template>\n<vdr-form-field [label]=\"'catalog.option-name' | translate\" for=\"name\">\n <input\n id=\"name\"\n type=\"text\"\n #nameInput=\"ngModel\"\n [(ngModel)]=\"name\"\n required\n (input)=\"updateCode($event.target.value)\"\n />\n</vdr-form-field>\n<vdr-form-field [label]=\"'common.code' | translate\" for=\"code\">\n <input id=\"code\" type=\"text\" #codeInput=\"ngModel\" required [(ngModel)]=\"code\" pattern=\"[a-z0-9_-]+\" />\n</vdr-form-field>\n<clr-checkbox-wrapper>\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"updateVariantName\" />\n <label>{{ 'catalog.auto-update-option-variant-name' | translate }}</label>\n</clr-checkbox-wrapper>\n<section *ngIf=\"customFields.length\">\n <label>{{ 'common.custom-fields' | translate }}</label>\n <vdr-tabbed-custom-fields\n entityName=\"ProductOption\"\n [customFields]=\"customFields\"\n [customFieldsFormGroup]=\"customFieldsForm\"\n [readonly]=\"!(['UpdateCatalog', 'UpdateProduct'] | hasPermission)\"\n ></vdr-tabbed-custom-fields>\n</section>\n\n<ng-template vdrDialogButtons>\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\n <button\n type=\"submit\"\n (click)=\"update()\"\n [disabled]=\"\n nameInput.invalid ||\n codeInput.invalid ||\n (nameInput.pristine && codeInput.pristine && customFieldsForm.pristine)\n \"\n class=\"btn btn-primary\"\n >\n {{ 'catalog.update-product-option' | translate }}\n </button>\n</ng-template>\n" }]
|
|
63
|
+
}] });
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBkYXRlLXByb2R1Y3Qtb3B0aW9uLWRpYWxvZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NhdGFsb2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ZpZWxkRGVmLnR5cGUgPT09ICdsb2NhbGVTdHJpbmcnXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGNmQ3VycmVudFRyYW5zbGF0aW9uW2tleV1cbiAgICAgICAgICAgICAgICAgICAgICAgIDogKHRoaXMucHJvZHVjdE9wdGlvbiBhcyBhbnkpLmN1c3RvbUZpZWxkc1trZXldO1xuICAgICAgICAgICAgICAgIHRoaXMuY3VzdG9tRmllbGRzRm9ybS5hZGRDb250cm9sKGZpZWxkRGVmLm5hbWUsIG5ldyBVbnR5cGVkRm9ybUNvbnRyb2wodmFsdWUpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHVwZGF0ZSgpIHtcbiAgICAgICAgY29uc3QgcmVzdWx0ID0gY3JlYXRlVXBkYXRlZFRyYW5zbGF0YWJsZSh7XG4gICAgICAgICAgICB0cmFuc2xhdGFibGU6IHRoaXMucHJvZHVjdE9wdGlvbixcbiAgICAgICAgICAgIGxhbmd1YWdlQ29kZTogdGhpcy5hY3RpdmVMYW5ndWFnZSxcbiAgICAgICAgICAgIHVwZGF0ZWRGaWVsZHM6IHtcbiAgICAgICAgICAgICAgICBjb2RlOiB0aGlzLmNvZGUsXG4gICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lLFxuICAgICAgICAgICAgICAgIGN1c3RvbUZpZWxkczogdGhpcy5jdXN0b21GaWVsZHNGb3JtLnZhbHVlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGN1c3RvbUZpZWxkQ29uZmlnOiB0aGlzLmN1c3RvbUZpZWxkcyxcbiAgICAgICAgICAgIGRlZmF1bHRUcmFuc2xhdGlvbjoge1xuICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZTogdGhpcy5hY3RpdmVMYW5ndWFnZSxcbiAgICAgICAgICAgICAgICBuYW1lOiAnJyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH0pO1xuICAgICAgICB0aGlzLnJlc29sdmVXaX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dHJhbnNsYXRlIH19PC9idXR0b24+XG4gICAgPGJ1dHRvblxuICAgICAgICB0eXBlPVwic3VibWl0XCJcbiAgICAgICAgKGNsaWNrKT1cInVwZGF0ZSgpXCJcbiAgICAgICAgW2Rpc2FibGVkXT1cIlxuICAgICAgICAgICAgbmFtZUlucHV0LmludmFsaWQgfHxcbiAgICAgICAgICAgIGNvZGVJbnB1dC5pbnZhbGlkIHx8XG4gICAgICAgICAgICAobmFtZUlucHV0LnByaXN0aW5lICYmIGNvZGVJbnB1dC5wcmlzdGluZSAmJiBjdXN0b21GaWVsZHNGb3JtLnByaXN0aW5lKVxuICAgICAgICBcIlxuICAgICAgICBjbGFzcz1cImJ0biBidG4tcHJpbWFyeVwiXG4gICAgPlxuICAgICAgICB7eyAnY2F0YWxvZy51cGRhdGUtcHJvZHVjdC1vcHRpb24nIHwgdHJhbnNsYXRlIH19XG4gICAgPC9idXR0b24+XG48L25nLXRlbXBsYXRlPlxuIl19
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, combineLatest } from 'rxjs';
|
|
3
|
+
import { map } from 'rxjs/operators';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@deenruv/admin-ui/core";
|
|
6
|
+
import * as i2 from "@clr/angular";
|
|
7
|
+
import * as i3 from "@angular/common";
|
|
8
|
+
import * as i4 from "@ngx-translate/core";
|
|
9
|
+
export class VariantPriceDetailComponent {
|
|
10
|
+
constructor(dataService) {
|
|
11
|
+
this.dataService = dataService;
|
|
12
|
+
this.priceChange$ = new BehaviorSubject(0);
|
|
13
|
+
this.taxCategoryIdChange$ = new BehaviorSubject('');
|
|
14
|
+
}
|
|
15
|
+
ngOnInit() {
|
|
16
|
+
const taxRates$ = this.dataService.settings
|
|
17
|
+
.getTaxRatesSimple(999, 0, 'cache-first')
|
|
18
|
+
.mapStream(data => data.taxRates.items);
|
|
19
|
+
const activeChannel$ = this.dataService.settings
|
|
20
|
+
.getActiveChannel('cache-first')
|
|
21
|
+
.refetchOnChannelChange()
|
|
22
|
+
.mapStream(data => data.activeChannel);
|
|
23
|
+
this.taxRate$ = combineLatest(activeChannel$, taxRates$, this.taxCategoryIdChange$).pipe(map(([channel, taxRates, taxCategoryId]) => {
|
|
24
|
+
const defaultTaxZone = channel.defaultTaxZone;
|
|
25
|
+
if (!defaultTaxZone) {
|
|
26
|
+
return 0;
|
|
27
|
+
}
|
|
28
|
+
const applicableRate = taxRates.find(taxRate => taxRate.zone.id === defaultTaxZone.id && taxRate.category.id === taxCategoryId);
|
|
29
|
+
if (!applicableRate) {
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
return applicableRate.value;
|
|
33
|
+
}));
|
|
34
|
+
this.grossPrice$ = combineLatest(this.taxRate$, this.priceChange$).pipe(map(([taxRate, price]) => Math.round(price * ((100 + taxRate) / 100))));
|
|
35
|
+
}
|
|
36
|
+
ngOnChanges(changes) {
|
|
37
|
+
if ('price' in changes) {
|
|
38
|
+
this.priceChange$.next(changes.price.currentValue);
|
|
39
|
+
}
|
|
40
|
+
if ('taxCategoryId' in changes) {
|
|
41
|
+
this.taxCategoryIdChange$.next(changes.taxCategoryId.currentValue);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VariantPriceDetailComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: VariantPriceDetailComponent, selector: "vdr-variant-price-detail", inputs: { priceIncludesTax: "priceIncludesTax", price: "price", currencyCode: "currencyCode", taxCategoryId: "taxCategoryId" }, usesOnChanges: true, ngImport: i0, template: "<label class=\"clr-control-label\">{{ 'catalog.taxes' | translate }}</label>\n<div *ngIf=\"priceIncludesTax\" class=\"value\">\n {{ 'catalog.price-includes-tax-at' | translate: { rate: taxRate$ | async } }}\n</div>\n<div *ngIf=\"!priceIncludesTax\" class=\"value\">\n {{\n 'catalog.price-with-tax-in-default-zone'\n | translate: { price: grossPrice$ | async | localeCurrency: currencyCode, rate: taxRate$ | async }\n }}\n</div>\n", styles: [":host{display:flex;flex-direction:column}.value{margin-top:3px}\n"], dependencies: [{ kind: "directive", type: i2.ClrLabel, selector: "label", inputs: ["id", "for"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VariantPriceDetailComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'vdr-variant-price-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"clr-control-label\">{{ 'catalog.taxes' | translate }}</label>\n<div *ngIf=\"priceIncludesTax\" class=\"value\">\n {{ 'catalog.price-includes-tax-at' | translate: { rate: taxRate$ | async } }}\n</div>\n<div *ngIf=\"!priceIncludesTax\" class=\"value\">\n {{\n 'catalog.price-with-tax-in-default-zone'\n | translate: { price: grossPrice$ | async | localeCurrency: currencyCode, rate: taxRate$ | async }\n }}\n</div>\n", styles: [":host{display:flex;flex-direction:column}.value{margin-top:3px}\n"] }]
|
|
50
|
+
}], ctorParameters: () => [{ type: i1.DataService }], propDecorators: { priceIncludesTax: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], price: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], currencyCode: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], taxCatego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G4gICAgfVxufVxuIiwiPGxhYmVsIGNsYXNzPVwiY2xyLWNvbnRyb2wtbGFiZWxcIj57eyAnY2F0YWxvZy50YXhlcycgfCB0cmFuc2xhdGUgfX08L2xhYmVsPlxuPGRpdiAqbmdJZj1cInByaWNlSW5jbHVkZXNUYXhcIiBjbGFzcz1cInZhbHVlXCI+XG4gICAge3sgJ2NhdGFsb2cucHJpY2UtaW5jbHVkZXMtdGF4LWF0JyB8IHRyYW5zbGF0ZTogeyByYXRlOiB0YXhSYXRlJCB8IGFzeW5jIH0gfX1cbjwvZGl2PlxuPGRpdiAqbmdJZj1cIiFwcmljZUluY2x1ZGVzVGF4XCIgY2xhc3M9XCJ2YWx1ZVwiPlxuICAgIHt7XG4gICAgICAgICdjYXRhbG9nLnByaWNlLXdpdGgtdGF4LWluLWRlZmF1bHQtem9uZSdcbiAgICAgICAgICAgIHwgdHJhbnNsYXRlOiB7IHByaWNlOiBncm9zc1ByaWNlJCB8IGFzeW5jIHwgbG9jYWxlQ3VycmVuY3k6IGN1cnJlbmN5Q29kZSwgcmF0ZTogdGF4UmF0ZSQgfCBhc3luYyB9XG4gICAgfX1cbjwvZGl2PlxuIl19
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "@deenruv/admin-ui/core";
|
|
5
|
+
import * as i3 from "@ngx-translate/core";
|
|
6
|
+
export class VariantPriceStrategyDetailComponent {
|
|
7
|
+
calculatedPriceDiffersFromInputPrice() {
|
|
8
|
+
const defaultPrice = this.variant.prices.find(p => p.currencyCode === this.channelDefaultCurrencyCode) ??
|
|
9
|
+
this.variant.prices[0];
|
|
10
|
+
if (!defaultPrice) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if (this.channelPriceIncludesTax) {
|
|
14
|
+
return this.variant.priceWithTax !== defaultPrice.price;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return this.variant.price !== defaultPrice.price;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VariantPriceStrategyDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: VariantPriceStrategyDetailComponent, selector: "vdr-variant-price-strategy-detail", inputs: { channelPriceIncludesTax: "channelPriceIncludesTax", variant: "variant", channelDefaultCurrencyCode: "channelDefaultCurrencyCode" }, ngImport: i0, template: "<div *ngIf=\"calculatedPriceDiffersFromInputPrice()\" class=\"price-strategy-detail\">\n <vdr-form-item\n [label]=\"'catalog.calculated-price' | translate\"\n [tooltip]=\"'catalog.calculated-price-tooltip' | translate\"\n for=\"price\"\n >\n </vdr-form-item>\n <div class=\"form-grid mt-2\">\n <vdr-form-item [label]=\"'common.price' | translate\">\n {{ variant.price | localeCurrency : variant.currencyCode }}\n </vdr-form-item>\n <vdr-form-item [label]=\"'common.price-with-tax' | translate\">\n {{ variant.priceWithTax | localeCurrency : variant.currencyCode }}\n </vdr-form-item>\n </div>\n</div>\n", styles: [":host{display:block}.price-strategy-detail{margin-top:calc(var(--space-unit) * 2);padding-top:calc(var(--space-unit) * 2);border-top:1px solid var(--color-weight-150)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.FormItemComponent, selector: "vdr-form-item", inputs: ["label", "tooltip"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: i2.LocaleCurrencyPipe, name: "localeCurrency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VariantPriceStrategyDetailComponent, decorators: [{
|
|
24
|
+
type: Component,
|
|
25
|
+
args: [{ selector: 'vdr-variant-price-strategy-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"calculatedPriceDiffersFromInputPrice()\" class=\"price-strategy-detail\">\n <vdr-form-item\n [label]=\"'catalog.calculated-price' | translate\"\n [tooltip]=\"'catalog.calculated-price-tooltip' | translate\"\n for=\"price\"\n >\n </vdr-form-item>\n <div class=\"form-grid mt-2\">\n <vdr-form-item [label]=\"'common.price' | translate\">\n {{ variant.price | localeCurrency : variant.currencyCode }}\n </vdr-form-item>\n <vdr-form-item [label]=\"'common.price-with-tax' | translate\">\n {{ variant.priceWithTax | localeCurrency : variant.currencyCode }}\n </vdr-form-item>\n </div>\n</div>\n", styles: [":host{display:block}.price-strategy-detail{margin-top:calc(var(--space-unit) * 2);padding-top:calc(var(--space-unit) * 2);border-top:1px solid var(--color-weight-150)}\n"] }]
|
|
26
|
+
}], propDecorators: { channelPriceIncludesTax: [{
|
|
27
|
+
type: Input
|
|
28
|
+
}], variant: [{
|
|
29
|
+
type: Input
|
|
30
|
+
}], channelDefaultCurrencyCode: [{
|
|
31
|
+
type: Input
|
|
32
|
+
}] } });
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudC1wcmljZS1zdHJhdGVneS1kZXRhaWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jYXRhbG9nL3NyYy9jb21wb25lbnRzL3ZhcmlhbnQtcHJpY2Utc3RyYXRlZ3ktZGV0YWlsL3ZhcmlhbnQtcHJpY2Utc3RyYXRlZ3ktZGV0YWlsLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY2F0YWxvZy9zcmMvY29tcG9uZW50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zbGF0ZVwiPlxuICAgICAgICAgICAge3sgdmFyaWFudC5wcmljZSB8IGxvY2FsZUN1cnJlbmN5IDogdmFyaWFudC5jdXJyZW5jeUNvZGUgfX1cbiAgICAgICAgPC92ZHItZm9ybS1pdGVtPlxuICAgICAgICA8dmRyLWZvcm0taXRlbSBbbGFiZWxdPVwiJ2NvbW1vbi5wcmljZS13aXRoLXRheCcgfCB0cmFuc2xhdGVcIj5cbiAgICAgICAgICAgIHt7IHZhcmlhbnQucHJpY2VXaXRoVGF4IHwgbG9jYWxlQ3VycmVuY3kgOiB2YXJpYW50LmN1cnJlbmN5Q29kZSB9fVxuICAgICAgICA8L3Zkci1mb3JtLWl0ZW0+XG4gICAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public_api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVlbnJ1di1hZG1pbi11aS1jYXRhbG9nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9jYXRhbG9nL3NyYy9kZWVucnV2LWFkbWluLXVpLWNhdGFsb2cudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { DeletionResult, findTranslation, } from '@deenruv/admin-ui/core';
|
|
3
|
+
import { normalizeString } from '@deenruv/common/lib/normalize-string';
|
|
4
|
+
import { notNullOrUndefined } from '@deenruv/common/lib/shared-utils';
|
|
5
|
+
import { forkJoin, of, throwError } from 'rxjs';
|
|
6
|
+
import { map, mergeMap, shareReplay, switchMap } from 'rxjs/operators';
|
|
7
|
+
import { replaceLast } from './replace-last';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@deenruv/admin-ui/core";
|
|
10
|
+
/**
|
|
11
|
+
* Handles the logic for making the API calls to perform CRUD operations on a Product and its related
|
|
12
|
+
* entities. This logic was extracted out of the component because it became too large and hard to follow.
|
|
13
|
+
*/
|
|
14
|
+
export class ProductDetailService {
|
|
15
|
+
constructor(dataService) {
|
|
16
|
+
this.dataService = dataService;
|
|
17
|
+
}
|
|
18
|
+
getTaxCategories() {
|
|
19
|
+
return this.dataService.settings
|
|
20
|
+
.getTaxCategories()
|
|
21
|
+
.mapSingle(data => data.taxCategories.items)
|
|
22
|
+
.pipe(shareReplay(1));
|
|
23
|
+
}
|
|
24
|
+
createProductWithVariants(input, createVariantsConfig, languageCode) {
|
|
25
|
+
const createProduct$ = this.dataService.product.createProduct(input);
|
|
26
|
+
const nonEmptyOptionGroups = createVariantsConfig.groups.filter(g => 0 < g.values.length);
|
|
27
|
+
const createOptionGroups$ = this.createProductOptionGroups(nonEmptyOptionGroups, languageCode);
|
|
28
|
+
return forkJoin(createProduct$, createOptionGroups$).pipe(mergeMap(([{ createProduct }, optionGroups]) => {
|
|
29
|
+
const addOptionsToProduct$ = optionGroups.length
|
|
30
|
+
? forkJoin(optionGroups.map(optionGroup => this.dataService.product.addOptionGroupToProduct({
|
|
31
|
+
productId: createProduct.id,
|
|
32
|
+
optionGroupId: optionGroup.id,
|
|
33
|
+
})))
|
|
34
|
+
: of([]);
|
|
35
|
+
return addOptionsToProduct$.pipe(map(() => ({ createProduct, optionGroups })));
|
|
36
|
+
}), mergeMap(({ createProduct, optionGroups }) => {
|
|
37
|
+
const variants = createVariantsConfig.variants.map(v => {
|
|
38
|
+
const optionIds = optionGroups.length
|
|
39
|
+
? v.optionValues.map((optionName, index) => {
|
|
40
|
+
const option = optionGroups[index].options.find(o => o.name === optionName);
|
|
41
|
+
if (!option) {
|
|
42
|
+
throw new Error(`Could not find a matching ProductOption "${optionName}" when creating variant`);
|
|
43
|
+
}
|
|
44
|
+
return option.id;
|
|
45
|
+
})
|
|
46
|
+
: [];
|
|
47
|
+
return {
|
|
48
|
+
...v,
|
|
49
|
+
optionIds,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
const options = optionGroups.map(og => og.options).reduce((flat, o) => [...flat, ...o], []);
|
|
53
|
+
return this.createProductVariants(createProduct, variants, options, languageCode, createVariantsConfig.stockLocationId);
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
createProductOptionGroups(groups, languageCode) {
|
|
57
|
+
return groups.length
|
|
58
|
+
? forkJoin(groups.map(c => this.dataService.product
|
|
59
|
+
.createProductOptionGroups({
|
|
60
|
+
code: normalizeString(c.name, '-'),
|
|
61
|
+
translations: [{ languageCode, name: c.name }],
|
|
62
|
+
options: c.values.map(v => ({
|
|
63
|
+
code: normalizeString(v, '-'),
|
|
64
|
+
translations: [{ languageCode, name: v }],
|
|
65
|
+
})),
|
|
66
|
+
})
|
|
67
|
+
.pipe(map(data => data.createProductOptionGroup))))
|
|
68
|
+
: of([]);
|
|
69
|
+
}
|
|
70
|
+
createProductVariants(product, variantData, options, languageCode, stockLocationId) {
|
|
71
|
+
const variants = variantData.map(v => {
|
|
72
|
+
const name = options.length
|
|
73
|
+
? `${product.name} ${v.optionIds
|
|
74
|
+
.map(id => options.find(o => o.id === id))
|
|
75
|
+
.filter(notNullOrUndefined)
|
|
76
|
+
.map(o => o.name)
|
|
77
|
+
.join(' ')}`
|
|
78
|
+
: product.name;
|
|
79
|
+
return {
|
|
80
|
+
productId: product.id,
|
|
81
|
+
price: v.price,
|
|
82
|
+
sku: v.sku,
|
|
83
|
+
translations: [
|
|
84
|
+
{
|
|
85
|
+
languageCode,
|
|
86
|
+
name,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
stockLevels: [
|
|
90
|
+
{
|
|
91
|
+
stockLocationId,
|
|
92
|
+
stockOnHand: v.stock,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
optionIds: v.optionIds,
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
return this.dataService.product.createProductVariants(variants).pipe(map(({ createProductVariants }) => ({
|
|
99
|
+
createProductVariants,
|
|
100
|
+
productId: product.id,
|
|
101
|
+
})));
|
|
102
|
+
}
|
|
103
|
+
updateProduct(updateOptions) {
|
|
104
|
+
const { product, languageCode, autoUpdate, productInput, variantsInput } = updateOptions;
|
|
105
|
+
const updateOperations = [];
|
|
106
|
+
const updateVariantsInput = variantsInput || [];
|
|
107
|
+
const variants$ = autoUpdate
|
|
108
|
+
? this.dataService.product
|
|
109
|
+
.getProductVariantsForProduct({}, product.id)
|
|
110
|
+
.mapSingle(({ productVariants }) => productVariants.items)
|
|
111
|
+
: of([]);
|
|
112
|
+
return variants$.pipe(mergeMap(variants => {
|
|
113
|
+
if (productInput) {
|
|
114
|
+
updateOperations.push(this.dataService.product.updateProduct(productInput));
|
|
115
|
+
const productOldName = findTranslation(product, languageCode)?.name ?? '';
|
|
116
|
+
const productNewName = findTranslation(productInput, languageCode)?.name;
|
|
117
|
+
if (productNewName && productOldName !== productNewName && autoUpdate) {
|
|
118
|
+
for (const variant of variants) {
|
|
119
|
+
const currentVariantName = findTranslation(variant, languageCode)?.name || '';
|
|
120
|
+
let variantInput;
|
|
121
|
+
const existingVariantInput = updateVariantsInput.find(i => i.id === variant.id);
|
|
122
|
+
if (existingVariantInput) {
|
|
123
|
+
variantInput = existingVariantInput;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
variantInput = {
|
|
127
|
+
id: variant.id,
|
|
128
|
+
translations: [{ languageCode, name: currentVariantName }],
|
|
129
|
+
};
|
|
130
|
+
updateVariantsInput.push(variantInput);
|
|
131
|
+
}
|
|
132
|
+
const variantTranslation = findTranslation(variantInput, languageCode);
|
|
133
|
+
if (variantTranslation) {
|
|
134
|
+
if (variantTranslation.name) {
|
|
135
|
+
variantTranslation.name = replaceLast(variantTranslation.name, productOldName, productNewName);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
// The variant translation was falsy, which occurs
|
|
139
|
+
// when defining the product name for a new translation
|
|
140
|
+
// language that had not yet been defined.
|
|
141
|
+
variantTranslation.name = [
|
|
142
|
+
productNewName,
|
|
143
|
+
...variant.options.map(o => o.name),
|
|
144
|
+
].join(' ');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (updateVariantsInput.length) {
|
|
151
|
+
updateOperations.push(this.dataService.product.updateProductVariants(updateVariantsInput));
|
|
152
|
+
}
|
|
153
|
+
return forkJoin(updateOperations);
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
updateProductOptions(inputs, autoUpdateProductNames, product, languageCode) {
|
|
157
|
+
const variants$ = autoUpdateProductNames
|
|
158
|
+
? this.dataService.product
|
|
159
|
+
.getProductVariantsForProduct({}, product.id)
|
|
160
|
+
.mapSingle(({ productVariants }) => productVariants.items)
|
|
161
|
+
: of([]);
|
|
162
|
+
return variants$.pipe(mergeMap(variants => {
|
|
163
|
+
let updateProductVariantNames$ = of([]);
|
|
164
|
+
if (autoUpdateProductNames) {
|
|
165
|
+
const replacementMap = new Map();
|
|
166
|
+
for (const input of inputs) {
|
|
167
|
+
const newOptionName = findTranslation(input, languageCode)?.name;
|
|
168
|
+
let oldOptionName;
|
|
169
|
+
for (const variant of variants) {
|
|
170
|
+
if (oldOptionName) {
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (variant.options.map(o => o.id).includes(input.id)) {
|
|
174
|
+
if (!oldOptionName) {
|
|
175
|
+
oldOptionName = findTranslation(variant.options.find(o => o.id === input.id), languageCode)?.name;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (oldOptionName && newOptionName) {
|
|
180
|
+
replacementMap.set(oldOptionName, newOptionName);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const variantsToUpdate = [];
|
|
184
|
+
if (replacementMap.size) {
|
|
185
|
+
const oldOptionNames = Array.from(replacementMap.keys());
|
|
186
|
+
for (const variant of variants) {
|
|
187
|
+
const variantName = findTranslation(variant, languageCode)?.name;
|
|
188
|
+
if (!variantName) {
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
if (!oldOptionNames.some(oldOptionName => variantName.includes(oldOptionName))) {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const updatedVariantName = oldOptionNames.reduce((name, oldOptionName) => replaceLast(name, oldOptionName, replacementMap.get(oldOptionName)), variantName);
|
|
195
|
+
variantsToUpdate.push({
|
|
196
|
+
id: variant.id,
|
|
197
|
+
translations: [
|
|
198
|
+
{
|
|
199
|
+
languageCode,
|
|
200
|
+
name: updatedVariantName,
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (variantsToUpdate.length) {
|
|
207
|
+
updateProductVariantNames$ =
|
|
208
|
+
this.dataService.product.updateProductVariants(variantsToUpdate);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
updateProductVariantNames$ = of([]);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return forkJoin(inputs.map(input => this.dataService.product.updateProductOption(input))).pipe(mergeMap(() => updateProductVariantNames$));
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
deleteProductVariant(id, productId) {
|
|
218
|
+
return this.dataService.product.deleteProductVariant(id).pipe(switchMap(result => {
|
|
219
|
+
if (result.deleteProductVariant.result === DeletionResult.DELETED) {
|
|
220
|
+
return this.dataService.product.getProduct(productId).single$;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
return throwError(result.deleteProductVariant.message);
|
|
224
|
+
}
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProductDetailService, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
228
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProductDetailService, providedIn: 'root' }); }
|
|
229
|
+
}
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProductDetailService, decorators: [{
|
|
231
|
+
type: Injectable,
|
|
232
|
+
args: [{
|
|
233
|
+
providedIn: 'root',
|
|
234
|
+
}]
|
|
235
|
+
}], ctorParameters: () => [{ type: i1.DataService }] });
|
|
236
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1kZXRhaWwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY2F0YWxvZy9zcmMvcHJvdmlkZXJzL3Byb2R1Y3QtZGV0YWlsL3Byb2R1Y3QtZGV0YWlsLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBSUgsY0FBYyxFQUVkLGVBQWUsR0FTbEIsTUFBTSx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sc0NBQXNDLENBQUM7QUFDdkUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFDdEUsT0FBTyxFQUFFLFFBQVEsRUFBYy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ZE9wdGlvbkdyb3VwVG9Qcm9kdWN0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9kdWN0SWQ6IGNyZWF0ZVByb2R1Y3QuaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uR3JvdXBJZDogb3B0aW9uR3JvdXAuaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIDogb2YoW10pO1xuICAgICAgICAgICAgICAgIHJldHVybiBhZGRPcHRpb25zVG9Qcm9kdWN0JC5waXBlKG1hcCgoKSA9PiAoeyBjcmVhdGVQcm9kdWN0LCBvcHRpb25Hcm91cHMgfSkpKTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgbWVyZ2VNYXAoKHsgY3JlYXRlUHJvZHVjdCwgb3B0aW9uR3JvdXBzIH0pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB2YXJpYW50cyA9IGNyZWF0ZVZhcmlhbnRzQ29uZmlnLnZhcmlhbnRzLm1hcCh2ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3B0aW9uSWRzID0gb3B0aW9uR3JvdXBzLmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgPyB2Lm9wdGlvblZhbHVlcy5tYXAoKG9wdGlvbk5hbWUsIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvcHRpb24gPSBvcHRpb25Hcm91cHNbaW5kZXhdLm9wdGlvbnMuZmluZChvID0+IG8ubmFtZSA9PT0gb3B0aW9uTmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW9wdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYENvdWxkIG5vdCBmaW5kIGEgbWF0Y2hpbmcgUHJvZHVjdE9wdGlvbiBcIiR7b3B0aW9uTmFtZX1cIiB3aGVuIGNyZWF0aW5nIHZhcmlhbnRgLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9uLmlkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBbXTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLnYsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25JZHMsXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IG9wdGlvbkdyb3Vwcy5tYXAob2cgPT4gb2cub3B0aW9ucykucmVkdWNlKChmbGF0LCBvKSA9PiBbLi4uZmxhdCwgLi4ub10sIFtdKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVQcm9kdWN0VmFyaWFudHMoXG4gICAgICAgICAgICAgICAgICAgIGNyZWF0ZVByb2R1Y3QsXG4gICAgICAgICAgICAgICAgICAgIHZhcmlhbnRzLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZUNvZGUsXG4gICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZhcmlhbnRzQ29uZmlnLnN0b2NrTG9jYXRpb25JZCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSksXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgY3JlYXRlUHJvZHVjdE9wdGlvbkdyb3Vwcyhncm91cHM6IEFycmF5PHsgbmFtZTogc3RyaW5nOyB2YWx1ZXM6IHN0cmluZ1tdIH0+LCBsYW5ndWFnZUNvZGU6IExhbmd1YWdlQ29kZSkge1xuICAgICAgICByZXR1cm4gZ3JvdXBzLmxlbmd0aFxuICAgICAgICAgICAgPyBmb3JrSm9pbihcbiAgICAgICAgICAgICAgICAgIGdyb3Vwcy5tYXAoYyA9PlxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGF0YVNlcnZpY2UucHJvZHVjdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAuY3JlYXRlUHJvZHVjdE9wdGlvbkdyb3Vwcyh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlOiBub3JtYWxpemVTdHJpbmcoYy5uYW1lLCAnLScpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRpb25zOiBbeyBsYW5ndWFnZUNvZGUsIG5hbWU6IGMubmFtZSB9XSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IGMudmFsdWVzLm1hcCh2ID0+ICh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZTogbm9ybWFsaXplU3RyaW5nKHYsICctJyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRpb25zOiBbeyBsYW5ndWFnZUNvZGUsIG5hbWU6IHYgfV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC5waXBlKG1hcChkYXRhID0+IGRhdGEuY3JlYXRlUHJvZHVjdE9wdGlvbkdyb3VwKSksXG4gICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICA6IG9mKFtdKTtcbiAgICB9XG5cbiAgICBjcmVhdGVQcm9kdWN0VmFyaWFudHMoXG4gICAgICAgIHByb2R1Y3Q6IHsgbmFtZTogc3RyaW5nOyBpZDogc3RyaW5nIH0sXG4gICAgICAgIHZhcmlhbnREYXRhOiBBcnJheTx7IHByaWNlOiBudW1iZXI7IHNrdTogc3RyaW5nOyBzdG9jazogbnVtYmVyOyBvcHRpb25JZHM6IHN0cmluZ1tdIH0+LFxuICAgICAgICBvcHRpb25zOiBBcnJheTx7IGlkOiBzdHJpbmc7IG5hbWU6IHN0cmluZyB9PixcbiAgICAgICAgbGFuZ3VhZ2VDb2RlOiBMYW5ndWFnZUNvZGUsXG4gICAgICAgIHN0b2NrTG9jYXRpb25JZDogc3RyaW5nLFxuICAgICkge1xuICAgICAgICBjb25zdCB2YXJpYW50czogQ3JlYXRlUHJvZHVjdFZhcmlhbnRJbnB1dFtdID0gdmFyaWFudERhdGEubWFwKHYgPT4ge1xuICAgICAgICAgICAgY29uc3QgbmFtZSA9IG9wdGlvbnMubGVuZ3RoXG4gICAgICAgICAgICAgICAgPyBgJHtwcm9kdWN0Lm5hbWV9ICR7di5vcHRpb25JZHNcbiAgICAgICAgICAgICAgICAgICAgICAubWFwKGlkID0+IG9wdGlvbnMuZmluZChvID0+IG8uaWQgPT09IGlkKSlcbiAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKG5vdE51bGxPclVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICAgICAgICAubWFwKG8gPT4gby5uYW1lKVxuICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCcgJyl9YFxuICAgICAgICAgICAgICAgIDogcHJvZHVjdC5uYW1lO1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBwcm9kdWN0SWQ6IHByb2R1Y3QuaWQsXG4gICAgICAgICAgICAgICAgcHJpY2U6IHYucHJpY2UsXG4gICAgICAgICAgICAgICAgc2t1OiB2LnNrdSxcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbnM6IFtcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHN0b2NrTGV2ZWxzOiBbXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b2NrTG9jYXRpb25JZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b2NrT25IYW5kOiB2LnN0b2NrLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgb3B0aW9uSWRzOiB2Lm9wdGlvbklkcyxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdGhpcy5kYXRhU2VydmljZS5wcm9kdWN0LmNyZWF0ZVByb2R1Y3RWYXJpYW50cyh2YXJpYW50cykucGlwZShcbiAgICAgICAgICAgIG1hcCgoeyBjcmVhdGVQcm9kdWN0VmFyaWFudHMgfSkgPT4gKHtcbiAgICAgICAgICAgICAgICBjcmVhdGVQcm9kdWN0VmFyaWFudHMsXG4gICAgICAgICAgICAgICAgcHJvZHVjdElkOiBwcm9kdWN0LmlkLFxuICAgICAgICAgICAgfSkpLFxuICAgICAgICApO1xuICAgIH1cblxuICAgIHVwZGF0ZVByb2R1Y3QodXBkYXRlT3B0aW9uczoge1xuICAgICAgICBwcm9kdWN0OiBOb25OdWxsYWJsZTxHZXRQcm9kdWN0RGV0YWlsUXVlcnlbJ3Byb2R1Y3QnXT47XG4gICAgICAgIGxhbmd1YWdlQ29kZTogTGFuZ3VhZ2VDb2RlO1xuICAgICAgICBhdXRvVXBkYXRlOiBib29sZWFuO1xuICAgICAgICBwcm9kdWN0SW5wdXQ/OiBVcGRhdGVQcm9kdWN0SW5wdXQ7XG4gICAgICAgIHZhcmlhbnRzSW5wdXQ/OiBVcGRhdGVQcm9kdWN0VmFyaWFudElucHV0W107XG4g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AgICAgICAgICAgICAgICBjb25zdCBwcm9kdWN0TmV3TmFtZSA9IGZpbmRUcmFuc2xhdGlvbihwcm9kdWN0SW5wdXQsIGxhbmd1YWdlQ29kZSk/Lm5hbWU7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcm9kdWN0TmV3TmFtZSAmJiBwcm9kdWN0T2xkTmFtZSAhPT0gcHJvZHVjdE5ld05hbWUgJiYgYXV0b1VwZGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCB2YXJpYW50IG9mIHZhcmlhbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY3VycmVudFZhcmlhbnROYW1lID0gZmluZFRyYW5zbGF0aW9uKHZhcmlhbnQsIGxhbmd1YWdlQ29kZSk/Lm5hbWUgfHwgJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhcmlhbnRJbnB1dDogVXBkYXRlUHJvZHVjdFZhcmlhbnRJbnB1dDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBleGlzdGluZ1ZhcmlhbnRJbnB1dCA9IHVwZGF0ZVZhcmlhbnRzSW5wdXQuZmluZChpID0+IGkuaWQgPT09IHZhcmlhbnQuaWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ1ZhcmlhbnRJbnB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXJpYW50SW5wdXQgPSBleGlzdGluZ1ZhcmlhbnRJbnB1dDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXJpYW50SW5wdXQgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogdmFyaWFudC5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0aW9uczogW3sgbGFuZ3VhZ2VDb2RlLCBuYW1lOiBjdXJyZW50VmFyaWFudE5hbWUgfV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZhcmlhbnRzSW5wdXQucHVzaCh2YXJpYW50SW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2YXJpYW50VHJhbnNsYXRpb24gPSBmaW5kVHJhbnNsYXRpb24odmFyaWFudElucHV0LCBsYW5ndWFnZUNvZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YXJpYW50VHJhbnNsYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhcmlhbnRUcmFuc2xhdGlvbi5uYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXJpYW50VHJhbnNsYXRpb24ubmFtZSA9IHJlcGxhY2VMYXN0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhcmlhbnRUcmFuc2xhdGlvbi5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y3RPbGROYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y3ROZXdOYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZSB2YXJpYW50IHRyYW5zbGF0aW9uIHdhcyBmYWxzeSwgd2hpY2ggb2NjdXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB3aGVuIGRlZmluaW5nIHRoZSBwcm9kdWN0IG5hbWUgZm9yIGEgbmV3IHRyYW5zbGF0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsYW5ndWFnZSB0aGF0IGhhZCBub3QgeWV0IGJlZW4gZGVmaW5lZC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhcmlhbnRUcmFuc2xhdGlvbi5uYW1lID0gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2R1Y3ROZXdOYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnZhcmlhbnQub3B0aW9ucy5tYXAobyA9PiBvLm5hbWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXS5qb2luKCcgJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZVZhcmlhbnRzSW5wdXQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZU9wZXJhdGlvbnMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGF0YVNlcnZpY2UucHJvZHVjdC51cGRhdGVQcm9kdWN0VmFyaWFudHModXBkYXRlVmFyaWFudHNJbnB1dCksXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmb3JrSm9pbih1cGRhdGVPcGVyYXRpb25zKTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICApO1xuICAgIH1cblxuICAgIHVwZGF0ZVByb2R1Y3RPcHRpb25zKFxuICAgICAgICBpbnB1dHM6IFVwZGF0ZVByb2R1Y3RPcHRpb25JbnB1dFtdLFxuICAgICAgICBhdXRvVXBkYXRl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mluZyB8IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgdmFyaWFudCBvZiB2YXJpYW50cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvbGRPcHRpb25OYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFyaWFudC5vcHRpb25zLm1hcChvID0+IG8uaWQpLmluY2x1ZGVzKGlucHV0LmlkKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW9sZE9wdGlvbk5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9sZE9wdGlvbk5hbWUgPSBmaW5kVHJhbnNsYXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyaWFudC5vcHRpb25zLmZpbmQobyA9PiBvLmlkID09PSBpbnB1dC5pZCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKT8ubmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvbGRPcHRpb25OYW1lICYmIG5ld09wdGlvbk5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBsYWNlbWVudE1hcC5zZXQob2xkT3B0aW9uTmFtZSwgbmV3T3B0aW9uTmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YXJpYW50c1RvVXBkYXRlOiBVcGRhdGVQcm9kdWN0VmFyaWFudElucHV0W10gPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcGxhY2VtZW50TWFwLnNpemUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG9sZE9wdGlvbk5hbWVzID0gQXJyYXkuZnJvbShyZXBsYWNlbWVudE1hcC5rZXlzKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCB2YXJpYW50IG9mIHZhcmlhbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFyaWFudE5hbWUgPSBmaW5kVHJhbnNsYXRpb24odmFyaWFudCwgbGFuZ3VhZ2VDb2RlKT8ubmFtZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXZhcmlhbnROYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW9sZE9wdGlvbk5hbWVzLnNvbWUob2xkT3B0aW9uTmFtZSA9PiB2YXJpYW50TmFtZS5pbmNsdWRlcyhvbGRPcHRpb25OYW1lKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVwZGF0ZWRWYXJpYW50TmFtZSA9IG9sZE9wdGlvbk5hbWVzLnJlZHVjZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5hbWUsIG9sZE9wdGlvbk5hbWUpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBsYWNlTGFzdChuYW1lLCBvbGRPcHRpb25OYW1lLCByZXBsYWNlbWVudE1hcC5nZXQob2xkT3B0aW9uTmFtZSkhKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyaWFudE5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXJpYW50c1RvVXBkYXRlLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogdmFyaWFudC5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRpb25zOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IHVwZGF0ZWRWYXJpYW50TmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhcmlhbnRzVG9VcGRhdGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVQcm9kdWN0VmFyaWFudE5hbWVzJCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kYXRhU2VydmljZS5wcm9kdWN0LnVwZGF0ZVByb2R1Y3RWYXJpYW50cyh2YXJpYW50c1RvVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVByb2R1Y3RWYXJpYW50TmFtZXMkID0gb2YoW10pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmb3JrSm9pbihcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRzLm1hcChpbnB1dCA9PiB0aGlzLmRhdGFTZXJ2aWNlLnByb2R1Y3QudXBkYXRlUHJvZHVjdE9wdGlvbihpbnB1dCkpLFxuICAgICAgICAgICAgICAgICkucGlwZShtZXJnZU1hcCgoKSA9PiB1cGRhdGVQcm9kdWN0VmFyaWFudE5hbWVzJCkpO1xuICAgICAgICAgICAgfSksXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgZGVsZXRlUHJvZHVjdFZhcmlhbnQoaWQ6IHN0cmluZywgcHJvZHVjdElkOiBzdHJpbmcpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZGF0YVNlcnZpY2UucHJvZHVjdC5kZWxldGVQcm9kdWN0VmFyaWFudChpZCkucGlwZShcbiAgICAgICAgICAgIHN3aXRjaE1hcChyZXN1bHQgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuZGVsZXRlUHJvZHVjdFZhcmlhbnQucmVzdWx0ID09PSBEZWxldGlvblJlc3VsdC5ERUxFVEVEKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRhdGFTZXJ2aWNlLnByb2R1Y3QuZ2V0UHJvZHVjdChwcm9kdWN0SWQpLnNpbmdsZSQ7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRocm93RXJyb3IocmVzdWx0LmRlbGV0ZVByb2R1Y3RWYXJpYW50Lm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pLFxuICAgICAgICApO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* Like String.prototype.replace(), but replaces the last instance
|
|
4
|
+
* rather than the first.
|
|
5
|
+
*/
|
|
6
|
+
export function replaceLast(target, search, replace) {
|
|
7
|
+
if (!target) {
|
|
8
|
+
return '';
|
|
9
|
+
}
|
|
10
|
+
const lastIndex = target.lastIndexOf(search);
|
|
11
|
+
if (lastIndex === -1) {
|
|
12
|
+
return target;
|
|
13
|
+
}
|
|
14
|
+
const head = target.substr(0, lastIndex);
|
|
15
|
+
const tail = target.substr(lastIndex).replace(search, replace);
|
|
16
|
+
return head + tail;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwbGFjZS1sYXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jYXRhbG9nL3NyYy9wcm92aWRlcnMvcHJvZHVjdC1kZXRhaWwvcmVwbGFjZS1sYXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsV0FBVyxDQUFDLE1BQWlDLEVBQUUsTUFBYyxFQUFFLE9BQWU7SUFDMUYsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBQ1YsT0FBTyxFQUFFLENBQUM7SUFDZCxDQUFDO0lBQ0QsTUFBTSxTQUFTLEdBQUcsTUFBTSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsQ0FBQztJQUM3QyxJQUFJLFNBQVMsS0FBSyxDQUFDLENBQUMsRUFBRSxDQUFDO1FBQ25CLE9BQU8sTUFBTSxDQUFDO0lBQ2xCLENBQUM7SUFDRCxNQUFNLElBQUksR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBRSxTQUFTLENBQUMsQ0FBQztJQUN6QyxNQUFNLElBQUksR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDL0QsT0FBTyxJQUFJLEdBQUcsSUFBSSxDQUFDO0FBQ3ZCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBkZXNjcmlwdGlvblxuICogTGlrZSBTdHJpbmcucHJvdG90eXBlLnJlcGxhY2UoKSwgYnV0IHJlcGxhY2VzIHRoZSBsYXN0IGluc3RhbmNlXG4gKiByYXRoZXIgdGhhbiB0aGUgZmlyc3QuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiByZXBsYWNlTGFzdCh0YXJnZXQ6IHN0cmluZyB8IHVuZGVmaW5lZCB8IG51bGwsIHNlYXJjaDogc3RyaW5nLCByZXBsYWNlOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgIGlmICghdGFyZ2V0KSB7XG4gICAgICAgIHJldHVybiAnJztcbiAgICB9XG4gICAgY29uc3QgbGFzdEluZGV4ID0gdGFyZ2V0Lmxhc3RJbmRleE9mKHNlYXJjaCk7XG4gICAgaWYgKGxhc3RJbmRleCA9PT0gLTEpIHtcbiAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICB9XG4gICAgY29uc3QgaGVhZCA9IHRhcmdldC5zdWJzdHIoMCwgbGFzdEluZGV4KTtcbiAgICBjb25zdCB0YWlsID0gdGFyZ2V0LnN1YnN0cihsYXN0SW5kZXgpLnJlcGxhY2Uoc2VhcmNoLCByZXBsYWNlKTtcbiAgICByZXR1cm4gaGVhZCArIHRhaWw7XG59XG4iXX0=
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { BaseEntityResolver } from '@deenruv/admin-ui/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/router";
|
|
5
|
+
import * as i2 from "@deenruv/admin-ui/core";
|
|
6
|
+
export class ProductVariantsResolver extends BaseEntityResolver {
|
|
7
|
+
constructor(router, dataService) {
|
|
8
|
+
super(router, {
|
|
9
|
+
__typename: 'Product',
|
|
10
|
+
id: '',
|
|
11
|
+
createdAt: '',
|
|
12
|
+
updatedAt: '',
|
|
13
|
+
name: '',
|
|
14
|
+
languageCode: '',
|
|
15
|
+
optionGroups: [],
|
|
16
|
+
variants: [],
|
|
17
|
+
}, id => dataService.product.getProductVariantsOptions(id).mapStream(data => data.product));
|
|
18
|
+
}
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProductVariantsResolver, deps: [{ token: i1.Router }, { token: i2.DataService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProductVariantsResolver, providedIn: 'root' }); }
|
|
21
|
+
}
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProductVariantsResolver, decorators: [{
|
|
23
|
+
type: Injectable,
|
|
24
|
+
args: [{
|
|
25
|
+
providedIn: 'root',
|
|
26
|
+
}]
|
|
27
|
+
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.DataService }] });
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC12YXJpYW50cy1yZXNvbHZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY2F0YWxvZy9zcmMvcHJvdmlkZXJzL3JvdXRpbmcvcHJvZHVjdC12YXJpYW50cy1yZXNvbHZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNDLE9BQU8sRUFBRSxrQkFBa0IsRUFBOEMsTUFBTSx3QkFBd0IsQ0FBQzs7OztBQUt4RyxNQUFNLE9BQU8sdUJBQXdCLFNBQVEsa0JBQTREO0lBQ3JHLFlBQVksTUFBYyxFQUFFLFdB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