@vendure/admin-ui 1.7.4 → 1.8.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/README.md +49 -0
- package/angular.json +196 -0
- package/i18n-coverage.json +71 -0
- package/package/bundles/vendure-admin-ui-catalog.umd.js +5689 -0
- package/package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -0
- package/package/bundles/vendure-admin-ui-core.umd.js +16863 -0
- package/package/bundles/vendure-admin-ui-core.umd.js.map +1 -0
- package/package/bundles/vendure-admin-ui-customer.umd.js +1680 -0
- package/package/bundles/vendure-admin-ui-customer.umd.js.map +1 -0
- package/package/bundles/vendure-admin-ui-dashboard.umd.js +759 -0
- package/package/bundles/vendure-admin-ui-dashboard.umd.js.map +1 -0
- package/{bundles → package/bundles}/vendure-admin-ui-login.umd.js +0 -0
- package/{bundles → package/bundles}/vendure-admin-ui-login.umd.js.map +0 -0
- package/{bundles → package/bundles}/vendure-admin-ui-marketing.umd.js +0 -0
- package/{bundles → package/bundles}/vendure-admin-ui-marketing.umd.js.map +0 -0
- package/package/bundles/vendure-admin-ui-order.umd.js +4028 -0
- package/package/bundles/vendure-admin-ui-order.umd.js.map +1 -0
- package/package/bundles/vendure-admin-ui-settings.umd.js +3700 -0
- package/package/bundles/vendure-admin-ui-settings.umd.js.map +1 -0
- package/package/bundles/vendure-admin-ui-system.umd.js +524 -0
- package/{bundles → package/bundles}/vendure-admin-ui-system.umd.js.map +0 -0
- package/{bundles → package/bundles}/vendure-admin-ui.umd.js +0 -0
- package/{bundles → package/bundles}/vendure-admin-ui.umd.js.map +0 -0
- package/package/catalog/catalog.module.d.ts +5 -0
- package/{catalog → package/catalog}/catalog.routes.d.ts +0 -0
- package/{catalog → package/catalog}/components/apply-facet-dialog/apply-facet-dialog.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/asset-detail/asset-detail.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/asset-list/asset-list.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/assets/assets.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.d.ts +0 -0
- package/package/catalog/components/assign-to-channel-dialog/assign-to-channel-dialog.component.d.ts +17 -0
- package/package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.d.ts +38 -0
- package/package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql.d.ts +4 -0
- package/{catalog → package/catalog}/components/collection-contents/collection-contents.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/collection-detail/collection-detail.component.d.ts +0 -0
- package/package/catalog/components/collection-list/collection-list-bulk-actions.d.ts +6 -0
- package/package/catalog/components/collection-list/collection-list.component.d.ts +35 -0
- package/{catalog → package/catalog}/components/collection-tree/array-to-tree.d.ts +0 -0
- package/package/catalog/components/collection-tree/collection-tree-node.component.d.ts +40 -0
- package/package/catalog/components/collection-tree/collection-tree.component.d.ts +36 -0
- package/{catalog → package/catalog}/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/facet-detail/facet-detail.component.d.ts +0 -0
- package/package/catalog/components/facet-list/facet-list-bulk-actions.d.ts +5 -0
- package/package/catalog/components/facet-list/facet-list.component.d.ts +25 -0
- package/{catalog → package/catalog}/components/generate-product-variants/generate-product-variants.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/option-value-input/option-value-input.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/product-detail/product-detail.component.d.ts +0 -0
- package/package/catalog/components/product-list/product-list-bulk-actions.d.ts +6 -0
- package/package/catalog/components/product-list/product-list.component.d.ts +30 -0
- package/{catalog → package/catalog}/components/product-options-editor/product-options-editor.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/product-variants-editor/product-variants-editor.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/product-variants-list/product-variants-list.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/product-variants-table/product-variants-table.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/update-product-option-dialog/update-product-option-dialog.component.d.ts +0 -0
- package/{catalog → package/catalog}/components/variant-price-detail/variant-price-detail.component.d.ts +0 -0
- package/{catalog → package/catalog}/package.json +0 -0
- package/{catalog → package/catalog}/providers/product-detail/product-detail.service.d.ts +0 -0
- package/{catalog → package/catalog}/providers/product-detail/replace-last.d.ts +0 -0
- package/{catalog → package/catalog}/providers/routing/asset-resolver.d.ts +0 -0
- package/{catalog → package/catalog}/providers/routing/collection-resolver.d.ts +0 -0
- package/{catalog → package/catalog}/providers/routing/facet-resolver.d.ts +0 -0
- package/{catalog → package/catalog}/providers/routing/product-resolver.d.ts +0 -0
- package/{catalog → package/catalog}/providers/routing/product-variants-resolver.d.ts +0 -0
- package/package/catalog/public_api.d.ts +39 -0
- package/{catalog → package/catalog}/vendure-admin-ui-catalog.d.ts +0 -0
- package/package/catalog/vendure-admin-ui-catalog.metadata.json +1 -0
- package/{core → package/core}/app.component.d.ts +0 -0
- package/{core → package/core}/app.component.module.d.ts +0 -0
- package/{core → package/core}/app.config.d.ts +0 -0
- package/{core → package/core}/common/base-detail.component.d.ts +0 -0
- package/{core → package/core}/common/base-entity-resolver.d.ts +0 -0
- package/{core → package/core}/common/base-list.component.d.ts +0 -0
- package/package/core/common/component-registry-types.d.ts +56 -0
- package/{core → package/core}/common/deactivate-aware.d.ts +0 -0
- package/{core → package/core}/common/detail-breadcrumb.d.ts +0 -0
- package/package/core/common/generated-types.d.ts +9748 -0
- package/{core → package/core}/common/introspection-result-wrapper.d.ts +0 -0
- package/{core → package/core}/common/introspection-result.d.ts +0 -0
- package/{core → package/core}/common/single-search-selection-model.d.ts +0 -0
- package/package/core/common/utilities/bulk-action-utils.d.ts +19 -0
- package/{core → package/core}/common/utilities/configurable-operation-utils.d.ts +0 -0
- package/{core → package/core}/common/utilities/create-updated-translatable.d.ts +0 -0
- package/{core → package/core}/common/utilities/find-translation.d.ts +0 -0
- package/{core → package/core}/common/utilities/flatten-facet-values.d.ts +0 -0
- package/{core → package/core}/common/utilities/get-default-ui-language.d.ts +0 -0
- package/{core → package/core}/common/utilities/interpolate-description.d.ts +0 -0
- package/package/core/common/utilities/selection-manager.d.ts +30 -0
- package/{core → package/core}/common/utilities/string-to-color.d.ts +0 -0
- package/package/core/common/version.d.ts +1 -0
- package/{core → package/core}/components/app-shell/app-shell.component.d.ts +0 -0
- package/{core → package/core}/components/breadcrumb/breadcrumb.component.d.ts +0 -0
- package/{core → package/core}/components/channel-switcher/channel-switcher.component.d.ts +0 -0
- package/{core → package/core}/components/main-nav/main-nav.component.d.ts +0 -0
- package/{core → package/core}/components/notification/notification.component.d.ts +0 -0
- package/{core → package/core}/components/overlay-host/overlay-host.component.d.ts +0 -0
- package/{core → package/core}/components/theme-switcher/theme-switcher.component.d.ts +0 -0
- package/{core → package/core}/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +0 -0
- package/{core → package/core}/components/user-menu/user-menu.component.d.ts +0 -0
- package/{core → package/core}/core.module.d.ts +0 -0
- package/{core → package/core}/data/check-jobs-link.d.ts +0 -0
- package/{core → package/core}/data/client-state/client-defaults.d.ts +0 -0
- package/{core → package/core}/data/client-state/client-resolvers.d.ts +0 -0
- package/{core → package/core}/data/data.module.d.ts +0 -0
- package/{core → package/core}/data/definitions/administrator-definitions.d.ts +0 -0
- package/{core → package/core}/data/definitions/auth-definitions.d.ts +0 -0
- package/{core → package/core}/data/definitions/client-definitions.d.ts +0 -0
- package/package/core/data/definitions/collection-definitions.d.ts +13 -0
- package/{core → package/core}/data/definitions/customer-definitions.d.ts +0 -0
- package/package/core/data/definitions/facet-definitions.d.ts +13 -0
- package/package/core/data/definitions/order-definitions.d.ts +39 -0
- package/package/core/data/definitions/product-definitions.d.ts +46 -0
- package/{core → package/core}/data/definitions/promotion-definitions.d.ts +0 -0
- package/{core → package/core}/data/definitions/settings-definitions.d.ts +0 -0
- package/{core → package/core}/data/definitions/shared-definitions.d.ts +0 -0
- package/{core → package/core}/data/definitions/shipping-definitions.d.ts +0 -0
- package/{core → package/core}/data/omit-typename-link.d.ts +0 -0
- package/{core → package/core}/data/providers/administrator-data.service.d.ts +0 -0
- package/{core → package/core}/data/providers/auth-data.service.d.ts +0 -0
- package/{core → package/core}/data/providers/base-data.service.d.ts +0 -0
- package/{core → package/core}/data/providers/client-data.service.d.ts +0 -0
- package/package/core/data/providers/collection-data.service.d.ts +28 -0
- package/{core → package/core}/data/providers/customer-data.service.d.ts +0 -0
- package/{core → package/core}/data/providers/data.service.d.ts +0 -0
- package/package/core/data/providers/facet-data.service.d.ts +24 -0
- package/{core → package/core}/data/providers/fetch-adapter.d.ts +0 -0
- package/{core → package/core}/data/providers/interceptor.d.ts +0 -0
- package/package/core/data/providers/order-data.service.d.ts +52 -0
- package/package/core/data/providers/product-data.service.d.ts +82 -0
- package/{core → package/core}/data/providers/promotion-data.service.d.ts +0 -0
- package/{core → package/core}/data/providers/settings-data.service.d.ts +0 -0
- package/{core → package/core}/data/providers/shipping-method-data.service.d.ts +0 -0
- package/{core → package/core}/data/query-result.d.ts +0 -0
- package/{core → package/core}/data/server-config.d.ts +0 -0
- package/{core → package/core}/data/utils/add-custom-fields.d.ts +0 -0
- package/{core → package/core}/data/utils/get-server-location.d.ts +0 -0
- package/{core → package/core}/data/utils/remove-readonly-custom-fields.d.ts +0 -0
- package/{core → package/core}/data/utils/transform-relation-custom-field-inputs.d.ts +0 -0
- package/{core → package/core}/package.json +0 -0
- package/{core → package/core}/providers/auth/auth.service.d.ts +0 -0
- package/package/core/providers/bulk-action-registry/bulk-action-registry.service.d.ts +6 -0
- package/package/core/providers/bulk-action-registry/bulk-action-types.d.ts +149 -0
- package/package/core/providers/bulk-action-registry/register-bulk-action.d.ts +53 -0
- package/{core → package/core}/providers/component-registry/component-registry.service.d.ts +0 -0
- package/{core → package/core}/providers/custom-detail-component/custom-detail-component-types.d.ts +0 -0
- package/{core → package/core}/providers/custom-detail-component/custom-detail-component.service.d.ts +0 -0
- package/{core → package/core}/providers/custom-field-component/custom-field-component.service.d.ts +0 -0
- package/{core → package/core}/providers/dashboard-widget/dashboard-widget-types.d.ts +0 -0
- package/{core → package/core}/providers/dashboard-widget/dashboard-widget.service.d.ts +0 -0
- package/{core → package/core}/providers/dashboard-widget/register-dashboard-widget.d.ts +0 -0
- package/{core → package/core}/providers/guard/auth.guard.d.ts +0 -0
- package/{core → package/core}/providers/health-check/health-check.service.d.ts +0 -0
- package/{core → package/core}/providers/i18n/custom-http-loader.d.ts +0 -0
- package/{core → package/core}/providers/i18n/custom-message-format-compiler.d.ts +0 -0
- package/{core → package/core}/providers/i18n/i18n.service.d.ts +0 -0
- package/{core → package/core}/providers/job-queue/job-queue.service.d.ts +0 -0
- package/{core → package/core}/providers/local-storage/local-storage.service.d.ts +0 -0
- package/package/core/providers/modal/modal.service.d.ts +134 -0
- package/package/core/providers/nav-builder/nav-builder-types.d.ts +92 -0
- package/{core → package/core}/providers/nav-builder/nav-builder.service.d.ts +0 -0
- package/{core → package/core}/providers/notification/notification.service.d.ts +0 -0
- package/{core → package/core}/providers/overlay-host/overlay-host.service.d.ts +0 -0
- package/package/core/public_api.d.ts +239 -0
- package/{core → package/core}/shared/components/action-bar/action-bar.component.d.ts +0 -0
- package/{core → package/core}/shared/components/action-bar-items/action-bar-items.component.d.ts +0 -0
- package/{core → package/core}/shared/components/address-form/address-form.component.d.ts +0 -0
- package/{core → package/core}/shared/components/affixed-input/affixed-input.component.d.ts +0 -0
- package/{core → package/core}/shared/components/affixed-input/percentage-suffix-input.component.d.ts +0 -0
- package/{core → package/core}/shared/components/asset-file-input/asset-file-input.component.d.ts +0 -0
- package/package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +67 -0
- package/{core → package/core}/shared/components/asset-picker-dialog/asset-picker-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/asset-preview/asset-preview.component.d.ts +0 -0
- package/{core → package/core}/shared/components/asset-preview-dialog/asset-preview-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/asset-preview-links/asset-preview-links.component.d.ts +0 -0
- package/{core → package/core}/shared/components/asset-search-input/asset-search-input.component.d.ts +0 -0
- package/package/core/shared/components/bulk-action-menu/bulk-action-menu.component.d.ts +29 -0
- package/{core → package/core}/shared/components/channel-assignment-control/channel-assignment-control.component.d.ts +0 -0
- package/{core → package/core}/shared/components/channel-badge/channel-badge.component.d.ts +0 -0
- package/{core → package/core}/shared/components/chip/chip.component.d.ts +0 -0
- package/{core → package/core}/shared/components/configurable-input/configurable-input.component.d.ts +0 -0
- package/{core → package/core}/shared/components/currency-input/currency-input.component.d.ts +0 -0
- package/{core → package/core}/shared/components/custom-detail-component-host/custom-detail-component-host.component.d.ts +0 -0
- package/{core → package/core}/shared/components/custom-field-control/custom-field-control.component.d.ts +0 -0
- package/{core → package/core}/shared/components/customer-label/customer-label.component.d.ts +0 -0
- package/{core → package/core}/shared/components/data-table/data-table-column.component.d.ts +0 -0
- package/package/core/shared/components/data-table/data-table.component.d.ts +101 -0
- package/{core → package/core}/shared/components/datetime-picker/constants.d.ts +0 -0
- package/{core → package/core}/shared/components/datetime-picker/datetime-picker.component.d.ts +0 -0
- package/{core → package/core}/shared/components/datetime-picker/datetime-picker.service.d.ts +0 -0
- package/{core → package/core}/shared/components/datetime-picker/types.d.ts +0 -0
- package/{core → package/core}/shared/components/dropdown/dropdown-item.directive.d.ts +0 -0
- package/package/core/shared/components/dropdown/dropdown-menu.component.d.ts +31 -0
- package/{core → package/core}/shared/components/dropdown/dropdown-trigger.directive.d.ts +0 -0
- package/{core → package/core}/shared/components/dropdown/dropdown.component.d.ts +0 -0
- package/{core → package/core}/shared/components/edit-note-dialog/edit-note-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/empty-placeholder/empty-placeholder.component.d.ts +0 -0
- package/{core → package/core}/shared/components/entity-info/entity-info.component.d.ts +0 -0
- package/{core → package/core}/shared/components/extension-host/extension-host-config.d.ts +0 -0
- package/{core → package/core}/shared/components/extension-host/extension-host.component.d.ts +0 -0
- package/{core → package/core}/shared/components/extension-host/extension-host.service.d.ts +0 -0
- package/{core → package/core}/shared/components/extension-host/host-external-frame.d.ts +0 -0
- package/{core → package/core}/shared/components/facet-value-chip/facet-value-chip.component.d.ts +0 -0
- package/{core → package/core}/shared/components/facet-value-selector/facet-value-selector.component.d.ts +0 -0
- package/{core → package/core}/shared/components/focal-point-control/focal-point-control.component.d.ts +0 -0
- package/{core → package/core}/shared/components/form-field/form-field-control.directive.d.ts +0 -0
- package/{core → package/core}/shared/components/form-field/form-field.component.d.ts +0 -0
- package/{core → package/core}/shared/components/form-item/form-item.component.d.ts +0 -0
- package/{core → package/core}/shared/components/formatted-address/formatted-address.component.d.ts +0 -0
- package/{core → package/core}/shared/components/help-tooltip/help-tooltip.component.d.ts +0 -0
- package/{core → package/core}/shared/components/history-entry-detail/history-entry-detail.component.d.ts +0 -0
- package/{core → package/core}/shared/components/items-per-page-controls/items-per-page-controls.component.d.ts +0 -0
- package/{core → package/core}/shared/components/labeled-data/labeled-data.component.d.ts +0 -0
- package/{core → package/core}/shared/components/language-selector/language-selector.component.d.ts +0 -0
- package/{core → package/core}/shared/components/manage-tags-dialog/manage-tags-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/modal-dialog/dialog-buttons.directive.d.ts +0 -0
- package/{core → package/core}/shared/components/modal-dialog/dialog-component-outlet.component.d.ts +0 -0
- package/{core → package/core}/shared/components/modal-dialog/dialog-title.directive.d.ts +0 -0
- package/{core → package/core}/shared/components/modal-dialog/modal-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/object-tree/object-tree.component.d.ts +0 -0
- package/{core → package/core}/shared/components/order-state-label/order-state-label.component.d.ts +0 -0
- package/{core → package/core}/shared/components/pagination-controls/pagination-controls.component.d.ts +0 -0
- package/{core → package/core}/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/product-search-input/product-search-input.component.d.ts +0 -0
- package/{core → package/core}/shared/components/product-selector/product-selector.component.d.ts +0 -0
- package/package/core/shared/components/radio-card/radio-card-fieldset.component.d.ts +21 -0
- package/package/core/shared/components/radio-card/radio-card.component.d.ts +19 -0
- package/{core → package/core}/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/rich-text-editor/link-dialog/link-dialog.component.d.ts +0 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.component.d.ts +28 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.d.ts +31 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/custom-nodes.d.ts +4 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/inputrules.d.ts +8 -0
- package/{core → package/core}/shared/components/rich-text-editor/prosemirror/keymap.d.ts +0 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/menu/links.d.ts +4 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.d.ts +16 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/menu/menu-plugin.d.ts +9 -0
- package/{core → package/core}/shared/components/rich-text-editor/prosemirror/menu/menu.d.ts +0 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/menu/sub-menu-with-icon.d.ts +14 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.d.ts +7 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.d.ts +5 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.d.ts +7 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.d.ts +13 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.d.ts +25 -0
- package/package/core/shared/components/rich-text-editor/prosemirror/types.d.ts +9 -0
- package/{core → package/core}/shared/components/rich-text-editor/prosemirror/utils.d.ts +0 -0
- package/package/core/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.d.ts +18 -0
- package/package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +39 -0
- package/{core → package/core}/shared/components/select-toggle/select-toggle.component.d.ts +0 -0
- package/{core → package/core}/shared/components/simple-dialog/simple-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/components/status-badge/status-badge.component.d.ts +0 -0
- package/{core → package/core}/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.d.ts +0 -0
- package/{core → package/core}/shared/components/table-row-action/table-row-action.component.d.ts +0 -0
- package/{core → package/core}/shared/components/tag-selector/tag-selector.component.d.ts +0 -0
- package/{core → package/core}/shared/components/timeline-entry/timeline-entry.component.d.ts +0 -0
- package/{core → package/core}/shared/components/title-input/title-input.component.d.ts +0 -0
- package/{core → package/core}/shared/components/ui-extension-point/ui-extension-point.component.d.ts +0 -0
- package/{core → package/core}/shared/directives/disabled.directive.d.ts +0 -0
- package/{core → package/core}/shared/directives/if-default-channel-active.directive.d.ts +0 -0
- package/{core → package/core}/shared/directives/if-directive-base.d.ts +0 -0
- package/{core → package/core}/shared/directives/if-multichannel.directive.d.ts +0 -0
- package/{core → package/core}/shared/directives/if-permissions.directive.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.d.ts +0 -0
- package/package/core/shared/dynamic-form-inputs/code-editor-form-input/base-code-editor-form-input.component.d.ts +27 -0
- package/package/core/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.d.ts +19 -0
- package/package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +20 -0
- package/{core → package/core}/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/date-form-input/date-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/number-form-input/number-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/password-form-input/password-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.d.ts +0 -0
- package/package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +90 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/text-form-input/text-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.d.ts +0 -0
- package/{core → package/core}/shared/pipes/asset-preview.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/channel-label.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/custom-field-label.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/duration.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/file-size.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/has-permission.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/locale-base.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/locale-currency-name.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/locale-currency.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/locale-date.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/locale-language-name.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/locale-region-name.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/sentence-case.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/sort.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/state-i18n-token.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/string-to-color.pipe.d.ts +0 -0
- package/{core → package/core}/shared/pipes/time-ago.pipe.d.ts +0 -0
- package/{core → package/core}/shared/providers/routing/can-deactivate-detail-guard.d.ts +0 -0
- package/{core → package/core}/shared/shared.module.d.ts +0 -0
- package/{core → package/core}/validators/unicode-pattern.validator.d.ts +0 -0
- package/{core → package/core}/vendure-admin-ui-core.d.ts +0 -0
- package/package/core/vendure-admin-ui-core.metadata.json +1 -0
- package/{customer → package/customer}/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.d.ts +0 -0
- package/{customer → package/customer}/components/address-card/address-card.component.d.ts +0 -0
- package/{customer → package/customer}/components/address-detail-dialog/address-detail-dialog.component.d.ts +0 -0
- package/{customer → package/customer}/components/customer-detail/customer-detail.component.d.ts +0 -0
- package/{customer → package/customer}/components/customer-group-detail-dialog/customer-group-detail-dialog.component.d.ts +0 -0
- package/{customer → package/customer}/components/customer-group-list/customer-group-list.component.d.ts +0 -0
- package/package/customer/components/customer-group-member-list/customer-group-member-list.component.d.ts +44 -0
- package/{customer → package/customer}/components/customer-history/customer-history.component.d.ts +0 -0
- package/{customer → package/customer}/components/customer-list/customer-list.component.d.ts +0 -0
- package/{customer → package/customer}/components/customer-status-label/customer-status-label.component.d.ts +0 -0
- package/{customer → package/customer}/components/select-customer-group-dialog/select-customer-group-dialog.component.d.ts +0 -0
- package/{customer → package/customer}/customer.module.d.ts +0 -0
- package/{customer → package/customer}/customer.routes.d.ts +0 -0
- package/{customer → package/customer}/package.json +0 -0
- package/{customer → package/customer}/providers/routing/customer-resolver.d.ts +0 -0
- package/{customer → package/customer}/public_api.d.ts +0 -0
- package/{customer → package/customer}/vendure-admin-ui-customer.d.ts +0 -0
- package/package/customer/vendure-admin-ui-customer.metadata.json +1 -0
- package/{dashboard → package/dashboard}/components/dashboard/dashboard.component.d.ts +0 -0
- package/{dashboard → package/dashboard}/components/dashboard-widget/dashboard-widget.component.d.ts +0 -0
- package/{dashboard → package/dashboard}/dashboard.module.d.ts +0 -0
- package/{dashboard → package/dashboard}/dashboard.routes.d.ts +0 -0
- package/{dashboard → package/dashboard}/default-widgets.d.ts +0 -0
- package/{dashboard → package/dashboard}/package.json +0 -0
- package/{dashboard → package/dashboard}/public_api.d.ts +0 -0
- package/{dashboard → package/dashboard}/vendure-admin-ui-dashboard.d.ts +0 -0
- package/{dashboard → package/dashboard}/vendure-admin-ui-dashboard.metadata.json +0 -0
- package/{dashboard → package/dashboard}/widgets/latest-orders-widget/latest-orders-widget.component.d.ts +0 -0
- package/{dashboard → package/dashboard}/widgets/order-summary-widget/order-summary-widget.component.d.ts +0 -0
- package/{dashboard → package/dashboard}/widgets/test-widget/test-widget.component.d.ts +0 -0
- package/{dashboard → package/dashboard}/widgets/welcome-widget/welcome-widget.component.d.ts +0 -0
- package/package/esm2015/catalog/catalog.module.js +85 -0
- package/{esm2015 → package/esm2015}/catalog/catalog.routes.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/apply-facet-dialog/apply-facet-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/asset-detail/asset-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/asset-list/asset-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/assets/assets.component.js +0 -0
- package/package/esm2015/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.js +112 -0
- package/package/esm2015/catalog/components/assign-to-channel-dialog/assign-to-channel-dialog.component.js +51 -0
- package/package/esm2015/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.js +89 -0
- package/package/esm2015/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql.js +69 -0
- package/{esm2015 → package/esm2015}/catalog/components/collection-contents/collection-contents.component.js +0 -0
- package/package/esm2015/catalog/components/collection-detail/collection-detail.component.js +244 -0
- package/package/esm2015/catalog/components/collection-list/collection-list-bulk-actions.js +147 -0
- package/package/esm2015/catalog/components/collection-list/collection-list.component.js +154 -0
- package/{esm2015 → package/esm2015}/catalog/components/collection-tree/array-to-tree.js +0 -0
- package/package/esm2015/catalog/components/collection-tree/collection-tree-node.component.js +126 -0
- package/package/esm2015/catalog/components/collection-tree/collection-tree.component.js +77 -0
- package/{esm2015 → package/esm2015}/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/facet-detail/facet-detail.component.js +0 -0
- package/package/esm2015/catalog/components/facet-list/facet-list-bulk-actions.js +208 -0
- package/package/esm2015/catalog/components/facet-list/facet-list.component.js +116 -0
- package/{esm2015 → package/esm2015}/catalog/components/generate-product-variants/generate-product-variants.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/option-value-input/option-value-input.component.js +0 -0
- package/package/esm2015/catalog/components/product-detail/product-detail.component.js +527 -0
- package/package/esm2015/catalog/components/product-list/product-list-bulk-actions.js +173 -0
- package/package/esm2015/catalog/components/product-list/product-list.component.js +158 -0
- package/{esm2015 → package/esm2015}/catalog/components/product-options-editor/product-options-editor.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/product-variants-editor/product-variants-editor.component.js +0 -0
- package/package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +214 -0
- package/{esm2015 → package/esm2015}/catalog/components/product-variants-table/product-variants-table.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/update-product-option-dialog/update-product-option-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/components/variant-price-detail/variant-price-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/providers/product-detail/product-detail.service.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/providers/product-detail/replace-last.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/providers/routing/asset-resolver.js +0 -0
- package/package/esm2015/catalog/providers/routing/collection-resolver.js +39 -0
- package/{esm2015 → package/esm2015}/catalog/providers/routing/facet-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/providers/routing/product-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/catalog/providers/routing/product-variants-resolver.js +0 -0
- package/package/esm2015/catalog/public_api.js +41 -0
- package/{esm2015 → package/esm2015}/catalog/vendure-admin-ui-catalog.js +0 -0
- package/{esm2015 → package/esm2015}/core/app.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/app.component.module.js +0 -0
- package/{esm2015 → package/esm2015}/core/app.config.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/base-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/base-entity-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/base-list.component.js +0 -0
- package/package/esm2015/core/common/component-registry-types.js +2 -0
- package/{esm2015 → package/esm2015}/core/common/deactivate-aware.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/detail-breadcrumb.js +0 -0
- package/package/esm2015/core/common/generated-types.js +987 -0
- package/{esm2015 → package/esm2015}/core/common/introspection-result-wrapper.js +0 -0
- package/package/esm2015/core/common/introspection-result.js +300 -0
- package/{esm2015 → package/esm2015}/core/common/single-search-selection-model.js +0 -0
- package/package/esm2015/core/common/utilities/bulk-action-utils.js +44 -0
- package/{esm2015 → package/esm2015}/core/common/utilities/configurable-operation-utils.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/utilities/create-updated-translatable.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/utilities/find-translation.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/utilities/flatten-facet-values.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/utilities/get-default-ui-language.js +0 -0
- package/{esm2015 → package/esm2015}/core/common/utilities/interpolate-description.js +0 -0
- package/package/esm2015/core/common/utilities/selection-manager.js +96 -0
- package/{esm2015 → package/esm2015}/core/common/utilities/string-to-color.js +0 -0
- package/package/esm2015/core/common/version.js +3 -0
- package/{esm2015 → package/esm2015}/core/components/app-shell/app-shell.component.js +0 -0
- package/package/esm2015/core/components/breadcrumb/breadcrumb.component.js +126 -0
- package/{esm2015 → package/esm2015}/core/components/channel-switcher/channel-switcher.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/components/main-nav/main-nav.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/components/notification/notification.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/components/overlay-host/overlay-host.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/components/theme-switcher/theme-switcher.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/components/user-menu/user-menu.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/core.module.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/check-jobs-link.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/client-state/client-defaults.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/client-state/client-resolvers.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/data.module.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/administrator-definitions.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/auth-definitions.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/client-definitions.js +0 -0
- package/package/esm2015/core/data/definitions/collection-definitions.js +173 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/customer-definitions.js +0 -0
- package/package/esm2015/core/data/definitions/facet-definitions.js +140 -0
- package/package/esm2015/core/data/definitions/order-definitions.js +585 -0
- package/package/esm2015/core/data/definitions/product-definitions.js +759 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/promotion-definitions.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/settings-definitions.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/shared-definitions.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/definitions/shipping-definitions.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/omit-typename-link.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/providers/administrator-data.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/providers/auth-data.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/providers/base-data.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/providers/client-data.service.js +0 -0
- package/package/esm2015/core/data/providers/collection-data.service.js +90 -0
- package/package/esm2015/core/data/providers/customer-data.service.js +121 -0
- package/{esm2015 → package/esm2015}/core/data/providers/data.service.js +0 -0
- package/package/esm2015/core/data/providers/facet-data.service.js +76 -0
- package/{esm2015 → package/esm2015}/core/data/providers/fetch-adapter.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/providers/interceptor.js +0 -0
- package/package/esm2015/core/data/providers/order-data.service.js +139 -0
- package/package/esm2015/core/data/providers/product-data.service.js +240 -0
- package/{esm2015 → package/esm2015}/core/data/providers/promotion-data.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/providers/settings-data.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/providers/shipping-method-data.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/query-result.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/server-config.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/utils/add-custom-fields.js +0 -0
- package/{esm2015 → package/esm2015}/core/data/utils/get-server-location.js +0 -0
- package/package/esm2015/core/data/utils/remove-readonly-custom-fields.js +95 -0
- package/{esm2015 → package/esm2015}/core/data/utils/transform-relation-custom-field-inputs.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/auth/auth.service.js +0 -0
- package/package/esm2015/core/providers/bulk-action-registry/bulk-action-registry.service.js +27 -0
- package/package/esm2015/core/providers/bulk-action-registry/bulk-action-types.js +2 -0
- package/package/esm2015/core/providers/bulk-action-registry/register-bulk-action.js +63 -0
- package/{esm2015 → package/esm2015}/core/providers/component-registry/component-registry.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/custom-detail-component/custom-detail-component-types.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/custom-detail-component/custom-detail-component.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/custom-field-component/custom-field-component.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/dashboard-widget/dashboard-widget-types.js +0 -0
- package/package/esm2015/core/providers/dashboard-widget/dashboard-widget.service.js +94 -0
- package/{esm2015 → package/esm2015}/core/providers/dashboard-widget/register-dashboard-widget.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/guard/auth.guard.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/health-check/health-check.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/i18n/custom-http-loader.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/i18n/custom-message-format-compiler.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/i18n/i18n.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/job-queue/job-queue.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/local-storage/local-storage.service.js +0 -0
- package/package/esm2015/core/providers/modal/modal.service.js +101 -0
- package/package/esm2015/core/providers/nav-builder/nav-builder-types.js +2 -0
- package/{esm2015 → package/esm2015}/core/providers/nav-builder/nav-builder.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/notification/notification.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/providers/overlay-host/overlay-host.service.js +0 -0
- package/package/esm2015/core/public_api.js +241 -0
- package/package/esm2015/core/shared/components/action-bar/action-bar.component.js +43 -0
- package/{esm2015 → package/esm2015}/core/shared/components/action-bar-items/action-bar-items.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/address-form/address-form.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/affixed-input/affixed-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/affixed-input/percentage-suffix-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/asset-file-input/asset-file-input.component.js +0 -0
- package/package/esm2015/core/shared/components/asset-gallery/asset-gallery.component.js +84 -0
- package/{esm2015 → package/esm2015}/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/asset-preview/asset-preview.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/asset-preview-links/asset-preview-links.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/asset-search-input/asset-search-input.component.js +0 -0
- package/package/esm2015/core/shared/components/bulk-action-menu/bulk-action-menu.component.js +99 -0
- package/{esm2015 → package/esm2015}/core/shared/components/channel-assignment-control/channel-assignment-control.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/channel-badge/channel-badge.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/chip/chip.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/configurable-input/configurable-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/currency-input/currency-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/custom-field-control/custom-field-control.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/customer-label/customer-label.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/data-table/data-table-column.component.js +0 -0
- package/package/esm2015/core/shared/components/data-table/data-table.component.js +162 -0
- package/{esm2015 → package/esm2015}/core/shared/components/datetime-picker/constants.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/datetime-picker/datetime-picker.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/datetime-picker/datetime-picker.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/datetime-picker/types.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/dropdown/dropdown-item.directive.js +0 -0
- package/package/esm2015/core/shared/components/dropdown/dropdown-menu.component.js +122 -0
- package/{esm2015 → package/esm2015}/core/shared/components/dropdown/dropdown-trigger.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/dropdown/dropdown.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/edit-note-dialog/edit-note-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/empty-placeholder/empty-placeholder.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/entity-info/entity-info.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/extension-host/extension-host-config.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/extension-host/extension-host.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/extension-host/extension-host.service.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/extension-host/host-external-frame.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/facet-value-chip/facet-value-chip.component.js +0 -0
- package/package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +117 -0
- package/{esm2015 → package/esm2015}/core/shared/components/focal-point-control/focal-point-control.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/form-field/form-field-control.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/form-field/form-field.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/form-item/form-item.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/formatted-address/formatted-address.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/help-tooltip/help-tooltip.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/history-entry-detail/history-entry-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/items-per-page-controls/items-per-page-controls.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/labeled-data/labeled-data.component.js +0 -0
- package/package/esm2015/core/shared/components/language-selector/language-selector.component.js +21 -0
- package/{esm2015 → package/esm2015}/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/modal-dialog/dialog-buttons.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/modal-dialog/dialog-component-outlet.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/modal-dialog/dialog-title.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/modal-dialog/modal-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/object-tree/object-tree.component.js +0 -0
- package/package/esm2015/core/shared/components/order-state-label/order-state-label.component.js +44 -0
- package/{esm2015 → package/esm2015}/core/shared/components/pagination-controls/pagination-controls.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.js +0 -0
- package/package/esm2015/core/shared/components/product-search-input/product-search-input.component.js +104 -0
- package/package/esm2015/core/shared/components/product-selector/product-selector.component.js +61 -0
- package/package/esm2015/core/shared/components/radio-card/radio-card-fieldset.component.js +57 -0
- package/package/esm2015/core/shared/components/radio-card/radio-card.component.js +54 -0
- package/package/esm2015/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.js +32 -0
- package/{esm2015 → package/esm2015}/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.js +0 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.component.js +140 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/context-menu/context-menu.service.js +45 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/custom-nodes.js +60 -0
- package/{esm2015 → package/esm2015}/core/shared/components/rich-text-editor/prosemirror/inputrules.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/rich-text-editor/prosemirror/keymap.js +0 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/links.js +69 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.js +42 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu-plugin.js +12 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu.js +247 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/sub-menu-with-icon.js +16 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/plugins/image-plugin.js +100 -0
- package/{esm2015 → package/esm2015}/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.js +0 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/plugins/raw-editor-plugin.js +97 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/plugins/tables-plugin.js +166 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.js +142 -0
- package/package/esm2015/core/shared/components/rich-text-editor/prosemirror/types.js +2 -0
- package/{esm2015 → package/esm2015}/core/shared/components/rich-text-editor/prosemirror/utils.js +0 -0
- package/package/esm2015/core/shared/components/rich-text-editor/raw-html-dialog/raw-html-dialog.component.js +57 -0
- package/package/esm2015/core/shared/components/rich-text-editor/rich-text-editor.component.js +97 -0
- package/{esm2015 → package/esm2015}/core/shared/components/select-toggle/select-toggle.component.js +0 -0
- package/package/esm2015/core/shared/components/simple-dialog/simple-dialog.component.js +21 -0
- package/{esm2015 → package/esm2015}/core/shared/components/status-badge/status-badge.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/table-row-action/table-row-action.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/tag-selector/tag-selector.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/timeline-entry/timeline-entry.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/title-input/title-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/components/ui-extension-point/ui-extension-point.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/directives/disabled.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/directives/if-default-channel-active.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/directives/if-directive-base.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/directives/if-multichannel.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/directives/if-permissions.directive.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.js +0 -0
- package/package/esm2015/core/shared/dynamic-form-inputs/code-editor-form-input/base-code-editor-form-input.component.js +59 -0
- package/package/esm2015/core/shared/dynamic-form-inputs/code-editor-form-input/html-editor-form-input.component.js +66 -0
- package/package/esm2015/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.js +88 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.js +0 -0
- package/package/esm2015/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.js +266 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.js +0 -0
- package/package/esm2015/core/shared/dynamic-form-inputs/register-dynamic-input-components.js +136 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/asset-preview.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/channel-label.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/custom-field-label.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/duration.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/file-size.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/has-permission.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/locale-base.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/locale-currency-name.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/locale-currency.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/locale-date.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/locale-language-name.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/locale-region-name.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/sentence-case.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/sort.pipe.js +0 -0
- package/package/esm2015/core/shared/pipes/state-i18n-token.pipe.js +47 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/string-to-color.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/pipes/time-ago.pipe.js +0 -0
- package/{esm2015 → package/esm2015}/core/shared/providers/routing/can-deactivate-detail-guard.js +0 -0
- package/package/esm2015/core/shared/shared.module.js +287 -0
- package/{esm2015 → package/esm2015}/core/validators/unicode-pattern.validator.js +0 -0
- package/{esm2015 → package/esm2015}/core/vendure-admin-ui-core.js +0 -0
- package/{esm2015 → package/esm2015}/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/customer/components/address-card/address-card.component.js +0 -0
- package/{esm2015 → package/esm2015}/customer/components/address-detail-dialog/address-detail-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/customer/components/customer-detail/customer-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.js +0 -0
- package/package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +198 -0
- package/package/esm2015/customer/components/customer-group-member-list/customer-group-member-list.component.js +101 -0
- package/{esm2015 → package/esm2015}/customer/components/customer-history/customer-history.component.js +0 -0
- package/package/esm2015/customer/components/customer-list/customer-list.component.js +81 -0
- package/{esm2015 → package/esm2015}/customer/components/customer-status-label/customer-status-label.component.js +0 -0
- package/{esm2015 → package/esm2015}/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/customer/customer.module.js +0 -0
- package/{esm2015 → package/esm2015}/customer/customer.routes.js +0 -0
- package/{esm2015 → package/esm2015}/customer/providers/routing/customer-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/customer/public_api.js +0 -0
- package/{esm2015 → package/esm2015}/customer/vendure-admin-ui-customer.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/components/dashboard/dashboard.component.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/components/dashboard-widget/dashboard-widget.component.js +0 -0
- package/package/esm2015/dashboard/dashboard.module.js +29 -0
- package/{esm2015 → package/esm2015}/dashboard/dashboard.routes.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/default-widgets.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/public_api.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/vendure-admin-ui-dashboard.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/widgets/order-summary-widget/order-summary-widget.component.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/widgets/test-widget/test-widget.component.js +0 -0
- package/{esm2015 → package/esm2015}/dashboard/widgets/welcome-widget/welcome-widget.component.js +0 -0
- package/{esm2015 → package/esm2015}/login/components/login/login.component.js +0 -0
- package/{esm2015 → package/esm2015}/login/login.module.js +0 -0
- package/{esm2015 → package/esm2015}/login/login.routes.js +0 -0
- package/{esm2015 → package/esm2015}/login/providers/login.guard.js +0 -0
- package/{esm2015 → package/esm2015}/login/public_api.js +0 -0
- package/{esm2015 → package/esm2015}/login/vendure-admin-ui-login.js +0 -0
- package/{esm2015 → package/esm2015}/marketing/components/promotion-detail/promotion-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/marketing/components/promotion-list/promotion-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/marketing/marketing.module.js +0 -0
- package/{esm2015 → package/esm2015}/marketing/marketing.routes.js +0 -0
- package/{esm2015 → package/esm2015}/marketing/providers/routing/promotion-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/marketing/public_api.js +0 -0
- package/{esm2015 → package/esm2015}/marketing/vendure-admin-ui-marketing.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/cancel-order-dialog/cancel-order-dialog.component.js +0 -0
- package/package/esm2015/order/components/coupon-code-selector/coupon-code-selector.component.js +42 -0
- package/package/esm2015/order/components/draft-order-detail/draft-order-detail.component.js +195 -0
- package/package/esm2015/order/components/draft-order-variant-selector/draft-order-variant-selector.component.js +59 -0
- package/{esm2015 → package/esm2015}/order/components/fulfill-order-dialog/fulfill-order-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/fulfillment-card/fulfillment-card.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/fulfillment-detail/fulfillment-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/fulfillment-state-label/fulfillment-state-label.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/line-fulfillment/line-fulfillment.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/line-refunds/line-refunds.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/modification-detail/modification-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-custom-fields-card/order-custom-fields-card.component.js +0 -0
- package/package/esm2015/order/components/order-detail/order-detail.component.js +550 -0
- package/package/esm2015/order/components/order-editor/order-editor.component.js +375 -0
- package/{esm2015 → package/esm2015}/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-history/order-history.component.js +0 -0
- package/package/esm2015/order/components/order-list/order-list.component.js +211 -0
- package/{esm2015 → package/esm2015}/order/components/order-payment-card/order-payment-card.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-process-graph/constants.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-process-graph/order-process-edge.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-process-graph/order-process-graph.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-process-graph/order-process-node.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-process-graph/types.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-process-graph-dialog/order-process-graph-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/order-state-select-dialog/order-state-select-dialog.component.js +0 -0
- package/package/esm2015/order/components/order-table/order-table.component.js +87 -0
- package/{esm2015 → package/esm2015}/order/components/payment-detail/payment-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/payment-state-label/payment-state-label.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/refund-order-dialog/refund-order-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/refund-state-label/refund-state-label.component.js +0 -0
- package/package/esm2015/order/components/select-address-dialog/select-address-dialog.component.js +91 -0
- package/package/esm2015/order/components/select-address-dialog/select-address-dialog.graphql.js +14 -0
- package/package/esm2015/order/components/select-customer-dialog/select-customer-dialog.component.js +59 -0
- package/package/esm2015/order/components/select-shipping-method-dialog/select-shipping-method-dialog.component.js +30 -0
- package/{esm2015 → package/esm2015}/order/components/settle-refund-dialog/settle-refund-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/order/components/simple-item-list/simple-item-list.component.js +0 -0
- package/package/esm2015/order/order.module.js +82 -0
- package/package/esm2015/order/order.routes.js +73 -0
- package/{esm2015 → package/esm2015}/order/providers/order-transition.service.js +0 -0
- package/package/esm2015/order/providers/routing/order-resolver.js +50 -0
- package/package/esm2015/order/providers/routing/order.guard.js +41 -0
- package/package/esm2015/order/public_api.js +44 -0
- package/{esm2015 → package/esm2015}/order/vendure-admin-ui-order.js +0 -0
- package/{esm2015 → package/esm2015}/public_api.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/admin-detail/admin-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/administrator-list/administrator-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/channel-detail/channel-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/channel-list/channel-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/country-detail/country-detail.component.js +0 -0
- package/package/esm2015/settings/components/country-list/country-list.component.js +82 -0
- package/{esm2015 → package/esm2015}/settings/components/global-settings/global-settings.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/payment-method-detail/payment-method-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/payment-method-list/payment-method-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/permission-grid/permission-grid.component.js +0 -0
- package/package/esm2015/settings/components/profile/profile.component.js +82 -0
- package/{esm2015 → package/esm2015}/settings/components/role-detail/role-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/role-list/role-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/shipping-method-detail/shipping-method-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/shipping-method-list/shipping-method-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/shipping-method-test-result/shipping-method-test-result.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/tax-category-detail/tax-category-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/tax-category-list/tax-category-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/tax-rate-detail/tax-rate-detail.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/tax-rate-list/tax-rate-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/test-address-form/test-address-form.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/test-order-builder/test-order-builder.component.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/zone-detail-dialog/zone-detail-dialog.component.js +0 -0
- package/package/esm2015/settings/components/zone-list/zone-list.component.js +160 -0
- package/{esm2015 → package/esm2015}/settings/components/zone-member-list/zone-member-controls.directive.js +0 -0
- package/{esm2015 → package/esm2015}/settings/components/zone-member-list/zone-member-list-header.directive.js +0 -0
- package/package/esm2015/settings/components/zone-member-list/zone-member-list.component.js +63 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/administrator-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/channel-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/country-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/global-settings-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/payment-method-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/profile-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/role-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/shipping-method-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/tax-category-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/providers/routing/tax-rate-resolver.js +0 -0
- package/{esm2015 → package/esm2015}/settings/public_api.js +0 -0
- package/{esm2015 → package/esm2015}/settings/settings.module.js +0 -0
- package/{esm2015 → package/esm2015}/settings/settings.routes.js +0 -0
- package/{esm2015 → package/esm2015}/settings/vendure-admin-ui-settings.js +0 -0
- package/package/esm2015/system/components/health-check/health-check.component.js +19 -0
- package/{esm2015 → package/esm2015}/system/components/job-list/job-list.component.js +0 -0
- package/{esm2015 → package/esm2015}/system/components/job-state-label/job-state-label.component.js +0 -0
- package/{esm2015 → package/esm2015}/system/public_api.js +0 -0
- package/{esm2015 → package/esm2015}/system/system.module.js +0 -0
- package/{esm2015 → package/esm2015}/system/system.routes.js +0 -0
- package/{esm2015 → package/esm2015}/system/vendure-admin-ui-system.js +0 -0
- package/{esm2015 → package/esm2015}/vendure-admin-ui.js +0 -0
- package/package/fesm2015/vendure-admin-ui-catalog.js +4768 -0
- package/package/fesm2015/vendure-admin-ui-catalog.js.map +1 -0
- package/package/fesm2015/vendure-admin-ui-core.js +17900 -0
- package/package/fesm2015/vendure-admin-ui-core.js.map +1 -0
- package/package/fesm2015/vendure-admin-ui-customer.js +1184 -0
- package/package/fesm2015/vendure-admin-ui-customer.js.map +1 -0
- package/package/fesm2015/vendure-admin-ui-dashboard.js +375 -0
- package/package/fesm2015/vendure-admin-ui-dashboard.js.map +1 -0
- package/{fesm2015 → package/fesm2015}/vendure-admin-ui-login.js +0 -0
- package/{fesm2015 → package/fesm2015}/vendure-admin-ui-login.js.map +0 -0
- package/{fesm2015 → package/fesm2015}/vendure-admin-ui-marketing.js +0 -0
- package/{fesm2015 → package/fesm2015}/vendure-admin-ui-marketing.js.map +0 -0
- package/package/fesm2015/vendure-admin-ui-order.js +3155 -0
- package/package/fesm2015/vendure-admin-ui-order.js.map +1 -0
- package/package/fesm2015/vendure-admin-ui-settings.js +2977 -0
- package/package/fesm2015/vendure-admin-ui-settings.js.map +1 -0
- package/package/fesm2015/vendure-admin-ui-system.js +171 -0
- package/{fesm2015 → package/fesm2015}/vendure-admin-ui-system.js.map +0 -0
- package/{fesm2015 → package/fesm2015}/vendure-admin-ui.js +0 -0
- package/{fesm2015 → package/fesm2015}/vendure-admin-ui.js.map +0 -0
- package/{login → package/login}/components/login/login.component.d.ts +0 -0
- package/{login → package/login}/login.module.d.ts +0 -0
- package/{login → package/login}/login.routes.d.ts +0 -0
- package/{login → package/login}/package.json +0 -0
- package/{login → package/login}/providers/login.guard.d.ts +0 -0
- package/{login → package/login}/public_api.d.ts +0 -0
- package/{login → package/login}/vendure-admin-ui-login.d.ts +0 -0
- package/{login → package/login}/vendure-admin-ui-login.metadata.json +0 -0
- package/{marketing → package/marketing}/components/promotion-detail/promotion-detail.component.d.ts +0 -0
- package/{marketing → package/marketing}/components/promotion-list/promotion-list.component.d.ts +0 -0
- package/{marketing → package/marketing}/marketing.module.d.ts +0 -0
- package/{marketing → package/marketing}/marketing.routes.d.ts +0 -0
- package/{marketing → package/marketing}/package.json +0 -0
- package/{marketing → package/marketing}/providers/routing/promotion-resolver.d.ts +0 -0
- package/{marketing → package/marketing}/public_api.d.ts +0 -0
- package/{marketing → package/marketing}/vendure-admin-ui-marketing.d.ts +0 -0
- package/{marketing → package/marketing}/vendure-admin-ui-marketing.metadata.json +0 -0
- package/{order → package/order}/components/add-manual-payment-dialog/add-manual-payment-dialog.component.d.ts +0 -0
- package/{order → package/order}/components/cancel-order-dialog/cancel-order-dialog.component.d.ts +0 -0
- package/package/order/components/coupon-code-selector/coupon-code-selector.component.d.ts +18 -0
- package/package/order/components/draft-order-detail/draft-order-detail.component.d.ts +49 -0
- package/package/order/components/draft-order-variant-selector/draft-order-variant-selector.component.d.ts +21 -0
- package/{order → package/order}/components/fulfill-order-dialog/fulfill-order-dialog.component.d.ts +0 -0
- package/{order → package/order}/components/fulfillment-card/fulfillment-card.component.d.ts +0 -0
- package/{order → package/order}/components/fulfillment-detail/fulfillment-detail.component.d.ts +0 -0
- package/{order → package/order}/components/fulfillment-state-label/fulfillment-state-label.component.d.ts +0 -0
- package/{order → package/order}/components/line-fulfillment/line-fulfillment.component.d.ts +0 -0
- package/{order → package/order}/components/line-refunds/line-refunds.component.d.ts +0 -0
- package/{order → package/order}/components/modification-detail/modification-detail.component.d.ts +0 -0
- package/{order → package/order}/components/order-custom-fields-card/order-custom-fields-card.component.d.ts +0 -0
- package/{order → package/order}/components/order-detail/order-detail.component.d.ts +0 -0
- package/package/order/components/order-editor/order-editor.component.d.ts +71 -0
- package/{order → package/order}/components/order-edits-preview-dialog/order-edits-preview-dialog.component.d.ts +0 -0
- package/{order → package/order}/components/order-history/order-history.component.d.ts +0 -0
- package/package/order/components/order-list/order-list.component.d.ts +35 -0
- package/{order → package/order}/components/order-payment-card/order-payment-card.component.d.ts +0 -0
- package/{order → package/order}/components/order-process-graph/constants.d.ts +0 -0
- package/{order → package/order}/components/order-process-graph/order-process-edge.component.d.ts +0 -0
- package/{order → package/order}/components/order-process-graph/order-process-graph.component.d.ts +0 -0
- package/{order → package/order}/components/order-process-graph/order-process-node.component.d.ts +0 -0
- package/{order → package/order}/components/order-process-graph/types.d.ts +0 -0
- package/{order → package/order}/components/order-process-graph-dialog/order-process-graph-dialog.component.d.ts +0 -0
- package/{order → package/order}/components/order-state-select-dialog/order-state-select-dialog.component.d.ts +0 -0
- package/package/order/components/order-table/order-table.component.d.ts +37 -0
- package/{order → package/order}/components/payment-detail/payment-detail.component.d.ts +0 -0
- package/{order → package/order}/components/payment-state-label/payment-state-label.component.d.ts +0 -0
- package/{order → package/order}/components/refund-order-dialog/refund-order-dialog.component.d.ts +0 -0
- package/{order → package/order}/components/refund-state-label/refund-state-label.component.d.ts +0 -0
- package/package/order/components/select-address-dialog/select-address-dialog.component.d.ts +24 -0
- package/package/order/components/select-address-dialog/select-address-dialog.graphql.d.ts +1 -0
- package/package/order/components/select-customer-dialog/select-customer-dialog.component.d.ts +22 -0
- package/package/order/components/select-shipping-method-dialog/select-shipping-method-dialog.component.d.ts +16 -0
- package/{order → package/order}/components/settle-refund-dialog/settle-refund-dialog.component.d.ts +0 -0
- package/{order → package/order}/components/simple-item-list/simple-item-list.component.d.ts +0 -0
- package/{order → package/order}/order.module.d.ts +0 -0
- package/{order → package/order}/order.routes.d.ts +0 -0
- package/{order → package/order}/package.json +0 -0
- package/{order → package/order}/providers/order-transition.service.d.ts +0 -0
- package/package/order/providers/routing/order-resolver.d.ts +13 -0
- package/package/order/providers/routing/order.guard.d.ts +9 -0
- package/package/order/public_api.d.ts +42 -0
- package/{order → package/order}/vendure-admin-ui-order.d.ts +0 -0
- package/package/order/vendure-admin-ui-order.metadata.json +1 -0
- package/package/package.json +59 -0
- package/{public_api.d.ts → package/public_api.d.ts} +0 -0
- package/{settings → package/settings}/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.d.ts +0 -0
- package/{settings → package/settings}/components/admin-detail/admin-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/administrator-list/administrator-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/channel-detail/channel-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/channel-list/channel-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/country-detail/country-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/country-list/country-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/global-settings/global-settings.component.d.ts +0 -0
- package/{settings → package/settings}/components/payment-method-detail/payment-method-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/payment-method-list/payment-method-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/permission-grid/permission-grid.component.d.ts +0 -0
- package/{settings → package/settings}/components/profile/profile.component.d.ts +0 -0
- package/{settings → package/settings}/components/role-detail/role-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/role-list/role-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.d.ts +0 -0
- package/{settings → package/settings}/components/shipping-method-detail/shipping-method-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/shipping-method-list/shipping-method-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/shipping-method-test-result/shipping-method-test-result.component.d.ts +0 -0
- package/{settings → package/settings}/components/tax-category-detail/tax-category-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/tax-category-list/tax-category-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/tax-rate-detail/tax-rate-detail.component.d.ts +0 -0
- package/{settings → package/settings}/components/tax-rate-list/tax-rate-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/test-address-form/test-address-form.component.d.ts +0 -0
- package/{settings → package/settings}/components/test-order-builder/test-order-builder.component.d.ts +0 -0
- package/{settings → package/settings}/components/zone-detail-dialog/zone-detail-dialog.component.d.ts +0 -0
- package/{settings → package/settings}/components/zone-list/zone-list.component.d.ts +0 -0
- package/{settings → package/settings}/components/zone-member-list/zone-member-controls.directive.d.ts +0 -0
- package/{settings → package/settings}/components/zone-member-list/zone-member-list-header.directive.d.ts +0 -0
- package/package/settings/components/zone-member-list/zone-member-list.component.d.ts +23 -0
- package/{settings → package/settings}/package.json +0 -0
- package/{settings → package/settings}/providers/routing/administrator-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/channel-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/country-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/global-settings-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/payment-method-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/profile-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/role-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/shipping-method-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/tax-category-resolver.d.ts +0 -0
- package/{settings → package/settings}/providers/routing/tax-rate-resolver.d.ts +0 -0
- package/{settings → package/settings}/public_api.d.ts +0 -0
- package/{settings → package/settings}/settings.module.d.ts +0 -0
- package/{settings → package/settings}/settings.routes.d.ts +0 -0
- package/{settings → package/settings}/vendure-admin-ui-settings.d.ts +0 -0
- package/package/settings/vendure-admin-ui-settings.metadata.json +1 -0
- package/{static → package/static}/assets/.gitkeep +0 -0
- package/{static → package/static}/assets/logo-300px.png +0 -0
- package/{static → package/static}/assets/logo-75px.png +0 -0
- package/{static → package/static}/favicon.ico +0 -0
- package/package/static/i18n-messages/cs.json +721 -0
- package/package/static/i18n-messages/de.json +721 -0
- package/package/static/i18n-messages/en.json +721 -0
- package/package/static/i18n-messages/es.json +721 -0
- package/package/static/i18n-messages/fr.json +721 -0
- package/package/static/i18n-messages/it.json +721 -0
- package/package/static/i18n-messages/pl.json +721 -0
- package/package/static/i18n-messages/pt_BR.json +721 -0
- package/package/static/i18n-messages/pt_PT.json +721 -0
- package/package/static/i18n-messages/ru.json +721 -0
- package/package/static/i18n-messages/uk.json +721 -0
- package/package/static/i18n-messages/zh_Hans.json +721 -0
- package/package/static/i18n-messages/zh_Hant.json +721 -0
- package/{static → package/static}/index.html +0 -0
- package/{static → package/static}/polyfills.ts +0 -0
- package/{static → package/static}/styles/_mixins.scss +0 -0
- package/{static → package/static}/styles/_variables.scss +0 -0
- package/package/static/styles/global/_forms.scss +148 -0
- package/package/static/styles/global/_overrides.scss +72 -0
- package/{static → package/static}/styles/global/_sass-overrides.scss +0 -0
- package/package/static/styles/global/_utilities.scss +131 -0
- package/{static → package/static}/styles/styles.scss +0 -0
- package/{static → package/static}/styles/theme/dark.scss +0 -0
- package/{static → package/static}/styles/theme/default.scss +0 -0
- package/{static → package/static}/styles/ui-extension-theme.scss +0 -0
- package/package/static/theme.min.css +8 -0
- package/{static → package/static}/vendure-ui-config.json +0 -0
- package/{system → package/system}/components/health-check/health-check.component.d.ts +0 -0
- package/{system → package/system}/components/job-list/job-list.component.d.ts +0 -0
- package/{system → package/system}/components/job-state-label/job-state-label.component.d.ts +0 -0
- package/{system → package/system}/package.json +0 -0
- package/{system → package/system}/public_api.d.ts +0 -0
- package/{system → package/system}/system.module.d.ts +0 -0
- package/{system → package/system}/system.routes.d.ts +0 -0
- package/{system → package/system}/vendure-admin-ui-system.d.ts +0 -0
- package/package/system/vendure-admin-ui-system.metadata.json +1 -0
- package/{vendure-admin-ui.d.ts → package/vendure-admin-ui.d.ts} +0 -0
- package/{vendure-admin-ui.metadata.json → package/vendure-admin-ui.metadata.json} +0 -0
- package/package.json +59 -21
- package/tsconfig.json +61 -0
- package/tsconfig.lib.json +26 -0
- package/tsconfig.lib.prod.json +14 -0
- package/tslint.json +33 -0
- package/LICENSE +0 -9
- package/bundles/vendure-admin-ui-catalog.umd.js +0 -4861
- package/bundles/vendure-admin-ui-catalog.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-core.umd.js +0 -15291
- package/bundles/vendure-admin-ui-core.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-customer.umd.js +0 -1679
- 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-order.umd.js +0 -3422
- package/bundles/vendure-admin-ui-order.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-settings.umd.js +0 -3699
- package/bundles/vendure-admin-ui-settings.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-system.umd.js +0 -524
- package/catalog/catalog.module.d.ts +0 -2
- package/catalog/components/collection-list/collection-list.component.d.ts +0 -33
- package/catalog/components/collection-tree/collection-tree-node.component.d.ts +0 -36
- package/catalog/components/collection-tree/collection-tree.component.d.ts +0 -35
- package/catalog/components/facet-list/facet-list.component.d.ts +0 -24
- package/catalog/components/product-list/product-list.component.d.ts +0 -29
- package/catalog/public_api.d.ts +0 -33
- package/catalog/vendure-admin-ui-catalog.metadata.json +0 -1
- package/core/common/component-registry-types.d.ts +0 -56
- package/core/common/generated-types.d.ts +0 -9142
- package/core/common/utilities/selection-manager.d.ts +0 -23
- package/core/common/version.d.ts +0 -1
- package/core/data/definitions/collection-definitions.d.ts +0 -10
- package/core/data/definitions/facet-definitions.d.ts +0 -10
- package/core/data/definitions/order-definitions.d.ts +0 -27
- package/core/data/definitions/product-definitions.d.ts +0 -45
- package/core/data/providers/collection-data.service.d.ts +0 -25
- package/core/data/providers/facet-data.service.d.ts +0 -21
- package/core/data/providers/order-data.service.d.ts +0 -35
- package/core/data/providers/product-data.service.d.ts +0 -81
- package/core/providers/modal/modal.service.d.ts +0 -132
- package/core/providers/nav-builder/nav-builder-types.d.ts +0 -91
- package/core/public_api.d.ts +0 -222
- package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +0 -67
- package/core/shared/components/data-table/data-table.component.d.ts +0 -82
- package/core/shared/components/dropdown/dropdown-menu.component.d.ts +0 -30
- package/core/shared/components/rich-text-editor/prosemirror/inputrules.d.ts +0 -8
- package/core/shared/components/rich-text-editor/prosemirror/menu/images.d.ts +0 -4
- package/core/shared/components/rich-text-editor/prosemirror/menu/links.d.ts +0 -4
- package/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.d.ts +0 -4
- package/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.d.ts +0 -5
- package/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.d.ts +0 -21
- package/core/shared/components/rich-text-editor/prosemirror/types.d.ts +0 -11
- package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +0 -35
- package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +0 -32
- package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +0 -89
- package/core/vendure-admin-ui-core.metadata.json +0 -1
- package/customer/components/customer-group-member-list/customer-group-member-list.component.d.ts +0 -37
- package/customer/vendure-admin-ui-customer.metadata.json +0 -1
- package/esm2015/catalog/catalog.module.js +0 -62
- package/esm2015/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.js +0 -109
- package/esm2015/catalog/components/collection-detail/collection-detail.component.js +0 -244
- package/esm2015/catalog/components/collection-list/collection-list.component.js +0 -145
- package/esm2015/catalog/components/collection-tree/collection-tree-node.component.js +0 -117
- package/esm2015/catalog/components/collection-tree/collection-tree.component.js +0 -76
- package/esm2015/catalog/components/facet-list/facet-list.component.js +0 -107
- package/esm2015/catalog/components/product-detail/product-detail.component.js +0 -515
- package/esm2015/catalog/components/product-list/product-list.component.js +0 -153
- package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +0 -214
- package/esm2015/catalog/providers/routing/collection-resolver.js +0 -38
- package/esm2015/catalog/public_api.js +0 -35
- package/esm2015/core/common/component-registry-types.js +0 -2
- package/esm2015/core/common/generated-types.js +0 -983
- package/esm2015/core/common/introspection-result.js +0 -195
- package/esm2015/core/common/utilities/selection-manager.js +0 -64
- package/esm2015/core/common/version.js +0 -3
- package/esm2015/core/components/breadcrumb/breadcrumb.component.js +0 -126
- package/esm2015/core/data/definitions/collection-definitions.js +0 -144
- package/esm2015/core/data/definitions/facet-definitions.js +0 -110
- package/esm2015/core/data/definitions/order-definitions.js +0 -472
- package/esm2015/core/data/definitions/product-definitions.js +0 -745
- package/esm2015/core/data/providers/collection-data.service.js +0 -75
- package/esm2015/core/data/providers/customer-data.service.js +0 -117
- package/esm2015/core/data/providers/facet-data.service.js +0 -60
- package/esm2015/core/data/providers/order-data.service.js +0 -103
- package/esm2015/core/data/providers/product-data.service.js +0 -235
- package/esm2015/core/data/utils/remove-readonly-custom-fields.js +0 -91
- package/esm2015/core/providers/dashboard-widget/dashboard-widget.service.js +0 -97
- package/esm2015/core/providers/modal/modal.service.js +0 -100
- package/esm2015/core/providers/nav-builder/nav-builder-types.js +0 -2
- package/esm2015/core/public_api.js +0 -224
- package/esm2015/core/shared/components/action-bar/action-bar.component.js +0 -47
- package/esm2015/core/shared/components/asset-gallery/asset-gallery.component.js +0 -84
- package/esm2015/core/shared/components/data-table/data-table.component.js +0 -113
- package/esm2015/core/shared/components/dropdown/dropdown-menu.component.js +0 -121
- package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +0 -117
- package/esm2015/core/shared/components/language-selector/language-selector.component.js +0 -21
- package/esm2015/core/shared/components/order-state-label/order-state-label.component.js +0 -43
- package/esm2015/core/shared/components/product-search-input/product-search-input.component.js +0 -104
- 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/prosemirror/menu/images.js +0 -36
- package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/links.js +0 -69
- package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.js +0 -20
- package/esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu.js +0 -192
- package/esm2015/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.js +0 -112
- package/esm2015/core/shared/components/rich-text-editor/prosemirror/types.js +0 -2
- package/esm2015/core/shared/components/rich-text-editor/rich-text-editor.component.js +0 -86
- package/esm2015/core/shared/components/simple-dialog/simple-dialog.component.js +0 -21
- 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/dynamic-form-input/dynamic-form-input.component.js +0 -266
- package/esm2015/core/shared/dynamic-form-inputs/register-dynamic-input-components.js +0 -134
- package/esm2015/core/shared/pipes/state-i18n-token.pipe.js +0 -46
- package/esm2015/core/shared/shared.module.js +0 -275
- package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +0 -198
- package/esm2015/customer/components/customer-group-member-list/customer-group-member-list.component.js +0 -101
- package/esm2015/customer/components/customer-list/customer-list.component.js +0 -81
- package/esm2015/dashboard/dashboard.module.js +0 -25
- package/esm2015/order/components/order-detail/order-detail.component.js +0 -550
- package/esm2015/order/components/order-editor/order-editor.component.js +0 -381
- package/esm2015/order/components/order-list/order-list.component.js +0 -195
- package/esm2015/order/components/order-table/order-table.component.js +0 -76
- package/esm2015/order/order.module.js +0 -70
- package/esm2015/order/order.routes.js +0 -54
- package/esm2015/order/providers/routing/order-resolver.js +0 -33
- package/esm2015/order/public_api.js +0 -36
- package/esm2015/settings/components/country-list/country-list.component.js +0 -82
- package/esm2015/settings/components/profile/profile.component.js +0 -82
- package/esm2015/settings/components/zone-list/zone-list.component.js +0 -160
- package/esm2015/settings/components/zone-member-list/zone-member-list.component.js +0 -63
- package/esm2015/system/components/health-check/health-check.component.js +0 -19
- package/fesm2015/vendure-admin-ui-catalog.js +0 -3994
- package/fesm2015/vendure-admin-ui-catalog.js.map +0 -1
- package/fesm2015/vendure-admin-ui-core.js +0 -16292
- package/fesm2015/vendure-admin-ui-core.js.map +0 -1
- package/fesm2015/vendure-admin-ui-customer.js +0 -1184
- 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-order.js +0 -2607
- package/fesm2015/vendure-admin-ui-order.js.map +0 -1
- package/fesm2015/vendure-admin-ui-settings.js +0 -2977
- package/fesm2015/vendure-admin-ui-settings.js.map +0 -1
- package/fesm2015/vendure-admin-ui-system.js +0 -171
- package/order/components/order-editor/order-editor.component.d.ts +0 -76
- package/order/components/order-list/order-list.component.d.ts +0 -34
- package/order/components/order-table/order-table.component.d.ts +0 -28
- package/order/providers/routing/order-resolver.d.ts +0 -10
- package/order/public_api.d.ts +0 -34
- package/order/vendure-admin-ui-order.metadata.json +0 -1
- package/settings/components/zone-member-list/zone-member-list.component.d.ts +0 -21
- package/settings/vendure-admin-ui-settings.metadata.json +0 -1
- package/static/i18n-messages/cs.json +0 -688
- package/static/i18n-messages/de.json +0 -688
- package/static/i18n-messages/en.json +0 -689
- package/static/i18n-messages/es.json +0 -688
- package/static/i18n-messages/fr.json +0 -688
- package/static/i18n-messages/it.json +0 -688
- package/static/i18n-messages/pl.json +0 -688
- package/static/i18n-messages/pt_BR.json +0 -688
- package/static/i18n-messages/pt_PT.json +0 -688
- package/static/i18n-messages/ru.json +0 -688
- package/static/i18n-messages/uk.json +0 -688
- package/static/i18n-messages/zh_Hans.json +0 -688
- package/static/i18n-messages/zh_Hant.json +0 -688
- package/static/styles/global/_forms.scss +0 -146
- package/static/styles/global/_overrides.scss +0 -72
- package/static/styles/global/_utilities.scss +0 -127
- package/static/theme.min.css +0 -8
- package/system/vendure-admin-ui-system.metadata.json +0 -1
|
@@ -1,3422 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@vendure/admin-ui/core'), require('@biesbjerg/ngx-translate-extract-marker'), require('@vendure/common/lib/shared-utils'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@vendure/common/lib/simple-deep-clone')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@vendure/admin-ui/order', ['exports', '@angular/core', '@angular/forms', '@vendure/admin-ui/core', '@biesbjerg/ngx-translate-extract-marker', '@vendure/common/lib/shared-utils', '@angular/router', 'rxjs', 'rxjs/operators', '@vendure/common/lib/simple-deep-clone'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.vendure = global.vendure || {}, global.vendure['admin-ui'] = global.vendure['admin-ui'] || {}, global.vendure['admin-ui'].order = {}), global.ng.core, global.ng.forms, global.vendure['admin-ui'].core, global.ngxTranslateExtractMarker, global.sharedUtils, global.ng.router, global.rxjs, global.rxjs.operators, global.simpleDeepClone));
|
|
5
|
-
}(this, (function (exports, i0, forms, i1, ngxTranslateExtractMarker, sharedUtils, i1$1, rxjs, operators, simpleDeepClone) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
|
-
|
|
31
|
-
var AddManualPaymentDialogComponent = /** @class */ (function () {
|
|
32
|
-
function AddManualPaymentDialogComponent(dataService) {
|
|
33
|
-
this.dataService = dataService;
|
|
34
|
-
this.form = new forms.FormGroup({
|
|
35
|
-
method: new forms.FormControl('', forms.Validators.required),
|
|
36
|
-
transactionId: new forms.FormControl('', forms.Validators.required),
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
AddManualPaymentDialogComponent.prototype.ngOnInit = function () {
|
|
40
|
-
this.paymentMethods$ = this.dataService.settings
|
|
41
|
-
.getPaymentMethods(999)
|
|
42
|
-
.mapSingle(function (data) { return data.paymentMethods.items; });
|
|
43
|
-
};
|
|
44
|
-
AddManualPaymentDialogComponent.prototype.submit = function () {
|
|
45
|
-
var formValue = this.form.value;
|
|
46
|
-
this.resolveWith({
|
|
47
|
-
method: formValue.method,
|
|
48
|
-
transactionId: formValue.transactionId,
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
AddManualPaymentDialogComponent.prototype.cancel = function () {
|
|
52
|
-
this.resolveWith();
|
|
53
|
-
};
|
|
54
|
-
return AddManualPaymentDialogComponent;
|
|
55
|
-
}());
|
|
56
|
-
AddManualPaymentDialogComponent.decorators = [
|
|
57
|
-
{ type: i0.Component, args: [{
|
|
58
|
-
selector: 'vdr-add-manual-payment-dialog',
|
|
59
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.add-payment-to-order' | translate }}</ng-template>\r\n<form [formGroup]=\"form\">\r\n <vdr-form-field [label]=\"'order.payment-method' | translate\" for=\"method\">\r\n <ng-select\r\n [items]=\"paymentMethods$ | async\"\r\n bindLabel=\"code\"\r\n autofocus\r\n bindValue=\"code\"\r\n [addTag]=\"true\"\r\n formControlName=\"method\"\r\n ></ng-select>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'order.transaction-id' | translate\" for=\"transactionId\">\r\n <input id=\"transactionId\" type=\"text\" formControlName=\"transactionId\" />\r\n </vdr-form-field>\r\n</form>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" class=\"btn btn-primary\" [disabled]=\"form.invalid || form.pristine\">\r\n {{ 'order.add-payment' | translate }} ({{ outstandingAmount | localeCurrency: currencyCode }})\r\n </button>\r\n</ng-template>\r\n",
|
|
60
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
61
|
-
styles: [".ng-select{min-width:100%}\n"]
|
|
62
|
-
},] }
|
|
63
|
-
];
|
|
64
|
-
AddManualPaymentDialogComponent.ctorParameters = function () { return [
|
|
65
|
-
{ type: i1.DataService }
|
|
66
|
-
]; };
|
|
67
|
-
|
|
68
|
-
/*! *****************************************************************************
|
|
69
|
-
Copyright (c) Microsoft Corporation.
|
|
70
|
-
|
|
71
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
72
|
-
purpose with or without fee is hereby granted.
|
|
73
|
-
|
|
74
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
75
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
76
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
77
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
78
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
79
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
80
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
81
|
-
***************************************************************************** */
|
|
82
|
-
/* global Reflect, Promise */
|
|
83
|
-
var extendStatics = function (d, b) {
|
|
84
|
-
extendStatics = Object.setPrototypeOf ||
|
|
85
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
86
|
-
function (d, b) { for (var p in b)
|
|
87
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
88
|
-
d[p] = b[p]; };
|
|
89
|
-
return extendStatics(d, b);
|
|
90
|
-
};
|
|
91
|
-
function __extends(d, b) {
|
|
92
|
-
if (typeof b !== "function" && b !== null)
|
|
93
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
94
|
-
extendStatics(d, b);
|
|
95
|
-
function __() { this.constructor = d; }
|
|
96
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
97
|
-
}
|
|
98
|
-
var __assign = function () {
|
|
99
|
-
__assign = Object.assign || function __assign(t) {
|
|
100
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
101
|
-
s = arguments[i];
|
|
102
|
-
for (var p in s)
|
|
103
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
104
|
-
t[p] = s[p];
|
|
105
|
-
}
|
|
106
|
-
return t;
|
|
107
|
-
};
|
|
108
|
-
return __assign.apply(this, arguments);
|
|
109
|
-
};
|
|
110
|
-
function __rest(s, e) {
|
|
111
|
-
var t = {};
|
|
112
|
-
for (var p in s)
|
|
113
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
114
|
-
t[p] = s[p];
|
|
115
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
116
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
117
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
118
|
-
t[p[i]] = s[p[i]];
|
|
119
|
-
}
|
|
120
|
-
return t;
|
|
121
|
-
}
|
|
122
|
-
function __decorate(decorators, target, key, desc) {
|
|
123
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
124
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
125
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
126
|
-
else
|
|
127
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
128
|
-
if (d = decorators[i])
|
|
129
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
130
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
131
|
-
}
|
|
132
|
-
function __param(paramIndex, decorator) {
|
|
133
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
134
|
-
}
|
|
135
|
-
function __metadata(metadataKey, metadataValue) {
|
|
136
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
137
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
138
|
-
}
|
|
139
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
140
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
141
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
142
|
-
function fulfilled(value) { try {
|
|
143
|
-
step(generator.next(value));
|
|
144
|
-
}
|
|
145
|
-
catch (e) {
|
|
146
|
-
reject(e);
|
|
147
|
-
} }
|
|
148
|
-
function rejected(value) { try {
|
|
149
|
-
step(generator["throw"](value));
|
|
150
|
-
}
|
|
151
|
-
catch (e) {
|
|
152
|
-
reject(e);
|
|
153
|
-
} }
|
|
154
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
155
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
function __generator(thisArg, body) {
|
|
159
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
160
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
161
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
162
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
163
|
-
function step(op) {
|
|
164
|
-
if (f)
|
|
165
|
-
throw new TypeError("Generator is already executing.");
|
|
166
|
-
while (_)
|
|
167
|
-
try {
|
|
168
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
169
|
-
return t;
|
|
170
|
-
if (y = 0, t)
|
|
171
|
-
op = [op[0] & 2, t.value];
|
|
172
|
-
switch (op[0]) {
|
|
173
|
-
case 0:
|
|
174
|
-
case 1:
|
|
175
|
-
t = op;
|
|
176
|
-
break;
|
|
177
|
-
case 4:
|
|
178
|
-
_.label++;
|
|
179
|
-
return { value: op[1], done: false };
|
|
180
|
-
case 5:
|
|
181
|
-
_.label++;
|
|
182
|
-
y = op[1];
|
|
183
|
-
op = [0];
|
|
184
|
-
continue;
|
|
185
|
-
case 7:
|
|
186
|
-
op = _.ops.pop();
|
|
187
|
-
_.trys.pop();
|
|
188
|
-
continue;
|
|
189
|
-
default:
|
|
190
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
191
|
-
_ = 0;
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
195
|
-
_.label = op[1];
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
199
|
-
_.label = t[1];
|
|
200
|
-
t = op;
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
if (t && _.label < t[2]) {
|
|
204
|
-
_.label = t[2];
|
|
205
|
-
_.ops.push(op);
|
|
206
|
-
break;
|
|
207
|
-
}
|
|
208
|
-
if (t[2])
|
|
209
|
-
_.ops.pop();
|
|
210
|
-
_.trys.pop();
|
|
211
|
-
continue;
|
|
212
|
-
}
|
|
213
|
-
op = body.call(thisArg, _);
|
|
214
|
-
}
|
|
215
|
-
catch (e) {
|
|
216
|
-
op = [6, e];
|
|
217
|
-
y = 0;
|
|
218
|
-
}
|
|
219
|
-
finally {
|
|
220
|
-
f = t = 0;
|
|
221
|
-
}
|
|
222
|
-
if (op[0] & 5)
|
|
223
|
-
throw op[1];
|
|
224
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
228
|
-
if (k2 === undefined)
|
|
229
|
-
k2 = k;
|
|
230
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
231
|
-
}) : (function (o, m, k, k2) {
|
|
232
|
-
if (k2 === undefined)
|
|
233
|
-
k2 = k;
|
|
234
|
-
o[k2] = m[k];
|
|
235
|
-
});
|
|
236
|
-
function __exportStar(m, o) {
|
|
237
|
-
for (var p in m)
|
|
238
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
239
|
-
__createBinding(o, m, p);
|
|
240
|
-
}
|
|
241
|
-
function __values(o) {
|
|
242
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
243
|
-
if (m)
|
|
244
|
-
return m.call(o);
|
|
245
|
-
if (o && typeof o.length === "number")
|
|
246
|
-
return {
|
|
247
|
-
next: function () {
|
|
248
|
-
if (o && i >= o.length)
|
|
249
|
-
o = void 0;
|
|
250
|
-
return { value: o && o[i++], done: !o };
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
254
|
-
}
|
|
255
|
-
function __read(o, n) {
|
|
256
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
257
|
-
if (!m)
|
|
258
|
-
return o;
|
|
259
|
-
var i = m.call(o), r, ar = [], e;
|
|
260
|
-
try {
|
|
261
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
262
|
-
ar.push(r.value);
|
|
263
|
-
}
|
|
264
|
-
catch (error) {
|
|
265
|
-
e = { error: error };
|
|
266
|
-
}
|
|
267
|
-
finally {
|
|
268
|
-
try {
|
|
269
|
-
if (r && !r.done && (m = i["return"]))
|
|
270
|
-
m.call(i);
|
|
271
|
-
}
|
|
272
|
-
finally {
|
|
273
|
-
if (e)
|
|
274
|
-
throw e.error;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
return ar;
|
|
278
|
-
}
|
|
279
|
-
/** @deprecated */
|
|
280
|
-
function __spread() {
|
|
281
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
282
|
-
ar = ar.concat(__read(arguments[i]));
|
|
283
|
-
return ar;
|
|
284
|
-
}
|
|
285
|
-
/** @deprecated */
|
|
286
|
-
function __spreadArrays() {
|
|
287
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
288
|
-
s += arguments[i].length;
|
|
289
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
290
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
291
|
-
r[k] = a[j];
|
|
292
|
-
return r;
|
|
293
|
-
}
|
|
294
|
-
function __spreadArray(to, from, pack) {
|
|
295
|
-
if (pack || arguments.length === 2)
|
|
296
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
297
|
-
if (ar || !(i in from)) {
|
|
298
|
-
if (!ar)
|
|
299
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
300
|
-
ar[i] = from[i];
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
304
|
-
}
|
|
305
|
-
function __await(v) {
|
|
306
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
307
|
-
}
|
|
308
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
309
|
-
if (!Symbol.asyncIterator)
|
|
310
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
311
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
312
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
313
|
-
function verb(n) { if (g[n])
|
|
314
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
315
|
-
function resume(n, v) { try {
|
|
316
|
-
step(g[n](v));
|
|
317
|
-
}
|
|
318
|
-
catch (e) {
|
|
319
|
-
settle(q[0][3], e);
|
|
320
|
-
} }
|
|
321
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
322
|
-
function fulfill(value) { resume("next", value); }
|
|
323
|
-
function reject(value) { resume("throw", value); }
|
|
324
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
325
|
-
resume(q[0][0], q[0][1]); }
|
|
326
|
-
}
|
|
327
|
-
function __asyncDelegator(o) {
|
|
328
|
-
var i, p;
|
|
329
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
330
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
331
|
-
}
|
|
332
|
-
function __asyncValues(o) {
|
|
333
|
-
if (!Symbol.asyncIterator)
|
|
334
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
335
|
-
var m = o[Symbol.asyncIterator], i;
|
|
336
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
337
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
338
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
339
|
-
}
|
|
340
|
-
function __makeTemplateObject(cooked, raw) {
|
|
341
|
-
if (Object.defineProperty) {
|
|
342
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
cooked.raw = raw;
|
|
346
|
-
}
|
|
347
|
-
return cooked;
|
|
348
|
-
}
|
|
349
|
-
;
|
|
350
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
351
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
352
|
-
}) : function (o, v) {
|
|
353
|
-
o["default"] = v;
|
|
354
|
-
};
|
|
355
|
-
function __importStar(mod) {
|
|
356
|
-
if (mod && mod.__esModule)
|
|
357
|
-
return mod;
|
|
358
|
-
var result = {};
|
|
359
|
-
if (mod != null)
|
|
360
|
-
for (var k in mod)
|
|
361
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
362
|
-
__createBinding(result, mod, k);
|
|
363
|
-
__setModuleDefault(result, mod);
|
|
364
|
-
return result;
|
|
365
|
-
}
|
|
366
|
-
function __importDefault(mod) {
|
|
367
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
368
|
-
}
|
|
369
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
370
|
-
if (kind === "a" && !f)
|
|
371
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
372
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
373
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
374
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
375
|
-
}
|
|
376
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
377
|
-
if (kind === "m")
|
|
378
|
-
throw new TypeError("Private method is not writable");
|
|
379
|
-
if (kind === "a" && !f)
|
|
380
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
381
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
382
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
383
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
var CancelOrderDialogComponent = /** @class */ (function () {
|
|
387
|
-
function CancelOrderDialogComponent(i18nService) {
|
|
388
|
-
var _this = this;
|
|
389
|
-
var _a;
|
|
390
|
-
this.i18nService = i18nService;
|
|
391
|
-
this.cancelAll = true;
|
|
392
|
-
this.lineQuantities = {};
|
|
393
|
-
this.reasons = (_a = i1.getAppConfig().cancellationReasons) !== null && _a !== void 0 ? _a : [
|
|
394
|
-
ngxTranslateExtractMarker.marker('order.cancel-reason-customer-request'),
|
|
395
|
-
ngxTranslateExtractMarker.marker('order.cancel-reason-not-available'),
|
|
396
|
-
];
|
|
397
|
-
this.reasons = this.reasons.map(function (r) { return _this.i18nService.translate(r); });
|
|
398
|
-
}
|
|
399
|
-
Object.defineProperty(CancelOrderDialogComponent.prototype, "selectionCount", {
|
|
400
|
-
get: function () {
|
|
401
|
-
return Object.values(this.lineQuantities).reduce(function (sum, n) { return sum + n; }, 0);
|
|
402
|
-
},
|
|
403
|
-
enumerable: false,
|
|
404
|
-
configurable: true
|
|
405
|
-
});
|
|
406
|
-
CancelOrderDialogComponent.prototype.ngOnInit = function () {
|
|
407
|
-
this.lineQuantities = this.order.lines.reduce(function (result, line) {
|
|
408
|
-
var _b;
|
|
409
|
-
return Object.assign(Object.assign({}, result), (_b = {}, _b[line.id] = line.quantity, _b));
|
|
410
|
-
}, {});
|
|
411
|
-
};
|
|
412
|
-
CancelOrderDialogComponent.prototype.radioChanged = function () {
|
|
413
|
-
var e_1, _b, e_2, _c;
|
|
414
|
-
if (this.cancelAll) {
|
|
415
|
-
try {
|
|
416
|
-
for (var _d = __values(this.order.lines), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
417
|
-
var line = _e.value;
|
|
418
|
-
this.lineQuantities[line.id] = line.quantity;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
422
|
-
finally {
|
|
423
|
-
try {
|
|
424
|
-
if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
|
|
425
|
-
}
|
|
426
|
-
finally { if (e_1) throw e_1.error; }
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
else {
|
|
430
|
-
try {
|
|
431
|
-
for (var _f = __values(this.order.lines), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
432
|
-
var line = _g.value;
|
|
433
|
-
this.lineQuantities[line.id] = 0;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
437
|
-
finally {
|
|
438
|
-
try {
|
|
439
|
-
if (_g && !_g.done && (_c = _f.return)) _c.call(_f);
|
|
440
|
-
}
|
|
441
|
-
finally { if (e_2) throw e_2.error; }
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
CancelOrderDialogComponent.prototype.checkIfAllSelected = function () {
|
|
446
|
-
var e_3, _b;
|
|
447
|
-
var _a;
|
|
448
|
-
var _loop_1 = function (lineId, quantity) {
|
|
449
|
-
var quantityInOrder = (_a = this_1.order.lines.find(function (line) { return line.id === lineId; })) === null || _a === void 0 ? void 0 : _a.quantity;
|
|
450
|
-
if (quantityInOrder && quantity < quantityInOrder) {
|
|
451
|
-
return { value: void 0 };
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
var this_1 = this;
|
|
455
|
-
try {
|
|
456
|
-
for (var _c = __values(Object.entries(this.lineQuantities)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
457
|
-
var _e = __read(_d.value, 2), lineId = _e[0], quantity = _e[1];
|
|
458
|
-
var state_1 = _loop_1(lineId, quantity);
|
|
459
|
-
if (typeof state_1 === "object")
|
|
460
|
-
return state_1.value;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
464
|
-
finally {
|
|
465
|
-
try {
|
|
466
|
-
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
467
|
-
}
|
|
468
|
-
finally { if (e_3) throw e_3.error; }
|
|
469
|
-
}
|
|
470
|
-
// If we got here, all of the selected quantities are equal to the order
|
|
471
|
-
// line quantities, i.e. everything is selected.
|
|
472
|
-
this.cancelAll = true;
|
|
473
|
-
};
|
|
474
|
-
CancelOrderDialogComponent.prototype.select = function () {
|
|
475
|
-
this.resolveWith({
|
|
476
|
-
orderId: this.order.id,
|
|
477
|
-
lines: this.getLineInputs(),
|
|
478
|
-
reason: this.reason,
|
|
479
|
-
cancelShipping: this.cancelAll,
|
|
480
|
-
});
|
|
481
|
-
};
|
|
482
|
-
CancelOrderDialogComponent.prototype.cancel = function () {
|
|
483
|
-
this.resolveWith();
|
|
484
|
-
};
|
|
485
|
-
CancelOrderDialogComponent.prototype.getLineInputs = function () {
|
|
486
|
-
if (this.order.active) {
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
return Object.entries(this.lineQuantities)
|
|
490
|
-
.map(function (_b) {
|
|
491
|
-
var _c = __read(_b, 2), orderLineId = _c[0], quantity = _c[1];
|
|
492
|
-
return ({
|
|
493
|
-
orderLineId: orderLineId,
|
|
494
|
-
quantity: quantity,
|
|
495
|
-
});
|
|
496
|
-
})
|
|
497
|
-
.filter(function (l) { return 0 < l.quantity; });
|
|
498
|
-
};
|
|
499
|
-
return CancelOrderDialogComponent;
|
|
500
|
-
}());
|
|
501
|
-
CancelOrderDialogComponent.decorators = [
|
|
502
|
-
{ type: i0.Component, args: [{
|
|
503
|
-
selector: 'vdr-cancel-order-dialog',
|
|
504
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.cancel-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-lines\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.cancel' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.is-disabled]=\"cancelAll\"\r\n [class.is-cancelled]=\"line.quantity === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ line.quantity }}</td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n </td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"line.quantity > 0 && !order.active; else nonEditable\"\r\n [(ngModel)]=\"lineQuantities[line.id]\"\r\n (input)=\"checkIfAllSelected()\"\r\n [disabled]=\"cancelAll\"\r\n type=\"number\"\r\n [max]=\"line.quantity\"\r\n min=\"0\"\r\n />\r\n <ng-template #nonEditable>{{ line.quantity }}</ng-template>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"cancellation-details\">\r\n <ng-container *ngIf=\"order.active !== true\">\r\n <clr-radio-wrapper>\r\n <input\r\n type=\"radio\"\r\n clrRadio\r\n [value]=\"true\"\r\n [(ngModel)]=\"cancelAll\"\r\n name=\"options\"\r\n (ngModelChange)=\"radioChanged()\"\r\n />\r\n <label>{{ 'order.cancel-entire-order' | translate }}</label>\r\n </clr-radio-wrapper>\r\n <clr-radio-wrapper>\r\n <input\r\n type=\"radio\"\r\n clrRadio\r\n [value]=\"false\"\r\n [(ngModel)]=\"cancelAll\"\r\n name=\"options\"\r\n (ngModelChange)=\"radioChanged()\"\r\n />\r\n <label>{{ 'order.cancel-specified-items' | translate }}</label>\r\n </clr-radio-wrapper>\r\n </ng-container>\r\n <label class=\"clr-control-label\">{{ 'order.cancellation-reason' | translate }}</label>\r\n <ng-select\r\n [items]=\"reasons\"\r\n bindLabel=\"name\"\r\n autofocus\r\n bindValue=\"id\"\r\n [addTag]=\"true\"\r\n [(ngModel)]=\"reason\"\r\n ></ng-select>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"select()\"\r\n [disabled]=\"!reason || (!order.active && selectionCount === 0)\"\r\n class=\"btn btn-primary\"\r\n >\r\n <ng-container *ngIf=\"!order.active\">\r\n {{ 'order.cancel-selected-items' | translate }}\r\n </ng-container>\r\n <ng-container *ngIf=\"order.active\">\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-container>\r\n </button>\r\n</ng-template>\r\n",
|
|
505
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
506
|
-
styles: [":host{height:100%;display:flex;min-height:64vh}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}@media screen and (min-width: 768px){.fulfillment-wrapper .cancellation-details{margin-top:0;margin-left:24px;width:250px}}.fulfillment-wrapper .order-lines{flex:1;overflow-y:auto}.fulfillment-wrapper .order-lines table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}.fulfillment-wrapper .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.fulfillment-wrapper .is-disabled td,.fulfillment-wrapper .is-disabled td input{background-color:var(--color-component-bg-200)}\n"]
|
|
507
|
-
},] }
|
|
508
|
-
];
|
|
509
|
-
CancelOrderDialogComponent.ctorParameters = function () { return [
|
|
510
|
-
{ type: i1.I18nService }
|
|
511
|
-
]; };
|
|
512
|
-
|
|
513
|
-
var FulfillOrderDialogComponent = /** @class */ (function () {
|
|
514
|
-
function FulfillOrderDialogComponent(dataService, changeDetector) {
|
|
515
|
-
this.dataService = dataService;
|
|
516
|
-
this.changeDetector = changeDetector;
|
|
517
|
-
this.fulfillmentHandlerControl = new forms.FormControl();
|
|
518
|
-
this.fulfillmentQuantities = {};
|
|
519
|
-
}
|
|
520
|
-
FulfillOrderDialogComponent.prototype.ngOnInit = function () {
|
|
521
|
-
var _this = this;
|
|
522
|
-
this.dataService.settings.getGlobalSettings().single$.subscribe(function (_c) {
|
|
523
|
-
var globalSettings = _c.globalSettings;
|
|
524
|
-
_this.fulfillmentQuantities = _this.order.lines.reduce(function (result, line) {
|
|
525
|
-
var _c;
|
|
526
|
-
var fulfillCount = _this.getFulfillableCount(line, globalSettings.trackInventory);
|
|
527
|
-
return Object.assign(Object.assign({}, result), (_c = {}, _c[line.id] = { fulfillCount: fulfillCount, max: fulfillCount }, _c));
|
|
528
|
-
}, {});
|
|
529
|
-
_this.changeDetector.markForCheck();
|
|
530
|
-
});
|
|
531
|
-
this.dataService.shippingMethod
|
|
532
|
-
.getShippingMethodOperations()
|
|
533
|
-
.mapSingle(function (data) { return data.fulfillmentHandlers; })
|
|
534
|
-
.subscribe(function (handlers) {
|
|
535
|
-
_this.fulfillmentHandlerDef =
|
|
536
|
-
handlers.find(function (h) { var _a, _b; return h.code === ((_b = (_a = _this.order.shippingLines[0]) === null || _a === void 0 ? void 0 : _a.shippingMethod) === null || _b === void 0 ? void 0 : _b.fulfillmentHandlerCode); }) || handlers[0];
|
|
537
|
-
_this.fulfillmentHandler = i1.configurableDefinitionToInstance(_this.fulfillmentHandlerDef);
|
|
538
|
-
_this.fulfillmentHandlerControl.patchValue(_this.fulfillmentHandler);
|
|
539
|
-
_this.changeDetector.markForCheck();
|
|
540
|
-
});
|
|
541
|
-
};
|
|
542
|
-
FulfillOrderDialogComponent.prototype.getFulfillableCount = function (line, globalTrackInventory) {
|
|
543
|
-
var _c = line.productVariant, trackInventory = _c.trackInventory, stockOnHand = _c.stockOnHand;
|
|
544
|
-
var effectiveTracInventory = trackInventory === i1.GlobalFlag.INHERIT ? globalTrackInventory : trackInventory === i1.GlobalFlag.TRUE;
|
|
545
|
-
var unfulfilledCount = this.getUnfulfilledCount(line);
|
|
546
|
-
return effectiveTracInventory ? Math.min(unfulfilledCount, stockOnHand) : unfulfilledCount;
|
|
547
|
-
};
|
|
548
|
-
FulfillOrderDialogComponent.prototype.getUnfulfilledCount = function (line) {
|
|
549
|
-
var _a, _b;
|
|
550
|
-
var fulfilled = (_b = (_a = line.fulfillments) === null || _a === void 0 ? void 0 : _a.map(function (f) { return f.summary; }).flat().filter(function (row) { return row.orderLine.id === line.id; }).reduce(function (sum, row) { return sum + row.quantity; }, 0)) !== null && _b !== void 0 ? _b : 0;
|
|
551
|
-
return line.quantity - fulfilled;
|
|
552
|
-
};
|
|
553
|
-
FulfillOrderDialogComponent.prototype.canSubmit = function () {
|
|
554
|
-
var totalCount = Object.values(this.fulfillmentQuantities).reduce(function (total, _c) {
|
|
555
|
-
var fulfillCount = _c.fulfillCount;
|
|
556
|
-
return total + fulfillCount;
|
|
557
|
-
}, 0);
|
|
558
|
-
var formIsValid = i1.configurableOperationValueIsValid(this.fulfillmentHandlerDef, this.fulfillmentHandlerControl.value) && this.fulfillmentHandlerControl.valid;
|
|
559
|
-
return formIsValid && 0 < totalCount;
|
|
560
|
-
};
|
|
561
|
-
FulfillOrderDialogComponent.prototype.select = function () {
|
|
562
|
-
var lines = Object.entries(this.fulfillmentQuantities).map(function (_c) {
|
|
563
|
-
var _d = __read(_c, 2), orderLineId = _d[0], fulfillCount = _d[1].fulfillCount;
|
|
564
|
-
return ({
|
|
565
|
-
orderLineId: orderLineId,
|
|
566
|
-
quantity: fulfillCount,
|
|
567
|
-
});
|
|
568
|
-
});
|
|
569
|
-
this.resolveWith({
|
|
570
|
-
lines: lines,
|
|
571
|
-
handler: i1.toConfigurableOperationInput(this.fulfillmentHandler, this.fulfillmentHandlerControl.value),
|
|
572
|
-
});
|
|
573
|
-
};
|
|
574
|
-
FulfillOrderDialogComponent.prototype.cancel = function () {
|
|
575
|
-
this.resolveWith();
|
|
576
|
-
};
|
|
577
|
-
return FulfillOrderDialogComponent;
|
|
578
|
-
}());
|
|
579
|
-
FulfillOrderDialogComponent.decorators = [
|
|
580
|
-
{ type: i0.Component, args: [{
|
|
581
|
-
selector: 'vdr-fulfill-order-dialog',
|
|
582
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.fulfill-order' | translate }}</ng-template>\r\n\r\n<div class=\"fulfillment-wrapper\">\r\n <div class=\"order-table\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unfulfilled' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th>{{ 'order.fulfill' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr\r\n *ngFor=\"let line of order.lines\"\r\n class=\"order-line\"\r\n [class.ignore]=\"getUnfulfilledCount(line) === 0\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">{{ getUnfulfilledCount(line) }}</td>\r\n <td class=\"align-middle quantity\">{{ line.productVariant.stockOnHand }}</td>\r\n <td class=\"align-middle fulfil\">\r\n <input\r\n *ngIf=\"fulfillmentQuantities[line.id]\"\r\n [disabled]=\"getUnfulfilledCount(line) === 0\"\r\n [(ngModel)]=\"fulfillmentQuantities[line.id].fulfillCount\"\r\n type=\"number\"\r\n [max]=\"fulfillmentQuantities[line.id].max\"\r\n min=\"0\"\r\n />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"shipping-details\">\r\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\r\n <h6>{{ 'order.shipping-method' | translate }}</h6>\r\n {{ order.shippingLines[0]?.shippingMethod?.name }}\r\n <strong>{{ order.shipping | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-configurable-input\r\n [operationDefinition]=\"fulfillmentHandlerDef\"\r\n [operation]=\"fulfillmentHandler\"\r\n [formControl]=\"fulfillmentHandlerControl\"\r\n [removable]=\"false\"\r\n ></vdr-configurable-input>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n {{ 'order.create-fulfillment' | translate }}\r\n </button>\r\n</ng-template>\r\n",
|
|
583
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
584
|
-
styles: [":host{height:100%;display:flex;min-height:64vh}.fulfillment-wrapper{flex:1}@media screen and (min-width: 768px){.fulfillment-wrapper{display:flex;flex-direction:row}}.fulfillment-wrapper .shipping-details{margin-top:24px}@media screen and (min-width: 768px){.fulfillment-wrapper .shipping-details{margin-top:0;margin-left:24px;width:250px}}.fulfillment-wrapper .shipping-details clr-input-container{margin-top:24px}.fulfillment-wrapper .order-table{flex:1;overflow-y:auto}.fulfillment-wrapper .order-table table{margin-top:0}.fulfillment-wrapper tr.ignore{color:var(--color-grey-300)}\n"]
|
|
585
|
-
},] }
|
|
586
|
-
];
|
|
587
|
-
FulfillOrderDialogComponent.ctorParameters = function () { return [
|
|
588
|
-
{ type: i1.DataService },
|
|
589
|
-
{ type: i0.ChangeDetectorRef }
|
|
590
|
-
]; };
|
|
591
|
-
|
|
592
|
-
var FulfillmentCardComponent = /** @class */ (function () {
|
|
593
|
-
function FulfillmentCardComponent() {
|
|
594
|
-
this.transitionState = new i0.EventEmitter();
|
|
595
|
-
}
|
|
596
|
-
FulfillmentCardComponent.prototype.nextSuggestedState = function () {
|
|
597
|
-
var _a;
|
|
598
|
-
if (!this.fulfillment) {
|
|
599
|
-
return;
|
|
600
|
-
}
|
|
601
|
-
var nextStates = this.fulfillment.nextStates;
|
|
602
|
-
var namedStateOrDefault = function (targetState) { return nextStates.includes(targetState) ? targetState : nextStates[0]; };
|
|
603
|
-
switch ((_a = this.fulfillment) === null || _a === void 0 ? void 0 : _a.state) {
|
|
604
|
-
case 'Pending':
|
|
605
|
-
return namedStateOrDefault('Shipped');
|
|
606
|
-
case 'Shipped':
|
|
607
|
-
return namedStateOrDefault('Delivered');
|
|
608
|
-
default:
|
|
609
|
-
return nextStates.find(function (s) { return s !== 'Cancelled'; });
|
|
610
|
-
}
|
|
611
|
-
};
|
|
612
|
-
FulfillmentCardComponent.prototype.nextOtherStates = function () {
|
|
613
|
-
if (!this.fulfillment) {
|
|
614
|
-
return [];
|
|
615
|
-
}
|
|
616
|
-
var suggested = this.nextSuggestedState();
|
|
617
|
-
return this.fulfillment.nextStates.filter(function (s) { return s !== suggested; });
|
|
618
|
-
};
|
|
619
|
-
return FulfillmentCardComponent;
|
|
620
|
-
}());
|
|
621
|
-
FulfillmentCardComponent.decorators = [
|
|
622
|
-
{ type: i0.Component, args: [{
|
|
623
|
-
selector: 'vdr-fulfillment-card',
|
|
624
|
-
template: "<div class=\"card\">\r\n <div class=\"card-header fulfillment-header\">\r\n <div>{{ 'order.fulfillment' | translate }}</div>\r\n <div class=\"fulfillment-state\">\r\n <vdr-fulfillment-state-label [state]=\"fulfillment?.state\"></vdr-fulfillment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-fulfillment-detail\r\n *ngIf=\"!!fulfillment\"\r\n [fulfillmentId]=\"fulfillment?.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"fulfillment?.nextStates.length\">\r\n <ng-container *ngIf=\"nextSuggestedState() as suggestedState\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"transitionState.emit(suggestedState)\">\r\n {{ 'order.set-fulfillment-state' | translate: { state: (suggestedState | stateI18nToken | translate) } }}\r\n </button>\r\n </ng-container>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n class=\"btn\"\r\n vdrDropdownItem\r\n (click)=\"transitionState.emit(nextState)\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{ 'order.transition-to-state' | translate: { state: (nextState | stateI18nToken | translate) } }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-fulfillment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n",
|
|
625
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
626
|
-
styles: [".fulfillment-header{display:flex;justify-content:space-between;align-items:center}.card-footer{display:flex;align-items:center;justify-content:flex-end}\n"]
|
|
627
|
-
},] }
|
|
628
|
-
];
|
|
629
|
-
FulfillmentCardComponent.propDecorators = {
|
|
630
|
-
fulfillment: [{ type: i0.Input }],
|
|
631
|
-
order: [{ type: i0.Input }],
|
|
632
|
-
transitionState: [{ type: i0.Output }]
|
|
633
|
-
};
|
|
634
|
-
|
|
635
|
-
var FulfillmentDetailComponent = /** @class */ (function () {
|
|
636
|
-
function FulfillmentDetailComponent(serverConfigService) {
|
|
637
|
-
this.serverConfigService = serverConfigService;
|
|
638
|
-
this.customFieldConfig = [];
|
|
639
|
-
this.customFieldFormGroup = new forms.FormGroup({});
|
|
640
|
-
}
|
|
641
|
-
FulfillmentDetailComponent.prototype.ngOnInit = function () {
|
|
642
|
-
this.customFieldConfig = this.serverConfigService.getCustomFieldsFor('Fulfillment');
|
|
643
|
-
};
|
|
644
|
-
FulfillmentDetailComponent.prototype.ngOnChanges = function (changes) {
|
|
645
|
-
this.buildCustomFieldsFormGroup();
|
|
646
|
-
};
|
|
647
|
-
Object.defineProperty(FulfillmentDetailComponent.prototype, "fulfillment", {
|
|
648
|
-
get: function () {
|
|
649
|
-
var _this = this;
|
|
650
|
-
return this.order.fulfillments && this.order.fulfillments.find(function (f) { return f.id === _this.fulfillmentId; });
|
|
651
|
-
},
|
|
652
|
-
enumerable: false,
|
|
653
|
-
configurable: true
|
|
654
|
-
});
|
|
655
|
-
Object.defineProperty(FulfillmentDetailComponent.prototype, "items", {
|
|
656
|
-
get: function () {
|
|
657
|
-
var _this = this;
|
|
658
|
-
var _a, _b;
|
|
659
|
-
return ((_b = (_a = this.fulfillment) === null || _a === void 0 ? void 0 : _a.summary.map(function (row) {
|
|
660
|
-
var _a, _b;
|
|
661
|
-
return {
|
|
662
|
-
name: (_b = (_a = _this.order.lines.find(function (line) { return line.id === row.orderLine.id; })) === null || _a === void 0 ? void 0 : _a.productVariant.name) !== null && _b !== void 0 ? _b : '',
|
|
663
|
-
quantity: row.quantity,
|
|
664
|
-
};
|
|
665
|
-
})) !== null && _b !== void 0 ? _b : []);
|
|
666
|
-
},
|
|
667
|
-
enumerable: false,
|
|
668
|
-
configurable: true
|
|
669
|
-
});
|
|
670
|
-
FulfillmentDetailComponent.prototype.buildCustomFieldsFormGroup = function () {
|
|
671
|
-
var e_1, _c;
|
|
672
|
-
var customFields = this.fulfillment.customFields;
|
|
673
|
-
try {
|
|
674
|
-
for (var _d = __values(this.serverConfigService.getCustomFieldsFor('Fulfillment')), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
675
|
-
var fieldDef = _e.value;
|
|
676
|
-
this.customFieldFormGroup.addControl(fieldDef.name, new forms.FormControl(customFields[fieldDef.name]));
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
680
|
-
finally {
|
|
681
|
-
try {
|
|
682
|
-
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
683
|
-
}
|
|
684
|
-
finally { if (e_1) throw e_1.error; }
|
|
685
|
-
}
|
|
686
|
-
};
|
|
687
|
-
FulfillmentDetailComponent.prototype.customFieldIsObject = function (customField) {
|
|
688
|
-
return Array.isArray(customField) || sharedUtils.isObject(customField);
|
|
689
|
-
};
|
|
690
|
-
return FulfillmentDetailComponent;
|
|
691
|
-
}());
|
|
692
|
-
FulfillmentDetailComponent.decorators = [
|
|
693
|
-
{ type: i0.Component, args: [{
|
|
694
|
-
selector: 'vdr-fulfillment-detail',
|
|
695
|
-
template: "<vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ fulfillment?.createdAt | localeDate: 'medium' }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\r\n {{ fulfillment?.method }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"fulfillment?.trackingCode\" [label]=\"'order.tracking-code' | translate\">\r\n {{ fulfillment?.trackingCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<ng-container *ngFor=\"let customField of customFieldConfig\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldFormGroup.get(customField.name)\"\r\n [readonly]=\"true\"\r\n [compact]=\"true\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"customFieldFormGroup\"\r\n ></vdr-custom-field-control>\r\n</ng-container>\r\n",
|
|
696
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
697
|
-
styles: [""]
|
|
698
|
-
},] }
|
|
699
|
-
];
|
|
700
|
-
FulfillmentDetailComponent.ctorParameters = function () { return [
|
|
701
|
-
{ type: i1.ServerConfigService }
|
|
702
|
-
]; };
|
|
703
|
-
FulfillmentDetailComponent.propDecorators = {
|
|
704
|
-
fulfillmentId: [{ type: i0.Input }],
|
|
705
|
-
order: [{ type: i0.Input }]
|
|
706
|
-
};
|
|
707
|
-
|
|
708
|
-
var FulfillmentStateLabelComponent = /** @class */ (function () {
|
|
709
|
-
function FulfillmentStateLabelComponent() {
|
|
710
|
-
}
|
|
711
|
-
Object.defineProperty(FulfillmentStateLabelComponent.prototype, "chipColorType", {
|
|
712
|
-
get: function () {
|
|
713
|
-
switch (this.state) {
|
|
714
|
-
case 'Pending':
|
|
715
|
-
case 'Shipped':
|
|
716
|
-
return 'warning';
|
|
717
|
-
case 'Delivered':
|
|
718
|
-
return 'success';
|
|
719
|
-
case 'Cancelled':
|
|
720
|
-
return 'error';
|
|
721
|
-
}
|
|
722
|
-
},
|
|
723
|
-
enumerable: false,
|
|
724
|
-
configurable: true
|
|
725
|
-
});
|
|
726
|
-
return FulfillmentStateLabelComponent;
|
|
727
|
-
}());
|
|
728
|
-
FulfillmentStateLabelComponent.decorators = [
|
|
729
|
-
{ type: i0.Component, args: [{
|
|
730
|
-
selector: 'vdr-fulfillment-state-label',
|
|
731
|
-
template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Delivered'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n",
|
|
732
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
733
|
-
styles: [":host{font-size:14px}\n"]
|
|
734
|
-
},] }
|
|
735
|
-
];
|
|
736
|
-
FulfillmentStateLabelComponent.propDecorators = {
|
|
737
|
-
state: [{ type: i0.Input }]
|
|
738
|
-
};
|
|
739
|
-
|
|
740
|
-
var LineFulfillmentComponent = /** @class */ (function () {
|
|
741
|
-
function LineFulfillmentComponent() {
|
|
742
|
-
this.fulfilledCount = 0;
|
|
743
|
-
this.fulfillments = [];
|
|
744
|
-
}
|
|
745
|
-
LineFulfillmentComponent.prototype.ngOnChanges = function (changes) {
|
|
746
|
-
if (this.line) {
|
|
747
|
-
this.fulfilledCount = this.getDeliveredCount(this.line);
|
|
748
|
-
this.fulfillmentStatus = this.getFulfillmentStatus(this.fulfilledCount, this.line.items.length);
|
|
749
|
-
this.fulfillments = this.getFulfillments(this.line);
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
/**
|
|
753
|
-
* Returns the number of items in an OrderLine which are fulfilled.
|
|
754
|
-
*/
|
|
755
|
-
LineFulfillmentComponent.prototype.getDeliveredCount = function (line) {
|
|
756
|
-
var _a, _b;
|
|
757
|
-
return ((_b = (_a = line.fulfillments) === null || _a === void 0 ? void 0 : _a.reduce(function (sum, fulfillment) { var _a, _b; return sum + ((_b = (_a = fulfillment.summary.find(function (s) { return s.orderLine.id === line.id; })) === null || _a === void 0 ? void 0 : _a.quantity) !== null && _b !== void 0 ? _b : 0); }, 0)) !== null && _b !== void 0 ? _b : 0);
|
|
758
|
-
};
|
|
759
|
-
LineFulfillmentComponent.prototype.getFulfillmentStatus = function (fulfilledCount, lineQuantity) {
|
|
760
|
-
if (fulfilledCount === lineQuantity) {
|
|
761
|
-
return 'full';
|
|
762
|
-
}
|
|
763
|
-
if (0 < fulfilledCount && fulfilledCount < lineQuantity) {
|
|
764
|
-
return 'partial';
|
|
765
|
-
}
|
|
766
|
-
return 'none';
|
|
767
|
-
};
|
|
768
|
-
LineFulfillmentComponent.prototype.getFulfillments = function (line) {
|
|
769
|
-
var _a, _b;
|
|
770
|
-
return ((_b = (_a = line.fulfillments) === null || _a === void 0 ? void 0 : _a.map(function (fulfillment) {
|
|
771
|
-
var _a;
|
|
772
|
-
var summaryLine = fulfillment.summary.find(function (s) { return s.orderLine.id === line.id; });
|
|
773
|
-
return {
|
|
774
|
-
count: (_a = summaryLine === null || summaryLine === void 0 ? void 0 : summaryLine.quantity) !== null && _a !== void 0 ? _a : 0,
|
|
775
|
-
fulfillment: fulfillment,
|
|
776
|
-
};
|
|
777
|
-
})) !== null && _b !== void 0 ? _b : []);
|
|
778
|
-
};
|
|
779
|
-
return LineFulfillmentComponent;
|
|
780
|
-
}());
|
|
781
|
-
LineFulfillmentComponent.decorators = [
|
|
782
|
-
{ type: i0.Component, args: [{
|
|
783
|
-
selector: 'vdr-line-fulfillment',
|
|
784
|
-
template: "<vdr-dropdown class=\"search-settings-menu\" *ngIf=\"fulfilledCount || orderState === 'PartiallyDelivered'\">\r\n <button type=\"button\" class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon *ngIf=\"fulfillmentStatus === 'full'\" class=\"item-fulfilled\" shape=\"check-circle\"></clr-icon>\r\n <clr-icon\r\n *ngIf=\"fulfillmentStatus === 'partial'\"\r\n class=\"item-partially-fulfilled\"\r\n shape=\"check-circle\"\r\n ></clr-icon>\r\n <clr-icon\r\n *ngIf=\"fulfillmentStatus === 'none'\"\r\n class=\"item-not-fulfilled\"\r\n shape=\"exclamation-circle\"\r\n ></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'full'\">\r\n {{ 'order.line-fulfillment-all' | translate }}\r\n </label>\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'partial'\">\r\n {{\r\n 'order.line-fulfillment-partial' | translate: { total: line.quantity, count: fulfilledCount }\r\n }}\r\n </label>\r\n <label class=\"dropdown-header\" *ngIf=\"fulfillmentStatus === 'none'\">\r\n {{ 'order.line-fulfillment-none' | translate }}\r\n </label>\r\n <div class=\"fulfillment-detail\" *ngFor=\"let item of fulfillments\">\r\n <div class=\"fulfillment-title\">\r\n {{ 'order.fulfillment' | translate }} #{{ item.fulfillment.id }} ({{\r\n 'order.item-count' | translate: { count: item.count }\r\n }})\r\n </div>\r\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ item.fulfillment.createdAt | localeDate: 'medium' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.fulfillment-method' | translate\">\r\n {{ item.fulfillment.method }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data\r\n *ngIf=\"item.fulfillment.trackingCode\"\r\n [label]=\"'order.tracking-code' | translate\"\r\n >\r\n {{ item.fulfillment.trackingCode }}\r\n </vdr-labeled-data>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n",
|
|
785
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
786
|
-
styles: [".item-fulfilled{color:var(--color-success-500)}.item-partially-fulfilled{color:var(--color-warning-500)}.item-not-fulfilled{color:var(--color-error-500)}.fulfillment-detail{margin:6px 12px}.fulfillment-detail:not(:last-of-type){border-bottom:1px dashed var(--color-component-border-200)}\n"]
|
|
787
|
-
},] }
|
|
788
|
-
];
|
|
789
|
-
LineFulfillmentComponent.propDecorators = {
|
|
790
|
-
line: [{ type: i0.Input }],
|
|
791
|
-
orderState: [{ type: i0.Input }]
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
var LineRefundsComponent = /** @class */ (function () {
|
|
795
|
-
function LineRefundsComponent() {
|
|
796
|
-
}
|
|
797
|
-
LineRefundsComponent.prototype.getRefundedCount = function () {
|
|
798
|
-
var _a, _b;
|
|
799
|
-
var refunds = (_b = (_a = this.payments) === null || _a === void 0 ? void 0 : _a.reduce(function (all, payment) { return __spreadArray(__spreadArray([], __read(all)), __read(payment.refunds)); }, [])) !== null && _b !== void 0 ? _b : [];
|
|
800
|
-
return this.line.items.filter(function (i) {
|
|
801
|
-
if (i.refundId === null && !i.cancelled) {
|
|
802
|
-
return false;
|
|
803
|
-
}
|
|
804
|
-
if (i.refundId) {
|
|
805
|
-
var refund = refunds.find(function (r) { return r.id === i.refundId; });
|
|
806
|
-
if ((refund === null || refund === void 0 ? void 0 : refund.state) === 'Failed') {
|
|
807
|
-
return false;
|
|
808
|
-
}
|
|
809
|
-
else {
|
|
810
|
-
return true;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
return false;
|
|
814
|
-
}).length;
|
|
815
|
-
};
|
|
816
|
-
return LineRefundsComponent;
|
|
817
|
-
}());
|
|
818
|
-
LineRefundsComponent.decorators = [
|
|
819
|
-
{ type: i0.Component, args: [{
|
|
820
|
-
selector: 'vdr-line-refunds',
|
|
821
|
-
template: "<span *ngIf=\"getRefundedCount()\" [title]=\"'order.refunded-count' | translate: { count: getRefundedCount() }\">\r\n <clr-icon shape=\"redo\" class=\"is-solid\" dir=\"down\"></clr-icon>\r\n</span>\r\n",
|
|
822
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
823
|
-
styles: [":host{color:var(--color-error-500)}\n"]
|
|
824
|
-
},] }
|
|
825
|
-
];
|
|
826
|
-
LineRefundsComponent.propDecorators = {
|
|
827
|
-
line: [{ type: i0.Input }],
|
|
828
|
-
payments: [{ type: i0.Input }]
|
|
829
|
-
};
|
|
830
|
-
|
|
831
|
-
var ModificationDetailComponent = /** @class */ (function () {
|
|
832
|
-
function ModificationDetailComponent() {
|
|
833
|
-
this.addedItems = new Map();
|
|
834
|
-
this.removedItems = new Map();
|
|
835
|
-
}
|
|
836
|
-
ModificationDetailComponent.prototype.ngOnChanges = function () {
|
|
837
|
-
var _c = this.getModifiedLines(), added = _c.added, removed = _c.removed;
|
|
838
|
-
this.addedItems = added;
|
|
839
|
-
this.removedItems = removed;
|
|
840
|
-
};
|
|
841
|
-
ModificationDetailComponent.prototype.getSurcharge = function (id) {
|
|
842
|
-
return this.order.surcharges.find(function (m) { return m.id === id; });
|
|
843
|
-
};
|
|
844
|
-
ModificationDetailComponent.prototype.getAddedItems = function () {
|
|
845
|
-
return __spreadArray([], __read(this.addedItems.entries())).map(function (_c) {
|
|
846
|
-
var _d = __read(_c, 2), line = _d[0], count = _d[1];
|
|
847
|
-
return { name: line.productVariant.name, quantity: count };
|
|
848
|
-
});
|
|
849
|
-
};
|
|
850
|
-
ModificationDetailComponent.prototype.getRemovedItems = function () {
|
|
851
|
-
return __spreadArray([], __read(this.removedItems.entries())).map(function (_c) {
|
|
852
|
-
var _d = __read(_c, 2), line = _d[0], count = _d[1];
|
|
853
|
-
return { name: line.productVariant.name, quantity: count };
|
|
854
|
-
});
|
|
855
|
-
};
|
|
856
|
-
ModificationDetailComponent.prototype.getModifiedLines = function () {
|
|
857
|
-
var e_1, _c;
|
|
858
|
-
var _a, _b;
|
|
859
|
-
var added = new Map();
|
|
860
|
-
var removed = new Map();
|
|
861
|
-
try {
|
|
862
|
-
for (var _d = __values(this.modification.orderItems || []), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
863
|
-
var _item = _e.value;
|
|
864
|
-
var result = this.getOrderLineAndItem(_item.id);
|
|
865
|
-
if (result) {
|
|
866
|
-
var line = result.line, item = result.item;
|
|
867
|
-
if (item.cancelled) {
|
|
868
|
-
var count = (_a = removed.get(line)) !== null && _a !== void 0 ? _a : 0;
|
|
869
|
-
removed.set(line, count + 1);
|
|
870
|
-
}
|
|
871
|
-
else {
|
|
872
|
-
var count = (_b = added.get(line)) !== null && _b !== void 0 ? _b : 0;
|
|
873
|
-
added.set(line, count + 1);
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
879
|
-
finally {
|
|
880
|
-
try {
|
|
881
|
-
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
882
|
-
}
|
|
883
|
-
finally { if (e_1) throw e_1.error; }
|
|
884
|
-
}
|
|
885
|
-
return { added: added, removed: removed };
|
|
886
|
-
};
|
|
887
|
-
ModificationDetailComponent.prototype.getOrderLineAndItem = function (itemId) {
|
|
888
|
-
var e_2, _c;
|
|
889
|
-
try {
|
|
890
|
-
for (var _d = __values(this.order.lines), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
891
|
-
var line = _e.value;
|
|
892
|
-
var item = line.items.find(function (i) { return i.id === itemId; });
|
|
893
|
-
if (item) {
|
|
894
|
-
return { line: line, item: item };
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
899
|
-
finally {
|
|
900
|
-
try {
|
|
901
|
-
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
902
|
-
}
|
|
903
|
-
finally { if (e_2) throw e_2.error; }
|
|
904
|
-
}
|
|
905
|
-
};
|
|
906
|
-
return ModificationDetailComponent;
|
|
907
|
-
}());
|
|
908
|
-
ModificationDetailComponent.decorators = [
|
|
909
|
-
{ type: i0.Component, args: [{
|
|
910
|
-
selector: 'vdr-modification-detail',
|
|
911
|
-
template: "<vdr-labeled-data [label]=\"'common.ID' | translate\">{{ modification.id }}</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"modification.note\" [label]=\"'order.note' | translate\">{{\r\n modification.note\r\n}}</vdr-labeled-data>\r\n<vdr-labeled-data *ngFor=\"let surcharge of modification.surcharges\" [label]=\"'order.surcharges' | translate\">\r\n {{ getSurcharge(surcharge.id)?.description }}\r\n {{ getSurcharge(surcharge.id)?.priceWithTax | localeCurrency: order.currencyCode }}</vdr-labeled-data\r\n>\r\n<vdr-labeled-data *ngIf=\"getAddedItems().length\" [label]=\"'order.added-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getAddedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"getRemovedItems().length\" [label]=\"'order.removed-items' | translate\">\r\n <vdr-simple-item-list [items]=\"getRemovedItems()\"></vdr-simple-item-list>\r\n</vdr-labeled-data>\r\n",
|
|
912
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
913
|
-
styles: [""]
|
|
914
|
-
},] }
|
|
915
|
-
];
|
|
916
|
-
ModificationDetailComponent.propDecorators = {
|
|
917
|
-
order: [{ type: i0.Input }],
|
|
918
|
-
modification: [{ type: i0.Input }]
|
|
919
|
-
};
|
|
920
|
-
|
|
921
|
-
var OrderCustomFieldsCardComponent = /** @class */ (function () {
|
|
922
|
-
function OrderCustomFieldsCardComponent(formBuilder, modalService) {
|
|
923
|
-
this.formBuilder = formBuilder;
|
|
924
|
-
this.modalService = modalService;
|
|
925
|
-
this.customFieldsConfig = [];
|
|
926
|
-
this.customFieldValues = {};
|
|
927
|
-
this.updateClick = new i0.EventEmitter();
|
|
928
|
-
this.editable = false;
|
|
929
|
-
}
|
|
930
|
-
OrderCustomFieldsCardComponent.prototype.ngOnInit = function () {
|
|
931
|
-
var e_1, _a;
|
|
932
|
-
this.customFieldForm = this.formBuilder.group({});
|
|
933
|
-
try {
|
|
934
|
-
for (var _b = __values(this.customFieldsConfig), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
935
|
-
var field = _c.value;
|
|
936
|
-
this.customFieldForm.addControl(field.name, this.formBuilder.control(this.customFieldValues[field.name]));
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
940
|
-
finally {
|
|
941
|
-
try {
|
|
942
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
943
|
-
}
|
|
944
|
-
finally { if (e_1) throw e_1.error; }
|
|
945
|
-
}
|
|
946
|
-
};
|
|
947
|
-
OrderCustomFieldsCardComponent.prototype.onUpdateClick = function () {
|
|
948
|
-
this.updateClick.emit(this.customFieldForm.value);
|
|
949
|
-
this.customFieldForm.markAsPristine();
|
|
950
|
-
this.editable = false;
|
|
951
|
-
};
|
|
952
|
-
OrderCustomFieldsCardComponent.prototype.onCancelClick = function () {
|
|
953
|
-
var _this = this;
|
|
954
|
-
if (this.customFieldForm.dirty) {
|
|
955
|
-
this.modalService
|
|
956
|
-
.dialog({
|
|
957
|
-
title: ngxTranslateExtractMarker.marker('catalog.confirm-cancel'),
|
|
958
|
-
buttons: [
|
|
959
|
-
{ type: 'secondary', label: ngxTranslateExtractMarker.marker('common.keep-editing') },
|
|
960
|
-
{ type: 'danger', label: ngxTranslateExtractMarker.marker('common.discard-changes'), returnValue: true },
|
|
961
|
-
],
|
|
962
|
-
})
|
|
963
|
-
.subscribe(function (result) {
|
|
964
|
-
if (result) {
|
|
965
|
-
_this.customFieldForm.reset();
|
|
966
|
-
_this.customFieldForm.markAsPristine();
|
|
967
|
-
_this.editable = false;
|
|
968
|
-
}
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
else {
|
|
972
|
-
this.editable = false;
|
|
973
|
-
}
|
|
974
|
-
};
|
|
975
|
-
return OrderCustomFieldsCardComponent;
|
|
976
|
-
}());
|
|
977
|
-
OrderCustomFieldsCardComponent.decorators = [
|
|
978
|
-
{ type: i0.Component, args: [{
|
|
979
|
-
selector: 'vdr-order-custom-fields-card',
|
|
980
|
-
template: "<div class=\"card\" *ngIf=\"customFieldsConfig.length\">\r\n <div class=\"card-header\">\r\n {{ 'common.custom-fields' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text custom-field-form\" [class.editable]=\"editable\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Order\"\r\n [customFields]=\"customFieldsConfig\"\r\n [customFieldsFormGroup]=\"customFieldForm\"\r\n [readonly]=\"!editable\"\r\n [compact]=\"true\"\r\n ></vdr-tabbed-custom-fields>\r\n </div>\r\n </div>\r\n <div class=\"card-footer\">\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"editable = true\" *ngIf=\"!editable\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm btn-primary\"\r\n (click)=\"onUpdateClick()\"\r\n *ngIf=\"editable\"\r\n [disabled]=\"customFieldForm.pristine || customFieldForm.invalid\"\r\n >\r\n <clr-icon shape=\"check\"></clr-icon>\r\n {{ 'common.update' | translate }}\r\n </button>\r\n <button\r\n class=\"btn btn-sm btn-secondary\"\r\n (click)=\"onCancelClick()\"\r\n *ngIf=\"editable\"\r\n >\r\n <clr-icon shape=\"times\"></clr-icon>\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n </div>\r\n</div>\r\n",
|
|
981
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
982
|
-
styles: ["vdr-custom-field-control{margin-bottom:6px;display:block}.custom-field-form ::ng-deep .clr-control-label{color:var(--color-grey-400)}.custom-field-form.editable ::ng-deep .clr-control-label{color:inherit}\n"]
|
|
983
|
-
},] }
|
|
984
|
-
];
|
|
985
|
-
OrderCustomFieldsCardComponent.ctorParameters = function () { return [
|
|
986
|
-
{ type: forms.FormBuilder },
|
|
987
|
-
{ type: i1.ModalService }
|
|
988
|
-
]; };
|
|
989
|
-
OrderCustomFieldsCardComponent.propDecorators = {
|
|
990
|
-
customFieldsConfig: [{ type: i0.Input }],
|
|
991
|
-
customFieldValues: [{ type: i0.Input }],
|
|
992
|
-
updateClick: [{ type: i0.Output }]
|
|
993
|
-
};
|
|
994
|
-
|
|
995
|
-
var OrderStateSelectDialogComponent = /** @class */ (function () {
|
|
996
|
-
function OrderStateSelectDialogComponent() {
|
|
997
|
-
this.nextStates = [];
|
|
998
|
-
this.message = '';
|
|
999
|
-
this.selectedState = '';
|
|
1000
|
-
}
|
|
1001
|
-
OrderStateSelectDialogComponent.prototype.select = function () {
|
|
1002
|
-
if (this.selectedState) {
|
|
1003
|
-
this.resolveWith(this.selectedState);
|
|
1004
|
-
}
|
|
1005
|
-
};
|
|
1006
|
-
OrderStateSelectDialogComponent.prototype.cancel = function () {
|
|
1007
|
-
this.resolveWith();
|
|
1008
|
-
};
|
|
1009
|
-
return OrderStateSelectDialogComponent;
|
|
1010
|
-
}());
|
|
1011
|
-
OrderStateSelectDialogComponent.decorators = [
|
|
1012
|
-
{ type: i0.Component, args: [{
|
|
1013
|
-
selector: 'vdr-order-state-select-dialog',
|
|
1014
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.select-state' | translate }}</ng-template>\r\n<p>{{ message | translate }}</p>\r\n<clr-select-container>\r\n <select clrSelect name=\"state\" [(ngModel)]=\"selectedState\">\r\n <option *ngFor=\"let state of nextStates\" [value]=\"state\">\r\n {{ state | stateI18nToken | translate }}\r\n </option>\r\n </select>\r\n</clr-select-container>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"submit\" *ngIf=\"cancellable\" (click)=\"cancel()\" class=\"btn btn-secondary\">\r\n {{ 'common.cancel' | translate }}\r\n </button>\r\n <button type=\"submit\" (click)=\"select()\" class=\"btn btn-primary\" [disabled]=\"!selectedState\">\r\n {{ 'order.transition-to-state' | translate: { state: (selectedState | stateI18nToken | translate) } }}\r\n </button>\r\n</ng-template>\r\n",
|
|
1015
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1016
|
-
styles: [""]
|
|
1017
|
-
},] }
|
|
1018
|
-
];
|
|
1019
|
-
|
|
1020
|
-
var OrderTransitionService = /** @class */ (function () {
|
|
1021
|
-
function OrderTransitionService(dataService, modalService, notificationService, i18nService) {
|
|
1022
|
-
this.dataService = dataService;
|
|
1023
|
-
this.modalService = modalService;
|
|
1024
|
-
this.notificationService = notificationService;
|
|
1025
|
-
this.i18nService = i18nService;
|
|
1026
|
-
}
|
|
1027
|
-
/**
|
|
1028
|
-
* Attempts to transition the Order to the last state it was in before it was transitioned
|
|
1029
|
-
* to the "Modifying" state. If this fails, a manual prompt is used.
|
|
1030
|
-
*/
|
|
1031
|
-
OrderTransitionService.prototype.transitionToPreModifyingState = function (orderId, nextStates) {
|
|
1032
|
-
var _this = this;
|
|
1033
|
-
return this.getPreModifyingState(orderId).pipe(operators.switchMap(function (state) {
|
|
1034
|
-
var manualTransitionOptions = {
|
|
1035
|
-
orderId: orderId,
|
|
1036
|
-
nextStates: nextStates,
|
|
1037
|
-
message: _this.i18nService.translate(ngxTranslateExtractMarker.marker('order.unable-to-transition-to-state-try-another'), { state: state }),
|
|
1038
|
-
cancellable: false,
|
|
1039
|
-
retry: 10,
|
|
1040
|
-
};
|
|
1041
|
-
if (state) {
|
|
1042
|
-
return _this.transitionToStateOrThrow(orderId, state).pipe(operators.catchError(function (err) { return _this.manuallyTransitionToState(manualTransitionOptions); }));
|
|
1043
|
-
}
|
|
1044
|
-
else {
|
|
1045
|
-
return _this.manuallyTransitionToState(manualTransitionOptions);
|
|
1046
|
-
}
|
|
1047
|
-
}));
|
|
1048
|
-
};
|
|
1049
|
-
/**
|
|
1050
|
-
* Displays a modal for manually selecting the next state.
|
|
1051
|
-
*/
|
|
1052
|
-
OrderTransitionService.prototype.manuallyTransitionToState = function (options) {
|
|
1053
|
-
var _this = this;
|
|
1054
|
-
return this.modalService
|
|
1055
|
-
.fromComponent(OrderStateSelectDialogComponent, {
|
|
1056
|
-
locals: {
|
|
1057
|
-
nextStates: options.nextStates,
|
|
1058
|
-
cancellable: options.cancellable,
|
|
1059
|
-
message: options.message,
|
|
1060
|
-
},
|
|
1061
|
-
closable: false,
|
|
1062
|
-
size: 'md',
|
|
1063
|
-
})
|
|
1064
|
-
.pipe(operators.switchMap(function (result) {
|
|
1065
|
-
if (result) {
|
|
1066
|
-
return _this.transitionToStateOrThrow(options.orderId, result);
|
|
1067
|
-
}
|
|
1068
|
-
else {
|
|
1069
|
-
if (!options.cancellable) {
|
|
1070
|
-
throw new Error("An order state must be selected");
|
|
1071
|
-
}
|
|
1072
|
-
else {
|
|
1073
|
-
return rxjs.EMPTY;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
}), operators.retryWhen(function (errors) { return errors.pipe(operators.delay(2000), operators.take(options.retry)); }));
|
|
1077
|
-
};
|
|
1078
|
-
/**
|
|
1079
|
-
* Attempts to get the last state the Order was in before it was transitioned
|
|
1080
|
-
* to the "Modifying" state.
|
|
1081
|
-
*/
|
|
1082
|
-
OrderTransitionService.prototype.getPreModifyingState = function (orderId) {
|
|
1083
|
-
return this.dataService.order
|
|
1084
|
-
.getOrderHistory(orderId, {
|
|
1085
|
-
filter: {
|
|
1086
|
-
type: {
|
|
1087
|
-
eq: i1.HistoryEntryType.ORDER_STATE_TRANSITION,
|
|
1088
|
-
},
|
|
1089
|
-
},
|
|
1090
|
-
sort: {
|
|
1091
|
-
createdAt: i1.SortOrder.DESC,
|
|
1092
|
-
},
|
|
1093
|
-
})
|
|
1094
|
-
.mapSingle(function (result) { return result.order; })
|
|
1095
|
-
.pipe(operators.map(function (result) {
|
|
1096
|
-
var item = result === null || result === void 0 ? void 0 : result.history.items.find(function (i) { return i.data.to === 'Modifying'; });
|
|
1097
|
-
if (item) {
|
|
1098
|
-
return item.data.from;
|
|
1099
|
-
}
|
|
1100
|
-
else {
|
|
1101
|
-
return;
|
|
1102
|
-
}
|
|
1103
|
-
}));
|
|
1104
|
-
};
|
|
1105
|
-
OrderTransitionService.prototype.transitionToStateOrThrow = function (orderId, state) {
|
|
1106
|
-
var _this = this;
|
|
1107
|
-
return this.dataService.order.transitionToState(orderId, state).pipe(operators.map(function (_a) {
|
|
1108
|
-
var transitionOrderToState = _a.transitionOrderToState;
|
|
1109
|
-
switch (transitionOrderToState === null || transitionOrderToState === void 0 ? void 0 : transitionOrderToState.__typename) {
|
|
1110
|
-
case 'Order':
|
|
1111
|
-
return transitionOrderToState === null || transitionOrderToState === void 0 ? void 0 : transitionOrderToState.state;
|
|
1112
|
-
case 'OrderStateTransitionError':
|
|
1113
|
-
_this.notificationService.error(transitionOrderToState === null || transitionOrderToState === void 0 ? void 0 : transitionOrderToState.transitionError);
|
|
1114
|
-
throw new Error(transitionOrderToState === null || transitionOrderToState === void 0 ? void 0 : transitionOrderToState.transitionError);
|
|
1115
|
-
}
|
|
1116
|
-
}));
|
|
1117
|
-
};
|
|
1118
|
-
return OrderTransitionService;
|
|
1119
|
-
}());
|
|
1120
|
-
OrderTransitionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function OrderTransitionService_Factory() { return new OrderTransitionService(i0__namespace.ɵɵinject(i1__namespace.DataService), i0__namespace.ɵɵinject(i1__namespace.ModalService), i0__namespace.ɵɵinject(i1__namespace.NotificationService), i0__namespace.ɵɵinject(i1__namespace.I18nService)); }, token: OrderTransitionService, providedIn: "root" });
|
|
1121
|
-
OrderTransitionService.decorators = [
|
|
1122
|
-
{ type: i0.Injectable, args: [{
|
|
1123
|
-
providedIn: 'root',
|
|
1124
|
-
},] }
|
|
1125
|
-
];
|
|
1126
|
-
OrderTransitionService.ctorParameters = function () { return [
|
|
1127
|
-
{ type: i1.DataService },
|
|
1128
|
-
{ type: i1.ModalService },
|
|
1129
|
-
{ type: i1.NotificationService },
|
|
1130
|
-
{ type: i1.I18nService }
|
|
1131
|
-
]; };
|
|
1132
|
-
|
|
1133
|
-
var OrderProcessGraphDialogComponent = /** @class */ (function () {
|
|
1134
|
-
function OrderProcessGraphDialogComponent(serverConfigService) {
|
|
1135
|
-
this.serverConfigService = serverConfigService;
|
|
1136
|
-
this.states = [];
|
|
1137
|
-
}
|
|
1138
|
-
OrderProcessGraphDialogComponent.prototype.ngOnInit = function () {
|
|
1139
|
-
this.states = this.serverConfigService.getOrderProcessStates();
|
|
1140
|
-
};
|
|
1141
|
-
return OrderProcessGraphDialogComponent;
|
|
1142
|
-
}());
|
|
1143
|
-
OrderProcessGraphDialogComponent.decorators = [
|
|
1144
|
-
{ type: i0.Component, args: [{
|
|
1145
|
-
selector: 'vdr-order-process-graph-dialog',
|
|
1146
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.order-state-diagram' | translate }}</ng-template>\r\n\r\n<vdr-order-process-graph [states]=\"states\" [initialState]=\"activeState\"></vdr-order-process-graph>\r\n",
|
|
1147
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1148
|
-
styles: [""]
|
|
1149
|
-
},] }
|
|
1150
|
-
];
|
|
1151
|
-
OrderProcessGraphDialogComponent.ctorParameters = function () { return [
|
|
1152
|
-
{ type: i1.ServerConfigService }
|
|
1153
|
-
]; };
|
|
1154
|
-
|
|
1155
|
-
var RefundOrderDialogComponent = /** @class */ (function () {
|
|
1156
|
-
function RefundOrderDialogComponent(i18nService) {
|
|
1157
|
-
var _this = this;
|
|
1158
|
-
var _a;
|
|
1159
|
-
this.i18nService = i18nService;
|
|
1160
|
-
this.lineQuantities = {};
|
|
1161
|
-
this.refundShipping = false;
|
|
1162
|
-
this.adjustment = 0;
|
|
1163
|
-
this.reasons = (_a = i1.getAppConfig().cancellationReasons) !== null && _a !== void 0 ? _a : [
|
|
1164
|
-
ngxTranslateExtractMarker.marker('order.refund-reason-customer-request'),
|
|
1165
|
-
ngxTranslateExtractMarker.marker('order.refund-reason-not-available'),
|
|
1166
|
-
];
|
|
1167
|
-
this.reasons = this.reasons.map(function (r) { return _this.i18nService.translate(r); });
|
|
1168
|
-
}
|
|
1169
|
-
Object.defineProperty(RefundOrderDialogComponent.prototype, "refundTotal", {
|
|
1170
|
-
get: function () {
|
|
1171
|
-
var _this = this;
|
|
1172
|
-
var itemTotal = this.order.lines.reduce(function (total, line) {
|
|
1173
|
-
var lineRef = _this.lineQuantities[line.id];
|
|
1174
|
-
var refundCount = (lineRef.refund && lineRef.quantity) || 0;
|
|
1175
|
-
return total + line.proratedUnitPriceWithTax * refundCount;
|
|
1176
|
-
}, 0);
|
|
1177
|
-
return itemTotal + (this.refundShipping ? this.order.shippingWithTax : 0) + this.adjustment;
|
|
1178
|
-
},
|
|
1179
|
-
enumerable: false,
|
|
1180
|
-
configurable: true
|
|
1181
|
-
});
|
|
1182
|
-
Object.defineProperty(RefundOrderDialogComponent.prototype, "settledPaymentsTotal", {
|
|
1183
|
-
get: function () {
|
|
1184
|
-
return this.settledPayments
|
|
1185
|
-
.map(function (payment) {
|
|
1186
|
-
var paymentTotal = payment.amount;
|
|
1187
|
-
var alreadyRefundedTotal = sharedUtils.summate(payment.refunds.filter(function (r) { return r.state !== 'Failed'; }), 'total');
|
|
1188
|
-
return paymentTotal - alreadyRefundedTotal;
|
|
1189
|
-
})
|
|
1190
|
-
.reduce(function (sum, amount) { return sum + amount; }, 0);
|
|
1191
|
-
},
|
|
1192
|
-
enumerable: false,
|
|
1193
|
-
configurable: true
|
|
1194
|
-
});
|
|
1195
|
-
RefundOrderDialogComponent.prototype.lineCanBeRefundedOrCancelled = function (line) {
|
|
1196
|
-
var _a, _b;
|
|
1197
|
-
var refunds = (_b = (_a = this.order.payments) === null || _a === void 0 ? void 0 : _a.reduce(function (all, payment) { return __spreadArray(__spreadArray([], __read(all)), __read(payment.refunds)); }, [])) !== null && _b !== void 0 ? _b : [];
|
|
1198
|
-
var refundable = line.items.filter(function (i) {
|
|
1199
|
-
if (i.cancelled) {
|
|
1200
|
-
return false;
|
|
1201
|
-
}
|
|
1202
|
-
if (i.refundId == null) {
|
|
1203
|
-
return true;
|
|
1204
|
-
}
|
|
1205
|
-
var refund = refunds.find(function (r) { return r.id === i.refundId; });
|
|
1206
|
-
return (refund === null || refund === void 0 ? void 0 : refund.state) === 'Failed';
|
|
1207
|
-
});
|
|
1208
|
-
return 0 < refundable.length;
|
|
1209
|
-
};
|
|
1210
|
-
RefundOrderDialogComponent.prototype.ngOnInit = function () {
|
|
1211
|
-
this.lineQuantities = this.order.lines.reduce(function (result, line) {
|
|
1212
|
-
var _c;
|
|
1213
|
-
return Object.assign(Object.assign({}, result), (_c = {}, _c[line.id] = {
|
|
1214
|
-
quantity: 0,
|
|
1215
|
-
refund: false,
|
|
1216
|
-
cancel: false,
|
|
1217
|
-
}, _c));
|
|
1218
|
-
}, {});
|
|
1219
|
-
this.settledPayments = (this.order.payments || []).filter(function (p) { return p.state === 'Settled'; });
|
|
1220
|
-
if (this.settledPayments.length) {
|
|
1221
|
-
this.selectedPayment = this.settledPayments[0];
|
|
1222
|
-
}
|
|
1223
|
-
};
|
|
1224
|
-
RefundOrderDialogComponent.prototype.handleZeroQuantity = function (line) {
|
|
1225
|
-
if ((line === null || line === void 0 ? void 0 : line.quantity) === 0) {
|
|
1226
|
-
line.cancel = false;
|
|
1227
|
-
line.refund = false;
|
|
1228
|
-
}
|
|
1229
|
-
};
|
|
1230
|
-
RefundOrderDialogComponent.prototype.isRefunding = function () {
|
|
1231
|
-
var result = Object.values(this.lineQuantities).reduce(function (isRefunding, line) {
|
|
1232
|
-
return isRefunding || (0 < line.quantity && line.refund);
|
|
1233
|
-
}, false);
|
|
1234
|
-
return result;
|
|
1235
|
-
};
|
|
1236
|
-
RefundOrderDialogComponent.prototype.isCancelling = function () {
|
|
1237
|
-
var result = Object.values(this.lineQuantities).reduce(function (isCancelling, line) {
|
|
1238
|
-
return isCancelling || (0 < line.quantity && line.cancel);
|
|
1239
|
-
}, false);
|
|
1240
|
-
return result;
|
|
1241
|
-
};
|
|
1242
|
-
RefundOrderDialogComponent.prototype.canSubmit = function () {
|
|
1243
|
-
if (this.isRefunding()) {
|
|
1244
|
-
return !!(this.selectedPayment &&
|
|
1245
|
-
this.reason &&
|
|
1246
|
-
0 < this.refundTotal &&
|
|
1247
|
-
this.refundTotal <= this.settledPaymentsTotal);
|
|
1248
|
-
}
|
|
1249
|
-
else if (this.isCancelling()) {
|
|
1250
|
-
return !!this.reason;
|
|
1251
|
-
}
|
|
1252
|
-
return false;
|
|
1253
|
-
};
|
|
1254
|
-
RefundOrderDialogComponent.prototype.select = function () {
|
|
1255
|
-
var payment = this.selectedPayment;
|
|
1256
|
-
if (payment) {
|
|
1257
|
-
var refundLines = this.getOrderLineInput(function (line) { return line.refund; });
|
|
1258
|
-
var cancelLines = this.getOrderLineInput(function (line) { return line.cancel; });
|
|
1259
|
-
this.resolveWith({
|
|
1260
|
-
refund: {
|
|
1261
|
-
lines: refundLines,
|
|
1262
|
-
reason: this.reason,
|
|
1263
|
-
shipping: this.refundShipping ? this.order.shippingWithTax : 0,
|
|
1264
|
-
adjustment: this.adjustment,
|
|
1265
|
-
paymentId: payment.id,
|
|
1266
|
-
},
|
|
1267
|
-
cancel: {
|
|
1268
|
-
lines: cancelLines,
|
|
1269
|
-
orderId: this.order.id,
|
|
1270
|
-
reason: this.reason,
|
|
1271
|
-
cancelShipping: this.refundShipping,
|
|
1272
|
-
},
|
|
1273
|
-
});
|
|
1274
|
-
}
|
|
1275
|
-
};
|
|
1276
|
-
RefundOrderDialogComponent.prototype.cancel = function () {
|
|
1277
|
-
this.resolveWith();
|
|
1278
|
-
};
|
|
1279
|
-
RefundOrderDialogComponent.prototype.getOrderLineInput = function (filterFn) {
|
|
1280
|
-
return Object.entries(this.lineQuantities)
|
|
1281
|
-
.filter(function (_c) {
|
|
1282
|
-
var _d = __read(_c, 2), orderLineId = _d[0], line = _d[1];
|
|
1283
|
-
return 0 < line.quantity && filterFn(line);
|
|
1284
|
-
})
|
|
1285
|
-
.map(function (_c) {
|
|
1286
|
-
var _d = __read(_c, 2), orderLineId = _d[0], line = _d[1];
|
|
1287
|
-
return ({
|
|
1288
|
-
orderLineId: orderLineId,
|
|
1289
|
-
quantity: line.quantity,
|
|
1290
|
-
});
|
|
1291
|
-
});
|
|
1292
|
-
};
|
|
1293
|
-
return RefundOrderDialogComponent;
|
|
1294
|
-
}());
|
|
1295
|
-
RefundOrderDialogComponent.decorators = [
|
|
1296
|
-
{ type: i0.Component, args: [{
|
|
1297
|
-
selector: 'vdr-refund-order-dialog',
|
|
1298
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.refund-and-cancel-order' | translate }}</ng-template>\r\n\r\n<div class=\"refund-wrapper\">\r\n <div class=\"order-table\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.prorated-unit-price' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.refund' | translate }}</th>\r\n <th>{{ 'order.cancel' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tr *ngFor=\"let line of order.lines\" class=\"order-line\">\r\n <td class=\"align-middle thumb\">\r\n <img [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.quantity }}\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n </td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n </td>\r\n <td class=\"align-middle quantity\">\r\n <div class=\"prorated-wrapper\">\r\n {{ line.proratedUnitPriceWithTax | localeCurrency: order.currencyCode }}\r\n <ng-container *ngIf=\"line.discounts as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n <button class=\"icon-button\"><clr-icon shape=\"info\"></clr-icon></button>\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n {{ discount.description }}\r\n <div class=\"promotion-amount\">\r\n {{\r\n discount.amount / 100 / line.quantity\r\n | number: '1.0-2'\r\n | currency: order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </div>\r\n </td>\r\n <td class=\"align-middle quantity-col\">\r\n <input\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n [(ngModel)]=\"lineQuantities[line.id].quantity\"\r\n type=\"number\"\r\n [max]=\"line.quantity\"\r\n min=\"0\"\r\n (input)=\"handleZeroQuantity(lineQuantities[line.id])\"\r\n />\r\n </td>\r\n <td class=\"align-middle\">\r\n <div class=\"cancel-checkbox-wrapper\">\r\n <input\r\n type=\"checkbox\"\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n clrCheckbox\r\n [disabled]=\"0 === lineQuantities[line.id].quantity\"\r\n [(ngModel)]=\"lineQuantities[line.id].refund\"\r\n />\r\n </div>\r\n </td>\r\n <td class=\"align-middle\">\r\n <div class=\"cancel-checkbox-wrapper\">\r\n <input\r\n type=\"checkbox\"\r\n *ngIf=\"lineCanBeRefundedOrCancelled(line)\"\r\n clrCheckbox\r\n [disabled]=\"0 === lineQuantities[line.id].quantity\"\r\n [(ngModel)]=\"lineQuantities[line.id].cancel\"\r\n />\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"refund-details mt4\" [class.faded]=\"!isRefunding() && !isCancelling()\">\r\n <div>\r\n <label class=\"clr-control-label\">{{ 'order.refund-cancellation-reason' | translate }}</label>\r\n <ng-select\r\n [disabled]=\"!isRefunding() && !isCancelling()\"\r\n [items]=\"reasons\"\r\n bindLabel=\"name\"\r\n autofocus\r\n [placeholder]=\"'order.refund-cancellation-reason-required' | translate\"\r\n bindValue=\"id\"\r\n [addTag]=\"true\"\r\n [(ngModel)]=\"reason\"\r\n ></ng-select>\r\n </div>\r\n\r\n <div>\r\n <clr-select-container>\r\n <label>{{ 'order.payment-to-refund' | translate }}</label>\r\n <select clrSelect name=\"options\" [(ngModel)]=\"selectedPayment\" [disabled]=\"!isRefunding()\">\r\n <option\r\n *ngFor=\"let payment of settledPayments\"\r\n [ngValue]=\"payment\"\r\n [disabled]=\"payment.state !== 'Settled'\"\r\n >\r\n #{{ payment.id }} {{ payment.method }}:\r\n {{ payment.amount | localeCurrency: order.currencyCode }}\r\n </option>\r\n </select>\r\n </clr-select-container>\r\n\r\n <clr-checkbox-wrapper>\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"refundShipping\" [disabled]=\"!isRefunding()\" />\r\n <label>\r\n {{ 'order.refund-shipping' | translate }} ({{\r\n order.shippingWithTax | localeCurrency: order.currencyCode\r\n }})\r\n </label>\r\n </clr-checkbox-wrapper>\r\n <clr-input-container>\r\n <label>{{ 'order.refund-adjustment' | translate }}</label>\r\n <vdr-currency-input\r\n clrInput\r\n [disabled]=\"!isRefunding()\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [(ngModel)]=\"adjustment\"\r\n ></vdr-currency-input>\r\n </clr-input-container>\r\n <div class=\"totals\" [class.disabled]=\"!isRefunding()\">\r\n <div class=\"order-total\">\r\n {{ 'order.payment-amount' | translate }}:\r\n {{ selectedPayment.amount | localeCurrency: order.currencyCode }}\r\n </div>\r\n <div class=\"refund-total\">\r\n {{ 'order.refund-total' | translate }}:\r\n {{ refundTotal | localeCurrency: order.currencyCode }}\r\n </div>\r\n <div class=\"refund-total-error\" *ngIf=\"refundTotal < 0 || settledPaymentsTotal < refundTotal\">\r\n {{\r\n 'order.refund-total-error'\r\n | translate\r\n : {\r\n min: 0 | currency: order.currencyCode,\r\n max: settledPaymentsTotal | localeCurrency: order.currencyCode\r\n }\r\n }}\r\n </div>\r\n <div class=\"refund-total-warning\" *ngIf=\"selectedPayment.amount < refundTotal\">\r\n {{ 'order.refund-total-warning' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"select()\" [disabled]=\"!canSubmit()\" class=\"btn btn-primary\">\r\n <ng-container *ngIf=\"isRefunding(); else cancelling\">\r\n {{\r\n 'order.refund-with-amount'\r\n | translate: { amount: refundTotal | localeCurrency: order.currencyCode }\r\n }}\r\n </ng-container>\r\n <ng-template #cancelling>\r\n {{ 'order.cancel-selected-items' | translate }}\r\n </ng-template>\r\n </button>\r\n</ng-template>\r\n",
|
|
1299
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1300
|
-
styles: [":host{height:100%;display:flex;min-height:64vh}.refund-wrapper{flex:1;flex-direction:column}.refund-wrapper .order-table{flex:1;overflow-y:auto}.refund-wrapper .order-table table{margin-top:0}.refund-wrapper tr.ignore{color:var(--color-grey-300)}.quantity-col{background-color:var(--color-warning-100)}.cancel-checkbox-wrapper{display:flex;align-items:center;justify-content:center}clr-checkbox-wrapper{margin-top:12px;margin-bottom:12px;display:block}.refund-details{display:flex;justify-content:space-between}.refund-details.faded{opacity:.5}.totals{margin-top:48px}.totals .refund-total{font-size:18px}.totals .refund-total-error{color:var(--color-error-500)}.totals .refund-total-warning{color:var(--color-warning-600);max-width:250px}.totals.disabled{color:var(--color-grey-300)}.prorated-wrapper{display:flex;justify-content:center}.line-promotion{display:flex;justify-content:space-between;font-size:12px;padding:3px 6px}.line-promotion .promotion-amount{margin-left:12px}\n"]
|
|
1301
|
-
},] }
|
|
1302
|
-
];
|
|
1303
|
-
RefundOrderDialogComponent.ctorParameters = function () { return [
|
|
1304
|
-
{ type: i1.I18nService }
|
|
1305
|
-
]; };
|
|
1306
|
-
|
|
1307
|
-
var SettleRefundDialogComponent = /** @class */ (function () {
|
|
1308
|
-
function SettleRefundDialogComponent() {
|
|
1309
|
-
this.transactionId = '';
|
|
1310
|
-
}
|
|
1311
|
-
SettleRefundDialogComponent.prototype.submit = function () {
|
|
1312
|
-
this.resolveWith(this.transactionId);
|
|
1313
|
-
};
|
|
1314
|
-
SettleRefundDialogComponent.prototype.cancel = function () {
|
|
1315
|
-
this.resolveWith();
|
|
1316
|
-
};
|
|
1317
|
-
return SettleRefundDialogComponent;
|
|
1318
|
-
}());
|
|
1319
|
-
SettleRefundDialogComponent.decorators = [
|
|
1320
|
-
{ type: i0.Component, args: [{
|
|
1321
|
-
selector: 'vdr-settle-refund-dialog',
|
|
1322
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.settle-refund' | translate }}</ng-template>\r\n<p class=\"instruction\">\r\n {{ 'order.settle-refund-manual-instructions' | translate: { method: refund.method } }}\r\n</p>\r\n<clr-input-container>\r\n <label>{{ 'order.transaction-id' | translate }}</label>\r\n <input clrInput name=\"transactionId\" [(ngModel)]=\"transactionId\" />\r\n</clr-input-container>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" [disabled]=\"!transactionId\" class=\"btn btn-primary\">\r\n {{ 'order.settle-refund' | translate }}\r\n </button>\r\n</ng-template>\r\n",
|
|
1323
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1324
|
-
styles: [":host{padding-bottom:32px}.instruction{margin-top:0;margin-bottom:24px}\n"]
|
|
1325
|
-
},] }
|
|
1326
|
-
];
|
|
1327
|
-
|
|
1328
|
-
var OrderDetailComponent = /** @class */ (function (_super) {
|
|
1329
|
-
__extends(OrderDetailComponent, _super);
|
|
1330
|
-
function OrderDetailComponent(router, route, serverConfigService, changeDetector, dataService, notificationService, modalService, orderTransitionService) {
|
|
1331
|
-
var _this = _super.call(this, route, router, serverConfigService, dataService) || this;
|
|
1332
|
-
_this.changeDetector = changeDetector;
|
|
1333
|
-
_this.dataService = dataService;
|
|
1334
|
-
_this.notificationService = notificationService;
|
|
1335
|
-
_this.modalService = modalService;
|
|
1336
|
-
_this.orderTransitionService = orderTransitionService;
|
|
1337
|
-
_this.detailForm = new forms.FormGroup({});
|
|
1338
|
-
_this.fetchHistory = new rxjs.Subject();
|
|
1339
|
-
_this.defaultStates = [
|
|
1340
|
-
'AddingItems',
|
|
1341
|
-
'ArrangingPayment',
|
|
1342
|
-
'PaymentAuthorized',
|
|
1343
|
-
'PaymentSettled',
|
|
1344
|
-
'PartiallyShipped',
|
|
1345
|
-
'Shipped',
|
|
1346
|
-
'PartiallyDelivered',
|
|
1347
|
-
'Delivered',
|
|
1348
|
-
'Cancelled',
|
|
1349
|
-
'Modifying',
|
|
1350
|
-
'ArrangingAdditionalPayment',
|
|
1351
|
-
];
|
|
1352
|
-
return _this;
|
|
1353
|
-
}
|
|
1354
|
-
OrderDetailComponent.prototype.ngOnInit = function () {
|
|
1355
|
-
var _this = this;
|
|
1356
|
-
this.init();
|
|
1357
|
-
this.entity$.pipe(operators.take(1)).subscribe(function (order) {
|
|
1358
|
-
if (order.state === 'Modifying') {
|
|
1359
|
-
_this.router.navigate(['./', 'modify'], { relativeTo: _this.route });
|
|
1360
|
-
}
|
|
1361
|
-
});
|
|
1362
|
-
this.customFields = this.getCustomFieldConfig('Order');
|
|
1363
|
-
this.orderLineCustomFields = this.getCustomFieldConfig('OrderLine');
|
|
1364
|
-
this.history$ = this.fetchHistory.pipe(operators.startWith(null), operators.switchMap(function () {
|
|
1365
|
-
return _this.dataService.order
|
|
1366
|
-
.getOrderHistory(_this.id, {
|
|
1367
|
-
sort: {
|
|
1368
|
-
createdAt: i1.SortOrder.DESC,
|
|
1369
|
-
},
|
|
1370
|
-
})
|
|
1371
|
-
.mapStream(function (data) { var _a; return (_a = data.order) === null || _a === void 0 ? void 0 : _a.history.items; });
|
|
1372
|
-
}));
|
|
1373
|
-
this.nextStates$ = this.entity$.pipe(operators.map(function (order) {
|
|
1374
|
-
var isInCustomState = !_this.defaultStates.includes(order.state);
|
|
1375
|
-
return isInCustomState
|
|
1376
|
-
? order.nextStates
|
|
1377
|
-
: order.nextStates.filter(function (s) { return !_this.defaultStates.includes(s); });
|
|
1378
|
-
}));
|
|
1379
|
-
};
|
|
1380
|
-
OrderDetailComponent.prototype.ngOnDestroy = function () {
|
|
1381
|
-
this.destroy();
|
|
1382
|
-
};
|
|
1383
|
-
OrderDetailComponent.prototype.openStateDiagram = function () {
|
|
1384
|
-
var _this = this;
|
|
1385
|
-
this.entity$
|
|
1386
|
-
.pipe(operators.take(1), operators.switchMap(function (order) { return _this.modalService.fromComponent(OrderProcessGraphDialogComponent, {
|
|
1387
|
-
closable: true,
|
|
1388
|
-
locals: {
|
|
1389
|
-
activeState: order.state,
|
|
1390
|
-
},
|
|
1391
|
-
}); }))
|
|
1392
|
-
.subscribe();
|
|
1393
|
-
};
|
|
1394
|
-
OrderDetailComponent.prototype.transitionToState = function (state) {
|
|
1395
|
-
var _this = this;
|
|
1396
|
-
this.dataService.order.transitionToState(this.id, state).subscribe(function (_d) {
|
|
1397
|
-
var transitionOrderToState = _d.transitionOrderToState;
|
|
1398
|
-
switch (transitionOrderToState === null || transitionOrderToState === void 0 ? void 0 : transitionOrderToState.__typename) {
|
|
1399
|
-
case 'Order':
|
|
1400
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.transitioned-to-state-success'), { state: state });
|
|
1401
|
-
_this.fetchHistory.next();
|
|
1402
|
-
break;
|
|
1403
|
-
case 'OrderStateTransitionError':
|
|
1404
|
-
_this.notificationService.error(transitionOrderToState.transitionError);
|
|
1405
|
-
}
|
|
1406
|
-
});
|
|
1407
|
-
};
|
|
1408
|
-
OrderDetailComponent.prototype.manuallyTransitionToState = function (order) {
|
|
1409
|
-
this.orderTransitionService
|
|
1410
|
-
.manuallyTransitionToState({
|
|
1411
|
-
orderId: order.id,
|
|
1412
|
-
nextStates: order.nextStates,
|
|
1413
|
-
cancellable: true,
|
|
1414
|
-
message: ngxTranslateExtractMarker.marker('order.manually-transition-to-state-message'),
|
|
1415
|
-
retry: 0,
|
|
1416
|
-
})
|
|
1417
|
-
.subscribe();
|
|
1418
|
-
};
|
|
1419
|
-
OrderDetailComponent.prototype.transitionToModifying = function () {
|
|
1420
|
-
var _this = this;
|
|
1421
|
-
this.dataService.order
|
|
1422
|
-
.transitionToState(this.id, 'Modifying')
|
|
1423
|
-
.subscribe(function (_d) {
|
|
1424
|
-
var transitionOrderToState = _d.transitionOrderToState;
|
|
1425
|
-
switch (transitionOrderToState === null || transitionOrderToState === void 0 ? void 0 : transitionOrderToState.__typename) {
|
|
1426
|
-
case 'Order':
|
|
1427
|
-
_this.router.navigate(['./modify'], { relativeTo: _this.route });
|
|
1428
|
-
break;
|
|
1429
|
-
case 'OrderStateTransitionError':
|
|
1430
|
-
_this.notificationService.error(transitionOrderToState.transitionError);
|
|
1431
|
-
}
|
|
1432
|
-
});
|
|
1433
|
-
};
|
|
1434
|
-
OrderDetailComponent.prototype.updateCustomFields = function (customFieldsValue) {
|
|
1435
|
-
var _this = this;
|
|
1436
|
-
this.dataService.order
|
|
1437
|
-
.updateOrderCustomFields({
|
|
1438
|
-
id: this.id,
|
|
1439
|
-
customFields: customFieldsValue,
|
|
1440
|
-
})
|
|
1441
|
-
.subscribe(function () {
|
|
1442
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('common.notify-update-success'), { entity: 'Order' });
|
|
1443
|
-
});
|
|
1444
|
-
};
|
|
1445
|
-
OrderDetailComponent.prototype.getOrderAddressLines = function (orderAddress) {
|
|
1446
|
-
if (!orderAddress) {
|
|
1447
|
-
return [];
|
|
1448
|
-
}
|
|
1449
|
-
return Object.values(orderAddress)
|
|
1450
|
-
.filter(function (val) { return val !== 'OrderAddress'; })
|
|
1451
|
-
.filter(function (line) { return !!line; });
|
|
1452
|
-
};
|
|
1453
|
-
OrderDetailComponent.prototype.settlePayment = function (payment) {
|
|
1454
|
-
var _this = this;
|
|
1455
|
-
this.dataService.order.settlePayment(payment.id).subscribe(function (_d) {
|
|
1456
|
-
var settlePayment = _d.settlePayment;
|
|
1457
|
-
switch (settlePayment.__typename) {
|
|
1458
|
-
case 'Payment':
|
|
1459
|
-
if (settlePayment.state === 'Settled') {
|
|
1460
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.settle-payment-success'));
|
|
1461
|
-
}
|
|
1462
|
-
else {
|
|
1463
|
-
_this.notificationService.error(ngxTranslateExtractMarker.marker('order.settle-payment-error'));
|
|
1464
|
-
}
|
|
1465
|
-
_this.dataService.order.getOrder(_this.id).single$.subscribe();
|
|
1466
|
-
_this.fetchHistory.next();
|
|
1467
|
-
break;
|
|
1468
|
-
case 'OrderStateTransitionError':
|
|
1469
|
-
case 'PaymentStateTransitionError':
|
|
1470
|
-
case 'SettlePaymentError':
|
|
1471
|
-
_this.notificationService.error(settlePayment.message);
|
|
1472
|
-
}
|
|
1473
|
-
});
|
|
1474
|
-
};
|
|
1475
|
-
OrderDetailComponent.prototype.transitionPaymentState = function (_d) {
|
|
1476
|
-
var _this = this;
|
|
1477
|
-
var payment = _d.payment, state = _d.state;
|
|
1478
|
-
if (state === 'Cancelled') {
|
|
1479
|
-
this.dataService.order.cancelPayment(payment.id).subscribe(function (_d) {
|
|
1480
|
-
var cancelPayment = _d.cancelPayment;
|
|
1481
|
-
switch (cancelPayment.__typename) {
|
|
1482
|
-
case 'Payment':
|
|
1483
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.transitioned-payment-to-state-success'), {
|
|
1484
|
-
state: state,
|
|
1485
|
-
});
|
|
1486
|
-
_this.dataService.order.getOrder(_this.id).single$.subscribe();
|
|
1487
|
-
_this.fetchHistory.next();
|
|
1488
|
-
break;
|
|
1489
|
-
case 'PaymentStateTransitionError':
|
|
1490
|
-
_this.notificationService.error(cancelPayment.transitionError);
|
|
1491
|
-
break;
|
|
1492
|
-
case 'CancelPaymentError':
|
|
1493
|
-
_this.notificationService.error(cancelPayment.paymentErrorMessage);
|
|
1494
|
-
break;
|
|
1495
|
-
}
|
|
1496
|
-
});
|
|
1497
|
-
}
|
|
1498
|
-
else {
|
|
1499
|
-
this.dataService.order
|
|
1500
|
-
.transitionPaymentToState(payment.id, state)
|
|
1501
|
-
.subscribe(function (_d) {
|
|
1502
|
-
var transitionPaymentToState = _d.transitionPaymentToState;
|
|
1503
|
-
switch (transitionPaymentToState.__typename) {
|
|
1504
|
-
case 'Payment':
|
|
1505
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.transitioned-payment-to-state-success'), {
|
|
1506
|
-
state: state,
|
|
1507
|
-
});
|
|
1508
|
-
_this.dataService.order.getOrder(_this.id).single$.subscribe();
|
|
1509
|
-
_this.fetchHistory.next();
|
|
1510
|
-
break;
|
|
1511
|
-
case 'PaymentStateTransitionError':
|
|
1512
|
-
_this.notificationService.error(transitionPaymentToState.message);
|
|
1513
|
-
break;
|
|
1514
|
-
}
|
|
1515
|
-
});
|
|
1516
|
-
}
|
|
1517
|
-
};
|
|
1518
|
-
OrderDetailComponent.prototype.canAddFulfillment = function (order) {
|
|
1519
|
-
var e_1, _d;
|
|
1520
|
-
var _a;
|
|
1521
|
-
var allFulfillmentSummaryRows = ((_a = order.fulfillments) !== null && _a !== void 0 ? _a : []).reduce(function (all, fulfillment) { return __spreadArray(__spreadArray([], __read(all)), __read(fulfillment.summary)); }, []);
|
|
1522
|
-
var allItemsFulfilled = true;
|
|
1523
|
-
var _loop_1 = function (line) {
|
|
1524
|
-
var totalFulfilledCount = allFulfillmentSummaryRows
|
|
1525
|
-
.filter(function (row) { return row.orderLine.id === line.id; })
|
|
1526
|
-
.reduce(function (sum, row) { return sum + row.quantity; }, 0);
|
|
1527
|
-
if (totalFulfilledCount < line.quantity) {
|
|
1528
|
-
allItemsFulfilled = false;
|
|
1529
|
-
}
|
|
1530
|
-
};
|
|
1531
|
-
try {
|
|
1532
|
-
for (var _e = __values(order.lines), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
1533
|
-
var line = _f.value;
|
|
1534
|
-
_loop_1(line);
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1538
|
-
finally {
|
|
1539
|
-
try {
|
|
1540
|
-
if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
|
|
1541
|
-
}
|
|
1542
|
-
finally { if (e_1) throw e_1.error; }
|
|
1543
|
-
}
|
|
1544
|
-
return (!allItemsFulfilled &&
|
|
1545
|
-
!this.hasUnsettledModifications(order) &&
|
|
1546
|
-
this.outstandingPaymentAmount(order) === 0 &&
|
|
1547
|
-
(order.nextStates.includes('Shipped') ||
|
|
1548
|
-
order.nextStates.includes('PartiallyShipped') ||
|
|
1549
|
-
order.nextStates.includes('Delivered')));
|
|
1550
|
-
};
|
|
1551
|
-
OrderDetailComponent.prototype.hasUnsettledModifications = function (order) {
|
|
1552
|
-
return 0 < order.modifications.filter(function (m) { return !m.isSettled; }).length;
|
|
1553
|
-
};
|
|
1554
|
-
OrderDetailComponent.prototype.getOutstandingModificationAmount = function (order) {
|
|
1555
|
-
return sharedUtils.summate(order.modifications.filter(function (m) { return !m.isSettled; }), 'priceChange');
|
|
1556
|
-
};
|
|
1557
|
-
OrderDetailComponent.prototype.outstandingPaymentAmount = function (order) {
|
|
1558
|
-
var e_2, _d;
|
|
1559
|
-
var _a, _b, _c;
|
|
1560
|
-
var paymentIsValid = function (p) { return p.state !== 'Cancelled' && p.state !== 'Declined' && p.state !== 'Error'; };
|
|
1561
|
-
var amountCovered = 0;
|
|
1562
|
-
try {
|
|
1563
|
-
for (var _e = __values((_b = (_a = order.payments) === null || _a === void 0 ? void 0 : _a.filter(paymentIsValid)) !== null && _b !== void 0 ? _b : []), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
1564
|
-
var payment = _f.value;
|
|
1565
|
-
var refunds = (_c = payment.refunds.filter(function (r) { return r.state !== 'Failed'; })) !== null && _c !== void 0 ? _c : [];
|
|
1566
|
-
var refundsTotal = sharedUtils.summate(refunds, 'total');
|
|
1567
|
-
amountCovered += payment.amount - refundsTotal;
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1571
|
-
finally {
|
|
1572
|
-
try {
|
|
1573
|
-
if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
|
|
1574
|
-
}
|
|
1575
|
-
finally { if (e_2) throw e_2.error; }
|
|
1576
|
-
}
|
|
1577
|
-
return order.totalWithTax - amountCovered;
|
|
1578
|
-
};
|
|
1579
|
-
OrderDetailComponent.prototype.addManualPayment = function (order) {
|
|
1580
|
-
var _this = this;
|
|
1581
|
-
var priorState = order.state;
|
|
1582
|
-
this.modalService
|
|
1583
|
-
.fromComponent(AddManualPaymentDialogComponent, {
|
|
1584
|
-
closable: true,
|
|
1585
|
-
locals: {
|
|
1586
|
-
outstandingAmount: this.outstandingPaymentAmount(order),
|
|
1587
|
-
currencyCode: order.currencyCode,
|
|
1588
|
-
},
|
|
1589
|
-
})
|
|
1590
|
-
.pipe(operators.switchMap(function (result) {
|
|
1591
|
-
if (result) {
|
|
1592
|
-
return _this.dataService.order.addManualPaymentToOrder({
|
|
1593
|
-
orderId: _this.id,
|
|
1594
|
-
transactionId: result.transactionId,
|
|
1595
|
-
method: result.method,
|
|
1596
|
-
metadata: result.metadata || {},
|
|
1597
|
-
});
|
|
1598
|
-
}
|
|
1599
|
-
else {
|
|
1600
|
-
return rxjs.EMPTY;
|
|
1601
|
-
}
|
|
1602
|
-
}), operators.switchMap(function (_d) {
|
|
1603
|
-
var addManualPaymentToOrder = _d.addManualPaymentToOrder;
|
|
1604
|
-
switch (addManualPaymentToOrder.__typename) {
|
|
1605
|
-
case 'Order':
|
|
1606
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.add-payment-to-order-success'));
|
|
1607
|
-
if (priorState === 'ArrangingAdditionalPayment') {
|
|
1608
|
-
return _this.orderTransitionService.transitionToPreModifyingState(order.id, order.nextStates);
|
|
1609
|
-
}
|
|
1610
|
-
else {
|
|
1611
|
-
return _this.dataService.order
|
|
1612
|
-
.transitionToState(_this.id, 'PaymentSettled')
|
|
1613
|
-
.pipe(operators.mapTo('PaymentSettled'));
|
|
1614
|
-
}
|
|
1615
|
-
case 'ManualPaymentStateError':
|
|
1616
|
-
_this.notificationService.error(addManualPaymentToOrder.message);
|
|
1617
|
-
return rxjs.EMPTY;
|
|
1618
|
-
default:
|
|
1619
|
-
return rxjs.EMPTY;
|
|
1620
|
-
}
|
|
1621
|
-
}))
|
|
1622
|
-
.subscribe(function (result) {
|
|
1623
|
-
if (result) {
|
|
1624
|
-
_this.refetchOrder({ result: result });
|
|
1625
|
-
}
|
|
1626
|
-
});
|
|
1627
|
-
};
|
|
1628
|
-
OrderDetailComponent.prototype.fulfillOrder = function () {
|
|
1629
|
-
var _this = this;
|
|
1630
|
-
this.entity$
|
|
1631
|
-
.pipe(operators.take(1), operators.switchMap(function (order) {
|
|
1632
|
-
return _this.modalService.fromComponent(FulfillOrderDialogComponent, {
|
|
1633
|
-
size: 'xl',
|
|
1634
|
-
locals: {
|
|
1635
|
-
order: order,
|
|
1636
|
-
},
|
|
1637
|
-
});
|
|
1638
|
-
}), operators.switchMap(function (input) {
|
|
1639
|
-
if (input) {
|
|
1640
|
-
return _this.dataService.order.createFulfillment(input);
|
|
1641
|
-
}
|
|
1642
|
-
else {
|
|
1643
|
-
return rxjs.of(undefined);
|
|
1644
|
-
}
|
|
1645
|
-
}), operators.switchMap(function (result) { return _this.refetchOrder(result).pipe(operators.mapTo(result)); }))
|
|
1646
|
-
.subscribe(function (result) {
|
|
1647
|
-
if (result) {
|
|
1648
|
-
var addFulfillmentToOrder = result.addFulfillmentToOrder;
|
|
1649
|
-
switch (addFulfillmentToOrder.__typename) {
|
|
1650
|
-
case 'Fulfillment':
|
|
1651
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.create-fulfillment-success'));
|
|
1652
|
-
break;
|
|
1653
|
-
case 'EmptyOrderLineSelectionError':
|
|
1654
|
-
case 'InsufficientStockOnHandError':
|
|
1655
|
-
case 'ItemsAlreadyFulfilledError':
|
|
1656
|
-
case 'InvalidFulfillmentHandlerError':
|
|
1657
|
-
_this.notificationService.error(addFulfillmentToOrder.message);
|
|
1658
|
-
break;
|
|
1659
|
-
case 'FulfillmentStateTransitionError':
|
|
1660
|
-
_this.notificationService.error(addFulfillmentToOrder.transitionError);
|
|
1661
|
-
break;
|
|
1662
|
-
case 'CreateFulfillmentError':
|
|
1663
|
-
_this.notificationService.error(addFulfillmentToOrder.fulfillmentHandlerError);
|
|
1664
|
-
break;
|
|
1665
|
-
case undefined:
|
|
1666
|
-
_this.notificationService.error(JSON.stringify(addFulfillmentToOrder));
|
|
1667
|
-
break;
|
|
1668
|
-
default:
|
|
1669
|
-
sharedUtils.assertNever(addFulfillmentToOrder);
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
});
|
|
1673
|
-
};
|
|
1674
|
-
OrderDetailComponent.prototype.transitionFulfillment = function (id, state) {
|
|
1675
|
-
var _this = this;
|
|
1676
|
-
this.dataService.order
|
|
1677
|
-
.transitionFulfillmentToState(id, state)
|
|
1678
|
-
.pipe(operators.switchMap(function (result) { return _this.refetchOrder(result); }))
|
|
1679
|
-
.subscribe(function () {
|
|
1680
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.successfully-updated-fulfillment'));
|
|
1681
|
-
});
|
|
1682
|
-
};
|
|
1683
|
-
OrderDetailComponent.prototype.cancelOrRefund = function (order) {
|
|
1684
|
-
var isRefundable = this.orderHasSettledPayments(order);
|
|
1685
|
-
if (order.state === 'PaymentAuthorized' || order.active === true || !isRefundable) {
|
|
1686
|
-
this.cancelOrder(order);
|
|
1687
|
-
}
|
|
1688
|
-
else {
|
|
1689
|
-
this.refundOrder(order);
|
|
1690
|
-
}
|
|
1691
|
-
};
|
|
1692
|
-
OrderDetailComponent.prototype.settleRefund = function (refund) {
|
|
1693
|
-
var _this = this;
|
|
1694
|
-
this.modalService
|
|
1695
|
-
.fromComponent(SettleRefundDialogComponent, {
|
|
1696
|
-
size: 'md',
|
|
1697
|
-
locals: {
|
|
1698
|
-
refund: refund,
|
|
1699
|
-
},
|
|
1700
|
-
})
|
|
1701
|
-
.pipe(operators.switchMap(function (transactionId) {
|
|
1702
|
-
if (transactionId) {
|
|
1703
|
-
return _this.dataService.order.settleRefund({
|
|
1704
|
-
transactionId: transactionId,
|
|
1705
|
-
id: refund.id,
|
|
1706
|
-
}, _this.id);
|
|
1707
|
-
}
|
|
1708
|
-
else {
|
|
1709
|
-
return rxjs.of(undefined);
|
|
1710
|
-
}
|
|
1711
|
-
}))
|
|
1712
|
-
.subscribe(function (result) {
|
|
1713
|
-
if (result) {
|
|
1714
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.settle-refund-success'));
|
|
1715
|
-
}
|
|
1716
|
-
});
|
|
1717
|
-
};
|
|
1718
|
-
OrderDetailComponent.prototype.addNote = function (event) {
|
|
1719
|
-
var _this = this;
|
|
1720
|
-
var note = event.note, isPublic = event.isPublic;
|
|
1721
|
-
this.dataService.order
|
|
1722
|
-
.addNoteToOrder({
|
|
1723
|
-
id: this.id,
|
|
1724
|
-
note: note,
|
|
1725
|
-
isPublic: isPublic,
|
|
1726
|
-
})
|
|
1727
|
-
.pipe(operators.switchMap(function (result) { return _this.refetchOrder(result); }))
|
|
1728
|
-
.subscribe(function (result) {
|
|
1729
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('common.notify-create-success'), {
|
|
1730
|
-
entity: 'Note',
|
|
1731
|
-
});
|
|
1732
|
-
});
|
|
1733
|
-
};
|
|
1734
|
-
OrderDetailComponent.prototype.updateNote = function (entry) {
|
|
1735
|
-
var _this = this;
|
|
1736
|
-
this.modalService
|
|
1737
|
-
.fromComponent(i1.EditNoteDialogComponent, {
|
|
1738
|
-
closable: true,
|
|
1739
|
-
locals: {
|
|
1740
|
-
displayPrivacyControls: true,
|
|
1741
|
-
note: entry.data.note,
|
|
1742
|
-
noteIsPrivate: !entry.isPublic,
|
|
1743
|
-
},
|
|
1744
|
-
})
|
|
1745
|
-
.pipe(operators.switchMap(function (result) {
|
|
1746
|
-
if (result) {
|
|
1747
|
-
return _this.dataService.order.updateOrderNote({
|
|
1748
|
-
noteId: entry.id,
|
|
1749
|
-
isPublic: !result.isPrivate,
|
|
1750
|
-
note: result.note,
|
|
1751
|
-
});
|
|
1752
|
-
}
|
|
1753
|
-
else {
|
|
1754
|
-
return rxjs.EMPTY;
|
|
1755
|
-
}
|
|
1756
|
-
}))
|
|
1757
|
-
.subscribe(function (result) {
|
|
1758
|
-
_this.fetchHistory.next();
|
|
1759
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('common.notify-update-success'), {
|
|
1760
|
-
entity: 'Note',
|
|
1761
|
-
});
|
|
1762
|
-
});
|
|
1763
|
-
};
|
|
1764
|
-
OrderDetailComponent.prototype.deleteNote = function (entry) {
|
|
1765
|
-
var _this = this;
|
|
1766
|
-
return this.modalService
|
|
1767
|
-
.dialog({
|
|
1768
|
-
title: ngxTranslateExtractMarker.marker('common.confirm-delete-note'),
|
|
1769
|
-
body: entry.data.note,
|
|
1770
|
-
buttons: [
|
|
1771
|
-
{ type: 'secondary', label: ngxTranslateExtractMarker.marker('common.cancel') },
|
|
1772
|
-
{ type: 'danger', label: ngxTranslateExtractMarker.marker('common.delete'), returnValue: true },
|
|
1773
|
-
],
|
|
1774
|
-
})
|
|
1775
|
-
.pipe(operators.switchMap(function (res) { return (res ? _this.dataService.order.deleteOrderNote(entry.id) : rxjs.EMPTY); }))
|
|
1776
|
-
.subscribe(function () {
|
|
1777
|
-
_this.fetchHistory.next();
|
|
1778
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('common.notify-delete-success'), {
|
|
1779
|
-
entity: 'Note',
|
|
1780
|
-
});
|
|
1781
|
-
});
|
|
1782
|
-
};
|
|
1783
|
-
OrderDetailComponent.prototype.orderHasSettledPayments = function (order) {
|
|
1784
|
-
var _a;
|
|
1785
|
-
return !!((_a = order.payments) === null || _a === void 0 ? void 0 : _a.find(function (p) { return p.state === 'Settled'; }));
|
|
1786
|
-
};
|
|
1787
|
-
OrderDetailComponent.prototype.cancelOrder = function (order) {
|
|
1788
|
-
var _this = this;
|
|
1789
|
-
this.modalService
|
|
1790
|
-
.fromComponent(CancelOrderDialogComponent, {
|
|
1791
|
-
size: 'xl',
|
|
1792
|
-
locals: {
|
|
1793
|
-
order: order,
|
|
1794
|
-
},
|
|
1795
|
-
})
|
|
1796
|
-
.pipe(operators.switchMap(function (input) {
|
|
1797
|
-
if (input) {
|
|
1798
|
-
return _this.dataService.order.cancelOrder(input);
|
|
1799
|
-
}
|
|
1800
|
-
else {
|
|
1801
|
-
return rxjs.of(undefined);
|
|
1802
|
-
}
|
|
1803
|
-
}), operators.switchMap(function (result) { return _this.refetchOrder(result); }))
|
|
1804
|
-
.subscribe(function (result) {
|
|
1805
|
-
if (result) {
|
|
1806
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.cancelled-order-success'));
|
|
1807
|
-
}
|
|
1808
|
-
});
|
|
1809
|
-
};
|
|
1810
|
-
OrderDetailComponent.prototype.refundOrder = function (order) {
|
|
1811
|
-
var _this = this;
|
|
1812
|
-
this.modalService
|
|
1813
|
-
.fromComponent(RefundOrderDialogComponent, {
|
|
1814
|
-
size: 'xl',
|
|
1815
|
-
locals: {
|
|
1816
|
-
order: order,
|
|
1817
|
-
},
|
|
1818
|
-
})
|
|
1819
|
-
.pipe(operators.switchMap(function (input) {
|
|
1820
|
-
var _a;
|
|
1821
|
-
if (!input) {
|
|
1822
|
-
return rxjs.of(undefined);
|
|
1823
|
-
}
|
|
1824
|
-
if ((_a = input.cancel.lines) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1825
|
-
return _this.dataService.order.cancelOrder(input.cancel).pipe(operators.map(function (res) {
|
|
1826
|
-
var result = res.cancelOrder;
|
|
1827
|
-
switch (result.__typename) {
|
|
1828
|
-
case 'Order':
|
|
1829
|
-
_this.refetchOrder(result).subscribe();
|
|
1830
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.cancelled-order-success'));
|
|
1831
|
-
return input;
|
|
1832
|
-
case 'CancelActiveOrderError':
|
|
1833
|
-
case 'QuantityTooGreatError':
|
|
1834
|
-
case 'MultipleOrderError':
|
|
1835
|
-
case 'OrderStateTransitionError':
|
|
1836
|
-
case 'EmptyOrderLineSelectionError':
|
|
1837
|
-
_this.notificationService.error(result.message);
|
|
1838
|
-
return undefined;
|
|
1839
|
-
}
|
|
1840
|
-
}));
|
|
1841
|
-
}
|
|
1842
|
-
else {
|
|
1843
|
-
return [input];
|
|
1844
|
-
}
|
|
1845
|
-
}), operators.switchMap(function (input) {
|
|
1846
|
-
if (!input) {
|
|
1847
|
-
return rxjs.of(undefined);
|
|
1848
|
-
}
|
|
1849
|
-
if (input.refund.lines.length) {
|
|
1850
|
-
return _this.dataService.order
|
|
1851
|
-
.refundOrder(input.refund)
|
|
1852
|
-
.pipe(operators.map(function (res) { return res.refundOrder; }));
|
|
1853
|
-
}
|
|
1854
|
-
else {
|
|
1855
|
-
return [undefined];
|
|
1856
|
-
}
|
|
1857
|
-
}))
|
|
1858
|
-
.subscribe(function (result) {
|
|
1859
|
-
if (result) {
|
|
1860
|
-
switch (result.__typename) {
|
|
1861
|
-
case 'Refund':
|
|
1862
|
-
_this.refetchOrder(result).subscribe();
|
|
1863
|
-
if (result.state === 'Failed') {
|
|
1864
|
-
_this.notificationService.error(ngxTranslateExtractMarker.marker('order.refund-order-failed'));
|
|
1865
|
-
}
|
|
1866
|
-
else {
|
|
1867
|
-
_this.notificationService.success(ngxTranslateExtractMarker.marker('order.refund-order-success'));
|
|
1868
|
-
}
|
|
1869
|
-
break;
|
|
1870
|
-
case 'AlreadyRefundedError':
|
|
1871
|
-
case 'NothingToRefundError':
|
|
1872
|
-
case 'PaymentOrderMismatchError':
|
|
1873
|
-
case 'RefundOrderStateError':
|
|
1874
|
-
case 'RefundStateTransitionError':
|
|
1875
|
-
_this.notificationService.error(result.message);
|
|
1876
|
-
break;
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
});
|
|
1880
|
-
};
|
|
1881
|
-
OrderDetailComponent.prototype.refetchOrder = function (result) {
|
|
1882
|
-
this.fetchHistory.next();
|
|
1883
|
-
if (result) {
|
|
1884
|
-
return this.dataService.order.getOrder(this.id).single$;
|
|
1885
|
-
}
|
|
1886
|
-
else {
|
|
1887
|
-
return rxjs.of(undefined);
|
|
1888
|
-
}
|
|
1889
|
-
};
|
|
1890
|
-
OrderDetailComponent.prototype.setFormValues = function (entity) {
|
|
1891
|
-
// empty
|
|
1892
|
-
};
|
|
1893
|
-
return OrderDetailComponent;
|
|
1894
|
-
}(i1.BaseDetailComponent));
|
|
1895
|
-
OrderDetailComponent.decorators = [
|
|
1896
|
-
{ type: i0.Component, args: [{
|
|
1897
|
-
selector: 'vdr-order-detail',
|
|
1898
|
-
template: "<vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-entity-info [entity]=\"entity$ | async\"></vdr-entity-info>\r\n <vdr-order-state-label [state]=\"order.state\">\r\n <button\r\n class=\"icon-button\"\r\n (click)=\"openStateDiagram()\"\r\n [title]=\"'order.order-state-diagram' | translate\"\r\n >\r\n <clr-icon shape=\"list\"></clr-icon>\r\n </button>\r\n </vdr-order-state-label>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"\r\n (order.state === 'ArrangingPayment' || order.state === 'ArrangingAdditionalPayment') &&\r\n (hasUnsettledModifications(order) || 0 < outstandingPaymentAmount(order))\r\n \"\r\n (click)=\"addManualPayment(order)\"\r\n >\r\n {{ 'order.add-payment-to-order' | translate }}\r\n ({{ outstandingPaymentAmount(order) | localeCurrency: order.currencyCode }})\r\n </button>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"\r\n order.active === false &&\r\n order.state !== 'ArrangingAdditionalPayment' &&\r\n 0 < outstandingPaymentAmount(order)\r\n \"\r\n (click)=\"transitionToState('ArrangingAdditionalPayment')\"\r\n >\r\n {{ 'order.arrange-additional-payment' | translate }}\r\n </button>\r\n <button class=\"btn btn-primary\" (click)=\"fulfillOrder()\" [disabled]=\"!canAddFulfillment(order)\">\r\n {{ 'order.fulfill-order' | translate }}\r\n </button>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngIf=\"order.nextStates.includes('Modifying')\">\r\n <button type=\"button\" class=\"btn\" vdrDropdownItem (click)=\"transitionToModifying()\">\r\n <clr-icon shape=\"pencil\"></clr-icon>\r\n {{ 'order.modify-order' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n </ng-container>\r\n <button\r\n type=\"button\"\r\n class=\"btn\"\r\n vdrDropdownItem\r\n *ngIf=\"order.nextStates.includes('Cancelled')\"\r\n (click)=\"cancelOrRefund(order)\"\r\n >\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n <ng-container *ngIf=\"orderHasSettledPayments(order); else cancelOnly\">\r\n {{ 'order.refund-and-cancel-order' | translate }}\r\n </ng-container>\r\n <ng-template #cancelOnly>\r\n {{ 'order.cancel-order' | translate }}\r\n </ng-template>\r\n </button>\r\n\r\n <ng-container *ngIf=\"(nextStates$ | async)?.length\">\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n *ngFor=\"let nextState of nextStates$ | async\"\r\n type=\"button\"\r\n class=\"btn\"\r\n vdrDropdownItem\r\n (click)=\"transitionToState(nextState)\"\r\n >\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate: { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </button>\r\n </ng-container>\r\n <div class=\"dropdown-divider\"></div>\r\n <button type=\"button\" class=\"btn\" vdrDropdownItem (click)=\"manuallyTransitionToState(order)\">\r\n <clr-icon shape=\"step-forward-2\" class=\"is-warning\"></clr-icon>\r\n {{ 'order.manually-transition-to-state' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </vdr-ab-right>\r\n</vdr-action-bar>\r\n\r\n<div *ngIf=\"entity$ | async as order\">\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-lg-8\">\r\n <vdr-order-table\r\n [order]=\"order\"\r\n [orderLineCustomFields]=\"orderLineCustomFields\"\r\n ></vdr-order-table>\r\n <h4>{{ 'order.tax-summary' | translate }}</h4>\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.description' | translate }}</th>\r\n <th>{{ 'order.tax-rate' | translate }}</th>\r\n <th>{{ 'order.tax-base' | translate }}</th>\r\n <th>{{ 'order.tax-total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of order.taxSummary\">\r\n <td>{{ row.description }}</td>\r\n <td>{{ row.taxRate / 100 | percent }}</td>\r\n <td>{{ row.taxBase | localeCurrency: order.currencyCode }}</td>\r\n <td>{{ row.taxTotal | localeCurrency: order.currencyCode }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"order-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-order-history\r\n [order]=\"order\"\r\n [history]=\"history$ | async\"\r\n (addNote)=\"addNote($event)\"\r\n (updateNote)=\"updateNote($event)\"\r\n (deleteNote)=\"deleteNote($event)\"\r\n ></vdr-order-history>\r\n </div>\r\n <div class=\"clr-col-lg-4 order-cards\">\r\n <vdr-order-custom-fields-card\r\n [customFieldsConfig]=\"customFields\"\r\n [customFieldValues]=\"order.customFields\"\r\n (updateClick)=\"updateCustomFields($event)\"\r\n ></vdr-order-custom-fields-card>\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n {{ 'order.customer' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"card-text\">\r\n <vdr-customer-label [customer]=\"order.customer\"></vdr-customer-label>\r\n <h6 *ngIf=\"getOrderAddressLines(order.shippingAddress).length\">\r\n {{ 'order.shipping-address' | translate }}\r\n </h6>\r\n <vdr-formatted-address [address]=\"order.shippingAddress\"></vdr-formatted-address>\r\n <h6 *ngIf=\"getOrderAddressLines(order.billingAddress).length\">\r\n {{ 'order.billing-address' | translate }}\r\n </h6>\r\n <vdr-formatted-address [address]=\"order.billingAddress\"></vdr-formatted-address>\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"order.payments && order.payments.length\">\r\n <vdr-order-payment-card\r\n *ngFor=\"let payment of order.payments\"\r\n [currencyCode]=\"order.currencyCode\"\r\n [payment]=\"payment\"\r\n (settlePayment)=\"settlePayment($event)\"\r\n (transitionPaymentState)=\"transitionPaymentState($event)\"\r\n (settleRefund)=\"settleRefund($event)\"\r\n ></vdr-order-payment-card>\r\n </ng-container>\r\n <ng-container *ngFor=\"let fulfillment of order.fulfillments\">\r\n <vdr-fulfillment-card\r\n [fulfillment]=\"fulfillment\"\r\n [order]=\"order\"\r\n (transitionState)=\"transitionFulfillment(fulfillment.id, $event)\"\r\n ></vdr-fulfillment-card>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1899
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1900
|
-
styles: [".shipping-address{list-style-type:none;line-height:1.3em}.order-cards h6{margin-top:6px;color:var(--color-text-200)}\n"]
|
|
1901
|
-
},] }
|
|
1902
|
-
];
|
|
1903
|
-
OrderDetailComponent.ctorParameters = function () { return [
|
|
1904
|
-
{ type: i1$1.Router },
|
|
1905
|
-
{ type: i1$1.ActivatedRoute },
|
|
1906
|
-
{ type: i1.ServerConfigService },
|
|
1907
|
-
{ type: i0.ChangeDetectorRef },
|
|
1908
|
-
{ type: i1.DataService },
|
|
1909
|
-
{ type: i1.NotificationService },
|
|
1910
|
-
{ type: i1.ModalService },
|
|
1911
|
-
{ type: OrderTransitionService }
|
|
1912
|
-
]; };
|
|
1913
|
-
|
|
1914
|
-
exports.OrderEditResultType = void 0;
|
|
1915
|
-
(function (OrderEditResultType) {
|
|
1916
|
-
OrderEditResultType[OrderEditResultType["Refund"] = 0] = "Refund";
|
|
1917
|
-
OrderEditResultType[OrderEditResultType["Payment"] = 1] = "Payment";
|
|
1918
|
-
OrderEditResultType[OrderEditResultType["PriceUnchanged"] = 2] = "PriceUnchanged";
|
|
1919
|
-
OrderEditResultType[OrderEditResultType["Cancel"] = 3] = "Cancel";
|
|
1920
|
-
})(exports.OrderEditResultType || (exports.OrderEditResultType = {}));
|
|
1921
|
-
var OrderEditsPreviewDialogComponent = /** @class */ (function () {
|
|
1922
|
-
function OrderEditsPreviewDialogComponent() {
|
|
1923
|
-
}
|
|
1924
|
-
Object.defineProperty(OrderEditsPreviewDialogComponent.prototype, "priceDifference", {
|
|
1925
|
-
get: function () {
|
|
1926
|
-
return this.order.totalWithTax - this.originalTotalWithTax;
|
|
1927
|
-
},
|
|
1928
|
-
enumerable: false,
|
|
1929
|
-
configurable: true
|
|
1930
|
-
});
|
|
1931
|
-
OrderEditsPreviewDialogComponent.prototype.ngOnInit = function () {
|
|
1932
|
-
this.refundNote = this.modifyOrderInput.note || '';
|
|
1933
|
-
};
|
|
1934
|
-
OrderEditsPreviewDialogComponent.prototype.cancel = function () {
|
|
1935
|
-
this.resolveWith({
|
|
1936
|
-
result: exports.OrderEditResultType.Cancel,
|
|
1937
|
-
});
|
|
1938
|
-
};
|
|
1939
|
-
OrderEditsPreviewDialogComponent.prototype.submit = function () {
|
|
1940
|
-
if (0 < this.priceDifference) {
|
|
1941
|
-
this.resolveWith({
|
|
1942
|
-
result: exports.OrderEditResultType.Payment,
|
|
1943
|
-
});
|
|
1944
|
-
}
|
|
1945
|
-
else if (this.priceDifference < 0) {
|
|
1946
|
-
this.resolveWith({
|
|
1947
|
-
result: exports.OrderEditResultType.Refund,
|
|
1948
|
-
// tslint:disable-next-line:no-non-null-assertion
|
|
1949
|
-
refundPaymentId: this.selectedPayment.id,
|
|
1950
|
-
refundNote: this.refundNote,
|
|
1951
|
-
});
|
|
1952
|
-
}
|
|
1953
|
-
else {
|
|
1954
|
-
this.resolveWith({
|
|
1955
|
-
result: exports.OrderEditResultType.PriceUnchanged,
|
|
1956
|
-
});
|
|
1957
|
-
}
|
|
1958
|
-
};
|
|
1959
|
-
return OrderEditsPreviewDialogComponent;
|
|
1960
|
-
}());
|
|
1961
|
-
OrderEditsPreviewDialogComponent.decorators = [
|
|
1962
|
-
{ type: i0.Component, args: [{
|
|
1963
|
-
selector: 'vdr-order-edits-preview-dialog',
|
|
1964
|
-
template: "<ng-template vdrDialogTitle>{{ 'order.confirm-modifications' | translate }}</ng-template>\r\n<vdr-order-table [order]=\"order\" [orderLineCustomFields]=\"orderLineCustomFields\"></vdr-order-table>\r\n\r\n<h4 class=\"h4\">\r\n {{ 'order.modify-order-price-difference' | translate }}:\r\n <strong>{{ priceDifference | localeCurrency: order.currencyCode }}</strong>\r\n</h4>\r\n<div *ngIf=\"priceDifference < 0\">\r\n<clr-select-container>\r\n <label>{{ 'order.payment-to-refund' | translate }}</label>\r\n <select clrSelect name=\"options\" [(ngModel)]=\"selectedPayment\">\r\n <option\r\n *ngFor=\"let payment of order.payments\"\r\n [ngValue]=\"payment\"\r\n >\r\n #{{ payment.id }} {{ payment.method }}:\r\n {{ payment.amount | localeCurrency: order.currencyCode }}\r\n </option>\r\n </select>\r\n</clr-select-container>\r\n <label class=\"clr-control-label\">{{ 'order.refund-cancellation-reason' | translate }}</label>\r\n <textarea [(ngModel)]=\"refundNote\" name=\"refundNote\" clrTextarea required></textarea>\r\n</div>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" [disabled]=\"priceDifference < 0 && !selectedPayment\" class=\"btn btn-primary\">\r\n {{ 'common.confirm' | translate }}\r\n </button>\r\n</ng-template>\r\n",
|
|
1965
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1966
|
-
styles: [""]
|
|
1967
|
-
},] }
|
|
1968
|
-
];
|
|
1969
|
-
|
|
1970
|
-
var OrderEditorComponent = /** @class */ (function (_super) {
|
|
1971
|
-
__extends(OrderEditorComponent, _super);
|
|
1972
|
-
function OrderEditorComponent(router, route, serverConfigService, changeDetector, dataService, notificationService, modalService, orderTransitionService) {
|
|
1973
|
-
var _this = _super.call(this, route, router, serverConfigService, dataService) || this;
|
|
1974
|
-
_this.changeDetector = changeDetector;
|
|
1975
|
-
_this.dataService = dataService;
|
|
1976
|
-
_this.notificationService = notificationService;
|
|
1977
|
-
_this.modalService = modalService;
|
|
1978
|
-
_this.orderTransitionService = orderTransitionService;
|
|
1979
|
-
_this.couponCodeInput$ = new rxjs.Subject();
|
|
1980
|
-
_this.detailForm = new forms.FormGroup({});
|
|
1981
|
-
_this.couponCodesControl = new forms.FormControl();
|
|
1982
|
-
_this.modifyOrderInput = {
|
|
1983
|
-
dryRun: true,
|
|
1984
|
-
orderId: '',
|
|
1985
|
-
addItems: [],
|
|
1986
|
-
adjustOrderLines: [],
|
|
1987
|
-
surcharges: [],
|
|
1988
|
-
note: '',
|
|
1989
|
-
updateShippingAddress: {},
|
|
1990
|
-
updateBillingAddress: {},
|
|
1991
|
-
};
|
|
1992
|
-
_this.note = '';
|
|
1993
|
-
_this.recalculateShipping = true;
|
|
1994
|
-
_this.addedVariants = new Map();
|
|
1995
|
-
return _this;
|
|
1996
|
-
}
|
|
1997
|
-
Object.defineProperty(OrderEditorComponent.prototype, "addedLines", {
|
|
1998
|
-
get: function () {
|
|
1999
|
-
var _this = this;
|
|
2000
|
-
var getSinglePriceValue = function (price) { return price.__typename === 'SinglePrice' ? price.value : 0; };
|
|
2001
|
-
return (this.modifyOrderInput.addItems || [])
|
|
2002
|
-
.map(function (row) {
|
|
2003
|
-
var variantInfo = _this.addedVariants.get(row.productVariantId);
|
|
2004
|
-
if (variantInfo) {
|
|
2005
|
-
return Object.assign(Object.assign({}, variantInfo), { price: getSinglePriceValue(variantInfo.price), priceWithTax: getSinglePriceValue(variantInfo.priceWithTax), quantity: row.quantity });
|
|
2006
|
-
}
|
|
2007
|
-
})
|
|
2008
|
-
.filter(sharedUtils.notNullOrUndefined);
|
|
2009
|
-
},
|
|
2010
|
-
enumerable: false,
|
|
2011
|
-
configurable: true
|
|
2012
|
-
});
|
|
2013
|
-
OrderEditorComponent.prototype.ngOnInit = function () {
|
|
2014
|
-
var e_1, _u;
|
|
2015
|
-
var _this = this;
|
|
2016
|
-
this.init();
|
|
2017
|
-
this.dataService.promotion.getPromotions();
|
|
2018
|
-
this.addressCustomFields = this.getCustomFieldConfig('Address');
|
|
2019
|
-
this.modifyOrderInput.orderId = this.route.snapshot.paramMap.get('id');
|
|
2020
|
-
this.orderLineCustomFields = this.getCustomFieldConfig('OrderLine');
|
|
2021
|
-
this.entity$.pipe(operators.takeUntil(this.destroy$)).subscribe(function (order) {
|
|
2022
|
-
var e_2, _u;
|
|
2023
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
2024
|
-
if (order.couponCodes.length) {
|
|
2025
|
-
_this.couponCodesControl.setValue(order.couponCodes);
|
|
2026
|
-
}
|
|
2027
|
-
_this.surchargeForm = new forms.FormGroup({
|
|
2028
|
-
description: new forms.FormControl('', forms.Validators.required),
|
|
2029
|
-
sku: new forms.FormControl(''),
|
|
2030
|
-
price: new forms.FormControl(0, forms.Validators.required),
|
|
2031
|
-
priceIncludesTax: new forms.FormControl(true),
|
|
2032
|
-
taxRate: new forms.FormControl(0),
|
|
2033
|
-
taxDescription: new forms.FormControl(''),
|
|
2034
|
-
});
|
|
2035
|
-
if (!_this.shippingAddressForm) {
|
|
2036
|
-
_this.shippingAddressForm = new forms.FormGroup({
|
|
2037
|
-
fullName: new forms.FormControl((_a = order.shippingAddress) === null || _a === void 0 ? void 0 : _a.fullName),
|
|
2038
|
-
company: new forms.FormControl((_b = order.shippingAddress) === null || _b === void 0 ? void 0 : _b.company),
|
|
2039
|
-
streetLine1: new forms.FormControl((_c = order.shippingAddress) === null || _c === void 0 ? void 0 : _c.streetLine1),
|
|
2040
|
-
streetLine2: new forms.FormControl((_d = order.shippingAddress) === null || _d === void 0 ? void 0 : _d.streetLine2),
|
|
2041
|
-
city: new forms.FormControl((_e = order.shippingAddress) === null || _e === void 0 ? void 0 : _e.city),
|
|
2042
|
-
province: new forms.FormControl((_f = order.shippingAddress) === null || _f === void 0 ? void 0 : _f.province),
|
|
2043
|
-
postalCode: new forms.FormControl((_g = order.shippingAddress) === null || _g === void 0 ? void 0 : _g.postalCode),
|
|
2044
|
-
countryCode: new forms.FormControl((_h = order.shippingAddress) === null || _h === void 0 ? void 0 : _h.countryCode),
|
|
2045
|
-
phoneNumber: new forms.FormControl((_j = order.shippingAddress) === null || _j === void 0 ? void 0 : _j.phoneNumber),
|
|
2046
|
-
});
|
|
2047
|
-
_this.addAddressCustomFieldsFormGroup(_this.shippingAddressForm, order.shippingAddress);
|
|
2048
|
-
}
|
|
2049
|
-
if (!_this.billingAddressForm) {
|
|
2050
|
-
_this.billingAddressForm = new forms.FormGroup({
|
|
2051
|
-
fullName: new forms.FormControl((_k = order.billingAddress) === null || _k === void 0 ? void 0 : _k.fullName),
|
|
2052
|
-
company: new forms.FormControl((_l = order.billingAddress) === null || _l === void 0 ? void 0 : _l.company),
|
|
2053
|
-
streetLine1: new forms.FormControl((_m = order.billingAddress) === null || _m === void 0 ? void 0 : _m.streetLine1),
|
|
2054
|
-
streetLine2: new forms.FormControl((_o = order.billingAddress) === null || _o === void 0 ? void 0 : _o.streetLine2),
|
|
2055
|
-
city: new forms.FormControl((_p = order.billingAddress) === null || _p === void 0 ? void 0 : _p.city),
|
|
2056
|
-
province: new forms.FormControl((_q = order.billingAddress) === null || _q === void 0 ? void 0 : _q.province),
|
|
2057
|
-
postalCode: new forms.FormControl((_r = order.billingAddress) === null || _r === void 0 ? void 0 : _r.postalCode),
|
|
2058
|
-
countryCode: new forms.FormControl((_s = order.billingAddress) === null || _s === void 0 ? void 0 : _s.countryCode),
|
|
2059
|
-
phoneNumber: new forms.FormControl((_t = order.billingAddress) === null || _t === void 0 ? void 0 : _t.phoneNumber),
|
|
2060
|
-
});
|
|
2061
|
-
_this.addAddressCustomFieldsFormGroup(_this.billingAddressForm, order.billingAddress);
|
|
2062
|
-
}
|
|
2063
|
-
_this.orderLineCustomFieldsFormArray = new forms.FormArray([]);
|
|
2064
|
-
var _loop_1 = function (line) {
|
|
2065
|
-
var e_3, _x;
|
|
2066
|
-
var formGroup = new forms.FormGroup({});
|
|
2067
|
-
try {
|
|
2068
|
-
for (var _y = (e_3 = void 0, __values(_this.orderLineCustomFields)), _z = _y.next(); !_z.done; _z = _y.next()) {
|
|
2069
|
-
var name = _z.value.name;
|
|
2070
|
-
formGroup.addControl(name, new forms.FormControl(line.customFields[name]));
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
2074
|
-
finally {
|
|
2075
|
-
try {
|
|
2076
|
-
if (_z && !_z.done && (_x = _y.return)) _x.call(_y);
|
|
2077
|
-
}
|
|
2078
|
-
finally { if (e_3) throw e_3.error; }
|
|
2079
|
-
}
|
|
2080
|
-
formGroup.valueChanges.pipe(operators.takeUntil(_this.destroy$)).subscribe(function (value) {
|
|
2081
|
-
var modifyRow = _this.modifyOrderInput.adjustOrderLines.find(function (l) { return l.orderLineId === line.id; });
|
|
2082
|
-
if (!modifyRow) {
|
|
2083
|
-
modifyRow = {
|
|
2084
|
-
orderLineId: line.id,
|
|
2085
|
-
quantity: line.quantity,
|
|
2086
|
-
};
|
|
2087
|
-
_this.modifyOrderInput.adjustOrderLines.push(modifyRow);
|
|
2088
|
-
}
|
|
2089
|
-
if (_this.orderLineCustomFields.length) {
|
|
2090
|
-
modifyRow.customFields = value;
|
|
2091
|
-
}
|
|
2092
|
-
});
|
|
2093
|
-
_this.orderLineCustomFieldsFormArray.push(formGroup);
|
|
2094
|
-
};
|
|
2095
|
-
try {
|
|
2096
|
-
for (var _v = __values(order.lines), _w = _v.next(); !_w.done; _w = _v.next()) {
|
|
2097
|
-
var line = _w.value;
|
|
2098
|
-
_loop_1(line);
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2102
|
-
finally {
|
|
2103
|
-
try {
|
|
2104
|
-
if (_w && !_w.done && (_u = _v.return)) _u.call(_v);
|
|
2105
|
-
}
|
|
2106
|
-
finally { if (e_2) throw e_2.error; }
|
|
2107
|
-
}
|
|
2108
|
-
});
|
|
2109
|
-
this.availableCouponCodes$ = rxjs.concat(this.couponCodeInput$.pipe(operators.distinctUntilChanged(), operators.switchMap(function (term) { return _this.dataService.promotion.getPromotions(10, 0, {
|
|
2110
|
-
couponCode: { contains: term },
|
|
2111
|
-
}).single$; }), operators.map(function (_u) {
|
|
2112
|
-
var promotions = _u.promotions;
|
|
2113
|
-
// tslint:disable-next-line:no-non-null-assertion
|
|
2114
|
-
return promotions.items.map(function (p) { return ({ code: p.couponCode, promotionName: p.name }); });
|
|
2115
|
-
}), operators.startWith([])));
|
|
2116
|
-
this.addItemCustomFieldsFormArray = new forms.FormArray([]);
|
|
2117
|
-
this.addItemCustomFieldsForm = new forms.FormGroup({});
|
|
2118
|
-
try {
|
|
2119
|
-
for (var _v = __values(this.orderLineCustomFields), _w = _v.next(); !_w.done; _w = _v.next()) {
|
|
2120
|
-
var customField = _w.value;
|
|
2121
|
-
this.addItemCustomFieldsForm.addControl(customField.name, new forms.FormControl());
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2125
|
-
finally {
|
|
2126
|
-
try {
|
|
2127
|
-
if (_w && !_w.done && (_u = _v.return)) _u.call(_v);
|
|
2128
|
-
}
|
|
2129
|
-
finally { if (e_1) throw e_1.error; }
|
|
2130
|
-
}
|
|
2131
|
-
this.availableCountries$ = this.dataService.settings
|
|
2132
|
-
.getAvailableCountries()
|
|
2133
|
-
.mapSingle(function (result) { return result.countries.items; })
|
|
2134
|
-
.pipe(operators.shareReplay(1));
|
|
2135
|
-
this.dataService.order
|
|
2136
|
-
.getOrderHistory(this.id, {
|
|
2137
|
-
take: 1,
|
|
2138
|
-
sort: {
|
|
2139
|
-
createdAt: i1.SortOrder.DESC,
|
|
2140
|
-
},
|
|
2141
|
-
filter: { type: { eq: i1.HistoryEntryType.ORDER_STATE_TRANSITION } },
|
|
2142
|
-
})
|
|
2143
|
-
.single$.subscribe(function (_u) {
|
|
2144
|
-
var order = _u.order;
|
|
2145
|
-
_this.previousState = order === null || order === void 0 ? void 0 : order.history.items[0].data.from;
|
|
2146
|
-
});
|
|
2147
|
-
};
|
|
2148
|
-
OrderEditorComponent.prototype.ngOnDestroy = function () {
|
|
2149
|
-
this.destroy();
|
|
2150
|
-
};
|
|
2151
|
-
OrderEditorComponent.prototype.transitionToPriorState = function (order) {
|
|
2152
|
-
var _this = this;
|
|
2153
|
-
this.orderTransitionService
|
|
2154
|
-
.transitionToPreModifyingState(order.id, order.nextStates)
|
|
2155
|
-
.subscribe(function (result) {
|
|
2156
|
-
_this.router.navigate(['..'], { relativeTo: _this.route });
|
|
2157
|
-
});
|
|
2158
|
-
};
|
|
2159
|
-
OrderEditorComponent.prototype.canPreviewChanges = function () {
|
|
2160
|
-
var _u = this.modifyOrderInput, addItems = _u.addItems, adjustOrderLines = _u.adjustOrderLines, surcharges = _u.surcharges;
|
|
2161
|
-
return (!!(addItems === null || addItems === void 0 ? void 0 : addItems.length) ||
|
|
2162
|
-
!!(surcharges === null || surcharges === void 0 ? void 0 : surcharges.length) ||
|
|
2163
|
-
!!(adjustOrderLines === null || adjustOrderLines === void 0 ? void 0 : adjustOrderLines.length) ||
|
|
2164
|
-
(this.shippingAddressForm.dirty && this.shippingAddressForm.valid) ||
|
|
2165
|
-
(this.billingAddressForm.dirty && this.billingAddressForm.valid) ||
|
|
2166
|
-
this.couponCodesControl.dirty);
|
|
2167
|
-
};
|
|
2168
|
-
OrderEditorComponent.prototype.isLineModified = function (line) {
|
|
2169
|
-
var _a;
|
|
2170
|
-
return !!((_a = this.modifyOrderInput.adjustOrderLines) === null || _a === void 0 ? void 0 : _a.find(function (l) { return l.orderLineId === line.id && l.quantity !== line.quantity; }));
|
|
2171
|
-
};
|
|
2172
|
-
OrderEditorComponent.prototype.updateLineQuantity = function (line, quantity) {
|
|
2173
|
-
var adjustOrderLines = this.modifyOrderInput.adjustOrderLines;
|
|
2174
|
-
var row = adjustOrderLines === null || adjustOrderLines === void 0 ? void 0 : adjustOrderLines.find(function (l) { return l.orderLineId === line.id; });
|
|
2175
|
-
if (row && +quantity === line.quantity) {
|
|
2176
|
-
// Remove the modification if the quantity is the same as
|
|
2177
|
-
// the original order
|
|
2178
|
-
adjustOrderLines === null || adjustOrderLines === void 0 ? void 0 : adjustOrderLines.splice(adjustOrderLines === null || adjustOrderLines === void 0 ? void 0 : adjustOrderLines.indexOf(row), 1);
|
|
2179
|
-
}
|
|
2180
|
-
if (!row) {
|
|
2181
|
-
row = { orderLineId: line.id, quantity: +quantity };
|
|
2182
|
-
adjustOrderLines === null || adjustOrderLines === void 0 ? void 0 : adjustOrderLines.push(row);
|
|
2183
|
-
}
|
|
2184
|
-
row.quantity = +quantity;
|
|
2185
|
-
};
|
|
2186
|
-
OrderEditorComponent.prototype.updateAddedItemQuantity = function (item, quantity) {
|
|
2187
|
-
var _a;
|
|
2188
|
-
var row = (_a = this.modifyOrderInput.addItems) === null || _a === void 0 ? void 0 : _a.find(function (l) { return l.productVariantId === item.productVariantId; });
|
|
2189
|
-
if (row) {
|
|
2190
|
-
row.quantity = +quantity;
|
|
2191
|
-
}
|
|
2192
|
-
};
|
|
2193
|
-
OrderEditorComponent.prototype.trackByProductVariantId = function (index, item) {
|
|
2194
|
-
return item.productVariantId;
|
|
2195
|
-
};
|
|
2196
|
-
OrderEditorComponent.prototype.getSelectedItemPrice = function (result) {
|
|
2197
|
-
switch (result === null || result === void 0 ? void 0 : result.priceWithTax.__typename) {
|
|
2198
|
-
case 'SinglePrice':
|
|
2199
|
-
return result.priceWithTax.value;
|
|
2200
|
-
default:
|
|
2201
|
-
return 0;
|
|
2202
|
-
}
|
|
2203
|
-
};
|
|
2204
|
-
OrderEditorComponent.prototype.addItemToOrder = function (result) {
|
|
2205
|
-
var e_4, _u;
|
|
2206
|
-
var _this = this;
|
|
2207
|
-
var _a, _b;
|
|
2208
|
-
if (!result) {
|
|
2209
|
-
return;
|
|
2210
|
-
}
|
|
2211
|
-
var customFields = this.orderLineCustomFields.length
|
|
2212
|
-
? this.addItemCustomFieldsForm.value
|
|
2213
|
-
: undefined;
|
|
2214
|
-
var row = (_a = this.modifyOrderInput.addItems) === null || _a === void 0 ? void 0 : _a.find(function (l) { return _this.isMatchingAddItemRow(l, result, customFields); });
|
|
2215
|
-
if (!row) {
|
|
2216
|
-
row = { productVariantId: result.productVariantId, quantity: 1 };
|
|
2217
|
-
if (customFields) {
|
|
2218
|
-
row.customFields = customFields;
|
|
2219
|
-
}
|
|
2220
|
-
(_b = this.modifyOrderInput.addItems) === null || _b === void 0 ? void 0 : _b.push(row);
|
|
2221
|
-
}
|
|
2222
|
-
else {
|
|
2223
|
-
row.quantity++;
|
|
2224
|
-
}
|
|
2225
|
-
if (customFields) {
|
|
2226
|
-
var formGroup = new forms.FormGroup({});
|
|
2227
|
-
try {
|
|
2228
|
-
for (var _v = __values(Object.entries(customFields)), _w = _v.next(); !_w.done; _w = _v.next()) {
|
|
2229
|
-
var _x = __read(_w.value, 2), key = _x[0], value = _x[1];
|
|
2230
|
-
formGroup.addControl(key, new forms.FormControl(value));
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
2234
|
-
finally {
|
|
2235
|
-
try {
|
|
2236
|
-
if (_w && !_w.done && (_u = _v.return)) _u.call(_v);
|
|
2237
|
-
}
|
|
2238
|
-
finally { if (e_4) throw e_4.error; }
|
|
2239
|
-
}
|
|
2240
|
-
this.addItemCustomFieldsFormArray.push(formGroup);
|
|
2241
|
-
formGroup.valueChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(function (value) {
|
|
2242
|
-
if (row) {
|
|
2243
|
-
row.customFields = value;
|
|
2244
|
-
}
|
|
2245
|
-
});
|
|
2246
|
-
}
|
|
2247
|
-
this.addItemCustomFieldsForm.reset({});
|
|
2248
|
-
this.addItemSelectedVariant = undefined;
|
|
2249
|
-
this.addedVariants.set(result.productVariantId, result);
|
|
2250
|
-
};
|
|
2251
|
-
OrderEditorComponent.prototype.isMatchingAddItemRow = function (row, result, customFields) {
|
|
2252
|
-
return (row.productVariantId === result.productVariantId &&
|
|
2253
|
-
JSON.stringify(row.customFields) === JSON.stringify(customFields));
|
|
2254
|
-
};
|
|
2255
|
-
OrderEditorComponent.prototype.removeAddedItem = function (index) {
|
|
2256
|
-
this.modifyOrderInput.addItems.splice(index, 1);
|
|
2257
|
-
if (-1 < index) {
|
|
2258
|
-
this.addItemCustomFieldsFormArray.removeAt(index);
|
|
2259
|
-
}
|
|
2260
|
-
};
|
|
2261
|
-
OrderEditorComponent.prototype.getSurchargePrices = function (surcharge) {
|
|
2262
|
-
var priceWithTax = surcharge.priceIncludesTax
|
|
2263
|
-
? surcharge.price
|
|
2264
|
-
: Math.round(surcharge.price * ((100 + (surcharge.taxRate || 0)) / 100));
|
|
2265
|
-
var price = surcharge.priceIncludesTax
|
|
2266
|
-
? Math.round(surcharge.price / ((100 + (surcharge.taxRate || 0)) / 100))
|
|
2267
|
-
: surcharge.price;
|
|
2268
|
-
return {
|
|
2269
|
-
price: price,
|
|
2270
|
-
priceWithTax: priceWithTax,
|
|
2271
|
-
};
|
|
2272
|
-
};
|
|
2273
|
-
OrderEditorComponent.prototype.addSurcharge = function (value) {
|
|
2274
|
-
var _a;
|
|
2275
|
-
(_a = this.modifyOrderInput.surcharges) === null || _a === void 0 ? void 0 : _a.push(value);
|
|
2276
|
-
this.surchargeForm.reset({
|
|
2277
|
-
price: 0,
|
|
2278
|
-
priceIncludesTax: true,
|
|
2279
|
-
taxRate: 0,
|
|
2280
|
-
});
|
|
2281
|
-
};
|
|
2282
|
-
OrderEditorComponent.prototype.removeSurcharge = function (index) {
|
|
2283
|
-
var _a;
|
|
2284
|
-
(_a = this.modifyOrderInput.surcharges) === null || _a === void 0 ? void 0 : _a.splice(index, 1);
|
|
2285
|
-
};
|
|
2286
|
-
OrderEditorComponent.prototype.previewAndModify = function (order) {
|
|
2287
|
-
var _this = this;
|
|
2288
|
-
var _a;
|
|
2289
|
-
var modifyOrderInput = Object.assign(Object.assign({}, this.modifyOrderInput), { adjustOrderLines: this.modifyOrderInput.adjustOrderLines.map(function (line) {
|
|
2290
|
-
return i1.transformRelationCustomFieldInputs(simpleDeepClone.simpleDeepClone(line), _this.orderLineCustomFields);
|
|
2291
|
-
}) });
|
|
2292
|
-
var input = Object.assign(Object.assign(Object.assign(Object.assign({}, modifyOrderInput), (this.billingAddressForm.dirty ? { updateBillingAddress: this.billingAddressForm.value } : {})), (this.shippingAddressForm.dirty
|
|
2293
|
-
? { updateShippingAddress: this.shippingAddressForm.value }
|
|
2294
|
-
: {})), { dryRun: true, couponCodes: this.couponCodesControl.dirty ? this.couponCodesControl.value : undefined, note: (_a = this.note) !== null && _a !== void 0 ? _a : '', options: {
|
|
2295
|
-
recalculateShipping: this.recalculateShipping,
|
|
2296
|
-
} });
|
|
2297
|
-
var originalTotalWithTax = order.totalWithTax;
|
|
2298
|
-
this.dataService.order
|
|
2299
|
-
.modifyOrder(input)
|
|
2300
|
-
.pipe(operators.switchMap(function (_u) {
|
|
2301
|
-
var modifyOrder = _u.modifyOrder;
|
|
2302
|
-
switch (modifyOrder.__typename) {
|
|
2303
|
-
case 'Order':
|
|
2304
|
-
return _this.modalService.fromComponent(OrderEditsPreviewDialogComponent, {
|
|
2305
|
-
size: 'xl',
|
|
2306
|
-
closable: false,
|
|
2307
|
-
locals: {
|
|
2308
|
-
originalTotalWithTax: originalTotalWithTax,
|
|
2309
|
-
order: modifyOrder,
|
|
2310
|
-
orderLineCustomFields: _this.orderLineCustomFields,
|
|
2311
|
-
modifyOrderInput: input,
|
|
2312
|
-
},
|
|
2313
|
-
});
|
|
2314
|
-
case 'InsufficientStockError':
|
|
2315
|
-
case 'NegativeQuantityError':
|
|
2316
|
-
case 'NoChangesSpecifiedError':
|
|
2317
|
-
case 'OrderLimitError':
|
|
2318
|
-
case 'OrderModificationStateError':
|
|
2319
|
-
case 'PaymentMethodMissingError':
|
|
2320
|
-
case 'RefundPaymentIdMissingError':
|
|
2321
|
-
case 'CouponCodeLimitError':
|
|
2322
|
-
case 'CouponCodeExpiredError':
|
|
2323
|
-
case 'CouponCodeInvalidError': {
|
|
2324
|
-
_this.notificationService.error(modifyOrder.message);
|
|
2325
|
-
return rxjs.of(false);
|
|
2326
|
-
}
|
|
2327
|
-
case null:
|
|
2328
|
-
case undefined:
|
|
2329
|
-
return rxjs.of(false);
|
|
2330
|
-
default:
|
|
2331
|
-
sharedUtils.assertNever(modifyOrder);
|
|
2332
|
-
}
|
|
2333
|
-
}), operators.switchMap(function (result) {
|
|
2334
|
-
if (!result || result.result === exports.OrderEditResultType.Cancel) {
|
|
2335
|
-
// re-fetch so that the preview values get overwritten in the cache.
|
|
2336
|
-
return _this.dataService.order.getOrder(_this.id).mapSingle(function () { return false; });
|
|
2337
|
-
}
|
|
2338
|
-
else {
|
|
2339
|
-
// Do the modification
|
|
2340
|
-
var wetRunInput = Object.assign(Object.assign({}, input), { dryRun: false });
|
|
2341
|
-
if (result.result === exports.OrderEditResultType.Refund) {
|
|
2342
|
-
wetRunInput.refund = {
|
|
2343
|
-
paymentId: result.refundPaymentId,
|
|
2344
|
-
reason: result.refundNote,
|
|
2345
|
-
};
|
|
2346
|
-
}
|
|
2347
|
-
return _this.dataService.order.modifyOrder(wetRunInput).pipe(operators.switchMap(function (_u) {
|
|
2348
|
-
var modifyOrder = _u.modifyOrder;
|
|
2349
|
-
if (modifyOrder.__typename === 'Order') {
|
|
2350
|
-
var priceDelta = modifyOrder.totalWithTax - originalTotalWithTax;
|
|
2351
|
-
var nextState = 0 < priceDelta ? 'ArrangingAdditionalPayment' : _this.previousState;
|
|
2352
|
-
return _this.dataService.order
|
|
2353
|
-
.transitionToState(order.id, nextState)
|
|
2354
|
-
.pipe(operators.mapTo(true));
|
|
2355
|
-
}
|
|
2356
|
-
else {
|
|
2357
|
-
_this.notificationService.error(modifyOrder.message);
|
|
2358
|
-
return rxjs.EMPTY;
|
|
2359
|
-
}
|
|
2360
|
-
}));
|
|
2361
|
-
}
|
|
2362
|
-
}))
|
|
2363
|
-
.subscribe(function (result) {
|
|
2364
|
-
if (result) {
|
|
2365
|
-
_this.router.navigate(['../'], { relativeTo: _this.route });
|
|
2366
|
-
}
|
|
2367
|
-
});
|
|
2368
|
-
};
|
|
2369
|
-
OrderEditorComponent.prototype.addAddressCustomFieldsFormGroup = function (parentFormGroup, address) {
|
|
2370
|
-
var e_5, _u;
|
|
2371
|
-
var _a;
|
|
2372
|
-
if (address && this.addressCustomFields.length) {
|
|
2373
|
-
var addressCustomFieldsFormGroup = new forms.FormGroup({});
|
|
2374
|
-
try {
|
|
2375
|
-
for (var _v = __values(this.addressCustomFields), _w = _v.next(); !_w.done; _w = _v.next()) {
|
|
2376
|
-
var customFieldDef = _w.value;
|
|
2377
|
-
var name = customFieldDef.name;
|
|
2378
|
-
var value = (_a = address.customFields) === null || _a === void 0 ? void 0 : _a[name];
|
|
2379
|
-
addressCustomFieldsFormGroup.addControl(name, new forms.FormControl(value));
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
2383
|
-
finally {
|
|
2384
|
-
try {
|
|
2385
|
-
if (_w && !_w.done && (_u = _v.return)) _u.call(_v);
|
|
2386
|
-
}
|
|
2387
|
-
finally { if (e_5) throw e_5.error; }
|
|
2388
|
-
}
|
|
2389
|
-
parentFormGroup.addControl('customFields', addressCustomFieldsFormGroup);
|
|
2390
|
-
}
|
|
2391
|
-
};
|
|
2392
|
-
OrderEditorComponent.prototype.setFormValues = function (entity, languageCode) {
|
|
2393
|
-
/* not used */
|
|
2394
|
-
};
|
|
2395
|
-
return OrderEditorComponent;
|
|
2396
|
-
}(i1.BaseDetailComponent));
|
|
2397
|
-
OrderEditorComponent.decorators = [
|
|
2398
|
-
{ type: i0.Component, args: [{
|
|
2399
|
-
selector: 'vdr-order-editor',
|
|
2400
|
-
template: "<vdr-action-bar *ngIf=\"entity$ | async as order\">\r\n <vdr-ab-left>\r\n <div class=\"flex clr-align-items-center\">\r\n <vdr-entity-info [entity]=\"entity$ | async\"></vdr-entity-info>\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </div>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <button class=\"btn btn-secondary\" (click)=\"transitionToPriorState(order)\">\r\n {{ 'order.cancel-modification' | translate }}\r\n </button>\r\n </vdr-ab-right>\r\n</vdr-action-bar>\r\n\r\n<div *ngIf=\"entity$ | async as order\">\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-lg-8\">\r\n <table class=\"order-table table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th *ngIf=\"orderLineCustomFields.length\">{{ 'common.custom-fields' | translate }}</th>\r\n <th>{{ 'order.total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"let line of order.lines; let i = index\"\r\n class=\"order-line\"\r\n [class.is-cancelled]=\"line.quantity === 0\"\r\n [class.modified]=\"isLineModified(line)\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img\r\n *ngIf=\"line.featuredAsset\"\r\n [src]=\"line.featuredAsset | assetPreview: 'tiny'\"\r\n />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle unit-price\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n <td class=\"align-middle quantity\">\r\n <input\r\n type=\"number\"\r\n min=\"0\"\r\n [value]=\"line.quantity\"\r\n (input)=\"updateLineQuantity(line, $event.target.value)\"\r\n />\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment\r\n [line]=\"line\"\r\n [orderState]=\"order.state\"\r\n ></vdr-line-fulfillment>\r\n </td>\r\n <td *ngIf=\"orderLineCustomFields.length\" class=\"order-line-custom-field align-middle\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"OrderLine\"\r\n [customFields]=\"orderLineCustomFields\"\r\n [customFieldsFormGroup]=\"orderLineCustomFieldsFormArray.get([i])\"\r\n [compact]=\"true\"\r\n ></vdr-tabbed-custom-fields>\r\n </td>\r\n <td class=\"align-middle total\">\r\n {{ line.linePriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.linePrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr\r\n *ngFor=\"let addedLine of addedLines; trackBy: trackByProductVariantId; let i = index\"\r\n class=\"modified\"\r\n >\r\n <td class=\"align-middle thumb\">\r\n <img\r\n *ngIf=\"addedLine.productAsset\"\r\n [src]=\"addedLine.productAsset | assetPreview: 'tiny'\"\r\n />\r\n </td>\r\n <td class=\"align-middle name\">{{ addedLine.productVariantName }}</td>\r\n <td class=\"align-middle sku\">{{ addedLine.sku }}</td>\r\n <td class=\"align-middle unit-price\">\r\n {{ addedLine.priceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ addedLine.price | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n <td class=\"align-middle quantity\">\r\n <input\r\n type=\"number\"\r\n min=\"0\"\r\n [value]=\"addedLine.quantity\"\r\n (input)=\"updateAddedItemQuantity(addedLine, $event.target.value)\"\r\n />\r\n <button class=\"icon-button\" (click)=\"removeAddedItem(i)\">\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n </td>\r\n <td *ngIf=\"orderLineCustomFields.length\" class=\"order-line-custom-field align-middle\">\r\n <ng-container *ngFor=\"let customField of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"addItemCustomFieldsFormArray.get([i])\"\r\n entityName=\"OrderLine\"\r\n [compact]=\"true\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </td>\r\n <td class=\"align-middle total\">\r\n {{\r\n (addedLine.priceWithTax * addedLine.quantity) / 100\r\n | currency: order.currencyCode\r\n }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{\r\n (addedLine.price * addedLine.quantity) / 100\r\n | currency: order.currencyCode\r\n }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\r\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\"></td>\r\n <td></td>\r\n <td *ngIf=\"orderLineCustomFields.length\"></td>\r\n <td class=\"align-middle total\">\r\n {{ surcharge.priceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surcharge.price | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr\r\n class=\"surcharge modified\"\r\n *ngFor=\"let surcharge of modifyOrderInput.surcharges; let i = index\"\r\n >\r\n <td class=\"align-middle name left\" colspan=\"2\">\r\n {{ surcharge.description }}\r\n <button class=\"icon-button\" (click)=\"removeSurcharge(i)\">\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n </td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\"></td>\r\n <td></td>\r\n <td *ngIf=\"orderLineCustomFields.length\"></td>\r\n <td class=\"align-middle total\">\r\n <ng-container *ngIf=\"getSurchargePrices(surcharge) as surchargePrice\">\r\n {{ surchargePrice.priceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surchargePrice.price | localeCurrency: order.currencyCode }}\r\n </div>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n <tr class=\"shipping\">\r\n <td class=\"left clr-align-middle\">{{ 'order.shipping' | translate }}</td>\r\n <td class=\"clr-align-middle\">{{ order.shippingLines[0]?.shippingMethod?.name }}</td>\r\n <td colspan=\"3\"></td>\r\n <td *ngIf=\"orderLineCustomFields.length\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.shippingWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.shipping | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n <h4 class=\"mb2\">{{ 'order.modifications' | translate }}</h4>\r\n <clr-accordion>\r\n <clr-accordion-panel>\r\n <clr-accordion-title>{{ 'order.add-item-to-order' | translate }}</clr-accordion-title>\r\n <clr-accordion-content *clrIfExpanded>\r\n <vdr-product-selector class=\"mb4\" (productSelected)=\"addItemSelectedVariant = $event\">\r\n </vdr-product-selector>\r\n <div *ngIf=\"addItemSelectedVariant\" class=\"flex mb4\">\r\n <img\r\n *ngIf=\"addItemSelectedVariant.productAsset as asset\"\r\n [src]=\"asset | assetPreview: 'tiny'\"\r\n class=\"mr4\"\r\n />\r\n <div>\r\n <strong class=\"mr4\">{{ addItemSelectedVariant.productVariantName }}</strong>\r\n <small>{{ addItemSelectedVariant.sku }}</small>\r\n <div>\r\n {{\r\n getSelectedItemPrice(addItemSelectedVariant)\r\n | localeCurrency: order.currencyCode\r\n }}\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngFor=\"let customField of orderLineCustomFields\">\r\n <vdr-custom-field-control\r\n [readonly]=\"!addItemSelectedVariant\"\r\n [customField]=\"customField\"\r\n [customFieldsFormGroup]=\"addItemCustomFieldsForm\"\r\n entityName=\"OrderLine\"\r\n [compact]=\"true\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n <button\r\n class=\"btn btn-secondary\"\r\n [disabled]=\"!addItemSelectedVariant || addItemCustomFieldsForm.invalid\"\r\n (click)=\"addItemToOrder(addItemSelectedVariant)\"\r\n >\r\n {{ 'order.add-item-to-order' | translate }}\r\n </button>\r\n </clr-accordion-content>\r\n </clr-accordion-panel>\r\n <clr-accordion-panel>\r\n <clr-accordion-title>{{ 'order.set-coupon-codes' | translate }}</clr-accordion-title>\r\n <clr-accordion-content *clrIfExpanded>\r\n <ng-select\r\n [items]=\"availableCouponCodes$ | async\"\r\n appendTo=\"body\"\r\n bindLabel=\"code\"\r\n bindValue=\"code\"\r\n [addTag]=\"false\"\r\n [multiple]=\"true\"\r\n [hideSelected]=\"true\"\r\n [minTermLength]=\"2\"\r\n typeToSearchText=\"\"\r\n [typeahead]=\"couponCodeInput$\"\r\n [formControl]=\"couponCodesControl\"\r\n >\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <vdr-chip>{{ item.code }}</vdr-chip>\r\n {{ item.promotionName }}\r\n </ng-template>\r\n </ng-select>\r\n </clr-accordion-content>\r\n </clr-accordion-panel>\r\n\r\n <clr-accordion-panel>\r\n <clr-accordion-title>{{ 'order.add-surcharge' | translate }}</clr-accordion-title>\r\n <clr-accordion-content *clrIfExpanded>\r\n <form [formGroup]=\"surchargeForm\" (submit)=\"addSurcharge(surchargeForm.value)\">\r\n <vdr-form-field [label]=\"'common.description' | translate\" for=\"description\"\r\n ><input id=\"description\" type=\"text\" formControlName=\"description\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.product-sku' | translate\" for=\"sku\"\r\n ><input id=\"sku\" type=\"text\" formControlName=\"sku\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'common.price' | translate\" for=\"price\">\r\n <vdr-currency-input\r\n [currencyCode]=\"order.currencyCode\"\r\n id=\"price\"\r\n formControlName=\"price\"\r\n ></vdr-currency-input>\r\n </vdr-form-field>\r\n <vdr-form-field\r\n [label]=\"\r\n 'catalog.price-includes-tax-at'\r\n | translate: { rate: surchargeForm.get('taxRate')?.value }\r\n \"\r\n for=\"priceIncludesTax\"\r\n ><input\r\n id=\"priceIncludesTax\"\r\n type=\"checkbox\"\r\n clrCheckbox\r\n formControlName=\"priceIncludesTax\"\r\n /></vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-rate' | translate\" for=\"taxRate\">\r\n <vdr-affixed-input suffix=\"%\"\r\n ><input\r\n id=\"taxRate\"\r\n type=\"number\"\r\n min=\"0\"\r\n max=\"100\"\r\n formControlName=\"taxRate\"\r\n /></vdr-affixed-input>\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'order.tax-description' | translate\" for=\"taxDescription\"\r\n ><input id=\"taxDescription\" type=\"text\" formControlName=\"taxDescription\"\r\n /></vdr-form-field>\r\n <button\r\n class=\"btn btn-secondary\"\r\n [disabled]=\"\r\n surchargeForm.invalid ||\r\n surchargeForm.pristine ||\r\n surchargeForm.get('price')?.value === 0\r\n \"\r\n >\r\n {{ 'order.add-surcharge' | translate }}\r\n </button>\r\n </form>\r\n </clr-accordion-content>\r\n </clr-accordion-panel>\r\n <clr-accordion-panel>\r\n <clr-accordion-title>{{ 'order.edit-shipping-address' | translate }}</clr-accordion-title>\r\n <clr-accordion-content *clrIfExpanded>\r\n <vdr-address-form\r\n [formGroup]=\"shippingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </clr-accordion-content>\r\n </clr-accordion-panel>\r\n <clr-accordion-panel>\r\n <clr-accordion-title>{{ 'order.edit-billing-address' | translate }}</clr-accordion-title>\r\n <clr-accordion-content *clrIfExpanded>\r\n <vdr-address-form\r\n [formGroup]=\"billingAddressForm\"\r\n [availableCountries]=\"availableCountries$ | async\"\r\n [customFields]=\"addressCustomFields\"\r\n ></vdr-address-form>\r\n </clr-accordion-content>\r\n </clr-accordion-panel>\r\n </clr-accordion>\r\n </div>\r\n <div class=\"clr-col-lg-4 order-cards\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n {{ 'order.modification-summary' | translate }}\r\n </div>\r\n <div class=\"card-block\">\r\n <ul>\r\n <li *ngIf=\"modifyOrderInput.addItems?.length\">\r\n {{\r\n 'order.modification-adding-items'\r\n | translate: { count: modifyOrderInput.addItems?.length }\r\n }}\r\n </li>\r\n <li *ngIf=\"modifyOrderInput.adjustOrderLines?.length\">\r\n {{\r\n 'order.modification-adjusting-lines'\r\n | translate: { count: modifyOrderInput.adjustOrderLines?.length }\r\n }}\r\n </li>\r\n <li *ngIf=\"modifyOrderInput.surcharges?.length\">\r\n {{\r\n 'order.modification-adding-surcharges'\r\n | translate: { count: modifyOrderInput.surcharges?.length }\r\n }}\r\n </li>\r\n <li *ngIf=\"shippingAddressForm.dirty\">\r\n {{ 'order.modification-updating-shipping-address' | translate }}\r\n </li>\r\n <li *ngIf=\"billingAddressForm.dirty\">\r\n {{ 'order.modification-updating-billing-address' | translate }}\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"card-block\">\r\n <label class=\"clr-control-label\">{{ 'order.note' | translate }}</label>\r\n <textarea [(ngModel)]=\"note\" name=\"note\" clrTextarea required></textarea>\r\n <clr-checkbox-wrapper class=\"\">\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"recalculateShipping\" />\r\n <label>{{ 'order.modification-recalculate-shipping' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n </div>\r\n <div class=\"card-footer\">\r\n <button\r\n class=\"btn btn-primary\"\r\n [disabled]=\"!canPreviewChanges()\"\r\n (click)=\"previewAndModify(order)\"\r\n >\r\n {{ 'order.preview-changes' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2401
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2402
|
-
styles: [".order-table .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.order-table .sub-total td{border-top:1px dashed var(--color-component-border-200)}.order-table .total td{font-weight:bold;border-top:1px dashed var(--color-component-border-200)}.order-table td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}.order-table .order-line-custom-fields{display:flex;flex-wrap:wrap}.order-table .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-right:18px}.order-table .order-line-custom-field{background-color:var(--color-component-bg-100)}.order-table .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}.order-table .net-price{font-size:11px;color:var(--color-text-300)}.order-table .promotions-label{-webkit-text-decoration:underline dotted var(--color-text-200);text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}.order-table .thumb img{width:50px;height:50px}.order-table tr.modified td{background-color:var(--color-warning-100)}.order-table .order-line-custom-field{text-align:start}\n"]
|
|
2403
|
-
},] }
|
|
2404
|
-
];
|
|
2405
|
-
OrderEditorComponent.ctorParameters = function () { return [
|
|
2406
|
-
{ type: i1$1.Router },
|
|
2407
|
-
{ type: i1$1.ActivatedRoute },
|
|
2408
|
-
{ type: i1.ServerConfigService },
|
|
2409
|
-
{ type: i0.ChangeDetectorRef },
|
|
2410
|
-
{ type: i1.DataService },
|
|
2411
|
-
{ type: i1.NotificationService },
|
|
2412
|
-
{ type: i1.ModalService },
|
|
2413
|
-
{ type: OrderTransitionService }
|
|
2414
|
-
]; };
|
|
2415
|
-
|
|
2416
|
-
var OrderHistoryComponent = /** @class */ (function () {
|
|
2417
|
-
function OrderHistoryComponent() {
|
|
2418
|
-
this.addNote = new i0.EventEmitter();
|
|
2419
|
-
this.updateNote = new i0.EventEmitter();
|
|
2420
|
-
this.deleteNote = new i0.EventEmitter();
|
|
2421
|
-
this.note = '';
|
|
2422
|
-
this.noteIsPrivate = true;
|
|
2423
|
-
this.expanded = false;
|
|
2424
|
-
this.type = i1.HistoryEntryType;
|
|
2425
|
-
}
|
|
2426
|
-
OrderHistoryComponent.prototype.getDisplayType = function (entry) {
|
|
2427
|
-
if (entry.type === i1.HistoryEntryType.ORDER_STATE_TRANSITION) {
|
|
2428
|
-
if (entry.data.to === 'Delivered') {
|
|
2429
|
-
return 'success';
|
|
2430
|
-
}
|
|
2431
|
-
if (entry.data.to === 'Cancelled') {
|
|
2432
|
-
return 'error';
|
|
2433
|
-
}
|
|
2434
|
-
}
|
|
2435
|
-
if (entry.type === i1.HistoryEntryType.ORDER_FULFILLMENT_TRANSITION) {
|
|
2436
|
-
if (entry.data.to === 'Delivered') {
|
|
2437
|
-
return 'success';
|
|
2438
|
-
}
|
|
2439
|
-
}
|
|
2440
|
-
if (entry.type === i1.HistoryEntryType.ORDER_PAYMENT_TRANSITION) {
|
|
2441
|
-
if (entry.data.to === 'Declined' || entry.data.to === 'Cancelled') {
|
|
2442
|
-
return 'error';
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
if (entry.type === i1.HistoryEntryType.ORDER_CANCELLATION) {
|
|
2446
|
-
return 'error';
|
|
2447
|
-
}
|
|
2448
|
-
if (entry.type === i1.HistoryEntryType.ORDER_REFUND_TRANSITION) {
|
|
2449
|
-
return 'warning';
|
|
2450
|
-
}
|
|
2451
|
-
return 'default';
|
|
2452
|
-
};
|
|
2453
|
-
OrderHistoryComponent.prototype.getTimelineIcon = function (entry) {
|
|
2454
|
-
if (entry.type === i1.HistoryEntryType.ORDER_STATE_TRANSITION) {
|
|
2455
|
-
if (entry.data.to === 'Delivered') {
|
|
2456
|
-
return ['success-standard', 'is-solid'];
|
|
2457
|
-
}
|
|
2458
|
-
if (entry.data.to === 'Cancelled') {
|
|
2459
|
-
return 'ban';
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
if (entry.type === i1.HistoryEntryType.ORDER_PAYMENT_TRANSITION) {
|
|
2463
|
-
if (entry.data.to === 'Settled') {
|
|
2464
|
-
return 'credit-card';
|
|
2465
|
-
}
|
|
2466
|
-
}
|
|
2467
|
-
if (entry.type === i1.HistoryEntryType.ORDER_NOTE) {
|
|
2468
|
-
return 'note';
|
|
2469
|
-
}
|
|
2470
|
-
if (entry.type === i1.HistoryEntryType.ORDER_MODIFIED) {
|
|
2471
|
-
return 'pencil';
|
|
2472
|
-
}
|
|
2473
|
-
if (entry.type === i1.HistoryEntryType.ORDER_FULFILLMENT_TRANSITION) {
|
|
2474
|
-
if (entry.data.to === 'Shipped') {
|
|
2475
|
-
return 'truck';
|
|
2476
|
-
}
|
|
2477
|
-
if (entry.data.to === 'Delivered') {
|
|
2478
|
-
return 'truck';
|
|
2479
|
-
}
|
|
2480
|
-
}
|
|
2481
|
-
};
|
|
2482
|
-
OrderHistoryComponent.prototype.isFeatured = function (entry) {
|
|
2483
|
-
switch (entry.type) {
|
|
2484
|
-
case i1.HistoryEntryType.ORDER_STATE_TRANSITION: {
|
|
2485
|
-
return (entry.data.to === 'Delivered' ||
|
|
2486
|
-
entry.data.to === 'Cancelled' ||
|
|
2487
|
-
entry.data.to === 'Settled');
|
|
2488
|
-
}
|
|
2489
|
-
case i1.HistoryEntryType.ORDER_PAYMENT_TRANSITION:
|
|
2490
|
-
return entry.data.to === 'Settled' || entry.data.to === 'Cancelled';
|
|
2491
|
-
case i1.HistoryEntryType.ORDER_FULFILLMENT_TRANSITION:
|
|
2492
|
-
return entry.data.to === 'Delivered' || entry.data.to === 'Shipped';
|
|
2493
|
-
case i1.HistoryEntryType.ORDER_NOTE:
|
|
2494
|
-
case i1.HistoryEntryType.ORDER_MODIFIED:
|
|
2495
|
-
return true;
|
|
2496
|
-
default:
|
|
2497
|
-
return false;
|
|
2498
|
-
}
|
|
2499
|
-
};
|
|
2500
|
-
OrderHistoryComponent.prototype.getFulfillment = function (entry) {
|
|
2501
|
-
if ((entry.type === i1.HistoryEntryType.ORDER_FULFILLMENT ||
|
|
2502
|
-
entry.type === i1.HistoryEntryType.ORDER_FULFILLMENT_TRANSITION) &&
|
|
2503
|
-
this.order.fulfillments) {
|
|
2504
|
-
return this.order.fulfillments.find(function (f) { return f.id === entry.data.fulfillmentId; });
|
|
2505
|
-
}
|
|
2506
|
-
};
|
|
2507
|
-
OrderHistoryComponent.prototype.getPayment = function (entry) {
|
|
2508
|
-
if (entry.type === i1.HistoryEntryType.ORDER_PAYMENT_TRANSITION && this.order.payments) {
|
|
2509
|
-
return this.order.payments.find(function (p) { return p.id === entry.data.paymentId; });
|
|
2510
|
-
}
|
|
2511
|
-
};
|
|
2512
|
-
OrderHistoryComponent.prototype.getCancelledItems = function (entry) {
|
|
2513
|
-
var e_1, _a, e_2, _b;
|
|
2514
|
-
var itemMap = new Map();
|
|
2515
|
-
var cancelledItemIds = entry.data.orderItemIds;
|
|
2516
|
-
try {
|
|
2517
|
-
for (var _c = __values(this.order.lines), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2518
|
-
var line = _d.value;
|
|
2519
|
-
try {
|
|
2520
|
-
for (var _e = (e_2 = void 0, __values(line.items)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
2521
|
-
var item = _f.value;
|
|
2522
|
-
if (cancelledItemIds.includes(item.id)) {
|
|
2523
|
-
var count = itemMap.get(line.productVariant.name);
|
|
2524
|
-
if (count != null) {
|
|
2525
|
-
itemMap.set(line.productVariant.name, count + 1);
|
|
2526
|
-
}
|
|
2527
|
-
else {
|
|
2528
|
-
itemMap.set(line.productVariant.name, 1);
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2534
|
-
finally {
|
|
2535
|
-
try {
|
|
2536
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
2537
|
-
}
|
|
2538
|
-
finally { if (e_2) throw e_2.error; }
|
|
2539
|
-
}
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2543
|
-
finally {
|
|
2544
|
-
try {
|
|
2545
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
2546
|
-
}
|
|
2547
|
-
finally { if (e_1) throw e_1.error; }
|
|
2548
|
-
}
|
|
2549
|
-
return Array.from(itemMap.entries()).map(function (_a) {
|
|
2550
|
-
var _b = __read(_a, 2), name = _b[0], quantity = _b[1];
|
|
2551
|
-
return ({ name: name, quantity: quantity });
|
|
2552
|
-
});
|
|
2553
|
-
};
|
|
2554
|
-
OrderHistoryComponent.prototype.getModification = function (id) {
|
|
2555
|
-
return this.order.modifications.find(function (m) { return m.id === id; });
|
|
2556
|
-
};
|
|
2557
|
-
OrderHistoryComponent.prototype.getName = function (entry) {
|
|
2558
|
-
var administrator = entry.administrator;
|
|
2559
|
-
if (administrator) {
|
|
2560
|
-
return administrator.firstName + " " + administrator.lastName;
|
|
2561
|
-
}
|
|
2562
|
-
else {
|
|
2563
|
-
var customer = this.order.customer;
|
|
2564
|
-
if (customer) {
|
|
2565
|
-
return customer.firstName + " " + customer.lastName;
|
|
2566
|
-
}
|
|
2567
|
-
}
|
|
2568
|
-
return '';
|
|
2569
|
-
};
|
|
2570
|
-
OrderHistoryComponent.prototype.addNoteToOrder = function () {
|
|
2571
|
-
this.addNote.emit({ note: this.note, isPublic: !this.noteIsPrivate });
|
|
2572
|
-
this.note = '';
|
|
2573
|
-
this.noteIsPrivate = true;
|
|
2574
|
-
};
|
|
2575
|
-
return OrderHistoryComponent;
|
|
2576
|
-
}());
|
|
2577
|
-
OrderHistoryComponent.decorators = [
|
|
2578
|
-
{ type: i0.Component, args: [{
|
|
2579
|
-
selector: 'vdr-order-history',
|
|
2580
|
-
template: "<h4>{{ 'order.order-history' | translate }}</h4>\r\n<div class=\"entry-list\" [class.expanded]=\"expanded\">\r\n <vdr-timeline-entry iconShape=\"note\" displayType=\"muted\" [featured]=\"true\">\r\n <div class=\"note-entry\">\r\n <textarea [(ngModel)]=\"note\" name=\"note\" class=\"note\"></textarea>\r\n <button class=\"btn btn-secondary\" [disabled]=\"!note\" (click)=\"addNoteToOrder()\">\r\n {{ 'common.add-note' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"visibility-select\">\r\n <clr-checkbox-wrapper>\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"noteIsPrivate\" />\r\n <label>{{ 'order.note-is-private' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf=\"noteIsPrivate\" class=\"private\">\r\n {{ 'order.note-only-visible-to-administrators' | translate }}\r\n </span>\r\n <span *ngIf=\"!noteIsPrivate\" class=\"public\">\r\n {{ 'order.note-visible-to-customer' | translate }}\r\n </span>\r\n </div>\r\n </vdr-timeline-entry>\r\n <vdr-timeline-entry\r\n *ngFor=\"let entry of history\"\r\n [displayType]=\"getDisplayType(entry)\"\r\n [iconShape]=\"getTimelineIcon(entry)\"\r\n [createdAt]=\"entry.createdAt\"\r\n [name]=\"getName(entry)\"\r\n [featured]=\"isFeatured(entry)\"\r\n [collapsed]=\"!expanded && !isFeatured(entry)\"\r\n (expandClick)=\"expanded = !expanded\"\r\n >\r\n <ng-container [ngSwitch]=\"entry.type\">\r\n <ng-container *ngSwitchCase=\"type.ORDER_STATE_TRANSITION\">\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Delivered'\">\r\n {{ 'order.history-order-fulfilled' | translate }}\r\n </div>\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Cancelled'\">\r\n {{ 'order.history-order-cancelled' | translate }}\r\n </div>\r\n <ng-template [ngIf]=\"entry.data.to !== 'Cancelled' && entry.data.to !== 'Delivered'\">\r\n {{\r\n 'order.history-order-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_MODIFIED\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-modified' | translate }}\r\n </div>\r\n <ng-container *ngIf=\"getModification(entry.data.modificationId) as modification\">\r\n {{ 'order.modify-order-price-difference' | translate }}:\r\n <strong>{{ modification.priceChange | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-chip colorType=\"success\" *ngIf=\"modification.isSettled\">{{\r\n 'order.modification-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip colorType=\"error\" *ngIf=\"!modification.isSettled\">{{\r\n 'order.modification-not-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-modification-detail\r\n [order]=\"order\"\r\n [modification]=\"modification\"\r\n ></vdr-modification-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_PAYMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularPaymentTransition\">\r\n <div class=\"title\">\r\n {{ 'order.history-payment-settled' | translate }}\r\n </div>\r\n {{ 'order.transaction-id' | translate }}: {{ getPayment(entry)?.transactionId }}\r\n <vdr-history-entry-detail *ngIf=\"getPayment(entry) as payment\">\r\n <vdr-payment-detail\r\n [payment]=\"payment\"\r\n [currencyCode]=\"order.currencyCode\"\r\n ></vdr-payment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-template #regularPaymentTransition>\r\n {{\r\n 'order.history-payment-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: getPayment(entry)?.transactionId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_REFUND_TRANSITION\">\r\n {{\r\n 'order.history-refund-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to, id: entry.data.refundId }\r\n }}\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CANCELLATION\">\r\n {{ 'order.history-items-cancelled' | translate: { count: entry.data.orderItemIds.length } }}\r\n <vdr-history-entry-detail *ngIf=\"getCancelledItems(entry) as items\">\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.shipping-cancelled' | translate\">\r\n {{ entry.data.shippingCancelled }}\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT\">\r\n {{ 'order.history-fulfillment-created' | translate }}\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Delivered'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-delivered' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to === 'Shipped'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-shipped' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to !== 'Delivered' && entry.data.to !== 'Shipped'\">\r\n {{\r\n 'order.history-fulfillment-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-container>\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_NOTE\">\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n <span *ngIf=\"entry.isPublic\" class=\"note-visibility public\">{{\r\n 'common.public' | translate\r\n }}</span>\r\n <span *ngIf=\"!entry.isPublic\" class=\"note-visibility private\">{{\r\n 'common.private' | translate\r\n }}</span>\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n class=\"button\"\r\n vdrDropdownItem\r\n (click)=\"updateNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n class=\"button\"\r\n vdrDropdownItem\r\n (click)=\"deleteNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_APPLIED\">\r\n {{ 'order.history-coupon-code-applied' | translate }}:\r\n <vdr-chip>\r\n <a [routerLink]=\"['/marketing', 'promotions', entry.data.promotionId]\">{{\r\n entry.data.couponCode\r\n }}</a>\r\n </vdr-chip>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_REMOVED\">\r\n {{ 'order.history-coupon-code-removed' | translate }}:\r\n <vdr-chip\r\n ><span class=\"cancelled-coupon-code\">{{ entry.data.couponCode }}</span></vdr-chip\r\n >\r\n </ng-container>\r\n </ng-container>\r\n </vdr-timeline-entry>\r\n <vdr-timeline-entry [isLast]=\"true\" [createdAt]=\"order.createdAt\" [featured]=\"true\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-created' | translate }}\r\n </div>\r\n </vdr-timeline-entry>\r\n</div>\r\n",
|
|
2581
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2582
|
-
styles: [":host{margin-top:48px;display:block}.entry-list{margin-top:24px;margin-left:24px;margin-right:12px}.note-entry{display:flex;align-items:center}.note-entry .note{flex:1}.note-entry button{margin:0}.visibility-select{display:flex;justify-content:space-between;align-items:baseline}.visibility-select .public{color:var(--color-warning-500)}.visibility-select .private{color:var(--color-success-500)}textarea.note{flex:1;height:36px;border-radius:3px;margin-right:6px}.note-text{color:var(--color-grey-800);white-space:pre-wrap}.cancelled-coupon-code{text-decoration:line-through}.note-visibility{text-transform:lowercase}.note-visibility.public{color:var(--color-warning-500)}.note-visibility.private{color:var(--color-success-500)}\n"]
|
|
2583
|
-
},] }
|
|
2584
|
-
];
|
|
2585
|
-
OrderHistoryComponent.propDecorators = {
|
|
2586
|
-
order: [{ type: i0.Input }],
|
|
2587
|
-
history: [{ type: i0.Input }],
|
|
2588
|
-
addNote: [{ type: i0.Output }],
|
|
2589
|
-
updateNote: [{ type: i0.Output }],
|
|
2590
|
-
deleteNote: [{ type: i0.Output }]
|
|
2591
|
-
};
|
|
2592
|
-
|
|
2593
|
-
var OrderListComponent = /** @class */ (function (_super) {
|
|
2594
|
-
__extends(OrderListComponent, _super);
|
|
2595
|
-
function OrderListComponent(serverConfigService, dataService, localStorageService, router, route) {
|
|
2596
|
-
var _this = _super.call(this, router, route) || this;
|
|
2597
|
-
_this.serverConfigService = serverConfigService;
|
|
2598
|
-
_this.dataService = dataService;
|
|
2599
|
-
_this.localStorageService = localStorageService;
|
|
2600
|
-
_this.searchControl = new forms.FormControl('');
|
|
2601
|
-
_this.searchOrderCodeControl = new forms.FormControl('');
|
|
2602
|
-
_this.searchLastNameControl = new forms.FormControl('');
|
|
2603
|
-
_this.orderStates = _this.serverConfigService.getOrderProcessStates().map(function (item) { return item.name; });
|
|
2604
|
-
_this.filterPresets = [
|
|
2605
|
-
{
|
|
2606
|
-
name: 'open',
|
|
2607
|
-
label: ngxTranslateExtractMarker.marker('order.filter-preset-open'),
|
|
2608
|
-
config: {
|
|
2609
|
-
active: false,
|
|
2610
|
-
states: _this.orderStates.filter(function (s) { return s !== 'Delivered' && s !== 'Cancelled' && s !== 'Shipped'; }),
|
|
2611
|
-
},
|
|
2612
|
-
},
|
|
2613
|
-
{
|
|
2614
|
-
name: 'shipped',
|
|
2615
|
-
label: ngxTranslateExtractMarker.marker('order.filter-preset-shipped'),
|
|
2616
|
-
config: {
|
|
2617
|
-
active: false,
|
|
2618
|
-
states: ['Shipped'],
|
|
2619
|
-
},
|
|
2620
|
-
},
|
|
2621
|
-
{
|
|
2622
|
-
name: 'completed',
|
|
2623
|
-
label: ngxTranslateExtractMarker.marker('order.filter-preset-completed'),
|
|
2624
|
-
config: {
|
|
2625
|
-
active: false,
|
|
2626
|
-
states: ['Delivered', 'Cancelled'],
|
|
2627
|
-
},
|
|
2628
|
-
},
|
|
2629
|
-
{
|
|
2630
|
-
name: 'active',
|
|
2631
|
-
label: ngxTranslateExtractMarker.marker('order.filter-preset-active'),
|
|
2632
|
-
config: {
|
|
2633
|
-
active: true,
|
|
2634
|
-
},
|
|
2635
|
-
},
|
|
2636
|
-
];
|
|
2637
|
-
_super.prototype.setQueryFn.call(_this,
|
|
2638
|
-
// tslint:disable-next-line:no-shadowed-variable
|
|
2639
|
-
function (take, skip) { return _this.dataService.order.getOrders({ take: take, skip: skip }).refetchOnChannelChange(); }, function (data) { return data.orders; },
|
|
2640
|
-
// tslint:disable-next-line:no-shadowed-variable
|
|
2641
|
-
function (skip, take) { return _this.createQueryOptions(skip, take, _this.searchControl.value, _this.route.snapshot.queryParamMap.get('filter') || 'open'); });
|
|
2642
|
-
var lastFilters = _this.localStorageService.get('orderListLastCustomFilters');
|
|
2643
|
-
if (lastFilters) {
|
|
2644
|
-
_this.setQueryParam(lastFilters, { replaceUrl: true });
|
|
2645
|
-
}
|
|
2646
|
-
return _this;
|
|
2647
|
-
}
|
|
2648
|
-
OrderListComponent.prototype.ngOnInit = function () {
|
|
2649
|
-
var _this = this;
|
|
2650
|
-
var _a;
|
|
2651
|
-
_super.prototype.ngOnInit.call(this);
|
|
2652
|
-
this.activePreset$ = this.route.queryParamMap.pipe(operators.map(function (qpm) { return qpm.get('filter') || 'open'; }), operators.distinctUntilChanged());
|
|
2653
|
-
var searchTerms$ = rxjs.merge(this.searchControl.valueChanges).pipe(operators.filter(function (value) { return 2 < value.length || value.length === 0; }), operators.debounceTime(250));
|
|
2654
|
-
rxjs.merge(searchTerms$, this.route.queryParamMap)
|
|
2655
|
-
.pipe(operators.takeUntil(this.destroy$))
|
|
2656
|
-
.subscribe(function (val) {
|
|
2657
|
-
_this.refresh();
|
|
2658
|
-
});
|
|
2659
|
-
var queryParamMap = this.route.snapshot.queryParamMap;
|
|
2660
|
-
this.customFilterForm = new forms.FormGroup({
|
|
2661
|
-
states: new forms.FormControl((_a = queryParamMap.getAll('states')) !== null && _a !== void 0 ? _a : []),
|
|
2662
|
-
placedAtStart: new forms.FormControl(queryParamMap.get('placedAtStart')),
|
|
2663
|
-
placedAtEnd: new forms.FormControl(queryParamMap.get('placedAtEnd')),
|
|
2664
|
-
});
|
|
2665
|
-
};
|
|
2666
|
-
OrderListComponent.prototype.selectFilterPreset = function (presetName) {
|
|
2667
|
-
var _a;
|
|
2668
|
-
var lastCustomFilters = (_a = this.localStorageService.get('orderListLastCustomFilters')) !== null && _a !== void 0 ? _a : {};
|
|
2669
|
-
var emptyCustomFilters = { states: undefined, placedAtStart: undefined, placedAtEnd: undefined };
|
|
2670
|
-
var filters = presetName === 'custom' ? lastCustomFilters : emptyCustomFilters;
|
|
2671
|
-
this.setQueryParam(Object.assign({ filter: presetName, page: 1 }, filters), { replaceUrl: true });
|
|
2672
|
-
};
|
|
2673
|
-
OrderListComponent.prototype.applyCustomFilters = function () {
|
|
2674
|
-
var formValue = this.customFilterForm.value;
|
|
2675
|
-
var customFilters = {
|
|
2676
|
-
states: formValue.states,
|
|
2677
|
-
placedAtStart: formValue.placedAtStart,
|
|
2678
|
-
placedAtEnd: formValue.placedAtEnd,
|
|
2679
|
-
};
|
|
2680
|
-
this.setQueryParam(Object.assign({ filter: 'custom' }, customFilters));
|
|
2681
|
-
this.customFilterForm.markAsPristine();
|
|
2682
|
-
this.localStorageService.set('orderListLastCustomFilters', customFilters);
|
|
2683
|
-
};
|
|
2684
|
-
OrderListComponent.prototype.createQueryOptions = function (
|
|
2685
|
-
// tslint:disable-next-line:no-shadowed-variable
|
|
2686
|
-
skip, take, searchTerm, activeFilterPreset) {
|
|
2687
|
-
var _a;
|
|
2688
|
-
var filterConfig = this.filterPresets.find(function (p) { return p.name === activeFilterPreset; });
|
|
2689
|
-
// tslint:disable-next-line:no-shadowed-variable
|
|
2690
|
-
var filter = {};
|
|
2691
|
-
var filterOperator = i1.LogicalOperator.AND;
|
|
2692
|
-
if (filterConfig) {
|
|
2693
|
-
if (filterConfig.config.active != null) {
|
|
2694
|
-
filter.active = {
|
|
2695
|
-
eq: filterConfig.config.active,
|
|
2696
|
-
};
|
|
2697
|
-
}
|
|
2698
|
-
if (filterConfig.config.states) {
|
|
2699
|
-
filter.state = {
|
|
2700
|
-
in: filterConfig.config.states,
|
|
2701
|
-
};
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
else if (activeFilterPreset === 'custom') {
|
|
2705
|
-
var queryParams = this.route.snapshot.queryParamMap;
|
|
2706
|
-
var states = (_a = queryParams.getAll('states')) !== null && _a !== void 0 ? _a : [];
|
|
2707
|
-
var placedAtStart = queryParams.get('placedAtStart');
|
|
2708
|
-
var placedAtEnd = queryParams.get('placedAtEnd');
|
|
2709
|
-
if (states.length) {
|
|
2710
|
-
filter.state = {
|
|
2711
|
-
in: states,
|
|
2712
|
-
};
|
|
2713
|
-
}
|
|
2714
|
-
if (placedAtStart && placedAtEnd) {
|
|
2715
|
-
filter.orderPlacedAt = {
|
|
2716
|
-
between: {
|
|
2717
|
-
start: placedAtStart,
|
|
2718
|
-
end: placedAtEnd,
|
|
2719
|
-
},
|
|
2720
|
-
};
|
|
2721
|
-
}
|
|
2722
|
-
else if (placedAtStart) {
|
|
2723
|
-
filter.orderPlacedAt = {
|
|
2724
|
-
after: placedAtStart,
|
|
2725
|
-
};
|
|
2726
|
-
}
|
|
2727
|
-
else if (placedAtEnd) {
|
|
2728
|
-
filter.orderPlacedAt = {
|
|
2729
|
-
before: placedAtEnd,
|
|
2730
|
-
};
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2733
|
-
if (searchTerm) {
|
|
2734
|
-
filter = {
|
|
2735
|
-
customerLastName: {
|
|
2736
|
-
contains: searchTerm,
|
|
2737
|
-
},
|
|
2738
|
-
transactionId: {
|
|
2739
|
-
contains: searchTerm,
|
|
2740
|
-
},
|
|
2741
|
-
code: {
|
|
2742
|
-
contains: searchTerm,
|
|
2743
|
-
},
|
|
2744
|
-
};
|
|
2745
|
-
filterOperator = i1.LogicalOperator.OR;
|
|
2746
|
-
}
|
|
2747
|
-
return {
|
|
2748
|
-
options: {
|
|
2749
|
-
skip: skip,
|
|
2750
|
-
take: take,
|
|
2751
|
-
filter: Object.assign({}, (filter !== null && filter !== void 0 ? filter : {})),
|
|
2752
|
-
sort: {
|
|
2753
|
-
updatedAt: i1.SortOrder.DESC,
|
|
2754
|
-
},
|
|
2755
|
-
filterOperator: filterOperator,
|
|
2756
|
-
},
|
|
2757
|
-
};
|
|
2758
|
-
};
|
|
2759
|
-
OrderListComponent.prototype.getShippingNames = function (order) {
|
|
2760
|
-
if (order.shippingLines.length) {
|
|
2761
|
-
return order.shippingLines.map(function (shippingLine) { return shippingLine.shippingMethod.name; }).join(', ');
|
|
2762
|
-
}
|
|
2763
|
-
else {
|
|
2764
|
-
return '';
|
|
2765
|
-
}
|
|
2766
|
-
};
|
|
2767
|
-
return OrderListComponent;
|
|
2768
|
-
}(i1.BaseListComponent));
|
|
2769
|
-
OrderListComponent.decorators = [
|
|
2770
|
-
{ type: i0.Component, args: [{
|
|
2771
|
-
selector: 'vdr-order-list',
|
|
2772
|
-
template: "<vdr-action-bar>\r\n <vdr-ab-left>\r\n <div class=\"search-form\">\r\n <div class=\"btn-group btn-outline-primary\" *ngIf=\"activePreset$ | async as activePreset\">\r\n <button\r\n class=\"btn\"\r\n *ngFor=\"let preset of filterPresets\"\r\n [class.btn-primary]=\"activePreset === preset.name\"\r\n (click)=\"selectFilterPreset(preset.name)\"\r\n >\r\n {{ preset.label | translate }}\r\n </button>\r\n <button\r\n class=\"btn\"\r\n [class.btn-primary]=\"activePreset === 'custom'\"\r\n (click)=\"selectFilterPreset('custom')\"\r\n >\r\n {{ 'order.filter-custom' | translate }}\r\n <clr-icon shape=\"angle down\"></clr-icon>\r\n </button>\r\n </div>\r\n <input\r\n type=\"text\"\r\n name=\"searchTerm\"\r\n [formControl]=\"searchControl\"\r\n [placeholder]=\"'order.search-by-order-filters' | translate\"\r\n class=\"search-input\"\r\n />\r\n </div>\r\n <div class=\"custom-filters\" [class.expanded]=\"(activePreset$ | async) === 'custom'\">\r\n <form [formGroup]=\"customFilterForm\">\r\n <div class=\"flex align-center\">\r\n <ng-select\r\n [items]=\"orderStates\"\r\n appendTo=\"body\"\r\n [addTag]=\"false\"\r\n [multiple]=\"true\"\r\n formControlName=\"states\"\r\n [placeholder]=\"'state.all-orders' | translate\"\r\n [clearable]=\"true\"\r\n [searchable]=\"false\"\r\n >\r\n <ng-template ng-option-tmp let-item=\"item\">{{ item | stateI18nToken | translate }}</ng-template>\r\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <span class=\"ng-value-label\"> {{ item | stateI18nToken | translate }}</span>\r\n <span class=\"ng-value-icon right\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\r\n </ng-template>\r\n </ng-select>\r\n <button\r\n class=\"btn btn-secondary\"\r\n [disabled]=\"customFilterForm.pristine\"\r\n (click)=\"applyCustomFilters()\"\r\n >\r\n {{ 'order.apply-filters' | translate }}\r\n <clr-icon shape=\"filter\"></clr-icon>\r\n </button>\r\n </div>\r\n <div class=\"flex\">\r\n <div>\r\n <label>{{ 'order.placed-at-start' | translate }}</label>\r\n <vdr-datetime-picker formControlName=\"placedAtStart\"></vdr-datetime-picker>\r\n </div>\r\n <div>\r\n <label>{{ 'order.placed-at-end' | translate }}</label>\r\n <vdr-datetime-picker formControlName=\"placedAtEnd\"></vdr-datetime-picker>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </vdr-ab-left>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"order-list\"></vdr-action-bar-items>\r\n </vdr-ab-right>\r\n</vdr-action-bar>\r\n\r\n<vdr-data-table\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-dt-column>{{ 'common.code' | translate }}</vdr-dt-column>\r\n <vdr-dt-column>{{ 'order.customer' | translate }}</vdr-dt-column>\r\n <vdr-dt-column>{{ 'order.state' | translate }}</vdr-dt-column>\r\n <vdr-dt-column>{{ 'order.total' | translate }}</vdr-dt-column>\r\n <vdr-dt-column>{{ 'common.updated-at' | translate }}</vdr-dt-column>\r\n <vdr-dt-column>{{ 'order.placed-at' | translate }}</vdr-dt-column>\r\n <vdr-dt-column>{{ 'order.shipping' | translate }}</vdr-dt-column>\r\n <vdr-dt-column></vdr-dt-column>\r\n <ng-template let-order=\"item\">\r\n <td class=\"left align-middle\">{{ order.code }}</td>\r\n <td class=\"left align-middle\">\r\n <vdr-customer-label [customer]=\"order.customer\"></vdr-customer-label>\r\n </td>\r\n <td class=\"left align-middle\">\r\n <vdr-order-state-label [state]=\"order.state\"></vdr-order-state-label>\r\n </td>\r\n <td class=\"left align-middle\">{{ order.totalWithTax | localeCurrency: order.currencyCode }}</td>\r\n <td class=\"left align-middle\">{{ order.updatedAt | timeAgo }}</td>\r\n <td class=\"left align-middle\">{{ order.orderPlacedAt | localeDate: 'medium' }}</td>\r\n <td class=\"left align-middle\">{{ getShippingNames(order) }}</td>\r\n <td class=\"right align-middle\">\r\n <vdr-table-row-action\r\n iconShape=\"shopping-cart\"\r\n [label]=\"'common.open' | translate\"\r\n [linkTo]=\"order.state === 'Modifying' ? ['./', order.id, 'modify'] : ['./', order.id]\"\r\n ></vdr-table-row-action>\r\n </td>\r\n </ng-template>\r\n</vdr-data-table>\r\n",
|
|
2773
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2774
|
-
styles: [".search-form{display:flex;flex-direction:column;align-items:baseline;width:100%;margin-bottom:6px}@media screen and (min-width: 768px){.search-form{flex-direction:row}}.search-input{margin-left:6px;margin-top:6px;min-width:300px}.custom-filters{overflow:hidden;max-height:0;padding-bottom:6px}.custom-filters.expanded{max-height:initial}.custom-filters>form{display:flex;flex-direction:column;align-items:center}.custom-filters>form>div{width:100%}ng-select{flex:1;min-width:200px;height:36px}ng-select ::ng-deep .ng-select-container{height:36px}\n"]
|
|
2775
|
-
},] }
|
|
2776
|
-
];
|
|
2777
|
-
OrderListComponent.ctorParameters = function () { return [
|
|
2778
|
-
{ type: i1.ServerConfigService },
|
|
2779
|
-
{ type: i1.DataService },
|
|
2780
|
-
{ type: i1.LocalStorageService },
|
|
2781
|
-
{ type: i1$1.Router },
|
|
2782
|
-
{ type: i1$1.ActivatedRoute }
|
|
2783
|
-
]; };
|
|
2784
|
-
|
|
2785
|
-
var OrderPaymentCardComponent = /** @class */ (function () {
|
|
2786
|
-
function OrderPaymentCardComponent() {
|
|
2787
|
-
this.settlePayment = new i0.EventEmitter();
|
|
2788
|
-
this.transitionPaymentState = new i0.EventEmitter();
|
|
2789
|
-
this.settleRefund = new i0.EventEmitter();
|
|
2790
|
-
}
|
|
2791
|
-
OrderPaymentCardComponent.prototype.refundHasMetadata = function (refund) {
|
|
2792
|
-
return !!refund && Object.keys(refund.metadata).length > 0;
|
|
2793
|
-
};
|
|
2794
|
-
OrderPaymentCardComponent.prototype.nextOtherStates = function () {
|
|
2795
|
-
if (!this.payment) {
|
|
2796
|
-
return [];
|
|
2797
|
-
}
|
|
2798
|
-
return this.payment.nextStates.filter(function (s) { return s !== 'Settled' && s !== 'Error'; });
|
|
2799
|
-
};
|
|
2800
|
-
return OrderPaymentCardComponent;
|
|
2801
|
-
}());
|
|
2802
|
-
OrderPaymentCardComponent.decorators = [
|
|
2803
|
-
{ type: i0.Component, args: [{
|
|
2804
|
-
selector: 'vdr-order-payment-card',
|
|
2805
|
-
template: "<div class=\"card\">\r\n <div class=\"card-header payment-header\">\r\n <div>\r\n {{ 'order.payment' | translate }}\r\n <ng-container *ngIf=\"payment.transactionId\">#{{ payment.transactionId }}</ng-container>\r\n </div>\r\n <div class=\"payment-state\">\r\n <vdr-payment-state-label [state]=\"payment.state\"></vdr-payment-state-label>\r\n </div>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-payment-detail [payment]=\"payment\" [currencyCode]=\"currencyCode\"></vdr-payment-detail>\r\n </div>\r\n <ng-container *ngFor=\"let refund of payment.refunds\">\r\n <div class=\"card-header payment-header\">\r\n <clr-icon shape=\"redo\" class=\"refund-icon\" dir=\"down\"></clr-icon>\r\n {{ 'order.refund' | translate }} #{{ refund.id }}\r\n <div class=\"clr-flex-fill\"></div>\r\n <vdr-refund-state-label [state]=\"refund.state\"></vdr-refund-state-label>\r\n </div>\r\n <div class=\"card-block\">\r\n <vdr-labeled-data [label]=\"'common.created-at' | translate\">\r\n {{ refund.createdAt | localeDate: 'medium' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refund-total' | translate\">\r\n {{ refund.total | localeCurrency: currencyCode }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.transaction-id' | translate\" *ngIf=\"refund.transactionId\">\r\n {{ refund.transactionId }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refund-reason' | translate\" *ngIf=\"refund.reason\">\r\n {{ refund.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.refund-metadata' | translate\" *ngIf=\"refundHasMetadata(refund)\">\r\n <vdr-object-tree [value]=\"refund.metadata\"></vdr-object-tree>\r\n </vdr-labeled-data>\r\n </div>\r\n <div class=\"card-footer\" *ngIf=\"refund.state === 'Pending'\">\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"settleRefund.emit(refund)\">\r\n {{ 'order.settle-refund' | translate }}\r\n </button>\r\n </div>\r\n </ng-container>\r\n <div class=\"card-footer\" *ngIf=\"payment.nextStates.length\">\r\n <button\r\n class=\"btn btn-sm btn-primary\"\r\n *ngIf=\"payment.nextStates.includes('Settled')\"\r\n (click)=\"settlePayment.emit(payment)\"\r\n >\r\n {{ 'order.settle-payment' | translate }}\r\n </button>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <ng-container *ngFor=\"let nextState of nextOtherStates()\">\r\n <button\r\n type=\"button\"\r\n class=\"btn\"\r\n vdrDropdownItem\r\n (click)=\"transitionPaymentState.emit({ payment: payment, state: nextState })\"\r\n >\r\n <ng-container *ngIf=\"nextState !== 'Cancelled'; else cancel\">\r\n <clr-icon shape=\"step-forward-2\"></clr-icon>\r\n {{\r\n 'order.transition-to-state'\r\n | translate: { state: (nextState | stateI18nToken | translate) }\r\n }}\r\n </ng-container>\r\n <ng-template #cancel>\r\n <clr-icon shape=\"error-standard\" class=\"is-error\"></clr-icon>\r\n {{ 'order.cancel-payment' | translate }}\r\n </ng-template>\r\n </button>\r\n </ng-container>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n</div>\r\n",
|
|
2806
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2807
|
-
styles: [".payment-header{display:flex;justify-content:space-between;align-items:center}.refund-icon{margin-right:6px;color:var(--color-grey-400)}.card-footer{display:flex;align-items:center;justify-content:flex-end}\n"]
|
|
2808
|
-
},] }
|
|
2809
|
-
];
|
|
2810
|
-
OrderPaymentCardComponent.propDecorators = {
|
|
2811
|
-
payment: [{ type: i0.Input }],
|
|
2812
|
-
currencyCode: [{ type: i0.Input }],
|
|
2813
|
-
settlePayment: [{ type: i0.Output }],
|
|
2814
|
-
transitionPaymentState: [{ type: i0.Output }],
|
|
2815
|
-
settleRefund: [{ type: i0.Output }]
|
|
2816
|
-
};
|
|
2817
|
-
|
|
2818
|
-
var NODE_HEIGHT = 72;
|
|
2819
|
-
|
|
2820
|
-
var OrderProcessEdgeComponent = /** @class */ (function () {
|
|
2821
|
-
function OrderProcessEdgeComponent() {
|
|
2822
|
-
}
|
|
2823
|
-
OrderProcessEdgeComponent.prototype.ngOnInit = function () {
|
|
2824
|
-
var _this = this;
|
|
2825
|
-
this.active$ = this.from.active$
|
|
2826
|
-
.asObservable()
|
|
2827
|
-
.pipe(operators.tap(function (active) { return _this.to.activeTarget$.next(active); }));
|
|
2828
|
-
};
|
|
2829
|
-
OrderProcessEdgeComponent.prototype.getStyle = function () {
|
|
2830
|
-
var direction = this.from.index < this.to.index ? 'down' : 'up';
|
|
2831
|
-
var startPos = this.from.getPos(direction === 'down' ? 'bottom' : 'top');
|
|
2832
|
-
var endPos = this.to.getPos(direction === 'down' ? 'top' : 'bottom');
|
|
2833
|
-
var dX = Math.abs(startPos.x - endPos.x);
|
|
2834
|
-
var dY = Math.abs(startPos.y - endPos.y);
|
|
2835
|
-
var length = Math.sqrt(Math.pow(dX, 2) + Math.pow(dY, 2));
|
|
2836
|
-
return Object.assign({ 'top.px': startPos.y, 'left.px': startPos.x + (direction === 'down' ? 10 : 40) + this.index * 12, 'height.px': length, 'width.px': 1 }, (direction === 'up'
|
|
2837
|
-
? {
|
|
2838
|
-
transform: 'rotateZ(180deg)',
|
|
2839
|
-
'transform-origin': 'top',
|
|
2840
|
-
}
|
|
2841
|
-
: {}));
|
|
2842
|
-
};
|
|
2843
|
-
return OrderProcessEdgeComponent;
|
|
2844
|
-
}());
|
|
2845
|
-
OrderProcessEdgeComponent.decorators = [
|
|
2846
|
-
{ type: i0.Component, args: [{
|
|
2847
|
-
selector: 'vdr-order-process-edge',
|
|
2848
|
-
template: "<div\r\n [attr.data-from]=\"from.node.name\"\r\n [attr.data-to]=\"to.node.name\"\r\n [ngStyle]=\"getStyle()\"\r\n [class.active]=\"active$ | async\"\r\n class=\"edge\">\r\n <clr-icon shape=\"arrow\" flip=\"vertical\" class=\"arrow\"></clr-icon>\r\n</div>\r\n",
|
|
2849
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2850
|
-
styles: [".edge{position:absolute;border:1px solid var(--color-component-border-200);background-color:var(--color-component-bg-300);opacity:.3;transition:border .2s,opacity .2s,background-color .2s}.edge.active{border-color:var(--color-primary-500);background-color:var(--color-primary-500);opacity:1}.edge.active .arrow{color:var(--color-primary-500)}.edge .arrow{position:absolute;bottom:-4px;left:-8px;color:var(--color-grey-300)}\n"]
|
|
2851
|
-
},] }
|
|
2852
|
-
];
|
|
2853
|
-
OrderProcessEdgeComponent.propDecorators = {
|
|
2854
|
-
from: [{ type: i0.Input }],
|
|
2855
|
-
to: [{ type: i0.Input }],
|
|
2856
|
-
index: [{ type: i0.Input }]
|
|
2857
|
-
};
|
|
2858
|
-
|
|
2859
|
-
var OrderProcessNodeComponent = /** @class */ (function () {
|
|
2860
|
-
function OrderProcessNodeComponent(elementRef) {
|
|
2861
|
-
this.elementRef = elementRef;
|
|
2862
|
-
this.active$ = new rxjs.BehaviorSubject(false);
|
|
2863
|
-
this.activeTarget$ = new rxjs.BehaviorSubject(false);
|
|
2864
|
-
this.isCancellable = false;
|
|
2865
|
-
// We use a class field here to prevent the
|
|
2866
|
-
// i18n extractor from extracting a "Cancelled" key
|
|
2867
|
-
this.cancelledState = 'Cancelled';
|
|
2868
|
-
}
|
|
2869
|
-
OrderProcessNodeComponent.prototype.ngOnChanges = function (changes) {
|
|
2870
|
-
this.isCancellable = !!this.node.to.find(function (s) { return s.name === 'Cancelled'; });
|
|
2871
|
-
if (changes.active) {
|
|
2872
|
-
this.active$.next(this.active);
|
|
2873
|
-
}
|
|
2874
|
-
};
|
|
2875
|
-
OrderProcessNodeComponent.prototype.getPos = function (origin) {
|
|
2876
|
-
if (origin === void 0) { origin = 'top'; }
|
|
2877
|
-
var _a, _b;
|
|
2878
|
-
var rect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
2879
|
-
var nodeHeight = (_b = (_a = this.elementRef.nativeElement.querySelector('.node')) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) !== null && _b !== void 0 ? _b : 0;
|
|
2880
|
-
return {
|
|
2881
|
-
x: 10,
|
|
2882
|
-
y: this.index * NODE_HEIGHT + (origin === 'bottom' ? nodeHeight : 0),
|
|
2883
|
-
};
|
|
2884
|
-
};
|
|
2885
|
-
OrderProcessNodeComponent.prototype.getStyle = function () {
|
|
2886
|
-
var pos = this.getPos();
|
|
2887
|
-
return {
|
|
2888
|
-
'top.px': pos.y,
|
|
2889
|
-
'left.px': pos.x,
|
|
2890
|
-
};
|
|
2891
|
-
};
|
|
2892
|
-
return OrderProcessNodeComponent;
|
|
2893
|
-
}());
|
|
2894
|
-
OrderProcessNodeComponent.decorators = [
|
|
2895
|
-
{ type: i0.Component, args: [{
|
|
2896
|
-
selector: 'vdr-order-process-node',
|
|
2897
|
-
template: "<div class=\"node-wrapper\" [ngStyle]=\"getStyle()\" [class.active]=\"active$ | async\">\r\n <div\r\n class=\"node\"\r\n [class.active-target]=\"activeTarget$ | async\"\r\n >\r\n {{ node.name | stateI18nToken | translate }}\r\n </div>\r\n <div class=\"cancelled-wrapper\" *ngIf=\"isCancellable\">\r\n <div class=\"cancelled-edge\">\r\n </div>\r\n <clr-icon shape=\"dot-circle\"></clr-icon>\r\n <div class=\"cancelled-node\">\r\n {{ cancelledState | stateI18nToken | translate }}\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2898
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2899
|
-
styles: [":host{display:block}.node-wrapper{position:absolute;z-index:1;display:flex;align-items:center}.node{display:inline-block;border:2px solid var(--color-component-border-200);border-radius:3px;padding:3px 6px;z-index:1;background-color:var(--color-component-bg-100);opacity:.7;transition:opacity .2s,background-color .2s,color .2s;cursor:default}.node.active-target{border-color:var(--color-primary-500);opacity:.9}.cancelled-wrapper{display:flex;align-items:center;color:var(--color-grey-300);transition:color .2s,opacity .2s;opacity:.7}.cancelled-edge{width:48px;height:2px;background-color:var(--color-component-bg-300);transition:background-color .2s}clr-icon{margin-left:-1px}.cancelled-node{margin-left:6px}.active .cancelled-wrapper{opacity:1}.active .node{opacity:1;background-color:var(--color-primary-600);border-color:var(--color-primary-600);color:var(--color-primary-100)}.active .cancelled-wrapper{color:var(--color-error-500)}.active .cancelled-edge{background-color:var(--color-error-500)}\n"]
|
|
2900
|
-
},] }
|
|
2901
|
-
];
|
|
2902
|
-
OrderProcessNodeComponent.ctorParameters = function () { return [
|
|
2903
|
-
{ type: i0.ElementRef }
|
|
2904
|
-
]; };
|
|
2905
|
-
OrderProcessNodeComponent.propDecorators = {
|
|
2906
|
-
node: [{ type: i0.Input }],
|
|
2907
|
-
index: [{ type: i0.Input }],
|
|
2908
|
-
active: [{ type: i0.Input }]
|
|
2909
|
-
};
|
|
2910
|
-
|
|
2911
|
-
var OrderProcessGraphComponent = /** @class */ (function () {
|
|
2912
|
-
function OrderProcessGraphComponent(changeDetector) {
|
|
2913
|
-
this.changeDetector = changeDetector;
|
|
2914
|
-
this.setActiveState$ = new rxjs.BehaviorSubject(undefined);
|
|
2915
|
-
this.nodes = [];
|
|
2916
|
-
this.edges = [];
|
|
2917
|
-
}
|
|
2918
|
-
Object.defineProperty(OrderProcessGraphComponent.prototype, "outerHeight", {
|
|
2919
|
-
get: function () {
|
|
2920
|
-
return this.nodes.length * NODE_HEIGHT;
|
|
2921
|
-
},
|
|
2922
|
-
enumerable: false,
|
|
2923
|
-
configurable: true
|
|
2924
|
-
});
|
|
2925
|
-
OrderProcessGraphComponent.prototype.ngOnInit = function () {
|
|
2926
|
-
this.setActiveState$.next(this.initialState);
|
|
2927
|
-
this.activeState$ = this.setActiveState$.pipe(operators.debounceTime(150));
|
|
2928
|
-
};
|
|
2929
|
-
OrderProcessGraphComponent.prototype.ngOnChanges = function (changes) {
|
|
2930
|
-
this.populateNodes();
|
|
2931
|
-
};
|
|
2932
|
-
OrderProcessGraphComponent.prototype.ngAfterViewInit = function () {
|
|
2933
|
-
var _this = this;
|
|
2934
|
-
setTimeout(function () { return _this.populateEdges(); });
|
|
2935
|
-
};
|
|
2936
|
-
OrderProcessGraphComponent.prototype.onMouseOver = function (stateName) {
|
|
2937
|
-
this.setActiveState$.next(stateName);
|
|
2938
|
-
};
|
|
2939
|
-
OrderProcessGraphComponent.prototype.onMouseOut = function () {
|
|
2940
|
-
this.setActiveState$.next(this.initialState);
|
|
2941
|
-
};
|
|
2942
|
-
OrderProcessGraphComponent.prototype.getNodeFor = function (state) {
|
|
2943
|
-
if (this.nodeComponents) {
|
|
2944
|
-
return this.nodeComponents.find(function (n) { return n.node.name === state; });
|
|
2945
|
-
}
|
|
2946
|
-
};
|
|
2947
|
-
OrderProcessGraphComponent.prototype.populateNodes = function () {
|
|
2948
|
-
var e_1, _c, e_2, _d;
|
|
2949
|
-
var _a, _b;
|
|
2950
|
-
var stateNodeMap = new Map();
|
|
2951
|
-
try {
|
|
2952
|
-
for (var _e = __values(this.states), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
2953
|
-
var state = _f.value;
|
|
2954
|
-
stateNodeMap.set(state.name, {
|
|
2955
|
-
name: state.name,
|
|
2956
|
-
to: [],
|
|
2957
|
-
});
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2961
|
-
finally {
|
|
2962
|
-
try {
|
|
2963
|
-
if (_f && !_f.done && (_c = _e.return)) _c.call(_e);
|
|
2964
|
-
}
|
|
2965
|
-
finally { if (e_1) throw e_1.error; }
|
|
2966
|
-
}
|
|
2967
|
-
var _loop_1 = function (name, stateNode) {
|
|
2968
|
-
var e_3, _k;
|
|
2969
|
-
var targets = (_b = (_a = this_1.states.find(function (s) { return s.name === name; })) === null || _a === void 0 ? void 0 : _a.to) !== null && _b !== void 0 ? _b : [];
|
|
2970
|
-
try {
|
|
2971
|
-
for (var targets_1 = (e_3 = void 0, __values(targets)), targets_1_1 = targets_1.next(); !targets_1_1.done; targets_1_1 = targets_1.next()) {
|
|
2972
|
-
var target = targets_1_1.value;
|
|
2973
|
-
var targetNode = stateNodeMap.get(target);
|
|
2974
|
-
if (targetNode) {
|
|
2975
|
-
stateNode.to.push(targetNode);
|
|
2976
|
-
}
|
|
2977
|
-
}
|
|
2978
|
-
}
|
|
2979
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
2980
|
-
finally {
|
|
2981
|
-
try {
|
|
2982
|
-
if (targets_1_1 && !targets_1_1.done && (_k = targets_1.return)) _k.call(targets_1);
|
|
2983
|
-
}
|
|
2984
|
-
finally { if (e_3) throw e_3.error; }
|
|
2985
|
-
}
|
|
2986
|
-
};
|
|
2987
|
-
var this_1 = this;
|
|
2988
|
-
try {
|
|
2989
|
-
for (var _g = __values(stateNodeMap.entries()), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
2990
|
-
var _j = __read(_h.value, 2), name = _j[0], stateNode = _j[1];
|
|
2991
|
-
_loop_1(name, stateNode);
|
|
2992
|
-
}
|
|
2993
|
-
}
|
|
2994
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2995
|
-
finally {
|
|
2996
|
-
try {
|
|
2997
|
-
if (_h && !_h.done && (_d = _g.return)) _d.call(_g);
|
|
2998
|
-
}
|
|
2999
|
-
finally { if (e_2) throw e_2.error; }
|
|
3000
|
-
}
|
|
3001
|
-
this.nodes = __spreadArray([], __read(stateNodeMap.values())).filter(function (n) { return n.name !== 'Cancelled'; });
|
|
3002
|
-
};
|
|
3003
|
-
OrderProcessGraphComponent.prototype.populateEdges = function () {
|
|
3004
|
-
var e_4, _c, e_5, _d;
|
|
3005
|
-
try {
|
|
3006
|
-
for (var _e = __values(this.nodes), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
3007
|
-
var node = _f.value;
|
|
3008
|
-
var nodeCmp = this.getNodeFor(node.name);
|
|
3009
|
-
var index = 0;
|
|
3010
|
-
try {
|
|
3011
|
-
for (var _g = (e_5 = void 0, __values(node.to)), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
3012
|
-
var to = _h.value;
|
|
3013
|
-
var toCmp = this.getNodeFor(to.name);
|
|
3014
|
-
if (nodeCmp && toCmp && nodeCmp !== toCmp) {
|
|
3015
|
-
this.edges.push({
|
|
3016
|
-
to: toCmp,
|
|
3017
|
-
from: nodeCmp,
|
|
3018
|
-
index: index,
|
|
3019
|
-
});
|
|
3020
|
-
index++;
|
|
3021
|
-
}
|
|
3022
|
-
}
|
|
3023
|
-
}
|
|
3024
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
3025
|
-
finally {
|
|
3026
|
-
try {
|
|
3027
|
-
if (_h && !_h.done && (_d = _g.return)) _d.call(_g);
|
|
3028
|
-
}
|
|
3029
|
-
finally { if (e_5) throw e_5.error; }
|
|
3030
|
-
}
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
3034
|
-
finally {
|
|
3035
|
-
try {
|
|
3036
|
-
if (_f && !_f.done && (_c = _e.return)) _c.call(_e);
|
|
3037
|
-
}
|
|
3038
|
-
finally { if (e_4) throw e_4.error; }
|
|
3039
|
-
}
|
|
3040
|
-
this.edges = __spreadArray([], __read(this.edges));
|
|
3041
|
-
this.changeDetector.markForCheck();
|
|
3042
|
-
};
|
|
3043
|
-
return OrderProcessGraphComponent;
|
|
3044
|
-
}());
|
|
3045
|
-
OrderProcessGraphComponent.decorators = [
|
|
3046
|
-
{ type: i0.Component, args: [{
|
|
3047
|
-
selector: 'vdr-order-process-graph',
|
|
3048
|
-
template: "<ng-container *ngFor=\"let state of nodes; let i = index\">\r\n <vdr-order-process-node\r\n [node]=\"state\"\r\n [index]=\"i\"\r\n [active]=\"(activeState$ | async) === state.name\"\r\n (mouseenter)=\"onMouseOver(state.name)\"\r\n (mouseleave)=\"onMouseOut()\"\r\n ></vdr-order-process-node>\r\n</ng-container>\r\n<ng-container *ngFor=\"let edge of edges\">\r\n <vdr-order-process-edge [from]=\"edge.from\" [to]=\"edge.to\" [index]=\"edge.index\"></vdr-order-process-edge>\r\n</ng-container>\r\n",
|
|
3049
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3050
|
-
styles: [":host{display:block;border:1px hotpink;margin:20px;padding:12px;position:relative}.state-row{display:flex}\n"]
|
|
3051
|
-
},] }
|
|
3052
|
-
];
|
|
3053
|
-
OrderProcessGraphComponent.ctorParameters = function () { return [
|
|
3054
|
-
{ type: i0.ChangeDetectorRef }
|
|
3055
|
-
]; };
|
|
3056
|
-
OrderProcessGraphComponent.propDecorators = {
|
|
3057
|
-
states: [{ type: i0.Input }],
|
|
3058
|
-
initialState: [{ type: i0.Input }],
|
|
3059
|
-
nodeComponents: [{ type: i0.ViewChildren, args: [OrderProcessNodeComponent,] }],
|
|
3060
|
-
outerHeight: [{ type: i0.HostBinding, args: ['style.height.px',] }]
|
|
3061
|
-
};
|
|
3062
|
-
|
|
3063
|
-
var OrderTableComponent = /** @class */ (function () {
|
|
3064
|
-
function OrderTableComponent() {
|
|
3065
|
-
this.orderLineCustomFieldsVisible = false;
|
|
3066
|
-
this.customFieldsForLine = {};
|
|
3067
|
-
}
|
|
3068
|
-
Object.defineProperty(OrderTableComponent.prototype, "visibleOrderLineCustomFields", {
|
|
3069
|
-
get: function () {
|
|
3070
|
-
return this.orderLineCustomFieldsVisible ? this.orderLineCustomFields : [];
|
|
3071
|
-
},
|
|
3072
|
-
enumerable: false,
|
|
3073
|
-
configurable: true
|
|
3074
|
-
});
|
|
3075
|
-
Object.defineProperty(OrderTableComponent.prototype, "showElided", {
|
|
3076
|
-
get: function () {
|
|
3077
|
-
return !this.orderLineCustomFieldsVisible && 0 < this.orderLineCustomFields.length;
|
|
3078
|
-
},
|
|
3079
|
-
enumerable: false,
|
|
3080
|
-
configurable: true
|
|
3081
|
-
});
|
|
3082
|
-
OrderTableComponent.prototype.ngOnInit = function () {
|
|
3083
|
-
this.orderLineCustomFieldsVisible = this.orderLineCustomFields.length < 2;
|
|
3084
|
-
this.getLineCustomFields();
|
|
3085
|
-
};
|
|
3086
|
-
OrderTableComponent.prototype.toggleOrderLineCustomFields = function () {
|
|
3087
|
-
this.orderLineCustomFieldsVisible = !this.orderLineCustomFieldsVisible;
|
|
3088
|
-
};
|
|
3089
|
-
OrderTableComponent.prototype.getLineDiscounts = function (line) {
|
|
3090
|
-
return line.discounts.filter(function (a) { return a.type === i1.AdjustmentType.PROMOTION; });
|
|
3091
|
-
};
|
|
3092
|
-
OrderTableComponent.prototype.getLineCustomFields = function () {
|
|
3093
|
-
var e_1, _a;
|
|
3094
|
-
var _this = this;
|
|
3095
|
-
var _loop_1 = function (line) {
|
|
3096
|
-
var formGroup = new forms.FormGroup({});
|
|
3097
|
-
var result = this_1.orderLineCustomFields
|
|
3098
|
-
.map(function (config) {
|
|
3099
|
-
var value = line.customFields[config.name];
|
|
3100
|
-
formGroup.addControl(config.name, new forms.FormControl(value));
|
|
3101
|
-
return {
|
|
3102
|
-
config: config,
|
|
3103
|
-
formGroup: formGroup,
|
|
3104
|
-
value: value,
|
|
3105
|
-
};
|
|
3106
|
-
})
|
|
3107
|
-
.filter(function (field) {
|
|
3108
|
-
return _this.orderLineCustomFieldsVisible ? true : field.value != null;
|
|
3109
|
-
});
|
|
3110
|
-
this_1.customFieldsForLine[line.id] = result;
|
|
3111
|
-
};
|
|
3112
|
-
var this_1 = this;
|
|
3113
|
-
try {
|
|
3114
|
-
for (var _b = __values(this.order.lines), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3115
|
-
var line = _c.value;
|
|
3116
|
-
_loop_1(line);
|
|
3117
|
-
}
|
|
3118
|
-
}
|
|
3119
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3120
|
-
finally {
|
|
3121
|
-
try {
|
|
3122
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3123
|
-
}
|
|
3124
|
-
finally { if (e_1) throw e_1.error; }
|
|
3125
|
-
}
|
|
3126
|
-
};
|
|
3127
|
-
OrderTableComponent.prototype.getPromotionLink = function (promotion) {
|
|
3128
|
-
var id = promotion.adjustmentSource.split(':')[1];
|
|
3129
|
-
return ['/marketing', 'promotions', id];
|
|
3130
|
-
};
|
|
3131
|
-
OrderTableComponent.prototype.getCouponCodeForAdjustment = function (order, promotionAdjustment) {
|
|
3132
|
-
var id = promotionAdjustment.adjustmentSource.split(':')[1];
|
|
3133
|
-
var promotion = order.promotions.find(function (p) { return p.id === id; });
|
|
3134
|
-
if (promotion) {
|
|
3135
|
-
return promotion.couponCode || undefined;
|
|
3136
|
-
}
|
|
3137
|
-
};
|
|
3138
|
-
OrderTableComponent.prototype.getShippingNames = function (order) {
|
|
3139
|
-
if (order.shippingLines.length) {
|
|
3140
|
-
return order.shippingLines.map(function (shippingLine) { return shippingLine.shippingMethod.name; }).join(', ');
|
|
3141
|
-
}
|
|
3142
|
-
else {
|
|
3143
|
-
return '';
|
|
3144
|
-
}
|
|
3145
|
-
};
|
|
3146
|
-
return OrderTableComponent;
|
|
3147
|
-
}());
|
|
3148
|
-
OrderTableComponent.decorators = [
|
|
3149
|
-
{ type: i0.Component, args: [{
|
|
3150
|
-
selector: 'vdr-order-table',
|
|
3151
|
-
template: "<table class=\"order-table table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let line of order.lines\">\r\n <tr class=\"order-line\" [class.is-cancelled]=\"line.quantity === 0\">\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle unit-price\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.quantity }}\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment [line]=\"line\" [orderState]=\"order.state\"></vdr-line-fulfillment>\r\n </td>\r\n <td class=\"align-middle total\">\r\n {{ line.linePriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.linePrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n\r\n <ng-container *ngIf=\"getLineDiscounts(line) as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n {{ 'order.promotions-applied' | translate }}\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n <a class=\"promotion-name\" [routerLink]=\"getPromotionLink(discount)\">{{\r\n discount.description\r\n }}</a>\r\n <div class=\"promotion-amount\">\r\n {{ discount.amountWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency: order.currencyCode }}\r\n </div>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"customFieldsForLine[line.id] as customFields\">\r\n <tr *ngIf=\"customFields.length\">\r\n <td colspan=\"6\" class=\"custom-fields-row\">\r\n <div class=\"order-line-custom-fields\">\r\n <div class=\"custom-field\" *ngFor=\"let field of customFields\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [readonly]=\"true\"\r\n [customField]=\"field.config\"\r\n [customFieldsFormGroup]=\"field.formGroup\"\r\n ></vdr-custom-field-control>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\r\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\" colspan=\"2\"></td>\r\n <td class=\"align-middle total\">\r\n {{ surcharge.priceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surcharge.price | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <ng-container *ngFor=\"let discount of order.discounts\">\r\n <tr class=\"order-adjustment\" *ngIf=\"discount.type !== 'OTHER'\">\r\n <td colspan=\"5\" class=\"left clr-align-middle\">\r\n <a [routerLink]=\"getPromotionLink(discount)\">{{ discount.description }}</a>\r\n <vdr-chip *ngIf=\"getCouponCodeForAdjustment(order, discount) as couponCode\">{{\r\n couponCode\r\n }}</vdr-chip>\r\n </td>\r\n <td class=\"clr-align-middle\">\r\n {{ discount.amountWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"sub-total\">\r\n <td class=\"left clr-align-middle\">{{ 'order.sub-total' | translate }}</td>\r\n <td colspan=\"4\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.subTotalWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.subTotal | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr class=\"shipping\">\r\n <td class=\"left clr-align-middle\">{{ 'order.shipping' | translate }}</td>\r\n <td class=\"clr-align-middle\">{{ getShippingNames(order) }}</td>\r\n <td colspan=\"3\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.shippingWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.shipping | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr class=\"total\">\r\n <td class=\"left clr-align-middle\">{{ 'order.total' | translate }}</td>\r\n <td colspan=\"4\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.totalWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.total | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n</table>\r\n",
|
|
3152
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3153
|
-
styles: [".order-table .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.order-table .sub-total td{border-top:1px dashed var(--color-component-border-200)}.order-table .total td{font-weight:bold;border-top:1px dashed var(--color-component-border-200)}.order-table td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}.order-table .order-line-custom-fields{display:flex;flex-wrap:wrap}.order-table .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-right:18px}.order-table .order-line-custom-field{background-color:var(--color-component-bg-100)}.order-table .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}.order-table .net-price{font-size:11px;color:var(--color-text-300)}.order-table .promotions-label{-webkit-text-decoration:underline dotted var(--color-text-200);text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}.order-table .thumb img{width:50px;height:50px}::ng-deep .line-promotion{display:flex;justify-content:space-between;padding:6px 12px}::ng-deep .line-promotion .promotion-amount{margin-left:12px}::ng-deep .line-promotion .net-price{font-size:11px;color:var(--color-text-300)}\n"]
|
|
3154
|
-
},] }
|
|
3155
|
-
];
|
|
3156
|
-
OrderTableComponent.propDecorators = {
|
|
3157
|
-
order: [{ type: i0.Input }],
|
|
3158
|
-
orderLineCustomFields: [{ type: i0.Input }]
|
|
3159
|
-
};
|
|
3160
|
-
|
|
3161
|
-
var PaymentDetailComponent = /** @class */ (function () {
|
|
3162
|
-
function PaymentDetailComponent() {
|
|
3163
|
-
}
|
|
3164
|
-
return PaymentDetailComponent;
|
|
3165
|
-
}());
|
|
3166
|
-
PaymentDetailComponent.decorators = [
|
|
3167
|
-
{ type: i0.Component, args: [{
|
|
3168
|
-
selector: 'vdr-payment-detail',
|
|
3169
|
-
template: "<vdr-labeled-data [label]=\"'order.payment-method' | translate\">\r\n {{ payment.method }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.amount' | translate\">\r\n {{ payment.amount | localeCurrency: currencyCode }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"payment.errorMessage\" [label]=\"'order.error-message' | translate\">\r\n {{ payment.errorMessage }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data *ngIf=\"payment.transactionId\" [label]=\"'order.transaction-id' | translate\">\r\n {{ payment.transactionId }}\r\n</vdr-labeled-data>\r\n<vdr-labeled-data [label]=\"'order.payment-metadata' | translate\">\r\n <vdr-object-tree [value]=\"payment.metadata\"></vdr-object-tree>\r\n</vdr-labeled-data>\r\n",
|
|
3170
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3171
|
-
styles: [""]
|
|
3172
|
-
},] }
|
|
3173
|
-
];
|
|
3174
|
-
PaymentDetailComponent.propDecorators = {
|
|
3175
|
-
payment: [{ type: i0.Input }],
|
|
3176
|
-
currencyCode: [{ type: i0.Input }]
|
|
3177
|
-
};
|
|
3178
|
-
|
|
3179
|
-
var PaymentStateLabelComponent = /** @class */ (function () {
|
|
3180
|
-
function PaymentStateLabelComponent() {
|
|
3181
|
-
}
|
|
3182
|
-
Object.defineProperty(PaymentStateLabelComponent.prototype, "chipColorType", {
|
|
3183
|
-
get: function () {
|
|
3184
|
-
switch (this.state) {
|
|
3185
|
-
case 'Authorized':
|
|
3186
|
-
return 'warning';
|
|
3187
|
-
case 'Settled':
|
|
3188
|
-
return 'success';
|
|
3189
|
-
case 'Declined':
|
|
3190
|
-
case 'Cancelled':
|
|
3191
|
-
return 'error';
|
|
3192
|
-
}
|
|
3193
|
-
},
|
|
3194
|
-
enumerable: false,
|
|
3195
|
-
configurable: true
|
|
3196
|
-
});
|
|
3197
|
-
return PaymentStateLabelComponent;
|
|
3198
|
-
}());
|
|
3199
|
-
PaymentStateLabelComponent.decorators = [
|
|
3200
|
-
{ type: i0.Component, args: [{
|
|
3201
|
-
selector: 'vdr-payment-state-label',
|
|
3202
|
-
template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n",
|
|
3203
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3204
|
-
styles: [":host{font-size:14px}\n"]
|
|
3205
|
-
},] }
|
|
3206
|
-
];
|
|
3207
|
-
PaymentStateLabelComponent.propDecorators = {
|
|
3208
|
-
state: [{ type: i0.Input }]
|
|
3209
|
-
};
|
|
3210
|
-
|
|
3211
|
-
var RefundStateLabelComponent = /** @class */ (function () {
|
|
3212
|
-
function RefundStateLabelComponent() {
|
|
3213
|
-
}
|
|
3214
|
-
Object.defineProperty(RefundStateLabelComponent.prototype, "chipColorType", {
|
|
3215
|
-
get: function () {
|
|
3216
|
-
switch (this.state) {
|
|
3217
|
-
case 'Pending':
|
|
3218
|
-
return 'warning';
|
|
3219
|
-
case 'Settled':
|
|
3220
|
-
return 'success';
|
|
3221
|
-
case 'Failed':
|
|
3222
|
-
return 'error';
|
|
3223
|
-
}
|
|
3224
|
-
},
|
|
3225
|
-
enumerable: false,
|
|
3226
|
-
configurable: true
|
|
3227
|
-
});
|
|
3228
|
-
return RefundStateLabelComponent;
|
|
3229
|
-
}());
|
|
3230
|
-
RefundStateLabelComponent.decorators = [
|
|
3231
|
-
{ type: i0.Component, args: [{
|
|
3232
|
-
selector: 'vdr-refund-state-label',
|
|
3233
|
-
template: "<vdr-chip [title]=\"'order.payment-state' | translate\" [colorType]=\"chipColorType\">\r\n <clr-icon shape=\"check-circle\" *ngIf=\"state === 'Settled'\"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n</vdr-chip>\r\n",
|
|
3234
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3235
|
-
styles: [":host{font-size:14px}\n"]
|
|
3236
|
-
},] }
|
|
3237
|
-
];
|
|
3238
|
-
RefundStateLabelComponent.propDecorators = {
|
|
3239
|
-
state: [{ type: i0.Input }]
|
|
3240
|
-
};
|
|
3241
|
-
|
|
3242
|
-
var SimpleItemListComponent = /** @class */ (function () {
|
|
3243
|
-
function SimpleItemListComponent() {
|
|
3244
|
-
}
|
|
3245
|
-
return SimpleItemListComponent;
|
|
3246
|
-
}());
|
|
3247
|
-
SimpleItemListComponent.decorators = [
|
|
3248
|
-
{ type: i0.Component, args: [{
|
|
3249
|
-
selector: 'vdr-simple-item-list',
|
|
3250
|
-
template: "<div class=\"items-list\">\r\n <ul>\r\n <li *ngFor=\"let item of items\" [title]=\"item.name\">\r\n <div class=\"quantity\">{{ item.quantity }}</div>\r\n <clr-icon shape=\"times\" size=\"12\"></clr-icon>\r\n {{ item.name }}\r\n </li>\r\n </ul>\r\n</div>\r\n",
|
|
3251
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3252
|
-
styles: [".items-list{font-size:12px}.items-list ul{margin-top:6px;list-style-type:none;margin-left:2px}.items-list ul li{line-height:14px;text-overflow:ellipsis;overflow:hidden}.items-list .quantity{min-width:16px;display:inline-block}\n"]
|
|
3253
|
-
},] }
|
|
3254
|
-
];
|
|
3255
|
-
SimpleItemListComponent.propDecorators = {
|
|
3256
|
-
items: [{ type: i0.Input }]
|
|
3257
|
-
};
|
|
3258
|
-
|
|
3259
|
-
/**
|
|
3260
|
-
* Resolves the id from the path into a Customer entity.
|
|
3261
|
-
*/
|
|
3262
|
-
var OrderResolver = /** @class */ (function (_super) {
|
|
3263
|
-
__extends(OrderResolver, _super);
|
|
3264
|
-
function OrderResolver(router, dataService) {
|
|
3265
|
-
return _super.call(this, router, {
|
|
3266
|
-
__typename: 'Order',
|
|
3267
|
-
id: '',
|
|
3268
|
-
code: '',
|
|
3269
|
-
createdAt: '',
|
|
3270
|
-
updatedAt: '',
|
|
3271
|
-
total: 0,
|
|
3272
|
-
}, function (id) { return dataService.order.getOrder(id).mapStream(function (data) { return data.order; }); }) || this;
|
|
3273
|
-
}
|
|
3274
|
-
return OrderResolver;
|
|
3275
|
-
}(i1.BaseEntityResolver));
|
|
3276
|
-
OrderResolver.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function OrderResolver_Factory() { return new OrderResolver(i0__namespace.ɵɵinject(i1__namespace$1.Router), i0__namespace.ɵɵinject(i1__namespace.DataService)); }, token: OrderResolver, providedIn: "root" });
|
|
3277
|
-
OrderResolver.decorators = [
|
|
3278
|
-
{ type: i0.Injectable, args: [{
|
|
3279
|
-
providedIn: 'root',
|
|
3280
|
-
},] }
|
|
3281
|
-
];
|
|
3282
|
-
OrderResolver.ctorParameters = function () { return [
|
|
3283
|
-
{ type: i1$1.Router },
|
|
3284
|
-
{ type: i1.DataService }
|
|
3285
|
-
]; };
|
|
3286
|
-
|
|
3287
|
-
var ɵ0 = {
|
|
3288
|
-
breadcrumb: ngxTranslateExtractMarker.marker('breadcrumb.orders'),
|
|
3289
|
-
}, ɵ1 = {
|
|
3290
|
-
breadcrumb: orderBreadcrumb,
|
|
3291
|
-
}, ɵ2 = {
|
|
3292
|
-
breadcrumb: modifyingOrderBreadcrumb,
|
|
3293
|
-
};
|
|
3294
|
-
var orderRoutes = [
|
|
3295
|
-
{
|
|
3296
|
-
path: '',
|
|
3297
|
-
component: OrderListComponent,
|
|
3298
|
-
data: ɵ0,
|
|
3299
|
-
},
|
|
3300
|
-
{
|
|
3301
|
-
path: ':id',
|
|
3302
|
-
component: OrderDetailComponent,
|
|
3303
|
-
resolve: i1.createResolveData(OrderResolver),
|
|
3304
|
-
canDeactivate: [i1.CanDeactivateDetailGuard],
|
|
3305
|
-
data: ɵ1,
|
|
3306
|
-
},
|
|
3307
|
-
{
|
|
3308
|
-
path: ':id/modify',
|
|
3309
|
-
component: OrderEditorComponent,
|
|
3310
|
-
resolve: i1.createResolveData(OrderResolver),
|
|
3311
|
-
// canDeactivate: [CanDeactivateDetailGuard],
|
|
3312
|
-
data: ɵ2,
|
|
3313
|
-
},
|
|
3314
|
-
];
|
|
3315
|
-
function orderBreadcrumb(data, params) {
|
|
3316
|
-
return i1.detailBreadcrumb({
|
|
3317
|
-
entity: data.entity,
|
|
3318
|
-
id: params.id,
|
|
3319
|
-
breadcrumbKey: 'breadcrumb.orders',
|
|
3320
|
-
getName: function (order) { return order.code; },
|
|
3321
|
-
route: '',
|
|
3322
|
-
});
|
|
3323
|
-
}
|
|
3324
|
-
function modifyingOrderBreadcrumb(data, params) {
|
|
3325
|
-
return orderBreadcrumb(data, params).pipe(operators.map(function (breadcrumbs) {
|
|
3326
|
-
var modifiedBreadcrumbs = breadcrumbs.slice();
|
|
3327
|
-
modifiedBreadcrumbs[0].link[0] = '../';
|
|
3328
|
-
modifiedBreadcrumbs[1].link[0] = '../orders';
|
|
3329
|
-
return modifiedBreadcrumbs.concat({ label: ngxTranslateExtractMarker.marker('breadcrumb.modifying'), link: [''] });
|
|
3330
|
-
}));
|
|
3331
|
-
}
|
|
3332
|
-
|
|
3333
|
-
var OrderModule = /** @class */ (function () {
|
|
3334
|
-
function OrderModule() {
|
|
3335
|
-
}
|
|
3336
|
-
return OrderModule;
|
|
3337
|
-
}());
|
|
3338
|
-
OrderModule.decorators = [
|
|
3339
|
-
{ type: i0.NgModule, args: [{
|
|
3340
|
-
imports: [i1.SharedModule, i1$1.RouterModule.forChild(orderRoutes)],
|
|
3341
|
-
declarations: [
|
|
3342
|
-
OrderListComponent,
|
|
3343
|
-
OrderDetailComponent,
|
|
3344
|
-
FulfillOrderDialogComponent,
|
|
3345
|
-
LineFulfillmentComponent,
|
|
3346
|
-
RefundOrderDialogComponent,
|
|
3347
|
-
CancelOrderDialogComponent,
|
|
3348
|
-
PaymentStateLabelComponent,
|
|
3349
|
-
LineRefundsComponent,
|
|
3350
|
-
OrderPaymentCardComponent,
|
|
3351
|
-
RefundStateLabelComponent,
|
|
3352
|
-
SettleRefundDialogComponent,
|
|
3353
|
-
OrderHistoryComponent,
|
|
3354
|
-
FulfillmentDetailComponent,
|
|
3355
|
-
PaymentDetailComponent,
|
|
3356
|
-
SimpleItemListComponent,
|
|
3357
|
-
OrderCustomFieldsCardComponent,
|
|
3358
|
-
OrderProcessGraphComponent,
|
|
3359
|
-
OrderProcessNodeComponent,
|
|
3360
|
-
OrderProcessEdgeComponent,
|
|
3361
|
-
OrderProcessGraphDialogComponent,
|
|
3362
|
-
FulfillmentStateLabelComponent,
|
|
3363
|
-
FulfillmentCardComponent,
|
|
3364
|
-
OrderEditorComponent,
|
|
3365
|
-
OrderTableComponent,
|
|
3366
|
-
OrderEditsPreviewDialogComponent,
|
|
3367
|
-
ModificationDetailComponent,
|
|
3368
|
-
AddManualPaymentDialogComponent,
|
|
3369
|
-
OrderStateSelectDialogComponent,
|
|
3370
|
-
],
|
|
3371
|
-
},] }
|
|
3372
|
-
];
|
|
3373
|
-
|
|
3374
|
-
// This file was generated by the build-public-api.ts script
|
|
3375
|
-
|
|
3376
|
-
/**
|
|
3377
|
-
* Generated bundle index. Do not edit.
|
|
3378
|
-
*/
|
|
3379
|
-
|
|
3380
|
-
exports.AddManualPaymentDialogComponent = AddManualPaymentDialogComponent;
|
|
3381
|
-
exports.CancelOrderDialogComponent = CancelOrderDialogComponent;
|
|
3382
|
-
exports.FulfillOrderDialogComponent = FulfillOrderDialogComponent;
|
|
3383
|
-
exports.FulfillmentCardComponent = FulfillmentCardComponent;
|
|
3384
|
-
exports.FulfillmentDetailComponent = FulfillmentDetailComponent;
|
|
3385
|
-
exports.FulfillmentStateLabelComponent = FulfillmentStateLabelComponent;
|
|
3386
|
-
exports.LineFulfillmentComponent = LineFulfillmentComponent;
|
|
3387
|
-
exports.LineRefundsComponent = LineRefundsComponent;
|
|
3388
|
-
exports.ModificationDetailComponent = ModificationDetailComponent;
|
|
3389
|
-
exports.NODE_HEIGHT = NODE_HEIGHT;
|
|
3390
|
-
exports.OrderCustomFieldsCardComponent = OrderCustomFieldsCardComponent;
|
|
3391
|
-
exports.OrderDetailComponent = OrderDetailComponent;
|
|
3392
|
-
exports.OrderEditorComponent = OrderEditorComponent;
|
|
3393
|
-
exports.OrderEditsPreviewDialogComponent = OrderEditsPreviewDialogComponent;
|
|
3394
|
-
exports.OrderHistoryComponent = OrderHistoryComponent;
|
|
3395
|
-
exports.OrderListComponent = OrderListComponent;
|
|
3396
|
-
exports.OrderModule = OrderModule;
|
|
3397
|
-
exports.OrderPaymentCardComponent = OrderPaymentCardComponent;
|
|
3398
|
-
exports.OrderProcessEdgeComponent = OrderProcessEdgeComponent;
|
|
3399
|
-
exports.OrderProcessGraphComponent = OrderProcessGraphComponent;
|
|
3400
|
-
exports.OrderProcessGraphDialogComponent = OrderProcessGraphDialogComponent;
|
|
3401
|
-
exports.OrderProcessNodeComponent = OrderProcessNodeComponent;
|
|
3402
|
-
exports.OrderResolver = OrderResolver;
|
|
3403
|
-
exports.OrderStateSelectDialogComponent = OrderStateSelectDialogComponent;
|
|
3404
|
-
exports.OrderTableComponent = OrderTableComponent;
|
|
3405
|
-
exports.OrderTransitionService = OrderTransitionService;
|
|
3406
|
-
exports.PaymentDetailComponent = PaymentDetailComponent;
|
|
3407
|
-
exports.PaymentStateLabelComponent = PaymentStateLabelComponent;
|
|
3408
|
-
exports.RefundOrderDialogComponent = RefundOrderDialogComponent;
|
|
3409
|
-
exports.RefundStateLabelComponent = RefundStateLabelComponent;
|
|
3410
|
-
exports.SettleRefundDialogComponent = SettleRefundDialogComponent;
|
|
3411
|
-
exports.SimpleItemListComponent = SimpleItemListComponent;
|
|
3412
|
-
exports.modifyingOrderBreadcrumb = modifyingOrderBreadcrumb;
|
|
3413
|
-
exports.orderBreadcrumb = orderBreadcrumb;
|
|
3414
|
-
exports.orderRoutes = orderRoutes;
|
|
3415
|
-
exports.ɵ0 = ɵ0;
|
|
3416
|
-
exports.ɵ1 = ɵ1;
|
|
3417
|
-
exports.ɵ2 = ɵ2;
|
|
3418
|
-
|
|
3419
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3420
|
-
|
|
3421
|
-
})));
|
|
3422
|
-
//# sourceMappingURL=vendure-admin-ui-order.umd.js.map
|