@ikas/storefront 0.0.135 → 0.0.137

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.es.js CHANGED
@@ -17977,6 +17977,7 @@ var IkasProductAttribute = /** @class */ (function () {
17977
17977
  this.name = data.name || "";
17978
17978
  this.type = data.type || IkasProductAttributeType.TEXT;
17979
17979
  this.options = data.options || null;
17980
+ this.tableTemplate = data.tableTemplate || null;
17980
17981
  makeAutoObservable(this);
17981
17982
  }
17982
17983
  return IkasProductAttribute;
@@ -17990,6 +17991,7 @@ var IkasProductAttributeType;
17990
17991
  IkasProductAttributeType["NUMERIC"] = "NUMERIC";
17991
17992
  IkasProductAttributeType["DATETIME"] = "DATETIME";
17992
17993
  IkasProductAttributeType["HTML"] = "HTML";
17994
+ IkasProductAttributeType["TABLE"] = "TABLE";
17993
17995
  })(IkasProductAttributeType || (IkasProductAttributeType = {}));
17994
17996
 
17995
17997
  var IkasProductAttributeValue = /** @class */ (function () {
@@ -18005,6 +18007,14 @@ var IkasProductAttributeValue = /** @class */ (function () {
18005
18007
  : null;
18006
18008
  makeAutoObservable(this);
18007
18009
  }
18010
+ Object.defineProperty(IkasProductAttributeValue.prototype, "tableValue", {
18011
+ get: function () {
18012
+ if (this.value)
18013
+ return JSON.parse(this.value);
18014
+ },
18015
+ enumerable: false,
18016
+ configurable: true
18017
+ });
18008
18018
  return IkasProductAttributeValue;
18009
18019
  }());
18010
18020
 
@@ -18601,6 +18611,7 @@ var IkasThemeComponentPropType;
18601
18611
  IkasThemeComponentPropType["LIST_OF_LINK"] = "LIST_OF_LINK";
18602
18612
  IkasThemeComponentPropType["PRODUCT_DETAIL"] = "PRODUCT_DETAIL";
18603
18613
  IkasThemeComponentPropType["PRODUCT_LIST"] = "PRODUCT_LIST";
18614
+ IkasThemeComponentPropType["PRODUCT_ATTRIBUTE"] = "PRODUCT_ATTRIBUTE";
18604
18615
  IkasThemeComponentPropType["BRAND"] = "BRAND";
18605
18616
  IkasThemeComponentPropType["BRAND_LIST"] = "BRAND_LIST";
18606
18617
  IkasThemeComponentPropType["CATEGORY"] = "CATEGORY";
@@ -18611,6 +18622,9 @@ var IkasThemeComponentPropType;
18611
18622
  IkasThemeComponentPropType["COMPONENT_LIST"] = "COMPONENT_LIST";
18612
18623
  IkasThemeComponentPropType["BLOG"] = "BLOG";
18613
18624
  IkasThemeComponentPropType["BLOG_LIST"] = "BLOG_LIST";
18625
+ IkasThemeComponentPropType["OBJECT"] = "OBJECT";
18626
+ IkasThemeComponentPropType["STATIC_LIST"] = "STATIC_LIST";
18627
+ IkasThemeComponentPropType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
18614
18628
  })(IkasThemeComponentPropType || (IkasThemeComponentPropType = {}));
18615
18629
 
