@ikas/storefront 0.2.0-alpha.3 → 0.2.0-alpha.5

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.
Files changed (31) hide show
  1. package/build/__generated__/global-types.d.ts +22 -0
  2. package/build/analytics/ikas.d.ts +18 -11
  3. package/build/api/back-in-stock-reminder/__generated__/listProductBackInStockRemind.d.ts +24 -0
  4. package/build/api/back-in-stock-reminder/__generated__/saveProductBackInStockRemind.d.ts +19 -0
  5. package/build/api/back-in-stock-reminder/index.d.ts +23 -0
  6. package/build/api/customer-review/__generated__/createCustomerReview.d.ts +11 -0
  7. package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +25 -0
  8. package/build/api/customer-review/index.d.ts +24 -0
  9. package/build/api/index.d.ts +2 -0
  10. package/build/components/checkout/components/address-form/model.d.ts +8 -0
  11. package/build/index.css +9 -4
  12. package/build/index.es.css +9 -4
  13. package/build/index.es.js +822 -61
  14. package/build/index.js +826 -60
  15. package/build/models/data/customer-review/index.d.ts +23 -0
  16. package/build/models/data/customer-review-settings/index.d.ts +4 -0
  17. package/build/models/data/index.d.ts +2 -0
  18. package/build/models/data/order/address/index.d.ts +2 -0
  19. package/build/models/data/payment-gateway/index.d.ts +2 -0
  20. package/build/models/data/product/index.d.ts +1 -0
  21. package/build/models/data/product/variant/index.d.ts +7 -0
  22. package/build/models/data/product-back-in-stock-settings/index.d.ts +3 -0
  23. package/build/models/ui/customer-review-list/index.d.ts +43 -0
  24. package/build/models/ui/index.d.ts +2 -0
  25. package/build/models/ui/product-detail/index.d.ts +4 -1
  26. package/build/models/ui/validator/form/customer-review.d.ts +37 -0
  27. package/build/providers/page-data-get.d.ts +2 -0
  28. package/build/providers/page-data-next.d.ts +18 -2
  29. package/build/store/customer.d.ts +7 -0
  30. package/build/storefront/index.d.ts +6 -0
  31. package/package.json +1 -1
package/build/index.js CHANGED
@@ -11012,6 +11012,10 @@ var IkasStorefrontConfig = /** @class */ (function () {
11012
11012
  stockPreference: IkasStorefrontConfig.stockPreference || null,
11013
11013
  storefrontJSScripts: IkasStorefrontConfig.storefrontJSScripts || [],
11014
11014
  translations: this.translations,
11015
+ customerReviewSettings: IkasStorefrontConfig.customerReviewSettings,
11016
+ productBackInStockSettings: IkasStorefrontConfig.productBackInStockSettings
11017
+ ? JSON.parse(JSON.stringify(IkasStorefrontConfig.productBackInStockSettings))
11018
+ : null,
11015
11019
  };
11016
11020
  };
11017
11021
  IkasStorefrontConfig.components = {};
