@ikas/storefront 0.0.121 → 0.0.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var mobx = require('mobx');
6
6
  var React = require('react');
7
7
  var mobxReactLite = require('mobx-react-lite');
8
+ var Head = require('next/head');
8
9
  var router = require('next/router');
9
10
  var Image$1 = require('next/image');
10
11
  var Link = require('next/link');
11
- var Head = require('next/head');
12
12
  var fs = require('fs');
13
13
  var getConfig = require('next/config');
14
14
  var dynamic = require('next/dynamic');
@@ -17,9 +17,9 @@ var Error$1 = require('next/error');
17
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
18
 
19
19
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
20
+ var Head__default = /*#__PURE__*/_interopDefaultLegacy(Head);
20
21
  var Image__default = /*#__PURE__*/_interopDefaultLegacy(Image$1);
21
22
  var Link__default = /*#__PURE__*/_interopDefaultLegacy(Link);
22
- var Head__default = /*#__PURE__*/_interopDefaultLegacy(Head);
23
23
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
24
24
  var getConfig__default = /*#__PURE__*/_interopDefaultLegacy(getConfig);
25
25
  var dynamic__default = /*#__PURE__*/_interopDefaultLegacy(dynamic);
@@ -11052,6 +11052,7 @@ var IkasProductDetailPropValueProvider = /** @class */ (function () {
11052
11052
  return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
11053
11053
  productIdList: [this.productDetailPropValue.productId],
11054
11054
  priceListId: IkasStorefrontConfig.priceListId,
11055
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
11055
11056
  })];
11056
11057
  case 1:
11057
11058
  productSearchResponse = _b.sent();
@@ -11400,12 +11401,27 @@ var IkasCategoryListPropValueProvider = /** @class */ (function () {
11400
11401
  return IkasCategoryListPropValueProvider;
11401
11402
  }());
11402
11403
 
11404
+ var IkasRichTextPropValueProvider = /** @class */ (function () {
11405
+ function IkasRichTextPropValueProvider(textPropValue) {
11406
+ this.text = textPropValue;
11407
+ }
11408
+ IkasRichTextPropValueProvider.prototype.getValue = function () {
11409
+ return __awaiter(this, void 0, void 0, function () {
11410
+ return __generator(this, function (_a) {
11411
+ return [2 /*return*/, this.text];
11412
+ });
11413
+ });
11414
+ };
11415
+ return IkasRichTextPropValueProvider;
11416
+ }());
11417
+
11403
11418
  var IkasCustomPropValueProvider = /** @class */ (function () {
11404
- function IkasCustomPropValueProvider(value, customData, theme, pageType, pageSpecificData, pageParams) {
11419
+ function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
11405
11420
  this.value = value;
11406
11421
  this.customData = customData;
11407
11422
  this.theme = theme;
11408
11423
  this.pageType = pageType;
11424
+ this.pageDataProvider = pageDataProvider;
11409
11425
  this.pageSpecificData = pageSpecificData;
11410
11426
  this.pageParams = pageParams;
11411
11427
  }
@@ -11419,89 +11435,100 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11419
11435
  return [2 /*return*/];
11420
11436
  _b.label = 1;
11421
11437
  case 1:
11422
- _b.trys.push([1, 32, , 33]);
11438
+ _b.trys.push([1, 36, , 37]);
11423
11439
  _a = this.customData.type;
11424
11440
  switch (_a) {
11425
11441
  case exports.IkasThemeCustomDataType.TEXT: return [3 /*break*/, 2];
11426
- case exports.IkasThemeCustomDataType.BOOLEAN: return [3 /*break*/, 4];
11427
- case exports.IkasThemeCustomDataType.BRAND_LIST: return [3 /*break*/, 6];
11428
- case exports.IkasThemeCustomDataType.BRAND: return [3 /*break*/, 8];
11429
- case exports.IkasThemeCustomDataType.CATEGORY_LIST: return [3 /*break*/, 10];
11430
- case exports.IkasThemeCustomDataType.CATEGORY: return [3 /*break*/, 12];
11431
- case exports.IkasThemeCustomDataType.COLOR: return [3 /*break*/, 14];
11432
- case exports.IkasThemeCustomDataType.IMAGE_LIST: return [3 /*break*/, 16];
11433
- case exports.IkasThemeCustomDataType.IMAGE: return [3 /*break*/, 18];
11434
- case exports.IkasThemeCustomDataType.LINK: return [3 /*break*/, 20];
11435
- case exports.IkasThemeCustomDataType.LIST_OF_LINK: return [3 /*break*/, 20];
11436
- case exports.IkasThemeCustomDataType.PRODUCT_DETAIL: return [3 /*break*/, 22];
11437
- case exports.IkasThemeCustomDataType.PRODUCT_LIST: return [3 /*break*/, 24];
11438
- case exports.IkasThemeCustomDataType.OBJECT: return [3 /*break*/, 26];
11439
- case exports.IkasThemeCustomDataType.DYNAMIC_LIST: return [3 /*break*/, 28];
11440
- case exports.IkasThemeCustomDataType.STATIC_LIST: return [3 /*break*/, 28];
11442
+ case exports.IkasThemeCustomDataType.RICH_TEXT: return [3 /*break*/, 4];
11443
+ case exports.IkasThemeCustomDataType.BOOLEAN: return [3 /*break*/, 6];
11444
+ case exports.IkasThemeCustomDataType.BRAND_LIST: return [3 /*break*/, 8];
11445
+ case exports.IkasThemeCustomDataType.BRAND: return [3 /*break*/, 10];
11446
+ case exports.IkasThemeCustomDataType.CATEGORY_LIST: return [3 /*break*/, 12];
11447
+ case exports.IkasThemeCustomDataType.CATEGORY: return [3 /*break*/, 14];
11448
+ case exports.IkasThemeCustomDataType.COLOR: return [3 /*break*/, 16];
11449
+ case exports.IkasThemeCustomDataType.IMAGE_LIST: return [3 /*break*/, 18];
11450
+ case exports.IkasThemeCustomDataType.IMAGE: return [3 /*break*/, 20];
11451
+ case exports.IkasThemeCustomDataType.LINK: return [3 /*break*/, 22];
11452
+ case exports.IkasThemeCustomDataType.LIST_OF_LINK: return [3 /*break*/, 22];
11453
+ case exports.IkasThemeCustomDataType.PRODUCT_DETAIL: return [3 /*break*/, 24];
11454
+ case exports.IkasThemeCustomDataType.PRODUCT_LIST: return [3 /*break*/, 26];
11455
+ case exports.IkasThemeCustomDataType.OBJECT: return [3 /*break*/, 28];
11456
+ case exports.IkasThemeCustomDataType.DYNAMIC_LIST: return [3 /*break*/, 30];
11457
+ case exports.IkasThemeCustomDataType.STATIC_LIST: return [3 /*break*/, 30];
11458
+ case exports.IkasThemeCustomDataType.COMPONENT: return [3 /*break*/, 32];
11459
+ case exports.IkasThemeCustomDataType.COMPONENT_LIST: return [3 /*break*/, 32];
11441
11460
  }
11442
- return [3 /*break*/, 30];
11461
+ return [3 /*break*/, 34];
11443
11462
  case 2: return [4 /*yield*/, this.getTextValue()];
11444
11463
  case 3:
11445
11464
  customDataValue = _b.sent();
11446
- return [3 /*break*/, 31];
11447
- case 4: return [4 /*yield*/, this.getBooleanValue()];
11465
+ return [3 /*break*/, 35];
11466
+ case 4: return [4 /*yield*/, this.getRichTextPropValue()];
11448
11467
  case 5:
11449
11468
  customDataValue = _b.sent();
11450
- return [3 /*break*/, 31];
11451
- case 6: return [4 /*yield*/, this.getBrandListPropValue()];
11469
+ return [3 /*break*/, 35];
11470
+ case 6: return [4 /*yield*/, this.getBooleanValue()];
11452
11471
  case 7:
11453
11472
  customDataValue = _b.sent();
11454
- return [3 /*break*/, 31];
11455
- case 8: return [4 /*yield*/, this.getBrandPropValue()];
11473
+ return [3 /*break*/, 35];
11474
+ case 8: return [4 /*yield*/, this.getBrandListPropValue()];
11456
11475
  case 9:
11457
11476
  customDataValue = _b.sent();
11458
- return [3 /*break*/, 31];
11459
- case 10: return [4 /*yield*/, this.getCategoryListPropValue()];
11477
+ return [3 /*break*/, 35];
11478
+ case 10: return [4 /*yield*/, this.getBrandPropValue()];
11460
11479
  case 11:
11461
11480
  customDataValue = _b.sent();
11462
- return [3 /*break*/, 31];
11463
- case 12: return [4 /*yield*/, this.getCategoryPropValue()];
11481
+ return [3 /*break*/, 35];
11482
+ case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
11464
11483
  case 13:
11465
11484
  customDataValue = _b.sent();
11466
- return [3 /*break*/, 31];
11467
- case 14: return [4 /*yield*/, this.getColorPropValue()];
11485
+ return [3 /*break*/, 35];
11486
+ case 14: return [4 /*yield*/, this.getCategoryPropValue()];
11468
11487
  case 15:
11469
11488
  customDataValue = _b.sent();
11470
- return [3 /*break*/, 31];
11471
- case 16: return [4 /*yield*/, this.getImageListPropValue()];
11489
+ return [3 /*break*/, 35];
11490
+ case 16: return [4 /*yield*/, this.getColorPropValue()];
11472
11491
  case 17:
11473
11492
  customDataValue = _b.sent();
11474
- return [3 /*break*/, 31];
11475
- case 18: return [4 /*yield*/, this.getImagePropValue()];
11493
+ return [3 /*break*/, 35];
11494
+ case 18: return [4 /*yield*/, this.getImageListPropValue()];
11476
11495
  case 19:
11477
11496
  customDataValue = _b.sent();
11478
- return [3 /*break*/, 31];
11479
- case 20: return [4 /*yield*/, this.getLinkPropValue()];
11497
+ return [3 /*break*/, 35];
11498
+ case 20: return [4 /*yield*/, this.getImagePropValue()];
11480
11499
  case 21:
11481
11500
  customDataValue = _b.sent();
11482
- return [3 /*break*/, 31];
11483
- case 22: return [4 /*yield*/, this.getProductDetailPropValue()];
11501
+ return [3 /*break*/, 35];
11502
+ case 22: return [4 /*yield*/, this.getLinkPropValue()];
11484
11503
  case 23:
11485
11504
  customDataValue = _b.sent();
11486
- return [3 /*break*/, 31];
11487
- case 24: return [4 /*yield*/, this.getProductListPropValue()];
11505
+ return [3 /*break*/, 35];
11506
+ case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
11488
11507
  case 25:
11489
11508
  customDataValue = _b.sent();
11490
- return [3 /*break*/, 31];
11491
- case 26: return [4 /*yield*/, this.getObjectValue()];
11509
+ return [3 /*break*/, 35];
11510
+ case 26: return [4 /*yield*/, this.getProductListPropValue()];
11492
11511
  case 27:
11493
11512
  customDataValue = _b.sent();
11494
- return [3 /*break*/, 31];
11495
- case 28: return [4 /*yield*/, this.getArrayValue()];
11513
+ return [3 /*break*/, 35];
11514
+ case 28: return [4 /*yield*/, this.getObjectValue()];
11496
11515
  case 29:
11497
11516
  customDataValue = _b.sent();
11498
- return [3 /*break*/, 31];
11499
- case 30: return [3 /*break*/, 31];
11500
- case 31: return [3 /*break*/, 33];
11501
- case 32:
11517
+ return [3 /*break*/, 35];
11518
+ case 30: return [4 /*yield*/, this.getArrayValue()];
11519
+ case 31:
11520
+ customDataValue = _b.sent();
11521
+ return [3 /*break*/, 35];
11522
+ case 32: return [4 /*yield*/, this.getComponentListValue()];
11523
+ case 33:
11524
+ customDataValue = _b.sent();
11525
+ return [3 /*break*/, 35];
11526
+ case 34: return [3 /*break*/, 35];
11527
+ case 35: return [3 /*break*/, 37];
11528
+ case 36:
11502
11529
  _b.sent();
11503
11530
  return [2 /*return*/];
11504
- case 33: return [2 /*return*/, JSON.parse(JSON.stringify(customDataValue))];
11531
+ case 37: return [2 /*return*/, JSON.parse(JSON.stringify(customDataValue))];
11505
11532
  }
11506
11533
  });