18616
18630
  var IkasThemeComponent = /** @class */ (function () {
@@ -18634,7 +18648,7 @@ var IkasThemeCustomData = /** @class */ (function () {
18634
18648
  if (data === void 0) { data = {}; }
18635
18649
  this.id = data.id || "";
18636
18650
  this.name = data.name || null;
18637
- this.type = data.type || IkasThemeCustomDataType.TEXT;
18651
+ this.type = data.type || IkasThemeComponentPropType.TEXT;
18638
18652
  this.isRequired = data.isRequired !== undefined ? data.isRequired : true;
18639
18653
  this.key = data.key || null;
18640
18654
  this.parent = data.parent || null;
@@ -18645,7 +18659,7 @@ var IkasThemeCustomData = /** @class */ (function () {
18645
18659
  return new IkasThemeCustomData(__assign(__assign({}, nd), { parent: _this }));
18646
18660
  })
18647
18661
  : null;
18648
- if (this.type === IkasThemeCustomDataType.STATIC_LIST && !this.itemCount)
18662
+ if (this.type === IkasThemeComponentPropType.STATIC_LIST && !this.itemCount)
18649
18663
  this.itemCount = 1;
18650
18664
  makeAutoObservable(this);
18651
18665
  }
@@ -18655,32 +18669,7 @@ var IkasThemeCustomData = /** @class */ (function () {
18655
18669
  return obj;
18656
18670
  };
18657
18671
  return IkasThemeCustomData;
18658
- }());
18659
- var IkasThemeCustomDataType;
18660
- (function (IkasThemeCustomDataType) {
18661
- IkasThemeCustomDataType["TEXT"] = "TEXT";
18662
- IkasThemeCustomDataType["RICH_TEXT"] = "RICH_TEXT";
18663
- IkasThemeCustomDataType["NUMBER"] = "NUMBER";
18664
- IkasThemeCustomDataType["BOOLEAN"] = "BOOLEAN";
18665
- IkasThemeCustomDataType["IMAGE"] = "IMAGE";
18666
- IkasThemeCustomDataType["IMAGE_LIST"] = "IMAGE_LIST";
18667
- IkasThemeCustomDataType["LINK"] = "LINK";
18668
- IkasThemeCustomDataType["LIST_OF_LINK"] = "LIST_OF_LINK";
18669
- IkasThemeCustomDataType["PRODUCT_DETAIL"] = "PRODUCT_DETAIL";
18670
- IkasThemeCustomDataType["PRODUCT_LIST"] = "PRODUCT_LIST";
18671
- IkasThemeCustomDataType["BRAND"] = "BRAND";
18672
- IkasThemeCustomDataType["BRAND_LIST"] = "BRAND_LIST";
18673
- IkasThemeCustomDataType["CATEGORY"] = "CATEGORY";
18674
- IkasThemeCustomDataType["CATEGORY_LIST"] = "CATEGORY_LIST";
18675
- IkasThemeCustomDataType["COLOR"] = "COLOR";
18676
- IkasThemeCustomDataType["COMPONENT"] = "COMPONENT";
18677
- IkasThemeCustomDataType["COMPONENT_LIST"] = "COMPONENT_LIST";
18678
- IkasThemeCustomDataType["BLOG"] = "BLOG";
18679
- IkasThemeCustomDataType["BLOG_LIST"] = "BLOG_LIST";
18680
- IkasThemeCustomDataType["OBJECT"] = "OBJECT";
18681
- IkasThemeCustomDataType["STATIC_LIST"] = "STATIC_LIST";
18682
- IkasThemeCustomDataType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
18683
- })(IkasThemeCustomDataType || (IkasThemeCustomDataType = {}));
18672
+ }());
18684
18673
 
