@vendure/admin-ui 3.1.0-next.0 → 3.1.0-next.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/catalog/components/product-list/product-list.component.d.ts +1 -1
- package/catalog/components/product-variant-list/product-variant-list.component.d.ts +1 -1
- package/core/common/version.d.ts +1 -1
- package/esm2022/catalog/components/product-detail/product-detail.component.mjs +12 -15
- package/esm2022/catalog/components/product-variant-detail/product-variant-detail.component.mjs +15 -14
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/order/components/coupon-code-selector/coupon-code-selector.component.mjs +6 -3
- package/esm2022/order/components/order-detail/order-detail.component.mjs +3 -3
- package/fesm2022/vendure-admin-ui-catalog.mjs +25 -27
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +7 -4
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/order/components/coupon-code-selector/coupon-code-selector.component.d.ts +1 -0
- package/package.json +23 -23
|
@@ -3617,23 +3617,18 @@ class ProductDetailComponent extends TypedBaseDetailComponent {
|
|
|
3617
3617
|
selectProductFacetValue() {
|
|
3618
3618
|
this.displayFacetValueModal().subscribe(facetValueIds => {
|
|
3619
3619
|
if (facetValueIds) {
|
|
3620
|
-
const
|
|
3621
|
-
const currentFacetValueIds =
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
});
|
|
3625
|
-
productGroup.markAsDirty();
|
|
3626
|
-
this.changeDetector.markForCheck();
|
|
3620
|
+
const facetValueIdsControl = this.detailForm.controls.facetValueIds;
|
|
3621
|
+
const currentFacetValueIds = facetValueIdsControl.value ?? [];
|
|
3622
|
+
facetValueIdsControl.setValue(unique([...currentFacetValueIds, ...facetValueIds]));
|
|
3623
|
+
facetValueIdsControl.markAsDirty();
|
|
3627
3624
|
}
|
|
3628
3625
|
});
|
|
3629
3626
|
}
|
|
3630
3627
|
removeProductFacetValue(facetValueId) {
|
|
3631
|
-
const
|
|
3632
|
-
const currentFacetValueIds =
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
});
|
|
3636
|
-
productGroup.markAsDirty();
|
|
3628
|
+
const facetValueIdsControl = this.detailForm.controls.facetValueIds;
|
|
3629
|
+
const currentFacetValueIds = facetValueIdsControl.value ?? [];
|
|
3630
|
+
facetValueIdsControl.setValue(currentFacetValueIds.filter(id => id !== facetValueId));
|
|
3631
|
+
facetValueIdsControl.markAsDirty();
|
|
3637
3632
|
}
|
|
3638
3633
|
displayFacetValueModal() {
|
|
3639
3634
|
return this.modalService
|
|
@@ -3752,7 +3747,9 @@ class ProductDetailComponent extends TypedBaseDetailComponent {
|
|
|
3752
3747
|
...updatedProduct,
|
|
3753
3748
|
assetIds: this.assetChanges.assets?.map(a => a.id),
|
|
3754
3749
|
featuredAssetId: this.assetChanges.featuredAsset?.id,
|
|
3755
|
-
facetValueIds: productFormGroup.
|
|
3750
|
+
facetValueIds: productFormGroup.controls.facetValueIds.dirty
|
|
3751
|
+
? productFormGroup.value.facetValueIds
|
|
3752
|
+
: undefined,
|
|
3756
3753
|
};
|
|
3757
3754
|
}
|
|
3758
3755
|
/**
|
|
@@ -4337,21 +4334,18 @@ class ProductVariantDetailComponent extends TypedBaseDetailComponent {
|
|
|
4337
4334
|
return translation.name;
|
|
4338
4335
|
}
|
|
4339
4336
|
removeFacetValue(facetValueId) {
|
|
4340
|
-
const
|
|
4341
|
-
const currentFacetValueIds =
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
});
|
|
4345
|
-
productGroup.markAsDirty();
|
|
4337
|
+
const facetValueIdsControl = this.detailForm.controls.facetValueIds;
|
|
4338
|
+
const currentFacetValueIds = facetValueIdsControl.value ?? [];
|
|
4339
|
+
facetValueIdsControl.setValue(currentFacetValueIds.filter(id => id !== facetValueId));
|
|
4340
|
+
facetValueIdsControl.markAsDirty();
|
|
4346
4341
|
}
|
|
4347
4342
|
selectFacetValue() {
|
|
4348
4343
|
this.displayFacetValueModal().subscribe(facetValueIds => {
|
|
4349
4344
|
if (facetValueIds) {
|
|
4350
|
-
const
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
this.detailForm.markAsDirty();
|
|
4345
|
+
const facetValueIdsControl = this.detailForm.controls.facetValueIds;
|
|
4346
|
+
const currentFacetValueIds = facetValueIdsControl.value ?? [];
|
|
4347
|
+
facetValueIdsControl.setValue(unique([...currentFacetValueIds, ...facetValueIds]));
|
|
4348
|
+
facetValueIdsControl.markAsDirty();
|
|
4355
4349
|
}
|
|
4356
4350
|
});
|
|
4357
4351
|
}
|
|
@@ -4418,8 +4412,12 @@ class ProductVariantDetailComponent extends TypedBaseDetailComponent {
|
|
|
4418
4412
|
...updatedProduct,
|
|
4419
4413
|
assetIds: this.assetChanges.assets?.map(a => a.id),
|
|
4420
4414
|
featuredAssetId: this.assetChanges.featuredAsset?.id,
|
|
4421
|
-
facetValueIds: variantFormGroup.
|
|
4422
|
-
|
|
4415
|
+
facetValueIds: variantFormGroup.controls.facetValueIds.dirty
|
|
4416
|
+
? variantFormGroup.value.facetValueIds
|
|
4417
|
+
: undefined,
|
|
4418
|
+
taxCategoryId: variantFormGroup.controls.taxCategoryId.dirty
|
|
4419
|
+
? variantFormGroup.value.taxCategoryId
|
|
4420
|
+
: undefined,
|
|
4423
4421
|
};
|
|
4424
4422
|
}
|
|
4425
4423
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ProductVariantDetailComponent, deps: [{ token: ProductDetailService }, { token: i2.FormBuilder }, { token: i1.ModalService }, { token: i1.NotificationService }, { token: i1.DataService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|