11507
11534
  });
@@ -11614,6 +11641,24 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11614
11641
  });
11615
11642
  });
11616
11643
  };
11644
+ IkasCustomPropValueProvider.prototype.getRichTextPropValue = function () {
11645
+ return __awaiter(this, void 0, void 0, function () {
11646
+ var provider, value;
11647
+ return __generator(this, function (_a) {
11648
+ switch (_a.label) {
11649
+ case 0:
11650
+ provider = new IkasRichTextPropValueProvider(this.value);
11651
+ return [4 /*yield*/, provider.getValue()];
11652
+ case 1:
11653
+ value = _a.sent();
11654
+ return [2 /*return*/, {
11655
+ value: value,
11656
+ customData: this.customData,
11657
+ }];
11658
+ }
11659
+ });
11660
+ });
11661
+ };
11617
11662
  IkasCustomPropValueProvider.prototype.getImageListPropValue = function () {
11618
11663
  return __awaiter(this, void 0, void 0, function () {
11619
11664
  var provider, value;
@@ -11740,7 +11785,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11740
11785
  if (nestedData.isRequired &&
11741
11786
  (nestedValue === undefined || nestedValue === null))
11742
11787
  throw new Error("Required data is missing");
11743
- nestedProvider = new IkasCustomPropValueProvider(nestedValue, nestedData, this.theme, this.pageSpecificData);
11788
+ nestedProvider = new IkasCustomPropValueProvider(nestedValue, nestedData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
11744
11789
  return [4 /*yield*/, nestedProvider.getValue()];
11745
11790
  case 2:
11746
11791
  _itemValue = _b.sent();
@@ -11778,7 +11823,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11778
11823
  if (nestedData.isRequired &&
11779
11824
  (itemValue === undefined || itemValue === null))
11780
11825
  throw new Error("Required data is missing");
11781
- provider = new IkasCustomPropValueProvider(itemValue, nestedData, this.theme, this.pageSpecificData);
11826
+ provider = new IkasCustomPropValueProvider(itemValue, nestedData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
11782
11827
  return [4 /*yield*/, provider.getValue()];
11783
11828
  case 2:
11784
11829
  _itemValue = _b.sent();
@@ -11800,6 +11845,28 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
11800
11845
  });
11801
11846
  });
11802
11847
  };
11848
+ IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
11849
+ return __awaiter(this, void 0, void 0, function () {
11850
+ var pageComponents;
11851
+ var _a;
11852
+ var _this = this;
11853
+ return __generator(this, function (_b) {
11854
+ switch (_b.label) {
11855
+ case 0:
11856
+ pageComponents = this.value
11857
+ ? this.value.map(function (v) { return new IkasThemePageComponent(v); })
11858
+ : [];
11859
+ _a = {};
11860
+ return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) {
11861
+ return _this.pageDataProvider.getPageComponentPropValues(tp);
11862
+ }))];
11863
+ case 1: return [2 /*return*/, (_a.value = _b.sent(),
11864
+ _a.customData = this.customData,
11865
+ _a)];
11866
+ }
11867
+ });
11868
+ });
11869
+ };
11803
11870
  return IkasCustomPropValueProvider;
11804
11871
  }());
11805
11872
 
@@ -11831,78 +11898,345 @@ var decodeBase64 = function (base64) {
11831
11898
  return buffer.toString("ascii");
11832
11899
  };
11833
11900
 
