@ikas/storefront 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/build/index.es.js +109 -109
  2. package/build/index.js +108 -108
  3. package/package.json +1 -1
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;
@@ -12318,6 +12245,115 @@ var formatMoney = function (price, currency) {
12318
12245
  return formatter.format(price);
12319
12246
  };
12320
12247
 
12248
+ var IkasImage = /** @class */ (function () {
12249
+ function IkasImage(id) {
12250
+ this.id = id;
12251
+ makeAutoObservable(this);
12252
+ }
12253
+ Object.defineProperty(IkasImage.prototype, "editorApiKey", {
12254
+ get: function () {
12255
+ if (typeof window !== "undefined")
12256
+ return window.editorApiKey;
12257
+ },
12258
+ enumerable: false,
12259
+ configurable: true
12260
+ });
12261
+ Object.defineProperty(IkasImage.prototype, "src", {
12262
+ get: function () {
12263
+ if (this.id.includes("/"))
12264
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
12265
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12266
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
12267
+ },
12268
+ enumerable: false,
12269
+ configurable: true
12270
+ });
12271
+ Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
12272
+ get: function () {
12273
+ if (this.id.includes("/"))
12274
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
12275
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12276
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
12277
+ },
12278
+ enumerable: false,
12279
+ configurable: true
12280
+ });
12281
+ return IkasImage;
12282
+ }());
12283
+
12284
+ var IkasHTMLMetaData = /** @class */ (function () {
12285
+ function IkasHTMLMetaData(data) {
12286
+ if (data === void 0) { data = {}; }
12287
+ this.redirectTo = null;
12288
+ this.slug = data.slug || "";
12289
+ this.pageTitle = data.pageTitle || null;
12290
+ this.description = data.description || null;
12291
+ this.targetType = data.targetType || null;
12292
+ this.targetId = data.targetId || null;
12293
+ this.redirectTo = data.redirectTo;
12294
+ makeAutoObservable(this);
12295
+ }
12296
+ return IkasHTMLMetaData;
12297
+ }());
12298
+ var IkasHTMLMetaDataTargetType;
12299
+ (function (IkasHTMLMetaDataTargetType) {
12300
+ IkasHTMLMetaDataTargetType["PRODUCT"] = "PRODUCT";
12301
+ IkasHTMLMetaDataTargetType["CATEGORY"] = "CATEGORY";
12302
+ IkasHTMLMetaDataTargetType["BRAND"] = "BRAND";
12303
+ IkasHTMLMetaDataTargetType["PAGE"] = "PAGE";
12304
+ })(IkasHTMLMetaDataTargetType || (IkasHTMLMetaDataTargetType = {}));
12305
+
12306
+ var IkasBrand = /** @class */ (function () {
12307
+ function IkasBrand(data) {
12308
+ this.metaData = null;
12309
+ this.image = null;
12310
+ this.id = data.id || "";
12311
+ this.name = data.name || "";
12312
+ this.metaData = data.metaData
12313
+ ? new IkasHTMLMetaData(data.metaData)
12314
+ : undefined;
12315
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12316
+ makeAutoObservable(this);
12317
+ }
12318
+ Object.defineProperty(IkasBrand.prototype, "href", {
12319
+ get: function () {
12320
+ var _a;
12321
+ if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
12322
+ return "";
12323
+ return "/" + this.metaData.slug;
12324
+ },
12325
+ enumerable: false,
12326
+ configurable: true
12327
+ });
12328
+ return IkasBrand;
12329
+ }());
12330
+
12331
+ var IkasCategory = /** @class */ (function () {
12332
+ function IkasCategory(data) {
12333
+ this.metaData = null;
12334
+ this.image = null;
12335
+ this.id = data.id || "";
12336
+ this.name = data.name || "";
12337
+ this.parentId = data.parentId || null;
12338
+ this.metaData = data.metaData
12339
+ ? new IkasHTMLMetaData(data.metaData)
12340
+ : undefined;
12341
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12342
+ makeAutoObservable(this);
12343
+ }
12344
+ Object.defineProperty(IkasCategory.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 IkasCategory;
12355
+ }());
12356
+
12321
12357
  var IkasOrderAddress = /** @class */ (function () {
12322
12358
  function IkasOrderAddress(data) {
12323
12359
  if (data === void 0) { data = {}; }
@@ -12418,42 +12454,6 @@ var IkasOrderLineDiscount = /** @class */ (function () {
12418
12454
  return IkasOrderLineDiscount;
12419
12455
  }());
12420
12456
 
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
12457
  var IkasOrderLineVariant = /** @class */ (function () {
12458
12458
  function IkasOrderLineVariant(data) {
12459
12459
  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;
@@ -12330,6 +12258,114 @@ var formatMoney = function (price, currency) {
12330
12258
  return formatter.format(price);
12331
12259
  };
12332
12260
 
12261
+ var IkasImage = /** @class */ (function () {
12262
+ function IkasImage(id) {
12263
+ this.id = id;
12264
+ mobx.makeAutoObservable(this);
12265
+ }
12266
+ Object.defineProperty(IkasImage.prototype, "editorApiKey", {
12267
+ get: function () {
12268
+ if (typeof window !== "undefined")
12269
+ return window.editorApiKey;
12270
+ },
12271
+ enumerable: false,
12272
+ configurable: true
12273
+ });
12274
+ Object.defineProperty(IkasImage.prototype, "src", {
12275
+ get: function () {
12276
+ if (this.id.includes("/"))
12277
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
12278
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12279
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
12280
+ },
12281
+ enumerable: false,
12282
+ configurable: true
12283
+ });
12284
+ Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
12285
+ get: function () {
12286
+ if (this.id.includes("/"))
12287
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
12288
+ var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
12289
+ return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
12290
+ },
12291
+ enumerable: false,
12292
+ configurable: true
12293
+ });
12294
+ return IkasImage;
12295
+ }());
12296
+
12297
+ var IkasHTMLMetaData = /** @class */ (function () {
12298
+ function IkasHTMLMetaData(data) {
12299
+ if (data === void 0) { data = {}; }
12300
+ this.redirectTo = null;
12301
+ this.slug = data.slug || "";
12302
+ this.pageTitle = data.pageTitle || null;
12303
+ this.description = data.description || null;
12304
+ this.targetType = data.targetType || null;
12305
+ this.targetId = data.targetId || null;
12306
+ this.redirectTo = data.redirectTo;
12307
+ mobx.makeAutoObservable(this);
12308
+ }
12309
+ return IkasHTMLMetaData;
12310
+ }());
12311
+ (function (IkasHTMLMetaDataTargetType) {
12312
+ IkasHTMLMetaDataTargetType["PRODUCT"] = "PRODUCT";
12313
+ IkasHTMLMetaDataTargetType["CATEGORY"] = "CATEGORY";
12314
+ IkasHTMLMetaDataTargetType["BRAND"] = "BRAND";
12315
+ IkasHTMLMetaDataTargetType["PAGE"] = "PAGE";
12316
+ })(exports.IkasHTMLMetaDataTargetType || (exports.IkasHTMLMetaDataTargetType = {}));
12317
+
12318
+ var IkasBrand = /** @class */ (function () {
12319
+ function IkasBrand(data) {
12320
+ this.metaData = null;
12321
+ this.image = null;
12322
+ this.id = data.id || "";
12323
+ this.name = data.name || "";
12324
+ this.metaData = data.metaData
12325
+ ? new IkasHTMLMetaData(data.metaData)
12326
+ : undefined;
12327
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12328
+ mobx.makeAutoObservable(this);
12329
+ }
12330
+ Object.defineProperty(IkasBrand.prototype, "href", {
12331
+ get: function () {
12332
+ var _a;
12333
+ if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
12334
+ return "";
12335
+ return "/" + this.metaData.slug;
12336
+ },
12337
+ enumerable: false,
12338
+ configurable: true
12339
+ });
12340
+ return IkasBrand;
12341
+ }());
12342
+
12343
+ var IkasCategory = /** @class */ (function () {
12344
+ function IkasCategory(data) {
12345
+ this.metaData = null;
12346
+ this.image = null;
12347
+ this.id = data.id || "";
12348
+ this.name = data.name || "";
12349
+ this.parentId = data.parentId || null;
12350
+ this.metaData = data.metaData
12351
+ ? new IkasHTMLMetaData(data.metaData)
12352
+ : undefined;
12353
+ this.image = data.image ? new IkasImage(data.image.id) : null;
12354
+ mobx.makeAutoObservable(this);
12355
+ }
12356
+ Object.defineProperty(IkasCategory.prototype, "href", {
12357
+ get: function () {
12358
+ var _a;
12359
+ if (!((_a = this.metaData) === null || _a === void 0 ? void 0 : _a.slug))
12360
+ return "";
12361
+ return "/" + this.metaData.slug;
12362
+ },
12363
+ enumerable: false,
12364
+ configurable: true
12365
+ });
12366
+ return IkasCategory;
12367
+ }());
12368
+
12333
12369
  var IkasOrderAddress = /** @class */ (function () {
12334
12370
  function IkasOrderAddress(data) {
12335
12371
  if (data === void 0) { data = {}; }
@@ -12430,42 +12466,6 @@ var IkasOrderLineDiscount = /** @class */ (function () {
12430
12466
  return IkasOrderLineDiscount;
12431
12467
  }());
12432
12468
 
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
12469
  var IkasOrderLineVariant = /** @class */ (function () {
12470
12470
  function IkasOrderLineVariant(data) {
12471
12471
  if (data === void 0) { data = {}; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",