@@ -19836,6 +19840,8 @@ var IkasCart = /** @class */ (function () {
19836
19840
  var IkasPaymentGateway = /** @class */ (function () {
19837
19841
  function IkasPaymentGateway(data) {
19838
19842
  var _a;
19843
+ this.supportedCurrencies = [];
19844
+ this.availableCountries = [];
19839
19845
  this.paymentMethods = data.paymentMethods || [];
19840
19846
  this.paymentMethodType =
19841
19847
  data.paymentMethodType || IkasPaymentMethodType.OTHER;
@@ -19849,6 +19855,8 @@ var IkasPaymentGateway = /** @class */ (function () {
19849
19855
  this.additionalPrices =
19850
19856
  ((_a = data.additionalPrices) === null || _a === void 0 ? void 0 : _a.map(function (ap) { return new IkasPaymentGatewayAdditionalPrice(ap); })) || null;
19851
19857
  this.translations = data.translations || null;
19858
+ this.supportedCurrencies = data.supportedCurrencies || [];
19859
+ this.availableCountries = data.availableCountries || [];
19852
19860
  this.setTranslations();
19853
19861
  mobx.makeAutoObservable(this);
19854
19862
  }
@@ -20301,6 +20309,33 @@ var IkasCustomerEmailSubscriptionStatus;
20301
20309
  IkasCustomerEmailSubscriptionStatus["SUBSCRIBED"] = "SUBSCRIBED";
20302
20310
  })(IkasCustomerEmailSubscriptionStatus || (IkasCustomerEmailSubscriptionStatus = {}));
20303
20311
 
20312
+ var IkasCustomerReview = /** @class */ (function () {
20313
+ function IkasCustomerReview(data) {
20314
+ this.comment = data.comment || "";
20315
+ this.createdAt = data.createdAt || "";
20316
+ this.customerId = data.customerId || "";
20317
+ this.deleted = data.deleted || false;
20318
+ this.id = data.id || "";
20319
+ this.orderId = data.orderId || "";
20320
+ this.orderNumber = data.orderNumber || "";
20321
+ this.productId = data.productId || "";
20322
+ this.salesChannelId = data.salesChannelId || "";
20323
+ this.star = data.star || 0;
20324
+ this.status = data.status || CustomerReviewStatusEnum.APPROVED;
20325
+ this.storefrontId = data.storefrontId || "";
20326
+ this.title = data.title || "";
20327
+ this.updatedAt = data.updatedAt || "";
20328
+ mobx.makeAutoObservable(this);
20329
+ }
20330
+ return IkasCustomerReview;
20331
+ }());
20332
+ var CustomerReviewStatusEnum;
20333
+ (function (CustomerReviewStatusEnum) {
20334
+ CustomerReviewStatusEnum["APPROVED"] = "APPROVED";
20335
+ CustomerReviewStatusEnum["REJECTED"] = "REJECTED";
20336
+ CustomerReviewStatusEnum["WAITING"] = "WAITING";
20337
+ })(CustomerReviewStatusEnum || (CustomerReviewStatusEnum = {}));
20338
+
20304
20339
  (function (IkasCardAssociation) {
20305
20340
  IkasCardAssociation["AMERICAN_EXPRESS"] = "AMERICAN_EXPRESS";
20306
20341
  IkasCardAssociation["MASTER_CARD"] = "MASTER_CARD";
@@ -23122,13 +23157,11 @@ var CheckoutViewModel = /** @class */ (function () {
23122
23157
  if (queryStep) {
23123
23158
  this.step = queryStep;
23124
23159
  if (this.step === CheckoutStep.SHIPPING && !this.canProceedToShipping) {
23125
- this.changeStep(CheckoutStep.INFO);
23126
- return [2 /*return*/];
23160
+ return [2 /*return*/, this.changeStep(CheckoutStep.INFO)];
23127
23161
  }
23128
23162
  else if (this.step === CheckoutStep.PAYMENT &&
23129
23163
  !this.canProceedToPayment) {
23130
- this.changeStep(CheckoutStep.INFO);
23131
- return [2 /*return*/];
23164
+ return [2 /*return*/, this.changeStep(CheckoutStep.INFO)];
23132
23165
  }
23133
23166
  else if (![
23134
23167
  CheckoutStep.INFO,
@@ -23136,8 +23169,7 @@ var CheckoutViewModel = /** @class */ (function () {
23136
23169
  CheckoutStep.SHIPPING,
23137
23170
  CheckoutStep.PAYMENT,
23138
23171
  ].includes(this.step)) {
23139
- this.changeStep(CheckoutStep.INFO);
23140
- return [2 /*return*/];
23172
+ return [2 /*return*/, this.changeStep(CheckoutStep.INFO)];
23141
23173
  }
23142
23174
  }
23143
23175
  if (queryFailed) {
@@ -23162,17 +23194,32 @@ var CheckoutViewModel = /** @class */ (function () {
23162
23194
  shallow: true,
23163
23195
  });
23164
23196
  }
23197
+ // Check if there are available shipping methods for the shipping address
23198
+ if (this.step === CheckoutStep.SHIPPING &&
23199
+ !this.checkout.availableShippingMethods.length) {
23200
+ this.error = {
23201
+ type: ErrorType.NO_SHIPPING_ERROR,
23202
+ };
23203
+ this.isCheckoutLoaded = true;
23204
+ return [2 /*return*/];
23205
+ }
23165
23206
  if (!(this.step === CheckoutStep.PAYMENT ||
23166
23207
  this.step === CheckoutStep.SUCCESS)) return [3 /*break*/, 4];
23167
23208
  return [4 /*yield*/, this.listPaymentGateways()];
23168
23209
  case 3:
23169
23210
  _b.sent();
23211
+ if (!this.paymentGateways.length) {
23212
+ this.error = {
23213
+ type: ErrorType.NO_SHIPPING_ERROR,
23214
+ };
23215
+ this.isCheckoutLoaded = true;
23216
+ return [2 /*return*/];
23217
+ }
23170
23218
  _b.label = 4;
23171
23219
  case 4:
23172
23220
  if (!(this.step !== CheckoutStep.SUCCESS)) return [3 /*break*/, 8];
23173
23221
  if (!this.checkout.isComplete) return [3 /*break*/, 5];
23174
- this.changeStep(CheckoutStep.SUCCESS);
23175
- return [2 /*return*/];
23222
+ return [2 /*return*/, this.changeStep(CheckoutStep.SUCCESS)];
23176
23223
  case 5: return [4 /*yield*/, this.initialStockCheck()];
23177
23224
  case 6:
23178
23225
  _b.sent();
@@ -23354,24 +23401,41 @@ var CheckoutViewModel = /** @class */ (function () {
23354
23401
  });
23355
23402
  }); };
23356
23403
  this.listPaymentGateways = function () { return __awaiter(_this, void 0, void 0, function () {
23357
- var isLocal, idList, paymentGateways, orderedPaymentGateways;
23358
- return __generator(this, function (_a) {
23359
- switch (_a.label) {
23404
+ var isLocal, idList, paymentGateways, shippingCountry_1, orderedPaymentGateways;
23405
+ var _this = this;
23406
+ var _a;
23407
+ return __generator(this, function (_b) {
23408
+ switch (_b.label) {
23360
23409
  case 0:
23361
23410
  isLocal = process.env.NEXT_PUBLIC_ENV === "local";
23362
23411
  idList = IkasStorefrontConfig.paymentGateways.map(function (pg) { return pg.id; });
23363
23412
  return [4 /*yield*/, IkasCheckoutAPI.listPaymentGateway(isLocal ? undefined : idList)];
23364
23413
  case 1:
23365
- paymentGateways = _a.sent();
23414
+ paymentGateways = _b.sent();
23366
23415
  if (!paymentGateways || !paymentGateways.length) {
23367
23416
  this.error = {
23368
23417
  type: ErrorType.API_ERROR,
23369
23418
  };
23370
23419
  return [2 /*return*/];
23371
23420
  }
23421
+ if (this.step === CheckoutStep.PAYMENT) {
23422
+ paymentGateways = paymentGateways.filter(function (pg) {
23423
+ return pg.supportedCurrencies.length
23424
+ ? pg.supportedCurrencies.includes(_this.checkout.cart.currencyCode)
23425
+ : true;
23426
+ });
23427
+ shippingCountry_1 = (_a = this.checkout.shippingAddress) === null || _a === void 0 ? void 0 : _a.country;
23428
+ if (shippingCountry_1) {
23429
+ paymentGateways = paymentGateways.filter(function (pg) {
23430
+ return pg.availableCountries.length
23431
+ ? pg.availableCountries.includes(shippingCountry_1.iso2 || "")
23432
+ : true;
23433
+ });
23434
+ }
23435
+ }
23372
23436
  orderedPaymentGateways = [];
23373
23437
  sortBy_1(IkasStorefrontConfig.paymentGateways, "order").forEach(function (pg) {
23374
- var _pg = paymentGateways.find(function (p) { return p.id === pg.id; });
23438
+ var _pg = paymentGateways === null || paymentGateways === void 0 ? void 0 : paymentGateways.find(function (p) { return p.id === pg.id; });
23375
23439
  if (_pg)
23376
23440
  orderedPaymentGateways.push(_pg);
23377
23441
  });
@@ -23883,6 +23947,8 @@ var CheckoutViewModel = /** @class */ (function () {
23883
23947
  _this.addressTitle = value;
23884
23948
  };
23885
23949
  this.setPaymentGateway = function (index) {
23950
+ if (!_this.paymentGateways.length)
23951
+ return;
23886
23952
  var paymentGateway = _this.paymentGateways[index];
23887
23953
  _this.checkout.selectedPaymentGateway = paymentGateway;
23888
23954
  if (_this.step !== CheckoutStep.SUCCESS) {
@@ -24476,17 +24542,16 @@ var StorefrontEventType;
24476
24542
  StorefrontEventType[StorefrontEventType["SESSION_START"] = 1] = "SESSION_START";
24477
24543
  StorefrontEventType[StorefrontEventType["PAGE_VIEW"] = 2] = "PAGE_VIEW";
24478
24544
  StorefrontEventType[StorefrontEventType["PRODUCT_VIEW"] = 3] = "PRODUCT_VIEW";
24479
- StorefrontEventType[StorefrontEventType["CREATE_CART"] = 4] = "CREATE_CART";
24480
- StorefrontEventType[StorefrontEventType["ADD_TO_CART"] = 5] = "ADD_TO_CART";
24481
- StorefrontEventType[StorefrontEventType["VIEW_CART"] = 6] = "VIEW_CART";
24482
- StorefrontEventType[StorefrontEventType["ORDER_SUCCESS"] = 7] = "ORDER_SUCCESS";
24483
- StorefrontEventType[StorefrontEventType["BEGIN_CHECKOUT"] = 8] = "BEGIN_CHECKOUT";
24484
- StorefrontEventType[StorefrontEventType["CHECKOUT_STEP"] = 9] = "CHECKOUT_STEP";
24485
- StorefrontEventType[StorefrontEventType["CUSTOMER_REGISTER"] = 10] = "CUSTOMER_REGISTER";
24486
- StorefrontEventType[StorefrontEventType["CUSTOMER_VISIT"] = 11] = "CUSTOMER_VISIT";
24487
- StorefrontEventType[StorefrontEventType["CUSTOMER_LOGIN"] = 12] = "CUSTOMER_LOGIN";
24488
- StorefrontEventType[StorefrontEventType["BRAND_VIEW"] = 13] = "BRAND_VIEW";
24489
- StorefrontEventType[StorefrontEventType["CATEGORY_VIEW"] = 14] = "CATEGORY_VIEW";
24545
+ StorefrontEventType[StorefrontEventType["ADD_TO_CART"] = 4] = "ADD_TO_CART";
24546
+ StorefrontEventType[StorefrontEventType["VIEW_CART"] = 5] = "VIEW_CART";
24547
+ StorefrontEventType[StorefrontEventType["ORDER_SUCCESS"] = 6] = "ORDER_SUCCESS";
24548
+ StorefrontEventType[StorefrontEventType["BEGIN_CHECKOUT"] = 7] = "BEGIN_CHECKOUT";
24549
+ StorefrontEventType[StorefrontEventType["CHECKOUT_STEP"] = 8] = "CHECKOUT_STEP";
24550
+ StorefrontEventType[StorefrontEventType["CUSTOMER_REGISTER"] = 9] = "CUSTOMER_REGISTER";
24551
+ StorefrontEventType[StorefrontEventType["CUSTOMER_VISIT"] = 10] = "CUSTOMER_VISIT";
24552
+ StorefrontEventType[StorefrontEventType["CUSTOMER_LOGIN"] = 11] = "CUSTOMER_LOGIN";
24553
+ StorefrontEventType[StorefrontEventType["BRAND_VIEW"] = 12] = "BRAND_VIEW";
24554
+ StorefrontEventType[StorefrontEventType["CATEGORY_VIEW"] = 13] = "CATEGORY_VIEW";
24490
24555
  })(StorefrontEventType || (StorefrontEventType = {}));
24491
24556
  var StorefrontEventPageType;
24492
24557
  (function (StorefrontEventPageType) {
@@ -24512,7 +24577,7 @@ var StorefrontEventPageType;
24512
24577
  StorefrontEventPageType[StorefrontEventPageType["BLOG_CATEGORY"] = 20] = "BLOG_CATEGORY";
24513
24578
  StorefrontEventPageType[StorefrontEventPageType["CHECKOUT"] = 21] = "CHECKOUT";
24514
24579
  })(StorefrontEventPageType || (StorefrontEventPageType = {}));
24515
- var ANALYTICS_URL = "https://0.myikas.dev";
24580
+ var ANALYTICS_URL = "https://0.myikas.dev/sendEvent";
24516
24581
  var IkasAnalytics = /** @class */ (function () {
24517
24582
  function IkasAnalytics() {
24518
24583
  }
@@ -34043,6 +34108,33 @@ var IkasCustomerStore = /** @class */ (function () {
34043
34108
  }
34044
34109
  });
34045
34110
  }); };
34111
+ this.sendReview = function (input) { return __awaiter(_this, void 0, void 0, function () {
34112
+ var customerReviewSettings, salesChannelId, customerId, response, error_1;
34113
+ var _a;
34114
+ return __generator(this, function (_b) {
34115
+ switch (_b.label) {
34116
+ case 0:
34117
+ _b.trys.push([0, 2, , 3]);
34118
+ customerReviewSettings = IkasStorefrontConfig.customerReviewSettings, salesChannelId = IkasStorefrontConfig.salesChannelId;
34119
+ if (!customerReviewSettings)
34120
+ return [2 /*return*/];
34121
+ customerId = (_a = this.customer) === null || _a === void 0 ? void 0 : _a.id;
34122
+ if (!customerId && customerReviewSettings.customerLoginRequired)
34123
+ throw Error("Unauthorized");
34124
+ return [4 /*yield*/, IkasCustomerReviewAPI.createCustomerReview(__assign(__assign({}, input), { customerId: customerReviewSettings.customerLoginRequired
34125
+ ? customerId
34126
+ : undefined, salesChannelId: salesChannelId || "" }))];
34127
+ case 1:
34128
+ response = _b.sent();
34129
+ return [2 /*return*/, response];
34130
+ case 2:
34131
+ error_1 = _b.sent();
34132
+ console.log(error_1);
34133
+ return [3 /*break*/, 3];
34134
+ case 3: return [2 /*return*/];
34135
+ }
34136
+ });
34137
+ }); };
34046
34138
  this.onCustomerConsentGrant = function () {
34047
34139
  _this.saveCustomerConsent();
34048
34140
  };
@@ -34678,7 +34770,9 @@ var IkasProductAttributeValue = /** @class */ (function () {
34678
34770
  var IkasProductVariant = /** @class */ (function () {
34679
34771
  function IkasProductVariant(data) {
34680
34772
  if (data === void 0) { data = {}; }
34773
+ this._backInStockReminderSaved = false;
34681
34774
  this.id = data.id || Date.now() + "";
34775
+ this.productId = data.productId || "";
34682
34776
  this.sku = data.sku || null;
34683
34777
  this.barcodeList = data.barcodeList || [];
34684
34778
  this.variantValues = data.variantValues
@@ -34704,6 +34798,70 @@ var IkasProductVariant = /** @class */ (function () {
34704
34798
  enumerable: false,
34705
34799
  configurable: true
34706
34800
  });
34801
+ Object.defineProperty(IkasProductVariant.prototype, "hasStock", {
34802
+ get: function () {
34803
+ return this.stock > 0;
34804
+ },
34805
+ enumerable: false,
34806
+ configurable: true
34807
+ });
34808
+ Object.defineProperty(IkasProductVariant.prototype, "isBackInStockEnabled", {
34809
+ get: function () {
34810
+ return IkasStorefrontConfig.productBackInStockSettings !== null;
34811
+ },
34812
+ enumerable: false,
34813
+ configurable: true
34814
+ });
34815
+ Object.defineProperty(IkasProductVariant.prototype, "isBackInStockCustomerLoginRequired", {
34816
+ get: function () {
34817
+ return (IkasStorefrontConfig.productBackInStockSettings &&
34818
+ IkasStorefrontConfig.productBackInStockSettings.customerLoginRequired);
34819
+ },
34820
+ enumerable: false,
34821
+ configurable: true
34822
+ });
34823
+ Object.defineProperty(IkasProductVariant.prototype, "isBackInStockReminderSaved", {
34824
+ get: function () {
34825
+ return this._backInStockReminderSaved;
34826
+ },
34827
+ enumerable: false,
34828
+ configurable: true
34829
+ });
34830
+ IkasProductVariant.prototype.saveBackInStockReminder = function (email) {
34831
+ return __awaiter(this, void 0, void 0, function () {
34832
+ var listResponse, saveResponseSuccess;
34833
+ return __generator(this, function (_a) {
34834
+ switch (_a.label) {
34835
+ case 0: return [4 /*yield*/, IkasProductBackInStockReminderAPI.list({
34836
+ email: email,
34837
+ productId: this.productId,
34838
+ variantId: this.id,
34839
+ })];
34840
+ case 1:
34841
+ listResponse = _a.sent();
34842
+ if (!(listResponse && listResponse.data.length)) return [3 /*break*/, 2];
34843
+ this._backInStockReminderSaved = true;
34844
+ return [2 /*return*/, false];
34845
+ case 2: return [4 /*yield*/, IkasProductBackInStockReminderAPI.save({
34846
+ email: email,
34847
+ productId: this.productId,
34848
+ variantId: this.id,
34849
+ })];
34850
+ case 3:
34851
+ saveResponseSuccess = _a.sent();
34852
+ if (saveResponseSuccess) {
34853
+ this._backInStockReminderSaved = true;
34854
+ return [2 /*return*/, true];
34855
+ }
34856
+ else {
34857
+ this._backInStockReminderSaved = false;
34858
+ return [2 /*return*/, false];
34859
+ }
34860
+ case 4: return [2 /*return*/];
34861
+ }
34862
+ });
34863
+ });
34864
+ };
34707
34865
  return IkasProductVariant;
34708
34866
  }());
34709
34867
 
@@ -34826,6 +34984,13 @@ var IkasProduct = /** @class */ (function () {
34826
34984
  enumerable: false,
34827
34985
  configurable: true
34828
34986
  });
34987
+ Object.defineProperty(IkasProduct.prototype, "hasStock", {
34988
+ get: function () {
34989
+ return this.variants.some(function (v) { return v.stock > 0; });
34990
+ },
34991
+ enumerable: false,
34992
+ configurable: true
34993
+ });
34829
34994
  Object.defineProperty(IkasProduct.prototype, "mainVariantType", {
34830
34995
  get: function () {
34831
34996
  if (!this.hasVariant)
@@ -37036,7 +37201,7 @@ var IkasProductDetail = /** @class */ (function () {
37036
37201
  });
37037
37202
  Object.defineProperty(IkasProductDetail.prototype, "hasStock", {
37038
37203
  get: function () {
37039
- return this.product.variants.some(function (v) { return v.stock > 0; });
37204
+ return this.product.hasStock;
37040
37205
  },
37041
37206
  enumerable: false,
37042
37207
  configurable: true
@@ -37082,6 +37247,42 @@ var IkasProductDetail = /** @class */ (function () {
37082
37247
  enumerable: false,
37083
37248
  configurable: true
37084
37249
  });
37250
+ Object.defineProperty(IkasProductDetail.prototype, "isCustomerReviewEnabled", {
37251
+ get: function () {
37252
+ return (!!IkasStorefrontConfig.customerReviewSettings &&
37253
+ !IkasStorefrontConfig.customerReviewSettings.customerPurchaseRequired);
37254
+ },
37255
+ enumerable: false,
37256
+ configurable: true
37257
+ });
37258
+ Object.defineProperty(IkasProductDetail.prototype, "isCustomerReviewLoginRequired", {
37259
+ get: function () {
37260
+ if (!IkasStorefrontConfig.customerReviewSettings)
37261
+ return true;
37262
+ return IkasStorefrontConfig.customerReviewSettings.customerLoginRequired;
37263
+ },
37264
+ enumerable: false,
37265
+ configurable: true
37266
+ });
37267
+ IkasProductDetail.prototype.getCustomerReviews = function () {
37268
+ return __awaiter(this, void 0, void 0, function () {
37269
+ var customerReviews;
37270
+ return __generator(this, function (_a) {
37271
+ switch (_a.label) {
37272
+ case 0:
37273
+ customerReviews = new IkasCustomerReviewList({
37274
+ productId: this.product.id,
37275
+ });
37276
+ //@ts-ignore
37277
+ return [4 /*yield*/, customerReviews.getInitial()];
37278
+ case 1:
37279
+ //@ts-ignore
37280
+ _a.sent();
37281
+ return [2 /*return*/, customerReviews];
37282
+ }
37283
+ });
37284
+ });
37285
+ };
37085
37286
  IkasProductDetail.prototype.selectVariantValue = function (variantValue) {
37086
37287
  var _this = this;
37087
37288
  var _a;
@@ -39334,6 +39535,230 @@ var IkasAttributeList = /** @class */ (function () {
39334
39535
  return IkasAttributeList;
39335
39536
  }());
39336
39537
 
39538
+ var IkasCustomerReviewList = /** @class */ (function () {
39539
+ function IkasCustomerReviewList(data) {
39540
+ var _this = this;
39541
+ this._initialized = false;
39542
+ this._minPage = null;
39543
+ this._isLoading = false;
39544
+ // Used by the provider
39545
+ this.getInitial = function () { return __awaiter(_this, void 0, void 0, function () {
39546
+ var response, err_1;
39547
+ return __generator(this, function (_a) {
39548
+ switch (_a.label) {
39549
+ case 0:
39550
+ if (this._isLoading)
39551
+ return [2 /*return*/];
39552
+ this._isLoading = true;
39553
+ _a.label = 1;
39554
+ case 1:
39555
+ _a.trys.push([1, 3, 4, 5]);
39556
+ return [4 /*yield*/, this.listCustomerReviews(this.page, this.limit)];
39557
+ case 2:
39558
+ response = _a.sent();
39559
+ this.data = response.data;
39560
+ this._count = response.count;
39561
+ this._initialized = true;
39562
+ this._minPage = this.page;
39563
+ return [3 /*break*/, 5];
39564
+ case 3:
39565
+ err_1 = _a.sent();
39566
+ console.log(err_1);
39567
+ return [3 /*break*/, 5];
39568
+ case 4:
39569
+ this._isLoading = false;
39570
+ return [7 /*endfinally*/];
39571
+ case 5: return [2 /*return*/];
39572
+ }
39573
+ });
39574
+ }); };
39575
+ this.getPrev = function () { return __awaiter(_this, void 0, void 0, function () {
39576
+ var minPage, response, err_2;
39577
+ return __generator(this, function (_a) {
39578
+ switch (_a.label) {
39579
+ case 0:
39580
+ if (this._isLoading || !this.hasPrev)
39581
+ return [2 /*return*/];
39582
+ this._isLoading = true;
39583
+ _a.label = 1;
39584
+ case 1:
39585
+ _a.trys.push([1, 3, 4, 5]);
39586
+ minPage = this._minPage - 1;
39587
+ return [4 /*yield*/, this.listCustomerReviews(minPage, this.limit)];
39588
+ case 2:
39589
+ response = _a.sent();
39590
+ this.data = response.data.concat(this.data);
39591
+ this._count = response.count;
39592
+ this._minPage = minPage;
39593
+ return [3 /*break*/, 5];
39594
+ case 3:
39595
+ err_2 = _a.sent();
39596
+ console.log(err_2);
39597
+ return [3 /*break*/, 5];
39598
+ case 4:
39599
+ this._isLoading = false;
39600
+ return [7 /*endfinally*/];
39601
+ case 5: return [2 /*return*/];
39602
+ }
39603
+ });
39604
+ }); };
39605
+ this.getNext = function () { return __awaiter(_this, void 0, void 0, function () {
39606
+ var response, err_3;
39607
+ return __generator(this, function (_a) {
39608
+ switch (_a.label) {
39609
+ case 0:
39610
+ if (this._isLoading || !this.hasNext)
39611
+ return [2 /*return*/];
39612
+ this._isLoading = true;
39613
+ _a.label = 1;
39614
+ case 1:
39615
+ _a.trys.push([1, 3, 4, 5]);
39616
+ return [4 /*yield*/, this.listCustomerReviews(this.page + 1, this.limit)];
39617
+ case 2:
39618
+ response = _a.sent();
39619
+ this.data = this.data.concat(response.data);
39620
+ this._count = response.count;
39621
+ this._page = this.page + 1;
39622
+ return [3 /*break*/, 5];
39623
+ case 3:
39624
+ err_3 = _a.sent();
39625
+ console.log(err_3);
39626
+ return [3 /*break*/, 5];
39627
+ case 4:
39628
+ this._isLoading = false;
39629
+ return [7 /*endfinally*/];
39630
+ case 5: return [2 /*return*/];
39631
+ }
39632
+ });
39633
+ }); };
39634
+ this.getPage = function (page) { return __awaiter(_this, void 0, void 0, function () {
39635
+ var response, err_4;
39636
+ return __generator(this, function (_a) {
39637
+ switch (_a.label) {
39638
+ case 0:
39639
+ if (this._isLoading)
39640
+ return [2 /*return*/];
39641
+ this._isLoading = true;
39642
+ _a.label = 1;
39643
+ case 1:
39644
+ _a.trys.push([1, 3, 4, 5]);
39645
+ return [4 /*yield*/, this.listCustomerReviews(page, this.limit)];
39646
+ case 2:
39647
+ response = _a.sent();
39648
+ this.data = response.data;
39649
+ this._count = response.count;
39650
+ this._page = page;
39651
+ this._minPage = page;
39652
+ return [3 /*break*/, 5];
39653
+ case 3:
39654
+ err_4 = _a.sent();
39655
+ console.log(err_4);
39656
+ return [3 /*break*/, 5];
39657
+ case 4:
39658
+ this._isLoading = false;
39659
+ return [7 /*endfinally*/];
39660
+ case 5: return [2 /*return*/];
39661
+ }
39662
+ });
39663
+ }); };
39664
+ this.data = data.data
39665
+ ? data.data.map(function (b) { return new IkasCustomerReview(b); })
39666
+ : [];
39667
+ this._limit = data.limit || 5;
39668
+ this._page = data.page || 1;
39669
+ this._count = data.count || 0;
39670
+ this._initialized = data.initialized || false;
39671
+ this._minPage = data.minPage;
39672
+ this._productId = data.productId;
39673
+ mobx.makeAutoObservable(this);
39674
+ }
39675
+ Object.defineProperty(IkasCustomerReviewList.prototype, "limit", {
39676
+ get: function () {
39677
+ return this._limit;
39678
+ },
39679
+ enumerable: false,
39680
+ configurable: true
39681
+ });
39682
+ Object.defineProperty(IkasCustomerReviewList.prototype, "page", {
39683
+ get: function () {
39684
+ return this._page;
39685
+ },
39686
+ enumerable: false,
39687
+ configurable: true
39688
+ });
39689
+ Object.defineProperty(IkasCustomerReviewList.prototype, "count", {
39690
+ get: function () {
39691
+ return this._count;
39692
+ },
39693
+ enumerable: false,
39694
+ configurable: true
39695
+ });
39696
+ Object.defineProperty(IkasCustomerReviewList.prototype, "pageCount", {
39697
+ get: function () {
39698
+ return Math.ceil(this._count / this._limit);
39699
+ },
39700
+ enumerable: false,
39701
+ configurable: true
39702
+ });
39703
+ Object.defineProperty(IkasCustomerReviewList.prototype, "isInitialized", {
39704
+ get: function () {
39705
+ return this._initialized;
39706
+ },
39707
+ enumerable: false,
39708
+ configurable: true
39709
+ });
39710
+ Object.defineProperty(IkasCustomerReviewList.prototype, "hasPrev", {
39711
+ get: function () {
39712
+ if (!this._minPage)
39713
+ return false;
39714
+ return this._minPage > 1;
39715
+ },
39716
+ enumerable: false,
39717
+ configurable: true
39718
+ });
39719
+ Object.defineProperty(IkasCustomerReviewList.prototype, "hasNext", {
39720
+ get: function () {
39721
+ return this.page * this.limit < this.count;
39722
+ },
39723
+ enumerable: false,
39724
+ configurable: true
39725
+ });
39726
+ Object.defineProperty(IkasCustomerReviewList.prototype, "isLoading", {
39727
+ get: function () {
39728
+ return this._isLoading;
39729
+ },
39730
+ enumerable: false,
39731
+ configurable: true
39732
+ });
39733
+ IkasCustomerReviewList.prototype.listCustomerReviews = function (page, limit) {
39734
+ return __awaiter(this, void 0, void 0, function () {
39735
+ return __generator(this, function (_a) {
39736
+ switch (_a.label) {
39737
+ case 0: return [4 /*yield*/, IkasCustomerReviewAPI.listCustomerReviews({
39738
+ productId: this._productId,
39739
+ salesChannelId: IkasStorefrontConfig.salesChannelId || "",
39740
+ page: page,
39741
+ limit: limit,
39742
+ })];
39743
+ case 1: return [2 /*return*/, _a.sent()];
39744
+ }
39745
+ });
39746
+ });
39747
+ };
39748
+ IkasCustomerReviewList.prototype.toJSON = function () {
39749
+ return {
39750
+ data: this.data,
39751
+ limit: this._limit,
39752
+ page: this._page,
39753
+ count: this._count,
39754
+ initialized: this._initialized,
39755
+ minPage: this._minPage,
39756
+ productId: this._productId,
39757
+ };
39758
+ };
39759
+ return IkasCustomerReviewList;
39760
+ }());
39761
+
39337
39762
  var Validator = /** @class */ (function () {
39338
39763
  function Validator(model, rules) {
39339
39764
  var _this = this;
@@ -41138,6 +41563,139 @@ var AccountInfoForm = /** @class */ (function () {
41138
41563
  return AccountInfoForm;
41139
41564
  }());
41140
41565
 
41566
+ var CustomerReviewForm = /** @class */ (function () {
41567
+ function CustomerReviewForm(props) {
41568
+ var _this = this;
41569
+ this.model = {
41570
+ title: "",
41571
+ comment: "",
41572
+ star: 0,
41573
+ };
41574
+ this.onTitleChange = function (value) {
41575
+ _this.title = value;
41576
+ };
41577
+ this.onCommentChange = function (value) {
41578
+ _this.comment = value;
41579
+ };
41580
+ this.onStarChange = function (value) {
41581
+ _this.star = value;
41582
+ };
41583
+ mobx.makeObservable(this, {
41584
+ starErrorMessage: mobx.computed,
41585
+ hasError: mobx.computed,
41586
+ model: mobx.observable,
41587
+ validateAll: mobx.action,
41588
+ submit: mobx.action,
41589
+ });
41590
+ this.productId = props.productId;
41591
+ this.store = props.store;
41592
+ this.validator = new Validator(this.model, [
41593
+ new RequiredRule({
41594
+ fieldKey: "star",
41595
+ valuePath: "star",
41596
+ message: props.message.starRule,
41597
+ }),
41598
+ new MinRule({
41599
+ fieldKey: "star",
41600
+ valuePath: "star",
41601
+ minValue: 1,
41602
+ message: props.message.starRule,
41603
+ }),
41604
+ new MaxRule({
41605
+ fieldKey: "star",
41606
+ valuePath: "star",
41607
+ maxValue: 5,
41608
+ message: props.message.starRule,
41609
+ }),
41610
+ ]);
41611
+ }
41612
+ Object.defineProperty(CustomerReviewForm.prototype, "title", {
41613
+ get: function () {
41614
+ return this.model.title;
41615
+ },
41616
+ set: function (value) {
41617
+ this.model.title = value;
41618
+ },
41619
+ enumerable: false,
41620
+ configurable: true
41621
+ });
41622
+ Object.defineProperty(CustomerReviewForm.prototype, "comment", {
41623
+ get: function () {
41624
+ return this.model.comment;
41625
+ },
41626
+ set: function (value) {
41627
+ this.model.comment = value;
41628
+ },
41629
+ enumerable: false,
41630
+ configurable: true
41631
+ });
41632
+ Object.defineProperty(CustomerReviewForm.prototype, "star", {
41633
+ get: function () {
41634
+ return this.model.star;
41635
+ },
41636
+ set: function (value) {
41637
+ this.model.star = value;
41638
+ },
41639
+ enumerable: false,
41640
+ configurable: true
41641
+ });
41642
+ Object.defineProperty(CustomerReviewForm.prototype, "hasError", {
41643
+ get: function () {
41644
+ return this.validator.hasError;
41645
+ },
41646
+ enumerable: false,
41647
+ configurable: true
41648
+ });
41649
+ Object.defineProperty(CustomerReviewForm.prototype, "starErrorMessage", {
41650
+ get: function () {
41651
+ return this.validator.results.star.errorMessage;
41652
+ },
41653
+ enumerable: false,
41654
+ configurable: true
41655
+ });
41656
+ CustomerReviewForm.prototype.validateAll = function () {
41657
+ return this.validator.validateAll();
41658
+ };
41659
+ CustomerReviewForm.prototype.submit = function () {
41660
+ return __awaiter(this, void 0, void 0, function () {
41661
+ var response, hasFormError, isContactFormSuccess;
41662
+ return __generator(this, function (_b) {
41663
+ switch (_b.label) {
41664
+ case 0:
41665
+ response = { isFormError: false, isSuccess: false };
41666
+ return [4 /*yield*/, this.validateAll()];
41667
+ case 1:
41668
+ hasFormError = _b.sent();
41669
+ if (hasFormError) {
41670
+ response.isFormError = true;
41671
+ return [2 /*return*/, response];
41672
+ }
41673
+ _b.label = 2;
41674
+ case 2:
41675
+ _b.trys.push([2, 4, , 5]);
41676
+ return [4 /*yield*/, this.store.customerStore.sendReview({
41677
+ title: this.model.title,
41678
+ comment: this.model.comment,
41679
+ star: this.model.star,
41680
+ productId: this.productId,
41681
+ })];
41682
+ case 3:
41683
+ isContactFormSuccess = _b.sent();
41684
+ if (isContactFormSuccess) {
41685
+ response.isSuccess = true;
41686
+ }
41687
+ return [2 /*return*/, response];
41688
+ case 4:
41689
+ _b.sent();
41690
+ return [2 /*return*/, response];
41691
+ case 5: return [2 /*return*/];
41692
+ }
41693
+ });
41694
+ });
41695
+ };
41696
+ return CustomerReviewForm;
41697
+ }());
41698
+
41141
41699
  var IkasComponentRenderer = /** @class */ (function () {
41142
41700
  function IkasComponentRenderer(render) {
41143
41701
  this.render = render;
@@ -41630,7 +42188,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
41630
42188
  return __generator(this, function (_b) {
41631
42189
  switch (_b.label) {
41632
42190
  case 0:
41633
- QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "])));
42191
+ QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n iso2\n iso3\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n iso2\n iso3\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "])));
41634
42192
  _b.label = 1;
41635
42193
  case 1:
41636
42194
  _b.trys.push([1, 3, , 4]);
@@ -41835,7 +42393,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
41835
42393
  return __generator(this, function (_b) {
41836
42394
  switch (_b.label) {
41837
42395
  case 0:
41838
- QUERY = src(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "])));
42396
+ QUERY = src(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n supportedCurrencies\n availableCountries\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n supportedCurrencies\n availableCountries\n }\n }\n "])));
41839
42397
  _b.label = 1;
41840
42398
  case 1:
41841
42399
  _b.trys.push([1, 3, , 4]);
@@ -42712,6 +43270,93 @@ var IkasCustomerAPI = /** @class */ (function () {
42712
43270
  }());
42713
43271
  var templateObject_1$7, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15;
42714
43272
 
43273
+ var IkasCustomerReviewAPI = /** @class */ (function () {
43274
+ function IkasCustomerReviewAPI() {
43275
+ }
43276
+ IkasCustomerReviewAPI.listCustomerReviews = function (params) {
43277
+ return __awaiter(this, void 0, void 0, function () {
43278
+ var LIST_CUSTOMER_REVIEWS, _a, data, errors, err_1;
43279
+ return __generator(this, function (_b) {
43280
+ switch (_b.label) {
43281
+ case 0:
43282
+ LIST_CUSTOMER_REVIEWS = src(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n query listCustomerReviews(\n $input: ListCustomerReviewInput!\n $productId: String\n $pagination: PaginationInput\n ) {\n listCustomerReviews(\n input: $input\n productId: $productId\n pagination: $pagination\n ) {\n count\n data {\n comment\n createdAt\n id\n star\n title\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listCustomerReviews(\n $input: ListCustomerReviewInput!\n $productId: String\n $pagination: PaginationInput\n ) {\n listCustomerReviews(\n input: $input\n productId: $productId\n pagination: $pagination\n ) {\n count\n data {\n comment\n createdAt\n id\n star\n title\n }\n hasNext\n limit\n page\n }\n }\n "])));
43283
+ _b.label = 1;
43284
+ case 1:
43285
+ _b.trys.push([1, 3, , 4]);
43286
+ return [4 /*yield*/, apollo
43287
+ .getClient()
43288
+ .query({
43289
+ query: LIST_CUSTOMER_REVIEWS,
43290
+ variables: {
43291
+ input: {
43292
+ salesChannelId: params.salesChannelId,
43293
+ },
43294
+ productId: params.productId,
43295
+ pagination: {
43296
+ page: params.page,
43297
+ limit: params.limit,
43298
+ },
43299
+ },
43300
+ })];
43301
+ case 2:
43302
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
43303
+ if (errors && errors.length)
43304
+ return [2 /*return*/, {
43305
+ data: [],
43306
+ count: 0,
43307
+ }];
43308
+ return [2 /*return*/, {
43309
+ data: data.listCustomerReviews.data.map(function (fP) { return new IkasCustomerReview(fP); }),
43310
+ count: data.listCustomerReviews.count,
43311
+ }];
43312
+ case 3:
43313
+ err_1 = _b.sent();
43314
+ console.log(err_1);
43315
+ return [2 /*return*/, {
43316
+ data: [],
43317
+ count: 0,
43318
+ }];
43319
+ case 4: return [2 /*return*/];
43320
+ }
43321
+ });
43322
+ });
43323
+ };
43324
+ IkasCustomerReviewAPI.createCustomerReview = function (params) {
43325
+ return __awaiter(this, void 0, void 0, function () {
43326
+ var CREATE_CUSTOMER_REVIEW, _a, data, errors, err_2;
43327
+ return __generator(this, function (_b) {
43328
+ switch (_b.label) {
43329
+ case 0:
43330
+ CREATE_CUSTOMER_REVIEW = src(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n mutation createCustomerReview($input: CreateCustomerReviewInput!) {\n createCustomerReview(input: $input) {\n id\n }\n }\n "], ["\n mutation createCustomerReview($input: CreateCustomerReviewInput!) {\n createCustomerReview(input: $input) {\n id\n }\n }\n "])));
43331
+ _b.label = 1;
43332
+ case 1:
43333
+ _b.trys.push([1, 3, , 4]);
43334
+ return [4 /*yield*/, apollo
43335
+ .getClient()
43336
+ .mutate({
43337
+ mutation: CREATE_CUSTOMER_REVIEW,
43338
+ variables: {
43339
+ input: __assign({}, params),
43340
+ },
43341
+ })];
43342
+ case 2:
43343
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
43344
+ if (errors && errors.length)
43345
+ return [2 /*return*/, false];
43346
+ return [2 /*return*/, data === null || data === void 0 ? void 0 : data.createCustomerReview];
43347
+ case 3:
43348
+ err_2 = _b.sent();
43349
+ console.log(err_2);
43350
+ return [3 /*break*/, 4];
43351
+ case 4: return [2 /*return*/];
43352
+ }
43353
+ });
43354
+ });
43355
+ };
43356
+ return IkasCustomerReviewAPI;
43357
+ }());
43358
+ var templateObject_1$8, templateObject_2$6;
43359
+
42715
43360
  var IkasDistrictAPI = /** @class */ (function () {
42716
43361
  function IkasDistrictAPI() {
42717
43362
  }
@@ -42721,7 +43366,7 @@ var IkasDistrictAPI = /** @class */ (function () {
42721
43366
  return __generator(this, function (_b) {
42722
43367
  switch (_b.label) {
42723
43368
  case 0:
42724
- QUERY = src(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n query listDistrict(\n $cityId: StringFilterInput!\n $stateId: StringFilterInput\n ) {\n listDistrict(cityId: $cityId, stateId: $stateId) {\n id\n name\n }\n }\n "], ["\n query listDistrict(\n $cityId: StringFilterInput!\n $stateId: StringFilterInput\n ) {\n listDistrict(cityId: $cityId, stateId: $stateId) {\n id\n name\n }\n }\n "])));
43369
+ QUERY = src(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n query listDistrict(\n $cityId: StringFilterInput!\n $stateId: StringFilterInput\n ) {\n listDistrict(cityId: $cityId, stateId: $stateId) {\n id\n name\n }\n }\n "], ["\n query listDistrict(\n $cityId: StringFilterInput!\n $stateId: StringFilterInput\n ) {\n listDistrict(cityId: $cityId, stateId: $stateId) {\n id\n name\n }\n }\n "])));
42725
43370
  _b.label = 1;
42726
43371
  case 1:
42727
43372
  _b.trys.push([1, 3, , 4]);
@@ -42762,7 +43407,7 @@ var IkasDistrictAPI = /** @class */ (function () {
42762
43407
  };
42763
43408
  return IkasDistrictAPI;
42764
43409
  }());
42765
- var templateObject_1$8;
43410
+ var templateObject_1$9;
42766
43411
 
42767
43412
  var IkasHTMLMetaDataAPI = /** @class */ (function () {
42768
43413
  function IkasHTMLMetaDataAPI() {
@@ -42773,7 +43418,7 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
42773
43418
  return __generator(this, function (_b) {
42774
43419
  switch (_b.label) {
42775
43420
  case 0:
42776
- LIST_QUERY = src(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "], ["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "])));
43421
+ LIST_QUERY = src(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "], ["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "])));
42777
43422
  _b.label = 1;
42778
43423
  case 1:
42779
43424
  _b.trys.push([1, 3, , 4]);
@@ -42816,7 +43461,7 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
42816
43461
  };
42817
43462
  return IkasHTMLMetaDataAPI;
42818
43463
  }());
42819
- var templateObject_1$9;
43464
+ var templateObject_1$a;
42820
43465
 
42821
43466
  var IkasMerchantAPI = /** @class */ (function () {
42822
43467
  function IkasMerchantAPI() {
@@ -42827,7 +43472,7 @@ var IkasMerchantAPI = /** @class */ (function () {
42827
43472
  return __generator(this, function (_b) {
42828
43473
  switch (_b.label) {
42829
43474
  case 0:
42830
- QUERY = src(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n query listMerchantSettings {\n listMerchantSettings {\n id\n logoId\n merchantName\n }\n }\n "], ["\n query listMerchantSettings {\n listMerchantSettings {\n id\n logoId\n merchantName\n }\n }\n "])));
43475
+ QUERY = src(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n query listMerchantSettings {\n listMerchantSettings {\n id\n logoId\n merchantName\n }\n }\n "], ["\n query listMerchantSettings {\n listMerchantSettings {\n id\n logoId\n merchantName\n }\n }\n "])));
42831
43476
  _b.label = 1;
42832
43477
  case 1:
42833
43478
  _b.trys.push([1, 3, , 4]);
@@ -42854,7 +43499,7 @@ var IkasMerchantAPI = /** @class */ (function () {
42854
43499
  };
42855
43500
  return IkasMerchantAPI;
42856
43501
  }());
42857
- var templateObject_1$a;
43502
+ var templateObject_1$b;
42858
43503
 
42859
43504
  var IkasProductAttributeTableCell = /** @class */ (function () {
42860
43505
  function IkasProductAttributeTableCell(data) {
@@ -42887,7 +43532,7 @@ var IkasProductSearchAPI = /** @class */ (function () {
42887
43532
  switch (_b.label) {
42888
43533
  case 0:
42889
43534
  _b.trys.push([0, 2, , 3]);
42890
- SEARCH_PRODUCTS = src(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "], ["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "])));
43535
+ SEARCH_PRODUCTS = src(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "], ["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "])));
42891
43536
  return [4 /*yield*/, apollo
42892
43537
  .getClient()
42893
43538
  .query({
@@ -42923,7 +43568,7 @@ var IkasProductSearchAPI = /** @class */ (function () {
42923
43568
  switch (_b.label) {
42924
43569
  case 0:
42925
43570
  _b.trys.push([0, 2, , 3]);
42926
- QUERY = src(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "], ["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "])));
43571
+ QUERY = src(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "], ["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "])));
42927
43572
  return [4 /*yield*/, apollo
42928
43573
  .getClient()
42929
43574
  .query({
@@ -43042,6 +43687,7 @@ function simpleToProduct(simple) {
43042
43687
  var _a, _b, _c, _d;
43043
43688
  return new IkasProductVariant({
43044
43689
  id: v.id,
43690
+ productId: simple.id,
43045
43691
  attributes: (_a = v.attributes) === null || _a === void 0 ? void 0 : _a.map(function (a) {
43046
43692
  var _a, _b, _c, _d, _e, _f;
43047
43693
  return new IkasProductAttributeValue({
@@ -43089,7 +43735,7 @@ function simpleToProduct(simple) {
43089
43735
  }),
43090
43736
  });
43091
43737
  }
43092
- var templateObject_1$b, templateObject_2$6;
43738
+ var templateObject_1$c, templateObject_2$7;
43093
43739
 
43094
43740
  var IkasProductAttributeAPI = /** @class */ (function () {
43095
43741
  function IkasProductAttributeAPI() {
@@ -43100,7 +43746,7 @@ var IkasProductAttributeAPI = /** @class */ (function () {
43100
43746
  return __generator(this, function (_b) {
43101
43747
  switch (_b.label) {
43102
43748
  case 0:
43103
- LIST_PRODUCT_ATTRIBUTES = src(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n translations {\n description\n locale\n name\n options {\n id\n name\n }\n }\n }\n }\n "], ["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n translations {\n description\n locale\n name\n options {\n id\n name\n }\n }\n }\n }\n "])));
43749
+ LIST_PRODUCT_ATTRIBUTES = src(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n translations {\n description\n locale\n name\n options {\n id\n name\n }\n }\n }\n }\n "], ["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n translations {\n description\n locale\n name\n options {\n id\n name\n }\n }\n }\n }\n "])));
43104
43750
  _b.label = 1;
43105
43751
  case 1:
43106
43752
  _b.trys.push([1, 3, , 4]);
@@ -43133,7 +43779,7 @@ var IkasProductAttributeAPI = /** @class */ (function () {
43133
43779
  };
43134
43780
  return IkasProductAttributeAPI;
43135
43781
  }());
43136
- var templateObject_1$c;
43782
+ var templateObject_1$d;
43137
43783
 
43138
43784
  var IkasFavoriteProductAPI = /** @class */ (function () {
43139
43785
  function IkasFavoriteProductAPI() {
@@ -43144,7 +43790,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
43144
43790
  return __generator(this, function (_b) {
43145
43791
  switch (_b.label) {
43146
43792
  case 0:
43147
- LIST_FAVORITE_PRODUCTS = src(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n query listFavoriteProducts {\n listFavoriteProducts {\n id\n createdAt\n updatedAt\n deleted\n productId\n customerId\n }\n }\n "], ["\n query listFavoriteProducts {\n listFavoriteProducts {\n id\n createdAt\n updatedAt\n deleted\n productId\n customerId\n }\n }\n "])));
43793
+ LIST_FAVORITE_PRODUCTS = src(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n query listFavoriteProducts {\n listFavoriteProducts {\n id\n createdAt\n updatedAt\n deleted\n productId\n customerId\n }\n }\n "], ["\n query listFavoriteProducts {\n listFavoriteProducts {\n id\n createdAt\n updatedAt\n deleted\n productId\n customerId\n }\n }\n "])));
43148
43794
  _b.label = 1;
43149
43795
  case 1:
43150
43796
  _b.trys.push([1, 3, , 4]);
@@ -43173,7 +43819,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
43173
43819
  return __generator(this, function (_b) {
43174
43820
  switch (_b.label) {
43175
43821
  case 0:
43176
- IS_FAVORITE_PRODUCT = src(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "], ["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "])));
43822
+ IS_FAVORITE_PRODUCT = src(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "], ["\n query isFavoriteProduct($productId: String!) {\n isFavoriteProduct(productId: $productId)\n }\n "])));
43177
43823
  _b.label = 1;
43178
43824
  case 1:
43179
43825
  _b.trys.push([1, 3, , 4]);
@@ -43229,7 +43875,7 @@ var IkasFavoriteProductAPI = /** @class */ (function () {
43229
43875
  };
43230
43876
  return IkasFavoriteProductAPI;
43231
43877
  }());
43232
- var templateObject_1$d, templateObject_2$7, templateObject_3$4;
43878
+ var templateObject_1$e, templateObject_2$8, templateObject_3$4;
43233
43879
 
43234
43880
  var IkasContactFormAPI = /** @class */ (function () {
43235
43881
  function IkasContactFormAPI() {
@@ -43240,7 +43886,7 @@ var IkasContactFormAPI = /** @class */ (function () {
43240
43886
  return __generator(this, function (_b) {
43241
43887
  switch (_b.label) {
43242
43888
  case 0:
43243
- MUTATION = src(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "], ["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "])));
43889
+ MUTATION = src(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "], ["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "])));
43244
43890
  _b.label = 1;
43245
43891
  case 1:
43246
43892
  _b.trys.push([1, 3, , 4]);
@@ -43272,7 +43918,7 @@ var IkasContactFormAPI = /** @class */ (function () {
43272
43918
  };
43273
43919
  return IkasContactFormAPI;
43274
43920
  }());
43275
- var templateObject_1$e;
43921
+ var templateObject_1$f;
43276
43922
 
43277
43923
  var IkasStateAPI = /** @class */ (function () {
43278
43924
  function IkasStateAPI() {
@@ -43283,7 +43929,7 @@ var IkasStateAPI = /** @class */ (function () {
43283
43929
  return __generator(this, function (_b) {
43284
43930
  switch (_b.label) {
43285
43931
  case 0:
43286
- QUERY = src(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n query listState($countryId: StringFilterInput!) {\n listState(countryId: $countryId) {\n id\n name\n stateCode\n }\n }\n "], ["\n query listState($countryId: StringFilterInput!) {\n listState(countryId: $countryId) {\n id\n name\n stateCode\n }\n }\n "])));
43932
+ QUERY = src(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n query listState($countryId: StringFilterInput!) {\n listState(countryId: $countryId) {\n id\n name\n stateCode\n }\n }\n "], ["\n query listState($countryId: StringFilterInput!) {\n listState(countryId: $countryId) {\n id\n name\n stateCode\n }\n }\n "])));
43287
43933
  _b.label = 1;
43288
43934
  case 1:
43289
43935
  _b.trys.push([1, 3, , 4]);
@@ -43320,7 +43966,7 @@ var IkasStateAPI = /** @class */ (function () {
43320
43966
  };
43321
43967
  return IkasStateAPI;
43322
43968
  }());
43323
- var templateObject_1$f;
43969
+ var templateObject_1$g;
43324
43970
 
43325
43971
  var IkasVariantTypeAPI = /** @class */ (function () {
43326
43972
  function IkasVariantTypeAPI() {
@@ -43331,7 +43977,7 @@ var IkasVariantTypeAPI = /** @class */ (function () {
43331
43977
  return __generator(this, function (_b) {
43332
43978
  switch (_b.label) {
43333
43979
  case 0:
43334
- LIST_VARIANT_TYPE = src(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n translations {\n locale\n name\n values {\n id\n name\n }\n }\n }\n }\n "], ["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n translations {\n locale\n name\n values {\n id\n name\n }\n }\n }\n }\n "])));
43980
+ LIST_VARIANT_TYPE = src(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n translations {\n locale\n name\n values {\n id\n name\n }\n }\n }\n }\n "], ["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n translations {\n locale\n name\n values {\n id\n name\n }\n }\n }\n }\n "])));
43335
43981
  _b.label = 1;
43336
43982
  case 1:
43337
43983
  _b.trys.push([1, 3, , 4]);
@@ -43378,7 +44024,7 @@ var IkasVariantTypeAPI = /** @class */ (function () {
43378
44024
  };
43379
44025
  return IkasVariantTypeAPI;
43380
44026
  }());
43381
- var templateObject_1$g;
44027
+ var templateObject_1$h;
43382
44028
 
43383
44029
  var IkasProductOptionSetAPI = /** @class */ (function () {
43384
44030
  function IkasProductOptionSetAPI() {
@@ -43391,7 +44037,7 @@ var IkasProductOptionSetAPI = /** @class */ (function () {
43391
44037
  switch (_b.label) {
43392
44038
  case 0:
43393
44039
  _b.trys.push([0, 2, , 3]);
43394
- QUERY = src(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "], ["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "])));
44040
+ QUERY = src(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "], ["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "])));
43395
44041
  return [4 /*yield*/, apollo
43396
44042
  .getClient()
43397
44043
  .query({
@@ -43422,7 +44068,89 @@ var IkasProductOptionSetAPI = /** @class */ (function () {
43422
44068
  };
43423
44069
  return IkasProductOptionSetAPI;
43424
44070
  }());
43425
- var templateObject_1$h;
44071
+ var templateObject_1$i;
44072
+
44073
+ var IkasProductBackInStockReminderAPI = /** @class */ (function () {
44074
+ function IkasProductBackInStockReminderAPI() {
44075
+ }
44076
+ IkasProductBackInStockReminderAPI.list = function (listParams) {
44077
+ return __awaiter(this, void 0, void 0, function () {
44078
+ var QUERY, _a, data, errors, err_1;
44079
+ return __generator(this, function (_b) {
44080
+ switch (_b.label) {
44081
+ case 0:
44082
+ QUERY = src(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n query listProductBackInStockRemind(\n $id: StringFilterInput\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean\n $email: StringFilterInput\n $productId: StringFilterInput\n $variantId: StringFilterInput\n ) {\n listProductBackInStockRemind(\n id: $id\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n email: $email\n productId: $productId\n variantId: $variantId\n ) {\n createdAt\n customerId\n deleted\n email\n id\n productId\n storefrontId\n updatedAt\n variantId\n }\n }\n "], ["\n query listProductBackInStockRemind(\n $id: StringFilterInput\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean\n $email: StringFilterInput\n $productId: StringFilterInput\n $variantId: StringFilterInput\n ) {\n listProductBackInStockRemind(\n id: $id\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n email: $email\n productId: $productId\n variantId: $variantId\n ) {\n createdAt\n customerId\n deleted\n email\n id\n productId\n storefrontId\n updatedAt\n variantId\n }\n }\n "])));
44083
+ _b.label = 1;
44084
+ case 1:
44085
+ _b.trys.push([1, 3, , 4]);
44086
+ return [4 /*yield*/, apollo
44087
+ .getClient()
44088
+ .query({
44089
+ query: QUERY,
44090
+ variables: {
44091
+ includeDeleted: listParams.includeDeleted,
44092
+ updatedAt: { gt: listParams.updatedAt },
44093
+ id: { eq: listParams.id },
44094
+ email: { eq: listParams.email },
44095
+ productId: { eq: listParams.productId },
44096
+ variantId: { eq: listParams.variantId },
44097
+ },
44098
+ })];
44099
+ case 2:
44100
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
44101
+ if (errors && errors.length) {
44102
+ return [2 /*return*/];
44103
+ }
44104
+ return [2 /*return*/, {
44105
+ data: data.listProductBackInStockRemind,
44106
+ }];
44107
+ case 3:
44108
+ err_1 = _b.sent();
44109
+ console.log(err_1);
44110
+ return [2 /*return*/];
44111
+ case 4: return [2 /*return*/];
44112
+ }
44113
+ });
44114
+ });
44115
+ };
44116
+ IkasProductBackInStockReminderAPI.save = function (input) {
44117
+ return __awaiter(this, void 0, void 0, function () {
44118
+ var MUTATION, _a, data, errors, err_2;
44119
+ return __generator(this, function (_b) {
44120
+ switch (_b.label) {
44121
+ case 0:
44122
+ MUTATION = src(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n mutation saveProductBackInStockRemind(\n $input: ProductBackInStockRemindInput!\n ) {\n saveProductBackInStockRemind(input: $input) {\n createdAt\n customerId\n deleted\n email\n id\n productId\n storefrontId\n updatedAt\n variantId\n }\n }\n "], ["\n mutation saveProductBackInStockRemind(\n $input: ProductBackInStockRemindInput!\n ) {\n saveProductBackInStockRemind(input: $input) {\n createdAt\n customerId\n deleted\n email\n id\n productId\n storefrontId\n updatedAt\n variantId\n }\n }\n "])));
44123
+ _b.label = 1;
44124
+ case 1:
44125
+ _b.trys.push([1, 3, , 4]);
44126
+ return [4 /*yield*/, apollo
44127
+ .getClient()
44128
+ .mutate({
44129
+ mutation: MUTATION,
44130
+ variables: {
44131
+ input: input,
44132
+ },
44133
+ })];
44134
+ case 2:
44135
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
44136
+ if (errors && errors.length) {
44137
+ console.log(errors);
44138
+ }
44139
+ if (data && data.saveProductBackInStockRemind)
44140
+ return [2 /*return*/, data.saveProductBackInStockRemind];
44141
+ return [3 /*break*/, 4];
44142
+ case 3:
44143
+ err_2 = _b.sent();
44144
+ console.log(err_2);
44145
+ return [3 /*break*/, 4];
44146
+ case 4: return [2 /*return*/];
44147
+ }
44148
+ });
44149
+ });
44150
+ };
44151
+ return IkasProductBackInStockReminderAPI;
44152
+ }());
44153
+ var templateObject_1$j, templateObject_2$9;
43426
44154
 
43427
44155
  var IkasProductListPropValueProvider = /** @class */ (function () {
43428
44156
  function IkasProductListPropValueProvider(pageType, productListPropValue, pageSpecificData) {
@@ -69004,6 +69732,7 @@ var CustomerLoginRequiredError = mobxReactLite.observer(function (_a) {
69004
69732
  var Errors = function (_a) {
69005
69733
  var _b;
69006
69734
  var vm = _a.vm;
69735
+ var ref = React.useRef(null);
69007
69736
  var onErrorClose = React.useCallback(function () {
69008
69737
  vm.error = undefined;
69009
69738
  }, [vm]);
@@ -69027,7 +69756,10 @@ var Errors = function (_a) {
69027
69756
  }
69028
69757
  if (!error)
69029
69758
  return null;
69030
- return React.createElement("div", { style: { marginBottom: "24px" } }, error);
69759
+ if (ref.current) {
69760
+ ref.current.scrollIntoView();
69761
+ }
69762
+ return (React.createElement("div", { ref: ref, style: { marginBottom: "24px" } }, error));
69031
69763
  };
69032
69764
  var Errors$1 = mobxReactLite.observer(Errors);
69033
69765
 
@@ -69281,6 +70013,8 @@ var AddressFormViewModel = /** @class */ (function () {
69281
70013
  id: country === null || country === void 0 ? void 0 : country.id,
69282
70014
  name: country === null || country === void 0 ? void 0 : country.name,
69283
70015
  code: country === null || country === void 0 ? void 0 : country.iso3,
70016
+ iso2: country === null || country === void 0 ? void 0 : country.iso2,
70017
+ iso3: country === null || country === void 0 ? void 0 : country.iso3,
69284
70018
  };
69285
70019
  _this.address.state = undefined;
69286
70020
  _this.address.city = undefined;
@@ -71000,7 +71734,7 @@ var Image = function (_a) {
71000
71734
  });
71001
71735
  return image.getSrc(closest);
71002
71736
  };
71003
- return (React.createElement(NextImage__default['default'], __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image", placeholder: useBlur ? "blur" : "empty", blurDataURL: useBlur ? image.getSrc(180) : undefined })));
71737
+ return (React.createElement(NextImage__default['default'], __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image", placeholder: useBlur ? "blur" : "empty", blurDataURL: useBlur ? image.getSrc(10) : undefined })));
71004
71738
  };
71005
71739
 
71006
71740
  var styles$k = {"StepContainer":"style-module_StepContainer__1O2dD","Step":"style-module_Step__1iOYA","StepTitleContainer":"style-module_StepTitleContainer__2GUg2","First":"style-module_First__cAzdJ","StepTitleTop":"style-module_StepTitleTop__3zfsj","WithRightContent":"style-module_WithRightContent__2fqb1","StepCircle":"style-module_StepCircle__36A5q","Selected":"style-module_Selected__3j91L","StepTitle":"style-module_StepTitle__10YDP","Light":"style-module_Light__15wSX","StepTitleRightContent":"style-module_StepTitleRightContent__2Q43m","StepContent":"style-module_StepContent__20QIi"};
@@ -71008,13 +71742,18 @@ var styles$k = {"StepContainer":"style-module_StepContainer__1O2dD","Step":"styl
71008
71742
  var StepContainer = mobxReactLite.observer(function (_a) {
71009
71743
  var steps = _a.steps, stepContent = _a.stepContent;
71010
71744
  React.useEffect(function () {
71011
- var _a;
71745
+ var _a, _b;
71012
71746
  var width = document.body.getBoundingClientRect().width;
71013
71747
  if (width < 768) {
71014
71748
  var selectedStepIndex = steps.findIndex(function (s) { return s.isSelected; });
71015
71749
  if (selectedStepIndex === 0)
71016
71750
  return;
71017
- (_a = document.getElementById("step-" + selectedStepIndex)) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
71751
+ if (selectedStepIndex === 2) {
71752
+ (_a = document.getElementById("step-" + 1)) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
71753
+ }
71754
+ else {
71755
+ (_b = document.getElementById("step-" + selectedStepIndex)) === null || _b === void 0 ? void 0 : _b.scrollIntoView();
71756
+ }
71018
71757
  }
71019
71758
  }, []);
71020
71759
  return (React.createElement("div", { className: styles$k.StepContainer }, steps.map(function (step, index) { return (React.createElement("div", { className: styles$k.Step },
@@ -71443,7 +72182,7 @@ var IkasStorefrontAPI = /** @class */ (function () {
71443
72182
  return __generator(this, function (_b) {
71444
72183
  switch (_b.label) {
71445
72184
  case 0:
71446
- QUERY = src(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "], ["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "])));
72185
+ QUERY = src(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "], ["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "])));
71447
72186
  _b.label = 1;
71448
72187
  case 1:
71449
72188
  _b.trys.push([1, 3, , 4]);
@@ -71474,7 +72213,7 @@ var IkasStorefrontAPI = /** @class */ (function () {
71474
72213
  };
71475
72214
  return IkasStorefrontAPI;
71476
72215
  }());
71477
- var templateObject_1$i;
72216
+ var templateObject_1$k;
71478
72217
 
71479
72218
  var IkasNextPageDataProvider = /** @class */ (function () {
71480
72219
  function IkasNextPageDataProvider() {
@@ -71513,7 +72252,7 @@ var IkasNextPageDataProvider = /** @class */ (function () {
71513
72252
  IkasNextPageDataProvider.getSettings = function (locale) {
71514
72253
  var _this = this;
71515
72254
  return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
71516
- var isLocal, storefrontResponse, storefront, localTheme, colorScript, settings, storefront_1, salesChannel_1, localizationMap, storefrontJSScripts_1, domain_1, themeLocalizationPath, routing_1;
72255
+ var isLocal, storefrontResponse, storefront, localTheme, colorScript, settings, storefront_1, salesChannel_1, localizationMap, storefrontJSScripts_1, domain_1, productBackInStockSettings_1, customerReviewSettings_1, themeLocalizationPath, routing_1;
71517
72256
  return __generator(this, function (_a) {
71518
72257
  switch (_a.label) {
71519
72258
  case 0:
@@ -71549,18 +72288,36 @@ var IkasNextPageDataProvider = /** @class */ (function () {
71549
72288
  stockPreference: localTheme.settings.stockPreference,
71550
72289
  storefrontJSScripts: colorScript ? [colorScript] : [],
71551
72290
  domain: "",
72291
+ productBackInStockSettings: {
72292
+ customerLoginRequired: true,
72293
+ },
72294
+ customerReviewSettings: {
72295
+ customerLoginRequired: true,
72296
+ customerPurchaseRequired: false,
72297
+ },
71552
72298
  });
71553
72299
  return [3 /*break*/, 5];
71554
72300
  case 3: return [4 /*yield*/, IkasNextPageDataProvider.readSettingsFile()];
71555
72301
  case 4:
71556
72302
  settings = _a.sent();
71557
- if (!settings)
72303
+ if (!settings || !settings.localizationMap)
71558
72304
  return [2 /*return*/, resolve(null)];
71559
72305
  storefront_1 = new IkasStorefront(settings.storefront);
71560
72306
  salesChannel_1 = new IkasSalesChannel(settings.salesChannel);
71561
72307
  localizationMap = settings.localizationMap;
71562
72308
  storefrontJSScripts_1 = settings.storefrontJSScripts || [];
71563
72309
  domain_1 = settings.domain;
72310
+ productBackInStockSettings_1 = settings.productBackInStockSettings
72311
+ ? {
72312
+ customerLoginRequired: settings.productBackInStockSettings.customerLoginRequired,
72313
+ }
72314
+ : null;
72315
+ customerReviewSettings_1 = settings.customerReviewSettings
72316
+ ? {
72317
+ customerLoginRequired: settings.customerReviewSettings.customerLoginRequired,
72318
+ customerPurchaseRequired: settings.customerReviewSettings.customerPurchaseRequired,
72319
+ }
72320
+ : null;
71564
72321
  themeLocalizationPath = localizationMap[locale];
71565
72322
  routing_1 = storefront_1.routings.find(function (r) { return r.id === locale || r.path === locale; });
71566
72323
  if (!themeLocalizationPath || !routing_1) {
@@ -71593,6 +72350,8 @@ var IkasNextPageDataProvider = /** @class */ (function () {
71593
72350
  stockPreference: stockPreference,
71594
72351
  storefrontJSScripts: storefrontJSScripts_1,
71595
72352
  domain: domain_1,
72353
+ productBackInStockSettings: productBackInStockSettings_1,
72354
+ customerReviewSettings: customerReviewSettings_1,
71596
72355
  });
71597
72356
  });
71598
72357
  _a.label = 5;
@@ -71604,7 +72363,7 @@ var IkasNextPageDataProvider = /** @class */ (function () {
71604
72363
  IkasNextPageDataProvider.getPageData = function (context, isServer, pageType, possiblePageTypes, isEditor) {
71605
72364
  var _a, _b;
71606
72365
  return __awaiter(this, void 0, void 0, function () {
71607
- var isLocal, isProdEditor, serverRuntimeConfig, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, storefrontJSScripts, domain, provider, componentIds_1, components, namespaces, nextI18nConf, currentLocale, i18nReader, translations, extraProps, checkoutComponent, checkoutSettings, customizationProps;
72366
+ var isLocal, isProdEditor, serverRuntimeConfig, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, storefrontJSScripts, domain, productBackInStockSettings, customerReviewSettings, provider, componentIds_1, components, namespaces, nextI18nConf, currentLocale, i18nReader, translations, extraProps, checkoutComponent, checkoutSettings, customizationProps;
71608
72367
  return __generator(this, function (_c) {
71609
72368
  switch (_c.label) {
71610
72369
  case 0:
@@ -71630,7 +72389,7 @@ var IkasNextPageDataProvider = /** @class */ (function () {
71630
72389
  notFound: true,
71631
72390
  }];
71632
72391
  }
71633
- storefront = settings.storefront, themeLocalization = settings.themeLocalization, salesChannel = settings.salesChannel, routing = settings.routing, favicon = settings.favicon, stockPreference = settings.stockPreference, storefrontJSScripts = settings.storefrontJSScripts, domain = settings.domain;
72392
+ storefront = settings.storefront, themeLocalization = settings.themeLocalization, salesChannel = settings.salesChannel, routing = settings.routing, favicon = settings.favicon, stockPreference = settings.stockPreference, storefrontJSScripts = settings.storefrontJSScripts, domain = settings.domain, productBackInStockSettings = settings.productBackInStockSettings, customerReviewSettings = settings.customerReviewSettings;
71634
72393
  IkasStorefrontConfig.storefrontId = storefront.id;
71635
72394
  IkasStorefrontConfig.storefrontRoutingId = routing.id;
71636
72395
  IkasStorefrontConfig.storefrontThemeId = storefront.mainStorefrontThemeId;
@@ -71645,6 +72404,8 @@ var IkasNextPageDataProvider = /** @class */ (function () {
71645
72404
  IkasStorefrontConfig.stockPreference = stockPreference || null;
71646
72405
  IkasStorefrontConfig.storefrontJSScripts = storefrontJSScripts || [];
71647
72406
  IkasStorefrontConfig.domain = domain;
72407
+ IkasStorefrontConfig.productBackInStockSettings = productBackInStockSettings;
72408
+ IkasStorefrontConfig.customerReviewSettings = customerReviewSettings;
71648
72409
  provider = new IkasPageDataProvider(themeLocalization.themeJson, context.params, pageType);
71649
72410
  provider.possiblePageTypes = possiblePageTypes;
71650
72411
  if (!!isEditor) return [3 /*break*/, 3];
@@ -72747,6 +73508,7 @@ exports.CartPage = cart$1;
72747
73508
  exports.CheckoutPage = checkout$1;
72748
73509
  exports.ContactForm = ContactForm;
72749
73510
  exports.CustomPage = _slug_$1;
73511
+ exports.CustomerReviewForm = CustomerReviewForm;
72750
73512
  exports.EditorPage = editor$1;
72751
73513
  exports.EmailRule = EmailRule;
72752
73514
  exports.EqualsRule = EqualsRule;
@@ -72792,6 +73554,9 @@ exports.IkasCountryAPI = IkasCountryAPI;
72792
73554
  exports.IkasCustomer = IkasCustomer;
72793
73555
  exports.IkasCustomerAPI = IkasCustomerAPI;
72794
73556
  exports.IkasCustomerAddress = IkasCustomerAddress;
73557
+ exports.IkasCustomerReview = IkasCustomerReview;
73558
+ exports.IkasCustomerReviewAPI = IkasCustomerReviewAPI;
73559
+ exports.IkasCustomerReviewList = IkasCustomerReviewList;
72795
73560
  exports.IkasDistrictAPI = IkasDistrictAPI;
72796
73561
  exports.IkasFavoriteProduct = IkasFavoriteProduct;
72797
73562
  exports.IkasFavoriteProductAPI = IkasFavoriteProductAPI;
@@ -72813,6 +73578,7 @@ exports.IkasProduct = IkasProduct;
72813
73578
  exports.IkasProductAttribute = IkasProductAttribute;
72814
73579
  exports.IkasProductAttributeAPI = IkasProductAttributeAPI;
72815
73580
  exports.IkasProductAttributeValue = IkasProductAttributeValue;
73581
+ exports.IkasProductBackInStockReminderAPI = IkasProductBackInStockReminderAPI;
72816
73582
  exports.IkasProductDetail = IkasProductDetail;
72817
73583
  exports.IkasProductDetailPropValue = IkasProductDetailPropValue;
72818
73584
  exports.IkasProductFilter = IkasProductFilter;