@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
package/esm2020/core/shared/components/facet-value-selector/facet-value-selector.component.mjs
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
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 * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../../../data/providers/data.service";
|
|
7
|
+
import * as i2 from "@ng-select/ng-select";
|
|
8
|
+
import * as i3 from "../facet-value-chip/facet-value-chip.component";
|
|
9
|
+
import * as i4 from "@angular/forms";
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
* A form control for selecting facet values.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```HTML
|
|
16
|
+
* <vdr-facet-value-selector
|
|
17
|
+
* [facets]="facets"
|
|
18
|
+
* (selectedValuesChange)="selectedValues = $event"
|
|
19
|
+
* ></vdr-facet-value-selector>
|
|
20
|
+
* ```
|
|
21
|
+
* The `facets` input should be provided from the parent component
|
|
22
|
+
* like this:
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```TypeScript
|
|
26
|
+
* this.facets = this.dataService
|
|
27
|
+
* .facet.getAllFacets()
|
|
28
|
+
* .mapSingle(data => data.facets.items);
|
|
29
|
+
* ```
|
|
30
|
+
* @docsCategory components
|
|
31
|
+
*/
|
|
32
|
+
export class FacetValueSelectorComponent {
|
|
33
|
+
constructor(dataService) {
|
|
34
|
+
this.dataService = dataService;
|
|
35
|
+
this.selectedValuesChange = new EventEmitter();
|
|
36
|
+
this.readonly = false;
|
|
37
|
+
this.facetValues = [];
|
|
38
|
+
this.disabled = false;
|
|
39
|
+
this.toSelectorItem = (facetValue) => {
|
|
40
|
+
return {
|
|
41
|
+
name: facetValue.name,
|
|
42
|
+
facetName: facetValue.facet.name,
|
|
43
|
+
id: facetValue.id,
|
|
44
|
+
value: facetValue,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
ngOnInit() {
|
|
49
|
+
this.facetValues = flattenFacetValues(this.facets).map(this.toSelectorItem);
|
|
50
|
+
}
|
|
51
|
+
onChange(selected) {
|
|
52
|
+
if (this.readonly) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
this.selectedValuesChange.emit(selected.map(s => s.value));
|
|
56
|
+
if (this.onChangeFn) {
|
|
57
|
+
this.onChangeFn(JSON.stringify(selected.map(s => s.id)));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
registerOnChange(fn) {
|
|
61
|
+
this.onChangeFn = fn;
|
|
62
|
+
}
|
|
63
|
+
registerOnTouched(fn) {
|
|
64
|
+
this.onTouchFn = fn;
|
|
65
|
+
}
|
|
66
|
+
setDisabledState(isDisabled) {
|
|
67
|
+
this.disabled = isDisabled;
|
|
68
|
+
}
|
|
69
|
+
focus() {
|
|
70
|
+
this.ngSelect.focus();
|
|
71
|
+
}
|
|
72
|
+
writeValue(obj) {
|
|
73
|
+
if (typeof obj === 'string') {
|
|
74
|
+
try {
|
|
75
|
+
const facetIds = JSON.parse(obj);
|
|
76
|
+
this.value = facetIds;
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
// TODO: log error
|
|
80
|
+
throw err;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else if (Array.isArray(obj)) {
|
|
84
|
+
const isIdArray = (input) => input.every(i => typeof i === 'number' || typeof i === 'string');
|
|
85
|
+
if (isIdArray(obj)) {
|
|
86
|
+
this.value = obj.map(fv => fv.toString());
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.value = obj.map(fv => fv.id);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
FacetValueSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FacetValueSelectorComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
FacetValueSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FacetValueSelectorComponent, selector: "vdr-facet-value-selector", inputs: { facets: "facets", readonly: "readonly" }, outputs: { selectedValuesChange: "selectedValuesChange" }, providers: [
|
|
96
|
+
{
|
|
97
|
+
provide: NG_VALUE_ACCESSOR,
|
|
98
|
+
useExisting: FacetValueSelectorComponent,
|
|
99
|
+
multi: true,
|
|
100
|
+
},
|
|
101
|
+
], viewQueries: [{ propertyName: "ngSelect", first: true, predicate: NgSelectComponent, descendants: true }], ngImport: i0, 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", 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"], components: [{ type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: i3.FacetValueChipComponent, selector: "vdr-facet-value-chip", inputs: ["facetValue", "removable", "displayFacetName"], outputs: ["remove"] }], directives: [{ type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FacetValueSelectorComponent, decorators: [{
|
|
103
|
+
type: Component,
|
|
104
|
+
args: [{ selector: 'vdr-facet-value-selector', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
105
|
+
{
|
|
106
|
+
provide: NG_VALUE_ACCESSOR,
|
|
107
|
+
useExisting: FacetValueSelectorComponent,
|
|
108
|
+
multi: true,
|
|
109
|
+
},
|
|
110
|
+
], 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", 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"] }]
|
|
111
|
+
}], ctorParameters: function () { return [{ type: i1.DataService }]; }, propDecorators: { selectedValuesChange: [{
|
|
112
|
+
type: Output
|
|
113
|
+
}], facets: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], readonly: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], ngSelect: [{
|
|
118
|
+
type: ViewChild,
|
|
119
|
+
args: [NgSelectComponent]
|
|
120
|
+
}] } });
|
|
121
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjZXQtdmFsdWUtc2VsZWN0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZW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uXHJcbiAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQ6IGJvb2xlYW4pOiB2b2lkIHtcclxuICAgICAgICB0aGlzLmRpc2FibGVkID0gaXNEaXNhYmxlZDtcclxuICAgIH1cclxuXHJcbiAgICBmb2N1cygpIHtcclxuICAgICAgICB0aGlzLm5nU2VsZWN0LmZvY3VzKCk7XHJcbiAgICB9XHJcblxyXG4gICAgd3JpdGVWYWx1ZShvYmo6IHN0cmluZyB8IEZhY2V0VmFsdWVGcmFnbWVudFtdIHwgQXJyYXk8c3RyaW5nIHwgbnVtYmVyPiB8IG51bGwpOiB2b2lkIHtcclxuICAgICAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ3N0cmluZycpIHtcclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGZhY2V0SWRzID0gSlNPTi5wYXJzZShvYmopIGFzIHN0cmluZ1tdO1xyXG4gICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IGZhY2V0SWRzO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChlcnI6IGFueSkge1xyXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogbG9nIGVycm9yXHJcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xyXG4gICAgICAgICAgICBjb25zdCBpc0lkQXJyYXkgPSAoaW5wdXQ6IHVua25vd25bXSk6IGlucHV0IGlzIEFycmF5PHN0cmluZyB8IG51bWJlcj4gPT5cclxuICAgICAgICAgICAgICAgIGlucHV0LmV2ZXJ5KGkgPT4gdHlwZW9mIGkgPT09ICdudW1iZXInIHx8IHR5cGVvZiBpID09PSAnc3RyaW5nJyk7XHJcbiAgICAgICAgICAgIGlmIChpc0lkQXJyYXkob2JqKSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IG9iai5tYXA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I+XHJcbiAgICAgICAgPHZkci1mYWNldC12YWx1ZS1jaGlwXHJcbiAgICAgICAgICAgIFtmYWNldFZhbHVlXT1cIml0ZW0udmFsdWVcIlxyXG4gICAgICAgICAgICBbcmVtb3ZhYmxlXT1cIiFyZWFkb25seVwiXHJcbiAgICAgICAgICAgIChyZW1vdmUpPVwiY2xlYXIoaXRlbSlcIlxyXG4gICAgICAgID48L3Zkci1mYWNldC12YWx1ZS1jaGlwPlxyXG4gICAgPC9uZy10ZW1wbGF0ZT5cclxuICAgIDxuZy10ZW1wbGF0ZSBuZy1vcHRpb24tdG1wIGxldC1pdGVtPVwiaXRlbVwiPlxyXG4gICAgICAgIDx2ZHItZmFjZXQtdmFsdWUtY2hpcCBbZmFjZXRWYWx1ZV09XCJpdGVtLnZhbHVlXCIgW3JlbW92YWJsZV09XCJmYWxzZVwiPjwvdmRyLWZhY2V0LXZhbHVlLWNoaXA+XHJcbiAgICA8L25nLXRlbXBsYXRlPlxyXG48L25nLXNlbGVjdD5cclxuIl19
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewChild, } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/cdk/drag-drop";
|
|
4
|
+
export class FocalPointControlComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.visible = false;
|
|
7
|
+
this.editable = false;
|
|
8
|
+
this.fpx = 0.5;
|
|
9
|
+
this.fpy = 0.5;
|
|
10
|
+
this.focalPointChange = new EventEmitter();
|
|
11
|
+
}
|
|
12
|
+
get initialPosition() {
|
|
13
|
+
return this.focalPointToOffset(this.fpx == null ? 0.5 : this.fpx, this.fpy == null ? 0.5 : this.fpy);
|
|
14
|
+
}
|
|
15
|
+
onDragEnded(event) {
|
|
16
|
+
const { x, y } = this.getCurrentFocalPoint();
|
|
17
|
+
this.fpx = x;
|
|
18
|
+
this.fpy = y;
|
|
19
|
+
this.focalPointChange.emit({ x, y });
|
|
20
|
+
}
|
|
21
|
+
getCurrentFocalPoint() {
|
|
22
|
+
const { left: dotLeft, top: dotTop, width, height } = this.dot.nativeElement.getBoundingClientRect();
|
|
23
|
+
const { left: frameLeft, top: frameTop } = this.frame.nativeElement.getBoundingClientRect();
|
|
24
|
+
const xInPx = dotLeft - frameLeft + width / 2;
|
|
25
|
+
const yInPx = dotTop - frameTop + height / 2;
|
|
26
|
+
return {
|
|
27
|
+
x: xInPx / this.width,
|
|
28
|
+
y: yInPx / this.height,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
focalPointToOffset(x, y) {
|
|
32
|
+
const { width, height } = this.dot.nativeElement.getBoundingClientRect();
|
|
33
|
+
return {
|
|
34
|
+
x: x * this.width - width / 2,
|
|
35
|
+
y: y * this.height - height / 2,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
FocalPointControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FocalPointControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
+
FocalPointControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FocalPointControlComponent, selector: "vdr-focal-point-control", inputs: { visible: "visible", editable: "editable", width: "width", height: "height", fpx: "fpx", fpy: "fpy" }, outputs: { focalPointChange: "focalPointChange" }, host: { properties: { "style.width.px": "this.width", "style.height.px": "this.height" } }, viewQueries: [{ propertyName: "frame", first: true, predicate: ["frame"], descendants: true, static: true }, { propertyName: "dot", first: true, predicate: ["dot"], descendants: true, static: true }], ngImport: i0, 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", 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"], directives: [{ type: i1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FocalPointControlComponent, decorators: [{
|
|
42
|
+
type: Component,
|
|
43
|
+
args: [{ selector: 'vdr-focal-point-control', changeDetection: ChangeDetectionStrategy.OnPush, 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", 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"] }]
|
|
44
|
+
}], propDecorators: { visible: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], editable: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], width: [{
|
|
49
|
+
type: HostBinding,
|
|
50
|
+
args: ['style.width.px']
|
|
51
|
+
}, {
|
|
52
|
+
type: Input
|
|
53
|
+
}], height: [{
|
|
54
|
+
type: HostBinding,
|
|
55
|
+
args: ['style.height.px']
|
|
56
|
+
}, {
|
|
57
|
+
type: Input
|
|
58
|
+
}], fpx: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], fpy: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], focalPointChange: [{
|
|
63
|
+
type: Output
|
|
64
|
+
}], frame: [{
|
|
65
|
+
type: ViewChild,
|
|
66
|
+
args: ['frame', { static: true }]
|
|
67
|
+
}], dot: [{
|
|
68
|
+
type: ViewChild,
|
|
69
|
+
args: ['dot', { static: true }]
|
|
70
|
+
}] } });
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jYWwtcG9pbnQtY29udHJvbC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2ZvY2FsLXBvaW50LWNvbnRyb2wvZm9jYWwtcG9pbnQtY29udHJvbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21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clxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGZvY2FsUG9pbnRUb09mZnNldCh4OiBudW1iZXIsIHk6IG51bWJlcik6IFBvaW50IHtcclxuICAgICAgICBjb25zdCB7IHdpZHRoLCBoZWlnaHQgfSA9IHRoaXMuZG90Lm5hdGl2ZUVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgeDogeCAqIHRoaXMud2lkdGggLSB3aWR0aCAvIDIsXHJcbiAgICAgICAgICAgIHk6IHkgKiB0aGlzLmhlaWdodCAtIGhlaWdodCAvIDIsXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufVxyXG4iLCI8bmctY29udGVudD48L25nLWNvbnRlbnQ+XHJcbjxkaXYgY2xhc3M9XCJmcmFtZVwiICNmcmFtZSBbc3R5bGUud2lkdGgucHhdPVwid2lkdGhcIiBbc3R5bGUuaGVpZ2h0LnB4XT1cImhlaWdodFwiPlxyXG4gICAgPGRpdlxyXG4gICAgICAgICNkb3RcclxuICAgICAgICBjbGFzcz1cImRvdFwiXHJcbiAgICAgICAgW2NsYXNzLnZpc2libGVdPVwidmlzaWJsZVwiXHJcbiAgICAgICAgW2NsYXNzLmVkaXRhYmxlXT1cImVkaXRhYmxlXCJcclxuICAgICAgICBjZGtEcmFnXHJcbiAgICAgICAgW2Nka0RyYWdEaXNhYmxlZF09XCIhZWRpdGFibGVcIlxyXG4gICAgICAgIGNka0RyYWdCb3VuZGFyeT1cIi5mcmFtZVwiXHJcbiAgICAgICAgKGNka0RyYWdFbmRlZCk9XCJvbkRyYWdFbmRlZCgkZXZlbnQpXCJcclxuICAgICAgICBbY2RrRHJhZ0ZyZWVEcmFnUG9zaXRpb25dPVwiaW5pdGlhbFBvc2l0aW9uXCJcclxuICAgID48L2Rpdj5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Directive, Optional } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/forms";
|
|
4
|
+
// tslint:disable:directive-selector
|
|
5
|
+
export class FormFieldControlDirective {
|
|
6
|
+
constructor(elementRef, formControlName) {
|
|
7
|
+
this.elementRef = elementRef;
|
|
8
|
+
this.formControlName = formControlName;
|
|
9
|
+
}
|
|
10
|
+
get valid() {
|
|
11
|
+
return !!this.formControlName && !!this.formControlName.valid;
|
|
12
|
+
}
|
|
13
|
+
get touched() {
|
|
14
|
+
return !!this.formControlName && !!this.formControlName.touched;
|
|
15
|
+
}
|
|
16
|
+
setReadOnly(value) {
|
|
17
|
+
const input = this.elementRef.nativeElement;
|
|
18
|
+
if (isSelectElement(input)) {
|
|
19
|
+
input.disabled = value;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
input.readOnly = value;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
FormFieldControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldControlDirective, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
|
+
FormFieldControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FormFieldControlDirective, selector: "input, textarea, select", ngImport: i0 });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldControlDirective, decorators: [{
|
|
29
|
+
type: Directive,
|
|
30
|
+
args: [{ selector: 'input, textarea, select' }]
|
|
31
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.NgControl, decorators: [{
|
|
32
|
+
type: Optional
|
|
33
|
+
}] }]; } });
|
|
34
|
+
function isSelectElement(value) {
|
|
35
|
+
return value.hasOwnProperty('selectedIndex');
|
|
36
|
+
}
|
|
37
|
+
//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dGhpcy5mb3JtQ29udHJvbE5hbWUudmFsaWQ7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0IHRvdWNoZWQoKTogYm9vbGVhbiB7XHJcbiAgICAgICAgcmV0dXJuICEhdGhpcy5mb3JtQ29udHJvbE5hbWUgJiYgISF0aGlzLmZvcm1Db250cm9sTmFtZS50b3VjaGVkO1xyXG4gICAgfVxyXG5cclxuICAgIHNldFJlYWRPbmx5KHZhbHVlOiBib29sZWFuKSB7XHJcbiAgICAgICAgY29uc3QgaW5wdXQgPSB0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudDtcclxuICAgICAgICBpZiAoaXNTZWxlY3RFbGVtZW50KGlucHV0KSkge1xyXG4gICAgICAgICAgICBpbnB1dC5kaXNhYmxlZCA9IHZhbHVlO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlucHV0LnJlYWRPbmx5ID0gdmFsdWU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59XHJcblxyXG5mdW5jdGlvbiBpc1NlbGVjdEVsZW1lbnQodmFsdWU6IElucHV0RWxlbWVudCk6IHZhbHVlIGlzIEhUTUxTZWxlY3RFbGVtZW50IHtcclxuICAgIHJldHVybiB2YWx1ZS5oYXNPd25Qcm9wZXJ0eSgnc2VsZWN0ZWRJbmRleCcpO1xyXG59XHJcbiJdfQ==
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Component, ContentChild, Input, } from '@angular/core';
|
|
2
|
+
import { FormFieldControlDirective } from './form-field-control.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../help-tooltip/help-tooltip.component";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "@clr/angular";
|
|
7
|
+
import * as i4 from "@ngx-translate/core";
|
|
8
|
+
/**
|
|
9
|
+
* A form field wrapper which handles the correct layout and validation error display for
|
|
10
|
+
* a form control.
|
|
11
|
+
*/
|
|
12
|
+
export class FormFieldComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
/**
|
|
15
|
+
* A map of error message codes (required, pattern etc.) to messages to display
|
|
16
|
+
* when those errors are present.
|
|
17
|
+
*/
|
|
18
|
+
this.errors = {};
|
|
19
|
+
/**
|
|
20
|
+
* If set to true, the input will be initially set to "readOnly", and an "edit" button
|
|
21
|
+
* will be displayed which allows the field to be edited.
|
|
22
|
+
*/
|
|
23
|
+
this.readOnlyToggle = false;
|
|
24
|
+
this.isReadOnly = false;
|
|
25
|
+
}
|
|
26
|
+
ngOnInit() {
|
|
27
|
+
if (this.readOnlyToggle) {
|
|
28
|
+
this.isReadOnly = true;
|
|
29
|
+
this.setReadOnly(true);
|
|
30
|
+
}
|
|
31
|
+
this.isReadOnly = this.readOnlyToggle;
|
|
32
|
+
}
|
|
33
|
+
setReadOnly(value) {
|
|
34
|
+
this.formFieldControl.setReadOnly(value);
|
|
35
|
+
this.isReadOnly = value;
|
|
36
|
+
}
|
|
37
|
+
getErrorMessage() {
|
|
38
|
+
if (!this.formFieldControl || !this.formFieldControl.formControlName) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const errors = this.formFieldControl.formControlName.errors;
|
|
42
|
+
if (errors) {
|
|
43
|
+
for (const errorKey of Object.keys(errors)) {
|
|
44
|
+
if (this.errors[errorKey]) {
|
|
45
|
+
return this.errors[errorKey];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
FormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormFieldComponent, selector: "vdr-form-field", inputs: { label: "label", for: "for", tooltip: "tooltip", errors: "errors", readOnlyToggle: "readOnlyToggle" }, queries: [{ propertyName: "formFieldControl", first: true, predicate: FormFieldControlDirective, descendants: true, static: true }], ngImport: i0, 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", 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"], components: [{ type: i1.HelpTooltipComponent, selector: "vdr-help-tooltip", inputs: ["content", "position"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { type: i3.ClrIconCustomTag, selector: "clr-icon" }], pipes: { "translate": i4.TranslatePipe } });
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{ selector: 'vdr-form-field', 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", 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"] }]
|
|
56
|
+
}], propDecorators: { label: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], for: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], tooltip: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], errors: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], readOnlyToggle: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], formFieldControl: [{
|
|
67
|
+
type: ContentChild,
|
|
68
|
+
args: [FormFieldControlDirective, { static: true }]
|
|
69
|
+
}] } });
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2Zvcm0tZmllbGQvZm9ybS1maWVsZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2Zvcm0tZm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JcbiAgICAgICAgICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cclxuICAgICAgICAgICAgPGJ1dHRvblxyXG4gICAgICAgICAgICAgICAgKm5nSWY9XCJyZWFkT25seVRvZ2dsZVwiXHJcbiAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcclxuICAgICAgICAgICAgICAgIFtkaXNhYmxlZF09XCIhaXNSZWFkT25seVwiXHJcbiAgICAgICAgICAgICAgICBbdGl0bGVdPVwiJ2NvbW1vbi5lZGl0LWZpZWxkJyB8IHRyYW5zbGF0ZVwiXHJcbiAgICAgICAgICAgICAgICBjbGFzcz1cImJ0biBidG4taWNvbiBlZGl0LWJ1dHRvblwiXHJcbiAgICAgICAgICAgICAgICAoY2xpY2spPVwic2V0UmVhZE9ubHkoZmFsc2UpXCJcclxuICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgPGNsci1pY29uIHNoYXBlPVwiZWRpdFwiPjwvY2xyLWljb24+XHJcbiAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDxkaXYgY2xhc3M9XCJjbHItc3VidGV4dFwiICpuZ0lmPVwiZ2V0RXJyb3JNZXNzYWdlKClcIj57eyBnZXRFcnJvck1lc3NhZ2UoKSB9fTwvZGl2PlxyXG4gICAgICAgIDxzcGFuIGNsYXNzPVwidG9vbHRpcC1jb250ZW50XCI+e3sgbGFiZWwgfX0gaXMgcmVxdWlyZWQuPC9zcGFuPlxyXG4gICAgPC9sYWJlbD5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@clr/angular";
|
|
4
|
+
/**
|
|
5
|
+
* Like the {@link FormFieldComponent} but for content which is not a form control. Used
|
|
6
|
+
* to keep a consistent layout with other form fields in the form.
|
|
7
|
+
*/
|
|
8
|
+
export class FormItemComponent {
|
|
9
|
+
}
|
|
10
|
+
FormItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
FormItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormItemComponent, selector: "vdr-form-item", inputs: { label: "label" }, ngImport: i0, 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", styles: [":host{display:block}:host .form-group>.content{flex:1;max-width:20rem}\n"], directives: [{ type: i1.ClrLabel, selector: "label", inputs: ["for"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormItemComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'vdr-form-item', changeDetection: ChangeDetectionStrategy.OnPush, 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", styles: [":host{display:block}:host .form-group>.content{flex:1;max-width:20rem}\n"] }]
|
|
15
|
+
}], propDecorators: { label: [{
|
|
16
|
+
type: Input
|
|
17
|
+
}] } });
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvZm9ybS1pdGVtL2Zvcm0taXRlbS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2Nv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Zvcm1JdGVtQ29tcG9uZW50IHtcclxuICAgIEBJbnB1dCgpIGxhYmVsOiBzdHJpbmc7XHJcbn1cclxuIiwiPGRpdiBjbGFzcz1cImZvcm0tZ3JvdXBcIj5cclxuICAgIDxsYWJlbCBjbGFzcz1cImNsci1jb250cm9sLWxhYmVsXCI+e3sgbGFiZWwgfX08L2xhYmVsPlxyXG4gICAgPGRpdiBjbGFzcz1cImNvbnRlbnRcIj48bmctY29udGVudD48L25nLWNvbnRlbnQ+PC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../labeled-data/labeled-data.component";
|
|
4
|
+
import * as i2 from "@angular/common";
|
|
5
|
+
import * as i3 from "@clr/angular";
|
|
6
|
+
export class FormattedAddressComponent {
|
|
7
|
+
getCountryName() {
|
|
8
|
+
if (this.isAddressFragment(this.address)) {
|
|
9
|
+
return this.address.country.name;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return this.address.country || '';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
getCustomFields() {
|
|
16
|
+
const customFields = this.address.customFields;
|
|
17
|
+
if (customFields) {
|
|
18
|
+
return Object.entries(customFields)
|
|
19
|
+
.filter(([key]) => key !== '__typename')
|
|
20
|
+
.map(([key, value]) => ({ key, value: value?.toString() ?? '-' }));
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
isAddressFragment(input) {
|
|
27
|
+
return typeof input.country !== 'string';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
FormattedAddressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormattedAddressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
FormattedAddressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormattedAddressComponent, selector: "vdr-formatted-address", inputs: { address: "address" }, ngImport: i0, template: "<ul class=\"address-lines\">\r\n <li *ngIf=\"address.fullName\">{{ address.fullName }}</li>\r\n <li *ngIf=\"address.streetLine1\">{{ address.streetLine1 }}</li>\r\n <li *ngIf=\"address.streetLine2\">{{ address.streetLine2 }}</li>\r\n <li *ngIf=\"address.city\">{{ address.city }}</li>\r\n <li *ngIf=\"address.province\">{{ address.province }}</li>\r\n <li *ngIf=\"address.postalCode\">{{ address.postalCode }}</li>\r\n <li *ngIf=\"address.country\">\r\n <clr-icon shape=\"world\" size=\"12\"></clr-icon>\r\n {{ getCountryName() }}\r\n </li>\r\n <li *ngIf=\"address.phoneNumber\">\r\n <clr-icon shape=\"phone-handset\" size=\"12\"></clr-icon>\r\n {{ address.phoneNumber }}\r\n </li>\r\n <li *ngFor=\"let customField of getCustomFields()\" class=\"custom-field\">\r\n <vdr-labeled-data [label]=\"customField.key\">{{ customField.value }}</vdr-labeled-data>\r\n </li>\r\n</ul>\r\n", styles: [".address-lines{list-style-type:none;line-height:1.2em}.custom-field{margin-top:6px}\n"], components: [{ type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.ClrIconCustomTag, selector: "clr-icon" }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormattedAddressComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{ selector: 'vdr-formatted-address', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"address-lines\">\r\n <li *ngIf=\"address.fullName\">{{ address.fullName }}</li>\r\n <li *ngIf=\"address.streetLine1\">{{ address.streetLine1 }}</li>\r\n <li *ngIf=\"address.streetLine2\">{{ address.streetLine2 }}</li>\r\n <li *ngIf=\"address.city\">{{ address.city }}</li>\r\n <li *ngIf=\"address.province\">{{ address.province }}</li>\r\n <li *ngIf=\"address.postalCode\">{{ address.postalCode }}</li>\r\n <li *ngIf=\"address.country\">\r\n <clr-icon shape=\"world\" size=\"12\"></clr-icon>\r\n {{ getCountryName() }}\r\n </li>\r\n <li *ngIf=\"address.phoneNumber\">\r\n <clr-icon shape=\"phone-handset\" size=\"12\"></clr-icon>\r\n {{ address.phoneNumber }}\r\n </li>\r\n <li *ngFor=\"let customField of getCustomFields()\" class=\"custom-field\">\r\n <vdr-labeled-data [label]=\"customField.key\">{{ customField.value }}</vdr-labeled-data>\r\n </li>\r\n</ul>\r\n", styles: [".address-lines{list-style-type:none;line-height:1.2em}.custom-field{margin-top:6px}\n"] }]
|
|
35
|
+
}], propDecorators: { address: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}] } });
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0dGVkLWFkZHJlc3MuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvY29tcG9uZW50cy9mb3JtYXR0ZWQtYWRkcmVzcy9mb3JtYXR0ZWQtYWRkcmVzcy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2Zvcm1hdHRlZC1hZGRyZXNzL2Zvcm1hdHRlZC1hZGRyZXNzLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sR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puZ0lmPVwiYWRkcmVzcy5zdHJlZXRMaW5lMlwiPnt7IGFkZHJlc3Muc3RyZWV0TGluZTIgfX08L2xpPlxyXG4gICAgPGxpICpuZ0lmPVwiYWRkcmVzcy5jaXR5XCI+e3sgYWRkcmVzcy5jaXR5IH19PC9saT5cclxuICAgIDxsaSAqbmdJZj1cImFkZHJlc3MucHJvdmluY2VcIj57eyBhZGRyZXNzLnByb3ZpbmNlIH19PC9saT5cclxuICAgIDxsaSAqbmdJZj1cImFkZHJlc3MucG9zdGFsQ29kZVwiPnt7IGFkZHJlc3MucG9zdGFsQ29kZSB9fTwvbGk+XHJcbiAgICA8bGkgKm5nSWY9XCJhZGRyZXNzLmNvdW50cnlcIj5cclxuICAgICAgICA8Y2xyLWljb24gc2hhcGU9XCJ3b3JsZFwiIHNpemU9XCIxMlwiPjwvY2xyLWljb24+XHJcbiAgICAgICAge3sgZ2V0Q291bnRyeU5hbWUoKSB9fVxyXG4gICAgPC9saT5cclxuICAgIDxsaSAqbmdJZj1cImFkZHJlc3MucGhvbmVOdW1iZXJcIj5cclxuICAgICAgICA8Y2xyLWljb24gc2hhcGU9XCJwaG9uZS1oYW5kc2V0XCIgc2l6ZT1cIjEyXCI+PC9jbHItaWNvbj5cclxuICAgICAgICB7eyBhZGRyZXNzLnBob25lTnVtYmVyIH19XHJcbiAgICA8L2xpPlxyXG4gICAgPGxpICpuZ0Zvcj1cImxldCBjdXN0b21GaWVsZCBvZiBnZXRDdXN0b21GaWVsZHMoKVwiIGNsYXNzPVwiY3VzdG9tLWZpZWxkXCI+XHJcbiAgICAgICAgPHZkci1sYWJlbGVkLWRhdGEgW2xhYmVsXT1cImN1c3RvbUZpZWxkLmtleVwiPnt7IGN1c3RvbUZpZWxkLnZhbHVlIH19PC92ZHItbGFiZWxlZC1kYXRhPlxyXG4gICAgPC9saT5cclxuPC91bD5cclxuIl19
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@clr/angular";
|
|
4
|
+
export class HelpTooltipComponent {
|
|
5
|
+
}
|
|
6
|
+
HelpTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HelpTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
HelpTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: HelpTooltipComponent, selector: "vdr-help-tooltip", inputs: { content: "content", position: "position" }, ngImport: i0, template: "<clr-tooltip>\r\n <clr-icon clrTooltipTrigger shape=\"help\" size=\"14\"></clr-icon>\r\n <clr-tooltip-content [clrPosition]=\"position\" clrSize=\"md\" *clrIfOpen>\r\n <span>{{ content }}</span>\r\n </clr-tooltip-content>\r\n</clr-tooltip>\r\n", styles: [""], components: [{ type: i1.ClrTooltip, selector: "clr-tooltip" }, { type: i1.ClrTooltipContent, selector: "clr-tooltip-content", inputs: ["id", "clrPosition", "clrSize"] }], directives: [{ type: i1.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.ClrTooltipTrigger, selector: "[clrTooltipTrigger]" }, { type: i1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HelpTooltipComponent, decorators: [{
|
|
9
|
+
type: Component,
|
|
10
|
+
args: [{ selector: 'vdr-help-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<clr-tooltip>\r\n <clr-icon clrTooltipTrigger shape=\"help\" size=\"14\"></clr-icon>\r\n <clr-tooltip-content [clrPosition]=\"position\" clrSize=\"md\" *clrIfOpen>\r\n <span>{{ content }}</span>\r\n </clr-tooltip-content>\r\n</clr-tooltip>\r\n", styles: [""] }]
|
|
11
|
+
}], propDecorators: { content: [{
|
|
12
|
+
type: Input
|
|
13
|
+
}], position: [{
|
|
14
|
+
type: Input
|
|
15
|
+
}] } });
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscC10b29sdGlwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvaGVscC10b29sdGlwL2hlbHAtdG9vbHRpcC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2hlbHAtdG9vbHRpcC9oZWxwLXRvb2x0aXAuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7OztBQVExRSxNQUFNLE9BQU8sb0JBQW9COztpSEFBcEIsb0JBQW9CO3FHQUFwQixvQkFBb0IsOEdDUmpDLHFRQU1BOzJGREVhLG9CQUFvQjtrQkFOaEMsU0FBUzsrQkFDSSxrQkFBa0IsbUJBR1gsdUJBQXVCLENBQUMsTUFBTTs4QkFHdEMsT0FBTztzQkFBZixLQUFLO2dCQUNHLFFBQVE7c0JBQWhCLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneSwgQ29tcG9uZW50LCBJbnB1dCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3Zkci1oZWxwLXRvb2x0aXAnLFxuICAgIHRlbXBsYXRlVXJsOiAnLi9oZWxwLXRvb2x0aXAuY29tcG9uZW50Lmh0bWwnLFxuICAgIHN0eWxlVXJsczogWycuL2hlbHAtdG9vbHRpcC5jb21wb25lbnQuc2NzcyddLFxuICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxufSlcbmV4cG9ydCBjbGFzcyBIZWxwVG9vbHRpcENvbXBvbmVudCB7XG4gICAgQElucHV0KCkgY29udGVudDogc3RyaW5nO1xuICAgIEBJbnB1dCgpIHBvc2l0aW9uOiAndG9wLXJpZ2h0JyB8ICd0b3AtbGVmdCcgfCAnYm90dG9tLXJpZ2h0JyB8ICdib3R0b20tbGVmdCcgfCAncmlnaHQnIHwgJ2xlZnQnO1xufVxuIiwiPGNsci10b29sdGlwPlxyXG4gICAgPGNsci1pY29uIGNsclRvb2x0aXBUcmlnZ2VyIHNoYXBlPVwiaGVscFwiIHNpemU9XCIxNFwiPjwvY2xyLWljb24+XHJcbiAgICA8Y2xyLXRvb2x0aXAtY29udGVudCBbY2xyUG9zaXRpb25dPVwicG9zaXRpb25cIiBjbHJTaXplPVwibWRcIiAqY2xySWZPcGVuPlxyXG4gICAgICAgIDxzcGFuPnt7IGNvbnRlbnQgfX08L3NwYW4+XHJcbiAgICA8L2Nsci10b29sdGlwLWNvbnRlbnQ+XHJcbjwvY2xyLXRvb2x0aXA+XHJcbiJdfQ==
|
package/esm2020/core/shared/components/history-entry-detail/history-entry-detail.component.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../dropdown/dropdown.component";
|
|
4
|
+
import * as i2 from "../dropdown/dropdown-menu.component";
|
|
5
|
+
import * as i3 from "../dropdown/dropdown-trigger.directive";
|
|
6
|
+
import * as i4 from "@clr/angular";
|
|
7
|
+
import * as i5 from "@ngx-translate/core";
|
|
8
|
+
export class HistoryEntryDetailComponent {
|
|
9
|
+
}
|
|
10
|
+
HistoryEntryDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HistoryEntryDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
HistoryEntryDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: HistoryEntryDetailComponent, selector: "vdr-history-entry-detail", ngImport: i0, template: "<vdr-dropdown>\r\n <button class=\"btn btn-link btn-sm details-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"details\" size=\"12\"></clr-icon>\r\n {{ 'common.details' | translate }}\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class=\"entry-dropdown\">\r\n <ng-content></ng-content>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n", styles: [".entry-dropdown{margin:0 12px}.details-button{margin:0}\n"], components: [{ type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { type: i2.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition"] }], directives: [{ type: i3.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { type: i4.ClrIconCustomTag, selector: "clr-icon" }], pipes: { "translate": i5.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HistoryEntryDetailComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'vdr-history-entry-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-dropdown>\r\n <button class=\"btn btn-link btn-sm details-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"details\" size=\"12\"></clr-icon>\r\n {{ 'common.details' | translate }}\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class=\"entry-dropdown\">\r\n <ng-content></ng-content>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n", styles: [".entry-dropdown{margin:0 12px}.details-button{margin:0}\n"] }]
|
|
15
|
+
}] });
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlzdG9yeS1lbnRyeS1kZXRhaWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvY29tcG9uZW50cy9oaXN0b3J5LWVudHJ5LWRldGFpbC9oaXN0b3J5LWVudHJ5LWRldGFpbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2hpc3RvcnktZW50cnktZGV0YWlsL2hpc3RvcnktZW50cnktZGV0YWlsLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7QUFRbkUsTUFBTSxPQUFPLDJCQUEyQjs7d0hBQTNCLDJCQUEyQjs0R0FBM0IsMkJBQTJCLGdFQ1J4QyxpWkFXQTsyRkRIYSwyQkFBMkI7a0JBTnZDLFNBQVM7K0JBQ0ksMEJBQTBCLG1CQUduQix1QkFBdUIsQ0FBQyxNQUFNIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3ksIENvbXBvbmVudCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuQENvbXBvbmVudCh7XHJcbiAgICBzZWxlY3RvcjogJ3Zkci1oaXN0b3J5LWVudHJ5LWRldGFpbCcsXHJcbiAgICB0ZW1wbGF0ZVVybDogJy4vaGlzdG9yeS1lbnRyeS1kZXRhaWwuY29tcG9uZW50Lmh0bWwnLFxyXG4gICAgc3R5bGVVcmxzOiBbJy4vaGlzdG9yeS1lbnRyeS1kZXRhaWwuY29tcG9uZW50LnNjc3MnXSxcclxuICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgSGlzdG9yeUVudHJ5RGV0YWlsQ29tcG9uZW50IHt9XHJcbiIsIjx2ZHItZHJvcGRvd24+XHJcbiAgICA8YnV0dG9uIGNsYXNzPVwiYnRuIGJ0bi1saW5rIGJ0bi1zbSBkZXRhaWxzLWJ1dHRvblwiIHZkckRyb3Bkb3duVHJpZ2dlcj5cclxuICAgICAgICA8Y2xyLWljb24gc2hhcGU9XCJkZXRhaWxzXCIgc2l6ZT1cIjEyXCI+PC9jbHItaWNvbj5cclxuICAgICAgICB7eyAnY29tbW9uLmRldGFpbHMnIHwgdHJhbnNsYXRlIH19XHJcbiAgICA8L2J1dHRvbj5cclxuICAgIDx2ZHItZHJvcGRvd24tbWVudT5cclxuICAgICAgICA8ZGl2IGNsYXNzPVwiZW50cnktZHJvcGRvd25cIj5cclxuICAgICAgICAgICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC92ZHItZHJvcGRvd24tbWVudT5cclxuPC92ZHItZHJvcGRvd24+XHJcbiJdfQ==
|
package/esm2020/core/shared/components/items-per-page-controls/items-per-page-controls.component.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../form-field/form-field-control.directive";
|
|
4
|
+
import * as i2 from "@angular/forms";
|
|
5
|
+
import * as i3 from "@ngx-translate/core";
|
|
6
|
+
/**
|
|
7
|
+
* A control for setting the number of items per page in a paginated list.
|
|
8
|
+
*/
|
|
9
|
+
export class ItemsPerPageControlsComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.itemsPerPage = 10;
|
|
12
|
+
this.itemsPerPageChange = new EventEmitter();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
ItemsPerPageControlsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ItemsPerPageControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
+
ItemsPerPageControlsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ItemsPerPageControlsComponent, selector: "vdr-items-per-page-controls", inputs: { itemsPerPage: "itemsPerPage" }, outputs: { itemsPerPageChange: "itemsPerPageChange" }, ngImport: i0, template: "<div class=\"select\">\r\n <select [ngModel]=\"itemsPerPage\" (change)=\"itemsPerPageChange.emit($event.target.value)\">\r\n <option [value]=\"10\">{{ 'common.items-per-page-option' | translate: { count: 10 } }}</option>\r\n <option [value]=\"25\">{{ 'common.items-per-page-option' | translate: { count: 25 } }}</option>\r\n <option [value]=\"50\">{{ 'common.items-per-page-option' | translate: { count: 50 } }}</option>\r\n <option [value]=\"100\">{{ 'common.items-per-page-option' | translate: { count: 100 } }}</option>\r\n </select>\r\n</div>\r\n", styles: [""], directives: [{ type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "translate": i3.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ItemsPerPageControlsComponent, decorators: [{
|
|
18
|
+
type: Component,
|
|
19
|
+
args: [{ selector: 'vdr-items-per-page-controls', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"select\">\r\n <select [ngModel]=\"itemsPerPage\" (change)=\"itemsPerPageChange.emit($event.target.value)\">\r\n <option [value]=\"10\">{{ 'common.items-per-page-option' | translate: { count: 10 } }}</option>\r\n <option [value]=\"25\">{{ 'common.items-per-page-option' | translate: { count: 25 } }}</option>\r\n <option [value]=\"50\">{{ 'common.items-per-page-option' | translate: { count: 50 } }}</option>\r\n <option [value]=\"100\">{{ 'common.items-per-page-option' | translate: { count: 100 } }}</option>\r\n </select>\r\n</div>\r\n", styles: [""] }]
|
|
20
|
+
}], propDecorators: { itemsPerPage: [{
|
|
21
|
+
type: Input
|
|
22
|
+
}], itemsPerPageChange: [{
|
|
23
|
+
type: Output
|
|
24
|
+
}] } });
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXRlbXMtcGVyLXBhZ2UtY29udHJvbHMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvY29tcG9uZW50cy9pdGVtcy1wZXItcGFnZS1jb250cm9scy9pdGVtcy1wZXItcGFnZS1jb250cm9scy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2l0ZW1zLXBlci1wYWdlLWNvbnRyb2xzL2l0ZW1zLXBlci1wYWdlLWNvbnRyb2xzLmNvbXBvbmVudC5odG1sIl0sIm5h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
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class LabeledDataComponent {
|
|
4
|
+
}
|
|
5
|
+
LabeledDataComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LabeledDataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
LabeledDataComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: LabeledDataComponent, selector: "vdr-labeled-data", inputs: { label: "label" }, ngImport: i0, template: "<div class=\"label-title\">{{ label }}</div>\r\n<ng-content></ng-content>\r\n", styles: [":host{display:block;margin-bottom:6px}.label-title{font-size:12px;color:var(--color-text-300);line-height:12px;margin-bottom:-4px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LabeledDataComponent, decorators: [{
|
|
8
|
+
type: Component,
|
|
9
|
+
args: [{ selector: 'vdr-labeled-data', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"label-title\">{{ label }}</div>\r\n<ng-content></ng-content>\r\n", styles: [":host{display:block;margin-bottom:6px}.label-title{font-size:12px;color:var(--color-text-300);line-height:12px;margin-bottom:-4px}\n"] }]
|
|
10
|
+
}], propDecorators: { label: [{
|
|
11
|
+
type: Input
|
|
12
|
+
}] } });
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFiZWxlZC1kYXRhLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2NvbXBvbmVudHMvbGFiZWxlZC1kYXRhL2xhYmVsZWQtZGF0YS5jb21wb25lbnQudHMiLCI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XHJcbiJdfQ==
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../dropdown/dropdown.component";
|
|
4
|
+
import * as i2 from "../dropdown/dropdown-menu.component";
|
|
5
|
+
import * as i3 from "@angular/common";
|
|
6
|
+
import * as i4 from "../dropdown/dropdown-trigger.directive";
|
|
7
|
+
import * as i5 from "@clr/angular";
|
|
8
|
+
import * as i6 from "../dropdown/dropdown-item.directive";
|
|
9
|
+
import * as i7 from "@ngx-translate/core";
|
|
10
|
+
import * as i8 from "../../pipes/locale-language-name.pipe";
|
|
11
|
+
export class LanguageSelectorComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
this.languageCodeChange = new EventEmitter();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
LanguageSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
LanguageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: LanguageSelectorComponent, selector: "vdr-language-selector", inputs: { currentLanguageCode: "currentLanguageCode", availableLanguageCodes: "availableLanguageCodes", disabled: "disabled" }, outputs: { languageCodeChange: "languageCodeChange" }, ngImport: i0, template: "<ng-container *ngIf=\"1 < availableLanguageCodes?.length\">\r\n <vdr-dropdown>\r\n <button type=\"button\" class=\"btn btn-sm btn-link\" vdrDropdownTrigger [disabled]=\"disabled\">\r\n <clr-icon shape=\"world\"></clr-icon>\r\n {{ 'common.language' | translate }}: {{ currentLanguageCode | localeLanguageName | uppercase }}\r\n <clr-icon shape=\"caret down\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n *ngFor=\"let code of availableLanguageCodes\"\r\n (click)=\"languageCodeChange.emit(code)\"\r\n vdrDropdownItem\r\n >\r\n {{ code | localeLanguageName }} <span class=\"code\">{{ code }}</span>\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n</ng-container>\r\n", styles: [".code{color:var(--color-grey-400)}\n"], components: [{ type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { type: i2.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { type: i5.ClrIconCustomTag, selector: "clr-icon" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.DropdownItemDirective, selector: "[vdrDropdownItem]" }], pipes: { "translate": i7.TranslatePipe, "uppercase": i3.UpperCasePipe, "localeLanguageName": i8.LocaleLanguageNamePipe } });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LanguageSelectorComponent, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{ selector: 'vdr-language-selector', template: "<ng-container *ngIf=\"1 < availableLanguageCodes?.length\">\r\n <vdr-dropdown>\r\n <button type=\"button\" class=\"btn btn-sm btn-link\" vdrDropdownTrigger [disabled]=\"disabled\">\r\n <clr-icon shape=\"world\"></clr-icon>\r\n {{ 'common.language' | translate }}: {{ currentLanguageCode | localeLanguageName | uppercase }}\r\n <clr-icon shape=\"caret down\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n *ngFor=\"let code of availableLanguageCodes\"\r\n (click)=\"languageCodeChange.emit(code)\"\r\n vdrDropdownItem\r\n >\r\n {{ code | localeLanguageName }} <span class=\"code\">{{ code }}</span>\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n</ng-container>\r\n", styles: [".code{color:var(--color-grey-400)}\n"] }]
|
|
22
|
+
}], propDecorators: { currentLanguageCode: [{
|
|
23
|
+
type: Input
|
|
24
|
+
}], availableLanguageCodes: [{
|
|
25
|
+
type: Input
|
|
26
|
+
}], disabled: [{
|
|
27
|
+
type: Input
|
|
28
|
+
}], languageCodeChange: [{
|
|
29
|
+
type: Output
|
|
30
|
+
}] } });
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFuZ3VhZ2Utc2VsZWN0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvY29tcG9uZW50cy9sYW5ndWFnZS1zZWxlY3Rvci9sYW5ndWFnZS1zZWxlY3Rvci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL2xhbmd1YWdlLXNlbGVjdG9yL2xhbmd1YWdlLXNlbGVjdG9yLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7Ozs7QUFTdkUsTUFBTSxPQUFPLHlCQUF5QjtJQUx0QztRQVFhLGFBQVEsR0FBRyxLQUFLLENBQUM7UUFDaEIsdUJBQWtCLEdBQUcsSUFBSSxZQUFZLEVBQWdCLENBQUM7S0FDbkU7O3NIQUxZLHlCQUF5QjswR0FBekIseUJBQXlCLG9QQ1R0Qyw0NUJBbUJBOzJGRFZhLHlCQUF5QjtrQkFMckMsU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