@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
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { pick } from '@vendure/common/lib/pick';
|
|
2
|
+
import { JobState } from '../../common/generated-types';
|
|
3
|
+
import { ADD_MEMBERS_TO_ZONE, CANCEL_JOB, CREATE_CHANNEL, CREATE_COUNTRY, CREATE_PAYMENT_METHOD, CREATE_TAX_CATEGORY, CREATE_TAX_RATE, CREATE_ZONE, DELETE_CHANNEL, DELETE_COUNTRY, DELETE_PAYMENT_METHOD, DELETE_TAX_CATEGORY, DELETE_TAX_RATE, DELETE_ZONE, GET_ACTIVE_CHANNEL, GET_AVAILABLE_COUNTRIES, GET_CHANNEL, GET_CHANNELS, GET_COUNTRY, GET_COUNTRY_LIST, GET_GLOBAL_SETTINGS, GET_JOBS_BY_ID, GET_JOBS_LIST, GET_JOB_INFO, GET_JOB_QUEUE_LIST, GET_PAYMENT_METHOD, GET_PAYMENT_METHOD_LIST, GET_PAYMENT_METHOD_OPERATIONS, GET_TAX_CATEGORIES, GET_TAX_CATEGORY, GET_TAX_RATE, GET_TAX_RATE_LIST, GET_TAX_RATE_LIST_SIMPLE, GET_ZONES, REMOVE_MEMBERS_FROM_ZONE, UPDATE_CHANNEL, UPDATE_COUNTRY, UPDATE_GLOBAL_SETTINGS, UPDATE_PAYMENT_METHOD, UPDATE_TAX_CATEGORY, UPDATE_TAX_RATE, UPDATE_ZONE, } from '../definitions/settings-definitions';
|
|
4
|
+
export class SettingsDataService {
|
|
5
|
+
constructor(baseDataService) {
|
|
6
|
+
this.baseDataService = baseDataService;
|
|
7
|
+
}
|
|
8
|
+
getCountries(take = 10, skip = 0, filterTerm) {
|
|
9
|
+
return this.baseDataService.query(GET_COUNTRY_LIST, {
|
|
10
|
+
options: {
|
|
11
|
+
take,
|
|
12
|
+
skip,
|
|
13
|
+
filter: {
|
|
14
|
+
name: filterTerm ? { contains: filterTerm } : null,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
getAvailableCountries() {
|
|
20
|
+
return this.baseDataService.query(GET_AVAILABLE_COUNTRIES);
|
|
21
|
+
}
|
|
22
|
+
getCountry(id) {
|
|
23
|
+
return this.baseDataService.query(GET_COUNTRY, { id });
|
|
24
|
+
}
|
|
25
|
+
createCountry(input) {
|
|
26
|
+
return this.baseDataService.mutate(CREATE_COUNTRY, {
|
|
27
|
+
input: pick(input, ['code', 'enabled', 'translations', 'customFields']),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
updateCountry(input) {
|
|
31
|
+
return this.baseDataService.mutate(UPDATE_COUNTRY, {
|
|
32
|
+
input: pick(input, ['id', 'code', 'enabled', 'translations', 'customFields']),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
deleteCountry(id) {
|
|
36
|
+
return this.baseDataService.mutate(DELETE_COUNTRY, {
|
|
37
|
+
id,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
getZones() {
|
|
41
|
+
return this.baseDataService.query(GET_ZONES);
|
|
42
|
+
}
|
|
43
|
+
getZone(id) {
|
|
44
|
+
return this.baseDataService.query(GET_ZONES, {
|
|
45
|
+
id,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
createZone(input) {
|
|
49
|
+
return this.baseDataService.mutate(CREATE_ZONE, {
|
|
50
|
+
input,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
updateZone(input) {
|
|
54
|
+
return this.baseDataService.mutate(UPDATE_ZONE, {
|
|
55
|
+
input,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
deleteZone(id) {
|
|
59
|
+
return this.baseDataService.mutate(DELETE_ZONE, {
|
|
60
|
+
id,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
addMembersToZone(zoneId, memberIds) {
|
|
64
|
+
return this.baseDataService.mutate(ADD_MEMBERS_TO_ZONE, {
|
|
65
|
+
zoneId,
|
|
66
|
+
memberIds,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
removeMembersFromZone(zoneId, memberIds) {
|
|
70
|
+
return this.baseDataService.mutate(REMOVE_MEMBERS_FROM_ZONE, {
|
|
71
|
+
zoneId,
|
|
72
|
+
memberIds,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
getTaxCategories() {
|
|
76
|
+
return this.baseDataService.query(GET_TAX_CATEGORIES);
|
|
77
|
+
}
|
|
78
|
+
getTaxCategory(id) {
|
|
79
|
+
return this.baseDataService.query(GET_TAX_CATEGORY, {
|
|
80
|
+
id,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
createTaxCategory(input) {
|
|
84
|
+
return this.baseDataService.mutate(CREATE_TAX_CATEGORY, {
|
|
85
|
+
input,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
updateTaxCategory(input) {
|
|
89
|
+
return this.baseDataService.mutate(UPDATE_TAX_CATEGORY, {
|
|
90
|
+
input,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
deleteTaxCategory(id) {
|
|
94
|
+
return this.baseDataService.mutate(DELETE_TAX_CATEGORY, {
|
|
95
|
+
id,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
getTaxRates(take = 10, skip = 0, fetchPolicy) {
|
|
99
|
+
return this.baseDataService.query(GET_TAX_RATE_LIST, {
|
|
100
|
+
options: {
|
|
101
|
+
take,
|
|
102
|
+
skip,
|
|
103
|
+
},
|
|
104
|
+
}, fetchPolicy);
|
|
105
|
+
}
|
|
106
|
+
getTaxRatesSimple(take = 10, skip = 0, fetchPolicy) {
|
|
107
|
+
return this.baseDataService.query(GET_TAX_RATE_LIST_SIMPLE, {
|
|
108
|
+
options: {
|
|
109
|
+
take,
|
|
110
|
+
skip,
|
|
111
|
+
},
|
|
112
|
+
}, fetchPolicy);
|
|
113
|
+
}
|
|
114
|
+
getTaxRate(id) {
|
|
115
|
+
return this.baseDataService.query(GET_TAX_RATE, {
|
|
116
|
+
id,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
createTaxRate(input) {
|
|
120
|
+
return this.baseDataService.mutate(CREATE_TAX_RATE, {
|
|
121
|
+
input,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
updateTaxRate(input) {
|
|
125
|
+
return this.baseDataService.mutate(UPDATE_TAX_RATE, {
|
|
126
|
+
input,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
deleteTaxRate(id) {
|
|
130
|
+
return this.baseDataService.mutate(DELETE_TAX_RATE, {
|
|
131
|
+
id,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
getChannels() {
|
|
135
|
+
return this.baseDataService.query(GET_CHANNELS);
|
|
136
|
+
}
|
|
137
|
+
getChannel(id) {
|
|
138
|
+
return this.baseDataService.query(GET_CHANNEL, {
|
|
139
|
+
id,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
getActiveChannel(fetchPolicy) {
|
|
143
|
+
return this.baseDataService.query(GET_ACTIVE_CHANNEL, {}, fetchPolicy);
|
|
144
|
+
}
|
|
145
|
+
createChannel(input) {
|
|
146
|
+
return this.baseDataService.mutate(CREATE_CHANNEL, {
|
|
147
|
+
input,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
updateChannel(input) {
|
|
151
|
+
return this.baseDataService.mutate(UPDATE_CHANNEL, {
|
|
152
|
+
input,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
deleteChannel(id) {
|
|
156
|
+
return this.baseDataService.mutate(DELETE_CHANNEL, {
|
|
157
|
+
id,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
getPaymentMethods(take = 10, skip = 0) {
|
|
161
|
+
return this.baseDataService.query(GET_PAYMENT_METHOD_LIST, {
|
|
162
|
+
options: {
|
|
163
|
+
skip,
|
|
164
|
+
take,
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
getPaymentMethod(id) {
|
|
169
|
+
return this.baseDataService.query(GET_PAYMENT_METHOD, {
|
|
170
|
+
id,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
createPaymentMethod(input) {
|
|
174
|
+
return this.baseDataService.mutate(CREATE_PAYMENT_METHOD, {
|
|
175
|
+
input,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
updatePaymentMethod(input) {
|
|
179
|
+
return this.baseDataService.mutate(UPDATE_PAYMENT_METHOD, {
|
|
180
|
+
input,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
deletePaymentMethod(id, force) {
|
|
184
|
+
return this.baseDataService.mutate(DELETE_PAYMENT_METHOD, {
|
|
185
|
+
id,
|
|
186
|
+
force,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
getPaymentMethodOperations() {
|
|
190
|
+
return this.baseDataService.query(GET_PAYMENT_METHOD_OPERATIONS);
|
|
191
|
+
}
|
|
192
|
+
getGlobalSettings(fetchPolicy) {
|
|
193
|
+
return this.baseDataService.query(GET_GLOBAL_SETTINGS, undefined, fetchPolicy);
|
|
194
|
+
}
|
|
195
|
+
updateGlobalSettings(input) {
|
|
196
|
+
return this.baseDataService.mutate(UPDATE_GLOBAL_SETTINGS, {
|
|
197
|
+
input,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
getJob(id) {
|
|
201
|
+
return this.baseDataService.query(GET_JOB_INFO, {
|
|
202
|
+
id,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
pollJobs(ids) {
|
|
206
|
+
return this.baseDataService.query(GET_JOBS_BY_ID, {
|
|
207
|
+
ids,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
getAllJobs(options) {
|
|
211
|
+
return this.baseDataService.query(GET_JOBS_LIST, {
|
|
212
|
+
options,
|
|
213
|
+
}, 'cache-first');
|
|
214
|
+
}
|
|
215
|
+
getJobQueues() {
|
|
216
|
+
return this.baseDataService.query(GET_JOB_QUEUE_LIST);
|
|
217
|
+
}
|
|
218
|
+
getRunningJobs() {
|
|
219
|
+
return this.baseDataService.query(GET_JOBS_LIST, {
|
|
220
|
+
options: {
|
|
221
|
+
filter: {
|
|
222
|
+
state: {
|
|
223
|
+
eq: JobState.RUNNING,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
cancelJob(id) {
|
|
230
|
+
return this.baseDataService.mutate(CANCEL_JOB, {
|
|
231
|
+
id,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dGluZ3MtZGF0YS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9kYXRhL3Byb3ZpZGVycy9zZXR0aW5ncy1kYXRhLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBR2hELE9BQU8sRUFBa0IsUUFBUSxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDeEUsT0FBTyxFQUNILG1CQUFtQixFQUNuQixVQUFVLEVBQ1YsY0FBYyxFQUNkLGNBQWMsRUFDZCxxQkFBcUIsRUFDckIsbUJBQW1CLEVBQ25CLGVBQWUsRUFDZixXQUFXLEVBQ1gsY0FBYyxFQUNkLGNBQWMsRUFDZCxxQkFBcUIsRUFDckIsbUJBQW1CLEVBQ25CLGVBQWUsRUFDZixXQUFXLEVBQ1gsa0JBQWtCLEVBQ2xCLHVCQUF1QixFQUN2QixXQUFXLEVBQ1gsWUFBWSxFQUNaLFdBQVcsRUFDWCxnQkFBZ0IsRUFDaEIsbUJBQW1CLEVBQ25CLGNBQWMsRUFDZCxhQUFhLEVBQ2IsWUFBWSxFQUNaLGtCQUFrQixFQUNsQixrQkFBa0IsRUFDbEIsdUJBQXVCLEVBQ3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F0YVNlcnZpY2Uge1xyXG4gICAgY29uc3RydWN0b3IocHJpdmF0ZSBiYXNlRGF0YVNlcnZpY2U6IEJhc2VEYXRhU2VydmljZSkge31cclxuXHJcbiAgICBnZXRDb3VudHJpZXModGFrZTogbnVtYmVyID0gMTAsIHNraXA6IG51bWJlciA9IDAsIGZpbHRlclRlcm0/OiBzdHJpbmcpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8XHJcbiAgICAgICAgICAgIENvZGVnZW4uR2V0Q291bnRyeUxpc3RRdWVyeSxcclxuICAgICAgICAgICAgQ29kZWdlbi5HZXRDb2xsZWN0aW9uTGlzdFF1ZXJ5VmFyaWFibGVzXHJcbiAgICAgICAgPihHRVRfQ09VTlRSWV9MSVNULCB7XHJcbiAgICAgICAgICAgIG9wdGlvbnM6IHtcclxuICAgICAgICAgICAgICAgIHRha2UsXHJcbiAgICAgICAgICAgICAgICBza2lwLFxyXG4gICAgICAgICAgICAgICAgZmlsdGVyOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogZmlsdGVyVGVybSA/IHsgY29udGFpbnM6IGZpbHRlclRlcm0gfSA6IG51bGwsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGdldEF2YWlsYWJsZUNvdW50cmllcygpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8Q29kZWdlbi5HZXRBdmFpbGFibGVDb3VudHJpZXNRdWVyeT4oR0VUX0FWQUlMQUJMRV9DT1VOVFJJRVMpO1xyXG4gICAgfVxyXG5cclxuICAgIGdldENvdW50cnkoaWQ6IHN0cmluZykge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmJhc2VEYXRhU2VydmljZS5xdWVyeTxDb2RlZ2VuLkdldENvdW50cnlRdWVyeSwgQ29kZWdlbi5HZX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hdGVab25lKGlucHV0OiBDb2RlZ2VuLlVwZGF0ZVpvbmVJbnB1dCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmJhc2VEYXRhU2VydmljZS5tdXRhdGU8Q29kZWdlbi5VcGRhdGVab25lTXV0YXRpb24sIENvZGVnZW4uVXBkYXRlWm9uZU11dGF0aW9uVmFyaWFibGVzPihcclxuICAgICAgICAgICAgVVBEQVRFX1pPTkUsXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGlucHV0LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcblxyXG4gICAgZGVsZXRlWm9uZShpZDogc3RyaW5nKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLm11dGF0ZTxDb2RlZ2VuLkRlbGV0ZVpvbmVNdXRhdGlvbiwgQ29kZWdlbi5EZWxldGVab25lTXV0YXRpb25WYXJpYWJsZXM+KFxyXG4gICAgICAgICAgICBERUxFVEVfWk9ORSxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgaWQsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgKTtcclxuICAgIH1cclxuXHJcbiAgICBhZGRNZW1iZXJzVG9ab25lKHpvbmVJZDogc3RyaW5nLCBtZW1iZXJJZHM6IHN0cmluZ1tdKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLm11dGF0ZTxcclxuICAgICAgICAgICAgQ29kZWdlbi5BZGRNZW1iZXJzVG9ab25lTXV0YXRpb24sXHJcbiAgICAgICAgICAgIENvZGVnZW4uQWRkTWVtYmVyc1RvWm9uZU11dGF0aW9uVmFyaWFibGVzXHJcbiAgICAgICAgPihBRERfTUVNQkVSU19UT19aT05FLCB7XHJcbiAgICAgICAgICAgIHpvbmVJZCxcclxuICAgICAgICAgICAgbWVtYmVySWRzLFxyXG4gICAgICAgIH0pO1xyXG4gIC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Rha2U6IG51bWJlciA9IDEwLCBza2lwOiBudW1iZXIgPSAwLCBmZXRjaFBvbGljeT86IEZldGNoUG9saWN5KSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLnF1ZXJ5PENvZGVnZW4uR2V0VGF4UmF0ZUxpc3RRdWVyeSwgQ29kZWdlbi5HZXRUYXhSYXRlTGlzdFF1ZXJ5VmFyaWFibGVzPihcclxuICAgICAgICAgICAgR0VUX1RBWF9SQVRFX0xJU1QsXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIG9wdGlvbnM6IHtcclxuICAgICAgICAgICAgICAgICAgICB0YWtlLFxyXG4gICAgICAgICAgICAgICAgICAgIHNraXAsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBmZXRjaFBvbGljeSxcclxuICAgICAgICApO1xyXG4gICAgfVxyXG5cclxuICAgIGdldFRheFJhdGVzU2ltcGxlKHRha2U6IG51bWJlciA9IDEwLCBza2lwOiBudW1iZXIgPSAwLCBmZXRjaFBvbGljeT86IEZldGNoUG9saWN5KSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLnF1ZXJ5PFxyXG4gICAgICAgICAgICBDb2RlZ2VuLkdldFRheFJhdGVMaXN0U2ltcGxlUXVlcnksXHJcbiAgICAgICAgICAgIENvZGVnZW4uR2V0VGF4UmF0ZUxpc3RTaW1wbGVRdWVyeVZhcmlhYmxlc1xyXG4gICAgICAgID4oXHJcbiAgICAgICAgICAgIEdFVF9UQVhfUkFURV9MSVNUX1NJTVBMRSxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgb3B0aW9uczoge1xyXG4gICAgICAgICAgICAgICAgICAgIHRha2UsXHJcbiAgICAgICAgICAgICAgICAgICAgc2tpcCxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJc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ICBDb2RlZ2VuLkRlbGV0ZUNoYW5uZWxNdXRhdGlvblZhcmlhYmxlc1xyXG4gICAgICAgID4oREVMRVRFX0NIQU5ORUwsIHtcclxuICAgICAgICAgICAgaWQsXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0UGF5bWVudE1ldGhvZHModGFrZTogbnVtYmVyID0gMTAsIHNraXA6IG51bWJlciA9IDApIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8XHJcbiAgICAgICAgICAgIENvZGVnZW4uR2V0UGF5bWVudE1ldGhvZExpc3RRdWVyeSxcclxuICAgICAgICAgICAgQ29kZWdlbi5HZXRQYXltZW50TWV0aG9kTGlzdFF1ZXJ5VmFyaWFibGVzXHJcbiAgICAgICAgPihHRVRfUEFZTUVOVF9NRVRIT0RfTElTVCwge1xyXG4gICAgICAgICAgICBvcHRpb25zOiB7XHJcbiAgICAgICAgICAgICAgICBza2lwLFxyXG4gICAgICAgICAgICAgICAgdGFrZSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBnZXRQYXltZW50TWV0aG9kKGlkOiBzdHJpbmcpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8XHJcbiAgICAgICAgICAgIENvZGVnZW4uR2V0UGF5bWVudE1ldGhvZFF1ZXJ5LFxyXG4gICAgICAgICAgICBDb2RlZ2VuLkdldFBheW1lbnRNZXRob2RRdWVyeVZhcmlhYmxlc1xyXG4gICAgICAgID4oR0VUX1BBWU1FTlRfTUVUSE9ELCB7XHJcbiAgICAgICAgICAgIGlkLFxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGNyZWF0ZVBheW1lbnRNZXRob2QoaW5wdXQ6IENvZGVnZW4uQ3JlYXRlUGF5bWVudE1ldGhvZElucHV0KSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLm11dGF0ZTxcclxuICAgICAgICAgICAgQ29kZWdlbi5DcmVhdGVQYXltZW50TWV0aG9kTXV0YXRpb24sXHJcbiAgICAgICAgICAgIENvZGVnZW4uQ3JlYXRlUGF5bWVudE1ldGhvZE11dGF0aW9uVmFyaWFibGVzXHJcbiAgICAgICAgPihDUkVBVEVfUEFZTUVOVF9NRVRIT0QsIHtcclxuICAgICAgICAgICAgaW5wdXQsXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgdXBkYXRlUGF5bWVudE1ldGhvZChpbnB1dDogQ29kZWdlbi5VcGRhdGVQYXltZW50TWV0aG9kSW5wdXQpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UubXV0YXRlPFxyXG4gICAgICAgICAgICBDb2RlZ2VuLlVwZGF0ZVBheW1lbnRNZXRob2RNdXRhdGlvbixcclxuICAgICAgICAgICAgQ29kZWdlbi5VcGRhdGVQYXltZW50TWV0aG9kTXV0YXRpb25WYXJpYWJsZXNcclxuICAgICAgICA+KFVQREFURV9QQVlNRU5UX01FVEhPRCwge1xyXG4gICAgICAgICAgICBpbnB1dCxcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBkZWxldGVQYXltZW50TWV0aG9kKGlkOiBzdHJpbmcsIGZvcmNlOiBib29sZWFuKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLm11dGF0ZTxcclxuICAgICAgICAgICAgQ29kZWdlbi5EZWxldGVQYXltZW50TWV0aG9kTXV0YXRpb24sXHJcbiAgICAgICAgICAgIENvZGVnZW4uRGVsZXRlUGF5bWVudE1ldGhvZE11dGF0aW9uVmFyaWFibGVzXHJcbiAgICAgICAgPihERUxFVEVfUEFZTUVOVF9NRVRIT0QsIHtcclxuICAgICAgICAgICAgaWQsXHJcbiAgICAgICAgICAgIGZvcmNlLFxyX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tcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8Q29kZWdlbi5HZXRKb2JJbmZvUXVlcnksIENvZGVnZW4uR2V0Sm9iSW5mb1F1ZXJ5VmFyaWFibGVzPihcclxuICAgICAgICAgICAgR0VUX0pPQl9JTkZPLFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBpZCxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICApO1xyXG4gICAgfVxyXG5cclxuICAgIHBvbGxKb2JzKGlkczogc3RyaW5nW10pIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8Q29kZWdlbi5HZXRKb2JzQnlJZFF1ZXJ5LCBDb2RlZ2VuLkdldEpvYnNCeUlkUXVlcnlWYXJpYWJsZXM+KFxyXG4gICAgICAgICAgICBHRVRfSk9CU19CWV9JRCxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgaWRzLFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0QWxsSm9icyhvcHRpb25zPzogSm9iTGlzdE9wdGlvbnMpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8Q29kZWdlbi5HZXRBbGxKb2JzUXVlcnksIENvZGVnZW4uR2V0QWxsSm9ic1F1ZXJ5VmFyaWFibGVzPihcclxuICAgICAgICAgICAgR0VUX0pPQlNfTElTVCxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgb3B0aW9ucyxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgJ2NhY2hlLWZpcnN0JyxcclxuICAgICAgICApO1xyXG4gICAgfVxyXG5cclxuICAgIGdldEpvYlF1ZXVlcygpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8Q29kZWdlbi5HZXRKb2JRdWV1ZUxpc3RRdWVyeT4oR0VUX0pPQl9RVUVVRV9MSVNUKTtcclxuICAgIH1cclxuXHJcbiAgICBnZXRSdW5uaW5nSm9icygpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8Q29kZWdlbi5HZXRBbGxKb2JzUXVlcnksIENvZGVnZW4uR2V0QWxsSm9ic1F1ZXJ5VmFyaWFibGVzPihcclxuICAgICAgICAgICAgR0VUX0pPQlNfTElTVCxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgb3B0aW9uczoge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcjoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXE6IEpvYlN0YXRlLlJVTk5JTkcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgKTtcclxuICAgIH1cclxuXHJcbiAgICBjYW5jZWxKb2IoaWQ6IHN0cmluZykge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmJhc2VEYXRhU2VydmljZS5tdXRhdGU8Q29kZWdlbi5DYW5jZWxKb2JNdXRhdGlvbiwgQ29kZWdlbi5DYW5jZWxKb2JNdXRhdGlvblZhcmlhYmxlcz4oXHJcbiAgICAgICAgICAgIENBTkNFTF9KT0IsXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGlkLFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { pick } from '@vendure/common/lib/pick';
|
|
2
|
+
import { CREATE_SHIPPING_METHOD, DELETE_SHIPPING_METHOD, GET_SHIPPING_METHOD, GET_SHIPPING_METHOD_LIST, GET_SHIPPING_METHOD_OPERATIONS, TEST_ELIGIBLE_SHIPPING_METHODS, TEST_SHIPPING_METHOD, UPDATE_SHIPPING_METHOD, } from '../definitions/shipping-definitions';
|
|
3
|
+
export class ShippingMethodDataService {
|
|
4
|
+
constructor(baseDataService) {
|
|
5
|
+
this.baseDataService = baseDataService;
|
|
6
|
+
}
|
|
7
|
+
getShippingMethods(take = 10, skip = 0) {
|
|
8
|
+
return this.baseDataService.query(GET_SHIPPING_METHOD_LIST, {
|
|
9
|
+
options: {
|
|
10
|
+
take,
|
|
11
|
+
skip,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
getShippingMethod(id) {
|
|
16
|
+
return this.baseDataService.query(GET_SHIPPING_METHOD, {
|
|
17
|
+
id,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
getShippingMethodOperations() {
|
|
21
|
+
return this.baseDataService.query(GET_SHIPPING_METHOD_OPERATIONS);
|
|
22
|
+
}
|
|
23
|
+
createShippingMethod(input) {
|
|
24
|
+
const variables = {
|
|
25
|
+
input: pick(input, [
|
|
26
|
+
'code',
|
|
27
|
+
'checker',
|
|
28
|
+
'calculator',
|
|
29
|
+
'fulfillmentHandler',
|
|
30
|
+
'customFields',
|
|
31
|
+
'translations',
|
|
32
|
+
]),
|
|
33
|
+
};
|
|
34
|
+
return this.baseDataService.mutate(CREATE_SHIPPING_METHOD, variables);
|
|
35
|
+
}
|
|
36
|
+
updateShippingMethod(input) {
|
|
37
|
+
const variables = {
|
|
38
|
+
input: pick(input, [
|
|
39
|
+
'id',
|
|
40
|
+
'code',
|
|
41
|
+
'checker',
|
|
42
|
+
'calculator',
|
|
43
|
+
'fulfillmentHandler',
|
|
44
|
+
'customFields',
|
|
45
|
+
'translations',
|
|
46
|
+
]),
|
|
47
|
+
};
|
|
48
|
+
return this.baseDataService.mutate(UPDATE_SHIPPING_METHOD, variables);
|
|
49
|
+
}
|
|
50
|
+
deleteShippingMethod(id) {
|
|
51
|
+
return this.baseDataService.mutate(DELETE_SHIPPING_METHOD, {
|
|
52
|
+
id,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
testShippingMethod(input) {
|
|
56
|
+
return this.baseDataService.query(TEST_SHIPPING_METHOD, {
|
|
57
|
+
input,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
testEligibleShippingMethods(input) {
|
|
61
|
+
return this.baseDataService.query(TEST_ELIGIBLE_SHIPPING_METHODS, {
|
|
62
|
+
input,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hpcHBpbmctbWV0aG9kLWRhdGEuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvZGF0YS9wcm92aWRlcnMvc2hpcHBpbmctbWV0aG9kLWRhdGEuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFHaEQsT0FBTyxFQUNILHNCQUFzQixFQUN0QixzQkFBc0IsRUFDdEIsbUJBQW1CLEVBQ25CLHdCQUF3QixFQUN4Qiw4QkFBOEIsRUFDOUIsOEJBQThCLEVBQzlCLG9CQUFvQixFQUNwQixzQkFBc0IsR0FDekIsTUFBTSxxQ0FBcUMsQ0FBQztBQUk3QyxNQUFNLE9BQU8seUJBQXlCO0lBQ2xDLFlBQW9CLGVBQWdDO1FBQWhDLG9CQUFlLEdBQWYsZUFBZSxDQUFpQjtJQUFHLENBQUM7SUFFeEQsa0JBQWtCLENBQUMsT0FBZSxFQUFFLEVBQUUsT0FBZSxDQUFDO1FBQ2xELE9BQU8sSUFBSSxDQUFDLGVBQWUsQ0FBQyxLQUFLLENBR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5nLWRlZmluaXRpb25zJztcclxuXHJcbmltcG9ydCB7IEJhc2VEYXRhU2VydmljZSB9IGZyb20gJy4vYmFzZS1kYXRhLnNlcnZpY2UnO1xyXG5cclxuZXhwb3J0IGNsYXNzIFNoaXBwaW5nTWV0aG9kRGF0YVNlcnZpY2Uge1xyXG4gICAgY29uc3RydWN0b3IocHJpdmF0ZSBiYXNlRGF0YVNlcnZpY2U6IEJhc2VEYXRhU2VydmljZSkge31cclxuXHJcbiAgICBnZXRTaGlwcGluZ01ldGhvZHModGFrZTogbnVtYmVyID0gMTAsIHNraXA6IG51bWJlciA9IDApIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8XHJcbiAgICAgICAgICAgIENvZGVnZW4uR2V0U2hpcHBpbmdNZXRob2RMaXN0UXVlcnksXHJcbiAgICAgICAgICAgIENvZGVnZW4uR2V0U2hpcHBpbmdNZXRob2RMaXN0UXVlcnlWYXJpYWJsZXNcclxuICAgICAgICA+KEdFVF9TSElQUElOR19NRVRIT0RfTElTVCwge1xyXG4gICAgICAgICAgICBvcHRpb25zOiB7XHJcbiAgICAgICAgICAgICAgICB0YWtlLFxyXG4gICAgICAgICAgICAgICAgc2tpcCxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBnZXRTaGlwcGluZ01ldGhvZChpZDogc3RyaW5nKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLnF1ZXJ5PFxyXG4gICAgICAgICAgICBDb2RlZ2VuLkdldFNoaXBwaW5nTWV0aG9kUXVlcnksXHJcbiAgICAgICAgICAgIENvZGVnZW4uR2V0U2hpcHBpbmdNZXRob2RRdWVyeVZhcmlhYmxlc1xyXG4gICAgICAgID4oR0VUX1NISVBQSU5HX01FVEhPRCwge1xyXG4gICAgICAgICAgICBpZCxcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcb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xyXG4gICAgdXBkYXRlU2hpcHBpbmdNZXRob2QoaW5wdXQ6IENvZGVnZW4uVXBkYXRlU2hpcHBpbmdNZXRob2RJbnB1dCkge1xyXG4gICAgICAgIGNvbnN0IHZhcmlhYmxlczogQ29kZWdlbi5VcGRhdGVTaGlwcGluZ01ldGhvZE11dGF0aW9uVmFyaWFibGVzID0ge1xyXG4gICAgICAgICAgICBpbnB1dDogcGljayhpbnB1dCwgW1xyXG4gICAgICAgICAgICAgICAgJ2lkJyxcclxuICAgICAgICAgICAgICAgICdjb2RlJyxcclxuICAgICAgICAgICAgICAgICdjaGVja2VyJyxcclxuICAgICAgICAgICAgICAgICdjYWxjdWxhdG9yJyxcclxuICAgICAgICAgICAgICAgICdmdWxmaWxsbWVudEhhbmRsZXInLFxyXG4gICAgICAgICAgICAgICAgJ2N1c3RvbUZpZWxkcycsXHJcbiAgICAgICAgICAgICAgICAndHJhbnNsYXRpb25zJyxcclxuICAgICAgICAgICAgXSksXHJcbiAgICAgICAgfTtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UubXV0YXRlPFxyXG4gICAgICAgICAgICBDb2RlZ2VuLlVwZGF0ZVNoaXBwaW5nTWV0aG9kTXV0YXRpb24sXHJcbiAgICAgICAgICAgIENvZGVnZW4uVXBkYXRlU2hpcHBpbmdNZXRob2RNdXRhdGlvblZhcmlhYmxlc1xyXG4gICAgICAgID4oVVBEQVRFX1NISVBQSU5HX01FVEhPRCwgdmFyaWFibGVzKTtcclxuICAgIH1cclxuXHJcbiAgICBkZWxldGVTaGlwcGluZ01ldGhvZChpZDogc3RyaW5nKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLm11dGF0ZTxcclxuICAgICAgICAgICAgQ29kZWdlbi5EZWxldGVTaGlwcGluZ01ldGhvZE11dGF0aW9uLFxyXG4gICAgICAgICAgICBDb2RlZ2VuLkRlbGV0ZVNoaXBwaW5nTWV0aG9kTXV0YXRpb25WYXJpYWJsZXNcclxuICAgICAgICA+KERFTEVURV9TSElQUElOR19NRVRIT0QsIHtcclxuICAgICAgICAgICAgaWQsXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgdGVzdFNoaXBwaW5nTWV0aG9kKGlucHV0OiBDb2RlZ2VuLlRlc3RTaGlwcGluZ01ldGhvZElucHV0KSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYmFzZURhdGFTZXJ2aWNlLnF1ZXJ5PFxyXG4gICAgICAgICAgICBDb2RlZ2VuLlRlc3RTaGlwcGluZ01ldGhvZFF1ZXJ5LFxyXG4gICAgICAgICAgICBDb2RlZ2VuLlRlc3RTaGlwcGluZ01ldGhvZFF1ZXJ5VmFyaWFibGVzXHJcbiAgICAgICAgPihURVNUX1NISVBQSU5HX01FVEhPRCwge1xyXG4gICAgICAgICAgICBpbnB1dCxcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICB0ZXN0RWxpZ2libGVTaGlwcGluZ01ldGhvZHMoaW5wdXQ6IENvZGVnZW4uVGVzdEVsaWdpYmxlU2hpcHBpbmdNZXRob2RzSW5wdXQpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlRGF0YVNlcnZpY2UucXVlcnk8XHJcbiAgICAgICAgICAgIENvZGVnZW4uVGVzdEVsaWdpYmxlU2hpcHBpbmdNZXRob2RzUXVlcnksXHJcbiAgICAgICAgICAgIENvZGVnZW4uVGVzdEVsaWdpYmxlU2hpcHBpbmdNZXRob2RzUXVlcnlWYXJpYWJsZXNcclxuICAgICAgICA+KFRFU1RfRUxJR0lCTEVfU0hJUFBJTkdfTUVUSE9EUywge1xyXG4gICAgICAgICAgICBpbnB1dCxcclxuICAgICAgICB9KTtcclxuICAgIH1cclxufVxyXG4iXX0=
|
|
@@ -74,4 +74,4 @@ export class QueryResult {
|
|
|
74
74
|
return this.stream$.pipe(map(mapFn));
|
|
75
75
|
}
|
|
76
76
|
}
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dXMucmVhZHkpLFxyXG4gICAgICAgICAgICB0YWtlKDEpLFxyXG4gICAgICAgICAgICBtYXAocmVzdWx0ID0+IHJlc3VsdC5kYXRhKSxcclxuICAgICAgICAgICAgZmluYWxpemUoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jb21wbGV0ZWQkLm5leHQoKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuY29tcGxldGVkJC5jb21wbGV0ZSgpO1xyXG4gICAgICAgICAgICB9KSxcclxuICAgICAgICApO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQGRlc2NyaXB0aW9uXHJcbiAgICAgKiBSZXR1cm5zIGFuIE9ic2VydmFibGUgd2hpY2ggZW1pdHMgdW50aWwgdW5zdWJzY3JpYmVkLlxyXG4gICAgICovXHJcbiAgICBnZXQgc3RyZWFtJCgpOiBPYnNlcnZhYmxlPFQ+IHtcclxuICAgICAgICByZXR1cm4gdGhpcy52YWx1ZUNoYW5nZXMucGlwZShcclxuICAgICAgICAgICAgZmlsdGVyKHJlc3VsdCA9PiByZXN1bHQubmV0d29ya1N0YXR1cyA9PT0gTmV0d29ya1N0YXR1cy5yZWFkeSksXHJcbiAgICAgICAgICAgIG1hcChyZXN1bHQgPT4gcmVzdWx0LmRhdGEpLFxyXG4gICAgICAgICAgICBmaW5hbGl6ZSgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNvbXBsZXRlZCQubmV4dCgpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jb21wbGV0ZWQkLmNvbXBsZXRlKCk7XHJcbiAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0IHJlZigpOiBRdWVyeVJlZjxULCBWPiB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMucXVlcnlSZWY7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBAZGVzY3JpcHRpb25cclxuICAgICAqIFJldHVybnMgYSBzaW5nbGUtcmVzdWx0IE9ic2VydmFibGUgYWZ0ZXIgYXBwbHlpbmcgdGhlIG1hcCBmdW5jdGlvbi5cclxuICAgICAqL1xyXG4gICAgbWFwU2luZ2xlPFI+KG1hcEZuOiAoaXRlbTogVCkgPT4gUik6IE9ic2VydmFibGU8Uj4ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNpbmdsZSQucGlwZShtYXAobWFwRm4pKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEBkZXNjcmlwdGlvblxyXG4gICAgICogUmV0dXJucyBhIG11bHRpcGxlLXJlc3VsdCBPYnNlcnZhYmxlIGFmdGVyIGFwcGx5aW5nIHRoZSBtYXAgZnVuY3Rpb24uXHJcbiAgICAgKi9cclxuICAgIG1hcFN0cmVhbTxSPihtYXBGbjogKGl0ZW06IFQpID0+IFIpOiBPYnNlcnZhYmxlPFI+IHtcclxuICAgICAgICByZXR1cm4gdGhpcy5zdHJlYW0kLnBpcGUobWFwKG1hcEZuKSk7XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { lastValueFrom } from 'rxjs';
|
|
3
|
+
import { GET_GLOBAL_SETTINGS, GET_SERVER_CONFIG } from './definitions/settings-definitions';
|
|
4
|
+
import { BaseDataService } from './providers/base-data.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export function initializeServerConfigService(serverConfigService) {
|
|
7
|
+
return serverConfigService.init();
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A service which fetches the config from the server upon initialization, and then provides that config
|
|
11
|
+
* to the components which require it.
|
|
12
|
+
*/
|
|
13
|
+
export class ServerConfigService {
|
|
14
|
+
constructor(injector) {
|
|
15
|
+
this.injector = injector;
|
|
16
|
+
this._serverConfig = {};
|
|
17
|
+
}
|
|
18
|
+
get baseDataService() {
|
|
19
|
+
return this.injector.get(BaseDataService);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Fetches the ServerConfig. Should be run as part of the app bootstrap process by attaching
|
|
23
|
+
* to the Angular APP_INITIALIZER token.
|
|
24
|
+
*/
|
|
25
|
+
init() {
|
|
26
|
+
return () => this.getServerConfig();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetch the ServerConfig. Should be run on app init (in case user is already logged in) and on successful login.
|
|
30
|
+
*/
|
|
31
|
+
getServerConfig() {
|
|
32
|
+
return lastValueFrom(this.baseDataService.query(GET_SERVER_CONFIG).single$).then(result => {
|
|
33
|
+
this._serverConfig = result.globalSettings.serverConfig;
|
|
34
|
+
}, err => {
|
|
35
|
+
// Let the error fall through to be caught by the http interceptor.
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
getAvailableLanguages() {
|
|
39
|
+
return this.baseDataService
|
|
40
|
+
.query(GET_GLOBAL_SETTINGS, {}, 'cache-first')
|
|
41
|
+
.mapSingle(res => res.globalSettings.availableLanguages);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* When any of the GlobalSettings are modified, this method should be called to update the Apollo cache.
|
|
45
|
+
*/
|
|
46
|
+
refreshGlobalSettings() {
|
|
47
|
+
return this.baseDataService.query(GET_GLOBAL_SETTINGS, {}, 'network-only')
|
|
48
|
+
.single$;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the custom field configs for the given entity type.
|
|
52
|
+
*/
|
|
53
|
+
getCustomFieldsFor(type) {
|
|
54
|
+
return this.serverConfig.customFieldConfig[type] || [];
|
|
55
|
+
}
|
|
56
|
+
getOrderProcessStates() {
|
|
57
|
+
return this.serverConfig.orderProcess;
|
|
58
|
+
}
|
|
59
|
+
getPermittedAssetTypes() {
|
|
60
|
+
return this.serverConfig.permittedAssetTypes;
|
|
61
|
+
}
|
|
62
|
+
getPermissionDefinitions() {
|
|
63
|
+
return this.serverConfig.permissions;
|
|
64
|
+
}
|
|
65
|
+
get serverConfig() {
|
|
66
|
+
return this._serverConfig;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
ServerConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ServerConfigService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
70
|
+
ServerConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ServerConfigService });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ServerConfigService, decorators: [{
|
|
72
|
+
type: Injectable
|
|
73
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvZGF0YS9zZXJ2ZXItY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQVksTUFBTSxlQUFlLENBQUM7QUFDckQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQVlyQyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUM1RixPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sK0JBQStCLENBQUM7O0FBRWhFLE1BQU0sVUFBVSw2QkFBNkIsQ0FBQyxtQkFBd0M7SUFDbEYsT0FBTyxtQkFBbUIsQ0FBQyxJQUFJLEVBQUUsQ0FBQztBQUN0QyxDQUFDO0FBRUQ7OztHQUdHO0FBRUgsTUFBTSxPQUFPLG1CQUFtQjtJQU81QixZQUFv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AgICB9XHJcblxyXG4gICAgZ2V0T3JkZXJQcm9jZXNzU3RhdGVzKCk6IE9yZGVyUHJvY2Vzc1N0YXRlW10ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNlcnZlckNvbmZpZy5vcmRlclByb2Nlc3M7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0UGVybWl0dGVkQXNzZXRUeXBlcygpOiBzdHJpbmdbXSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuc2VydmVyQ29uZmlnLnBlcm1pdHRlZEFzc2V0VHlwZXM7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0UGVybWlzc2lvbkRlZmluaXRpb25zKCk6IFBlcm1pc3Npb25EZWZpbml0aW9uW10ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNlcnZlckNvbmZpZy5wZXJtaXNzaW9ucztcclxuICAgIH1cclxuXHJcbiAgICBnZXQgc2VydmVyQ29uZmlnKCk6IFNlcnZlckNvbmZpZyB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuX3NlcnZlckNvbmZpZztcclxuICAgIH1cclxufVxyXG4iXX0=
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Kind, } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* Given a GraphQL AST (DocumentNode), this function looks for fragment definitions and adds and configured
|
|
4
|
+
* custom fields to those fragments.
|
|
5
|
+
*/
|
|
6
|
+
export function addCustomFields(documentNode, customFields) {
|
|
7
|
+
const fragmentDefs = documentNode.definitions.filter(isFragmentDefinition);
|
|
8
|
+
for (const fragmentDef of fragmentDefs) {
|
|
9
|
+
let entityType = fragmentDef.typeCondition.name.value;
|
|
10
|
+
if (entityType === 'OrderAddress') {
|
|
11
|
+
// OrderAddress is a special case of the Address entity, and shares its custom fields
|
|
12
|
+
// so we treat it as an alias
|
|
13
|
+
entityType = 'Address';
|
|
14
|
+
}
|
|
15
|
+
const customFieldsForType = customFields[entityType];
|
|
16
|
+
if (customFieldsForType && customFieldsForType.length) {
|
|
17
|
+
fragmentDef.selectionSet.selections.push({
|
|
18
|
+
name: {
|
|
19
|
+
kind: Kind.NAME,
|
|
20
|
+
value: 'customFields',
|
|
21
|
+
},
|
|
22
|
+
kind: Kind.FIELD,
|
|
23
|
+
selectionSet: {
|
|
24
|
+
kind: Kind.SELECTION_SET,
|
|
25
|
+
selections: customFieldsForType.map(customField => {
|
|
26
|
+
return {
|
|
27
|
+
kind: Kind.FIELD,
|
|
28
|
+
name: {
|
|
29
|
+
kind: Kind.NAME,
|
|
30
|
+
value: customField.name,
|
|
31
|
+
},
|
|
32
|
+
// For "relation" custom fields, we need to also select
|
|
33
|
+
// all the scalar fields of the related type
|
|
34
|
+
...(customField.type === 'relation'
|
|
35
|
+
? {
|
|
36
|
+
selectionSet: {
|
|
37
|
+
kind: Kind.SELECTION_SET,
|
|
38
|
+
selections: customField.scalarFields.map(f => ({
|
|
39
|
+
kind: Kind.FIELD,
|
|
40
|
+
name: { kind: Kind.NAME, value: f },
|
|
41
|
+
})),
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
: {}),
|
|
45
|
+
};
|
|
46
|
+
}),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
const localeStrings = customFieldsForType.filter(field => field.type === 'localeString');
|
|
50
|
+
const translationsField = fragmentDef.selectionSet.selections
|
|
51
|
+
.filter(isFieldNode)
|
|
52
|
+
.find(field => field.name.value === 'translations');
|
|
53
|
+
if (localeStrings.length && translationsField && translationsField.selectionSet) {
|
|
54
|
+
translationsField.selectionSet.selections.push({
|
|
55
|
+
name: {
|
|
56
|
+
kind: Kind.NAME,
|
|
57
|
+
value: 'customFields',
|
|
58
|
+
},
|
|
59
|
+
kind: Kind.FIELD,
|
|
60
|
+
selectionSet: {
|
|
61
|
+
kind: Kind.SELECTION_SET,
|
|
62
|
+
selections: localeStrings.map(customField => {
|
|
63
|
+
return {
|
|
64
|
+
kind: Kind.FIELD,
|
|
65
|
+
name: {
|
|
66
|
+
kind: Kind.NAME,
|
|
67
|
+
value: customField.name,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return documentNode;
|
|
77
|
+
}
|
|
78
|
+
function isFragmentDefinition(value) {
|
|
79
|
+
return value.kind === Kind.FRAGMENT_DEFINITION;
|
|
80
|
+
}
|
|
81
|
+
function isFieldNode(value) {
|
|
82
|
+
return value.kind === Kind.FIELD;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWN1c3RvbS1maWVsZHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL2RhdGEvdXRpbHMvYWRkLWN1c3RvbS1maWVsZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUtILElBQUksR0FFUCxNQUFNLFNBQVMsQ0FBQztBQUlqQjs7O0dBR0c7QUFDSCxNQUFNLFVBQVUsZUFBZSxDQUFDLFlBQTBCLEVBQUUsWUFBMEI7SUFDbEYsTUFBTSxZQUFZLEdBQUcsWUFBWSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsb0JBQW9CLENBQUMsQ0FBQztJQUUzRSxLQUFLLE1BQU0sV0FBVyxJQUFJLFlBQVksRUFBRTtRQUNwQyxJQUFJLFVBQVUsR0FBRyxXQUFXLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxLQUcvQyxDQUFDO1FBRUYsSUFBSSxVQUFVLEtBQU0sY0FBc0IsRUFBRTtZQUN4QyxxRkFBcUY7WUFDckYsNkJBQTZCO1lBQzdCLFVBQVUsR0FBRyxTQUFTLENBQUM7U0FDMUI7UUFFRCxNQUFNLG1CQUFtQixHQUFHLFlBQVksQ0FBQyxVQUFVL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HtcclxuICAgICAgICAgICAgICAgICAgICBraW5kOiBLaW5kLk5BTUUsXHJcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6ICdjdXN0b21GaWVsZHMnLFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGtpbmQ6IEtpbmQuRklFTEQsXHJcbiAgICAgICAgICAgICAgICBzZWxlY3Rpb25TZXQ6IHtcclxuICAgICAgICAgICAgICAgICAgICBraW5kOiBLaW5kLlNFTEVDVElPTl9TRVQsXHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uczogY3VzdG9tRmllbGRzRm9yVHlwZS5tYXAoY3VzdG9tRmllbGQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2luZDogS2luZC5GSUVMRCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBraW5kOiBLaW5kLk5BTUUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGN1c3RvbUZpZWxkLm5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRm9yIFwicmVsYXRpb25cIiBjdXN0b20gZmllbGRzLCB3ZSBuZWVkIHRvIGFsc28gc2VsZWN0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbGwgdGhlIHNjYWxhciBmaWVsZHMgb2YgdGhlIHJlbGF0ZWQgdHlwZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLi4uKGN1c3RvbUZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbidcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb25TZXQ6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2luZDogS2luZC5TRUxFQ1RJT05fU0VULFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb25zOiAoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXN0b21GaWVsZCBhcyBSZWxhdGlvbkN1c3RvbUZpZWxkRnJhZ21lbnRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKS5zY2FsYXJGaWVsZHMubWFwKGYgPT4gKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtpbmQ6IEtpbmQuRklFTEQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiB7IGtpbmQ6IEtpbmQuTkFNRSwgdmFsdWU6IGYgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB7fSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gYXMgRmllbGROb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBjb25zdCBsb2NhbGVTdHJpbmdzID0gY3VzdG9tRmllbGRzRm9yVHlwZS5maWx0ZXIoZmllbGQgPT4gZmllbGQudHlwZSA9PT0gJ2xvY2FsZVN0cmluZycpO1xyXG5cclxuICAgICAgICAgICAgY29uc3QgdHJhbnNsYXRpb25zRmllbGQgPSBmcmFnbWVudERlZi5zZWxlY3Rpb25TZXQuc2VsZWN0aW9uc1xyXG4gICAgICAgICAgICAgICAgLmZpbHRlcihpc0ZpZWxkTm9kZSlcclxuICAgICAgICAgICAgICAgIC5maW5kKGZpZWxkID0+IGZpZWxkLm5hbWUudmFsdWUgPT09ICd0cmFuc2xhdGlvbnMnKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChsb2NhbGVTdHJpbmdzLmxlbmd0aCAmJiB0cmFuc2xhdGlvbnNGaWVsZCAmJiB0cmFuc2xhdGlvbnNGaWVsZC5zZWxlY3Rpb25TZXQpIHtcclxuICAgICAgICAgICAgICAgICh0cmFuc2xhdGlvbnNGaWVsZC5zZWxlY3Rpb25TZXQuc2VsZWN0aW9ucyBhcyBTZWxlY3Rpb25Ob2RlW10pLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAga2luZDogS2luZC5OQU1FLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogJ2N1c3RvbUZpZWxkcycsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBraW5kOiBLaW5kLkZJRUxELFxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvblNldDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBraW5kOiBLaW5kLlNFTEVDVElPTl9TRVQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbnM6IGxvY2FsZVN0cmluZ3MubWFwKGN1c3RvbUZpZWxkID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2luZDogS2luZC5GSUVMRCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtpbmQ6IEtpbmQuTkFNRSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGN1c3RvbUZpZWxkLm5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gYXMgRmllbGROb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIGRvY3VtZW50Tm9kZTtcclxufVxyXG5cclxuZnVuY3Rpb24gaXNGcmFnbWVudERlZmluaXRpb24odmFsdWU6IERlZmluaXRpb25Ob2RlKTogdmFsdWUgaXMgRnJhZ21lbnREZWZpbml0aW9uTm9kZSB7XHJcbiAgICByZXR1cm4gdmFsdWUua2luZCA9PT0gS2luZC5GUkFHTUVOVF9ERUZJTklUSU9OO1xyXG59XHJcblxyXG5mdW5jdGlvbiBpc0ZpZWxkTm9kZSh2YWx1ZTogU2VsZWN0aW9uTm9kZSk6IHZhbHVlIGlzIEZpZWxkTm9kZSB7XHJcbiAgICByZXR1cm4gdmFsdWUua2luZCA9PT0gS2luZC5GSUVMRDtcclxufVxyXG4iXX0=
|
|
File without changes
|