18685
18674
  var IkasThemePageComponent = /** @class */ (function () {
18686
18675
  function IkasThemePageComponent(data) {
@@ -21225,8 +21214,10 @@ var IkasProductList = /** @class */ (function () {
21225
21214
  }); };
21226
21215
  this.searchDebouncer = debounce_1(function () {
21227
21216
  _this.applyFilters();
21228
- Analytics.search(_this._searchKeyword);
21229
21217
  }, 100);
21218
+ this.analyticsDebouncer = debounce_1(function () {
21219
+ Analytics.search(_this._searchKeyword);
21220
+ }, 1000);
21230
21221
  this.data = data.data
21231
21222
  ? data.data.map(function (d) { return new IkasProductDetail(d.product, d.selectedVariantValues); })
21232
21223
  : [];
@@ -21303,6 +21294,7 @@ var IkasProductList = /** @class */ (function () {
21303
21294
  return;
21304
21295
  this._searchKeyword = value;
21305
21296
  this.searchDebouncer();
21297
+ this.analyticsDebouncer();
21306
21298
  },
21307
21299
  enumerable: false,
21308
21300
  configurable: true
@@ -24220,27 +24212,27 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
24220
24212
  _b.trys.push([1, 40, , 41]);
24221
24213
  _a = this.customData.type;
24222
24214
  switch (_a) {
24223
- case IkasThemeCustomDataType.TEXT: return [3 /*break*/, 2];
24224
- case IkasThemeCustomDataType.RICH_TEXT: return [3 /*break*/, 4];
24225
- case IkasThemeCustomDataType.BOOLEAN: return [3 /*break*/, 6];
24226
- case IkasThemeCustomDataType.BRAND_LIST: return [3 /*break*/, 8];
24227
- case IkasThemeCustomDataType.BRAND: return [3 /*break*/, 10];
24228
- case IkasThemeCustomDataType.CATEGORY_LIST: return [3 /*break*/, 12];
24229
- case IkasThemeCustomDataType.CATEGORY: return [3 /*break*/, 14];
24230
- case IkasThemeCustomDataType.COLOR: return [3 /*break*/, 16];
24231
- case IkasThemeCustomDataType.IMAGE_LIST: return [3 /*break*/, 18];
24232
- case IkasThemeCustomDataType.IMAGE: return [3 /*break*/, 20];
24233
- case IkasThemeCustomDataType.LINK: return [3 /*break*/, 22];
24234
- case IkasThemeCustomDataType.LIST_OF_LINK: return [3 /*break*/, 22];
24235
- case IkasThemeCustomDataType.PRODUCT_DETAIL: return [3 /*break*/, 24];
24236
- case IkasThemeCustomDataType.PRODUCT_LIST: return [3 /*break*/, 26];
24237
- case IkasThemeCustomDataType.OBJECT: return [3 /*break*/, 28];
24238
- case IkasThemeCustomDataType.DYNAMIC_LIST: return [3 /*break*/, 30];
24239
- case IkasThemeCustomDataType.STATIC_LIST: return [3 /*break*/, 30];
24240
- case IkasThemeCustomDataType.COMPONENT: return [3 /*break*/, 32];
24241
- case IkasThemeCustomDataType.COMPONENT_LIST: return [3 /*break*/, 32];
24242
- case IkasThemeCustomDataType.BLOG: return [3 /*break*/, 34];
24243
- case IkasThemeCustomDataType.BLOG_LIST: return [3 /*break*/, 36];
24215
+ case IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
24216
+ case IkasThemeComponentPropType.RICH_TEXT: return [3 /*break*/, 4];
24217
+ case IkasThemeComponentPropType.BOOLEAN: return [3 /*break*/, 6];
24218
+ case IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 8];
24219
+ case IkasThemeComponentPropType.BRAND: return [3 /*break*/, 10];
24220
+ case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
24221
+ case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 14];
24222
+ case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 16];
24223
+ case IkasThemeComponentPropType.IMAGE_LIST: return [3 /*break*/, 18];
24224
+ case IkasThemeComponentPropType.IMAGE: return [3 /*break*/, 20];
24225
+ case IkasThemeComponentPropType.LINK: return [3 /*break*/, 22];
24226
+ case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 22];
24227
+ case IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 24];
24228
+ case IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 26];
24229
+ case IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 28];
24230
+ case IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 30];
24231
+ case IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 30];
24232
+ case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 32];
24233
+ case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 32];
24234
+ case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 34];
24235
+ case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 36];
24244
24236
  }
24245
24237
  return [3 /*break*/, 38];
24246
24238
  case 2: return [4 /*yield*/, this.getTextValue()];
@@ -24746,12 +24738,16 @@ var ThemeComponent = observer(function (_a) {
24746
24738
  });
24747
24739
 