11834
- var IkasPageDataProvider = /** @class */ (function () {
11835
- function IkasPageDataProvider(theme, pageParams, pageType) {
11836
- this.pageType = null;
11837
- this.pageParams = {};
11838
- this.pageComponentPropValues = [];
11839
- this.pageSpecificData = null;
11840
- this.merchantSettings = null;
11841
- this.theme = new IkasTheme(theme);
11842
- this.pageParams = pageParams || {};
11843
- this.pageType = pageType;
11844
- mobx.makeAutoObservable(this);
11845
- }
11846
- Object.defineProperty(IkasPageDataProvider.prototype, "page", {
11847
- get: function () {
11848
- var _this = this;
11849
- if (this.pageType === exports.IkasThemePageType.CUSTOM) {
11850
- var slug_1 = this.pageParams.slug;
11851
- return this.theme.pages.find(function (page) { return page.type === exports.IkasThemePageType.CUSTOM && page.slug === slug_1; });
11852
- }
11853
- return this.theme.pages.find(function (page) { return page.type === _this.pageType; });
11854
- },
11855
- enumerable: false,
11856
- configurable: true
11857
- });
11858
- Object.defineProperty(IkasPageDataProvider.prototype, "nextPageData", {
11859
- get: function () {
11860
- return {
11861
- props: {
11862
- propValuesStr: JSON.stringify(this.pageComponentPropValues),
11863
- pageSpecificDataStr: this.pageSpecificData
11864
- ? JSON.stringify(this.pageSpecificData || {})
11865
- : "",
11866
- page: mobx.toJS(this.page) || null,
11867
- settingsStr: JSON.stringify(this.theme.settings || {}),
11868
- merchantSettings: this.merchantSettings
11869
- ? JSON.stringify(this.merchantSettings)
11870
- : null,
11871
- configJson: IkasStorefrontConfig.getJson(),
11872
- },
11873
- };
11874
- },
11875
- enumerable: false,
11876
- configurable: true
11901
+ var ThemeComponent = mobxReactLite.observer(function (_a) {
11902
+ var pageComponentPropValue = _a.pageComponentPropValue, index = _a.index, settings = _a.settings;
11903
+ var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
11904
+ var pageComponent = pageComponentPropValue.pageComponent;
11905
+ var propValues = pageComponentPropValue.propValues;
11906
+ var hasNullValue = mobx.computed(function () {
11907
+ return Object.entries(propValues || {}).some(function (_a) {
11908
+ var _b;
11909
+ var propName = _a[0], propValue = _a[1];
11910
+ return (propValue === null || propValue === undefined) && ((_b = pageComponentPropValue.component.props.find(function (p) { return p.name === propName; })) === null || _b === void 0 ? void 0 : _b.isRequired);
11911
+ });
11877
11912
  });
11878
- Object.defineProperty(IkasPageDataProvider.prototype, "specification", {
11879
- get: function () {
11880
- var _this = this;
11881
- var _a, _b, _c;
11882
- var selectedPage = this.page;
11883
- var specification;
11884
- if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.PRODUCT) {
11885
- specification = (_a = selectedPage.specifications) === null || _a === void 0 ? void 0 : _a.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.product.id); });
11913
+ var Component = components[pageComponent.componentId];
11914
+ return (React.createElement("div", { id: index + "" }, hasNullValue.get() ? null : (React.createElement(Component, __assign({ key: pageComponent.id }, propValues, { settings: settings, store: store })))));
11915
+ });
11916
+
11917
+ var IkasPageHead = mobxReactLite.observer(function (_a) {
11918
+ var _b;
11919
+ var page = _a.page, pageTitle = _a.pageTitle, description = _a.description, pageSpecificDataStr = _a.pageSpecificDataStr, props = __rest(_a, ["page", "pageTitle", "description", "pageSpecificDataStr"]);
11920
+ var ogpMetas = [];
11921
+ var schemas = [];
11922
+ var isCanonicalLinkAdd = false;
11923
+ var canonicalHref = "";
11924
+ if (props.addOgpMetas) {
11925
+ ogpMetas.push({
11926
+ property: "og:type",
11927
+ content: "website",
11928
+ });
11929
+ if (typeof window !== "undefined") {
11930
+ ogpMetas.push({
11931
+ property: "og:site_name",
11932
+ content: "https://" + window.location.hostname,
11933
+ });
11934
+ }
11935
+ if (pageTitle) {
11936
+ ogpMetas.push({
11937
+ property: "og:title",
11938
+ content: pageTitle,
11939
+ });
11940
+ }
11941
+ if (description) {
11942
+ ogpMetas.push({
11943
+ property: "og:description",
11944
+ content: description,
11945
+ });
11946
+ }
11947
+ if (typeof window !== "undefined") {
11948
+ ogpMetas.push({
11949
+ property: "og:url",
11950
+ content: window.location.href,
11951
+ });
11952
+ }
11953
+ if (props.merchantSettings) {
11954
+ if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === exports.IkasThemePageType.PRODUCT) {
11955
+ var productDetailParsed = JSON.parse(pageSpecificDataStr);
11956
+ var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
11957
+ if (productDetail.selectedVariant.mainImage) {
11958
+ ogpMetas.push({
11959
+ property: "og:image",
11960
+ content: (_b = productDetail.selectedVariant.mainImage) === null || _b === void 0 ? void 0 : _b.src,
11961
+ });
11962
+ }
11886
11963
  }
11887
- if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.CATEGORY) {
11888
- specification = (_b = selectedPage.specifications) === null || _b === void 0 ? void 0 : _b.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.id); });
11964
+ else {
11965
+ var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
11966
+ ogpMetas.push({
11967
+ property: "og:image",
11968
+ content: merchantSettings.logo.src,
11969
+ });
11889
11970
  }
11890
- if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.BRAND) {
11891
- specification = (_c = selectedPage.specifications) === null || _c === void 0 ? void 0 : _c.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.id); });
11971
+ }
11972
+ }
11973
+ if (props.merchantSettings) {
11974
+ // for schema.org
11975
+ var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
11976
+ var websiteSchema = createWebsiteSchema();
11977
+ var storeSchema = createStoreSchema(merchantSettings);
11978
+ schemas.push(websiteSchema);
11979
+ schemas.push(storeSchema);
11980
+ }
11981
+ if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === exports.IkasThemePageType.PRODUCT) {
11982
+ var productDetailParsed = JSON.parse(pageSpecificDataStr);
11983
+ var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
11984
+ if (typeof window !== "undefined" && productDetail.product.hasVariant) {
11985
+ isCanonicalLinkAdd =
11986
+ window.location.pathname !== productDetail.product.href;
11987
+ canonicalHref =
11988
+ "https://" + window.location.hostname + productDetail.product.href;
11989
+ }
11990
+ var schema = createProductSchema(productDetail);
11991
+ if (schema)
11992
+ schemas.push(schema);
11993
+ }
11994
+ if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === exports.IkasThemePageType.CATEGORY) {
11995
+ var categorySchema = createCategorySchema(pageSpecificDataStr);
11996
+ if (categorySchema)
11997
+ schemas.push(categorySchema);
11998
+ var categoryBreadcrumbSchema = createCategoryBreadcrumbSchema(pageSpecificDataStr);
11999
+ if (categoryBreadcrumbSchema)
12000
+ schemas.push(categoryBreadcrumbSchema);
12001
+ }
12002
+ return (React.createElement(Head__default['default'], null,
12003
+ React.createElement("title", null, pageTitle || ""),
12004
+ React.createElement("meta", { name: "description", content: description || "" }),
12005
+ isCanonicalLinkAdd && React.createElement("link", { rel: "canonical", href: canonicalHref }),
12006
+ !!props.addOgpMetas &&
12007
+ ogpMetas.map(function (ogpMeta, index) { return (React.createElement("meta", { key: ogpMeta.content + "-" + index, property: ogpMeta.property, content: ogpMeta.content })); }),
12008
+ !!schemas.length &&
12009
+ schemas.map(function (schema, index) { return (React.createElement("script", { key: index, type: "application/ld+json", dangerouslySetInnerHTML: {
12010
+ __html: JSON.stringify(schema),
12011
+ } })); })));
12012
+ });
12013
+ function createWebsiteSchema() {
12014
+ var _a;
12015
+ var hostname = "";
12016
+ if (typeof window !== "undefined") {
12017
+ hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
12018
+ }
12019
+ return {
12020
+ "@context": "https://schema.org",
12021
+ "@type": "Website",
12022
+ url: "https://" + hostname,
12023
+ };
12024
+ }
12025
+ function createStoreSchema(merchantSettings) {
12026
+ var _a, _b;
12027
+ var hostname = "";
12028
+ if (typeof window !== "undefined") {
12029
+ hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
12030
+ }
12031
+ return {
12032
+ "@context": "https://schema.org",
12033
+ "@type": "Store",
12034
+ name: merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.merchantName,
12035
+ logo: (_b = merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.logo) === null || _b === void 0 ? void 0 : _b.src,
12036
+ url: "https://" + hostname,
12037
+ };
12038
+ }
12039
+ function createProductSchema(productDetail) {
12040
+ var _a, _b;
12041
+ try {
12042
+ var isBrowser = typeof window !== "undefined";
12043
+ if (isBrowser) {
12044
+ var urlParams = new URLSearchParams(window.location.search);
12045
+ var vid_1 = urlParams.get("vid");
12046
+ if (vid_1) {
12047
+ var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
12048
+ if (variant) {
12049
+ productDetail.selectedVariantValues = variant.variantValues;
12050
+ }
11892
12051
  }
11893
- return specification;
11894
- },
11895
- enumerable: false,
11896
- configurable: true
11897
- });
11898
- Object.defineProperty(IkasPageDataProvider.prototype, "pageComponents", {
11899
- get: function () {
11900
- var _a;
11901
- if (this.specification)
11902
- return this.specification.components;
11903
- return ((_a = this.page) === null || _a === void 0 ? void 0 : _a.components) || [];
11904
- },
11905
- enumerable: false,
12052
+ }
12053
+ var productUrl = isBrowser
12054
+ ? "https://" + window.location.hostname + productDetail.href
12055
+ : "";
12056
+ return {
12057
+ "@context": "https://schema.org/",
12058
+ "@type": "Product",
12059
+ name: productDetail.product.name,
12060
+ description: (_a = productDetail.product.metaData) === null || _a === void 0 ? void 0 : _a.description,
12061
+ image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
12062
+ productId: productDetail.selectedVariant.id,
12063
+ sku: productDetail.selectedVariant.sku,
12064
+ mpn: productDetail.selectedVariant.barcodeList.length
12065
+ ? productDetail.selectedVariant.barcodeList[0]
12066
+ : "",
12067
+ brand: {
12068
+ "@type": "Brand",
12069
+ name: (_b = productDetail.product.brand) === null || _b === void 0 ? void 0 : _b.name,
12070
+ },
12071
+ offers: {
12072
+ "@type": "Offer",
12073
+ url: productUrl,
12074
+ priceCurrency: productDetail.selectedVariant.price.currency || "TRY",
12075
+ price: productDetail.selectedVariant.price.finalPrice,
12076
+ priceValidUntil: "",
12077
+ itemCondition: "https://schema.org/NewCondition",
12078
+ availability: productDetail.selectedVariant.stock > 0
12079
+ ? "https://schema.org/InStock"
12080
+ : "https://schema.org/OutOfStock",
12081
+ },
12082
+ };
12083
+ }
12084
+ catch (err) { }
12085
+ }
12086
+ function createCategorySchema(pageSpecificDataStr) {
12087
+ var _a, _b, _c;
12088
+ try {
12089
+ var categoryParsed = JSON.parse(pageSpecificDataStr);
12090
+ var category = new IkasCategory(categoryParsed);
12091
+ var categoryUrl = typeof window !== undefined
12092
+ ? "https://" + window.location.hostname + category.href
12093
+ : "";
12094
+ return {
12095
+ "@context": "http://schema.org",
12096
+ "@type": "CollectionPage",
12097
+ url: categoryUrl,
12098
+ name: (_a = category.metaData) === null || _a === void 0 ? void 0 : _a.pageTitle,
12099
+ description: (_b = category.metaData) === null || _b === void 0 ? void 0 : _b.description,
12100
+ image: (_c = category.image) === null || _c === void 0 ? void 0 : _c.src,
12101
+ };
12102
+ }
12103
+ catch (_d) { }
12104
+ }
12105
+ function createCategoryBreadcrumbSchema(pageSpecificDataStr) {
12106
+ try {
12107
+ var categoryParsed = JSON.parse(pageSpecificDataStr);
12108
+ var category = new IkasCategory(categoryParsed);
12109
+ return {
12110
+ "@context": "http://schema.org",
12111
+ "@type": "BreadcrumbList",
12112
+ itemListElement: category.path.map(function (categoryPath, index) { return ({
12113
+ "@type": "ListItem",
12114
+ position: index + 1,
12115
+ name: categoryPath.name,
12116
+ item: typeof window !== undefined
12117
+ ? "https://" + window.location.hostname + categoryPath.href
12118
+ : "",
12119
+ }); }),
12120
+ };
12121
+ }
12122
+ catch (_a) { }
12123
+ }
12124
+
12125
+ var IkasPage = mobxReactLite.observer(function (_a) {
12126
+ var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
12127
+ var store = IkasStorefrontConfig.store;
12128
+ var settings = React.useState(new IkasThemeSettings(JSON.parse(settingsStr)))[0];
12129
+ if (page) {
12130
+ store.currentPageType = page.type;
12131
+ }
12132
+ React.useEffect(function () {
12133
+ //@ts-ignore
12134
+ store.setSettings(settingsStr);
12135
+ //@ts-ignore
12136
+ store.cartStore.getCart();
12137
+ store.checkLocalization();
12138
+ }, []);
12139
+ var headerComponentPropValue = propValues.find(function (pv) { return pv.component.isHeader; });
12140
+ var footerComponentPropValue = propValues.find(function (pv) { return pv.component.isFooter; });
12141
+ var others = propValues.filter(function (pv) { return !pv.component.isHeader && !pv.component.isFooter; }) || [];
12142
+ if (!page)
12143
+ return null;
12144
+ return (React.createElement(React.Fragment, null,
12145
+ React.createElement(IkasPageHead, { page: page, pageTitle: page.pageTitle, description: page.description, pageSpecificDataStr: pageSpecificDataStr, merchantSettings: merchantSettings, addOgpMetas: addOgpMetas }),
12146
+ React.createElement("div", { style: pageStyle },
12147
+ React.createElement("div", null,
12148
+ headerComponentPropValue &&
12149
+ renderComponent(headerComponentPropValue, settings, -1),
12150
+ others.map(function (pageComponentPropValue, index) {
12151
+ return renderComponent(pageComponentPropValue, settings, index);
12152
+ })),
12153
+ footerComponentPropValue &&
12154
+ renderComponent(footerComponentPropValue, settings, -1))));
12155
+ });
12156
+ var renderComponent = function (pageComponentPropValue, settings, index) {
12157
+ return (React.createElement(ThemeComponent, { key: pageComponentPropValue.pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, settings: settings }));
12158
+ };
12159
+ var pageStyle = {
12160
+ position: "relative",
12161
+ minHeight: "100vh",
12162
+ width: "100vw",
12163
+ display: "flex",
12164
+ flexDirection: "column",
12165
+ justifyContent: "space-between",
12166
+ };
12167
+
12168
+ var IkasPageDataProvider = /** @class */ (function () {
12169
+ function IkasPageDataProvider(theme, pageParams, pageType) {
12170
+ this.pageType = null;
12171
+ this.pageParams = {};
12172
+ this.pageComponentPropValues = [];
12173
+ this.pageSpecificData = null;
12174
+ this.merchantSettings = null;
12175
+ this.theme = new IkasTheme(theme);
12176
+ this.pageParams = pageParams || {};
12177
+ this.pageType = pageType;
12178
+ mobx.makeAutoObservable(this);
12179
+ }
12180
+ Object.defineProperty(IkasPageDataProvider.prototype, "page", {
12181
+ get: function () {
12182
+ var _this = this;
12183
+ if (this.pageType === exports.IkasThemePageType.CUSTOM) {
12184
+ var slug_1 = this.pageParams.slug;
12185
+ return this.theme.pages.find(function (page) { return page.type === exports.IkasThemePageType.CUSTOM && page.slug === slug_1; });
12186
+ }
12187
+ return this.theme.pages.find(function (page) { return page.type === _this.pageType; });
12188
+ },
12189
+ enumerable: false,
12190
+ configurable: true
12191
+ });
12192
+ Object.defineProperty(IkasPageDataProvider.prototype, "nextPageData", {
12193
+ get: function () {
12194
+ return {
12195
+ props: {
12196
+ propValuesStr: JSON.stringify(this.pageComponentPropValues),
12197
+ pageSpecificDataStr: this.pageSpecificData
12198
+ ? JSON.stringify(this.pageSpecificData || {})
12199
+ : "",
12200
+ page: mobx.toJS(this.page) || null,
12201
+ settingsStr: JSON.stringify(this.theme.settings || {}),
12202
+ merchantSettings: this.merchantSettings
12203
+ ? JSON.stringify(this.merchantSettings)
12204
+ : null,
12205
+ configJson: IkasStorefrontConfig.getJson(),
12206
+ },
12207
+ };
12208
+ },
12209
+ enumerable: false,
12210
+ configurable: true
12211
+ });
12212
+ Object.defineProperty(IkasPageDataProvider.prototype, "specification", {
12213
+ get: function () {
12214
+ var _this = this;
12215
+ var _a, _b, _c;
12216
+ var selectedPage = this.page;
12217
+ var specification;
12218
+ if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.PRODUCT) {
12219
+ specification = (_a = selectedPage.specifications) === null || _a === void 0 ? void 0 : _a.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.product.id); });
12220
+ }
12221
+ if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.CATEGORY) {
12222
+ specification = (_b = selectedPage.specifications) === null || _b === void 0 ? void 0 : _b.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.id); });
12223
+ }
12224
+ if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === exports.IkasThemePageType.BRAND) {
12225
+ specification = (_c = selectedPage.specifications) === null || _c === void 0 ? void 0 : _c.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.id); });
12226
+ }
12227
+ return specification;
12228
+ },
12229
+ enumerable: false,
12230
+ configurable: true
12231
+ });
12232
+ Object.defineProperty(IkasPageDataProvider.prototype, "pageComponents", {
12233
+ get: function () {
12234
+ var _a;
12235
+ if (this.specification)
12236
+ return this.specification.components;
12237
+ return ((_a = this.page) === null || _a === void 0 ? void 0 : _a.components) || [];
12238
+ },
12239
+ enumerable: false,
11906
12240
  configurable: true
11907
12241
  });
