@ikas/storefront 0.0.161-alpha.18 → 0.0.161-alpha.3

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.
@@ -221,7 +221,6 @@ export declare enum ProductFilterDisplayTypeEnum {
221
221
  export declare enum ProductFilterSortTypeEnum {
222
222
  ALPHABETICAL_ASC = "ALPHABETICAL_ASC",
223
223
  ALPHABETICAL_DESC = "ALPHABETICAL_DESC",
224
- CUSTOM_SORT = "CUSTOM_SORT",
225
224
  PRODUCT_COUNT_ASC = "PRODUCT_COUNT_ASC",
226
225
  PRODUCT_COUNT_DESC = "PRODUCT_COUNT_DESC"
227
226
  }
@@ -263,7 +262,6 @@ export declare enum SortByDirectionEnum {
263
262
  export declare enum SortByTypeEnum {
264
263
  CREATED_AT = "CREATED_AT",
265
264
  DISCOUNT_RATIO = "DISCOUNT_RATIO",
266
- MANUAL_SORT = "MANUAL_SORT",
267
265
  NAME = "NAME",
268
266
  PRICE = "PRICE"
269
267
  }
@@ -67,5 +67,4 @@ export interface registerCustomerVariables {
67
67
  password: string;
68
68
  firstName: string;
69
69
  lastName: string;
70
- isAcceptMarketing?: boolean | null;
71
70
  }
@@ -9,7 +9,7 @@ export declare class IkasCustomerAPI {
9
9
  token: string;
10
10
  tokenExpiry: number;
11
11
  } | undefined>;
12
- static register(email: string, password: string, firstName: string, lastName: string, isAcceptMarketing?: boolean): Promise<{
12
+ static register(email: string, password: string, firstName: string, lastName: string): Promise<{
13
13
  customer: IkasCustomer;
14
14
  __typename: "CustomerLoginResponse";
15
15
  token: string;
package/build/index.es.js CHANGED
@@ -23548,11 +23548,11 @@ var IkasCustomerStore = /** @class */ (function () {
23548
23548
  }
23549
23549
  });
23550
23550
  }); };