24748
24740
  var IkasPageHead = observer(function (_a) {
24749
- var _b;
24741
+ var _b, _c;
24750
24742
  var page = _a.page, pageTitle = _a.pageTitle, description = _a.description, pageSpecificDataStr = _a.pageSpecificDataStr, props = __rest(_a, ["page", "pageTitle", "description", "pageSpecificDataStr"]);
24751
24743
  var ogpMetas = [];
24752
24744
  var schemas = [];
24753
24745
  var isCanonicalLinkAdd = false;
24754
24746
  var canonicalHref = "";
24747
+ if (typeof window !== "undefined") {
24748
+ document.documentElement.lang =
24749
+ ((_b = IkasStorefrontConfig.routings.find(function (r) { return r.id === IkasStorefrontConfig.storefrontRoutingId; })) === null || _b === void 0 ? void 0 : _b.locale) || "tr";
24750
+ }
24755
24751
  if (props.addOgpMetas) {
24756
24752
  ogpMetas.push({
24757
24753
  property: "og:type",
@@ -24788,7 +24784,7 @@ var IkasPageHead = observer(function (_a) {
24788
24784
  if (productDetail.selectedVariant.mainImage) {
24789
24785
  ogpMetas.push({
24790
24786
  property: "og:image",
24791
- content: (_b = productDetail.selectedVariant.mainImage) === null || _b === void 0 ? void 0 : _b.src,
24787
+ content: (_c = productDetail.selectedVariant.mainImage) === null || _c === void 0 ? void 0 : _c.src,
24792
24788
  });
24793
24789
  }
24794
24790
  }
@@ -24996,6 +24992,64 @@ var pageStyle = {
24996
24992
  justifyContent: "space-between",
24997
24993
  };
24998
24994
 
24995
+ var IkasAttributePropValueProvider = /** @class */ (function () {
24996
+ function IkasAttributePropValueProvider(prop, pageSpecificData) {
24997
+ this.attributePropValue = prop;
24998
+ this.pageSpecificData = pageSpecificData;
24999
+ }
25000
+ IkasAttributePropValueProvider.prototype.getValue = function () {
25001
+ var _a;
25002
+ return __awaiter(this, void 0, void 0, function () {
25003
+ var productDetail, productSearchResponse, productList, product, variant;
25004
+ var _this = this;
25005
+ return __generator(this, function (_b) {
25006
+ switch (_b.label) {
25007
+ case 0:
25008
+ if (!this.attributePropValue.attributeId ||
25009
+ (this.attributePropValue.usePageData && !this.pageSpecificData) ||
25010
+ (!this.attributePropValue.usePageData &&
25011
+ !this.attributePropValue.variantId)) {
25012
+ return [2 /*return*/, []];
25013
+ }
25014
+ if (!((_a = this.attributePropValue) === null || _a === void 0 ? void 0 : _a.usePageData)) return [3 /*break*/, 1];
25015
+ productDetail = this.pageSpecificData;
25016
+ return [3 /*break*/, 3];
25017
+ case 1: return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
25018
+ productIdList: [this.attributePropValue.productId],
25019
+ priceListId: IkasStorefrontConfig.priceListId,
25020
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
25021
+ })];
25022
+ case 2:
25023
+ productSearchResponse = _b.sent();
25024
+ if (productSearchResponse) {
25025
+ productList = productSearchResponse.data;
25026
+ if (productList.length) {
25027
+ product = productList[0];
25028
+ if (product === null || product === void 0 ? void 0 : product.hasVariant) {
25029
+ variant = product.variants.find(function (v) { return v.id === _this.attributePropValue.variantId; });
25030
+ if (variant) {
25031
+ productDetail = new IkasProductDetail(product, variant.variantValues);
25032
+ }
25033
+ }
25034
+ else {
25035
+ productDetail = new IkasProductDetail(product, product.variants[0].variantValues);
25036
+ }
25037
+ }
25038
+ }
25039
+ _b.label = 3;
25040
+ case 3:
25041
+ if (!productDetail)
25042
+ return [2 /*return*/, []];
25043
+ return [2 /*return*/, productDetail.product.hasVariant
25044
+ ? productDetail.selectedVariant.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })
25045
+ : productDetail.product.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })];
25046
+ }
25047
+ });
25048
+ });
25049
+ };
25050
+ return IkasAttributePropValueProvider;
25051
+ }());
25052
+
24999
25053
  var IkasPageDataProvider = /** @class */ (function () {
25000
25054
  function IkasPageDataProvider(theme, pageParams, pageType) {
25001
25055
  this.pageType = null;
@@ -25398,76 +25452,80 @@ var IkasPageDataProvider = /** @class */ (function () {
25398
25452
  case IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 7];
25399
25453
  case IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 8];
25400
25454
  case IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 9];
25401
- case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 10];
25402
- case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 11];
25403
- case IkasThemeComponentPropType.LINK: return [3 /*break*/, 12];
25404
- case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 12];
25405
- case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 13];
25406
- case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 14];
25407
- case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 15];
25408
- case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 15];
25409
- case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 17];
25410
- case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 18];
25455
+ case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE: return [3 /*break*/, 10];
25456
+ case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 11];
25457
+ case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
25458
+ case IkasThemeComponentPropType.LINK: return [3 /*break*/, 13];
25459
+ case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 13];
25460
+ case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 14];
25461
+ case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 15];
25462
+ case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 16];
25463
+ case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 16];
25464
+ case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 18];
25465
+ case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 19];
25411
25466
  }