11908
12242
  Object.defineProperty(IkasPageDataProvider.prototype, "isStaticPage", {
@@ -12086,6 +12420,7 @@ var IkasPageDataProvider = /** @class */ (function () {
12086
12420
  return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
12087
12421
  productIdList: [metaDataResponse.metaData.targetId],
12088
12422
  priceListId: IkasStorefrontConfig.priceListId,
12423
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
12089
12424
  })];
12090
12425
  case 2:
12091
12426
  productsResponse = _b.sent();
@@ -12153,60 +12488,87 @@ var IkasPageDataProvider = /** @class */ (function () {
12153
12488
  };
12154
12489
  IkasPageDataProvider.prototype.getPageComponentPropValue = function (pageComponent, prop) {
12155
12490
  return __awaiter(this, void 0, void 0, function () {
12156
- var propValueProvider, propValue, customData;
12157
- return __generator(this, function (_a) {
12158
- switch (_a.label) {
12491
+ var propValueProvider, propValue, _a, customData, pageComponents;
12492
+ var _this = this;
12493
+ return __generator(this, function (_b) {
12494
+ switch (_b.label) {
12159
12495
  case 0:
12160
12496
  propValue = pageComponent.propValues[prop.name];
12161
12497
  if (propValue === null || propValue === undefined)
12162
12498
  return [2 /*return*/, null];
12163
- switch (prop.type) {
12164
- case exports.IkasThemeComponentPropType.TEXT:
12165
- propValueProvider = new IkasTextPropValueProvider(propValue);
12166
- break;
12167
- case exports.IkasThemeComponentPropType.BOOLEAN:
12168
- propValueProvider = new IkasBooleanPropValueProvider(propValue);
12169
- break;
12170
- case exports.IkasThemeComponentPropType.IMAGE:
12171
- propValueProvider = new IkasImagePropValueProvider(propValue);
12172
- break;
12173
- case exports.IkasThemeComponentPropType.IMAGE_LIST:
12174
- propValueProvider = new IkasImageListPropValueProvider(propValue);
12175
- break;
12176
- case exports.IkasThemeComponentPropType.BRAND:
12177
- propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
12178
- break;
12179
- case exports.IkasThemeComponentPropType.BRAND_LIST:
12180
- propValueProvider = new IkasBrandListPropValueProvider(propValue);
12181
- break;
12182
- case exports.IkasThemeComponentPropType.PRODUCT_LIST:
12183
- propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageParams, this.pageSpecificData);
12184
- break;
12185
- case exports.IkasThemeComponentPropType.PRODUCT_DETAIL:
12186
- propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
12187
- break;
12188
- case exports.IkasThemeComponentPropType.CATEGORY:
12189
- propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
12190
- break;
12191
- case exports.IkasThemeComponentPropType.CATEGORY_LIST:
12192
- propValueProvider = new IkasCategoryListPropValueProvider(propValue);
12193
- break;
12194
- case exports.IkasThemeComponentPropType.LINK:
12195
- case exports.IkasThemeComponentPropType.LIST_OF_LINK:
12196
- propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
12197
- break;
12198
- case exports.IkasThemeComponentPropType.COLOR:
12199
- propValueProvider = new IkasColorPropValueProvider(propValue);
12200
- break;
12201
- case exports.IkasThemeComponentPropType.CUSTOM:
12202
- customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
12203
- if (!customData)
12204
- return [2 /*return*/];
12205
- propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this.pageSpecificData, this.pageParams);
12206
- break;
12499
+ _a = prop.type;
12500
+ switch (_a) {
12501
+ case exports.IkasThemeComponentPropType.TEXT: return [3 /*break*/, 1];
12502
+ case exports.IkasThemeComponentPropType.RICH_TEXT: return [3 /*break*/, 2];
12503
+ case exports.IkasThemeComponentPropType.BOOLEAN: return [3 /*break*/, 3];
12504
+ case exports.IkasThemeComponentPropType.IMAGE: return [3 /*break*/, 4];
12505
+ case exports.IkasThemeComponentPropType.IMAGE_LIST: return [3 /*break*/, 5];
12506
+ case exports.IkasThemeComponentPropType.BRAND: return [3 /*break*/, 6];
12507
+ case exports.IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 7];
12508
+ case exports.IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 8];
12509
+ case exports.IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 9];
12510
+ case exports.IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 10];
12511
+ case exports.IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 11];
12512
+ case exports.IkasThemeComponentPropType.LINK: return [3 /*break*/, 12];
12513
+ case exports.IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 12];
12514
+ case exports.IkasThemeComponentPropType.COLOR: return [3 /*break*/, 13];
12515
+ case exports.IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 14];
12516
+ case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 15];
12517
+ case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 15];
12207
12518
  }
12208
- return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
12209
- case 1: return [2 /*return*/, _a.sent()];
12519
+ return [3 /*break*/, 17];
12520
+ case 1:
12521
+ propValueProvider = new IkasTextPropValueProvider(propValue);
12522
+ return [3 /*break*/, 18];
12523
+ case 2:
12524
+ propValueProvider = new IkasRichTextPropValueProvider(propValue);
12525
+ return [3 /*break*/, 18];
12526
+ case 3:
12527
+ propValueProvider = new IkasBooleanPropValueProvider(propValue);
12528
+ return [3 /*break*/, 18];
12529
+ case 4:
12530
+ propValueProvider = new IkasImagePropValueProvider(propValue);
12531
+ return [3 /*break*/, 18];
12532
+ case 5:
12533
+ propValueProvider = new IkasImageListPropValueProvider(propValue);
12534
+ return [3 /*break*/, 18];
12535
+ case 6:
12536
+ propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
12537
+ return [3 /*break*/, 18];
12538
+ case 7:
12539
+ propValueProvider = new IkasBrandListPropValueProvider(propValue);
12540
+ return [3 /*break*/, 18];
12541
+ case 8:
12542
+ propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageParams, this.pageSpecificData);
12543
+ return [3 /*break*/, 18];
12544
+ case 9:
12545
+ propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
12546
+ return [3 /*break*/, 18];
12547
+ case 10:
12548
+ propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
12549
+ return [3 /*break*/, 18];
12550
+ case 11:
12551
+ propValueProvider = new IkasCategoryListPropValueProvider(propValue);
12552
+ return [3 /*break*/, 18];
12553
+ case 12:
12554
+ propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
12555
+ return [3 /*break*/, 18];
12556
+ case 13:
12557
+ propValueProvider = new IkasColorPropValueProvider(propValue);
12558
+ return [3 /*break*/, 18];
12559
+ case 14:
12560
+ customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
12561
+ if (!customData)
12562
+ return [2 /*return*/];
12563
+ propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this, this.pageSpecificData, this.pageParams);
12564
+ return [3 /*break*/, 18];
12565
+ case 15:
12566
+ pageComponents = propValue;
12567
+ return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) { return _this.getPageComponentPropValues(tp); }))];
12568
+ case 16: return [2 /*return*/, _b.sent()];
12569
+ case 17: return [3 /*break*/, 18];
12570
+ case 18: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
12571
+ case 19: return [2 /*return*/, _b.sent()];
12210
12572
  }
