@vendure/admin-ui 1.3.2 → 1.4.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/bundles/vendure-admin-ui-catalog.umd.js +87 -162
- package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-core.umd.js +2058 -426
- package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-customer.umd.js +79 -57
- package/bundles/vendure-admin-ui-customer.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-marketing.umd.js +11 -1
- package/bundles/vendure-admin-ui-marketing.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-order.umd.js +10 -2
- package/bundles/vendure-admin-ui-order.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-settings.umd.js +156 -153
- package/bundles/vendure-admin-ui-settings.umd.js.map +1 -1
- package/catalog/components/collection-detail/collection-detail.component.d.ts +0 -1
- package/catalog/components/collection-list/collection-list.component.d.ts +3 -0
- package/catalog/components/facet-detail/facet-detail.component.d.ts +0 -1
- package/catalog/components/facet-list/facet-list.component.d.ts +3 -5
- package/catalog/components/product-detail/product-detail.component.d.ts +0 -1
- package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
- package/core/app.component.d.ts +1 -0
- package/core/common/base-detail.component.d.ts +42 -1
- package/core/common/base-entity-resolver.d.ts +28 -1
- package/core/common/base-list.component.d.ts +75 -1
- package/core/common/component-registry-types.d.ts +46 -0
- package/core/common/generated-types.d.ts +286 -27
- package/core/common/utilities/get-default-ui-language.d.ts +1 -0
- package/core/common/version.d.ts +1 -1
- package/core/components/app-shell/app-shell.component.d.ts +1 -1
- package/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +17 -4
- package/core/components/user-menu/user-menu.component.d.ts +1 -1
- package/core/data/client-state/client-defaults.d.ts +1 -1
- package/core/data/definitions/client-definitions.d.ts +3 -1
- package/core/data/definitions/customer-definitions.d.ts +1 -0
- package/core/data/definitions/settings-definitions.d.ts +1 -0
- package/core/data/providers/client-data.service.d.ts +3 -1
- package/core/data/providers/data.service.d.ts +54 -12
- package/core/data/providers/settings-data.service.d.ts +3 -0
- package/core/data/query-result.d.ts +11 -2
- package/core/providers/custom-detail-component/custom-detail-component-types.d.ts +25 -0
- package/core/providers/custom-detail-component/custom-detail-component.service.d.ts +15 -0
- package/core/providers/custom-field-component/custom-field-component.service.d.ts +3 -3
- package/core/providers/local-storage/local-storage.service.d.ts +1 -0
- package/core/providers/modal/modal.service.d.ts +41 -12
- package/core/providers/nav-builder/nav-builder-types.d.ts +19 -1
- package/core/providers/nav-builder/nav-builder.service.d.ts +14 -10
- package/core/providers/notification/notification.service.d.ts +37 -0
- package/core/public_api.d.ts +8 -0
- package/core/shared/components/action-bar-items/action-bar-items.component.d.ts +2 -1
- package/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.d.ts +18 -0
- package/core/shared/components/asset-preview/asset-preview.component.d.ts +0 -1
- package/core/shared/components/channel-assignment-control/channel-assignment-control.component.d.ts +2 -0
- package/core/shared/components/chip/chip.component.d.ts +20 -0
- package/core/shared/components/currency-input/currency-input.component.d.ts +11 -0
- package/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.d.ts +17 -0
- package/core/shared/components/data-table/data-table.component.d.ts +59 -0
- package/core/shared/components/datetime-picker/datetime-picker.component.d.ts +17 -0
- package/core/shared/components/dropdown/dropdown.component.d.ts +25 -0
- package/core/shared/components/extension-host/extension-host.service.d.ts +3 -1
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +22 -0
- package/core/shared/components/modal-dialog/modal-dialog.component.d.ts +1 -1
- package/core/shared/components/object-tree/object-tree.component.d.ts +8 -0
- package/core/shared/components/order-state-label/order-state-label.component.d.ts +10 -0
- package/core/shared/components/product-selector/product-selector.component.d.ts +12 -0
- package/core/shared/components/rich-text-editor/rich-text-editor.component.d.ts +12 -1
- package/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.d.ts +21 -0
- package/core/shared/components/ui-extension-point/ui-extension-point.component.d.ts +15 -0
- package/core/shared/directives/if-multichannel.directive.d.ts +14 -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 +7 -0
- package/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.d.ts +32 -0
- package/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.d.ts +7 -0
- package/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.d.ts +8 -0
- package/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.d.ts +10 -0
- package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +8 -0
- package/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.d.ts +12 -0
- package/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.d.ts +7 -0
- package/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.d.ts +8 -0
- package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +40 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.d.ts +9 -0
- package/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.d.ts +16 -0
- package/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +9 -0
- package/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.d.ts +12 -3
- package/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.d.ts +7 -0
- package/core/shared/pipes/asset-preview.pipe.d.ts +14 -0
- package/core/shared/pipes/duration.pipe.d.ts +8 -0
- package/core/shared/pipes/file-size.pipe.d.ts +8 -0
- package/core/shared/pipes/has-permission.pipe.d.ts +3 -1
- package/core/shared/pipes/locale-currency-name.pipe.d.ts +8 -0
- package/core/shared/pipes/locale-currency.pipe.d.ts +12 -0
- package/core/shared/pipes/locale-date.pipe.d.ts +7 -0
- package/core/shared/pipes/locale-language-name.pipe.d.ts +9 -1
- package/core/shared/pipes/locale-region-name.pipe.d.ts +18 -0
- package/core/shared/pipes/time-ago.pipe.d.ts +8 -0
- package/core/vendure-admin-ui-core.metadata.json +1 -1
- package/customer/components/customer-detail/customer-detail.component.d.ts +2 -3
- package/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.d.ts +14 -3
- package/customer/vendure-admin-ui-customer.metadata.json +1 -1
- package/esm2015/catalog/catalog.module.js +29 -28
- package/esm2015/catalog/components/asset-detail/asset-detail.component.js +2 -10
- package/esm2015/catalog/components/collection-detail/collection-detail.component.js +3 -16
- package/esm2015/catalog/components/collection-list/collection-list.component.js +23 -5
- package/esm2015/catalog/components/collection-tree/collection-tree-node.component.js +1 -1
- package/esm2015/catalog/components/collection-tree/collection-tree.component.js +1 -1
- package/esm2015/catalog/components/facet-detail/facet-detail.component.js +3 -15
- package/esm2015/catalog/components/facet-list/facet-list.component.js +24 -9
- package/esm2015/catalog/components/product-assets/product-assets.component.js +2 -2
- package/esm2015/catalog/components/product-detail/product-detail.component.js +5 -27
- package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +3 -3
- package/esm2015/catalog/components/update-product-option-dialog/update-product-option-dialog.component.js +2 -2
- package/esm2015/catalog/components/variant-price-detail/variant-price-detail.component.js +2 -2
- package/esm2015/core/app.component.js +20 -2
- package/esm2015/core/common/base-detail.component.js +53 -1
- package/esm2015/core/common/base-entity-resolver.js +29 -2
- package/esm2015/core/common/base-list.component.js +76 -2
- package/esm2015/core/common/component-registry-types.js +1 -1
- package/esm2015/core/common/generated-types.js +1 -1
- package/esm2015/core/common/introspection-result.js +249 -183
- package/esm2015/core/common/utilities/get-default-ui-language.js +9 -1
- package/esm2015/core/common/version.js +2 -2
- package/esm2015/core/components/app-shell/app-shell.component.js +12 -7
- package/esm2015/core/components/main-nav/main-nav.component.js +2 -2
- package/esm2015/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.js +281 -5
- package/esm2015/core/components/user-menu/user-menu.component.js +3 -3
- package/esm2015/core/data/client-state/client-defaults.js +5 -2
- package/esm2015/core/data/client-state/client-resolvers.js +32 -33
- package/esm2015/core/data/definitions/client-definitions.js +18 -3
- package/esm2015/core/data/definitions/customer-definitions.js +21 -25
- package/esm2015/core/data/definitions/settings-definitions.js +50 -5
- package/esm2015/core/data/providers/client-data.service.js +15 -4
- package/esm2015/core/data/providers/data.service.js +44 -2
- package/esm2015/core/data/providers/settings-data.service.js +12 -4
- package/esm2015/core/data/query-result.js +14 -4
- package/esm2015/core/providers/custom-detail-component/custom-detail-component-types.js +2 -0
- package/esm2015/core/providers/custom-detail-component/custom-detail-component.service.js +44 -0
- package/esm2015/core/providers/custom-field-component/custom-field-component.service.js +6 -6
- package/esm2015/core/providers/local-storage/local-storage.service.js +1 -1
- package/esm2015/core/providers/modal/modal.service.js +20 -12
- package/esm2015/core/providers/nav-builder/nav-builder-types.js +1 -1
- package/esm2015/core/providers/nav-builder/nav-builder.service.js +15 -11
- package/esm2015/core/providers/notification/notification.service.js +24 -1
- package/esm2015/core/public_api.js +9 -1
- package/esm2015/core/shared/components/action-bar/action-bar.component.js +1 -1
- package/esm2015/core/shared/components/action-bar-items/action-bar-items.component.js +3 -3
- package/esm2015/core/shared/components/address-form/address-form.component.js +2 -2
- package/esm2015/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.js +19 -1
- package/esm2015/core/shared/components/asset-preview/asset-preview.component.js +2 -6
- package/esm2015/core/shared/components/channel-assignment-control/channel-assignment-control.component.js +36 -22
- package/esm2015/core/shared/components/chip/chip.component.js +12 -1
- package/esm2015/core/shared/components/currency-input/currency-input.component.js +12 -1
- package/esm2015/core/shared/components/custom-detail-component-host/custom-detail-component-host.component.js +44 -0
- package/esm2015/core/shared/components/data-table/data-table.component.js +60 -1
- package/esm2015/core/shared/components/datetime-picker/datetime-picker.component.js +17 -1
- package/esm2015/core/shared/components/dropdown/dropdown.component.js +26 -1
- package/esm2015/core/shared/components/extension-host/extension-host.component.js +3 -3
- package/esm2015/core/shared/components/extension-host/extension-host.service.js +16 -2
- package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +23 -1
- package/esm2015/core/shared/components/modal-dialog/modal-dialog.component.js +2 -2
- package/esm2015/core/shared/components/object-tree/object-tree.component.js +11 -3
- package/esm2015/core/shared/components/order-state-label/order-state-label.component.js +11 -1
- package/esm2015/core/shared/components/product-selector/product-selector.component.js +13 -1
- package/esm2015/core/shared/components/rich-text-editor/rich-text-editor.component.js +14 -3
- package/esm2015/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.js +48 -0
- package/esm2015/core/shared/components/title-input/title-input.component.js +1 -1
- package/esm2015/core/shared/components/ui-extension-point/ui-extension-point.component.js +31 -0
- package/esm2015/core/shared/directives/if-multichannel.directive.js +15 -1
- package/esm2015/core/shared/directives/if-permissions.directive.js +4 -1
- package/esm2015/core/shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component.js +8 -1
- package/esm2015/core/shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component.js +125 -0
- package/esm2015/core/shared/dynamic-form-inputs/currency-form-input/currency-form-input.component.js +8 -1
- package/esm2015/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.js +9 -1
- package/esm2015/core/shared/dynamic-form-inputs/date-form-input/date-form-input.component.js +21 -2
- package/esm2015/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.js +2 -1
- package/esm2015/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.js +9 -1
- package/esm2015/core/shared/dynamic-form-inputs/number-form-input/number-form-input.component.js +29 -2
- package/esm2015/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.js +8 -1
- package/esm2015/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.js +9 -1
- package/esm2015/core/shared/dynamic-form-inputs/register-dynamic-input-components.js +42 -2
- package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.js +10 -1
- package/esm2015/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.js +20 -0
- package/esm2015/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.js +14 -2
- package/esm2015/core/shared/dynamic-form-inputs/text-form-input/text-form-input.component.js +17 -2
- package/esm2015/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.js +8 -1
- package/esm2015/core/shared/pipes/asset-preview.pipe.js +15 -1
- package/esm2015/core/shared/pipes/duration.pipe.js +9 -1
- package/esm2015/core/shared/pipes/file-size.pipe.js +9 -1
- package/esm2015/core/shared/pipes/has-permission.pipe.js +4 -2
- package/esm2015/core/shared/pipes/locale-base.pipe.js +7 -4
- package/esm2015/core/shared/pipes/locale-currency-name.pipe.js +9 -1
- package/esm2015/core/shared/pipes/locale-currency.pipe.js +13 -1
- package/esm2015/core/shared/pipes/locale-date.pipe.js +8 -1
- package/esm2015/core/shared/pipes/locale-language-name.pipe.js +10 -2
- package/esm2015/core/shared/pipes/locale-region-name.pipe.js +48 -0
- package/esm2015/core/shared/pipes/time-ago.pipe.js +9 -1
- package/esm2015/core/shared/shared.module.js +13 -1
- package/esm2015/customer/components/customer-detail/customer-detail.component.js +5 -16
- package/esm2015/customer/components/customer-group-detail-dialog/customer-group-detail-dialog.component.js +32 -3
- package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +22 -18
- package/esm2015/marketing/components/promotion-detail/promotion-detail.component.js +9 -2
- package/esm2015/order/components/order-detail/order-detail.component.js +11 -3
- package/esm2015/settings/components/admin-detail/admin-detail.component.js +3 -14
- package/esm2015/settings/components/channel-detail/channel-detail.component.js +3 -14
- package/esm2015/settings/components/country-detail/country-detail.component.js +11 -3
- package/esm2015/settings/components/country-list/country-list.component.js +19 -7
- package/esm2015/settings/components/global-settings/global-settings.component.js +3 -14
- package/esm2015/settings/components/payment-method-detail/payment-method-detail.component.js +9 -2
- package/esm2015/settings/components/profile/profile.component.js +3 -14
- package/esm2015/settings/components/shipping-method-detail/shipping-method-detail.component.js +3 -16
- package/esm2015/settings/components/tax-category-detail/tax-category-detail.component.js +13 -3
- package/esm2015/settings/components/tax-rate-detail/tax-rate-detail.component.js +9 -2
- package/esm2015/settings/components/zone-detail-dialog/zone-detail-dialog.component.js +32 -3
- package/esm2015/settings/components/zone-list/zone-list.component.js +19 -8
- package/fesm2015/vendure-admin-ui-catalog.js +83 -102
- package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
- package/fesm2015/vendure-admin-ui-core.js +1900 -362
- package/fesm2015/vendure-admin-ui-core.js.map +1 -1
- package/fesm2015/vendure-admin-ui-customer.js +54 -34
- package/fesm2015/vendure-admin-ui-customer.js.map +1 -1
- package/fesm2015/vendure-admin-ui-marketing.js +8 -1
- package/fesm2015/vendure-admin-ui-marketing.js.map +1 -1
- package/fesm2015/vendure-admin-ui-order.js +10 -2
- package/fesm2015/vendure-admin-ui-order.js.map +1 -1
- package/fesm2015/vendure-admin-ui-settings.js +110 -85
- package/fesm2015/vendure-admin-ui-settings.js.map +1 -1
- package/marketing/components/promotion-detail/promotion-detail.component.d.ts +2 -1
- package/marketing/vendure-admin-ui-marketing.metadata.json +1 -1
- package/order/vendure-admin-ui-order.metadata.json +1 -1
- package/package.json +6 -5
- package/settings/components/admin-detail/admin-detail.component.d.ts +0 -1
- package/settings/components/channel-detail/channel-detail.component.d.ts +0 -1
- package/settings/components/country-detail/country-detail.component.d.ts +2 -1
- package/settings/components/country-list/country-list.component.d.ts +7 -2
- package/settings/components/global-settings/global-settings.component.d.ts +0 -1
- package/settings/components/payment-method-detail/payment-method-detail.component.d.ts +2 -1
- package/settings/components/profile/profile.component.d.ts +0 -1
- package/settings/components/shipping-method-detail/shipping-method-detail.component.d.ts +0 -1
- package/settings/components/tax-category-detail/tax-category-detail.component.d.ts +2 -1
- package/settings/components/tax-rate-detail/tax-rate-detail.component.d.ts +2 -1
- package/settings/components/zone-detail-dialog/zone-detail-dialog.component.d.ts +14 -3
- package/settings/components/zone-list/zone-list.component.d.ts +6 -2
- package/settings/vendure-admin-ui-settings.metadata.json +1 -1
- package/static/i18n-messages/cs.json +7 -0
- package/static/i18n-messages/de.json +7 -0
- package/static/i18n-messages/en.json +7 -0
- package/static/i18n-messages/es.json +8 -1
- package/static/i18n-messages/fr.json +7 -0
- package/static/i18n-messages/it.json +7 -0
- package/static/i18n-messages/pl.json +7 -0
- package/static/i18n-messages/pt_BR.json +7 -0
- package/static/i18n-messages/pt_PT.json +7 -0
- package/static/i18n-messages/ru.json +7 -0
- package/static/i18n-messages/uk.json +7 -0
- package/static/i18n-messages/zh_Hans.json +7 -0
- package/static/i18n-messages/zh_Hant.json +7 -0
- package/static/styles/theme/dark.scss +9 -0
- package/static/styles/theme/default.scss +8 -0
- package/static/theme.min.css +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Injector, Component, Inject, ChangeDetectionStrategy, ComponentFactoryResolver, APP_INITIALIZER, ViewChild,
|
|
2
|
+
import { Injectable, Injector, isDevMode, Component, Inject, HostListener, ChangeDetectionStrategy, ComponentFactoryResolver, APP_INITIALIZER, ViewChild, ViewContainerRef, EventEmitter, Input, Output, NgModule, ChangeDetectorRef, HostBinding, ContentChild, forwardRef, TemplateRef, ContentChildren, Directive, ElementRef, Optional, SkipSelf, ViewChildren, Pipe, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { Location, DOCUMENT, CommonModule, PlatformLocation } from '@angular/common';
|
|
5
5
|
import { map, filter, distinctUntilChanged, skip, takeUntil, tap, take, finalize, concatMap, bufferCount, switchMap, mergeMap, mapTo, catchError, startWith, throttleTime, shareReplay, scan, debounceTime, delay } from 'rxjs/operators';
|
|
@@ -29,6 +29,7 @@ import { ApolloLink as ApolloLink$1 } from '@apollo/client/link/core';
|
|
|
29
29
|
import { createUploadLink } from 'apollo-upload-client';
|
|
30
30
|
import { omit } from '@vendure/common/lib/omit';
|
|
31
31
|
import { __awaiter } from 'tslib';
|
|
32
|
+
import { CodeJar } from 'codejar';
|
|
32
33
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
33
34
|
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
34
35
|
import { ClarityModule } from '@clr/angular';
|
|
@@ -455,9 +456,20 @@ const SET_AS_LOGGED_OUT = gql `
|
|
|
455
456
|
}
|
|
456
457
|
${USER_STATUS_FRAGMENT}
|
|
457
458
|
`;
|
|
458
|
-
const
|
|
459
|
-
mutation SetUiLanguage($languageCode: LanguageCode
|
|
459
|
+
const SET_UI_LANGUAGE_AND_LOCALE = gql `
|
|
460
|
+
mutation SetUiLanguage($languageCode: LanguageCode!, $locale: String) {
|
|
460
461
|
setUiLanguage(languageCode: $languageCode) @client
|
|
462
|
+
setUiLocale(locale: $locale) @client
|
|
463
|
+
}
|
|
464
|
+
`;
|
|
465
|
+
const SET_UI_LOCALE = gql `
|
|
466
|
+
mutation SetUiLocale($locale: String) {
|
|
467
|
+
setUiLocale(locale: $locale) @client
|
|
468
|
+
}
|
|
469
|
+
`;
|
|
470
|
+
const SET_DISPLAY_UI_EXTENSION_POINTS = gql `
|
|
471
|
+
mutation SetDisplayUiExtensionPoints($display: Boolean!) {
|
|
472
|
+
setDisplayUiExtensionPoints(display: $display) @client
|
|
461
473
|
}
|
|
462
474
|
`;
|
|
463
475
|
const SET_CONTENT_LANGUAGE = gql `
|
|
@@ -489,8 +501,10 @@ const GET_UI_STATE = gql `
|
|
|
489
501
|
query GetUiState {
|
|
490
502
|
uiState @client {
|
|
491
503
|
language
|
|
504
|
+
locale
|
|
492
505
|
contentLanguage
|
|
493
506
|
theme
|
|
507
|
+
displayUiExtensionPoints
|
|
494
508
|
}
|
|
495
509
|
}
|
|
496
510
|
`;
|
|
@@ -504,8 +518,10 @@ const GET_CLIENT_STATE = gql `
|
|
|
504
518
|
}
|
|
505
519
|
uiState @client {
|
|
506
520
|
language
|
|
521
|
+
locale
|
|
507
522
|
contentLanguage
|
|
508
523
|
theme
|
|
524
|
+
displayUiExtensionPoints
|
|
509
525
|
}
|
|
510
526
|
}
|
|
511
527
|
${USER_STATUS_FRAGMENT}
|
|
@@ -528,8 +544,12 @@ const UPDATE_USER_CHANNELS = gql `
|
|
|
528
544
|
`;
|
|
529
545
|
|
|
530
546
|
/**
|
|
547
|
+
* @description
|
|
531
548
|
* This class wraps the Apollo Angular QueryRef object and exposes some getters
|
|
532
549
|
* for convenience.
|
|
550
|
+
*
|
|
551
|
+
* @docsCategory providers
|
|
552
|
+
* @docsPage DataService
|
|
533
553
|
*/
|
|
534
554
|
class QueryResult {
|
|
535
555
|
constructor(queryRef, apollo) {
|
|
@@ -539,11 +559,13 @@ class QueryResult {
|
|
|
539
559
|
this.valueChanges = queryRef.valueChanges;
|
|
540
560
|
}
|
|
541
561
|
/**
|
|
542
|
-
*
|
|
562
|
+
* @description
|
|
563
|
+
* Re-fetch this query whenever the active Channel changes.
|
|
543
564
|
*/
|
|
544
565
|
refetchOnChannelChange() {
|
|
545
|
-
const userStatus$ = this.apollo.watchQuery({
|
|
546
|
-
|
|
566
|
+
const userStatus$ = this.apollo.watchQuery({
|
|
567
|
+
query: GET_USER_STATUS,
|
|
568
|
+
}).valueChanges;
|
|
547
569
|
const activeChannelId$ = userStatus$.pipe(map(data => data.data.userStatus.activeChannelId), filter(notNullOrUndefined), distinctUntilChanged(), skip(1), takeUntil(this.completed$));
|
|
548
570
|
const loggedOut$ = userStatus$.pipe(map(data => data.data.userStatus.isLoggedIn), distinctUntilChanged(), skip(1), filter(isLoggedIn => !isLoggedIn), takeUntil(this.completed$));
|
|
549
571
|
this.valueChanges = merge(activeChannelId$, this.queryRef.valueChanges).pipe(tap(val => {
|
|
@@ -555,6 +577,7 @@ class QueryResult {
|
|
|
555
577
|
return this;
|
|
556
578
|
}
|
|
557
579
|
/**
|
|
580
|
+
* @description
|
|
558
581
|
* Returns an Observable which emits a single result and then completes.
|
|
559
582
|
*/
|
|
560
583
|
get single$() {
|
|
@@ -564,6 +587,7 @@ class QueryResult {
|
|
|
564
587
|
}));
|
|
565
588
|
}
|
|
566
589
|
/**
|
|
590
|
+
* @description
|
|
567
591
|
* Returns an Observable which emits until unsubscribed.
|
|
568
592
|
*/
|
|
569
593
|
get stream$() {
|
|
@@ -576,12 +600,14 @@ class QueryResult {
|
|
|
576
600
|
return this.queryRef;
|
|
577
601
|
}
|
|
578
602
|
/**
|
|
603
|
+
* @description
|
|
579
604
|
* Returns a single-result Observable after applying the map function.
|
|
580
605
|
*/
|
|
581
606
|
mapSingle(mapFn) {
|
|
582
607
|
return this.single$.pipe(map(mapFn));
|
|
583
608
|
}
|
|
584
609
|
/**
|
|
610
|
+
* @description
|
|
585
611
|
* Returns a multiple-result Observable after applying the map function.
|
|
586
612
|
*/
|
|
587
613
|
mapStream(mapFn) {
|
|
@@ -664,6 +690,8 @@ const DELETE_COUNTRY = gql `
|
|
|
664
690
|
const ZONE_FRAGMENT = gql `
|
|
665
691
|
fragment Zone on Zone {
|
|
666
692
|
id
|
|
693
|
+
createdAt
|
|
694
|
+
updatedAt
|
|
667
695
|
name
|
|
668
696
|
members {
|
|
669
697
|
...Country
|
|
@@ -674,10 +702,7 @@ const ZONE_FRAGMENT = gql `
|
|
|
674
702
|
const GET_ZONES = gql `
|
|
675
703
|
query GetZones {
|
|
676
704
|
zones {
|
|
677
|
-
|
|
678
|
-
createdAt
|
|
679
|
-
updatedAt
|
|
680
|
-
name
|
|
705
|
+
...Zone
|
|
681
706
|
members {
|
|
682
707
|
createdAt
|
|
683
708
|
updatedAt
|
|
@@ -688,6 +713,7 @@ const GET_ZONES = gql `
|
|
|
688
713
|
}
|
|
689
714
|
}
|
|
690
715
|
}
|
|
716
|
+
${ZONE_FRAGMENT}
|
|
691
717
|
`;
|
|
692
718
|
const GET_ZONE = gql `
|
|
693
719
|
query GetZone($id: ID!) {
|
|
@@ -819,6 +845,29 @@ const GET_TAX_RATE_LIST = gql `
|
|
|
819
845
|
}
|
|
820
846
|
${TAX_RATE_FRAGMENT}
|
|
821
847
|
`;
|
|
848
|
+
const GET_TAX_RATE_LIST_SIMPLE = gql `
|
|
849
|
+
query GetTaxRateListSimple($options: TaxRateListOptions) {
|
|
850
|
+
taxRates(options: $options) {
|
|
851
|
+
items {
|
|
852
|
+
id
|
|
853
|
+
createdAt
|
|
854
|
+
updatedAt
|
|
855
|
+
name
|
|
856
|
+
enabled
|
|
857
|
+
value
|
|
858
|
+
category {
|
|
859
|
+
id
|
|
860
|
+
name
|
|
861
|
+
}
|
|
862
|
+
zone {
|
|
863
|
+
id
|
|
864
|
+
name
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
totalItems
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
`;
|
|
822
871
|
const GET_TAX_RATE = gql `
|
|
823
872
|
query GetTaxRate($id: ID!) {
|
|
824
873
|
taxRate(id: $id) {
|
|
@@ -1046,6 +1095,7 @@ const CUSTOM_FIELD_CONFIG_FRAGMENT = gql `
|
|
|
1046
1095
|
}
|
|
1047
1096
|
readonly
|
|
1048
1097
|
nullable
|
|
1098
|
+
ui
|
|
1049
1099
|
}
|
|
1050
1100
|
`;
|
|
1051
1101
|
const STRING_CUSTOM_FIELD_FRAGMENT = gql `
|
|
@@ -1183,9 +1233,15 @@ const GET_SERVER_CONFIG = gql `
|
|
|
1183
1233
|
Collection {
|
|
1184
1234
|
...CustomFields
|
|
1185
1235
|
}
|
|
1236
|
+
Country {
|
|
1237
|
+
...CustomFields
|
|
1238
|
+
}
|
|
1186
1239
|
Customer {
|
|
1187
1240
|
...CustomFields
|
|
1188
1241
|
}
|
|
1242
|
+
CustomerGroup {
|
|
1243
|
+
...CustomFields
|
|
1244
|
+
}
|
|
1189
1245
|
Facet {
|
|
1190
1246
|
...CustomFields
|
|
1191
1247
|
}
|
|
@@ -1204,6 +1260,9 @@ const GET_SERVER_CONFIG = gql `
|
|
|
1204
1260
|
OrderLine {
|
|
1205
1261
|
...CustomFields
|
|
1206
1262
|
}
|
|
1263
|
+
PaymentMethod {
|
|
1264
|
+
...CustomFields
|
|
1265
|
+
}
|
|
1207
1266
|
Product {
|
|
1208
1267
|
...CustomFields
|
|
1209
1268
|
}
|
|
@@ -1216,12 +1275,24 @@ const GET_SERVER_CONFIG = gql `
|
|
|
1216
1275
|
ProductVariant {
|
|
1217
1276
|
...CustomFields
|
|
1218
1277
|
}
|
|
1278
|
+
Promotion {
|
|
1279
|
+
...CustomFields
|
|
1280
|
+
}
|
|
1219
1281
|
ShippingMethod {
|
|
1220
1282
|
...CustomFields
|
|
1221
1283
|
}
|
|
1284
|
+
TaxCategory {
|
|
1285
|
+
...CustomFields
|
|
1286
|
+
}
|
|
1287
|
+
TaxRate {
|
|
1288
|
+
...CustomFields
|
|
1289
|
+
}
|
|
1222
1290
|
User {
|
|
1223
1291
|
...CustomFields
|
|
1224
1292
|
}
|
|
1293
|
+
Zone {
|
|
1294
|
+
...CustomFields
|
|
1295
|
+
}
|
|
1225
1296
|
}
|
|
1226
1297
|
}
|
|
1227
1298
|
}
|
|
@@ -1677,9 +1748,15 @@ class ClientDataService {
|
|
|
1677
1748
|
uiState() {
|
|
1678
1749
|
return this.baseDataService.query(GET_UI_STATE, {}, 'cache-first');
|
|
1679
1750
|
}
|
|
1680
|
-
setUiLanguage(languageCode) {
|
|
1681
|
-
return this.baseDataService.mutate(
|
|
1751
|
+
setUiLanguage(languageCode, locale) {
|
|
1752
|
+
return this.baseDataService.mutate(SET_UI_LANGUAGE_AND_LOCALE, {
|
|
1682
1753
|
languageCode,
|
|
1754
|
+
locale,
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
setUiLocale(locale) {
|
|
1758
|
+
return this.baseDataService.mutate(SET_UI_LOCALE, {
|
|
1759
|
+
locale,
|
|
1683
1760
|
});
|
|
1684
1761
|
}
|
|
1685
1762
|
setContentLanguage(languageCode) {
|
|
@@ -1692,6 +1769,11 @@ class ClientDataService {
|
|
|
1692
1769
|
theme,
|
|
1693
1770
|
});
|
|
1694
1771
|
}
|
|
1772
|
+
setDisplayUiExtensionPoints(display) {
|
|
1773
|
+
return this.baseDataService.mutate(SET_DISPLAY_UI_EXTENSION_POINTS, {
|
|
1774
|
+
display,
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1695
1777
|
setActiveChannel(channelId) {
|
|
1696
1778
|
return this.baseDataService.mutate(SET_ACTIVE_CHANNEL, {
|
|
1697
1779
|
channelId,
|
|
@@ -2675,6 +2757,14 @@ const CUSTOMER_FRAGMENT = gql `
|
|
|
2675
2757
|
}
|
|
2676
2758
|
${ADDRESS_FRAGMENT}
|
|
2677
2759
|
`;
|
|
2760
|
+
const CUSTOMER_GROUP_FRAGMENT = gql `
|
|
2761
|
+
fragment CustomerGroup on CustomerGroup {
|
|
2762
|
+
id
|
|
2763
|
+
createdAt
|
|
2764
|
+
updatedAt
|
|
2765
|
+
name
|
|
2766
|
+
}
|
|
2767
|
+
`;
|
|
2678
2768
|
const GET_CUSTOMER_LIST = gql `
|
|
2679
2769
|
query GetCustomerList($options: CustomerListOptions) {
|
|
2680
2770
|
customers(options: $options) {
|
|
@@ -2765,22 +2855,18 @@ const UPDATE_CUSTOMER_ADDRESS = gql `
|
|
|
2765
2855
|
const CREATE_CUSTOMER_GROUP = gql `
|
|
2766
2856
|
mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {
|
|
2767
2857
|
createCustomerGroup(input: $input) {
|
|
2768
|
-
|
|
2769
|
-
createdAt
|
|
2770
|
-
updatedAt
|
|
2771
|
-
name
|
|
2858
|
+
...CustomerGroup
|
|
2772
2859
|
}
|
|
2773
2860
|
}
|
|
2861
|
+
${CUSTOMER_GROUP_FRAGMENT}
|
|
2774
2862
|
`;
|
|
2775
2863
|
const UPDATE_CUSTOMER_GROUP = gql `
|
|
2776
2864
|
mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {
|
|
2777
2865
|
updateCustomerGroup(input: $input) {
|
|
2778
|
-
|
|
2779
|
-
createdAt
|
|
2780
|
-
updatedAt
|
|
2781
|
-
name
|
|
2866
|
+
...CustomerGroup
|
|
2782
2867
|
}
|
|
2783
2868
|
}
|
|
2869
|
+
${CUSTOMER_GROUP_FRAGMENT}
|
|
2784
2870
|
`;
|
|
2785
2871
|
const DELETE_CUSTOMER_GROUP = gql `
|
|
2786
2872
|
mutation DeleteCustomerGroup($id: ID!) {
|
|
@@ -2794,22 +2880,17 @@ const GET_CUSTOMER_GROUPS = gql `
|
|
|
2794
2880
|
query GetCustomerGroups($options: CustomerGroupListOptions) {
|
|
2795
2881
|
customerGroups(options: $options) {
|
|
2796
2882
|
items {
|
|
2797
|
-
|
|
2798
|
-
createdAt
|
|
2799
|
-
updatedAt
|
|
2800
|
-
name
|
|
2883
|
+
...CustomerGroup
|
|
2801
2884
|
}
|
|
2802
2885
|
totalItems
|
|
2803
2886
|
}
|
|
2804
2887
|
}
|
|
2888
|
+
${CUSTOMER_GROUP_FRAGMENT}
|
|
2805
2889
|
`;
|
|
2806
2890
|
const GET_CUSTOMER_GROUP_WITH_CUSTOMERS = gql `
|
|
2807
2891
|
query GetCustomerGroupWithCustomers($id: ID!, $options: CustomerListOptions) {
|
|
2808
2892
|
customerGroup(id: $id) {
|
|
2809
|
-
|
|
2810
|
-
createdAt
|
|
2811
|
-
updatedAt
|
|
2812
|
-
name
|
|
2893
|
+
...CustomerGroup
|
|
2813
2894
|
customers(options: $options) {
|
|
2814
2895
|
items {
|
|
2815
2896
|
id
|
|
@@ -2823,26 +2904,23 @@ const GET_CUSTOMER_GROUP_WITH_CUSTOMERS = gql `
|
|
|
2823
2904
|
}
|
|
2824
2905
|
}
|
|
2825
2906
|
}
|
|
2907
|
+
${CUSTOMER_GROUP_FRAGMENT}
|
|
2826
2908
|
`;
|
|
2827
2909
|
const ADD_CUSTOMERS_TO_GROUP = gql `
|
|
2828
2910
|
mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {
|
|
2829
2911
|
addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {
|
|
2830
|
-
|
|
2831
|
-
createdAt
|
|
2832
|
-
updatedAt
|
|
2833
|
-
name
|
|
2912
|
+
...CustomerGroup
|
|
2834
2913
|
}
|
|
2835
2914
|
}
|
|
2915
|
+
${CUSTOMER_GROUP_FRAGMENT}
|
|
2836
2916
|
`;
|
|
2837
2917
|
const REMOVE_CUSTOMERS_FROM_GROUP = gql `
|
|
2838
2918
|
mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {
|
|
2839
2919
|
removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {
|
|
2840
|
-
|
|
2841
|
-
createdAt
|
|
2842
|
-
updatedAt
|
|
2843
|
-
name
|
|
2920
|
+
...CustomerGroup
|
|
2844
2921
|
}
|
|
2845
2922
|
}
|
|
2923
|
+
${CUSTOMER_GROUP_FRAGMENT}
|
|
2846
2924
|
`;
|
|
2847
2925
|
const GET_CUSTOMER_HISTORY = gql `
|
|
2848
2926
|
query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {
|
|
@@ -5038,12 +5116,12 @@ class SettingsDataService {
|
|
|
5038
5116
|
}
|
|
5039
5117
|
createCountry(input) {
|
|
5040
5118
|
return this.baseDataService.mutate(CREATE_COUNTRY, {
|
|
5041
|
-
input: pick(input, ['code', 'enabled', 'translations']),
|
|
5119
|
+
input: pick(input, ['code', 'enabled', 'translations', 'customFields']),
|
|
5042
5120
|
});
|
|
5043
5121
|
}
|
|
5044
5122
|
updateCountry(input) {
|
|
5045
5123
|
return this.baseDataService.mutate(UPDATE_COUNTRY, {
|
|
5046
|
-
input: pick(input, ['id', 'code', 'enabled', 'translations']),
|
|
5124
|
+
input: pick(input, ['id', 'code', 'enabled', 'translations', 'customFields']),
|
|
5047
5125
|
});
|
|
5048
5126
|
}
|
|
5049
5127
|
deleteCountry(id) {
|
|
@@ -5115,6 +5193,14 @@ class SettingsDataService {
|
|
|
5115
5193
|
},
|
|
5116
5194
|
}, fetchPolicy);
|
|
5117
5195
|
}
|
|
5196
|
+
getTaxRatesSimple(take = 10, skip = 0, fetchPolicy) {
|
|
5197
|
+
return this.baseDataService.query(GET_TAX_RATE_LIST_SIMPLE, {
|
|
5198
|
+
options: {
|
|
5199
|
+
take,
|
|
5200
|
+
skip,
|
|
5201
|
+
},
|
|
5202
|
+
}, fetchPolicy);
|
|
5203
|
+
}
|
|
5118
5204
|
getTaxRate(id) {
|
|
5119
5205
|
return this.baseDataService.query(GET_TAX_RATE, {
|
|
5120
5206
|
id,
|
|
@@ -5406,7 +5492,19 @@ class ShippingMethodDataService {
|
|
|
5406
5492
|
}
|
|
5407
5493
|
}
|
|
5408
5494
|
|
|
5495
|
+
/**
|
|
5496
|
+
* @description
|
|
5497
|
+
* Used to interact with the Admin API via GraphQL queries. Internally this service uses the
|
|
5498
|
+
* Apollo Client, which means it maintains a normalized entity cache. For this reason, it is
|
|
5499
|
+
* advisable to always select the `id` field of any entity, which will allow the returned data
|
|
5500
|
+
* to be effectively cached.
|
|
5501
|
+
*
|
|
5502
|
+
* @docsCategory providers
|
|
5503
|
+
* @docsPage DataService
|
|
5504
|
+
* @docsWeight 0
|
|
5505
|
+
*/
|
|
5409
5506
|
class DataService {
|
|
5507
|
+
/** @internal */
|
|
5410
5508
|
constructor(baseDataService) {
|
|
5411
5509
|
this.baseDataService = baseDataService;
|
|
5412
5510
|
this.promotion = new PromotionDataService(baseDataService);
|
|
@@ -5422,13 +5520,43 @@ class DataService {
|
|
|
5422
5520
|
this.shippingMethod = new ShippingMethodDataService(baseDataService);
|
|
5423
5521
|
}
|
|
5424
5522
|
/**
|
|
5425
|
-
*
|
|
5523
|
+
* @description
|
|
5524
|
+
* Perform a GraphQL query. Returns a {@link QueryResult} which allows further control over
|
|
5525
|
+
* they type of result returned, e.g. stream of values, single value etc.
|
|
5526
|
+
*
|
|
5527
|
+
* @example
|
|
5528
|
+
* ```TypeScript
|
|
5529
|
+
* const result$ = this.dataService.query(gql`
|
|
5530
|
+
* query MyQuery($id: ID!) {
|
|
5531
|
+
* product(id: $id) {
|
|
5532
|
+
* id
|
|
5533
|
+
* name
|
|
5534
|
+
* slug
|
|
5535
|
+
* }
|
|
5536
|
+
* },
|
|
5537
|
+
* { id: 123 },
|
|
5538
|
+
* ).mapSingle(data => data.product);
|
|
5539
|
+
* ```
|
|
5426
5540
|
*/
|
|
5427
5541
|
query(query, variables, fetchPolicy = 'cache-and-network') {
|
|
5428
5542
|
return this.baseDataService.query(query, variables, fetchPolicy);
|
|
5429
5543
|
}
|
|
5430
5544
|
/**
|
|
5545
|
+
* @description
|
|
5431
5546
|
* Perform a GraphQL mutation.
|
|
5547
|
+
*
|
|
5548
|
+
* @example
|
|
5549
|
+
* ```TypeScript
|
|
5550
|
+
* const result$ = this.dataService.mutate(gql`
|
|
5551
|
+
* mutation MyMutation($input: UpdateEntityInput!) {
|
|
5552
|
+
* updateEntity(input: $input) {
|
|
5553
|
+
* id
|
|
5554
|
+
* name
|
|
5555
|
+
* }
|
|
5556
|
+
* },
|
|
5557
|
+
* { input: updateEntityInput },
|
|
5558
|
+
* );
|
|
5559
|
+
* ```
|
|
5432
5560
|
*/
|
|
5433
5561
|
mutate(mutation, variables, update) {
|
|
5434
5562
|
return this.baseDataService.mutate(mutation, variables, update);
|
|
@@ -5481,6 +5609,21 @@ class AppComponent {
|
|
|
5481
5609
|
}
|
|
5482
5610
|
},
|
|
5483
5611
|
});
|
|
5612
|
+
if (isDevMode()) {
|
|
5613
|
+
// tslint:disable-next-line:no-console
|
|
5614
|
+
console.log(`%cVendure Admin UI: Press "ctrl/cmd + u" to view UI extension points`, `color: #17C1FF; font-weight: bold;`);
|
|
5615
|
+
}
|
|
5616
|
+
}
|
|
5617
|
+
handleGlobalHotkeys(event) {
|
|
5618
|
+
if (event.ctrlKey === true && event.key === 'u') {
|
|
5619
|
+
event.preventDefault();
|
|
5620
|
+
if (isDevMode()) {
|
|
5621
|
+
this.dataService.client
|
|
5622
|
+
.uiState()
|
|
5623
|
+
.single$.pipe(switchMap(({ uiState }) => this.dataService.client.setDisplayUiExtensionPoints(!uiState.displayUiExtensionPoints)))
|
|
5624
|
+
.subscribe();
|
|
5625
|
+
}
|
|
5626
|
+
}
|
|
5484
5627
|
}
|
|
5485
5628
|
}
|
|
5486
5629
|
AppComponent.decorators = [
|
|
@@ -5495,7 +5638,10 @@ AppComponent.ctorParameters = () => [
|
|
|
5495
5638
|
{ type: ServerConfigService },
|
|
5496
5639
|
{ type: LocalStorageService },
|
|
5497
5640
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
5498
|
-
];
|
|
5641
|
+
];
|
|
5642
|
+
AppComponent.propDecorators = {
|
|
5643
|
+
handleGlobalHotkeys: [{ type: HostListener, args: ['window:keydown', ['$event'],] }]
|
|
5644
|
+
};
|
|
5499
5645
|
|
|
5500
5646
|
let vendureUiConfig;
|
|
5501
5647
|
function loadAppConfig() {
|
|
@@ -5514,6 +5660,14 @@ function getAppConfig() {
|
|
|
5514
5660
|
|
|
5515
5661
|
function getDefaultUiLanguage() {
|
|
5516
5662
|
return getAppConfig().defaultLanguage;
|
|
5663
|
+
}
|
|
5664
|
+
function getDefaultUiLocale() {
|
|
5665
|
+
var _a;
|
|
5666
|
+
const defaultLocale = getAppConfig().defaultLocale;
|
|
5667
|
+
if (defaultLocale) {
|
|
5668
|
+
return defaultLocale;
|
|
5669
|
+
}
|
|
5670
|
+
return (_a = navigator.language.split('-')[1]) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
5517
5671
|
}
|
|
5518
5672
|
|
|
5519
5673
|
/**
|
|
@@ -5659,7 +5813,7 @@ I18nService.ctorParameters = () => [
|
|
|
5659
5813
|
];
|
|
5660
5814
|
|
|
5661
5815
|
/**
|
|
5662
|
-
* This component should only be
|
|
5816
|
+
* This component should only be instantiated dynamically by the ModalService. It should not be used
|
|
5663
5817
|
* directly in templates. See {@link ModalService.fromComponent} method for more detail.
|
|
5664
5818
|
*/
|
|
5665
5819
|
class ModalDialogComponent {
|
|
@@ -5778,8 +5932,13 @@ OverlayHostService.decorators = [
|
|
|
5778
5932
|
];
|
|
5779
5933
|
|
|
5780
5934
|
/**
|
|
5935
|
+
* @description
|
|
5781
5936
|
* This service is responsible for instantiating a ModalDialog component and
|
|
5782
5937
|
* embedding the specified component within.
|
|
5938
|
+
*
|
|
5939
|
+
* @docsCategory providers
|
|
5940
|
+
* @docsPage ModalService
|
|
5941
|
+
* @docsWeight 0
|
|
5783
5942
|
*/
|
|
5784
5943
|
class ModalService {
|
|
5785
5944
|
constructor(componentFactoryResolver, overlayHostService) {
|
|
@@ -5787,12 +5946,13 @@ class ModalService {
|
|
|
5787
5946
|
this.overlayHostService = overlayHostService;
|
|
5788
5947
|
}
|
|
5789
5948
|
/**
|
|
5949
|
+
* @description
|
|
5790
5950
|
* Create a modal from a component. The component must implement the {@link Dialog} interface.
|
|
5791
5951
|
* Additionally, the component should include templates for the title and the buttons to be
|
|
5792
5952
|
* displayed in the modal dialog. See example:
|
|
5793
5953
|
*
|
|
5794
5954
|
* @example
|
|
5795
|
-
* ```
|
|
5955
|
+
* ```HTML
|
|
5796
5956
|
* class MyDialog implements Dialog {
|
|
5797
5957
|
* resolveWith: (result?: any) => void;
|
|
5798
5958
|
*
|
|
@@ -5808,31 +5968,32 @@ class ModalService {
|
|
|
5808
5968
|
* }
|
|
5809
5969
|
* ```
|
|
5810
5970
|
*
|
|
5811
|
-
*
|
|
5971
|
+
* @example
|
|
5972
|
+
* ```HTML
|
|
5812
5973
|
* <ng-template vdrDialogTitle>Title of the modal</ng-template>
|
|
5813
5974
|
*
|
|
5814
5975
|
* <p>
|
|
5815
|
-
*
|
|
5976
|
+
* My Content
|
|
5816
5977
|
* </p>
|
|
5817
5978
|
*
|
|
5818
5979
|
* <ng-template vdrDialogButtons>
|
|
5819
|
-
*
|
|
5820
|
-
*
|
|
5821
|
-
*
|
|
5822
|
-
*
|
|
5823
|
-
*
|
|
5824
|
-
*
|
|
5980
|
+
* <button type="button"
|
|
5981
|
+
* class="btn"
|
|
5982
|
+
* (click)="cancel()">Cancel</button>
|
|
5983
|
+
* <button type="button"
|
|
5984
|
+
* class="btn btn-primary"
|
|
5985
|
+
* (click)="okay()">Okay</button>
|
|
5825
5986
|
* </ng-template>
|
|
5826
5987
|
* ```
|
|
5827
5988
|
*/
|
|
5828
5989
|
fromComponent(component, options) {
|
|
5829
5990
|
const modalFactory = this.componentFactoryResolver.resolveComponentFactory(ModalDialogComponent);
|
|
5830
|
-
return from(this.overlayHostService.getHostView()).pipe(mergeMap(
|
|
5991
|
+
return from(this.overlayHostService.getHostView()).pipe(mergeMap(hostView => {
|
|
5831
5992
|
const modalComponentRef = hostView.createComponent(modalFactory);
|
|
5832
5993
|
const modalInstance = modalComponentRef.instance;
|
|
5833
5994
|
modalInstance.childComponentType = component;
|
|
5834
5995
|
modalInstance.options = options;
|
|
5835
|
-
return new Observable(
|
|
5996
|
+
return new Observable(subscriber => {
|
|
5836
5997
|
modalInstance.closeModal = (result) => {
|
|
5837
5998
|
modalComponentRef.destroy();
|
|
5838
5999
|
subscriber.next(result);
|
|
@@ -5842,6 +6003,7 @@ class ModalService {
|
|
|
5842
6003
|
}));
|
|
5843
6004
|
}
|
|
5844
6005
|
/**
|
|
6006
|
+
* @description
|
|
5845
6007
|
* Displays a modal dialog with the provided title, body and buttons.
|
|
5846
6008
|
*/
|
|
5847
6009
|
dialog(config) {
|
|
@@ -5864,19 +6026,294 @@ ModalService.ctorParameters = () => [
|
|
|
5864
6026
|
class UiLanguageSwitcherDialogComponent {
|
|
5865
6027
|
constructor() {
|
|
5866
6028
|
this.availableLanguages = [];
|
|
6029
|
+
this.availableLocales = [
|
|
6030
|
+
'AF',
|
|
6031
|
+
'AL',
|
|
6032
|
+
'DZ',
|
|
6033
|
+
'AS',
|
|
6034
|
+
'AD',
|
|
6035
|
+
'AO',
|
|
6036
|
+
'AI',
|
|
6037
|
+
'AQ',
|
|
6038
|
+
'AG',
|
|
6039
|
+
'AR',
|
|
6040
|
+
'AM',
|
|
6041
|
+
'AW',
|
|
6042
|
+
'AU',
|
|
6043
|
+
'AT',
|
|
6044
|
+
'AZ',
|
|
6045
|
+
'BS',
|
|
6046
|
+
'BH',
|
|
6047
|
+
'BD',
|
|
6048
|
+
'BB',
|
|
6049
|
+
'BY',
|
|
6050
|
+
'BE',
|
|
6051
|
+
'BZ',
|
|
6052
|
+
'BJ',
|
|
6053
|
+
'BM',
|
|
6054
|
+
'BT',
|
|
6055
|
+
'BO',
|
|
6056
|
+
'BQ',
|
|
6057
|
+
'BA',
|
|
6058
|
+
'BW',
|
|
6059
|
+
'BV',
|
|
6060
|
+
'BR',
|
|
6061
|
+
'IO',
|
|
6062
|
+
'BN',
|
|
6063
|
+
'BG',
|
|
6064
|
+
'BF',
|
|
6065
|
+
'BI',
|
|
6066
|
+
'CV',
|
|
6067
|
+
'KH',
|
|
6068
|
+
'CM',
|
|
6069
|
+
'CA',
|
|
6070
|
+
'KY',
|
|
6071
|
+
'CF',
|
|
6072
|
+
'TD',
|
|
6073
|
+
'CL',
|
|
6074
|
+
'CN',
|
|
6075
|
+
'CX',
|
|
6076
|
+
'CC',
|
|
6077
|
+
'CO',
|
|
6078
|
+
'KM',
|
|
6079
|
+
'CD',
|
|
6080
|
+
'CG',
|
|
6081
|
+
'CK',
|
|
6082
|
+
'CR',
|
|
6083
|
+
'HR',
|
|
6084
|
+
'CU',
|
|
6085
|
+
'CW',
|
|
6086
|
+
'CY',
|
|
6087
|
+
'CZ',
|
|
6088
|
+
'CI',
|
|
6089
|
+
'DK',
|
|
6090
|
+
'DJ',
|
|
6091
|
+
'DM',
|
|
6092
|
+
'DO',
|
|
6093
|
+
'EC',
|
|
6094
|
+
'EG',
|
|
6095
|
+
'SV',
|
|
6096
|
+
'GQ',
|
|
6097
|
+
'ER',
|
|
6098
|
+
'EE',
|
|
6099
|
+
'SZ',
|
|
6100
|
+
'ET',
|
|
6101
|
+
'FK',
|
|
6102
|
+
'FO',
|
|
6103
|
+
'FJ',
|
|
6104
|
+
'FI',
|
|
6105
|
+
'FR',
|
|
6106
|
+
'GF',
|
|
6107
|
+
'PF',
|
|
6108
|
+
'TF',
|
|
6109
|
+
'GA',
|
|
6110
|
+
'GM',
|
|
6111
|
+
'GE',
|
|
6112
|
+
'DE',
|
|
6113
|
+
'GH',
|
|
6114
|
+
'GI',
|
|
6115
|
+
'GR',
|
|
6116
|
+
'GL',
|
|
6117
|
+
'GD',
|
|
6118
|
+
'GP',
|
|
6119
|
+
'GU',
|
|
6120
|
+
'GT',
|
|
6121
|
+
'GG',
|
|
6122
|
+
'GN',
|
|
6123
|
+
'GW',
|
|
6124
|
+
'GY',
|
|
6125
|
+
'HT',
|
|
6126
|
+
'HM',
|
|
6127
|
+
'VA',
|
|
6128
|
+
'HN',
|
|
6129
|
+
'HK',
|
|
6130
|
+
'HU',
|
|
6131
|
+
'IS',
|
|
6132
|
+
'IN',
|
|
6133
|
+
'ID',
|
|
6134
|
+
'IR',
|
|
6135
|
+
'IQ',
|
|
6136
|
+
'IE',
|
|
6137
|
+
'IM',
|
|
6138
|
+
'IL',
|
|
6139
|
+
'IT',
|
|
6140
|
+
'JM',
|
|
6141
|
+
'JP',
|
|
6142
|
+
'JE',
|
|
6143
|
+
'JO',
|
|
6144
|
+
'KZ',
|
|
6145
|
+
'KE',
|
|
6146
|
+
'KI',
|
|
6147
|
+
'KP',
|
|
6148
|
+
'KR',
|
|
6149
|
+
'KW',
|
|
6150
|
+
'KG',
|
|
6151
|
+
'LA',
|
|
6152
|
+
'LV',
|
|
6153
|
+
'LB',
|
|
6154
|
+
'LS',
|
|
6155
|
+
'LR',
|
|
6156
|
+
'LY',
|
|
6157
|
+
'LI',
|
|
6158
|
+
'LT',
|
|
6159
|
+
'LU',
|
|
6160
|
+
'MO',
|
|
6161
|
+
'MG',
|
|
6162
|
+
'MW',
|
|
6163
|
+
'MY',
|
|
6164
|
+
'MV',
|
|
6165
|
+
'ML',
|
|
6166
|
+
'MT',
|
|
6167
|
+
'MH',
|
|
6168
|
+
'MQ',
|
|
6169
|
+
'MR',
|
|
6170
|
+
'MU',
|
|
6171
|
+
'YT',
|
|
6172
|
+
'MX',
|
|
6173
|
+
'FM',
|
|
6174
|
+
'MD',
|
|
6175
|
+
'MC',
|
|
6176
|
+
'MN',
|
|
6177
|
+
'ME',
|
|
6178
|
+
'MS',
|
|
6179
|
+
'MA',
|
|
6180
|
+
'MZ',
|
|
6181
|
+
'MM',
|
|
6182
|
+
'NA',
|
|
6183
|
+
'NR',
|
|
6184
|
+
'NP',
|
|
6185
|
+
'NL',
|
|
6186
|
+
'NC',
|
|
6187
|
+
'NZ',
|
|
6188
|
+
'NI',
|
|
6189
|
+
'NE',
|
|
6190
|
+
'NG',
|
|
6191
|
+
'NU',
|
|
6192
|
+
'NF',
|
|
6193
|
+
'MK',
|
|
6194
|
+
'MP',
|
|
6195
|
+
'NO',
|
|
6196
|
+
'OM',
|
|
6197
|
+
'PK',
|
|
6198
|
+
'PW',
|
|
6199
|
+
'PS',
|
|
6200
|
+
'PA',
|
|
6201
|
+
'PG',
|
|
6202
|
+
'PY',
|
|
6203
|
+
'PE',
|
|
6204
|
+
'PH',
|
|
6205
|
+
'PN',
|
|
6206
|
+
'PL',
|
|
6207
|
+
'PT',
|
|
6208
|
+
'PR',
|
|
6209
|
+
'QA',
|
|
6210
|
+
'RO',
|
|
6211
|
+
'RU',
|
|
6212
|
+
'RW',
|
|
6213
|
+
'RE',
|
|
6214
|
+
'BL',
|
|
6215
|
+
'SH',
|
|
6216
|
+
'KN',
|
|
6217
|
+
'LC',
|
|
6218
|
+
'MF',
|
|
6219
|
+
'PM',
|
|
6220
|
+
'VC',
|
|
6221
|
+
'WS',
|
|
6222
|
+
'SM',
|
|
6223
|
+
'ST',
|
|
6224
|
+
'SA',
|
|
6225
|
+
'SN',
|
|
6226
|
+
'RS',
|
|
6227
|
+
'SC',
|
|
6228
|
+
'SL',
|
|
6229
|
+
'SG',
|
|
6230
|
+
'SX',
|
|
6231
|
+
'SK',
|
|
6232
|
+
'SI',
|
|
6233
|
+
'SB',
|
|
6234
|
+
'SO',
|
|
6235
|
+
'ZA',
|
|
6236
|
+
'GS',
|
|
6237
|
+
'SS',
|
|
6238
|
+
'ES',
|
|
6239
|
+
'LK',
|
|
6240
|
+
'SD',
|
|
6241
|
+
'SR',
|
|
6242
|
+
'SJ',
|
|
6243
|
+
'SE',
|
|
6244
|
+
'CH',
|
|
6245
|
+
'SY',
|
|
6246
|
+
'TW',
|
|
6247
|
+
'TJ',
|
|
6248
|
+
'TZ',
|
|
6249
|
+
'TH',
|
|
6250
|
+
'TL',
|
|
6251
|
+
'TG',
|
|
6252
|
+
'TK',
|
|
6253
|
+
'TO',
|
|
6254
|
+
'TT',
|
|
6255
|
+
'TN',
|
|
6256
|
+
'TR',
|
|
6257
|
+
'TM',
|
|
6258
|
+
'TC',
|
|
6259
|
+
'TV',
|
|
6260
|
+
'UG',
|
|
6261
|
+
'UA',
|
|
6262
|
+
'AE',
|
|
6263
|
+
'GB',
|
|
6264
|
+
'UM',
|
|
6265
|
+
'US',
|
|
6266
|
+
'UY',
|
|
6267
|
+
'UZ',
|
|
6268
|
+
'VU',
|
|
6269
|
+
'VE',
|
|
6270
|
+
'VN',
|
|
6271
|
+
'VG',
|
|
6272
|
+
'VI',
|
|
6273
|
+
'WF',
|
|
6274
|
+
'EH',
|
|
6275
|
+
'YE',
|
|
6276
|
+
'ZM',
|
|
6277
|
+
'ZW',
|
|
6278
|
+
'AX',
|
|
6279
|
+
];
|
|
6280
|
+
this.availableCurrencyCodes = Object.values(CurrencyCode);
|
|
6281
|
+
this.selectedCurrencyCode = 'USD';
|
|
6282
|
+
this.now = new Date().toISOString();
|
|
6283
|
+
const browserLanguage = navigator.language.split('-');
|
|
6284
|
+
this.browserDefaultLocale = browserLanguage.length === 1 ? undefined : browserLanguage[1];
|
|
6285
|
+
}
|
|
6286
|
+
ngOnInit() {
|
|
6287
|
+
this.updatePreviewLocale();
|
|
6288
|
+
}
|
|
6289
|
+
updatePreviewLocale() {
|
|
6290
|
+
if (!this.currentLocale || this.currentLocale.length === 0 || this.currentLocale.length === 2) {
|
|
6291
|
+
this.previewLocale = this.createLocaleString(this.currentLanguage, this.currentLocale);
|
|
6292
|
+
}
|
|
6293
|
+
}
|
|
6294
|
+
setLanguage() {
|
|
6295
|
+
var _a;
|
|
6296
|
+
this.resolveWith([this.currentLanguage, (_a = this.currentLocale) === null || _a === void 0 ? void 0 : _a.toUpperCase()]);
|
|
5867
6297
|
}
|
|
5868
|
-
|
|
5869
|
-
this.resolveWith(
|
|
6298
|
+
cancel() {
|
|
6299
|
+
this.resolveWith();
|
|
6300
|
+
}
|
|
6301
|
+
createLocaleString(languageCode, region) {
|
|
6302
|
+
if (!region) {
|
|
6303
|
+
return languageCode;
|
|
6304
|
+
}
|
|
6305
|
+
return [languageCode, region.toUpperCase()].join('-');
|
|
5870
6306
|
}
|
|
5871
6307
|
}
|
|
5872
6308
|
UiLanguageSwitcherDialogComponent.decorators = [
|
|
5873
6309
|
{ type: Component, args: [{
|
|
5874
6310
|
selector: 'vdr-ui-language-switcher',
|
|
5875
|
-
template: "<ng-template vdrDialogTitle>{{ 'common.select-display-language' | translate }}</ng-template>\r\n\r\n<div *ngFor=\"let code of availableLanguages\" >\r\n <
|
|
6311
|
+
template: "<ng-template vdrDialogTitle>{{ 'common.select-display-language' | translate }}</ng-template>\r\n<div class=\"clr-row\">\r\n <div class=\"clr-col-md-6\">\r\n <clr-select-container>\r\n <label>{{ 'common.language' | translate }}</label>\r\n <select\r\n clrSelect\r\n name=\"options\"\r\n [(ngModel)]=\"currentLanguage\"\r\n (ngModelChange)=\"updatePreviewLocale()\"\r\n >\r\n <option *ngFor=\"let code of availableLanguages | sort\" [value]=\"code\">\r\n {{ code | uppercase }} ({{ code | localeLanguageName }})\r\n </option>\r\n </select>\r\n </clr-select-container>\r\n </div>\r\n <div class=\"clr-col-md-6\">\r\n <clr-datalist-container>\r\n <label>{{ 'common.locale' | translate }}</label>\r\n <input\r\n clrDatalistInput\r\n [(ngModel)]=\"currentLocale\"\r\n (ngModelChange)=\"updatePreviewLocale()\"\r\n [placeholder]=\"'common.browser-default' | translate\"\r\n class=\"locale\"\r\n name=\"Locale\"\r\n />\r\n <datalist>\r\n <option *ngFor=\"let locale of availableLocales\" [value]=\"locale\">\r\n {{ locale }} ({{ locale | localeRegionName }})\r\n </option>\r\n </datalist>\r\n </clr-datalist-container>\r\n </div>\r\n</div>\r\n<div class=\"card\">\r\n <div class=\"card-header\">\r\n <span class=\"p2\">{{ 'common.sample-formatting' | translate }}:</span><strong>{{ previewLocale | localeLanguageName:previewLocale }}</strong>\r\n </div>\r\n <div class=\"card-block\">\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-sm-4\">\r\n <vdr-labeled-data [label]=\"'common.medium-date' | translate\">\r\n {{ now | localeDate: 'medium':previewLocale }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'common.short-date' | translate\">\r\n {{ now | localeDate: 'short':previewLocale }}\r\n </vdr-labeled-data>\r\n </div>\r\n <div class=\"clr-col-sm-4\">\r\n <select clrSelect name=\"currency\" class=\"currency\" [(ngModel)]=\"selectedCurrencyCode\">\r\n <option *ngFor=\"let code of availableCurrencyCodes | sort\" [value]=\"code\">\r\n {{ code | uppercase }} ({{ code | localeCurrencyName: 'full':previewLocale }})\r\n </option>\r\n </select>\r\n </div>\r\n <div class=\"clr-col-sm-4\">\r\n <vdr-labeled-data [label]=\"'common.price' | translate\">\r\n {{ 12345 | localeCurrency: selectedCurrencyCode:previewLocale }}\r\n </vdr-labeled-data>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button\r\n type=\"submit\"\r\n (click)=\"setLanguage()\"\r\n class=\"btn btn-primary\"\r\n >\r\n {{ 'common.set-language' | translate }}\r\n </button>\r\n</ng-template>\r\n",
|
|
5876
6312
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5877
|
-
styles: [""]
|
|
6313
|
+
styles: ["select.currency{max-width:200px}input.locale{text-transform:uppercase}\n"]
|
|
5878
6314
|
},] }
|
|
5879
|
-
];
|
|
6315
|
+
];
|
|
6316
|
+
UiLanguageSwitcherDialogComponent.ctorParameters = () => [];
|
|
5880
6317
|
|
|
5881
6318
|
class AppShellComponent {
|
|
5882
6319
|
constructor(authService, dataService, router, i18nService, modalService, localStorageService) {
|
|
@@ -5892,23 +6329,28 @@ class AppShellComponent {
|
|
|
5892
6329
|
this.userName$ = this.dataService.client
|
|
5893
6330
|
.userStatus()
|
|
5894
6331
|
.single$.pipe(map(data => data.userStatus.username));
|
|
5895
|
-
this.
|
|
6332
|
+
this.uiLanguageAndLocale$ = this.dataService.client
|
|
6333
|
+
.uiState()
|
|
6334
|
+
.stream$.pipe(map(({ uiState }) => { var _a; return [uiState.language, (_a = uiState.locale) !== null && _a !== void 0 ? _a : undefined]; }));
|
|
5896
6335
|
this.availableLanguages = this.i18nService.availableLanguages;
|
|
5897
6336
|
}
|
|
5898
6337
|
selectUiLanguage() {
|
|
5899
|
-
this.
|
|
5900
|
-
.pipe(take(1), switchMap(currentLanguage => this.modalService.fromComponent(UiLanguageSwitcherDialogComponent, {
|
|
6338
|
+
this.uiLanguageAndLocale$
|
|
6339
|
+
.pipe(take(1), switchMap(([currentLanguage, currentLocale]) => this.modalService.fromComponent(UiLanguageSwitcherDialogComponent, {
|
|
5901
6340
|
closable: true,
|
|
5902
|
-
size: '
|
|
6341
|
+
size: 'lg',
|
|
5903
6342
|
locals: {
|
|
5904
6343
|
availableLanguages: this.availableLanguages,
|
|
5905
6344
|
currentLanguage,
|
|
6345
|
+
currentLocale,
|
|
5906
6346
|
},
|
|
5907
|
-
})), switchMap(
|
|
6347
|
+
})), switchMap(result => result ? this.dataService.client.setUiLanguage(result[0], result[1]) : EMPTY))
|
|
5908
6348
|
.subscribe(result => {
|
|
6349
|
+
var _a;
|
|
5909
6350
|
if (result.setUiLanguage) {
|
|
5910
6351
|
this.i18nService.setLanguage(result.setUiLanguage);
|
|
5911
6352
|
this.localStorageService.set('uiLanguageCode', result.setUiLanguage);
|
|
6353
|
+
this.localStorageService.set('uiLocale', (_a = result.setUiLocale) !== null && _a !== void 0 ? _a : undefined);
|
|
5912
6354
|
}
|
|
5913
6355
|
});
|
|
5914
6356
|
}
|
|
@@ -5927,7 +6369,7 @@ class AppShellComponent {
|
|
|
5927
6369
|
AppShellComponent.decorators = [
|
|
5928
6370
|
{ type: Component, args: [{
|
|
5929
6371
|
selector: 'vdr-app-shell',
|
|
5930
|
-
template: "<clr-main-container>\r\n <clr-header>\r\n <div class=\"branding\">\r\n <a [routerLink]=\"['/']\"><img src=\"assets/logo-75px.png\" class=\"logo\" /></a>\r\n </div>\r\n <div class=\"header-nav\"></div>\r\n <div class=\"header-actions\">\r\n <vdr-channel-switcher *vdrIfMultichannel></vdr-channel-switcher>\r\n <vdr-user-menu [userName]=\"userName$ | async\"\r\n [
|
|
6372
|
+
template: "<clr-main-container>\r\n <clr-header>\r\n <div class=\"branding\">\r\n <a [routerLink]=\"['/']\"><img src=\"assets/logo-75px.png\" class=\"logo\" /></a>\r\n </div>\r\n <div class=\"header-nav\"></div>\r\n <div class=\"header-actions\">\r\n <vdr-channel-switcher *vdrIfMultichannel></vdr-channel-switcher>\r\n <vdr-user-menu [userName]=\"userName$ | async\"\r\n [uiLanguageAndLocale]=\"uiLanguageAndLocale$ | async\"\r\n [availableLanguages]=\"availableLanguages\"\r\n (selectUiLanguage)=\"selectUiLanguage()\"\r\n (logOut)=\"logOut()\"></vdr-user-menu>\r\n </div>\r\n </clr-header>\r\n <nav class=\"subnav\"><vdr-breadcrumb></vdr-breadcrumb></nav>\r\n\r\n <div class=\"content-container\">\r\n <div class=\"content-area\"><router-outlet></router-outlet></div>\r\n <vdr-main-nav></vdr-main-nav>\r\n </div>\r\n</clr-main-container>\r\n",
|
|
5931
6373
|
styles: [".branding{min-width:0}.logo{width:60px}@media screen and (min-width: 768px){vdr-breadcrumb{margin-left:10.8rem}}.header-actions{align-items:center}.content-area{position:relative}\n"]
|
|
5932
6374
|
},] }
|
|
5933
6375
|
];
|
|
@@ -6252,16 +6694,18 @@ JobQueueService.ctorParameters = () => [
|
|
|
6252
6694
|
* imports: [SharedModule],
|
|
6253
6695
|
* providers: [
|
|
6254
6696
|
* addNavMenuSection({
|
|
6255
|
-
* id: '
|
|
6256
|
-
* label: '
|
|
6257
|
-
*
|
|
6258
|
-
*
|
|
6697
|
+
* id: 'reports',
|
|
6698
|
+
* label: 'Reports',
|
|
6699
|
+
* items: [{
|
|
6700
|
+
* // ...
|
|
6701
|
+
* }],
|
|
6259
6702
|
* },
|
|
6260
6703
|
* 'settings'),
|
|
6261
6704
|
* ],
|
|
6262
6705
|
* })
|
|
6263
6706
|
* export class MyUiExtensionModule {}
|
|
6264
6707
|
* ```
|
|
6708
|
+
* @docsCategory nav-menu
|
|
6265
6709
|
*/
|
|
6266
6710
|
function addNavMenuSection(config, before) {
|
|
6267
6711
|
return {
|
|
@@ -6289,17 +6733,18 @@ function addNavMenuSection(config, before) {
|
|
|
6289
6733
|
* imports: [SharedModule],
|
|
6290
6734
|
* providers: [
|
|
6291
6735
|
* addNavMenuItem({
|
|
6292
|
-
* id: '
|
|
6293
|
-
* label: '
|
|
6294
|
-
*
|
|
6295
|
-
*
|
|
6296
|
-
* }],
|
|
6736
|
+
* id: 'reviews',
|
|
6737
|
+
* label: 'Product Reviews',
|
|
6738
|
+
* routerLink: ['/extensions/reviews'],
|
|
6739
|
+
* icon: 'star',
|
|
6297
6740
|
* },
|
|
6298
6741
|
* 'marketing'),
|
|
6299
6742
|
* ],
|
|
6300
6743
|
* })
|
|
6301
6744
|
* export class MyUiExtensionModule {}
|
|
6302
|
-
*
|
|
6745
|
+
* ``
|
|
6746
|
+
*
|
|
6747
|
+
* @docsCategory nav-menu
|
|
6303
6748
|
*/
|
|
6304
6749
|
function addNavMenuItem(config, sectionId, before) {
|
|
6305
6750
|
return {
|
|
@@ -6334,6 +6779,7 @@ function addNavMenuItem(config, sectionId, before) {
|
|
|
6334
6779
|
* })
|
|
6335
6780
|
* export class MyUiExtensionModule {}
|
|
6336
6781
|
* ```
|
|
6782
|
+
* @docsCategory action-bar
|
|
6337
6783
|
*/
|
|
6338
6784
|
function addActionBarItem(config) {
|
|
6339
6785
|
return {
|
|
@@ -6742,7 +7188,7 @@ class MainNavComponent {
|
|
|
6742
7188
|
MainNavComponent.decorators = [
|
|
6743
7189
|
{ type: Component, args: [{
|
|
6744
7190
|
selector: 'vdr-main-nav',
|
|
6745
|
-
template: "<nav class=\"sidenav\" [clr-nav-level]=\"2\">\r\n <section class=\"sidenav-content\">\r\n <ng-container *ngFor=\"let section of navBuilderService.navMenuConfig$ | async\">\r\n <section\r\n class=\"nav-group\"\r\n [attr.data-section-id]=\"section.id\"\r\n [class.collapsible]=\"section.collapsible\"\r\n *ngIf=\"shouldDisplayLink(section)\"\r\n >\r\n <ng-container *ngIf=\"navBuilderService.sectionBadges[section.id] | async as sectionBadge\">\r\n
|
|
7191
|
+
template: "<nav class=\"sidenav\" [clr-nav-level]=\"2\">\r\n <section class=\"sidenav-content\">\r\n <ng-container *ngFor=\"let section of navBuilderService.navMenuConfig$ | async\">\r\n <section\r\n class=\"nav-group\"\r\n [attr.data-section-id]=\"section.id\"\r\n [class.collapsible]=\"section.collapsible\"\r\n *ngIf=\"shouldDisplayLink(section)\"\r\n >\r\n <vdr-ui-extension-point [locationId]=\"section.id\" api=\"navMenu\" [topPx]=\"-6\" [leftPx]=\"8\">\r\n <ng-container *ngIf=\"navBuilderService.sectionBadges[section.id] | async as sectionBadge\">\r\n <vdr-status-badge\r\n *ngIf=\"sectionBadge !== 'none'\"\r\n [type]=\"sectionBadge\"\r\n ></vdr-status-badge>\r\n </ng-container>\r\n <input [id]=\"section.id\" type=\"checkbox\" [checked]=\"section.collapsedByDefault\" />\r\n <label [for]=\"section.id\">{{ section.label | translate }}</label>\r\n <ul class=\"nav-list\">\r\n <ng-container *ngFor=\"let item of section.items\">\r\n <li *ngIf=\"shouldDisplayLink(item)\">\r\n <a\r\n class=\"nav-link\"\r\n [attr.data-item-id]=\"section.id\"\r\n [routerLink]=\"getRouterLink(item)\"\r\n routerLinkActive=\"active\"\r\n >\r\n <ng-container *ngIf=\"item.statusBadge | async as itemBadge\">\r\n <vdr-status-badge\r\n *ngIf=\"itemBadge.type !== 'none'\"\r\n [type]=\"itemBadge.type\"\r\n ></vdr-status-badge>\r\n </ng-container>\r\n <clr-icon [attr.shape]=\"item.icon || 'block'\" size=\"20\"></clr-icon>\r\n {{ item.label | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </vdr-ui-extension-point>\r\n </section>\r\n </ng-container>\r\n </section>\r\n</nav>\r\n",
|
|
6746
7192
|
styles: [":host{order:-1;background-color:var(--clr-nav-background-color)}nav.sidenav{height:100%;width:10.8rem;border-right-color:var(--clr-sidenav-border-color)}.nav-list clr-icon{margin-right:12px}.nav-group,.nav-link{position:relative}.nav-group vdr-status-badge{left:10px;top:6px}.nav-link vdr-status-badge{left:25px;top:3px}\n"]
|
|
6747
7193
|
},] }
|
|
6748
7194
|
];
|
|
@@ -6884,202 +7330,268 @@ class UserMenuComponent {
|
|
|
6884
7330
|
UserMenuComponent.decorators = [
|
|
6885
7331
|
{ type: Component, args: [{
|
|
6886
7332
|
selector: 'vdr-user-menu',
|
|
6887
|
-
template: "<vdr-dropdown>\r\n <button class=\"btn btn-link trigger\" vdrDropdownTrigger>\r\n <span class=\"user-name\">{{ userName }}</span>\r\n <clr-icon shape=\"user\" size=\"24\"></clr-icon>\r\n <clr-icon shape=\"caret down\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <a [routerLink]=\"['/settings', 'profile']\" vdrDropdownItem>\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon> {{ 'settings.profile' | translate }}\r\n </a>\r\n <ng-container *ngIf=\"1 < availableLanguages.length\">\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"selectUiLanguage.emit()\"\r\n [title]=\"'common.select-display-language' | translate\"\r\n >\r\n <clr-icon shape=\"language\"></clr-icon> {{
|
|
7333
|
+
template: "<vdr-dropdown>\r\n <button class=\"btn btn-link trigger\" vdrDropdownTrigger>\r\n <span class=\"user-name\">{{ userName }}</span>\r\n <clr-icon shape=\"user\" size=\"24\"></clr-icon>\r\n <clr-icon shape=\"caret down\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <a [routerLink]=\"['/settings', 'profile']\" vdrDropdownItem>\r\n <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon> {{ 'settings.profile' | translate }}\r\n </a>\r\n <ng-container *ngIf=\"1 < availableLanguages.length\">\r\n <button\r\n type=\"button\"\r\n vdrDropdownItem\r\n (click)=\"selectUiLanguage.emit()\"\r\n [title]=\"'common.select-display-language' | translate\"\r\n >\r\n <clr-icon shape=\"language\"></clr-icon> {{ uiLanguageAndLocale?.[0] | localeLanguageName }}\r\n </button>\r\n </ng-container>\r\n <div class=\"dropdown-item\">\r\n <vdr-theme-switcher></vdr-theme-switcher>\r\n </div>\r\n <div class=\"dropdown-divider\"></div>\r\n <button type=\"button\" vdrDropdownItem (click)=\"logOut.emit()\">\r\n <clr-icon shape=\"logout\"></clr-icon> {{ 'common.log-out' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n",
|
|
6888
7334
|
styles: [":host{display:flex;align-items:center;margin:0 .5rem;height:2.5rem}.user-name{color:var(--color-grey-200);margin-right:12px}@media screen and (max-width: 768px){.user-name{display:none}}.trigger clr-icon{color:#fff}\n"]
|
|
6889
7335
|
},] }
|
|
6890
7336
|
];
|
|
6891
7337
|
UserMenuComponent.propDecorators = {
|
|
6892
7338
|
userName: [{ type: Input }],
|
|
6893
7339
|
availableLanguages: [{ type: Input }],
|
|
6894
|
-
|
|
7340
|
+
uiLanguageAndLocale: [{ type: Input }],
|
|
6895
7341
|
logOut: [{ type: Output }],
|
|
6896
7342
|
selectUiLanguage: [{ type: Output }]
|
|
6897
7343
|
};
|
|
6898
7344
|
|
|
6899
7345
|
// tslint:disable
|
|
6900
7346
|
const result = {
|
|
6901
|
-
possibleTypes: {
|
|
6902
|
-
AddFulfillmentToOrderResult: [
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
7347
|
+
"possibleTypes": {
|
|
7348
|
+
"AddFulfillmentToOrderResult": [
|
|
7349
|
+
"Fulfillment",
|
|
7350
|
+
"EmptyOrderLineSelectionError",
|
|
7351
|
+
"ItemsAlreadyFulfilledError",
|
|
7352
|
+
"InsufficientStockOnHandError",
|
|
7353
|
+
"InvalidFulfillmentHandlerError",
|
|
7354
|
+
"FulfillmentStateTransitionError",
|
|
7355
|
+
"CreateFulfillmentError"
|
|
6910
7356
|
],
|
|
6911
|
-
AddManualPaymentToOrderResult: [
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
'Order',
|
|
6915
|
-
'EmptyOrderLineSelectionError',
|
|
6916
|
-
'QuantityTooGreatError',
|
|
6917
|
-
'MultipleOrderError',
|
|
6918
|
-
'CancelActiveOrderError',
|
|
6919
|
-
'OrderStateTransitionError',
|
|
7357
|
+
"AddManualPaymentToOrderResult": [
|
|
7358
|
+
"Order",
|
|
7359
|
+
"ManualPaymentStateError"
|
|
6920
7360
|
],
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
CreatePromotionResult: ['Promotion', 'MissingConditionsError'],
|
|
6925
|
-
CustomField: [
|
|
6926
|
-
'BooleanCustomFieldConfig',
|
|
6927
|
-
'DateTimeCustomFieldConfig',
|
|
6928
|
-
'FloatCustomFieldConfig',
|
|
6929
|
-
'IntCustomFieldConfig',
|
|
6930
|
-
'LocaleStringCustomFieldConfig',
|
|
6931
|
-
'RelationCustomFieldConfig',
|
|
6932
|
-
'StringCustomFieldConfig',
|
|
6933
|
-
'TextCustomFieldConfig',
|
|
7361
|
+
"AuthenticationResult": [
|
|
7362
|
+
"CurrentUser",
|
|
7363
|
+
"InvalidCredentialsError"
|
|
6934
7364
|
],
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
'RelationCustomFieldConfig',
|
|
6943
|
-
'TextCustomFieldConfig',
|
|
7365
|
+
"CancelOrderResult": [
|
|
7366
|
+
"Order",
|
|
7367
|
+
"EmptyOrderLineSelectionError",
|
|
7368
|
+
"QuantityTooGreatError",
|
|
7369
|
+
"MultipleOrderError",
|
|
7370
|
+
"CancelActiveOrderError",
|
|
7371
|
+
"OrderStateTransitionError"
|
|
6944
7372
|
],
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
'ChannelDefaultLanguageError',
|
|
6949
|
-
'CreateFulfillmentError',
|
|
6950
|
-
'EmailAddressConflictError',
|
|
6951
|
-
'EmptyOrderLineSelectionError',
|
|
6952
|
-
'FulfillmentStateTransitionError',
|
|
6953
|
-
'InsufficientStockError',
|
|
6954
|
-
'InsufficientStockOnHandError',
|
|
6955
|
-
'InvalidCredentialsError',
|
|
6956
|
-
'InvalidFulfillmentHandlerError',
|
|
6957
|
-
'ItemsAlreadyFulfilledError',
|
|
6958
|
-
'LanguageNotAvailableError',
|
|
6959
|
-
'ManualPaymentStateError',
|
|
6960
|
-
'MimeTypeError',
|
|
6961
|
-
'MissingConditionsError',
|
|
6962
|
-
'MultipleOrderError',
|
|
6963
|
-
'NativeAuthStrategyError',
|
|
6964
|
-
'NegativeQuantityError',
|
|
6965
|
-
'NoChangesSpecifiedError',
|
|
6966
|
-
'NothingToRefundError',
|
|
6967
|
-
'OrderLimitError',
|
|
6968
|
-
'OrderModificationStateError',
|
|
6969
|
-
'OrderStateTransitionError',
|
|
6970
|
-
'PaymentMethodMissingError',
|
|
6971
|
-
'PaymentOrderMismatchError',
|
|
6972
|
-
'PaymentStateTransitionError',
|
|
6973
|
-
'ProductOptionInUseError',
|
|
6974
|
-
'QuantityTooGreatError',
|
|
6975
|
-
'RefundOrderStateError',
|
|
6976
|
-
'RefundPaymentIdMissingError',
|
|
6977
|
-
'RefundStateTransitionError',
|
|
6978
|
-
'SettlePaymentError',
|
|
7373
|
+
"CreateAssetResult": [
|
|
7374
|
+
"Asset",
|
|
7375
|
+
"MimeTypeError"
|
|
6979
7376
|
],
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
'OrderModificationStateError',
|
|
6984
|
-
'PaymentMethodMissingError',
|
|
6985
|
-
'RefundPaymentIdMissingError',
|
|
6986
|
-
'OrderLimitError',
|
|
6987
|
-
'NegativeQuantityError',
|
|
6988
|
-
'InsufficientStockError',
|
|
7377
|
+
"CreateChannelResult": [
|
|
7378
|
+
"Channel",
|
|
7379
|
+
"LanguageNotAvailableError"
|
|
6989
7380
|
],
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
'Administrator',
|
|
6994
|
-
'Allocation',
|
|
6995
|
-
'Asset',
|
|
6996
|
-
'AuthenticationMethod',
|
|
6997
|
-
'Cancellation',
|
|
6998
|
-
'Channel',
|
|
6999
|
-
'Collection',
|
|
7000
|
-
'Country',
|
|
7001
|
-
'Customer',
|
|
7002
|
-
'CustomerGroup',
|
|
7003
|
-
'Facet',
|
|
7004
|
-
'FacetValue',
|
|
7005
|
-
'Fulfillment',
|
|
7006
|
-
'HistoryEntry',
|
|
7007
|
-
'Job',
|
|
7008
|
-
'Order',
|
|
7009
|
-
'OrderItem',
|
|
7010
|
-
'OrderLine',
|
|
7011
|
-
'OrderModification',
|
|
7012
|
-
'Payment',
|
|
7013
|
-
'PaymentMethod',
|
|
7014
|
-
'Product',
|
|
7015
|
-
'ProductOption',
|
|
7016
|
-
'ProductOptionGroup',
|
|
7017
|
-
'ProductVariant',
|
|
7018
|
-
'Promotion',
|
|
7019
|
-
'Refund',
|
|
7020
|
-
'Release',
|
|
7021
|
-
'Return',
|
|
7022
|
-
'Role',
|
|
7023
|
-
'Sale',
|
|
7024
|
-
'ShippingMethod',
|
|
7025
|
-
'StockAdjustment',
|
|
7026
|
-
'Surcharge',
|
|
7027
|
-
'Tag',
|
|
7028
|
-
'TaxCategory',
|
|
7029
|
-
'TaxRate',
|
|
7030
|
-
'User',
|
|
7031
|
-
'Zone',
|
|
7381
|
+
"CreateCustomerResult": [
|
|
7382
|
+
"Customer",
|
|
7383
|
+
"EmailAddressConflictError"
|
|
7032
7384
|
],
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
'CollectionList',
|
|
7037
|
-
'CountryList',
|
|
7038
|
-
'CustomerGroupList',
|
|
7039
|
-
'CustomerList',
|
|
7040
|
-
'FacetList',
|
|
7041
|
-
'HistoryEntryList',
|
|
7042
|
-
'JobList',
|
|
7043
|
-
'OrderList',
|
|
7044
|
-
'PaymentMethodList',
|
|
7045
|
-
'ProductList',
|
|
7046
|
-
'ProductVariantList',
|
|
7047
|
-
'PromotionList',
|
|
7048
|
-
'RoleList',
|
|
7049
|
-
'ShippingMethodList',
|
|
7050
|
-
'TagList',
|
|
7051
|
-
'TaxRateList',
|
|
7385
|
+
"CreatePromotionResult": [
|
|
7386
|
+
"Promotion",
|
|
7387
|
+
"MissingConditionsError"
|
|
7052
7388
|
],
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
'RefundStateTransitionError',
|
|
7389
|
+
"CustomField": [
|
|
7390
|
+
"BooleanCustomFieldConfig",
|
|
7391
|
+
"DateTimeCustomFieldConfig",
|
|
7392
|
+
"FloatCustomFieldConfig",
|
|
7393
|
+
"IntCustomFieldConfig",
|
|
7394
|
+
"LocaleStringCustomFieldConfig",
|
|
7395
|
+
"RelationCustomFieldConfig",
|
|
7396
|
+
"StringCustomFieldConfig",
|
|
7397
|
+
"TextCustomFieldConfig"
|
|
7063
7398
|
],
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7399
|
+
"CustomFieldConfig": [
|
|
7400
|
+
"StringCustomFieldConfig",
|
|
7401
|
+
"LocaleStringCustomFieldConfig",
|
|
7402
|
+
"IntCustomFieldConfig",
|
|
7403
|
+
"FloatCustomFieldConfig",
|
|
7404
|
+
"BooleanCustomFieldConfig",
|
|
7405
|
+
"DateTimeCustomFieldConfig",
|
|
7406
|
+
"RelationCustomFieldConfig",
|
|
7407
|
+
"TextCustomFieldConfig"
|
|
7071
7408
|
],
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7409
|
+
"ErrorResult": [
|
|
7410
|
+
"AlreadyRefundedError",
|
|
7411
|
+
"CancelActiveOrderError",
|
|
7412
|
+
"ChannelDefaultLanguageError",
|
|
7413
|
+
"CreateFulfillmentError",
|
|
7414
|
+
"EmailAddressConflictError",
|
|
7415
|
+
"EmptyOrderLineSelectionError",
|
|
7416
|
+
"FulfillmentStateTransitionError",
|
|
7417
|
+
"InsufficientStockError",
|
|
7418
|
+
"InsufficientStockOnHandError",
|
|
7419
|
+
"InvalidCredentialsError",
|
|
7420
|
+
"InvalidFulfillmentHandlerError",
|
|
7421
|
+
"ItemsAlreadyFulfilledError",
|
|
7422
|
+
"LanguageNotAvailableError",
|
|
7423
|
+
"ManualPaymentStateError",
|
|
7424
|
+
"MimeTypeError",
|
|
7425
|
+
"MissingConditionsError",
|
|
7426
|
+
"MultipleOrderError",
|
|
7427
|
+
"NativeAuthStrategyError",
|
|
7428
|
+
"NegativeQuantityError",
|
|
7429
|
+
"NoChangesSpecifiedError",
|
|
7430
|
+
"NothingToRefundError",
|
|
7431
|
+
"OrderLimitError",
|
|
7432
|
+
"OrderModificationStateError",
|
|
7433
|
+
"OrderStateTransitionError",
|
|
7434
|
+
"PaymentMethodMissingError",
|
|
7435
|
+
"PaymentOrderMismatchError",
|
|
7436
|
+
"PaymentStateTransitionError",
|
|
7437
|
+
"ProductOptionInUseError",
|
|
7438
|
+
"QuantityTooGreatError",
|
|
7439
|
+
"RefundOrderStateError",
|
|
7440
|
+
"RefundPaymentIdMissingError",
|
|
7441
|
+
"RefundStateTransitionError",
|
|
7442
|
+
"SettlePaymentError"
|
|
7443
|
+
],
|
|
7444
|
+
"ModifyOrderResult": [
|
|
7445
|
+
"Order",
|
|
7446
|
+
"NoChangesSpecifiedError",
|
|
7447
|
+
"OrderModificationStateError",
|
|
7448
|
+
"PaymentMethodMissingError",
|
|
7449
|
+
"RefundPaymentIdMissingError",
|
|
7450
|
+
"OrderLimitError",
|
|
7451
|
+
"NegativeQuantityError",
|
|
7452
|
+
"InsufficientStockError"
|
|
7453
|
+
],
|
|
7454
|
+
"NativeAuthenticationResult": [
|
|
7455
|
+
"CurrentUser",
|
|
7456
|
+
"InvalidCredentialsError",
|
|
7457
|
+
"NativeAuthStrategyError"
|
|
7458
|
+
],
|
|
7459
|
+
"Node": [
|
|
7460
|
+
"Address",
|
|
7461
|
+
"Administrator",
|
|
7462
|
+
"Allocation",
|
|
7463
|
+
"Asset",
|
|
7464
|
+
"AuthenticationMethod",
|
|
7465
|
+
"Cancellation",
|
|
7466
|
+
"Channel",
|
|
7467
|
+
"Collection",
|
|
7468
|
+
"Country",
|
|
7469
|
+
"Customer",
|
|
7470
|
+
"CustomerGroup",
|
|
7471
|
+
"Facet",
|
|
7472
|
+
"FacetValue",
|
|
7473
|
+
"Fulfillment",
|
|
7474
|
+
"HistoryEntry",
|
|
7475
|
+
"Job",
|
|
7476
|
+
"Order",
|
|
7477
|
+
"OrderItem",
|
|
7478
|
+
"OrderLine",
|
|
7479
|
+
"OrderModification",
|
|
7480
|
+
"Payment",
|
|
7481
|
+
"PaymentMethod",
|
|
7482
|
+
"Product",
|
|
7483
|
+
"ProductOption",
|
|
7484
|
+
"ProductOptionGroup",
|
|
7485
|
+
"ProductVariant",
|
|
7486
|
+
"Promotion",
|
|
7487
|
+
"Refund",
|
|
7488
|
+
"Release",
|
|
7489
|
+
"Return",
|
|
7490
|
+
"Role",
|
|
7491
|
+
"Sale",
|
|
7492
|
+
"ShippingMethod",
|
|
7493
|
+
"StockAdjustment",
|
|
7494
|
+
"Surcharge",
|
|
7495
|
+
"Tag",
|
|
7496
|
+
"TaxCategory",
|
|
7497
|
+
"TaxRate",
|
|
7498
|
+
"User",
|
|
7499
|
+
"Zone"
|
|
7500
|
+
],
|
|
7501
|
+
"PaginatedList": [
|
|
7502
|
+
"AdministratorList",
|
|
7503
|
+
"AssetList",
|
|
7504
|
+
"CollectionList",
|
|
7505
|
+
"CountryList",
|
|
7506
|
+
"CustomerGroupList",
|
|
7507
|
+
"CustomerList",
|
|
7508
|
+
"FacetList",
|
|
7509
|
+
"HistoryEntryList",
|
|
7510
|
+
"JobList",
|
|
7511
|
+
"OrderList",
|
|
7512
|
+
"PaymentMethodList",
|
|
7513
|
+
"ProductList",
|
|
7514
|
+
"ProductVariantList",
|
|
7515
|
+
"PromotionList",
|
|
7516
|
+
"RoleList",
|
|
7517
|
+
"ShippingMethodList",
|
|
7518
|
+
"TagList",
|
|
7519
|
+
"TaxRateList"
|
|
7520
|
+
],
|
|
7521
|
+
"RefundOrderResult": [
|
|
7522
|
+
"Refund",
|
|
7523
|
+
"QuantityTooGreatError",
|
|
7524
|
+
"NothingToRefundError",
|
|
7525
|
+
"OrderStateTransitionError",
|
|
7526
|
+
"MultipleOrderError",
|
|
7527
|
+
"PaymentOrderMismatchError",
|
|
7528
|
+
"RefundOrderStateError",
|
|
7529
|
+
"AlreadyRefundedError",
|
|
7530
|
+
"RefundStateTransitionError"
|
|
7531
|
+
],
|
|
7532
|
+
"RemoveOptionGroupFromProductResult": [
|
|
7533
|
+
"Product",
|
|
7534
|
+
"ProductOptionInUseError"
|
|
7535
|
+
],
|
|
7536
|
+
"SearchResultPrice": [
|
|
7537
|
+
"PriceRange",
|
|
7538
|
+
"SinglePrice"
|
|
7539
|
+
],
|
|
7540
|
+
"SettlePaymentResult": [
|
|
7541
|
+
"Payment",
|
|
7542
|
+
"SettlePaymentError",
|
|
7543
|
+
"PaymentStateTransitionError",
|
|
7544
|
+
"OrderStateTransitionError"
|
|
7545
|
+
],
|
|
7546
|
+
"SettleRefundResult": [
|
|
7547
|
+
"Refund",
|
|
7548
|
+
"RefundStateTransitionError"
|
|
7549
|
+
],
|
|
7550
|
+
"StockMovement": [
|
|
7551
|
+
"Allocation",
|
|
7552
|
+
"Cancellation",
|
|
7553
|
+
"Release",
|
|
7554
|
+
"Return",
|
|
7555
|
+
"Sale",
|
|
7556
|
+
"StockAdjustment"
|
|
7557
|
+
],
|
|
7558
|
+
"StockMovementItem": [
|
|
7559
|
+
"StockAdjustment",
|
|
7560
|
+
"Allocation",
|
|
7561
|
+
"Sale",
|
|
7562
|
+
"Cancellation",
|
|
7563
|
+
"Return",
|
|
7564
|
+
"Release"
|
|
7565
|
+
],
|
|
7566
|
+
"TransitionFulfillmentToStateResult": [
|
|
7567
|
+
"Fulfillment",
|
|
7568
|
+
"FulfillmentStateTransitionError"
|
|
7569
|
+
],
|
|
7570
|
+
"TransitionOrderToStateResult": [
|
|
7571
|
+
"Order",
|
|
7572
|
+
"OrderStateTransitionError"
|
|
7573
|
+
],
|
|
7574
|
+
"TransitionPaymentToStateResult": [
|
|
7575
|
+
"Payment",
|
|
7576
|
+
"PaymentStateTransitionError"
|
|
7577
|
+
],
|
|
7578
|
+
"UpdateChannelResult": [
|
|
7579
|
+
"Channel",
|
|
7580
|
+
"LanguageNotAvailableError"
|
|
7581
|
+
],
|
|
7582
|
+
"UpdateCustomerResult": [
|
|
7583
|
+
"Customer",
|
|
7584
|
+
"EmailAddressConflictError"
|
|
7585
|
+
],
|
|
7586
|
+
"UpdateGlobalSettingsResult": [
|
|
7587
|
+
"GlobalSettings",
|
|
7588
|
+
"ChannelDefaultLanguageError"
|
|
7589
|
+
],
|
|
7590
|
+
"UpdatePromotionResult": [
|
|
7591
|
+
"Promotion",
|
|
7592
|
+
"MissingConditionsError"
|
|
7593
|
+
]
|
|
7594
|
+
}
|
|
7083
7595
|
};
|
|
7084
7596
|
|
|
7085
7597
|
// Allows the introspectionResult to be imported as a named symbol
|
|
@@ -7116,6 +7628,7 @@ class CheckJobsLink extends ApolloLink {
|
|
|
7116
7628
|
|
|
7117
7629
|
function getClientDefaults(localStorageService) {
|
|
7118
7630
|
const currentLanguage = localStorageService.get('uiLanguageCode') || getDefaultUiLanguage();
|
|
7631
|
+
const currentLocale = localStorageService.get('uiLocale') || getDefaultUiLocale();
|
|
7119
7632
|
const currentContentLanguage = localStorageService.get('contentLanguageCode') || getDefaultUiLanguage();
|
|
7120
7633
|
const activeTheme = localStorageService.get('activeTheme') || 'default';
|
|
7121
7634
|
return {
|
|
@@ -7134,8 +7647,10 @@ function getClientDefaults(localStorageService) {
|
|
|
7134
7647
|
},
|
|
7135
7648
|
uiState: {
|
|
7136
7649
|
language: currentLanguage,
|
|
7650
|
+
locale: currentLocale || '',
|
|
7137
7651
|
contentLanguage: currentContentLanguage,
|
|
7138
7652
|
theme: activeTheme,
|
|
7653
|
+
displayUiExtensionPoints: false,
|
|
7139
7654
|
__typename: 'UiState',
|
|
7140
7655
|
},
|
|
7141
7656
|
};
|
|
@@ -7179,43 +7694,35 @@ const ɵ0$2 = (_, args, { cache }) => {
|
|
|
7179
7694
|
}, ɵ4 = (_, args, { cache }) => {
|
|
7180
7695
|
// tslint:disable-next-line:no-non-null-assertion
|
|
7181
7696
|
const previous = cache.readQuery({ query: GET_UI_STATE });
|
|
7182
|
-
const data =
|
|
7183
|
-
uiState: {
|
|
7184
|
-
__typename: 'UiState',
|
|
7185
|
-
language: args.languageCode,
|
|
7186
|
-
contentLanguage: previous.uiState.contentLanguage,
|
|
7187
|
-
theme: previous.uiState.theme,
|
|
7188
|
-
},
|
|
7189
|
-
};
|
|
7697
|
+
const data = updateUiState(previous, 'language', args.languageCode);
|
|
7190
7698
|
cache.writeQuery({ query: GET_UI_STATE, data });
|
|
7191
7699
|
return args.languageCode;
|
|
7192
7700
|
}, ɵ5 = (_, args, { cache }) => {
|
|
7701
|
+
var _a;
|
|
7193
7702
|
// tslint:disable-next-line:no-non-null-assertion
|
|
7194
7703
|
const previous = cache.readQuery({ query: GET_UI_STATE });
|
|
7195
|
-
const data =
|
|
7196
|
-
uiState: {
|
|
7197
|
-
__typename: 'UiState',
|
|
7198
|
-
language: previous.uiState.language,
|
|
7199
|
-
contentLanguage: args.languageCode,
|
|
7200
|
-
theme: previous.uiState.theme,
|
|
7201
|
-
},
|
|
7202
|
-
};
|
|
7704
|
+
const data = updateUiState(previous, 'locale', args.locale);
|
|
7203
7705
|
cache.writeQuery({ query: GET_UI_STATE, data });
|
|
7204
|
-
return args.
|
|
7706
|
+
return (_a = args.locale) !== null && _a !== void 0 ? _a : undefined;
|
|
7205
7707
|
}, ɵ6 = (_, args, { cache }) => {
|
|
7206
7708
|
// tslint:disable-next-line:no-non-null-assertion
|
|
7207
7709
|
const previous = cache.readQuery({ query: GET_UI_STATE });
|
|
7208
|
-
const data =
|
|
7209
|
-
uiState: {
|
|
7210
|
-
__typename: 'UiState',
|
|
7211
|
-
language: previous.uiState.language,
|
|
7212
|
-
contentLanguage: previous.uiState.contentLanguage,
|
|
7213
|
-
theme: args.theme,
|
|
7214
|
-
},
|
|
7215
|
-
};
|
|
7710
|
+
const data = updateUiState(previous, 'contentLanguage', args.languageCode);
|
|
7216
7711
|
cache.writeQuery({ query: GET_UI_STATE, data });
|
|
7217
|
-
return args.
|
|
7712
|
+
return args.languageCode;
|
|
7218
7713
|
}, ɵ7 = (_, args, { cache }) => {
|
|
7714
|
+
// tslint:disable-next-line:no-non-null-assertion
|
|
7715
|
+
const previous = cache.readQuery({ query: GET_UI_STATE });
|
|
7716
|
+
const data = updateUiState(previous, 'theme', args.theme);
|
|
7717
|
+
cache.writeQuery({ query: GET_UI_STATE, data });
|
|
7718
|
+
return args.theme;
|
|
7719
|
+
}, ɵ8 = (_, args, { cache }) => {
|
|
7720
|
+
// tslint:disable-next-line:no-non-null-assertion
|
|
7721
|
+
const previous = cache.readQuery({ query: GET_UI_STATE });
|
|
7722
|
+
const data = updateUiState(previous, 'displayUiExtensionPoints', args.display);
|
|
7723
|
+
cache.writeQuery({ query: GET_UI_STATE, data });
|
|
7724
|
+
return args.display;
|
|
7725
|
+
}, ɵ9 = (_, args, { cache }) => {
|
|
7219
7726
|
// tslint:disable-next-line:no-non-null-assertion
|
|
7220
7727
|
const previous = cache.readQuery({ query: GET_USER_STATUS });
|
|
7221
7728
|
const activeChannel = previous.userStatus.channels.find(c => c.id === args.channelId);
|
|
@@ -7228,7 +7735,7 @@ const ɵ0$2 = (_, args, { cache }) => {
|
|
|
7228
7735
|
};
|
|
7229
7736
|
cache.writeQuery({ query: GET_USER_STATUS, data });
|
|
7230
7737
|
return data.userStatus;
|
|
7231
|
-
}, ɵ
|
|
7738
|
+
}, ɵ10 = (_, args, { cache }) => {
|
|
7232
7739
|
// tslint:disable-next-line:no-non-null-assertion
|
|
7233
7740
|
const previous = cache.readQuery({ query: GET_USER_STATUS });
|
|
7234
7741
|
const data = {
|
|
@@ -7244,12 +7751,19 @@ const clientResolvers = {
|
|
|
7244
7751
|
setAsLoggedIn: ɵ2,
|
|
7245
7752
|
setAsLoggedOut: ɵ3,
|
|
7246
7753
|
setUiLanguage: ɵ4,
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7754
|
+
setUiLocale: ɵ5,
|
|
7755
|
+
setContentLanguage: ɵ6,
|
|
7756
|
+
setUiTheme: ɵ7,
|
|
7757
|
+
setDisplayUiExtensionPoints: ɵ8,
|
|
7758
|
+
setActiveChannel: ɵ9,
|
|
7759
|
+
updateUserChannels: ɵ10,
|
|
7251
7760
|
},
|
|
7252
7761
|
};
|
|
7762
|
+
function updateUiState(previous, key, value) {
|
|
7763
|
+
return {
|
|
7764
|
+
uiState: Object.assign(Object.assign({}, previous.uiState), { [key]: value, __typename: 'UiState' }),
|
|
7765
|
+
};
|
|
7766
|
+
}
|
|
7253
7767
|
function updateRequestsInFlight(cache, increment) {
|
|
7254
7768
|
const previous = cache.readQuery({ query: GET_NEWTORK_STATUS });
|
|
7255
7769
|
const inFlightRequests = previous ? previous.networkStatus.inFlightRequests + increment : increment;
|
|
@@ -7320,7 +7834,25 @@ FetchAdapter.ctorParameters = () => [
|
|
|
7320
7834
|
// How many ms before the toast is dismissed.
|
|
7321
7835
|
const TOAST_DURATION = 3000;
|
|
7322
7836
|
/**
|
|
7837
|
+
* @description
|
|
7323
7838
|
* Provides toast notification functionality.
|
|
7839
|
+
*
|
|
7840
|
+
* @example
|
|
7841
|
+
* ```TypeScript
|
|
7842
|
+
* class MyComponent {
|
|
7843
|
+
* constructor(private notificationService: NotificationService) {}
|
|
7844
|
+
*
|
|
7845
|
+
* save() {
|
|
7846
|
+
* this.notificationService
|
|
7847
|
+
* .success(_('asset.notify-create-assets-success'), {
|
|
7848
|
+
* count: successCount,
|
|
7849
|
+
* });
|
|
7850
|
+
* }
|
|
7851
|
+
* }
|
|
7852
|
+
*
|
|
7853
|
+
* @docsCategory providers
|
|
7854
|
+
* @docsPage NotificationService
|
|
7855
|
+
* @docsWeight 0
|
|
7324
7856
|
*/
|
|
7325
7857
|
class NotificationService {
|
|
7326
7858
|
constructor(i18nService, resolver, overlayHostService) {
|
|
@@ -7333,6 +7865,7 @@ class NotificationService {
|
|
|
7333
7865
|
return this.overlayHostService.getHostView();
|
|
7334
7866
|
}
|
|
7335
7867
|
/**
|
|
7868
|
+
* @description
|
|
7336
7869
|
* Display a success toast notification
|
|
7337
7870
|
*/
|
|
7338
7871
|
success(message, translationVars) {
|
|
@@ -7343,6 +7876,7 @@ class NotificationService {
|
|
|
7343
7876
|
});
|
|
7344
7877
|
}
|
|
7345
7878
|
/**
|
|
7879
|
+
* @description
|
|
7346
7880
|
* Display an info toast notification
|
|
7347
7881
|
*/
|
|
7348
7882
|
info(message, translationVars) {
|
|
@@ -7353,6 +7887,7 @@ class NotificationService {
|
|
|
7353
7887
|
});
|
|
7354
7888
|
}
|
|
7355
7889
|
/**
|
|
7890
|
+
* @description
|
|
7356
7891
|
* Display a warning toast notification
|
|
7357
7892
|
*/
|
|
7358
7893
|
warning(message, translationVars) {
|
|
@@ -7363,6 +7898,7 @@ class NotificationService {
|
|
|
7363
7898
|
});
|
|
7364
7899
|
}
|
|
7365
7900
|
/**
|
|
7901
|
+
* @description
|
|
7366
7902
|
* Display an error toast notification
|
|
7367
7903
|
*/
|
|
7368
7904
|
error(message, translationVars) {
|
|
@@ -7374,6 +7910,7 @@ class NotificationService {
|
|
|
7374
7910
|
});
|
|
7375
7911
|
}
|
|
7376
7912
|
/**
|
|
7913
|
+
* @description
|
|
7377
7914
|
* Display a toast notification.
|
|
7378
7915
|
*/
|
|
7379
7916
|
notify(config) {
|
|
@@ -7753,10 +8290,11 @@ ComponentRegistryService.decorators = [
|
|
|
7753
8290
|
|
|
7754
8291
|
/**
|
|
7755
8292
|
* This service allows the registration of custom controls for customFields.
|
|
8293
|
+
*
|
|
8294
|
+
* @deprecated The ComponentRegistryService now handles custom field components directly.
|
|
7756
8295
|
*/
|
|
7757
8296
|
class CustomFieldComponentService {
|
|
7758
|
-
constructor(
|
|
7759
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
8297
|
+
constructor(componentRegistryService) {
|
|
7760
8298
|
this.componentRegistryService = componentRegistryService;
|
|
7761
8299
|
}
|
|
7762
8300
|
/**
|
|
@@ -7783,17 +8321,23 @@ class CustomFieldComponentService {
|
|
|
7783
8321
|
return id;
|
|
7784
8322
|
}
|
|
7785
8323
|
}
|
|
7786
|
-
CustomFieldComponentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CustomFieldComponentService_Factory() { return new CustomFieldComponentService(i0.ɵɵinject(
|
|
8324
|
+
CustomFieldComponentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CustomFieldComponentService_Factory() { return new CustomFieldComponentService(i0.ɵɵinject(ComponentRegistryService)); }, token: CustomFieldComponentService, providedIn: "root" });
|
|
7787
8325
|
CustomFieldComponentService.decorators = [
|
|
7788
8326
|
{ type: Injectable, args: [{
|
|
7789
8327
|
providedIn: 'root',
|
|
7790
8328
|
},] }
|
|
7791
8329
|
];
|
|
7792
8330
|
CustomFieldComponentService.ctorParameters = () => [
|
|
7793
|
-
{ type: ComponentFactoryResolver },
|
|
7794
8331
|
{ type: ComponentRegistryService }
|
|
7795
8332
|
];
|
|
7796
8333
|
|
|
8334
|
+
/**
|
|
8335
|
+
* @description
|
|
8336
|
+
* A checkbox input. The default input component for `boolean` fields.
|
|
8337
|
+
*
|
|
8338
|
+
* @docsCategory custom-input-components
|
|
8339
|
+
* @docsPage default-inputs
|
|
8340
|
+
*/
|
|
7797
8341
|
class BooleanFormInputComponent {
|
|
7798
8342
|
}
|
|
7799
8343
|
BooleanFormInputComponent.id = 'boolean-form-input';
|
|
@@ -7806,36 +8350,174 @@ BooleanFormInputComponent.decorators = [
|
|
|
7806
8350
|
},] }
|
|
7807
8351
|
];
|
|
7808
8352
|
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
.
|
|
7814
|
-
|
|
7815
|
-
|
|
8353
|
+
function jsonValidator() {
|
|
8354
|
+
return (control) => {
|
|
8355
|
+
const error = { jsonInvalid: true };
|
|
8356
|
+
try {
|
|
8357
|
+
JSON.parse(control.value);
|
|
8358
|
+
}
|
|
8359
|
+
catch (e) {
|
|
8360
|
+
control.setErrors(error);
|
|
8361
|
+
return error;
|
|
8362
|
+
}
|
|
8363
|
+
control.setErrors(null);
|
|
8364
|
+
return null;
|
|
8365
|
+
};
|
|
7816
8366
|
}
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
class CustomerGroupFormInputComponent {
|
|
7834
|
-
constructor(dataService) {
|
|
7835
|
-
this.dataService = dataService;
|
|
8367
|
+
/**
|
|
8368
|
+
* @description
|
|
8369
|
+
* A JSON editor input with syntax highlighting and error detection. Works well
|
|
8370
|
+
* with `text` type fields.
|
|
8371
|
+
*
|
|
8372
|
+
* @docsCategory custom-input-components
|
|
8373
|
+
* @docsPage default-inputs
|
|
8374
|
+
*/
|
|
8375
|
+
class JsonEditorFormInputComponent {
|
|
8376
|
+
constructor(changeDetector) {
|
|
8377
|
+
this.changeDetector = changeDetector;
|
|
8378
|
+
this.isValid = true;
|
|
8379
|
+
}
|
|
8380
|
+
get height() {
|
|
8381
|
+
var _a;
|
|
8382
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.height) || this.config.height;
|
|
7836
8383
|
}
|
|
7837
8384
|
ngOnInit() {
|
|
7838
|
-
this.
|
|
8385
|
+
this.formControl.addValidators(jsonValidator());
|
|
8386
|
+
}
|
|
8387
|
+
ngAfterViewInit() {
|
|
8388
|
+
let lastVal = '';
|
|
8389
|
+
const highlight = (editor) => {
|
|
8390
|
+
var _a;
|
|
8391
|
+
const code = (_a = editor.textContent) !== null && _a !== void 0 ? _a : '';
|
|
8392
|
+
if (code === lastVal) {
|
|
8393
|
+
return;
|
|
8394
|
+
}
|
|
8395
|
+
lastVal = code;
|
|
8396
|
+
this.errorMessage = this.getJsonError(code);
|
|
8397
|
+
this.changeDetector.markForCheck();
|
|
8398
|
+
editor.innerHTML = this.syntaxHighlight(code, this.getErrorPos(this.errorMessage));
|
|
8399
|
+
};
|
|
8400
|
+
this.jar = CodeJar(this.editorElementRef.nativeElement, highlight);
|
|
8401
|
+
this.jar.onUpdate(value => {
|
|
8402
|
+
this.formControl.setValue(value);
|
|
8403
|
+
this.formControl.markAsDirty();
|
|
8404
|
+
this.isValid = this.formControl.valid;
|
|
8405
|
+
});
|
|
8406
|
+
this.jar.updateCode(this.formControl.value);
|
|
8407
|
+
if (this.readonly) {
|
|
8408
|
+
this.editorElementRef.nativeElement.contentEditable = 'false';
|
|
8409
|
+
}
|
|
8410
|
+
}
|
|
8411
|
+
getJsonError(json) {
|
|
8412
|
+
try {
|
|
8413
|
+
JSON.parse(json);
|
|
8414
|
+
}
|
|
8415
|
+
catch (e) {
|
|
8416
|
+
return e.message;
|
|
8417
|
+
}
|
|
8418
|
+
return;
|
|
8419
|
+
}
|
|
8420
|
+
getErrorPos(errorMessage) {
|
|
8421
|
+
if (!errorMessage) {
|
|
8422
|
+
return;
|
|
8423
|
+
}
|
|
8424
|
+
const matches = errorMessage.match(/at position (\d+)/);
|
|
8425
|
+
const pos = matches === null || matches === void 0 ? void 0 : matches[1];
|
|
8426
|
+
return pos != null ? +pos : undefined;
|
|
8427
|
+
}
|
|
8428
|
+
syntaxHighlight(json, errorPos) {
|
|
8429
|
+
json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
8430
|
+
let hasMarkedError = false;
|
|
8431
|
+
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, (match, ...args) => {
|
|
8432
|
+
let cls = 'number';
|
|
8433
|
+
if (/^"/.test(match)) {
|
|
8434
|
+
if (/:$/.test(match)) {
|
|
8435
|
+
cls = 'key';
|
|
8436
|
+
}
|
|
8437
|
+
else {
|
|
8438
|
+
cls = 'string';
|
|
8439
|
+
}
|
|
8440
|
+
}
|
|
8441
|
+
else if (/true|false/.test(match)) {
|
|
8442
|
+
cls = 'boolean';
|
|
8443
|
+
}
|
|
8444
|
+
else if (/null/.test(match)) {
|
|
8445
|
+
cls = 'null';
|
|
8446
|
+
}
|
|
8447
|
+
let errorClass = '';
|
|
8448
|
+
if (errorPos && !hasMarkedError) {
|
|
8449
|
+
const length = args[0].length;
|
|
8450
|
+
const offset = args[4];
|
|
8451
|
+
if (errorPos <= length + offset) {
|
|
8452
|
+
errorClass = 'je-error';
|
|
8453
|
+
hasMarkedError = true;
|
|
8454
|
+
}
|
|
8455
|
+
}
|
|
8456
|
+
return '<span class="je-' + cls + ' ' + errorClass + '">' + match + '</span>';
|
|
8457
|
+
});
|
|
8458
|
+
}
|
|
8459
|
+
}
|
|
8460
|
+
JsonEditorFormInputComponent.id = 'json-editor-form-input';
|
|
8461
|
+
JsonEditorFormInputComponent.decorators = [
|
|
8462
|
+
{ type: Component, args: [{
|
|
8463
|
+
selector: 'vdr-json-editor-form-input',
|
|
8464
|
+
template: "<div #editor class=\"json-editor\" [class.invalid]=\"!isValid\" [style.height]=\"height || '300px'\"></div>\r\n<div class=\"error-message\">\r\n <span *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n</div>\r\n",
|
|
8465
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8466
|
+
styles: [".json-editor{min-height:6rem;background-color:var(--color-json-editor-background-color);color:var(--color-json-editor-text);border:1px solid var(--color-component-border-200);border-radius:3px;padding:6px;-moz-tab-size:4;tab-size:4;font-family:\"Source Code Pro\",\"Lucida Console\",Monaco,monospace;font-size:14px;font-weight:400;height:340px;letter-spacing:normal;line-height:20px;resize:both;text-align:initial;min-width:200px}.json-editor:focus{border-color:var(--color-primary-500)}.json-editor.invalid{border-color:var(--clr-forms-invalid-color)}.json-editor ::ng-deep .je-string{color:var(--color-json-editor-string)}.json-editor ::ng-deep .je-number{color:var(--color-json-editor-number)}.json-editor ::ng-deep .je-boolean{color:var(--color-json-editor-boolean)}.json-editor ::ng-deep .je-null{color:var(--color-json-editor-null)}.json-editor ::ng-deep .je-key{color:var(--color-json-editor-key)}.json-editor ::ng-deep .je-error{-webkit-text-decoration-line:underline;text-decoration-line:underline;-webkit-text-decoration-style:wavy;text-decoration-style:wavy;-webkit-text-decoration-color:var(--color-json-editor-error);text-decoration-color:var(--color-json-editor-error)}.error-message{min-height:1rem;color:var(--color-json-editor-error)}\n"]
|
|
8467
|
+
},] }
|
|
8468
|
+
];
|
|
8469
|
+
JsonEditorFormInputComponent.ctorParameters = () => [
|
|
8470
|
+
{ type: ChangeDetectorRef }
|
|
8471
|
+
];
|
|
8472
|
+
JsonEditorFormInputComponent.propDecorators = {
|
|
8473
|
+
editorElementRef: [{ type: ViewChild, args: ['editor',] }]
|
|
8474
|
+
};
|
|
8475
|
+
|
|
8476
|
+
/**
|
|
8477
|
+
* @description
|
|
8478
|
+
* An input for monetary values. Should be used with `int` type fields.
|
|
8479
|
+
*
|
|
8480
|
+
* @docsCategory custom-input-components
|
|
8481
|
+
* @docsPage default-inputs
|
|
8482
|
+
*/
|
|
8483
|
+
class CurrencyFormInputComponent {
|
|
8484
|
+
constructor(dataService) {
|
|
8485
|
+
this.dataService = dataService;
|
|
8486
|
+
this.currencyCode$ = this.dataService.settings
|
|
8487
|
+
.getActiveChannel()
|
|
8488
|
+
.mapStream(data => data.activeChannel.currencyCode);
|
|
8489
|
+
}
|
|
8490
|
+
}
|
|
8491
|
+
CurrencyFormInputComponent.id = 'currency-form-input';
|
|
8492
|
+
CurrencyFormInputComponent.decorators = [
|
|
8493
|
+
{ type: Component, args: [{
|
|
8494
|
+
selector: 'vdr-currency-form-input',
|
|
8495
|
+
template: "<vdr-currency-input\r\n [formControl]=\"formControl\"\r\n [readonly]=\"readonly\"\r\n [currencyCode]=\"currencyCode$ | async\"\r\n></vdr-currency-input>\r\n",
|
|
8496
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8497
|
+
styles: [""]
|
|
8498
|
+
},] }
|
|
8499
|
+
];
|
|
8500
|
+
CurrencyFormInputComponent.ctorParameters = () => [
|
|
8501
|
+
{ type: DataService }
|
|
8502
|
+
];
|
|
8503
|
+
CurrencyFormInputComponent.propDecorators = {
|
|
8504
|
+
readonly: [{ type: Input }]
|
|
8505
|
+
};
|
|
8506
|
+
|
|
8507
|
+
/**
|
|
8508
|
+
* @description
|
|
8509
|
+
* Allows the selection of a Customer via an autocomplete select input.
|
|
8510
|
+
* Should be used with `ID` type fields which represent Customer IDs.
|
|
8511
|
+
*
|
|
8512
|
+
* @docsCategory custom-input-components
|
|
8513
|
+
* @docsPage default-inputs
|
|
8514
|
+
*/
|
|
8515
|
+
class CustomerGroupFormInputComponent {
|
|
8516
|
+
constructor(dataService) {
|
|
8517
|
+
this.dataService = dataService;
|
|
8518
|
+
}
|
|
8519
|
+
ngOnInit() {
|
|
8520
|
+
this.customerGroups$ = this.dataService.customer
|
|
7839
8521
|
.getCustomerGroupList({
|
|
7840
8522
|
take: 1000,
|
|
7841
8523
|
})
|
|
@@ -7862,13 +8544,32 @@ CustomerGroupFormInputComponent.propDecorators = {
|
|
|
7862
8544
|
readonly: [{ type: Input }]
|
|
7863
8545
|
};
|
|
7864
8546
|
|
|
8547
|
+
/**
|
|
8548
|
+
* @description
|
|
8549
|
+
* Allows selection of a datetime. Default input for `datetime` type fields.
|
|
8550
|
+
*
|
|
8551
|
+
* @docsCategory custom-input-components
|
|
8552
|
+
* @docsPage default-inputs
|
|
8553
|
+
*/
|
|
7865
8554
|
class DateFormInputComponent {
|
|
8555
|
+
get min() {
|
|
8556
|
+
var _a;
|
|
8557
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.min) || this.config.min;
|
|
8558
|
+
}
|
|
8559
|
+
get max() {
|
|
8560
|
+
var _a;
|
|
8561
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.max) || this.config.max;
|
|
8562
|
+
}
|
|
8563
|
+
get yearRange() {
|
|
8564
|
+
var _a;
|
|
8565
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.yearRange) || this.config.yearRange;
|
|
8566
|
+
}
|
|
7866
8567
|
}
|
|
7867
8568
|
DateFormInputComponent.id = 'date-form-input';
|
|
7868
8569
|
DateFormInputComponent.decorators = [
|
|
7869
8570
|
{ type: Component, args: [{
|
|
7870
8571
|
selector: 'vdr-date-form-input',
|
|
7871
|
-
template: "<vdr-datetime-picker\r\n [formControl]=\"formControl\"\r\n [min]=\"
|
|
8572
|
+
template: "<vdr-datetime-picker\r\n [formControl]=\"formControl\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [yearRange]=\"yearRange\"\r\n [readonly]=\"readonly\"\r\n>\r\n</vdr-datetime-picker>\r\n",
|
|
7872
8573
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7873
8574
|
styles: [""]
|
|
7874
8575
|
},] }
|
|
@@ -7877,6 +8578,14 @@ DateFormInputComponent.propDecorators = {
|
|
|
7877
8578
|
readonly: [{ type: Input }]
|
|
7878
8579
|
};
|
|
7879
8580
|
|
|
8581
|
+
/**
|
|
8582
|
+
* @description
|
|
8583
|
+
* Allows the selection of multiple FacetValues via an autocomplete select input.
|
|
8584
|
+
* Should be used with `ID` type **list** fields which represent FacetValue IDs.
|
|
8585
|
+
*
|
|
8586
|
+
* @docsCategory custom-input-components
|
|
8587
|
+
* @docsPage default-inputs
|
|
8588
|
+
*/
|
|
7880
8589
|
class FacetValueFormInputComponent {
|
|
7881
8590
|
constructor(dataService) {
|
|
7882
8591
|
this.dataService = dataService;
|
|
@@ -7902,13 +8611,40 @@ FacetValueFormInputComponent.ctorParameters = () => [
|
|
|
7902
8611
|
{ type: DataService }
|
|
7903
8612
|
];
|
|
7904
8613
|
|
|
8614
|
+
/**
|
|
8615
|
+
* @description
|
|
8616
|
+
* Displays a number input. Default input for `int` and `float` type fields.
|
|
8617
|
+
*
|
|
8618
|
+
* @docsCategory custom-input-components
|
|
8619
|
+
* @docsPage default-inputs
|
|
8620
|
+
*/
|
|
7905
8621
|
class NumberFormInputComponent {
|
|
8622
|
+
get prefix() {
|
|
8623
|
+
var _a;
|
|
8624
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.prefix) || this.config.prefix;
|
|
8625
|
+
}
|
|
8626
|
+
get suffix() {
|
|
8627
|
+
var _a;
|
|
8628
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.suffix) || this.config.suffix;
|
|
8629
|
+
}
|
|
8630
|
+
get min() {
|
|
8631
|
+
var _a;
|
|
8632
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.min) || this.config.min;
|
|
8633
|
+
}
|
|
8634
|
+
get max() {
|
|
8635
|
+
var _a;
|
|
8636
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.max) || this.config.max;
|
|
8637
|
+
}
|
|
8638
|
+
get step() {
|
|
8639
|
+
var _a;
|
|
8640
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.step) || this.config.step;
|
|
8641
|
+
}
|
|
7906
8642
|
}
|
|
7907
8643
|
NumberFormInputComponent.id = 'number-form-input';
|
|
7908
8644
|
NumberFormInputComponent.decorators = [
|
|
7909
8645
|
{ type: Component, args: [{
|
|
7910
8646
|
selector: 'vdr-number-form-input',
|
|
7911
|
-
template: "<vdr-affixed-input
|
|
8647
|
+
template: "<vdr-affixed-input\r\n [suffix]=\"suffix\"\r\n [prefix]=\"prefix\"\r\n>\r\n <input\r\n type=\"number\"\r\n [readonly]=\"readonly\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [step]=\"step\"\r\n [formControl]=\"formControl\"\r\n />\r\n</vdr-affixed-input>\r\n",
|
|
7912
8648
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7913
8649
|
styles: [""]
|
|
7914
8650
|
},] }
|
|
@@ -7917,6 +8653,13 @@ NumberFormInputComponent.propDecorators = {
|
|
|
7917
8653
|
readonly: [{ type: Input }]
|
|
7918
8654
|
};
|
|
7919
8655
|
|
|
8656
|
+
/**
|
|
8657
|
+
* @description
|
|
8658
|
+
* Displays a password text input. Should be used with `string` type fields.
|
|
8659
|
+
*
|
|
8660
|
+
* @docsCategory custom-input-components
|
|
8661
|
+
* @docsPage default-inputs
|
|
8662
|
+
*/
|
|
7920
8663
|
class PasswordFormInputComponent {
|
|
7921
8664
|
}
|
|
7922
8665
|
PasswordFormInputComponent.id = 'password-form-input';
|
|
@@ -7929,6 +8672,14 @@ PasswordFormInputComponent.decorators = [
|
|
|
7929
8672
|
},] }
|
|
7930
8673
|
];
|
|
7931
8674
|
|
|
8675
|
+
/**
|
|
8676
|
+
* @description
|
|
8677
|
+
* Allows the selection of multiple ProductVariants via an autocomplete select input.
|
|
8678
|
+
* Should be used with `ID` type **list** fields which represent ProductVariant IDs.
|
|
8679
|
+
*
|
|
8680
|
+
* @docsCategory custom-input-components
|
|
8681
|
+
* @docsPage default-inputs
|
|
8682
|
+
*/
|
|
7932
8683
|
class ProductSelectorFormInputComponent {
|
|
7933
8684
|
constructor(dataService) {
|
|
7934
8685
|
this.dataService = dataService;
|
|
@@ -7976,6 +8727,15 @@ ProductSelectorFormInputComponent.ctorParameters = () => [
|
|
|
7976
8727
|
{ type: DataService }
|
|
7977
8728
|
];
|
|
7978
8729
|
|
|
8730
|
+
/**
|
|
8731
|
+
* @description
|
|
8732
|
+
* The default input component for `relation` type custom fields. Allows the selection
|
|
8733
|
+
* of a ProductVariant, Product, Customer or Asset. For other entity types, a custom
|
|
8734
|
+
* implementation will need to be defined. See {@link registerFormInputComponent}.
|
|
8735
|
+
*
|
|
8736
|
+
* @docsCategory custom-input-components
|
|
8737
|
+
* @docsPage default-inputs
|
|
8738
|
+
*/
|
|
7979
8739
|
class RelationFormInputComponent {
|
|
7980
8740
|
}
|
|
7981
8741
|
RelationFormInputComponent.id = 'relation-form-input';
|
|
@@ -7991,13 +8751,44 @@ RelationFormInputComponent.propDecorators = {
|
|
|
7991
8751
|
readonly: [{ type: Input }]
|
|
7992
8752
|
};
|
|
7993
8753
|
|
|
8754
|
+
/**
|
|
8755
|
+
* @description
|
|
8756
|
+
* Uses the {@link RichTextEditorComponent} as in input for `text` type fields.
|
|
8757
|
+
*
|
|
8758
|
+
* @docsCategory custom-input-components
|
|
8759
|
+
* @docsPage default-inputs
|
|
8760
|
+
*/
|
|
8761
|
+
class RichTextFormInputComponent {
|
|
8762
|
+
}
|
|
8763
|
+
RichTextFormInputComponent.id = 'rich-text-form-input';
|
|
8764
|
+
RichTextFormInputComponent.decorators = [
|
|
8765
|
+
{ type: Component, args: [{
|
|
8766
|
+
selector: 'vdr-rich-text-form-input',
|
|
8767
|
+
template: "<vdr-rich-text-editor\r\n [readonly]=\"readonly\"\r\n [formControl]=\"formControl\"\r\n></vdr-rich-text-editor>\r\n",
|
|
8768
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8769
|
+
styles: [":host textarea{resize:both;height:6rem;width:100%}\n"]
|
|
8770
|
+
},] }
|
|
8771
|
+
];
|
|
8772
|
+
|
|
8773
|
+
/**
|
|
8774
|
+
* @description
|
|
8775
|
+
* Uses a select input to allow the selection of a string value. Should be used with
|
|
8776
|
+
* `string` type fields with options.
|
|
8777
|
+
*
|
|
8778
|
+
* @docsCategory custom-input-components
|
|
8779
|
+
* @docsPage default-inputs
|
|
8780
|
+
*/
|
|
7994
8781
|
class SelectFormInputComponent {
|
|
8782
|
+
get options() {
|
|
8783
|
+
var _a;
|
|
8784
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.options) || this.config.options;
|
|
8785
|
+
}
|
|
7995
8786
|
}
|
|
7996
8787
|
SelectFormInputComponent.id = 'select-form-input';
|
|
7997
8788
|
SelectFormInputComponent.decorators = [
|
|
7998
8789
|
{ type: Component, args: [{
|
|
7999
8790
|
selector: 'vdr-select-form-input',
|
|
8000
|
-
template: "<select clrSelect [formControl]=\"formControl\" [vdrDisabled]=\"readonly\">\r\n <option *ngIf=\"config.nullable\" [ngValue]=\"null\"></option>\r\n <option *ngFor=\"let option of
|
|
8791
|
+
template: "<select clrSelect [formControl]=\"formControl\" [vdrDisabled]=\"readonly\">\r\n <option *ngIf=\"config.nullable\" [ngValue]=\"null\"></option>\r\n <option *ngFor=\"let option of options\" [value]=\"option.value\">\r\n {{ (option | customFieldLabel) || option.label || option.value }}\r\n </option>\r\n</select>\r\n",
|
|
8001
8792
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8002
8793
|
styles: ["select{width:100%}\n"]
|
|
8003
8794
|
},] }
|
|
@@ -8006,18 +8797,40 @@ SelectFormInputComponent.propDecorators = {
|
|
|
8006
8797
|
readonly: [{ type: Input }]
|
|
8007
8798
|
};
|
|
8008
8799
|
|
|
8800
|
+
/**
|
|
8801
|
+
* @description
|
|
8802
|
+
* Uses a regular text form input. This is the default input for `string` and `localeString` type fields.
|
|
8803
|
+
*
|
|
8804
|
+
* @docsCategory custom-input-components
|
|
8805
|
+
* @docsPage default-inputs
|
|
8806
|
+
*/
|
|
8009
8807
|
class TextFormInputComponent {
|
|
8808
|
+
get prefix() {
|
|
8809
|
+
var _a;
|
|
8810
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.prefix) || this.config.prefix;
|
|
8811
|
+
}
|
|
8812
|
+
get suffix() {
|
|
8813
|
+
var _a;
|
|
8814
|
+
return ((_a = this.config.ui) === null || _a === void 0 ? void 0 : _a.suffix) || this.config.suffix;
|
|
8815
|
+
}
|
|
8010
8816
|
}
|
|
8011
8817
|
TextFormInputComponent.id = 'text-form-input';
|
|
8012
8818
|
TextFormInputComponent.decorators = [
|
|
8013
8819
|
{ type: Component, args: [{
|
|
8014
8820
|
selector: 'vdr-text-form-input',
|
|
8015
|
-
template: "<input\r\n
|
|
8821
|
+
template: "<vdr-affixed-input\r\n [suffix]=\"suffix\"\r\n [prefix]=\"prefix\"\r\n>\r\n <input type=\"text\" [readonly]=\"readonly\" [formControl]=\"formControl\" />\r\n</vdr-affixed-input>\r\n",
|
|
8016
8822
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8017
8823
|
styles: ["input{width:100%}\n"]
|
|
8018
8824
|
},] }
|
|
8019
8825
|
];
|
|
8020
8826
|
|
|
8827
|
+
/**
|
|
8828
|
+
* @description
|
|
8829
|
+
* Uses textarea form input. This is the default input for `text` type fields.
|
|
8830
|
+
*
|
|
8831
|
+
* @docsCategory custom-input-components
|
|
8832
|
+
* @docsPage default-inputs
|
|
8833
|
+
*/
|
|
8021
8834
|
class TextareaFormInputComponent {
|
|
8022
8835
|
get spellcheck() {
|
|
8023
8836
|
return this.config.spellcheck === true;
|
|
@@ -8046,11 +8859,14 @@ const defaultFormInputs = [
|
|
|
8046
8859
|
PasswordFormInputComponent,
|
|
8047
8860
|
RelationFormInputComponent,
|
|
8048
8861
|
TextareaFormInputComponent,
|
|
8862
|
+
RichTextFormInputComponent,
|
|
8863
|
+
JsonEditorFormInputComponent,
|
|
8049
8864
|
];
|
|
8050
8865
|
/**
|
|
8051
8866
|
* @description
|
|
8052
8867
|
* Registers a custom FormInputComponent which can be used to control the argument inputs
|
|
8053
|
-
* of a {@link ConfigurableOperationDef} (e.g. CollectionFilter, ShippingMethod etc)
|
|
8868
|
+
* of a {@link ConfigurableOperationDef} (e.g. CollectionFilter, ShippingMethod etc) or for
|
|
8869
|
+
* a custom field.
|
|
8054
8870
|
*
|
|
8055
8871
|
* @example
|
|
8056
8872
|
* ```TypeScript
|
|
@@ -8063,6 +8879,35 @@ const defaultFormInputs = [
|
|
|
8063
8879
|
* })
|
|
8064
8880
|
* export class MyUiExtensionModule {}
|
|
8065
8881
|
* ```
|
|
8882
|
+
*
|
|
8883
|
+
* This input component can then be used in a custom field:
|
|
8884
|
+
*
|
|
8885
|
+
* @example
|
|
8886
|
+
* ```TypeScript
|
|
8887
|
+
* const config = {
|
|
8888
|
+
* // ...
|
|
8889
|
+
* customFields: {
|
|
8890
|
+
* ProductVariant: [
|
|
8891
|
+
* {
|
|
8892
|
+
* name: 'rrp',
|
|
8893
|
+
* type: 'int',
|
|
8894
|
+
* ui: { component: 'my-custom-input' },
|
|
8895
|
+
* },
|
|
8896
|
+
* ]
|
|
8897
|
+
* }
|
|
8898
|
+
* }
|
|
8899
|
+
* ```
|
|
8900
|
+
*
|
|
8901
|
+
* or with an argument of a {@link ConfigurableOperationDef}:
|
|
8902
|
+
*
|
|
8903
|
+
* @example
|
|
8904
|
+
* ```TypeScript
|
|
8905
|
+
* args: {
|
|
8906
|
+
* rrp: { type: 'int', ui: { component: 'my-custom-input' } },
|
|
8907
|
+
* }
|
|
8908
|
+
* ```
|
|
8909
|
+
*
|
|
8910
|
+
* @docsCategory custom-input-components
|
|
8066
8911
|
*/
|
|
8067
8912
|
function registerFormInputComponent(id, component) {
|
|
8068
8913
|
return {
|
|
@@ -8076,6 +8921,8 @@ function registerFormInputComponent(id, component) {
|
|
|
8076
8921
|
}
|
|
8077
8922
|
/**
|
|
8078
8923
|
* @description
|
|
8924
|
+
* **Deprecated** use `registerFormInputComponent()` in combination with the customField `ui` config instead.
|
|
8925
|
+
*
|
|
8079
8926
|
* Registers a custom component to act as the form input control for the given custom field.
|
|
8080
8927
|
* This should be used in the NgModule `providers` array of your ui extension module.
|
|
8081
8928
|
*
|
|
@@ -8090,6 +8937,10 @@ function registerFormInputComponent(id, component) {
|
|
|
8090
8937
|
* })
|
|
8091
8938
|
* export class MyUiExtensionModule {}
|
|
8092
8939
|
* ```
|
|
8940
|
+
*
|
|
8941
|
+
* @deprecated use `registerFormInputComponent()` in combination with the customField `ui` config instead.
|
|
8942
|
+
*
|
|
8943
|
+
* @docsCategory custom-input-components
|
|
8093
8944
|
*/
|
|
8094
8945
|
function registerCustomFieldComponent(entity, fieldName, component) {
|
|
8095
8946
|
return {
|
|
@@ -8163,9 +9014,9 @@ class ActionBarItemsComponent {
|
|
|
8163
9014
|
ActionBarItemsComponent.decorators = [
|
|
8164
9015
|
{ type: Component, args: [{
|
|
8165
9016
|
selector: 'vdr-action-bar-items',
|
|
8166
|
-
template: "<ng-container *ngFor=\"let item of items$ | async\">\r\n
|
|
9017
|
+
template: "<vdr-ui-extension-point [locationId]=\"locationId\" api=\"actionBar\" [leftPx]=\"-24\" [topPx]=\"-6\">\r\n <ng-container *ngFor=\"let item of items$ | async\">\r\n <button\r\n *vdrIfPermissions=\"item.requiresPermission\"\r\n [routerLink]=\"getRouterLink(item)\"\r\n [disabled]=\"item.disabled ? (item.disabled | async) : false\"\r\n (click)=\"handleClick($event, item)\"\r\n [ngClass]=\"getButtonStyles(item)\"\r\n >\r\n <clr-icon *ngIf=\"item.icon\" [attr.shape]=\"item.icon\"></clr-icon>\r\n {{ item.label | translate }}\r\n </button>\r\n </ng-container>\r\n</vdr-ui-extension-point>\r\n",
|
|
8167
9018
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8168
|
-
styles: [""]
|
|
9019
|
+
styles: [":host{display:inline-block;min-height:36px}\n"]
|
|
8169
9020
|
},] }
|
|
8170
9021
|
];
|
|
8171
9022
|
ActionBarItemsComponent.ctorParameters = () => [
|
|
@@ -8216,7 +9067,7 @@ ActionBarComponent.decorators = [
|
|
|
8216
9067
|
{ type: Component, args: [{
|
|
8217
9068
|
selector: 'vdr-action-bar',
|
|
8218
9069
|
template: "<div class=\"left-content\" [class.grow]=\"left?.grow\"><ng-content select=\"vdr-ab-left\"></ng-content></div>\r\n<div class=\"right-content\" [class.grow]=\"right?.grow\"><ng-content select=\"vdr-ab-right\"></ng-content></div>\r\n",
|
|
8219
|
-
styles: [":host{display:flex;justify-content:space-between;align-items:
|
|
9070
|
+
styles: [":host{display:flex;justify-content:space-between;align-items:baseline;background-color:var(--color-component-bg-100);position:sticky;top:-24px;z-index:25;border-bottom:1px solid var(--color-component-border-200)}:host>.grow{flex:1}\n"]
|
|
8220
9071
|
},] }
|
|
8221
9072
|
];
|
|
8222
9073
|
ActionBarComponent.propDecorators = {
|
|
@@ -8229,7 +9080,7 @@ class AddressFormComponent {
|
|
|
8229
9080
|
AddressFormComponent.decorators = [
|
|
8230
9081
|
{ type: Component, args: [{
|
|
8231
9082
|
selector: 'vdr-address-form',
|
|
8232
|
-
template: "<form [formGroup]=\"formGroup\">\r\n <clr-input-container>\r\n <label>{{ 'customer.full-name' | translate }}</label>\r\n <input formControlName=\"fullName\" type=\"text\" clrInput
|
|
9083
|
+
template: "<form [formGroup]=\"formGroup\">\r\n <clr-input-container>\r\n <label>{{ 'customer.full-name' | translate }}</label>\r\n <input formControlName=\"fullName\" type=\"text\" clrInput/>\r\n </clr-input-container>\r\n\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.street-line-1' | translate }}</label>\r\n <input formControlName=\"streetLine1\" type=\"text\" clrInput/>\r\n </clr-input-container>\r\n </div>\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.street-line-2' | translate }}</label>\r\n <input formControlName=\"streetLine2\" type=\"text\" clrInput/>\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.city' | translate }}</label>\r\n <input formControlName=\"city\" type=\"text\" clrInput/>\r\n </clr-input-container>\r\n </div>\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.province' | translate }}</label>\r\n <input formControlName=\"province\" type=\"text\" clrInput/>\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.postal-code' | translate }}</label>\r\n <input formControlName=\"postalCode\" type=\"text\" clrInput/>\r\n </clr-input-container>\r\n </div>\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.country' | translate }}</label>\r\n <select name=\"countryCode\" formControlName=\"countryCode\" clrInput clrSelect>\r\n <option *ngFor=\"let country of availableCountries\" [value]=\"country.code\">\r\n {{ country.name }}\r\n </option>\r\n </select>\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <clr-input-container>\r\n <label>{{ 'customer.phone-number' | translate }}</label>\r\n <input formControlName=\"phoneNumber\" type=\"text\" clrInput/>\r\n </clr-input-container>\r\n <section formGroupName=\"customFields\" *ngIf=\"formGroup.get('customFields') as customFieldsGroup\">\r\n <label>{{ 'common.custom-fields' | translate }}</label>\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Address\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"customFieldsGroup\"\r\n ></vdr-tabbed-custom-fields>\r\n </section>\r\n</form>\r\n",
|
|
8233
9084
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8234
9085
|
styles: [""]
|
|
8235
9086
|
},] }
|
|
@@ -8546,7 +9397,25 @@ AssetGalleryComponent.propDecorators = {
|
|
|
8546
9397
|
};
|
|
8547
9398
|
|
|
8548
9399
|
/**
|
|
9400
|
+
* @description
|
|
8549
9401
|
* A dialog which allows the creation and selection of assets.
|
|
9402
|
+
*
|
|
9403
|
+
* @example
|
|
9404
|
+
* ```TypeScript
|
|
9405
|
+
* selectAssets() {
|
|
9406
|
+
* this.modalService
|
|
9407
|
+
* .fromComponent(AssetPickerDialogComponent, {
|
|
9408
|
+
* size: 'xl',
|
|
9409
|
+
* })
|
|
9410
|
+
* .subscribe(result => {
|
|
9411
|
+
* if (result && result.length) {
|
|
9412
|
+
* // ...
|
|
9413
|
+
* }
|
|
9414
|
+
* });
|
|
9415
|
+
* }
|
|
9416
|
+
* ```
|
|
9417
|
+
*
|
|
9418
|
+
* @docsCategory components
|
|
8550
9419
|
*/
|
|
8551
9420
|
class AssetPickerDialogComponent {
|
|
8552
9421
|
constructor(dataService, notificationService) {
|
|
@@ -8762,10 +9631,6 @@ class AssetPreviewComponent {
|
|
|
8762
9631
|
this.subscription.unsubscribe();
|
|
8763
9632
|
}
|
|
8764
9633
|
}
|
|
8765
|
-
customFieldIsSet(name) {
|
|
8766
|
-
var _a;
|
|
8767
|
-
return !!((_a = this.customFieldsForm) === null || _a === void 0 ? void 0 : _a.get([name]));
|
|
8768
|
-
}
|
|
8769
9634
|
getSourceFileName() {
|
|
8770
9635
|
const parts = this.asset.source.split('/');
|
|
8771
9636
|
return parts[parts.length - 1];
|
|
@@ -8861,7 +9726,7 @@ class AssetPreviewComponent {
|
|
|
8861
9726
|
AssetPreviewComponent.decorators = [
|
|
8862
9727
|
{ type: Component, args: [{
|
|
8863
9728
|
selector: 'vdr-asset-preview',
|
|
8864
|
-
template: "<div class=\"preview-image\" #previewDiv [class.centered]=\"centered\">\r\n <div class=\"image-wrapper\">\r\n <vdr-focal-point-control\r\n [width]=\"width\"\r\n [height]=\"height\"\r\n [fpx]=\"fpx\"\r\n [fpy]=\"fpy\"\r\n [editable]=\"settingFocalPoint\"\r\n (focalPointChange)=\"onFocalPointChange($event)\"\r\n >\r\n <img\r\n class=\"asset-image\"\r\n [src]=\"asset | assetPreview: size\"\r\n #imageElement\r\n (load)=\"onImageLoad()\"\r\n />\r\n </vdr-focal-point-control>\r\n <div class=\"focal-point-info\" *ngIf=\"settingFocalPoint\">\r\n <button class=\"icon-button\" (click)=\"setFocalPointCancel()\">\r\n <clr-icon shape=\"times\"></clr-icon>\r\n </button>\r\n <button class=\"btn btn-primary btn-sm\" (click)=\"setFocalPointEnd()\" [disabled]=\"!lastFocalPoint\">\r\n <clr-icon shape=\"crosshairs\"></clr-icon>\r\n {{ 'asset.set-focal-point' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"controls\" [class.fade]=\"settingFocalPoint\">\r\n <form [formGroup]=\"form\">\r\n <clr-input-container class=\"name-input\" *ngIf=\"editable\">\r\n <label>{{ 'common.name' | translate }}</label>\r\n <input\r\n clrInput\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(['UpdateCatalog', 'UpdateAsset'] | hasPermission) || settingFocalPoint\"\r\n />\r\n </clr-input-container>\r\n\r\n <vdr-labeled-data [label]=\"'common.name' | translate\" *ngIf=\"!editable\">\r\n <span class=\"elide\">\r\n {{ asset.name }}\r\n </span>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.source-file' | translate\">\r\n <a [href]=\"asset.source\" [title]=\"asset.source\" target=\"_blank\" class=\"elide source-link\">{{\r\n getSourceFileName()\r\n }}</a>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.original-asset-size' | translate\">\r\n {{ asset.fileSize | filesize }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.dimensions' | translate\">\r\n {{ asset.width }} x {{ asset.height }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.focal-point' | translate\">\r\n <span *ngIf=\"fpx\"\r\n ><clr-icon shape=\"crosshairs\"></clr-icon> x: {{ fpx | number: '1.2-2' }}, y:\r\n {{ fpy | number: '1.2-2' }}</span\r\n >\r\n <span *ngIf=\"!fpx\">{{ 'common.not-set' | translate }}</span>\r\n <br />\r\n <button\r\n class=\"btn btn-secondary-outline btn-sm\"\r\n [disabled]=\"settingFocalPoint\"\r\n (click)=\"setFocalPointStart()\"\r\n >\r\n <ng-container *ngIf=\"!fpx\">{{ 'asset.set-focal-point' | translate }}</ng-container>\r\n <ng-container *ngIf=\"fpx\">{{ 'asset.update-focal-point' | translate }}</ng-container>\r\n </button>\r\n <button\r\n class=\"btn btn-warning-outline btn-sm\"\r\n [disabled]=\"settingFocalPoint\"\r\n *ngIf=\"!!fpx\"\r\n (click)=\"removeFocalPoint()\"\r\n >\r\n {{ 'asset.unset-focal-point' | translate }}\r\n </button>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'common.tags' | translate\">\r\n <ng-container *ngIf=\"editable\">\r\n <vdr-tag-selector formControlName=\"tags\"></vdr-tag-selector>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"manageTags()\">\r\n <clr-icon shape=\"tags\"></clr-icon>\r\n {{ 'common.manage-tags' | translate }}\r\n </button>\r\n </ng-container>\r\n <div *ngIf=\"!editable\">\r\n <vdr-chip *ngFor=\"let tag of asset.tags\" [colorFrom]=\"tag.value\">\r\n <clr-icon shape=\"tag\" class=\"mr2\"></clr-icon>\r\n {{ tag.value }}</vdr-chip\r\n >\r\n </div>\r\n </vdr-labeled-data>\r\n </form>\r\n <section *ngIf=\"customFields.length\">\r\n <label>{{ 'common.custom-fields' | translate }}</label>\r\n <
|
|
9729
|
+
template: "<div class=\"preview-image\" #previewDiv [class.centered]=\"centered\">\r\n <div class=\"image-wrapper\">\r\n <vdr-focal-point-control\r\n [width]=\"width\"\r\n [height]=\"height\"\r\n [fpx]=\"fpx\"\r\n [fpy]=\"fpy\"\r\n [editable]=\"settingFocalPoint\"\r\n (focalPointChange)=\"onFocalPointChange($event)\"\r\n >\r\n <img\r\n class=\"asset-image\"\r\n [src]=\"asset | assetPreview: size\"\r\n #imageElement\r\n (load)=\"onImageLoad()\"\r\n />\r\n </vdr-focal-point-control>\r\n <div class=\"focal-point-info\" *ngIf=\"settingFocalPoint\">\r\n <button class=\"icon-button\" (click)=\"setFocalPointCancel()\">\r\n <clr-icon shape=\"times\"></clr-icon>\r\n </button>\r\n <button class=\"btn btn-primary btn-sm\" (click)=\"setFocalPointEnd()\" [disabled]=\"!lastFocalPoint\">\r\n <clr-icon shape=\"crosshairs\"></clr-icon>\r\n {{ 'asset.set-focal-point' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"controls\" [class.fade]=\"settingFocalPoint\">\r\n <form [formGroup]=\"form\">\r\n <clr-input-container class=\"name-input\" *ngIf=\"editable\">\r\n <label>{{ 'common.name' | translate }}</label>\r\n <input\r\n clrInput\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(['UpdateCatalog', 'UpdateAsset'] | hasPermission) || settingFocalPoint\"\r\n />\r\n </clr-input-container>\r\n\r\n <vdr-labeled-data [label]=\"'common.name' | translate\" *ngIf=\"!editable\">\r\n <span class=\"elide\">\r\n {{ asset.name }}\r\n </span>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.source-file' | translate\">\r\n <a [href]=\"asset.source\" [title]=\"asset.source\" target=\"_blank\" class=\"elide source-link\">{{\r\n getSourceFileName()\r\n }}</a>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.original-asset-size' | translate\">\r\n {{ asset.fileSize | filesize }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.dimensions' | translate\">\r\n {{ asset.width }} x {{ asset.height }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]=\"'asset.focal-point' | translate\">\r\n <span *ngIf=\"fpx\"\r\n ><clr-icon shape=\"crosshairs\"></clr-icon> x: {{ fpx | number: '1.2-2' }}, y:\r\n {{ fpy | number: '1.2-2' }}</span\r\n >\r\n <span *ngIf=\"!fpx\">{{ 'common.not-set' | translate }}</span>\r\n <br />\r\n <button\r\n class=\"btn btn-secondary-outline btn-sm\"\r\n [disabled]=\"settingFocalPoint\"\r\n (click)=\"setFocalPointStart()\"\r\n >\r\n <ng-container *ngIf=\"!fpx\">{{ 'asset.set-focal-point' | translate }}</ng-container>\r\n <ng-container *ngIf=\"fpx\">{{ 'asset.update-focal-point' | translate }}</ng-container>\r\n </button>\r\n <button\r\n class=\"btn btn-warning-outline btn-sm\"\r\n [disabled]=\"settingFocalPoint\"\r\n *ngIf=\"!!fpx\"\r\n (click)=\"removeFocalPoint()\"\r\n >\r\n {{ 'asset.unset-focal-point' | translate }}\r\n </button>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'common.tags' | translate\">\r\n <ng-container *ngIf=\"editable\">\r\n <vdr-tag-selector formControlName=\"tags\"></vdr-tag-selector>\r\n <button class=\"btn btn-link btn-sm\" (click)=\"manageTags()\">\r\n <clr-icon shape=\"tags\"></clr-icon>\r\n {{ 'common.manage-tags' | translate }}\r\n </button>\r\n </ng-container>\r\n <div *ngIf=\"!editable\">\r\n <vdr-chip *ngFor=\"let tag of asset.tags\" [colorFrom]=\"tag.value\">\r\n <clr-icon shape=\"tag\" class=\"mr2\"></clr-icon>\r\n {{ tag.value }}</vdr-chip\r\n >\r\n </div>\r\n </vdr-labeled-data>\r\n </form>\r\n <section *ngIf=\"customFields.length\">\r\n <label>{{ 'common.custom-fields' | translate }}</label>\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Asset\"\r\n [compact]=\"true\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"customFieldsForm\"\r\n [readonly]=\"!(['UpdateCatalog', 'UpdateAsset'] | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </section>\r\n <div class=\"flex-spacer\"></div>\r\n <div class=\"preview-select\">\r\n <clr-select-container>\r\n <label>{{ 'asset.preview' | translate }}</label>\r\n <select clrSelect name=\"options\" [(ngModel)]=\"size\" [disabled]=\"settingFocalPoint\">\r\n <option value=\"tiny\">tiny</option>\r\n <option value=\"thumb\">thumb</option>\r\n <option value=\"small\">small</option>\r\n <option value=\"medium\">medium</option>\r\n <option value=\"large\">large</option>\r\n <option value=\"\">full size</option>\r\n </select>\r\n </clr-select-container>\r\n <div class=\"asset-detail\">{{ width }} x {{ height }}</div>\r\n </div>\r\n <a\r\n *ngIf=\"!editable\"\r\n class=\"btn btn-link btn-sm\"\r\n [routerLink]=\"['/catalog', 'assets', asset.id]\"\r\n (click)=\"editClick.emit()\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </a>\r\n</div>\r\n",
|
|
8865
9730
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8866
9731
|
styles: [":host{display:flex;height:100%}.preview-image{width:100%;height:100%;min-height:60vh;overflow:auto;text-align:center;box-shadow:inset 0 0 5px #0000001a;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACuoAAArqAVDM774AAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAK0lEQVQ4T2P4jwP8xgFGNSADqDwGIF0DlMYAUH0YYFQDMoDKYwASNfz/DwB/JvcficphowAAAABJRU5ErkJggg==);flex:1}.preview-image.centered{display:flex;align-items:center;justify-content:center}.preview-image vdr-focal-point-control{position:relative;box-shadow:0 0 10px -3px #00000026}.preview-image .image-wrapper{position:relative}.preview-image .asset-image{width:100%}.preview-image .focal-point-info{position:absolute;display:flex;right:0}.controls{display:flex;flex-direction:column;margin-left:12px;min-width:15vw;max-width:25vw;transition:opacity .3s}.controls.fade{opacity:.5}.controls .name-input{margin-bottom:24px}.controls ::ng-deep .clr-control-container{width:100%}.controls ::ng-deep .clr-control-container .clr-input{width:100%}.controls .elide{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}.controls .source-link{direction:rtl}.controls .preview-select{display:flex;align-items:center;margin-bottom:12px}.controls .preview-select clr-select-container{margin-right:12px}\n"]
|
|
8867
9732
|
},] }
|
|
@@ -9042,7 +9907,15 @@ class ChannelAssignmentControlComponent {
|
|
|
9042
9907
|
this.disabled = false;
|
|
9043
9908
|
}
|
|
9044
9909
|
ngOnInit() {
|
|
9045
|
-
this.channels$ = this.dataService.client.userStatus().single$.pipe(map(({ userStatus }) => userStatus.channels.filter(c => this.includeDefaultChannel ? true : c.code !== DEFAULT_CHANNEL_CODE)), tap(channels =>
|
|
9910
|
+
this.channels$ = this.dataService.client.userStatus().single$.pipe(map(({ userStatus }) => userStatus.channels.filter(c => this.includeDefaultChannel ? true : c.code !== DEFAULT_CHANNEL_CODE)), tap(channels => {
|
|
9911
|
+
if (!this.channels) {
|
|
9912
|
+
this.channels = channels;
|
|
9913
|
+
this.mapIncomingValueToChannels(this.lastIncomingValue);
|
|
9914
|
+
}
|
|
9915
|
+
else {
|
|
9916
|
+
this.channels = channels;
|
|
9917
|
+
}
|
|
9918
|
+
}));
|
|
9046
9919
|
}
|
|
9047
9920
|
registerOnChange(fn) {
|
|
9048
9921
|
this.onChange = fn;
|
|
@@ -9054,26 +9927,8 @@ class ChannelAssignmentControlComponent {
|
|
|
9054
9927
|
this.disabled = isDisabled;
|
|
9055
9928
|
}
|
|
9056
9929
|
writeValue(obj) {
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
if (typeof obj[0] === 'string') {
|
|
9060
|
-
this.value = obj.map(id => { var _a; return (_a = this.channels) === null || _a === void 0 ? void 0 : _a.find(c => c.id === id); }).filter(notNullOrUndefined);
|
|
9061
|
-
}
|
|
9062
|
-
else {
|
|
9063
|
-
this.value = obj;
|
|
9064
|
-
}
|
|
9065
|
-
}
|
|
9066
|
-
else {
|
|
9067
|
-
if (typeof obj === 'string') {
|
|
9068
|
-
const channel = (_a = this.channels) === null || _a === void 0 ? void 0 : _a.find(c => c.id === obj);
|
|
9069
|
-
if (channel) {
|
|
9070
|
-
this.value = [channel];
|
|
9071
|
-
}
|
|
9072
|
-
}
|
|
9073
|
-
else if (obj && obj.id) {
|
|
9074
|
-
this.value = [obj];
|
|
9075
|
-
}
|
|
9076
|
-
}
|
|
9930
|
+
this.lastIncomingValue = obj;
|
|
9931
|
+
this.mapIncomingValueToChannels(obj);
|
|
9077
9932
|
}
|
|
9078
9933
|
focussed() {
|
|
9079
9934
|
if (this.onTouched) {
|
|
@@ -9096,6 +9951,30 @@ class ChannelAssignmentControlComponent {
|
|
|
9096
9951
|
const c2id = typeof c2 === 'string' ? c2 : c2.id;
|
|
9097
9952
|
return c1id === c2id;
|
|
9098
9953
|
}
|
|
9954
|
+
mapIncomingValueToChannels(value) {
|
|
9955
|
+
var _a;
|
|
9956
|
+
if (Array.isArray(value)) {
|
|
9957
|
+
if (typeof value[0] === 'string') {
|
|
9958
|
+
this.value = value
|
|
9959
|
+
.map(id => { var _a; return (_a = this.channels) === null || _a === void 0 ? void 0 : _a.find(c => c.id === id); })
|
|
9960
|
+
.filter(notNullOrUndefined);
|
|
9961
|
+
}
|
|
9962
|
+
else {
|
|
9963
|
+
this.value = value;
|
|
9964
|
+
}
|
|
9965
|
+
}
|
|
9966
|
+
else {
|
|
9967
|
+
if (typeof value === 'string') {
|
|
9968
|
+
const channel = (_a = this.channels) === null || _a === void 0 ? void 0 : _a.find(c => c.id === value);
|
|
9969
|
+
if (channel) {
|
|
9970
|
+
this.value = [channel];
|
|
9971
|
+
}
|
|
9972
|
+
}
|
|
9973
|
+
else if (value && value.id) {
|
|
9974
|
+
this.value = [value];
|
|
9975
|
+
}
|
|
9976
|
+
}
|
|
9977
|
+
}
|
|
9099
9978
|
}
|
|
9100
9979
|
ChannelAssignmentControlComponent.decorators = [
|
|
9101
9980
|
{ type: Component, args: [{
|
|
@@ -9139,12 +10018,23 @@ ChannelBadgeComponent.propDecorators = {
|
|
|
9139
10018
|
};
|
|
9140
10019
|
|
|
9141
10020
|
/**
|
|
10021
|
+
* @description
|
|
9142
10022
|
* A chip component for displaying a label with an optional action icon.
|
|
10023
|
+
*
|
|
10024
|
+
* @example
|
|
10025
|
+
* ```HTML
|
|
10026
|
+
* <vdr-chip [colorFrom]="item.value"
|
|
10027
|
+
* icon="close"
|
|
10028
|
+
* (iconClick)="clear(item)">
|
|
10029
|
+
* {{ item.value }}</vdr-chip>
|
|
10030
|
+
* ```
|
|
10031
|
+
* @docsCategory components
|
|
9143
10032
|
*/
|
|
9144
10033
|
class ChipComponent {
|
|
9145
10034
|
constructor() {
|
|
9146
10035
|
this.invert = false;
|
|
9147
10036
|
/**
|
|
10037
|
+
* @description
|
|
9148
10038
|
* If set, the chip will have an auto-generated background
|
|
9149
10039
|
* color based on the string value passed in.
|
|
9150
10040
|
*/
|
|
@@ -9398,8 +10288,19 @@ ConfigurableInputComponent.propDecorators = {
|
|
|
9398
10288
|
};
|
|
9399
10289
|
|
|
9400
10290
|
/**
|
|
10291
|
+
* @description
|
|
9401
10292
|
* A form input control which displays currency in decimal format, whilst working
|
|
9402
10293
|
* with the integer cent value in the background.
|
|
10294
|
+
*
|
|
10295
|
+
* @example
|
|
10296
|
+
* ```HTML
|
|
10297
|
+
* <vdr-currency-input
|
|
10298
|
+
* [(ngModel)]="entityPrice"
|
|
10299
|
+
* [currencyCode]="currencyCode"
|
|
10300
|
+
* ></vdr-currency-input>
|
|
10301
|
+
* ```
|
|
10302
|
+
*
|
|
10303
|
+
* @docsCategory components
|
|
9403
10304
|
*/
|
|
9404
10305
|
class CurrencyInputComponent {
|
|
9405
10306
|
constructor(dataService, changeDetectorRef) {
|
|
@@ -9526,6 +10427,90 @@ CurrencyInputComponent.propDecorators = {
|
|
|
9526
10427
|
valueChange: [{ type: Output }]
|
|
9527
10428
|
};
|
|
9528
10429
|
|
|
10430
|
+
/**
|
|
10431
|
+
* @description
|
|
10432
|
+
* Registers a {@link CustomDetailComponent} to be placed in a given location. This allows you
|
|
10433
|
+
* to embed any type of custom Angular component in the entity detail pages of the Admin UI.
|
|
10434
|
+
*
|
|
10435
|
+
* @docsCategory custom-detail-components
|
|
10436
|
+
*/
|
|
10437
|
+
function registerCustomDetailComponent(config) {
|
|
10438
|
+
return {
|
|
10439
|
+
provide: APP_INITIALIZER,
|
|
10440
|
+
multi: true,
|
|
10441
|
+
useFactory: (customDetailComponentService) => () => {
|
|
10442
|
+
customDetailComponentService.registerCustomDetailComponent(config);
|
|
10443
|
+
},
|
|
10444
|
+
deps: [CustomDetailComponentService],
|
|
10445
|
+
};
|
|
10446
|
+
}
|
|
10447
|
+
class CustomDetailComponentService {
|
|
10448
|
+
constructor() {
|
|
10449
|
+
this.customDetailComponents = new Map();
|
|
10450
|
+
}
|
|
10451
|
+
registerCustomDetailComponent(config) {
|
|
10452
|
+
var _a;
|
|
10453
|
+
if (this.customDetailComponents.has(config.locationId)) {
|
|
10454
|
+
(_a = this.customDetailComponents.get(config.locationId)) === null || _a === void 0 ? void 0 : _a.push(config);
|
|
10455
|
+
}
|
|
10456
|
+
else {
|
|
10457
|
+
this.customDetailComponents.set(config.locationId, [config]);
|
|
10458
|
+
}
|
|
10459
|
+
}
|
|
10460
|
+
getCustomDetailComponentsFor(locationId) {
|
|
10461
|
+
var _a;
|
|
10462
|
+
return (_a = this.customDetailComponents.get(locationId)) !== null && _a !== void 0 ? _a : [];
|
|
10463
|
+
}
|
|
10464
|
+
}
|
|
10465
|
+
CustomDetailComponentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CustomDetailComponentService_Factory() { return new CustomDetailComponentService(); }, token: CustomDetailComponentService, providedIn: "root" });
|
|
10466
|
+
CustomDetailComponentService.decorators = [
|
|
10467
|
+
{ type: Injectable, args: [{
|
|
10468
|
+
providedIn: 'root',
|
|
10469
|
+
},] }
|
|
10470
|
+
];
|
|
10471
|
+
|
|
10472
|
+
class CustomDetailComponentHostComponent {
|
|
10473
|
+
constructor(viewContainerRef, componentFactoryResolver, customDetailComponentService) {
|
|
10474
|
+
this.viewContainerRef = viewContainerRef;
|
|
10475
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
10476
|
+
this.customDetailComponentService = customDetailComponentService;
|
|
10477
|
+
this.componentRefs = [];
|
|
10478
|
+
}
|
|
10479
|
+
ngOnInit() {
|
|
10480
|
+
const customComponents = this.customDetailComponentService.getCustomDetailComponentsFor(this.locationId);
|
|
10481
|
+
for (const config of customComponents) {
|
|
10482
|
+
const factory = this.componentFactoryResolver.resolveComponentFactory(config.component);
|
|
10483
|
+
const componentRef = this.viewContainerRef.createComponent(factory);
|
|
10484
|
+
componentRef.instance.entity$ = this.entity$;
|
|
10485
|
+
componentRef.instance.detailForm = this.detailForm;
|
|
10486
|
+
this.componentRefs.push(componentRef);
|
|
10487
|
+
}
|
|
10488
|
+
}
|
|
10489
|
+
ngOnDestroy() {
|
|
10490
|
+
for (const ref of this.componentRefs) {
|
|
10491
|
+
ref.destroy();
|
|
10492
|
+
}
|
|
10493
|
+
}
|
|
10494
|
+
}
|
|
10495
|
+
CustomDetailComponentHostComponent.decorators = [
|
|
10496
|
+
{ type: Component, args: [{
|
|
10497
|
+
selector: 'vdr-custom-detail-component-host',
|
|
10498
|
+
template: "<vdr-ui-extension-point [locationId]=\"locationId\" api=\"detailComponent\"></vdr-ui-extension-point>\r\n",
|
|
10499
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10500
|
+
styles: [""]
|
|
10501
|
+
},] }
|
|
10502
|
+
];
|
|
10503
|
+
CustomDetailComponentHostComponent.ctorParameters = () => [
|
|
10504
|
+
{ type: ViewContainerRef },
|
|
10505
|
+
{ type: ComponentFactoryResolver },
|
|
10506
|
+
{ type: CustomDetailComponentService }
|
|
10507
|
+
];
|
|
10508
|
+
CustomDetailComponentHostComponent.propDecorators = {
|
|
10509
|
+
locationId: [{ type: Input }],
|
|
10510
|
+
entity$: [{ type: Input }],
|
|
10511
|
+
detailForm: [{ type: Input }]
|
|
10512
|
+
};
|
|
10513
|
+
|
|
9529
10514
|
/**
|
|
9530
10515
|
* This component renders the appropriate type of form input control based
|
|
9531
10516
|
* on the "type" property of the provided CustomFieldConfig.
|
|
@@ -9613,6 +10598,65 @@ DataTableColumnComponent.propDecorators = {
|
|
|
9613
10598
|
template: [{ type: ViewChild, args: [TemplateRef, { static: true },] }]
|
|
9614
10599
|
};
|
|
9615
10600
|
|
|
10601
|
+
/**
|
|
10602
|
+
* @description
|
|
10603
|
+
* A table for displaying PaginatedList results. It is designed to be used inside components which
|
|
10604
|
+
* extend the {@link BaseListComponent} class.
|
|
10605
|
+
*
|
|
10606
|
+
* @example
|
|
10607
|
+
* ```HTML
|
|
10608
|
+
* <vdr-data-table
|
|
10609
|
+
* [items]="items$ | async"
|
|
10610
|
+
* [itemsPerPage]="itemsPerPage$ | async"
|
|
10611
|
+
* [totalItems]="totalItems$ | async"
|
|
10612
|
+
* [currentPage]="currentPage$ | async"
|
|
10613
|
+
* (pageChange)="setPageNumber($event)"
|
|
10614
|
+
* (itemsPerPageChange)="setItemsPerPage($event)"
|
|
10615
|
+
* >
|
|
10616
|
+
* <!-- The header columns are defined first -->
|
|
10617
|
+
* <vdr-dt-column>{{ 'common.name' | translate }}</vdr-dt-column>
|
|
10618
|
+
* <vdr-dt-column></vdr-dt-column>
|
|
10619
|
+
* <vdr-dt-column></vdr-dt-column>
|
|
10620
|
+
*
|
|
10621
|
+
* <!-- Then we define how a row is rendered -->
|
|
10622
|
+
* <ng-template let-taxRate="item">
|
|
10623
|
+
* <td class="left align-middle">{{ taxRate.name }}</td>
|
|
10624
|
+
* <td class="left align-middle">{{ taxRate.category.name }}</td>
|
|
10625
|
+
* <td class="left align-middle">{{ taxRate.zone.name }}</td>
|
|
10626
|
+
* <td class="left align-middle">{{ taxRate.value }}%</td>
|
|
10627
|
+
* <td class="right align-middle">
|
|
10628
|
+
* <vdr-table-row-action
|
|
10629
|
+
* iconShape="edit"
|
|
10630
|
+
* [label]="'common.edit' | translate"
|
|
10631
|
+
* [linkTo]="['./', taxRate.id]"
|
|
10632
|
+
* ></vdr-table-row-action>
|
|
10633
|
+
* </td>
|
|
10634
|
+
* <td class="right align-middle">
|
|
10635
|
+
* <vdr-dropdown>
|
|
10636
|
+
* <button type="button" class="btn btn-link btn-sm" vdrDropdownTrigger>
|
|
10637
|
+
* {{ 'common.actions' | translate }}
|
|
10638
|
+
* <clr-icon shape="caret down"></clr-icon>
|
|
10639
|
+
* </button>
|
|
10640
|
+
* <vdr-dropdown-menu vdrPosition="bottom-right">
|
|
10641
|
+
* <button
|
|
10642
|
+
* type="button"
|
|
10643
|
+
* class="delete-button"
|
|
10644
|
+
* (click)="deleteTaxRate(taxRate)"
|
|
10645
|
+
* [disabled]="!(['DeleteSettings', 'DeleteTaxRate'] | hasPermission)"
|
|
10646
|
+
* vdrDropdownItem
|
|
10647
|
+
* >
|
|
10648
|
+
* <clr-icon shape="trash" class="is-danger"></clr-icon>
|
|
10649
|
+
* {{ 'common.delete' | translate }}
|
|
10650
|
+
* </button>
|
|
10651
|
+
* </vdr-dropdown-menu>
|
|
10652
|
+
* </vdr-dropdown>
|
|
10653
|
+
* </td>
|
|
10654
|
+
* </ng-template>
|
|
10655
|
+
* </vdr-data-table>
|
|
10656
|
+
* ```
|
|
10657
|
+
*
|
|
10658
|
+
* @docsCategory components
|
|
10659
|
+
*/
|
|
9616
10660
|
class DataTableComponent {
|
|
9617
10661
|
constructor() {
|
|
9618
10662
|
this.allSelectChange = new EventEmitter();
|
|
@@ -9870,27 +10914,43 @@ DatetimePickerService.decorators = [
|
|
|
9870
10914
|
];
|
|
9871
10915
|
DatetimePickerService.ctorParameters = () => [];
|
|
9872
10916
|
|
|
10917
|
+
/**
|
|
10918
|
+
* @description
|
|
10919
|
+
* A form input for selecting datetime values.
|
|
10920
|
+
*
|
|
10921
|
+
* @example
|
|
10922
|
+
* ```HTML
|
|
10923
|
+
* <vdr-datetime-picker [(ngModel)]="startDate"></vdr-datetime-picker>
|
|
10924
|
+
* ```
|
|
10925
|
+
*
|
|
10926
|
+
* @docsCategory components
|
|
10927
|
+
*/
|
|
9873
10928
|
class DatetimePickerComponent {
|
|
9874
10929
|
constructor(changeDetectorRef, datetimePickerService) {
|
|
9875
10930
|
this.changeDetectorRef = changeDetectorRef;
|
|
9876
10931
|
this.datetimePickerService = datetimePickerService;
|
|
9877
10932
|
/**
|
|
10933
|
+
* @description
|
|
9878
10934
|
* The day that the week should start with in the calendar view.
|
|
9879
10935
|
*/
|
|
9880
10936
|
this.weekStartDay = 'mon';
|
|
9881
10937
|
/**
|
|
10938
|
+
* @description
|
|
9882
10939
|
* The granularity of the minutes time picker
|
|
9883
10940
|
*/
|
|
9884
10941
|
this.timeGranularityInterval = 5;
|
|
9885
10942
|
/**
|
|
10943
|
+
* @description
|
|
9886
10944
|
* The minimum date as an ISO string
|
|
9887
10945
|
*/
|
|
9888
10946
|
this.min = null;
|
|
9889
10947
|
/**
|
|
10948
|
+
* @description
|
|
9890
10949
|
* The maximum date as an ISO string
|
|
9891
10950
|
*/
|
|
9892
10951
|
this.max = null;
|
|
9893
10952
|
/**
|
|
10953
|
+
* @description
|
|
9894
10954
|
* Sets the readonly state
|
|
9895
10955
|
*/
|
|
9896
10956
|
this.readonly = false;
|
|
@@ -10054,6 +11114,31 @@ DatetimePickerComponent.propDecorators = {
|
|
|
10054
11114
|
calendarTable: [{ type: ViewChild, args: ['calendarTable',] }]
|
|
10055
11115
|
};
|
|
10056
11116
|
|
|
11117
|
+
/**
|
|
11118
|
+
* @description
|
|
11119
|
+
* Used for building dropdown menus.
|
|
11120
|
+
*
|
|
11121
|
+
* @example
|
|
11122
|
+
* ```HTML
|
|
11123
|
+
* <vdr-dropdown>
|
|
11124
|
+
* <button class="btn btn-outline" vdrDropdownTrigger>
|
|
11125
|
+
* <clr-icon shape="plus"></clr-icon>
|
|
11126
|
+
* Select type
|
|
11127
|
+
* </button>
|
|
11128
|
+
* <vdr-dropdown-menu vdrPosition="bottom-left">
|
|
11129
|
+
* <button
|
|
11130
|
+
* *ngFor="let typeName of allTypes"
|
|
11131
|
+
* type="button"
|
|
11132
|
+
* vdrDropdownItem
|
|
11133
|
+
* (click)="selectType(typeName)"
|
|
11134
|
+
* >
|
|
11135
|
+
* typeName
|
|
11136
|
+
* </button>
|
|
11137
|
+
* </vdr-dropdown-menu>
|
|
11138
|
+
* </vdr-dropdown>
|
|
11139
|
+
* ```
|
|
11140
|
+
* @docsCategory components
|
|
11141
|
+
*/
|
|
10057
11142
|
class DropdownComponent {
|
|
10058
11143
|
constructor() {
|
|
10059
11144
|
this.isOpen = false;
|
|
@@ -10327,6 +11412,19 @@ class ExtensionHostService {
|
|
|
10327
11412
|
this.destroyMessage$.next();
|
|
10328
11413
|
break;
|
|
10329
11414
|
}
|
|
11415
|
+
case 'active-route': {
|
|
11416
|
+
const routeData = {
|
|
11417
|
+
url: window.location.href,
|
|
11418
|
+
origin: window.location.origin,
|
|
11419
|
+
pathname: window.location.pathname,
|
|
11420
|
+
params: this.routeSnapshot.params,
|
|
11421
|
+
queryParams: this.routeSnapshot.queryParams,
|
|
11422
|
+
fragment: this.routeSnapshot.fragment,
|
|
11423
|
+
};
|
|
11424
|
+
this.sendMessage({ data: routeData, error: false, complete: false, requestId: data.requestId }, origin);
|
|
11425
|
+
this.sendMessage({ data: null, error: false, complete: true, requestId: data.requestId }, origin);
|
|
11426
|
+
break;
|
|
11427
|
+
}
|
|
10330
11428
|
case 'graphql-query': {
|
|
10331
11429
|
const { document, variables, fetchPolicy } = data.data;
|
|
10332
11430
|
this.dataService
|
|
@@ -10353,8 +11451,9 @@ class ExtensionHostService {
|
|
|
10353
11451
|
}
|
|
10354
11452
|
};
|
|
10355
11453
|
}
|
|
10356
|
-
init(extensionWindow) {
|
|
11454
|
+
init(extensionWindow, routeSnapshot) {
|
|
10357
11455
|
this.extensionWindow = extensionWindow;
|
|
11456
|
+
this.routeSnapshot = routeSnapshot;
|
|
10358
11457
|
window.addEventListener('message', this.handleMessage);
|
|
10359
11458
|
}
|
|
10360
11459
|
destroy() {
|
|
@@ -10411,7 +11510,7 @@ class ExtensionHostComponent {
|
|
|
10411
11510
|
if (this.openInIframe) {
|
|
10412
11511
|
const extensionWindow = this.extensionFrame.nativeElement.contentWindow;
|
|
10413
11512
|
if (extensionWindow) {
|
|
10414
|
-
this.extensionHostService.init(extensionWindow);
|
|
11513
|
+
this.extensionHostService.init(extensionWindow, this.route.snapshot);
|
|
10415
11514
|
}
|
|
10416
11515
|
}
|
|
10417
11516
|
}
|
|
@@ -10425,7 +11524,7 @@ class ExtensionHostComponent {
|
|
|
10425
11524
|
if (!extensionWindow) {
|
|
10426
11525
|
return;
|
|
10427
11526
|
}
|
|
10428
|
-
this.extensionHostService.init(extensionWindow);
|
|
11527
|
+
this.extensionHostService.init(extensionWindow, this.route.snapshot);
|
|
10429
11528
|
this.extensionWindowIsOpen = true;
|
|
10430
11529
|
this.extensionWindow = extensionWindow;
|
|
10431
11530
|
let timer;
|
|
@@ -10491,6 +11590,28 @@ function flattenFacetValues(facetsWithValues) {
|
|
|
10491
11590
|
return facetsWithValues.reduce((flattened, facet) => flattened.concat(facet.values), []);
|
|
10492
11591
|
}
|
|
10493
11592
|
|
|
11593
|
+
/**
|
|
11594
|
+
* @description
|
|
11595
|
+
* A form control for selecting facet values.
|
|
11596
|
+
*
|
|
11597
|
+
* @example
|
|
11598
|
+
* ```HTML
|
|
11599
|
+
* <vdr-facet-value-selector
|
|
11600
|
+
* [facets]="facets"
|
|
11601
|
+
* (selectedValuesChange)="selectedValues = $event"
|
|
11602
|
+
* ></vdr-facet-value-selector>
|
|
11603
|
+
* ```
|
|
11604
|
+
* The `facets` input should be provided from the parent component
|
|
11605
|
+
* like this:
|
|
11606
|
+
*
|
|
11607
|
+
* @example
|
|
11608
|
+
* ```TypeScript
|
|
11609
|
+
* this.facets = this.dataService
|
|
11610
|
+
* .facet.getAllFacets()
|
|
11611
|
+
* .mapSingle(data => data.facets.items);
|
|
11612
|
+
* ```
|
|
11613
|
+
* @docsCategory components
|
|
11614
|
+
*/
|
|
10494
11615
|
class FacetValueSelectorComponent {
|
|
10495
11616
|
constructor(dataService) {
|
|
10496
11617
|
this.dataService = dataService;
|
|
@@ -10934,7 +12055,15 @@ DialogTitleDirective.ctorParameters = () => [
|
|
|
10934
12055
|
];
|
|
10935
12056
|
|
|
10936
12057
|
/**
|
|
12058
|
+
* @description
|
|
10937
12059
|
* This component displays a plain JavaScript object as an expandable tree.
|
|
12060
|
+
*
|
|
12061
|
+
* @example
|
|
12062
|
+
* ```HTML
|
|
12063
|
+
* <vdr-object-tree [value]="payment.metadata"></vdr-object-tree>
|
|
12064
|
+
* ```
|
|
12065
|
+
*
|
|
12066
|
+
* @docsCategory components
|
|
10938
12067
|
*/
|
|
10939
12068
|
class ObjectTreeComponent {
|
|
10940
12069
|
constructor(parent) {
|
|
@@ -10955,7 +12084,7 @@ class ObjectTreeComponent {
|
|
|
10955
12084
|
return typeof value === 'object' && value !== null;
|
|
10956
12085
|
}
|
|
10957
12086
|
getEntries(inputValue) {
|
|
10958
|
-
if (
|
|
12087
|
+
if (!this.isObject(inputValue)) {
|
|
10959
12088
|
return [{ key: '', value: inputValue }];
|
|
10960
12089
|
}
|
|
10961
12090
|
return Object.entries(inputValue).map(([key, value]) => ({ key, value }));
|
|
@@ -10964,7 +12093,7 @@ class ObjectTreeComponent {
|
|
|
10964
12093
|
ObjectTreeComponent.decorators = [
|
|
10965
12094
|
{ type: Component, args: [{
|
|
10966
12095
|
selector: 'vdr-object-tree',
|
|
10967
|
-
template: "<button class=\"icon-button\" (click)=\"expanded = !expanded\" *ngIf=\"depth !== 0 && !isArrayItem\">\r\n <clr-icon shape=\"caret\" size=\"12\" [dir]=\"expanded ? 'down' : 'right'\"></clr-icon>\r\n</button>\r\n<ul\r\n class=\"object-tree-node\"\r\n [ngClass]=\"'depth-' + depth\"\r\n [class.array-value]=\"valueIsArray\"\r\n [class.array-item]=\"isArrayItem\"\r\n [class.expanded]=\"expanded\"\r\n>\r\n <li *ngFor=\"let entry of entries\">\r\n <span class=\"key\" *ngIf=\"entry.key\">{{ entry.key }}:</span>\r\n <ng-container *ngIf=\"isObject(entry.value)\">\r\n <vdr-object-tree [value]=\"entry.value\" [isArrayItem]=\"valueIsArray\"></vdr-object-tree>\r\n </ng-container>\r\n <ng-
|
|
12096
|
+
template: "<button class=\"icon-button\" (click)=\"expanded = !expanded\" *ngIf=\"depth !== 0 && !isArrayItem\">\r\n <clr-icon shape=\"caret\" size=\"12\" [dir]=\"expanded ? 'down' : 'right'\"></clr-icon>\r\n</button>\r\n<ul\r\n class=\"object-tree-node\"\r\n [ngClass]=\"'depth-' + depth\"\r\n [class.array-value]=\"valueIsArray\"\r\n [class.array-item]=\"isArrayItem\"\r\n [class.expanded]=\"expanded\"\r\n>\r\n <li *ngFor=\"let entry of entries\">\r\n <span class=\"key\" *ngIf=\"entry.key\">{{ entry.key }}:</span>\r\n <ng-container *ngIf=\"isObject(entry.value); else primitive\">\r\n <vdr-object-tree [value]=\"entry.value\" [isArrayItem]=\"valueIsArray\"></vdr-object-tree>\r\n </ng-container>\r\n <ng-template #primitive>\r\n {{ entry.value }}\r\n </ng-template>\r\n </li>\r\n</ul>\r\n",
|
|
10968
12097
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10969
12098
|
styles: [".object-tree-node{list-style-type:none;line-height:16px;font-size:12px;overflow:hidden;max-height:0}.object-tree-node.depth-0{margin-left:0;margin-top:8px}.object-tree-node.depth-1{margin-left:6px}.object-tree-node.depth-2{margin-left:6px}.object-tree-node.depth-3{margin-left:6px}.object-tree-node.depth-4{margin-left:6px}.object-tree-node.depth-5{margin-left:6px}.object-tree-node.depth-6{margin-left:6px}.object-tree-node.expanded{max-height:5000px}.object-tree-node.array-item{margin-top:-16px;margin-left:16px}.object-tree-node.array-value.expanded>li+li{margin-top:6px}.key{color:var(--color-text-300)}\n"]
|
|
10970
12099
|
},] }
|
|
@@ -10977,6 +12106,16 @@ ObjectTreeComponent.propDecorators = {
|
|
|
10977
12106
|
isArrayItem: [{ type: Input }]
|
|
10978
12107
|
};
|
|
10979
12108
|
|
|
12109
|
+
/**
|
|
12110
|
+
* @description
|
|
12111
|
+
* Displays the state of an order in a colored chip.
|
|
12112
|
+
*
|
|
12113
|
+
* @example
|
|
12114
|
+
* ```HTML
|
|
12115
|
+
* <vdr-order-state-label [state]="order.state"></vdr-order-state-label>
|
|
12116
|
+
* ```
|
|
12117
|
+
* @docsCategory components
|
|
12118
|
+
*/
|
|
10980
12119
|
class OrderStateLabelComponent {
|
|
10981
12120
|
get chipColorType() {
|
|
10982
12121
|
switch (this.state) {
|
|
@@ -11030,6 +12169,18 @@ PaginationControlsComponent.propDecorators = {
|
|
|
11030
12169
|
pageChange: [{ type: Output }]
|
|
11031
12170
|
};
|
|
11032
12171
|
|
|
12172
|
+
/**
|
|
12173
|
+
* @description
|
|
12174
|
+
* A component for selecting product variants via an autocomplete-style select input.
|
|
12175
|
+
*
|
|
12176
|
+
* @example
|
|
12177
|
+
* ```HTML
|
|
12178
|
+
* <vdr-product-selector
|
|
12179
|
+
* (productSelected)="selectResult($event)"></vdr-product-selector>
|
|
12180
|
+
* ```
|
|
12181
|
+
*
|
|
12182
|
+
* @docsCategory components
|
|
12183
|
+
*/
|
|
11033
12184
|
class ProductSelectorComponent {
|
|
11034
12185
|
constructor(dataService) {
|
|
11035
12186
|
this.dataService = dataService;
|
|
@@ -11750,7 +12901,18 @@ ProsemirrorService.ctorParameters = () => [
|
|
|
11750
12901
|
];
|
|
11751
12902
|
|
|
11752
12903
|
/**
|
|
11753
|
-
*
|
|
12904
|
+
* @description
|
|
12905
|
+
* A rich text (HTML) editor based on Prosemirror (https://prosemirror.net/)
|
|
12906
|
+
*
|
|
12907
|
+
* @example
|
|
12908
|
+
* ```HTML
|
|
12909
|
+
* <vdr-rich-text-editor
|
|
12910
|
+
* [(ngModel)]="description"
|
|
12911
|
+
* label="Description"
|
|
12912
|
+
* ></vdr-rich-text-editor>
|
|
12913
|
+
* ```
|
|
12914
|
+
*
|
|
12915
|
+
* @docsCategory components
|
|
11754
12916
|
*/
|
|
11755
12917
|
class RichTextEditorComponent {
|
|
11756
12918
|
constructor(changeDetector, prosemirrorService) {
|
|
@@ -11807,7 +12969,7 @@ RichTextEditorComponent.decorators = [
|
|
|
11807
12969
|
},
|
|
11808
12970
|
ProsemirrorService,
|
|
11809
12971
|
],
|
|
11810
|
-
styles: ["@charset \"UTF-8\";::ng-deep .ProseMirror{position:relative}::ng-deep .ProseMirror{word-wrap:break-word;white-space:pre-wrap;-webkit-font-variant-ligatures:none;font-feature-settings:none;font-variant-ligatures:none}::ng-deep .ProseMirror pre{white-space:pre-wrap}::ng-deep .ProseMirror li{position:relative}::ng-deep .ProseMirror-hideselection *::selection{background:transparent}::ng-deep .ProseMirror-hideselection *::-moz-selection{background:transparent}::ng-deep .ProseMirror-hideselection{caret-color:transparent}::ng-deep .ProseMirror-selectednode{outline:2px solid var(--color-primary-500)}::ng-deep li.ProseMirror-selectednode{outline:none}::ng-deep li.ProseMirror-selectednode:after{content:\"\";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid var(--color-primary-500);pointer-events:none}::ng-deep .ProseMirror-textblock-dropdown{min-width:3em}::ng-deep .ProseMirror-menu{margin:0 -4px;line-height:1}::ng-deep .ProseMirror-tooltip .ProseMirror-menu{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;white-space:pre}::ng-deep .ProseMirror-menuitem{margin-right:3px;display:inline-block}::ng-deep .ProseMirror-menuseparator{border-right:1px solid var(--color-component-border-200);margin-right:3px}::ng-deep .ProseMirror-menu-dropdown,::ng-deep .ProseMirror-menu-dropdown-menu{font-size:90%;white-space:nowrap}::ng-deep .ProseMirror-menu-dropdown{vertical-align:1px;cursor:pointer;position:relative;padding-right:15px}::ng-deep .ProseMirror-menu-dropdown-wrap{padding:1px 0 1px 4px;display:inline-block;position:relative}::ng-deep .ProseMirror-menu-dropdown:after{content:\"\";border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid currentColor;opacity:.6;position:absolute;right:4px;top:calc(50% - 2px)}::ng-deep .ProseMirror-menu-dropdown-menu,::ng-deep .ProseMirror-menu-submenu{position:absolute;background:white;color:var(--color-grey-600);border:1px solid var(--color-component-border-200);padding:2px}::ng-deep .ProseMirror-menu-dropdown-menu{z-index:15;min-width:6em}::ng-deep .ProseMirror-menu-dropdown-item{cursor:pointer;padding:2px 8px 2px 4px}::ng-deep .ProseMirror-menu-dropdown-item:hover{background:var(--color-component-bg-100)}::ng-deep .ProseMirror-menu-submenu-wrap{position:relative;margin-right:-4px}::ng-deep .ProseMirror-menu-submenu-label:after{content:\"\";border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid currentColor;opacity:.6;position:absolute;right:4px;top:calc(50% - 4px)}::ng-deep .ProseMirror-menu-submenu{display:none;min-width:4em;left:100%;top:-3px}::ng-deep .ProseMirror-menu-active{background:var(--color-component-bg-100);border-radius:4px}::ng-deep .ProseMirror-menu-disabled{opacity:.3}::ng-deep .ProseMirror-menu-submenu-wrap:hover .ProseMirror-menu-submenu,::ng-deep .ProseMirror-menu-submenu-wrap-active .ProseMirror-menu-submenu{display:block}::ng-deep .ProseMirror-menubar{border-top-left-radius:inherit;border-top-right-radius:inherit;position:relative;min-height:1em;color:var(--color-grey-600);padding:1px 6px;top:0;left:0;right:0;background:var(--color-component-bg-100);z-index:10;box-sizing:border-box;overflow:visible}::ng-deep .ProseMirror-icon{display:inline-block;line-height:.8;vertical-align:-2px;padding:2px 8px;cursor:pointer}::ng-deep .ProseMirror-menu-disabled.ProseMirror-icon{cursor:default}::ng-deep .ProseMirror-icon svg{fill:currentColor;height:1em}::ng-deep .ProseMirror-icon span{vertical-align:text-top}::ng-deep .ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}::ng-deep .ProseMirror-gapcursor:after{content:\"\";display:block;position:absolute;top:-2px;width:20px;border-top:1px solid black;animation:ProseMirror-cursor-blink 1.1s steps(2,start) infinite}@keyframes ProseMirror-cursor-blink{to{visibility:hidden}}::ng-deep .ProseMirror-focused .ProseMirror-gapcursor{display:block}::ng-deep .ProseMirror ul,::ng-deep .ProseMirror ol{padding-left:30px;list-style-position:initial}::ng-deep .ProseMirror blockquote{padding-left:1em;border-left:3px solid var(--color-grey-100);margin-left:0;margin-right:0}::ng-deep .ProseMirror-prompt{background:white;padding:5px 10px 5px 15px;border:1px solid silver;position:fixed;border-radius:3px;z-index:11;box-shadow:-.5px 2px 5px #0003}::ng-deep .ProseMirror-prompt h5{margin:0;font-weight:normal;font-size:100%;color:var(--color-grey-500)}::ng-deep .ProseMirror-prompt input[type=text],::ng-deep .ProseMirror-prompt textarea{background:var(--color-component-bg-100);border:none;outline:none}::ng-deep .ProseMirror-prompt input[type=text]{padding:0 4px}::ng-deep .ProseMirror-prompt-close{position:absolute;left:2px;top:1px;color:var(--color-grey-400);border:none;background:transparent;padding:0}::ng-deep .ProseMirror-prompt-close:after{content:\"\\e2\\153\\2022\";font-size:12px}::ng-deep .ProseMirror-invalid{background:var(--color-warning-200);border:1px solid var(--color-warning-300);border-radius:4px;padding:5px 10px;position:absolute;min-width:10em}::ng-deep .ProseMirror-prompt-buttons{margin-top:5px;display:none}::ng-deep #editor,::ng-deep .editor{background:var(--color-form-input-bg);color:#000;background-clip:padding-box;border-radius:4px;border:2px solid rgba(0,0,0,.2);padding:5px 0;margin-bottom:23px}::ng-deep .ProseMirror p:first-child,::ng-deep .ProseMirror h1:first-child,::ng-deep .ProseMirror h2:first-child,::ng-deep .ProseMirror h3:first-child,::ng-deep .ProseMirror h4:first-child,::ng-deep .ProseMirror h5:first-child,::ng-deep .ProseMirror h6:first-child{margin-top:10px}::ng-deep .ProseMirror{padding:4px 8px 4px 14px;line-height:1.2;outline:none}::ng-deep .ProseMirror p{margin-bottom:.5rem;color:var(--color-grey-800)}:host{display:block;max-width:710px;margin-bottom:.5rem}:host.readonly ::ng-deep .ProseMirror-menubar{display:none}::ng-deep .ProseMirror-menubar{position:sticky;top:24px;margin-top:6px;border:1px solid var(--color-component-border-200);border-bottom:none;background-color:var(--color-component-bg-200);color:var(--color-icon-button);padding:6px 12px}::ng-deep .vdr-prosemirror{background:var(--color-form-input-bg);min-height:128px;border:1px solid var(--color-component-border-200);border-radius:0 0 3px 3px;transition:border-color .2s;overflow:auto}::ng-deep .vdr-prosemirror:focus{border-color:var(--color-primary-500)!important;box-shadow:0 0 1px 1px var(--color-primary-100)}::ng-deep .vdr-prosemirror hr{padding:2px 10px;border:none;margin:1em 0}::ng-deep .vdr-prosemirror hr:after{content:\"\";display:block;height:1px;background-color:silver;line-height:2px}::ng-deep .vdr-prosemirror img{cursor:default;max-width:100%}\n"]
|
|
12972
|
+
styles: ["@charset \"UTF-8\";::ng-deep .ProseMirror{position:relative}::ng-deep .ProseMirror{word-wrap:break-word;white-space:pre-wrap;-webkit-font-variant-ligatures:none;font-feature-settings:none;font-variant-ligatures:none}::ng-deep .ProseMirror pre{white-space:pre-wrap}::ng-deep .ProseMirror li{position:relative}::ng-deep .ProseMirror-hideselection *::selection{background:transparent}::ng-deep .ProseMirror-hideselection *::-moz-selection{background:transparent}::ng-deep .ProseMirror-hideselection{caret-color:transparent}::ng-deep .ProseMirror-selectednode{outline:2px solid var(--color-primary-500)}::ng-deep li.ProseMirror-selectednode{outline:none}::ng-deep li.ProseMirror-selectednode:after{content:\"\";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid var(--color-primary-500);pointer-events:none}::ng-deep .ProseMirror-textblock-dropdown{min-width:3em}::ng-deep .ProseMirror-menu{margin:0 -4px;line-height:1}::ng-deep .ProseMirror-tooltip .ProseMirror-menu{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;white-space:pre}::ng-deep .ProseMirror-menuitem{margin-right:3px;display:inline-block}::ng-deep .ProseMirror-menuseparator{border-right:1px solid var(--color-component-border-200);margin-right:3px}::ng-deep .ProseMirror-menu-dropdown,::ng-deep .ProseMirror-menu-dropdown-menu{font-size:90%;white-space:nowrap}::ng-deep .ProseMirror-menu-dropdown{vertical-align:1px;cursor:pointer;position:relative;padding-right:15px}::ng-deep .ProseMirror-menu-dropdown-wrap{padding:1px 0 1px 4px;display:inline-block;position:relative}::ng-deep .ProseMirror-menu-dropdown:after{content:\"\";border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid currentColor;opacity:.6;position:absolute;right:4px;top:calc(50% - 2px)}::ng-deep .ProseMirror-menu-dropdown-menu,::ng-deep .ProseMirror-menu-submenu{position:absolute;background:white;color:var(--color-grey-600);border:1px solid var(--color-component-border-200);padding:2px}::ng-deep .ProseMirror-menu-dropdown-menu{z-index:15;min-width:6em}::ng-deep .ProseMirror-menu-dropdown-item{cursor:pointer;padding:2px 8px 2px 4px}::ng-deep .ProseMirror-menu-dropdown-item:hover{background:var(--color-component-bg-100)}::ng-deep .ProseMirror-menu-submenu-wrap{position:relative;margin-right:-4px}::ng-deep .ProseMirror-menu-submenu-label:after{content:\"\";border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid currentColor;opacity:.6;position:absolute;right:4px;top:calc(50% - 4px)}::ng-deep .ProseMirror-menu-submenu{display:none;min-width:4em;left:100%;top:-3px}::ng-deep .ProseMirror-menu-active{background:var(--color-component-bg-100);border-radius:4px}::ng-deep .ProseMirror-menu-disabled{opacity:.3}::ng-deep .ProseMirror-menu-submenu-wrap:hover .ProseMirror-menu-submenu,::ng-deep .ProseMirror-menu-submenu-wrap-active .ProseMirror-menu-submenu{display:block}::ng-deep .ProseMirror-menubar{border-top-left-radius:inherit;border-top-right-radius:inherit;position:relative;min-height:1em;color:var(--color-grey-600);padding:1px 6px;top:0;left:0;right:0;background:var(--color-component-bg-100);z-index:10;box-sizing:border-box;overflow:visible}::ng-deep .ProseMirror-icon{display:inline-block;line-height:.8;vertical-align:-2px;padding:2px 8px;cursor:pointer}::ng-deep .ProseMirror-menu-disabled.ProseMirror-icon{cursor:default}::ng-deep .ProseMirror-icon svg{fill:currentColor;height:1em}::ng-deep .ProseMirror-icon span{vertical-align:text-top}::ng-deep .ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}::ng-deep .ProseMirror-gapcursor:after{content:\"\";display:block;position:absolute;top:-2px;width:20px;border-top:1px solid black;animation:ProseMirror-cursor-blink 1.1s steps(2,start) infinite}@keyframes ProseMirror-cursor-blink{to{visibility:hidden}}::ng-deep .ProseMirror-focused .ProseMirror-gapcursor{display:block}::ng-deep .ProseMirror ul,::ng-deep .ProseMirror ol{padding-left:30px;list-style-position:initial}::ng-deep .ProseMirror blockquote{padding-left:1em;border-left:3px solid var(--color-grey-100);margin-left:0;margin-right:0}::ng-deep .ProseMirror-prompt{background:white;padding:5px 10px 5px 15px;border:1px solid silver;position:fixed;border-radius:3px;z-index:11;box-shadow:-.5px 2px 5px #0003}::ng-deep .ProseMirror-prompt h5{margin:0;font-weight:normal;font-size:100%;color:var(--color-grey-500)}::ng-deep .ProseMirror-prompt input[type=text],::ng-deep .ProseMirror-prompt textarea{background:var(--color-component-bg-100);border:none;outline:none}::ng-deep .ProseMirror-prompt input[type=text]{padding:0 4px}::ng-deep .ProseMirror-prompt-close{position:absolute;left:2px;top:1px;color:var(--color-grey-400);border:none;background:transparent;padding:0}::ng-deep .ProseMirror-prompt-close:after{content:\"\\e2\\153\\2022\";font-size:12px}::ng-deep .ProseMirror-invalid{background:var(--color-warning-200);border:1px solid var(--color-warning-300);border-radius:4px;padding:5px 10px;position:absolute;min-width:10em}::ng-deep .ProseMirror-prompt-buttons{margin-top:5px;display:none}::ng-deep #editor,::ng-deep .editor{background:var(--color-form-input-bg);color:#000;background-clip:padding-box;border-radius:4px;border:2px solid rgba(0,0,0,.2);padding:5px 0;margin-bottom:23px}::ng-deep .ProseMirror p:first-child,::ng-deep .ProseMirror h1:first-child,::ng-deep .ProseMirror h2:first-child,::ng-deep .ProseMirror h3:first-child,::ng-deep .ProseMirror h4:first-child,::ng-deep .ProseMirror h5:first-child,::ng-deep .ProseMirror h6:first-child{margin-top:10px}::ng-deep .ProseMirror{padding:4px 8px 4px 14px;line-height:1.2;outline:none}::ng-deep .ProseMirror p{margin-bottom:.5rem;color:var(--color-grey-800)!important}:host{display:block;max-width:710px;margin-bottom:.5rem}:host.readonly ::ng-deep .ProseMirror-menubar{display:none}::ng-deep .ProseMirror-menubar{position:sticky;top:24px;margin-top:6px;border:1px solid var(--color-component-border-200);border-bottom:none;background-color:var(--color-component-bg-200);color:var(--color-icon-button);padding:6px 12px;display:flex;flex-wrap:wrap}::ng-deep .vdr-prosemirror{background:var(--color-form-input-bg);min-height:128px;min-width:200px;border:1px solid var(--color-component-border-200);border-radius:0 0 3px 3px;transition:border-color .2s;overflow:auto;text-align:initial}::ng-deep .vdr-prosemirror:focus{border-color:var(--color-primary-500)!important;box-shadow:0 0 1px 1px var(--color-primary-100)}::ng-deep .vdr-prosemirror hr{padding:2px 10px;border:none;margin:1em 0}::ng-deep .vdr-prosemirror hr:after{content:\"\";display:block;height:1px;background-color:silver;line-height:2px}::ng-deep .vdr-prosemirror img{cursor:default;max-width:100%}\n"]
|
|
11811
12973
|
},] }
|
|
11812
12974
|
];
|
|
11813
12975
|
RichTextEditorComponent.ctorParameters = () => [
|
|
@@ -11865,6 +13027,53 @@ StatusBadgeComponent.propDecorators = {
|
|
|
11865
13027
|
type: [{ type: Input }]
|
|
11866
13028
|
};
|
|
11867
13029
|
|
|
13030
|
+
class TabbedCustomFieldsComponent {
|
|
13031
|
+
constructor() {
|
|
13032
|
+
this.readonly = false;
|
|
13033
|
+
this.compact = false;
|
|
13034
|
+
this.showLabel = true;
|
|
13035
|
+
this.defaultTabName = '__default_tab__';
|
|
13036
|
+
}
|
|
13037
|
+
ngOnInit() {
|
|
13038
|
+
this.tabbedCustomFields = this.groupByTabs(this.customFields);
|
|
13039
|
+
}
|
|
13040
|
+
customFieldIsSet(name) {
|
|
13041
|
+
return !!this.customFieldsFormGroup.get(name);
|
|
13042
|
+
}
|
|
13043
|
+
groupByTabs(customFieldConfigs) {
|
|
13044
|
+
var _a, _b, _c;
|
|
13045
|
+
const tabMap = new Map();
|
|
13046
|
+
for (const field of customFieldConfigs) {
|
|
13047
|
+
const tabName = (_b = (_a = field.ui) === null || _a === void 0 ? void 0 : _a.tab) !== null && _b !== void 0 ? _b : this.defaultTabName;
|
|
13048
|
+
if (tabMap.has(tabName)) {
|
|
13049
|
+
(_c = tabMap.get(tabName)) === null || _c === void 0 ? void 0 : _c.push(field);
|
|
13050
|
+
}
|
|
13051
|
+
else {
|
|
13052
|
+
tabMap.set(tabName, [field]);
|
|
13053
|
+
}
|
|
13054
|
+
}
|
|
13055
|
+
return Array.from(tabMap.entries())
|
|
13056
|
+
.sort((a, b) => (a[0] === this.defaultTabName ? -1 : 1))
|
|
13057
|
+
.map(([tabName, customFields]) => ({ tabName, customFields }));
|
|
13058
|
+
}
|
|
13059
|
+
}
|
|
13060
|
+
TabbedCustomFieldsComponent.decorators = [
|
|
13061
|
+
{ type: Component, args: [{
|
|
13062
|
+
selector: 'vdr-tabbed-custom-fields',
|
|
13063
|
+
template: "<ng-container *ngIf=\"1 < tabbedCustomFields.length; else singleGroup\">\r\n <clr-tabs>\r\n <clr-tab *ngFor=\"let group of tabbedCustomFields\">\r\n <button clrTabLink>\r\n {{\r\n group.tabName === defaultTabName\r\n ? ('common.general' | translate)\r\n : (group.tabName | translate)\r\n }}\r\n </button>\r\n <clr-tab-content *clrIfActive>\r\n <div class=\"mt4\">\r\n <ng-container *ngFor=\"let customField of group.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </clr-tab-content>\r\n </clr-tab>\r\n </clr-tabs>\r\n</ng-container>\r\n<ng-template #singleGroup>\r\n <ng-container *ngFor=\"let customField of tabbedCustomFields[0]?.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n</ng-template>\r\n",
|
|
13064
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13065
|
+
styles: [""]
|
|
13066
|
+
},] }
|
|
13067
|
+
];
|
|
13068
|
+
TabbedCustomFieldsComponent.propDecorators = {
|
|
13069
|
+
entityName: [{ type: Input }],
|
|
13070
|
+
customFields: [{ type: Input }],
|
|
13071
|
+
customFieldsFormGroup: [{ type: Input }],
|
|
13072
|
+
readonly: [{ type: Input }],
|
|
13073
|
+
compact: [{ type: Input }],
|
|
13074
|
+
showLabel: [{ type: Input }]
|
|
13075
|
+
};
|
|
13076
|
+
|
|
11868
13077
|
/**
|
|
11869
13078
|
* A button link to be used as actions in rows of a table.
|
|
11870
13079
|
*/
|
|
@@ -11987,13 +13196,42 @@ TitleInputComponent.decorators = [
|
|
|
11987
13196
|
selector: 'vdr-title-input',
|
|
11988
13197
|
template: "<ng-content></ng-content>\r\n<div class=\"edit-icon\" *ngIf=\"!readonly\">\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n</div>\r\n",
|
|
11989
13198
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11990
|
-
styles: [":host{display:block;position:relative}:host ::ng-deep input{font-size:18px;color:var(--clr-p1-color);max-width:100%}:host ::ng-deep input:not(:focus){border-color:transparent!important;background-color:
|
|
13199
|
+
styles: [":host{display:block;position:relative}:host ::ng-deep input{font-size:18px;color:var(--clr-p1-color);max-width:100%}:host ::ng-deep input:not(:focus){border-color:transparent!important;background-color:var(--color-component-bg-100)!important}:host ::ng-deep input:focus{background-color:var(--clr-global-app-background)}:host ::ng-deep .clr-control-container{max-width:100%}:host ::ng-deep .clr-input-wrapper{max-width:100%!important}:host .edit-icon{position:absolute;right:8px;top:6px;color:var(--color-grey-400);opacity:0;transition:opacity .2s}:host:hover ::ng-deep input:not(:focus){background-color:var(--color-component-bg-200)!important}:host:hover .edit-icon{opacity:1}:host.readonly .edit-icon{display:none}:host.readonly:hover ::ng-deep input:not(:focus){background-color:var(--color-grey-200)!important}\n"]
|
|
11991
13200
|
},] }
|
|
11992
13201
|
];
|
|
11993
13202
|
TitleInputComponent.propDecorators = {
|
|
11994
13203
|
readonly: [{ type: HostBinding, args: ['class.readonly',] }, { type: Input }]
|
|
11995
13204
|
};
|
|
11996
13205
|
|
|
13206
|
+
class UiExtensionPointComponent {
|
|
13207
|
+
constructor(dataService) {
|
|
13208
|
+
this.dataService = dataService;
|
|
13209
|
+
this.isDevMode = isDevMode();
|
|
13210
|
+
}
|
|
13211
|
+
ngOnInit() {
|
|
13212
|
+
this.display$ = this.dataService.client
|
|
13213
|
+
.uiState()
|
|
13214
|
+
.mapStream(({ uiState }) => uiState.displayUiExtensionPoints);
|
|
13215
|
+
}
|
|
13216
|
+
}
|
|
13217
|
+
UiExtensionPointComponent.decorators = [
|
|
13218
|
+
{ type: Component, args: [{
|
|
13219
|
+
selector: 'vdr-ui-extension-point',
|
|
13220
|
+
template: "<div [class.highlight]=\"isDevMode && (display$ | async)\" class=\"wrapper\">\r\n <vdr-dropdown *ngIf=\"isDevMode && (display$ | async)\">\r\n <button class=\"btn btn-icon btn-link extension-point-info-trigger\"\r\n [style.top.px]=\"topPx ?? 0\"\r\n [style.left.px]=\"leftPx ?? 0\"\r\n vdrDropdownTrigger>\r\n <clr-icon shape=\"plugin\" class=\"\" size=\"16\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class=\"extension-info\">\r\n <pre *ngIf=\"api === 'actionBar'\">\r\naddActionBarItem({{ '{' }}\r\n id: 'my-button',\r\n label: 'My Action',\r\n locationId: '{{ locationId }}',\r\n{{ '}' }})</pre>\r\n <pre *ngIf=\"api === 'navMenu'\">\r\naddNavMenuItem({{ '{' }}\r\n id: 'my-menu-item',\r\n label: 'My Menu Item',\r\n routerLink: ['/extensions/my-plugin'],\r\n {{ '}' }},\r\n '{{ locationId }}'\r\n)</pre>\r\n <pre *ngIf=\"api === 'detailComponent'\">\r\nregisterCustomDetailComponent({{ '{' }}\r\n locationId: '{{ locationId }}',\r\n component: MyCustomComponent,\r\n{{ '}' }})</pre>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n <ng-content></ng-content>\r\n</div>\r\n",
|
|
13221
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13222
|
+
styles: [":host{position:relative;display:inline-block}.wrapper{display:inline-block;height:100%}.extension-point-info-trigger{position:absolute;margin:0;padding:0;z-index:100}.extension-point-info-trigger clr-icon{color:var(--color-success-500)}.extension-info{padding:12px}pre{padding:6px;font-family:\"Source Code Pro\",\"Lucida Console\",Monaco,monospace;background-color:var(--color-grey-200)}\n"]
|
|
13223
|
+
},] }
|
|
13224
|
+
];
|
|
13225
|
+
UiExtensionPointComponent.ctorParameters = () => [
|
|
13226
|
+
{ type: DataService }
|
|
13227
|
+
];
|
|
13228
|
+
UiExtensionPointComponent.propDecorators = {
|
|
13229
|
+
locationId: [{ type: Input }],
|
|
13230
|
+
topPx: [{ type: Input }],
|
|
13231
|
+
leftPx: [{ type: Input }],
|
|
13232
|
+
api: [{ type: Input }]
|
|
13233
|
+
};
|
|
13234
|
+
|
|
11997
13235
|
/**
|
|
11998
13236
|
* Allows declarative binding to the "disabled" property of a reactive form
|
|
11999
13237
|
* control.
|
|
@@ -12139,6 +13377,20 @@ IfDefaultChannelActiveDirective.propDecorators = {
|
|
|
12139
13377
|
vdrIfMultichannelElse: [{ type: Input }]
|
|
12140
13378
|
};
|
|
12141
13379
|
|
|
13380
|
+
/**
|
|
13381
|
+
* @description
|
|
13382
|
+
* Structural directive that displays the given element if the Vendure instance has multiple channels
|
|
13383
|
+
* configured.
|
|
13384
|
+
*
|
|
13385
|
+
* @example
|
|
13386
|
+
* ```html
|
|
13387
|
+
* <div *vdrIfMultichannel class="channel-selector">
|
|
13388
|
+
* <!-- ... -->
|
|
13389
|
+
* </ng-container>
|
|
13390
|
+
* ```
|
|
13391
|
+
*
|
|
13392
|
+
* @docsCategory directives
|
|
13393
|
+
*/
|
|
12142
13394
|
class IfMultichannelDirective extends IfDirectiveBase {
|
|
12143
13395
|
constructor(_viewContainer, templateRef, dataService) {
|
|
12144
13396
|
super(_viewContainer, templateRef, () => {
|
|
@@ -12170,6 +13422,7 @@ IfMultichannelDirective.propDecorators = {
|
|
|
12170
13422
|
};
|
|
12171
13423
|
|
|
12172
13424
|
/**
|
|
13425
|
+
* @description
|
|
12173
13426
|
* Conditionally shows/hides templates based on the current active user having the specified permission.
|
|
12174
13427
|
* Based on the ngIf source. Also support "else" templates:
|
|
12175
13428
|
*
|
|
@@ -12181,6 +13434,8 @@ IfMultichannelDirective.propDecorators = {
|
|
|
12181
13434
|
*
|
|
12182
13435
|
* The permission can be a single string, or an array. If an array is passed, then _all_ of the permissions
|
|
12183
13436
|
* must match (logical AND)
|
|
13437
|
+
*
|
|
13438
|
+
* @docsCategory directives
|
|
12184
13439
|
*/
|
|
12185
13440
|
class IfPermissionsDirective extends IfDirectiveBase {
|
|
12186
13441
|
constructor(_viewContainer, templateRef, dataService, changeDetectorRef) {
|
|
@@ -12310,6 +13565,7 @@ class DynamicFormInputComponent {
|
|
|
12310
13565
|
this.onChange(val);
|
|
12311
13566
|
this.control.patchValue(val, { emitEvent: false });
|
|
12312
13567
|
});
|
|
13568
|
+
setTimeout(() => this.changeDetectorRef.markForCheck());
|
|
12313
13569
|
}
|
|
12314
13570
|
};
|
|
12315
13571
|
// initial render
|
|
@@ -12813,6 +14069,20 @@ RelationCardComponent.propDecorators = {
|
|
|
12813
14069
|
detailTemplate: [{ type: ContentChild, args: [RelationCardDetailDirective, { read: TemplateRef },] }]
|
|
12814
14070
|
};
|
|
12815
14071
|
|
|
14072
|
+
/**
|
|
14073
|
+
* @description
|
|
14074
|
+
* Given an Asset object (an object with `preview` and optionally `focalPoint` properties), this pipe
|
|
14075
|
+
* returns a string with query parameters designed to work with the image resize capabilities of the
|
|
14076
|
+
* AssetServerPlugin.
|
|
14077
|
+
*
|
|
14078
|
+
* @example
|
|
14079
|
+
* ```HTML
|
|
14080
|
+
* <img [src]="asset | assetPreview:'tiny'" />
|
|
14081
|
+
* <img [src]="asset | assetPreview:150" />
|
|
14082
|
+
* ```
|
|
14083
|
+
*
|
|
14084
|
+
* @docsCategory pipes
|
|
14085
|
+
*/
|
|
12816
14086
|
class AssetPreviewPipe {
|
|
12817
14087
|
transform(asset, preset = 'thumb') {
|
|
12818
14088
|
if (!asset) {
|
|
@@ -12897,8 +14167,16 @@ CustomFieldLabelPipe.ctorParameters = () => [
|
|
|
12897
14167
|
];
|
|
12898
14168
|
|
|
12899
14169
|
/**
|
|
14170
|
+
* @description
|
|
12900
14171
|
* Displays a number of milliseconds in a more human-readable format,
|
|
12901
14172
|
* e.g. "12ms", "33s", "2:03m"
|
|
14173
|
+
*
|
|
14174
|
+
* @example
|
|
14175
|
+
* ```TypeScript
|
|
14176
|
+
* {{ timeInMs | duration }}
|
|
14177
|
+
* ```
|
|
14178
|
+
*
|
|
14179
|
+
* @docsCategory pipes
|
|
12902
14180
|
*/
|
|
12903
14181
|
class DurationPipe {
|
|
12904
14182
|
constructor(i18nService) {
|
|
@@ -12934,7 +14212,15 @@ DurationPipe.ctorParameters = () => [
|
|
|
12934
14212
|
];
|
|
12935
14213
|
|
|
12936
14214
|
/**
|
|
14215
|
+
* @description
|
|
12937
14216
|
* Formats a number into a human-readable file size string.
|
|
14217
|
+
*
|
|
14218
|
+
* @example
|
|
14219
|
+
* ```TypeScript
|
|
14220
|
+
* {{ fileSizeInBytes | filesize }}
|
|
14221
|
+
* ```
|
|
14222
|
+
*
|
|
14223
|
+
* @docsCategory pipes
|
|
12938
14224
|
*/
|
|
12939
14225
|
class FileSizePipe {
|
|
12940
14226
|
transform(value, useSiUnits = true) {
|
|
@@ -12968,13 +14254,15 @@ function humanFileSize(bytes, si) {
|
|
|
12968
14254
|
}
|
|
12969
14255
|
|
|
12970
14256
|
/**
|
|
14257
|
+
* @description
|
|
12971
14258
|
* A pipe which checks the provided permission against all the permissions of the current user.
|
|
12972
14259
|
* Returns `true` if the current user has that permission.
|
|
12973
14260
|
*
|
|
12974
14261
|
* @example
|
|
12975
|
-
* ```
|
|
14262
|
+
* ```HTML
|
|
12976
14263
|
* <button [disabled]="!('UpdateCatalog' | hasPermission)">Save Changes</button>
|
|
12977
14264
|
* ```
|
|
14265
|
+
* @docsCategory pipes
|
|
12978
14266
|
*/
|
|
12979
14267
|
class HasPermissionPipe {
|
|
12980
14268
|
constructor(dataService, changeDetectorRef) {
|
|
@@ -13037,9 +14325,12 @@ class LocaleBasePipe {
|
|
|
13037
14325
|
if (dataService && changeDetectorRef) {
|
|
13038
14326
|
this.subscription = dataService.client
|
|
13039
14327
|
.uiState()
|
|
13040
|
-
.mapStream(data => data.uiState
|
|
13041
|
-
.subscribe(
|
|
13042
|
-
this.locale =
|
|
14328
|
+
.mapStream(data => data.uiState)
|
|
14329
|
+
.subscribe(({ language, locale }) => {
|
|
14330
|
+
this.locale = language.replace(/_/g, '-');
|
|
14331
|
+
if (locale) {
|
|
14332
|
+
this.locale += `-${locale}`;
|
|
14333
|
+
}
|
|
13043
14334
|
changeDetectorRef.markForCheck();
|
|
13044
14335
|
});
|
|
13045
14336
|
}
|
|
@@ -13059,7 +14350,15 @@ LocaleBasePipe.ctorParameters = () => [
|
|
|
13059
14350
|
];
|
|
13060
14351
|
|
|
13061
14352
|
/**
|
|
14353
|
+
* @description
|
|
13062
14354
|
* Displays a human-readable name for a given ISO 4217 currency code.
|
|
14355
|
+
*
|
|
14356
|
+
* @example
|
|
14357
|
+
* ```HTML
|
|
14358
|
+
* {{ order.currencyCode | localeCurrencyName }}
|
|
14359
|
+
* ```
|
|
14360
|
+
*
|
|
14361
|
+
* @docsCategory pipes
|
|
13063
14362
|
*/
|
|
13064
14363
|
class LocaleCurrencyNamePipe extends LocaleBasePipe {
|
|
13065
14364
|
constructor(dataService, changeDetectorRef) {
|
|
@@ -13105,6 +14404,18 @@ LocaleCurrencyNamePipe.ctorParameters = () => [
|
|
|
13105
14404
|
{ type: ChangeDetectorRef, decorators: [{ type: Optional }] }
|
|
13106
14405
|
];
|
|
13107
14406
|
|
|
14407
|
+
/**
|
|
14408
|
+
* @description
|
|
14409
|
+
* Formats a Vendure monetary value (in cents) into the correct format for the configured currency and display
|
|
14410
|
+
* locale.
|
|
14411
|
+
*
|
|
14412
|
+
* @example
|
|
14413
|
+
* ```HTML
|
|
14414
|
+
* {{ variant.priceWithTax | localeCurrency }}
|
|
14415
|
+
* ```
|
|
14416
|
+
*
|
|
14417
|
+
* @docsCategory pipes
|
|
14418
|
+
*/
|
|
13108
14419
|
class LocaleCurrencyPipe extends LocaleBasePipe {
|
|
13109
14420
|
constructor(dataService, changeDetectorRef) {
|
|
13110
14421
|
super(dataService, changeDetectorRef);
|
|
@@ -13134,6 +14445,13 @@ LocaleCurrencyPipe.ctorParameters = () => [
|
|
|
13134
14445
|
* @description
|
|
13135
14446
|
* A replacement of the Angular DatePipe which makes use of the Intl API
|
|
13136
14447
|
* to format dates according to the selected UI language.
|
|
14448
|
+
*
|
|
14449
|
+
* @example
|
|
14450
|
+
* ```HTML
|
|
14451
|
+
* {{ order.orderPlacedAt | localeDate }}
|
|
14452
|
+
* ```
|
|
14453
|
+
*
|
|
14454
|
+
* @docsCategory pipes
|
|
13137
14455
|
*/
|
|
13138
14456
|
class LocaleDatePipe extends LocaleBasePipe {
|
|
13139
14457
|
constructor(dataService, changeDetectorRef) {
|
|
@@ -13201,7 +14519,15 @@ LocaleDatePipe.ctorParameters = () => [
|
|
|
13201
14519
|
];
|
|
13202
14520
|
|
|
13203
14521
|
/**
|
|
13204
|
-
*
|
|
14522
|
+
* @description
|
|
14523
|
+
* Displays a human-readable name for a given ISO 639-1 language code.
|
|
14524
|
+
*
|
|
14525
|
+
* @example
|
|
14526
|
+
* ```HTML
|
|
14527
|
+
* {{ 'zh_Hant' | localeLanguageName }}
|
|
14528
|
+
* ```
|
|
14529
|
+
*
|
|
14530
|
+
* @docsCategory pipes
|
|
13205
14531
|
*/
|
|
13206
14532
|
class LocaleLanguageNamePipe extends LocaleBasePipe {
|
|
13207
14533
|
constructor(dataService, changeDetectorRef) {
|
|
@@ -13237,6 +14563,51 @@ LocaleLanguageNamePipe.ctorParameters = () => [
|
|
|
13237
14563
|
{ type: ChangeDetectorRef, decorators: [{ type: Optional }] }
|
|
13238
14564
|
];
|
|
13239
14565
|
|
|
14566
|
+
/**
|
|
14567
|
+
* @description
|
|
14568
|
+
* Displays a human-readable name for a given region.
|
|
14569
|
+
*
|
|
14570
|
+
* @example
|
|
14571
|
+
* ```HTML
|
|
14572
|
+
* {{ 'GB' | localeRegionName }}
|
|
14573
|
+
* ```
|
|
14574
|
+
*
|
|
14575
|
+
* @docsCategory pipes
|
|
14576
|
+
*/
|
|
14577
|
+
class LocaleRegionNamePipe extends LocaleBasePipe {
|
|
14578
|
+
constructor(dataService, changeDetectorRef) {
|
|
14579
|
+
super(dataService, changeDetectorRef);
|
|
14580
|
+
}
|
|
14581
|
+
transform(value, locale) {
|
|
14582
|
+
var _a;
|
|
14583
|
+
if (value == null || value === '') {
|
|
14584
|
+
return '';
|
|
14585
|
+
}
|
|
14586
|
+
if (typeof value !== 'string') {
|
|
14587
|
+
return `Invalid region code "${value}"`;
|
|
14588
|
+
}
|
|
14589
|
+
const activeLocale = typeof locale === 'string' ? locale : (_a = this.locale) !== null && _a !== void 0 ? _a : 'en';
|
|
14590
|
+
// Awaiting TS types for this API: https://github.com/microsoft/TypeScript/pull/44022/files
|
|
14591
|
+
const DisplayNames = Intl.DisplayNames;
|
|
14592
|
+
try {
|
|
14593
|
+
return new DisplayNames([activeLocale.replace('_', '-')], { type: 'region' }).of(value.replace('_', '-'));
|
|
14594
|
+
}
|
|
14595
|
+
catch (e) {
|
|
14596
|
+
return value;
|
|
14597
|
+
}
|
|
14598
|
+
}
|
|
14599
|
+
}
|
|
14600
|
+
LocaleRegionNamePipe.decorators = [
|
|
14601
|
+
{ type: Pipe, args: [{
|
|
14602
|
+
name: 'localeRegionName',
|
|
14603
|
+
pure: false,
|
|
14604
|
+
},] }
|
|
14605
|
+
];
|
|
14606
|
+
LocaleRegionNamePipe.ctorParameters = () => [
|
|
14607
|
+
{ type: DataService, decorators: [{ type: Optional }] },
|
|
14608
|
+
{ type: ChangeDetectorRef, decorators: [{ type: Optional }] }
|
|
14609
|
+
];
|
|
14610
|
+
|
|
13240
14611
|
/**
|
|
13241
14612
|
* Formats a string into sentence case (first letter of first word uppercase).
|
|
13242
14613
|
*/
|
|
@@ -13384,7 +14755,15 @@ StringToColorPipe.decorators = [
|
|
|
13384
14755
|
];
|
|
13385
14756
|
|
|
13386
14757
|
/**
|
|
14758
|
+
* @description
|
|
13387
14759
|
* Converts a date into the format "3 minutes ago", "5 hours ago" etc.
|
|
14760
|
+
*
|
|
14761
|
+
* @example
|
|
14762
|
+
* ```HTML
|
|
14763
|
+
* {{ order.orderPlacedAt | timeAgo }}
|
|
14764
|
+
* ```
|
|
14765
|
+
*
|
|
14766
|
+
* @docsCategory pipes
|
|
13388
14767
|
*/
|
|
13389
14768
|
class TimeAgoPipe {
|
|
13390
14769
|
constructor(i18nService) {
|
|
@@ -13546,11 +14925,15 @@ const DECLARATIONS = [
|
|
|
13546
14925
|
LocaleDatePipe,
|
|
13547
14926
|
LocaleCurrencyPipe,
|
|
13548
14927
|
LocaleLanguageNamePipe,
|
|
14928
|
+
LocaleRegionNamePipe,
|
|
13549
14929
|
TagSelectorComponent,
|
|
13550
14930
|
ManageTagsDialogComponent,
|
|
13551
14931
|
RelationSelectorDialogComponent,
|
|
13552
14932
|
RelationCardComponent,
|
|
13553
14933
|
StatusBadgeComponent,
|
|
14934
|
+
TabbedCustomFieldsComponent,
|
|
14935
|
+
UiExtensionPointComponent,
|
|
14936
|
+
CustomDetailComponentHostComponent,
|
|
13554
14937
|
];
|
|
13555
14938
|
const DYNAMIC_FORM_INPUTS = [
|
|
13556
14939
|
TextFormInputComponent,
|
|
@@ -13571,6 +14954,8 @@ const DYNAMIC_FORM_INPUTS = [
|
|
|
13571
14954
|
RelationCardDetailDirective,
|
|
13572
14955
|
RelationSelectorDialogComponent,
|
|
13573
14956
|
TextareaFormInputComponent,
|
|
14957
|
+
RichTextFormInputComponent,
|
|
14958
|
+
JsonEditorFormInputComponent,
|
|
13574
14959
|
];
|
|
13575
14960
|
class SharedModule {
|
|
13576
14961
|
}
|
|
@@ -13691,6 +15076,45 @@ AppComponentModule.decorators = [
|
|
|
13691
15076
|
},] }
|
|
13692
15077
|
];
|
|
13693
15078
|
|
|
15079
|
+
/**
|
|
15080
|
+
* @description
|
|
15081
|
+
* A base class for entity detail views. It should be used in conjunction with the
|
|
15082
|
+
* {@link BaseEntityResolver}.
|
|
15083
|
+
*
|
|
15084
|
+
* @example
|
|
15085
|
+
* ```TypeScript
|
|
15086
|
+
* \@Component({
|
|
15087
|
+
* selector: 'app-my-entity',
|
|
15088
|
+
* templateUrl: './my-entity.component.html',
|
|
15089
|
+
* styleUrls: ['./my-entity.component.scss'],
|
|
15090
|
+
* changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15091
|
+
* })
|
|
15092
|
+
* export class GlobalSettingsComponent extends BaseDetailComponent<MyEntity.Fragment> implements OnInit {
|
|
15093
|
+
* detailForm: FormGroup;
|
|
15094
|
+
*
|
|
15095
|
+
* constructor(
|
|
15096
|
+
* router: Router,
|
|
15097
|
+
* route: ActivatedRoute,
|
|
15098
|
+
* serverConfigService: ServerConfigService,
|
|
15099
|
+
* protected dataService: DataService,
|
|
15100
|
+
* private formBuilder: FormBuilder,
|
|
15101
|
+
* ) {
|
|
15102
|
+
* super(route, router, serverConfigService, dataService);
|
|
15103
|
+
* this.detailForm = this.formBuilder.group({
|
|
15104
|
+
* name: [''],
|
|
15105
|
+
* });
|
|
15106
|
+
* }
|
|
15107
|
+
*
|
|
15108
|
+
* protected setFormValues(entity: MyEntity.Fragment, languageCode: LanguageCode): void {
|
|
15109
|
+
* this.detailForm.patchValue({
|
|
15110
|
+
* name: entity.name,
|
|
15111
|
+
* });
|
|
15112
|
+
* }
|
|
15113
|
+
* }
|
|
15114
|
+
* ```
|
|
15115
|
+
*
|
|
15116
|
+
* @docsCategory list-detail-views
|
|
15117
|
+
*/
|
|
13694
15118
|
class BaseDetailComponent {
|
|
13695
15119
|
constructor(route, router, serverConfigService, dataService) {
|
|
13696
15120
|
this.route = route;
|
|
@@ -13729,6 +15153,19 @@ class BaseDetailComponent {
|
|
|
13729
15153
|
canDeactivate() {
|
|
13730
15154
|
return this.detailForm && this.detailForm.pristine;
|
|
13731
15155
|
}
|
|
15156
|
+
setCustomFieldFormValues(customFields, formGroup, entity, currentTranslation) {
|
|
15157
|
+
var _a, _b;
|
|
15158
|
+
for (const fieldDef of customFields) {
|
|
15159
|
+
const key = fieldDef.name;
|
|
15160
|
+
const value = fieldDef.type === 'localeString'
|
|
15161
|
+
? (_a = currentTranslation.customFields) === null || _a === void 0 ? void 0 : _a[key]
|
|
15162
|
+
: (_b = entity.customFields) === null || _b === void 0 ? void 0 : _b[key];
|
|
15163
|
+
const control = formGroup === null || formGroup === void 0 ? void 0 : formGroup.get(key);
|
|
15164
|
+
if (control) {
|
|
15165
|
+
control.patchValue(value);
|
|
15166
|
+
}
|
|
15167
|
+
}
|
|
15168
|
+
}
|
|
13732
15169
|
getCustomFieldConfig(key) {
|
|
13733
15170
|
return this.serverConfigService.getCustomFieldsFor(key);
|
|
13734
15171
|
}
|
|
@@ -13749,8 +15186,34 @@ function createResolveData(resolver) {
|
|
|
13749
15186
|
};
|
|
13750
15187
|
}
|
|
13751
15188
|
/**
|
|
15189
|
+
* @description
|
|
13752
15190
|
* A base resolver for an entity detail route. Resolves to an observable of the given entity, or a "blank"
|
|
13753
|
-
* version if the route id equals "create".
|
|
15191
|
+
* version if the route id equals "create". Should be used together with details views which extend the
|
|
15192
|
+
* {@link BaseDetailComponent}.
|
|
15193
|
+
*
|
|
15194
|
+
* @example
|
|
15195
|
+
* ```TypeScript
|
|
15196
|
+
* \@Injectable({
|
|
15197
|
+
* providedIn: 'root',
|
|
15198
|
+
* })
|
|
15199
|
+
* export class MyEntityResolver extends BaseEntityResolver<MyEntity.Fragment> {
|
|
15200
|
+
* constructor(router: Router, dataService: DataService) {
|
|
15201
|
+
* super(
|
|
15202
|
+
* router,
|
|
15203
|
+
* {
|
|
15204
|
+
* __typename: 'MyEntity',
|
|
15205
|
+
* id: '',
|
|
15206
|
+
* createdAt: '',
|
|
15207
|
+
* updatedAt: '',
|
|
15208
|
+
* name: '',
|
|
15209
|
+
* },
|
|
15210
|
+
* id => dataService.query(GET_MY_ENTITY, { id }).mapStream(data => data.myEntity),
|
|
15211
|
+
* );
|
|
15212
|
+
* }
|
|
15213
|
+
* }
|
|
15214
|
+
* ```
|
|
15215
|
+
*
|
|
15216
|
+
* @docsCategory list-detail-views
|
|
13754
15217
|
*/
|
|
13755
15218
|
class BaseEntityResolver {
|
|
13756
15219
|
constructor(router, emptyEntity, entityStream) {
|
|
@@ -13758,6 +15221,7 @@ class BaseEntityResolver {
|
|
|
13758
15221
|
this.emptyEntity = emptyEntity;
|
|
13759
15222
|
this.entityStream = entityStream;
|
|
13760
15223
|
}
|
|
15224
|
+
/** @internal */
|
|
13761
15225
|
resolve(route, state) {
|
|
13762
15226
|
const id = route.paramMap.get('id');
|
|
13763
15227
|
// Complete the entity stream upon navigating away
|
|
@@ -13773,8 +15237,70 @@ class BaseEntityResolver {
|
|
|
13773
15237
|
}
|
|
13774
15238
|
|
|
13775
15239
|
/**
|
|
15240
|
+
* @description
|
|
13776
15241
|
* This is a base class which implements the logic required to fetch and manipulate
|
|
13777
15242
|
* a list of data from a query which returns a PaginatedList type.
|
|
15243
|
+
*
|
|
15244
|
+
* @example
|
|
15245
|
+
* ```TypeScript
|
|
15246
|
+
* \@Component({
|
|
15247
|
+
* selector: 'my-entity-list',
|
|
15248
|
+
* templateUrl: './my-entity-list.component.html',
|
|
15249
|
+
* styleUrls: ['./my-entity-list.component.scss'],
|
|
15250
|
+
* changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15251
|
+
* })
|
|
15252
|
+
* export class MyEntityListComponent extends BaseListComponent<GetMyEntityList.Query, GetMyEntityList.Items> {
|
|
15253
|
+
* constructor(
|
|
15254
|
+
* private dataService: DataService,
|
|
15255
|
+
* router: Router,
|
|
15256
|
+
* route: ActivatedRoute,
|
|
15257
|
+
* ) {
|
|
15258
|
+
* super(router, route);
|
|
15259
|
+
* super.setQueryFn(
|
|
15260
|
+
* (...args: any[]) => this.dataService.query<GetMyEntityList.Query>(GET_MY_ENTITY_LIST),
|
|
15261
|
+
* data => data.myEntities,
|
|
15262
|
+
* );
|
|
15263
|
+
* }
|
|
15264
|
+
* }
|
|
15265
|
+
* ```
|
|
15266
|
+
*
|
|
15267
|
+
* The template for the component will typically use the {@link DataTableComponent} to display the results.
|
|
15268
|
+
*
|
|
15269
|
+
* @example
|
|
15270
|
+
* ```HTML
|
|
15271
|
+
* <vdr-action-bar>
|
|
15272
|
+
* <vdr-ab-right>
|
|
15273
|
+
* <a class="btn btn-primary" [routerLink]="['./create']" *vdrIfPermissions="['CreateSettings', 'CreateTaxRate']">
|
|
15274
|
+
* <clr-icon shape="plus"></clr-icon>
|
|
15275
|
+
* Create new my entity
|
|
15276
|
+
* </a>
|
|
15277
|
+
* </vdr-ab-right>
|
|
15278
|
+
* </vdr-action-bar>
|
|
15279
|
+
*
|
|
15280
|
+
* <vdr-data-table
|
|
15281
|
+
* [items]="items$ | async"
|
|
15282
|
+
* [itemsPerPage]="itemsPerPage$ | async"
|
|
15283
|
+
* [totalItems]="totalItems$ | async"
|
|
15284
|
+
* [currentPage]="currentPage$ | async"
|
|
15285
|
+
* (pageChange)="setPageNumber($event)"
|
|
15286
|
+
* (itemsPerPageChange)="setItemsPerPage($event)"
|
|
15287
|
+
* >
|
|
15288
|
+
* <vdr-dt-column>{{ 'common.name' | translate }}</vdr-dt-column>
|
|
15289
|
+
* <vdr-dt-column></vdr-dt-column>
|
|
15290
|
+
* <ng-template let-myEntity="item">
|
|
15291
|
+
* <td class="left align-middle">{{ myEntity.name }}</td>
|
|
15292
|
+
* <td class="right align-middle">
|
|
15293
|
+
* <vdr-table-row-action
|
|
15294
|
+
* iconShape="edit"
|
|
15295
|
+
* [label]="'common.edit' | translate"
|
|
15296
|
+
* [linkTo]="['./', myEntity.id]"
|
|
15297
|
+
* ></vdr-table-row-action>
|
|
15298
|
+
* </td>
|
|
15299
|
+
* </ng-template>
|
|
15300
|
+
* </vdr-data-table>
|
|
15301
|
+
* ```
|
|
15302
|
+
*
|
|
15303
|
+
* @docsCategory list-detail-views
|
|
13778
15304
|
*/
|
|
13779
15305
|
// tslint:disable-next-line:directive-class-suffix
|
|
13780
15306
|
class BaseListComponent {
|
|
@@ -13787,6 +15313,7 @@ class BaseListComponent {
|
|
|
13787
15313
|
this.defaults = { take: 10, skip: 0 };
|
|
13788
15314
|
}
|
|
13789
15315
|
/**
|
|
15316
|
+
* @description
|
|
13790
15317
|
* Sets the fetch function for the list being implemented.
|
|
13791
15318
|
*/
|
|
13792
15319
|
setQueryFn(listQueryFn, mappingFn, onPageChangeFn, defaults) {
|
|
@@ -13799,6 +15326,7 @@ class BaseListComponent {
|
|
|
13799
15326
|
this.defaults = defaults;
|
|
13800
15327
|
}
|
|
13801
15328
|
}
|
|
15329
|
+
/** @internal */
|
|
13802
15330
|
ngOnInit() {
|
|
13803
15331
|
if (!this.listQueryFn) {
|
|
13804
15332
|
throw new Error(`No listQueryFn has been defined. Please call super.setQueryFn() in the constructor.`);
|
|
@@ -13818,19 +15346,29 @@ class BaseListComponent {
|
|
|
13818
15346
|
.pipe(takeUntil(this.destroy$))
|
|
13819
15347
|
.subscribe(fetchPage);
|
|
13820
15348
|
}
|
|
15349
|
+
/** @internal */
|
|
13821
15350
|
ngOnDestroy() {
|
|
13822
15351
|
this.destroy$.next();
|
|
13823
15352
|
this.destroy$.complete();
|
|
13824
15353
|
this.listQuery.completed$.next();
|
|
13825
15354
|
}
|
|
15355
|
+
/**
|
|
15356
|
+
* @description
|
|
15357
|
+
* Sets the current page number in the url.
|
|
15358
|
+
*/
|
|
13826
15359
|
setPageNumber(page) {
|
|
13827
15360
|
this.setQueryParam('page', page, { replaceUrl: true });
|
|
13828
15361
|
}
|
|
15362
|
+
/**
|
|
15363
|
+
* @description
|
|
15364
|
+
* Sets the number of items per page in the url.
|
|
15365
|
+
*/
|
|
13829
15366
|
setItemsPerPage(perPage) {
|
|
13830
15367
|
this.setQueryParam('perPage', perPage, { replaceUrl: true });
|
|
13831
15368
|
}
|
|
13832
15369
|
/**
|
|
13833
|
-
*
|
|
15370
|
+
* @description
|
|
15371
|
+
* Re-fetch the current page of results.
|
|
13834
15372
|
*/
|
|
13835
15373
|
refresh() {
|
|
13836
15374
|
this.refresh$.next(undefined);
|
|
@@ -13955,7 +15493,7 @@ function patchObject(obj, patch) {
|
|
|
13955
15493
|
}
|
|
13956
15494
|
|
|
13957
15495
|
// Auto-generated by the set-version.js script.
|
|
13958
|
-
const ADMIN_UI_VERSION = '1.
|
|
15496
|
+
const ADMIN_UI_VERSION = '1.4.0';
|
|
13959
15497
|
|
|
13960
15498
|
/**
|
|
13961
15499
|
* Responsible for registering dashboard widget components and querying for layouts.
|
|
@@ -14175,5 +15713,5 @@ function unicodePatternValidator(patternRe) {
|
|
|
14175
15713
|
* Generated bundle index. Do not edit.
|
|
14176
15714
|
*/
|
|
14177
15715
|
|
|
14178
|
-
export { ADDRESS_FRAGMENT, ADD_CUSTOMERS_TO_GROUP, ADD_MANUAL_PAYMENT_TO_ORDER, ADD_MEMBERS_TO_ZONE, ADD_NOTE_TO_CUSTOMER, ADD_NOTE_TO_ORDER, ADD_OPTION_GROUP_TO_PRODUCT, ADD_OPTION_TO_GROUP, ADMINISTRATOR_FRAGMENT, ADMIN_UI_VERSION, ALL_CUSTOM_FIELDS_FRAGMENT, ASSET_FRAGMENT, ASSIGN_PRODUCTS_TO_CHANNEL, ASSIGN_ROLE_TO_ADMINISTRATOR, ASSIGN_VARIANTS_TO_CHANNEL, ATTEMPT_LOGIN, AUTH_REDIRECT_PARAM, ActionBarComponent, ActionBarItemsComponent, ActionBarLeftComponent, ActionBarRightComponent, AddressFormComponent, AdjustmentType, AdministratorDataService, AffixedInputComponent, AppComponent, AppComponentModule, AppShellComponent, AssetFileInputComponent, AssetGalleryComponent, AssetPickerDialogComponent, AssetPreviewComponent, AssetPreviewDialogComponent, AssetPreviewPipe, AssetSearchInputComponent, AssetType, AuthDataService, AuthGuard, AuthService, BOOLEAN_CUSTOM_FIELD_FRAGMENT, BaseDataService, BaseDetailComponent, BaseEntityResolver, BaseListComponent, BooleanFormInputComponent, BreadcrumbComponent, CANCEL_JOB, CANCEL_ORDER, CHANNEL_FRAGMENT, COLLECTION_FRAGMENT, CONFIGURABLE_OPERATION_DEF_FRAGMENT, CONFIGURABLE_OPERATION_FRAGMENT, COUNTRY_FRAGMENT, CREATE_ADMINISTRATOR, CREATE_ASSETS, CREATE_CHANNEL, CREATE_COLLECTION, CREATE_COUNTRY, CREATE_CUSTOMER, CREATE_CUSTOMER_ADDRESS, CREATE_CUSTOMER_GROUP, CREATE_FACET, CREATE_FACET_VALUES, CREATE_FULFILLMENT, CREATE_PAYMENT_METHOD, CREATE_PRODUCT, CREATE_PRODUCT_OPTION_GROUP, CREATE_PRODUCT_VARIANTS, CREATE_PROMOTION, CREATE_ROLE, CREATE_SHIPPING_METHOD, CREATE_TAG, CREATE_TAX_CATEGORY, CREATE_TAX_RATE, CREATE_ZONE, CURRENT_USER_FRAGMENT, CUSTOMER_FRAGMENT, CUSTOM_FIELD_CONFIG_FRAGMENT, CanDeactivateDetailGuard, ChannelAssignmentControlComponent, ChannelBadgeComponent, ChannelLabelPipe, ChannelSwitcherComponent, CheckJobsLink, ChipComponent, ClientDataService, CollectionDataService, ComponentRegistryService, ConfigurableInputComponent, CoreModule, CurrencyCode, CurrencyFormInputComponent, CurrencyInputComponent, CustomFieldComponentService, CustomFieldControlComponent, CustomFieldLabelPipe, CustomHttpTranslationLoader, CustomerDataService, CustomerGroupFormInputComponent, CustomerLabelComponent, DATE_TIME_CUSTOM_FIELD_FRAGMENT, DELETE_ADMINISTRATOR, DELETE_ASSETS, DELETE_CHANNEL, DELETE_COLLECTION, DELETE_COUNTRY, DELETE_CUSTOMER, DELETE_CUSTOMER_GROUP, DELETE_CUSTOMER_NOTE, DELETE_FACET, DELETE_FACET_VALUES, DELETE_ORDER_NOTE, DELETE_PAYMENT_METHOD, DELETE_PRODUCT, DELETE_PRODUCT_VARIANT, DELETE_PROMOTION, DELETE_ROLE, DELETE_SHIPPING_METHOD, DELETE_TAG, DELETE_TAX_CATEGORY, DELETE_TAX_RATE, DELETE_ZONE, DISCOUNT_FRAGMENT, DashboardWidgetService, DataModule, DataService, DataTableColumnComponent, DataTableComponent, DateFormInputComponent, DatetimePickerComponent, DatetimePickerService, DefaultInterceptor, DeletionResult, DialogButtonsDirective, DialogComponentOutletComponent, DialogTitleDirective, DisabledDirective, DropdownComponent, DropdownItemDirective, DropdownMenuComponent, DropdownTriggerDirective, DurationPipe, DynamicFormInputComponent, ERROR_RESULT_FRAGMENT, EditNoteDialogComponent, EmptyPlaceholderComponent, EntityInfoComponent, ErrorCode, ExtensionHostComponent, ExtensionHostConfig, ExtensionHostService, ExternalImageDialogComponent, FACET_VALUE_FRAGMENT, FACET_WITH_VALUES_FRAGMENT, FLOAT_CUSTOM_FIELD_FRAGMENT, FULFILLMENT_FRAGMENT, FacetDataService, FacetValueChipComponent, FacetValueFormInputComponent, FacetValueSelectorComponent, FetchAdapter, FileSizePipe, FocalPointControlComponent, FormFieldComponent, FormFieldControlDirective, FormItemComponent, FormattedAddressComponent, GET_ACTIVE_ADMINISTRATOR, GET_ACTIVE_CHANNEL, GET_ADJUSTMENT_OPERATIONS, GET_ADMINISTRATOR, GET_ADMINISTRATORS, GET_ASSET, GET_ASSET_LIST, GET_AVAILABLE_COUNTRIES, GET_CHANNEL, GET_CHANNELS, GET_CLIENT_STATE, GET_COLLECTION, GET_COLLECTION_CONTENTS, GET_COLLECTION_FILTERS, GET_COLLECTION_LIST, GET_COUNTRY, GET_COUNTRY_LIST, GET_CURRENT_USER, GET_CUSTOMER, GET_CUSTOMER_GROUPS, GET_CUSTOMER_GROUP_WITH_CUSTOMERS, GET_CUSTOMER_HISTORY, GET_CUSTOMER_LIST, GET_FACET_LIST, GET_FACET_WITH_VALUES, GET_GLOBAL_SETTINGS, GET_JOBS_BY_ID, GET_JOBS_LIST, GET_JOB_INFO, GET_JOB_QUEUE_LIST, GET_NEWTORK_STATUS, GET_ORDER, GET_ORDERS_LIST, GET_ORDER_HISTORY, GET_ORDER_SUMMARY, GET_PAYMENT_METHOD, GET_PAYMENT_METHOD_LIST, GET_PAYMENT_METHOD_OPERATIONS, GET_PENDING_SEARCH_INDEX_UPDATES, GET_PRODUCT_LIST, GET_PRODUCT_OPTION_GROUP, GET_PRODUCT_OPTION_GROUPS, GET_PRODUCT_SIMPLE, GET_PRODUCT_VARIANT, GET_PRODUCT_VARIANT_LIST, GET_PRODUCT_VARIANT_LIST_SIMPLE, GET_PRODUCT_VARIANT_OPTIONS, GET_PRODUCT_WITH_VARIANTS, GET_PROMOTION, GET_PROMOTION_LIST, GET_ROLE, GET_ROLES, GET_SERVER_CONFIG, GET_SHIPPING_METHOD, GET_SHIPPING_METHOD_LIST, GET_SHIPPING_METHOD_OPERATIONS, GET_TAG, GET_TAG_LIST, GET_TAX_CATEGORIES, GET_TAX_CATEGORY, GET_TAX_RATE, GET_TAX_RATE_LIST, GET_UI_STATE, GET_USER_STATUS, GET_ZONE, GET_ZONES, GLOBAL_SETTINGS_FRAGMENT, GlobalFlag, HasPermissionPipe, HealthCheckService, HelpTooltipComponent, HistoryEntryDetailComponent, HistoryEntryType, HttpLoaderFactory, I18nService, INT_CUSTOM_FIELD_FRAGMENT, IfDefaultChannelActiveDirective, IfDirectiveBase, IfMultichannelDirective, IfPermissionsDirective, InjectableTranslateMessageFormatCompiler, ItemsPerPageControlsComponent, JOB_INFO_FRAGMENT, JobQueueService, JobState, LOCALE_STRING_CUSTOM_FIELD_FRAGMENT, LOG_OUT, LabeledDataComponent, LanguageCode, LanguageSelectorComponent, LinkDialogComponent, LocalStorageService, LocaleBasePipe, LocaleCurrencyNamePipe, LocaleCurrencyPipe, LocaleDatePipe, LocaleLanguageNamePipe, LogicalOperator, MODIFY_ORDER, MOVE_COLLECTION, MainNavComponent, ManageTagsDialogComponent, ModalDialogComponent, ModalService, NavBuilderService, NotificationComponent, NotificationService, NumberFormInputComponent, ORDER_ADDRESS_FRAGMENT, ORDER_DETAIL_FRAGMENT, ORDER_FRAGMENT, ORDER_LINE_FRAGMENT, ObjectTreeComponent, OmitTypenameLink, OrderDataService, OrderStateLabelComponent, OverlayHostComponent, OverlayHostService, PAYMENT_METHOD_FRAGMENT, PRODUCT_DETAIL_FRAGMENT, PRODUCT_OPTION_FRAGMENT, PRODUCT_OPTION_GROUP_FRAGMENT, PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT, PRODUCT_SELECTOR_SEARCH, PRODUCT_VARIANT_FRAGMENT, PROMOTION_FRAGMENT, PaginationControlsComponent, PasswordFormInputComponent, PercentageSuffixInputComponent, Permission, ProductDataService, ProductSelectorComponent, ProductSelectorFormInputComponent, PromotionDataService, ProsemirrorService, QueryResult, REFUND_FRAGMENT, REFUND_ORDER, REINDEX, RELATION_CUSTOM_FIELD_FRAGMENT, REMOVE_CUSTOMERS_FROM_GROUP, REMOVE_MEMBERS_FROM_ZONE, REMOVE_OPTION_GROUP_FROM_PRODUCT, REMOVE_PRODUCTS_FROM_CHANNEL, REMOVE_VARIANTS_FROM_CHANNEL, REQUEST_COMPLETED, REQUEST_STARTED, ROLE_FRAGMENT, RUN_PENDING_SEARCH_INDEX_UPDATES, RelationAssetInputComponent, RelationCardComponent, RelationCardDetailDirective, RelationCardPreviewDirective, RelationCustomerInputComponent, RelationFormInputComponent, RelationProductInputComponent, RelationProductVariantInputComponent, RelationSelectorDialogComponent, RichTextEditorComponent, SEARCH_PRODUCTS, SETTLE_PAYMENT, SETTLE_REFUND, SET_ACTIVE_CHANNEL, SET_AS_LOGGED_IN, SET_AS_LOGGED_OUT, SET_CONTENT_LANGUAGE, SET_UI_LANGUAGE, SET_UI_THEME, SHIPPING_METHOD_FRAGMENT, STRING_CUSTOM_FIELD_FRAGMENT, SelectFormInputComponent, SelectToggleComponent, SentenceCasePipe, ServerConfigService, SettingsDataService, SharedModule, ShippingMethodDataService, SimpleDialogComponent, SingleSearchSelectionModel, SingleSearchSelectionModelFactory, SortOrder, SortPipe, StateI18nTokenPipe, StatusBadgeComponent, StockMovementType, StringToColorPipe, TAG_FRAGMENT, TAX_CATEGORY_FRAGMENT, TAX_RATE_FRAGMENT, TEST_ELIGIBLE_SHIPPING_METHODS, TEST_SHIPPING_METHOD, TEXT_CUSTOM_FIELD_FRAGMENT, TRANSITION_FULFILLMENT_TO_STATE, TRANSITION_ORDER_TO_STATE, TRANSITION_PAYMENT_TO_STATE, TableRowActionComponent, TagSelectorComponent, TextFormInputComponent, TextareaFormInputComponent, ThemeSwitcherComponent, TimeAgoPipe, TimelineEntryComponent, TitleInputComponent, UPDATE_ACTIVE_ADMINISTRATOR, UPDATE_ADMINISTRATOR, UPDATE_ASSET, UPDATE_CHANNEL, UPDATE_COLLECTION, UPDATE_COUNTRY, UPDATE_CUSTOMER, UPDATE_CUSTOMER_ADDRESS, UPDATE_CUSTOMER_GROUP, UPDATE_CUSTOMER_NOTE, UPDATE_FACET, UPDATE_FACET_VALUES, UPDATE_GLOBAL_SETTINGS, UPDATE_ORDER_CUSTOM_FIELDS, UPDATE_ORDER_NOTE, UPDATE_PAYMENT_METHOD, UPDATE_PRODUCT, UPDATE_PRODUCT_OPTION, UPDATE_PRODUCT_OPTION_GROUP, UPDATE_PRODUCT_VARIANTS, UPDATE_PROMOTION, UPDATE_ROLE, UPDATE_SHIPPING_METHOD, UPDATE_TAG, UPDATE_TAX_CATEGORY, UPDATE_TAX_RATE, UPDATE_USER_CHANNELS, UPDATE_ZONE, USER_STATUS_FRAGMENT, UiLanguageSwitcherDialogComponent, UserMenuComponent, ZONE_FRAGMENT, addActionBarItem, addCustomFields, addNavMenuItem, addNavMenuSection, blockQuoteRule, buildInputRules, buildKeymap, buildMenuItems, bulletListRule, canInsert, clientResolvers, codeBlockRule, configurableDefinitionToInstance, configurableOperationValueIsValid, createApollo, createResolveData, createUpdatedTranslatable, dayOfWeekIndex, defaultFormInputs, detailBreadcrumb, encodeConfigArgValue, findTranslation, flattenFacetValues, getAppConfig, getClientDefaults, getConfigArgValue, getDefaultConfigArgValue, getDefaultUiLanguage, getLocales, getMarkRange, getServerLocation, headingRule, hostExternalFrame, initializeServerConfigService, insertImageItem, interpolateDescription, result as introspectionResult, isEntityCreateOrUpdateMutation, linkItem, linkSelectPlugin, loadAppConfig, markActive, orderedListRule, registerCustomFieldComponent, registerDashboardWidget, registerDefaultFormInputs, registerFormInputComponent, removeReadonlyCustomFields, setDashboardWidgetLayout, stringToColor, toConfigurableOperationInput, transformRelationCustomFieldInputs, unicodePatternValidator, weekDayNames, ɵ1, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8 };
|
|
15716
|
+
export { ADDRESS_FRAGMENT, ADD_CUSTOMERS_TO_GROUP, ADD_MANUAL_PAYMENT_TO_ORDER, ADD_MEMBERS_TO_ZONE, ADD_NOTE_TO_CUSTOMER, ADD_NOTE_TO_ORDER, ADD_OPTION_GROUP_TO_PRODUCT, ADD_OPTION_TO_GROUP, ADMINISTRATOR_FRAGMENT, ADMIN_UI_VERSION, ALL_CUSTOM_FIELDS_FRAGMENT, ASSET_FRAGMENT, ASSIGN_PRODUCTS_TO_CHANNEL, ASSIGN_ROLE_TO_ADMINISTRATOR, ASSIGN_VARIANTS_TO_CHANNEL, ATTEMPT_LOGIN, AUTH_REDIRECT_PARAM, ActionBarComponent, ActionBarItemsComponent, ActionBarLeftComponent, ActionBarRightComponent, AddressFormComponent, AdjustmentType, AdministratorDataService, AffixedInputComponent, AppComponent, AppComponentModule, AppShellComponent, AssetFileInputComponent, AssetGalleryComponent, AssetPickerDialogComponent, AssetPreviewComponent, AssetPreviewDialogComponent, AssetPreviewPipe, AssetSearchInputComponent, AssetType, AuthDataService, AuthGuard, AuthService, BOOLEAN_CUSTOM_FIELD_FRAGMENT, BaseDataService, BaseDetailComponent, BaseEntityResolver, BaseListComponent, BooleanFormInputComponent, BreadcrumbComponent, CANCEL_JOB, CANCEL_ORDER, CHANNEL_FRAGMENT, COLLECTION_FRAGMENT, CONFIGURABLE_OPERATION_DEF_FRAGMENT, CONFIGURABLE_OPERATION_FRAGMENT, COUNTRY_FRAGMENT, CREATE_ADMINISTRATOR, CREATE_ASSETS, CREATE_CHANNEL, CREATE_COLLECTION, CREATE_COUNTRY, CREATE_CUSTOMER, CREATE_CUSTOMER_ADDRESS, CREATE_CUSTOMER_GROUP, CREATE_FACET, CREATE_FACET_VALUES, CREATE_FULFILLMENT, CREATE_PAYMENT_METHOD, CREATE_PRODUCT, CREATE_PRODUCT_OPTION_GROUP, CREATE_PRODUCT_VARIANTS, CREATE_PROMOTION, CREATE_ROLE, CREATE_SHIPPING_METHOD, CREATE_TAG, CREATE_TAX_CATEGORY, CREATE_TAX_RATE, CREATE_ZONE, CURRENT_USER_FRAGMENT, CUSTOMER_FRAGMENT, CUSTOMER_GROUP_FRAGMENT, CUSTOM_FIELD_CONFIG_FRAGMENT, CanDeactivateDetailGuard, ChannelAssignmentControlComponent, ChannelBadgeComponent, ChannelLabelPipe, ChannelSwitcherComponent, CheckJobsLink, ChipComponent, ClientDataService, CollectionDataService, ComponentRegistryService, ConfigurableInputComponent, CoreModule, CurrencyCode, CurrencyFormInputComponent, CurrencyInputComponent, CustomDetailComponentHostComponent, CustomDetailComponentService, CustomFieldComponentService, CustomFieldControlComponent, CustomFieldLabelPipe, CustomHttpTranslationLoader, CustomerDataService, CustomerGroupFormInputComponent, CustomerLabelComponent, DATE_TIME_CUSTOM_FIELD_FRAGMENT, DELETE_ADMINISTRATOR, DELETE_ASSETS, DELETE_CHANNEL, DELETE_COLLECTION, DELETE_COUNTRY, DELETE_CUSTOMER, DELETE_CUSTOMER_GROUP, DELETE_CUSTOMER_NOTE, DELETE_FACET, DELETE_FACET_VALUES, DELETE_ORDER_NOTE, DELETE_PAYMENT_METHOD, DELETE_PRODUCT, DELETE_PRODUCT_VARIANT, DELETE_PROMOTION, DELETE_ROLE, DELETE_SHIPPING_METHOD, DELETE_TAG, DELETE_TAX_CATEGORY, DELETE_TAX_RATE, DELETE_ZONE, DISCOUNT_FRAGMENT, DashboardWidgetService, DataModule, DataService, DataTableColumnComponent, DataTableComponent, DateFormInputComponent, DatetimePickerComponent, DatetimePickerService, DefaultInterceptor, DeletionResult, DialogButtonsDirective, DialogComponentOutletComponent, DialogTitleDirective, DisabledDirective, DropdownComponent, DropdownItemDirective, DropdownMenuComponent, DropdownTriggerDirective, DurationPipe, DynamicFormInputComponent, ERROR_RESULT_FRAGMENT, EditNoteDialogComponent, EmptyPlaceholderComponent, EntityInfoComponent, ErrorCode, ExtensionHostComponent, ExtensionHostConfig, ExtensionHostService, ExternalImageDialogComponent, FACET_VALUE_FRAGMENT, FACET_WITH_VALUES_FRAGMENT, FLOAT_CUSTOM_FIELD_FRAGMENT, FULFILLMENT_FRAGMENT, FacetDataService, FacetValueChipComponent, FacetValueFormInputComponent, FacetValueSelectorComponent, FetchAdapter, FileSizePipe, FocalPointControlComponent, FormFieldComponent, FormFieldControlDirective, FormItemComponent, FormattedAddressComponent, GET_ACTIVE_ADMINISTRATOR, GET_ACTIVE_CHANNEL, GET_ADJUSTMENT_OPERATIONS, GET_ADMINISTRATOR, GET_ADMINISTRATORS, GET_ASSET, GET_ASSET_LIST, GET_AVAILABLE_COUNTRIES, GET_CHANNEL, GET_CHANNELS, GET_CLIENT_STATE, GET_COLLECTION, GET_COLLECTION_CONTENTS, GET_COLLECTION_FILTERS, GET_COLLECTION_LIST, GET_COUNTRY, GET_COUNTRY_LIST, GET_CURRENT_USER, GET_CUSTOMER, GET_CUSTOMER_GROUPS, GET_CUSTOMER_GROUP_WITH_CUSTOMERS, GET_CUSTOMER_HISTORY, GET_CUSTOMER_LIST, GET_FACET_LIST, GET_FACET_WITH_VALUES, GET_GLOBAL_SETTINGS, GET_JOBS_BY_ID, GET_JOBS_LIST, GET_JOB_INFO, GET_JOB_QUEUE_LIST, GET_NEWTORK_STATUS, GET_ORDER, GET_ORDERS_LIST, GET_ORDER_HISTORY, GET_ORDER_SUMMARY, GET_PAYMENT_METHOD, GET_PAYMENT_METHOD_LIST, GET_PAYMENT_METHOD_OPERATIONS, GET_PENDING_SEARCH_INDEX_UPDATES, GET_PRODUCT_LIST, GET_PRODUCT_OPTION_GROUP, GET_PRODUCT_OPTION_GROUPS, GET_PRODUCT_SIMPLE, GET_PRODUCT_VARIANT, GET_PRODUCT_VARIANT_LIST, GET_PRODUCT_VARIANT_LIST_SIMPLE, GET_PRODUCT_VARIANT_OPTIONS, GET_PRODUCT_WITH_VARIANTS, GET_PROMOTION, GET_PROMOTION_LIST, GET_ROLE, GET_ROLES, GET_SERVER_CONFIG, GET_SHIPPING_METHOD, GET_SHIPPING_METHOD_LIST, GET_SHIPPING_METHOD_OPERATIONS, GET_TAG, GET_TAG_LIST, GET_TAX_CATEGORIES, GET_TAX_CATEGORY, GET_TAX_RATE, GET_TAX_RATE_LIST, GET_TAX_RATE_LIST_SIMPLE, GET_UI_STATE, GET_USER_STATUS, GET_ZONE, GET_ZONES, GLOBAL_SETTINGS_FRAGMENT, GlobalFlag, HasPermissionPipe, HealthCheckService, HelpTooltipComponent, HistoryEntryDetailComponent, HistoryEntryType, HttpLoaderFactory, I18nService, INT_CUSTOM_FIELD_FRAGMENT, IfDefaultChannelActiveDirective, IfDirectiveBase, IfMultichannelDirective, IfPermissionsDirective, InjectableTranslateMessageFormatCompiler, ItemsPerPageControlsComponent, JOB_INFO_FRAGMENT, JobQueueService, JobState, JsonEditorFormInputComponent, LOCALE_STRING_CUSTOM_FIELD_FRAGMENT, LOG_OUT, LabeledDataComponent, LanguageCode, LanguageSelectorComponent, LinkDialogComponent, LocalStorageService, LocaleBasePipe, LocaleCurrencyNamePipe, LocaleCurrencyPipe, LocaleDatePipe, LocaleLanguageNamePipe, LocaleRegionNamePipe, LogicalOperator, MODIFY_ORDER, MOVE_COLLECTION, MainNavComponent, ManageTagsDialogComponent, ModalDialogComponent, ModalService, NavBuilderService, NotificationComponent, NotificationService, NumberFormInputComponent, ORDER_ADDRESS_FRAGMENT, ORDER_DETAIL_FRAGMENT, ORDER_FRAGMENT, ORDER_LINE_FRAGMENT, ObjectTreeComponent, OmitTypenameLink, OrderDataService, OrderStateLabelComponent, OverlayHostComponent, OverlayHostService, PAYMENT_METHOD_FRAGMENT, PRODUCT_DETAIL_FRAGMENT, PRODUCT_OPTION_FRAGMENT, PRODUCT_OPTION_GROUP_FRAGMENT, PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT, PRODUCT_SELECTOR_SEARCH, PRODUCT_VARIANT_FRAGMENT, PROMOTION_FRAGMENT, PaginationControlsComponent, PasswordFormInputComponent, PercentageSuffixInputComponent, Permission, ProductDataService, ProductSelectorComponent, ProductSelectorFormInputComponent, PromotionDataService, ProsemirrorService, QueryResult, REFUND_FRAGMENT, REFUND_ORDER, REINDEX, RELATION_CUSTOM_FIELD_FRAGMENT, REMOVE_CUSTOMERS_FROM_GROUP, REMOVE_MEMBERS_FROM_ZONE, REMOVE_OPTION_GROUP_FROM_PRODUCT, REMOVE_PRODUCTS_FROM_CHANNEL, REMOVE_VARIANTS_FROM_CHANNEL, REQUEST_COMPLETED, REQUEST_STARTED, ROLE_FRAGMENT, RUN_PENDING_SEARCH_INDEX_UPDATES, RelationAssetInputComponent, RelationCardComponent, RelationCardDetailDirective, RelationCardPreviewDirective, RelationCustomerInputComponent, RelationFormInputComponent, RelationProductInputComponent, RelationProductVariantInputComponent, RelationSelectorDialogComponent, RichTextEditorComponent, RichTextFormInputComponent, SEARCH_PRODUCTS, SETTLE_PAYMENT, SETTLE_REFUND, SET_ACTIVE_CHANNEL, SET_AS_LOGGED_IN, SET_AS_LOGGED_OUT, SET_CONTENT_LANGUAGE, SET_DISPLAY_UI_EXTENSION_POINTS, SET_UI_LANGUAGE_AND_LOCALE, SET_UI_LOCALE, SET_UI_THEME, SHIPPING_METHOD_FRAGMENT, STRING_CUSTOM_FIELD_FRAGMENT, SelectFormInputComponent, SelectToggleComponent, SentenceCasePipe, ServerConfigService, SettingsDataService, SharedModule, ShippingMethodDataService, SimpleDialogComponent, SingleSearchSelectionModel, SingleSearchSelectionModelFactory, SortOrder, SortPipe, StateI18nTokenPipe, StatusBadgeComponent, StockMovementType, StringToColorPipe, TAG_FRAGMENT, TAX_CATEGORY_FRAGMENT, TAX_RATE_FRAGMENT, TEST_ELIGIBLE_SHIPPING_METHODS, TEST_SHIPPING_METHOD, TEXT_CUSTOM_FIELD_FRAGMENT, TRANSITION_FULFILLMENT_TO_STATE, TRANSITION_ORDER_TO_STATE, TRANSITION_PAYMENT_TO_STATE, TabbedCustomFieldsComponent, TableRowActionComponent, TagSelectorComponent, TextFormInputComponent, TextareaFormInputComponent, ThemeSwitcherComponent, TimeAgoPipe, TimelineEntryComponent, TitleInputComponent, UPDATE_ACTIVE_ADMINISTRATOR, UPDATE_ADMINISTRATOR, UPDATE_ASSET, UPDATE_CHANNEL, UPDATE_COLLECTION, UPDATE_COUNTRY, UPDATE_CUSTOMER, UPDATE_CUSTOMER_ADDRESS, UPDATE_CUSTOMER_GROUP, UPDATE_CUSTOMER_NOTE, UPDATE_FACET, UPDATE_FACET_VALUES, UPDATE_GLOBAL_SETTINGS, UPDATE_ORDER_CUSTOM_FIELDS, UPDATE_ORDER_NOTE, UPDATE_PAYMENT_METHOD, UPDATE_PRODUCT, UPDATE_PRODUCT_OPTION, UPDATE_PRODUCT_OPTION_GROUP, UPDATE_PRODUCT_VARIANTS, UPDATE_PROMOTION, UPDATE_ROLE, UPDATE_SHIPPING_METHOD, UPDATE_TAG, UPDATE_TAX_CATEGORY, UPDATE_TAX_RATE, UPDATE_USER_CHANNELS, UPDATE_ZONE, USER_STATUS_FRAGMENT, UiExtensionPointComponent, UiLanguageSwitcherDialogComponent, UserMenuComponent, ZONE_FRAGMENT, addActionBarItem, addCustomFields, addNavMenuItem, addNavMenuSection, blockQuoteRule, buildInputRules, buildKeymap, buildMenuItems, bulletListRule, canInsert, clientResolvers, codeBlockRule, configurableDefinitionToInstance, configurableOperationValueIsValid, createApollo, createResolveData, createUpdatedTranslatable, dayOfWeekIndex, defaultFormInputs, detailBreadcrumb, encodeConfigArgValue, findTranslation, flattenFacetValues, getAppConfig, getClientDefaults, getConfigArgValue, getDefaultConfigArgValue, getDefaultUiLanguage, getDefaultUiLocale, getLocales, getMarkRange, getServerLocation, headingRule, hostExternalFrame, initializeServerConfigService, insertImageItem, interpolateDescription, result as introspectionResult, isEntityCreateOrUpdateMutation, jsonValidator, linkItem, linkSelectPlugin, loadAppConfig, markActive, orderedListRule, registerCustomDetailComponent, registerCustomFieldComponent, registerDashboardWidget, registerDefaultFormInputs, registerFormInputComponent, removeReadonlyCustomFields, setDashboardWidgetLayout, stringToColor, toConfigurableOperationInput, transformRelationCustomFieldInputs, unicodePatternValidator, weekDayNames, ɵ1, ɵ10, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, ɵ9 };
|
|
14179
15717
|
//# sourceMappingURL=vendure-admin-ui-core.js.map
|