@vendure/admin-ui 1.3.4 → 1.4.2
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 +2022 -404
- 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 +282 -23
- 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/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/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/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 +9 -1
- 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 +4 -3
- 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 +1865 -341
- 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/global/_utilities.scss +3 -1
- package/static/styles/theme/dark.scss +9 -0
- package/static/styles/theme/default.scss +8 -0
- package/static/theme.min.css +1 -1
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { FormControl } from '@angular/forms';
|
|
2
2
|
import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { FormInputComponent } from '../../../common/component-registry-types';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Displays a number input. Default input for `int` and `float` type fields.
|
|
7
|
+
*
|
|
8
|
+
* @docsCategory custom-input-components
|
|
9
|
+
* @docsPage default-inputs
|
|
10
|
+
*/
|
|
4
11
|
export declare class NumberFormInputComponent implements FormInputComponent {
|
|
5
12
|
static readonly id: DefaultFormComponentId;
|
|
6
13
|
readonly: boolean;
|
|
7
14
|
formControl: FormControl;
|
|
8
15
|
config: DefaultFormComponentConfig<'number-form-input'>;
|
|
16
|
+
get prefix(): string | undefined;
|
|
17
|
+
get suffix(): string | undefined;
|
|
18
|
+
get min(): number | undefined;
|
|
19
|
+
get max(): number | undefined;
|
|
20
|
+
get step(): number | undefined;
|
|
9
21
|
}
|
package/core/shared/dynamic-form-inputs/password-form-input/password-form-input.component.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { FormControl } from '@angular/forms';
|
|
2
2
|
import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { FormInputComponent, InputComponentConfig } from '../../../common/component-registry-types';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Displays a password text input. Should be used with `string` type fields.
|
|
7
|
+
*
|
|
8
|
+
* @docsCategory custom-input-components
|
|
9
|
+
* @docsPage default-inputs
|
|
10
|
+
*/
|
|
4
11
|
export declare class PasswordFormInputComponent implements FormInputComponent {
|
|
5
12
|
static readonly id: DefaultFormComponentId;
|
|
6
13
|
readonly: boolean;
|
|
@@ -5,6 +5,14 @@ import { Observable } from 'rxjs';
|
|
|
5
5
|
import { FormInputComponent, InputComponentConfig } from '../../../common/component-registry-types';
|
|
6
6
|
import { GetProductVariant, ProductSelectorSearch } from '../../../common/generated-types';
|
|
7
7
|
import { DataService } from '../../../data/providers/data.service';
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* Allows the selection of multiple ProductVariants via an autocomplete select input.
|
|
11
|
+
* Should be used with `ID` type **list** fields which represent ProductVariant IDs.
|
|
12
|
+
*
|
|
13
|
+
* @docsCategory custom-input-components
|
|
14
|
+
* @docsPage default-inputs
|
|
15
|
+
*/
|
|
8
16
|
export declare class ProductSelectorFormInputComponent implements FormInputComponent, OnInit {
|
|
9
17
|
private dataService;
|
|
10
18
|
static readonly id: DefaultFormComponentId;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { FactoryProvider, Type } from '@angular/core';
|
|
2
2
|
import { FormInputComponent } from '../../common/component-registry-types';
|
|
3
3
|
import { CustomFieldControl, CustomFieldEntityName } from '../../providers/custom-field-component/custom-field-component.service';
|
|
4
|
+
import { JsonEditorFormInputComponent } from './code-editor-form-input/json-editor-form-input.component';
|
|
4
5
|
import { CurrencyFormInputComponent } from './currency-form-input/currency-form-input.component';
|
|
5
6
|
import { CustomerGroupFormInputComponent } from './customer-group-form-input/customer-group-form-input.component';
|
|
6
7
|
import { FacetValueFormInputComponent } from './facet-value-form-input/facet-value-form-input.component';
|
|
8
|
+
import { PasswordFormInputComponent } from './password-form-input/password-form-input.component';
|
|
7
9
|
import { ProductSelectorFormInputComponent } from './product-selector-form-input/product-selector-form-input.component';
|
|
8
|
-
|
|
9
|
-
export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponent | typeof CustomerGroupFormInputComponent | typeof TextFormInputComponent | typeof CurrencyFormInputComponent | typeof FacetValueFormInputComponent)[];
|
|
10
|
+
export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponent | typeof CustomerGroupFormInputComponent | typeof PasswordFormInputComponent | typeof CurrencyFormInputComponent | typeof FacetValueFormInputComponent | typeof JsonEditorFormInputComponent)[];
|
|
10
11
|
/**
|
|
11
12
|
* @description
|
|
12
13
|
* Registers a custom FormInputComponent which can be used to control the argument inputs
|
|
13
|
-
* of a {@link ConfigurableOperationDef} (e.g. CollectionFilter, ShippingMethod etc)
|
|
14
|
+
* of a {@link ConfigurableOperationDef} (e.g. CollectionFilter, ShippingMethod etc) or for
|
|
15
|
+
* a custom field.
|
|
14
16
|
*
|
|
15
17
|
* @example
|
|
16
18
|
* ```TypeScript
|
|
@@ -23,10 +25,41 @@ export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponen
|
|
|
23
25
|
* })
|
|
24
26
|
* export class MyUiExtensionModule {}
|
|
25
27
|
* ```
|
|
28
|
+
*
|
|
29
|
+
* This input component can then be used in a custom field:
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```TypeScript
|
|
33
|
+
* const config = {
|
|
34
|
+
* // ...
|
|
35
|
+
* customFields: {
|
|
36
|
+
* ProductVariant: [
|
|
37
|
+
* {
|
|
38
|
+
* name: 'rrp',
|
|
39
|
+
* type: 'int',
|
|
40
|
+
* ui: { component: 'my-custom-input' },
|
|
41
|
+
* },
|
|
42
|
+
* ]
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* or with an argument of a {@link ConfigurableOperationDef}:
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```TypeScript
|
|
51
|
+
* args: {
|
|
52
|
+
* rrp: { type: 'int', ui: { component: 'my-custom-input' } },
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @docsCategory custom-input-components
|
|
26
57
|
*/
|
|
27
58
|
export declare function registerFormInputComponent(id: string, component: Type<FormInputComponent>): FactoryProvider;
|
|
28
59
|
/**
|
|
29
60
|
* @description
|
|
61
|
+
* **Deprecated** use `registerFormInputComponent()` in combination with the customField `ui` config instead.
|
|
62
|
+
*
|
|
30
63
|
* Registers a custom component to act as the form input control for the given custom field.
|
|
31
64
|
* This should be used in the NgModule `providers` array of your ui extension module.
|
|
32
65
|
*
|
|
@@ -41,6 +74,10 @@ export declare function registerFormInputComponent(id: string, component: Type<F
|
|
|
41
74
|
* })
|
|
42
75
|
* export class MyUiExtensionModule {}
|
|
43
76
|
* ```
|
|
77
|
+
*
|
|
78
|
+
* @deprecated use `registerFormInputComponent()` in combination with the customField `ui` config instead.
|
|
79
|
+
*
|
|
80
|
+
* @docsCategory custom-input-components
|
|
44
81
|
*/
|
|
45
82
|
export declare function registerCustomFieldComponent(entity: CustomFieldEntityName, fieldName: string, component: Type<CustomFieldControl>): FactoryProvider;
|
|
46
83
|
/**
|
package/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.d.ts
CHANGED
|
@@ -2,6 +2,15 @@ import { FormControl } from '@angular/forms';
|
|
|
2
2
|
import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { FormInputComponent } from '../../../common/component-registry-types';
|
|
4
4
|
import { RelationCustomFieldConfig } from '../../../common/generated-types';
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* The default input component for `relation` type custom fields. Allows the selection
|
|
8
|
+
* of a ProductVariant, Product, Customer or Asset. For other entity types, a custom
|
|
9
|
+
* implementation will need to be defined. See {@link registerFormInputComponent}.
|
|
10
|
+
*
|
|
11
|
+
* @docsCategory custom-input-components
|
|
12
|
+
* @docsPage default-inputs
|
|
13
|
+
*/
|
|
5
14
|
export declare class RelationFormInputComponent implements FormInputComponent {
|
|
6
15
|
static readonly id: DefaultFormComponentId;
|
|
7
16
|
readonly: boolean;
|
package/core/shared/dynamic-form-inputs/rich-text-form-input/rich-text-form-input.component.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { FormInputComponent } from '../../../common/component-registry-types';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Uses the {@link RichTextEditorComponent} as in input for `text` type fields.
|
|
7
|
+
*
|
|
8
|
+
* @docsCategory custom-input-components
|
|
9
|
+
* @docsPage default-inputs
|
|
10
|
+
*/
|
|
11
|
+
export declare class RichTextFormInputComponent implements FormInputComponent {
|
|
12
|
+
static readonly id: DefaultFormComponentId;
|
|
13
|
+
readonly: boolean;
|
|
14
|
+
formControl: FormControl;
|
|
15
|
+
config: DefaultFormComponentConfig<'rich-text-form-input'>;
|
|
16
|
+
}
|
|
@@ -2,9 +2,18 @@ import { FormControl } from '@angular/forms';
|
|
|
2
2
|
import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { FormInputComponent } from '../../../common/component-registry-types';
|
|
4
4
|
import { CustomFieldConfigFragment } from '../../../common/generated-types';
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* Uses a select input to allow the selection of a string value. Should be used with
|
|
8
|
+
* `string` type fields with options.
|
|
9
|
+
*
|
|
10
|
+
* @docsCategory custom-input-components
|
|
11
|
+
* @docsPage default-inputs
|
|
12
|
+
*/
|
|
5
13
|
export declare class SelectFormInputComponent implements FormInputComponent {
|
|
6
14
|
static readonly id: DefaultFormComponentId;
|
|
7
15
|
readonly: boolean;
|
|
8
16
|
formControl: FormControl;
|
|
9
17
|
config: DefaultFormComponentConfig<'select-form-input'> & CustomFieldConfigFragment;
|
|
18
|
+
get options(): any;
|
|
10
19
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { FormControl } from '@angular/forms';
|
|
2
|
-
import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
|
-
import { FormInputComponent
|
|
2
|
+
import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { FormInputComponent } from '../../../common/component-registry-types';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Uses a regular text form input. This is the default input for `string` and `localeString` type fields.
|
|
7
|
+
*
|
|
8
|
+
* @docsCategory custom-input-components
|
|
9
|
+
* @docsPage default-inputs
|
|
10
|
+
*/
|
|
4
11
|
export declare class TextFormInputComponent implements FormInputComponent {
|
|
5
12
|
static readonly id: DefaultFormComponentId;
|
|
6
13
|
readonly: boolean;
|
|
7
14
|
formControl: FormControl;
|
|
8
|
-
config:
|
|
15
|
+
config: DefaultFormComponentConfig<'text-form-input'>;
|
|
16
|
+
get prefix(): string | undefined;
|
|
17
|
+
get suffix(): string | undefined;
|
|
9
18
|
}
|
package/core/shared/dynamic-form-inputs/textarea-form-input/textarea-form-input.component.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { FormControl } from '@angular/forms';
|
|
2
2
|
import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { FormInputComponent } from '../../../common/component-registry-types';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Uses textarea form input. This is the default input for `text` type fields.
|
|
7
|
+
*
|
|
8
|
+
* @docsCategory custom-input-components
|
|
9
|
+
* @docsPage default-inputs
|
|
10
|
+
*/
|
|
4
11
|
export declare class TextareaFormInputComponent implements FormInputComponent {
|
|
5
12
|
static readonly id: DefaultFormComponentId;
|
|
6
13
|
readonly: boolean;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { AssetFragment } from '../../common/generated-types';
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* Given an Asset object (an object with `preview` and optionally `focalPoint` properties), this pipe
|
|
6
|
+
* returns a string with query parameters designed to work with the image resize capabilities of the
|
|
7
|
+
* AssetServerPlugin.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```HTML
|
|
11
|
+
* <img [src]="asset | assetPreview:'tiny'" />
|
|
12
|
+
* <img [src]="asset | assetPreview:150" />
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @docsCategory pipes
|
|
16
|
+
*/
|
|
3
17
|
export declare class AssetPreviewPipe implements PipeTransform {
|
|
4
18
|
transform(asset?: AssetFragment, preset?: string | number): string;
|
|
5
19
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { I18nService } from '../../providers/i18n/i18n.service';
|
|
3
3
|
/**
|
|
4
|
+
* @description
|
|
4
5
|
* Displays a number of milliseconds in a more human-readable format,
|
|
5
6
|
* e.g. "12ms", "33s", "2:03m"
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```TypeScript
|
|
10
|
+
* {{ timeInMs | duration }}
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @docsCategory pipes
|
|
6
14
|
*/
|
|
7
15
|
export declare class DurationPipe implements PipeTransform {
|
|
8
16
|
private i18nService;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
/**
|
|
3
|
+
* @description
|
|
3
4
|
* Formats a number into a human-readable file size string.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```TypeScript
|
|
8
|
+
* {{ fileSizeInBytes | filesize }}
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @docsCategory pipes
|
|
4
12
|
*/
|
|
5
13
|
export declare class FileSizePipe implements PipeTransform {
|
|
6
14
|
transform(value: number, useSiUnits?: boolean): any;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
|
|
2
2
|
import { DataService } from '../../data/providers/data.service';
|
|
3
3
|
/**
|
|
4
|
+
* @description
|
|
4
5
|
* A pipe which checks the provided permission against all the permissions of the current user.
|
|
5
6
|
* Returns `true` if the current user has that permission.
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
|
-
* ```
|
|
9
|
+
* ```HTML
|
|
9
10
|
* <button [disabled]="!('UpdateCatalog' | hasPermission)">Save Changes</button>
|
|
10
11
|
* ```
|
|
12
|
+
* @docsCategory pipes
|
|
11
13
|
*/
|
|
12
14
|
export declare class HasPermissionPipe implements PipeTransform, OnDestroy {
|
|
13
15
|
private dataService;
|
|
@@ -2,7 +2,15 @@ import { ChangeDetectorRef, PipeTransform } from '@angular/core';
|
|
|
2
2
|
import { DataService } from '../../data/providers/data.service';
|
|
3
3
|
import { LocaleBasePipe } from './locale-base.pipe';
|
|
4
4
|
/**
|
|
5
|
+
* @description
|
|
5
6
|
* Displays a human-readable name for a given ISO 4217 currency code.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```HTML
|
|
10
|
+
* {{ order.currencyCode | localeCurrencyName }}
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @docsCategory pipes
|
|
6
14
|
*/
|
|
7
15
|
export declare class LocaleCurrencyNamePipe extends LocaleBasePipe implements PipeTransform {
|
|
8
16
|
constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { ChangeDetectorRef, PipeTransform } from '@angular/core';
|
|
2
2
|
import { DataService } from '../../data/providers/data.service';
|
|
3
3
|
import { LocaleBasePipe } from './locale-base.pipe';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Formats a Vendure monetary value (in cents) into the correct format for the configured currency and display
|
|
7
|
+
* locale.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```HTML
|
|
11
|
+
* {{ variant.priceWithTax | localeCurrency }}
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @docsCategory pipes
|
|
15
|
+
*/
|
|
4
16
|
export declare class LocaleCurrencyPipe extends LocaleBasePipe implements PipeTransform {
|
|
5
17
|
constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
|
|
6
18
|
transform(value: unknown, ...args: unknown[]): string | unknown;
|
|
@@ -5,6 +5,13 @@ import { LocaleBasePipe } from './locale-base.pipe';
|
|
|
5
5
|
* @description
|
|
6
6
|
* A replacement of the Angular DatePipe which makes use of the Intl API
|
|
7
7
|
* to format dates according to the selected UI language.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```HTML
|
|
11
|
+
* {{ order.orderPlacedAt | localeDate }}
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @docsCategory pipes
|
|
8
15
|
*/
|
|
9
16
|
export declare class LocaleDatePipe extends LocaleBasePipe implements PipeTransform {
|
|
10
17
|
constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
|
|
@@ -2,7 +2,15 @@ import { ChangeDetectorRef, PipeTransform } from '@angular/core';
|
|
|
2
2
|
import { DataService } from '../../data/providers/data.service';
|
|
3
3
|
import { LocaleBasePipe } from './locale-base.pipe';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* @description
|
|
6
|
+
* Displays a human-readable name for a given ISO 639-1 language code.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```HTML
|
|
10
|
+
* {{ 'zh_Hant' | localeLanguageName }}
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @docsCategory pipes
|
|
6
14
|
*/
|
|
7
15
|
export declare class LocaleLanguageNamePipe extends LocaleBasePipe implements PipeTransform {
|
|
8
16
|
constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeDetectorRef, PipeTransform } from '@angular/core';
|
|
2
|
+
import { DataService } from '../../data/providers/data.service';
|
|
3
|
+
import { LocaleBasePipe } from './locale-base.pipe';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Displays a human-readable name for a given region.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```HTML
|
|
10
|
+
* {{ 'GB' | localeRegionName }}
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @docsCategory pipes
|
|
14
|
+
*/
|
|
15
|
+
export declare class LocaleRegionNamePipe extends LocaleBasePipe implements PipeTransform {
|
|
16
|
+
constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
|
|
17
|
+
transform(value: any, locale?: unknown): string;
|
|
18
|
+
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { I18nService } from '../../providers/i18n/i18n.service';
|
|
3
3
|
/**
|
|
4
|
+
* @description
|
|
4
5
|
* Converts a date into the format "3 minutes ago", "5 hours ago" etc.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```HTML
|
|
9
|
+
* {{ order.orderPlacedAt | timeAgo }}
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @docsCategory pipes
|
|
5
13
|
*/
|
|
6
14
|
export declare class TimeAgoPipe implements PipeTransform {
|
|
7
15
|
private i18nService;
|