@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,54 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../../providers/permissions/permissions.service";
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* A pipe which checks the provided permission against all the permissions of the current user.
|
|
7
|
+
* Returns `true` if the current user has that permission.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```HTML
|
|
11
|
+
* <button [disabled]="!('UpdateCatalog' | hasPermission)">Save Changes</button>
|
|
12
|
+
* ```
|
|
13
|
+
* @docsCategory pipes
|
|
14
|
+
*/
|
|
15
|
+
export class HasPermissionPipe {
|
|
16
|
+
constructor(permissionsService, changeDetectorRef) {
|
|
17
|
+
this.permissionsService = permissionsService;
|
|
18
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
19
|
+
this.hasPermission = false;
|
|
20
|
+
this.lastPermissions = null;
|
|
21
|
+
}
|
|
22
|
+
transform(input) {
|
|
23
|
+
const requiredPermissions = Array.isArray(input) ? input : [input];
|
|
24
|
+
const requiredPermissionsString = requiredPermissions.join(',');
|
|
25
|
+
if (this.lastPermissions !== requiredPermissionsString) {
|
|
26
|
+
this.lastPermissions = requiredPermissionsString;
|
|
27
|
+
this.hasPermission = false;
|
|
28
|
+
this.dispose();
|
|
29
|
+
this.subscription = this.permissionsService.currentUserPermissions$.subscribe(() => {
|
|
30
|
+
this.hasPermission = this.permissionsService.userHasPermissions(requiredPermissions);
|
|
31
|
+
this.changeDetectorRef.markForCheck();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return this.hasPermission;
|
|
35
|
+
}
|
|
36
|
+
ngOnDestroy() {
|
|
37
|
+
this.dispose();
|
|
38
|
+
}
|
|
39
|
+
dispose() {
|
|
40
|
+
if (this.subscription) {
|
|
41
|
+
this.subscription.unsubscribe();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HasPermissionPipe, deps: [{ token: i1.PermissionsService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
45
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: HasPermissionPipe, name: "hasPermission", pure: false }); }
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HasPermissionPipe, decorators: [{
|
|
48
|
+
type: Pipe,
|
|
49
|
+
args: [{
|
|
50
|
+
name: 'hasPermission',
|
|
51
|
+
pure: false,
|
|
52
|
+
}]
|
|
53
|
+
}], ctorParameters: () => [{ type: i1.PermissionsService }, { type: i0.ChangeDetectorRef }] });
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzLXBlcm1pc3Npb24ucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjp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AgICBpZiAodGhpcy5sYXN0UGVybWlzc2lvbnMgIT09IHJlcXVpcmVkUGVybWlzc2lvbnNTdHJpbmcpIHtcbiAgICAgICAgICAgIHRoaXMubGFzdFBlcm1pc3Npb25zID0gcmVxdWlyZWRQZXJtaXNzaW9uc1N0cmluZztcbiAgICAgICAgICAgIHRoaXMuaGFzUGVybWlzc2lvbiA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5kaXNwb3NlKCk7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbiA9IHRoaXMucGVybWlzc2lvbnNTZXJ2aWNlLmN1cnJlbnRVc2VyUGVybWlzc2lvbnMkLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5oYXNQZXJtaXNzaW9uID0gdGhpcy5wZXJtaXNzaW9uc1NlcnZpY2UudXNlckhhc1Blcm1pc3Npb25zKHJlcXVpcmVkUGVybWlzc2lvbnMpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2hhbmdlRGV0ZWN0b3JSZWYubWFya0ZvckNoZWNrKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmhhc1Blcm1pc3Npb247XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuZGlzcG9zZSgpO1xuICAgIH1cblxuICAgIHByaXZhdGUgZGlzcG9zZSgpIHtcbiAgICAgICAgaWYgKHRoaXMuc3Vic2NyaXB0aW9uKSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../../data/providers/data.service";
|
|
4
|
+
/**
|
|
5
|
+
* Used by locale-aware pipes to handle the task of getting the active languageCode
|
|
6
|
+
* of the UI and cleaning up.
|
|
7
|
+
*/
|
|
8
|
+
export class LocaleBasePipe {
|
|
9
|
+
constructor(dataService, changeDetectorRef) {
|
|
10
|
+
if (dataService && changeDetectorRef) {
|
|
11
|
+
this.subscription = dataService.client
|
|
12
|
+
.uiState()
|
|
13
|
+
.mapStream(data => data.uiState)
|
|
14
|
+
.subscribe(({ language, locale }) => {
|
|
15
|
+
this.locale = language.replace(/_/g, '-');
|
|
16
|
+
if (locale) {
|
|
17
|
+
this.locale += `-${locale}`;
|
|
18
|
+
}
|
|
19
|
+
changeDetectorRef.markForCheck();
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
ngOnDestroy() {
|
|
24
|
+
if (this.subscription) {
|
|
25
|
+
this.subscription.unsubscribe();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns the active locale after attempting to ensure that the locale string
|
|
30
|
+
* is valid for the Intl API.
|
|
31
|
+
*/
|
|
32
|
+
getActiveLocale(localeOverride) {
|
|
33
|
+
const locale = typeof localeOverride === 'string' ? localeOverride : this.locale ?? 'en';
|
|
34
|
+
const hyphenated = locale?.replace(/_/g, '-');
|
|
35
|
+
// Check for a double-region string, containing 2 region codes like
|
|
36
|
+
// pt-BR-BR, which is invalid. In this case, the second region is used
|
|
37
|
+
// and the first region discarded. This would only ever be an issue for
|
|
38
|
+
// those languages where the translation file itself encodes the region,
|
|
39
|
+
// as in pt_BR & pt_PT.
|
|
40
|
+
const matches = hyphenated?.match(/^([a-zA-Z_-]+)(-[A-Z][A-Z])(-[A-Z][A-z])$/);
|
|
41
|
+
if (matches?.length) {
|
|
42
|
+
const overriddenLocale = matches[1] + matches[3];
|
|
43
|
+
return overriddenLocale;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return hyphenated;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleBasePipe, deps: [{ token: i1.DataService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
50
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleBasePipe }); }
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleBasePipe, decorators: [{
|
|
53
|
+
type: Injectable
|
|
54
|
+
}], ctorParameters: () => [{ type: i1.DataService }, { type: i0.ChangeDetectorRef }] });
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxlLWJhc2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL3BpcGVzL2xvY2FsZS1iYXNlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFxQixVQUFVLEVBQTRCLE1BQU0sZUFBZSxDQUFDOzs7QUFLeEY7OztHQUdHO0FBRUgsTUFBTSxPQUFnQixjQUFjO0lBSWhDLFlBQXNCLFdBQXlCLEVBQUUsaUJBQXFDO1FBQ2xGLElBQUksV0FBVyxJQUFJLGlCQUFpQixFQUFFLENBQUM7WUFDbkMsSUFBSSxDQUFDLFlBQVksR0FBRyxXQUFXLENBQUMsTUFBTTtpQkFDakMsT0FBTyxFQUFFO2lCQUNULFNBQVMsQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7aUJBQy9CLFNBQVMsQ0FBQyxDQUFDLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxFQUFFLEVBQUU7Z0JBQ2hDLElBQUksQ0FBQyxNQUFNLEdBQU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2
|
+
import { LocaleBasePipe } from './locale-base.pipe';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../data/providers/data.service";
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* Displays a human-readable name for a given ISO 4217 currency code.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```HTML
|
|
11
|
+
* {{ order.currencyCode | localeCurrencyName }}
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @docsCategory pipes
|
|
15
|
+
*/
|
|
16
|
+
export class LocaleCurrencyNamePipe extends LocaleBasePipe {
|
|
17
|
+
constructor(dataService, changeDetectorRef) {
|
|
18
|
+
super(dataService, changeDetectorRef);
|
|
19
|
+
}
|
|
20
|
+
transform(value, display = 'full', locale) {
|
|
21
|
+
if (value == null || value === '') {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
if (typeof value !== 'string') {
|
|
25
|
+
return `Invalid currencyCode "${value}"`;
|
|
26
|
+
}
|
|
27
|
+
let name = '';
|
|
28
|
+
let symbol = '';
|
|
29
|
+
const activeLocale = this.getActiveLocale(locale);
|
|
30
|
+
if (display === 'full' || display === 'name') {
|
|
31
|
+
name =
|
|
32
|
+
new Intl.DisplayNames([activeLocale], {
|
|
33
|
+
type: 'currency',
|
|
34
|
+
}).of(value) ?? '';
|
|
35
|
+
}
|
|
36
|
+
if (display === 'full' || display === 'symbol') {
|
|
37
|
+
const parts = new Intl.NumberFormat(activeLocale, {
|
|
38
|
+
style: 'currency',
|
|
39
|
+
currency: value,
|
|
40
|
+
currencyDisplay: 'symbol',
|
|
41
|
+
}).formatToParts();
|
|
42
|
+
symbol = parts.find(p => p.type === 'currency')?.value || value;
|
|
43
|
+
}
|
|
44
|
+
return display === 'full' ? `${name} (${symbol})` : display === 'name' ? name : symbol;
|
|
45
|
+
}
|
|
46
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleCurrencyNamePipe, deps: [{ token: i1.DataService, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
47
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: LocaleCurrencyNamePipe, name: "localeCurrencyName", pure: false }); }
|
|
48
|
+
}
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleCurrencyNamePipe, decorators: [{
|
|
50
|
+
type: Pipe,
|
|
51
|
+
args: [{
|
|
52
|
+
name: 'localeCurrencyName',
|
|
53
|
+
pure: false,
|
|
54
|
+
}]
|
|
55
|
+
}], ctorParameters: () => [{ type: i1.DataService, decorators: [{
|
|
56
|
+
type: Optional
|
|
57
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
58
|
+
type: Optional
|
|
59
|
+
}] }] });
|
|
60
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxlLWN1cnJlbmN5LW5hbWUucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL3BpcGVzL2xvY2FsZS1jdXJyZW5jeS1uYW1lLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFxQixRQUFRLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQztBQUlqRixPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7OztBQUVwRDs7Ozs7Ozs7OztHQVVHO0FBS0gsTUFBTSxPQUFPLHNCQUF1QixTQUFRLGNBQWM7SUFDdEQsWUFBd0IsV0FBeUIsRUFBYyxpQkFBcUM7UUFDaEcsS0FBSyxDQUFDLFdB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AnbmFtZScpIHtcbiAgICAgICAgICAgIG5hbWUgPVxuICAgICAgICAgICAgICAgIG5ldyBJbnRsLkRpc3BsYXlOYW1lcyhbYWN0aXZlTG9jYWxlXSwge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnY3VycmVuY3knLFxuICAgICAgICAgICAgICAgIH0pLm9mKHZhbHVlKSA/PyAnJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoZGlzcGxheSA9PT0gJ2Z1bGwnIHx8IGRpc3BsYXkgPT09ICdzeW1ib2wnKSB7XG4gICAgICAgICAgICBjb25zdCBwYXJ0cyA9IChcbiAgICAgICAgICAgICAgICBuZXcgSW50bC5OdW1iZXJGb3JtYXQoYWN0aXZlTG9jYWxlLCB7XG4gICAgICAgICAgICAgICAgICAgIHN0eWxlOiAnY3VycmVuY3knLFxuICAgICAgICAgICAgICAgICAgICBjdXJyZW5jeTogdmFsdWUsXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbmN5RGlzcGxheTogJ3N5bWJvbCcsXG4gICAgICAgICAgICAgICAgfSkgYXMgYW55XG4gICAgICAgICAgICApLmZvcm1hdFRvUGFydHMoKTtcblxuICAgICAgICAgICAgc3ltYm9sID0gcGFydHMuZmluZChwID0+IHAudHlwZSA9PT0gJ2N1cnJlbmN5Jyk/LnZhbHVlIHx8IHZhbHVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBkaXNwbGF5ID09PSAnZnVsbCcgPyBgJHtuYW1lfSAoJHtzeW1ib2x9KWAgOiBkaXNwbGF5ID09PSAnbmFtZScgPyBuYW1lIDogc3ltYm9sO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Optional, Pipe } from '@angular/core';
|
|
2
|
+
import { LocaleBasePipe } from './locale-base.pipe';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../providers/currency/currency.service";
|
|
5
|
+
import * as i2 from "../../data/providers/data.service";
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* Formats a Deenruv monetary value (in cents) into the correct format for the configured currency and display
|
|
9
|
+
* locale.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```HTML
|
|
13
|
+
* {{ variant.priceWithTax | localeCurrency }}
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @docsCategory pipes
|
|
17
|
+
*/
|
|
18
|
+
export class LocaleCurrencyPipe extends LocaleBasePipe {
|
|
19
|
+
constructor(currencyService, dataService, changeDetectorRef) {
|
|
20
|
+
super(dataService, changeDetectorRef);
|
|
21
|
+
this.currencyService = currencyService;
|
|
22
|
+
}
|
|
23
|
+
transform(value, ...args) {
|
|
24
|
+
const [currencyCode, locale] = args;
|
|
25
|
+
if (typeof value === 'number') {
|
|
26
|
+
const activeLocale = this.getActiveLocale(locale);
|
|
27
|
+
const majorUnits = this.currencyService.toMajorUnits(value);
|
|
28
|
+
try {
|
|
29
|
+
return new Intl.NumberFormat(activeLocale, {
|
|
30
|
+
style: 'currency',
|
|
31
|
+
currency: currencyCode,
|
|
32
|
+
minimumFractionDigits: this.currencyService.precision,
|
|
33
|
+
maximumFractionDigits: this.currencyService.precision,
|
|
34
|
+
}).format(majorUnits);
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
return majorUnits.toFixed(this.currencyService.precision);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleCurrencyPipe, deps: [{ token: i1.CurrencyService }, { token: i2.DataService, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
43
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: LocaleCurrencyPipe, name: "localeCurrency", pure: false }); }
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleCurrencyPipe, decorators: [{
|
|
46
|
+
type: Pipe,
|
|
47
|
+
args: [{
|
|
48
|
+
name: 'localeCurrency',
|
|
49
|
+
pure: false,
|
|
50
|
+
}]
|
|
51
|
+
}], ctorParameters: () => [{ type: i1.CurrencyService }, { type: i2.DataService, decorators: [{
|
|
52
|
+
type: Optional
|
|
53
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
54
|
+
type: Optional
|
|
55
|
+
}] }] });
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxlLWN1cnJlbmN5LnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9waXBlcy9sb2NhbGUtY3VycmVuY3kucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXFCLFFBQVEsRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBS2pGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQzs7OztBQUVwRDs7Ozs7Ozs7Ozs7R0FXRztBQUtILE1BQU0sT0FBTyxrQkFBbUIsU0FBUSxjQUFjO0lBRWxELFlBQ1ksZUFBZ0MsRUFDNUIsV0FBeUIsRUFDekIsaUJBQXFDO1FBRWpELEtBQUssQ0FBQyxXQUFXLEVBQUUsaUJBQWlCLENBQUMsQ0FBQztRQUo5QixvQkFBZSxHQUFmLGVBQWUsQ0FBaUI7SUFLNUMsQ0FBQztJQUVELFNBQVMsQ0FBQyxLQUFjLEVBQUUsR0FBRyxJQUFlO1FBQ3hDLE1BQU0sQ0FBQyxZQUFZLEVBQUUsTUFBTSxDQUFD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XhlZCh0aGlzLmN1cnJlbmN5U2VydmljZS5wcmVjaXNpb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Optional, Pipe } from '@angular/core';
|
|
2
|
+
import { LocaleBasePipe } from './locale-base.pipe';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../data/providers/data.service";
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* A replacement of the Angular DatePipe which makes use of the Intl API
|
|
8
|
+
* to format dates according to the selected UI language.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```HTML
|
|
12
|
+
* {{ order.orderPlacedAt | localeDate }}
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @docsCategory pipes
|
|
16
|
+
*/
|
|
17
|
+
export class LocaleDatePipe extends LocaleBasePipe {
|
|
18
|
+
constructor(dataService, changeDetectorRef) {
|
|
19
|
+
super(dataService, changeDetectorRef);
|
|
20
|
+
}
|
|
21
|
+
transform(value, ...args) {
|
|
22
|
+
const [format, locale] = args;
|
|
23
|
+
if (this.locale || typeof locale === 'string') {
|
|
24
|
+
const activeLocale = this.getActiveLocale(locale);
|
|
25
|
+
const date = value instanceof Date ? value : typeof value === 'string' ? new Date(value) : undefined;
|
|
26
|
+
if (date) {
|
|
27
|
+
const options = this.getOptionsForFormat(typeof format === 'string' ? format : 'medium');
|
|
28
|
+
return new Intl.DateTimeFormat(activeLocale, options).format(date);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
getOptionsForFormat(dateFormat) {
|
|
33
|
+
switch (dateFormat) {
|
|
34
|
+
case 'medium':
|
|
35
|
+
return {
|
|
36
|
+
month: 'short',
|
|
37
|
+
year: 'numeric',
|
|
38
|
+
day: 'numeric',
|
|
39
|
+
hour: 'numeric',
|
|
40
|
+
minute: 'numeric',
|
|
41
|
+
second: 'numeric',
|
|
42
|
+
hour12: true,
|
|
43
|
+
};
|
|
44
|
+
case 'mediumTime':
|
|
45
|
+
return {
|
|
46
|
+
hour: 'numeric',
|
|
47
|
+
minute: 'numeric',
|
|
48
|
+
second: 'numeric',
|
|
49
|
+
hour12: true,
|
|
50
|
+
};
|
|
51
|
+
case 'longDate':
|
|
52
|
+
return {
|
|
53
|
+
year: 'numeric',
|
|
54
|
+
month: 'long',
|
|
55
|
+
day: 'numeric',
|
|
56
|
+
};
|
|
57
|
+
case 'shortDate':
|
|
58
|
+
return {
|
|
59
|
+
day: 'numeric',
|
|
60
|
+
month: 'numeric',
|
|
61
|
+
year: '2-digit',
|
|
62
|
+
};
|
|
63
|
+
case 'short':
|
|
64
|
+
return {
|
|
65
|
+
day: 'numeric',
|
|
66
|
+
month: 'numeric',
|
|
67
|
+
year: '2-digit',
|
|
68
|
+
hour: 'numeric',
|
|
69
|
+
minute: 'numeric',
|
|
70
|
+
hour12: true,
|
|
71
|
+
};
|
|
72
|
+
default:
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleDatePipe, deps: [{ token: i1.DataService, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
77
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: LocaleDatePipe, name: "localeDate", pure: false }); }
|
|
78
|
+
}
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleDatePipe, decorators: [{
|
|
80
|
+
type: Pipe,
|
|
81
|
+
args: [{
|
|
82
|
+
name: 'localeDate',
|
|
83
|
+
pure: false,
|
|
84
|
+
}]
|
|
85
|
+
}], ctorParameters: () => [{ type: i1.DataService, decorators: [{
|
|
86
|
+
type: Optional
|
|
87
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
88
|
+
type: Optional
|
|
89
|
+
}] }] });
|
|
90
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxlLWRhdGUucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL3BpcGVzL2xvY2FsZS1kYXRlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFxQixRQUFRLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQztBQUlqRixPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7OztBQUVwRDs7Ozs7Ozs7Ozs7R0FXRztBQUtILE1BQU0sT0FBTyxjQUFlLFNBQVEsY0FBYztJQUM5QyxZQUF3QixXQUF5QixFQUFjLGlCQUFxQztRQUNoRyxLQUFLLENBQUMsV0FBVyxFQUFFLGlCQUFpQixDQUFDLENBQUM7SUFDMUMsQ0FBQztJQUNELFNBQVMsQ0FBQyxLQUFjLEVBQUUsR0FBRyxJQUFlO1FBQ3hDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLEdBQUcsSUFBSSxDQUFDO1FBQzlCLElBQUksSUFBSSxDQUFDLE1BQU0sSUFBSSxPQUFPLE1BQU0sS0FBSyxRQUFRLEVBQUUsQ0FBQztZQUM1QyxNQUFNLFlBQVksR0FBRyxJQUFJLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FBQyxDQUFDO1lBQ2xELE1BQU0sSUFBSSxHQUNOLEtBQUssWUFBWSxJQUFJLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsT0FBTyxLQUFLLEt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Bjb25zdCBvcHRpb25zID0gdGhpcy5nZXRPcHRpb25zRm9yRm9ybWF0KHR5cGVvZiBmb3JtYXQgPT09ICdzdHJpbmcnID8gZm9ybWF0IDogJ21lZGl1bScpO1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgSW50bC5EYXRlVGltZUZvcm1hdChhY3RpdmVMb2NhbGUsIG9wdGlvbnMpLmZvcm1hdChkYXRlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZ2V0T3B0aW9uc0ZvckZvcm1hdChkYXRlRm9ybWF0OiBzdHJpbmcpOiBJbnRsLkRhdGVUaW1lRm9ybWF0T3B0aW9ucyB8IHVuZGVmaW5lZCB7XG4gICAgICAgIHN3aXRjaCAoZGF0ZUZvcm1hdCkge1xuICAgICAgICAgICAgY2FzZSAnbWVkaXVtJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBtb250aDogJ3Nob3J0JyxcbiAgICAgICAgICAgICAgICAgICAgeWVhcjogJ251bWVyaWMnLFxuICAgICAgICAgICAgICAgICAgICBkYXk6ICdudW1lcmljJyxcbiAgICAgICAgICAgICAgICAgICAgaG91cjogJ251bWVyaWMnLFxuICAgICAgICAgICAgICAgICAgICBtaW51dGU6ICdudW1lcmljJyxcbiAgICAgICAgICAgICAgICAgICAgc2Vjb25kOiAnbnVtZXJpYycsXG4gICAgICAgICAgICAgICAgICAgIGhvdXIxMjogdHJ1ZSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnbWVkaXVtVGltZSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgaG91cjogJ251bWVyaWMnLFxuICAgICAgICAgICAgICAgICAgICBtaW51dGU6ICdudW1lcmljJyxcbiAgICAgICAgICAgICAgICAgICAgc2Vjb25kOiAnbnVtZXJpYycsXG4gICAgICAgICAgICAgICAgICAgIGhvdXIxMjogdHJ1ZSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnbG9uZ0RhdGUnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHllYXI6ICdudW1lcmljJyxcbiAgICAgICAgICAgICAgICAgICAgbW9udGg6ICdsb25nJyxcbiAgICAgICAgICAgICAgICAgICAgZGF5OiAnbnVtZXJpYycsXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ3Nob3J0RGF0ZSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZGF5OiAnbnVtZXJpYycsXG4gICAgICAgICAgICAgICAgICAgIG1vbnRoOiAnbnVtZXJpYycsXG4gICAgICAgICAgICAgICAgICAgIHllYXI6ICcyLWRpZ2l0JyxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnc2hvcnQnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGRheTogJ251bWVyaWMnLFxuICAgICAgICAgICAgICAgICAgICBtb250aDogJ251bWVyaWMnLFxuICAgICAgICAgICAgICAgICAgICB5ZWFyOiAnMi1kaWdpdCcsXG4gICAgICAgICAgICAgICAgICAgIGhvdXI6ICdudW1lcmljJyxcbiAgICAgICAgICAgICAgICAgICAgbWludXRlOiAnbnVtZXJpYycsXG4gICAgICAgICAgICAgICAgICAgIGhvdXIxMjogdHJ1ZSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Optional, Pipe } from '@angular/core';
|
|
2
|
+
import { LocaleBasePipe } from './locale-base.pipe';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../data/providers/data.service";
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* Displays a human-readable name for a given ISO 639-1 language code.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```HTML
|
|
11
|
+
* {{ 'zh_Hant' | localeLanguageName }}
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @docsCategory pipes
|
|
15
|
+
*/
|
|
16
|
+
export class LocaleLanguageNamePipe extends LocaleBasePipe {
|
|
17
|
+
constructor(dataService, changeDetectorRef) {
|
|
18
|
+
super(dataService, changeDetectorRef);
|
|
19
|
+
}
|
|
20
|
+
transform(value, locale) {
|
|
21
|
+
if (value == null || value === '') {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
if (typeof value !== 'string') {
|
|
25
|
+
return `Invalid language code "${value}"`;
|
|
26
|
+
}
|
|
27
|
+
const activeLocale = this.getActiveLocale(locale);
|
|
28
|
+
// Awaiting TS types for this API: https://github.com/microsoft/TypeScript/pull/44022/files
|
|
29
|
+
const DisplayNames = Intl.DisplayNames;
|
|
30
|
+
try {
|
|
31
|
+
return new DisplayNames([activeLocale.replace('_', '-')], { type: 'language' }).of(value.replace('_', '-'));
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleLanguageNamePipe, deps: [{ token: i1.DataService, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
38
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: LocaleLanguageNamePipe, name: "localeLanguageName", pure: false }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleLanguageNamePipe, decorators: [{
|
|
41
|
+
type: Pipe,
|
|
42
|
+
args: [{
|
|
43
|
+
name: 'localeLanguageName',
|
|
44
|
+
pure: false,
|
|
45
|
+
}]
|
|
46
|
+
}], ctorParameters: () => [{ type: i1.DataService, decorators: [{
|
|
47
|
+
type: Optional
|
|
48
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
49
|
+
type: Optional
|
|
50
|
+
}] }] });
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxlLWxhbmd1YWdlLW5hbWUucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL3BpcGVzL2xvY2FsZS1sYW5ndWFnZS1uYW1lLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFxQixRQUFRLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQztBQUlqRixPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7OztBQUVwRDs7Ozs7Ozs7OztHQVVHO0FBS0gsTUFBTSxPQUFPLHNCQUF1QixTQUFRLGNBQWM7SUFDdEQsWUFBd0IsV0FBeUIsRUFBYyxpQkFBcUM7UUFDaEcsS0FBSyxDQUFDLFdBQVcsRUFBRSxpQkFBaUIsQ0FBQyxDQUFDO0lBQzFDLENBQUM7SUFDRCxTQUFTLENBQUMsS0FBVSxFQUFFLE1BQWdCO1FBQ2xDLElBQUksS0FBSyxJQUFJLElBQUksSUFBSSxLQUFLLEtBQUssRUFBRSxFQUFFLENBQUM7WUFDaEMsT0FBTyxFQUFFLENBQUM7UUFDZCxDQUFDO1FBQ0QsSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUUsQ0FBQztZQUM1QixPQUFPLDBCQUEwQixLQUFZLE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FsZSk7XG5cbiAgICAgICAgLy8gQXdhaXRpbmcgVFMgdHlwZXMgZm9yIHRoaXMgQVBJOiBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvcHVsbC80NDAyMi9maWxlc1xuICAgICAgICBjb25zdCBEaXNwbGF5TmFtZXMgPSAoSW50bCBhcyBhbnkpLkRpc3BsYXlOYW1lcztcblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBEaXNwbGF5TmFtZXMoW2FjdGl2ZUxvY2FsZS5yZXBsYWNlKCdfJywgJy0nKV0sIHsgdHlwZTogJ2xhbmd1YWdlJyB9KS5vZihcbiAgICAgICAgICAgICAgICB2YWx1ZS5yZXBsYWNlKCdfJywgJy0nKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGU6IGFueSkge1xuICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Optional, Pipe } from '@angular/core';
|
|
2
|
+
import { LocaleBasePipe } from './locale-base.pipe';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../data/providers/data.service";
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* Displays a human-readable name for a given region.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```HTML
|
|
11
|
+
* {{ 'GB' | localeRegionName }}
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @docsCategory pipes
|
|
15
|
+
*/
|
|
16
|
+
export class LocaleRegionNamePipe extends LocaleBasePipe {
|
|
17
|
+
constructor(dataService, changeDetectorRef) {
|
|
18
|
+
super(dataService, changeDetectorRef);
|
|
19
|
+
}
|
|
20
|
+
transform(value, locale) {
|
|
21
|
+
if (value == null || value === '') {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
if (typeof value !== 'string') {
|
|
25
|
+
return `Invalid region code "${value}"`;
|
|
26
|
+
}
|
|
27
|
+
const activeLocale = this.getActiveLocale(locale);
|
|
28
|
+
// Awaiting TS types for this API: https://github.com/microsoft/TypeScript/pull/44022/files
|
|
29
|
+
const DisplayNames = Intl.DisplayNames;
|
|
30
|
+
try {
|
|
31
|
+
return new DisplayNames([activeLocale.replace('_', '-')], { type: 'region' }).of(value.replace('_', '-'));
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleRegionNamePipe, deps: [{ token: i1.DataService, optional: true }, { token: i0.ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
38
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: LocaleRegionNamePipe, name: "localeRegionName", pure: false }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleRegionNamePipe, decorators: [{
|
|
41
|
+
type: Pipe,
|
|
42
|
+
args: [{
|
|
43
|
+
name: 'localeRegionName',
|
|
44
|
+
pure: false,
|
|
45
|
+
}]
|
|
46
|
+
}], ctorParameters: () => [{ type: i1.DataService, decorators: [{
|
|
47
|
+
type: Optional
|
|
48
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
49
|
+
type: Optional
|
|
50
|
+
}] }] });
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxlLXJlZ2lvbi1uYW1lLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3N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ICAgcmV0dXJuIHZhbHVlO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Formats a string into sentence case (first letter of first word uppercase).
|
|
5
|
+
*/
|
|
6
|
+
export class SentenceCasePipe {
|
|
7
|
+
transform(value) {
|
|
8
|
+
if (typeof value === 'string') {
|
|
9
|
+
let lower;
|
|
10
|
+
if (isCamelCase(value)) {
|
|
11
|
+
lower = value.replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase();
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
lower = value.toLowerCase();
|
|
15
|
+
}
|
|
16
|
+
return lower.charAt(0).toUpperCase() + lower.slice(1);
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SentenceCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
21
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SentenceCasePipe, name: "sentenceCase" }); }
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SentenceCasePipe, decorators: [{
|
|
24
|
+
type: Pipe,
|
|
25
|
+
args: [{ name: 'sentenceCase' }]
|
|
26
|
+
}] });
|
|
27
|
+
function isCamelCase(value) {
|
|
28
|
+
return /^[a-zA-Z]+[A-Z][a-zA-Z]+$/.test(value);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VudGVuY2UtY2FzZS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsi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UGlwZSwgUGlwZVRyYW5zZm9ybSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG4vKipcbiAqIEZvcm1hdHMgYSBzdHJpbmcgaW50byBzZW50ZW5jZSBjYXNlIChmaXJzdCBsZXR0ZXIgb2YgZmlyc3Qgd29yZCB1cHBlcmNhc2UpLlxuICovXG5AUGlwZSh7IG5hbWU6ICdzZW50ZW5jZUNhc2UnIH0pXG5leHBvcnQgY2xhc3MgU2VudGVuY2VDYXNlUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xuICAgIHRyYW5zZm9ybSh2YWx1ZTogYW55KTogYW55IHtcbiAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGxldCBsb3dlcjogc3RyaW5nO1xuICAgICAgICAgICAgaWYgKGlzQ2FtZWxDYXNlKHZhbHVlKSkge1xuICAgICAgICAgICAgICAgIGxvd2VyID0gdmFsdWUucmVwbGFjZSgvKFthLXpdKShbQS1aXSkvZywgJyQxICQyJykudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG93ZXIgPSB2YWx1ZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGxvd2VyLmNoYXJBdCgwKS50b1VwcGVyQ2FzZSgpICsgbG93ZXIuc2xpY2UoMSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gaXNDYW1lbENhc2UodmFsdWU6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgIHJldHVybiAvXlthLXpBLVpdK1tBLVpdW2EtekEtWl0rJC8udGVzdCh2YWx1ZSk7XG59XG4iXX0=
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* A pipe for sorting elements of an array. Should be used with caution due to the
|
|
5
|
+
* potential for perf degredation. Ideally should only be used on small arrays (< 10s of items)
|
|
6
|
+
* and in components using OnPush change detection.
|
|
7
|
+
*/
|
|
8
|
+
export class SortPipe {
|
|
9
|
+
transform(value, orderByProp) {
|
|
10
|
+
return value.slice().sort((a, b) => {
|
|
11
|
+
const aProp = orderByProp ? a[orderByProp] : a;
|
|
12
|
+
const bProp = orderByProp ? b[orderByProp] : b;
|
|
13
|
+
if (aProp === bProp) {
|
|
14
|
+
return 0;
|
|
15
|
+
}
|
|
16
|
+
if (aProp == null) {
|
|
17
|
+
return 1;
|
|
18
|
+
}
|
|
19
|
+
if (bProp == null) {
|
|
20
|
+
return -1;
|
|
21
|
+
}
|
|
22
|
+
return aProp > bProp ? 1 : -1;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SortPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
26
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SortPipe, name: "sort" }); }
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SortPipe, decorators: [{
|
|
29
|
+
type: Pipe,
|
|
30
|
+
args: [{
|
|
31
|
+
name: 'sort',
|
|
32
|
+
}]
|
|
33
|
+
}] });
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydC5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvcGlwZXMvc29ydC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwc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gICAgIH1cbiAgICAgICAgICAgIHJldHVybiBhUHJvcCA+IGJQcm9wID8gMSA6IC0xO1xuICAgICAgICB9KTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class StateI18nTokenPipe {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.stateI18nTokens = {
|
|
7
|
+
Created: _('state.created'),
|
|
8
|
+
Draft: _('state.draft'),
|
|
9
|
+
AddingItems: _('state.adding-items'),
|
|
10
|
+
ArrangingPayment: _('state.arranging-payment'),
|
|
11
|
+
PaymentAuthorized: _('state.payment-authorized'),
|
|
12
|
+
PaymentSettled: _('state.payment-settled'),
|
|
13
|
+
PartiallyShipped: _('state.partially-shipped'),
|
|
14
|
+
Shipped: _('state.shipped'),
|
|
15
|
+
PartiallyDelivered: _('state.partially-delivered'),
|
|
16
|
+
Authorized: _('state.authorized'),
|
|
17
|
+
Delivered: _('state.delivered'),
|
|
18
|
+
Cancelled: _('state.cancelled'),
|
|
19
|
+
Pending: _('state.pending'),
|
|
20
|
+
Settled: _('state.settled'),
|
|
21
|
+
Failed: _('state.failed'),
|
|
22
|
+
Error: _('state.error'),
|
|
23
|
+
Declined: _('state.declined'),
|
|
24
|
+
Modifying: _('state.modifying'),
|
|
25
|
+
ArrangingAdditionalPayment: _('state.arranging-additional-payment'),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
transform(value) {
|
|
29
|
+
if (typeof value === 'string' && value.length) {
|
|
30
|
+
const defaultStateToken = this.stateI18nTokens[value];
|
|
31
|
+
if (defaultStateToken) {
|
|
32
|
+
return defaultStateToken;
|
|
33
|
+
}
|
|
34
|
+
return getOrderStateTranslationToken(value);
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StateI18nTokenPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
39
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: StateI18nTokenPipe, name: "stateI18nToken" }); }
|
|
40
|
+
}
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StateI18nTokenPipe, decorators: [{
|
|
42
|
+
type: Pipe,
|
|
43
|
+
args: [{
|
|
44
|
+
name: 'stateI18nToken',
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
export function getOrderStateTranslationToken(state) {
|
|
48
|
+
return ('state.' +
|
|
49
|
+
state
|
|
50
|
+
.replace(/([a-z])([A-Z])/g, '$1-$2')
|
|
51
|
+
.replace(/ +/g, '-')
|
|
52
|
+
.toLowerCase());
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGUtaTE4bi10b2tlbi5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvcGlwZXMvc3RhdGUtaTE4bi10b2tlbi5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBQ3BELE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQyxFQUFFLE1BQU0seUNBQXlDLENBQUM7O0FBS3RFLE1BQU0sT0FBTyxrQkFBa0I7SUFIL0I7UUFJcUIsb0JBQWUsR0FBRztZQUMvQixPQUFPLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQztZQUMzQixLQUFLLEVBQUUsQ0FBQy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biAgICB0cmFuc2Zvcm08VD4odmFsdWU6IFQpOiBUIHtcbiAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycgJiYgdmFsdWUubGVuZ3RoKSB7XG4gICAgICAgICAgICBjb25zdCBkZWZhdWx0U3RhdGVUb2tlbiA9IHRoaXMuc3RhdGVJMThuVG9rZW5zW3ZhbHVlIGFzIGFueV07XG4gICAgICAgICAgICBpZiAoZGVmYXVsdFN0YXRlVG9rZW4pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmYXVsdFN0YXRlVG9rZW47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0T3JkZXJTdGF0ZVRyYW5zbGF0aW9uVG9rZW4odmFsdWUgYXMgc3RyaW5nKSBhcyBUO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRPcmRlclN0YXRlVHJhbnNsYXRpb25Ub2tlbihzdGF0ZTogc3RyaW5nKTogc3RyaW5nIHtcbiAgICByZXR1cm4gKFxuICAgICAgICAnc3RhdGUuJyArXG4gICAgICAgIHN0YXRlXG4gICAgICAgICAgICAucmVwbGFjZSgvKFthLXpdKShbQS1aXSkvZywgJyQxLSQyJylcbiAgICAgICAgICAgIC5yZXBsYWNlKC8gKy9nLCAnLScpXG4gICAgICAgICAgICAudG9Mb3dlckNhc2UoKVxuICAgICk7XG59XG4iXX0=
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import { stringToColor } from '../../common/utilities/string-to-color';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class StringToColorPipe {
|
|
5
|
+
transform(value) {
|
|
6
|
+
return stringToColor(value);
|
|
7
|
+
}
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StringToColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: StringToColorPipe, name: "stringToColor" }); }
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StringToColorPipe, decorators: [{
|
|
12
|
+
type: Pipe,
|
|
13
|
+
args: [{
|
|
14
|
+
name: 'stringToColor',
|
|
15
|
+
pure: true,
|
|
16
|
+
}]
|
|
17
|
+
}] });
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nLXRvLWNvbG9yLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9waXBlcy9zdHJpbmctdG8tY29sb3IucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQztBQUVwRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sd0NBQXdDLENBQUM7O0FBTXZFLE1BQU0sT0FBTyxpQkFBaUI7SUFDMUIsU0FBUyxDQUFDLEtBQVU7UUFDaEIsT0FBTyxhQUFhLENBQUMsS0FBSyxDQUFDLENBQUM7SUFDaEMsQ0FBQzsrR0FIUSxpQkFBaUI7NkdBQWpCLGlCQUFpQjs7NEZBQWpCLGlCQUFpQjtrQkFKN0IsSUFBSTttQkFBQztvQkFDRixJQUFJLEVBQUUsZUFBZTtvQkFDckIsSUFBSSxFQUFFLElBQUk7aUJBQ2IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG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