@ikas/storefront 0.0.13 → 0.0.15

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
@@ -10931,79 +10931,6 @@ var Apollo = /** @class */ (function () {
10931
10931
  }());
10932
10932
  var apollo = new Apollo();
10933
10933
 
10934
- var IkasHTMLMetaData = /** @class */ (function () {
10935
- function IkasHTMLMetaData(data) {
10936
- if (data === void 0) { data = {}; }
10937
- this.redirectTo = null;
10938
- this.slug = data.slug || "";
10939
- this.pageTitle = data.pageTitle || null;
10940
- this.description = data.description || null;
10941
- this.targetType = data.targetType || null;
10942
- this.targetId = data.targetId || null;
10943
- this.redirectTo = data.redirectTo;
10944
- makeAutoObservable(this);
10945
- }
10946
- return IkasHTMLMetaData;
10947
- }());
10948
- var IkasHTMLMetaDataTargetType;
10949
- (function (IkasHTMLMetaDataTargetType) {
10950
- IkasHTMLMetaDataTargetType["PRODUCT"] = "PRODUCT";
10951
- IkasHTMLMetaDataTargetType["CATEGORY"] = "CATEGORY";
10952
- IkasHTMLMetaDataTargetType["BRAND"] = "BRAND";
10953
- IkasHTMLMetaDataTargetType["PAGE"] = "PAGE";
10954
- })(IkasHTMLMetaDataTargetType || (IkasHTMLMetaDataTargetType = {}));
10955
-
10956
- var IkasBrand = /** @class */ (function () {
10957
- function IkasBrand(data) {
10958
- this.metaData = null;
10959
- this.image = null;
10960
- this.id = data.id || "";
10961
- this.name = data.name || "";
10962
- this.metaData = data.metaData
10963
- ? new IkasHTMLMetaData(data.metaData)
10964
- : undefined;
10965
- this.image = data.image;
10966
- makeAutoObservable(this);
10967
- }
10968
- Object.defineProperty(IkasBrand.prototype, "href", {
10969
- get: function () {
10970
- var _a;
10971
- if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
10972
- return "";
10973
- return "/" + this.metaData.slug;
10974
- },
10975
- enumerable: false,
10976
- configurable: true
10977
- });
10978
- return IkasBrand;
10979
- }());
10980
-
10981
- var IkasCategory = /** @class */ (function () {
10982
- function IkasCategory(data) {
10983
- this.metaData = null;
10984
- this.image = null;
10985
- this.id = data.id || "";
10986
- this.name = data.name || "";
10987
- this.parentId = data.parentId || null;
10988
- this.metaData = data.metaData
10989
- ? new IkasHTMLMetaData(data.metaData)
10990
- : undefined;
10991
- this.image = data.image;
10992
- makeAutoObservable(this);
10993
- }
10994
- Object.defineProperty(IkasCategory.prototype, "href", {
10995
- get: function () {
10996
- var _a;
10997
- if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
10998
- return "";
10999
- return "/" + this.metaData.slug;
11000
- },
11001
- enumerable: false,
11002
- configurable: true
11003
- });
11004
- return IkasCategory;
11005
- }());
11006
-
11007
10934
  var IkasProductListPropValueProvider = /** @class */ (function () {
11008
10935
  function IkasProductListPropValueProvider(pageType, productListPropValue, pageParams, pageSpecificData, skipInitialFetch) {
11009
10936
  this.pageType = pageType;
@@ -12184,9 +12111,15 @@ var IkasPageDataProvider = /** @class */ (function () {
12184
12111
  case IkasThemeComponentPropType.IMAGE_LIST:
12185
12112
  IkasPageDataProvider.initImageListPropValue(prop, propValue, pageComponentPropValue);
12186
12113
  break;
12114
+ case IkasThemeComponentPropType.BRAND:
12115
+ IkasPageDataProvider.initBrandPropValue(prop, propValue, pageComponentPropValue);
12116
+ break;
12187
12117
  case IkasThemeComponentPropType.BRAND_LIST:
12188
12118
  IkasPageDataProvider.initBrandListPropValue(prop, propValue, pageComponentPropValue);
12189
12119
  break;
12120
+ case IkasThemeComponentPropType.CATEGORY:
12121
+ IkasPageDataProvider.initCategoryPropValue(prop, propValue, pageComponentPropValue);
12122
+ break;
12190
12123
  case IkasThemeComponentPropType.CATEGORY_LIST:
12191
12124
  IkasPageDataProvider.initCategoryListPropValue(prop, propValue, pageComponentPropValue);
12192
12125
  break;
@@ -12205,10 +12138,18 @@ var IkasPageDataProvider = /** @class */ (function () {
12205
12138
  });
12206
12139
  return pageComponentPropValues;
12207
12140
  };
12141
+ IkasPageDataProvider.initBrandPropValue = function (prop, propValue, pageComponentPropValue) {
12142
+ var brand = new IkasBrand(propValue);
12143
+ pageComponentPropValue.propValues[prop.name] = brand;
12144
+ };
12208
12145
  IkasPageDataProvider.initBrandListPropValue = function (prop, propValue, pageComponentPropValue) {
12209
12146
  var brandList = new IkasBrandList(propValue);
12210
12147
  pageComponentPropValue.propValues[prop.name] = brandList;
12211
12148
  };
12149
+ IkasPageDataProvider.initCategoryPropValue = function (prop, propValue, pageComponentPropValue) {
12150
+ var category = new IkasCategory(propValue);
12151
+ pageComponentPropValue.propValues[prop.name] = category;
12152
+ };
12212
12153
  IkasPageDataProvider.initCategoryListPropValue = function (prop, propValue, pageComponentPropValue) {
12213
12154
  var categoryList = new IkasCategoryList(propValue);
12214
12155
  pageComponentPropValue.propValues[prop.name] = categoryList;
@@ -12318,6 +12259,115 @@ var formatMoney = function (price, currency) {
12318
12259
  return formatter.format(price);
12319
12260
  };
12320
12261
 
12262
+ var IkasImage = /** @class */ (function () {
12263
+ function IkasImage(id) {
12264
+ this.id = id;
12265
+ makeAutoObservable(this);
12266
+ }
12267
+ Object.defineProperty(IkasImage.prototype, "editorApiKey", {
12268
+ get: function () {
12269
+ if (typeof window !== "undefined")
12270
+ return window.editorApiKey;
12271
+ },
12272
+ enumerable: false,
12273
+ configurable: true
12274
+ });
12275
+ Object.defineProperty(IkasImage.prototype, "src", {
12276
+ get: function () {
12277
+ if (this.id.includes("/"))
12278
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
12279
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12280
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
12281
+ },
12282
+ enumerable: false,
12283
+ configurable: true
12284
+ });
12285
+ Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
12286
+ get: function () {
12287
+ if (this.id.includes("/"))
12288
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
12289
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12290
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
12291
+ },
12292
+ enumerable: false,
12293
+ configurable: true
12294
+ });
12295
+ return IkasImage;
12296
+ }());
12297
+
12298
+ var IkasHTMLMetaData = /** @class */ (function () {
12299
+ function IkasHTMLMetaData(data) {
12300
+ if (data === void 0) { data = {}; }
12301
+ this.redirectTo = null;
12302
+ this.slug = data.slug || "";
12303
+ this.pageTitle = data.pageTitle || null;
12304
+ this.description = data.description || null;
12305
+ this.targetType = data.targetType || null;
12306
+ this.targetId = data.targetId || null;
12307
+ this.redirectTo = data.redirectTo;
12308
+ makeAutoObservable(this);
12309
+ }
12310
+ return IkasHTMLMetaData;
12311
+ }());
12312
+ var IkasHTMLMetaDataTargetType;
12313
+ (function (IkasHTMLMetaDataTargetType) {
12314
+ IkasHTMLMetaDataTargetType["PRODUCT"] = "PRODUCT";
12315
+ IkasHTMLMetaDataTargetType["CATEGORY"] = "CATEGORY";
12316
+ IkasHTMLMetaDataTargetType["BRAND"] = "BRAND";
12317
+ IkasHTMLMetaDataTargetType["PAGE"] = "PAGE";
12318
+ })(IkasHTMLMetaDataTargetType || (IkasHTMLMetaDataTargetType = {}));
12319
+
12320
+ var IkasBrand = /** @class */ (function () {
12321
+ function IkasBrand(data) {
12322
+ this.metaData = null;
12323
+ this.image = null;
12324
+ this.id = data.id || "";
12325
+ this.name = data.name || "";
12326
+ this.metaData = data.metaData
12327
+ ? new IkasHTMLMetaData(data.metaData)
12328
+ : undefined;
12329
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12330
+ makeAutoObservable(this);
12331
+ }
12332
+ Object.defineProperty(IkasBrand.prototype, "href", {
12333
+ get: function () {
12334
+ var _a;
12335
+ if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
12336
+ return "";
12337
+ return "/" + this.metaData.slug;
12338
+ },
12339
+ enumerable: false,
12340
+ configurable: true
12341
+ });
12342
+ return IkasBrand;
12343
+ }());
12344
+
12345
+ var IkasCategory = /** @class */ (function () {
12346
+ function IkasCategory(data) {
12347
+ this.metaData = null;
12348
+ this.image = null;
12349
+ this.id = data.id || "";
12350
+ this.name = data.name || "";
12351
+ this.parentId = data.parentId || null;
12352
+ this.metaData = data.metaData
12353
+ ? new IkasHTMLMetaData(data.metaData)
12354
+ : undefined;
12355
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12356
+ makeAutoObservable(this);
12357
+ }
12358
+ Object.defineProperty(IkasCategory.prototype, "href", {
12359
+ get: function () {
12360
+ var _a;
12361
+ if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
12362
+ return "";
12363
+ return "/" + this.metaData.slug;
12364
+ },
12365
+ enumerable: false,
12366
+ configurable: true
12367
+ });
12368
+ return IkasCategory;
12369
+ }());
12370
+
12321
12371
  var IkasOrderAddress = /** @class */ (function () {
12322
12372
  function IkasOrderAddress(data) {
12323
12373
  if (data === void 0) { data = {}; }
@@ -12418,42 +12468,6 @@ var IkasOrderLineDiscount = /** @class */ (function () {
12418
12468
  return IkasOrderLineDiscount;
12419
12469
  }());
12420
12470
 
12421
- var IkasImage = /** @class */ (function () {
12422
- function IkasImage(id) {
12423
- this.id = id;
12424
- makeAutoObservable(this);
12425
- }
12426
- Object.defineProperty(IkasImage.prototype, "editorApiKey", {
12427
- get: function () {
12428
- if (typeof window !== "undefined")
12429
- return window.editorApiKey;
12430
- },
12431
- enumerable: false,
12432
- configurable: true
12433
- });
12434
- Object.defineProperty(IkasImage.prototype, "src", {
12435
- get: function () {
12436
- if (this.id.includes("/"))
12437
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
12438
- var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12439
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
12440
- },
12441
- enumerable: false,
12442
- configurable: true
12443
- });
12444
- Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
12445
- get: function () {
12446
- if (this.id.includes("/"))
12447
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
12448
- var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12449
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
12450
- },
12451
- enumerable: false,
12452
- configurable: true
12453
- });
12454
- return IkasImage;
12455
- }());
12456
-
12457
12471
  var IkasOrderLineVariant = /** @class */ (function () {
12458
12472
  function IkasOrderLineVariant(data) {
12459
12473
  if (data === void 0) { data = {}; }
package/build/index.js CHANGED
@@ -10944,78 +10944,6 @@ var Apollo = /** @class */ (function () {
10944
10944
  }());
10945
10945
  var apollo = new Apollo();
10946
10946
 
10947
- var IkasHTMLMetaData = /** @class */ (function () {
10948
- function IkasHTMLMetaData(data) {
10949
- if (data === void 0) { data = {}; }
10950
- this.redirectTo = null;
10951
- this.slug = data.slug || "";
10952
- this.pageTitle = data.pageTitle || null;
10953
- this.description = data.description || null;
10954
- this.targetType = data.targetType || null;
10955
- this.targetId = data.targetId || null;
10956
- this.redirectTo = data.redirectTo;
10957
- mobx.makeAutoObservable(this);
10958
- }
10959
- return IkasHTMLMetaData;
10960
- }());
10961
- (function (IkasHTMLMetaDataTargetType) {
10962
- IkasHTMLMetaDataTargetType["PRODUCT"] = "PRODUCT";
10963
- IkasHTMLMetaDataTargetType["CATEGORY"] = "CATEGORY";
10964
- IkasHTMLMetaDataTargetType["BRAND"] = "BRAND";
10965
- IkasHTMLMetaDataTargetType["PAGE"] = "PAGE";
10966
- })(exports.IkasHTMLMetaDataTargetType || (exports.IkasHTMLMetaDataTargetType = {}));
10967
-
10968
- var IkasBrand = /** @class */ (function () {
10969
- function IkasBrand(data) {
10970
- this.metaData = null;
10971
- this.image = null;
10972
- this.id = data.id || "";
10973
- this.name = data.name || "";
10974
- this.metaData = data.metaData
10975
- ? new IkasHTMLMetaData(data.metaData)
10976
- : undefined;
10977
- this.image = data.image;
10978
- mobx.makeAutoObservable(this);
10979
- }
10980
- Object.defineProperty(IkasBrand.prototype, "href", {
10981
- get: function () {
10982
- var _a;
10983
- if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
10984
- return "";
10985
- return "/" + this.metaData.slug;
10986
- },
10987
- enumerable: false,
10988
- configurable: true
10989
- });
10990
- return IkasBrand;
10991
- }());
10992
-
10993
- var IkasCategory = /** @class */ (function () {
10994
- function IkasCategory(data) {
10995
- this.metaData = null;
10996
- this.image = null;
10997
- this.id = data.id || "";
10998
- this.name = data.name || "";
10999
- this.parentId = data.parentId || null;
11000
- this.metaData = data.metaData
11001
- ? new IkasHTMLMetaData(data.metaData)
11002
- : undefined;
11003
- this.image = data.image;
11004
- mobx.makeAutoObservable(this);
11005
- }
11006
- Object.defineProperty(IkasCategory.prototype, "href", {
11007
- get: function () {
11008
- var _a;
11009
- if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
11010
- return "";
11011
- return "/" + this.metaData.slug;
11012
- },
11013
- enumerable: false,
11014
- configurable: true
11015
- });
11016
- return IkasCategory;
11017
- }());
11018
-
11019
10947
  var IkasProductListPropValueProvider = /** @class */ (function () {
11020
10948
  function IkasProductListPropValueProvider(pageType, productListPropValue, pageParams, pageSpecificData, skipInitialFetch) {
11021
10949
  this.pageType = pageType;
@@ -12196,9 +12124,15 @@ var IkasPageDataProvider = /** @class */ (function () {
12196
12124
  case exports.IkasThemeComponentPropType.IMAGE_LIST:
12197
12125
  IkasPageDataProvider.initImageListPropValue(prop, propValue, pageComponentPropValue);
12198
12126
  break;
12127
+ case exports.IkasThemeComponentPropType.BRAND:
12128
+ IkasPageDataProvider.initBrandPropValue(prop, propValue, pageComponentPropValue);
12129
+ break;
12199
12130
  case exports.IkasThemeComponentPropType.BRAND_LIST:
12200
12131
  IkasPageDataProvider.initBrandListPropValue(prop, propValue, pageComponentPropValue);
12201
12132
  break;
12133
+ case exports.IkasThemeComponentPropType.CATEGORY:
12134
+ IkasPageDataProvider.initCategoryPropValue(prop, propValue, pageComponentPropValue);
12135
+ break;
12202
12136
  case exports.IkasThemeComponentPropType.CATEGORY_LIST:
12203
12137
  IkasPageDataProvider.initCategoryListPropValue(prop, propValue, pageComponentPropValue);
12204
12138
  break;
@@ -12217,10 +12151,18 @@ var IkasPageDataProvider = /** @class */ (function () {
12217
12151
  });
12218
12152
  return pageComponentPropValues;
12219
12153
  };
12154
+ IkasPageDataProvider.initBrandPropValue = function (prop, propValue, pageComponentPropValue) {
12155
+ var brand = new IkasBrand(propValue);
12156
+ pageComponentPropValue.propValues[prop.name] = brand;
12157
+ };
12220
12158
  IkasPageDataProvider.initBrandListPropValue = function (prop, propValue, pageComponentPropValue) {
12221
12159
  var brandList = new IkasBrandList(propValue);
12222
12160
  pageComponentPropValue.propValues[prop.name] = brandList;
12223
12161
  };
12162
+ IkasPageDataProvider.initCategoryPropValue = function (prop, propValue, pageComponentPropValue) {
12163
+ var category = new IkasCategory(propValue);
12164
+ pageComponentPropValue.propValues[prop.name] = category;
12165
+ };
12224
12166
  IkasPageDataProvider.initCategoryListPropValue = function (prop, propValue, pageComponentPropValue) {
12225
12167
  var categoryList = new IkasCategoryList(propValue);
12226
12168
  pageComponentPropValue.propValues[prop.name] = categoryList;
@@ -12330,6 +12272,114 @@ var formatMoney = function (price, currency) {
12330
12272
  return formatter.format(price);
12331
12273
  };
12332
12274
 
12275
+ var IkasImage = /** @class */ (function () {
12276
+ function IkasImage(id) {
12277
+ this.id = id;
12278
+ mobx.makeAutoObservable(this);
12279
+ }
12280
+ Object.defineProperty(IkasImage.prototype, "editorApiKey", {
12281
+ get: function () {
12282
+ if (typeof window !== "undefined")
12283
+ return window.editorApiKey;
12284
+ },
12285
+ enumerable: false,
12286
+ configurable: true
12287
+ });
12288
+ Object.defineProperty(IkasImage.prototype, "src", {
12289
+ get: function () {
12290
+ if (this.id.includes("/"))
12291
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
12292
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12293
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
12294
+ },
12295
+ enumerable: false,
12296
+ configurable: true
12297
+ });
12298
+ Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
12299
+ get: function () {
12300
+ if (this.id.includes("/"))
12301
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
12302
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12303
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
12304
+ },
12305
+ enumerable: false,
12306
+ configurable: true
12307
+ });
12308
+ return IkasImage;
12309
+ }());
12310
+
12311
+ var IkasHTMLMetaData = /** @class */ (function () {
12312
+ function IkasHTMLMetaData(data) {
12313
+ if (data === void 0) { data = {}; }
12314
+ this.redirectTo = null;
12315
+ this.slug = data.slug || "";
12316
+ this.pageTitle = data.pageTitle || null;
12317
+ this.description = data.description || null;
12318
+ this.targetType = data.targetType || null;
12319
+ this.targetId = data.targetId || null;
12320
+ this.redirectTo = data.redirectTo;
12321
+ mobx.makeAutoObservable(this);
12322
+ }
12323
+ return IkasHTMLMetaData;
12324
+ }());
12325
+ (function (IkasHTMLMetaDataTargetType) {
12326
+ IkasHTMLMetaDataTargetType["PRODUCT"] = "PRODUCT";
12327
+ IkasHTMLMetaDataTargetType["CATEGORY"] = "CATEGORY";
12328
+ IkasHTMLMetaDataTargetType["BRAND"] = "BRAND";
12329
+ IkasHTMLMetaDataTargetType["PAGE"] = "PAGE";
12330
+ })(exports.IkasHTMLMetaDataTargetType || (exports.IkasHTMLMetaDataTargetType = {}));
12331
+
12332
+ var IkasBrand = /** @class */ (function () {
12333
+ function IkasBrand(data) {
12334
+ this.metaData = null;
12335
+ this.image = null;
12336
+ this.id = data.id || "";
12337
+ this.name = data.name || "";
12338
+ this.metaData = data.metaData
12339
+ ? new IkasHTMLMetaData(data.metaData)
12340
+ : undefined;
12341
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12342
+ mobx.makeAutoObservable(this);
12343
+ }
12344
+ Object.defineProperty(IkasBrand.prototype, "href", {
12345
+ get: function () {
12346
+ var _a;
12347
+ if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
12348
+ return "";
12349
+ return "/" + this.metaData.slug;
12350
+ },
12351
+ enumerable: false,
12352
+ configurable: true
12353
+ });
12354
+ return IkasBrand;
12355
+ }());
12356
+
12357
+ var IkasCategory = /** @class */ (function () {
12358
+ function IkasCategory(data) {
12359
+ this.metaData = null;
12360
+ this.image = null;
12361
+ this.id = data.id || "";
12362
+ this.name = data.name || "";
12363
+ this.parentId = data.parentId || null;
12364
+ this.metaData = data.metaData
12365
+ ? new IkasHTMLMetaData(data.metaData)
12366
+ : undefined;
12367
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12368
+ mobx.makeAutoObservable(this);
12369
+ }
12370
+ Object.defineProperty(IkasCategory.prototype, "href", {
12371
+ get: function () {
12372
+ var _a;
12373
+ if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
12374
+ return "";
12375
+ return "/" + this.metaData.slug;
12376
+ },
12377
+ enumerable: false,
12378
+ configurable: true
12379
+ });
12380
+ return IkasCategory;
12381
+ }());
12382
+
12333
12383
  var IkasOrderAddress = /** @class */ (function () {
12334
12384
  function IkasOrderAddress(data) {
12335
12385
  if (data === void 0) { data = {}; }
@@ -12430,42 +12480,6 @@ var IkasOrderLineDiscount = /** @class */ (function () {
12430
12480
  return IkasOrderLineDiscount;
12431
12481
  }());
12432
12482
 
12433
- var IkasImage = /** @class */ (function () {
12434
- function IkasImage(id) {
12435
- this.id = id;
12436
- mobx.makeAutoObservable(this);
12437
- }
12438
- Object.defineProperty(IkasImage.prototype, "editorApiKey", {
12439
- get: function () {
12440
- if (typeof window !== "undefined")
12441
- return window.editorApiKey;
12442
- },
12443
- enumerable: false,
12444
- configurable: true
12445
- });
12446
- Object.defineProperty(IkasImage.prototype, "src", {
12447
- get: function () {
12448
- if (this.id.includes("/"))
12449
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
12450
- var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12451
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
12452
- },
12453
- enumerable: false,
12454
- configurable: true
12455
- });
12456
- Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
12457
- get: function () {
12458
- if (this.id.includes("/"))
12459
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
12460
- var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12461
- return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
12462
- },
12463
- enumerable: false,
12464
- configurable: true
12465
- });
12466
- return IkasImage;
12467
- }());
12468
-
12469
12483
  var IkasOrderLineVariant = /** @class */ (function () {
12470
12484
  function IkasOrderLineVariant(data) {
12471
12485
  if (data === void 0) { data = {}; }
@@ -21,7 +21,9 @@ export declare class IkasPageDataProvider {
21
21
  getPageComponentPropValue(pageComponent: IkasThemePageComponent, prop: IkasThemeComponentProp): Promise<any>;
22
22
  static isServer(): boolean;
23
23
  static initPropValues(propValuesStr: string, router: NextRouter, queryParams?: Record<string, any>): IkasPageComponentPropValue[];
24
+ static initBrandPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
24
25
  static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
26
+ static initCategoryPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
25
27
  static initCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
26
28
  static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
27
29
  static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, queryParams: Record<string, any>, router: NextRouter): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",