23551
- this.register = function (firstName, lastName, email, password, isMarketingAccepted) { return __awaiter(_this, void 0, void 0, function () {
23551
+ this.register = function (firstName, lastName, email, password) { return __awaiter(_this, void 0, void 0, function () {
23552
23552
  var response;
23553
23553
  return __generator(this, function (_a) {
23554
23554
  switch (_a.label) {
23555
- case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName, isMarketingAccepted)];
23555
+ case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName)];
23556
23556
  case 1:
23557
23557
  response = _a.sent();
23558
23558
  if (response) {
@@ -27626,7 +27626,6 @@ var ProductFilterSortTypeEnum;
27626
27626
  (function (ProductFilterSortTypeEnum) {
27627
27627
  ProductFilterSortTypeEnum["ALPHABETICAL_ASC"] = "ALPHABETICAL_ASC";
27628
27628
  ProductFilterSortTypeEnum["ALPHABETICAL_DESC"] = "ALPHABETICAL_DESC";
27629
- ProductFilterSortTypeEnum["CUSTOM_SORT"] = "CUSTOM_SORT";
27630
27629
  ProductFilterSortTypeEnum["PRODUCT_COUNT_ASC"] = "PRODUCT_COUNT_ASC";
27631
27630
  ProductFilterSortTypeEnum["PRODUCT_COUNT_DESC"] = "PRODUCT_COUNT_DESC";
27632
27631
  })(ProductFilterSortTypeEnum || (ProductFilterSortTypeEnum = {}));
@@ -27673,7 +27672,6 @@ var SortByTypeEnum;
27673
27672
  (function (SortByTypeEnum) {
27674
27673
  SortByTypeEnum["CREATED_AT"] = "CREATED_AT";
27675
27674
  SortByTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
27676
- SortByTypeEnum["MANUAL_SORT"] = "MANUAL_SORT";
27677
27675
  SortByTypeEnum["NAME"] = "NAME";
27678
27676
  SortByTypeEnum["PRICE"] = "PRICE";
27679
27677
  })(SortByTypeEnum || (SortByTypeEnum = {}));
@@ -29676,7 +29674,6 @@ var RegisterForm = /** @class */ (function () {
29676
29674
  lastName: "",
29677
29675
  email: "",
29678
29676
  password: "",
29679
- isMarketingAccepted: false,
29680
29677
  };
29681
29678
  this.onFirstNameChange = function (value) {
29682
29679
  _this.firstName = value;
@@ -29776,16 +29773,6 @@ var RegisterForm = /** @class */ (function () {
29776
29773
  enumerable: false,
29777
29774
  configurable: true
29778
29775
  });
29779
- Object.defineProperty(RegisterForm.prototype, "isMarketingAccepted", {
29780
- get: function () {
29781
- return this.model.isMarketingAccepted;
29782
- },
29783
- set: function (value) {
29784
- this.model.isMarketingAccepted = value;
29785
- },
29786
- enumerable: false,
29787
- configurable: true
29788
- });
29789
29776
  Object.defineProperty(RegisterForm.prototype, "hasError", {
29790
29777
  get: function () {
29791
29778
  return this.validator.hasError;
@@ -29851,7 +29838,7 @@ var RegisterForm = /** @class */ (function () {
29851
29838
  _b.label = 2;
29852
29839
  case 2:
29853
29840
  _b.trys.push([2, 4, , 5]);
29854
- return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password, this.model.isMarketingAccepted)];
29841
+ return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password)];
29855
29842
  case 3:
29856
29843
  isRegisterSuccess = _b.sent();
29857
29844
  if (isRegisterSuccess) {
@@ -34366,13 +34353,13 @@ var IkasCustomerAPI = /** @class */ (function () {
34366
34353
  });
34367
34354
  });
34368
34355
  };
34369
- IkasCustomerAPI.register = function (email, password, firstName, lastName, isAcceptMarketing) {
34356
+ IkasCustomerAPI.register = function (email, password, firstName, lastName) {
34370
34357
  return __awaiter(this, void 0, void 0, function () {
34371
34358
  var MUTATION, _a, data, errors, err_2;
34372
34359
  return __generator(this, function (_b) {
34373
34360
  switch (_b.label) {
34374
34361
  case 0:
34375
- MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
34362
+ MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
34376
34363
  _b.label = 1;
34377
34364
  case 1:
34378
34365
  _b.trys.push([1, 3, , 4]);
@@ -34385,7 +34372,6 @@ var IkasCustomerAPI = /** @class */ (function () {
34385
34372
  password: password,
34386
34373
  firstName: firstName,
34387
34374
  lastName: lastName,
34388
- isAcceptMarketing: isAcceptMarketing,
34389
34375
  },
34390
34376
  })];
34391
34377
  case 2:
@@ -37682,30 +37668,6 @@ var index = /*#__PURE__*/Object.freeze({
37682
37668
  Image: Image
37683
37669
  });
37684
37670
 
37685
- /**
37686
- * Creates a duplicate-free version of an array, using
37687
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
37688
- * for equality comparisons, in which only the first occurrence of each element
37689
- * is kept. The order of result values is determined by the order they occur
37690
- * in the array.
37691
- *
37692
- * @static
37693
- * @memberOf _
37694
- * @since 0.1.0
37695
- * @category Array
37696
- * @param {Array} array The array to inspect.
37697
- * @returns {Array} Returns the new duplicate free array.
37698
- * @example
37699
- *
37700
- * _.uniq([2, 1, 2]);
37701
- * // => [2, 1]
37702
- */
37703
- function uniq(array) {
37704
- return (array && array.length) ? _baseUniq(array) : [];
37705
- }
37706
-
37707
- var uniq_1 = uniq;
37708
-
37709
37671
  var IkasStorefrontLocalization = /** @class */ (function () {
37710
37672
  function IkasStorefrontLocalization(data) {
37711
37673
  this.id = data.id || "";
@@ -37944,7 +37906,7 @@ var SettingsHelper = /** @class */ (function () {
37944
37906
  id: storefront.salesChannelId,
37945
37907
  }),
37946
37908
  routing: storefront.routings.length
37947
- ? storefront.routings.find(function (r) { return r.locale === locale || r.id === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37909
+ ? storefront.routings.find(function (r) { return r.locale === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37948
37910
  storefront.routings[0]
37949
37911
  : new IkasStorefrontRouting({}),
37950
37912
  favicon: localTheme.settings.favicon,
@@ -37992,10 +37954,10 @@ var SettingsHelper = /** @class */ (function () {
37992
37954
  });
37993
37955
  }); });
37994
37956
  };
37995
- SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes, isEditor) {
37957
+ SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
37996
37958
  var _a;
37997
37959
  return __awaiter(this, void 0, void 0, function () {
37998
- var isLocal, locale, serverRuntimeConfig, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, nextI18nConf, routingLocales, defaultRoutingLocale, _b, _c;
37960
+ var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, _b, _c;
37999
37961
  var _d, _e;
38000
37962
  return __generator(this, function (_f) {
38001
37963
  switch (_f.label) {
@@ -38008,7 +37970,6 @@ var SettingsHelper = /** @class */ (function () {
38008
37970
  notFound: true,
38009
37971
  }];
38010
37972
  }
38011
- serverRuntimeConfig = getConfig().serverRuntimeConfig;
38012
37973
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
38013
37974
  case 1:
38014
37975
  settings = _f.sent();
@@ -38035,67 +37996,42 @@ var SettingsHelper = /** @class */ (function () {
38035
37996
  IkasStorefrontConfig.stockPreference = stockPreference || null;
38036
37997
  provider = new IkasPageDataProvider(themeLocalization.themeJson, context.params, pageType);
38037
37998
  provider.possiblePageTypes = possiblePageTypes;
38038
- if (!!isEditor) return [3 /*break*/, 3];
38039
37999
  return [4 /*yield*/, provider.getPageData()];
38040
38000
  case 2:
38041
38001
  _f.sent();
38042
- _f.label = 3;
38043
- case 3:
38044
38002
  if (!provider.page) {
38045
- if (!isEditor)
38046
- return [2 /*return*/, {
38047
- props: {},
38048
- notFound: true,
38049
- }];
38003
+ return [2 /*return*/, {
38004
+ props: {},
38005
+ notFound: true,
38006
+ }];
38050
38007
  }
38051
- componentIds = isEditor
38052
- ? provider.theme.components.map(function (c) { return c.id; })
38053
- : provider.page.components.map(function (pc) { return pc.componentId; });
38054
- components = themeLocalization.themeJson.components.filter(function (c) { return isEditor || componentIds.includes(c.id); });
38008
+ componentIds = provider.page.components.map(function (pc) { return pc.componentId; });
38009
+ components = themeLocalization.themeJson.components.filter(function (c) {
38010
+ return componentIds.includes(c.id);
38011
+ });
38055
38012
  componentDirs = __spreadArrays(["common"], components.map(function (c) { return c.dir; }));
38056
- nextI18nConf = serverRuntimeConfig.nextI18nConf;
38057
- routingLocales = uniq_1(storefront.routings.map(function (sr) { return sr.locale; }));
38058
- defaultRoutingLocale = routing.locale;
38059
- if (!isServer) return [3 /*break*/, 5];
38013
+ if (!isServer) return [3 /*break*/, 4];
38060
38014
  _d = {};
38061
38015
  _b = [{}];
38062
- return [4 /*yield*/, serverSideTranslations(routing.locale, componentDirs, isLocal
38063
- ? undefined
38064
- : {
38065
- i18n: {
38066
- locales: routingLocales,
38067
- defaultLocale: defaultRoutingLocale,
38068
- },
38069
- serializeConfig: false,
38070
- localePath: nextI18nConf.localePath,
38071
- })];
38072
- case 4: return [2 /*return*/, (_d.props = __assign.apply(void 0, [__assign.apply(void 0, _b.concat([(_f.sent())])), provider.nextPageData.props]),
38016
+ return [4 /*yield*/, serverSideTranslations(locale, componentDirs)];
38017
+ case 3: return [2 /*return*/, (_d.props = __assign.apply(void 0, [__assign.apply(void 0, _b.concat([(_f.sent())])), provider.nextPageData.props]),
38073
38018
  _d)];
38074
- case 5:
38019
+ case 4:
38075
38020
  _e = {};
38076
38021
  _c = [{}];
38077
- return [4 /*yield*/, serverSideTranslations(routing.locale, componentDirs, isLocal
38078
- ? undefined
38079
- : {
38080
- i18n: {
38081
- locales: routingLocales,
38082
- defaultLocale: defaultRoutingLocale,
38083
- },
38084
- serializeConfig: false,
38085
- localePath: nextI18nConf.localePath,
38086
- })];
38087
- case 6: return [2 /*return*/, (_e.props = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), provider.nextPageData.props]),
38022
+ return [4 /*yield*/, serverSideTranslations(locale, componentDirs)];
38023
+ case 5: return [2 /*return*/, (_e.props = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), provider.nextPageData.props]),
38088
38024
  _e.revalidate = 60,
38089
38025
  _e)];
38090
38026
  }
38091
38027
  });
38092
38028
  });
38093
38029
  };
38094
- SettingsHelper.getStaticProps = function (context, pageType, possiblePageTypes, isEditor) {
38030
+ SettingsHelper.getStaticProps = function (context, pageType, possiblePageTypes) {
38095
38031
  return __awaiter(this, void 0, void 0, function () {
38096
38032
  return __generator(this, function (_a) {
38097
38033
  switch (_a.label) {
38098
- case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType, possiblePageTypes, isEditor)];
38034
+ case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType, possiblePageTypes)];
38099
38035
  case 1: return [2 /*return*/, _a.sent()];
38100
38036
  }
38101
38037
  });
@@ -38325,17 +38261,16 @@ var CheckoutPage = function (_a) {
38325
38261
  };
38326
38262
  var _id_ = observer(CheckoutPage);
38327
38263
  var getServerSideProps = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38328
- var id, locale, settings, storefront, themeLocalization, salesChannel, routing, redirect, checkout, checkoutSettings, componentDirs, isLocal, serverRuntimeConfig, routingLocales, defaultRoutingLocale, nextI18nConf, _a;
38329
- var _b;
38330
- var _c;
38331
- return __generator(this, function (_d) {
38332
- switch (_d.label) {
38264
+ var id, locale, settings, storefront, themeLocalization, salesChannel, routing, redirect, checkout, checkoutSettings;
38265
+ var _a;
38266
+ return __generator(this, function (_b) {
38267
+ switch (_b.label) {
38333
38268
  case 0:
38334
38269
  id = context.query.id;
38335
38270
  locale = context.locale || context.defaultLocale || "en";
38336
38271
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
38337
38272
  case 1:
38338
- settings = _d.sent();
38273
+ settings = _b.sent();
38339
38274
  // TODO maybe remove this and convert this page to static
38340
38275
  if (!settings ||
38341
38276
  !settings.storefront.mainStorefrontThemeId ||
@@ -38351,7 +38286,7 @@ var getServerSideProps = function (context) { return __awaiter(void 0, void 0, v
38351
38286
  IkasStorefrontConfig.storefrontThemeId = storefront.mainStorefrontThemeId;
38352
38287
  IkasStorefrontConfig.salesChannelId = storefront.salesChannelId;
38353
38288
  IkasStorefrontConfig.priceListId = routing.priceListId || undefined;
38354
- IkasStorefrontConfig.stockLocationIds = (_c = salesChannel.stockLocations) === null || _c === void 0 ? void 0 : _c.map(function (sl) { return sl.id; });
38289
+ IkasStorefrontConfig.stockLocationIds = (_a = salesChannel.stockLocations) === null || _a === void 0 ? void 0 : _a.map(function (sl) { return sl.id; });
38355
38290
  IkasStorefrontConfig.routings = storefront.routings;
38356
38291
  IkasStorefrontConfig.paymentGateways = salesChannel.paymentGateways || [];
38357
38292
  IkasStorefrontConfig.gtmId = storefront.gtmId || undefined;
@@ -38367,33 +38302,24 @@ var getServerSideProps = function (context) { return __awaiter(void 0, void 0, v
38367
38302
  }
38368
38303
  return [4 /*yield*/, IkasCheckoutAPI.getCheckoutById(id)];
38369
38304
  case 2:
38370
- checkout = _d.sent();
38371
- if (!checkout) return [3 /*break*/, 5];
38305
+ checkout = _b.sent();
38306
+ if (!checkout) return [3 /*break*/, 4];
38372
38307
  return [4 /*yield*/, IkasCheckoutAPI.listCheckoutSettings()];
38373
38308
  case 3:
38374
- checkoutSettings = _d.sent();
38375
- componentDirs = ["common", "checkout-page"];
38376
- isLocal = process.env.NEXT_PUBLIC_ENV === "local";
38377
- serverRuntimeConfig = getConfig().serverRuntimeConfig;
38378
- routingLocales = uniq_1(storefront.routings.map(function (sr) { return sr.locale; }));
38379
- defaultRoutingLocale = routing.locale;
38380
- nextI18nConf = serverRuntimeConfig.nextI18nConf;
38381
- _b = {};
38382
- _a = [{}];
38383
- return [4 /*yield*/, serverSideTranslations(routing.locale, componentDirs, isLocal
38384
- ? undefined
38385
- : {
38386
- i18n: {
38387
- locales: routingLocales,
38388
- defaultLocale: defaultRoutingLocale,
38389
- },
38390
- serializeConfig: false,
38391
- localePath: nextI18nConf.localePath,
38392
- })];
38393
- case 4: return [2 /*return*/, (_b.props = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_d.sent())])), { checkoutStr: JSON.stringify(checkout), checkoutSettingsStr: (checkoutSettings === null || checkoutSettings === void 0 ? void 0 : checkoutSettings.length) ? JSON.stringify(checkoutSettings[0])
38394
- : null, configJson: IkasStorefrontConfig.getJson(), returnPolicy: themeLocalization.returnPolicy || "", privacyPolicy: themeLocalization.privacyPolicy || "", termsOfService: themeLocalization.termsOfService || "", queryParams: context.query }]),
38395
- _b)];
38396
- case 5: return [2 /*return*/, redirect()];
38309
+ checkoutSettings = _b.sent();
38310
+ return [2 /*return*/, {
38311
+ props: {
38312
+ checkoutStr: JSON.stringify(checkout),
38313
+ checkoutSettingsStr: (checkoutSettings === null || checkoutSettings === void 0 ? void 0 : checkoutSettings.length) ? JSON.stringify(checkoutSettings[0])
38314
+ : null,
38315
+ configJson: IkasStorefrontConfig.getJson(),
38316
+ returnPolicy: themeLocalization.returnPolicy || "",
38317
+ privacyPolicy: themeLocalization.privacyPolicy || "",
38318
+ termsOfService: themeLocalization.termsOfService || "",
38319
+ queryParams: context.query,
38320
+ },
38321
+ }];
38322
+ case 4: return [2 /*return*/, redirect()];
38397
38323
  }
38398
38324
  });
38399
38325
  }); };
@@ -38628,19 +38554,10 @@ var IkasPageEditor$1 = dynamic(function () { return Promise.resolve().then(funct
38628
38554
  var Page$c = function () {
38629
38555
  return createElement(IkasPageEditor$1, null);
38630
38556
  };
38631
- var getStaticProps$b = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38632
- return __generator(this, function (_a) {
38633
- switch (_a.label) {
38634
- case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, undefined, true)];
38635
- case 1: return [2 /*return*/, _a.sent()];
38636
- }
38637
- });
38638
- }); };
38639
38557
  var editor = observer(Page$c);
38640
38558
 
38641
38559
  var editor$1 = /*#__PURE__*/Object.freeze({
38642
38560
  __proto__: null,
38643
- getStaticProps: getStaticProps$b,
38644
38561
  'default': editor
38645
38562
  });
38646
38563
 
@@ -38653,7 +38570,7 @@ var Page$d = function (_a) {
38653
38570
  }, [propValuesStr]);
38654
38571
  return (createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
38655
38572
  };
38656
- var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38573
+ var getStaticProps$b = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38657
38574
  return __generator(this, function (_a) {
38658
38575
  switch (_a.label) {
38659
38576
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, IkasThemePageType.FAVORITE_PRODUCTS)];
@@ -38665,7 +38582,7 @@ var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, voi
38665
38582
  var favoriteProducts = /*#__PURE__*/Object.freeze({
38666
38583
  __proto__: null,
38667
38584
  'default': Page$d,
38668
- getStaticProps: getStaticProps$c
38585
+ getStaticProps: getStaticProps$b
38669
38586
  });
38670
38587
 
38671
38588
  var Page$e = function (_a) {
@@ -38685,7 +38602,7 @@ var Page$e = function (_a) {
38685
38602
  }, [isBrowser, propValuesStr]);
38686
38603
  return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
38687
38604
  };
38688
- var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38605
+ var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38689
38606
  return __generator(this, function (_a) {
38690
38607
  switch (_a.label) {
38691
38608
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, IkasThemePageType.SEARCH)];
@@ -38697,7 +38614,7 @@ var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, voi
38697
38614
  var search = /*#__PURE__*/Object.freeze({
38698
38615
  __proto__: null,
38699
38616
  'default': Page$e,
38700
- getStaticProps: getStaticProps$d
38617
+ getStaticProps: getStaticProps$c
38701
38618
  });
38702
38619
 
38703
38620
  var Page$f = function (_a) {
@@ -38711,7 +38628,7 @@ var Page$f = function (_a) {
38711
38628
  }, [propValuesStr]);
38712
38629
  return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
38713
38630
  };
38714
- var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38631
+ var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38715
38632
  var props;
38716
38633
  return __generator(this, function (_a) {
38717
38634
  switch (_a.label) {
@@ -38733,7 +38650,7 @@ var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, voi
38733
38650
  var _404 = /*#__PURE__*/Object.freeze({
38734
38651
  __proto__: null,
38735
38652
  'default': Page$f,
38736
- getStaticProps: getStaticProps$e
38653
+ getStaticProps: getStaticProps$d
38737
38654
  });
38738
38655
 
38739
38656
  var Page$g = function (_a) {
@@ -38745,7 +38662,7 @@ var Page$g = function (_a) {
38745
38662
  }, [propValuesStr]);
38746
38663
  return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
38747
38664
  };
38748
- var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38665
+ var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38749
38666
  return __generator(this, function (_a) {
38750
38667
  switch (_a.label) {
38751
38668
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, IkasThemePageType.BLOG_INDEX)];
@@ -38757,7 +38674,7 @@ var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, voi
38757
38674
  var index$5 = /*#__PURE__*/Object.freeze({
38758
38675
  __proto__: null,
38759
38676
  'default': Page$g,
38760
- getStaticProps: getStaticProps$f
38677
+ getStaticProps: getStaticProps$e
38761
38678
  });
38762
38679
 
38763
38680
  var Page$h = function (_a) {
@@ -38786,7 +38703,7 @@ var getStaticPaths$2 = function (context) { return __awaiter(void 0, void 0, voi
38786
38703
  }];
38787
38704
  });
38788
38705
  }); };
38789
- var getStaticProps$g = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38706
+ var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38790
38707
  return __generator(this, function (_a) {
38791
38708
  switch (_a.label) {
38792
38709
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, [
@@ -38802,7 +38719,7 @@ var _slug_$2 = /*#__PURE__*/Object.freeze({
38802
38719
  __proto__: null,
38803
38720
  'default': _slug_$1,
38804
38721
  getStaticPaths: getStaticPaths$2,
38805
- getStaticProps: getStaticProps$g
38722
+ getStaticProps: getStaticProps$f
38806
38723
  });
38807
38724
 
38808
38725
  /**
package/build/index.js CHANGED
@@ -23554,11 +23554,11 @@ var IkasCustomerStore = /** @class */ (function () {
23554
23554
  }
23555
23555
  });
23556
23556
  }); };
23557
- this.register = function (firstName, lastName, email, password, isMarketingAccepted) { return __awaiter(_this, void 0, void 0, function () {
23557
+ this.register = function (firstName, lastName, email, password) { return __awaiter(_this, void 0, void 0, function () {
23558
23558
  var response;
23559
23559
  return __generator(this, function (_a) {
23560
23560
  switch (_a.label) {
23561
- case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName, isMarketingAccepted)];
23561
+ case 0: return [4 /*yield*/, IkasCustomerAPI.register(email, password, firstName, lastName)];
23562
23562
  case 1:
23563
23563
  response = _a.sent();
23564
23564
  if (response) {
@@ -27607,7 +27607,6 @@ var ProductFilterSortTypeEnum;
27607
27607
  (function (ProductFilterSortTypeEnum) {
27608
27608
  ProductFilterSortTypeEnum["ALPHABETICAL_ASC"] = "ALPHABETICAL_ASC";
27609
27609
  ProductFilterSortTypeEnum["ALPHABETICAL_DESC"] = "ALPHABETICAL_DESC";
27610
- ProductFilterSortTypeEnum["CUSTOM_SORT"] = "CUSTOM_SORT";
27611
27610
  ProductFilterSortTypeEnum["PRODUCT_COUNT_ASC"] = "PRODUCT_COUNT_ASC";
27612
27611
  ProductFilterSortTypeEnum["PRODUCT_COUNT_DESC"] = "PRODUCT_COUNT_DESC";
27613
27612
  })(ProductFilterSortTypeEnum || (ProductFilterSortTypeEnum = {}));
@@ -27654,7 +27653,6 @@ var SortByTypeEnum;
27654
27653
  (function (SortByTypeEnum) {
27655
27654
  SortByTypeEnum["CREATED_AT"] = "CREATED_AT";
27656
27655
  SortByTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
27657
- SortByTypeEnum["MANUAL_SORT"] = "MANUAL_SORT";
27658
27656
  SortByTypeEnum["NAME"] = "NAME";
27659
27657
  SortByTypeEnum["PRICE"] = "PRICE";
27660
27658
  })(SortByTypeEnum || (SortByTypeEnum = {}));
@@ -29654,7 +29652,6 @@ var RegisterForm = /** @class */ (function () {
29654
29652
  lastName: "",
29655
29653
  email: "",
29656
29654
  password: "",
29657
- isMarketingAccepted: false,
29658
29655
  };
29659
29656
  this.onFirstNameChange = function (value) {
29660
29657
  _this.firstName = value;
@@ -29754,16 +29751,6 @@ var RegisterForm = /** @class */ (function () {
29754
29751
  enumerable: false,
29755
29752
  configurable: true
29756
29753
  });
29757
- Object.defineProperty(RegisterForm.prototype, "isMarketingAccepted", {
29758
- get: function () {
29759
- return this.model.isMarketingAccepted;
29760
- },
29761
- set: function (value) {
29762
- this.model.isMarketingAccepted = value;
29763
- },
29764
- enumerable: false,
29765
- configurable: true
29766
- });
29767
29754
  Object.defineProperty(RegisterForm.prototype, "hasError", {
29768
29755
  get: function () {
29769
29756
  return this.validator.hasError;
@@ -29829,7 +29816,7 @@ var RegisterForm = /** @class */ (function () {
29829
29816
  _b.label = 2;
29830
29817
  case 2:
29831
29818
  _b.trys.push([2, 4, , 5]);
29832
- return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password, this.model.isMarketingAccepted)];
29819
+ return [4 /*yield*/, this.store.customerStore.register(this.model.firstName, this.model.lastName, this.model.email, this.model.password)];
29833
29820
  case 3:
29834
29821
  isRegisterSuccess = _b.sent();
29835
29822
  if (isRegisterSuccess) {
@@ -34343,13 +34330,13 @@ var IkasCustomerAPI = /** @class */ (function () {
34343
34330
  });
34344
34331
  });
34345
34332
  };
34346
- IkasCustomerAPI.register = function (email, password, firstName, lastName, isAcceptMarketing) {
34333
+ IkasCustomerAPI.register = function (email, password, firstName, lastName) {
34347
34334
  return __awaiter(this, void 0, void 0, function () {
34348
34335
  var MUTATION, _a, data, errors, err_2;
34349
34336
  return __generator(this, function (_b) {
34350
34337
  switch (_b.label) {
34351
34338
  case 0:
34352
- MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
34339
+ MUTATION = src(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "], ["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\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 id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "])));
34353
34340
  _b.label = 1;
34354
34341
  case 1:
34355
34342
  _b.trys.push([1, 3, , 4]);
@@ -34362,7 +34349,6 @@ var IkasCustomerAPI = /** @class */ (function () {
34362
34349
  password: password,
34363
34350
  firstName: firstName,
34364
34351
  lastName: lastName,
34365
- isAcceptMarketing: isAcceptMarketing,
34366
34352
  },
34367
34353
  })];
34368
34354
  case 2:
@@ -37659,30 +37645,6 @@ var index = /*#__PURE__*/Object.freeze({
37659
37645
  Image: Image
37660
37646
  });
37661
37647
 
37662
- /**
37663
- * Creates a duplicate-free version of an array, using
37664
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
37665
- * for equality comparisons, in which only the first occurrence of each element
37666
- * is kept. The order of result values is determined by the order they occur
37667
- * in the array.
37668
- *
37669
- * @static
37670
- * @memberOf _
37671
- * @since 0.1.0
37672
- * @category Array
37673
- * @param {Array} array The array to inspect.
37674
- * @returns {Array} Returns the new duplicate free array.
37675
- * @example
37676
- *
37677
- * _.uniq([2, 1, 2]);
37678
- * // => [2, 1]
37679
- */
37680
- function uniq(array) {
37681
- return (array && array.length) ? _baseUniq(array) : [];
37682
- }
37683
-
37684
- var uniq_1 = uniq;
37685
-
37686
37648
  var IkasStorefrontLocalization = /** @class */ (function () {
37687
37649
  function IkasStorefrontLocalization(data) {
37688
37650
  this.id = data.id || "";
@@ -37921,7 +37883,7 @@ var SettingsHelper = /** @class */ (function () {
37921
37883
  id: storefront.salesChannelId,
37922
37884
  }),
37923
37885
  routing: storefront.routings.length
37924
- ? storefront.routings.find(function (r) { return r.locale === locale || r.id === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37886
+ ? storefront.routings.find(function (r) { return r.locale === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37925
37887
  storefront.routings[0]
37926
37888
  : new IkasStorefrontRouting({}),
37927
37889
  favicon: localTheme.settings.favicon,
@@ -37969,10 +37931,10 @@ var SettingsHelper = /** @class */ (function () {
37969
37931
  });
37970
37932
  }); });
37971
37933
  };
37972
- SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes, isEditor) {
37934
+ SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
37973
37935
  var _a;
37974
37936
  return __awaiter(this, void 0, void 0, function () {
37975
- var isLocal, locale, serverRuntimeConfig, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, nextI18nConf, routingLocales, defaultRoutingLocale, _b, _c;
37937
+ var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, _b, _c;
37976
37938
  var _d, _e;
37977
37939
  return __generator(this, function (_f) {
37978
37940
  switch (_f.label) {
@@ -37985,7 +37947,6 @@ var SettingsHelper = /** @class */ (function () {
37985
37947
  notFound: true,
37986
37948
  }];
37987
37949
  }
37988
- serverRuntimeConfig = getConfig__default['default']().serverRuntimeConfig;
37989
37950
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
37990
37951
  case 1:
37991
37952
  settings = _f.sent();
@@ -38012,67 +37973,42 @@ var SettingsHelper = /** @class */ (function () {
38012
37973
  IkasStorefrontConfig.stockPreference = stockPreference || null;
38013
37974
  provider = new IkasPageDataProvider(themeLocalization.themeJson, context.params, pageType);
38014
37975
  provider.possiblePageTypes = possiblePageTypes;
38015
- if (!!isEditor) return [3 /*break*/, 3];
38016
37976
  return [4 /*yield*/, provider.getPageData()];
38017
37977
  case 2:
38018
37978
  _f.sent();
38019
- _f.label = 3;
38020
- case 3:
38021
37979
  if (!provider.page) {
38022
- if (!isEditor)
38023
- return [2 /*return*/, {
38024
- props: {},
38025
- notFound: true,
38026
- }];
37980
+ return [2 /*return*/, {
37981
+ props: {},
37982
+ notFound: true,
37983
+ }];
38027
37984
  }
38028
- componentIds = isEditor
38029
- ? provider.theme.components.map(function (c) { return c.id; })
38030
- : provider.page.components.map(function (pc) { return pc.componentId; });
38031
- components = themeLocalization.themeJson.components.filter(function (c) { return isEditor || componentIds.includes(c.id); });
37985
+ componentIds = provider.page.components.map(function (pc) { return pc.componentId; });
37986
+ components = themeLocalization.themeJson.components.filter(function (c) {
37987
+ return componentIds.includes(c.id);
37988
+ });
38032
37989
  componentDirs = __spreadArrays(["common"], components.map(function (c) { return c.dir; }));
38033
- nextI18nConf = serverRuntimeConfig.nextI18nConf;
38034
- routingLocales = uniq_1(storefront.routings.map(function (sr) { return sr.locale; }));
38035
- defaultRoutingLocale = routing.locale;
38036
- if (!isServer) return [3 /*break*/, 5];
37990
+ if (!isServer) return [3 /*break*/, 4];
38037
37991
  _d = {};
38038
37992
  _b = [{}];
38039
- return [4 /*yield*/, serverSideTranslations.serverSideTranslations(routing.locale, componentDirs, isLocal
38040
- ? undefined
38041
- : {
38042
- i18n: {
38043
- locales: routingLocales,
38044
- defaultLocale: defaultRoutingLocale,
38045
- },
38046
- serializeConfig: false,
38047
- localePath: nextI18nConf.localePath,
38048
- })];
38049
- case 4: return [2 /*return*/, (_d.props = __assign.apply(void 0, [__assign.apply(void 0, _b.concat([(_f.sent())])), provider.nextPageData.props]),
37993
+ return [4 /*yield*/, serverSideTranslations.serverSideTranslations(locale, componentDirs)];
37994
+ case 3: return [2 /*return*/, (_d.props = __assign.apply(void 0, [__assign.apply(void 0, _b.concat([(_f.sent())])), provider.nextPageData.props]),
38050
37995
  _d)];
38051
- case 5:
37996
+ case 4:
38052
37997
  _e = {};
38053
37998
  _c = [{}];
38054
- return [4 /*yield*/, serverSideTranslations.serverSideTranslations(routing.locale, componentDirs, isLocal
38055
- ? undefined
38056
- : {
38057
- i18n: {
38058
- locales: routingLocales,
38059
- defaultLocale: defaultRoutingLocale,
38060
- },
38061
- serializeConfig: false,
38062
- localePath: nextI18nConf.localePath,
38063
- })];
38064
- case 6: return [2 /*return*/, (_e.props = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), provider.nextPageData.props]),
37999
+ return [4 /*yield*/, serverSideTranslations.serverSideTranslations(locale, componentDirs)];
38000
+ case 5: return [2 /*return*/, (_e.props = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), provider.nextPageData.props]),
38065
38001
  _e.revalidate = 60,
38066
38002
  _e)];
38067
38003
  }
38068
38004
  });
38069
38005
  });
38070
38006
  };
38071
- SettingsHelper.getStaticProps = function (context, pageType, possiblePageTypes, isEditor) {
38007
+ SettingsHelper.getStaticProps = function (context, pageType, possiblePageTypes) {
38072
38008
  return __awaiter(this, void 0, void 0, function () {
38073
38009
  return __generator(this, function (_a) {
38074
38010
  switch (_a.label) {
38075
- case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType, possiblePageTypes, isEditor)];
38011
+ case 0: return [4 /*yield*/, SettingsHelper.getPageData(context, false, pageType, possiblePageTypes)];
38076
38012
  case 1: return [2 /*return*/, _a.sent()];
38077
38013
  }
38078
38014
  });
@@ -38302,17 +38238,16 @@ var CheckoutPage = function (_a) {
38302
38238
  };
38303
38239
  var _id_ = mobxReactLite.observer(CheckoutPage);
38304
38240
  var getServerSideProps = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38305
- var id, locale, settings, storefront, themeLocalization, salesChannel, routing, redirect, checkout, checkoutSettings, componentDirs, isLocal, serverRuntimeConfig, routingLocales, defaultRoutingLocale, nextI18nConf, _a;
38306
- var _b;
38307
- var _c;
38308
- return __generator(this, function (_d) {
38309
- switch (_d.label) {
38241
+ var id, locale, settings, storefront, themeLocalization, salesChannel, routing, redirect, checkout, checkoutSettings;
38242
+ var _a;
38243
+ return __generator(this, function (_b) {
38244
+ switch (_b.label) {
38310
38245
  case 0:
38311
38246
  id = context.query.id;
38312
38247
  locale = context.locale || context.defaultLocale || "en";
38313
38248
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
38314
38249
  case 1:
38315
- settings = _d.sent();
38250
+ settings = _b.sent();
38316
38251
  // TODO maybe remove this and convert this page to static
38317
38252
  if (!settings ||
38318
38253
  !settings.storefront.mainStorefrontThemeId ||
@@ -38328,7 +38263,7 @@ var getServerSideProps = function (context) { return __awaiter(void 0, void 0, v
38328
38263
  IkasStorefrontConfig.storefrontThemeId = storefront.mainStorefrontThemeId;
38329
38264
  IkasStorefrontConfig.salesChannelId = storefront.salesChannelId;
38330
38265
  IkasStorefrontConfig.priceListId = routing.priceListId || undefined;
38331
- IkasStorefrontConfig.stockLocationIds = (_c = salesChannel.stockLocations) === null || _c === void 0 ? void 0 : _c.map(function (sl) { return sl.id; });
38266
+ IkasStorefrontConfig.stockLocationIds = (_a = salesChannel.stockLocations) === null || _a === void 0 ? void 0 : _a.map(function (sl) { return sl.id; });
38332
38267
  IkasStorefrontConfig.routings = storefront.routings;
38333
38268
  IkasStorefrontConfig.paymentGateways = salesChannel.paymentGateways || [];
38334
38269
  IkasStorefrontConfig.gtmId = storefront.gtmId || undefined;
@@ -38344,33 +38279,24 @@ var getServerSideProps = function (context) { return __awaiter(void 0, void 0, v
38344
38279
  }
38345
38280
  return [4 /*yield*/, IkasCheckoutAPI.getCheckoutById(id)];
38346
38281
  case 2:
38347
- checkout = _d.sent();
38348
- if (!checkout) return [3 /*break*/, 5];
38282
+ checkout = _b.sent();
38283
+ if (!checkout) return [3 /*break*/, 4];
38349
38284
  return [4 /*yield*/, IkasCheckoutAPI.listCheckoutSettings()];
38350
38285
  case 3:
38351
- checkoutSettings = _d.sent();
38352
- componentDirs = ["common", "checkout-page"];
38353
- isLocal = process.env.NEXT_PUBLIC_ENV === "local";
38354
- serverRuntimeConfig = getConfig__default['default']().serverRuntimeConfig;
38355
- routingLocales = uniq_1(storefront.routings.map(function (sr) { return sr.locale; }));
38356
- defaultRoutingLocale = routing.locale;
38357
- nextI18nConf = serverRuntimeConfig.nextI18nConf;
38358
- _b = {};
38359
- _a = [{}];
38360
- return [4 /*yield*/, serverSideTranslations.serverSideTranslations(routing.locale, componentDirs, isLocal
38361
- ? undefined
38362
- : {
38363
- i18n: {
38364
- locales: routingLocales,
38365
- defaultLocale: defaultRoutingLocale,
38366
- },
38367
- serializeConfig: false,
38368
- localePath: nextI18nConf.localePath,
38369
- })];
38370
- case 4: return [2 /*return*/, (_b.props = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_d.sent())])), { checkoutStr: JSON.stringify(checkout), checkoutSettingsStr: (checkoutSettings === null || checkoutSettings === void 0 ? void 0 : checkoutSettings.length) ? JSON.stringify(checkoutSettings[0])
38371
- : null, configJson: IkasStorefrontConfig.getJson(), returnPolicy: themeLocalization.returnPolicy || "", privacyPolicy: themeLocalization.privacyPolicy || "", termsOfService: themeLocalization.termsOfService || "", queryParams: context.query }]),
38372
- _b)];
38373
- case 5: return [2 /*return*/, redirect()];
38286
+ checkoutSettings = _b.sent();
38287
+ return [2 /*return*/, {
38288
+ props: {
38289
+ checkoutStr: JSON.stringify(checkout),
38290
+ checkoutSettingsStr: (checkoutSettings === null || checkoutSettings === void 0 ? void 0 : checkoutSettings.length) ? JSON.stringify(checkoutSettings[0])
38291
+ : null,
38292
+ configJson: IkasStorefrontConfig.getJson(),
38293
+ returnPolicy: themeLocalization.returnPolicy || "",
38294
+ privacyPolicy: themeLocalization.privacyPolicy || "",
38295
+ termsOfService: themeLocalization.termsOfService || "",
38296
+ queryParams: context.query,
38297
+ },
38298
+ }];
38299
+ case 4: return [2 /*return*/, redirect()];
38374
38300
  }
38375
38301
  });
38376
38302
  }); };
@@ -38605,19 +38531,10 @@ var IkasPageEditor$1 = dynamic__default['default'](function () { return Promise.
38605
38531
  var Page$c = function () {
38606
38532
  return React.createElement(IkasPageEditor$1, null);
38607
38533
  };
38608
- var getStaticProps$b = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38609
- return __generator(this, function (_a) {
38610
- switch (_a.label) {
38611
- case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, undefined, true)];
38612
- case 1: return [2 /*return*/, _a.sent()];
38613
- }
38614
- });
38615
- }); };
38616
38534
  var editor = mobxReactLite.observer(Page$c);
38617
38535
 
38618
38536
  var editor$1 = /*#__PURE__*/Object.freeze({
38619
38537
  __proto__: null,
38620
- getStaticProps: getStaticProps$b,
38621
38538
  'default': editor
38622
38539
  });
38623
38540
 
@@ -38630,7 +38547,7 @@ var Page$d = function (_a) {
38630
38547
  }, [propValuesStr]);
38631
38548
  return (React.createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
38632
38549
  };
38633
- var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38550
+ var getStaticProps$b = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38634
38551
  return __generator(this, function (_a) {
38635
38552
  switch (_a.label) {
38636
38553
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, exports.IkasThemePageType.FAVORITE_PRODUCTS)];
@@ -38642,7 +38559,7 @@ var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, voi
38642
38559
  var favoriteProducts = /*#__PURE__*/Object.freeze({
38643
38560
  __proto__: null,
38644
38561
  'default': Page$d,
38645
- getStaticProps: getStaticProps$c
38562
+ getStaticProps: getStaticProps$b
38646
38563
  });
38647
38564
 
38648
38565
  var Page$e = function (_a) {
@@ -38662,7 +38579,7 @@ var Page$e = function (_a) {
38662
38579
  }, [isBrowser, propValuesStr]);
38663
38580
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
38664
38581
  };
38665
- var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38582
+ var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38666
38583
  return __generator(this, function (_a) {
38667
38584
  switch (_a.label) {
38668
38585
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, exports.IkasThemePageType.SEARCH)];
@@ -38674,7 +38591,7 @@ var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, voi
38674
38591
  var search = /*#__PURE__*/Object.freeze({
38675
38592
  __proto__: null,
38676
38593
  'default': Page$e,
38677
- getStaticProps: getStaticProps$d
38594
+ getStaticProps: getStaticProps$c
38678
38595
  });
38679
38596
 
38680
38597
  var Page$f = function (_a) {
@@ -38688,7 +38605,7 @@ var Page$f = function (_a) {
38688
38605
  }, [propValuesStr]);
38689
38606
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
38690
38607
  };
38691
- var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38608
+ var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38692
38609
  var props;
38693
38610
  return __generator(this, function (_a) {
38694
38611
  switch (_a.label) {
@@ -38710,7 +38627,7 @@ var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, voi
38710
38627
  var _404 = /*#__PURE__*/Object.freeze({
38711
38628
  __proto__: null,
38712
38629
  'default': Page$f,
38713
- getStaticProps: getStaticProps$e
38630
+ getStaticProps: getStaticProps$d
38714
38631
  });
38715
38632
 
38716
38633
  var Page$g = function (_a) {
@@ -38722,7 +38639,7 @@ var Page$g = function (_a) {
38722
38639
  }, [propValuesStr]);
38723
38640
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
38724
38641
  };
38725
- var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38642
+ var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38726
38643
  return __generator(this, function (_a) {
38727
38644
  switch (_a.label) {
38728
38645
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, exports.IkasThemePageType.BLOG_INDEX)];
@@ -38734,7 +38651,7 @@ var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, voi
38734
38651
  var index$5 = /*#__PURE__*/Object.freeze({
38735
38652
  __proto__: null,
38736
38653
  'default': Page$g,
38737
- getStaticProps: getStaticProps$f
38654
+ getStaticProps: getStaticProps$e
38738
38655
  });
38739
38656
 
38740
38657
  var Page$h = function (_a) {
@@ -38763,7 +38680,7 @@ var getStaticPaths$2 = function (context) { return __awaiter(void 0, void 0, voi
38763
38680
  }];
38764
38681
  });
38765
38682
  }); };
38766
- var getStaticProps$g = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38683
+ var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, void 0, function () {
38767
38684
  return __generator(this, function (_a) {
38768
38685
  switch (_a.label) {
38769
38686
  case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, [
@@ -38779,7 +38696,7 @@ var _slug_$2 = /*#__PURE__*/Object.freeze({
38779
38696
  __proto__: null,
38780
38697
  'default': _slug_$1,
38781
38698
  getStaticPaths: getStaticPaths$2,
38782
- getStaticProps: getStaticProps$g
38699
+ getStaticProps: getStaticProps$f
38783
38700
  });
38784
38701
 
38785
38702
  /**
@@ -12,7 +12,6 @@ declare type RegisterFormModel = {
12
12
  lastName: string;
13
13
  email: string;
14
14
  password: string;
15
- isMarketingAccepted?: boolean;
16
15
  };
17
16
  export declare class RegisterForm {
18
17
  private model;
@@ -27,8 +26,6 @@ export declare class RegisterForm {
27
26
  set email(value: string);
28
27
  get password(): string;
29
28
  set password(value: string);
30
- get isMarketingAccepted(): boolean | undefined;
31
- set isMarketingAccepted(value: boolean | undefined);
32
29
  get hasError(): boolean;
33
30
  get firstNameErrorMessage(): string | undefined;
34
31
  get lastNameErrorMessage(): string | undefined;
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { GetStaticProps } from "next";
3
- export declare const getStaticProps: GetStaticProps;
4
2
  declare const _default: (() => JSX.Element) & {
5
3
  displayName: string;
6
4
  };
@@ -15,7 +15,7 @@ export declare class IkasCustomerStore {
15
15
  get canCreateEmailSubscription(): boolean;
16
16
  get customerConsentGranted(): boolean;
17
17
  login: (email: string, password: string) => Promise<boolean>;
18
- register: (firstName: string, lastName: string, email: string, password: string, isMarketingAccepted?: boolean | undefined) => Promise<boolean>;
18
+ register: (firstName: string, lastName: string, email: string, password: string) => Promise<boolean>;
19
19
  saveContactForm: (input: SaveContactForm) => Promise<boolean | undefined>;
20
20
  checkEmail: (email: string) => Promise<boolean>;
21
21
  forgotPassword: (email: string) => Promise<boolean>;
@@ -12,7 +12,7 @@ export declare class SettingsHelper {
12
12
  static readLocalTheme(): Promise<IkasTheme>;
13
13
  static readSettingsFile(): Promise<any>;
14
14
  static getSettings(locale: string): Promise<SettingsData | null>;
15
- static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[], isEditor?: boolean): Promise<{
15
+ static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[]): Promise<{
16
16
  props: {};
17
17
  notFound: boolean;
18
18
  revalidate?: undefined;
@@ -75,7 +75,7 @@ export declare class SettingsHelper {
75
75
  revalidate: number;
76
76
  notFound?: undefined;
77
77
  }>;
78
- static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[], isEditor?: boolean): Promise<{
78
+ static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[]): Promise<{
79
79
  props: {};
80
80
  notFound: boolean;
81
81
  revalidate?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.161-alpha.18",
3
+ "version": "0.0.161-alpha.3",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",