@ikas/storefront 0.0.122 → 0.0.124
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/analytics/analytics.d.ts +2 -2
- package/build/analytics/googleTagManager.d.ts +21 -1
- package/build/components/hoc/ThemeComponent.d.ts +2 -3
- package/build/components/page/index.d.ts +2 -1
- package/build/components/page-editor/model.d.ts +0 -1
- package/build/index.es.js +921 -676
- package/build/index.js +748 -502
- package/build/models/theme/component/prop/index.d.ts +4 -1
- package/build/models/theme/custom-data/index.d.ts +3 -0
- package/build/models/ui/component-renderer/index.d.ts +7 -0
- package/build/models/ui/index.d.ts +1 -0
- package/build/store/base.d.ts +2 -0
- package/build/utils/providers/page-data.d.ts +8 -4
- package/build/utils/providers/prop-value/custom.d.ts +5 -1
- package/build/utils/providers/prop-value/rich-text.d.ts +6 -0
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { makeAutoObservable, toJS, runInAction, reaction, makeObservable,
|
|
2
|
-
import React, { createElement,
|
|
1
|
+
import { makeAutoObservable, computed, toJS, runInAction, reaction, makeObservable, observable, action, configure } from 'mobx';
|
|
2
|
+
import React, { createElement, useState, useEffect, Fragment, useCallback, useRef, useMemo } from 'react';
|
|
3
3
|
import { observer } from 'mobx-react-lite';
|
|
4
|
+
import Head from 'next/head';
|
|
4
5
|
import { useRouter } from 'next/router';
|
|
5
6
|
import Image$1 from 'next/image';
|
|
6
7
|
import Link from 'next/link';
|
|
7
|
-
import Head from 'next/head';
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
import getConfig from 'next/config';
|
|
10
10
|
import dynamic from 'next/dynamic';
|
|
@@ -11386,12 +11386,27 @@ var IkasCategoryListPropValueProvider = /** @class */ (function () {
|
|
|
11386
11386
|
return IkasCategoryListPropValueProvider;
|
|
11387
11387
|
}());
|
|
11388
11388
|
|
|
11389
|
+
var IkasRichTextPropValueProvider = /** @class */ (function () {
|
|
11390
|
+
function IkasRichTextPropValueProvider(textPropValue) {
|
|
11391
|
+
this.text = textPropValue;
|
|
11392
|
+
}
|
|
11393
|
+
IkasRichTextPropValueProvider.prototype.getValue = function () {
|
|
11394
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11395
|
+
return __generator(this, function (_a) {
|
|
11396
|
+
return [2 /*return*/, this.text];
|
|
11397
|
+
});
|
|
11398
|
+
});
|
|
11399
|
+
};
|
|
11400
|
+
return IkasRichTextPropValueProvider;
|
|
11401
|
+
}());
|
|
11402
|
+
|
|
11389
11403
|
var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
11390
|
-
function IkasCustomPropValueProvider(value, customData, theme, pageType, pageSpecificData, pageParams) {
|
|
11404
|
+
function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
|
|
11391
11405
|
this.value = value;
|
|
11392
11406
|
this.customData = customData;
|
|
11393
11407
|
this.theme = theme;
|
|
11394
11408
|
this.pageType = pageType;
|
|
11409
|
+
this.pageDataProvider = pageDataProvider;
|
|
11395
11410
|
this.pageSpecificData = pageSpecificData;
|
|
11396
11411
|
this.pageParams = pageParams;
|
|
11397
11412
|
}
|
|
@@ -11405,89 +11420,100 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11405
11420
|
return [2 /*return*/];
|
|
11406
11421
|
_b.label = 1;
|
|
11407
11422
|
case 1:
|
|
11408
|
-
_b.trys.push([1,
|
|
11423
|
+
_b.trys.push([1, 36, , 37]);
|
|
11409
11424
|
_a = this.customData.type;
|
|
11410
11425
|
switch (_a) {
|
|
11411
11426
|
case IkasThemeCustomDataType.TEXT: return [3 /*break*/, 2];
|
|
11412
|
-
case IkasThemeCustomDataType.
|
|
11413
|
-
case IkasThemeCustomDataType.
|
|
11414
|
-
case IkasThemeCustomDataType.
|
|
11415
|
-
case IkasThemeCustomDataType.
|
|
11416
|
-
case IkasThemeCustomDataType.
|
|
11417
|
-
case IkasThemeCustomDataType.
|
|
11418
|
-
case IkasThemeCustomDataType.
|
|
11419
|
-
case IkasThemeCustomDataType.
|
|
11420
|
-
case IkasThemeCustomDataType.
|
|
11421
|
-
case IkasThemeCustomDataType.
|
|
11422
|
-
case IkasThemeCustomDataType.
|
|
11423
|
-
case IkasThemeCustomDataType.
|
|
11424
|
-
case IkasThemeCustomDataType.
|
|
11425
|
-
case IkasThemeCustomDataType.
|
|
11426
|
-
case IkasThemeCustomDataType.
|
|
11427
|
+
case IkasThemeCustomDataType.RICH_TEXT: return [3 /*break*/, 4];
|
|
11428
|
+
case IkasThemeCustomDataType.BOOLEAN: return [3 /*break*/, 6];
|
|
11429
|
+
case IkasThemeCustomDataType.BRAND_LIST: return [3 /*break*/, 8];
|
|
11430
|
+
case IkasThemeCustomDataType.BRAND: return [3 /*break*/, 10];
|
|
11431
|
+
case IkasThemeCustomDataType.CATEGORY_LIST: return [3 /*break*/, 12];
|
|
11432
|
+
case IkasThemeCustomDataType.CATEGORY: return [3 /*break*/, 14];
|
|
11433
|
+
case IkasThemeCustomDataType.COLOR: return [3 /*break*/, 16];
|
|
11434
|
+
case IkasThemeCustomDataType.IMAGE_LIST: return [3 /*break*/, 18];
|
|
11435
|
+
case IkasThemeCustomDataType.IMAGE: return [3 /*break*/, 20];
|
|
11436
|
+
case IkasThemeCustomDataType.LINK: return [3 /*break*/, 22];
|
|
11437
|
+
case IkasThemeCustomDataType.LIST_OF_LINK: return [3 /*break*/, 22];
|
|
11438
|
+
case IkasThemeCustomDataType.PRODUCT_DETAIL: return [3 /*break*/, 24];
|
|
11439
|
+
case IkasThemeCustomDataType.PRODUCT_LIST: return [3 /*break*/, 26];
|
|
11440
|
+
case IkasThemeCustomDataType.OBJECT: return [3 /*break*/, 28];
|
|
11441
|
+
case IkasThemeCustomDataType.DYNAMIC_LIST: return [3 /*break*/, 30];
|
|
11442
|
+
case IkasThemeCustomDataType.STATIC_LIST: return [3 /*break*/, 30];
|
|
11443
|
+
case IkasThemeCustomDataType.COMPONENT: return [3 /*break*/, 32];
|
|
11444
|
+
case IkasThemeCustomDataType.COMPONENT_LIST: return [3 /*break*/, 32];
|
|
11427
11445
|
}
|
|
11428
|
-
return [3 /*break*/,
|
|
11446
|
+
return [3 /*break*/, 34];
|
|
11429
11447
|
case 2: return [4 /*yield*/, this.getTextValue()];
|
|
11430
11448
|
case 3:
|
|
11431
11449
|
customDataValue = _b.sent();
|
|
11432
|
-
return [3 /*break*/,
|
|
11433
|
-
case 4: return [4 /*yield*/, this.
|
|
11450
|
+
return [3 /*break*/, 35];
|
|
11451
|
+
case 4: return [4 /*yield*/, this.getRichTextPropValue()];
|
|
11434
11452
|
case 5:
|
|
11435
11453
|
customDataValue = _b.sent();
|
|
11436
|
-
return [3 /*break*/,
|
|
11437
|
-
case 6: return [4 /*yield*/, this.
|
|
11454
|
+
return [3 /*break*/, 35];
|
|
11455
|
+
case 6: return [4 /*yield*/, this.getBooleanValue()];
|
|
11438
11456
|
case 7:
|
|
11439
11457
|
customDataValue = _b.sent();
|
|
11440
|
-
return [3 /*break*/,
|
|
11441
|
-
case 8: return [4 /*yield*/, this.
|
|
11458
|
+
return [3 /*break*/, 35];
|
|
11459
|
+
case 8: return [4 /*yield*/, this.getBrandListPropValue()];
|
|
11442
11460
|
case 9:
|
|
11443
11461
|
customDataValue = _b.sent();
|
|
11444
|
-
return [3 /*break*/,
|
|
11445
|
-
case 10: return [4 /*yield*/, this.
|
|
11462
|
+
return [3 /*break*/, 35];
|
|
11463
|
+
case 10: return [4 /*yield*/, this.getBrandPropValue()];
|
|
11446
11464
|
case 11:
|
|
11447
11465
|
customDataValue = _b.sent();
|
|
11448
|
-
return [3 /*break*/,
|
|
11449
|
-
case 12: return [4 /*yield*/, this.
|
|
11466
|
+
return [3 /*break*/, 35];
|
|
11467
|
+
case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
|
|
11450
11468
|
case 13:
|
|
11451
11469
|
customDataValue = _b.sent();
|
|
11452
|
-
return [3 /*break*/,
|
|
11453
|
-
case 14: return [4 /*yield*/, this.
|
|
11470
|
+
return [3 /*break*/, 35];
|
|
11471
|
+
case 14: return [4 /*yield*/, this.getCategoryPropValue()];
|
|
11454
11472
|
case 15:
|
|
11455
11473
|
customDataValue = _b.sent();
|
|
11456
|
-
return [3 /*break*/,
|
|
11457
|
-
case 16: return [4 /*yield*/, this.
|
|
11474
|
+
return [3 /*break*/, 35];
|
|
11475
|
+
case 16: return [4 /*yield*/, this.getColorPropValue()];
|
|
11458
11476
|
case 17:
|
|
11459
11477
|
customDataValue = _b.sent();
|
|
11460
|
-
return [3 /*break*/,
|
|
11461
|
-
case 18: return [4 /*yield*/, this.
|
|
11478
|
+
return [3 /*break*/, 35];
|
|
11479
|
+
case 18: return [4 /*yield*/, this.getImageListPropValue()];
|
|
11462
11480
|
case 19:
|
|
11463
11481
|
customDataValue = _b.sent();
|
|
11464
|
-
return [3 /*break*/,
|
|
11465
|
-
case 20: return [4 /*yield*/, this.
|
|
11482
|
+
return [3 /*break*/, 35];
|
|
11483
|
+
case 20: return [4 /*yield*/, this.getImagePropValue()];
|
|
11466
11484
|
case 21:
|
|
11467
11485
|
customDataValue = _b.sent();
|
|
11468
|
-
return [3 /*break*/,
|
|
11469
|
-
case 22: return [4 /*yield*/, this.
|
|
11486
|
+
return [3 /*break*/, 35];
|
|
11487
|
+
case 22: return [4 /*yield*/, this.getLinkPropValue()];
|
|
11470
11488
|
case 23:
|
|
11471
11489
|
customDataValue = _b.sent();
|
|
11472
|
-
return [3 /*break*/,
|
|
11473
|
-
case 24: return [4 /*yield*/, this.
|
|
11490
|
+
return [3 /*break*/, 35];
|
|
11491
|
+
case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
|
|
11474
11492
|
case 25:
|
|
11475
11493
|
customDataValue = _b.sent();
|
|
11476
|
-
return [3 /*break*/,
|
|
11477
|
-
case 26: return [4 /*yield*/, this.
|
|
11494
|
+
return [3 /*break*/, 35];
|
|
11495
|
+
case 26: return [4 /*yield*/, this.getProductListPropValue()];
|
|
11478
11496
|
case 27:
|
|
11479
11497
|
customDataValue = _b.sent();
|
|
11480
|
-
return [3 /*break*/,
|
|
11481
|
-
case 28: return [4 /*yield*/, this.
|
|
11498
|
+
return [3 /*break*/, 35];
|
|
11499
|
+
case 28: return [4 /*yield*/, this.getObjectValue()];
|
|
11482
11500
|
case 29:
|
|
11483
11501
|
customDataValue = _b.sent();
|
|
11484
|
-
return [3 /*break*/,
|
|
11485
|
-
case 30: return [
|
|
11486
|
-
case 31:
|
|
11487
|
-
|
|
11502
|
+
return [3 /*break*/, 35];
|
|
11503
|
+
case 30: return [4 /*yield*/, this.getArrayValue()];
|
|
11504
|
+
case 31:
|
|
11505
|
+
customDataValue = _b.sent();
|
|
11506
|
+
return [3 /*break*/, 35];
|
|
11507
|
+
case 32: return [4 /*yield*/, this.getComponentListValue()];
|
|
11508
|
+
case 33:
|
|
11509
|
+
customDataValue = _b.sent();
|
|
11510
|
+
return [3 /*break*/, 35];
|
|
11511
|
+
case 34: return [3 /*break*/, 35];
|
|
11512
|
+
case 35: return [3 /*break*/, 37];
|
|
11513
|
+
case 36:
|
|
11488
11514
|
_b.sent();
|
|
11489
11515
|
return [2 /*return*/];
|
|
11490
|
-
case
|
|
11516
|
+
case 37: return [2 /*return*/, JSON.parse(JSON.stringify(customDataValue))];
|
|
11491
11517
|
}
|
|
11492
11518
|
});
|
|
11493
11519
|
});
|
|
@@ -11600,6 +11626,24 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11600
11626
|
});
|
|
11601
11627
|
});
|
|
11602
11628
|
};
|
|
11629
|
+
IkasCustomPropValueProvider.prototype.getRichTextPropValue = function () {
|
|
11630
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11631
|
+
var provider, value;
|
|
11632
|
+
return __generator(this, function (_a) {
|
|
11633
|
+
switch (_a.label) {
|
|
11634
|
+
case 0:
|
|
11635
|
+
provider = new IkasRichTextPropValueProvider(this.value);
|
|
11636
|
+
return [4 /*yield*/, provider.getValue()];
|
|
11637
|
+
case 1:
|
|
11638
|
+
value = _a.sent();
|
|
11639
|
+
return [2 /*return*/, {
|
|
11640
|
+
value: value,
|
|
11641
|
+
customData: this.customData,
|
|
11642
|
+
}];
|
|
11643
|
+
}
|
|
11644
|
+
});
|
|
11645
|
+
});
|
|
11646
|
+
};
|
|
11603
11647
|
IkasCustomPropValueProvider.prototype.getImageListPropValue = function () {
|
|
11604
11648
|
return __awaiter(this, void 0, void 0, function () {
|
|
11605
11649
|
var provider, value;
|
|
@@ -11726,7 +11770,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11726
11770
|
if (nestedData.isRequired &&
|
|
11727
11771
|
(nestedValue === undefined || nestedValue === null))
|
|
11728
11772
|
throw new Error("Required data is missing");
|
|
11729
|
-
nestedProvider = new IkasCustomPropValueProvider(nestedValue, nestedData, this.theme, this.pageSpecificData);
|
|
11773
|
+
nestedProvider = new IkasCustomPropValueProvider(nestedValue, nestedData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
|
|
11730
11774
|
return [4 /*yield*/, nestedProvider.getValue()];
|
|
11731
11775
|
case 2:
|
|
11732
11776
|
_itemValue = _b.sent();
|
|
@@ -11764,7 +11808,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11764
11808
|
if (nestedData.isRequired &&
|
|
11765
11809
|
(itemValue === undefined || itemValue === null))
|
|
11766
11810
|
throw new Error("Required data is missing");
|
|
11767
|
-
provider = new IkasCustomPropValueProvider(itemValue, nestedData, this.theme, this.pageSpecificData);
|
|
11811
|
+
provider = new IkasCustomPropValueProvider(itemValue, nestedData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
|
|
11768
11812
|
return [4 /*yield*/, provider.getValue()];
|
|
11769
11813
|
case 2:
|
|
11770
11814
|
_itemValue = _b.sent();
|
|
@@ -11786,6 +11830,28 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
11786
11830
|
});
|
|
11787
11831
|
});
|
|
11788
11832
|
};
|
|
11833
|
+
IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
|
|
11834
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11835
|
+
var pageComponents;
|
|
11836
|
+
var _a;
|
|
11837
|
+
var _this = this;
|
|
11838
|
+
return __generator(this, function (_b) {
|
|
11839
|
+
switch (_b.label) {
|
|
11840
|
+
case 0:
|
|
11841
|
+
pageComponents = this.value
|
|
11842
|
+
? this.value.map(function (v) { return new IkasThemePageComponent(v); })
|
|
11843
|
+
: [];
|
|
11844
|
+
_a = {};
|
|
11845
|
+
return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) {
|
|
11846
|
+
return _this.pageDataProvider.getPageComponentPropValues(tp);
|
|
11847
|
+
}))];
|
|
11848
|
+
case 1: return [2 /*return*/, (_a.value = _b.sent(),
|
|
11849
|
+
_a.customData = this.customData,
|
|
11850
|
+
_a)];
|
|
11851
|
+
}
|
|
11852
|
+
});
|
|
11853
|
+
});
|
|
11854
|
+
};
|
|
11789
11855
|
return IkasCustomPropValueProvider;
|
|
11790
11856
|
}());
|
|
11791
11857
|
|
|
@@ -11817,108 +11883,375 @@ var decodeBase64 = function (base64) {
|
|
|
11817
11883
|
return buffer.toString("ascii");
|
|
11818
11884
|
};
|
|
11819
11885
|
|
|
11820
|
-
var
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
}
|
|
11832
|
-
Object.defineProperty(IkasPageDataProvider.prototype, "page", {
|
|
11833
|
-
get: function () {
|
|
11834
|
-
var _this = this;
|
|
11835
|
-
if (this.pageType === IkasThemePageType.CUSTOM) {
|
|
11836
|
-
var slug_1 = this.pageParams.slug;
|
|
11837
|
-
return this.theme.pages.find(function (page) { return page.type === IkasThemePageType.CUSTOM && page.slug === slug_1; });
|
|
11838
|
-
}
|
|
11839
|
-
return this.theme.pages.find(function (page) { return page.type === _this.pageType; });
|
|
11840
|
-
},
|
|
11841
|
-
enumerable: false,
|
|
11842
|
-
configurable: true
|
|
11843
|
-
});
|
|
11844
|
-
Object.defineProperty(IkasPageDataProvider.prototype, "nextPageData", {
|
|
11845
|
-
get: function () {
|
|
11846
|
-
return {
|
|
11847
|
-
props: {
|
|
11848
|
-
propValuesStr: JSON.stringify(this.pageComponentPropValues),
|
|
11849
|
-
pageSpecificDataStr: this.pageSpecificData
|
|
11850
|
-
? JSON.stringify(this.pageSpecificData || {})
|
|
11851
|
-
: "",
|
|
11852
|
-
page: toJS(this.page) || null,
|
|
11853
|
-
settingsStr: JSON.stringify(this.theme.settings || {}),
|
|
11854
|
-
merchantSettings: this.merchantSettings
|
|
11855
|
-
? JSON.stringify(this.merchantSettings)
|
|
11856
|
-
: null,
|
|
11857
|
-
configJson: IkasStorefrontConfig.getJson(),
|
|
11858
|
-
},
|
|
11859
|
-
};
|
|
11860
|
-
},
|
|
11861
|
-
enumerable: false,
|
|
11862
|
-
configurable: true
|
|
11886
|
+
var ThemeComponent = observer(function (_a) {
|
|
11887
|
+
var pageComponentPropValue = _a.pageComponentPropValue, index = _a.index, settings = _a.settings;
|
|
11888
|
+
var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
|
|
11889
|
+
var pageComponent = pageComponentPropValue.pageComponent;
|
|
11890
|
+
var propValues = pageComponentPropValue.propValues;
|
|
11891
|
+
var hasNullValue = computed(function () {
|
|
11892
|
+
return Object.entries(propValues || {}).some(function (_a) {
|
|
11893
|
+
var _b;
|
|
11894
|
+
var propName = _a[0], propValue = _a[1];
|
|
11895
|
+
return (propValue === null || propValue === undefined) && ((_b = pageComponentPropValue.component.props.find(function (p) { return p.name === propName; })) === null || _b === void 0 ? void 0 : _b.isRequired);
|
|
11896
|
+
});
|
|
11863
11897
|
});
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11898
|
+
var Component = components[pageComponent.componentId];
|
|
11899
|
+
return (createElement("div", { id: index + "" }, hasNullValue.get() ? null : (createElement(Component, __assign({ key: pageComponent.id }, propValues, { settings: settings, store: store })))));
|
|
11900
|
+
});
|
|
11901
|
+
|
|
11902
|
+
var IkasPageHead = observer(function (_a) {
|
|
11903
|
+
var _b;
|
|
11904
|
+
var page = _a.page, pageTitle = _a.pageTitle, description = _a.description, pageSpecificDataStr = _a.pageSpecificDataStr, props = __rest(_a, ["page", "pageTitle", "description", "pageSpecificDataStr"]);
|
|
11905
|
+
var ogpMetas = [];
|
|
11906
|
+
var schemas = [];
|
|
11907
|
+
var isCanonicalLinkAdd = false;
|
|
11908
|
+
var canonicalHref = "";
|
|
11909
|
+
if (props.addOgpMetas) {
|
|
11910
|
+
ogpMetas.push({
|
|
11911
|
+
property: "og:type",
|
|
11912
|
+
content: "website",
|
|
11913
|
+
});
|
|
11914
|
+
if (typeof window !== "undefined") {
|
|
11915
|
+
ogpMetas.push({
|
|
11916
|
+
property: "og:site_name",
|
|
11917
|
+
content: "https://" + window.location.hostname,
|
|
11918
|
+
});
|
|
11919
|
+
}
|
|
11920
|
+
if (pageTitle) {
|
|
11921
|
+
ogpMetas.push({
|
|
11922
|
+
property: "og:title",
|
|
11923
|
+
content: pageTitle,
|
|
11924
|
+
});
|
|
11925
|
+
}
|
|
11926
|
+
if (description) {
|
|
11927
|
+
ogpMetas.push({
|
|
11928
|
+
property: "og:description",
|
|
11929
|
+
content: description,
|
|
11930
|
+
});
|
|
11931
|
+
}
|
|
11932
|
+
if (typeof window !== "undefined") {
|
|
11933
|
+
ogpMetas.push({
|
|
11934
|
+
property: "og:url",
|
|
11935
|
+
content: window.location.href,
|
|
11936
|
+
});
|
|
11937
|
+
}
|
|
11938
|
+
if (props.merchantSettings) {
|
|
11939
|
+
if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === IkasThemePageType.PRODUCT) {
|
|
11940
|
+
var productDetailParsed = JSON.parse(pageSpecificDataStr);
|
|
11941
|
+
var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
|
|
11942
|
+
if (productDetail.selectedVariant.mainImage) {
|
|
11943
|
+
ogpMetas.push({
|
|
11944
|
+
property: "og:image",
|
|
11945
|
+
content: (_b = productDetail.selectedVariant.mainImage) === null || _b === void 0 ? void 0 : _b.src,
|
|
11946
|
+
});
|
|
11947
|
+
}
|
|
11875
11948
|
}
|
|
11876
|
-
|
|
11877
|
-
|
|
11949
|
+
else {
|
|
11950
|
+
var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
|
|
11951
|
+
ogpMetas.push({
|
|
11952
|
+
property: "og:image",
|
|
11953
|
+
content: merchantSettings.logo.src,
|
|
11954
|
+
});
|
|
11878
11955
|
}
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
}
|
|
11920
|
-
|
|
11921
|
-
|
|
11956
|
+
}
|
|
11957
|
+
}
|
|
11958
|
+
if (props.merchantSettings) {
|
|
11959
|
+
// for schema.org
|
|
11960
|
+
var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
|
|
11961
|
+
var websiteSchema = createWebsiteSchema();
|
|
11962
|
+
var storeSchema = createStoreSchema(merchantSettings);
|
|
11963
|
+
schemas.push(websiteSchema);
|
|
11964
|
+
schemas.push(storeSchema);
|
|
11965
|
+
}
|
|
11966
|
+
if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === IkasThemePageType.PRODUCT) {
|
|
11967
|
+
var productDetailParsed = JSON.parse(pageSpecificDataStr);
|
|
11968
|
+
var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
|
|
11969
|
+
if (typeof window !== "undefined" && productDetail.product.hasVariant) {
|
|
11970
|
+
isCanonicalLinkAdd =
|
|
11971
|
+
window.location.pathname !== productDetail.product.href;
|
|
11972
|
+
canonicalHref =
|
|
11973
|
+
"https://" + window.location.hostname + productDetail.product.href;
|
|
11974
|
+
}
|
|
11975
|
+
var schema = createProductSchema(productDetail);
|
|
11976
|
+
if (schema)
|
|
11977
|
+
schemas.push(schema);
|
|
11978
|
+
}
|
|
11979
|
+
if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === IkasThemePageType.CATEGORY) {
|
|
11980
|
+
var categorySchema = createCategorySchema(pageSpecificDataStr);
|
|
11981
|
+
if (categorySchema)
|
|
11982
|
+
schemas.push(categorySchema);
|
|
11983
|
+
var categoryBreadcrumbSchema = createCategoryBreadcrumbSchema(pageSpecificDataStr);
|
|
11984
|
+
if (categoryBreadcrumbSchema)
|
|
11985
|
+
schemas.push(categoryBreadcrumbSchema);
|
|
11986
|
+
}
|
|
11987
|
+
return (createElement(Head, null,
|
|
11988
|
+
createElement("title", null, pageTitle || ""),
|
|
11989
|
+
createElement("meta", { name: "description", content: description || "" }),
|
|
11990
|
+
isCanonicalLinkAdd && createElement("link", { rel: "canonical", href: canonicalHref }),
|
|
11991
|
+
!!props.addOgpMetas &&
|
|
11992
|
+
ogpMetas.map(function (ogpMeta, index) { return (createElement("meta", { key: ogpMeta.content + "-" + index, property: ogpMeta.property, content: ogpMeta.content })); }),
|
|
11993
|
+
!!schemas.length &&
|
|
11994
|
+
schemas.map(function (schema, index) { return (createElement("script", { key: index, type: "application/ld+json", dangerouslySetInnerHTML: {
|
|
11995
|
+
__html: JSON.stringify(schema),
|
|
11996
|
+
} })); })));
|
|
11997
|
+
});
|
|
11998
|
+
function createWebsiteSchema() {
|
|
11999
|
+
var _a;
|
|
12000
|
+
var hostname = "";
|
|
12001
|
+
if (typeof window !== "undefined") {
|
|
12002
|
+
hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
|
|
12003
|
+
}
|
|
12004
|
+
return {
|
|
12005
|
+
"@context": "https://schema.org",
|
|
12006
|
+
"@type": "Website",
|
|
12007
|
+
url: "https://" + hostname,
|
|
12008
|
+
};
|
|
12009
|
+
}
|
|
12010
|
+
function createStoreSchema(merchantSettings) {
|
|
12011
|
+
var _a, _b;
|
|
12012
|
+
var hostname = "";
|
|
12013
|
+
if (typeof window !== "undefined") {
|
|
12014
|
+
hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
|
|
12015
|
+
}
|
|
12016
|
+
return {
|
|
12017
|
+
"@context": "https://schema.org",
|
|
12018
|
+
"@type": "Store",
|
|
12019
|
+
name: merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.merchantName,
|
|
12020
|
+
logo: (_b = merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.logo) === null || _b === void 0 ? void 0 : _b.src,
|
|
12021
|
+
url: "https://" + hostname,
|
|
12022
|
+
};
|
|
12023
|
+
}
|
|
12024
|
+
function createProductSchema(productDetail) {
|
|
12025
|
+
var _a, _b;
|
|
12026
|
+
try {
|
|
12027
|
+
var isBrowser = typeof window !== "undefined";
|
|
12028
|
+
if (isBrowser) {
|
|
12029
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
12030
|
+
var vid_1 = urlParams.get("vid");
|
|
12031
|
+
if (vid_1) {
|
|
12032
|
+
var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
|
|
12033
|
+
if (variant) {
|
|
12034
|
+
productDetail.selectedVariantValues = variant.variantValues;
|
|
12035
|
+
}
|
|
12036
|
+
}
|
|
12037
|
+
}
|
|
12038
|
+
var productUrl = isBrowser
|
|
12039
|
+
? "https://" + window.location.hostname + productDetail.href
|
|
12040
|
+
: "";
|
|
12041
|
+
return {
|
|
12042
|
+
"@context": "https://schema.org/",
|
|
12043
|
+
"@type": "Product",
|
|
12044
|
+
name: productDetail.product.name,
|
|
12045
|
+
description: (_a = productDetail.product.metaData) === null || _a === void 0 ? void 0 : _a.description,
|
|
12046
|
+
image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
|
|
12047
|
+
productId: productDetail.selectedVariant.id,
|
|
12048
|
+
sku: productDetail.selectedVariant.sku,
|
|
12049
|
+
mpn: productDetail.selectedVariant.barcodeList.length
|
|
12050
|
+
? productDetail.selectedVariant.barcodeList[0]
|
|
12051
|
+
: "",
|
|
12052
|
+
brand: {
|
|
12053
|
+
"@type": "Brand",
|
|
12054
|
+
name: (_b = productDetail.product.brand) === null || _b === void 0 ? void 0 : _b.name,
|
|
12055
|
+
},
|
|
12056
|
+
offers: {
|
|
12057
|
+
"@type": "Offer",
|
|
12058
|
+
url: productUrl,
|
|
12059
|
+
priceCurrency: productDetail.selectedVariant.price.currency || "TRY",
|
|
12060
|
+
price: productDetail.selectedVariant.price.finalPrice,
|
|
12061
|
+
priceValidUntil: "",
|
|
12062
|
+
itemCondition: "https://schema.org/NewCondition",
|
|
12063
|
+
availability: productDetail.selectedVariant.stock > 0
|
|
12064
|
+
? "https://schema.org/InStock"
|
|
12065
|
+
: "https://schema.org/OutOfStock",
|
|
12066
|
+
},
|
|
12067
|
+
};
|
|
12068
|
+
}
|
|
12069
|
+
catch (err) { }
|
|
12070
|
+
}
|
|
12071
|
+
function createCategorySchema(pageSpecificDataStr) {
|
|
12072
|
+
var _a, _b, _c;
|
|
12073
|
+
try {
|
|
12074
|
+
var categoryParsed = JSON.parse(pageSpecificDataStr);
|
|
12075
|
+
var category = new IkasCategory(categoryParsed);
|
|
12076
|
+
var categoryUrl = typeof window !== undefined
|
|
12077
|
+
? "https://" + window.location.hostname + category.href
|
|
12078
|
+
: "";
|
|
12079
|
+
return {
|
|
12080
|
+
"@context": "http://schema.org",
|
|
12081
|
+
"@type": "CollectionPage",
|
|
12082
|
+
url: categoryUrl,
|
|
12083
|
+
name: (_a = category.metaData) === null || _a === void 0 ? void 0 : _a.pageTitle,
|
|
12084
|
+
description: (_b = category.metaData) === null || _b === void 0 ? void 0 : _b.description,
|
|
12085
|
+
image: (_c = category.image) === null || _c === void 0 ? void 0 : _c.src,
|
|
12086
|
+
};
|
|
12087
|
+
}
|
|
12088
|
+
catch (_d) { }
|
|
12089
|
+
}
|
|
12090
|
+
function createCategoryBreadcrumbSchema(pageSpecificDataStr) {
|
|
12091
|
+
try {
|
|
12092
|
+
var categoryParsed = JSON.parse(pageSpecificDataStr);
|
|
12093
|
+
var category = new IkasCategory(categoryParsed);
|
|
12094
|
+
return {
|
|
12095
|
+
"@context": "http://schema.org",
|
|
12096
|
+
"@type": "BreadcrumbList",
|
|
12097
|
+
itemListElement: category.path.map(function (categoryPath, index) { return ({
|
|
12098
|
+
"@type": "ListItem",
|
|
12099
|
+
position: index + 1,
|
|
12100
|
+
name: categoryPath.name,
|
|
12101
|
+
item: typeof window !== undefined
|
|
12102
|
+
? "https://" + window.location.hostname + categoryPath.href
|
|
12103
|
+
: "",
|
|
12104
|
+
}); }),
|
|
12105
|
+
};
|
|
12106
|
+
}
|
|
12107
|
+
catch (_a) { }
|
|
12108
|
+
}
|
|
12109
|
+
|
|
12110
|
+
var IkasPage = observer(function (_a) {
|
|
12111
|
+
var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
|
|
12112
|
+
var store = IkasStorefrontConfig.store;
|
|
12113
|
+
var settings = useState(new IkasThemeSettings(JSON.parse(settingsStr)))[0];
|
|
12114
|
+
if (page) {
|
|
12115
|
+
store.currentPageType = page.type;
|
|
12116
|
+
}
|
|
12117
|
+
useEffect(function () {
|
|
12118
|
+
//@ts-ignore
|
|
12119
|
+
store.setSettings(settingsStr);
|
|
12120
|
+
//@ts-ignore
|
|
12121
|
+
store.cartStore.getCart();
|
|
12122
|
+
store.checkLocalization();
|
|
12123
|
+
}, []);
|
|
12124
|
+
var headerComponentPropValue = propValues.find(function (pv) { return pv.component.isHeader; });
|
|
12125
|
+
var footerComponentPropValue = propValues.find(function (pv) { return pv.component.isFooter; });
|
|
12126
|
+
var others = propValues.filter(function (pv) { return !pv.component.isHeader && !pv.component.isFooter; }) || [];
|
|
12127
|
+
if (!page)
|
|
12128
|
+
return null;
|
|
12129
|
+
return (createElement(Fragment, null,
|
|
12130
|
+
createElement(IkasPageHead, { page: page, pageTitle: page.pageTitle, description: page.description, pageSpecificDataStr: pageSpecificDataStr, merchantSettings: merchantSettings, addOgpMetas: addOgpMetas }),
|
|
12131
|
+
createElement("div", { style: pageStyle },
|
|
12132
|
+
createElement("div", null,
|
|
12133
|
+
headerComponentPropValue &&
|
|
12134
|
+
renderComponent(headerComponentPropValue, settings, -1),
|
|
12135
|
+
others.map(function (pageComponentPropValue, index) {
|
|
12136
|
+
return renderComponent(pageComponentPropValue, settings, index);
|
|
12137
|
+
})),
|
|
12138
|
+
footerComponentPropValue &&
|
|
12139
|
+
renderComponent(footerComponentPropValue, settings, -1))));
|
|
12140
|
+
});
|
|
12141
|
+
var renderComponent = function (pageComponentPropValue, settings, index) {
|
|
12142
|
+
return (createElement(ThemeComponent, { key: pageComponentPropValue.pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, settings: settings }));
|
|
12143
|
+
};
|
|
12144
|
+
var pageStyle = {
|
|
12145
|
+
position: "relative",
|
|
12146
|
+
minHeight: "100vh",
|
|
12147
|
+
width: "100vw",
|
|
12148
|
+
display: "flex",
|
|
12149
|
+
flexDirection: "column",
|
|
12150
|
+
justifyContent: "space-between",
|
|
12151
|
+
};
|
|
12152
|
+
|
|
12153
|
+
var IkasPageDataProvider = /** @class */ (function () {
|
|
12154
|
+
function IkasPageDataProvider(theme, pageParams, pageType) {
|
|
12155
|
+
this.pageType = null;
|
|
12156
|
+
this.pageParams = {};
|
|
12157
|
+
this.pageComponentPropValues = [];
|
|
12158
|
+
this.pageSpecificData = null;
|
|
12159
|
+
this.merchantSettings = null;
|
|
12160
|
+
this.theme = new IkasTheme(theme);
|
|
12161
|
+
this.pageParams = pageParams || {};
|
|
12162
|
+
this.pageType = pageType;
|
|
12163
|
+
makeAutoObservable(this);
|
|
12164
|
+
}
|
|
12165
|
+
Object.defineProperty(IkasPageDataProvider.prototype, "page", {
|
|
12166
|
+
get: function () {
|
|
12167
|
+
var _this = this;
|
|
12168
|
+
if (this.pageType === IkasThemePageType.CUSTOM) {
|
|
12169
|
+
var slug_1 = this.pageParams.slug;
|
|
12170
|
+
return this.theme.pages.find(function (page) { return page.type === IkasThemePageType.CUSTOM && page.slug === slug_1; });
|
|
12171
|
+
}
|
|
12172
|
+
return this.theme.pages.find(function (page) { return page.type === _this.pageType; });
|
|
12173
|
+
},
|
|
12174
|
+
enumerable: false,
|
|
12175
|
+
configurable: true
|
|
12176
|
+
});
|
|
12177
|
+
Object.defineProperty(IkasPageDataProvider.prototype, "nextPageData", {
|
|
12178
|
+
get: function () {
|
|
12179
|
+
return {
|
|
12180
|
+
props: {
|
|
12181
|
+
propValuesStr: JSON.stringify(this.pageComponentPropValues),
|
|
12182
|
+
pageSpecificDataStr: this.pageSpecificData
|
|
12183
|
+
? JSON.stringify(this.pageSpecificData || {})
|
|
12184
|
+
: "",
|
|
12185
|
+
page: toJS(this.page) || null,
|
|
12186
|
+
settingsStr: JSON.stringify(this.theme.settings || {}),
|
|
12187
|
+
merchantSettings: this.merchantSettings
|
|
12188
|
+
? JSON.stringify(this.merchantSettings)
|
|
12189
|
+
: null,
|
|
12190
|
+
configJson: IkasStorefrontConfig.getJson(),
|
|
12191
|
+
},
|
|
12192
|
+
};
|
|
12193
|
+
},
|
|
12194
|
+
enumerable: false,
|
|
12195
|
+
configurable: true
|
|
12196
|
+
});
|
|
12197
|
+
Object.defineProperty(IkasPageDataProvider.prototype, "specification", {
|
|
12198
|
+
get: function () {
|
|
12199
|
+
var _this = this;
|
|
12200
|
+
var _a, _b, _c;
|
|
12201
|
+
var selectedPage = this.page;
|
|
12202
|
+
var specification;
|
|
12203
|
+
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === IkasThemePageType.PRODUCT) {
|
|
12204
|
+
specification = (_a = selectedPage.specifications) === null || _a === void 0 ? void 0 : _a.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.product.id); });
|
|
12205
|
+
}
|
|
12206
|
+
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === IkasThemePageType.CATEGORY) {
|
|
12207
|
+
specification = (_b = selectedPage.specifications) === null || _b === void 0 ? void 0 : _b.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.id); });
|
|
12208
|
+
}
|
|
12209
|
+
if ((selectedPage === null || selectedPage === void 0 ? void 0 : selectedPage.type) === IkasThemePageType.BRAND) {
|
|
12210
|
+
specification = (_c = selectedPage.specifications) === null || _c === void 0 ? void 0 : _c.find(function (s) { var _a; return s.id === ((_a = _this.pageSpecificData) === null || _a === void 0 ? void 0 : _a.id); });
|
|
12211
|
+
}
|
|
12212
|
+
return specification;
|
|
12213
|
+
},
|
|
12214
|
+
enumerable: false,
|
|
12215
|
+
configurable: true
|
|
12216
|
+
});
|
|
12217
|
+
Object.defineProperty(IkasPageDataProvider.prototype, "pageComponents", {
|
|
12218
|
+
get: function () {
|
|
12219
|
+
var _a;
|
|
12220
|
+
if (this.specification)
|
|
12221
|
+
return this.specification.components;
|
|
12222
|
+
return ((_a = this.page) === null || _a === void 0 ? void 0 : _a.components) || [];
|
|
12223
|
+
},
|
|
12224
|
+
enumerable: false,
|
|
12225
|
+
configurable: true
|
|
12226
|
+
});
|
|
12227
|
+
Object.defineProperty(IkasPageDataProvider.prototype, "isStaticPage", {
|
|
12228
|
+
get: function () {
|
|
12229
|
+
var staticPageTypes = [
|
|
12230
|
+
IkasThemePageType.PRODUCT,
|
|
12231
|
+
IkasThemePageType.INDEX,
|
|
12232
|
+
];
|
|
12233
|
+
return this.pageType && staticPageTypes.includes(this.pageType);
|
|
12234
|
+
},
|
|
12235
|
+
enumerable: false,
|
|
12236
|
+
configurable: true
|
|
12237
|
+
});
|
|
12238
|
+
IkasPageDataProvider.prototype.getMerchantSettings = function () {
|
|
12239
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12240
|
+
var merchantId, merchantSettingsResponse;
|
|
12241
|
+
return __generator(this, function (_a) {
|
|
12242
|
+
switch (_a.label) {
|
|
12243
|
+
case 0:
|
|
12244
|
+
merchantId = decodeBase64(IkasStorefrontConfig.config.apiKey || "");
|
|
12245
|
+
return [4 /*yield*/, IkasMerchantAPI.listMerchantSettings(merchantId)];
|
|
12246
|
+
case 1:
|
|
12247
|
+
merchantSettingsResponse = _a.sent();
|
|
12248
|
+
if (merchantSettingsResponse) {
|
|
12249
|
+
this.merchantSettings = merchantSettingsResponse;
|
|
12250
|
+
}
|
|
12251
|
+
return [2 /*return*/];
|
|
12252
|
+
}
|
|
12253
|
+
});
|
|
12254
|
+
});
|
|
11922
12255
|
};
|
|
11923
12256
|
IkasPageDataProvider.prototype.getPageData = function () {
|
|
11924
12257
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -12140,76 +12473,104 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12140
12473
|
};
|
|
12141
12474
|
IkasPageDataProvider.prototype.getPageComponentPropValue = function (pageComponent, prop) {
|
|
12142
12475
|
return __awaiter(this, void 0, void 0, function () {
|
|
12143
|
-
var propValueProvider, propValue, customData;
|
|
12144
|
-
|
|
12145
|
-
|
|
12476
|
+
var propValueProvider, propValue, _a, customData, pageComponents;
|
|
12477
|
+
var _this = this;
|
|
12478
|
+
return __generator(this, function (_b) {
|
|
12479
|
+
switch (_b.label) {
|
|
12146
12480
|
case 0:
|
|
12147
12481
|
propValue = pageComponent.propValues[prop.name];
|
|
12148
12482
|
if (propValue === null || propValue === undefined)
|
|
12149
12483
|
return [2 /*return*/, null];
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
case IkasThemeComponentPropType.BOOLEAN:
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
case IkasThemeComponentPropType.
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
case IkasThemeComponentPropType.
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
case IkasThemeComponentPropType.
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
case IkasThemeComponentPropType.
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
case IkasThemeComponentPropType.PRODUCT_LIST:
|
|
12170
|
-
propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageParams, this.pageSpecificData);
|
|
12171
|
-
break;
|
|
12172
|
-
case IkasThemeComponentPropType.PRODUCT_DETAIL:
|
|
12173
|
-
propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
|
|
12174
|
-
break;
|
|
12175
|
-
case IkasThemeComponentPropType.CATEGORY:
|
|
12176
|
-
propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
|
|
12177
|
-
break;
|
|
12178
|
-
case IkasThemeComponentPropType.CATEGORY_LIST:
|
|
12179
|
-
propValueProvider = new IkasCategoryListPropValueProvider(propValue);
|
|
12180
|
-
break;
|
|
12181
|
-
case IkasThemeComponentPropType.LINK:
|
|
12182
|
-
case IkasThemeComponentPropType.LIST_OF_LINK:
|
|
12183
|
-
propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
|
|
12184
|
-
break;
|
|
12185
|
-
case IkasThemeComponentPropType.COLOR:
|
|
12186
|
-
propValueProvider = new IkasColorPropValueProvider(propValue);
|
|
12187
|
-
break;
|
|
12188
|
-
case IkasThemeComponentPropType.CUSTOM:
|
|
12189
|
-
customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
|
|
12190
|
-
if (!customData)
|
|
12191
|
-
return [2 /*return*/];
|
|
12192
|
-
propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this.pageSpecificData, this.pageParams);
|
|
12193
|
-
break;
|
|
12484
|
+
_a = prop.type;
|
|
12485
|
+
switch (_a) {
|
|
12486
|
+
case IkasThemeComponentPropType.TEXT: return [3 /*break*/, 1];
|
|
12487
|
+
case IkasThemeComponentPropType.RICH_TEXT: return [3 /*break*/, 2];
|
|
12488
|
+
case IkasThemeComponentPropType.BOOLEAN: return [3 /*break*/, 3];
|
|
12489
|
+
case IkasThemeComponentPropType.IMAGE: return [3 /*break*/, 4];
|
|
12490
|
+
case IkasThemeComponentPropType.IMAGE_LIST: return [3 /*break*/, 5];
|
|
12491
|
+
case IkasThemeComponentPropType.BRAND: return [3 /*break*/, 6];
|
|
12492
|
+
case IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 7];
|
|
12493
|
+
case IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 8];
|
|
12494
|
+
case IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 9];
|
|
12495
|
+
case IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 10];
|
|
12496
|
+
case IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 11];
|
|
12497
|
+
case IkasThemeComponentPropType.LINK: return [3 /*break*/, 12];
|
|
12498
|
+
case IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 12];
|
|
12499
|
+
case IkasThemeComponentPropType.COLOR: return [3 /*break*/, 13];
|
|
12500
|
+
case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 14];
|
|
12501
|
+
case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 15];
|
|
12502
|
+
case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 15];
|
|
12194
12503
|
}
|
|
12195
|
-
return [
|
|
12196
|
-
case 1:
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12212
|
-
|
|
12504
|
+
return [3 /*break*/, 17];
|
|
12505
|
+
case 1:
|
|
12506
|
+
propValueProvider = new IkasTextPropValueProvider(propValue);
|
|
12507
|
+
return [3 /*break*/, 18];
|
|
12508
|
+
case 2:
|
|
12509
|
+
propValueProvider = new IkasRichTextPropValueProvider(propValue);
|
|
12510
|
+
return [3 /*break*/, 18];
|
|
12511
|
+
case 3:
|
|
12512
|
+
propValueProvider = new IkasBooleanPropValueProvider(propValue);
|
|
12513
|
+
return [3 /*break*/, 18];
|
|
12514
|
+
case 4:
|
|
12515
|
+
propValueProvider = new IkasImagePropValueProvider(propValue);
|
|
12516
|
+
return [3 /*break*/, 18];
|
|
12517
|
+
case 5:
|
|
12518
|
+
propValueProvider = new IkasImageListPropValueProvider(propValue);
|
|
12519
|
+
return [3 /*break*/, 18];
|
|
12520
|
+
case 6:
|
|
12521
|
+
propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
|
|
12522
|
+
return [3 /*break*/, 18];
|
|
12523
|
+
case 7:
|
|
12524
|
+
propValueProvider = new IkasBrandListPropValueProvider(propValue);
|
|
12525
|
+
return [3 /*break*/, 18];
|
|
12526
|
+
case 8:
|
|
12527
|
+
propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageParams, this.pageSpecificData);
|
|
12528
|
+
return [3 /*break*/, 18];
|
|
12529
|
+
case 9:
|
|
12530
|
+
propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
|
|
12531
|
+
return [3 /*break*/, 18];
|
|
12532
|
+
case 10:
|
|
12533
|
+
propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
|
|
12534
|
+
return [3 /*break*/, 18];
|
|
12535
|
+
case 11:
|
|
12536
|
+
propValueProvider = new IkasCategoryListPropValueProvider(propValue);
|
|
12537
|
+
return [3 /*break*/, 18];
|
|
12538
|
+
case 12:
|
|
12539
|
+
propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
|
|
12540
|
+
return [3 /*break*/, 18];
|
|
12541
|
+
case 13:
|
|
12542
|
+
propValueProvider = new IkasColorPropValueProvider(propValue);
|
|
12543
|
+
return [3 /*break*/, 18];
|
|
12544
|
+
case 14:
|
|
12545
|
+
customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
|
|
12546
|
+
if (!customData)
|
|
12547
|
+
return [2 /*return*/];
|
|
12548
|
+
propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this, this.pageSpecificData, this.pageParams);
|
|
12549
|
+
return [3 /*break*/, 18];
|
|
12550
|
+
case 15:
|
|
12551
|
+
pageComponents = propValue;
|
|
12552
|
+
return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) { return _this.getPageComponentPropValues(tp); }))];
|
|
12553
|
+
case 16: return [2 /*return*/, _b.sent()];
|
|
12554
|
+
case 17: return [3 /*break*/, 18];
|
|
12555
|
+
case 18: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
|
|
12556
|
+
case 19: return [2 /*return*/, _b.sent()];
|
|
12557
|
+
}
|
|
12558
|
+
});
|
|
12559
|
+
});
|
|
12560
|
+
};
|
|
12561
|
+
IkasPageDataProvider.prototype.setPageMetaData = function (metaData) {
|
|
12562
|
+
if (this.page) {
|
|
12563
|
+
this.page.pageTitle = metaData.pageTitle;
|
|
12564
|
+
this.page.description = metaData.description;
|
|
12565
|
+
}
|
|
12566
|
+
};
|
|
12567
|
+
IkasPageDataProvider.isServer = function () {
|
|
12568
|
+
return typeof window === "undefined";
|
|
12569
|
+
};
|
|
12570
|
+
IkasPageDataProvider.initPropValues = function (propValuesStr, router, settingsStr, isBrowser) {
|
|
12571
|
+
var settings = new IkasThemeSettings(JSON.parse(settingsStr));
|
|
12572
|
+
var pageComponentPropValues = JSON.parse(propValuesStr).map(function (v) { return ({
|
|
12573
|
+
pageComponent: new IkasThemePageComponent(v.pageComponent),
|
|
12213
12574
|
component: new IkasThemeComponent(v.component),
|
|
12214
12575
|
propValues: v.propValues,
|
|
12215
12576
|
}); });
|
|
@@ -12248,8 +12609,14 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12248
12609
|
case IkasThemeComponentPropType.LIST_OF_LINK:
|
|
12249
12610
|
IkasPageDataProvider.initLinkPropValue(prop, propValue, pageComponentPropValue);
|
|
12250
12611
|
break;
|
|
12612
|
+
case IkasThemeComponentPropType.COMPONENT:
|
|
12613
|
+
IkasPageDataProvider.initComponentPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
|
|
12614
|
+
break;
|
|
12615
|
+
case IkasThemeComponentPropType.COMPONENT_LIST:
|
|
12616
|
+
IkasPageDataProvider.initComponentListPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
|
|
12617
|
+
break;
|
|
12251
12618
|
case IkasThemeComponentPropType.CUSTOM:
|
|
12252
|
-
IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValue, router, isBrowser);
|
|
12619
|
+
IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValue, router, settings, isBrowser);
|
|
12253
12620
|
break;
|
|
12254
12621
|
}
|
|
12255
12622
|
});
|
|
@@ -12331,14 +12698,14 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12331
12698
|
IkasPageDataProvider._initImageListPropValue = function (propValue) {
|
|
12332
12699
|
return propValue.map(function (i) { return new IkasImage(i.id); });
|
|
12333
12700
|
};
|
|
12334
|
-
IkasPageDataProvider.initCustomDataPropValue = function (prop, customDataValue, pageComponentPropValue, router, isBrowser) {
|
|
12701
|
+
IkasPageDataProvider.initCustomDataPropValue = function (prop, customDataValue, pageComponentPropValue, router, settings, isBrowser) {
|
|
12335
12702
|
if (!customDataValue ||
|
|
12336
12703
|
!customDataValue.value ||
|
|
12337
12704
|
!customDataValue.customData)
|
|
12338
12705
|
return;
|
|
12339
|
-
pageComponentPropValue.propValues[prop.name] = this._initCustomDataPropValue(customDataValue, customDataValue.customData, router, isBrowser);
|
|
12706
|
+
pageComponentPropValue.propValues[prop.name] = this._initCustomDataPropValue(customDataValue, customDataValue.customData, router, settings, isBrowser);
|
|
12340
12707
|
};
|
|
12341
|
-
IkasPageDataProvider._initCustomDataPropValue = function (customDataValue, customData, router, isBrowser) {
|
|
12708
|
+
IkasPageDataProvider._initCustomDataPropValue = function (customDataValue, customData, router, settings, isBrowser) {
|
|
12342
12709
|
var _this = this;
|
|
12343
12710
|
if (!customDataValue)
|
|
12344
12711
|
return null;
|
|
@@ -12369,7 +12736,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12369
12736
|
for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
|
|
12370
12737
|
var nestedCustomData = _a[_i];
|
|
12371
12738
|
var value = propValue[nestedCustomData.key];
|
|
12372
|
-
objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, nestedCustomData, router, isBrowser);
|
|
12739
|
+
objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, nestedCustomData, router, settings, isBrowser);
|
|
12373
12740
|
}
|
|
12374
12741
|
return objectValue;
|
|
12375
12742
|
case IkasThemeCustomDataType.DYNAMIC_LIST:
|
|
@@ -12380,17 +12747,51 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12380
12747
|
var listValue_1 = [];
|
|
12381
12748
|
var nestedCustomData_1 = customData.nestedData[0];
|
|
12382
12749
|
propValue.forEach(function (itemValue) {
|
|
12383
|
-
listValue_1.push(_this._initCustomDataPropValue(itemValue, nestedCustomData_1, router, isBrowser));
|
|
12750
|
+
listValue_1.push(_this._initCustomDataPropValue(itemValue, nestedCustomData_1, router, settings, isBrowser));
|
|
12384
12751
|
});
|
|
12385
12752
|
return listValue_1;
|
|
12386
12753
|
}
|
|
12387
12754
|
catch (err) {
|
|
12388
12755
|
return [];
|
|
12389
12756
|
}
|
|
12757
|
+
case IkasThemeCustomDataType.COMPONENT:
|
|
12758
|
+
return this._initComponentPropValue(propValue, router, settings, isBrowser);
|
|
12759
|
+
case IkasThemeCustomDataType.COMPONENT_LIST:
|
|
12760
|
+
return this._initComponentListPropValue(propValue, router, settings, isBrowser);
|
|
12390
12761
|
default:
|
|
12391
12762
|
return propValue;
|
|
12392
12763
|
}
|
|
12393
12764
|
};
|
|
12765
|
+
IkasPageDataProvider.initComponentPropValue = function (prop, propValue, pageComponentPropValue, router, settings, isBrowser) {
|
|
12766
|
+
pageComponentPropValue.propValues[prop.name] = this._initComponentPropValue(propValue, router, settings, isBrowser);
|
|
12767
|
+
};
|
|
12768
|
+
IkasPageDataProvider._initComponentPropValue = function (propValue, router, settings, isBrowser) {
|
|
12769
|
+
var pValue = propValue.length ? propValue[0] : undefined;
|
|
12770
|
+
if (!pValue)
|
|
12771
|
+
return;
|
|
12772
|
+
var pageComponentPropValue = new IkasPageComponentPropValue(pValue);
|
|
12773
|
+
var initializedPageComponentPropValues = this.initPropValues(JSON.stringify([pageComponentPropValue]), router, JSON.stringify(settings), isBrowser);
|
|
12774
|
+
if (!initializedPageComponentPropValues.length)
|
|
12775
|
+
return;
|
|
12776
|
+
return new IkasComponentRenderer(function () {
|
|
12777
|
+
return renderComponent(initializedPageComponentPropValues[0], settings, -10);
|
|
12778
|
+
});
|
|
12779
|
+
};
|
|
12780
|
+
IkasPageDataProvider.initComponentListPropValue = function (prop, propValue, pageComponentPropValue, router, settings, isBrowser) {
|
|
12781
|
+
pageComponentPropValue.propValues[prop.name] = this._initComponentListPropValue(propValue, router, settings, isBrowser);
|
|
12782
|
+
};
|
|
12783
|
+
IkasPageDataProvider._initComponentListPropValue = function (propValue, router, settings, isBrowser) {
|
|
12784
|
+
var _this = this;
|
|
12785
|
+
if (propValue && propValue.length)
|
|
12786
|
+
return propValue.map(function (p) {
|
|
12787
|
+
var pageComponentPropValue = new IkasPageComponentPropValue(p);
|
|
12788
|
+
var initializedPageComponentPropValues = _this.initPropValues(JSON.stringify([pageComponentPropValue]), router, JSON.stringify(settings), isBrowser);
|
|
12789
|
+
return new IkasComponentRenderer(function () {
|
|
12790
|
+
return renderComponent(initializedPageComponentPropValues[0], settings, -1);
|
|
12791
|
+
});
|
|
12792
|
+
});
|
|
12793
|
+
return [];
|
|
12794
|
+
};
|
|
12394
12795
|
return IkasPageDataProvider;
|
|
12395
12796
|
}());
|
|
12396
12797
|
var IkasPageComponentPropValue = /** @class */ (function () {
|
|
@@ -18574,6 +18975,58 @@ var GoogleTagManager = /** @class */ (function () {
|
|
|
18574
18975
|
console.error(err);
|
|
18575
18976
|
}
|
|
18576
18977
|
};
|
|
18978
|
+
GoogleTagManager.completeRegistration = function () {
|
|
18979
|
+
try {
|
|
18980
|
+
var event_8 = {
|
|
18981
|
+
event: "customer_register",
|
|
18982
|
+
};
|
|
18983
|
+
//@ts-ignore
|
|
18984
|
+
!isServer$2 && window.dataLayer && window.dataLayer.push(event_8);
|
|
18985
|
+
return event_8;
|
|
18986
|
+
}
|
|
18987
|
+
catch (err) {
|
|
18988
|
+
console.error(err);
|
|
18989
|
+
}
|
|
18990
|
+
};
|
|
18991
|
+
GoogleTagManager.search = function (searchKeyword) {
|
|
18992
|
+
try {
|
|
18993
|
+
var event_9 = {
|
|
18994
|
+
event: "search",
|
|
18995
|
+
search_string: searchKeyword,
|
|
18996
|
+
};
|
|
18997
|
+
//@ts-ignore
|
|
18998
|
+
!isServer$2 && window.dataLayer && window.dataLayer.push(event_9);
|
|
18999
|
+
return event_9;
|
|
19000
|
+
}
|
|
19001
|
+
catch (err) {
|
|
19002
|
+
console.error(err);
|
|
19003
|
+
}
|
|
19004
|
+
};
|
|
19005
|
+
GoogleTagManager.viewCategory = function (category, categoryPath) {
|
|
19006
|
+
try {
|
|
19007
|
+
var event_10 = {
|
|
19008
|
+
event: "view_category",
|
|
19009
|
+
ecommerce: {
|
|
19010
|
+
category: [
|
|
19011
|
+
{
|
|
19012
|
+
id: category.id,
|
|
19013
|
+
name: category.name,
|
|
19014
|
+
metaData: category.metaData,
|
|
19015
|
+
href: category.href,
|
|
19016
|
+
image: category.image,
|
|
19017
|
+
path: categoryPath,
|
|
19018
|
+
},
|
|
19019
|
+
],
|
|
19020
|
+
},
|
|
19021
|
+
};
|
|
19022
|
+
//@ts-ignore
|
|
19023
|
+
!isServer$2 && window.dataLayer && window.dataLayer.push(event_10);
|
|
19024
|
+
return event_10;
|
|
19025
|
+
}
|
|
19026
|
+
catch (err) {
|
|
19027
|
+
console.error(err);
|
|
19028
|
+
}
|
|
19029
|
+
};
|
|
18577
19030
|
return GoogleTagManager;
|
|
18578
19031
|
}());
|
|
18579
19032
|
function productToGTMItem(productDetail, quantity) {
|
|
@@ -18715,6 +19168,7 @@ var Analytics = /** @class */ (function () {
|
|
|
18715
19168
|
Analytics.search = function (searchKeyword) {
|
|
18716
19169
|
try {
|
|
18717
19170
|
FacebookPixel.search(searchKeyword);
|
|
19171
|
+
GoogleTagManager.search(searchKeyword);
|
|
18718
19172
|
}
|
|
18719
19173
|
catch (err) {
|
|
18720
19174
|
console.error(err);
|
|
@@ -18723,6 +19177,7 @@ var Analytics = /** @class */ (function () {
|
|
|
18723
19177
|
Analytics.completeRegistration = function () {
|
|
18724
19178
|
try {
|
|
18725
19179
|
FacebookPixel.completeRegistration();
|
|
19180
|
+
GoogleTagManager.completeRegistration();
|
|
18726
19181
|
}
|
|
18727
19182
|
catch (err) {
|
|
18728
19183
|
console.error(err);
|
|
@@ -18738,9 +19193,10 @@ var Analytics = /** @class */ (function () {
|
|
|
18738
19193
|
console.error(err);
|
|
18739
19194
|
}
|
|
18740
19195
|
};
|
|
18741
|
-
Analytics.viewCategory = function (categoryPath) {
|
|
19196
|
+
Analytics.viewCategory = function (categoryPath, category) {
|
|
18742
19197
|
try {
|
|
18743
19198
|
FacebookPixel.viewCategory(categoryPath);
|
|
19199
|
+
GoogleTagManager.viewCategory(category, categoryPath);
|
|
18744
19200
|
}
|
|
18745
19201
|
catch (err) {
|
|
18746
19202
|
console.error(err);
|
|
@@ -20083,6 +20539,7 @@ var IkasThemeComponentProp = /** @class */ (function () {
|
|
|
20083
20539
|
var IkasThemeComponentPropType;
|
|
20084
20540
|
(function (IkasThemeComponentPropType) {
|
|
20085
20541
|
IkasThemeComponentPropType["TEXT"] = "TEXT";
|
|
20542
|
+
IkasThemeComponentPropType["RICH_TEXT"] = "RICH_TEXT";
|
|
20086
20543
|
IkasThemeComponentPropType["BOOLEAN"] = "BOOLEAN";
|
|
20087
20544
|
IkasThemeComponentPropType["IMAGE"] = "IMAGE";
|
|
20088
20545
|
IkasThemeComponentPropType["IMAGE_LIST"] = "IMAGE_LIST";
|
|
@@ -20096,8 +20553,8 @@ var IkasThemeComponentPropType;
|
|
|
20096
20553
|
IkasThemeComponentPropType["CATEGORY_LIST"] = "CATEGORY_LIST";
|
|
20097
20554
|
IkasThemeComponentPropType["COLOR"] = "COLOR";
|
|
20098
20555
|
IkasThemeComponentPropType["CUSTOM"] = "CUSTOM";
|
|
20099
|
-
|
|
20100
|
-
|
|
20556
|
+
IkasThemeComponentPropType["COMPONENT"] = "COMPONENT";
|
|
20557
|
+
IkasThemeComponentPropType["COMPONENT_LIST"] = "COMPONENT_LIST";
|
|
20101
20558
|
})(IkasThemeComponentPropType || (IkasThemeComponentPropType = {}));
|
|
20102
20559
|
|
|
20103
20560
|
var IkasThemeComponent = /** @class */ (function () {
|
|
@@ -20146,6 +20603,7 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
20146
20603
|
var IkasThemeCustomDataType;
|
|
20147
20604
|
(function (IkasThemeCustomDataType) {
|
|
20148
20605
|
IkasThemeCustomDataType["TEXT"] = "TEXT";
|
|
20606
|
+
IkasThemeCustomDataType["RICH_TEXT"] = "RICH_TEXT";
|
|
20149
20607
|
IkasThemeCustomDataType["NUMBER"] = "NUMBER";
|
|
20150
20608
|
IkasThemeCustomDataType["BOOLEAN"] = "BOOLEAN";
|
|
20151
20609
|
IkasThemeCustomDataType["IMAGE"] = "IMAGE";
|
|
@@ -20159,6 +20617,8 @@ var IkasThemeCustomDataType;
|
|
|
20159
20617
|
IkasThemeCustomDataType["CATEGORY"] = "CATEGORY";
|
|
20160
20618
|
IkasThemeCustomDataType["CATEGORY_LIST"] = "CATEGORY_LIST";
|
|
20161
20619
|
IkasThemeCustomDataType["COLOR"] = "COLOR";
|
|
20620
|
+
IkasThemeCustomDataType["COMPONENT"] = "COMPONENT";
|
|
20621
|
+
IkasThemeCustomDataType["COMPONENT_LIST"] = "COMPONENT_LIST";
|
|
20162
20622
|
IkasThemeCustomDataType["OBJECT"] = "OBJECT";
|
|
20163
20623
|
IkasThemeCustomDataType["STATIC_LIST"] = "STATIC_LIST";
|
|
20164
20624
|
IkasThemeCustomDataType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
@@ -20351,12 +20811,19 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
20351
20811
|
})];
|
|
20352
20812
|
case 2:
|
|
20353
20813
|
response_1 = _a.sent();
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20814
|
+
if (this.isStatic) {
|
|
20815
|
+
this.data = this._brandListPropValue
|
|
20816
|
+
.brandIds.map(function (bID) {
|
|
20817
|
+
return response_1.brands.find(function (b) { return b.id === bID; });
|
|
20818
|
+
})
|
|
20819
|
+
.filter(function (b) { return !!b; });
|
|
20820
|
+
}
|
|
20821
|
+
else {
|
|
20822
|
+
this.data = response_1.brands;
|
|
20823
|
+
}
|
|
20824
|
+
this._count = response_1.count;
|
|
20825
|
+
this._initialized = true;
|
|
20826
|
+
this._minPage = this.page;
|
|
20360
20827
|
return [3 /*break*/, 5];
|
|
20361
20828
|
case 3:
|
|
20362
20829
|
err_1 = _a.sent();
|
|
@@ -20638,12 +21105,19 @@ var IkasCategoryList = /** @class */ (function () {
|
|
|
20638
21105
|
})];
|
|
20639
21106
|
case 2:
|
|
20640
21107
|
response_1 = _a.sent();
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
21108
|
+
if (this.isStatic) {
|
|
21109
|
+
this.data = this._categoryListPropValue
|
|
21110
|
+
.categoryIds.map(function (cID) {
|
|
21111
|
+
return response_1.categories.find(function (c) { return c.id === cID; });
|
|
21112
|
+
})
|
|
21113
|
+
.filter(function (c) { return !!c; });
|
|
21114
|
+
}
|
|
21115
|
+
else {
|
|
21116
|
+
this.data = response_1.categories;
|
|
21117
|
+
}
|
|
21118
|
+
this._count = response_1.count;
|
|
21119
|
+
this._initialized = true;
|
|
21120
|
+
this._minPage = this.page;
|
|
20647
21121
|
return [3 /*break*/, 5];
|
|
20648
21122
|
case 3:
|
|
20649
21123
|
err_1 = _a.sent();
|
|
@@ -24252,6 +24726,13 @@ var AccountInfoForm = /** @class */ (function () {
|
|
|
24252
24726
|
return AccountInfoForm;
|
|
24253
24727
|
}());
|
|
24254
24728
|
|
|
24729
|
+
var IkasComponentRenderer = /** @class */ (function () {
|
|
24730
|
+
function IkasComponentRenderer(render) {
|
|
24731
|
+
this.render = render;
|
|
24732
|
+
}
|
|
24733
|
+
return IkasComponentRenderer;
|
|
24734
|
+
}());
|
|
24735
|
+
|
|
24255
24736
|
var IkasProductListPropValue = /** @class */ (function () {
|
|
24256
24737
|
function IkasProductListPropValue(data) {
|
|
24257
24738
|
this.initialSort = null;
|
|
@@ -24311,8 +24792,8 @@ var IkasCategoryListPropValue = /** @class */ (function () {
|
|
|
24311
24792
|
this.categoryListType = data.categoryListType || IkasCategoryListType.ALL;
|
|
24312
24793
|
this.initialSort = data.initialSort || IkasCategoryListSortType.A_Z;
|
|
24313
24794
|
this.initialLimit = data.initialLimit || 20;
|
|
24314
|
-
this.categoryCount = data.categoryCount;
|
|
24315
|
-
this.categoryIds = data.categoryIds;
|
|
24795
|
+
this.categoryCount = data.categoryCount || null;
|
|
24796
|
+
this.categoryIds = data.categoryIds || null;
|
|
24316
24797
|
makeAutoObservable(this);
|
|
24317
24798
|
}
|
|
24318
24799
|
return IkasCategoryListPropValue;
|
|
@@ -27466,352 +27947,144 @@ var IkasCartStore = /** @class */ (function () {
|
|
|
27466
27947
|
case 3:
|
|
27467
27948
|
this.removeCardIfEmpty();
|
|
27468
27949
|
oldQuantity = item.quantity;
|
|
27469
|
-
if (oldQuantity > quantity) {
|
|
27470
|
-
Analytics.removeFromCart(item, oldQuantity - quantity);
|
|
27471
|
-
}
|
|
27472
|
-
else {
|
|
27473
|
-
Analytics.addToCart(item, quantity - oldQuantity);
|
|
27474
|
-
}
|
|
27475
|
-
return [3 /*break*/, 5];
|
|
27476
|
-
case 4:
|
|
27477
|
-
err_3 = _d.sent();
|
|
27478
|
-
console.log(err_3);
|
|
27479
|
-
return [3 /*break*/, 5];
|
|
27480
|
-
case 5: return [2 /*return*/];
|
|
27481
|
-
}
|
|
27482
|
-
});
|
|
27483
|
-
}); };
|
|
27484
|
-
this.removeItem = function (item) { return __awaiter(_this, void 0, void 0, function () {
|
|
27485
|
-
return __generator(this, function (_a) {
|
|
27486
|
-
switch (_a.label) {
|
|
27487
|
-
case 0: return [4 /*yield*/, this.changeItemQuantity(item, 0)];
|
|
27488
|
-
case 1:
|
|
27489
|
-
_a.sent();
|
|
27490
|
-
return [2 /*return*/];
|
|
27491
|
-
}
|
|
27492
|
-
});
|
|
27493
|
-
}); };
|
|
27494
|
-
this.removeCardIfEmpty = function () {
|
|
27495
|
-
var _a;
|
|
27496
|
-
if (((_a = _this.cart) === null || _a === void 0 ? void 0 : _a.itemCount) === 0) {
|
|
27497
|
-
_this.removeCart();
|
|
27498
|
-
}
|
|
27499
|
-
};
|
|
27500
|
-
this.removeCart = function () {
|
|
27501
|
-
localStorage.removeItem(CART_LS_KEY);
|
|
27502
|
-
localStorage.removeItem(CHECKOUT_LS_KEY);
|
|
27503
|
-
_this.cart = undefined;
|
|
27504
|
-
_this._checkoutId = undefined;
|
|
27505
|
-
};
|
|
27506
|
-
this.baseStore = baseStore;
|
|
27507
|
-
makeAutoObservable(this);
|
|
27508
|
-
}
|
|
27509
|
-
Object.defineProperty(IkasCartStore.prototype, "isBrowser", {
|
|
27510
|
-
get: function () {
|
|
27511
|
-
return typeof localStorage !== "undefined";
|
|
27512
|
-
},
|
|
27513
|
-
enumerable: false,
|
|
27514
|
-
configurable: true
|
|
27515
|
-
});
|
|
27516
|
-
Object.defineProperty(IkasCartStore.prototype, "isLoadingCart", {
|
|
27517
|
-
get: function () {
|
|
27518
|
-
return this._isLoadingCart;
|
|
27519
|
-
},
|
|
27520
|
-
enumerable: false,
|
|
27521
|
-
configurable: true
|
|
27522
|
-
});
|
|
27523
|
-
Object.defineProperty(IkasCartStore.prototype, "cartLoadFinished", {
|
|
27524
|
-
get: function () {
|
|
27525
|
-
return this._cartLoadFinished;
|
|
27526
|
-
},
|
|
27527
|
-
enumerable: false,
|
|
27528
|
-
configurable: true
|
|
27529
|
-
});
|
|
27530
|
-
Object.defineProperty(IkasCartStore.prototype, "checkoutId", {
|
|
27531
|
-
get: function () {
|
|
27532
|
-
return this._checkoutId;
|
|
27533
|
-
},
|
|
27534
|
-
enumerable: false,
|
|
27535
|
-
configurable: true
|
|
27536
|
-
});
|
|
27537
|
-
Object.defineProperty(IkasCartStore.prototype, "checkoutUrl", {
|
|
27538
|
-
get: function () {
|
|
27539
|
-
if (this._checkoutId)
|
|
27540
|
-
return "/checkout/" + this._checkoutId + "?step=info";
|
|
27541
|
-
},
|
|
27542
|
-
enumerable: false,
|
|
27543
|
-
configurable: true
|
|
27544
|
-
});
|
|
27545
|
-
return IkasCartStore;
|
|
27546
|
-
}());
|
|
27547
|
-
|
|
27548
|
-
var css_248z$k = ".style-module_StepSuccess__36Zg4 .style-module_SuccessTitle__2cVxj {\n font-size: 2em;\n font-weight: 400;\n margin-bottom: 0.3em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n color: #737373;\n margin: auto;\n margin-bottom: 2em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n display: flex;\n align-items: center;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 .style-module_OrderNumber__1A_xg {\n font-weight: bold;\n margin-left: 0.4em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 3em;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-weight: 500;\n margin-bottom: 0.2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n color: #737373;\n letter-spacing: 0.02em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 500;\n color: #737373; }\n\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n margin: auto; }\n\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n text-align: center;\n margin-top: 3em; }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n justify-content: center; }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n justify-content: center;\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 1.5em; } }\n";
|
|
27549
|
-
var styles$j = {"StepSuccess":"style-module_StepSuccess__36Zg4","SuccessTitle":"style-module_SuccessTitle__2cVxj","SuccessSubTitle":"style-module_SuccessSubTitle__2UvWI","OrderNumberContainer":"style-module_OrderNumberContainer__1TWG3","OrderNumber":"style-module_OrderNumber__1A_xg","InfoGrid":"style-module_InfoGrid__2VYXk","InfoTitle":"style-module_InfoTitle__2Whku","InfoText":"style-module_InfoText__1LHFw","InfoTextBold":"style-module_InfoTextBold__21977","Actions":"style-module_Actions__3ZXaJ"};
|
|
27550
|
-
styleInject(css_248z$k);
|
|
27551
|
-
|
|
27552
|
-
var StepSuccess = observer(function (_a) {
|
|
27553
|
-
var _b, _c, _d;
|
|
27554
|
-
var vm = _a.vm;
|
|
27555
|
-
if (typeof localStorage !== "undefined") {
|
|
27556
|
-
localStorage.removeItem(CART_LS_KEY);
|
|
27557
|
-
localStorage.removeItem(CHECKOUT_LS_KEY);
|
|
27558
|
-
}
|
|
27559
|
-
Analytics.purchase(vm.checkout, vm.checkout.orderNumber);
|
|
27560
|
-
var customerName = (((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.firstName) || "") +
|
|
27561
|
-
" " +
|
|
27562
|
-
(((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.lastName) || "");
|
|
27563
|
-
return (createElement("div", { className: [styles$j.StepSuccess, commonStyles.FormContainer].join(" ") },
|
|
27564
|
-
createElement("div", { className: styles$j.SuccessTitle }, "Sipari\u015Finiz i\u00E7in te\u015Fekk\u00FCr ederiz!"),
|
|
27565
|
-
createElement("div", { className: styles$j.SuccessSubTitle },
|
|
27566
|
-
"Sevgili ",
|
|
27567
|
-
customerName,
|
|
27568
|
-
", sipari\u015Finiz bize ula\u015Fm\u0131\u015Ft\u0131r. Sipari\u015Finiz kargoya verildi\u011Finde sizi e-posta ile bilgilendirece\u011Fiz."),
|
|
27569
|
-
createElement("div", { className: styles$j.InfoGrid },
|
|
27570
|
-
createElement("div", null,
|
|
27571
|
-
createElement("div", { className: styles$j.InfoTitle }, "Sipari\u015F No / Tarih"),
|
|
27572
|
-
createElement("div", { className: styles$j.InfoText }, "#" + (vm.checkout.orderNumber || "")),
|
|
27573
|
-
createElement("div", { className: styles$j.InfoText }, vm.checkout.dateStr)),
|
|
27574
|
-
createElement("div", null,
|
|
27575
|
-
createElement("div", { className: styles$j.InfoTitle }, "\u0130leti\u015Fim Bilgileri"),
|
|
27576
|
-
createElement("div", { className: styles$j.InfoText }, (_d = vm.checkout.customer) === null || _d === void 0 ? void 0 : _d.email),
|
|
27577
|
-
createElement("div", { className: styles$j.InfoText }, customerName))),
|
|
27578
|
-
createElement("div", { className: styles$j.Actions },
|
|
27579
|
-
createElement(Button, { text: "Alışverişe Dön", onClick: vm.onBackToShoppingClick }))));
|
|
27580
|
-
});
|
|
27581
|
-
|
|
27582
|
-
var css_248z$l = ".style-module_PolicyModal__3GidE {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.6);\n backdrop-filter: blur(6px);\n z-index: 9999;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n border-radius: 8px;\n background-color: white;\n color: #545454;\n min-width: 400px;\n max-width: 750px;\n max-height: 90%;\n display: flex;\n flex-direction: column;\n overflow: hidden; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n flex: 0 0 auto;\n padding: 1.5em;\n font-size: 1.2em;\n border-bottom: 1px solid #d9d9d9;\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 .style-module_CloseButton__1loXc {\n cursor: pointer; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalContent__271So {\n flex: 1 1 auto;\n padding: 1.5em;\n overflow-y: auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n max-width: unset;\n max-height: unset;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n padding: 1.5em; } }\n";
|
|
27583
|
-
var styles$k = {"PolicyModal":"style-module_PolicyModal__3GidE","Modal":"style-module_Modal__2xsde","ModalHeader":"style-module_ModalHeader__3tVz1","CloseButton":"style-module_CloseButton__1loXc","ModalContent":"style-module_ModalContent__271So"};
|
|
27584
|
-
styleInject(css_248z$l);
|
|
27585
|
-
|
|
27586
|
-
var PolicyModal = observer(function (_a) {
|
|
27587
|
-
var title = _a.title, onClose = _a.onClose, modalContent = _a.modalContent;
|
|
27588
|
-
var escFunction = useCallback(function (event) {
|
|
27589
|
-
if (event.keyCode === 27) {
|
|
27590
|
-
onClose();
|
|
27591
|
-
}
|
|
27592
|
-
}, []);
|
|
27593
|
-
useEffect(function () {
|
|
27594
|
-
document.addEventListener("keydown", escFunction, false);
|
|
27595
|
-
return function () {
|
|
27596
|
-
document.removeEventListener("keydown", escFunction, false);
|
|
27597
|
-
};
|
|
27598
|
-
}, []);
|
|
27599
|
-
return (createElement("div", { className: styles$k.PolicyModal, onClick: onClose },
|
|
27600
|
-
createElement("div", { className: styles$k.Modal, onClick: function (e) { return e.stopPropagation(); } },
|
|
27601
|
-
createElement("div", { className: styles$k.ModalHeader },
|
|
27602
|
-
createElement("div", null, title),
|
|
27603
|
-
createElement("div", { className: styles$k.CloseButton, onClick: onClose },
|
|
27604
|
-
createElement(SVGHamburger, null))),
|
|
27605
|
-
createElement("div", { className: styles$k.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } }))));
|
|
27606
|
-
});
|
|
27607
|
-
|
|
27608
|
-
var IkasPageHead = observer(function (_a) {
|
|
27609
|
-
var _b;
|
|
27610
|
-
var page = _a.page, pageTitle = _a.pageTitle, description = _a.description, pageSpecificDataStr = _a.pageSpecificDataStr, props = __rest(_a, ["page", "pageTitle", "description", "pageSpecificDataStr"]);
|
|
27611
|
-
var ogpMetas = [];
|
|
27612
|
-
var schemas = [];
|
|
27613
|
-
var isCanonicalLinkAdd = false;
|
|
27614
|
-
var canonicalHref = "";
|
|
27615
|
-
if (props.addOgpMetas) {
|
|
27616
|
-
ogpMetas.push({
|
|
27617
|
-
property: "og:type",
|
|
27618
|
-
content: "website",
|
|
27619
|
-
});
|
|
27620
|
-
if (typeof window !== "undefined") {
|
|
27621
|
-
ogpMetas.push({
|
|
27622
|
-
property: "og:site_name",
|
|
27623
|
-
content: "https://" + window.location.hostname,
|
|
27624
|
-
});
|
|
27625
|
-
}
|
|
27626
|
-
if (pageTitle) {
|
|
27627
|
-
ogpMetas.push({
|
|
27628
|
-
property: "og:title",
|
|
27629
|
-
content: pageTitle,
|
|
27630
|
-
});
|
|
27631
|
-
}
|
|
27632
|
-
if (description) {
|
|
27633
|
-
ogpMetas.push({
|
|
27634
|
-
property: "og:description",
|
|
27635
|
-
content: description,
|
|
27636
|
-
});
|
|
27637
|
-
}
|
|
27638
|
-
if (typeof window !== "undefined") {
|
|
27639
|
-
ogpMetas.push({
|
|
27640
|
-
property: "og:url",
|
|
27641
|
-
content: window.location.href,
|
|
27642
|
-
});
|
|
27643
|
-
}
|
|
27644
|
-
if (props.merchantSettings) {
|
|
27645
|
-
if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === IkasThemePageType.PRODUCT) {
|
|
27646
|
-
var productDetailParsed = JSON.parse(pageSpecificDataStr);
|
|
27647
|
-
var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
|
|
27648
|
-
if (productDetail.selectedVariant.mainImage) {
|
|
27649
|
-
ogpMetas.push({
|
|
27650
|
-
property: "og:image",
|
|
27651
|
-
content: (_b = productDetail.selectedVariant.mainImage) === null || _b === void 0 ? void 0 : _b.src,
|
|
27652
|
-
});
|
|
27653
|
-
}
|
|
27654
|
-
}
|
|
27655
|
-
else {
|
|
27656
|
-
var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
|
|
27657
|
-
ogpMetas.push({
|
|
27658
|
-
property: "og:image",
|
|
27659
|
-
content: merchantSettings.logo.src,
|
|
27660
|
-
});
|
|
27661
|
-
}
|
|
27662
|
-
}
|
|
27663
|
-
}
|
|
27664
|
-
if (props.merchantSettings) {
|
|
27665
|
-
// for schema.org
|
|
27666
|
-
var merchantSettings = new IkasMerchantSettings(JSON.parse(props.merchantSettings));
|
|
27667
|
-
var websiteSchema = createWebsiteSchema();
|
|
27668
|
-
var storeSchema = createStoreSchema(merchantSettings);
|
|
27669
|
-
schemas.push(websiteSchema);
|
|
27670
|
-
schemas.push(storeSchema);
|
|
27671
|
-
}
|
|
27672
|
-
if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === IkasThemePageType.PRODUCT) {
|
|
27673
|
-
var productDetailParsed = JSON.parse(pageSpecificDataStr);
|
|
27674
|
-
var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
|
|
27675
|
-
if (typeof window !== "undefined" && productDetail.product.hasVariant) {
|
|
27676
|
-
isCanonicalLinkAdd =
|
|
27677
|
-
window.location.pathname !== productDetail.product.href;
|
|
27678
|
-
canonicalHref =
|
|
27679
|
-
"https://" + window.location.hostname + productDetail.product.href;
|
|
27680
|
-
}
|
|
27681
|
-
var schema = createProductSchema(productDetail);
|
|
27682
|
-
if (schema)
|
|
27683
|
-
schemas.push(schema);
|
|
27684
|
-
}
|
|
27685
|
-
if (pageSpecificDataStr && (page === null || page === void 0 ? void 0 : page.type) === IkasThemePageType.CATEGORY) {
|
|
27686
|
-
var categorySchema = createCategorySchema(pageSpecificDataStr);
|
|
27687
|
-
if (categorySchema)
|
|
27688
|
-
schemas.push(categorySchema);
|
|
27689
|
-
var categoryBreadcrumbSchema = createCategoryBreadcrumbSchema(pageSpecificDataStr);
|
|
27690
|
-
if (categoryBreadcrumbSchema)
|
|
27691
|
-
schemas.push(categoryBreadcrumbSchema);
|
|
27692
|
-
}
|
|
27693
|
-
return (createElement(Head, null,
|
|
27694
|
-
createElement("title", null, pageTitle || ""),
|
|
27695
|
-
createElement("meta", { name: "description", content: description || "" }),
|
|
27696
|
-
isCanonicalLinkAdd && createElement("link", { rel: "canonical", href: canonicalHref }),
|
|
27697
|
-
!!props.addOgpMetas &&
|
|
27698
|
-
ogpMetas.map(function (ogpMeta, index) { return (createElement("meta", { key: ogpMeta.content + "-" + index, property: ogpMeta.property, content: ogpMeta.content })); }),
|
|
27699
|
-
!!schemas.length &&
|
|
27700
|
-
schemas.map(function (schema, index) { return (createElement("script", { key: index, type: "application/ld+json", dangerouslySetInnerHTML: {
|
|
27701
|
-
__html: JSON.stringify(schema),
|
|
27702
|
-
} })); })));
|
|
27703
|
-
});
|
|
27704
|
-
function createWebsiteSchema() {
|
|
27705
|
-
var _a;
|
|
27706
|
-
var hostname = "";
|
|
27707
|
-
if (typeof window !== "undefined") {
|
|
27708
|
-
hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
|
|
27709
|
-
}
|
|
27710
|
-
return {
|
|
27711
|
-
"@context": "https://schema.org",
|
|
27712
|
-
"@type": "Website",
|
|
27713
|
-
url: "https://" + hostname,
|
|
27714
|
-
};
|
|
27715
|
-
}
|
|
27716
|
-
function createStoreSchema(merchantSettings) {
|
|
27717
|
-
var _a, _b;
|
|
27718
|
-
var hostname = "";
|
|
27719
|
-
if (typeof window !== "undefined") {
|
|
27720
|
-
hostname = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hostname;
|
|
27721
|
-
}
|
|
27722
|
-
return {
|
|
27723
|
-
"@context": "https://schema.org",
|
|
27724
|
-
"@type": "Store",
|
|
27725
|
-
name: merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.merchantName,
|
|
27726
|
-
logo: (_b = merchantSettings === null || merchantSettings === void 0 ? void 0 : merchantSettings.logo) === null || _b === void 0 ? void 0 : _b.src,
|
|
27727
|
-
url: "https://" + hostname,
|
|
27728
|
-
};
|
|
27729
|
-
}
|
|
27730
|
-
function createProductSchema(productDetail) {
|
|
27731
|
-
var _a, _b;
|
|
27732
|
-
try {
|
|
27733
|
-
var isBrowser = typeof window !== "undefined";
|
|
27734
|
-
if (isBrowser) {
|
|
27735
|
-
var urlParams = new URLSearchParams(window.location.search);
|
|
27736
|
-
var vid_1 = urlParams.get("vid");
|
|
27737
|
-
if (vid_1) {
|
|
27738
|
-
var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
|
|
27739
|
-
if (variant) {
|
|
27740
|
-
productDetail.selectedVariantValues = variant.variantValues;
|
|
27950
|
+
if (oldQuantity > quantity) {
|
|
27951
|
+
Analytics.removeFromCart(item, oldQuantity - quantity);
|
|
27952
|
+
}
|
|
27953
|
+
else {
|
|
27954
|
+
Analytics.addToCart(item, quantity - oldQuantity);
|
|
27955
|
+
}
|
|
27956
|
+
return [3 /*break*/, 5];
|
|
27957
|
+
case 4:
|
|
27958
|
+
err_3 = _d.sent();
|
|
27959
|
+
console.log(err_3);
|
|
27960
|
+
return [3 /*break*/, 5];
|
|
27961
|
+
case 5: return [2 /*return*/];
|
|
27962
|
+
}
|
|
27963
|
+
});
|
|
27964
|
+
}); };
|
|
27965
|
+
this.removeItem = function (item) { return __awaiter(_this, void 0, void 0, function () {
|
|
27966
|
+
return __generator(this, function (_a) {
|
|
27967
|
+
switch (_a.label) {
|
|
27968
|
+
case 0: return [4 /*yield*/, this.changeItemQuantity(item, 0)];
|
|
27969
|
+
case 1:
|
|
27970
|
+
_a.sent();
|
|
27971
|
+
return [2 /*return*/];
|
|
27741
27972
|
}
|
|
27973
|
+
});
|
|
27974
|
+
}); };
|
|
27975
|
+
this.removeCardIfEmpty = function () {
|
|
27976
|
+
var _a;
|
|
27977
|
+
if (((_a = _this.cart) === null || _a === void 0 ? void 0 : _a.itemCount) === 0) {
|
|
27978
|
+
_this.removeCart();
|
|
27742
27979
|
}
|
|
27743
|
-
}
|
|
27744
|
-
var productUrl = isBrowser
|
|
27745
|
-
? "https://" + window.location.hostname + productDetail.href
|
|
27746
|
-
: "";
|
|
27747
|
-
return {
|
|
27748
|
-
"@context": "https://schema.org/",
|
|
27749
|
-
"@type": "Product",
|
|
27750
|
-
name: productDetail.product.name,
|
|
27751
|
-
description: (_a = productDetail.product.metaData) === null || _a === void 0 ? void 0 : _a.description,
|
|
27752
|
-
image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
|
|
27753
|
-
productId: productDetail.selectedVariant.id,
|
|
27754
|
-
sku: productDetail.selectedVariant.sku,
|
|
27755
|
-
mpn: productDetail.selectedVariant.barcodeList.length
|
|
27756
|
-
? productDetail.selectedVariant.barcodeList[0]
|
|
27757
|
-
: "",
|
|
27758
|
-
brand: {
|
|
27759
|
-
"@type": "Brand",
|
|
27760
|
-
name: (_b = productDetail.product.brand) === null || _b === void 0 ? void 0 : _b.name,
|
|
27761
|
-
},
|
|
27762
|
-
offers: {
|
|
27763
|
-
"@type": "Offer",
|
|
27764
|
-
url: productUrl,
|
|
27765
|
-
priceCurrency: productDetail.selectedVariant.price.currency || "TRY",
|
|
27766
|
-
price: productDetail.selectedVariant.price.finalPrice,
|
|
27767
|
-
priceValidUntil: "",
|
|
27768
|
-
itemCondition: "https://schema.org/NewCondition",
|
|
27769
|
-
availability: productDetail.selectedVariant.stock > 0
|
|
27770
|
-
? "https://schema.org/InStock"
|
|
27771
|
-
: "https://schema.org/OutOfStock",
|
|
27772
|
-
},
|
|
27773
27980
|
};
|
|
27774
|
-
|
|
27775
|
-
|
|
27776
|
-
|
|
27777
|
-
|
|
27778
|
-
|
|
27779
|
-
try {
|
|
27780
|
-
var categoryParsed = JSON.parse(pageSpecificDataStr);
|
|
27781
|
-
var category = new IkasCategory(categoryParsed);
|
|
27782
|
-
var categoryUrl = typeof window !== undefined
|
|
27783
|
-
? "https://" + window.location.hostname + category.href
|
|
27784
|
-
: "";
|
|
27785
|
-
return {
|
|
27786
|
-
"@context": "http://schema.org",
|
|
27787
|
-
"@type": "CollectionPage",
|
|
27788
|
-
url: categoryUrl,
|
|
27789
|
-
name: (_a = category.metaData) === null || _a === void 0 ? void 0 : _a.pageTitle,
|
|
27790
|
-
description: (_b = category.metaData) === null || _b === void 0 ? void 0 : _b.description,
|
|
27791
|
-
image: (_c = category.image) === null || _c === void 0 ? void 0 : _c.src,
|
|
27981
|
+
this.removeCart = function () {
|
|
27982
|
+
localStorage.removeItem(CART_LS_KEY);
|
|
27983
|
+
localStorage.removeItem(CHECKOUT_LS_KEY);
|
|
27984
|
+
_this.cart = undefined;
|
|
27985
|
+
_this._checkoutId = undefined;
|
|
27792
27986
|
};
|
|
27987
|
+
this.baseStore = baseStore;
|
|
27988
|
+
makeAutoObservable(this);
|
|
27793
27989
|
}
|
|
27794
|
-
|
|
27795
|
-
|
|
27796
|
-
|
|
27797
|
-
|
|
27798
|
-
|
|
27799
|
-
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
|
|
27805
|
-
|
|
27806
|
-
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
|
|
27810
|
-
|
|
27811
|
-
}
|
|
27990
|
+
Object.defineProperty(IkasCartStore.prototype, "isBrowser", {
|
|
27991
|
+
get: function () {
|
|
27992
|
+
return typeof localStorage !== "undefined";
|
|
27993
|
+
},
|
|
27994
|
+
enumerable: false,
|
|
27995
|
+
configurable: true
|
|
27996
|
+
});
|
|
27997
|
+
Object.defineProperty(IkasCartStore.prototype, "isLoadingCart", {
|
|
27998
|
+
get: function () {
|
|
27999
|
+
return this._isLoadingCart;
|
|
28000
|
+
},
|
|
28001
|
+
enumerable: false,
|
|
28002
|
+
configurable: true
|
|
28003
|
+
});
|
|
28004
|
+
Object.defineProperty(IkasCartStore.prototype, "cartLoadFinished", {
|
|
28005
|
+
get: function () {
|
|
28006
|
+
return this._cartLoadFinished;
|
|
28007
|
+
},
|
|
28008
|
+
enumerable: false,
|
|
28009
|
+
configurable: true
|
|
28010
|
+
});
|
|
28011
|
+
Object.defineProperty(IkasCartStore.prototype, "checkoutId", {
|
|
28012
|
+
get: function () {
|
|
28013
|
+
return this._checkoutId;
|
|
28014
|
+
},
|
|
28015
|
+
enumerable: false,
|
|
28016
|
+
configurable: true
|
|
28017
|
+
});
|
|
28018
|
+
Object.defineProperty(IkasCartStore.prototype, "checkoutUrl", {
|
|
28019
|
+
get: function () {
|
|
28020
|
+
if (this._checkoutId)
|
|
28021
|
+
return "/checkout/" + this._checkoutId + "?step=info";
|
|
28022
|
+
},
|
|
28023
|
+
enumerable: false,
|
|
28024
|
+
configurable: true
|
|
28025
|
+
});
|
|
28026
|
+
return IkasCartStore;
|
|
28027
|
+
}());
|
|
28028
|
+
|
|
28029
|
+
var css_248z$k = ".style-module_StepSuccess__36Zg4 .style-module_SuccessTitle__2cVxj {\n font-size: 2em;\n font-weight: 400;\n margin-bottom: 0.3em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n color: #737373;\n margin: auto;\n margin-bottom: 2em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n display: flex;\n align-items: center;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 .style-module_OrderNumber__1A_xg {\n font-weight: bold;\n margin-left: 0.4em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 3em;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-weight: 500;\n margin-bottom: 0.2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n color: #737373;\n letter-spacing: 0.02em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 500;\n color: #737373; }\n\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n margin: auto; }\n\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n text-align: center;\n margin-top: 3em; }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n justify-content: center; }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n justify-content: center;\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 1.5em; } }\n";
|
|
28030
|
+
var styles$j = {"StepSuccess":"style-module_StepSuccess__36Zg4","SuccessTitle":"style-module_SuccessTitle__2cVxj","SuccessSubTitle":"style-module_SuccessSubTitle__2UvWI","OrderNumberContainer":"style-module_OrderNumberContainer__1TWG3","OrderNumber":"style-module_OrderNumber__1A_xg","InfoGrid":"style-module_InfoGrid__2VYXk","InfoTitle":"style-module_InfoTitle__2Whku","InfoText":"style-module_InfoText__1LHFw","InfoTextBold":"style-module_InfoTextBold__21977","Actions":"style-module_Actions__3ZXaJ"};
|
|
28031
|
+
styleInject(css_248z$k);
|
|
28032
|
+
|
|
28033
|
+
var StepSuccess = observer(function (_a) {
|
|
28034
|
+
var _b, _c, _d;
|
|
28035
|
+
var vm = _a.vm;
|
|
28036
|
+
if (typeof localStorage !== "undefined") {
|
|
28037
|
+
localStorage.removeItem(CART_LS_KEY);
|
|
28038
|
+
localStorage.removeItem(CHECKOUT_LS_KEY);
|
|
27812
28039
|
}
|
|
27813
|
-
|
|
27814
|
-
|
|
28040
|
+
Analytics.purchase(vm.checkout, vm.checkout.orderNumber);
|
|
28041
|
+
var customerName = (((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.firstName) || "") +
|
|
28042
|
+
" " +
|
|
28043
|
+
(((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.lastName) || "");
|
|
28044
|
+
return (createElement("div", { className: [styles$j.StepSuccess, commonStyles.FormContainer].join(" ") },
|
|
28045
|
+
createElement("div", { className: styles$j.SuccessTitle }, "Sipari\u015Finiz i\u00E7in te\u015Fekk\u00FCr ederiz!"),
|
|
28046
|
+
createElement("div", { className: styles$j.SuccessSubTitle },
|
|
28047
|
+
"Sevgili ",
|
|
28048
|
+
customerName,
|
|
28049
|
+
", sipari\u015Finiz bize ula\u015Fm\u0131\u015Ft\u0131r. Sipari\u015Finiz kargoya verildi\u011Finde sizi e-posta ile bilgilendirece\u011Fiz."),
|
|
28050
|
+
createElement("div", { className: styles$j.InfoGrid },
|
|
28051
|
+
createElement("div", null,
|
|
28052
|
+
createElement("div", { className: styles$j.InfoTitle }, "Sipari\u015F No / Tarih"),
|
|
28053
|
+
createElement("div", { className: styles$j.InfoText }, "#" + (vm.checkout.orderNumber || "")),
|
|
28054
|
+
createElement("div", { className: styles$j.InfoText }, vm.checkout.dateStr)),
|
|
28055
|
+
createElement("div", null,
|
|
28056
|
+
createElement("div", { className: styles$j.InfoTitle }, "\u0130leti\u015Fim Bilgileri"),
|
|
28057
|
+
createElement("div", { className: styles$j.InfoText }, (_d = vm.checkout.customer) === null || _d === void 0 ? void 0 : _d.email),
|
|
28058
|
+
createElement("div", { className: styles$j.InfoText }, customerName))),
|
|
28059
|
+
createElement("div", { className: styles$j.Actions },
|
|
28060
|
+
createElement(Button, { text: "Alışverişe Dön", onClick: vm.onBackToShoppingClick }))));
|
|
28061
|
+
});
|
|
28062
|
+
|
|
28063
|
+
var css_248z$l = ".style-module_PolicyModal__3GidE {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.6);\n backdrop-filter: blur(6px);\n z-index: 9999;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n border-radius: 8px;\n background-color: white;\n color: #545454;\n min-width: 400px;\n max-width: 750px;\n max-height: 90%;\n display: flex;\n flex-direction: column;\n overflow: hidden; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n flex: 0 0 auto;\n padding: 1.5em;\n font-size: 1.2em;\n border-bottom: 1px solid #d9d9d9;\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 .style-module_CloseButton__1loXc {\n cursor: pointer; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalContent__271So {\n flex: 1 1 auto;\n padding: 1.5em;\n overflow-y: auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n max-width: unset;\n max-height: unset;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n padding: 1.5em; } }\n";
|
|
28064
|
+
var styles$k = {"PolicyModal":"style-module_PolicyModal__3GidE","Modal":"style-module_Modal__2xsde","ModalHeader":"style-module_ModalHeader__3tVz1","CloseButton":"style-module_CloseButton__1loXc","ModalContent":"style-module_ModalContent__271So"};
|
|
28065
|
+
styleInject(css_248z$l);
|
|
28066
|
+
|
|
28067
|
+
var PolicyModal = observer(function (_a) {
|
|
28068
|
+
var title = _a.title, onClose = _a.onClose, modalContent = _a.modalContent;
|
|
28069
|
+
var escFunction = useCallback(function (event) {
|
|
28070
|
+
if (event.keyCode === 27) {
|
|
28071
|
+
onClose();
|
|
28072
|
+
}
|
|
28073
|
+
}, []);
|
|
28074
|
+
useEffect(function () {
|
|
28075
|
+
document.addEventListener("keydown", escFunction, false);
|
|
28076
|
+
return function () {
|
|
28077
|
+
document.removeEventListener("keydown", escFunction, false);
|
|
28078
|
+
};
|
|
28079
|
+
}, []);
|
|
28080
|
+
return (createElement("div", { className: styles$k.PolicyModal, onClick: onClose },
|
|
28081
|
+
createElement("div", { className: styles$k.Modal, onClick: function (e) { return e.stopPropagation(); } },
|
|
28082
|
+
createElement("div", { className: styles$k.ModalHeader },
|
|
28083
|
+
createElement("div", null, title),
|
|
28084
|
+
createElement("div", { className: styles$k.CloseButton, onClick: onClose },
|
|
28085
|
+
createElement(SVGHamburger, null))),
|
|
28086
|
+
createElement("div", { className: styles$k.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } }))));
|
|
28087
|
+
});
|
|
27815
28088
|
|
|
27816
28089
|
var CustomerLoginRequiredError = observer(function (_a) {
|
|
27817
28090
|
var onClose = _a.onClose;
|
|
@@ -27944,67 +28217,6 @@ var style = {
|
|
|
27944
28217
|
backgroundColor: "rgba(255, 0, 0, 0.5)",
|
|
27945
28218
|
};
|
|
27946
28219
|
|
|
27947
|
-
var ThemeComponent = observer(function (_a) {
|
|
27948
|
-
var pageComponentPropValue = _a.pageComponentPropValue, pageComponent = _a.pageComponent, index = _a.index, settingsStr = _a.settingsStr;
|
|
27949
|
-
var store = IkasStorefrontConfig.store, components = IkasStorefrontConfig.components;
|
|
27950
|
-
var settings = new IkasThemeSettings(JSON.parse(settingsStr));
|
|
27951
|
-
useEffect(function () {
|
|
27952
|
-
settings.colors.map(function (sc) {
|
|
27953
|
-
return document.documentElement.style.setProperty(sc.key, sc.color);
|
|
27954
|
-
});
|
|
27955
|
-
}, [settings]);
|
|
27956
|
-
var propValues = pageComponentPropValue.propValues;
|
|
27957
|
-
var hasNullValue = computed(function () {
|
|
27958
|
-
return Object.entries(propValues || {}).some(function (_a) {
|
|
27959
|
-
var _b;
|
|
27960
|
-
var propName = _a[0], propValue = _a[1];
|
|
27961
|
-
return (propValue === null || propValue === undefined) && ((_b = pageComponentPropValue.component.props.find(function (p) { return p.name === propName; })) === null || _b === void 0 ? void 0 : _b.isRequired);
|
|
27962
|
-
});
|
|
27963
|
-
});
|
|
27964
|
-
var Component = components[pageComponent.componentId];
|
|
27965
|
-
return (createElement("div", { id: index + "" }, hasNullValue.get() ? (createElement(ErrorComponent, null)) : (createElement(Component, __assign({ key: pageComponent.id }, propValues, { settings: settings, store: store })))));
|
|
27966
|
-
});
|
|
27967
|
-
|
|
27968
|
-
var IkasPage = observer(function (_a) {
|
|
27969
|
-
var _b, _c;
|
|
27970
|
-
var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
|
|
27971
|
-
var store = IkasStorefrontConfig.store;
|
|
27972
|
-
if (page) {
|
|
27973
|
-
store.currentPageType = page.type;
|
|
27974
|
-
}
|
|
27975
|
-
useEffect(function () {
|
|
27976
|
-
store.checkLocalization();
|
|
27977
|
-
//@ts-ignore
|
|
27978
|
-
store.cartStore.getCart();
|
|
27979
|
-
}, []);
|
|
27980
|
-
var renderComponent = function (pageComponent, index) {
|
|
27981
|
-
var pageComponentPropValue = propValues.find(function (pv) { return pv.pageComponent.id === pageComponent.id; });
|
|
27982
|
-
return (createElement(ThemeComponent, { key: pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, pageComponent: pageComponent, settingsStr: settingsStr }));
|
|
27983
|
-
};
|
|
27984
|
-
var headerComponent = (_b = propValues.find(function (pv) { return pv.component.isHeader; })) === null || _b === void 0 ? void 0 : _b.pageComponent;
|
|
27985
|
-
var footerComponent = (_c = propValues.find(function (pv) { return pv.component.isFooter; })) === null || _c === void 0 ? void 0 : _c.pageComponent;
|
|
27986
|
-
var others = propValues
|
|
27987
|
-
.filter(function (pv) { return !pv.component.isHeader && !pv.component.isFooter; })
|
|
27988
|
-
.map(function (pv) { return pv.pageComponent; }) || [];
|
|
27989
|
-
if (!page)
|
|
27990
|
-
return null;
|
|
27991
|
-
return (createElement(Fragment, null,
|
|
27992
|
-
createElement(IkasPageHead, { page: page, pageTitle: page.pageTitle, description: page.description, pageSpecificDataStr: pageSpecificDataStr, merchantSettings: merchantSettings, addOgpMetas: addOgpMetas }),
|
|
27993
|
-
createElement("div", { style: pageStyle },
|
|
27994
|
-
createElement("div", null,
|
|
27995
|
-
headerComponent && renderComponent(headerComponent, -1),
|
|
27996
|
-
others.map(renderComponent)),
|
|
27997
|
-
footerComponent && renderComponent(footerComponent, -1))));
|
|
27998
|
-
});
|
|
27999
|
-
var pageStyle = {
|
|
28000
|
-
position: "relative",
|
|
28001
|
-
minHeight: "100vh",
|
|
28002
|
-
width: "100vw",
|
|
28003
|
-
display: "flex",
|
|
28004
|
-
flexDirection: "column",
|
|
28005
|
-
justifyContent: "space-between",
|
|
28006
|
-
};
|
|
28007
|
-
|
|
28008
28220
|
var PageViewModel = /** @class */ (function () {
|
|
28009
28221
|
function PageViewModel(router) {
|
|
28010
28222
|
var _this = this;
|
|
@@ -28116,18 +28328,6 @@ var PageViewModel = /** @class */ (function () {
|
|
|
28116
28328
|
data: data,
|
|
28117
28329
|
}, "*");
|
|
28118
28330
|
};
|
|
28119
|
-
this.getComponentPropValues = function (pageComponent) {
|
|
28120
|
-
var _a;
|
|
28121
|
-
var json = {};
|
|
28122
|
-
var component = (_a = _this.theme) === null || _a === void 0 ? void 0 : _a.components.find(function (c) { return c.id === pageComponent.componentId; });
|
|
28123
|
-
component === null || component === void 0 ? void 0 : component.props.forEach(function (prop) {
|
|
28124
|
-
// TODO get prop values
|
|
28125
|
-
if (prop.type === IkasThemeComponentPropType.TEXT) {
|
|
28126
|
-
json[prop.name] = pageComponent.propValues[prop.name];
|
|
28127
|
-
}
|
|
28128
|
-
});
|
|
28129
|
-
return json;
|
|
28130
|
-
};
|
|
28131
28331
|
this.getPagePropValues = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
28132
28332
|
var pageDataProvider;
|
|
28133
28333
|
var _this = this;
|
|
@@ -28140,7 +28340,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
28140
28340
|
return [4 /*yield*/, pageDataProvider.getPageData()];
|
|
28141
28341
|
case 1:
|
|
28142
28342
|
_b.sent();
|
|
28143
|
-
pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router);
|
|
28343
|
+
pageDataProvider.pageComponentPropValues = IkasPageDataProvider.initPropValues(JSON.stringify(pageDataProvider.pageComponentPropValues), this.router, JSON.stringify(this.theme.settings));
|
|
28144
28344
|
runInAction(function () {
|
|
28145
28345
|
_this.pageDataProvider = pageDataProvider;
|
|
28146
28346
|
_this.isLoading = false;
|
|
@@ -28204,7 +28404,13 @@ var PageViewModel = /** @class */ (function () {
|
|
|
28204
28404
|
if (pageComponentPropValues) {
|
|
28205
28405
|
pageComponentPropValues.propValues[propName] = propValue;
|
|
28206
28406
|
if (prop.type === IkasThemeComponentPropType.CUSTOM) {
|
|
28207
|
-
IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValues, _this.router, true);
|
|
28407
|
+
IkasPageDataProvider.initCustomDataPropValue(prop, propValue, pageComponentPropValues, _this.router, _this.theme.settings, true);
|
|
28408
|
+
}
|
|
28409
|
+
else if (prop.type === IkasThemeComponentPropType.COMPONENT) {
|
|
28410
|
+
IkasPageDataProvider.initComponentPropValue(prop, propValue, pageComponentPropValues, _this.router, _this.theme.settings, true);
|
|
28411
|
+
}
|
|
28412
|
+
else if (prop.type === IkasThemeComponentPropType.COMPONENT_LIST) {
|
|
28413
|
+
IkasPageDataProvider.initComponentListPropValue(prop, propValue, pageComponentPropValues, _this.router, _this.theme.settings, true);
|
|
28208
28414
|
}
|
|
28209
28415
|
}
|
|
28210
28416
|
});
|
|
@@ -28273,7 +28479,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
28273
28479
|
runInAction(function () {
|
|
28274
28480
|
var customDataProps = pageComponentPropValues.component.props.filter(function (p) { return p.type === IkasThemeComponentPropType.CUSTOM; });
|
|
28275
28481
|
customDataProps.forEach(function (customDataProp) {
|
|
28276
|
-
IkasPageDataProvider.initCustomDataPropValue(customDataProp, pageComponentPropValues.propValues[customDataProp.name], pageComponentPropValues, _this.router, true);
|
|
28482
|
+
IkasPageDataProvider.initCustomDataPropValue(customDataProp, pageComponentPropValues.propValues[customDataProp.name], pageComponentPropValues, _this.router, _this.theme.settings, true);
|
|
28277
28483
|
});
|
|
28278
28484
|
_this.pageDataProvider.pageComponentPropValues.push(pageComponentPropValues);
|
|
28279
28485
|
_this.pageComponents.push(pageComponent);
|
|
@@ -28858,7 +29064,9 @@ var Page = function (_a) {
|
|
|
28858
29064
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
28859
29065
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
28860
29066
|
var router = useRouter();
|
|
28861
|
-
var propValues = useMemo(function () {
|
|
29067
|
+
var propValues = useMemo(function () {
|
|
29068
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29069
|
+
}, [propValuesStr]);
|
|
28862
29070
|
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
|
|
28863
29071
|
};
|
|
28864
29072
|
var getStaticProps = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -28881,14 +29089,16 @@ var Page$1 = function (_a) {
|
|
|
28881
29089
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
28882
29090
|
var router = useRouter();
|
|
28883
29091
|
var _b = useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
|
|
28884
|
-
var initialPropValues = useMemo(function () {
|
|
29092
|
+
var initialPropValues = useMemo(function () {
|
|
29093
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29094
|
+
}, [propValuesStr]);
|
|
28885
29095
|
var _c = useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
|
|
28886
29096
|
useEffect(function () {
|
|
28887
29097
|
setIsBrowser(typeof window !== "undefined");
|
|
28888
29098
|
handleAnalytics(page, pageSpecificDataStr);
|
|
28889
29099
|
}, []);
|
|
28890
29100
|
useEffect(function () {
|
|
28891
|
-
setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, isBrowser));
|
|
29101
|
+
setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr, isBrowser));
|
|
28892
29102
|
}, [isBrowser, propValuesStr]);
|
|
28893
29103
|
return (createElement(IkasPage, { page: page, propValues: propValues, pageSpecificDataStr: pageSpecificDataStr, settingsStr: settingsStr, merchantSettings: merchantSettings, addOgpMetas: true }));
|
|
28894
29104
|
};
|
|
@@ -28981,7 +29191,7 @@ function handleAnalytics(page, pageSpecificDataStr) {
|
|
|
28981
29191
|
else {
|
|
28982
29192
|
categoryPath = category.name;
|
|
28983
29193
|
}
|
|
28984
|
-
Analytics.viewCategory(categoryPath);
|
|
29194
|
+
Analytics.viewCategory(categoryPath, category);
|
|
28985
29195
|
}
|
|
28986
29196
|
}
|
|
28987
29197
|
catch (err) {
|
|
@@ -29001,7 +29211,9 @@ var Page$2 = function (_a) {
|
|
|
29001
29211
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
|
|
29002
29212
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29003
29213
|
var router = useRouter();
|
|
29004
|
-
var propValues = useMemo(function () {
|
|
29214
|
+
var propValues = useMemo(function () {
|
|
29215
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29216
|
+
}, [propValuesStr]);
|
|
29005
29217
|
return (createElement(IkasPage, { page: page, settingsStr: settingsStr, propValues: propValues }));
|
|
29006
29218
|
};
|
|
29007
29219
|
var getStaticPaths$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29150,7 +29362,9 @@ var Page$3 = function (_a) {
|
|
|
29150
29362
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
|
|
29151
29363
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29152
29364
|
var router = useRouter();
|
|
29153
|
-
var propValues = useMemo(function () {
|
|
29365
|
+
var propValues = useMemo(function () {
|
|
29366
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29367
|
+
}, [propValuesStr]);
|
|
29154
29368
|
return (createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29155
29369
|
};
|
|
29156
29370
|
var getStaticProps$3 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29172,7 +29386,9 @@ var Page$4 = function (_a) {
|
|
|
29172
29386
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
|
|
29173
29387
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29174
29388
|
var router = useRouter();
|
|
29175
|
-
var propValues = useMemo(function () {
|
|
29389
|
+
var propValues = useMemo(function () {
|
|
29390
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29391
|
+
}, [propValuesStr]);
|
|
29176
29392
|
return (createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29177
29393
|
};
|
|
29178
29394
|
var getStaticProps$4 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29194,7 +29410,9 @@ var Page$5 = function (_a) {
|
|
|
29194
29410
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
|
|
29195
29411
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29196
29412
|
var router = useRouter();
|
|
29197
|
-
var propValues = useMemo(function () {
|
|
29413
|
+
var propValues = useMemo(function () {
|
|
29414
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29415
|
+
}, [propValuesStr]);
|
|
29198
29416
|
return (createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29199
29417
|
};
|
|
29200
29418
|
var getStaticProps$5 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29216,7 +29434,9 @@ var Page$6 = function (_a) {
|
|
|
29216
29434
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
|
|
29217
29435
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29218
29436
|
var router = useRouter();
|
|
29219
|
-
var propValues = useMemo(function () {
|
|
29437
|
+
var propValues = useMemo(function () {
|
|
29438
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29439
|
+
}, [propValuesStr]);
|
|
29220
29440
|
return (createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29221
29441
|
};
|
|
29222
29442
|
var getServerSideProps$1 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29238,7 +29458,9 @@ var Page$7 = function (_a) {
|
|
|
29238
29458
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
29239
29459
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29240
29460
|
var router = useRouter();
|
|
29241
|
-
var propValues = useMemo(function () {
|
|
29461
|
+
var propValues = useMemo(function () {
|
|
29462
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29463
|
+
}, [propValuesStr]);
|
|
29242
29464
|
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29243
29465
|
};
|
|
29244
29466
|
var getStaticProps$6 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29260,7 +29482,9 @@ var Page$8 = function (_a) {
|
|
|
29260
29482
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
29261
29483
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29262
29484
|
var router = useRouter();
|
|
29263
|
-
var propValues = useMemo(function () {
|
|
29485
|
+
var propValues = useMemo(function () {
|
|
29486
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29487
|
+
}, [propValuesStr]);
|
|
29264
29488
|
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29265
29489
|
};
|
|
29266
29490
|
var getStaticProps$7 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29282,7 +29506,9 @@ var Page$9 = function (_a) {
|
|
|
29282
29506
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
29283
29507
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29284
29508
|
var router = useRouter();
|
|
29285
|
-
var propValues = useMemo(function () {
|
|
29509
|
+
var propValues = useMemo(function () {
|
|
29510
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29511
|
+
}, [propValuesStr]);
|
|
29286
29512
|
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29287
29513
|
};
|
|
29288
29514
|
var getStaticProps$8 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29304,7 +29530,9 @@ var Page$a = function (_a) {
|
|
|
29304
29530
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
29305
29531
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29306
29532
|
var router = useRouter();
|
|
29307
|
-
var propValues = useMemo(function () {
|
|
29533
|
+
var propValues = useMemo(function () {
|
|
29534
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29535
|
+
}, [propValuesStr]);
|
|
29308
29536
|
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29309
29537
|
};
|
|
29310
29538
|
var getStaticProps$9 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29326,7 +29554,9 @@ var Page$b = function (_a) {
|
|
|
29326
29554
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
|
|
29327
29555
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29328
29556
|
var router = useRouter();
|
|
29329
|
-
var propValues = useMemo(function () {
|
|
29557
|
+
var propValues = useMemo(function () {
|
|
29558
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29559
|
+
}, [propValuesStr]);
|
|
29330
29560
|
var store = IkasStorefrontConfig.store;
|
|
29331
29561
|
useEffect(function () {
|
|
29332
29562
|
Analytics.viewCart(store.cartStore.cart);
|
|
@@ -29363,7 +29593,9 @@ var Page$d = function (_a) {
|
|
|
29363
29593
|
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, configJson = _a.configJson;
|
|
29364
29594
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29365
29595
|
var router = useRouter();
|
|
29366
|
-
var propValues = useMemo(function () {
|
|
29596
|
+
var propValues = useMemo(function () {
|
|
29597
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29598
|
+
}, [propValuesStr]);
|
|
29367
29599
|
return (createElement(IkasPage, { settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29368
29600
|
};
|
|
29369
29601
|
var getStaticProps$b = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29386,13 +29618,15 @@ var Page$e = function (_a) {
|
|
|
29386
29618
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29387
29619
|
var router = useRouter();
|
|
29388
29620
|
var _b = useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
|
|
29389
|
-
var initialPropValues = useMemo(function () {
|
|
29621
|
+
var initialPropValues = useMemo(function () {
|
|
29622
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29623
|
+
}, [propValuesStr]);
|
|
29390
29624
|
var _c = useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
|
|
29391
29625
|
useEffect(function () {
|
|
29392
29626
|
setIsBrowser(typeof window !== "undefined");
|
|
29393
29627
|
}, []);
|
|
29394
29628
|
useEffect(function () {
|
|
29395
|
-
setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, isBrowser));
|
|
29629
|
+
setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr, isBrowser));
|
|
29396
29630
|
}, [isBrowser, propValuesStr]);
|
|
29397
29631
|
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
|
|
29398
29632
|
};
|
|
@@ -29417,7 +29651,9 @@ var Page$f = function (_a) {
|
|
|
29417
29651
|
return createElement(Error$1, { statusCode: 404 });
|
|
29418
29652
|
IkasStorefrontConfig.initWithJson(configJson);
|
|
29419
29653
|
var router = useRouter();
|
|
29420
|
-
var propValues = useMemo(function () {
|
|
29654
|
+
var propValues = useMemo(function () {
|
|
29655
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
29656
|
+
}, [propValuesStr]);
|
|
29421
29657
|
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
|
|
29422
29658
|
};
|
|
29423
29659
|
var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -29475,6 +29711,7 @@ var IkasBaseStore = /** @class */ (function () {
|
|
|
29475
29711
|
this.localeOptions = [];
|
|
29476
29712
|
this.showLocaleOptions = false;
|
|
29477
29713
|
this.localeChecked = false;
|
|
29714
|
+
this.settingsSet = false;
|
|
29478
29715
|
this.customerStore = new IkasCustomerStore(this);
|
|
29479
29716
|
this.cartStore = new IkasCartStore(this);
|
|
29480
29717
|
makeObservable(this, {
|
|
@@ -29563,7 +29800,15 @@ var IkasBaseStore = /** @class */ (function () {
|
|
|
29563
29800
|
(localeOption.routing.path ? "/" + localeOption.routing.path : ""));
|
|
29564
29801
|
}
|
|
29565
29802
|
};
|
|
29803
|
+
IkasBaseStore.prototype.setSettings = function (settingsStr) {
|
|
29804
|
+
if (this.settingsSet)
|
|
29805
|
+
return;
|
|
29806
|
+
var settings = new IkasThemeSettings(JSON.parse(settingsStr));
|
|
29807
|
+
settings.colors.map(function (sc) {
|
|
29808
|
+
return document.documentElement.style.setProperty(sc.key, sc.color);
|
|
29809
|
+
});
|
|
29810
|
+
};
|
|
29566
29811
|
return IkasBaseStore;
|
|
29567
29812
|
}());
|
|
29568
29813
|
|
|
29569
|
-
export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, 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, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, 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, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
|
|
29814
|
+
export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, 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, 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, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
|