@vendure/admin-ui 1.4.7 → 2.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/catalog.module.d.ts +30 -0
- package/catalog/components/apply-facet-dialog/apply-facet-dialog.component.d.ts +5 -2
- package/catalog/components/asset-detail/asset-detail.component.d.ts +6 -4
- package/catalog/components/asset-list/asset-list.component.d.ts +5 -2
- package/catalog/components/{product-assets/product-assets.component.d.ts → assets/assets.component.d.ts} +7 -10
- package/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.d.ts +9 -7
- package/catalog/components/collection-contents/collection-contents.component.d.ts +5 -3
- package/catalog/components/collection-detail/collection-detail.component.d.ts +6 -3
- package/catalog/components/collection-list/collection-list.component.d.ts +6 -3
- package/catalog/components/collection-tree/collection-tree-node.component.d.ts +7 -3
- package/catalog/components/collection-tree/collection-tree.component.d.ts +10 -25
- package/catalog/components/collection-tree/collection-tree.service.d.ts +33 -0
- package/catalog/components/collection-tree/collection-tree.types.d.ts +7 -0
- package/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.d.ts +5 -2
- package/catalog/components/facet-detail/facet-detail.component.d.ts +7 -4
- package/catalog/components/facet-list/facet-list.component.d.ts +6 -3
- package/catalog/components/generate-product-variants/generate-product-variants.component.d.ts +3 -0
- package/catalog/components/option-value-input/option-value-input.component.d.ts +3 -0
- package/catalog/components/product-detail/product-detail.component.d.ts +17 -37
- package/catalog/components/product-detail/product-detail.types.d.ts +26 -0
- package/catalog/components/product-list/product-list.component.d.ts +6 -3
- package/catalog/components/product-options-editor/product-options-editor.component.d.ts +9 -4
- package/catalog/components/product-search-input/product-search-input.component.d.ts +9 -4
- package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +5 -2
- package/catalog/components/product-variants-list/product-variants-list.component.d.ts +24 -17
- package/catalog/components/product-variants-table/product-variants-table.component.d.ts +24 -11
- package/catalog/components/update-product-option-dialog/update-product-option-dialog.component.d.ts +5 -2
- package/catalog/components/variant-price-detail/variant-price-detail.component.d.ts +3 -0
- package/catalog/package.json +5 -6
- package/catalog/providers/product-detail/product-detail.service.d.ts +214 -93
- package/catalog/providers/routing/asset-resolver.d.ts +5 -3
- package/catalog/providers/routing/collection-resolver.d.ts +5 -2
- package/catalog/providers/routing/facet-resolver.d.ts +5 -4
- package/catalog/providers/routing/product-resolver.d.ts +5 -2
- package/catalog/providers/routing/product-variants-resolver.d.ts +5 -2
- package/catalog/public_api.d.ts +4 -1
- package/catalog/vendure-admin-ui-catalog.d.ts +1 -0
- package/core/app.component.d.ts +3 -0
- package/core/app.component.module.d.ts +7 -0
- package/core/common/base-detail.component.d.ts +2 -2
- package/core/common/base-entity-resolver.d.ts +1 -1
- package/core/common/base-list.component.d.ts +10 -0
- package/core/common/generated-types.d.ts +12045 -4197
- package/core/common/utilities/flatten-facet-values.d.ts +2 -2
- package/core/common/version.d.ts +1 -1
- package/core/components/app-shell/app-shell.component.d.ts +3 -0
- package/core/components/breadcrumb/breadcrumb.component.d.ts +3 -0
- package/core/components/channel-switcher/channel-switcher.component.d.ts +3 -0
- package/core/components/main-nav/main-nav.component.d.ts +3 -0
- package/core/components/notification/notification.component.d.ts +3 -0
- package/core/components/overlay-host/overlay-host.component.d.ts +3 -0
- package/core/components/theme-switcher/theme-switcher.component.d.ts +3 -0
- package/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +4 -1
- package/core/components/user-menu/user-menu.component.d.ts +3 -0
- package/core/core.module.d.ts +18 -0
- package/core/data/client-state/client-defaults.d.ts +19 -7
- package/core/data/data.module.d.ts +6 -0
- package/core/data/definitions/administrator-definitions.d.ts +15 -15
- package/core/data/definitions/auth-definitions.d.ts +4 -4
- package/core/data/definitions/client-definitions.d.ts +16 -16
- package/core/data/definitions/collection-definitions.d.ts +9 -9
- package/core/data/definitions/customer-definitions.d.ts +22 -21
- package/core/data/definitions/facet-definitions.d.ts +10 -10
- package/core/data/definitions/order-definitions.d.ts +25 -25
- package/core/data/definitions/product-definitions.d.ts +44 -44
- package/core/data/definitions/promotion-definitions.d.ts +7 -7
- package/core/data/definitions/settings-definitions.d.ts +65 -65
- package/core/data/definitions/shared-definitions.d.ts +3 -3
- package/core/data/definitions/shipping-definitions.d.ts +9 -9
- package/core/data/providers/administrator-data.service.d.ts +15 -15
- package/core/data/providers/auth-data.service.d.ts +4 -3
- package/core/data/providers/base-data.service.d.ts +3 -0
- package/core/data/providers/client-data.service.d.ts +15 -14
- package/core/data/providers/collection-data.service.d.ts +11 -11
- package/core/data/providers/customer-data.service.d.ts +25 -24
- package/core/data/providers/data.service.d.ts +5 -2
- package/core/data/providers/facet-data.service.d.ts +12 -12
- package/core/data/providers/fetch-adapter.d.ts +3 -0
- package/core/data/providers/interceptor.d.ts +3 -0
- package/core/data/providers/order-data.service.d.ts +21 -21
- package/core/data/providers/product-data.service.d.ts +51 -51
- package/core/data/providers/promotion-data.service.d.ts +8 -8
- package/core/data/providers/settings-data.service.d.ts +52 -51
- package/core/data/providers/shipping-method-data.service.d.ts +12 -12
- package/core/data/query-result.d.ts +1 -1
- package/core/data/server-config.d.ts +5 -2
- package/core/package.json +5 -6
- package/core/providers/auth/auth.service.d.ts +5 -2
- package/core/providers/component-registry/component-registry.service.d.ts +3 -0
- package/core/providers/custom-detail-component/custom-detail-component.service.d.ts +3 -0
- package/core/providers/custom-field-component/custom-field-component.service.d.ts +3 -0
- package/core/providers/dashboard-widget/dashboard-widget.service.d.ts +3 -0
- package/core/providers/guard/auth.guard.d.ts +3 -0
- package/core/providers/health-check/health-check.service.d.ts +3 -0
- package/core/providers/i18n/custom-message-format-compiler.d.ts +3 -0
- package/core/providers/i18n/i18n.service.d.ts +3 -0
- package/core/providers/job-queue/job-queue.service.d.ts +3 -0
- package/core/providers/local-storage/local-storage.service.d.ts +3 -0
- package/core/providers/modal/modal.service.d.ts +4 -67
- package/core/providers/modal/modal.types.d.ts +67 -0
- package/core/providers/nav-builder/nav-builder.service.d.ts +3 -0
- package/core/providers/notification/notification.service.d.ts +3 -0
- package/core/providers/overlay-host/overlay-host.service.d.ts +3 -0
- package/core/public_api.d.ts +3 -0
- package/core/shared/components/action-bar/action-bar.component.d.ts +7 -0
- package/core/shared/components/action-bar-items/action-bar-items.component.d.ts +3 -0
- package/core/shared/components/address-form/address-form.component.d.ts +5 -2
- package/core/shared/components/affixed-input/affixed-input.component.d.ts +3 -0
- package/core/shared/components/affixed-input/percentage-suffix-input.component.d.ts +3 -0
- package/core/shared/components/asset-file-input/asset-file-input.component.d.ts +3 -0
- package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +46 -26
- package/core/shared/components/asset-gallery/asset-gallery.types.d.ts +3 -0
- package/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.d.ts +7 -3
- package/core/shared/components/asset-preview/asset-preview.component.d.ts +5 -3
- package/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.d.ts +7 -5
- package/core/shared/components/asset-preview-links/asset-preview-links.component.d.ts +8 -0
- package/core/shared/components/asset-search-input/asset-search-input.component.d.ts +5 -2
- package/core/shared/components/channel-assignment-control/channel-assignment-control.component.d.ts +3 -0
- package/core/shared/components/channel-badge/channel-badge.component.d.ts +3 -0
- package/core/shared/components/chip/chip.component.d.ts +3 -0
- package/core/shared/components/configurable-input/configurable-input.component.d.ts +3 -0
- package/core/shared/components/currency-input/currency-input.component.d.ts +3 -0
- package/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.d.ts +3 -0
- package/core/shared/components/custom-field-control/custom-field-control.component.d.ts +3 -0
- package/core/shared/components/customer-label/customer-label.component.d.ts +5 -2
- package/core/shared/components/data-table/data-table-column.component.d.ts +3 -0
- package/core/shared/components/data-table/data-table.component.d.ts +3 -0
- package/core/shared/components/datetime-picker/datetime-picker.component.d.ts +3 -0
- package/core/shared/components/datetime-picker/datetime-picker.service.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown-item.directive.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown-menu.component.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown-trigger.directive.d.ts +3 -0
- package/core/shared/components/dropdown/dropdown.component.d.ts +3 -0
- package/core/shared/components/edit-note-dialog/edit-note-dialog.component.d.ts +4 -1
- package/core/shared/components/empty-placeholder/empty-placeholder.component.d.ts +3 -0
- package/core/shared/components/entity-info/entity-info.component.d.ts +3 -0
- package/core/shared/components/extension-host/extension-host.component.d.ts +3 -0
- package/core/shared/components/extension-host/extension-host.service.d.ts +3 -0
- package/core/shared/components/facet-value-chip/facet-value-chip.component.d.ts +5 -2
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +8 -5
- package/core/shared/components/focal-point-control/focal-point-control.component.d.ts +3 -0
- package/core/shared/components/form-field/form-field-control.directive.d.ts +3 -0
- package/core/shared/components/form-field/form-field.component.d.ts +3 -0
- package/core/shared/components/form-item/form-item.component.d.ts +3 -0
- package/core/shared/components/formatted-address/formatted-address.component.d.ts +3 -0
- package/core/shared/components/help-tooltip/help-tooltip.component.d.ts +3 -0
- package/core/shared/components/history-entry-detail/history-entry-detail.component.d.ts +3 -0
- package/core/shared/components/items-per-page-controls/items-per-page-controls.component.d.ts +3 -0
- package/core/shared/components/labeled-data/labeled-data.component.d.ts +3 -0
- package/core/shared/components/language-selector/language-selector.component.d.ts +3 -0
- package/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.d.ts +6 -3
- package/core/shared/components/modal-dialog/dialog-buttons.directive.d.ts +3 -0
- package/core/shared/components/modal-dialog/dialog-component-outlet.component.d.ts +3 -0
- package/core/shared/components/modal-dialog/dialog-title.directive.d.ts +3 -0
- package/core/shared/components/modal-dialog/modal-dialog.component.d.ts +4 -1
- package/core/shared/components/object-tree/object-tree.component.d.ts +3 -0
- package/core/shared/components/order-state-label/order-state-label.component.d.ts +4 -1
- package/core/shared/components/pagination-controls/pagination-controls.component.d.ts +3 -0
- package/core/shared/components/product-selector/product-selector.component.d.ts +23 -13
- package/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.d.ts +4 -1
- package/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.d.ts +4 -1
- package/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.d.ts +3 -0
- package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +3 -0
- package/core/shared/components/select-toggle/select-toggle.component.d.ts +3 -0
- package/core/shared/components/simple-dialog/simple-dialog.component.d.ts +4 -1
- package/core/shared/components/status-badge/status-badge.component.d.ts +3 -0
- package/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.d.ts +3 -0
- package/core/shared/components/table-row-action/table-row-action.component.d.ts +3 -0
- package/core/shared/components/tag-selector/tag-selector.component.d.ts +3 -0
- package/core/shared/components/timeline-entry/timeline-entry.component.d.ts +3 -0
- package/core/shared/components/title-input/title-input.component.d.ts +3 -0
- package/core/shared/components/ui-extension-point/ui-extension-point.component.d.ts +3 -0
- package/core/shared/directives/disabled.directive.d.ts +3 -0
- package/core/shared/directives/if-default-channel-active.directive.d.ts +3 -0
- package/core/shared/directives/if-directive-base.d.ts +3 -0
- package/core/shared/directives/if-multichannel.directive.d.ts +3 -0
- package/core/shared/directives/if-permissions.directive.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.d.ts +7 -3
- package/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +5 -2
- package/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.d.ts +6 -3
- package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +1 -1
- package/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +6 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.d.ts +6 -2
- package/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.d.ts +7 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.d.ts +7 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.d.ts +7 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.d.ts +4 -1
- package/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.d.ts +3 -0
- package/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.d.ts +3 -0
- package/core/shared/pipes/asset-preview.pipe.d.ts +3 -0
- package/core/shared/pipes/channel-label.pipe.d.ts +3 -0
- package/core/shared/pipes/custom-field-label.pipe.d.ts +3 -0
- package/core/shared/pipes/duration.pipe.d.ts +3 -0
- package/core/shared/pipes/file-size.pipe.d.ts +3 -0
- package/core/shared/pipes/has-permission.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-base.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-currency-name.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-currency.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-date.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-language-name.pipe.d.ts +3 -0
- package/core/shared/pipes/locale-region-name.pipe.d.ts +3 -0
- package/core/shared/pipes/sentence-case.pipe.d.ts +3 -0
- package/core/shared/pipes/sort.pipe.d.ts +3 -0
- package/core/shared/pipes/state-i18n-token.pipe.d.ts +3 -0
- package/core/shared/pipes/string-to-color.pipe.d.ts +3 -0
- package/core/shared/pipes/time-ago.pipe.d.ts +3 -0
- package/core/shared/providers/routing/can-deactivate-detail-guard.d.ts +3 -0
- package/core/shared/shared.module.d.ts +118 -0
- package/core/vendure-admin-ui-core.d.ts +1 -0
- package/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.d.ts +6 -3
- package/customer/components/address-card/address-card.component.d.ts +7 -2
- package/customer/components/address-detail-dialog/address-detail-dialog.component.d.ts +5 -2
- package/customer/components/customer-detail/customer-detail.component.d.ts +10 -5
- package/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.d.ts +3 -0
- package/customer/components/customer-group-list/customer-group-list.component.d.ts +10 -7
- package/customer/components/customer-group-member-list/customer-group-member-list.component.d.ts +3 -0
- package/customer/components/customer-history/customer-history.component.d.ts +12 -7
- package/customer/components/customer-list/customer-list.component.d.ts +7 -5
- package/customer/components/customer-status-label/customer-status-label.component.d.ts +5 -2
- package/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.d.ts +5 -2
- package/customer/customer.module.d.ts +17 -0
- package/customer/package.json +5 -6
- package/customer/providers/routing/customer-resolver.d.ts +5 -4
- package/customer/vendure-admin-ui-customer.d.ts +1 -0
- package/dashboard/components/dashboard/dashboard.component.d.ts +3 -0
- package/dashboard/components/dashboard-widget/dashboard-widget.component.d.ts +3 -0
- package/dashboard/dashboard.module.d.ts +8 -0
- package/dashboard/package.json +5 -6
- package/dashboard/vendure-admin-ui-dashboard.d.ts +1 -0
- package/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.d.ts +9 -2
- package/dashboard/widgets/order-summary-widget/order-summary-widget.component.d.ts +7 -0
- package/dashboard/widgets/test-widget/test-widget.component.d.ts +6 -0
- package/dashboard/widgets/welcome-widget/welcome-widget.component.d.ts +9 -2
- package/esm2020/catalog/catalog.module.mjs +116 -0
- package/esm2020/catalog/catalog.routes.mjs +174 -0
- package/esm2020/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +30 -0
- package/esm2020/catalog/components/asset-detail/asset-detail.component.mjs +66 -0
- package/esm2020/catalog/components/asset-list/asset-list.component.mjs +120 -0
- package/esm2020/catalog/components/assets/assets.component.mjs +100 -0
- package/esm2020/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.mjs +104 -0
- package/esm2020/catalog/components/collection-contents/collection-contents.component.mjs +76 -0
- package/esm2020/catalog/components/collection-detail/collection-detail.component.mjs +210 -0
- package/esm2020/catalog/components/collection-list/collection-list.component.mjs +120 -0
- package/esm2020/catalog/components/collection-tree/array-to-tree.mjs +56 -0
- package/esm2020/catalog/components/collection-tree/collection-tree-node.component.mjs +99 -0
- package/esm2020/catalog/components/collection-tree/collection-tree.component.mjs +44 -0
- package/esm2020/catalog/components/collection-tree/collection-tree.service.mjs +68 -0
- package/esm2020/catalog/components/collection-tree/collection-tree.types.mjs +2 -0
- package/esm2020/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.mjs +23 -0
- package/esm2020/catalog/components/facet-detail/facet-detail.component.mjs +321 -0
- package/esm2020/catalog/components/facet-list/facet-list.component.mjs +104 -0
- package/esm2020/catalog/components/generate-product-variants/generate-product-variants.component.mjs +79 -0
- package/esm2020/catalog/components/option-value-input/option-value-input.component.mjs +97 -0
- package/esm2020/catalog/components/product-detail/product-detail.component.mjs +520 -0
- package/esm2020/catalog/components/product-detail/product-detail.types.mjs +2 -0
- package/esm2020/catalog/components/product-list/product-list.component.mjs +150 -0
- package/esm2020/catalog/components/product-options-editor/product-options-editor.component.mjs +151 -0
- package/esm2020/catalog/components/product-search-input/product-search-input.component.mjs +107 -0
- package/esm2020/catalog/components/product-variants-editor/product-variants-editor.component.mjs +313 -0
- package/esm2020/catalog/components/product-variants-list/product-variants-list.component.mjs +226 -0
- package/esm2020/catalog/components/product-variants-table/product-variants-table.component.mjs +72 -0
- package/esm2020/catalog/components/update-product-option-dialog/update-product-option-dialog.component.mjs +64 -0
- package/esm2020/catalog/components/variant-price-detail/variant-price-detail.component.mjs +61 -0
- package/esm2020/catalog/providers/product-detail/product-detail.service.mjs +224 -0
- package/{esm2015/catalog/providers/product-detail/replace-last.js → esm2020/catalog/providers/product-detail/replace-last.mjs} +0 -0
- package/esm2020/catalog/providers/routing/asset-resolver.mjs +33 -0
- package/esm2020/catalog/providers/routing/collection-resolver.mjs +35 -0
- package/esm2020/catalog/providers/routing/facet-resolver.mjs +30 -0
- package/esm2020/catalog/providers/routing/product-resolver.mjs +39 -0
- package/esm2020/catalog/providers/routing/product-variants-resolver.mjs +27 -0
- package/esm2020/catalog/public_api.mjs +39 -0
- package/{esm2015/catalog/vendure-admin-ui-catalog.js → esm2020/catalog/vendure-admin-ui-catalog.mjs} +0 -0
- package/esm2020/core/app.component.mjs +79 -0
- package/esm2020/core/app.component.module.mjs +19 -0
- package/{esm2015/core/app.config.js → esm2020/core/app.config.mjs} +0 -0
- package/esm2020/core/common/base-detail.component.mjs +108 -0
- package/{esm2015/core/common/base-entity-resolver.js → esm2020/core/common/base-entity-resolver.mjs} +2 -2
- package/esm2020/core/common/base-list.component.mjs +159 -0
- package/{esm2015/core/common/component-registry-types.js → esm2020/core/common/component-registry-types.mjs} +0 -0
- package/{esm2015/core/common/deactivate-aware.js → esm2020/core/common/deactivate-aware.mjs} +0 -0
- package/{esm2015/core/common/detail-breadcrumb.js → esm2020/core/common/detail-breadcrumb.mjs} +0 -0
- package/esm2020/core/common/generated-types.mjs +954 -0
- package/{esm2015/core/common/introspection-result-wrapper.js → esm2020/core/common/introspection-result-wrapper.mjs} +0 -0
- package/esm2020/core/common/introspection-result.mjs +187 -0
- package/{esm2015/core/common/single-search-selection-model.js → esm2020/core/common/single-search-selection-model.mjs} +0 -0
- package/esm2020/core/common/utilities/configurable-operation-utils.mjs +83 -0
- package/esm2020/core/common/utilities/create-updated-translatable.mjs +75 -0
- package/esm2020/core/common/utilities/find-translation.mjs +9 -0
- package/esm2020/core/common/utilities/flatten-facet-values.mjs +4 -0
- package/esm2020/core/common/utilities/get-default-ui-language.mjs +12 -0
- package/{esm2015/core/common/utilities/interpolate-description.js → esm2020/core/common/utilities/interpolate-description.mjs} +0 -0
- package/{esm2015/core/common/utilities/string-to-color.js → esm2020/core/common/utilities/string-to-color.mjs} +0 -0
- package/{esm2015/core/common/version.js → esm2020/core/common/version.mjs} +2 -2
- package/esm2020/core/components/app-shell/app-shell.component.mjs +76 -0
- package/esm2020/core/components/breadcrumb/breadcrumb.component.mjs +124 -0
- package/esm2020/core/components/channel-switcher/channel-switcher.component.mjs +58 -0
- package/esm2020/core/components/main-nav/main-nav.component.mjs +270 -0
- package/esm2020/core/components/notification/notification.component.mjs +76 -0
- package/esm2020/core/components/overlay-host/overlay-host.component.mjs +22 -0
- package/esm2020/core/components/theme-switcher/theme-switcher.component.mjs +29 -0
- package/esm2020/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.mjs +305 -0
- package/esm2020/core/components/user-menu/user-menu.component.mjs +37 -0
- package/esm2020/core/core.module.mjs +145 -0
- package/{esm2015/core/data/check-jobs-link.js → esm2020/core/data/check-jobs-link.mjs} +0 -0
- package/{esm2015/core/data/client-state/client-defaults.js → esm2020/core/data/client-state/client-defaults.mjs} +1 -1
- package/esm2020/core/data/client-state/client-resolvers.mjs +131 -0
- package/esm2020/core/data/data.module.mjs +126 -0
- package/{esm2015/core/data/definitions/administrator-definitions.js → esm2020/core/data/definitions/administrator-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/auth-definitions.js → esm2020/core/data/definitions/auth-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/client-definitions.js → esm2020/core/data/definitions/client-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/collection-definitions.js → esm2020/core/data/definitions/collection-definitions.mjs} +0 -0
- package/esm2020/core/data/definitions/customer-definitions.mjs +265 -0
- package/{esm2015/core/data/definitions/facet-definitions.js → esm2020/core/data/definitions/facet-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/order-definitions.js → esm2020/core/data/definitions/order-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/product-definitions.js → esm2020/core/data/definitions/product-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/promotion-definitions.js → esm2020/core/data/definitions/promotion-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/settings-definitions.js → esm2020/core/data/definitions/settings-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/shared-definitions.js → esm2020/core/data/definitions/shared-definitions.mjs} +0 -0
- package/{esm2015/core/data/definitions/shipping-definitions.js → esm2020/core/data/definitions/shipping-definitions.mjs} +0 -0
- package/{esm2015/core/data/omit-typename-link.js → esm2020/core/data/omit-typename-link.mjs} +0 -0
- package/esm2020/core/data/providers/administrator-data.service.mjs +63 -0
- package/esm2020/core/data/providers/auth-data.service.mjs +20 -0
- package/esm2020/core/data/providers/base-data.service.mjs +69 -0
- package/esm2020/core/data/providers/client-data.service.mjs +75 -0
- package/esm2020/core/data/providers/collection-data.service.mjs +72 -0
- package/esm2020/core/data/providers/customer-data.service.mjs +120 -0
- package/esm2020/core/data/providers/data.service.mjs +90 -0
- package/esm2020/core/data/providers/facet-data.service.mjs +60 -0
- package/esm2020/core/data/providers/fetch-adapter.mjs +36 -0
- package/esm2020/core/data/providers/interceptor.mjs +136 -0
- package/esm2020/core/data/providers/order-data.service.mjs +100 -0
- package/esm2020/core/data/providers/product-data.service.mjs +240 -0
- package/esm2020/core/data/providers/promotion-data.service.mjs +36 -0
- package/esm2020/core/data/providers/settings-data.service.mjs +235 -0
- package/esm2020/core/data/providers/shipping-method-data.service.mjs +66 -0
- package/{esm2015/core/data/query-result.js → esm2020/core/data/query-result.mjs} +1 -1
- package/esm2020/core/data/server-config.mjs +74 -0
- package/esm2020/core/data/utils/add-custom-fields.mjs +84 -0
- package/{esm2015/core/data/utils/get-server-location.js → esm2020/core/data/utils/get-server-location.mjs} +0 -0
- package/{esm2015/core/data/utils/remove-readonly-custom-fields.js → esm2020/core/data/utils/remove-readonly-custom-fields.mjs} +1 -1
- package/esm2020/core/data/utils/transform-relation-custom-field-inputs.mjs +46 -0
- package/esm2020/core/providers/auth/auth.service.mjs +104 -0
- package/esm2020/core/providers/component-registry/component-registry.service.mjs +25 -0
- package/{esm2015/core/providers/custom-detail-component/custom-detail-component-types.js → esm2020/core/providers/custom-detail-component/custom-detail-component-types.mjs} +0 -0
- package/esm2020/core/providers/custom-detail-component/custom-detail-component.service.mjs +44 -0
- package/esm2020/core/providers/custom-field-component/custom-field-component.service.mjs +45 -0
- package/{esm2015/core/providers/dashboard-widget/dashboard-widget-types.js → esm2020/core/providers/dashboard-widget/dashboard-widget-types.mjs} +0 -0
- package/esm2020/core/providers/dashboard-widget/dashboard-widget.service.mjs +98 -0
- package/{esm2015/core/providers/dashboard-widget/register-dashboard-widget.js → esm2020/core/providers/dashboard-widget/register-dashboard-widget.mjs} +0 -0
- package/esm2020/core/providers/guard/auth.guard.mjs +38 -0
- package/esm2020/core/providers/health-check/health-check.service.mjs +36 -0
- package/{esm2015/core/providers/i18n/custom-http-loader.js → esm2020/core/providers/i18n/custom-http-loader.mjs} +0 -0
- package/esm2020/core/providers/i18n/custom-message-format-compiler.mjs +31 -0
- package/esm2020/core/providers/i18n/i18n.service.mjs +54 -0
- package/esm2020/core/providers/job-queue/job-queue.service.mjs +91 -0
- package/esm2020/core/providers/local-storage/local-storage.service.mjs +77 -0
- package/esm2020/core/providers/modal/modal.service.mjs +97 -0
- package/esm2020/core/providers/modal/modal.types.mjs +2 -0
- package/{esm2015/core/providers/nav-builder/nav-builder-types.js → esm2020/core/providers/nav-builder/nav-builder-types.mjs} +0 -0
- package/esm2020/core/providers/nav-builder/nav-builder.service.mjs +268 -0
- package/esm2020/core/providers/notification/notification.service.mjs +157 -0
- package/esm2020/core/providers/overlay-host/overlay-host.service.mjs +48 -0
- package/esm2020/core/public_api.mjs +220 -0
- package/esm2020/core/shared/components/action-bar/action-bar.component.mjs +57 -0
- package/esm2020/core/shared/components/action-bar-items/action-bar-items.component.mjs +78 -0
- package/esm2020/core/shared/components/address-form/address-form.component.mjs +23 -0
- package/esm2020/core/shared/components/affixed-input/affixed-input.component.mjs +19 -0
- package/esm2020/core/shared/components/affixed-input/percentage-suffix-input.component.mjs +97 -0
- package/esm2020/core/shared/components/asset-file-input/asset-file-input.component.mjs +97 -0
- package/esm2020/core/shared/components/asset-gallery/asset-gallery.component.mjs +110 -0
- package/esm2020/core/shared/components/asset-gallery/asset-gallery.types.mjs +2 -0
- package/esm2020/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.mjs +144 -0
- package/esm2020/core/shared/components/asset-preview/asset-preview.component.mjs +189 -0
- package/esm2020/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.mjs +34 -0
- package/esm2020/core/shared/components/asset-preview-links/asset-preview-links.component.mjs +26 -0
- package/esm2020/core/shared/components/asset-search-input/asset-search-input.component.mjs +106 -0
- package/esm2020/core/shared/components/channel-assignment-control/channel-assignment-control.component.mjs +116 -0
- package/esm2020/core/shared/components/channel-badge/channel-badge.component.mjs +19 -0
- package/esm2020/core/shared/components/chip/chip.component.mjs +47 -0
- package/esm2020/core/shared/components/configurable-input/configurable-input.component.mjs +144 -0
- package/esm2020/core/shared/components/currency-input/currency-input.component.mjs +152 -0
- package/esm2020/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.mjs +40 -0
- package/esm2020/core/shared/components/custom-field-control/custom-field-control.component.mjs +83 -0
- package/esm2020/core/shared/components/customer-label/customer-label.component.mjs +17 -0
- package/esm2020/core/shared/components/data-table/data-table-column.component.mjs +29 -0
- package/esm2020/core/shared/components/data-table/data-table.component.mjs +124 -0
- package/{esm2015/core/shared/components/datetime-picker/constants.js → esm2020/core/shared/components/datetime-picker/constants.mjs} +0 -0
- package/esm2020/core/shared/components/datetime-picker/datetime-picker.component.mjs +226 -0
- package/esm2020/core/shared/components/datetime-picker/datetime-picker.service.mjs +201 -0
- package/{esm2015/core/shared/components/datetime-picker/types.js → esm2020/core/shared/components/datetime-picker/types.mjs} +0 -0
- package/esm2020/core/shared/components/dropdown/dropdown-item.directive.mjs +25 -0
- package/esm2020/core/shared/components/dropdown/dropdown-menu.component.mjs +127 -0
- package/esm2020/core/shared/components/dropdown/dropdown-trigger.directive.mjs +25 -0
- package/esm2020/core/shared/components/dropdown/dropdown.component.mjs +58 -0
- package/esm2020/core/shared/components/edit-note-dialog/edit-note-dialog.component.mjs +32 -0
- package/esm2020/core/shared/components/empty-placeholder/empty-placeholder.component.mjs +16 -0
- package/esm2020/core/shared/components/entity-info/entity-info.component.mjs +26 -0
- package/{esm2015/core/shared/components/extension-host/extension-host-config.js → esm2020/core/shared/components/extension-host/extension-host-config.mjs} +0 -0
- package/esm2020/core/shared/components/extension-host/extension-host.component.mjs +80 -0
- package/esm2020/core/shared/components/extension-host/extension-host.service.mjs +99 -0
- package/{esm2015/core/shared/components/extension-host/host-external-frame.js → esm2020/core/shared/components/extension-host/host-external-frame.mjs} +0 -0
- package/esm2020/core/shared/components/facet-value-chip/facet-value-chip.component.mjs +26 -0
- package/esm2020/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +121 -0
- package/esm2020/core/shared/components/focal-point-control/focal-point-control.component.mjs +71 -0
- package/esm2020/core/shared/components/form-field/form-field-control.directive.mjs +37 -0
- package/esm2020/core/shared/components/form-field/form-field.component.mjs +70 -0
- package/esm2020/core/shared/components/form-item/form-item.component.mjs +18 -0
- package/esm2020/core/shared/components/formatted-address/formatted-address.component.mjs +38 -0
- package/esm2020/core/shared/components/help-tooltip/help-tooltip.component.mjs +16 -0
- package/esm2020/core/shared/components/history-entry-detail/history-entry-detail.component.mjs +16 -0
- package/esm2020/core/shared/components/items-per-page-controls/items-per-page-controls.component.mjs +25 -0
- package/esm2020/core/shared/components/labeled-data/labeled-data.component.mjs +13 -0
- package/esm2020/core/shared/components/language-selector/language-selector.component.mjs +31 -0
- package/esm2020/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.mjs +61 -0
- package/esm2020/core/shared/components/modal-dialog/dialog-buttons.directive.mjs +23 -0
- package/esm2020/core/shared/components/modal-dialog/dialog-component-outlet.component.mjs +31 -0
- package/esm2020/core/shared/components/modal-dialog/dialog-title.directive.mjs +23 -0
- package/esm2020/core/shared/components/modal-dialog/modal-dialog.component.mjs +60 -0
- package/esm2020/core/shared/components/object-tree/object-tree.component.mjs +56 -0
- package/esm2020/core/shared/components/order-state-label/order-state-label.component.mjs +46 -0
- package/esm2020/core/shared/components/pagination-controls/pagination-controls.component.mjs +26 -0
- package/esm2020/core/shared/components/product-selector/product-selector.component.mjs +62 -0
- package/esm2020/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.mjs +37 -0
- package/esm2020/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.mjs +34 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/inputrules.js → esm2020/core/shared/components/rich-text-editor/prosemirror/inputrules.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/keymap.js → esm2020/core/shared/components/rich-text-editor/prosemirror/keymap.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/images.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/images.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/links.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/links.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/menu-common.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/menu/menu.js → esm2020/core/shared/components/rich-text-editor/prosemirror/menu/menu.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.js → esm2020/core/shared/components/rich-text-editor/prosemirror/plugins/link-select-plugin.mjs} +0 -0
- package/esm2020/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +112 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/types.js → esm2020/core/shared/components/rich-text-editor/prosemirror/types.mjs} +0 -0
- package/{esm2015/core/shared/components/rich-text-editor/prosemirror/utils.js → esm2020/core/shared/components/rich-text-editor/prosemirror/utils.mjs} +0 -0
- package/esm2020/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +93 -0
- package/esm2020/core/shared/components/select-toggle/select-toggle.component.mjs +32 -0
- package/esm2020/core/shared/components/simple-dialog/simple-dialog.component.mjs +24 -0
- package/esm2020/core/shared/components/status-badge/status-badge.component.mjs +16 -0
- package/esm2020/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.mjs +54 -0
- package/esm2020/core/shared/components/table-row-action/table-row-action.component.mjs +28 -0
- package/esm2020/core/shared/components/tag-selector/tag-selector.component.mjs +60 -0
- package/esm2020/core/shared/components/timeline-entry/timeline-entry.component.mjs +52 -0
- package/esm2020/core/shared/components/title-input/title-input.component.mjs +21 -0
- package/esm2020/core/shared/components/ui-extension-point/ui-extension-point.component.mjs +34 -0
- package/esm2020/core/shared/directives/disabled.directive.mjs +41 -0
- package/esm2020/core/shared/directives/if-default-channel-active.directive.mjs +39 -0
- package/esm2020/core/shared/directives/if-directive-base.mjs +73 -0
- package/esm2020/core/shared/directives/if-multichannel.directive.mjs +45 -0
- package/esm2020/core/shared/directives/if-permissions.directive.mjs +76 -0
- package/esm2020/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.mjs +23 -0
- package/esm2020/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.mjs +120 -0
- package/esm2020/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.mjs +31 -0
- package/esm2020/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.mjs +42 -0
- package/esm2020/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.mjs +32 -0
- package/esm2020/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.mjs +265 -0
- package/esm2020/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +35 -0
- package/esm2020/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.mjs +39 -0
- package/esm2020/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.mjs +21 -0
- package/esm2020/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.mjs +61 -0
- package/{esm2015/core/shared/dynamic-form-inputs/register-dynamic-input-components.js → esm2020/core/shared/dynamic-form-inputs/register-dynamic-input-components.mjs} +0 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.mjs +69 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.mjs +70 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.mjs +89 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.mjs +89 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.mjs +60 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.mjs +28 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.mjs +14 -0
- package/esm2020/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.mjs +21 -0
- package/esm2020/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +31 -0
- package/esm2020/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.mjs +28 -0
- package/esm2020/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.mjs +24 -0
- package/esm2020/core/shared/pipes/asset-preview.pipe.mjs +42 -0
- package/esm2020/core/shared/pipes/channel-label.pipe.mjs +23 -0
- package/esm2020/core/shared/pipes/custom-field-label.pipe.mjs +47 -0
- package/esm2020/core/shared/pipes/duration.pipe.mjs +49 -0
- package/esm2020/core/shared/pipes/file-size.pipe.mjs +47 -0
- package/esm2020/core/shared/pipes/has-permission.pipe.mjs +65 -0
- package/esm2020/core/shared/pipes/locale-base.pipe.mjs +55 -0
- package/esm2020/core/shared/pipes/locale-currency-name.pipe.mjs +61 -0
- package/esm2020/core/shared/pipes/locale-currency.pipe.mjs +44 -0
- package/esm2020/core/shared/pipes/locale-date.pipe.mjs +84 -0
- package/esm2020/core/shared/pipes/locale-language-name.pipe.mjs +51 -0
- package/esm2020/core/shared/pipes/locale-region-name.pipe.mjs +51 -0
- package/esm2020/core/shared/pipes/sentence-case.pipe.mjs +30 -0
- package/esm2020/core/shared/pipes/sort.pipe.mjs +34 -0
- package/esm2020/core/shared/pipes/state-i18n-token.pipe.mjs +50 -0
- package/esm2020/core/shared/pipes/string-to-color.pipe.mjs +18 -0
- package/esm2020/core/shared/pipes/time-ago.pipe.mjs +52 -0
- package/esm2020/core/shared/providers/routing/can-deactivate-detail-guard.mjs +35 -0
- package/esm2020/core/shared/shared.module.mjs +520 -0
- package/{esm2015/core/validators/unicode-pattern.validator.js → esm2020/core/validators/unicode-pattern.validator.mjs} +0 -0
- package/{esm2015/core/vendure-admin-ui-core.js → esm2020/core/vendure-admin-ui-core.mjs} +0 -0
- package/esm2020/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.mjs +41 -0
- package/esm2020/customer/components/address-card/address-card.component.mjs +97 -0
- package/esm2020/customer/components/address-detail-dialog/address-detail-dialog.component.mjs +28 -0
- package/esm2020/customer/components/customer-detail/customer-detail.component.mjs +414 -0
- package/esm2020/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.mjs +45 -0
- package/esm2020/customer/components/customer-group-list/customer-group-list.component.mjs +181 -0
- package/esm2020/customer/components/customer-group-member-list/customer-group-member-list.component.mjs +103 -0
- package/esm2020/customer/components/customer-history/customer-history.component.mjs +83 -0
- package/esm2020/customer/components/customer-list/customer-list.component.mjs +80 -0
- package/esm2020/customer/components/customer-status-label/customer-status-label.component.mjs +17 -0
- package/esm2020/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.mjs +31 -0
- package/esm2020/customer/customer.module.mjs +53 -0
- package/esm2020/customer/customer.routes.mjs +42 -0
- package/esm2020/customer/providers/routing/customer-resolver.mjs +31 -0
- package/{esm2015/customer/public_api.js → esm2020/customer/public_api.mjs} +0 -0
- package/{esm2015/customer/vendure-admin-ui-customer.js → esm2020/customer/vendure-admin-ui-customer.mjs} +0 -0
- package/esm2020/dashboard/components/dashboard/dashboard.component.mjs +121 -0
- package/esm2020/dashboard/components/dashboard-widget/dashboard-widget.component.mjs +35 -0
- package/esm2020/dashboard/dashboard.module.mjs +29 -0
- package/{esm2015/dashboard/dashboard.routes.js → esm2020/dashboard/dashboard.routes.mjs} +0 -0
- package/esm2020/dashboard/default-widgets.mjs +32 -0
- package/{esm2015/dashboard/public_api.js → esm2020/dashboard/public_api.mjs} +0 -0
- package/{esm2015/dashboard/vendure-admin-ui-dashboard.js → esm2020/dashboard/vendure-admin-ui-dashboard.mjs} +0 -0
- package/esm2020/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.mjs +45 -0
- package/esm2020/dashboard/widgets/order-summary-widget/order-summary-widget.component.mjs +59 -0
- package/esm2020/dashboard/widgets/test-widget/test-widget.component.mjs +22 -0
- package/esm2020/dashboard/widgets/welcome-widget/welcome-widget.component.mjs +39 -0
- package/esm2020/login/components/login/login.component.mjs +62 -0
- package/esm2020/login/login.module.mjs +21 -0
- package/{esm2015/login/login.routes.js → esm2020/login/login.routes.mjs} +0 -0
- package/esm2020/login/providers/login.guard.mjs +31 -0
- package/{esm2015/login/public_api.js → esm2020/login/public_api.mjs} +0 -0
- package/{esm2015/login/vendure-admin-ui-login.js → esm2020/login/vendure-admin-ui-login.mjs} +0 -0
- package/esm2020/marketing/components/promotion-detail/promotion-detail.component.mjs +242 -0
- package/esm2020/marketing/components/promotion-list/promotion-list.component.mjs +81 -0
- package/esm2020/marketing/marketing.module.mjs +21 -0
- package/esm2020/marketing/marketing.routes.mjs +33 -0
- package/esm2020/marketing/providers/routing/promotion-resolver.mjs +31 -0
- package/{esm2015/marketing/public_api.js → esm2020/marketing/public_api.mjs} +0 -0
- package/{esm2015/marketing/vendure-admin-ui-marketing.js → esm2020/marketing/vendure-admin-ui-marketing.mjs} +0 -0
- package/esm2020/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.mjs +39 -0
- package/esm2020/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +78 -0
- package/esm2020/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +73 -0
- package/esm2020/order/components/fulfillment-card/fulfillment-card.component.mjs +48 -0
- package/esm2020/order/components/fulfillment-detail/fulfillment-detail.component.mjs +62 -0
- package/esm2020/order/components/fulfillment-state-label/fulfillment-state-label.component.mjs +28 -0
- package/esm2020/order/components/line-fulfillment/line-fulfillment.component.mjs +68 -0
- package/esm2020/order/components/line-refunds/line-refunds.component.mjs +37 -0
- package/esm2020/order/components/modification-detail/modification-detail.component.mjs +68 -0
- package/esm2020/order/components/order-custom-fields-card/order-custom-fields-card.component.mjs +40 -0
- package/esm2020/order/components/order-detail/order-detail.component.mjs +504 -0
- package/esm2020/order/components/order-editor/order-editor.component.mjs +365 -0
- package/esm2020/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.mjs +55 -0
- package/esm2020/order/components/order-history/order-history.component.mjs +166 -0
- package/esm2020/order/components/order-list/order-list.component.mjs +192 -0
- package/esm2020/order/components/order-payment-card/order-payment-card.component.mjs +43 -0
- package/{esm2015/order/components/order-process-graph/constants.js → esm2020/order/components/order-process-graph/constants.mjs} +0 -0
- package/esm2020/order/components/order-process-graph/order-process-edge.component.mjs +45 -0
- package/esm2020/order/components/order-process-graph/order-process-graph.component.mjs +96 -0
- package/esm2020/order/components/order-process-graph/order-process-node.component.mjs +53 -0
- package/{esm2015/order/components/order-process-graph/types.js → esm2020/order/components/order-process-graph/types.mjs} +0 -0
- package/esm2020/order/components/order-process-graph-dialog/order-process-graph-dialog.component.mjs +21 -0
- package/esm2020/order/components/order-state-select-dialog/order-state-select-dialog.component.mjs +29 -0
- package/esm2020/order/components/order-table/order-table.component.mjs +73 -0
- package/esm2020/order/components/payment-detail/payment-detail.component.mjs +18 -0
- package/esm2020/order/components/payment-state-label/payment-state-label.component.mjs +28 -0
- package/esm2020/order/components/refund-order-dialog/refund-order-dialog.component.mjs +138 -0
- package/esm2020/order/components/refund-state-label/refund-state-label.component.mjs +27 -0
- package/esm2020/order/components/settle-refund-dialog/settle-refund-dialog.component.mjs +24 -0
- package/esm2020/order/components/simple-item-list/simple-item-list.component.mjs +15 -0
- package/esm2020/order/order.module.mjs +103 -0
- package/esm2020/order/order.routes.mjs +52 -0
- package/esm2020/order/providers/order-transition.service.mjs +112 -0
- package/esm2020/order/providers/routing/order-resolver.mjs +29 -0
- package/{esm2015/order/public_api.js → esm2020/order/public_api.mjs} +0 -0
- package/{esm2015/order/vendure-admin-ui-order.js → esm2020/order/vendure-admin-ui-order.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/esm2020/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.mjs +34 -0
- package/esm2020/settings/components/admin-detail/admin-detail.component.mjs +192 -0
- package/esm2020/settings/components/administrator-list/administrator-list.component.mjs +49 -0
- package/esm2020/settings/components/channel-detail/channel-detail.component.mjs +154 -0
- package/esm2020/settings/components/channel-list/channel-list.component.mjs +53 -0
- package/esm2020/settings/components/country-detail/country-detail.component.mjs +115 -0
- package/esm2020/settings/components/country-list/country-list.component.mjs +84 -0
- package/esm2020/settings/components/global-settings/global-settings.component.mjs +85 -0
- package/esm2020/settings/components/payment-method-detail/payment-method-detail.component.mjs +199 -0
- package/esm2020/settings/components/payment-method-list/payment-method-list.component.mjs +62 -0
- package/esm2020/settings/components/permission-grid/permission-grid.component.mjs +83 -0
- package/esm2020/settings/components/profile/profile.component.mjs +77 -0
- package/esm2020/settings/components/role-detail/role-detail.component.mjs +105 -0
- package/esm2020/settings/components/role-list/role-list.component.mjs +66 -0
- package/esm2020/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.mjs +30 -0
- package/esm2020/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +240 -0
- package/esm2020/settings/components/shipping-method-list/shipping-method-list.component.mjs +92 -0
- package/esm2020/settings/components/shipping-method-test-result/shipping-method-test-result.component.mjs +30 -0
- package/esm2020/settings/components/tax-category-detail/tax-category-detail.component.mjs +107 -0
- package/esm2020/settings/components/tax-category-list/tax-category-list.component.mjs +56 -0
- package/esm2020/settings/components/tax-rate-detail/tax-rate-detail.component.mjs +126 -0
- package/esm2020/settings/components/tax-rate-list/tax-rate-list.component.mjs +56 -0
- package/esm2020/settings/components/test-address-form/test-address-form.component.mjs +49 -0
- package/esm2020/settings/components/test-order-builder/test-order-builder.component.mjs +71 -0
- package/esm2020/settings/components/zone-detail-dialog/zone-detail-dialog.component.mjs +44 -0
- package/esm2020/settings/components/zone-list/zone-list.component.mjs +158 -0
- package/esm2020/settings/components/zone-member-list/zone-member-controls.directive.mjs +16 -0
- package/esm2020/settings/components/zone-member-list/zone-member-list-header.directive.mjs +16 -0
- package/esm2020/settings/components/zone-member-list/zone-member-list.component.mjs +72 -0
- package/esm2020/settings/providers/routing/administrator-resolver.mjs +28 -0
- package/esm2020/settings/providers/routing/channel-resolver.mjs +34 -0
- package/esm2020/settings/providers/routing/country-resolver.mjs +31 -0
- package/esm2020/settings/providers/routing/global-settings-resolver.mjs +24 -0
- package/esm2020/settings/providers/routing/payment-method-resolver.mjs +33 -0
- package/esm2020/settings/providers/routing/profile-resolver.mjs +30 -0
- package/esm2020/settings/providers/routing/role-resolver.mjs +28 -0
- package/esm2020/settings/providers/routing/shipping-method-resolver.mjs +34 -0
- package/esm2020/settings/providers/routing/tax-category-resolver.mjs +29 -0
- package/esm2020/settings/providers/routing/tax-rate-resolver.mjs +33 -0
- package/{esm2015/settings/public_api.js → esm2020/settings/public_api.mjs} +0 -0
- package/esm2020/settings/settings.module.mjs +106 -0
- package/esm2020/settings/settings.routes.mjs +253 -0
- package/{esm2015/settings/vendure-admin-ui-settings.js → esm2020/settings/vendure-admin-ui-settings.mjs} +0 -0
- package/esm2020/system/components/health-check/health-check.component.mjs +18 -0
- package/esm2020/system/components/job-list/job-list.component.mjs +76 -0
- package/esm2020/system/components/job-state-label/job-state-label.component.mjs +46 -0
- package/{esm2015/system/public_api.js → esm2020/system/public_api.mjs} +0 -0
- package/esm2020/system/system.module.mjs +22 -0
- package/esm2020/system/system.routes.mjs +20 -0
- package/{esm2015/system/vendure-admin-ui-system.js → esm2020/system/vendure-admin-ui-system.mjs} +0 -0
- package/{esm2015/vendure-admin-ui.js → esm2020/vendure-admin-ui.mjs} +0 -0
- package/fesm2015/vendure-admin-ui-catalog.mjs +3732 -0
- package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-core.mjs +15998 -0
- package/fesm2015/vendure-admin-ui-core.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-customer.mjs +1134 -0
- package/fesm2015/vendure-admin-ui-customer.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-dashboard.mjs +365 -0
- package/fesm2015/vendure-admin-ui-dashboard.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-login.mjs +122 -0
- package/fesm2015/vendure-admin-ui-login.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-marketing.mjs +388 -0
- package/fesm2015/vendure-admin-ui-marketing.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-order.mjs +2448 -0
- package/fesm2015/vendure-admin-ui-order.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-settings.mjs +2784 -0
- package/fesm2015/vendure-admin-ui-settings.mjs.map +1 -0
- package/fesm2015/vendure-admin-ui-system.mjs +165 -0
- package/fesm2015/vendure-admin-ui-system.mjs.map +1 -0
- package/fesm2015/{vendure-admin-ui.js → vendure-admin-ui.mjs} +1 -1
- package/fesm2015/vendure-admin-ui.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-catalog.mjs +3747 -0
- package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-core.mjs +15994 -0
- package/fesm2020/vendure-admin-ui-core.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-customer.mjs +1135 -0
- package/fesm2020/vendure-admin-ui-customer.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-dashboard.mjs +361 -0
- package/fesm2020/vendure-admin-ui-dashboard.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-login.mjs +122 -0
- package/fesm2020/vendure-admin-ui-login.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-marketing.mjs +388 -0
- package/fesm2020/vendure-admin-ui-marketing.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-order.mjs +2462 -0
- package/fesm2020/vendure-admin-ui-order.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-settings.mjs +2791 -0
- package/fesm2020/vendure-admin-ui-settings.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui-system.mjs +168 -0
- package/fesm2020/vendure-admin-ui-system.mjs.map +1 -0
- package/fesm2020/vendure-admin-ui.mjs +11 -0
- package/fesm2020/vendure-admin-ui.mjs.map +1 -0
- package/login/components/login/login.component.d.ts +3 -0
- package/login/login.module.d.ts +7 -0
- package/login/package.json +5 -6
- package/login/providers/login.guard.d.ts +3 -0
- package/login/vendure-admin-ui-login.d.ts +1 -0
- package/marketing/components/promotion-detail/promotion-detail.component.d.ts +7 -4
- package/marketing/components/promotion-list/promotion-list.component.d.ts +5 -6
- package/marketing/marketing.module.d.ts +8 -0
- package/marketing/package.json +5 -6
- package/marketing/providers/routing/promotion-resolver.d.ts +5 -2
- package/marketing/vendure-admin-ui-marketing.d.ts +1 -0
- package/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.d.ts +5 -2
- package/order/components/cancel-order-dialog/cancel-order-dialog.component.d.ts +6 -0
- package/order/components/fulfill-order-dialog/fulfill-order-dialog.component.d.ts +6 -3
- package/order/components/fulfillment-card/fulfillment-card.component.d.ts +6 -3
- package/order/components/fulfillment-detail/fulfillment-detail.component.d.ts +6 -3
- package/order/components/fulfillment-state-label/fulfillment-state-label.component.d.ts +3 -0
- package/order/components/line-fulfillment/line-fulfillment.component.d.ts +8 -3
- package/order/components/line-refunds/line-refunds.component.d.ts +6 -3
- package/order/components/modification-detail/modification-detail.component.d.ts +13 -4
- package/order/components/order-custom-fields-card/order-custom-fields-card.component.d.ts +3 -0
- package/order/components/order-detail/order-detail.component.d.ts +15 -10
- package/order/components/order-editor/order-editor.component.d.ts +16 -12
- package/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.d.ts +6 -3
- package/order/components/order-history/order-history.component.d.ts +36 -20
- package/order/components/order-list/order-list.component.d.ts +5 -2
- package/order/components/order-payment-card/order-payment-card.component.d.ts +48 -14
- package/order/components/order-process-graph/order-process-edge.component.d.ts +3 -0
- package/order/components/order-process-graph/order-process-graph.component.d.ts +3 -0
- package/order/components/order-process-graph/order-process-node.component.d.ts +3 -0
- package/order/components/order-process-graph-dialog/order-process-graph-dialog.component.d.ts +3 -0
- package/order/components/order-state-select-dialog/order-state-select-dialog.component.d.ts +3 -0
- package/order/components/order-table/order-table.component.d.ts +14 -8
- package/order/components/payment-detail/payment-detail.component.d.ts +5 -2
- package/order/components/payment-state-label/payment-state-label.component.d.ts +3 -0
- package/order/components/refund-order-dialog/refund-order-dialog.component.d.ts +8 -4
- package/order/components/refund-state-label/refund-state-label.component.d.ts +3 -0
- package/order/components/settle-refund-dialog/settle-refund-dialog.component.d.ts +5 -3
- package/order/components/simple-item-list/simple-item-list.component.d.ts +3 -0
- package/order/order.module.d.ts +34 -0
- package/order/package.json +5 -6
- package/order/providers/order-transition.service.d.ts +3 -0
- package/order/providers/routing/order-resolver.d.ts +5 -4
- package/order/vendure-admin-ui-order.d.ts +1 -0
- package/package.json +120 -36
- package/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.d.ts +6 -3
- package/settings/components/admin-detail/admin-detail.component.d.ts +9 -10
- package/settings/components/administrator-list/administrator-list.component.d.ts +6 -3
- package/settings/components/channel-detail/channel-detail.component.d.ts +7 -8
- package/settings/components/channel-list/channel-list.component.d.ts +5 -5
- package/settings/components/country-detail/country-detail.component.d.ts +7 -4
- package/settings/components/country-list/country-list.component.d.ts +7 -4
- package/settings/components/global-settings/global-settings.component.d.ts +3 -0
- package/settings/components/payment-method-detail/payment-method-detail.component.d.ts +6 -3
- package/settings/components/payment-method-list/payment-method-list.component.d.ts +5 -2
- package/settings/components/permission-grid/permission-grid.component.d.ts +3 -0
- package/settings/components/profile/profile.component.d.ts +5 -2
- package/settings/components/role-detail/role-detail.component.d.ts +3 -0
- package/settings/components/role-list/role-list.component.d.ts +8 -5
- package/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.d.ts +3 -0
- package/settings/components/shipping-method-detail/shipping-method-detail.component.d.ts +7 -4
- package/settings/components/shipping-method-list/shipping-method-list.component.d.ts +6 -3
- package/settings/components/shipping-method-test-result/shipping-method-test-result.component.d.ts +3 -0
- package/settings/components/tax-category-detail/tax-category-detail.component.d.ts +7 -8
- package/settings/components/tax-category-list/tax-category-list.component.d.ts +6 -6
- package/settings/components/tax-rate-detail/tax-rate-detail.component.d.ts +8 -5
- package/settings/components/tax-rate-list/tax-rate-list.component.d.ts +6 -7
- package/settings/components/test-address-form/test-address-form.component.d.ts +5 -2
- package/settings/components/test-order-builder/test-order-builder.component.d.ts +7 -2
- package/settings/components/zone-detail-dialog/zone-detail-dialog.component.d.ts +3 -0
- package/settings/components/zone-list/zone-list.component.d.ts +10 -7
- package/settings/components/zone-member-list/zone-member-controls.directive.d.ts +3 -0
- package/settings/components/zone-member-list/zone-member-list-header.directive.d.ts +3 -0
- package/settings/components/zone-member-list/zone-member-list.component.d.ts +3 -0
- package/settings/package.json +5 -6
- package/settings/providers/routing/administrator-resolver.d.ts +5 -4
- package/settings/providers/routing/channel-resolver.d.ts +5 -4
- package/settings/providers/routing/country-resolver.d.ts +5 -4
- package/settings/providers/routing/global-settings-resolver.d.ts +5 -4
- package/settings/providers/routing/payment-method-resolver.d.ts +5 -4
- package/settings/providers/routing/profile-resolver.d.ts +5 -4
- package/settings/providers/routing/role-resolver.d.ts +5 -4
- package/settings/providers/routing/shipping-method-resolver.d.ts +5 -4
- package/settings/providers/routing/tax-category-resolver.d.ts +5 -2
- package/settings/providers/routing/tax-rate-resolver.d.ts +5 -2
- package/settings/settings.module.d.ts +35 -0
- package/settings/vendure-admin-ui-settings.d.ts +1 -0
- package/static/i18n-messages/cs.json +5 -1
- package/static/i18n-messages/de.json +5 -1
- package/static/i18n-messages/en.json +6 -2
- package/static/i18n-messages/es.json +5 -1
- package/static/i18n-messages/fr.json +5 -1
- package/static/i18n-messages/it.json +5 -1
- package/static/i18n-messages/pl.json +5 -1
- package/static/i18n-messages/pt_BR.json +5 -1
- package/static/i18n-messages/pt_PT.json +5 -1
- package/static/i18n-messages/ru.json +5 -1
- package/static/i18n-messages/uk.json +5 -1
- package/static/i18n-messages/zh_Hans.json +5 -1
- package/static/i18n-messages/zh_Hant.json +5 -1
- package/static/polyfills.ts +0 -10
- package/static/styles/styles.scss +1 -1
- package/static/theme.min.css +1 -1
- package/system/components/health-check/health-check.component.d.ts +3 -0
- package/system/components/job-list/job-list.component.d.ts +7 -4
- package/system/components/job-state-label/job-state-label.component.d.ts +3 -0
- package/system/package.json +5 -6
- package/system/system.module.d.ts +9 -0
- package/system/vendure-admin-ui-system.d.ts +1 -0
- package/vendure-admin-ui.d.ts +1 -0
- package/bundles/vendure-admin-ui-catalog.umd.js +0 -4638
- package/bundles/vendure-admin-ui-catalog.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-core.umd.js +0 -14759
- package/bundles/vendure-admin-ui-core.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-customer.umd.js +0 -1626
- package/bundles/vendure-admin-ui-customer.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-dashboard.umd.js +0 -757
- package/bundles/vendure-admin-ui-dashboard.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-login.umd.js +0 -157
- package/bundles/vendure-admin-ui-login.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-marketing.umd.js +0 -783
- package/bundles/vendure-admin-ui-marketing.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-order.umd.js +0 -3287
- package/bundles/vendure-admin-ui-order.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-settings.umd.js +0 -3697
- package/bundles/vendure-admin-ui-settings.umd.js.map +0 -1
- package/bundles/vendure-admin-ui-system.umd.js +0 -524
- package/bundles/vendure-admin-ui-system.umd.js.map +0 -1
- package/bundles/vendure-admin-ui.umd.js +0 -21
- package/bundles/vendure-admin-ui.umd.js.map +0 -1
- package/catalog/vendure-admin-ui-catalog.metadata.json +0 -1
- package/core/vendure-admin-ui-core.metadata.json +0 -1
- package/customer/vendure-admin-ui-customer.metadata.json +0 -1
- package/dashboard/vendure-admin-ui-dashboard.metadata.json +0 -1
- package/esm2015/catalog/catalog.module.js +0 -64
- package/esm2015/catalog/catalog.routes.js +0 -176
- package/esm2015/catalog/components/apply-facet-dialog/apply-facet-dialog.component.js +0 -32
- package/esm2015/catalog/components/asset-detail/asset-detail.component.js +0 -74
- package/esm2015/catalog/components/asset-list/asset-list.component.js +0 -119
- package/esm2015/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.js +0 -109
- package/esm2015/catalog/components/collection-contents/collection-contents.component.js +0 -78
- package/esm2015/catalog/components/collection-detail/collection-detail.component.js +0 -206
- package/esm2015/catalog/components/collection-list/collection-list.component.js +0 -119
- package/esm2015/catalog/components/collection-tree/array-to-tree.js +0 -57
- package/esm2015/catalog/components/collection-tree/collection-tree-node.component.js +0 -94
- package/esm2015/catalog/components/collection-tree/collection-tree.component.js +0 -74
- package/esm2015/catalog/components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component.js +0 -21
- package/esm2015/catalog/components/facet-detail/facet-detail.component.js +0 -326
- package/esm2015/catalog/components/facet-list/facet-list.component.js +0 -107
- package/esm2015/catalog/components/generate-product-variants/generate-product-variants.component.js +0 -78
- package/esm2015/catalog/components/option-value-input/option-value-input.component.js +0 -98
- package/esm2015/catalog/components/product-assets/product-assets.component.js +0 -108
- package/esm2015/catalog/components/product-detail/product-detail.component.js +0 -514
- package/esm2015/catalog/components/product-list/product-list.component.js +0 -153
- package/esm2015/catalog/components/product-options-editor/product-options-editor.component.js +0 -157
- package/esm2015/catalog/components/product-search-input/product-search-input.component.js +0 -104
- package/esm2015/catalog/components/product-variants-editor/product-variants-editor.component.js +0 -316
- package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +0 -207
- package/esm2015/catalog/components/product-variants-table/product-variants-table.component.js +0 -66
- package/esm2015/catalog/components/update-product-option-dialog/update-product-option-dialog.component.js +0 -61
- package/esm2015/catalog/components/variant-price-detail/variant-price-detail.component.js +0 -60
- package/esm2015/catalog/providers/product-detail/product-detail.service.js +0 -224
- package/esm2015/catalog/providers/routing/asset-resolver.js +0 -37
- package/esm2015/catalog/providers/routing/collection-resolver.js +0 -38
- package/esm2015/catalog/providers/routing/facet-resolver.js +0 -35
- package/esm2015/catalog/providers/routing/product-resolver.js +0 -42
- package/esm2015/catalog/providers/routing/product-variants-resolver.js +0 -31
- package/esm2015/catalog/public_api.js +0 -36
- package/esm2015/core/app.component.js +0 -80
- package/esm2015/core/app.component.module.js +0 -14
- package/esm2015/core/common/base-detail.component.js +0 -106
- package/esm2015/core/common/base-list.component.js +0 -156
- package/esm2015/core/common/generated-types.js +0 -953
- package/esm2015/core/common/introspection-result.js +0 -253
- package/esm2015/core/common/utilities/configurable-operation-utils.js +0 -78
- package/esm2015/core/common/utilities/create-updated-translatable.js +0 -72
- package/esm2015/core/common/utilities/find-translation.js +0 -9
- package/esm2015/core/common/utilities/flatten-facet-values.js +0 -4
- package/esm2015/core/common/utilities/get-default-ui-language.js +0 -13
- package/esm2015/core/components/app-shell/app-shell.component.js +0 -78
- package/esm2015/core/components/breadcrumb/breadcrumb.component.js +0 -126
- package/esm2015/core/components/channel-switcher/channel-switcher.component.js +0 -52
- package/esm2015/core/components/main-nav/main-nav.component.js +0 -272
- package/esm2015/core/components/notification/notification.component.js +0 -71
- package/esm2015/core/components/overlay-host/overlay-host.component.js +0 -22
- package/esm2015/core/components/theme-switcher/theme-switcher.component.js +0 -31
- package/esm2015/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.js +0 -294
- package/esm2015/core/components/user-menu/user-menu.component.js +0 -24
- package/esm2015/core/core.module.js +0 -115
- package/esm2015/core/data/client-state/client-resolvers.js +0 -123
- package/esm2015/core/data/data.module.js +0 -106
- package/esm2015/core/data/definitions/customer-definitions.js +0 -258
- package/esm2015/core/data/providers/administrator-data.service.js +0 -55
- package/esm2015/core/data/providers/auth-data.service.js +0 -20
- package/esm2015/core/data/providers/base-data.service.js +0 -72
- package/esm2015/core/data/providers/client-data.service.js +0 -75
- package/esm2015/core/data/providers/collection-data.service.js +0 -72
- package/esm2015/core/data/providers/customer-data.service.js +0 -114
- package/esm2015/core/data/providers/data.service.js +0 -90
- package/esm2015/core/data/providers/facet-data.service.js +0 -60
- package/esm2015/core/data/providers/fetch-adapter.js +0 -38
- package/esm2015/core/data/providers/interceptor.js +0 -142
- package/esm2015/core/data/providers/order-data.service.js +0 -98
- package/esm2015/core/data/providers/product-data.service.js +0 -232
- package/esm2015/core/data/providers/promotion-data.service.js +0 -36
- package/esm2015/core/data/providers/settings-data.service.js +0 -231
- package/esm2015/core/data/providers/shipping-method-data.service.js +0 -66
- package/esm2015/core/data/server-config.js +0 -76
- package/esm2015/core/data/utils/add-custom-fields.js +0 -78
- package/esm2015/core/data/utils/transform-relation-custom-field-inputs.js +0 -46
- package/esm2015/core/providers/auth/auth.service.js +0 -110
- package/esm2015/core/providers/component-registry/component-registry.service.js +0 -23
- package/esm2015/core/providers/custom-detail-component/custom-detail-component.service.js +0 -44
- package/esm2015/core/providers/custom-field-component/custom-field-component.service.js +0 -47
- package/esm2015/core/providers/dashboard-widget/dashboard-widget.service.js +0 -97
- package/esm2015/core/providers/guard/auth.guard.js +0 -42
- package/esm2015/core/providers/health-check/health-check.service.js +0 -38
- package/esm2015/core/providers/i18n/custom-message-format-compiler.js +0 -30
- package/esm2015/core/providers/i18n/i18n.service.js +0 -56
- package/esm2015/core/providers/job-queue/job-queue.service.js +0 -93
- package/esm2015/core/providers/local-storage/local-storage.service.js +0 -79
- package/esm2015/core/providers/modal/modal.service.js +0 -100
- package/esm2015/core/providers/nav-builder/nav-builder.service.js +0 -264
- package/esm2015/core/providers/notification/notification.service.js +0 -165
- package/esm2015/core/providers/overlay-host/overlay-host.service.js +0 -46
- package/esm2015/core/public_api.js +0 -217
- package/esm2015/core/shared/components/action-bar/action-bar.component.js +0 -47
- package/esm2015/core/shared/components/action-bar-items/action-bar-items.component.js +0 -78
- package/esm2015/core/shared/components/address-form/address-form.component.js +0 -17
- package/esm2015/core/shared/components/affixed-input/affixed-input.component.js +0 -19
- package/esm2015/core/shared/components/affixed-input/percentage-suffix-input.component.js +0 -70
- package/esm2015/core/shared/components/asset-file-input/asset-file-input.component.js +0 -92
- package/esm2015/core/shared/components/asset-gallery/asset-gallery.component.js +0 -102
- package/esm2015/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.js +0 -138
- package/esm2015/core/shared/components/asset-preview/asset-preview.component.js +0 -176
- package/esm2015/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.js +0 -35
- package/esm2015/core/shared/components/asset-search-input/asset-search-input.component.js +0 -102
- package/esm2015/core/shared/components/channel-assignment-control/channel-assignment-control.component.js +0 -109
- package/esm2015/core/shared/components/channel-badge/channel-badge.component.js +0 -19
- package/esm2015/core/shared/components/chip/chip.component.js +0 -42
- package/esm2015/core/shared/components/configurable-input/configurable-input.component.js +0 -128
- package/esm2015/core/shared/components/currency-input/currency-input.component.js +0 -145
- package/esm2015/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.js +0 -44
- package/esm2015/core/shared/components/custom-field-control/custom-field-control.component.js +0 -55
- package/esm2015/core/shared/components/customer-label/customer-label.component.js +0 -15
- package/esm2015/core/shared/components/data-table/data-table-column.component.js +0 -22
- package/esm2015/core/shared/components/data-table/data-table.component.js +0 -106
- package/esm2015/core/shared/components/datetime-picker/datetime-picker.component.js +0 -205
- package/esm2015/core/shared/components/datetime-picker/datetime-picker.service.js +0 -199
- package/esm2015/core/shared/components/dropdown/dropdown-item.directive.js +0 -24
- package/esm2015/core/shared/components/dropdown/dropdown-menu.component.js +0 -121
- package/esm2015/core/shared/components/dropdown/dropdown-trigger.directive.js +0 -25
- package/esm2015/core/shared/components/dropdown/dropdown.component.js +0 -60
- package/esm2015/core/shared/components/edit-note-dialog/edit-note-dialog.component.js +0 -26
- package/esm2015/core/shared/components/empty-placeholder/empty-placeholder.component.js +0 -15
- package/esm2015/core/shared/components/entity-info/entity-info.component.js +0 -19
- package/esm2015/core/shared/components/extension-host/extension-host.component.js +0 -83
- package/esm2015/core/shared/components/extension-host/extension-host.service.js +0 -100
- package/esm2015/core/shared/components/facet-value-chip/facet-value-chip.component.js +0 -23
- package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +0 -114
- package/esm2015/core/shared/components/focal-point-control/focal-point-control.component.js +0 -56
- package/esm2015/core/shared/components/form-field/form-field-control.directive.js +0 -35
- package/esm2015/core/shared/components/form-field/form-field.component.js +0 -61
- package/esm2015/core/shared/components/form-item/form-item.component.js +0 -19
- package/esm2015/core/shared/components/formatted-address/formatted-address.component.js +0 -37
- package/esm2015/core/shared/components/help-tooltip/help-tooltip.component.js +0 -16
- package/esm2015/core/shared/components/history-entry-detail/history-entry-detail.component.js +0 -12
- package/esm2015/core/shared/components/items-per-page-controls/items-per-page-controls.component.js +0 -23
- package/esm2015/core/shared/components/labeled-data/labeled-data.component.js +0 -15
- package/esm2015/core/shared/components/language-selector/language-selector.component.js +0 -21
- package/esm2015/core/shared/components/manage-tags-dialog/manage-tags-dialog.component.js +0 -58
- package/esm2015/core/shared/components/modal-dialog/dialog-buttons.directive.js +0 -23
- package/esm2015/core/shared/components/modal-dialog/dialog-component-outlet.component.js +0 -31
- package/esm2015/core/shared/components/modal-dialog/dialog-title.directive.js +0 -23
- package/esm2015/core/shared/components/modal-dialog/modal-dialog.component.js +0 -57
- package/esm2015/core/shared/components/object-tree/object-tree.component.js +0 -53
- package/esm2015/core/shared/components/order-state-label/order-state-label.component.js +0 -43
- package/esm2015/core/shared/components/pagination-controls/pagination-controls.component.js +0 -22
- package/esm2015/core/shared/components/product-selector/product-selector.component.js +0 -61
- package/esm2015/core/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component.js +0 -32
- package/esm2015/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.js +0 -28
- package/esm2015/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.js +0 -112
- package/esm2015/core/shared/components/rich-text-editor/rich-text-editor.component.js +0 -86
- package/esm2015/core/shared/components/select-toggle/select-toggle.component.js +0 -28
- package/esm2015/core/shared/components/simple-dialog/simple-dialog.component.js +0 -21
- package/esm2015/core/shared/components/status-badge/status-badge.component.js +0 -18
- package/esm2015/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.js +0 -49
- package/esm2015/core/shared/components/table-row-action/table-row-action.component.js +0 -23
- package/esm2015/core/shared/components/tag-selector/tag-selector.component.js +0 -55
- package/esm2015/core/shared/components/timeline-entry/timeline-entry.component.js +0 -40
- package/esm2015/core/shared/components/title-input/title-input.component.js +0 -18
- package/esm2015/core/shared/components/ui-extension-point/ui-extension-point.component.js +0 -31
- package/esm2015/core/shared/directives/disabled.directive.js +0 -38
- package/esm2015/core/shared/directives/if-default-channel-active.directive.js +0 -42
- package/esm2015/core/shared/directives/if-directive-base.js +0 -75
- package/esm2015/core/shared/directives/if-multichannel.directive.js +0 -47
- package/esm2015/core/shared/directives/if-permissions.directive.js +0 -78
- package/esm2015/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.js +0 -20
- package/esm2015/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.js +0 -125
- package/esm2015/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.js +0 -33
- package/esm2015/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.js +0 -43
- package/esm2015/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.js +0 -35
- package/esm2015/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.js +0 -266
- package/esm2015/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.js +0 -36
- package/esm2015/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.js +0 -43
- package/esm2015/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.js +0 -20
- package/esm2015/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.js +0 -60
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.js +0 -69
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.js +0 -66
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.js +0 -81
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.js +0 -81
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.js +0 -43
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.js +0 -25
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-selector-dialog/relation-selector-dialog.component.js +0 -12
- package/esm2015/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.js +0 -20
- package/esm2015/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.js +0 -28
- package/esm2015/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.js +0 -28
- package/esm2015/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.js +0 -23
- package/esm2015/core/shared/pipes/asset-preview.pipe.js +0 -38
- package/esm2015/core/shared/pipes/channel-label.pipe.js +0 -19
- package/esm2015/core/shared/pipes/custom-field-label.pipe.js +0 -46
- package/esm2015/core/shared/pipes/duration.pipe.js +0 -48
- package/esm2015/core/shared/pipes/file-size.pipe.js +0 -43
- package/esm2015/core/shared/pipes/has-permission.pipe.js +0 -65
- package/esm2015/core/shared/pipes/locale-base.pipe.js +0 -57
- package/esm2015/core/shared/pipes/locale-currency-name.pipe.js +0 -58
- package/esm2015/core/shared/pipes/locale-currency.pipe.js +0 -40
- package/esm2015/core/shared/pipes/locale-date.pipe.js +0 -80
- package/esm2015/core/shared/pipes/locale-language-name.pipe.js +0 -47
- package/esm2015/core/shared/pipes/locale-region-name.pipe.js +0 -47
- package/esm2015/core/shared/pipes/sentence-case.pipe.js +0 -26
- package/esm2015/core/shared/pipes/sort.pipe.js +0 -30
- package/esm2015/core/shared/pipes/state-i18n-token.pipe.js +0 -46
- package/esm2015/core/shared/pipes/string-to-color.pipe.js +0 -14
- package/esm2015/core/shared/pipes/time-ago.pipe.js +0 -51
- package/esm2015/core/shared/providers/routing/can-deactivate-detail-guard.js +0 -36
- package/esm2015/core/shared/shared.module.js +0 -263
- package/esm2015/customer/components/add-customer-to-group-dialog/add-customer-to-group-dialog.component.js +0 -42
- package/esm2015/customer/components/address-card/address-card.component.js +0 -86
- package/esm2015/customer/components/address-detail-dialog/address-detail-dialog.component.js +0 -28
- package/esm2015/customer/components/customer-detail/customer-detail.component.js +0 -393
- package/esm2015/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.js +0 -47
- package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +0 -184
- package/esm2015/customer/components/customer-group-member-list/customer-group-member-list.component.js +0 -101
- package/esm2015/customer/components/customer-history/customer-history.component.js +0 -76
- package/esm2015/customer/components/customer-list/customer-list.component.js +0 -78
- package/esm2015/customer/components/customer-status-label/customer-status-label.component.js +0 -15
- package/esm2015/customer/components/select-customer-group-dialog/select-customer-group-dialog.component.js +0 -31
- package/esm2015/customer/customer.module.js +0 -37
- package/esm2015/customer/customer.routes.js +0 -44
- package/esm2015/customer/providers/routing/customer-resolver.js +0 -35
- package/esm2015/dashboard/components/dashboard/dashboard.component.js +0 -124
- package/esm2015/dashboard/components/dashboard-widget/dashboard-widget.component.js +0 -39
- package/esm2015/dashboard/dashboard.module.js +0 -25
- package/esm2015/dashboard/default-widgets.js +0 -34
- package/esm2015/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.js +0 -42
- package/esm2015/dashboard/widgets/order-summary-widget/order-summary-widget.component.js +0 -56
- package/esm2015/dashboard/widgets/test-widget/test-widget.component.js +0 -19
- package/esm2015/dashboard/widgets/welcome-widget/welcome-widget.component.js +0 -36
- package/esm2015/login/components/login/login.component.js +0 -61
- package/esm2015/login/login.module.js +0 -15
- package/esm2015/login/providers/login.guard.js +0 -35
- package/esm2015/marketing/components/promotion-detail/promotion-detail.component.js +0 -247
- package/esm2015/marketing/components/promotion-list/promotion-list.component.js +0 -87
- package/esm2015/marketing/marketing.module.js +0 -15
- package/esm2015/marketing/marketing.routes.js +0 -35
- package/esm2015/marketing/providers/routing/promotion-resolver.js +0 -34
- package/esm2015/order/components/add-manual-payment-dialog/add-manual-payment-dialog.component.js +0 -39
- package/esm2015/order/components/cancel-order-dialog/cancel-order-dialog.component.js +0 -52
- package/esm2015/order/components/fulfill-order-dialog/fulfill-order-dialog.component.js +0 -71
- package/esm2015/order/components/fulfillment-card/fulfillment-card.component.js +0 -43
- package/esm2015/order/components/fulfillment-detail/fulfillment-detail.component.js +0 -64
- package/esm2015/order/components/fulfillment-state-label/fulfillment-state-label.component.js +0 -26
- package/esm2015/order/components/line-fulfillment/line-fulfillment.component.js +0 -65
- package/esm2015/order/components/line-refunds/line-refunds.component.js +0 -35
- package/esm2015/order/components/modification-detail/modification-detail.component.js +0 -66
- package/esm2015/order/components/order-custom-fields-card/order-custom-fields-card.component.js +0 -39
- package/esm2015/order/components/order-detail/order-detail.component.js +0 -509
- package/esm2015/order/components/order-editor/order-editor.component.js +0 -362
- package/esm2015/order/components/order-edits-preview-dialog/order-edits-preview-dialog.component.js +0 -50
- package/esm2015/order/components/order-history/order-history.component.js +0 -154
- package/esm2015/order/components/order-list/order-list.component.js +0 -188
- package/esm2015/order/components/order-payment-card/order-payment-card.component.js +0 -33
- package/esm2015/order/components/order-process-graph/order-process-edge.component.js +0 -37
- package/esm2015/order/components/order-process-graph/order-process-graph.component.js +0 -94
- package/esm2015/order/components/order-process-graph/order-process-node.component.js +0 -53
- package/esm2015/order/components/order-process-graph-dialog/order-process-graph-dialog.component.js +0 -23
- package/esm2015/order/components/order-state-select-dialog/order-state-select-dialog.component.js +0 -25
- package/esm2015/order/components/order-table/order-table.component.js +0 -68
- package/esm2015/order/components/payment-detail/payment-detail.component.js +0 -16
- package/esm2015/order/components/payment-state-label/payment-state-label.component.js +0 -26
- package/esm2015/order/components/refund-order-dialog/refund-order-dialog.component.js +0 -133
- package/esm2015/order/components/refund-state-label/refund-state-label.component.js +0 -25
- package/esm2015/order/components/settle-refund-dialog/settle-refund-dialog.component.js +0 -21
- package/esm2015/order/components/simple-item-list/simple-item-list.component.js +0 -15
- package/esm2015/order/order.module.js +0 -70
- package/esm2015/order/order.routes.js +0 -54
- package/esm2015/order/providers/order-transition.service.js +0 -116
- package/esm2015/order/providers/routing/order-resolver.js +0 -33
- package/esm2015/settings/components/add-country-to-zone-dialog/add-country-to-zone-dialog.component.js +0 -35
- package/esm2015/settings/components/admin-detail/admin-detail.component.js +0 -199
- package/esm2015/settings/components/administrator-list/administrator-list.component.js +0 -52
- package/esm2015/settings/components/channel-detail/channel-detail.component.js +0 -163
- package/esm2015/settings/components/channel-list/channel-list.component.js +0 -57
- package/esm2015/settings/components/country-detail/country-detail.component.js +0 -120
- package/esm2015/settings/components/country-list/country-list.component.js +0 -82
- package/esm2015/settings/components/global-settings/global-settings.component.js +0 -89
- package/esm2015/settings/components/payment-method-detail/payment-method-detail.component.js +0 -204
- package/esm2015/settings/components/payment-method-list/payment-method-list.component.js +0 -66
- package/esm2015/settings/components/permission-grid/permission-grid.component.js +0 -80
- package/esm2015/settings/components/profile/profile.component.js +0 -82
- package/esm2015/settings/components/role-detail/role-detail.component.js +0 -109
- package/esm2015/settings/components/role-list/role-list.component.js +0 -73
- package/esm2015/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component.js +0 -24
- package/esm2015/settings/components/shipping-method-detail/shipping-method-detail.component.js +0 -235
- package/esm2015/settings/components/shipping-method-list/shipping-method-list.component.js +0 -94
- package/esm2015/settings/components/shipping-method-test-result/shipping-method-test-result.component.js +0 -24
- package/esm2015/settings/components/tax-category-detail/tax-category-detail.component.js +0 -115
- package/esm2015/settings/components/tax-category-list/tax-category-list.component.js +0 -60
- package/esm2015/settings/components/tax-rate-detail/tax-rate-detail.component.js +0 -131
- package/esm2015/settings/components/tax-rate-list/tax-rate-list.component.js +0 -64
- package/esm2015/settings/components/test-address-form/test-address-form.component.js +0 -53
- package/esm2015/settings/components/test-order-builder/test-order-builder.component.js +0 -73
- package/esm2015/settings/components/zone-detail-dialog/zone-detail-dialog.component.js +0 -47
- package/esm2015/settings/components/zone-list/zone-list.component.js +0 -160
- package/esm2015/settings/components/zone-member-list/zone-member-controls.directive.js +0 -15
- package/esm2015/settings/components/zone-member-list/zone-member-list-header.directive.js +0 -15
- package/esm2015/settings/components/zone-member-list/zone-member-list.component.js +0 -63
- package/esm2015/settings/providers/routing/administrator-resolver.js +0 -32
- package/esm2015/settings/providers/routing/channel-resolver.js +0 -40
- package/esm2015/settings/providers/routing/country-resolver.js +0 -35
- package/esm2015/settings/providers/routing/global-settings-resolver.js +0 -28
- package/esm2015/settings/providers/routing/payment-method-resolver.js +0 -37
- package/esm2015/settings/providers/routing/profile-resolver.js +0 -34
- package/esm2015/settings/providers/routing/role-resolver.js +0 -32
- package/esm2015/settings/providers/routing/shipping-method-resolver.js +0 -38
- package/esm2015/settings/providers/routing/tax-category-resolver.js +0 -32
- package/esm2015/settings/providers/routing/tax-rate-resolver.js +0 -36
- package/esm2015/settings/settings.module.js +0 -72
- package/esm2015/settings/settings.routes.js +0 -255
- package/esm2015/system/components/health-check/health-check.component.js +0 -19
- package/esm2015/system/components/job-list/job-list.component.js +0 -74
- package/esm2015/system/components/job-state-label/job-state-label.component.js +0 -45
- package/esm2015/system/system.module.js +0 -16
- package/esm2015/system/system.routes.js +0 -22
- package/fesm2015/vendure-admin-ui-catalog.js +0 -3800
- package/fesm2015/vendure-admin-ui-catalog.js.map +0 -1
- package/fesm2015/vendure-admin-ui-core.js +0 -15757
- package/fesm2015/vendure-admin-ui-core.js.map +0 -1
- package/fesm2015/vendure-admin-ui-customer.js +0 -1140
- package/fesm2015/vendure-admin-ui-customer.js.map +0 -1
- package/fesm2015/vendure-admin-ui-dashboard.js +0 -371
- package/fesm2015/vendure-admin-ui-dashboard.js.map +0 -1
- package/fesm2015/vendure-admin-ui-login.js +0 -121
- package/fesm2015/vendure-admin-ui-login.js.map +0 -1
- package/fesm2015/vendure-admin-ui-marketing.js +0 -403
- package/fesm2015/vendure-admin-ui-marketing.js.map +0 -1
- package/fesm2015/vendure-admin-ui-order.js +0 -2492
- package/fesm2015/vendure-admin-ui-order.js.map +0 -1
- package/fesm2015/vendure-admin-ui-settings.js +0 -2975
- package/fesm2015/vendure-admin-ui-settings.js.map +0 -1
- package/fesm2015/vendure-admin-ui-system.js +0 -171
- package/fesm2015/vendure-admin-ui-system.js.map +0 -1
- package/fesm2015/vendure-admin-ui.js.map +0 -1
- package/login/vendure-admin-ui-login.metadata.json +0 -1
- package/marketing/vendure-admin-ui-marketing.metadata.json +0 -1
- package/order/vendure-admin-ui-order.metadata.json +0 -1
- package/settings/vendure-admin-ui-settings.metadata.json +0 -1
- package/system/vendure-admin-ui-system.metadata.json +0 -1
- package/vendure-admin-ui.metadata.json +0 -1
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ViewChild, } from '@angular/core';
|
|
2
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
-
import { ActivatedRoute } from '@angular/router';
|
|
4
|
-
import { ExtensionHostService } from './extension-host.service';
|
|
5
|
-
/**
|
|
6
|
-
* This component uses an iframe to embed an external url into the Admin UI, and uses the PostMessage
|
|
7
|
-
* protocol to allow cross-frame communication between the two frames.
|
|
8
|
-
*/
|
|
9
|
-
export class ExtensionHostComponent {
|
|
10
|
-
constructor(route, sanitizer, extensionHostService) {
|
|
11
|
-
this.route = route;
|
|
12
|
-
this.sanitizer = sanitizer;
|
|
13
|
-
this.extensionHostService = extensionHostService;
|
|
14
|
-
this.openInIframe = true;
|
|
15
|
-
this.extensionWindowIsOpen = false;
|
|
16
|
-
}
|
|
17
|
-
ngOnInit() {
|
|
18
|
-
const { data } = this.route.snapshot;
|
|
19
|
-
if (!this.isExtensionHostConfig(data.extensionHostConfig)) {
|
|
20
|
-
throw new Error(`Expected an ExtensionHostConfig object, got ${JSON.stringify(data.extensionHostConfig)}`);
|
|
21
|
-
}
|
|
22
|
-
this.config = data.extensionHostConfig;
|
|
23
|
-
this.openInIframe = !this.config.openInNewTab;
|
|
24
|
-
this.extensionUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.config.extensionUrl || 'about:blank');
|
|
25
|
-
}
|
|
26
|
-
ngAfterViewInit() {
|
|
27
|
-
if (this.openInIframe) {
|
|
28
|
-
const extensionWindow = this.extensionFrame.nativeElement.contentWindow;
|
|
29
|
-
if (extensionWindow) {
|
|
30
|
-
this.extensionHostService.init(extensionWindow, this.route.snapshot);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
ngOnDestroy() {
|
|
35
|
-
if (this.extensionWindow) {
|
|
36
|
-
this.extensionWindow.close();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
launchExtensionWindow() {
|
|
40
|
-
const extensionWindow = window.open(this.config.extensionUrl);
|
|
41
|
-
if (!extensionWindow) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.extensionHostService.init(extensionWindow, this.route.snapshot);
|
|
45
|
-
this.extensionWindowIsOpen = true;
|
|
46
|
-
this.extensionWindow = extensionWindow;
|
|
47
|
-
let timer;
|
|
48
|
-
function pollWindowState(extwindow, onClosed) {
|
|
49
|
-
if (extwindow.closed) {
|
|
50
|
-
window.clearTimeout(timer);
|
|
51
|
-
onClosed();
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
timer = window.setTimeout(() => pollWindowState(extwindow, onClosed), 250);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
pollWindowState(extensionWindow, () => {
|
|
58
|
-
this.extensionWindowIsOpen = false;
|
|
59
|
-
this.extensionHostService.destroy();
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
isExtensionHostConfig(input) {
|
|
63
|
-
return input.hasOwnProperty('extensionUrl');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
ExtensionHostComponent.decorators = [
|
|
67
|
-
{ type: Component, args: [{
|
|
68
|
-
selector: 'vdr-extension-host',
|
|
69
|
-
template: "<ng-template [ngIf]=\"openInIframe\" [ngIfElse]=\"launchExtension\">\r\n <iframe [src]=\"extensionUrl\" #extensionFrame></iframe>\r\n</ng-template>\r\n<ng-template #launchExtension>\r\n <div class=\"launch-button\" [class.launched]=\"extensionWindowIsOpen\">\r\n <div>\r\n <button\r\n class=\"btn btn-lg btn-primary\"\r\n [disabled]=\"extensionWindowIsOpen\"\r\n (click)=\"launchExtensionWindow()\"\r\n >\r\n <clr-icon shape=\"pop-out\"></clr-icon>\r\n {{ 'common.launch-extension' | translate }}\r\n </button>\r\n <h3 class=\"window-hint\" [class.visible]=\"extensionWindowIsOpen\">\r\n {{ 'common.extension-running-in-separate-window' | translate }}\r\n </h3>\r\n </div>\r\n </div>\r\n</ng-template>\r\n",
|
|
70
|
-
changeDetection: ChangeDetectionStrategy.Default,
|
|
71
|
-
providers: [ExtensionHostService],
|
|
72
|
-
styles: ["iframe{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border:none}.launch-button{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border:none;padding:24px;display:flex;align-items:center;justify-content:center;transition:background-color .3s;text-align:center}.launch-button.launched{background-color:var(--color-component-bg-300)}.window-hint{visibility:hidden;opacity:0;transition:visibility .3s 0,opacity .3s}.window-hint.visible{visibility:visible;opacity:1;transition:visibility 0,opacity .3s}\n"]
|
|
73
|
-
},] }
|
|
74
|
-
];
|
|
75
|
-
ExtensionHostComponent.ctorParameters = () => [
|
|
76
|
-
{ type: ActivatedRoute },
|
|
77
|
-
{ type: DomSanitizer },
|
|
78
|
-
{ type: ExtensionHostService }
|
|
79
|
-
];
|
|
80
|
-
ExtensionHostComponent.propDecorators = {
|
|
81
|
-
extensionFrame: [{ type: ViewChild, args: ['extensionFrame',] }]
|
|
82
|
-
};
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5zaW9uLWhvc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvY29tcG9uZW50cy9leHRlbnNpb24taG9zdC9leHRlbnNpb24taG9zdC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUVILHVCQUF1QixFQUN2QixTQUFTLEVBSVQsU0FBUyxHQUNaLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxZQUFZLEVBQW1CLE1BQU0sMkJBQTJCLENBQUM7QUFDMUUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBR2pELE9BQU8sRUFBRSxvQkFBb0IsRUFBR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woXHJcbiAgICAgICAgICAgIHRoaXMuY29uZmlnLmV4dGVuc2lvblVybCB8fCAnYWJvdXQ6YmxhbmsnLFxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcblxyXG4gICAgbmdBZnRlclZpZXdJbml0KCkge1xyXG4gICAgICAgIGlmICh0aGlzLm9wZW5JbklmcmFtZSkge1xyXG4gICAgICAgICAgICBjb25zdCBleHRlbnNpb25XaW5kb3cgPSB0aGlzLmV4dGVuc2lvbkZyYW1lLm5hdGl2ZUVsZW1lbnQuY29udGVudFdpbmRvdztcclxuICAgICAgICAgICAgaWYgKGV4dGVuc2lvbldpbmRvdykge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5leHRlbnNpb25Ib3N0U2VydmljZS5pbml0KGV4dGVuc2lvbldpbmRvdywgdGhpcy5yb3V0ZS5zbmFwc2hvdCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgbmdPbkRlc3Ryb3koKTogdm9pZCB7XHJcbiAgICAgICAgaWYgKHRoaXMuZXh0ZW5zaW9uV2luZG93KSB7XHJcbiAgICAgICAgICAgIHRoaXMuZXh0ZW5zaW9uV2luZG93LmNsb3NlKCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGxhdW5jaEV4dGVuc2lvbldpbmRvdygpIHtcclxuICAgICAgICBjb25zdCBleHRlbnNpb25XaW5kb3cgPSB3aW5kb3cub3Blbih0aGlzLmNvbmZpZy5leHRlbnNpb25VcmwpO1xyXG4gICAgICAgIGlmICghZXh0ZW5zaW9uV2luZG93KSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5leHRlbnNpb25Ib3N0U2VydmljZS5pbml0KGV4dGVuc2lvbldpbmRvdywgdGhpcy5yb3V0ZS5zbmFwc2hvdCk7XHJcbiAgICAgICAgdGhpcy5leHRlbnNpb25XaW5kb3dJc09wZW4gPSB0cnVlO1xyXG4gICAgICAgIHRoaXMuZXh0ZW5zaW9uV2luZG93ID0gZXh0ZW5zaW9uV2luZG93O1xyXG5cclxuICAgICAgICBsZXQgdGltZXI6IG51bWJlcjtcclxuICAgICAgICBmdW5jdGlvbiBwb2xsV2luZG93U3RhdGUoZXh0d2luZG93OiBXaW5kb3csIG9uQ2xvc2VkOiAoKSA9PiB2b2lkKSB7XHJcbiAgICAgICAgICAgIGlmIChleHR3aW5kb3cuY2xvc2VkKSB7XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuY2xlYXJUaW1lb3V0KHRpbWVyKTtcclxuICAgICAgICAgICAgICAgIG9uQ2xvc2VkKCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aW1lciA9IHdpbmRvdy5zZXRUaW1lb3V0KCgpID0+IHBvbGxXaW5kb3dTdGF0ZShleHR3aW5kb3csIG9uQ2xvc2VkKSwgMjUwKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcG9sbFdpbmRvd1N0YXRlKGV4dGVuc2lvbldpbmRvdywgKCkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLmV4dGVuc2lvbldpbmRvd0lzT3BlbiA9IGZhbHNlO1xyXG4gICAgICAgICAgICB0aGlzLmV4dGVuc2lvbkhvc3RTZXJ2aWNlLmRlc3Ryb3koKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGlzRXh0ZW5zaW9uSG9zdENvbmZpZyhpbnB1dDogYW55KTogaW5wdXQgaXMgRXh0ZW5zaW9uSG9zdENvbmZpZyB7XHJcbiAgICAgICAgcmV0dXJuIGlucHV0Lmhhc093blByb3BlcnR5KCdleHRlbnNpb25VcmwnKTtcclxuICAgIH1cclxufVxyXG4iXX0=
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { assertNever } from '@vendure/common/lib/shared-utils';
|
|
3
|
-
import { parse } from 'graphql';
|
|
4
|
-
import { merge, Subject } from 'rxjs';
|
|
5
|
-
import { filter, takeUntil } from 'rxjs/operators';
|
|
6
|
-
import { DataService } from '../../../data/providers/data.service';
|
|
7
|
-
import { NotificationService } from '../../../providers/notification/notification.service';
|
|
8
|
-
export class ExtensionHostService {
|
|
9
|
-
constructor(dataService, notificationService) {
|
|
10
|
-
this.dataService = dataService;
|
|
11
|
-
this.notificationService = notificationService;
|
|
12
|
-
this.cancellationMessage$ = new Subject();
|
|
13
|
-
this.destroyMessage$ = new Subject();
|
|
14
|
-
this.handleMessage = (message) => {
|
|
15
|
-
const { data, origin } = message;
|
|
16
|
-
if (this.isExtensionMessage(data)) {
|
|
17
|
-
const cancellation$ = this.cancellationMessage$.pipe(filter(requestId => requestId === data.requestId));
|
|
18
|
-
const end$ = merge(cancellation$, this.destroyMessage$);
|
|
19
|
-
switch (data.type) {
|
|
20
|
-
case 'cancellation': {
|
|
21
|
-
this.cancellationMessage$.next(data.requestId);
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
case 'destroy': {
|
|
25
|
-
this.destroyMessage$.next();
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
case 'active-route': {
|
|
29
|
-
const routeData = {
|
|
30
|
-
url: window.location.href,
|
|
31
|
-
origin: window.location.origin,
|
|
32
|
-
pathname: window.location.pathname,
|
|
33
|
-
params: this.routeSnapshot.params,
|
|
34
|
-
queryParams: this.routeSnapshot.queryParams,
|
|
35
|
-
fragment: this.routeSnapshot.fragment,
|
|
36
|
-
};
|
|
37
|
-
this.sendMessage({ data: routeData, error: false, complete: false, requestId: data.requestId }, origin);
|
|
38
|
-
this.sendMessage({ data: null, error: false, complete: true, requestId: data.requestId }, origin);
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
case 'graphql-query': {
|
|
42
|
-
const { document, variables, fetchPolicy } = data.data;
|
|
43
|
-
this.dataService
|
|
44
|
-
.query(parse(document), variables, fetchPolicy)
|
|
45
|
-
.stream$.pipe(takeUntil(end$))
|
|
46
|
-
.subscribe(this.createObserver(data.requestId, origin));
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
case 'graphql-mutation': {
|
|
50
|
-
const { document, variables } = data.data;
|
|
51
|
-
this.dataService
|
|
52
|
-
.mutate(parse(document), variables)
|
|
53
|
-
.pipe(takeUntil(end$))
|
|
54
|
-
.subscribe(this.createObserver(data.requestId, origin));
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
case 'notification': {
|
|
58
|
-
this.notificationService.notify(data.data);
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
default:
|
|
62
|
-
assertNever(data);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
init(extensionWindow, routeSnapshot) {
|
|
68
|
-
this.extensionWindow = extensionWindow;
|
|
69
|
-
this.routeSnapshot = routeSnapshot;
|
|
70
|
-
window.addEventListener('message', this.handleMessage);
|
|
71
|
-
}
|
|
72
|
-
destroy() {
|
|
73
|
-
window.removeEventListener('message', this.handleMessage);
|
|
74
|
-
this.destroyMessage$.next();
|
|
75
|
-
}
|
|
76
|
-
ngOnDestroy() {
|
|
77
|
-
this.destroy();
|
|
78
|
-
}
|
|
79
|
-
createObserver(requestId, origin) {
|
|
80
|
-
return {
|
|
81
|
-
next: data => this.sendMessage({ data, error: false, complete: false, requestId }, origin),
|
|
82
|
-
error: err => this.sendMessage({ data: err, error: true, complete: false, requestId }, origin),
|
|
83
|
-
complete: () => this.sendMessage({ data: null, error: false, complete: true, requestId }, origin),
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
sendMessage(response, origin) {
|
|
87
|
-
this.extensionWindow.postMessage(response, origin);
|
|
88
|
-
}
|
|
89
|
-
isExtensionMessage(input) {
|
|
90
|
-
return (input.hasOwnProperty('type') && input.hasOwnProperty('data') && input.hasOwnProperty('requestId'));
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
ExtensionHostService.decorators = [
|
|
94
|
-
{ type: Injectable }
|
|
95
|
-
];
|
|
96
|
-
ExtensionHostService.ctorParameters = () => [
|
|
97
|
-
{ type: DataService },
|
|
98
|
-
{ type: NotificationService }
|
|
99
|
-
];
|
|
100
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5zaW9uLWhvc3Quc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvZXh0ZW5zaW9uLWhvc3QvZXh0ZW5zaW9uLWhvc3Quc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFhLE1BQU0sZUFBZSxDQUFDO0FBR3RELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUMvRCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ2hDLE9BQU8sRUFBRSxLQUFLLEVBQVksT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ2hELE9BQU8sRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFbkQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQ25FLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHNEQUFzRCxDQUFDO0FBRzNGLE1BQU0sT0FBTyxvQkFBb0I7SUFNN0IsWUFBb0IsV0FBd0IsRUFBVSxtQkFBd0M7UUFBMUUsZ0JBQVcsR0FBWCxXQUFXLENBQWE7UUFBVSx3QkFBbUIsR0FBbkIsbUJBQW1CLENBQXFCO1FBSHRGLHlCQUFvQ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W50PEV4dGVuc2lvbk1lc3NhZ2U+KSA9PiB7XHJcbiAgICAgICAgY29uc3QgeyBkYXRhLCBvcmlnaW4gfSA9IG1lc3NhZ2U7XHJcbiAgICAgICAgaWYgKHRoaXMuaXNFeHRlbnNpb25NZXNzYWdlKGRhdGEpKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGNhbmNlbGxhdGlvbiQgPSB0aGlzLmNhbmNlbGxhdGlvbk1lc3NhZ2UkLnBpcGUoXHJcbiAgICAgICAgICAgICAgICBmaWx0ZXIocmVxdWVzdElkID0+IHJlcXVlc3RJZCA9PT0gZGF0YS5yZXF1ZXN0SWQpLFxyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgICAgICBjb25zdCBlbmQkID0gbWVyZ2UoY2FuY2VsbGF0aW9uJCwgdGhpcy5kZXN0cm95TWVzc2FnZSQpO1xyXG4gICAgICAgICAgICBzd2l0Y2ggKGRhdGEudHlwZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnY2FuY2VsbGF0aW9uJzoge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FuY2VsbGF0aW9uTWVzc2FnZSQubmV4dChkYXRhLnJlcXVlc3RJZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjYXNlICdkZXN0cm95Jzoge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGVzdHJveU1lc3NhZ2UkLm5leHQoKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNhc2UgJ2FjdGl2ZS1yb3V0ZSc6IHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCByb3V0ZURhdGE6IEFjdGl2ZVJvdXRlRGF0YSA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cubG9jYXRpb24uaHJlZixcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luOiB3aW5kb3cubG9jYXRpb24ub3JpZ2luLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRobmFtZTogd2luZG93LmxvY2F0aW9uLnBhdGhuYW1lLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHRoaXMucm91dGVTbmFwc2hvdC5wYXJhbXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJ5UGFyYW1zOiB0aGlzLnJvdXRlU25hcHNob3QucXVlcnlQYXJhbXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYWdtZW50OiB0aGlzLnJvdXRlU25hcHNob3QuZnJhZ21lbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbmRNZXNzYWdlKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGRhdGE6IHJvdXRlRGF0YSwgZXJyb3I6IGZhbHNlLCBjb21wbGV0ZTogZmFsc2UsIHJlcXVlc3RJZDogZGF0YS5yZXF1ZXN0SWQgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luLFxyXG4gICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZW5kTWVzc2FnZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgeyBkYXRhOiBudWxsLCBlcnJvcjogZmFsc2UsIGNvbXBsZXRlOiB0cnVlLCByZXF1ZXN0SWQ6IGRhdGEucmVxdWVzdElkIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdpbixcclxuICAgICAgICAgICAgICAgICAgICApO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY2FzZSAnZ3JhcGhxbC1xdWVyeSc6IHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGRvY3VtZW50LCB2YXJpYWJsZXMsIGZldGNoUG9saWN5IH0gPSBkYXRhLmRhdGE7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kYXRhU2VydmljZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAucXVlcnkocGFyc2UoZG9jdW1lbnQpLCB2YXJpYWJsZXMsIGZldGNoUG9saWN5KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuc3RyZWFtJC5waXBlKHRha2VVbnRpbChlbmQkKSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSh0aGlzLmNyZWF0ZU9ic2VydmVyKGRhdGEucmVxdWVzdElkLCBvcmlnaW4pKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNhc2UgJ2dyYXBocWwtbXV0YXRpb24nOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBkb2N1bWVudCwgdmFyaWFibGVzIH0gPSBkYXRhLmRhdGE7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kYXRhU2VydmljZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAubXV0YXRlKHBhcnNlKGRvY3VtZW50KSwgdmFyaWFibGVzKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAucGlwZSh0YWtlVW50aWwoZW5kJCkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUodGhpcy5jcmVhdGVPYnNlcnZlcihkYXRhLnJlcXVlc3RJZCwgb3JpZ2luKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjYXNlICdub3RpZmljYXRpb24nOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub3RpZmljYXRpb25TZXJ2aWNlLm5vdGlmeShkYXRhLmRhdGEpO1xyXG4gICAgICAgICAgICA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1lc3NhZ2Uge1xyXG4gICAgICAgIHJldHVybiAoXHJcbiAgICAgICAgICAgIGlucHV0Lmhhc093blByb3BlcnR5KCd0eXBlJykgJiYgaW5wdXQuaGFzT3duUHJvcGVydHkoJ2RhdGEnKSAmJiBpbnB1dC5oYXNPd25Qcm9wZXJ0eSgncmVxdWVzdElkJylcclxuICAgICAgICApO1xyXG4gICAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
export class FacetValueChipComponent {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.removable = true;
|
|
5
|
-
this.displayFacetName = true;
|
|
6
|
-
this.remove = new EventEmitter();
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
FacetValueChipComponent.decorators = [
|
|
10
|
-
{ type: Component, args: [{
|
|
11
|
-
selector: 'vdr-facet-value-chip',
|
|
12
|
-
template: "<vdr-chip\r\n [icon]=\"removable ? 'times' : undefined\"\r\n [colorFrom]=\"facetValue.facet.name\"\r\n (iconClick)=\"remove.emit()\"\r\n [title]=\"facetValue.facet.name + ' - ' + facetValue.name\"\r\n>\r\n <span *ngIf=\"displayFacetName\" class=\"facet-name\">{{ facetValue.facet.name }}</span>\r\n {{ facetValue.name }}\r\n</vdr-chip>\r\n",
|
|
13
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
|
-
styles: [":host{display:inline-block}.facet-name{color:var(--color-grey-100);text-transform:uppercase;font-size:10px;margin-right:3px;height:11px}\n"]
|
|
15
|
-
},] }
|
|
16
|
-
];
|
|
17
|
-
FacetValueChipComponent.propDecorators = {
|
|
18
|
-
facetValue: [{ type: Input }],
|
|
19
|
-
removable: [{ type: Input }],
|
|
20
|
-
displayFacetName: [{ type: Input }],
|
|
21
|
-
remove: [{ type: Output }]
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJz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xcclxuICAgIHRlbXBsYXRlVXJsOiAnLi9mYWNldC12YWx1ZS1jaGlwLmNvbXBvbmVudC5odG1sJyxcclxuICAgIHN0eWxlVXJsczogWycuL2ZhY2V0LXZhbHVlLWNoaXAuY29tcG9uZW50LnNjc3MnXSxcclxuICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgRmFjZXRWYWx1ZUNoaXBDb21wb25lbnQge1xyXG4gICAgQElucHV0KCkgZmFjZXRWYWx1ZTogRmFjZXRWYWx1ZS5GcmFnbWVudDtcclxuICAgIEBJbnB1dCgpIHJlbW92YWJsZSA9IHRydWU7XHJcbiAgICBASW5wdXQoKSBkaXNwbGF5RmFjZXROYW1lID0gdHJ1ZTtcclxuICAgIEBPdXRwdXQoKSByZW1vdmUgPSBuZXcgRXZlbnRFbWl0dGVyPHZvaWQ+KCk7XHJcbn1cclxuIl19
|
package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewChild, } from '@angular/core';
|
|
2
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
-
import { NgSelectComponent } from '@ng-select/ng-select';
|
|
4
|
-
import { flattenFacetValues } from '../../../common/utilities/flatten-facet-values';
|
|
5
|
-
import { DataService } from '../../../data/providers/data.service';
|
|
6
|
-
/**
|
|
7
|
-
* @description
|
|
8
|
-
* A form control for selecting facet values.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```HTML
|
|
12
|
-
* <vdr-facet-value-selector
|
|
13
|
-
* [facets]="facets"
|
|
14
|
-
* (selectedValuesChange)="selectedValues = $event"
|
|
15
|
-
* ></vdr-facet-value-selector>
|
|
16
|
-
* ```
|
|
17
|
-
* The `facets` input should be provided from the parent component
|
|
18
|
-
* like this:
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```TypeScript
|
|
22
|
-
* this.facets = this.dataService
|
|
23
|
-
* .facet.getAllFacets()
|
|
24
|
-
* .mapSingle(data => data.facets.items);
|
|
25
|
-
* ```
|
|
26
|
-
* @docsCategory components
|
|
27
|
-
*/
|
|
28
|
-
export class FacetValueSelectorComponent {
|
|
29
|
-
constructor(dataService) {
|
|
30
|
-
this.dataService = dataService;
|
|
31
|
-
this.selectedValuesChange = new EventEmitter();
|
|
32
|
-
this.readonly = false;
|
|
33
|
-
this.facetValues = [];
|
|
34
|
-
this.disabled = false;
|
|
35
|
-
this.toSelectorItem = (facetValue) => {
|
|
36
|
-
return {
|
|
37
|
-
name: facetValue.name,
|
|
38
|
-
facetName: facetValue.facet.name,
|
|
39
|
-
id: facetValue.id,
|
|
40
|
-
value: facetValue,
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
ngOnInit() {
|
|
45
|
-
this.facetValues = flattenFacetValues(this.facets).map(this.toSelectorItem);
|
|
46
|
-
}
|
|
47
|
-
onChange(selected) {
|
|
48
|
-
if (this.readonly) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
this.selectedValuesChange.emit(selected.map(s => s.value));
|
|
52
|
-
if (this.onChangeFn) {
|
|
53
|
-
this.onChangeFn(JSON.stringify(selected.map(s => s.id)));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
registerOnChange(fn) {
|
|
57
|
-
this.onChangeFn = fn;
|
|
58
|
-
}
|
|
59
|
-
registerOnTouched(fn) {
|
|
60
|
-
this.onTouchFn = fn;
|
|
61
|
-
}
|
|
62
|
-
setDisabledState(isDisabled) {
|
|
63
|
-
this.disabled = isDisabled;
|
|
64
|
-
}
|
|
65
|
-
focus() {
|
|
66
|
-
this.ngSelect.focus();
|
|
67
|
-
}
|
|
68
|
-
writeValue(obj) {
|
|
69
|
-
if (typeof obj === 'string') {
|
|
70
|
-
try {
|
|
71
|
-
const facetIds = JSON.parse(obj);
|
|
72
|
-
this.value = facetIds;
|
|
73
|
-
}
|
|
74
|
-
catch (err) {
|
|
75
|
-
// TODO: log error
|
|
76
|
-
throw err;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
else if (Array.isArray(obj)) {
|
|
80
|
-
const isIdArray = (input) => input.every(i => typeof i === 'number' || typeof i === 'string');
|
|
81
|
-
if (isIdArray(obj)) {
|
|
82
|
-
this.value = obj.map(fv => fv.toString());
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
this.value = obj.map(fv => fv.id);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
FacetValueSelectorComponent.decorators = [
|
|
91
|
-
{ type: Component, args: [{
|
|
92
|
-
selector: 'vdr-facet-value-selector',
|
|
93
|
-
template: "<ng-select\r\n [items]=\"facetValues\"\r\n [addTag]=\"false\"\r\n [hideSelected]=\"true\"\r\n bindValue=\"id\"\r\n multiple=\"true\"\r\n appendTo=\"body\"\r\n bindLabel=\"name\"\r\n [disabled]=\"disabled || readonly\"\r\n [ngModel]=\"value\"\r\n (change)=\"onChange($event)\"\r\n>\r\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <vdr-facet-value-chip\r\n [facetValue]=\"item.value\"\r\n [removable]=\"!readonly\"\r\n (remove)=\"clear(item)\"\r\n ></vdr-facet-value-chip>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\">\r\n <vdr-facet-value-chip [facetValue]=\"item.value\" [removable]=\"false\"></vdr-facet-value-chip>\r\n </ng-template>\r\n</ng-select>\r\n",
|
|
94
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
95
|
-
providers: [
|
|
96
|
-
{
|
|
97
|
-
provide: NG_VALUE_ACCESSOR,
|
|
98
|
-
useExisting: FacetValueSelectorComponent,
|
|
99
|
-
multi: true,
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
styles: [":host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background:none;margin:0}:host ::ng-deep .ng-dropdown-panel-items div.ng-option:last-child{display:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border:none;padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-left:8px}\n"]
|
|
103
|
-
},] }
|
|
104
|
-
];
|
|
105
|
-
FacetValueSelectorComponent.ctorParameters = () => [
|
|
106
|
-
{ type: DataService }
|
|
107
|
-
];
|
|
108
|
-
FacetValueSelectorComponent.propDecorators = {
|
|
109
|
-
selectedValuesChange: [{ type: Output }],
|
|
110
|
-
facets: [{ type: Input }],
|
|
111
|
-
readonly: [{ type: Input }],
|
|
112
|
-
ngSelect: [{ type: ViewChild, args: [NgSelectComponent,] }]
|
|
113
|
-
};
|
|
114
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjZXQtdmFsdWUtc2VsZWN0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvY29tcG9uZW50cy9mYWNldC12YWx1ZS1zZWxlY3Rvci9mYWNldC12YWx1ZS1zZWxlY3Rvci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNILHVCQUF1QixFQUN2QixTQUFTLEVBQ1QsWUFBWSxFQUNaLEtBQUssRUFFTCxNQUFNLEVBQ04sU0FBUyxHQUNaLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBd0IsaUJBQWlCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUN6RSxPQUFPLEVBQUUsaUJBQWlCLEVBQUU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gICAgICAgICAgICAgIHRocm93IGVycjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheShvYmopKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGlzSWRBcnJheSA9IChpbnB1dDogdW5rbm93bltdKTogaW5wdXQgaXMgQXJyYXk8c3RyaW5nIHwgbnVtYmVyPiA9PlxyXG4gICAgICAgICAgICAgICAgaW5wdXQuZXZlcnkoaSA9PiB0eXBlb2YgaSA9PT0gJ251bWJlcicgfHwgdHlwZW9mIGkgPT09ICdzdHJpbmcnKTtcclxuICAgICAgICAgICAgaWYgKGlzSWRBcnJheShvYmopKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gb2JqLm1hcChmdiA9PiBmdi50b1N0cmluZygpKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSBvYmoubWFwKGZ2ID0+IGZ2LmlkKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIHRvU2VsZWN0b3JJdGVtID0gKGZhY2V0VmFsdWU6IEZhY2V0VmFsdWUuRnJhZ21lbnQpOiBGYWNldFZhbHVlU2VsZXRvckl0ZW0gPT4ge1xyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIG5hbWU6IGZhY2V0VmFsdWUubmFtZSxcclxuICAgICAgICAgICAgZmFjZXROYW1lOiBmYWNldFZhbHVlLmZhY2V0Lm5hbWUsXHJcbiAgICAgICAgICAgIGlkOiBmYWNldFZhbHVlLmlkLFxyXG4gICAgICAgICAgICB2YWx1ZTogZmFjZXRWYWx1ZSxcclxuICAgICAgICB9O1xyXG4gICAgfTtcclxufVxyXG4iXX0=
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewChild, } from '@angular/core';
|
|
2
|
-
export class FocalPointControlComponent {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.visible = false;
|
|
5
|
-
this.editable = false;
|
|
6
|
-
this.fpx = 0.5;
|
|
7
|
-
this.fpy = 0.5;
|
|
8
|
-
this.focalPointChange = new EventEmitter();
|
|
9
|
-
}
|
|
10
|
-
get initialPosition() {
|
|
11
|
-
return this.focalPointToOffset(this.fpx == null ? 0.5 : this.fpx, this.fpy == null ? 0.5 : this.fpy);
|
|
12
|
-
}
|
|
13
|
-
onDragEnded(event) {
|
|
14
|
-
const { x, y } = this.getCurrentFocalPoint();
|
|
15
|
-
this.fpx = x;
|
|
16
|
-
this.fpy = y;
|
|
17
|
-
this.focalPointChange.emit({ x, y });
|
|
18
|
-
}
|
|
19
|
-
getCurrentFocalPoint() {
|
|
20
|
-
const { left: dotLeft, top: dotTop, width, height } = this.dot.nativeElement.getBoundingClientRect();
|
|
21
|
-
const { left: frameLeft, top: frameTop } = this.frame.nativeElement.getBoundingClientRect();
|
|
22
|
-
const xInPx = dotLeft - frameLeft + width / 2;
|
|
23
|
-
const yInPx = dotTop - frameTop + height / 2;
|
|
24
|
-
return {
|
|
25
|
-
x: xInPx / this.width,
|
|
26
|
-
y: yInPx / this.height,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
focalPointToOffset(x, y) {
|
|
30
|
-
const { width, height } = this.dot.nativeElement.getBoundingClientRect();
|
|
31
|
-
return {
|
|
32
|
-
x: x * this.width - width / 2,
|
|
33
|
-
y: y * this.height - height / 2,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
FocalPointControlComponent.decorators = [
|
|
38
|
-
{ type: Component, args: [{
|
|
39
|
-
selector: 'vdr-focal-point-control',
|
|
40
|
-
template: "<ng-content></ng-content>\r\n<div class=\"frame\" #frame [style.width.px]=\"width\" [style.height.px]=\"height\">\r\n <div\r\n #dot\r\n class=\"dot\"\r\n [class.visible]=\"visible\"\r\n [class.editable]=\"editable\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"!editable\"\r\n cdkDragBoundary=\".frame\"\r\n (cdkDragEnded)=\"onDragEnded($event)\"\r\n [cdkDragFreeDragPosition]=\"initialPosition\"\r\n ></div>\r\n</div>\r\n",
|
|
41
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
42
|
-
styles: [":host{position:relative;display:block}.frame{position:absolute;top:0}.dot{width:20px;height:20px;border-radius:50%;border:2px solid white;position:absolute;visibility:hidden;transition:opacity .3s;box-shadow:0 0 4px 4px #0000006b}.dot.visible{visibility:visible;opacity:.7}.dot.editable{cursor:move;visibility:visible;opacity:1;animation:pulse;animation-duration:.5s;animation-iteration-count:4}@keyframes pulse{0%{border-color:#fff}50%{border-color:var(--color-warning-500)}to{border-color:#fff}}\n"]
|
|
43
|
-
},] }
|
|
44
|
-
];
|
|
45
|
-
FocalPointControlComponent.propDecorators = {
|
|
46
|
-
visible: [{ type: Input }],
|
|
47
|
-
editable: [{ type: Input }],
|
|
48
|
-
width: [{ type: HostBinding, args: ['style.width.px',] }, { type: Input }],
|
|
49
|
-
height: [{ type: HostBinding, args: ['style.height.px',] }, { type: Input }],
|
|
50
|
-
fpx: [{ type: Input }],
|
|
51
|
-
fpy: [{ type: Input }],
|
|
52
|
-
focalPointChange: [{ type: Output }],
|
|
53
|
-
frame: [{ type: ViewChild, args: ['frame', { static: true },] }],
|
|
54
|
-
dot: [{ type: ViewChild, args: ['dot', { static: true },] }]
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jYWwtcG9pbnQtY29udHJvbC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2ZvY2FsLXBvaW50LWNvbnRyb2wvZm9jYWwtcG9pbnQtY29udHJvbC5jb21w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AgICAgICAgICB4OiB4ICogdGhpcy53aWR0aCAtIHdpZHRoIC8gMixcclxuICAgICAgICAgICAgeTogeSAqIHRoaXMuaGVpZ2h0IC0gaGVpZ2h0IC8gMixcclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, Optional } from '@angular/core';
|
|
2
|
-
import { NgControl } from '@angular/forms';
|
|
3
|
-
// tslint:disable:directive-selector
|
|
4
|
-
export class FormFieldControlDirective {
|
|
5
|
-
constructor(elementRef, formControlName) {
|
|
6
|
-
this.elementRef = elementRef;
|
|
7
|
-
this.formControlName = formControlName;
|
|
8
|
-
}
|
|
9
|
-
get valid() {
|
|
10
|
-
return !!this.formControlName && !!this.formControlName.valid;
|
|
11
|
-
}
|
|
12
|
-
get touched() {
|
|
13
|
-
return !!this.formControlName && !!this.formControlName.touched;
|
|
14
|
-
}
|
|
15
|
-
setReadOnly(value) {
|
|
16
|
-
const input = this.elementRef.nativeElement;
|
|
17
|
-
if (isSelectElement(input)) {
|
|
18
|
-
input.disabled = value;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
input.readOnly = value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
FormFieldControlDirective.decorators = [
|
|
26
|
-
{ type: Directive, args: [{ selector: 'input, textarea, select' },] }
|
|
27
|
-
];
|
|
28
|
-
FormFieldControlDirective.ctorParameters = () => [
|
|
29
|
-
{ type: ElementRef },
|
|
30
|
-
{ type: NgControl, decorators: [{ type: Optional }] }
|
|
31
|
-
];
|
|
32
|
-
function isSelectElement(value) {
|
|
33
|
-
return value.hasOwnProperty('selectedIndex');
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC1jb250cm9sLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiL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WNoZWQoKTogYm9vbGVhbiB7XHJcbiAgICAgICAgcmV0dXJuICEhdGhpcy5mb3JtQ29udHJvbE5hbWUgJiYgISF0aGlzLmZvcm1Db250cm9sTmFtZS50b3VjaGVkO1xyXG4gICAgfVxyXG5cclxuICAgIHNldFJlYWRPbmx5KHZhbHVlOiBib29sZWFuKSB7XHJcbiAgICAgICAgY29uc3QgaW5wdXQgPSB0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudDtcclxuICAgICAgICBpZiAoaXNTZWxlY3RFbGVtZW50KGlucHV0KSkge1xyXG4gICAgICAgICAgICBpbnB1dC5kaXNhYmxlZCA9IHZhbHVlO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlucHV0LnJlYWRPbmx5ID0gdmFsdWU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59XHJcblxyXG5mdW5jdGlvbiBpc1NlbGVjdEVsZW1lbnQodmFsdWU6IElucHV0RWxlbWVudCk6IHZhbHVlIGlzIEhUTUxTZWxlY3RFbGVtZW50IHtcclxuICAgIHJldHVybiB2YWx1ZS5oYXNPd25Qcm9wZXJ0eSgnc2VsZWN0ZWRJbmRleCcpO1xyXG59XHJcbiJdfQ==
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Component, ContentChild, Input, } from '@angular/core';
|
|
2
|
-
import { FormFieldControlDirective } from './form-field-control.directive';
|
|
3
|
-
/**
|
|
4
|
-
* A form field wrapper which handles the correct layout and validation error display for
|
|
5
|
-
* a form control.
|
|
6
|
-
*/
|
|
7
|
-
export class FormFieldComponent {
|
|
8
|
-
constructor() {
|
|
9
|
-
/**
|
|
10
|
-
* A map of error message codes (required, pattern etc.) to messages to display
|
|
11
|
-
* when those errors are present.
|
|
12
|
-
*/
|
|
13
|
-
this.errors = {};
|
|
14
|
-
/**
|
|
15
|
-
* If set to true, the input will be initially set to "readOnly", and an "edit" button
|
|
16
|
-
* will be displayed which allows the field to be edited.
|
|
17
|
-
*/
|
|
18
|
-
this.readOnlyToggle = false;
|
|
19
|
-
this.isReadOnly = false;
|
|
20
|
-
}
|
|
21
|
-
ngOnInit() {
|
|
22
|
-
if (this.readOnlyToggle) {
|
|
23
|
-
this.isReadOnly = true;
|
|
24
|
-
this.setReadOnly(true);
|
|
25
|
-
}
|
|
26
|
-
this.isReadOnly = this.readOnlyToggle;
|
|
27
|
-
}
|
|
28
|
-
setReadOnly(value) {
|
|
29
|
-
this.formFieldControl.setReadOnly(value);
|
|
30
|
-
this.isReadOnly = value;
|
|
31
|
-
}
|
|
32
|
-
getErrorMessage() {
|
|
33
|
-
if (!this.formFieldControl || !this.formFieldControl.formControlName) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const errors = this.formFieldControl.formControlName.errors;
|
|
37
|
-
if (errors) {
|
|
38
|
-
for (const errorKey of Object.keys(errors)) {
|
|
39
|
-
if (this.errors[errorKey]) {
|
|
40
|
-
return this.errors[errorKey];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
FormFieldComponent.decorators = [
|
|
47
|
-
{ type: Component, args: [{
|
|
48
|
-
selector: 'vdr-form-field',
|
|
49
|
-
template: "<div\r\n class=\"form-group\"\r\n [class.no-label]=\"!label\"\r\n [class.clr-error]=\"formFieldControl?.formControlName?.invalid\"\r\n>\r\n <label *ngIf=\"label\" [for]=\"for\" class=\"clr-control-label\">\r\n {{ label }}\r\n <vdr-help-tooltip *ngIf=\"tooltip\" [content]=\"tooltip\"></vdr-help-tooltip>\r\n </label>\r\n <label\r\n [for]=\"for\"\r\n aria-haspopup=\"true\"\r\n role=\"tooltip\"\r\n [class.invalid]=\"formFieldControl?.touched && !formFieldControl?.valid\"\r\n class=\"tooltip tooltip-validation tooltip-sm tooltip-top-left\"\r\n >\r\n <div class=\"input-row\" [class.has-toggle]=\"readOnlyToggle\">\r\n <ng-content></ng-content>\r\n <button\r\n *ngIf=\"readOnlyToggle\"\r\n type=\"button\"\r\n [disabled]=\"!isReadOnly\"\r\n [title]=\"'common.edit-field' | translate\"\r\n class=\"btn btn-icon edit-button\"\r\n (click)=\"setReadOnly(false)\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n </button>\r\n </div>\r\n <div class=\"clr-subtext\" *ngIf=\"getErrorMessage()\">{{ getErrorMessage() }}</div>\r\n <span class=\"tooltip-content\">{{ label }} is required.</span>\r\n </label>\r\n</div>\r\n",
|
|
50
|
-
styles: [":host{display:block}:host .form-group>label:first-child{top:6px}:host .form-group>label:nth-of-type(2){flex:1;max-width:20rem}:host .form-group>label:nth-of-type(2) ::ng-deep>*:not(.tooltip-content){width:100%}:host .form-group .tooltip-validation{height:initial}:host .form-group.no-label{margin:-6px 0 0;padding:0;justify-content:center}:host .form-group.no-label>label{position:relative;justify-content:center}:host .form-group.no-label .input-row{justify-content:center}:host .input-row{display:flex}:host .input-row ::ng-deep input{flex:1}:host .input-row ::ng-deep input[disabled]{background-color:var(--color-component-bg-200)}:host .input-row button.edit-button{margin:0;border-radius:0 3px 3px 0}:host .input-row.has-toggle ::ng-deep input{border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right:none}:host .input-row ::ng-deep clr-toggle-wrapper{margin-top:8px}.tooltip.tooltip-validation.invalid:before{position:absolute;content:\"\";height:.666667rem;width:.666667rem;top:.125rem;right:.25rem;background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20version%3D%221.1%22%20viewBox%3D%225%205%2026%2026%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%3E%3Cstyle%3E.clr-i-outline%7Bfill%3A%23a32100%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctitle%3Eexclamation-circle-line%3C%2Ftitle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20class%3D%22clr-i-outline%20clr-i-outline-path-1%22%20d%3D%22M18%2C6A12%2C12%2C0%2C1%2C0%2C30%2C18%2C12%2C12%2C0%2C0%2C0%2C18%2C6Zm0%2C22A10%2C10%2C0%2C1%2C1%2C28%2C18%2C10%2C10%2C0%2C0%2C1%2C18%2C28Z%22%3E%3C%2Fpath%3E%3Cpath%20class%3D%22clr-i-outline%20clr-i-outline-path-2%22%20d%3D%22M18%2C20.07a1.3%2C1.3%2C0%2C0%2C1-1.3-1.3v-6a1.3%2C1.3%2C0%2C1%2C1%2C2.6%2C0v6A1.3%2C1.3%2C0%2C0%2C1%2C18%2C20.07Z%22%3E%3C%2Fpath%3E%3Ccircle%20class%3D%22clr-i-outline%20clr-i-outline-path-3%22%20cx%3D%2217.95%22%20cy%3D%2223.02%22%20r%3D%221.5%22%3E%3C%2Fcircle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fsvg%3E);background-repeat:no-repeat;background-size:contain;vertical-align:middle;margin:0}.tooltip.tooltip-sm>.tooltip-content,.tooltip .tooltip-content.tooltip-sm{width:5rem}.tooltip:hover>.tooltip-content{right:12px;margin-bottom:0}.tooltip:not(.invalid):hover>.tooltip-content{display:none}\n"]
|
|
51
|
-
},] }
|
|
52
|
-
];
|
|
53
|
-
FormFieldComponent.propDecorators = {
|
|
54
|
-
label: [{ type: Input }],
|
|
55
|
-
for: [{ type: Input }],
|
|
56
|
-
tooltip: [{ type: Input }],
|
|
57
|
-
errors: [{ type: Input }],
|
|
58
|
-
readOnlyToggle: [{ type: Input }],
|
|
59
|
-
formFieldControl: [{ type: ContentChild, args: [FormFieldControlDirective, { static: true },] }]
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC5jb21wb25lbnQuanMiLCJzb3V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lLCB7IHN0YXRpYzogdHJ1ZSB9KSBmb3JtRmllbGRDb250cm9sOiBGb3JtRmllbGRDb250cm9sRGlyZWN0aXZlO1xyXG4gICAgaXNSZWFkT25seSA9IGZhbHNlO1xyXG5cclxuICAgIG5nT25Jbml0KCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJlYWRPbmx5VG9nZ2xlKSB7XHJcbiAgICAgICAgICAgIHRoaXMuaXNSZWFkT25seSA9IHRydWU7XHJcbiAgICAgICAgICAgIHRoaXMuc2V0UmVhZE9ubHkodHJ1ZSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuaXNSZWFkT25seSA9IHRoaXMucmVhZE9ubHlUb2dnbGU7XHJcbiAgICB9XHJcblxyXG4gICAgc2V0UmVhZE9ubHkodmFsdWU6IGJvb2xlYW4pIHtcclxuICAgICAgICB0aGlzLmZvcm1GaWVsZENvbnRyb2wuc2V0UmVhZE9ubHkodmFsdWUpO1xyXG4gICAgICAgIHRoaXMuaXNSZWFkT25seSA9IHZhbHVlO1xyXG4gICAgfVxyXG5cclxuICAgIGdldEVycm9yTWVzc2FnZSgpOiBzdHJpbmcgfCB1bmRlZmluZWQge1xyXG4gICAgICAgIGlmICghdGhpcy5mb3JtRmllbGRDb250cm9sIHx8ICF0aGlzLmZvcm1GaWVsZENvbnRyb2wuZm9ybUNvbnRyb2xOYW1lKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgZXJyb3JzID0gdGhpcy5mb3JtRmllbGRDb250cm9sLmZvcm1Db250cm9sTmFtZS5lcnJvcnM7XHJcbiAgICAgICAgaWYgKGVycm9ycykge1xyXG4gICAgICAgICAgICBmb3IgKGNvbnN0IGVycm9yS2V5IG9mIE9iamVjdC5rZXlzKGVycm9ycykpIHtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmVycm9yc1tlcnJvcktleV0pIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5lcnJvcnNbZXJyb3JLZXldO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Like the {@link FormFieldComponent} but for content which is not a form control. Used
|
|
4
|
-
* to keep a consistent layout with other form fields in the form.
|
|
5
|
-
*/
|
|
6
|
-
export class FormItemComponent {
|
|
7
|
-
}
|
|
8
|
-
FormItemComponent.decorators = [
|
|
9
|
-
{ type: Component, args: [{
|
|
10
|
-
selector: 'vdr-form-item',
|
|
11
|
-
template: "<div class=\"form-group\">\r\n <label class=\"clr-control-label\">{{ label }}</label>\r\n <div class=\"content\"><ng-content></ng-content></div>\r\n</div>\r\n",
|
|
12
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
-
styles: [":host{display:block}:host .form-group>.content{flex:1;max-width:20rem}\n"]
|
|
14
|
-
},] }
|
|
15
|
-
];
|
|
16
|
-
FormItemComponent.propDecorators = {
|
|
17
|
-
label: [{ type: Input }]
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvZm9ybS1pdGVtL2Zvcm0taXRlbS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFMUU7OztHQUdHO0FBT0gsTUFBTSxPQUFPLGlCQU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