@ikas/storefront 0.0.106 → 0.0.107

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
@@ -25709,7 +25709,11 @@ function simpleToProduct(simple) {
25709
25709
  sku: v.sku,
25710
25710
  barcodeList: v.barcodeList || undefined,
25711
25711
  images: (_b = v.images) === null || _b === void 0 ? void 0 : _b.map(function (i) { return new IkasImage(i.id); }),
25712
- price: new IkasProductPrice((_c = v.prices) === null || _c === void 0 ? void 0 : _c.find(function (p) { return p.priceListId === null; })),
25712
+ price: new IkasProductPrice((_c = v.prices) === null || _c === void 0 ? void 0 : _c.find(function (p) {
25713
+ return IkasStorefrontConfig.priceListId
25714
+ ? p.priceListId === IkasStorefrontConfig.priceListId
25715
+ : p.priceListId === null;
25716
+ })),
25713
25717
  stock: v.stocks.length ? v.stocks[0].stockCount : 0,
25714
25718
  variantValues: (_d = v.variantValues) === null || _d === void 0 ? void 0 : _d.map(function (vv) {
25715
25719
  var pvt = simple.productVariantTypes.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; });
package/build/index.js CHANGED
@@ -25689,7 +25689,11 @@ function simpleToProduct(simple) {
25689
25689
  sku: v.sku,
25690
25690
  barcodeList: v.barcodeList || undefined,
25691
25691
  images: (_b = v.images) === null || _b === void 0 ? void 0 : _b.map(function (i) { return new IkasImage(i.id); }),
25692
- price: new IkasProductPrice((_c = v.prices) === null || _c === void 0 ? void 0 : _c.find(function (p) { return p.priceListId === null; })),
25692
+ price: new IkasProductPrice((_c = v.prices) === null || _c === void 0 ? void 0 : _c.find(function (p) {
25693
+ return IkasStorefrontConfig.priceListId
25694
+ ? p.priceListId === IkasStorefrontConfig.priceListId
25695
+ : p.priceListId === null;
25696
+ })),
25693
25697
  stock: v.stocks.length ? v.stocks[0].stockCount : 0,
25694
25698
  variantValues: (_d = v.variantValues) === null || _d === void 0 ? void 0 : _d.map(function (vv) {
25695
25699
  var pvt = simple.productVariantTypes.find(function (pvt) { return pvt.variantType.id === vv.variantTypeId; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.106",
3
+ "version": "0.0.107",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",