@ikas/storefront 0.0.105 → 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; });
@@ -28555,7 +28559,13 @@ var SettingsHelper = /** @class */ (function () {
28555
28559
  return __generator(this, function (_b) {
28556
28560
  switch (_b.label) {
28557
28561
  case 0:
28558
- locale = context.locale || context.defaultLocale || "en";
28562
+ locale = context.locale;
28563
+ if (!locale) {
28564
+ return [2 /*return*/, {
28565
+ props: {},
28566
+ notFound: true,
28567
+ }];
28568
+ }
28559
28569
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
28560
28570
  case 1:
28561
28571
  settings = _b.sent();
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; });
@@ -28535,7 +28539,13 @@ var SettingsHelper = /** @class */ (function () {
28535
28539
  return __generator(this, function (_b) {
28536
28540
  switch (_b.label) {
28537
28541
  case 0:
28538
- locale = context.locale || context.defaultLocale || "en";
28542
+ locale = context.locale;
28543
+ if (!locale) {
28544
+ return [2 /*return*/, {
28545
+ props: {},
28546
+ notFound: true,
28547
+ }];
28548
+ }
28539
28549
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
28540
28550
  case 1:
28541
28551
  settings = _b.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.105",
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",