25412
- return [3 /*break*/, 19];
25467
+ return [3 /*break*/, 20];
25413
25468
  case 1:
25414
25469
  propValueProvider = new IkasTextPropValueProvider(propValue);
25415
- return [3 /*break*/, 20];
25470
+ return [3 /*break*/, 21];
25416
25471
  case 2:
25417
25472
  propValueProvider = new IkasRichTextPropValueProvider(propValue);
25418
- return [3 /*break*/, 20];
25473
+ return [3 /*break*/, 21];
25419
25474
  case 3:
25420
25475
  propValueProvider = new IkasBooleanPropValueProvider(propValue);
25421
- return [3 /*break*/, 20];
25476
+ return [3 /*break*/, 21];
25422
25477
  case 4:
25423
25478
  propValueProvider = new IkasImagePropValueProvider(propValue);
25424
- return [3 /*break*/, 20];
25479
+ return [3 /*break*/, 21];
25425
25480
  case 5:
25426
25481
  propValueProvider = new IkasImageListPropValueProvider(propValue);
25427
- return [3 /*break*/, 20];
25482
+ return [3 /*break*/, 21];
25428
25483
  case 6:
25429
25484
  propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
25430
- return [3 /*break*/, 20];
25485
+ return [3 /*break*/, 21];
25431
25486
  case 7:
25432
25487
  propValueProvider = new IkasBrandListPropValueProvider(propValue);
25433
- return [3 /*break*/, 20];
25488
+ return [3 /*break*/, 21];
25434
25489
  case 8:
25435
25490
  propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
25436
- return [3 /*break*/, 20];
25491
+ return [3 /*break*/, 21];
25437
25492
  case 9:
25438
25493
  propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
25439
- return [3 /*break*/, 20];
25494
+ return [3 /*break*/, 21];
25440
25495
  case 10:
25441
- propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
25442
- return [3 /*break*/, 20];
25496
+ propValueProvider = new IkasAttributePropValueProvider(propValue, this.pageSpecificData);
25497
+ return [3 /*break*/, 21];
25443
25498
  case 11:
25444
- propValueProvider = new IkasCategoryListPropValueProvider(propValue);
25445
- return [3 /*break*/, 20];
25499
+ propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
25500
+ return [3 /*break*/, 21];
25446
25501
  case 12:
25447
- propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
25448
- return [3 /*break*/, 20];
25502
+ propValueProvider = new IkasCategoryListPropValueProvider(propValue);
25503
+ return [3 /*break*/, 21];
25449
25504
  case 13:
25450
- propValueProvider = new IkasColorPropValueProvider(propValue);
25451
- return [3 /*break*/, 20];
25505
+ propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
25506
+ return [3 /*break*/, 21];
25452
25507
  case 14:
25508
+ propValueProvider = new IkasColorPropValueProvider(propValue);
25509
+ return [3 /*break*/, 21];
25510
+ case 15:
25453
25511
  customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
25454
25512
  if (!customData)
25455
25513
  return [2 /*return*/];
25456
25514
  propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this, this.pageSpecificData, this.pageParams);
25457
- return [3 /*break*/, 20];
25458
- case 15:
25515
+ return [3 /*break*/, 21];
25516
+ case 16:
25459
25517
  pageComponents = propValue;
25460
25518
  return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) { return _this.getPageComponentPropValues(tp); }))];
25461
- case 16: return [2 /*return*/, _b.sent()];
25462
- case 17:
25463
- propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
25464
- return [3 /*break*/, 20];
25519
+ case 17: return [2 /*return*/, _b.sent()];
25465
25520
  case 18:
25521
+ propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
25522
+ return [3 /*break*/, 21];
25523
+ case 19:
25466
25524
  propValueProvider = new IkasBlogListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
25467
- return [3 /*break*/, 20];
25468
- case 19: return [3 /*break*/, 20];
25469
- case 20: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
25470
- case 21: return [2 /*return*/, _b.sent()];
25525
+ return [3 /*break*/, 21];
25526
+ case 20: return [3 /*break*/, 21];
25527
+ case 21: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
25528
+ case 22: return [2 /*return*/, _b.sent()];
25471
25529
  }
25472
25530
  });
