@ikas/storefront 0.0.116 → 0.0.117

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/build/index.es.js CHANGED
@@ -25842,7 +25842,9 @@ function simpleToProduct(simple) {
25842
25842
  ? p.priceListId === IkasStorefrontConfig.priceListId
25843
25843
  : p.priceListId === null;
25844
25844
  })),
25845
- stock: v.stocks.length ? v.stocks[0].stockCount : 0,
25845
+ stock: v.stocks
25846
+ .filter(function (s) { var _a; return (_a = IkasStorefrontConfig.stockLocationIds) === null || _a === void 0 ? void 0 : _a.includes(s.stockLocationId); })
25847
+ .reduce(function (total, current) { return current.stockCount + total; }, 0) || 0,
25846
25848
  variantValues: (_d = v.variantValues) === null || _d === void 0 ? void 0 : _d.map(function (vv) {
25847
25849
  var pvt = simple.productVariantTypes.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; });
25848
25850
  var variantValue = pvt === null || pvt === void 0 ? void 0 : pvt.variantType.values.find(function (_vv) { return _vv.id === vv.variantValueId; });
package/build/index.js CHANGED
@@ -25822,7 +25822,9 @@ function simpleToProduct(simple) {
25822
25822
  ? p.priceListId === IkasStorefrontConfig.priceListId
25823
25823
  : p.priceListId === null;
25824
25824
  })),
25825
- stock: v.stocks.length ? v.stocks[0].stockCount : 0,
25825
+ stock: v.stocks
25826
+ .filter(function (s) { var _a; return (_a = IkasStorefrontConfig.stockLocationIds) === null || _a === void 0 ? void 0 : _a.includes(s.stockLocationId); })
25827
+ .reduce(function (total, current) { return current.stockCount + total; }, 0) || 0,
25826
25828
  variantValues: (_d = v.variantValues) === null || _d === void 0 ? void 0 : _d.map(function (vv) {
25827
25829
  var pvt = simple.productVariantTypes.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; });
25828
25830
  var variantValue = pvt === null || pvt === void 0 ? void 0 : pvt.variantType.values.find(function (_vv) { return _vv.id === vv.variantValueId; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.116",
3
+ "version": "0.0.117",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",