@wix/headless-stores 0.0.103 → 0.0.104
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.
|
@@ -412,14 +412,14 @@ export const ProductListService = implementService.withConfig()(ProductsListServ
|
|
|
412
412
|
};
|
|
413
413
|
});
|
|
414
414
|
function getMinPrice(aggregationData) {
|
|
415
|
-
const minPriceAggregation = aggregationData
|
|
415
|
+
const minPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.minValue.amount');
|
|
416
416
|
if (minPriceAggregation?.scalar?.value) {
|
|
417
417
|
return Number(minPriceAggregation.scalar.value) || 0;
|
|
418
418
|
}
|
|
419
419
|
return 0;
|
|
420
420
|
}
|
|
421
421
|
function getMaxPrice(aggregationData) {
|
|
422
|
-
const maxPriceAggregation = aggregationData
|
|
422
|
+
const maxPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.maxValue.amount');
|
|
423
423
|
if (maxPriceAggregation?.scalar?.value) {
|
|
424
424
|
return Number(maxPriceAggregation.scalar.value) || 0;
|
|
425
425
|
}
|
|
@@ -412,14 +412,14 @@ export const ProductListService = implementService.withConfig()(ProductsListServ
|
|
|
412
412
|
};
|
|
413
413
|
});
|
|
414
414
|
function getMinPrice(aggregationData) {
|
|
415
|
-
const minPriceAggregation = aggregationData
|
|
415
|
+
const minPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.minValue.amount');
|
|
416
416
|
if (minPriceAggregation?.scalar?.value) {
|
|
417
417
|
return Number(minPriceAggregation.scalar.value) || 0;
|
|
418
418
|
}
|
|
419
419
|
return 0;
|
|
420
420
|
}
|
|
421
421
|
function getMaxPrice(aggregationData) {
|
|
422
|
-
const maxPriceAggregation = aggregationData
|
|
422
|
+
const maxPriceAggregation = aggregationData?.find((data) => data.fieldPath === 'actualPriceRange.maxValue.amount');
|
|
423
423
|
if (maxPriceAggregation?.scalar?.value) {
|
|
424
424
|
return Number(maxPriceAggregation.scalar.value) || 0;
|
|
425
425
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-stores",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.104",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"groupId": "com.wixpress.headless-components"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
|
-
"falconPackageHash": "
|
|
89
|
+
"falconPackageHash": "06c8b114cd10bf81e0aac903d34ccd77aaab45f2c0ae2e5977402e8a"
|
|
90
90
|
}
|