@vendure/admin-ui 1.6.3 → 1.6.4
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-core.umd.js +18 -5
- package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-order.umd.js +38 -18
- package/bundles/vendure-admin-ui-order.umd.js.map +1 -1
- package/core/common/generated-types.d.ts +2 -0
- package/core/common/version.d.ts +1 -1
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +2 -1
- package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +2 -0
- package/core/vendure-admin-ui-core.metadata.json +1 -1
- package/esm2015/core/common/generated-types.js +1 -1
- package/esm2015/core/common/introspection-result.js +1 -1
- package/esm2015/core/common/utilities/configurable-operation-utils.js +3 -3
- package/esm2015/core/common/version.js +2 -2
- package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +5 -2
- package/esm2015/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.js +11 -2
- package/esm2015/order/components/order-detail/order-detail.component.js +31 -19
- package/esm2015/order/components/order-table/order-table.component.js +10 -2
- package/fesm2015/vendure-admin-ui-core.js +17 -5
- package/fesm2015/vendure-admin-ui-core.js.map +1 -1
- package/fesm2015/vendure-admin-ui-order.js +39 -19
- package/fesm2015/vendure-admin-ui-order.js.map +1 -1
- package/order/components/order-table/order-table.component.d.ts +1 -0
- package/order/vendure-admin-ui-order.metadata.json +1 -1
- package/package.json +2 -2
|
@@ -52,11 +52,19 @@ export class OrderTableComponent {
|
|
|
52
52
|
return promotion.couponCode || undefined;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
getShippingNames(order) {
|
|
56
|
+
if (order.shippingLines.length) {
|
|
57
|
+
return order.shippingLines.map(shippingLine => shippingLine.shippingMethod.name).join(', ');
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
55
63
|
}
|
|
56
64
|
OrderTableComponent.decorators = [
|
|
57
65
|
{ type: Component, args: [{
|
|
58
66
|
selector: 'vdr-order-table',
|
|
59
|
-
template: "<table class=\"order-table table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let line of order.lines\">\r\n <tr class=\"order-line\" [class.is-cancelled]=\"line.quantity === 0\">\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle unit-price\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.quantity }}\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment [line]=\"line\" [orderState]=\"order.state\"></vdr-line-fulfillment>\r\n </td>\r\n <td class=\"align-middle total\">\r\n {{ line.linePriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.linePrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n\r\n <ng-container *ngIf=\"getLineDiscounts(line) as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n {{ 'order.promotions-applied' | translate }}\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n <a class=\"promotion-name\" [routerLink]=\"getPromotionLink(discount)\">{{\r\n discount.description\r\n }}</a>\r\n <div class=\"promotion-amount\">\r\n {{ discount.amountWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency: order.currencyCode }}\r\n </div>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"customFieldsForLine[line.id] as customFields\">\r\n <tr *ngIf=\"customFields.length\">\r\n <td colspan=\"6\" class=\"custom-fields-row\">\r\n <div class=\"order-line-custom-fields\">\r\n <div class=\"custom-field\" *ngFor=\"let field of customFields\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [readonly]=\"true\"\r\n [customField]=\"field.config\"\r\n [customFieldsFormGroup]=\"field.formGroup\"\r\n ></vdr-custom-field-control>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\r\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\" colspan=\"2\"></td>\r\n <td class=\"align-middle total\">\r\n {{ surcharge.priceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surcharge.price | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <ng-container *ngFor=\"let discount of order.discounts\">\r\n <tr class=\"order-adjustment\" *ngIf=\"discount.type !== 'OTHER'\">\r\n <td colspan=\"5\" class=\"left clr-align-middle\">\r\n <a [routerLink]=\"getPromotionLink(discount)\">{{ discount.description }}</a>\r\n <vdr-chip *ngIf=\"getCouponCodeForAdjustment(order, discount) as couponCode\">{{\r\n couponCode\r\n }}</vdr-chip>\r\n </td>\r\n <td class=\"clr-align-middle\">\r\n {{ discount.amountWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"sub-total\">\r\n <td class=\"left clr-align-middle\">{{ 'order.sub-total' | translate }}</td>\r\n <td colspan=\"4\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.subTotalWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.subTotal | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr class=\"shipping\">\r\n <td class=\"left clr-align-middle\">{{ 'order.shipping' | translate }}</td>\r\n <td class=\"clr-align-middle\">{{ order
|
|
67
|
+
template: "<table class=\"order-table table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'order.product-name' | translate }}</th>\r\n <th>{{ 'order.product-sku' | translate }}</th>\r\n <th>{{ 'order.unit-price' | translate }}</th>\r\n <th>{{ 'order.quantity' | translate }}</th>\r\n <th>{{ 'order.total' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let line of order.lines\">\r\n <tr class=\"order-line\" [class.is-cancelled]=\"line.quantity === 0\">\r\n <td class=\"align-middle thumb\">\r\n <img *ngIf=\"line.featuredAsset\" [src]=\"line.featuredAsset | assetPreview: 'tiny'\" />\r\n </td>\r\n <td class=\"align-middle name\">{{ line.productVariant.name }}</td>\r\n <td class=\"align-middle sku\">{{ line.productVariant.sku }}</td>\r\n <td class=\"align-middle unit-price\">\r\n {{ line.unitPriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.unitPrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n <td class=\"align-middle quantity\">\r\n {{ line.quantity }}\r\n <vdr-line-refunds [line]=\"line\" [payments]=\"order.payments\"></vdr-line-refunds>\r\n <vdr-line-fulfillment [line]=\"line\" [orderState]=\"order.state\"></vdr-line-fulfillment>\r\n </td>\r\n <td class=\"align-middle total\">\r\n {{ line.linePriceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ line.linePrice | localeCurrency: order.currencyCode }}\r\n </div>\r\n\r\n <ng-container *ngIf=\"getLineDiscounts(line) as discounts\">\r\n <vdr-dropdown *ngIf=\"discounts.length\">\r\n <div class=\"promotions-label\" vdrDropdownTrigger>\r\n {{ 'order.promotions-applied' | translate }}\r\n </div>\r\n <vdr-dropdown-menu>\r\n <div class=\"line-promotion\" *ngFor=\"let discount of discounts\">\r\n <a class=\"promotion-name\" [routerLink]=\"getPromotionLink(discount)\">{{\r\n discount.description\r\n }}</a>\r\n <div class=\"promotion-amount\">\r\n {{ discount.amountWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency: order.currencyCode }}\r\n </div>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"customFieldsForLine[line.id] as customFields\">\r\n <tr *ngIf=\"customFields.length\">\r\n <td colspan=\"6\" class=\"custom-fields-row\">\r\n <div class=\"order-line-custom-fields\">\r\n <div class=\"custom-field\" *ngFor=\"let field of customFields\">\r\n <vdr-custom-field-control\r\n [compact]=\"true\"\r\n [readonly]=\"true\"\r\n [customField]=\"field.config\"\r\n [customFieldsFormGroup]=\"field.formGroup\"\r\n ></vdr-custom-field-control>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n <tr class=\"surcharge\" *ngFor=\"let surcharge of order.surcharges\">\r\n <td class=\"align-middle name left\" colspan=\"2\">{{ surcharge.description }}</td>\r\n <td class=\"align-middle sku\">{{ surcharge.sku }}</td>\r\n <td class=\"align-middle\" colspan=\"2\"></td>\r\n <td class=\"align-middle total\">\r\n {{ surcharge.priceWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ surcharge.price | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <ng-container *ngFor=\"let discount of order.discounts\">\r\n <tr class=\"order-adjustment\" *ngIf=\"discount.type !== 'OTHER'\">\r\n <td colspan=\"5\" class=\"left clr-align-middle\">\r\n <a [routerLink]=\"getPromotionLink(discount)\">{{ discount.description }}</a>\r\n <vdr-chip *ngIf=\"getCouponCodeForAdjustment(order, discount) as couponCode\">{{\r\n couponCode\r\n }}</vdr-chip>\r\n </td>\r\n <td class=\"clr-align-middle\">\r\n {{ discount.amountWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ discount.amount | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr class=\"sub-total\">\r\n <td class=\"left clr-align-middle\">{{ 'order.sub-total' | translate }}</td>\r\n <td colspan=\"4\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.subTotalWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.subTotal | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr class=\"shipping\">\r\n <td class=\"left clr-align-middle\">{{ 'order.shipping' | translate }}</td>\r\n <td class=\"clr-align-middle\">{{ getShippingNames(order) }}</td>\r\n <td colspan=\"3\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.shippingWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.shipping | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n <tr class=\"total\">\r\n <td class=\"left clr-align-middle\">{{ 'order.total' | translate }}</td>\r\n <td colspan=\"4\"></td>\r\n <td class=\"clr-align-middle\">\r\n {{ order.totalWithTax | localeCurrency: order.currencyCode }}\r\n <div class=\"net-price\" [title]=\"'order.net-price' | translate\">\r\n {{ order.total | localeCurrency: order.currencyCode }}\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n</table>\r\n",
|
|
60
68
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
61
69
|
styles: [".order-table .is-cancelled td{text-decoration:line-through;background-color:var(--color-component-bg-200)}.order-table .sub-total td{border-top:1px dashed var(--color-component-border-200)}.order-table .total td{font-weight:bold;border-top:1px dashed var(--color-component-border-200)}.order-table td.custom-fields-row{border-top-style:dashed;border-top-color:var(--color-grey-200)}.order-table .order-line-custom-fields{display:flex;flex-wrap:wrap}.order-table .order-line-custom-fields .custom-field{text-align:start;max-width:200px;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;margin-right:18px}.order-table .order-line-custom-field{background-color:var(--color-component-bg-100)}.order-table .order-line-custom-field .custom-field-ellipsis{color:var(--color-text-300)}.order-table .net-price{font-size:11px;color:var(--color-text-300)}.order-table .promotions-label{-webkit-text-decoration:underline dotted var(--color-text-200);text-decoration:underline dotted var(--color-text-200);font-size:11px;margin-top:6px;cursor:pointer;text-transform:lowercase}.order-table .thumb img{width:50px;height:50px}::ng-deep .line-promotion{display:flex;justify-content:space-between;padding:6px 12px}::ng-deep .line-promotion .promotion-amount{margin-left:12px}::ng-deep .line-promotion .net-price{font-size:11px;color:var(--color-text-300)}\n"]
|
|
62
70
|
},] }
|
|
@@ -65,4 +73,4 @@ OrderTableComponent.propDecorators = {
|
|
|
65
73
|
order: [{ type: Input }],
|
|
66
74
|
orderLineCustomFields: [{ type: Input }]
|
|
67
75
|
};
|
|
68
|
-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pO1xuICAgIH1cblxuICAgIHByaXZhdGUgZ2V0TGluZUN1c3RvbUZpZWxkcygpIHtcbiAgICAgICAgZm9yIChjb25zdCBsaW5lIG9mIHRoaXMub3JkZXIubGluZXMpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvcm1Hcm91cCA9IG5ldyBGb3JtR3JvdXAoe30pO1xuICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5vcmRlckxpbmVDdXN0b21GaWVsZHNcbiAgICAgICAgICAgICAgICAubWFwKGNvbmZpZyA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gKGxpbmUgYXMgYW55KS5jdXN0b21GaWVsZHNbY29uZmlnLm5hbWVdO1xuICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXAuYWRkQ29udHJvbChjb25maWcubmFtZSwgbmV3IEZvcm1Db250cm9sKHZhbHVlKSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXAsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoZmllbGQgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5vcmRlckxpbmVDdXN0b21GaWVsZHNWaXNpYmxlID8gdHJ1ZSA6IGZpZWxkLnZhbHVlICE9IG51bGw7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB0aGlzLmN1c3RvbUZpZWxkc0ZvckxpbmVbbGluZS5pZF0gPSByZXN1bHQ7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRQcm9tb3Rpb25MaW5rKHByb21vdGlvbjogT3JkZXJEZXRhaWwuRGlzY291bnRzKTogYW55W10ge1xuICAgICAgICBjb25zdCBpZCA9IHByb21vdGlvbi5hZGp1c3RtZW50U291cmNlLnNwbGl0KCc6JylbMV07XG4gICAgICAgIHJldHVybiBbJy9tYXJrZXRpbmcnLCAncHJvbW90aW9ucycsIGlkXTtcbiAgICB9XG5cbiAgICBnZXRDb3Vwb25Db2RlRm9yQWRqdXN0bWVudChcbiAgICAgICAgb3JkZXI6IE9yZGVyRGV0YWlsLkZyYWdtZW50LFxuICAgICAgICBwcm9tb3Rpb25BZGp1c3RtZW50OiBPcmRlckRldGFpbC5EaXNjb3VudHMsXG4gICAgKTogc3RyaW5nIHwgdW5kZWZpbmVkIHtcbiAgICAgICAgY29uc3QgaWQgPSBwcm9tb3Rpb25BZGp1c3RtZW50LmFkanVzdG1lbnRTb3VyY2Uuc3BsaXQoJzonKVsxXTtcbiAgICAgICAgY29uc3QgcHJvbW90aW9uID0gb3JkZXIucHJvbW90aW9ucy5maW5kKHAgPT4gcC5pZCA9PT0gaWQpO1xuICAgICAgICBpZiAocHJvbW90aW9uKSB7XG4gICAgICAgICAgICByZXR1cm4gcHJvbW90aW9uLmNvdXBvbkNvZGUgfHwgdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0U2hpcHBpbmdOYW1lcyhvcmRlcjogT3JkZXJEZXRhaWwuRnJhZ21lbnQpIHtcbiAgICAgICAgaWYgKG9yZGVyLnNoaXBwaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gb3JkZXIuc2hpcHBpbmdMaW5lcy5tYXAoc2hpcHBpbmdMaW5lID0+IHNoaXBwaW5nTGluZS5zaGlwcGluZ01ldGhvZC5uYW1lKS5qb2luKCcsICcpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -8569,7 +8569,7 @@ JsonEditorFormInputComponent.propDecorators = {
|
|
|
8569
8569
|
*/
|
|
8570
8570
|
function getConfigArgValue(value) {
|
|
8571
8571
|
try {
|
|
8572
|
-
return value ? JSON.parse(value) : undefined;
|
|
8572
|
+
return value != null ? JSON.parse(value) : undefined;
|
|
8573
8573
|
}
|
|
8574
8574
|
catch (e) {
|
|
8575
8575
|
return value;
|
|
@@ -8639,7 +8639,7 @@ function getDefaultConfigArgValue(arg) {
|
|
|
8639
8639
|
if (arg.list) {
|
|
8640
8640
|
return [];
|
|
8641
8641
|
}
|
|
8642
|
-
if (arg.defaultValue) {
|
|
8642
|
+
if (arg.defaultValue != null) {
|
|
8643
8643
|
return arg.defaultValue;
|
|
8644
8644
|
}
|
|
8645
8645
|
const type = arg.type;
|
|
@@ -8975,6 +8975,15 @@ class FacetValueFormInputComponent {
|
|
|
8975
8975
|
constructor(dataService) {
|
|
8976
8976
|
this.dataService = dataService;
|
|
8977
8977
|
this.isListInput = true;
|
|
8978
|
+
this.valueTransformFn = (values) => {
|
|
8979
|
+
const isUsedInConfigArg = this.config.__typename === 'ConfigArgDefinition';
|
|
8980
|
+
if (isUsedInConfigArg) {
|
|
8981
|
+
return JSON.stringify(values.map(s => s.id));
|
|
8982
|
+
}
|
|
8983
|
+
else {
|
|
8984
|
+
return values;
|
|
8985
|
+
}
|
|
8986
|
+
};
|
|
8978
8987
|
}
|
|
8979
8988
|
ngOnInit() {
|
|
8980
8989
|
this.facets$ = this.dataService.facet
|
|
@@ -8987,7 +8996,7 @@ FacetValueFormInputComponent.id = 'facet-value-form-input';
|
|
|
8987
8996
|
FacetValueFormInputComponent.decorators = [
|
|
8988
8997
|
{ type: Component, args: [{
|
|
8989
8998
|
selector: 'vdr-facet-value-form-input',
|
|
8990
|
-
template: "<vdr-facet-value-selector\r\n *ngIf=\"facets$ | async as facets\"\r\n [readonly]=\"readonly\"\r\n [facets]=\"facets\"\r\n [formControl]=\"formControl\"\r\n></vdr-facet-value-selector>\r\n",
|
|
8999
|
+
template: "<vdr-facet-value-selector\r\n *ngIf=\"facets$ | async as facets\"\r\n [readonly]=\"readonly\"\r\n [facets]=\"facets\"\r\n [formControl]=\"formControl\"\r\n [transformControlValueAccessorValue]=\"valueTransformFn\"\r\n></vdr-facet-value-selector>\r\n",
|
|
8991
9000
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8992
9001
|
styles: [""]
|
|
8993
9002
|
},] }
|
|
@@ -12010,6 +12019,7 @@ class FacetValueSelectorComponent {
|
|
|
12010
12019
|
this.dataService = dataService;
|
|
12011
12020
|
this.selectedValuesChange = new EventEmitter();
|
|
12012
12021
|
this.readonly = false;
|
|
12022
|
+
this.transformControlValueAccessorValue = value => value;
|
|
12013
12023
|
this.facetValues = [];
|
|
12014
12024
|
this.disabled = false;
|
|
12015
12025
|
this.toSelectorItem = (facetValue) => {
|
|
@@ -12030,7 +12040,8 @@ class FacetValueSelectorComponent {
|
|
|
12030
12040
|
}
|
|
12031
12041
|
this.selectedValuesChange.emit(selected.map(s => s.value));
|
|
12032
12042
|
if (this.onChangeFn) {
|
|
12033
|
-
this.
|
|
12043
|
+
const transformedValue = this.transformControlValueAccessorValue(selected);
|
|
12044
|
+
this.onChangeFn(transformedValue);
|
|
12034
12045
|
}
|
|
12035
12046
|
}
|
|
12036
12047
|
registerOnChange(fn) {
|
|
@@ -12089,6 +12100,7 @@ FacetValueSelectorComponent.propDecorators = {
|
|
|
12089
12100
|
selectedValuesChange: [{ type: Output }],
|
|
12090
12101
|
facets: [{ type: Input }],
|
|
12091
12102
|
readonly: [{ type: Input }],
|
|
12103
|
+
transformControlValueAccessorValue: [{ type: Input }],
|
|
12092
12104
|
ngSelect: [{ type: ViewChild, args: [NgSelectComponent,] }]
|
|
12093
12105
|
};
|
|
12094
12106
|
|
|
@@ -16059,7 +16071,7 @@ function patchObject(obj, patch) {
|
|
|
16059
16071
|
}
|
|
16060
16072
|
|
|
16061
16073
|
// Auto-generated by the set-version.js script.
|
|
16062
|
-
const ADMIN_UI_VERSION = '1.6.
|
|
16074
|
+
const ADMIN_UI_VERSION = '1.6.4';
|
|
16063
16075
|
|
|
16064
16076
|
/**
|
|
16065
16077
|
* Responsible for registering dashboard widget components and querying for layouts.
|