@ikas/storefront 0.0.12 → 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.
- package/build/index.es.js +115 -109
- package/build/index.js +114 -108
- package/build/utils/providers/page-data.d.ts +1 -0
- 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;
|
|
@@ -12181,6 +12108,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12181
12108
|
case IkasThemeComponentPropType.IMAGE:
|
|
12182
12109
|
IkasPageDataProvider.initImagePropValue(prop, propValue, pageComponentPropValue);
|
|
12183
12110
|
break;
|
|
12111
|
+
case IkasThemeComponentPropType.IMAGE_LIST:
|
|
12112
|
+
IkasPageDataProvider.initImageListPropValue(prop, propValue, pageComponentPropValue);
|
|
12113
|
+
break;
|
|
12184
12114
|
case IkasThemeComponentPropType.BRAND_LIST:
|
|
12185
12115
|
IkasPageDataProvider.initBrandListPropValue(prop, propValue, pageComponentPropValue);
|
|
12186
12116
|
break;
|
|
@@ -12258,6 +12188,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12258
12188
|
IkasPageDataProvider.initImagePropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12259
12189
|
pageComponentPropValue.propValues[prop.name] = new IkasImage(propValue.id);
|
|
12260
12190
|
};
|
|
12191
|
+
IkasPageDataProvider.initImageListPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12192
|
+
pageComponentPropValue.propValues[prop.name] = propValue.map(function (i) { return new IkasImage(i.id); });
|
|
12193
|
+
};
|
|
12261
12194
|
return IkasPageDataProvider;
|
|
12262
12195
|
}());
|
|
12263
12196
|
var IkasPageComponentPropValue = /** @class */ (function () {
|
|
@@ -12312,6 +12245,115 @@ var formatMoney = function (price, currency) {
|
|
|
12312
12245
|
return formatter.format(price);
|
|
12313
12246
|
};
|
|
12314
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
|
+
|
|
12315
12357
|
var IkasOrderAddress = /** @class */ (function () {
|
|
12316
12358
|
function IkasOrderAddress(data) {
|
|
12317
12359
|
if (data === void 0) { data = {}; }
|
|
@@ -12412,42 +12454,6 @@ var IkasOrderLineDiscount = /** @class */ (function () {
|
|
|
12412
12454
|
return IkasOrderLineDiscount;
|
|
12413
12455
|
}());
|
|
12414
12456
|
|
|
12415
|
-
var IkasImage = /** @class */ (function () {
|
|
12416
|
-
function IkasImage(id) {
|
|
12417
|
-
this.id = id;
|
|
12418
|
-
makeAutoObservable(this);
|
|
12419
|
-
}
|
|
12420
|
-
Object.defineProperty(IkasImage.prototype, "editorApiKey", {
|
|
12421
|
-
get: function () {
|
|
12422
|
-
if (typeof window !== "undefined")
|
|
12423
|
-
return window.editorApiKey;
|
|
12424
|
-
},
|
|
12425
|
-
enumerable: false,
|
|
12426
|
-
configurable: true
|
|
12427
|
-
});
|
|
12428
|
-
Object.defineProperty(IkasImage.prototype, "src", {
|
|
12429
|
-
get: function () {
|
|
12430
|
-
if (this.id.includes("/"))
|
|
12431
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
|
|
12432
|
-
var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
|
|
12433
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
|
|
12434
|
-
},
|
|
12435
|
-
enumerable: false,
|
|
12436
|
-
configurable: true
|
|
12437
|
-
});
|
|
12438
|
-
Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
|
|
12439
|
-
get: function () {
|
|
12440
|
-
if (this.id.includes("/"))
|
|
12441
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
|
|
12442
|
-
var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
|
|
12443
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
|
|
12444
|
-
},
|
|
12445
|
-
enumerable: false,
|
|
12446
|
-
configurable: true
|
|
12447
|
-
});
|
|
12448
|
-
return IkasImage;
|
|
12449
|
-
}());
|
|
12450
|
-
|
|
12451
12457
|
var IkasOrderLineVariant = /** @class */ (function () {
|
|
12452
12458
|
function IkasOrderLineVariant(data) {
|
|
12453
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;
|
|
@@ -12193,6 +12121,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12193
12121
|
case exports.IkasThemeComponentPropType.IMAGE:
|
|
12194
12122
|
IkasPageDataProvider.initImagePropValue(prop, propValue, pageComponentPropValue);
|
|
12195
12123
|
break;
|
|
12124
|
+
case exports.IkasThemeComponentPropType.IMAGE_LIST:
|
|
12125
|
+
IkasPageDataProvider.initImageListPropValue(prop, propValue, pageComponentPropValue);
|
|
12126
|
+
break;
|
|
12196
12127
|
case exports.IkasThemeComponentPropType.BRAND_LIST:
|
|
12197
12128
|
IkasPageDataProvider.initBrandListPropValue(prop, propValue, pageComponentPropValue);
|
|
12198
12129
|
break;
|
|
@@ -12270,6 +12201,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12270
12201
|
IkasPageDataProvider.initImagePropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12271
12202
|
pageComponentPropValue.propValues[prop.name] = new IkasImage(propValue.id);
|
|
12272
12203
|
};
|
|
12204
|
+
IkasPageDataProvider.initImageListPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12205
|
+
pageComponentPropValue.propValues[prop.name] = propValue.map(function (i) { return new IkasImage(i.id); });
|
|
12206
|
+
};
|
|
12273
12207
|
return IkasPageDataProvider;
|
|
12274
12208
|
}());
|
|
12275
12209
|
var IkasPageComponentPropValue = /** @class */ (function () {
|
|
@@ -12324,6 +12258,114 @@ var formatMoney = function (price, currency) {
|
|
|
12324
12258
|
return formatter.format(price);
|
|
12325
12259
|
};
|
|
12326
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
|
+
|
|
12327
12369
|
var IkasOrderAddress = /** @class */ (function () {
|
|
12328
12370
|
function IkasOrderAddress(data) {
|
|
12329
12371
|
if (data === void 0) { data = {}; }
|
|
@@ -12424,42 +12466,6 @@ var IkasOrderLineDiscount = /** @class */ (function () {
|
|
|
12424
12466
|
return IkasOrderLineDiscount;
|
|
12425
12467
|
}());
|
|
12426
12468
|
|
|
12427
|
-
var IkasImage = /** @class */ (function () {
|
|
12428
|
-
function IkasImage(id) {
|
|
12429
|
-
this.id = id;
|
|
12430
|
-
mobx.makeAutoObservable(this);
|
|
12431
|
-
}
|
|
12432
|
-
Object.defineProperty(IkasImage.prototype, "editorApiKey", {
|
|
12433
|
-
get: function () {
|
|
12434
|
-
if (typeof window !== "undefined")
|
|
12435
|
-
return window.editorApiKey;
|
|
12436
|
-
},
|
|
12437
|
-
enumerable: false,
|
|
12438
|
-
configurable: true
|
|
12439
|
-
});
|
|
12440
|
-
Object.defineProperty(IkasImage.prototype, "src", {
|
|
12441
|
-
get: function () {
|
|
12442
|
-
if (this.id.includes("/"))
|
|
12443
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/1024/1024/img.webp";
|
|
12444
|
-
var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
|
|
12445
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/1024/1024/img.webp";
|
|
12446
|
-
},
|
|
12447
|
-
enumerable: false,
|
|
12448
|
-
configurable: true
|
|
12449
|
-
});
|
|
12450
|
-
Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
|
|
12451
|
-
get: function () {
|
|
12452
|
-
if (this.id.includes("/"))
|
|
12453
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
|
|
12454
|
-
var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
|
|
12455
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
|
|
12456
|
-
},
|
|
12457
|
-
enumerable: false,
|
|
12458
|
-
configurable: true
|
|
12459
|
-
});
|
|
12460
|
-
return IkasImage;
|
|
12461
|
-
}());
|
|
12462
|
-
|
|
12463
12469
|
var IkasOrderLineVariant = /** @class */ (function () {
|
|
12464
12470
|
function IkasOrderLineVariant(data) {
|
|
12465
12471
|
if (data === void 0) { data = {}; }
|
|
@@ -27,6 +27,7 @@ export declare class IkasPageDataProvider {
|
|
|
27
27
|
static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, queryParams: Record<string, any>, router: NextRouter): void;
|
|
28
28
|
static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
29
29
|
static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
30
|
+
static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
30
31
|
}
|
|
31
32
|
export declare class IkasPageComponentPropValue {
|
|
32
33
|
pageComponent: IkasThemePageComponent;
|