@vendure/admin-ui 1.4.7 → 2.0.0-next.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/catalog/catalog.module.d.ts +30 -0
- package/catalog/components/apply-facet-dialog/apply-facet-dialog.component.d.ts +5 -2
- package/catalog/components/asset-detail/asset-detail.component.d.ts +6 -4
- package/catalog/components/asset-list/asset-list.component.d.ts +5 -2
- package/catalog/components/{product-assets/product-assets.component.d.ts → assets/assets.component.d.ts} +7 -10
- package/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.d.ts +9 -7
- package/catalog/components/collection-contents/collection-contents.component.d.ts +5 -3
- package/catalog/components/collection-detail/collection-detail.component.d.ts +6 -3
- package/catalog/components/collection-list/collection-list.component.d.ts +6 -3
- package/catalog/components/collection-tree/collection-tree-node.component.d.ts +7 -3
- package/catalog/components/collection-tree/collection-tree.component.d.ts +10 -25
- 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 +5 -2
- package/catalog/components/facet-detail/facet-detail.component.d.ts +7 -4
- package/catalog/components/facet-list/facet-list.component.d.ts +6 -3
- package/catalog/components/generate-product-variants/generate-product-variants.component.d.ts +3 -0
- package/catalog/components/option-value-input/option-value-input.component.d.ts +3 -0
- package/catalog/components/product-detail/product-detail.component.d.ts +17 -37
- package/catalog/components/product-detail/product-detail.types.d.ts +26 -0
- package/catalog/components/product-list/product-list.component.d.ts +6 -3
- package/catalog/components/product-options-editor/product-options-editor.component.d.ts +9 -4
- package/catalog/components/product-search-input/product-search-input.component.d.ts +9 -4
- package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +5 -2
- package/catalog/components/product-variants-list/product-variants-list.component.d.ts +24 -17
- package/catalog/components/product-variants-table/product-variants-table.component.d.ts +24 -11
- package/catalog/components/update-product-option-dialog/update-product-option-dialog.component.d.ts +5 -2
- package/catalog/components/variant-price-detail/variant-price-detail.component.d.ts +3 -0
- package/catalog/package.json +5 -6
- package/catalog/providers/product-detail/product-detail.service.d.ts +214 -93
- package/catalog/providers/routing/asset-resolver.d.ts +5 -3
- package/catalog/providers/routing/collection-resolver.d.ts +5 -2
- package/catalog/providers/routing/facet-resolver.d.ts +5 -4
- package/catalog/providers/routing/product-resolver.d.ts +5 -2
- package/catalog/providers/routing/product-variants-resolver.d.ts +5 -2
- package/catalog/public_api.d.ts +4 -1
- package/catalog/vendure-admin-ui-catalog.d.ts +1 -0
- package/core/app.component.d.ts +3 -0
- package/core/app.component.module.d.ts +7 -0
- package/core/common/base-detail.component.d.ts +2 -2
- package/core/common/base-entity-resolver.d.ts +1 -1
- package/core/common/base-list.component.d.ts +10 -0
- package/core/common/generated-types.d.ts +12045 -4197
- package/core/common/utilities/flatten-facet-values.d.ts +2 -2
- package/core/common/version.d.ts +1 -1
- package/core/components/app-shell/app-shell.component.d.ts +3 -0
- package/core/components/breadcrumb/breadcrumb.component.d.ts +3 -0
- package/core/components/channel-switcher/channel-switcher.component.d.ts +3 -0
- package/core/components/main-nav/main-nav.component.d.ts +3 -0
- package/core/components/notification/notification.component.d.ts +3 -0
- package/core/components/overlay-host/overlay-host.component.d.ts +3 -0
- package/core/components/theme-switcher/theme-switcher.component.d.ts +3 -0
- package/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +4 -1
- package/core/components/user-menu/user-menu.component.d.ts +3 -0
- package/core/core.module.d.ts +18 -0
- package/core/data/client-state/client-defaults.d.ts +19 -7
- package/core/data/data.module.d.ts +6 -0
- package/core/data/definitions/administrator-definitions.d.ts +15 -15
- package/core/data/definitions/auth-definitions.d.ts +4 -4
- package/core/data/definitions/client-definitions.d.ts +16 -16
- package/core/data/definitions/collection-definitions.d.ts +9 -9
- package/core/data/definitions/customer-definitions.d.ts +22 -21
- package/core/data/definitions/facet-definitions.d.ts +10 -10
- package/core/data/definitions/order-definitions.d.ts +25 -25
- package/core/data/definitions/product-definitions.d.ts +44 -44
- package/core/data/definitions/promotion-definitions.d.ts +7 -7
- package/core/data/definitions/settings-definitions.d.ts +65 -65
- package/core/data/definitions/shared-definitions.d.ts +3 -3
- package/core/data/definitions/shipping-definitions.d.ts +9 -9
- package/core/data/providers/administrator-data.service.d.ts +15 -15
- package/core/data/providers/auth-data.service.d.ts +4 -3
- package/core/data/providers/base-data.service.d.ts +3 -0
- package/core/data/providers/client-data.service.d.ts +15 -14
- package/core/data/providers/collection-data.service.d.ts +11 -11
- package/core/data/providers/customer-data.service.d.ts +25 -24
- package/core/data/providers/data.service.d.ts +5 -2
- package/core/data/providers/facet-data.service.d.ts +12 -12
- package/core/data/providers/fetch-adapter.d.ts +3 -0
- package/core/data/providers/interceptor.d.ts +3 -0
- package/core/data/providers/order-data.service.d.ts +21 -21
- package/core/data/providers/product-data.service.d.ts +51 -51
- package/core/data/providers/promotion-data.service.d.ts +8 -8
- package/core/data/providers/settings-data.service.d.ts +52 -51
- package/core/data/providers/shipping-method-data.service.d.ts +12 -12
- package/core/data/query-result.d.ts +1 -1
- package/core/data/server-config.d.ts +5 -2
- package/core/package.json +5 -6
- package/core/providers/auth/auth.service.d.ts +5 -2
- package/core/providers/component-registry/component-registry.service.d.ts +3 -0
- package/core/providers/custom-detail-component/custom-detail-component.service.d.ts +3 -0
- package/core/providers/custom-field-component/custom-field-component.service.d.ts +3 -0
- package/core/providers/dashboard-widget/dashboard-widget.service.d.ts +3 -0
- package/core/providers/guard/auth.guard.d.ts +3 -0
- package/core/providers/health-check/health-check.service.d.ts +3 -0
- package/core/providers/i18n/custom-message-format-compiler.d.ts +3 -0
- package/core/providers/i18n/i18n.service.d.ts +3 -0
- package/core/providers/job-queue/job-queue.service.d.ts +3 -0
- package/core/providers/local-storage/local-storage.service.d.ts +3 -0
- package/core/providers/modal/modal.service.d.ts +4 -67
- package/core/providers/modal/modal.types.d.ts +67 -0
- package/core/providers/nav-builder/nav-builder.service.d.ts +3 -0
- package/core/providers/notification/notification.service.d.ts +3 -0
- package/core/providers/overlay-host/overlay-host.service.d.ts +3 -0
- package/core/public_api.d.ts +3 -0
- package/core/shared/components/action-bar/action-bar.component.d.ts +7 -0
- package/core/shared/components/action-bar-items/action-bar-items.component.d.ts +3 -0
- package/core/shared/components/address-form/address-form.component.d.ts +5 -2
- package/core/shared/components/affixed-input/affixed-input.component.d.ts +3 -0
- package/core/shared/components/affixed-input/percentage-suffix-input.component.d.ts +3 -0
- package/core/shared/components/asset-file-input/asset-file-input.component.d.ts +3 -0
- package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +46 -26
- 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 +7 -3
- package/core/shared/components/asset-preview/asset-preview.component.d.ts +5 -3
- package/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.d.ts +7 -5
- 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 +5 -2
- package/core/shared/components/channel-assignment-control/channel-assignment-control.component.d.ts +3 -0
- package/core/shared/components/channel-badge/channel-badge.component.d.ts +3 -0
- package/core/shared/components/chip/chip.component.d.ts +3 -0
- package/core/shared/components/configurable-input/configurable-input.component.d.ts +3 -0
- package/core/shared/components/currency-input/currency-input.component.d.ts +3 -0
- package/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.d.ts +3 -0
- package/core/shared/components/custom-field-control/custom-field-control.component.d.ts +3 -0
- package/core/shared/components/customer-label/customer-label.component.d.ts +5 -2
- package/core/shared/components/data-table/data-table-column.component.d.ts +3 -0
- package/core/shared/components/data-table/data-table.component.d.ts +3 -0
- package/core/shared/components/datetime-picker/datetime-picker.component.d.ts +3 -0
- package/core/shared/components/datetime-picker/datetime-picker.service.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown-item.directive.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown-menu.component.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown-trigger.directive.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown.component.d.ts +3 -0
- package/core/shared/components/edit-note-dialog/edit-note-dialog.component.d.ts +4 -1
- package/core/shared/components/empty-placeholder/empty-placeholder.component.d.ts +3 -0
- package/core/shared/components/entity-info/entity-info.component.d.ts +3 -0
- package/core/shared/components/extension-host/extension-host.component.d.ts +3 -0
- package/core/shared/components/extension-host/extension-host.service.d.ts +3 -0
- package/core/shared/components/facet-value-chip/facet-value-chip.component.d.ts +5 -2
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +8 -5
- package/core/shared/components/focal-point-control/focal-point-control.component.d.ts +3 -0
- package/core/shared/components/form-field/form-field-control.directive.d.ts +3 -0
- package/core/shared/components/form-field/form-field.component.d.ts +3 -0
- package/core/shared/components/form-item/form-item.component.d.ts +3 -0
- package/core/shared/components/formatted-address/formatted-address.component.d.ts +3 -0
- package/core/shared/components/help-tooltip/help-tooltip.component.d.ts +3 -0
- package/core/shared/components/history-entry-detail/history-entry-detail.component.d.ts +3 -0
- package/core/shared/components/items-per-page-controls/items-per-page-controls.component.d.ts +3 -0
- package/core/shared/components/labeled-data/labeled-data.component.d.ts +3 -0
- package/core/shared/components/language-selector/language-selector.component.d.ts +3 -0
- package/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.d.ts +6 -3
- package/core/shared/components/modal-dialog/dialog-buttons.directive.d.ts +3 -0
- package/core/shared/components/modal-dialog/dialog-component-outlet.component.d.ts +3 -0
- package/core/shared/components/modal-dialog/dialog-title.directive.d.ts +3 -0
- package/core/shared/components/modal-dialog/modal-dialog.component.d.ts +4 -1
- package/core/shared/components/object-tree/object-tree.component.d.ts +3 -0
- package/core/shared/components/order-state-label/order-state-label.component.d.ts +4 -1
- package/core/shared/components/pagination-controls/pagination-controls.component.d.ts +3 -0
- package/core/shared/components/product-selector/product-selector.component.d.ts +23 -13
- package/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.d.ts +4 -1
- package/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.d.ts +4 -1
- package/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.d.ts +3 -0
- package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +3 -0
- package/core/shared/components/select-toggle/select-toggle.component.d.ts +3 -0
- package/core/shared/components/simple-dialog/simple-dialog.component.d.ts +4 -1
- package/core/shared/components/status-badge/status-badge.component.d.ts +3 -0
- package/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.d.ts +3 -0
- package/core/shared/components/table-row-action/table-row-action.component.d.ts +3 -0
- package/core/shared/components/tag-selector/tag-selector.component.d.ts +3 -0
- package/core/shared/components/timeline-entry/timeline-entry.component.d.ts +3 -0
- package/core/shared/components/title-input/title-input.component.d.ts +3 -0
- package/core/shared/components/ui-extension-point/ui-extension-point.component.d.ts +3 -0
- package/core/shared/directives/disabled.directive.d.ts +3 -0
- package/core/shared/directives/if-default-channel-active.directive.d.ts +3 -0
- package/core/shared/directives/if-directive-base.d.ts +3 -0
- package/core/shared/directives/if-multichannel.directive.d.ts +3 -0
- package/core/shared/directives/if-permissions.directive.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.d.ts +7 -3
- package/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +5 -2
- package/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.d.ts +6 -3
- package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +1 -1
- package/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +6 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.d.ts +6 -2
- package/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.d.ts +7 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.d.ts +7 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.d.ts +7 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.d.ts +4 -1
- package/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.d.ts +3 -0
- package/core/shared/pipes/asset-preview.pipe.d.ts +3 -0
- package/core/shared/pipes/channel-label.pipe.d.ts +3 -0
- package/core/shared/pipes/custom-field-label.pipe.d.ts +3 -0
- package/core/shared/pipes/duration.pipe.d.ts +3 -0
- package/core/shared/pipes/file-size.pipe.d.ts +3 -0
- package/core/shared/pipes/has-permission.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-base.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-currency-name.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-currency.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-date.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-language-name.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-region-name.pipe.d.ts +3 -0
- package/core/shared/pipes/sentence-case.pipe.d.ts +3 -0
- package/core/shared/pipes/sort.pipe.d.ts +3 -0
- package/core/shared/pipes/state-i18n-token.pipe.d.ts +3 -0
- package/core/shared/pipes/string-to-color.pipe.d.ts +3 -0
- package/core/shared/pipes/time-ago.pipe.d.ts +3 -0
- package/core/shared/providers/routing/can-deactivate-detail-guard.d.ts +3 -0
- package/core/shared/shared.module.d.ts +118 -0
- package/core/vendure-admin-ui-core.d.ts +1 -0
- package/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.d.ts +6 -3
- package/customer/components/address-card/address-card.component.d.ts +7 -2
- package/customer/components/address-detail-dialog/address-detail-dialog.component.d.ts +5 -2
- package/customer/components/customer-detail/customer-detail.component.d.ts +10 -5
- package/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.d.ts +3 -0
- package/customer/components/customer-group-list/customer-group-list.component.d.ts +10 -7
- package/customer/components/customer-group-member-list/customer-group-member-list.component.d.ts +3 -0
- package/customer/components/customer-history/customer-history.component.d.ts +12 -7
- package/customer/components/customer-list/customer-list.component.d.ts +7 -5
- package/customer/components/customer-status-label/customer-status-label.component.d.ts +5 -2
- package/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.d.ts +5 -2
- package/customer/customer.module.d.ts +17 -0
- package/customer/package.json +5 -6
- package/customer/providers/routing/customer-resolver.d.ts +5 -4
- package/customer/vendure-admin-ui-customer.d.ts +1 -0
- package/dashboard/components/dashboard/dashboard.component.d.ts +3 -0
- package/dashboard/components/dashboard-widget/dashboard-widget.component.d.ts +3 -0
- package/dashboard/dashboard.module.d.ts +8 -0
- package/dashboard/package.json +5 -6
- package/dashboard/vendure-admin-ui-dashboard.d.ts +1 -0
- package/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.d.ts +9 -2
- package/dashboard/widgets/order-summary-widget/order-summary-widget.component.d.ts +7 -0
- package/dashboard/widgets/test-widget/test-widget.component.d.ts +6 -0
- package/dashboard/widgets/welcome-widget/welcome-widget.component.d.ts +9 -2
- package/esm2020/catalog/catalog.module.mjs +116 -0
- package/esm2020/catalog/catalog.routes.mjs +174 -0
- package/esm2020/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +30 -0
- package/esm2020/catalog/components/asset-detail/asset-detail.component.mjs +66 -0
- package/esm2020/catalog/components/asset-list/asset-list.component.mjs +120 -0
- package/esm2020/catalog/components/assets/assets.component.mjs +100 -0
- package/esm2020/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.mjs +104 -0
- package/esm2020/catalog/components/collection-contents/collection-contents.component.mjs +76 -0
- package/esm2020/catalog/components/collection-detail/collection-detail.component.mjs +210 -0
- package/esm2020/catalog/components/collection-list/collection-list.component.mjs +120 -0
- package/esm2020/catalog/components/collection-tree/array-to-tree.mjs +56 -0
- package/esm2020/catalog/components/collection-tree/collection-tree-node.component.mjs +99 -0
- package/esm2020/catalog/components/collection-tree/collection-tree.component.mjs +44 -0
- package/esm2020/catalog/components/collection-tree/collection-tree.service.mjs +68 -0
- package/esm2020/catalog/components/collection-tree/collection-tree.types.mjs +2 -0
- package/esm2020/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.mjs +23 -0
- package/esm2020/catalog/components/facet-detail/facet-detail.component.mjs +321 -0
- package/esm2020/catalog/components/facet-list/facet-list.component.mjs +104 -0
- package/esm2020/catalog/components/generate-product-variants/generate-product-variants.component.mjs +79 -0
- package/esm2020/catalog/components/option-value-input/option-value-input.component.mjs +97 -0
- package/esm2020/catalog/components/product-detail/product-detail.component.mjs +520 -0
- package/esm2020/catalog/components/product-detail/product-detail.types.mjs +2 -0
- package/esm2020/catalog/components/product-list/product-list.component.mjs +150 -0
- package/esm2020/catalog/components/product-options-editor/product-options-editor.component.mjs +151 -0
- package/esm2020/catalog/components/product-search-input/product-search-input.component.mjs +107 -0
- package/esm2020/catalog/components/product-variants-editor/product-variants-editor.component.mjs +313 -0
- package/esm2020/catalog/components/product-variants-list/product-variants-list.component.mjs +226 -0
- package/esm2020/catalog/components/product-variants-table/product-variants-table.component.mjs +72 -0
- package/esm2020/catalog/components/update-product-option-dialog/update-product-option-dialog.component.mjs +64 -0
- package/esm2020/catalog/components/variant-price-detail/variant-price-detail.component.mjs +61 -0
- package/esm2020/catalog/providers/product-detail/product-detail.service.mjs +224 -0
- package/{esm2015/catalog/providers/product-detail/replace-last.js → esm2020/catalog/providers/product-detail/replace-last.mjs} +0 -0
- package/esm2020/catalog/providers/routing/asset-resolver.mjs +33 -0
- package/esm2020/catalog/providers/routing/collection-resolver.mjs +35 -0
- package/esm2020/catalog/providers/routing/facet-resolver.mjs +30 -0
- package/esm2020/catalog/providers/routing/product-resolver.mjs +39 -0
- package/esm2020/catalog/providers/routing/product-variants-resolver.mjs +27 -0
- package/esm2020/catalog/public_api.mjs +39 -0
- package/{esm2015/catalog/vendure-admin-ui-catalog.js → esm2020/catalog/vendure-admin-ui-catalog.mjs} +0 -0
- package/esm2020/core/app.component.mjs +79 -0
- package/esm2020/core/app.component.module.mjs +19 -0
- package/{esm2015/core/app.config.js → esm2020/core/app.config.mjs} +0 -0
- package/esm2020/core/common/base-detail.component.mjs +108 -0
- package/{esm2015/core/common/base-entity-resolver.js → esm2020/core/common/base-entity-resolver.mjs} +2 -2
- package/esm2020/core/common/base-list.component.mjs +159 -0
- package/{esm2015/core/common/component-registry-types.js → esm2020/core/common/component-registry-types.mjs} +0 -0
- package/{esm2015/core/common/deactivate-aware.js → esm2020/core/common/deactivate-aware.mjs} +0 -0
- package/{esm2015/core/common/detail-breadcrumb.js → esm2020/core/common/detail-breadcrumb.mjs} +0 -0
- package/esm2020/core/common/generated-types.mjs +954 -0
- package/{esm2015/core/common/introspection-result-wrapper.js → esm2020/core/common/introspection-result-wrapper.mjs} +0 -0
- package/esm2020/core/common/introspection-result.mjs +187 -0
- package/{esm2015/core/common/single-search-selection-model.js → esm2020/core/common/single-search-selection-model.mjs} +0 -0
- package/esm2020/core/common/utilities/configurable-operation-utils.mjs +83 -0
- package/esm2020/core/common/utilities/create-updated-translatable.mjs +75 -0
- package/esm2020/core/common/utilities/find-translation.mjs +9 -0
- package/esm2020/core/common/utilities/flatten-facet-values.mjs +4 -0
- package/esm2020/core/common/utilities/get-default-ui-language.mjs +12 -0
- package/{esm2015/core/common/utilities/interpolate-description.js → esm2020/core/common/utilities/interpolate-description.mjs} +0 -0
- package/{esm2015/core/common/utilities/string-to-color.js → esm2020/core/common/utilities/string-to-color.mjs} +0 -0
- package/{esm2015/core/common/version.js → esm2020/core/common/version.mjs} +2 -2
- package/esm2020/core/components/app-shell/app-shell.component.mjs +76 -0
- package/esm2020/core/components/breadcrumb/breadcrumb.component.mjs +124 -0
- package/esm2020/core/components/channel-switcher/channel-switcher.component.mjs +58 -0
- package/esm2020/core/components/main-nav/main-nav.component.mjs +270 -0
- package/esm2020/core/components/notification/notification.component.mjs +76 -0
- package/esm2020/core/components/overlay-host/overlay-host.component.mjs +22 -0
- package/esm2020/core/components/theme-switcher/theme-switcher.component.mjs +29 -0
- package/esm2020/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.mjs +305 -0
- package/esm2020/core/components/user-menu/user-menu.component.mjs +37 -0
- package/esm2020/core/core.module.mjs +145 -0
- package/{esm2015/core/data/check-jobs-link.js → esm2020/core/data/check-jobs-link.mjs} +0 -0
- package/{esm2015/core/data/client-state/client-defaults.js → esm2020/core/data/client-state/client-defaults.mjs} +1 -1
- package/esm2020/core/data/client-state/client-resolvers.mjs +131 -0
- package/esm2020/core/data/data.module.mjs +126 -0
- package/{esm2015/core/data/definitions/administrator-definitions.js → esm2020/core/data/definitions/administrator-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/auth-definitions.js → esm2020/core/data/definitions/auth-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/client-definitions.js → esm2020/core/data/definitions/client-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/collection-definitions.js → esm2020/core/data/definitions/collection-definitions.mjs} +0 -0
- package/esm2020/core/data/definitions/customer-definitions.mjs +265 -0
- package/{esm2015/core/data/definitions/facet-definitions.js → esm2020/core/data/definitions/facet-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/order-definitions.js → esm2020/core/data/definitions/order-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/product-definitions.js → esm2020/core/data/definitions/product-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/promotion-definitions.js → esm2020/core/data/definitions/promotion-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/settings-definitions.js → esm2020/core/data/definitions/settings-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/shared-definitions.js → esm2020/core/data/definitions/shared-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/shipping-definitions.js → esm2020/core/data/definitions/shipping-definitions.mjs} +0 -0
- package/{esm2015/core/data/omit-typename-link.js → esm2020/core/data/omit-typename-link.mjs} +0 -0
- package/esm2020/core/data/providers/administrator-data.service.mjs +63 -0
- package/esm2020/core/data/providers/auth-data.service.mjs +20 -0
- package/esm2020/core/data/providers/base-data.service.mjs +69 -0
- package/esm2020/core/data/providers/client-data.service.mjs +75 -0
- package/esm2020/core/data/providers/collection-data.service.mjs +72 -0
- package/esm2020/core/data/providers/customer-data.service.mjs +120 -0
- package/esm2020/core/data/providers/data.service.mjs +90 -0
- package/esm2020/core/data/providers/facet-data.service.mjs +60 -0
- package/esm2020/core/data/providers/fetch-adapter.mjs +36 -0
- package/esm2020/core/data/providers/interceptor.mjs +136 -0
- package/esm2020/core/data/providers/order-data.service.mjs +100 -0
- package/esm2020/core/data/providers/product-data.service.mjs +240 -0
- package/esm2020/core/data/providers/promotion-data.service.mjs +36 -0
- package/esm2020/core/data/providers/settings-data.service.mjs +235 -0
- package/esm2020/core/data/providers/shipping-method-data.service.mjs +66 -0
- package/{esm2015/core/data/query-result.js → esm2020/core/data/query-result.mjs} +1 -1
- package/esm2020/core/data/server-config.mjs +74 -0
- package/esm2020/core/data/utils/add-custom-fields.mjs +84 -0
- package/{esm2015/core/data/utils/get-server-location.js → esm2020/core/data/utils/get-server-location.mjs} +0 -0
- package/{esm2015/core/data/utils/remove-readonly-custom-fields.js → esm2020/core/data/utils/remove-readonly-custom-fields.mjs} +1 -1
- package/esm2020/core/data/utils/transform-relation-custom-field-inputs.mjs +46 -0
- package/esm2020/core/providers/auth/auth.service.mjs +104 -0
- package/esm2020/core/providers/component-registry/component-registry.service.mjs +25 -0
- package/{esm2015/core/providers/custom-detail-component/custom-detail-component-types.js → esm2020/core/providers/custom-detail-component/custom-detail-component-types.mjs} +0 -0
- package/esm2020/core/providers/custom-detail-component/custom-detail-component.service.mjs +44 -0
- package/esm2020/core/providers/custom-field-component/custom-field-component.service.mjs +45 -0
- package/{esm2015/core/providers/dashboard-widget/dashboard-widget-types.js → esm2020/core/providers/dashboard-widget/dashboard-widget-types.mjs} +0 -0
- package/esm2020/core/providers/dashboard-widget/dashboard-widget.service.mjs +98 -0
- package/{esm2015/core/providers/dashboard-widget/register-dashboard-widget.js → esm2020/core/providers/dashboard-widget/register-dashboard-widget.mjs} +0 -0
- package/esm2020/core/providers/guard/auth.guard.mjs +38 -0
- package/esm2020/core/providers/health-check/health-check.service.mjs +36 -0
- package/{esm2015/core/providers/i18n/custom-http-loader.js → esm2020/core/providers/i18n/custom-http-loader.mjs} +0 -0
- package/esm2020/core/providers/i18n/custom-message-format-compiler.mjs +31 -0
- package/esm2020/core/providers/i18n/i18n.service.mjs +54 -0
- package/esm2020/core/providers/job-queue/job-queue.service.mjs +91 -0
- package/esm2020/core/providers/local-storage/local-storage.service.mjs +77 -0
- package/esm2020/core/providers/modal/modal.service.mjs +97 -0
- package/esm2020/core/providers/modal/modal.types.mjs +2 -0
- package/{esm2015/core/providers/nav-builder/nav-builder-types.js → esm2020/core/providers/nav-builder/nav-builder-types.mjs} +0 -0
- package/esm2020/core/providers/nav-builder/nav-builder.service.mjs +268 -0
- package/esm2020/core/providers/notification/notification.service.mjs +157 -0
- package/esm2020/core/providers/overlay-host/overlay-host.service.mjs +48 -0
- package/esm2020/core/public_api.mjs +220 -0
- package/esm2020/core/shared/components/action-bar/action-bar.component.mjs +57 -0
- package/esm2020/core/shared/components/action-bar-items/action-bar-items.component.mjs +78 -0
- package/esm2020/core/shared/components/address-form/address-form.component.mjs +23 -0
- package/esm2020/core/shared/components/affixed-input/affixed-input.component.mjs +19 -0
- package/esm2020/core/shared/components/affixed-input/percentage-suffix-input.component.mjs +97 -0
- package/esm2020/core/shared/components/asset-file-input/asset-file-input.component.mjs +97 -0
- package/esm2020/core/shared/components/asset-gallery/asset-gallery.component.mjs +110 -0
- package/esm2020/core/shared/components/asset-gallery/asset-gallery.types.mjs +2 -0
- package/esm2020/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.mjs +144 -0
- package/esm2020/core/shared/components/asset-preview/asset-preview.component.mjs +189 -0
- package/esm2020/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.mjs +34 -0
- package/esm2020/core/shared/components/asset-preview-links/asset-preview-links.component.mjs +26 -0
- package/esm2020/core/shared/components/asset-search-input/asset-search-input.component.mjs +106 -0
- package/esm2020/core/shared/components/channel-assignment-control/channel-assignment-control.component.mjs +116 -0
- package/esm2020/core/shared/components/channel-badge/channel-badge.component.mjs +19 -0
- package/esm2020/core/shared/components/chip/chip.component.mjs +47 -0
- package/esm2020/core/shared/components/configurable-input/configurable-input.component.mjs +144 -0
- package/esm2020/core/shared/components/currency-input/currency-input.component.mjs +152 -0
- package/esm2020/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.mjs +40 -0
- package/esm2020/core/shared/components/custom-field-control/custom-field-control.component.mjs +83 -0
- package/esm2020/core/shared/components/customer-label/customer-label.component.mjs +17 -0
- package/esm2020/core/shared/components/data-table/data-table-column.component.mjs +29 -0
- package/esm2020/core/shared/components/data-table/data-table.component.mjs +124 -0
- package/{esm2015/core/shared/components/datetime-picker/constants.js → esm2020/core/shared/components/datetime-picker/constants.mjs} +0 -0
- package/esm2020/core/shared/components/datetime-picker/datetime-picker.component.mjs +226 -0
- package/esm2020/core/shared/components/datetime-picker/datetime-picker.service.mjs +201 -0
- package/{esm2015/core/shared/components/datetime-picker/types.js → esm2020/core/shared/components/datetime-picker/types.mjs} +0 -0
- package/esm2020/core/shared/components/dropdown/dropdown-item.directive.mjs +25 -0
- package/esm2020/core/shared/components/dropdown/dropdown-menu.component.mjs +127 -0
- package/esm2020/core/shared/components/dropdown/dropdown-trigger.directive.mjs +25 -0
- package/esm2020/core/shared/components/dropdown/dropdown.component.mjs +58 -0
- package/esm2020/core/shared/components/edit-note-dialog/edit-note-dialog.component.mjs +32 -0
- package/esm2020/core/shared/components/empty-placeholder/empty-placeholder.component.mjs +16 -0
- package/esm2020/core/shared/components/entity-info/entity-info.component.mjs +26 -0
- package/{esm2015/core/shared/components/extension-host/extension-host-config.js → esm2020/core/shared/components/extension-host/extension-host-config.mjs} +0 -0
- package/esm2020/core/shared/components/extension-host/extension-host.component.mjs +80 -0
- package/esm2020/core/shared/components/extension-host/extension-host.service.mjs +99 -0
- package/{esm2015/core/shared/components/extension-host/host-external-frame.js → esm2020/core/shared/components/extension-host/host-external-frame.mjs} +0 -0
- package/esm2020/core/shared/components/facet-value-chip/facet-value-chip.component.mjs +26 -0
- package/esm2020/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +121 -0
- package/esm2020/core/shared/components/focal-point-control/focal-point-control.component.mjs +71 -0
- package/esm2020/core/shared/components/form-field/form-field-control.directive.mjs +37 -0
- package/esm2020/core/shared/components/form-field/form-field.component.mjs +70 -0
- package/esm2020/core/shared/components/form-item/form-item.component.mjs +18 -0
- package/esm2020/core/shared/components/formatted-address/formatted-address.component.mjs +38 -0
- package/esm2020/core/shared/components/help-tooltip/help-tooltip.component.mjs +16 -0
- package/esm2020/core/shared/components/history-entry-detail/history-entry-detail.component.mjs +16 -0
- package/esm2020/core/shared/components/items-per-page-controls/items-per-page-controls.component.mjs +25 -0
- package/esm2020/core/shared/components/labeled-data/labeled-data.component.mjs +13 -0
- package/esm2020/core/shared/components/language-selector/language-selector.component.mjs +31 -0
- package/esm2020/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.mjs +61 -0
- package/esm2020/core/shared/components/modal-dialog/dialog-buttons.directive.mjs +23 -0
- package/esm2020/core/shared/components/modal-dialog/dialog-component-outlet.component.mjs +31 -0
- package/esm2020/core/shared/components/modal-dialog/dialog-title.directive.mjs +23 -0
- package/esm2020/core/shared/components/modal-dialog/modal-dialog.component.mjs +60 -0
- package/esm2020/core/shared/components/object-tree/object-tree.component.mjs +56 -0
- package/esm2020/core/shared/components/order-state-label/order-state-label.component.mjs +46 -0
- package/esm2020/core/shared/components/pagination-controls/pagination-controls.component.mjs +26 -0
- package/esm2020/core/shared/components/product-selector/product-selector.component.mjs +62 -0
- package/esm2020/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.mjs +37 -0
- package/esm2020/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.mjs +34 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/inputrules.js → esm2020/core/shared/components/rich-text-editor/prosemirror/inputrules.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/keymap.js → esm2020/core/shared/components/rich-text-editor/prosemirror/keymap.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/images.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/images.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/links.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/links.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/menu.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.js → esm2020/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.mjs} +0 -0
- package/esm2020/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +112 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/types.js → esm2020/core/shared/components/rich-text-editor/prosemirror/types.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/utils.js → esm2020/core/shared/components/rich-text-editor/prosemirror/utils.mjs} +0 -0
- package/esm2020/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +93 -0
- package/esm2020/core/shared/components/select-toggle/select-toggle.component.mjs +32 -0
- package/esm2020/core/shared/components/simple-dialog/simple-dialog.component.mjs +24 -0
- package/esm2020/core/shared/components/status-badge/status-badge.component.mjs +16 -0
- package/esm2020/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.mjs +54 -0
- package/esm2020/core/shared/components/table-row-action/table-row-action.component.mjs +28 -0
- package/esm2020/core/shared/components/tag-selector/tag-selector.component.mjs +60 -0
- package/esm2020/core/shared/components/timeline-entry/timeline-entry.component.mjs +52 -0
- package/esm2020/core/shared/components/title-input/title-input.component.mjs +21 -0
- package/esm2020/core/shared/components/ui-extension-point/ui-extension-point.component.mjs +34 -0
- package/esm2020/core/shared/directives/disabled.directive.mjs +41 -0
- package/esm2020/core/shared/directives/if-default-channel-active.directive.mjs +39 -0
- package/esm2020/core/shared/directives/if-directive-base.mjs +73 -0
- package/esm2020/core/shared/directives/if-multichannel.directive.mjs +45 -0
- package/esm2020/core/shared/directives/if-permissions.directive.mjs +76 -0
- package/esm2020/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.mjs +23 -0
- package/esm2020/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.mjs +120 -0
- package/esm2020/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.mjs +31 -0
- package/esm2020/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.mjs +42 -0
- package/esm2020/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.mjs +32 -0
- package/esm2020/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.mjs +265 -0
- package/esm2020/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +35 -0
- package/esm2020/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.mjs +39 -0
- package/esm2020/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.mjs +21 -0
- package/esm2020/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.mjs +61 -0
- package/{esm2015/core/shared/dynamic-form-inputs/register-dynamic-input-components.js → esm2020/core/shared/dynamic-form-inputs/register-dynamic-input-components.mjs} +0 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.mjs +69 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.mjs +70 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.mjs +89 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.mjs +89 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.mjs +60 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.mjs +28 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.mjs +14 -0
- package/esm2020/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.mjs +21 -0
- package/esm2020/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +31 -0
- package/esm2020/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.mjs +28 -0
- package/esm2020/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.mjs +24 -0
- package/esm2020/core/shared/pipes/asset-preview.pipe.mjs +42 -0
- package/esm2020/core/shared/pipes/channel-label.pipe.mjs +23 -0
- package/esm2020/core/shared/pipes/custom-field-label.pipe.mjs +47 -0
- package/esm2020/core/shared/pipes/duration.pipe.mjs +49 -0
- package/esm2020/core/shared/pipes/file-size.pipe.mjs +47 -0
- package/esm2020/core/shared/pipes/has-permission.pipe.mjs +65 -0
- package/esm2020/core/shared/pipes/locale-base.pipe.mjs +55 -0
- package/esm2020/core/shared/pipes/locale-currency-name.pipe.mjs +61 -0
- package/esm2020/core/shared/pipes/locale-currency.pipe.mjs +44 -0
- package/esm2020/core/shared/pipes/locale-date.pipe.mjs +84 -0
- package/esm2020/core/shared/pipes/locale-language-name.pipe.mjs +51 -0
- package/esm2020/core/shared/pipes/locale-region-name.pipe.mjs +51 -0
- package/esm2020/core/shared/pipes/sentence-case.pipe.mjs +30 -0
- package/esm2020/core/shared/pipes/sort.pipe.mjs +34 -0
- package/esm2020/core/shared/pipes/state-i18n-token.pipe.mjs +50 -0
- package/esm2020/core/shared/pipes/string-to-color.pipe.mjs +18 -0
- package/esm2020/core/shared/pipes/time-ago.pipe.mjs +52 -0
- package/esm2020/core/shared/providers/routing/can-deactivate-detail-guard.mjs +35 -0
- package/esm2020/core/shared/shared.module.mjs +520 -0
- package/{esm2015/core/validators/unicode-pattern.validator.js → esm2020/core/validators/unicode-pattern.validator.mjs} +0 -0
- package/{esm2015/core/vendure-admin-ui-core.js → esm2020/core/vendure-admin-ui-core.mjs} +0 -0
- package/esm2020/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.mjs +41 -0
- package/esm2020/customer/components/address-card/address-card.component.mjs +97 -0
- package/esm2020/customer/components/address-detail-dialog/address-detail-dialog.component.mjs +28 -0
- package/esm2020/customer/components/customer-detail/customer-detail.component.mjs +414 -0
- package/esm2020/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.mjs +45 -0
- package/esm2020/customer/components/customer-group-list/customer-group-list.component.mjs +181 -0
- package/esm2020/customer/components/customer-group-member-list/customer-group-member-list.component.mjs +103 -0
- package/esm2020/customer/components/customer-history/customer-history.component.mjs +83 -0
- package/esm2020/customer/components/customer-list/customer-list.component.mjs +80 -0
- package/esm2020/customer/components/customer-status-label/customer-status-label.component.mjs +17 -0
- package/esm2020/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.mjs +31 -0
- package/esm2020/customer/customer.module.mjs +53 -0
- package/esm2020/customer/customer.routes.mjs +42 -0
- package/esm2020/customer/providers/routing/customer-resolver.mjs +31 -0
- package/{esm2015/customer/public_api.js → esm2020/customer/public_api.mjs} +0 -0
- package/{esm2015/customer/vendure-admin-ui-customer.js → esm2020/customer/vendure-admin-ui-customer.mjs} +0 -0
- package/esm2020/dashboard/components/dashboard/dashboard.component.mjs +121 -0
- package/esm2020/dashboard/components/dashboard-widget/dashboard-widget.component.mjs +35 -0
- package/esm2020/dashboard/dashboard.module.mjs +29 -0
- package/{esm2015/dashboard/dashboard.routes.js → esm2020/dashboard/dashboard.routes.mjs} +0 -0
- package/esm2020/dashboard/default-widgets.mjs +32 -0
- package/{esm2015/dashboard/public_api.js → esm2020/dashboard/public_api.mjs} +0 -0
- package/{esm2015/dashboard/vendure-admin-ui-dashboard.js → esm2020/dashboard/vendure-admin-ui-dashboard.mjs} +0 -0
- package/esm2020/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.mjs +45 -0
- package/esm2020/dashboard/widgets/order-summary-widget/order-summary-widget.component.mjs +59 -0
- package/esm2020/dashboard/widgets/test-widget/test-widget.component.mjs +22 -0
- package/esm2020/dashboard/widgets/welcome-widget/welcome-widget.component.mjs +39 -0
- package/esm2020/login/components/login/login.component.mjs +62 -0
- package/esm2020/login/login.module.mjs +21 -0
- package/{esm2015/login/login.routes.js → esm2020/login/login.routes.mjs} +0 -0
- package/esm2020/login/providers/login.guard.mjs +31 -0
- package/{esm2015/login/public_api.js → esm2020/login/public_api.mjs} +0 -0
- package/{esm2015/login/vendure-admin-ui-login.js → esm2020/login/vendure-admin-ui-login.mjs} +0 -0
- package/esm2020/marketing/components/promotion-detail/promotion-detail.component.mjs +242 -0
- package/esm2020/marketing/components/promotion-list/promotion-list.component.mjs +81 -0
- package/esm2020/marketing/marketing.module.mjs +21 -0
- package/esm2020/marketing/marketing.routes.mjs +33 -0
- package/esm2020/marketing/providers/routing/promotion-resolver.mjs +31 -0
- package/{esm2015/marketing/public_api.js → esm2020/marketing/public_api.mjs} +0 -0
- package/{esm2015/marketing/vendure-admin-ui-marketing.js → esm2020/marketing/vendure-admin-ui-marketing.mjs} +0 -0
- package/esm2020/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.mjs +39 -0
- package/esm2020/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +78 -0
- package/esm2020/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +73 -0
- package/esm2020/order/components/fulfillment-card/fulfillment-card.component.mjs +48 -0
- package/esm2020/order/components/fulfillment-detail/fulfillment-detail.component.mjs +62 -0
- package/esm2020/order/components/fulfillment-state-label/fulfillment-state-label.component.mjs +28 -0
- package/esm2020/order/components/line-fulfillment/line-fulfillment.component.mjs +68 -0
- package/esm2020/order/components/line-refunds/line-refunds.component.mjs +37 -0
- package/esm2020/order/components/modification-detail/modification-detail.component.mjs +68 -0
- package/esm2020/order/components/order-custom-fields-card/order-custom-fields-card.component.mjs +40 -0
- package/esm2020/order/components/order-detail/order-detail.component.mjs +504 -0
- package/esm2020/order/components/order-editor/order-editor.component.mjs +365 -0
- package/esm2020/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.mjs +55 -0
- package/esm2020/order/components/order-history/order-history.component.mjs +166 -0
- package/esm2020/order/components/order-list/order-list.component.mjs +192 -0
- package/esm2020/order/components/order-payment-card/order-payment-card.component.mjs +43 -0
- package/{esm2015/order/components/order-process-graph/constants.js → esm2020/order/components/order-process-graph/constants.mjs} +0 -0
- package/esm2020/order/components/order-process-graph/order-process-edge.component.mjs +45 -0
- package/esm2020/order/components/order-process-graph/order-process-graph.component.mjs +96 -0
- package/esm2020/order/components/order-process-graph/order-process-node.component.mjs +53 -0
- package/{esm2015/order/components/order-process-graph/types.js → esm2020/order/components/order-process-graph/types.mjs} +0 -0
- package/esm2020/order/components/order-process-graph-dialog/order-process-graph-dialog.component.mjs +21 -0
- package/esm2020/order/components/order-state-select-dialog/order-state-select-dialog.component.mjs +29 -0
- package/esm2020/order/components/order-table/order-table.component.mjs +73 -0
- package/esm2020/order/components/payment-detail/payment-detail.component.mjs +18 -0
- package/esm2020/order/components/payment-state-label/payment-state-label.component.mjs +28 -0
- package/esm2020/order/components/refund-order-dialog/refund-order-dialog.component.mjs +138 -0
- package/esm2020/order/components/refund-state-label/refund-state-label.component.mjs +27 -0
- package/esm2020/order/components/settle-refund-dialog/settle-refund-dialog.component.mjs +24 -0
- package/esm2020/order/components/simple-item-list/simple-item-list.component.mjs +15 -0
- package/esm2020/order/order.module.mjs +103 -0
- package/esm2020/order/order.routes.mjs +52 -0
- package/esm2020/order/providers/order-transition.service.mjs +112 -0
- package/esm2020/order/providers/routing/order-resolver.mjs +29 -0
- package/{esm2015/order/public_api.js → esm2020/order/public_api.mjs} +0 -0
- package/{esm2015/order/vendure-admin-ui-order.js → esm2020/order/vendure-admin-ui-order.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/esm2020/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.mjs +34 -0
- package/esm2020/settings/components/admin-detail/admin-detail.component.mjs +192 -0
- package/esm2020/settings/components/administrator-list/administrator-list.component.mjs +49 -0
- package/esm2020/settings/components/channel-detail/channel-detail.component.mjs +154 -0
- package/esm2020/settings/components/channel-list/channel-list.component.mjs +53 -0
- package/esm2020/settings/components/country-detail/country-detail.component.mjs +115 -0
- package/esm2020/settings/components/country-list/country-list.component.mjs +84 -0
- package/esm2020/settings/components/global-settings/global-settings.component.mjs +85 -0
- package/esm2020/settings/components/payment-method-detail/payment-method-detail.component.mjs +199 -0
- package/esm2020/settings/components/payment-method-list/payment-method-list.component.mjs +62 -0
- package/esm2020/settings/components/permission-grid/permission-grid.component.mjs +83 -0
- package/esm2020/settings/components/profile/profile.component.mjs +77 -0
- package/esm2020/settings/components/role-detail/role-detail.component.mjs +105 -0
- package/esm2020/settings/components/role-list/role-list.component.mjs +66 -0
- package/esm2020/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.mjs +30 -0
- package/esm2020/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +240 -0
- package/esm2020/settings/components/shipping-method-list/shipping-method-list.component.mjs +92 -0
- package/esm2020/settings/components/shipping-method-test-result/shipping-method-test-result.component.mjs +30 -0
- package/esm2020/settings/components/tax-category-detail/tax-category-detail.component.mjs +107 -0
- package/esm2020/settings/components/tax-category-list/tax-category-list.component.mjs +56 -0
- package/esm2020/settings/components/tax-rate-detail/tax-rate-detail.component.mjs +126 -0
- package/esm2020/settings/components/tax-rate-list/tax-rate-list.component.mjs +56 -0
- package/esm2020/settings/components/test-address-form/test-address-form.component.mjs +49 -0
- package/esm2020/settings/components/test-order-builder/test-order-builder.component.mjs +71 -0
- package/esm2020/settings/components/zone-detail-dialog/zone-detail-dialog.component.mjs +44 -0
- package/esm2020/settings/components/zone-list/zone-list.component.mjs +158 -0
- package/esm2020/settings/components/zone-member-list/zone-member-controls.directive.mjs +16 -0
- package/esm2020/settings/components/zone-member-list/zone-member-list-header.directive.mjs +16 -0
- package/esm2020/settings/components/zone-member-list/zone-member-list.component.mjs +72 -0
- package/esm2020/settings/providers/routing/administrator-resolver.mjs +28 -0
- package/esm2020/settings/providers/routing/channel-resolver.mjs +34 -0
- package/esm2020/settings/providers/routing/country-resolver.mjs +31 -0
- package/esm2020/settings/providers/routing/global-settings-resolver.mjs +24 -0
- package/esm2020/settings/providers/routing/payment-method-resolver.mjs +33 -0
- package/esm2020/settings/providers/routing/profile-resolver.mjs +30 -0
- package/esm2020/settings/providers/routing/role-resolver.mjs +28 -0
- package/esm2020/settings/providers/routing/shipping-method-resolver.mjs +34 -0
- package/esm2020/settings/providers/routing/tax-category-resolver.mjs +29 -0
- package/esm2020/settings/providers/routing/tax-rate-resolver.mjs +33 -0
- package/{esm2015/settings/public_api.js → esm2020/settings/public_api.mjs} +0 -0
- package/esm2020/settings/settings.module.mjs +106 -0
- package/esm2020/settings/settings.routes.mjs +253 -0
- package/{esm2015/settings/vendure-admin-ui-settings.js → esm2020/settings/vendure-admin-ui-settings.mjs} +0 -0
- package/esm2020/system/components/health-check/health-check.component.mjs +18 -0
- package/esm2020/system/components/job-list/job-list.component.mjs +76 -0
- package/esm2020/system/components/job-state-label/job-state-label.component.mjs +46 -0
- package/{esm2015/system/public_api.js → esm2020/system/public_api.mjs} +0 -0
- package/esm2020/system/system.module.mjs +22 -0
- package/esm2020/system/system.routes.mjs +20 -0
- package/{esm2015/system/vendure-admin-ui-system.js → esm2020/system/vendure-admin-ui-system.mjs} +0 -0
- package/{esm2015/vendure-admin-ui.js → esm2020/vendure-admin-ui.mjs} +0 -0
- package/fesm2015/vendure-admin-ui-catalog.mjs +3732 -0
- package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-core.mjs +15998 -0
- package/fesm2015/vendure-admin-ui-core.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-customer.mjs +1134 -0
- package/fesm2015/vendure-admin-ui-customer.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-dashboard.mjs +365 -0
- package/fesm2015/vendure-admin-ui-dashboard.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-login.mjs +122 -0
- package/fesm2015/vendure-admin-ui-login.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-marketing.mjs +388 -0
- package/fesm2015/vendure-admin-ui-marketing.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-order.mjs +2448 -0
- package/fesm2015/vendure-admin-ui-order.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-settings.mjs +2784 -0
- package/fesm2015/vendure-admin-ui-settings.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-system.mjs +165 -0
- package/fesm2015/vendure-admin-ui-system.mjs.map +1 -0
- package/fesm2015/{vendure-admin-ui.js → vendure-admin-ui.mjs} +1 -1
- package/fesm2015/vendure-admin-ui.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-catalog.mjs +3747 -0
- package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-core.mjs +15994 -0
- package/fesm2020/vendure-admin-ui-core.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-customer.mjs +1135 -0
- package/fesm2020/vendure-admin-ui-customer.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-dashboard.mjs +361 -0
- package/fesm2020/vendure-admin-ui-dashboard.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-login.mjs +122 -0
- package/fesm2020/vendure-admin-ui-login.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-marketing.mjs +388 -0
- package/fesm2020/vendure-admin-ui-marketing.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-order.mjs +2462 -0
- package/fesm2020/vendure-admin-ui-order.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-settings.mjs +2791 -0
- package/fesm2020/vendure-admin-ui-settings.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-system.mjs +168 -0
- package/fesm2020/vendure-admin-ui-system.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui.mjs +11 -0
- package/fesm2020/vendure-admin-ui.mjs.map +1 -0
- package/login/components/login/login.component.d.ts +3 -0
- package/login/login.module.d.ts +7 -0
- package/login/package.json +5 -6
- package/login/providers/login.guard.d.ts +3 -0
- package/login/vendure-admin-ui-login.d.ts +1 -0
- package/marketing/components/promotion-detail/promotion-detail.component.d.ts +7 -4
- package/marketing/components/promotion-list/promotion-list.component.d.ts +5 -6
- package/marketing/marketing.module.d.ts +8 -0
- package/marketing/package.json +5 -6
- package/marketing/providers/routing/promotion-resolver.d.ts +5 -2
- package/marketing/vendure-admin-ui-marketing.d.ts +1 -0
- package/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.d.ts +5 -2
- package/order/components/cancel-order-dialog/cancel-order-dialog.component.d.ts +6 -0
- package/order/components/fulfill-order-dialog/fulfill-order-dialog.component.d.ts +6 -3
- package/order/components/fulfillment-card/fulfillment-card.component.d.ts +6 -3
- package/order/components/fulfillment-detail/fulfillment-detail.component.d.ts +6 -3
- package/order/components/fulfillment-state-label/fulfillment-state-label.component.d.ts +3 -0
- package/order/components/line-fulfillment/line-fulfillment.component.d.ts +8 -3
- package/order/components/line-refunds/line-refunds.component.d.ts +6 -3
- package/order/components/modification-detail/modification-detail.component.d.ts +13 -4
- package/order/components/order-custom-fields-card/order-custom-fields-card.component.d.ts +3 -0
- package/order/components/order-detail/order-detail.component.d.ts +15 -10
- package/order/components/order-editor/order-editor.component.d.ts +16 -12
- package/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.d.ts +6 -3
- package/order/components/order-history/order-history.component.d.ts +36 -20
- package/order/components/order-list/order-list.component.d.ts +5 -2
- package/order/components/order-payment-card/order-payment-card.component.d.ts +48 -14
- package/order/components/order-process-graph/order-process-edge.component.d.ts +3 -0
- package/order/components/order-process-graph/order-process-graph.component.d.ts +3 -0
- package/order/components/order-process-graph/order-process-node.component.d.ts +3 -0
- package/order/components/order-process-graph-dialog/order-process-graph-dialog.component.d.ts +3 -0
- package/order/components/order-state-select-dialog/order-state-select-dialog.component.d.ts +3 -0
- package/order/components/order-table/order-table.component.d.ts +14 -8
- package/order/components/payment-detail/payment-detail.component.d.ts +5 -2
- package/order/components/payment-state-label/payment-state-label.component.d.ts +3 -0
- package/order/components/refund-order-dialog/refund-order-dialog.component.d.ts +8 -4
- package/order/components/refund-state-label/refund-state-label.component.d.ts +3 -0
- package/order/components/settle-refund-dialog/settle-refund-dialog.component.d.ts +5 -3
- package/order/components/simple-item-list/simple-item-list.component.d.ts +3 -0
- package/order/order.module.d.ts +34 -0
- package/order/package.json +5 -6
- package/order/providers/order-transition.service.d.ts +3 -0
- package/order/providers/routing/order-resolver.d.ts +5 -4
- package/order/vendure-admin-ui-order.d.ts +1 -0
- package/package.json +120 -36
- package/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.d.ts +6 -3
- package/settings/components/admin-detail/admin-detail.component.d.ts +9 -10
- package/settings/components/administrator-list/administrator-list.component.d.ts +6 -3
- package/settings/components/channel-detail/channel-detail.component.d.ts +7 -8
- package/settings/components/channel-list/channel-list.component.d.ts +5 -5
- package/settings/components/country-detail/country-detail.component.d.ts +7 -4
- package/settings/components/country-list/country-list.component.d.ts +7 -4
- package/settings/components/global-settings/global-settings.component.d.ts +3 -0
- package/settings/components/payment-method-detail/payment-method-detail.component.d.ts +6 -3
- package/settings/components/payment-method-list/payment-method-list.component.d.ts +5 -2
- package/settings/components/permission-grid/permission-grid.component.d.ts +3 -0
- package/settings/components/profile/profile.component.d.ts +5 -2
- package/settings/components/role-detail/role-detail.component.d.ts +3 -0
- package/settings/components/role-list/role-list.component.d.ts +8 -5
- package/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.d.ts +3 -0
- package/settings/components/shipping-method-detail/shipping-method-detail.component.d.ts +7 -4
- package/settings/components/shipping-method-list/shipping-method-list.component.d.ts +6 -3
- package/settings/components/shipping-method-test-result/shipping-method-test-result.component.d.ts +3 -0
- package/settings/components/tax-category-detail/tax-category-detail.component.d.ts +7 -8
- package/settings/components/tax-category-list/tax-category-list.component.d.ts +6 -6
- package/settings/components/tax-rate-detail/tax-rate-detail.component.d.ts +8 -5
- package/settings/components/tax-rate-list/tax-rate-list.component.d.ts +6 -7
- package/settings/components/test-address-form/test-address-form.component.d.ts +5 -2
- package/settings/components/test-order-builder/test-order-builder.component.d.ts +7 -2
- package/settings/components/zone-detail-dialog/zone-detail-dialog.component.d.ts +3 -0
- package/settings/components/zone-list/zone-list.component.d.ts +10 -7
- package/settings/components/zone-member-list/zone-member-controls.directive.d.ts +3 -0
- package/settings/components/zone-member-list/zone-member-list-header.directive.d.ts +3 -0
- package/settings/components/zone-member-list/zone-member-list.component.d.ts +3 -0
- package/settings/package.json +5 -6
- package/settings/providers/routing/administrator-resolver.d.ts +5 -4
- package/settings/providers/routing/channel-resolver.d.ts +5 -4
- package/settings/providers/routing/country-resolver.d.ts +5 -4
- package/settings/providers/routing/global-settings-resolver.d.ts +5 -4
- package/settings/providers/routing/payment-method-resolver.d.ts +5 -4
- package/settings/providers/routing/profile-resolver.d.ts +5 -4
- package/settings/providers/routing/role-resolver.d.ts +5 -4
- package/settings/providers/routing/shipping-method-resolver.d.ts +5 -4
- package/settings/providers/routing/tax-category-resolver.d.ts +5 -2
- package/settings/providers/routing/tax-rate-resolver.d.ts +5 -2
- package/settings/settings.module.d.ts +35 -0
- package/settings/vendure-admin-ui-settings.d.ts +1 -0
- package/static/i18n-messages/cs.json +5 -1
- package/static/i18n-messages/de.json +5 -1
- package/static/i18n-messages/en.json +6 -2
- package/static/i18n-messages/es.json +5 -1
- package/static/i18n-messages/fr.json +5 -1
- package/static/i18n-messages/it.json +5 -1
- package/static/i18n-messages/pl.json +5 -1
- package/static/i18n-messages/pt_BR.json +5 -1
- package/static/i18n-messages/pt_PT.json +5 -1
- package/static/i18n-messages/ru.json +5 -1
- package/static/i18n-messages/uk.json +5 -1
- package/static/i18n-messages/zh_Hans.json +5 -1
- package/static/i18n-messages/zh_Hant.json +5 -1
- package/static/polyfills.ts +0 -10
- package/static/styles/styles.scss +1 -1
- package/static/theme.min.css +1 -1
- package/system/components/health-check/health-check.component.d.ts +3 -0
- package/system/components/job-list/job-list.component.d.ts +7 -4
- package/system/components/job-state-label/job-state-label.component.d.ts +3 -0
- package/system/package.json +5 -6
- package/system/system.module.d.ts +9 -0
- package/system/vendure-admin-ui-system.d.ts +1 -0
- package/vendure-admin-ui.d.ts +1 -0
- package/bundles/vendure-admin-ui-catalog.umd.js +0 -4638
- package/bundles/vendure-admin-ui-catalog.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-core.umd.js +0 -14759
- package/bundles/vendure-admin-ui-core.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-customer.umd.js +0 -1626
- package/bundles/vendure-admin-ui-customer.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-dashboard.umd.js +0 -757
- package/bundles/vendure-admin-ui-dashboard.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-login.umd.js +0 -157
- package/bundles/vendure-admin-ui-login.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-marketing.umd.js +0 -783
- package/bundles/vendure-admin-ui-marketing.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-order.umd.js +0 -3287
- package/bundles/vendure-admin-ui-order.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-settings.umd.js +0 -3697
- package/bundles/vendure-admin-ui-settings.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-system.umd.js +0 -524
- package/bundles/vendure-admin-ui-system.umd.js.map +0 -1
- package/bundles/vendure-admin-ui.umd.js +0 -21
- package/bundles/vendure-admin-ui.umd.js.map +0 -1
- package/catalog/vendure-admin-ui-catalog.metadata.json +0 -1
- package/core/vendure-admin-ui-core.metadata.json +0 -1
- package/customer/vendure-admin-ui-customer.metadata.json +0 -1
- package/dashboard/vendure-admin-ui-dashboard.metadata.json +0 -1
- package/esm2015/catalog/catalog.module.js +0 -64
- package/esm2015/catalog/catalog.routes.js +0 -176
- package/esm2015/catalog/components/apply-facet-dialog/apply-facet-dialog.component.js +0 -32
- package/esm2015/catalog/components/asset-detail/asset-detail.component.js +0 -74
- package/esm2015/catalog/components/asset-list/asset-list.component.js +0 -119
- package/esm2015/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.js +0 -109
- package/esm2015/catalog/components/collection-contents/collection-contents.component.js +0 -78
- package/esm2015/catalog/components/collection-detail/collection-detail.component.js +0 -206
- package/esm2015/catalog/components/collection-list/collection-list.component.js +0 -119
- package/esm2015/catalog/components/collection-tree/array-to-tree.js +0 -57
- package/esm2015/catalog/components/collection-tree/collection-tree-node.component.js +0 -94
- package/esm2015/catalog/components/collection-tree/collection-tree.component.js +0 -74
- package/esm2015/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.js +0 -21
- package/esm2015/catalog/components/facet-detail/facet-detail.component.js +0 -326
- package/esm2015/catalog/components/facet-list/facet-list.component.js +0 -107
- package/esm2015/catalog/components/generate-product-variants/generate-product-variants.component.js +0 -78
- package/esm2015/catalog/components/option-value-input/option-value-input.component.js +0 -98
- package/esm2015/catalog/components/product-assets/product-assets.component.js +0 -108
- package/esm2015/catalog/components/product-detail/product-detail.component.js +0 -514
- package/esm2015/catalog/components/product-list/product-list.component.js +0 -153
- package/esm2015/catalog/components/product-options-editor/product-options-editor.component.js +0 -157
- package/esm2015/catalog/components/product-search-input/product-search-input.component.js +0 -104
- package/esm2015/catalog/components/product-variants-editor/product-variants-editor.component.js +0 -316
- package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +0 -207
- package/esm2015/catalog/components/product-variants-table/product-variants-table.component.js +0 -66
- package/esm2015/catalog/components/update-product-option-dialog/update-product-option-dialog.component.js +0 -61
- package/esm2015/catalog/components/variant-price-detail/variant-price-detail.component.js +0 -60
- package/esm2015/catalog/providers/product-detail/product-detail.service.js +0 -224
- package/esm2015/catalog/providers/routing/asset-resolver.js +0 -37
- package/esm2015/catalog/providers/routing/collection-resolver.js +0 -38
- package/esm2015/catalog/providers/routing/facet-resolver.js +0 -35
- package/esm2015/catalog/providers/routing/product-resolver.js +0 -42
- package/esm2015/catalog/providers/routing/product-variants-resolver.js +0 -31
- package/esm2015/catalog/public_api.js +0 -36
- package/esm2015/core/app.component.js +0 -80
- package/esm2015/core/app.component.module.js +0 -14
- package/esm2015/core/common/base-detail.component.js +0 -106
- package/esm2015/core/common/base-list.component.js +0 -156
- package/esm2015/core/common/generated-types.js +0 -953
- package/esm2015/core/common/introspection-result.js +0 -253
- package/esm2015/core/common/utilities/configurable-operation-utils.js +0 -78
- package/esm2015/core/common/utilities/create-updated-translatable.js +0 -72
- package/esm2015/core/common/utilities/find-translation.js +0 -9
- package/esm2015/core/common/utilities/flatten-facet-values.js +0 -4
- package/esm2015/core/common/utilities/get-default-ui-language.js +0 -13
- package/esm2015/core/components/app-shell/app-shell.component.js +0 -78
- package/esm2015/core/components/breadcrumb/breadcrumb.component.js +0 -126
- package/esm2015/core/components/channel-switcher/channel-switcher.component.js +0 -52
- package/esm2015/core/components/main-nav/main-nav.component.js +0 -272
- package/esm2015/core/components/notification/notification.component.js +0 -71
- package/esm2015/core/components/overlay-host/overlay-host.component.js +0 -22
- package/esm2015/core/components/theme-switcher/theme-switcher.component.js +0 -31
- package/esm2015/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.js +0 -294
- package/esm2015/core/components/user-menu/user-menu.component.js +0 -24
- package/esm2015/core/core.module.js +0 -115
- package/esm2015/core/data/client-state/client-resolvers.js +0 -123
- package/esm2015/core/data/data.module.js +0 -106
- package/esm2015/core/data/definitions/customer-definitions.js +0 -258
- package/esm2015/core/data/providers/administrator-data.service.js +0 -55
- package/esm2015/core/data/providers/auth-data.service.js +0 -20
- package/esm2015/core/data/providers/base-data.service.js +0 -72
- package/esm2015/core/data/providers/client-data.service.js +0 -75
- package/esm2015/core/data/providers/collection-data.service.js +0 -72
- package/esm2015/core/data/providers/customer-data.service.js +0 -114
- package/esm2015/core/data/providers/data.service.js +0 -90
- package/esm2015/core/data/providers/facet-data.service.js +0 -60
- package/esm2015/core/data/providers/fetch-adapter.js +0 -38
- package/esm2015/core/data/providers/interceptor.js +0 -142
- package/esm2015/core/data/providers/order-data.service.js +0 -98
- package/esm2015/core/data/providers/product-data.service.js +0 -232
- package/esm2015/core/data/providers/promotion-data.service.js +0 -36
- package/esm2015/core/data/providers/settings-data.service.js +0 -231
- package/esm2015/core/data/providers/shipping-method-data.service.js +0 -66
- package/esm2015/core/data/server-config.js +0 -76
- package/esm2015/core/data/utils/add-custom-fields.js +0 -78
- package/esm2015/core/data/utils/transform-relation-custom-field-inputs.js +0 -46
- package/esm2015/core/providers/auth/auth.service.js +0 -110
- package/esm2015/core/providers/component-registry/component-registry.service.js +0 -23
- package/esm2015/core/providers/custom-detail-component/custom-detail-component.service.js +0 -44
- package/esm2015/core/providers/custom-field-component/custom-field-component.service.js +0 -47
- package/esm2015/core/providers/dashboard-widget/dashboard-widget.service.js +0 -97
- package/esm2015/core/providers/guard/auth.guard.js +0 -42
- package/esm2015/core/providers/health-check/health-check.service.js +0 -38
- package/esm2015/core/providers/i18n/custom-message-format-compiler.js +0 -30
- package/esm2015/core/providers/i18n/i18n.service.js +0 -56
- package/esm2015/core/providers/job-queue/job-queue.service.js +0 -93
- package/esm2015/core/providers/local-storage/local-storage.service.js +0 -79
- package/esm2015/core/providers/modal/modal.service.js +0 -100
- package/esm2015/core/providers/nav-builder/nav-builder.service.js +0 -264
- package/esm2015/core/providers/notification/notification.service.js +0 -165
- package/esm2015/core/providers/overlay-host/overlay-host.service.js +0 -46
- package/esm2015/core/public_api.js +0 -217
- package/esm2015/core/shared/components/action-bar/action-bar.component.js +0 -47
- package/esm2015/core/shared/components/action-bar-items/action-bar-items.component.js +0 -78
- package/esm2015/core/shared/components/address-form/address-form.component.js +0 -17
- package/esm2015/core/shared/components/affixed-input/affixed-input.component.js +0 -19
- package/esm2015/core/shared/components/affixed-input/percentage-suffix-input.component.js +0 -70
- package/esm2015/core/shared/components/asset-file-input/asset-file-input.component.js +0 -92
- package/esm2015/core/shared/components/asset-gallery/asset-gallery.component.js +0 -102
- package/esm2015/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.js +0 -138
- package/esm2015/core/shared/components/asset-preview/asset-preview.component.js +0 -176
- package/esm2015/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.js +0 -35
- package/esm2015/core/shared/components/asset-search-input/asset-search-input.component.js +0 -102
- package/esm2015/core/shared/components/channel-assignment-control/channel-assignment-control.component.js +0 -109
- package/esm2015/core/shared/components/channel-badge/channel-badge.component.js +0 -19
- package/esm2015/core/shared/components/chip/chip.component.js +0 -42
- package/esm2015/core/shared/components/configurable-input/configurable-input.component.js +0 -128
- package/esm2015/core/shared/components/currency-input/currency-input.component.js +0 -145
- package/esm2015/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.js +0 -44
- package/esm2015/core/shared/components/custom-field-control/custom-field-control.component.js +0 -55
- package/esm2015/core/shared/components/customer-label/customer-label.component.js +0 -15
- package/esm2015/core/shared/components/data-table/data-table-column.component.js +0 -22
- package/esm2015/core/shared/components/data-table/data-table.component.js +0 -106
- package/esm2015/core/shared/components/datetime-picker/datetime-picker.component.js +0 -205
- package/esm2015/core/shared/components/datetime-picker/datetime-picker.service.js +0 -199
- package/esm2015/core/shared/components/dropdown/dropdown-item.directive.js +0 -24
- package/esm2015/core/shared/components/dropdown/dropdown-menu.component.js +0 -121
- package/esm2015/core/shared/components/dropdown/dropdown-trigger.directive.js +0 -25
- package/esm2015/core/shared/components/dropdown/dropdown.component.js +0 -60
- package/esm2015/core/shared/components/edit-note-dialog/edit-note-dialog.component.js +0 -26
- package/esm2015/core/shared/components/empty-placeholder/empty-placeholder.component.js +0 -15
- package/esm2015/core/shared/components/entity-info/entity-info.component.js +0 -19
- package/esm2015/core/shared/components/extension-host/extension-host.component.js +0 -83
- package/esm2015/core/shared/components/extension-host/extension-host.service.js +0 -100
- package/esm2015/core/shared/components/facet-value-chip/facet-value-chip.component.js +0 -23
- package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +0 -114
- package/esm2015/core/shared/components/focal-point-control/focal-point-control.component.js +0 -56
- package/esm2015/core/shared/components/form-field/form-field-control.directive.js +0 -35
- package/esm2015/core/shared/components/form-field/form-field.component.js +0 -61
- package/esm2015/core/shared/components/form-item/form-item.component.js +0 -19
- package/esm2015/core/shared/components/formatted-address/formatted-address.component.js +0 -37
- package/esm2015/core/shared/components/help-tooltip/help-tooltip.component.js +0 -16
- package/esm2015/core/shared/components/history-entry-detail/history-entry-detail.component.js +0 -12
- package/esm2015/core/shared/components/items-per-page-controls/items-per-page-controls.component.js +0 -23
- package/esm2015/core/shared/components/labeled-data/labeled-data.component.js +0 -15
- package/esm2015/core/shared/components/language-selector/language-selector.component.js +0 -21
- package/esm2015/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.js +0 -58
- package/esm2015/core/shared/components/modal-dialog/dialog-buttons.directive.js +0 -23
- package/esm2015/core/shared/components/modal-dialog/dialog-component-outlet.component.js +0 -31
- package/esm2015/core/shared/components/modal-dialog/dialog-title.directive.js +0 -23
- package/esm2015/core/shared/components/modal-dialog/modal-dialog.component.js +0 -57
- package/esm2015/core/shared/components/object-tree/object-tree.component.js +0 -53
- package/esm2015/core/shared/components/order-state-label/order-state-label.component.js +0 -43
- package/esm2015/core/shared/components/pagination-controls/pagination-controls.component.js +0 -22
- package/esm2015/core/shared/components/product-selector/product-selector.component.js +0 -61
- package/esm2015/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.js +0 -32
- package/esm2015/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.js +0 -28
- package/esm2015/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.js +0 -112
- package/esm2015/core/shared/components/rich-text-editor/rich-text-editor.component.js +0 -86
- package/esm2015/core/shared/components/select-toggle/select-toggle.component.js +0 -28
- package/esm2015/core/shared/components/simple-dialog/simple-dialog.component.js +0 -21
- package/esm2015/core/shared/components/status-badge/status-badge.component.js +0 -18
- package/esm2015/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.js +0 -49
- package/esm2015/core/shared/components/table-row-action/table-row-action.component.js +0 -23
- package/esm2015/core/shared/components/tag-selector/tag-selector.component.js +0 -55
- package/esm2015/core/shared/components/timeline-entry/timeline-entry.component.js +0 -40
- package/esm2015/core/shared/components/title-input/title-input.component.js +0 -18
- package/esm2015/core/shared/components/ui-extension-point/ui-extension-point.component.js +0 -31
- package/esm2015/core/shared/directives/disabled.directive.js +0 -38
- package/esm2015/core/shared/directives/if-default-channel-active.directive.js +0 -42
- package/esm2015/core/shared/directives/if-directive-base.js +0 -75
- package/esm2015/core/shared/directives/if-multichannel.directive.js +0 -47
- package/esm2015/core/shared/directives/if-permissions.directive.js +0 -78
- package/esm2015/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.js +0 -20
- package/esm2015/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.js +0 -125
- package/esm2015/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.js +0 -33
- package/esm2015/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.js +0 -43
- package/esm2015/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.js +0 -35
- package/esm2015/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.js +0 -266
- package/esm2015/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.js +0 -36
- package/esm2015/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.js +0 -43
- package/esm2015/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.js +0 -20
- package/esm2015/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.js +0 -60
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.js +0 -69
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.js +0 -66
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.js +0 -81
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.js +0 -81
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.js +0 -43
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.js +0 -25
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.js +0 -12
- package/esm2015/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.js +0 -20
- package/esm2015/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.js +0 -28
- package/esm2015/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.js +0 -28
- package/esm2015/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.js +0 -23
- package/esm2015/core/shared/pipes/asset-preview.pipe.js +0 -38
- package/esm2015/core/shared/pipes/channel-label.pipe.js +0 -19
- package/esm2015/core/shared/pipes/custom-field-label.pipe.js +0 -46
- package/esm2015/core/shared/pipes/duration.pipe.js +0 -48
- package/esm2015/core/shared/pipes/file-size.pipe.js +0 -43
- package/esm2015/core/shared/pipes/has-permission.pipe.js +0 -65
- package/esm2015/core/shared/pipes/locale-base.pipe.js +0 -57
- package/esm2015/core/shared/pipes/locale-currency-name.pipe.js +0 -58
- package/esm2015/core/shared/pipes/locale-currency.pipe.js +0 -40
- package/esm2015/core/shared/pipes/locale-date.pipe.js +0 -80
- package/esm2015/core/shared/pipes/locale-language-name.pipe.js +0 -47
- package/esm2015/core/shared/pipes/locale-region-name.pipe.js +0 -47
- package/esm2015/core/shared/pipes/sentence-case.pipe.js +0 -26
- package/esm2015/core/shared/pipes/sort.pipe.js +0 -30
- package/esm2015/core/shared/pipes/state-i18n-token.pipe.js +0 -46
- package/esm2015/core/shared/pipes/string-to-color.pipe.js +0 -14
- package/esm2015/core/shared/pipes/time-ago.pipe.js +0 -51
- package/esm2015/core/shared/providers/routing/can-deactivate-detail-guard.js +0 -36
- package/esm2015/core/shared/shared.module.js +0 -263
- package/esm2015/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.js +0 -42
- package/esm2015/customer/components/address-card/address-card.component.js +0 -86
- package/esm2015/customer/components/address-detail-dialog/address-detail-dialog.component.js +0 -28
- package/esm2015/customer/components/customer-detail/customer-detail.component.js +0 -393
- package/esm2015/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.js +0 -47
- package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +0 -184
- package/esm2015/customer/components/customer-group-member-list/customer-group-member-list.component.js +0 -101
- package/esm2015/customer/components/customer-history/customer-history.component.js +0 -76
- package/esm2015/customer/components/customer-list/customer-list.component.js +0 -78
- package/esm2015/customer/components/customer-status-label/customer-status-label.component.js +0 -15
- package/esm2015/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.js +0 -31
- package/esm2015/customer/customer.module.js +0 -37
- package/esm2015/customer/customer.routes.js +0 -44
- package/esm2015/customer/providers/routing/customer-resolver.js +0 -35
- package/esm2015/dashboard/components/dashboard/dashboard.component.js +0 -124
- package/esm2015/dashboard/components/dashboard-widget/dashboard-widget.component.js +0 -39
- package/esm2015/dashboard/dashboard.module.js +0 -25
- package/esm2015/dashboard/default-widgets.js +0 -34
- package/esm2015/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.js +0 -42
- package/esm2015/dashboard/widgets/order-summary-widget/order-summary-widget.component.js +0 -56
- package/esm2015/dashboard/widgets/test-widget/test-widget.component.js +0 -19
- package/esm2015/dashboard/widgets/welcome-widget/welcome-widget.component.js +0 -36
- package/esm2015/login/components/login/login.component.js +0 -61
- package/esm2015/login/login.module.js +0 -15
- package/esm2015/login/providers/login.guard.js +0 -35
- package/esm2015/marketing/components/promotion-detail/promotion-detail.component.js +0 -247
- package/esm2015/marketing/components/promotion-list/promotion-list.component.js +0 -87
- package/esm2015/marketing/marketing.module.js +0 -15
- package/esm2015/marketing/marketing.routes.js +0 -35
- package/esm2015/marketing/providers/routing/promotion-resolver.js +0 -34
- package/esm2015/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.js +0 -39
- package/esm2015/order/components/cancel-order-dialog/cancel-order-dialog.component.js +0 -52
- package/esm2015/order/components/fulfill-order-dialog/fulfill-order-dialog.component.js +0 -71
- package/esm2015/order/components/fulfillment-card/fulfillment-card.component.js +0 -43
- package/esm2015/order/components/fulfillment-detail/fulfillment-detail.component.js +0 -64
- package/esm2015/order/components/fulfillment-state-label/fulfillment-state-label.component.js +0 -26
- package/esm2015/order/components/line-fulfillment/line-fulfillment.component.js +0 -65
- package/esm2015/order/components/line-refunds/line-refunds.component.js +0 -35
- package/esm2015/order/components/modification-detail/modification-detail.component.js +0 -66
- package/esm2015/order/components/order-custom-fields-card/order-custom-fields-card.component.js +0 -39
- package/esm2015/order/components/order-detail/order-detail.component.js +0 -509
- package/esm2015/order/components/order-editor/order-editor.component.js +0 -362
- package/esm2015/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.js +0 -50
- package/esm2015/order/components/order-history/order-history.component.js +0 -154
- package/esm2015/order/components/order-list/order-list.component.js +0 -188
- package/esm2015/order/components/order-payment-card/order-payment-card.component.js +0 -33
- package/esm2015/order/components/order-process-graph/order-process-edge.component.js +0 -37
- package/esm2015/order/components/order-process-graph/order-process-graph.component.js +0 -94
- package/esm2015/order/components/order-process-graph/order-process-node.component.js +0 -53
- package/esm2015/order/components/order-process-graph-dialog/order-process-graph-dialog.component.js +0 -23
- package/esm2015/order/components/order-state-select-dialog/order-state-select-dialog.component.js +0 -25
- package/esm2015/order/components/order-table/order-table.component.js +0 -68
- package/esm2015/order/components/payment-detail/payment-detail.component.js +0 -16
- package/esm2015/order/components/payment-state-label/payment-state-label.component.js +0 -26
- package/esm2015/order/components/refund-order-dialog/refund-order-dialog.component.js +0 -133
- package/esm2015/order/components/refund-state-label/refund-state-label.component.js +0 -25
- package/esm2015/order/components/settle-refund-dialog/settle-refund-dialog.component.js +0 -21
- package/esm2015/order/components/simple-item-list/simple-item-list.component.js +0 -15
- package/esm2015/order/order.module.js +0 -70
- package/esm2015/order/order.routes.js +0 -54
- package/esm2015/order/providers/order-transition.service.js +0 -116
- package/esm2015/order/providers/routing/order-resolver.js +0 -33
- package/esm2015/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.js +0 -35
- package/esm2015/settings/components/admin-detail/admin-detail.component.js +0 -199
- package/esm2015/settings/components/administrator-list/administrator-list.component.js +0 -52
- package/esm2015/settings/components/channel-detail/channel-detail.component.js +0 -163
- package/esm2015/settings/components/channel-list/channel-list.component.js +0 -57
- package/esm2015/settings/components/country-detail/country-detail.component.js +0 -120
- package/esm2015/settings/components/country-list/country-list.component.js +0 -82
- package/esm2015/settings/components/global-settings/global-settings.component.js +0 -89
- package/esm2015/settings/components/payment-method-detail/payment-method-detail.component.js +0 -204
- package/esm2015/settings/components/payment-method-list/payment-method-list.component.js +0 -66
- package/esm2015/settings/components/permission-grid/permission-grid.component.js +0 -80
- package/esm2015/settings/components/profile/profile.component.js +0 -82
- package/esm2015/settings/components/role-detail/role-detail.component.js +0 -109
- package/esm2015/settings/components/role-list/role-list.component.js +0 -73
- package/esm2015/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.js +0 -24
- package/esm2015/settings/components/shipping-method-detail/shipping-method-detail.component.js +0 -235
- package/esm2015/settings/components/shipping-method-list/shipping-method-list.component.js +0 -94
- package/esm2015/settings/components/shipping-method-test-result/shipping-method-test-result.component.js +0 -24
- package/esm2015/settings/components/tax-category-detail/tax-category-detail.component.js +0 -115
- package/esm2015/settings/components/tax-category-list/tax-category-list.component.js +0 -60
- package/esm2015/settings/components/tax-rate-detail/tax-rate-detail.component.js +0 -131
- package/esm2015/settings/components/tax-rate-list/tax-rate-list.component.js +0 -64
- package/esm2015/settings/components/test-address-form/test-address-form.component.js +0 -53
- package/esm2015/settings/components/test-order-builder/test-order-builder.component.js +0 -73
- package/esm2015/settings/components/zone-detail-dialog/zone-detail-dialog.component.js +0 -47
- package/esm2015/settings/components/zone-list/zone-list.component.js +0 -160
- package/esm2015/settings/components/zone-member-list/zone-member-controls.directive.js +0 -15
- package/esm2015/settings/components/zone-member-list/zone-member-list-header.directive.js +0 -15
- package/esm2015/settings/components/zone-member-list/zone-member-list.component.js +0 -63
- package/esm2015/settings/providers/routing/administrator-resolver.js +0 -32
- package/esm2015/settings/providers/routing/channel-resolver.js +0 -40
- package/esm2015/settings/providers/routing/country-resolver.js +0 -35
- package/esm2015/settings/providers/routing/global-settings-resolver.js +0 -28
- package/esm2015/settings/providers/routing/payment-method-resolver.js +0 -37
- package/esm2015/settings/providers/routing/profile-resolver.js +0 -34
- package/esm2015/settings/providers/routing/role-resolver.js +0 -32
- package/esm2015/settings/providers/routing/shipping-method-resolver.js +0 -38
- package/esm2015/settings/providers/routing/tax-category-resolver.js +0 -32
- package/esm2015/settings/providers/routing/tax-rate-resolver.js +0 -36
- package/esm2015/settings/settings.module.js +0 -72
- package/esm2015/settings/settings.routes.js +0 -255
- package/esm2015/system/components/health-check/health-check.component.js +0 -19
- package/esm2015/system/components/job-list/job-list.component.js +0 -74
- package/esm2015/system/components/job-state-label/job-state-label.component.js +0 -45
- package/esm2015/system/system.module.js +0 -16
- package/esm2015/system/system.routes.js +0 -22
- package/fesm2015/vendure-admin-ui-catalog.js +0 -3800
- package/fesm2015/vendure-admin-ui-catalog.js.map +0 -1
- package/fesm2015/vendure-admin-ui-core.js +0 -15757
- package/fesm2015/vendure-admin-ui-core.js.map +0 -1
- package/fesm2015/vendure-admin-ui-customer.js +0 -1140
- package/fesm2015/vendure-admin-ui-customer.js.map +0 -1
- package/fesm2015/vendure-admin-ui-dashboard.js +0 -371
- package/fesm2015/vendure-admin-ui-dashboard.js.map +0 -1
- package/fesm2015/vendure-admin-ui-login.js +0 -121
- package/fesm2015/vendure-admin-ui-login.js.map +0 -1
- package/fesm2015/vendure-admin-ui-marketing.js +0 -403
- package/fesm2015/vendure-admin-ui-marketing.js.map +0 -1
- package/fesm2015/vendure-admin-ui-order.js +0 -2492
- package/fesm2015/vendure-admin-ui-order.js.map +0 -1
- package/fesm2015/vendure-admin-ui-settings.js +0 -2975
- package/fesm2015/vendure-admin-ui-settings.js.map +0 -1
- package/fesm2015/vendure-admin-ui-system.js +0 -171
- package/fesm2015/vendure-admin-ui-system.js.map +0 -1
- package/fesm2015/vendure-admin-ui.js.map +0 -1
- package/login/vendure-admin-ui-login.metadata.json +0 -1
- package/marketing/vendure-admin-ui-marketing.metadata.json +0 -1
- package/order/vendure-admin-ui-order.metadata.json +0 -1
- package/settings/vendure-admin-ui-settings.metadata.json +0 -1
- package/system/vendure-admin-ui-system.metadata.json +0 -1
- package/vendure-admin-ui.metadata.json +0 -1
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute, NavigationEnd, PRIMARY_OUTLET, Router } from '@angular/router';
|
|
3
|
-
import { flatten } from 'lodash';
|
|
4
|
-
import { combineLatest as observableCombineLatest, Observable, of as observableOf, Subject } from 'rxjs';
|
|
5
|
-
import { filter, map, startWith, switchMap, takeUntil } from 'rxjs/operators';
|
|
6
|
-
import { DataService } from '../../data/providers/data.service';
|
|
7
|
-
/**
|
|
8
|
-
* A breadcrumbs component which reads the route config and any route that has a `data.breadcrumb` property will
|
|
9
|
-
* be displayed in the breadcrumb trail.
|
|
10
|
-
*
|
|
11
|
-
* The `breadcrumb` property can be a string or a function. If a function, it will be passed the route's `data`
|
|
12
|
-
* object (which will include all resolved keys) and any route params, and should return a BreadcrumbValue.
|
|
13
|
-
*
|
|
14
|
-
* See the test config to get an idea of allowable configs for breadcrumbs.
|
|
15
|
-
*/
|
|
16
|
-
export class BreadcrumbComponent {
|
|
17
|
-
constructor(router, route, dataService) {
|
|
18
|
-
this.router = router;
|
|
19
|
-
this.route = route;
|
|
20
|
-
this.dataService = dataService;
|
|
21
|
-
this.destroy$ = new Subject();
|
|
22
|
-
this.breadcrumbs$ = this.router.events.pipe(filter(event => event instanceof NavigationEnd), takeUntil(this.destroy$), startWith(true), switchMap(() => this.generateBreadcrumbs(this.route.root)));
|
|
23
|
-
}
|
|
24
|
-
ngOnDestroy() {
|
|
25
|
-
this.destroy$.next();
|
|
26
|
-
this.destroy$.complete();
|
|
27
|
-
}
|
|
28
|
-
generateBreadcrumbs(rootRoute) {
|
|
29
|
-
const breadcrumbParts = this.assembleBreadcrumbParts(rootRoute);
|
|
30
|
-
const breadcrumbObservables$ = breadcrumbParts.map(({ value$, path }) => {
|
|
31
|
-
return value$.pipe(map(value => {
|
|
32
|
-
if (isBreadcrumbLabelLinkPair(value)) {
|
|
33
|
-
return {
|
|
34
|
-
label: value.label,
|
|
35
|
-
link: this.normalizeRelativeLinks(value.link, path),
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
else if (isBreadcrumbPairArray(value)) {
|
|
39
|
-
return value.map(val => ({
|
|
40
|
-
label: val.label,
|
|
41
|
-
link: this.normalizeRelativeLinks(val.link, path),
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
return {
|
|
46
|
-
label: value,
|
|
47
|
-
link: '/' + path.join('/'),
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}));
|
|
51
|
-
});
|
|
52
|
-
return observableCombineLatest(breadcrumbObservables$).pipe(map(links => flatten(links)));
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Walks the route definition tree to assemble an array from which the breadcrumbs can be derived.
|
|
56
|
-
*/
|
|
57
|
-
assembleBreadcrumbParts(rootRoute) {
|
|
58
|
-
const breadcrumbParts = [];
|
|
59
|
-
const inferredUrl = '';
|
|
60
|
-
const segmentPaths = [];
|
|
61
|
-
let currentRoute = rootRoute;
|
|
62
|
-
do {
|
|
63
|
-
const childRoutes = currentRoute.children;
|
|
64
|
-
currentRoute = null;
|
|
65
|
-
childRoutes.forEach((route) => {
|
|
66
|
-
if (route.outlet === PRIMARY_OUTLET) {
|
|
67
|
-
const routeSnapshot = route.snapshot;
|
|
68
|
-
let breadcrumbDef = route.routeConfig && route.routeConfig.data && route.routeConfig.data['breadcrumb'];
|
|
69
|
-
segmentPaths.push(routeSnapshot.url.map(segment => segment.path).join('/'));
|
|
70
|
-
if (breadcrumbDef) {
|
|
71
|
-
if (isBreadcrumbFunction(breadcrumbDef)) {
|
|
72
|
-
breadcrumbDef = breadcrumbDef(routeSnapshot.data, routeSnapshot.params, this.dataService);
|
|
73
|
-
}
|
|
74
|
-
const observableValue = isObservable(breadcrumbDef)
|
|
75
|
-
? breadcrumbDef
|
|
76
|
-
: observableOf(breadcrumbDef);
|
|
77
|
-
breadcrumbParts.push({ value$: observableValue, path: segmentPaths.slice() });
|
|
78
|
-
}
|
|
79
|
-
currentRoute = route;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
} while (currentRoute);
|
|
83
|
-
return breadcrumbParts;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Accounts for relative routes in the link array, i.e. arrays whose first element is either:
|
|
87
|
-
* * `./` - this appends the rest of the link segments to the current active route
|
|
88
|
-
* * `../` - this removes the last segment of the current active route, and appends the link segments
|
|
89
|
-
* to the parent route.
|
|
90
|
-
*/
|
|
91
|
-
normalizeRelativeLinks(link, segmentPaths) {
|
|
92
|
-
const clone = link.slice();
|
|
93
|
-
if (clone[0] === './') {
|
|
94
|
-
clone[0] = segmentPaths.join('/');
|
|
95
|
-
}
|
|
96
|
-
if (clone[0] === '../') {
|
|
97
|
-
clone[0] = segmentPaths.slice(0, -1).join('/');
|
|
98
|
-
}
|
|
99
|
-
return clone.filter(segment => segment !== '');
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
BreadcrumbComponent.decorators = [
|
|
103
|
-
{ type: Component, args: [{
|
|
104
|
-
selector: 'vdr-breadcrumb',
|
|
105
|
-
template: "<nav role=\"navigation\">\r\n <ul class=\"breadcrumbs\">\r\n <li *ngFor=\"let breadcrumb of (breadcrumbs$ | async); let isLast = last\">\r\n <a [routerLink]=\"breadcrumb.link\" *ngIf=\"!isLast\">{{ breadcrumb.label | translate }}</a>\r\n <ng-container *ngIf=\"isLast\">{{ breadcrumb.label | translate }}</ng-container>\r\n </li>\r\n </ul>\r\n</nav>\r\n",
|
|
106
|
-
styles: ["@charset \"UTF-8\";:host{display:block;padding:0 1rem}.breadcrumbs{list-style-type:none}.breadcrumbs li{font-size:16px;display:inline-block;margin-right:10px}.breadcrumbs li:not(:last-child):after{content:\"\\203a\";top:0;color:var(--color-grey-400);margin-left:10px}\n"]
|
|
107
|
-
},] }
|
|
108
|
-
];
|
|
109
|
-
BreadcrumbComponent.ctorParameters = () => [
|
|
110
|
-
{ type: Router },
|
|
111
|
-
{ type: ActivatedRoute },
|
|
112
|
-
{ type: DataService }
|
|
113
|
-
];
|
|
114
|
-
function isBreadcrumbFunction(value) {
|
|
115
|
-
return typeof value === 'function';
|
|
116
|
-
}
|
|
117
|
-
function isObservable(value) {
|
|
118
|
-
return value instanceof Observable;
|
|
119
|
-
}
|
|
120
|
-
function isBreadcrumbLabelLinkPair(value) {
|
|
121
|
-
return value.hasOwnProperty('label') && value.hasOwnProperty('link');
|
|
122
|
-
}
|
|
123
|
-
function isBreadcrumbPairArray(value) {
|
|
124
|
-
return Array.isArray(value) && isBreadcrumbLabelLinkPair(value[0]);
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWRjcnVtYi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL2NvbXBvbmVudHMvYnJlYWRjcnVtYi9icmVhZGNydW1iLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFhLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFBRSxjQUFjLEVBQVEsYUFBYSxFQUFVLGNBQWMsRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN0RyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFDO0FBQ2pDLE9BQU8sRUFBRSxhQUFhLElBQUksdUJBQXVCLEVBQUUsVUFBVSxFQUFFLEVBQUUsSUFBSSxZQUFZLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3pHLE9BQU8sRUFBRSxNQUFNLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFOUUsT0FBTyxFQUFFLFd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IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiB2YWx1ZS5sYWJlbCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbms6IHRoaXMubm9ybWFsaXplUmVsYXRpdmVMaW5rcyh2YWx1ZS5saW5rLCBwYXRoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlzQnJlYWRjcnVtYlBhaXJBcnJheSh2YWx1ZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlLm1hcCh2YWwgPT4gKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiB2YWwubGFiZWwsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rOiB0aGlzLm5vcm1hbGl6ZVJlbGF0aXZlTGlua3ModmFsLmxpbmssIHBhdGgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiB2YWx1ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbms6ICcvJyArIHBhdGguam9pbignLycpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICApIGFzIE9ic2VydmFibGU8QnJlYWRjcnVtYkxhYmVsTGlua1BhaXIgfCBCcmVhZGNydW1iTGFiZWxMaW5rUGFpcltdPjtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgcmV0dXJuIG9ic2VydmFibGVDb21iaW5lTGF0ZXN0KGJyZWFkY3J1bWJPYnNlcnZhYmxlcyQpLnBpcGUobWFwKGxpbmtzID0+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GVTbmFwc2hvdCA9IHJvdXRlLnNuYXBzaG90O1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBicmVhZGNydW1iRGVmOiBCcmVhZGNydW1iRGVmaW5pdGlvbiB8IHVuZGVmaW5lZCA9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlLnJvdXRlQ29uZmlnICYmIHJvdXRlLnJvdXRlQ29uZmlnLmRhdGEgJiYgcm91dGUucm91dGVDb25maWcuZGF0YVsnYnJlYWRjcnVtYiddO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlZ21lbnRQYXRocy5wdXNoKHJvdXRlU25hcHNob3QudXJsLm1hcChzZWdtZW50ID0+IHNlZ21lbnQucGF0aCkuam9pbignLycpKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJyZWFkY3J1bWJEZWYpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzQnJlYWRjcnVtYkZ1bmN0aW9uKGJyZWFkY3J1bWJEZWYpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhZGNydW1iRGVmID0gYnJlYWRjcnVtYkRlZihcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3V0ZVNuYXBzaG90LmRhdGEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVTbmFwc2hvdC5wYXJhbXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kYXRhU2VydmljZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb2JzZXJ2YWJsZVZhbHVlID0gaXNPYnNlcnZhYmxlKGJyZWFkY3J1bWJEZWYpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGJyZWFkY3J1bWJEZWZcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgI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hbHVlIGlzIEJyZWFkY3J1bWJMYWJlbExpbmtQYWlyW10ge1xyXG4gICAgcmV0dXJuIEFycmF5LmlzQXJyYXkodmFsdWUpICYmIGlzQnJlYWRjcnVtYkxhYmVsTGlua1BhaXIodmFsdWVbMF0pO1xyXG59XHJcbiJdfQ==
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { FormControl } from '@angular/forms';
|
|
3
|
-
import { notNullOrUndefined } from '@vendure/common/lib/shared-utils';
|
|
4
|
-
import { combineLatest } from 'rxjs';
|
|
5
|
-
import { filter, map, startWith } from 'rxjs/operators';
|
|
6
|
-
import { DataService } from '../../data/providers/data.service';
|
|
7
|
-
import { LocalStorageService } from '../../providers/local-storage/local-storage.service';
|
|
8
|
-
export class ChannelSwitcherComponent {
|
|
9
|
-
constructor(dataService, localStorageService) {
|
|
10
|
-
this.dataService = dataService;
|
|
11
|
-
this.localStorageService = localStorageService;
|
|
12
|
-
this.displayFilterThreshold = 10;
|
|
13
|
-
this.filterControl = new FormControl('');
|
|
14
|
-
}
|
|
15
|
-
ngOnInit() {
|
|
16
|
-
const channels$ = this.dataService.client.userStatus().mapStream(data => data.userStatus.channels);
|
|
17
|
-
const filterTerm$ = this.filterControl.valueChanges.pipe(startWith(''));
|
|
18
|
-
this.channels$ = combineLatest(channels$, filterTerm$).pipe(map(([channels, filterTerm]) => {
|
|
19
|
-
return filterTerm
|
|
20
|
-
? channels.filter(c => c.code.toLocaleLowerCase().includes(filterTerm.toLocaleLowerCase()))
|
|
21
|
-
: channels;
|
|
22
|
-
}));
|
|
23
|
-
this.channelCount$ = channels$.pipe(map(channels => channels.length));
|
|
24
|
-
const activeChannel$ = this.dataService.client
|
|
25
|
-
.userStatus()
|
|
26
|
-
.mapStream(data => data.userStatus.channels.find(c => c.id === data.userStatus.activeChannelId))
|
|
27
|
-
.pipe(filter(notNullOrUndefined));
|
|
28
|
-
this.activeChannelCode$ = activeChannel$.pipe(map(channel => channel.code));
|
|
29
|
-
}
|
|
30
|
-
setActiveChannel(channelId) {
|
|
31
|
-
this.dataService.client.setActiveChannel(channelId).subscribe(({ setActiveChannel }) => {
|
|
32
|
-
const activeChannel = setActiveChannel.channels.find(c => c.id === channelId);
|
|
33
|
-
if (activeChannel) {
|
|
34
|
-
this.localStorageService.set('activeChannelToken', activeChannel.token);
|
|
35
|
-
}
|
|
36
|
-
this.filterControl.patchValue('');
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
ChannelSwitcherComponent.decorators = [
|
|
41
|
-
{ type: Component, args: [{
|
|
42
|
-
selector: 'vdr-channel-switcher',
|
|
43
|
-
template: "<ng-container>\r\n <vdr-dropdown>\r\n <button class=\"btn btn-link active-channel\" vdrDropdownTrigger>\r\n <vdr-channel-badge [channelCode]=\"activeChannelCode$ | async\"></vdr-channel-badge>\r\n <span class=\"active-channel\">{{\r\n activeChannelCode$ | async | channelCodeToLabel | translate\r\n }}</span>\r\n <span class=\"trigger\"><clr-icon shape=\"caret down\"></clr-icon></span>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <input\r\n *ngIf=\"((channelCount$ | async) || 0) >= displayFilterThreshold\"\r\n [formControl]=\"filterControl\"\r\n type=\"text\"\r\n class=\"ml2 mr2\"\r\n [placeholder]=\"'common.filter' | translate\"\r\n />\r\n <button\r\n *ngFor=\"let channel of channels$ | async\"\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"setActiveChannel(channel.id)\"\r\n >\r\n <vdr-channel-badge [channelCode]=\"channel.code\"></vdr-channel-badge>\r\n {{ channel.code | channelCodeToLabel | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n</ng-container>\r\n",
|
|
44
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
|
-
styles: [":host{display:flex;align-items:center;margin:0 .5rem;height:2.5rem}.active-channel{color:var(--color-grey-200)}.active-channel clr-icon{color:#fff}\n"]
|
|
46
|
-
},] }
|
|
47
|
-
];
|
|
48
|
-
ChannelSwitcherComponent.ctorParameters = () => [
|
|
49
|
-
{ type: DataService },
|
|
50
|
-
{ type: LocalStorageService }
|
|
51
|
-
];
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhbm5lbC1zd2l0Y2hlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL2NvbXBvbmVudHMvY2hhbm5lbC1zd2l0Y2hlci9jaGFubmVsLXN3aXRjaGVyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQzNFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUc3QyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUN0RSxPQUFPLEVBQUUsYUFBYSxFQUFjLE1BQU0sTUFBTSxDQUFDO0FBQ2pELE9BQU8sRUFBRSxNQUFNLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBR3hELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUNoRSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxxREFBcUQsQ0FBQztBQVExRixNQUFNLE9BQU8sd0JBQXdCO0lBTWpDLFlBQW9CLFdBQXdCLEVBQVUsbUJBQXdDO1FBQTFFLGdCQUFXLEdBQVgsV0FBVyxDQUFhO1FBQVUsd0JBQW1CLEdBQW5CLG1CQUFtQixDQUFxQjtRQUxyRiwyQkFBc0IsR0FB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yQ29udHJvbC52YWx1ZUNoYW5nZXMucGlwZTxzdHJpbmc+KHN0YXJ0V2l0aCgnJykpO1xyXG4gICAgICAgIHRoaXMuY2hhbm5lbHMkID0gY29tYmluZUxhdGVzdChjaGFubmVscyQsIGZpbHRlclRlcm0kKS5waXBlKFxyXG4gICAgICAgICAgICBtYXAoKFtjaGFubmVscywgZmlsdGVyVGVybV0pID0+IHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmaWx0ZXJUZXJtXHJcbiAgICAgICAgICAgICAgICAgICAgPyBjaGFubmVscy5maWx0ZXIoYyA9PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGMuY29kZS50b0xvY2FsZUxvd2VyQ2FzZSgpLmluY2x1ZGVzKGZpbHRlclRlcm0udG9Mb2NhbGVMb3dlckNhc2UoKSksXHJcbiAgICAgICAgICAgICAgICAgICAgICApXHJcbiAgICAgICAgICAgICAgICAgICAgOiBjaGFubmVscztcclxuICAgICAgICAgICAgfSksXHJcbiAgICAgICAgKTtcclxuICAgICAgICB0aGlzLmNoYW5uZWxDb3VudCQgPSBjaGFubmVscyQucGlwZShtYXAoY2hhbm5lbHMgPT4gY2hhbm5lbHMubGVuZ3RoKSk7XHJcbiAgICAgICAgY29uc3QgYWN0aXZlQ2hhbm5lbCQgPSB0aGlzLmRhdGFTZXJ2aWNlLmNsaWVudFxyXG4gICAgICAgICAgICAudXNlclN0YXR1cygpXHJcbiAgICAgICAgICAgIC5tYXBTdHJlYW0oZGF0YSA9PiBkYXRhLnVzZXJTdGF0dXMuY2hhbm5lbHMuZmluZChjID0+IGMuaWQgPT09IGRhdGEudXNlclN0YXR1cy5hY3RpdmVDaGFubmVsSWQpKVxyXG4gICAgICAgICAgICAucGlwZShmaWx0ZXIobm90TnVsbE9yVW5kZWZpbmVkKSk7XHJcbiAgICAgICAgdGhpcy5hY3RpdmVDaGFubmVsQ29kZSQgPSBhY3RpdmVDaGFubmVsJC5waXBlKG1hcChjaGFubmVsID0+IGNoYW5uZWwuY29kZSkpO1xyXG4gICAgfVxyXG5cclxuICAgIHNldEFjdGl2ZUNoYW5uZWwoY2hhbm5lbElkOiBzdHJpbmcpIHtcclxuICAgICAgICB0aGlzLmRhdGFTZXJ2aWNlLmNsaWVudC5zZXRBY3RpdmVDaGFubmVsKGNoYW5uZWxJZCkuc3Vic2NyaWJlKCh7IHNldEFjdGl2ZUNoYW5uZWwgfSkgPT4ge1xyXG4gICAgICAgICAgICBjb25zdCBhY3RpdmVDaGFubmVsID0gc2V0QWN0aXZlQ2hhbm5lbC5jaGFubmVscy5maW5kKGMgPT4gYy5pZCA9PT0gY2hhbm5lbElkKTtcclxuICAgICAgICAgICAgaWYgKGFjdGl2ZUNoYW5uZWwpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubG9jYWxTdG9yYWdlU2VydmljZS5zZXQoJ2FjdGl2ZUNoYW5uZWxUb2tlbicsIGFjdGl2ZUNoYW5uZWwudG9rZW4pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRoaXMuZmlsdGVyQ29udHJvbC5wYXRjaFZhbHVlKCcnKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxufVxyXG4iXX0=
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
-
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
|
4
|
-
import { map, startWith } from 'rxjs/operators';
|
|
5
|
-
import { Permission } from '../../common/generated-types';
|
|
6
|
-
import { DataService } from '../../data/providers/data.service';
|
|
7
|
-
import { HealthCheckService } from '../../providers/health-check/health-check.service';
|
|
8
|
-
import { JobQueueService } from '../../providers/job-queue/job-queue.service';
|
|
9
|
-
import { NavBuilderService } from '../../providers/nav-builder/nav-builder.service';
|
|
10
|
-
export class MainNavComponent {
|
|
11
|
-
constructor(route, router, navBuilderService, healthCheckService, jobQueueService, dataService) {
|
|
12
|
-
this.route = route;
|
|
13
|
-
this.router = router;
|
|
14
|
-
this.navBuilderService = navBuilderService;
|
|
15
|
-
this.healthCheckService = healthCheckService;
|
|
16
|
-
this.jobQueueService = jobQueueService;
|
|
17
|
-
this.dataService = dataService;
|
|
18
|
-
}
|
|
19
|
-
shouldDisplayLink(menuItem) {
|
|
20
|
-
if (!this.userPermissions) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
if (!menuItem.requiresPermission) {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
if (typeof menuItem.requiresPermission === 'string') {
|
|
27
|
-
return this.userPermissions.includes(menuItem.requiresPermission);
|
|
28
|
-
}
|
|
29
|
-
if (typeof menuItem.requiresPermission === 'function') {
|
|
30
|
-
return menuItem.requiresPermission(this.userPermissions);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
ngOnInit() {
|
|
34
|
-
this.defineNavMenu();
|
|
35
|
-
this.subscription = this.dataService.client
|
|
36
|
-
.userStatus()
|
|
37
|
-
.mapStream(({ userStatus }) => {
|
|
38
|
-
this.userPermissions = userStatus.permissions;
|
|
39
|
-
})
|
|
40
|
-
.subscribe();
|
|
41
|
-
}
|
|
42
|
-
ngOnDestroy() {
|
|
43
|
-
if (this.subscription) {
|
|
44
|
-
this.subscription.unsubscribe();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
getRouterLink(item) {
|
|
48
|
-
return this.navBuilderService.getRouterLink(item, this.route);
|
|
49
|
-
}
|
|
50
|
-
defineNavMenu() {
|
|
51
|
-
function allow(...permissions) {
|
|
52
|
-
return userPermissions => {
|
|
53
|
-
for (const permission of permissions) {
|
|
54
|
-
if (userPermissions.includes(permission)) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return false;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
this.navBuilderService.defineNavMenuSections([
|
|
62
|
-
{
|
|
63
|
-
requiresPermission: allow(Permission.ReadCatalog, Permission.ReadProduct, Permission.ReadFacet, Permission.ReadCollection, Permission.ReadAsset),
|
|
64
|
-
id: 'catalog',
|
|
65
|
-
label: _('nav.catalog'),
|
|
66
|
-
items: [
|
|
67
|
-
{
|
|
68
|
-
requiresPermission: allow(Permission.ReadCatalog, Permission.ReadProduct),
|
|
69
|
-
id: 'products',
|
|
70
|
-
label: _('nav.products'),
|
|
71
|
-
icon: 'library',
|
|
72
|
-
routerLink: ['/catalog', 'products'],
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
requiresPermission: allow(Permission.ReadCatalog, Permission.ReadFacet),
|
|
76
|
-
id: 'facets',
|
|
77
|
-
label: _('nav.facets'),
|
|
78
|
-
icon: 'tag',
|
|
79
|
-
routerLink: ['/catalog', 'facets'],
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
requiresPermission: allow(Permission.ReadCatalog, Permission.ReadCollection),
|
|
83
|
-
id: 'collections',
|
|
84
|
-
label: _('nav.collections'),
|
|
85
|
-
icon: 'folder-open',
|
|
86
|
-
routerLink: ['/catalog', 'collections'],
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
requiresPermission: allow(Permission.ReadCatalog, Permission.ReadAsset),
|
|
90
|
-
id: 'assets',
|
|
91
|
-
label: _('nav.assets'),
|
|
92
|
-
icon: 'image-gallery',
|
|
93
|
-
routerLink: ['/catalog', 'assets'],
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 'sales',
|
|
99
|
-
label: _('nav.sales'),
|
|
100
|
-
requiresPermission: allow(Permission.ReadOrder),
|
|
101
|
-
items: [
|
|
102
|
-
{
|
|
103
|
-
requiresPermission: allow(Permission.ReadOrder),
|
|
104
|
-
id: 'orders',
|
|
105
|
-
label: _('nav.orders'),
|
|
106
|
-
routerLink: ['/orders'],
|
|
107
|
-
icon: 'shopping-cart',
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
id: 'customers',
|
|
113
|
-
label: _('nav.customers'),
|
|
114
|
-
requiresPermission: allow(Permission.ReadCustomer, Permission.ReadCustomerGroup),
|
|
115
|
-
items: [
|
|
116
|
-
{
|
|
117
|
-
requiresPermission: allow(Permission.ReadCustomer),
|
|
118
|
-
id: 'customers',
|
|
119
|
-
label: _('nav.customers'),
|
|
120
|
-
routerLink: ['/customer', 'customers'],
|
|
121
|
-
icon: 'user',
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
requiresPermission: allow(Permission.ReadCustomerGroup),
|
|
125
|
-
id: 'customer-groups',
|
|
126
|
-
label: _('nav.customer-groups'),
|
|
127
|
-
routerLink: ['/customer', 'groups'],
|
|
128
|
-
icon: 'users',
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
id: 'marketing',
|
|
134
|
-
label: _('nav.marketing'),
|
|
135
|
-
requiresPermission: allow(Permission.ReadPromotion),
|
|
136
|
-
items: [
|
|
137
|
-
{
|
|
138
|
-
requiresPermission: allow(Permission.ReadPromotion),
|
|
139
|
-
id: 'promotions',
|
|
140
|
-
label: _('nav.promotions'),
|
|
141
|
-
routerLink: ['/marketing', 'promotions'],
|
|
142
|
-
icon: 'asterisk',
|
|
143
|
-
},
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: 'settings',
|
|
148
|
-
label: _('nav.settings'),
|
|
149
|
-
requiresPermission: allow(Permission.ReadSettings, Permission.ReadChannel, Permission.ReadAdministrator, Permission.ReadShippingMethod, Permission.ReadPaymentMethod, Permission.ReadTaxCategory, Permission.ReadTaxRate, Permission.ReadCountry, Permission.ReadZone, Permission.UpdateGlobalSettings),
|
|
150
|
-
collapsible: true,
|
|
151
|
-
collapsedByDefault: true,
|
|
152
|
-
items: [
|
|
153
|
-
{
|
|
154
|
-
requiresPermission: allow(Permission.ReadChannel),
|
|
155
|
-
id: 'channels',
|
|
156
|
-
label: _('nav.channels'),
|
|
157
|
-
routerLink: ['/settings', 'channels'],
|
|
158
|
-
icon: 'layers',
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
requiresPermission: allow(Permission.ReadAdministrator),
|
|
162
|
-
id: 'administrators',
|
|
163
|
-
label: _('nav.administrators'),
|
|
164
|
-
routerLink: ['/settings', 'administrators'],
|
|
165
|
-
icon: 'administrator',
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
requiresPermission: allow(Permission.ReadAdministrator),
|
|
169
|
-
id: 'roles',
|
|
170
|
-
label: _('nav.roles'),
|
|
171
|
-
routerLink: ['/settings', 'roles'],
|
|
172
|
-
icon: 'users',
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
requiresPermission: allow(Permission.ReadShippingMethod),
|
|
176
|
-
id: 'shipping-methods',
|
|
177
|
-
label: _('nav.shipping-methods'),
|
|
178
|
-
routerLink: ['/settings', 'shipping-methods'],
|
|
179
|
-
icon: 'truck',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
requiresPermission: allow(Permission.ReadPaymentMethod),
|
|
183
|
-
id: 'payment-methods',
|
|
184
|
-
label: _('nav.payment-methods'),
|
|
185
|
-
routerLink: ['/settings', 'payment-methods'],
|
|
186
|
-
icon: 'credit-card',
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
requiresPermission: allow(Permission.ReadTaxCategory),
|
|
190
|
-
id: 'tax-categories',
|
|
191
|
-
label: _('nav.tax-categories'),
|
|
192
|
-
routerLink: ['/settings', 'tax-categories'],
|
|
193
|
-
icon: 'view-list',
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
requiresPermission: allow(Permission.ReadTaxRate),
|
|
197
|
-
id: 'tax-rates',
|
|
198
|
-
label: _('nav.tax-rates'),
|
|
199
|
-
routerLink: ['/settings', 'tax-rates'],
|
|
200
|
-
icon: 'calculator',
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
requiresPermission: allow(Permission.ReadCountry),
|
|
204
|
-
id: 'countries',
|
|
205
|
-
label: _('nav.countries'),
|
|
206
|
-
routerLink: ['/settings', 'countries'],
|
|
207
|
-
icon: 'flag',
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
requiresPermission: allow(Permission.ReadZone),
|
|
211
|
-
id: 'zones',
|
|
212
|
-
label: _('nav.zones'),
|
|
213
|
-
routerLink: ['/settings', 'zones'],
|
|
214
|
-
icon: 'world',
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
requiresPermission: allow(Permission.UpdateGlobalSettings),
|
|
218
|
-
id: 'global-settings',
|
|
219
|
-
label: _('nav.global-settings'),
|
|
220
|
-
routerLink: ['/settings', 'global-settings'],
|
|
221
|
-
icon: 'cog',
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
id: 'system',
|
|
227
|
-
label: _('nav.system'),
|
|
228
|
-
requiresPermission: Permission.ReadSystem,
|
|
229
|
-
collapsible: true,
|
|
230
|
-
collapsedByDefault: true,
|
|
231
|
-
items: [
|
|
232
|
-
{
|
|
233
|
-
id: 'job-queue',
|
|
234
|
-
label: _('nav.job-queue'),
|
|
235
|
-
routerLink: ['/system', 'jobs'],
|
|
236
|
-
icon: 'tick-chart',
|
|
237
|
-
statusBadge: this.jobQueueService.activeJobs$.pipe(startWith([]), map(jobs => ({
|
|
238
|
-
type: jobs.length === 0 ? 'none' : 'info',
|
|
239
|
-
propagateToSection: jobs.length > 0,
|
|
240
|
-
}))),
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
id: 'system-status',
|
|
244
|
-
label: _('nav.system-status'),
|
|
245
|
-
routerLink: ['/system', 'system-status'],
|
|
246
|
-
icon: 'rack-server',
|
|
247
|
-
statusBadge: this.healthCheckService.status$.pipe(map(status => ({
|
|
248
|
-
type: status === 'ok' ? 'success' : 'error',
|
|
249
|
-
propagateToSection: status === 'error',
|
|
250
|
-
}))),
|
|
251
|
-
},
|
|
252
|
-
],
|
|
253
|
-
},
|
|
254
|
-
]);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
MainNavComponent.decorators = [
|
|
258
|
-
{ type: Component, args: [{
|
|
259
|
-
selector: 'vdr-main-nav',
|
|
260
|
-
template: "<nav class=\"sidenav\" [clr-nav-level]=\"2\">\r\n <section class=\"sidenav-content\">\r\n <ng-container *ngFor=\"let section of navBuilderService.navMenuConfig$ | async\">\r\n <section\r\n class=\"nav-group\"\r\n [attr.data-section-id]=\"section.id\"\r\n [class.collapsible]=\"section.collapsible\"\r\n *ngIf=\"shouldDisplayLink(section)\"\r\n >\r\n <vdr-ui-extension-point [locationId]=\"section.id\" api=\"navMenu\" [topPx]=\"-6\" [leftPx]=\"8\">\r\n <ng-container *ngIf=\"navBuilderService.sectionBadges[section.id] | async as sectionBadge\">\r\n <vdr-status-badge\r\n *ngIf=\"sectionBadge !== 'none'\"\r\n [type]=\"sectionBadge\"\r\n ></vdr-status-badge>\r\n </ng-container>\r\n <input [id]=\"section.id\" type=\"checkbox\" [checked]=\"section.collapsedByDefault\" />\r\n <label class=\"nav-group-header\" [for]=\"section.id\">{{ section.label | translate }}</label>\r\n <ul class=\"nav-list\">\r\n <ng-container *ngFor=\"let item of section.items\">\r\n <li *ngIf=\"shouldDisplayLink(item)\">\r\n <a\r\n class=\"nav-link\"\r\n [attr.data-item-id]=\"section.id\"\r\n [routerLink]=\"getRouterLink(item)\"\r\n routerLinkActive=\"active\"\r\n >\r\n <ng-container *ngIf=\"item.statusBadge | async as itemBadge\">\r\n <vdr-status-badge\r\n *ngIf=\"itemBadge.type !== 'none'\"\r\n [type]=\"itemBadge.type\"\r\n ></vdr-status-badge>\r\n </ng-container>\r\n <clr-icon [attr.shape]=\"item.icon || 'block'\" size=\"20\"></clr-icon>\r\n {{ item.label | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </vdr-ui-extension-point>\r\n </section>\r\n </ng-container>\r\n </section>\r\n</nav>\r\n",
|
|
261
|
-
styles: [":host{order:-1;background-color:var(--clr-nav-background-color)}nav.sidenav{height:100%;width:10.8rem;border-right-color:var(--clr-sidenav-border-color)}.sidenav .nav-group .nav-list{margin:0}.sidenav .nav-group .nav-group-header{margin:0;line-height:1.2}.sidenav .nav-group .nav-link{display:inline-flex;line-height:1rem;padding-right:.6rem}.nav-list clr-icon{flex-shrink:0;margin-right:12px}.nav-group{-webkit-hyphens:auto;hyphens:auto}.nav-group,.nav-link{position:relative}.nav-group vdr-status-badge{left:10px;top:6px}.nav-link vdr-status-badge{left:25px;top:3px}\n"]
|
|
262
|
-
},] }
|
|
263
|
-
];
|
|
264
|
-
MainNavComponent.ctorParameters = () => [
|
|
265
|
-
{ type: ActivatedRoute },
|
|
266
|
-
{ type: Router },
|
|
267
|
-
{ type: NavBuilderService },
|
|
268
|
-
{ type: HealthCheckService },
|
|
269
|
-
{ type: JobQueueService },
|
|
270
|
-
{ type: DataService }
|
|
271
|
-
];
|
|
272
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi1uYXYuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9jb21wb25lbnRzL21haW4tbmF2L21haW4tbmF2LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQyxFQUFFLE1BQU0seUNBQXlDLENBQUM7QUFFdEUsT0FBTyxFQUFFLEdBQUcsRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVoRCxPQ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zcGxheUxpbmsobWVudUl0ZW06IFBpY2s8TmF2TWVudUl0ZW0sICdyZXF1aXJlc1Blcm1pc3Npb24nPikge1xuICAgICAgICBpZiAoIXRoaXMudXNlclBlcm1pc3Npb25zKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFtZW51SXRlbS5yZXF1aXJlc1Blcm1pc3Npb24pIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlb2YgbWVudUl0ZW0ucmVxdWlyZXNQZXJtaXNzaW9uID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMudXNlclBlcm1pc3Npb25zLmluY2x1ZGVzKG1lbnVJdGVtLnJlcXVpcmVzUGVybWlzc2lvbik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHR5cGVvZiBtZW51SXRlbS5yZXF1aXJlc1Blcm1pc3Npb24gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHJldHVybiBtZW51SXRlbS5yZXF1aXJlc1Blcm1pc3Npb24odGhpcy51c2VyUGVybWlzc2lvbnMpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgbmdPbkluaXQoKTogdm9pZCB7XG4gICAgICAgIHRoaXMuZGVmaW5lTmF2TWVudSgpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbiA9IHRoaXMuZGF0YVNlcnZpY2UuY2xpZW50XG4gICAgICAgICAgICAudXNlclN0YXR1cygpXG4gICAgICAgICAgICAubWFwU3RyZWFtKCh7IHVzZXJTdGF0dXMgfSkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMudXNlclBlcm1pc3Npb25zID0gdXNlclN0YXR1cy5wZXJtaXNzaW9ucztcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuc3Vic2NyaWJlKCk7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIGlmICh0aGlzLnN1YnNjcmlwdGlvbikge1xuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdldFJvdXRlckxpbmsoaXRlbTogTmF2TWVudUl0ZW0pIHtcbiAgICAgICAgcmV0dXJuIHRoaXMubmF2QnVpbGRlclNlcnZpY2UuZ2V0Um91dGVyTGluayhpdGVtLCB0aGlzLnJvdXRlKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGRlZmluZU5hdk1lbnUoKSB7XG4gICAgICAgIGZ1bmN0aW9uIGFsbG93KC4uLnBlcm1pc3Npb25zOiBzdHJpbmdbXSk6ICh1c2VyUGVybWlzc2lvbnM6IHN0cmluZ1tdKSA9PiBib29sZWFuIHtcbiAgICAgICAgICAgIHJldHVybiB1c2VyUGVybWlzc2lvbnMgPT4ge1xuICAgICAgICAgICAgICAgIGZvciAoY29uc3QgcGVybWlzc2lvbiBvZiBwZXJtaXNzaW9ucykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodXNlclBlcm1pc3Npb25zLmluY2x1ZGVzKHBlcm1pc3Npb24pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5uYXZCdWlsZGVyU2VydmljZS5kZWZpbmVOYXZNZW51U2VjdGlvbnMoW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uUmVhZENhdGFsb2csXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uUmVhZFByb2R1Y3QsXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uUmVhZEZhY2V0LFxuICAgICAgICAgICAgICAgICAgICBQZXJtaXNzaW9uLlJlYWRDb2xsZWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICBQZXJtaXNzaW9uLlJlYWRBc3NldCxcbiAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIGlkOiAnY2F0YWxvZycsXG4gICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5jYXRhbG9nJyksXG4gICAgICAgICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRDYXRhbG9nLCBQZXJtaXNzaW9uLlJlYWRQcm9kdWN0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAncHJvZHVjdHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5wcm9kdWN0cycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ2xpYnJhcnknLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyTGluazogWycvY2F0YWxvZycsICdwcm9kdWN0cyddLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlc1Blcm1pc3Npb246IGFsbG93KFBlcm1pc3Npb24uUmVhZENhdGFsb2csIFBlcm1pc3Npb24uUmVhZEZhY2V0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAnZmFjZXRzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCduYXYuZmFjZXRzJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAndGFnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL2NhdGFsb2cnLCAnZmFjZXRzJ10sXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coUGVybWlzc2lvbi5SZWFkQ2F0YWxvZywgUGVybWlzc2lvbi5SZWFkQ29sbGVjdGlvbiksXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogJ2NvbGxlY3Rpb25zJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCduYXYuY29sbGVjdGlvbnMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdmb2xkZXItb3BlbicsXG4gICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXJMaW5rOiBbJy9jYXRhbG9nJywgJ2NvbGxlY3Rpb25zJ10sXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coUGVybWlzc2lvbi5SZWFkQ2F0YWxvZywgUGVybWlzc2lvbi5SZWFkQXNzZXQpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdhc3NldHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5hc3NldHMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdpbWFnZS1nYWxsZXJ5JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL2NhdGFsb2cnLCAnYXNzZXRzJ10sXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWQ6ICdzYWxlcycsXG4gICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5zYWxlcycpLFxuICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coUGVybWlzc2lvbi5SZWFkT3JkZXIpLFxuICAgICAgICAgICAgICAgIGl0ZW1zOiBbXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coUGVybWlzc2lvbi5SZWFkT3JkZXIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdvcmRlcnMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5vcmRlcnMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL29yZGVycyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ3Nob3BwaW5nLWNhcnQnLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGlkOiAnY3VzdG9tZXJzJyxcbiAgICAgICAgICAgICAgICBsYWJlbDogXygnbmF2LmN1c3RvbWVycycpLFxuICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coUGVybWlzc2lvbi5SZWFkQ3VzdG9tZXIsIFBlcm1pc3Npb24uUmVhZEN1c3RvbWVyR3JvdXApLFxuICAgICAgICAgICAgICAgIGl0ZW1zOiBbXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coUGVybWlzc2lvbi5SZWFkQ3VzdG9tZXIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdjdXN0b21lcnMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5jdXN0b21lcnMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL2N1c3RvbWVyJywgJ2N1c3RvbWVycyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ3VzZXInLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlc1Blcm1pc3Npb246IGFsbG93KFBlcm1pc3Npb24uUmVhZEN1c3RvbWVyR3JvdXApLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdjdXN0b21lci1ncm91cHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5jdXN0b21lci1ncm91cHMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL2N1c3RvbWVyJywgJ2dyb3VwcyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ3VzZXJzJyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZDogJ21hcmtldGluZycsXG4gICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5tYXJrZXRpbmcnKSxcbiAgICAgICAgICAgICAgICByZXF1aXJlc1Blcm1pc3Npb246IGFsbG93KFBlcm1pc3Npb24uUmVhZFByb21vdGlvbiksXG4gICAgICAgICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRQcm9tb3Rpb24pLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdwcm9tb3Rpb25zJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCduYXYucHJvbW90aW9ucycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyTGluazogWycvbWFya2V0aW5nJywgJ3Byb21vdGlvbnMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdhc3RlcmlzaycsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWQ6ICdzZXR0aW5ncycsXG4gICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5zZXR0aW5ncycpLFxuICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uUmVhZFNldHRpbmdzLFxuICAgICAgICAgICAgICAgICAgICBQZXJtaXNzaW9uLlJlYWRDaGFubmVsLFxuICAgICAgICAgICAgICAgICAgICBQZXJtaXNzaW9uLlJlYWRBZG1pbmlzdHJhdG9yLFxuICAgICAgICAgICAgICAgICAgICBQZXJtaXNzaW9uLlJlYWRTaGlwcGluZ01ldGhvZCxcbiAgICAgICAgICAgICAgICAgICAgUGVybWlzc2lvbi5SZWFkUGF5bWVudE1ldGhvZCxcbiAgICAgICAgICAgICAgICAgICAgUGVybWlzc2lvbi5SZWFkVGF4Q2F0ZWdvcnksXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uUmVhZFRheFJhdGUsXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uUmVhZENvdW50cnksXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uUmVhZFpvbmUsXG4gICAgICAgICAgICAgICAgICAgIFBlcm1pc3Npb24uVXBkYXRlR2xvYmFsU2V0dGluZ3MsXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICBjb2xsYXBzaWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb2xsYXBzZWRCeURlZmF1bHQ6IHRydWUsXG4gICAgICAgICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRDaGFubmVsKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAnY2hhbm5lbHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5jaGFubmVscycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyTGluazogWycvc2V0dGluZ3MnLCAnY2hhbm5lbHMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdsYXllcnMnLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlc1Blcm1pc3Npb246IGFsbG93KFBlcm1pc3Npb24uUmVhZEFkbWluaXN0cmF0b3IpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdhZG1pbmlzdHJhdG9ycycsXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogXygnbmF2LmFkbWluaXN0cmF0b3JzJyksXG4gICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXJMaW5rOiBbJy9zZXR0aW5ncycsICdhZG1pbmlzdHJhdG9ycyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ2FkbWluaXN0cmF0b3InLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlc1Blcm1pc3Npb246IGFsbG93KFBlcm1pc3Npb24uUmVhZEFkbWluaXN0cmF0b3IpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdyb2xlcycsXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogXygnbmF2LnJvbGVzJyksXG4gICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXJMaW5rOiBbJy9zZXR0aW5ncycsICdyb2xlcyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ3VzZXJzJyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRTaGlwcGluZ01ldGhvZCksXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogJ3NoaXBwaW5nLW1ldGhvZHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5zaGlwcGluZy1tZXRob2RzJyksXG4gICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXJMaW5rOiBbJy9zZXR0aW5ncycsICdzaGlwcGluZy1tZXRob2RzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAndHJ1Y2snLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlc1Blcm1pc3Npb246IGFsbG93KFBlcm1pc3Npb24uUmVhZFBheW1lbnRNZXRob2QpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdwYXltZW50LW1ldGhvZHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5wYXltZW50LW1ldGhvZHMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL3NldHRpbmdzJywgJ3BheW1lbnQtbWV0aG9kcyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ2NyZWRpdC1jYXJkJyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRUYXhDYXRlZ29yeSksXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogJ3RheC1jYXRlZ29yaWVzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCduYXYudGF4LWNhdGVnb3JpZXMnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL3NldHRpbmdzJywgJ3RheC1jYXRlZ29yaWVzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAndmlldy1saXN0JyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRUYXhSYXRlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAndGF4LXJhdGVzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCduYXYudGF4LXJhdGVzJyksXG4gICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXJMaW5rOiBbJy9zZXR0aW5ncycsICd0YXgtcmF0ZXMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdjYWxjdWxhdG9yJyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRDb3VudHJ5KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAnY291bnRyaWVzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCduYXYuY291bnRyaWVzJyksXG4gICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXJMaW5rOiBbJy9zZXR0aW5ncycsICdjb3VudHJpZXMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdmbGFnJyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZXNQZXJtaXNzaW9uOiBhbGxvdyhQZXJtaXNzaW9uLlJlYWRab25lKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAnem9uZXMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi56b25lcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyTGluazogWycvc2V0dGluZ3MnLCAnem9uZXMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICd3b3JsZCcsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVzUGVybWlzc2lvbjogYWxsb3coUGVybWlzc2lvbi5VcGRhdGVHbG9iYWxTZXR0aW5ncyksXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogJ2dsb2JhbC1zZXR0aW5ncycsXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogXygnbmF2Lmdsb2JhbC1zZXR0aW5ncycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyTGluazogWycvc2V0dGluZ3MnLCAnZ2xvYmFsLXNldHRpbmdzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAnY29nJyxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZDogJ3N5c3RlbScsXG4gICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5zeXN0ZW0nKSxcbiAgICAgICAgICAgICAgICByZXF1aXJlc1Blcm1pc3Npb246IFBlcm1pc3Npb24uUmVhZFN5c3RlbSxcbiAgICAgICAgICAgICAgICBjb2xsYXBzaWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb2xsYXBzZWRCeURlZmF1bHQ6IHRydWUsXG4gICAgICAgICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdqb2ItcXVldWUnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ25hdi5qb2ItcXVldWUnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlckxpbms6IFsnL3N5c3RlbScsICdqb2JzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAndGljay1jaGFydCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXNCYWRnZTogdGhpcy5qb2JRdWV1ZVNlcnZpY2UuYWN0aXZlSm9icyQucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydFdpdGgoW10pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgam9icyA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBqb2JzLmxlbmd0aCA9PT0gMCA/ICdub25lJyA6ICdpbmZvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wYWdhdGVUb1NlY3Rpb246IGpvYnMubGVuZ3RoID4gMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gYXMgTmF2TWVudUJhZGdlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICdzeXN0ZW0tc3RhdHVzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCduYXYuc3lzdGVtLXN0YXR1cycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyTGluazogWycvc3lzdGVtJywgJ3N5c3RlbS1zdGF0dXMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdyYWNrLXNlcnZlcicsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXNCYWRnZTogdGhpcy5oZWFsdGhDaGVja1NlcnZpY2Uuc3RhdHVzJC5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcChzdGF0dXMgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogc3RhdHVzID09PSAnb2snID8gJ3N1Y2Nlc3MnIDogJ2Vycm9yJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGFnYXRlVG9TZWN0aW9uOiBzdGF0dXMgPT09ICdlcnJvcicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgXSk7XG4gICAgfVxufVxuIl19
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Component, HostListener, ViewChild } from '@angular/core';
|
|
2
|
-
export class NotificationComponent {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.offsetTop = 0;
|
|
5
|
-
this.message = '';
|
|
6
|
-
this.translationVars = {};
|
|
7
|
-
this.type = 'info';
|
|
8
|
-
this.isVisible = true;
|
|
9
|
-
this.onClickFn = () => {
|
|
10
|
-
/* */
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
registerOnClickFn(fn) {
|
|
14
|
-
this.onClickFn = fn;
|
|
15
|
-
}
|
|
16
|
-
onClick() {
|
|
17
|
-
if (this.isVisible) {
|
|
18
|
-
this.onClickFn();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Fade out the toast. When promise resolves, toast is invisible and
|
|
23
|
-
* can be removed.
|
|
24
|
-
*/
|
|
25
|
-
fadeOut() {
|
|
26
|
-
this.isVisible = false;
|
|
27
|
-
return new Promise(resolve => setTimeout(resolve, 1000));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Returns the height of the toast element in px.
|
|
31
|
-
*/
|
|
32
|
-
getHeight() {
|
|
33
|
-
if (!this.wrapper) {
|
|
34
|
-
return 0;
|
|
35
|
-
}
|
|
36
|
-
const el = this.wrapper.nativeElement;
|
|
37
|
-
return el.getBoundingClientRect().height;
|
|
38
|
-
}
|
|
39
|
-
getIcon() {
|
|
40
|
-
switch (this.type) {
|
|
41
|
-
case 'info':
|
|
42
|
-
return 'info-circle';
|
|
43
|
-
case 'success':
|
|
44
|
-
return 'check-circle';
|
|
45
|
-
case 'error':
|
|
46
|
-
return 'exclamation-circle';
|
|
47
|
-
case 'warning':
|
|
48
|
-
return 'exclamation-triangle';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
stringifyMessage(message) {
|
|
52
|
-
if (typeof message === 'string') {
|
|
53
|
-
return message;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
return JSON.stringify(message, null, 2);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
NotificationComponent.decorators = [
|
|
61
|
-
{ type: Component, args: [{
|
|
62
|
-
selector: 'vdr-notification',
|
|
63
|
-
template: "<div\r\n class=\"notification-wrapper\"\r\n #wrapper\r\n [style.top.px]=\"offsetTop\"\r\n [ngClass]=\"{\r\n visible: isVisible,\r\n info: type === 'info',\r\n success: type === 'success',\r\n error: type === 'error',\r\n warning: type === 'warning'\r\n }\"\r\n>\r\n <clr-icon [attr.shape]=\"getIcon()\" size=\"24\"></clr-icon>\r\n {{ stringifyMessage(message) | translate: translationVars }}\r\n</div>\r\n",
|
|
64
|
-
styles: ["@keyframes fadeIn{0%{opacity:0}to{opacity:.95}}:host{position:relative;z-index:1050}:host>.notification-wrapper{display:block;position:fixed;z-index:1001;top:0;right:10px;border-radius:3px;max-width:98vw;word-wrap:break-word;padding:10px;background-color:var(--color-grey-500);color:#fff;transition:opacity 1s,top .3s;opacity:0;white-space:pre-line}:host>.notification-wrapper.success{background-color:var(--color-success-500)}:host>.notification-wrapper.error{background-color:var(--color-error-500)}:host>.notification-wrapper.warning{background-color:var(--color-warning-500)}:host>.notification-wrapper.info{background-color:var(--color-secondary-500)}:host>.notification-wrapper.visible{opacity:.95;animation:fadeIn .3s .3s backwards}\n"]
|
|
65
|
-
},] }
|
|
66
|
-
];
|
|
67
|
-
NotificationComponent.propDecorators = {
|
|
68
|
-
wrapper: [{ type: ViewChild, args: ['wrapper', { static: true },] }],
|
|
69
|
-
onClick: [{ type: HostListener, args: ['click',] }]
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvY29tcG9uZW50cy9ub3RpZmljYXRpb24vbm90aWZpY2F0aW9uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFjLFlBQVksRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFTL0UsTUFBTSxPQUFPLHFCQUFxQjtJQUxsQztRQU9JLGNBQVMsR0FBRyxDQUFDLENBQUM7UUFDZCxZQUFPLEdBQUcsRUFBRSxDQUFDO1FBQ2Isb0JBQWUsR0FBdUMsRUFBRSxDQUFDO1FBQ3pELFNBQUksR0FBcUIsTUFBTSxDQUFDO1FBQ2hDLGNBQVMsR0FBRyxJQUFJLENBQUM7UUFDVCxjQUFTLEdBQWUsR0FBRyxFQUFFO1lBQ2pDLEtBQUs7UUFDVCxDQUFDLENBQUE7SUFxREwsQ0FBQztJQW5ERyxpQkFBaUIsQ0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AgICAgICBjb25zdCBlbDogSFRNTEVsZW1lbnQgPSB0aGlzLndyYXBwZXIubmF0aXZlRWxlbWVudDtcclxuICAgICAgICByZXR1cm4gZWwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkuaGVpZ2h0O1xyXG4gICAgfVxyXG5cclxuICAgIGdldEljb24oKTogc3RyaW5nIHtcclxuICAgICAgICBzd2l0Y2ggKHRoaXMudHlwZSkge1xyXG4gICAgICAgICAgICBjYXNlICdpbmZvJzpcclxuICAgICAgICAgICAgICAgIHJldHVybiAnaW5mby1jaXJjbGUnO1xyXG4gICAgICAgICAgICBjYXNlICdzdWNjZXNzJzpcclxuICAgICAgICAgICAgICAgIHJldHVybiAnY2hlY2stY2lyY2xlJztcclxuICAgICAgICAgICAgY2FzZSAnZXJyb3InOlxyXG4gICAgICAgICAgICAgICAgcmV0dXJuICdleGNsYW1hdGlvbi1jaXJjbGUnO1xyXG4gICAgICAgICAgICBjYXNlICd3YXJuaW5nJzpcclxuICAgICAgICAgICAgICAgIHJldHVybiAnZXhjbGFtYXRpb24tdHJpYW5nbGUnO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBzdHJpbmdpZnlNZXNzYWdlKG1lc3NhZ2U6IHVua25vd24pIHtcclxuICAgICAgICBpZiAodHlwZW9mIG1lc3NhZ2UgPT09ICdzdHJpbmcnKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBtZXNzYWdlO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShtZXNzYWdlLCBudWxsLCAyKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIl19
|