12211
12573
  });
12212
12574
  });
@@ -12220,7 +12582,8 @@ var IkasPageDataProvider = /** @class */ (function () {
12220
12582
  IkasPageDataProvider.isServer = function () {
12221
12583
  return typeof window === "undefined";
12222
12584
  };
12223
- IkasPageDataProvider.initPropValues = function (propValuesStr, router, isBrowser) {
12585
+ IkasPageDataProvider.initPropValues = function (propValuesStr, router, settingsStr, isBrowser) {
12586
+ var settings = new IkasThemeSettings(JSON.parse(settingsStr));
12224
12587
  var pageComponentPropValues = JSON.parse(propValuesStr).map(function (v) { return ({
12225
12588
  pageComponent: new IkasThemePageComponent(v.pageComponent),
12226
12589
  component: new IkasThemeComponent(v.component),
@@ -12261,8 +12624,14 @@ var IkasPageDataProvider = /** @class */ (function () {
12261
12624
  case exports.IkasThemeComponentPropType.LIST_OF_LINK:
12262
12625
  IkasPageDataProvider.initLinkPropValue(prop, propValue, pageComponentPropValue);
12263
12626
  break;
12627
+ case exports.IkasThemeComponentPropType.COMPONENT:
12628
+ IkasPageDataProvider.initComponentPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
12629
+ break;
12630
+ case exports.IkasThemeComponentPropType.COMPONENT_LIST:
12631
+ IkasPageDataProvider.initComponentListPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
12632
+ break;
12264
12633
  case exports.IkasThemeComponentPropType.CUSTOM:
12265
- IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValue, router, isBrowser);
12634
+ IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
12266
12635
  break;
12267
12636
  }
12268
12637
  });
@@ -12344,14 +12713,14 @@ var IkasPageDataProvider = /** @class */ (function () {
12344
12713
  IkasPageDataProvider._initImageListPropValue = function (propValue) {
12345
12714
  return propValue.map(function (i) { return new IkasImage(i.id); });
12346
12715
  };
12347
- IkasPageDataProvider.initCustomDataPropValue = function (prop, customDataValue, pageComponentPropValue, router, isBrowser) {
12716
+ IkasPageDataProvider.initCustomDataPropValue = function (prop, customDataValue, pageComponentPropValue, router, settings, isBrowser) {
12348
12717
  if (!customDataValue ||
12349
12718
  !customDataValue.value ||
12350
12719
  !customDataValue.customData)
12351
12720
  return;
12352
- pageComponentPropValue.propValues[prop.name] = this._initCustomDataPropValue(customDataValue, customDataValue.customData, router, isBrowser);
12721
+ pageComponentPropValue.propValues[prop.name] = this._initCustomDataPropValue(customDataValue, customDataValue.customData, router, settings, isBrowser);
12353
12722
  };
12354
- IkasPageDataProvider._initCustomDataPropValue = function (customDataValue, customData, router, isBrowser) {
12723
+ IkasPageDataProvider._initCustomDataPropValue = function (customDataValue, customData, router, settings, isBrowser) {
12355
12724
  var _this = this;
12356
12725
  if (!customDataValue)
12357
12726
  return null;
@@ -12382,7 +12751,7 @@ var IkasPageDataProvider = /** @class */ (function () {
12382
12751
  for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
12383
12752
  var nestedCustomData = _a[_i];
12384
12753
  var value = propValue[nestedCustomData.key];
12385
- objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, nestedCustomData, router, isBrowser);
12754
+ objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, nestedCustomData, router, settings, isBrowser);
12386
12755
  }
12387
12756
  return objectValue;
12388
12757
  case exports.IkasThemeCustomDataType.DYNAMIC_LIST:
@@ -12393,17 +12762,51 @@ var IkasPageDataProvider = /** @class */ (function () {
12393
12762
  var listValue_1 = [];
12394
12763
  var nestedCustomData_1 = customData.nestedData[0];
12395
12764
  propValue.forEach(function (itemValue) {
12396
- listValue_1.push(_this._initCustomDataPropValue(itemValue, nestedCustomData_1, router, isBrowser));
12765
+ listValue_1.push(_this._initCustomDataPropValue(itemValue, nestedCustomData_1, router, settings, isBrowser));
12397
12766
  });
12398
12767
  return listValue_1;
12399
12768
  }
12400
12769
  catch (err) {
12401
12770
  return [];
12402
12771
  }
12772
+ case exports.IkasThemeCustomDataType.COMPONENT:
12773
+ return this._initComponentPropValue(propValue, router, settings, isBrowser);
12774
+ case exports.IkasThemeCustomDataType.COMPONENT_LIST:
12775
+ return this._initComponentListPropValue(propValue, router, settings, isBrowser);
12403
12776
  default:
12404
12777
  return propValue;
12405
12778
  }
12406
12779
  };
12780
+ IkasPageDataProvider.initComponentPropValue = function (prop, propValue, pageComponentPropValue, router, settings, isBrowser) {
12781
+ pageComponentPropValue.propValues[prop.name] = this._initComponentPropValue(propValue, router, settings, isBrowser);
12782
+ };
12783
+ IkasPageDataProvider._initComponentPropValue = function (propValue, router, settings, isBrowser) {
12784
+ var pValue = propValue.length ? propValue[0] : undefined;
12785
+ if (!pValue)
12786
+ return;
12787
+ var pageComponentPropValue = new IkasPageComponentPropValue(pValue);
12788
+ var initializedPageComponentPropValues = this.initPropValues(JSON.stringify([pageComponentPropValue]), router, JSON.stringify(settings), isBrowser);
12789
+ if (!initializedPageComponentPropValues.length)
12790
+ return;
12791
+ return new IkasComponentRenderer(function () {
12792
+ return renderComponent(initializedPageComponentPropValues[0], settings, -10);
12793
+ });
12794
+ };
12795
+ IkasPageDataProvider.initComponentListPropValue = function (prop, propValue, pageComponentPropValue, router, settings, isBrowser) {
12796
+ pageComponentPropValue.propValues[prop.name] = this._initComponentListPropValue(propValue, router, settings, isBrowser);
12797
+ };
12798
+ IkasPageDataProvider._initComponentListPropValue = function (propValue, router, settings, isBrowser) {
12799
+ var _this = this;
12800
+ if (propValue && propValue.length)
12801
+ return propValue.map(function (p) {
12802
+ var pageComponentPropValue = new IkasPageComponentPropValue(p);
12803
+ var initializedPageComponentPropValues = _this.initPropValues(JSON.stringify([pageComponentPropValue]), router, JSON.stringify(settings), isBrowser);
12804
+ return new IkasComponentRenderer(function () {
12805
+ return renderComponent(initializedPageComponentPropValues[0], settings, -1);
12806
+ });
12807
+ });
12808
+ return [];
12809
+ };
12407
12810
  return IkasPageDataProvider;
12408
12811
  }());
12409
12812
  var IkasPageComponentPropValue = /** @class */ (function () {
@@ -18578,6 +18981,58 @@ var GoogleTagManager = /** @class */ (function () {
18578
18981
  console.error(err);
18579
18982
  }
18580
18983
  };
18984
+ GoogleTagManager.completeRegistration = function () {
18985
+ try {
18986
+ var event_8 = {
18987
+ event: "customer_register",
18988
+ };
18989
+ //@ts-ignore
18990
+ !isServer$2 && window.dataLayer && window.dataLayer.push(event_8);
18991
+ return event_8;
18992
+ }
18993
+ catch (err) {
18994
+ console.error(err);
18995
+ }
18996
+ };
18997
+ GoogleTagManager.search = function (searchKeyword) {
18998
+ try {
18999
+ var event_9 = {
19000
+ event: "search",
19001
+ search_string: searchKeyword,
19002
+ };
19003
+ //@ts-ignore
19004
+ !isServer$2 && window.dataLayer && window.dataLayer.push(event_9);
19005
+ return event_9;
19006
+ }
19007
+ catch (err) {
19008
+ console.error(err);
19009
+ }
19010
+ };
19011
+ GoogleTagManager.viewCategory = function (category, categoryPath) {
19012
+ try {
19013
+ var event_10 = {
19014
+ event: "view_category",
19015
+ ecommerce: {
19016
+ category: [
19017
+ {
19018
+ id: category.id,
19019
+ name: category.name,
19020
+ metaData: category.metaData,
19021
+ href: category.href,
19022
+ image: category.image,
19023
+ path: categoryPath,
19024
+ },
19025
+ ],
19026
+ },
19027
+ };
19028
+ //@ts-ignore
19029
+ !isServer$2 && window.dataLayer && window.dataLayer.push(event_10);
19030
+ return event_10;
19031
+ }
19032
+ catch (err) {
19033
+ console.error(err);
19034
+ }
19035
+ };
18581
19036
  return GoogleTagManager;
18582
19037
  }());
18583
19038
  function productToGTMItem(productDetail, quantity) {
@@ -18719,6 +19174,7 @@ var Analytics = /** @class */ (function () {
18719
19174
  Analytics.search = function (searchKeyword) {
18720
19175
  try {
18721
19176
  FacebookPixel.search(searchKeyword);
19177
+ GoogleTagManager.search(searchKeyword);
18722
19178
  }
18723
19179
  catch (err) {
18724
19180
  console.error(err);
@@ -18727,6 +19183,7 @@ var Analytics = /** @class */ (function () {
18727
19183
  Analytics.completeRegistration = function () {
18728
19184
  try {
18729
19185
  FacebookPixel.completeRegistration();
19186
+ GoogleTagManager.completeRegistration();
18730
19187
  }
18731
19188
  catch (err) {
18732
19189
  console.error(err);
@@ -18742,9 +19199,10 @@ var Analytics = /** @class */ (function () {
18742
19199
  console.error(err);
18743
19200
  }
18744
19201
  };
18745
- Analytics.viewCategory = function (categoryPath) {
19202
+ Analytics.viewCategory = function (categoryPath, category) {
18746
19203
  try {
18747
19204
  FacebookPixel.viewCategory(categoryPath);
19205
+ GoogleTagManager.viewCategory(category, categoryPath);
18748
19206
  }
18749
19207
  catch (err) {
18750
19208
  console.error(err);
@@ -18960,6 +19418,7 @@ var IkasCustomerStore = /** @class */ (function () {
18960
19418
  return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
18961
19419
  productIdList: favoriteProductsResult.map(function (fP) { return fP.productId; }),
18962
19420
  priceListId: IkasStorefrontConfig.priceListId,
19421
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
18963
19422
  })];
18964
19423
  case 2:
18965
19424
  productsResult = _b.sent();
@@ -20070,6 +20529,7 @@ var IkasThemeComponentProp = /** @class */ (function () {
20070
20529
  }());
20071
20530
  (function (IkasThemeComponentPropType) {
20072
20531
  IkasThemeComponentPropType["TEXT"] = "TEXT";
20532
+ IkasThemeComponentPropType["RICH_TEXT"] = "RICH_TEXT";
20073
20533
  IkasThemeComponentPropType["BOOLEAN"] = "BOOLEAN";
20074
20534
  IkasThemeComponentPropType["IMAGE"] = "IMAGE";
20075
20535
  IkasThemeComponentPropType["IMAGE_LIST"] = "IMAGE_LIST";
@@ -20083,8 +20543,8 @@ var IkasThemeComponentProp = /** @class */ (function () {
20083
20543
  IkasThemeComponentPropType["CATEGORY_LIST"] = "CATEGORY_LIST";
20084
20544
  IkasThemeComponentPropType["COLOR"] = "COLOR";
20085
20545
  IkasThemeComponentPropType["CUSTOM"] = "CUSTOM";
20086
- // TODO number
20087
- // TODO productAttribute
20546
+ IkasThemeComponentPropType["COMPONENT"] = "COMPONENT";
20547
+ IkasThemeComponentPropType["COMPONENT_LIST"] = "COMPONENT_LIST";
20088
20548
  })(exports.IkasThemeComponentPropType || (exports.IkasThemeComponentPropType = {}));
20089
20549
 
20090
20550
  var IkasThemeComponent = /** @class */ (function () {
@@ -20132,6 +20592,7 @@ var IkasThemeCustomData = /** @class */ (function () {
20132
20592
  }());
20133
20593
  (function (IkasThemeCustomDataType) {
20134
20594
  IkasThemeCustomDataType["TEXT"] = "TEXT";
20595
+ IkasThemeCustomDataType["RICH_TEXT"] = "RICH_TEXT";
20135
20596
  IkasThemeCustomDataType["NUMBER"] = "NUMBER";
20136
20597
  IkasThemeCustomDataType["BOOLEAN"] = "BOOLEAN";
20137
20598
  IkasThemeCustomDataType["IMAGE"] = "IMAGE";
@@ -20145,6 +20606,8 @@ var IkasThemeCustomData = /** @class */ (function () {
20145
20606
  IkasThemeCustomDataType["CATEGORY"] = "CATEGORY";
20146
20607
  IkasThemeCustomDataType["CATEGORY_LIST"] = "CATEGORY_LIST";
20147
20608
  IkasThemeCustomDataType["COLOR"] = "COLOR";
20609
+ IkasThemeCustomDataType["COMPONENT"] = "COMPONENT";
20610
+ IkasThemeCustomDataType["COMPONENT_LIST"] = "COMPONENT_LIST";
20148
20611
  IkasThemeCustomDataType["OBJECT"] = "OBJECT";
20149
20612
  IkasThemeCustomDataType["STATIC_LIST"] = "STATIC_LIST";
20150
20613
  IkasThemeCustomDataType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
@@ -22163,10 +22626,15 @@ var IkasProductList = /** @class */ (function () {
22163
22626
  productIdList: this.isStatic
22164
22627
  ? (_b = this._productListPropValue.productIds) === null || _b === void 0 ? void 0 : _b.map(function (p) { return p.productId; }) : undefined,
22165
22628
  filterList: filterList,
22629
+ brandId: this._pageType === exports.IkasThemePageType.BRAND &&
22630
+ this._type !== exports.IkasProductListType.SEARCH
22631
+ ? this._filterBrandId
22632
+ : undefined,
22166
22633
  categoryIdList: this._filterCategoryId
22167
22634
  ? [this._filterCategoryId]
22168
22635
  : undefined,
22169
22636
  priceListId: IkasStorefrontConfig.priceListId,
22637
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
22170
22638
  query: this._searchKeyword,
22171
22639
  })];
22172
22640
  case 1: return [2 /*return*/, _c.sent()];
@@ -24224,6 +24692,13 @@ var AccountInfoForm = /** @class */ (function () {
24224
24692
  return AccountInfoForm;
24225
24693
  }());
24226
24694
 
24695
+ var IkasComponentRenderer = /** @class */ (function () {
24696
+ function IkasComponentRenderer(render) {
24697
+ this.render = render;
24698
+ }
24699
+ return IkasComponentRenderer;
24700
+ }());
24701
+
24227
24702
  var IkasProductListPropValue = /** @class */ (function () {
24228
24703
  function IkasProductListPropValue(data) {
24229
24704
  this.initialSort = null;
@@ -27577,214 +28052,6 @@ var PolicyModal = mobxReactLite.observer(function (_a) {
27577
28052
  React.createElement("div", { className: styles$k.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } }))));
27578
28053
  });
27579
28054
 
27580
- var IkasPageHead = mobxReactLite.observer(function (_a) {
27581
- var _b;
27582
- var page = _a.page, pageTitle = _a.pageTitle, description = _a.description, pageSpecificDataStr = _a.pageSpecificDataStr, props = __rest(_a, ["page", "pageTitle", "description", "pageSpecificDataStr"]);
27583
- var ogpMetas = [];
27584
- var schemas = [];
27585
- var isCanonicalLinkAdd = false;
27586
- var canonicalHref = "";
27587
- if (props.addOgpMetas) {
27588
- ogpMetas.push({
27589
- property: "og:type",
27590
- content: "website",
27591
- });
27592
- if (typeof window !== "undefined") {
27593
- ogpMetas.push({
27594
- property: "og:site_name",
27595
- content: "https://" + window.location.hostname,
27596
- });
27597
- }
27598
- if (pageTitle) {
27599
- ogpMetas.push({
27600
- property: "og:title",
27601
- content: pageTitle,
27602
- });
27603
- }
27604
- if (description) {
27605
- ogpMetas.push({
27606
- property: "og:description",
27607
- content: description,
27608
- });
27609
- }
27610
- if (typeof window !== "undefined") {
27611
- ogpMetas.push({
27612
- property: "og:url",
27613
- content: window.location.href,
27614
- });
27615
- }
27616
- if (props.merchantSettings) {
27617
- if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === exports.IkasThemePageType.PRODUCT) {
27618
- var productDetailParsed = JSON.parse(pageSpecificDataStr);
27619
- var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
27620
- if (productDetail.selectedVariant.mainImage) {
27621
- ogpMetas.push({
27622
- property: "og:image",
27623
- content: (_b = productDetail.selectedVariant.mainImage) === null || _b === void 0 ? void 0 : _b.src,
27624
- });
27625
- }
27626
- }
27627
- else {
27628
- var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
27629
- ogpMetas.push({
27630
- property: "og:image",
27631
- content: merchantSettings.logo.src,
27632
- });
27633
- }
27634
- }
27635
- }
27636
- if (props.merchantSettings) {
27637
- // for schema.org
27638
- var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
27639
- var websiteSchema = createWebsiteSchema();
27640
- var storeSchema = createStoreSchema(merchantSettings);
27641
- schemas.push(websiteSchema);
27642
- schemas.push(storeSchema);
27643
- }
27644
- if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === exports.IkasThemePageType.PRODUCT) {
27645
- var productDetailParsed = JSON.parse(pageSpecificDataStr);
27646
- var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
27647
- if (typeof window !== "undefined" && productDetail.product.hasVariant) {
27648
- isCanonicalLinkAdd =
27649
- window.location.pathname !== productDetail.product.href;
27650
- canonicalHref =
27651
- "https://" + window.location.hostname + productDetail.product.href;
27652
- }
27653
- var schema = createProductSchema(productDetail);
27654
- if (schema)
27655
- schemas.push(schema);
27656
- }
27657
- if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === exports.IkasThemePageType.CATEGORY) {
27658
- var categorySchema = createCategorySchema(pageSpecificDataStr);
27659
- if (categorySchema)
27660
- schemas.push(categorySchema);
27661
- var categoryBreadcrumbSchema = createCategoryBreadcrumbSchema(pageSpecificDataStr);
27662
- if (categoryBreadcrumbSchema)
27663
- schemas.push(categoryBreadcrumbSchema);
27664
- }
27665
- return (React.createElement(Head__default['default'], null,
27666
- React.createElement("title", null, pageTitle || ""),
27667
- React.createElement("meta", { name: "description", content: description || "" }),
27668
- isCanonicalLinkAdd && React.createElement("link", { rel: "canonical", href: canonicalHref }),
27669
- !!props.addOgpMetas &&
27670
- ogpMetas.map(function (ogpMeta, index) { return (React.createElement("meta", { key: ogpMeta.content + "-" + index, property: ogpMeta.property, content: ogpMeta.content })); }),
27671
- !!schemas.length &&
27672
- schemas.map(function (schema, index) { return (React.createElement("script", { key: index, type: "application/ld+json", dangerouslySetInnerHTML: {
27673
- __html: JSON.stringify(schema),
27674
- } })); })));
27675
- });
27676
- function createWebsiteSchema() {
27677
- var _a;
27678
- var hostname = "";
27679
- if (typeof window !== "undefined") {
27680
- hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
27681
- }
27682
- return {
27683
- "@context": "https://schema.org",
27684
- "@type": "Website",
27685
- url: "https://" + hostname,
27686
- };
27687
- }
27688
- function createStoreSchema(merchantSettings) {
27689
- var _a, _b;
27690
- var hostname = "";
27691
- if (typeof window !== "undefined") {
27692
- hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
27693
- }
27694
- return {
27695
- "@context": "https://schema.org",
27696
- "@type": "Store",
27697
- name: merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.merchantName,
27698
- logo: (_b = merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.logo) === null || _b === void 0 ? void 0 : _b.src,
27699
- url: "https://" + hostname,
27700
- };
27701
- }
27702
- function createProductSchema(productDetail) {
27703
- var _a, _b;
27704
- try {
27705
- var isBrowser = typeof window !== "undefined";
27706
- if (isBrowser) {
27707
- var urlParams = new URLSearchParams(window.location.search);
27708
- var vid_1 = urlParams.get("vid");
27709
- if (vid_1) {
27710
- var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
27711
- if (variant) {
27712
- productDetail.selectedVariantValues = variant.variantValues;
27713
- }
27714
- }
27715
- }
27716
- var productUrl = isBrowser
27717
- ? "https://" + window.location.hostname + productDetail.href
27718
- : "";
27719
- return {
27720
- "@context": "https://schema.org/",
27721
- "@type": "Product",
27722
- name: productDetail.product.name,
27723
- description: (_a = productDetail.product.metaData) === null || _a === void 0 ? void 0 : _a.description,
27724
- image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
27725
- productId: productDetail.selectedVariant.id,
27726
- sku: productDetail.selectedVariant.sku,
27727
- mpn: productDetail.selectedVariant.barcodeList.length
27728
- ? productDetail.selectedVariant.barcodeList[0]
27729
- : "",
27730
- brand: {
27731
- "@type": "Brand",
27732
- name: (_b = productDetail.product.brand) === null || _b === void 0 ? void 0 : _b.name,
27733
- },
27734
- offers: {
27735
- "@type": "Offer",
27736
- url: productUrl,
27737
- priceCurrency: productDetail.selectedVariant.price.currency || "TRY",
27738
- price: productDetail.selectedVariant.price.finalPrice,
27739
- priceValidUntil: "",
27740
- itemCondition: "https://schema.org/NewCondition",
27741
- availability: productDetail.selectedVariant.stock > 0
27742
- ? "https://schema.org/InStock"
27743
- : "https://schema.org/OutOfStock",
27744
- },
27745
- };
27746
- }
27747
- catch (err) { }
27748
- }
27749
- function createCategorySchema(pageSpecificDataStr) {
27750
- var _a, _b, _c;
27751
- try {
27752
- var categoryParsed = JSON.parse(pageSpecificDataStr);
27753
- var category = new IkasCategory(categoryParsed);
27754
- var categoryUrl = typeof window !== undefined
27755
- ? "https://" + window.location.hostname + category.href
27756
- : "";
27757
- return {
27758
- "@context": "http://schema.org",
27759
- "@type": "CollectionPage",
27760
- url: categoryUrl,
27761
- name: (_a = category.metaData) === null || _a === void 0 ? void 0 : _a.pageTitle,
27762
- description: (_b = category.metaData) === null || _b === void 0 ? void 0 : _b.description,
27763
- image: (_c = category.image) === null || _c === void 0 ? void 0 : _c.src,
27764
- };
27765
- }
27766
- catch (_d) { }
27767
- }
27768
- function createCategoryBreadcrumbSchema(pageSpecificDataStr) {
27769
- try {
27770
- var categoryParsed = JSON.parse(pageSpecificDataStr);
27771
- var category = new IkasCategory(categoryParsed);
27772
- return {
27773
- "@context": "http://schema.org",
27774
- "@type": "BreadcrumbList",
27775
- itemListElement: category.path.map(function (categoryPath, index) { return ({
27776
- "@type": "ListItem",
27777
- position: index + 1,
27778
- name: categoryPath.name,
27779
- item: typeof window !== undefined
27780
- ? "https://" + window.location.hostname + categoryPath.href
27781
- : "",
27782
- }); }),
27783
- };
27784
- }
27785
- catch (_a) { }
27786
- }
27787
-
27788
28055
  var CustomerLoginRequiredError = mobxReactLite.observer(function (_a) {
27789
28056
  var onClose = _a.onClose;
27790
28057
  return (React.createElement(ErrorContainer, { onClose: onClose },
@@ -27916,67 +28183,6 @@ var style = {
27916
28183
  backgroundColor: "rgba(255, 0, 0, 0.5)",
27917
28184
  };
27918
28185
 
27919
- var ThemeComponent = mobxReactLite.observer(function (_a) {
27920
- var pageComponentPropValue = _a.pageComponentPropValue, pageComponent = _a.pageComponent, index = _a.index, settingsStr = _a.settingsStr;
27921
- var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
27922
- var settings = new IkasThemeSettings(JSON.parse(settingsStr));
27923
- React.useEffect(function () {
27924
- settings.colors.map(function (sc) {
27925
- return document.documentElement.style.setProperty(sc.key, sc.color);
27926
- });
27927
- }, [settings]);
27928
- var propValues = pageComponentPropValue.propValues;
27929
- var hasNullValue = mobx.computed(function () {
27930
- return Object.entries(propValues || {}).some(function (_a) {
27931
- var _b;
27932
- var propName = _a[0], propValue = _a[1];
27933
- return (propValue === null || propValue === undefined) && ((_b = pageComponentPropValue.component.props.find(function (p) { return p.name === propName; })) === null || _b === void 0 ? void 0 : _b.isRequired);
27934
- });
27935
- });
27936
- var Component = components[pageComponent.componentId];
27937
- return (React.createElement("div", { id: index + "" }, hasNullValue.get() ? (React.createElement(ErrorComponent, null)) : (React.createElement(Component, __assign({ key: pageComponent.id }, propValues, { settings: settings, store: store })))));
27938
- });
27939
-
27940
- var IkasPage = mobxReactLite.observer(function (_a) {
27941
- var _b, _c;
27942
- var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
27943
- var store = IkasStorefrontConfig.store;
27944
- if (page) {
27945
- store.currentPageType = page.type;
27946
- }
27947
- React.useEffect(function () {
27948
- store.checkLocalization();
27949
- //@ts-ignore
27950
- store.cartStore.getCart();
27951
- }, []);
27952
- var renderComponent = function (pageComponent, index) {
27953
- var pageComponentPropValue = propValues.find(function (pv) { return pv.pageComponent.id === pageComponent.id; });
27954
- return (React.createElement(ThemeComponent, { key: pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, pageComponent: pageComponent, settingsStr: settingsStr }));
27955
- };
27956
- var headerComponent = (_b = propValues.find(function (pv) { return pv.component.isHeader; })) === null || _b === void 0 ? void 0 : _b.pageComponent;
27957
- var footerComponent = (_c = propValues.find(function (pv) { return pv.component.isFooter; })) === null || _c === void 0 ? void 0 : _c.pageComponent;
27958
- var others = propValues
27959
- .filter(function (pv) { return !pv.component.isHeader && !pv.component.isFooter; })
27960
- .map(function (pv) { return pv.pageComponent; }) || [];
27961
- if (!page)
27962
- return null;
27963
- return (React.createElement(React.Fragment, null,
27964
- React.createElement(IkasPageHead, { page: page, pageTitle: page.pageTitle, description: page.description, pageSpecificDataStr: pageSpecificDataStr, merchantSettings: merchantSettings, addOgpMetas: addOgpMetas }),
27965
- React.createElement("div", { style: pageStyle },
27966
- React.createElement("div", null,
27967
- headerComponent && renderComponent(headerComponent, -1),
27968
- others.map(renderComponent)),
27969
- footerComponent && renderComponent(footerComponent, -1))));
27970
- });
27971
- var pageStyle = {
27972
- position: "relative",
27973
- minHeight: "100vh",
27974
- width: "100vw",
27975
- display: "flex",
27976
- flexDirection: "column",
27977
- justifyContent: "space-between",
27978
- };
27979
-
27980
28186
  var PageViewModel = /** @class */ (function () {
27981
28187
  function PageViewModel(router) {
27982
28188
  var _this = this;
@@ -28088,18 +28294,6 @@ var PageViewModel = /** @class */ (function () {
28088
28294
  data: data,
28089
28295
  }, "*");
28090
28296
  };
28091
- this.getComponentPropValues = function (pageComponent) {
28092
- var _a;
28093
- var json = {};
28094
- var component = (_a = _this.theme) === null || _a === void 0 ? void 0 : _a.components.find(function (c) { return c.id === pageComponent.componentId; });
28095
- component === null || component === void 0 ? void 0 : component.props.forEach(function (prop) {
28096
- // TODO get prop values
28097
- if (prop.type === exports.IkasThemeComponentPropType.TEXT) {
28098
- json[prop.name] = pageComponent.propValues[prop.name];
28099
- }
28100
- });
28101
- return json;
28102
- };
28103
28297
  this.getPagePropValues = function () { return __awaiter(_this, void 0, void 0, function () {
28104
28298
  var pageDataProvider;
28105
28299
  var _this = this;
@@ -28112,7 +28306,7 @@ var PageViewModel = /** @class */ (function () {
28112
28306
  return [4 /*yield*/, pageDataProvider.getPageData()];
28113
28307
  case 1:
28114
28308
  _b.sent();
28115
- pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router);
28309
+ pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router, JSON.stringify(this.theme.settings));
28116
28310
  mobx.runInAction(function () {
28117
28311
  _this.pageDataProvider = pageDataProvider;
28118
28312
  _this.isLoading = false;
@@ -28176,7 +28370,13 @@ var PageViewModel = /** @class */ (function () {
28176
28370
  if (pageComponentPropValues) {
28177
28371
  pageComponentPropValues.propValues[propName] = propValue;
28178
28372
  if (prop.type === exports.IkasThemeComponentPropType.CUSTOM) {
28179
- IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValues, _this.router, true);
28373
+ IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValues, _this.router, _this.theme.settings, true);
28374
+ }
28375
+ else if (prop.type === exports.IkasThemeComponentPropType.COMPONENT) {
28376
+ IkasPageDataProvider.initComponentPropValue(prop, propValue, pageComponentPropValues, _this.router, _this.theme.settings, true);
28377
+ }
28378
+ else if (prop.type === exports.IkasThemeComponentPropType.COMPONENT_LIST) {
28379
+ IkasPageDataProvider.initComponentListPropValue(prop, propValue, pageComponentPropValues, _this.router, _this.theme.settings, true);
28180
28380
  }
28181
28381
  }
28182
28382
  });
@@ -28245,7 +28445,7 @@ var PageViewModel = /** @class */ (function () {
28245
28445
  mobx.runInAction(function () {
28246
28446
  var customDataProps = pageComponentPropValues.component.props.filter(function (p) { return p.type === exports.IkasThemeComponentPropType.CUSTOM; });
28247
28447
  customDataProps.forEach(function (customDataProp) {
28248
- IkasPageDataProvider.initCustomDataPropValue(customDataProp, pageComponentPropValues.propValues[customDataProp.name], pageComponentPropValues, _this.router, true);
28448
+ IkasPageDataProvider.initCustomDataPropValue(customDataProp, pageComponentPropValues.propValues[customDataProp.name], pageComponentPropValues, _this.router, _this.theme.settings, true);
28249
28449
  });
28250
28450
  _this.pageDataProvider.pageComponentPropValues.push(pageComponentPropValues);
28251
28451
  _this.pageComponents.push(pageComponent);
@@ -28830,7 +29030,9 @@ var Page = function (_a) {
28830
29030
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
28831
29031
  IkasStorefrontConfig.initWithJson(configJson);
28832
29032
  var router$1 = router.useRouter();
28833
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29033
+ var propValues = React.useMemo(function () {
29034
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29035
+ }, [propValuesStr]);
28834
29036
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
28835
29037
  };
28836
29038
  var getStaticProps = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -28853,14 +29055,16 @@ var Page$1 = function (_a) {
28853
29055
  IkasStorefrontConfig.initWithJson(configJson);
28854
29056
  var router$1 = router.useRouter();
28855
29057
  var _b = React.useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
28856
- var initialPropValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29058
+ var initialPropValues = React.useMemo(function () {
29059
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29060
+ }, [propValuesStr]);
28857
29061
  var _c = React.useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
28858
29062
  React.useEffect(function () {
28859
29063
  setIsBrowser(typeof window !== "undefined");
28860
29064
  handleAnalytics(page, pageSpecificDataStr);
28861
29065
  }, []);
28862
29066
  React.useEffect(function () {
28863
- setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, isBrowser));
29067
+ setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr, isBrowser));
28864
29068
  }, [isBrowser, propValuesStr]);
28865
29069
  return (React.createElement(IkasPage, { page: page, propValues: propValues, pageSpecificDataStr: pageSpecificDataStr, settingsStr: settingsStr, merchantSettings: merchantSettings, addOgpMetas: true }));
28866
29070
  };
@@ -28881,6 +29085,7 @@ var getStaticPaths = function (context) { return __awaiter(void 0, void 0, void
28881
29085
  return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
28882
29086
  productIdList: productMetaData.map(function (p) { return p.targetId; }),
28883
29087
  priceListId: IkasStorefrontConfig.priceListId,
29088
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
28884
29089
  })];
28885
29090
  case 2:
28886
29091
  productsResponse = _b.sent();
@@ -28952,7 +29157,7 @@ function handleAnalytics(page, pageSpecificDataStr) {
28952
29157
  else {
28953
29158
  categoryPath = category.name;
28954
29159
  }
28955
- Analytics.viewCategory(categoryPath);
29160
+ Analytics.viewCategory(categoryPath, category);
28956
29161
  }
28957
29162
  }
28958
29163
  catch (err) {
@@ -28972,7 +29177,9 @@ var Page$2 = function (_a) {
28972
29177
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
28973
29178
  IkasStorefrontConfig.initWithJson(configJson);
28974
29179
  var router$1 = router.useRouter();
28975
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29180
+ var propValues = React.useMemo(function () {
29181
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29182
+ }, [propValuesStr]);
28976
29183
  return (React.createElement(IkasPage, { page: page, settingsStr: settingsStr, propValues: propValues }));
28977
29184
  };
28978
29185
  var getStaticPaths$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29121,7 +29328,9 @@ var Page$3 = function (_a) {
29121
29328
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
29122
29329
  IkasStorefrontConfig.initWithJson(configJson);
29123
29330
  var router$1 = router.useRouter();
29124
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29331
+ var propValues = React.useMemo(function () {
29332
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29333
+ }, [propValuesStr]);
29125
29334
  return (React.createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
29126
29335
  };
29127
29336
  var getStaticProps$3 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29143,7 +29352,9 @@ var Page$4 = function (_a) {
29143
29352
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
29144
29353
  IkasStorefrontConfig.initWithJson(configJson);
29145
29354
  var router$1 = router.useRouter();
29146
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29355
+ var propValues = React.useMemo(function () {
29356
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29357
+ }, [propValuesStr]);
29147
29358
  return (React.createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
29148
29359
  };
29149
29360
  var getStaticProps$4 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29165,7 +29376,9 @@ var Page$5 = function (_a) {
29165
29376
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
29166
29377
  IkasStorefrontConfig.initWithJson(configJson);
29167
29378
  var router$1 = router.useRouter();
29168
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29379
+ var propValues = React.useMemo(function () {
29380
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29381
+ }, [propValuesStr]);
29169
29382
  return (React.createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
29170
29383
  };
29171
29384
  var getStaticProps$5 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29187,7 +29400,9 @@ var Page$6 = function (_a) {
29187
29400
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
29188
29401
  IkasStorefrontConfig.initWithJson(configJson);
29189
29402
  var router$1 = router.useRouter();
29190
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29403
+ var propValues = React.useMemo(function () {
29404
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29405
+ }, [propValuesStr]);
29191
29406
  return (React.createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
29192
29407
  };
29193
29408
  var getServerSideProps$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29209,7 +29424,9 @@ var Page$7 = function (_a) {
29209
29424
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
29210
29425
  IkasStorefrontConfig.initWithJson(configJson);
29211
29426
  var router$1 = router.useRouter();
29212
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29427
+ var propValues = React.useMemo(function () {
29428
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29429
+ }, [propValuesStr]);
29213
29430
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
29214
29431
  };
29215
29432
  var getStaticProps$6 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29231,7 +29448,9 @@ var Page$8 = function (_a) {
29231
29448
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
29232
29449
  IkasStorefrontConfig.initWithJson(configJson);
29233
29450
  var router$1 = router.useRouter();
29234
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29451
+ var propValues = React.useMemo(function () {
29452
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29453
+ }, [propValuesStr]);
29235
29454
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
29236
29455
  };
29237
29456
  var getStaticProps$7 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29253,7 +29472,9 @@ var Page$9 = function (_a) {
29253
29472
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
29254
29473
  IkasStorefrontConfig.initWithJson(configJson);
29255
29474
  var router$1 = router.useRouter();
29256
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29475
+ var propValues = React.useMemo(function () {
29476
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29477
+ }, [propValuesStr]);
29257
29478
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
29258
29479
  };
29259
29480
  var getStaticProps$8 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29275,7 +29496,9 @@ var Page$a = function (_a) {
29275
29496
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
29276
29497
  IkasStorefrontConfig.initWithJson(configJson);
29277
29498
  var router$1 = router.useRouter();
29278
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29499
+ var propValues = React.useMemo(function () {
29500
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29501
+ }, [propValuesStr]);
29279
29502
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
29280
29503
  };
29281
29504
  var getStaticProps$9 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29297,7 +29520,9 @@ var Page$b = function (_a) {
29297
29520
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
29298
29521
  IkasStorefrontConfig.initWithJson(configJson);
29299
29522
  var router$1 = router.useRouter();
29300
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29523
+ var propValues = React.useMemo(function () {
29524
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29525
+ }, [propValuesStr]);
29301
29526
  var store = IkasStorefrontConfig.store;
29302
29527
  React.useEffect(function () {
29303
29528
  Analytics.viewCart(store.cartStore.cart);
@@ -29334,7 +29559,9 @@ var Page$d = function (_a) {
29334
29559
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
29335
29560
  IkasStorefrontConfig.initWithJson(configJson);
29336
29561
  var router$1 = router.useRouter();
29337
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29562
+ var propValues = React.useMemo(function () {
29563
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29564
+ }, [propValuesStr]);
29338
29565
  return (React.createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
29339
29566
  };
29340
29567
  var getStaticProps$b = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29357,13 +29584,15 @@ var Page$e = function (_a) {
29357
29584
  IkasStorefrontConfig.initWithJson(configJson);
29358
29585
  var router$1 = router.useRouter();
29359
29586
  var _b = React.useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
29360
- var initialPropValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29587
+ var initialPropValues = React.useMemo(function () {
29588
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29589
+ }, [propValuesStr]);
29361
29590
  var _c = React.useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
29362
29591
  React.useEffect(function () {
29363
29592
  setIsBrowser(typeof window !== "undefined");
29364
29593
  }, []);
29365
29594
  React.useEffect(function () {
29366
- setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, isBrowser));
29595
+ setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr, isBrowser));
29367
29596
  }, [isBrowser, propValuesStr]);
29368
29597
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
29369
29598
  };
@@ -29388,7 +29617,9 @@ var Page$f = function (_a) {
29388
29617
  return React.createElement(Error__default['default'], { statusCode: 404 });
29389
29618
  IkasStorefrontConfig.initWithJson(configJson);
29390
29619
  var router$1 = router.useRouter();
29391
- var propValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
29620
+ var propValues = React.useMemo(function () {
29621
+ return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
29622
+ }, [propValuesStr]);
29392
29623
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
29393
29624
  };
29394
29625
  var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -29446,6 +29677,7 @@ var IkasBaseStore = /** @class */ (function () {
29446
29677
  this.localeOptions = [];
29447
29678
  this.showLocaleOptions = false;
29448
29679
  this.localeChecked = false;
29680
+ this.settingsSet = false;
29449
29681
  this.customerStore = new IkasCustomerStore(this);
29450
29682
  this.cartStore = new IkasCartStore(this);
29451
29683
  mobx.makeObservable(this, {
@@ -29534,6 +29766,14 @@ var IkasBaseStore = /** @class */ (function () {
29534
29766
  (localeOption.routing.path ? "/" + localeOption.routing.path : ""));
29535
29767
  }
29536
29768
  };
29769
+ IkasBaseStore.prototype.setSettings = function (settingsStr) {
29770
+ if (this.settingsSet)
29771
+ return;
29772
+ var settings = new IkasThemeSettings(JSON.parse(settingsStr));
29773
+ settings.colors.map(function (sc) {
29774
+ return document.documentElement.style.setProperty(sc.key, sc.color);
29775
+ });
29776
+ };
29537
29777
  return IkasBaseStore;
29538
29778
  }());
29539
29779
 
@@ -29571,6 +29811,7 @@ exports.IkasCheckout = IkasCheckout;
29571
29811
  exports.IkasCheckoutAPI = IkasCheckoutAPI;
29572
29812
  exports.IkasCheckoutPage = IkasCheckoutPage;
29573
29813
  exports.IkasCityAPI = IkasCityAPI;
29814
+ exports.IkasComponentRenderer = IkasComponentRenderer;
29574
29815
  exports.IkasContactForm = IkasContactForm;
29575
29816
  exports.IkasContactFormAPI = IkasContactFormAPI;
29576
29817
  exports.IkasCountryAPI = IkasCountryAPI;