@vendure/admin-ui 2.0.0-next.1 → 2.0.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/catalog.module.d.ts +10 -11
- package/catalog/components/collection-contents/collection-contents.component.d.ts +10 -2
- package/catalog/components/collection-detail/collection-detail.component.d.ts +13 -4
- package/catalog/components/collection-list/collection-list.component.d.ts +2 -0
- package/catalog/components/collection-tree/array-to-tree.d.ts +1 -1
- package/catalog/components/collection-tree/collection-tree-node.component.d.ts +6 -2
- package/catalog/components/collection-tree/collection-tree.component.d.ts +2 -1
- package/catalog/components/generate-product-variants/generate-product-variants.component.d.ts +3 -3
- package/catalog/components/option-value-input/option-value-input.component.d.ts +21 -9
- package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +22 -12
- package/catalog/components/product-variants-list/product-variants-list.component.d.ts +1 -0
- package/catalog/public_api.d.ts +0 -1
- package/core/common/generated-types.d.ts +368 -128
- package/core/common/utilities/configurable-operation-utils.d.ts +4 -2
- package/core/common/utilities/selection-manager.d.ts +23 -0
- package/core/common/version.d.ts +1 -1
- package/core/components/app-shell/app-shell.component.d.ts +1 -0
- package/core/data/definitions/collection-definitions.d.ts +1 -0
- package/core/data/definitions/order-definitions.d.ts +2 -0
- package/core/data/definitions/product-definitions.d.ts +1 -0
- package/core/data/providers/collection-data.service.d.ts +4 -0
- package/core/data/providers/order-data.service.d.ts +1 -0
- package/core/data/providers/product-data.service.d.ts +1 -0
- package/core/data/providers/promotion-data.service.d.ts +1 -1
- package/core/providers/local-storage/local-storage.service.d.ts +1 -0
- package/core/public_api.d.ts +6 -0
- package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +27 -3
- package/core/shared/components/configurable-input/configurable-input.component.d.ts +8 -3
- package/core/shared/components/custom-field-control/custom-field-control.component.d.ts +6 -2
- package/core/shared/components/data-table/data-table.component.d.ts +5 -2
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +3 -2
- package/core/shared/components/object-tree/object-tree.component.d.ts +3 -3
- package/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.d.ts +38 -0
- package/{catalog → core/shared}/components/product-search-input/product-search-input.component.d.ts +1 -1
- package/core/shared/components/select-toggle/select-toggle.component.d.ts +2 -1
- package/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.d.ts +28 -0
- package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +2 -0
- package/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.d.ts +23 -0
- package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +4 -1
- package/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +6 -3
- package/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.d.ts +18 -0
- package/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.d.ts +10 -2
- package/core/shared/pipes/custom-field-label.pipe.d.ts +4 -10
- package/core/shared/shared.module.d.ts +32 -27
- package/customer/components/customer-group-list/customer-group-list.component.d.ts +6 -4
- package/esm2020/catalog/catalog.module.mjs +1 -5
- package/esm2020/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +1 -1
- package/esm2020/catalog/components/assets/assets.component.mjs +2 -2
- package/esm2020/catalog/components/collection-contents/collection-contents.component.mjs +61 -13
- package/esm2020/catalog/components/collection-detail/collection-detail.component.mjs +70 -32
- package/esm2020/catalog/components/collection-list/collection-list.component.mjs +30 -5
- package/esm2020/catalog/components/collection-tree/array-to-tree.mjs +3 -3
- package/esm2020/catalog/components/collection-tree/collection-tree-node.component.mjs +29 -10
- package/esm2020/catalog/components/collection-tree/collection-tree.component.mjs +6 -3
- package/esm2020/catalog/components/facet-detail/facet-detail.component.mjs +2 -2
- package/esm2020/catalog/components/generate-product-variants/generate-product-variants.component.mjs +12 -4
- package/esm2020/catalog/components/option-value-input/option-value-input.component.mjs +65 -11
- package/esm2020/catalog/components/product-detail/product-detail.component.mjs +2 -2
- package/esm2020/catalog/components/product-list/product-list.component.mjs +7 -8
- package/esm2020/catalog/components/product-variants-editor/product-variants-editor.component.mjs +110 -10
- package/esm2020/catalog/components/product-variants-list/product-variants-list.component.mjs +9 -3
- package/esm2020/catalog/public_api.mjs +1 -2
- package/esm2020/core/app.component.module.mjs +1 -1
- package/esm2020/core/common/base-detail.component.mjs +1 -1
- package/esm2020/core/common/deactivate-aware.mjs +1 -1
- package/esm2020/core/common/generated-types.mjs +30 -1
- package/esm2020/core/common/introspection-result.mjs +9 -1
- package/esm2020/core/common/utilities/configurable-operation-utils.mjs +32 -10
- package/esm2020/core/common/utilities/selection-manager.mjs +64 -0
- package/esm2020/core/common/version.mjs +2 -2
- package/esm2020/core/components/app-shell/app-shell.component.mjs +6 -5
- package/esm2020/core/components/main-nav/main-nav.component.mjs +3 -3
- package/esm2020/core/core.module.mjs +1 -1
- package/esm2020/core/data/definitions/collection-definitions.mjs +18 -1
- package/esm2020/core/data/definitions/order-definitions.mjs +445 -429
- package/esm2020/core/data/definitions/product-definitions.mjs +743 -735
- package/esm2020/core/data/definitions/shared-definitions.mjs +29 -28
- package/esm2020/core/data/providers/collection-data.service.mjs +5 -2
- package/esm2020/core/data/providers/order-data.service.mjs +7 -2
- package/esm2020/core/data/providers/product-data.service.mjs +5 -2
- package/esm2020/core/data/providers/promotion-data.service.mjs +3 -2
- package/esm2020/core/providers/local-storage/local-storage.service.mjs +1 -1
- package/esm2020/core/public_api.mjs +7 -1
- package/esm2020/core/shared/components/address-form/address-form.component.mjs +3 -3
- package/esm2020/core/shared/components/asset-gallery/asset-gallery.component.mjs +33 -50
- package/esm2020/core/shared/components/asset-preview/asset-preview.component.mjs +4 -4
- package/esm2020/core/shared/components/configurable-input/configurable-input.component.mjs +22 -10
- package/esm2020/core/shared/components/custom-field-control/custom-field-control.component.mjs +10 -4
- package/esm2020/core/shared/components/data-table/data-table.component.mjs +10 -3
- package/esm2020/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +7 -3
- package/esm2020/core/shared/components/formatted-address/formatted-address.component.mjs +3 -3
- package/esm2020/core/shared/components/help-tooltip/help-tooltip.component.mjs +2 -2
- package/esm2020/core/shared/components/object-tree/object-tree.component.mjs +4 -4
- package/esm2020/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.mjs +135 -0
- package/esm2020/core/shared/components/product-search-input/product-search-input.component.mjs +108 -0
- package/esm2020/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +2 -2
- package/esm2020/core/shared/components/select-toggle/select-toggle.component.mjs +6 -3
- package/esm2020/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.mjs +45 -0
- package/esm2020/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +12 -3
- package/esm2020/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.mjs +48 -0
- package/esm2020/core/shared/dynamic-form-inputs/register-dynamic-input-components.mjs +5 -1
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.mjs +11 -9
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.mjs +54 -0
- package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.mjs +5 -4
- package/esm2020/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +21 -11
- package/esm2020/core/shared/pipes/custom-field-label.pipe.mjs +7 -19
- package/esm2020/core/shared/shared.module.mjs +25 -5
- package/esm2020/customer/components/customer-group-list/customer-group-list.component.mjs +29 -15
- package/esm2020/dashboard/components/dashboard/dashboard.component.mjs +2 -2
- package/esm2020/dashboard/components/dashboard-widget/dashboard-widget.component.mjs +2 -2
- package/esm2020/dashboard/widgets/order-summary-widget/order-summary-widget.component.mjs +2 -2
- package/esm2020/login/components/login/login.component.mjs +3 -3
- package/esm2020/marketing/components/promotion-detail/promotion-detail.component.mjs +3 -3
- package/esm2020/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +8 -4
- package/esm2020/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +7 -3
- package/esm2020/order/components/fulfillment-detail/fulfillment-detail.component.mjs +8 -17
- package/esm2020/order/components/line-fulfillment/line-fulfillment.component.mjs +7 -21
- package/esm2020/order/components/order-custom-fields-card/order-custom-fields-card.component.mjs +30 -6
- package/esm2020/order/components/order-detail/order-detail.component.mjs +78 -38
- package/esm2020/order/components/order-editor/order-editor.component.mjs +26 -10
- package/esm2020/order/components/order-list/order-list.component.mjs +23 -16
- package/esm2020/order/components/order-payment-card/order-payment-card.component.mjs +2 -2
- package/esm2020/order/components/order-table/order-table.component.mjs +11 -3
- package/esm2020/order/components/refund-order-dialog/refund-order-dialog.component.mjs +8 -4
- package/esm2020/settings/components/payment-method-detail/payment-method-detail.component.mjs +1 -1
- package/esm2020/settings/components/permission-grid/permission-grid.component.mjs +1 -1
- package/esm2020/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +1 -1
- package/fesm2015/vendure-admin-ui-catalog.mjs +396 -187
- package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-core.mjs +3782 -3229
- package/fesm2015/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-customer.mjs +29 -17
- package/fesm2015/vendure-admin-ui-customer.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-dashboard.mjs +5 -5
- package/fesm2015/vendure-admin-ui-dashboard.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-login.mjs +2 -2
- package/fesm2015/vendure-admin-ui-login.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-marketing.mjs +2 -2
- package/fesm2015/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-order.mjs +193 -111
- package/fesm2015/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-settings.mjs +3 -3
- package/fesm2020/vendure-admin-ui-catalog.mjs +387 -189
- package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-core.mjs +3771 -3221
- package/fesm2020/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-customer.mjs +29 -17
- package/fesm2020/vendure-admin-ui-customer.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-dashboard.mjs +5 -5
- package/fesm2020/vendure-admin-ui-dashboard.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-login.mjs +2 -2
- package/fesm2020/vendure-admin-ui-login.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-marketing.mjs +2 -2
- package/fesm2020/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-order.mjs +189 -109
- package/fesm2020/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-settings.mjs +3 -3
- package/order/components/order-custom-fields-card/order-custom-fields-card.component.d.ts +4 -2
- package/order/components/order-editor/order-editor.component.d.ts +8 -2
- package/order/components/order-list/order-list.component.d.ts +1 -0
- package/order/components/order-table/order-table.component.d.ts +1 -0
- package/package.json +2 -2
- package/static/i18n-messages/cs.json +19 -3
- package/static/i18n-messages/de.json +22 -3
- package/static/i18n-messages/en.json +20 -3
- package/static/i18n-messages/es.json +19 -3
- package/static/i18n-messages/fr.json +19 -3
- package/static/i18n-messages/it.json +19 -3
- package/static/i18n-messages/pl.json +19 -3
- package/static/i18n-messages/pt_BR.json +19 -3
- package/static/i18n-messages/pt_PT.json +19 -3
- package/static/i18n-messages/ru.json +19 -3
- package/static/i18n-messages/uk.json +19 -3
- package/static/i18n-messages/zh_Hans.json +19 -3
- package/static/i18n-messages/zh_Hant.json +19 -3
- package/static/styles/_variables.scss +3 -0
- package/static/styles/global/_forms.scss +4 -5
- package/static/styles/global/_overrides.scss +10 -0
- package/static/styles/global/_sass-overrides.scss +3 -0
- package/static/styles/global/_utilities.scss +10 -0
- package/static/styles/styles.scss +1 -0
- package/static/styles/theme/default.scss +13 -1
- package/static/styles/ui-extension-theme.scss +1 -0
- package/static/theme.min.css +1 -1
- package/static/vendure-ui-config.json +25 -10
- package/esm2020/catalog/components/product-search-input/product-search-input.component.mjs +0 -107
|
@@ -16,7 +16,7 @@ export class RelationAssetInputComponent {
|
|
|
16
16
|
this.dataService = dataService;
|
|
17
17
|
}
|
|
18
18
|
ngOnInit() {
|
|
19
|
-
this.asset$ = this.
|
|
19
|
+
this.asset$ = this.formControl.valueChanges.pipe(startWith(this.formControl.value), map(asset => asset?.id), distinctUntilChanged(), switchMap(id => {
|
|
20
20
|
if (id) {
|
|
21
21
|
return this.dataService.product.getAsset(id).mapStream(data => data.asset || undefined);
|
|
22
22
|
}
|
|
@@ -35,14 +35,14 @@ export class RelationAssetInputComponent {
|
|
|
35
35
|
})
|
|
36
36
|
.subscribe(result => {
|
|
37
37
|
if (result && result.length) {
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
38
|
+
this.formControl.setValue(result[0]);
|
|
39
|
+
this.formControl.markAsDirty();
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
remove() {
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
44
|
+
this.formControl.setValue(null);
|
|
45
|
+
this.formControl.markAsDirty();
|
|
46
46
|
}
|
|
47
47
|
previewAsset(asset) {
|
|
48
48
|
this.modalService
|
|
@@ -54,16 +54,18 @@ export class RelationAssetInputComponent {
|
|
|
54
54
|
.subscribe();
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
RelationAssetInputComponent.id = 'asset-form-input';
|
|
57
58
|
RelationAssetInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RelationAssetInputComponent, deps: [{ token: i1.ModalService }, { token: i2.DataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
-
RelationAssetInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: RelationAssetInputComponent, selector: "vdr-relation-asset-input", inputs: { readonly: "readonly",
|
|
59
|
+
RelationAssetInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: RelationAssetInputComponent, selector: "vdr-relation-asset-input", inputs: { readonly: "readonly", formControl: ["parentFormControl", "formControl"], config: "config" }, ngImport: i0, template: "<vdr-relation-card\r\n (select)=\"selectAsset()\"\r\n (remove)=\"remove()\"\r\n placeholderIcon=\"image\"\r\n [entity]=\"asset$ | async\"\r\n [selectLabel]=\"'asset.select-asset' | translate\"\r\n [removable]=\"!config.list\"\r\n [readonly]=\"readonly\"\r\n>\r\n <ng-template vdrRelationCardPreview let-asset=\"entity\">\r\n <img\r\n class=\"preview\"\r\n [title]=\"'asset.preview' | translate\"\r\n [src]=\"asset | assetPreview: 'tiny'\"\r\n (click)=\"previewAsset(asset)\"\r\n />\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-asset=\"entity\">\r\n <div class=\"name\" [title]=\"asset.name\">\r\n {{ asset.name }}\r\n </div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n", styles: [".preview{cursor:pointer}.detail{flex:1;overflow:hidden}.name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], components: [{ type: i3.RelationCardComponent, selector: "vdr-relation-card", inputs: ["entity", "placeholderIcon", "selectLabel", "readonly", "removable"], outputs: ["select", "remove"] }], directives: [{ type: i3.RelationCardPreviewDirective, selector: "[vdrRelationCardPreview]" }, { type: i3.RelationCardDetailDirective, selector: "[vdrRelationCardDetail]" }], pipes: { "async": i4.AsyncPipe, "translate": i5.TranslatePipe, "assetPreview": i6.AssetPreviewPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
59
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RelationAssetInputComponent, decorators: [{
|
|
60
61
|
type: Component,
|
|
61
62
|
args: [{ selector: 'vdr-relation-asset-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-relation-card\r\n (select)=\"selectAsset()\"\r\n (remove)=\"remove()\"\r\n placeholderIcon=\"image\"\r\n [entity]=\"asset$ | async\"\r\n [selectLabel]=\"'asset.select-asset' | translate\"\r\n [removable]=\"!config.list\"\r\n [readonly]=\"readonly\"\r\n>\r\n <ng-template vdrRelationCardPreview let-asset=\"entity\">\r\n <img\r\n class=\"preview\"\r\n [title]=\"'asset.preview' | translate\"\r\n [src]=\"asset | assetPreview: 'tiny'\"\r\n (click)=\"previewAsset(asset)\"\r\n />\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-asset=\"entity\">\r\n <div class=\"name\" [title]=\"asset.name\">\r\n {{ asset.name }}\r\n </div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n", styles: [".preview{cursor:pointer}.detail{flex:1;overflow:hidden}.name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
62
63
|
}], ctorParameters: function () { return [{ type: i1.ModalService }, { type: i2.DataService }]; }, propDecorators: { readonly: [{
|
|
63
64
|
type: Input
|
|
64
|
-
}],
|
|
65
|
-
type: Input
|
|
65
|
+
}], formControl: [{
|
|
66
|
+
type: Input,
|
|
67
|
+
args: ['parentFormControl']
|
|
66
68
|
}], config: [{
|
|
67
69
|
type: Input
|
|
68
70
|
}] } });
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVsYXRpb24tYXNzZXQtaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvZHluYW1pYy1mb3JtLWlucHV0cy9yZWxhdGlvbi1mb3JtLWlucHV0L2Fzc2V0L3JlbGF0aW9uLWFzc2V0LWlucHV0LmN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gICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KSxcclxuICAgICAgICApO1xyXG4gICAgfVxyXG5cclxuICAgIHNlbGVjdEFzc2V0KCkge1xyXG4gICAgICAgIHRoaXMubW9kYWxTZXJ2aWNlXHJcbiAgICAgICAgICAgIC5mcm9tQ29tcG9uZW50KEFzc2V0UGlja2VyRGlhbG9nQ29tcG9uZW50LCB7XHJcbiAgICAgICAgICAgICAgICBzaXplOiAneGwnLFxyXG4gICAgICAgICAgICAgICAgbG9jYWxzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlTZWxlY3Q6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgLnN1YnNjcmliZShyZXN1bHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdCAmJiByZXN1bHQubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtQ29udHJvbC5zZXRWYWx1ZShyZXN1bHRbMF0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybUNvbnRyb2wubWFya0FzRGlydHkoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcmVtb3ZlKCkge1xyXG4gICAgICAgIHRoaXMuZm9ybUNvbnRyb2wuc2V0VmFsdWUobnVsbCk7XHJcbiAgICAgICAgdGhpcy5mb3JtQ29udHJvbC5tYXJrQXNEaXJ0eSgpO1xyXG4gICAgfVxyXG5cclxuICAgIHByZXZpZXdBc3NldChhc3NldDogTm9uTnVsbGFibGU8R2V0QXNzZXRRdWVyeVsnYXNzZXQnXT4pIHtcclxuICAgICAgICB0aGlzLm1vZGFsU2VydmljZVxyXG4gICAgICAgICAgICAuZnJvbUNvbXBvbmVudChBc3NldFByZXZpZXdEaWFsb2dDb21wb25lbnQsIHtcclxuICAgICAgICAgICAgICAgIH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cImFzc2V0Lm5hbWVcIj5cclxuICAgICAgICAgICAge3sgYXNzZXQubmFtZSB9fVxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC9uZy10ZW1wbGF0ZT5cclxuPC92ZHItcmVsYXRpb24tY2FyZD5cclxuIl19
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
|
3
|
+
import { RelationSelectorDialogComponent } from '../relation-selector-dialog/relation-selector-dialog.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../../../providers/modal/modal.service";
|
|
6
|
+
import * as i2 from "../relation-card/relation-card.component";
|
|
7
|
+
import * as i3 from "../../../components/object-tree/object-tree.component";
|
|
8
|
+
import * as i4 from "@clr/angular";
|
|
9
|
+
import * as i5 from "../../../components/form-field/form-field-control.directive";
|
|
10
|
+
import * as i6 from "@angular/forms";
|
|
11
|
+
import * as i7 from "@ngx-translate/core";
|
|
12
|
+
import * as i8 from "@angular/common";
|
|
13
|
+
export class RelationGenericInputComponent {
|
|
14
|
+
constructor(modalService) {
|
|
15
|
+
this.modalService = modalService;
|
|
16
|
+
}
|
|
17
|
+
selectRelationId() {
|
|
18
|
+
this.modalService
|
|
19
|
+
.fromComponent(RelationSelectorDialogComponent, {
|
|
20
|
+
size: 'md',
|
|
21
|
+
closable: true,
|
|
22
|
+
locals: {
|
|
23
|
+
title: _('common.select-relation-id'),
|
|
24
|
+
selectorTemplate: this.template,
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
.subscribe(result => {
|
|
28
|
+
if (result) {
|
|
29
|
+
this.parentFormControl.setValue({ id: result });
|
|
30
|
+
this.parentFormControl.markAsDirty();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
remove() {
|
|
35
|
+
this.parentFormControl.setValue(null);
|
|
36
|
+
this.parentFormControl.markAsDirty();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
RelationGenericInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RelationGenericInputComponent, deps: [{ token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
+
RelationGenericInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: RelationGenericInputComponent, selector: "vdr-relation-generic-input", inputs: { readonly: "readonly", parentFormControl: "parentFormControl", config: "config" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["selector"], descendants: true }], ngImport: i0, template: "<vdr-relation-card\r\n (select)=\"selectRelationId()\"\r\n (remove)=\"remove()\"\r\n placeholderIcon=\"objects\"\r\n [entity]=\"parentFormControl.value\"\r\n [selectLabel]=\"'common.select-relation-id' | translate\"\r\n [removable]=\"!config.list\"\r\n [readonly]=\"readonly\"\r\n>\r\n {{ parentFormControl.value | json }}\r\n <ng-template vdrRelationCardPreview>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"objects\" size=\"50\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-entity=\"entity\">\r\n <div class=\"\">\r\n {{ config.entity }}: <strong>{{ entity.id }}</strong>\r\n </div>\r\n <vdr-object-tree [value]=\"{ properties: parentFormControl.value }\"></vdr-object-tree>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select=\"select\">\r\n <div class=\"id-select-wrapper\">\r\n <clr-input-container>\r\n <input [(ngModel)]=\"relationId\" type=\"text\" clrInput [readonly]=\"readonly\" />\r\n </clr-input-container>\r\n <div>\r\n <button class=\"btn btn-primary m0\" (click)=\"select(relationId)\">\r\n {{ 'common.confirm' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".id-select-wrapper{display:flex;align-items:flex-end}\n"], components: [{ type: i2.RelationCardComponent, selector: "vdr-relation-card", inputs: ["entity", "placeholderIcon", "selectLabel", "readonly", "removable"], outputs: ["select", "remove"] }, { type: i3.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }, { type: i4.ClrInputContainer, selector: "clr-input-container" }], directives: [{ type: i2.RelationCardPreviewDirective, selector: "[vdrRelationCardPreview]" }, { type: i4.ClrIconCustomTag, selector: "clr-icon" }, { type: i2.RelationCardDetailDirective, selector: "[vdrRelationCardDetail]" }, { type: i5.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.ClrInput, selector: "[clrInput]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i7.TranslatePipe, "json": i8.JsonPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RelationGenericInputComponent, decorators: [{
|
|
42
|
+
type: Component,
|
|
43
|
+
args: [{ selector: 'vdr-relation-generic-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-relation-card\r\n (select)=\"selectRelationId()\"\r\n (remove)=\"remove()\"\r\n placeholderIcon=\"objects\"\r\n [entity]=\"parentFormControl.value\"\r\n [selectLabel]=\"'common.select-relation-id' | translate\"\r\n [removable]=\"!config.list\"\r\n [readonly]=\"readonly\"\r\n>\r\n {{ parentFormControl.value | json }}\r\n <ng-template vdrRelationCardPreview>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"objects\" size=\"50\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-entity=\"entity\">\r\n <div class=\"\">\r\n {{ config.entity }}: <strong>{{ entity.id }}</strong>\r\n </div>\r\n <vdr-object-tree [value]=\"{ properties: parentFormControl.value }\"></vdr-object-tree>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select=\"select\">\r\n <div class=\"id-select-wrapper\">\r\n <clr-input-container>\r\n <input [(ngModel)]=\"relationId\" type=\"text\" clrInput [readonly]=\"readonly\" />\r\n </clr-input-container>\r\n <div>\r\n <button class=\"btn btn-primary m0\" (click)=\"select(relationId)\">\r\n {{ 'common.confirm' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".id-select-wrapper{display:flex;align-items:flex-end}\n"] }]
|
|
44
|
+
}], ctorParameters: function () { return [{ type: i1.ModalService }]; }, propDecorators: { readonly: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], parentFormControl: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], config: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], template: [{
|
|
51
|
+
type: ViewChild,
|
|
52
|
+
args: ['selector']
|
|
53
|
+
}] } });
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVsYXRpb24tZ2VuZXJpYy1pbnB1dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9keW5hbWljLWZvcm0taW5wdXRzL3JlbGF0aW9uLWZvcm0taW5wdXQvZ2VuZXJpYy9yZWxhdGlvbi1nZW5lcmljLWlucHV0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29yZS9zcmMvc2hhcmVkL2R5bmFtaWMtZm9ybS1pbnB1dHMvcmVsYXRpb24tZm9ybS1pbnB1dC9nZW5lc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ICAgICAgIHRpdGxlOiBfKCdjb21tb24uc2VsZWN0LXJlbGF0aW9uLWlkJyksXHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3JUZW1wbGF0ZTogdGhpcy50ZW1wbGF0ZSxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgIC5zdWJzY3JpYmUocmVzdWx0ID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhcmVudEZvcm1Db250cm9sLnNldFZhbHVlKHsgaWQ6IHJlc3VsdCB9KTtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhcmVudEZvcm1Db250cm9sLm1hcmtBc0RpcnR5KCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHJlbW92ZSgpIHtcclxuICAgICAgICB0aGlzLnBhcmVudEZvcm1Db250cm9sLnNldFZhbHVlKG51bGwpO1xyXG4gICAgICAgIHRoaXMucGFyZW50Rm9ybUNvbnRyb2wubWFya0FzRGlydHkoKTtcclxuICAgIH1cclxufVxyXG4iLCI8dmRyLXJlbGF0aW9uLWNhcmRcclxuICAgIChzZWxlY3QpPVwic2VsZWN0UmVsYXRpb25JZCgpXCJcclxuICAgIChyZW1vdmUpPVwicmVtb3ZlKClcIlxyXG4gICAgcGxhY2Vob2xkZXJJY29uPVwib2JqZWN0c1wiXHJcbiAgICBbZW50aXR5XT1cInBhcmVudEZvcm1Db250cm9sLnZhbHVlXCJcclxuICAgIFtzZWxlY3RMYWJlbF09XCInY29tbW9uLnNlbGVjdC1yZWxhdGlvbi1pZCcgfCB0cmFuc2xhdGVcIlxyXG4gICAgW3JlbW92YWJsZV09XCIhY29uZmlnLmxpc3RcIlxyXG4gICAgW3JlYWRvbmx5XT1cInJlYWRvbmx5XCJcclxuPlxyXG4gICAge3sgcGFyZW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IDxidXR0b24gY2xhc3M9XCJidG4gYnRuLXByaW1hcnkgbTBcIiAoY2xpY2spPVwic2VsZWN0KHJlbGF0aW9uSWQpXCI+XHJcbiAgICAgICAgICAgICAgICB7eyAnY29tbW9uLmNvbmZpcm0nIHwgdHJhbnNsYXRlIH19XHJcbiAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC9kaXY+XHJcbjwvbmctdGVtcGxhdGU+XHJcbiJdfQ==
|
|
@@ -4,7 +4,8 @@ import * as i1 from "./asset/relation-asset-input.component";
|
|
|
4
4
|
import * as i2 from "./product/relation-product-input.component";
|
|
5
5
|
import * as i3 from "./customer/relation-customer-input.component";
|
|
6
6
|
import * as i4 from "./product-variant/relation-product-variant-input.component";
|
|
7
|
-
import * as i5 from "
|
|
7
|
+
import * as i5 from "./generic/relation-generic-input.component";
|
|
8
|
+
import * as i6 from "@angular/common";
|
|
8
9
|
/**
|
|
9
10
|
* @description
|
|
10
11
|
* The default input component for `relation` type custom fields. Allows the selection
|
|
@@ -18,11 +19,11 @@ export class RelationFormInputComponent {
|
|
|
18
19
|
}
|
|
19
20
|
RelationFormInputComponent.id = 'relation-form-input';
|
|
20
21
|
RelationFormInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RelationFormInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
-
RelationFormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: RelationFormInputComponent, selector: "vdr-relation-form-input", inputs: { readonly: "readonly" }, ngImport: i0, template: "<div [ngSwitch]=\"config.entity\">\r\n <vdr-relation-asset-input\r\n *ngSwitchCase=\"'Asset'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-asset-input>\r\n <vdr-relation-product-input\r\n *ngSwitchCase=\"'Product'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-input>\r\n <vdr-relation-customer-input\r\n *ngSwitchCase=\"'Customer'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-customer-input>\r\n <vdr-relation-product-variant-input\r\n *ngSwitchCase=\"'ProductVariant'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-variant-input>\r\n <ng-template ngSwitchDefault>\r\n
|
|
22
|
+
RelationFormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: RelationFormInputComponent, selector: "vdr-relation-form-input", inputs: { readonly: "readonly" }, ngImport: i0, template: "<div [ngSwitch]=\"config.entity\">\r\n <vdr-relation-asset-input\r\n *ngSwitchCase=\"'Asset'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-asset-input>\r\n <vdr-relation-product-input\r\n *ngSwitchCase=\"'Product'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-input>\r\n <vdr-relation-customer-input\r\n *ngSwitchCase=\"'Customer'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-customer-input>\r\n <vdr-relation-product-variant-input\r\n *ngSwitchCase=\"'ProductVariant'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-variant-input>\r\n <ng-template ngSwitchDefault>\r\n <vdr-relation-generic-input\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-generic-input>\r\n </ng-template>\r\n</div>\r\n", styles: [":host{display:block;background-color:var(--color-component-bg-200);padding:3px}\n"], components: [{ type: i1.RelationAssetInputComponent, selector: "vdr-relation-asset-input", inputs: ["readonly", "parentFormControl", "config"] }, { type: i2.RelationProductInputComponent, selector: "vdr-relation-product-input", inputs: ["readonly", "parentFormControl", "config"] }, { type: i3.RelationCustomerInputComponent, selector: "vdr-relation-customer-input", inputs: ["readonly", "parentFormControl", "config"] }, { type: i4.RelationProductVariantInputComponent, selector: "vdr-relation-product-variant-input", inputs: ["readonly", "parentFormControl", "config"] }, { type: i5.RelationGenericInputComponent, selector: "vdr-relation-generic-input", inputs: ["readonly", "parentFormControl", "config"] }], directives: [{ type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RelationFormInputComponent, decorators: [{
|
|
23
24
|
type: Component,
|
|
24
|
-
args: [{ selector: 'vdr-relation-form-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngSwitch]=\"config.entity\">\r\n <vdr-relation-asset-input\r\n *ngSwitchCase=\"'Asset'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-asset-input>\r\n <vdr-relation-product-input\r\n *ngSwitchCase=\"'Product'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-input>\r\n <vdr-relation-customer-input\r\n *ngSwitchCase=\"'Customer'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-customer-input>\r\n <vdr-relation-product-variant-input\r\n *ngSwitchCase=\"'ProductVariant'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-variant-input>\r\n <ng-template ngSwitchDefault>\r\n
|
|
25
|
+
args: [{ selector: 'vdr-relation-form-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngSwitch]=\"config.entity\">\r\n <vdr-relation-asset-input\r\n *ngSwitchCase=\"'Asset'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-asset-input>\r\n <vdr-relation-product-input\r\n *ngSwitchCase=\"'Product'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-input>\r\n <vdr-relation-customer-input\r\n *ngSwitchCase=\"'Customer'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-customer-input>\r\n <vdr-relation-product-variant-input\r\n *ngSwitchCase=\"'ProductVariant'\"\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-product-variant-input>\r\n <ng-template ngSwitchDefault>\r\n <vdr-relation-generic-input\r\n [parentFormControl]=\"formControl\"\r\n [config]=\"config\"\r\n [readonly]=\"readonly\"\r\n ></vdr-relation-generic-input>\r\n </ng-template>\r\n</div>\r\n", styles: [":host{display:block;background-color:var(--color-component-bg-200);padding:3px}\n"] }]
|
|
25
26
|
}], propDecorators: { readonly: [{
|
|
26
27
|
type: Input
|
|
27
28
|
}] } });
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVsYXRpb24tZm9ybS1pbnB1dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZ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kb25seV09XCJyZWFkb25seVwiXHJcbiAgICA+PC92ZHItcmVsYXRpb24tY3VzdG9tZXItaW5wdXQ+XHJcbiAgICA8dmRyLXJlbGF0aW9uLXByb2R1Y3QtdmFyaWFudC1pbnB1dFxyXG4gICAgICAgICpuZ1N3aXRjaENhc2U9XCInUHJvZHVjdFZhcmlhbnQnXCJcclxuICAgICAgICBbcGFyZW50Rm9ybUNvbnRyb2xdPVwiZm9ybUNvbnRyb2xcIlxyXG4gICAgICAgIFtjb25maWddPVwiY29uZmlnXCJcclxuICAgICAgICBbcmVhZG9ubHldPVwicmVhZG9ubHlcIlxyXG4gICAgPjwvdmRyLXJlbGF0aW9uLXByb2R1Y3QtdmFyaWFudC1pbnB1dD5cclxuICAgIDxuZy10ZW1wbGF0ZSBuZ1N3aXRjaERlZmF1bHQ+XHJcbiAgICAgICAgPHZkci1yZWxhdGlvbi1nZW5lcmljLWlucHV0XHJcbiAgICAgICAgICAgIFtwYXJlbnRGb3JtQ29udHJvbF09XCJmb3JtQ29udHJvbFwiXHJcbiAgICAgICAgICAgICAgIFtjb25maWddPVwiY29uZmlnXCJcclxuICAgICAgICAgICAgICAgW3JlYWRvbmx5XT1cInJlYWRvbmx5XCJcclxuICAgICAgICA+PC92ZHItcmVsYXRpb24tZ2VuZXJpYy1pbnB1dD5cclxuICAgIDwvbmctdGVtcGxhdGU+XHJcbjwvZGl2PlxyXG4iXX0=
|
package/esm2020/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "
|
|
4
|
-
import * as i2 from "
|
|
5
|
-
import * as i3 from "@
|
|
6
|
-
import * as i4 from "
|
|
7
|
-
import * as i5 from "
|
|
8
|
-
import * as i6 from "
|
|
3
|
+
import * as i1 from "../../../data/providers/data.service";
|
|
4
|
+
import * as i2 from "../../components/form-field/form-field-control.directive";
|
|
5
|
+
import * as i3 from "@angular/forms";
|
|
6
|
+
import * as i4 from "@clr/angular";
|
|
7
|
+
import * as i5 from "../../directives/disabled.directive";
|
|
8
|
+
import * as i6 from "@angular/common";
|
|
9
|
+
import * as i7 from "../../pipes/custom-field-label.pipe";
|
|
9
10
|
/**
|
|
10
11
|
* @description
|
|
11
12
|
* Uses a select input to allow the selection of a string value. Should be used with
|
|
@@ -15,17 +16,26 @@ import * as i6 from "../../pipes/custom-field-label.pipe";
|
|
|
15
16
|
* @docsPage default-inputs
|
|
16
17
|
*/
|
|
17
18
|
export class SelectFormInputComponent {
|
|
19
|
+
constructor(dataService) {
|
|
20
|
+
this.dataService = dataService;
|
|
21
|
+
}
|
|
18
22
|
get options() {
|
|
19
23
|
return this.config.ui?.options || this.config.options;
|
|
20
24
|
}
|
|
25
|
+
ngOnInit() {
|
|
26
|
+
this.uiLanguage$ = this.dataService.client.uiState().mapStream(({ uiState }) => uiState.language);
|
|
27
|
+
}
|
|
28
|
+
trackByFn(index, item) {
|
|
29
|
+
return item.value;
|
|
30
|
+
}
|
|
21
31
|
}
|
|
22
32
|
SelectFormInputComponent.id = 'select-form-input';
|
|
23
|
-
SelectFormInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectFormInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
-
SelectFormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SelectFormInputComponent, selector: "vdr-select-form-input", inputs: { readonly: "readonly" }, ngImport: i0, template: "<select clrSelect [formControl]=\"formControl\" [vdrDisabled]=\"readonly\">\r\n <option *ngIf=\"config.nullable\" [ngValue]=\"null\"></option>\r\n <option *ngFor=\"let option of options\" [ngValue]=\"option.value\">\r\n {{ (option | customFieldLabel) || option.label || option.value }}\r\n </option>\r\n</select>\r\n", styles: ["select{width:100%}\n"], directives: [{ type:
|
|
33
|
+
SelectFormInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectFormInputComponent, deps: [{ token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
SelectFormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SelectFormInputComponent, selector: "vdr-select-form-input", inputs: { readonly: "readonly" }, ngImport: i0, template: "<select clrSelect [formControl]=\"formControl\" [vdrDisabled]=\"readonly\">\r\n <option *ngIf=\"config.nullable\" [ngValue]=\"null\"></option>\r\n <option *ngFor=\"let option of options;trackBy:trackByFn\" [ngValue]=\"option.value\">\r\n {{ (option | customFieldLabel:(uiLanguage$ | async)) || option.label || option.value }}\r\n </option>\r\n</select>\r\n", styles: ["select{width:100%}\n"], directives: [{ type: i2.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i4.ClrSelect, selector: "[clrSelect]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5.DisabledDirective, selector: "[vdrDisabled]", inputs: ["vdrDisabled"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.ClrDatagridItemsTrackBy, selector: "[ngForTrackBy]", inputs: ["ngForTrackBy"] }], pipes: { "customFieldLabel": i7.CustomFieldLabelPipe, "async": i6.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectFormInputComponent, decorators: [{
|
|
26
36
|
type: Component,
|
|
27
|
-
args: [{ selector: 'vdr-select-form-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<select clrSelect [formControl]=\"formControl\" [vdrDisabled]=\"readonly\">\r\n <option *ngIf=\"config.nullable\" [ngValue]=\"null\"></option>\r\n <option *ngFor=\"let option of options\" [ngValue]=\"option.value\">\r\n {{ (option | customFieldLabel) || option.label || option.value }}\r\n </option>\r\n</select>\r\n", styles: ["select{width:100%}\n"] }]
|
|
28
|
-
}], propDecorators: { readonly: [{
|
|
37
|
+
args: [{ selector: 'vdr-select-form-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<select clrSelect [formControl]=\"formControl\" [vdrDisabled]=\"readonly\">\r\n <option *ngIf=\"config.nullable\" [ngValue]=\"null\"></option>\r\n <option *ngFor=\"let option of options;trackBy:trackByFn\" [ngValue]=\"option.value\">\r\n {{ (option | customFieldLabel:(uiLanguage$ | async)) || option.label || option.value }}\r\n </option>\r\n</select>\r\n", styles: ["select{width:100%}\n"] }]
|
|
38
|
+
}], ctorParameters: function () { return [{ type: i1.DataService }]; }, propDecorators: { readonly: [{
|
|
29
39
|
type: Input
|
|
30
40
|
}] } });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LWZvcm0taW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvZHluYW1pYy1mb3JtLWlucHV0cy9zZWxlY3QtZm9ybS1pbnB1dC9zZWxlY3QtZm9ybS1pbnB1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wU3RyZWFtKCh7IHVpU3RhdGUgfSkgPT4gdWlTdGF0ZS5sYW5ndWFnZSk7XG4gICAgfVxuXG4gICAgdHJhY2tCeUZuKGluZGV4OiBudW1iZXIsIGl0ZW06IGFueSkge1xuICAgICAgICByZXR1cm4gaXRlbS52YWx1ZTtcbiAgICB9XG59XG4iLCI8c2VsZWN0IGNsclNlbGVjdCBbZm9ybUNvbnRyb2xdPVwiZm9ybUNvbnRyb2xcIiBbdmRyRGlzYWJsZWRdPVwicmVhZG9ubHlcIj5cclxuICAgIDxvcHRpb24gKm5nSWY9XCJjb25maWcubnVsbGFibGVcIiBbbmdWYWx1ZV09XCJudWxsXCI+PC9vcHRpb24+XHJcbiAgICA8b3B0aW9uICpuZ0Zvcj1cImxldCBvcHRpb24gb2Ygb3B0aW9uczt0cmFja0J5OnRyYWNrQnlGblwiIFtuZ1ZhbHVlXT1cIm9wdGlvbi52YWx1ZVwiPlxyXG4gICAgICAgIHt7IChvcHRpb24gfCBjdXN0b21GaWVsZExhYmVsOih1aUxhbmd1YWdlJCB8IGFzeW5jKSkgfHwgb3B0aW9uLmxhYmVsIHx8IG9wdGlvbi52YWx1ZSB9fVxyXG4gICAgPC9vcHRpb24+XHJcbjwvc2VsZWN0PlxyXG4iXX0=
|
|
@@ -1,47 +1,35 @@
|
|
|
1
1
|
import { Pipe } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "../../data/providers/data.service";
|
|
4
3
|
/**
|
|
5
4
|
* Displays a localized label for a CustomField or StringFieldOption, falling back to the
|
|
6
5
|
* name/value if none are defined.
|
|
7
6
|
*/
|
|
8
7
|
export class CustomFieldLabelPipe {
|
|
9
|
-
|
|
10
|
-
this.dataService = dataService;
|
|
11
|
-
this.subscription = dataService.client.uiState().stream$.subscribe(val => {
|
|
12
|
-
this.uiLanguageCode = val.uiState.language;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
transform(value) {
|
|
8
|
+
transform(value, uiLanguageCode) {
|
|
16
9
|
if (!value) {
|
|
17
10
|
return value;
|
|
18
11
|
}
|
|
19
12
|
const { label } = value;
|
|
20
13
|
const name = this.isCustomFieldConfig(value) ? value.name : value.value;
|
|
21
14
|
if (label) {
|
|
22
|
-
const match = label.find(l => l.languageCode ===
|
|
15
|
+
const match = label.find(l => l.languageCode === uiLanguageCode);
|
|
23
16
|
return match ? match.value : label[0].value;
|
|
24
17
|
}
|
|
25
18
|
else {
|
|
26
19
|
return name;
|
|
27
20
|
}
|
|
28
21
|
}
|
|
29
|
-
ngOnDestroy() {
|
|
30
|
-
if (this.subscription) {
|
|
31
|
-
this.subscription.unsubscribe();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
22
|
isCustomFieldConfig(input) {
|
|
35
23
|
return input.hasOwnProperty('name');
|
|
36
24
|
}
|
|
37
25
|
}
|
|
38
|
-
CustomFieldLabelPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CustomFieldLabelPipe, deps: [
|
|
39
|
-
CustomFieldLabelPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CustomFieldLabelPipe, name: "customFieldLabel"
|
|
26
|
+
CustomFieldLabelPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CustomFieldLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
27
|
+
CustomFieldLabelPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CustomFieldLabelPipe, name: "customFieldLabel" });
|
|
40
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CustomFieldLabelPipe, decorators: [{
|
|
41
29
|
type: Pipe,
|
|
42
30
|
args: [{
|
|
43
31
|
name: 'customFieldLabel',
|
|
44
|
-
pure:
|
|
32
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