25473
25531
  });
@@ -25519,6 +25577,9 @@ var IkasPageDataProvider = /** @class */ (function () {
25519
25577
  case IkasThemeComponentPropType.PRODUCT_DETAIL:
25520
25578
  IkasPageDataProvider.initProductDetailPropValue(prop, propValue, pageComponentPropValue, router, isBrowser);
25521
25579
  break;
25580
+ case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE:
25581
+ IkasPageDataProvider.initAttributePropValue(prop, propValue, pageComponentPropValue);
25582
+ break;
25522
25583
  case IkasThemeComponentPropType.LINK:
25523
25584
  case IkasThemeComponentPropType.LIST_OF_LINK:
25524
25585
  IkasPageDataProvider.initLinkPropValue(prop, propValue, pageComponentPropValue);
@@ -25592,6 +25653,14 @@ var IkasPageDataProvider = /** @class */ (function () {
25592
25653
  }
25593
25654
  return new IkasProductDetail(productDetail.product, productDetail.selectedVariantValues, router);
25594
25655
  };
25656
+ IkasPageDataProvider.initAttributePropValue = function (prop, propValue, pageComponentPropValue) {
25657
+ pageComponentPropValue.propValues[prop.name] = IkasPageDataProvider._initAttributePropValue(propValue);
25658
+ };
25659
+ IkasPageDataProvider._initAttributePropValue = function (propValue) {
25660
+ return propValue
25661
+ ? propValue.map(function (p) { return new IkasProductAttributeValue(p); })
25662
+ : [];
25663
+ };
25595
25664
  IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
25596
25665
  pageComponentPropValue.propValues[prop.name] = this._initLinkPropValue(propValue);
25597
25666
  };
@@ -25632,25 +25701,27 @@ var IkasPageDataProvider = /** @class */ (function () {
25632
25701
  if (propValue === null || propValue === undefined)
25633
25702
  return null;
25634
25703
  switch (customData.type) {
25635
- case IkasThemeCustomDataType.BRAND:
25704
+ case IkasThemeComponentPropType.BRAND:
25636
25705
  return this._initBrandPropValue(propValue);
25637
- case IkasThemeCustomDataType.BRAND_LIST:
25706
+ case IkasThemeComponentPropType.BRAND_LIST:
25638
25707
  return this._initBrandListPropValue(propValue);
25639
- case IkasThemeCustomDataType.CATEGORY_LIST:
25708
+ case IkasThemeComponentPropType.CATEGORY_LIST:
25640
25709
  return this._initCategoryListPropValue(propValue);
25641
- case IkasThemeCustomDataType.CATEGORY:
25710
+ case IkasThemeComponentPropType.CATEGORY:
25642
25711
  return this._initCategoryPropValue(propValue);
25643
- case IkasThemeCustomDataType.IMAGE_LIST:
25712
+ case IkasThemeComponentPropType.IMAGE_LIST:
25644
25713
  return this._initImageListPropValue(propValue);
25645
- case IkasThemeCustomDataType.IMAGE:
25714
+ case IkasThemeComponentPropType.IMAGE:
25646
25715
  return this._initImagePropValue(propValue);
25647
- case IkasThemeCustomDataType.LINK:
25716
+ case IkasThemeComponentPropType.LINK:
25648
25717
  return this._initLinkPropValue(propValue);
25649
- case IkasThemeCustomDataType.PRODUCT_DETAIL:
25718
+ case IkasThemeComponentPropType.PRODUCT_DETAIL:
25650
25719
  return this._initProductDetailPropValue(propValue, router, isBrowser);
25651
- case IkasThemeCustomDataType.PRODUCT_LIST:
25720
+ case IkasThemeComponentPropType.PRODUCT_LIST:
25652
25721
  return this._initProductListPropValue(propValue, router);
25653
- case IkasThemeCustomDataType.OBJECT:
25722
+ case IkasThemeComponentPropType.PRODUCT_ATTRIBUTE:
25723
+ return this._initAttributePropValue(propValue);
25724
+ case IkasThemeComponentPropType.OBJECT:
25654
25725
  var objectValue = {};
25655
25726
  for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
25656
25727
  var nestedCustomData = _a[_i];
@@ -25658,8 +25729,8 @@ var IkasPageDataProvider = /** @class */ (function () {
25658
25729
  objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, nestedCustomData, router, settings, isBrowser);
25659
25730
  }
25660
25731
  return objectValue;
25661
- case IkasThemeCustomDataType.DYNAMIC_LIST:
25662
- case IkasThemeCustomDataType.STATIC_LIST:
25732
+ case IkasThemeComponentPropType.DYNAMIC_LIST:
25733
+ case IkasThemeComponentPropType.STATIC_LIST:
25663
25734
  try {
25664
25735
  if (!propValue || !propValue.length)
25665
25736
  return null;
@@ -25673,9 +25744,9 @@ var IkasPageDataProvider = /** @class */ (function () {
25673
25744
  catch (err) {
25674
25745
  return [];
25675
25746
  }
25676
- case IkasThemeCustomDataType.COMPONENT:
25747
+ case IkasThemeComponentPropType.COMPONENT:
25677
25748
  return this._initComponentPropValue(propValue, router, settings, isBrowser);
25678
- case IkasThemeCustomDataType.COMPONENT_LIST:
25749
+ case IkasThemeComponentPropType.COMPONENT_LIST:
25679
25750
  return this._initComponentListPropValue(propValue, router, settings, isBrowser);
25680
25751
  default:
25681
25752
  return propValue;
@@ -27482,6 +27553,26 @@ var IkasMerchantAPI = /** @class */ (function () {
27482
27553
  }());
27483
27554
  var templateObject_1$a;
27484
27555
 
27556
+ var IkasProductAttributeTableCell = /** @class */ (function () {
27557
+ function IkasProductAttributeTableCell(data) {
27558
+ this.id = (data === null || data === void 0 ? void 0 : data.id) || "";
27559
+ this.name = (data === null || data === void 0 ? void 0 : data.name) || null;
27560
+ makeAutoObservable(this);
27561
+ }
27562
+ return IkasProductAttributeTableCell;
27563
+ }());
27564
+
27565
+ var IkasProductAttributeTableTemplate = /** @class */ (function () {
27566
+ function IkasProductAttributeTableTemplate(data) {
27567
+ this.columns = (data === null || data === void 0 ? void 0 : data.columns) ? data.columns.map(function (c) { return new IkasProductAttributeTableCell(c); })
27568
+ : [];
27569
+ this.rows = (data === null || data === void 0 ? void 0 : data.rows) ? data.rows.map(function (r) { return new IkasProductAttributeTableCell(r); })
27570
+ : [];
27571
+ makeAutoObservable(this);
27572
+ }
27573
+ return IkasProductAttributeTableTemplate;
27574
+ }());
27575
+
27485
27576
  var IkasProductSearchAPI = /** @class */ (function () {
27486
27577
  function IkasProductSearchAPI() {
27487
27578
  }
@@ -27576,7 +27667,7 @@ function simpleToProduct(simple) {
27576
27667
  return new IkasProduct({
27577
27668
  id: simple.id,
27578
27669
  attributes: (_a = simple.attributes) === null || _a === void 0 ? void 0 : _a.map(function (a) {
27579
- var _a, _b, _c, _d, _e;
27670
+ var _a, _b, _c, _d, _e, _f;
27580
27671
  return new IkasProductAttributeValue({
27581
27672
  value: a.value,
27582
27673
  productAttributeId: (_a = a.productAttribute) === null || _a === void 0 ? void 0 : _a.id,
@@ -27585,6 +27676,8 @@ function simpleToProduct(simple) {
27585
27676
  id: (_c = a.productAttribute) === null || _c === void 0 ? void 0 : _c.id,
27586
27677
  name: (_d = a.productAttribute) === null || _d === void 0 ? void 0 : _d.name,
27587
27678
  type: (_e = a.productAttribute) === null || _e === void 0 ? void 0 : _e.type,
27679
+ tableTemplate: ((_f = a.productAttribute) === null || _f === void 0 ? void 0 : _f.tableTemplate) ? new IkasProductAttributeTableTemplate(a.productAttribute.tableTemplate)
27680
+ : null,
27588
27681
  }),
27589
27682
  productAttributeOption: a.productAttributeOption,
27590
27683
  });
@@ -27616,7 +27709,6 @@ function simpleToProduct(simple) {
27616
27709
  metaData: new IkasHTMLMetaData(simple.metaData || undefined),
27617
27710
  name: simple.name,
27618
27711
  shortDescription: simple.shortDescription || undefined,
27619
- type: simple.type || undefined,
27620
27712
  variantTypes: simple.productVariantTypes.map(function (pvt) {
27621
27713
  return new IkasProductVariantType({
27622
27714
  variantType: new IkasVariantType({
@@ -27643,7 +27735,7 @@ function simpleToProduct(simple) {
27643
27735
  return new IkasProductVariant({
27644
27736
  id: v.id,
27645
27737
  attributes: (_a = v.attributes) === null || _a === void 0 ? void 0 : _a.map(function (a) {
27646
- var _a, _b, _c, _d, _e;
27738
+ var _a, _b, _c, _d, _e, _f;
27647
27739
  return new IkasProductAttributeValue({
27648
27740
  value: a.value,
27649
27741
  productAttributeId: (_a = a.productAttribute) === null || _a === void 0 ? void 0 : _a.id,
@@ -27652,6 +27744,8 @@ function simpleToProduct(simple) {
27652
27744
  id: (_c = a.productAttribute) === null || _c === void 0 ? void 0 : _c.id,
27653
27745
  name: (_d = a.productAttribute) === null || _d === void 0 ? void 0 : _d.name,
27654
27746
  type: (_e = a.productAttribute) === null || _e === void 0 ? void 0 : _e.type,
27747
+ tableTemplate: ((_f = a.productAttribute) === null || _f === void 0 ? void 0 : _f.tableTemplate) ? new IkasProductAttributeTableTemplate(a.productAttribute.tableTemplate)
27748
+ : null,
27655
27749
  }),
27656
27750
  productAttributeOption: a.productAttributeOption,
27657
27751
  });
@@ -30235,7 +30329,7 @@ var SettingsHelper = /** @class */ (function () {
30235
30329
  SettingsHelper.getSettings = function (locale) {
30236
30330
  var _this = this;
30237
30331
  return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
30238
- var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, favicon_1, themeLocalizationPath, routing_1;
30332
+ var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, themeLocalizationPath, routing_1;
30239
30333
  return __generator(this, function (_a) {
30240
30334
  switch (_a.label) {
30241
30335
  case 0:
@@ -30277,7 +30371,6 @@ var SettingsHelper = /** @class */ (function () {
30277
30371
  storefront_1 = new IkasStorefront(settings.storefront);
30278
30372
  salesChannel_1 = new IkasSalesChannel(settings.salesChannel);
30279
30373
  localizationMap = settings.localizationMap;
30280
- favicon_1 = settings.favicon;
30281
30374
  themeLocalizationPath = localizationMap[locale];
30282
30375
  routing_1 = storefront_1.routings.find(function (r) { return r.id === locale || r.path === locale; });
30283
30376
  if (!themeLocalizationPath || !routing_1) {
@@ -30293,12 +30386,14 @@ var SettingsHelper = /** @class */ (function () {
30293
30386
  return resolve(null);
30294
30387
  }
30295
30388
  var result = file.length ? JSON.parse(file.toString()) : {};
30389
+ var themeLocalization = new IkasStorefrontThemeLocalization(result);
30390
+ var favicon = themeLocalization.themeJson.settings.favicon;
30296
30391
  resolve({
30297
30392
  storefront: storefront_1,
30298
- themeLocalization: new IkasStorefrontThemeLocalization(result),
30393
+ themeLocalization: themeLocalization,
30299
30394
  salesChannel: salesChannel_1,
30300
30395
  routing: routing_1,
30301
- favicon: favicon_1,
30396
+ favicon: favicon,
30302
30397
  });
30303
30398
  });
30304
30399
  _a.label = 5;
@@ -31176,4 +31271,4 @@ var IkasBaseStore = /** @class */ (function () {
31176
31271
  return IkasBaseStore;
31177
31272
  }());
31178
31273
 
31179
- export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$5 as BlogPage, _slug_$2 as BlogSlugPage, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemeCustomDataType, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$2 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, search as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, getPlaceholderBlog, getPlaceholderBrand, getPlaceholderCategory, getPlaceholderProduct, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
31274
+ export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$5 as BlogPage, _slug_$2 as BlogSlugPage, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$2 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, search as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, getPlaceholderBlog, getPlaceholderBrand, getPlaceholderCategory, getPlaceholderProduct, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };