@ikas/storefront 0.0.158-alpha.21 → 0.0.158-alpha.23
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/components/checkout/components/form-item/model.d.ts +7 -0
- package/build/index.es.js +125 -45
- package/build/index.js +125 -45
- package/build/models/theme/component/prop/index.d.ts +2 -1
- package/build/models/theme/custom-data/index.d.ts +8 -0
- package/build/utils/providers/prop-value/custom.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export default class FormItemViewModel implements Props {
|
|
2
2
|
type: FormItemType;
|
|
3
|
+
inputType?: FormItemInputType;
|
|
3
4
|
options?: FormItemSelectOption[];
|
|
4
5
|
label: string;
|
|
5
6
|
value?: string;
|
|
@@ -16,6 +17,7 @@ export default class FormItemViewModel implements Props {
|
|
|
16
17
|
}
|
|
17
18
|
export interface Props {
|
|
18
19
|
type: FormItemType;
|
|
20
|
+
inputType?: FormItemInputType;
|
|
19
21
|
options?: FormItemSelectOption[];
|
|
20
22
|
label: string;
|
|
21
23
|
value?: string;
|
|
@@ -34,3 +36,8 @@ export declare type FormItemSelectOption = {
|
|
|
34
36
|
value: string;
|
|
35
37
|
label: string;
|
|
36
38
|
};
|
|
39
|
+
export declare enum FormItemInputType {
|
|
40
|
+
NUMERIC = "numeric",
|
|
41
|
+
TEL = "tel",
|
|
42
|
+
EMAIL = "email"
|
|
43
|
+
}
|
package/build/index.es.js
CHANGED
|
@@ -19019,6 +19019,7 @@ var IkasThemeComponentPropType;
|
|
|
19019
19019
|
IkasThemeComponentPropType["OBJECT"] = "OBJECT";
|
|
19020
19020
|
IkasThemeComponentPropType["STATIC_LIST"] = "STATIC_LIST";
|
|
19021
19021
|
IkasThemeComponentPropType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
19022
|
+
IkasThemeComponentPropType["ENUM"] = "ENUM";
|
|
19022
19023
|
})(IkasThemeComponentPropType || (IkasThemeComponentPropType = {}));
|
|
19023
19024
|
|
|
19024
19025
|
var IkasThemeComponent = /** @class */ (function () {
|
|
@@ -19040,6 +19041,8 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
19040
19041
|
function IkasThemeCustomData(data) {
|
|
19041
19042
|
var _this = this;
|
|
19042
19043
|
if (data === void 0) { data = {}; }
|
|
19044
|
+
var _a;
|
|
19045
|
+
this.customDataId = null;
|
|
19043
19046
|
this.id = data.id || "";
|
|
19044
19047
|
this.name = data.name || null;
|
|
19045
19048
|
this.type = data.type || IkasThemeComponentPropType.TEXT;
|
|
@@ -19048,6 +19051,9 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
19048
19051
|
this.parent = data.parent || null;
|
|
19049
19052
|
this.itemCount = data.itemCount || null;
|
|
19050
19053
|
this.attributeTypes = data.attributeTypes || null;
|
|
19054
|
+
this.enumOptions =
|
|
19055
|
+
((_a = data.enumOptions) === null || _a === void 0 ? void 0 : _a.map(function (eo) { return new IkasThemeEnumOption(eo); })) || null;
|
|
19056
|
+
this.customDataId = data.customDataId || null;
|
|
19051
19057
|
this.isRoot = data.isRoot || false;
|
|
19052
19058
|
this.nestedData = data.nestedData
|
|
19053
19059
|
? data.nestedData.map(function (nd) {
|
|
@@ -19064,6 +19070,16 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
19064
19070
|
return obj;
|
|
19065
19071
|
};
|
|
19066
19072
|
return IkasThemeCustomData;
|
|
19073
|
+
}());
|
|
19074
|
+
var IkasThemeEnumOption = /** @class */ (function () {
|
|
19075
|
+
function IkasThemeEnumOption(data) {
|
|
19076
|
+
if (data === void 0) { data = {}; }
|
|
19077
|
+
this.id = data.id || "";
|
|
19078
|
+
this.displayName = data.displayName || "";
|
|
19079
|
+
this.value = data.value || "";
|
|
19080
|
+
makeAutoObservable(this);
|
|
19081
|
+
}
|
|
19082
|
+
return IkasThemeEnumOption;
|
|
19067
19083
|
}());
|
|
19068
19084
|
|
|
19069
19085
|
var IkasThemePageComponent = /** @class */ (function () {
|
|
@@ -20313,6 +20329,8 @@ var IkasProductDetail = /** @class */ (function () {
|
|
|
20313
20329
|
var newUrl = "/" + metaData.slug + "-" + this.selectedVariantValues
|
|
20314
20330
|
.map(function (vv) { return vv.slug; })
|
|
20315
20331
|
.join("-");
|
|
20332
|
+
if (newUrl === window.location.pathname)
|
|
20333
|
+
return;
|
|
20316
20334
|
var isShallow = process.env.NODE_ENV !== "production";
|
|
20317
20335
|
(_a = this.router) === null || _a === void 0 ? void 0 : _a.replace(newUrl, undefined, {
|
|
20318
20336
|
shallow: isShallow,
|
|
@@ -24940,7 +24958,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24940
24958
|
return [2 /*return*/];
|
|
24941
24959
|
_b.label = 1;
|
|
24942
24960
|
case 1:
|
|
24943
|
-
_b.trys.push([1,
|
|
24961
|
+
_b.trys.push([1, 48, , 49]);
|
|
24944
24962
|
_a = this.customData.type;
|
|
24945
24963
|
switch (_a) {
|
|
24946
24964
|
case IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
|
|
@@ -24962,98 +24980,108 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24962
24980
|
case IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 32];
|
|
24963
24981
|
case IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 34];
|
|
24964
24982
|
case IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 34];
|
|
24965
|
-
case IkasThemeComponentPropType.
|
|
24966
|
-
case IkasThemeComponentPropType.
|
|
24967
|
-
case IkasThemeComponentPropType.
|
|
24968
|
-
case IkasThemeComponentPropType.
|
|
24983
|
+
case IkasThemeComponentPropType.ENUM: return [3 /*break*/, 36];
|
|
24984
|
+
case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 38];
|
|
24985
|
+
case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 40];
|
|
24986
|
+
case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 40];
|
|
24987
|
+
case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 42];
|
|
24988
|
+
case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 44];
|
|
24969
24989
|
}
|
|
24970
|
-
return [3 /*break*/,
|
|
24990
|
+
return [3 /*break*/, 46];
|
|
24971
24991
|
case 2: return [4 /*yield*/, this.getTextValue()];
|
|
24972
24992
|
case 3:
|
|
24973
24993
|
customDataValue = _b.sent();
|
|
24974
|
-
return [3 /*break*/,
|
|
24994
|
+
return [3 /*break*/, 47];
|
|
24975
24995
|
case 4: return [4 /*yield*/, this.getRichTextPropValue()];
|
|
24976
24996
|
case 5:
|
|
24977
24997
|
customDataValue = _b.sent();
|
|
24978
|
-
return [3 /*break*/,
|
|
24998
|
+
return [3 /*break*/, 47];
|
|
24979
24999
|
case 6: return [4 /*yield*/, this.getBooleanValue()];
|
|
24980
25000
|
case 7:
|
|
24981
25001
|
customDataValue = _b.sent();
|
|
24982
|
-
return [3 /*break*/,
|
|
25002
|
+
return [3 /*break*/, 47];
|
|
24983
25003
|
case 8: return [4 /*yield*/, this.getBrandListPropValue()];
|
|
24984
25004
|
case 9:
|
|
24985
25005
|
customDataValue = _b.sent();
|
|
24986
|
-
return [3 /*break*/,
|
|
25006
|
+
return [3 /*break*/, 47];
|
|
24987
25007
|
case 10: return [4 /*yield*/, this.getBrandPropValue()];
|
|
24988
25008
|
case 11:
|
|
24989
25009
|
customDataValue = _b.sent();
|
|
24990
|
-
return [3 /*break*/,
|
|
25010
|
+
return [3 /*break*/, 47];
|
|
24991
25011
|
case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
|
|
24992
25012
|
case 13:
|
|
24993
25013
|
customDataValue = _b.sent();
|
|
24994
|
-
return [3 /*break*/,
|
|
25014
|
+
return [3 /*break*/, 47];
|
|
24995
25015
|
case 14: return [4 /*yield*/, this.getCategoryPropValue()];
|
|
24996
25016
|
case 15:
|
|
24997
25017
|
customDataValue = _b.sent();
|
|
24998
|
-
return [3 /*break*/,
|
|
25018
|
+
return [3 /*break*/, 47];
|
|
24999
25019
|
case 16: return [4 /*yield*/, this.getColorPropValue()];
|
|
25000
25020
|
case 17:
|
|
25001
25021
|
customDataValue = _b.sent();
|
|
25002
|
-
return [3 /*break*/,
|
|
25022
|
+
return [3 /*break*/, 47];
|
|
25003
25023
|
case 18: return [4 /*yield*/, this.getImageListPropValue()];
|
|
25004
25024
|
case 19:
|
|
25005
25025
|
customDataValue = _b.sent();
|
|
25006
|
-
return [3 /*break*/,
|
|
25026
|
+
return [3 /*break*/, 47];
|
|
25007
25027
|
case 20: return [4 /*yield*/, this.getImagePropValue()];
|
|
25008
25028
|
case 21:
|
|
25009
25029
|
customDataValue = _b.sent();
|
|
25010
|
-
return [3 /*break*/,
|
|
25030
|
+
return [3 /*break*/, 47];
|
|
25011
25031
|
case 22: return [4 /*yield*/, this.getLinkPropValue()];
|
|
25012
25032
|
case 23:
|
|
25013
25033
|
customDataValue = _b.sent();
|
|
25014
|
-
return [3 /*break*/,
|
|
25034
|
+
return [3 /*break*/, 47];
|
|
25015
25035
|
case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
|
|
25016
25036
|
case 25:
|
|
25017
25037
|
customDataValue = _b.sent();
|
|
25018
|
-
return [3 /*break*/,
|
|
25038
|
+
return [3 /*break*/, 47];
|
|
25019
25039
|
case 26: return [4 /*yield*/, this.getProductListPropValue()];
|
|
25020
25040
|
case 27:
|
|
25021
25041
|
customDataValue = _b.sent();
|
|
25022
|
-
return [3 /*break*/,
|
|
25042
|
+
return [3 /*break*/, 47];
|
|
25023
25043
|
case 28: return [4 /*yield*/, this.getProductAttributePropValue()];
|
|
25024
25044
|
case 29:
|
|
25025
25045
|
customDataValue = _b.sent();
|
|
25026
|
-
return [3 /*break*/,
|
|
25046
|
+
return [3 /*break*/, 47];
|
|
25027
25047
|
case 30: return [4 /*yield*/, this.getProductAttributeListPropValue()];
|
|
25028
25048
|
case 31:
|
|
25029
25049
|
customDataValue = _b.sent();
|
|
25030
|
-
return [3 /*break*/,
|
|
25050
|
+
return [3 /*break*/, 47];
|
|
25031
25051
|
case 32: return [4 /*yield*/, this.getObjectValue()];
|
|
25032
25052
|
case 33:
|
|
25033
25053
|
customDataValue = _b.sent();
|
|
25034
|
-
return [3 /*break*/,
|
|
25054
|
+
return [3 /*break*/, 47];
|
|
25035
25055
|
case 34: return [4 /*yield*/, this.getArrayValue()];
|
|
25036
25056
|
case 35:
|
|
25037
25057
|
customDataValue = _b.sent();
|
|
25038
|
-
return [3 /*break*/,
|
|
25039
|
-
case 36: return [4 /*yield*/, this.
|
|
25058
|
+
return [3 /*break*/, 47];
|
|
25059
|
+
case 36: return [4 /*yield*/, this.getEnumValue()];
|
|
25040
25060
|
case 37:
|
|
25041
25061
|
customDataValue = _b.sent();
|
|
25042
|
-
return [3 /*break*/,
|
|
25043
|
-
case 38: return [4 /*yield*/, this.
|
|
25062
|
+
return [3 /*break*/, 47];
|
|
25063
|
+
case 38: return [4 /*yield*/, this.getCustomDataValue()];
|
|
25044
25064
|
case 39:
|
|
25045
25065
|
customDataValue = _b.sent();
|
|
25046
|
-
return [3 /*break*/,
|
|
25047
|
-
case 40: return [4 /*yield*/, this.
|
|
25066
|
+
return [3 /*break*/, 47];
|
|
25067
|
+
case 40: return [4 /*yield*/, this.getComponentListValue()];
|
|
25048
25068
|
case 41:
|
|
25049
25069
|
customDataValue = _b.sent();
|
|
25050
|
-
return [3 /*break*/,
|
|
25051
|
-
case 42: return [
|
|
25052
|
-
case 43:
|
|
25053
|
-
|
|
25070
|
+
return [3 /*break*/, 47];
|
|
25071
|
+
case 42: return [4 /*yield*/, this.getBlogValue()];
|
|
25072
|
+
case 43:
|
|
25073
|
+
customDataValue = _b.sent();
|
|
25074
|
+
return [3 /*break*/, 47];
|
|
25075
|
+
case 44: return [4 /*yield*/, this.getBlogListValue()];
|
|
25076
|
+
case 45:
|
|
25077
|
+
customDataValue = _b.sent();
|
|
25078
|
+
return [3 /*break*/, 47];
|
|
25079
|
+
case 46: return [3 /*break*/, 47];
|
|
25080
|
+
case 47: return [3 /*break*/, 49];
|
|
25081
|
+
case 48:
|
|
25054
25082
|
_b.sent();
|
|
25055
25083
|
return [2 /*return*/];
|
|
25056
|
-
case
|
|
25084
|
+
case 49:
|
|
25057
25085
|
if (this.customData.isRequired &&
|
|
25058
25086
|
((customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === undefined || (customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === null))
|
|
25059
25087
|
return [2 /*return*/];
|
|
@@ -25410,6 +25438,36 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
25410
25438
|
});
|
|
25411
25439
|
});
|
|
25412
25440
|
};
|
|
25441
|
+
IkasCustomPropValueProvider.prototype.getEnumValue = function () {
|
|
25442
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25443
|
+
return __generator(this, function (_a) {
|
|
25444
|
+
return [2 /*return*/, {
|
|
25445
|
+
value: this.value,
|
|
25446
|
+
customData: this.customData,
|
|
25447
|
+
}];
|
|
25448
|
+
});
|
|
25449
|
+
});
|
|
25450
|
+
};
|
|
25451
|
+
IkasCustomPropValueProvider.prototype.getCustomDataValue = function () {
|
|
25452
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25453
|
+
var selectedCustomData, nestedProvider;
|
|
25454
|
+
var _this = this;
|
|
25455
|
+
return __generator(this, function (_a) {
|
|
25456
|
+
switch (_a.label) {
|
|
25457
|
+
case 0:
|
|
25458
|
+
selectedCustomData = this.theme.customData.find(function (c) { return c.id === _this.customData.customDataId; });
|
|
25459
|
+
if (!selectedCustomData)
|
|
25460
|
+
return [2 /*return*/, {
|
|
25461
|
+
value: null,
|
|
25462
|
+
customData: this.customData,
|
|
25463
|
+
}];
|
|
25464
|
+
nestedProvider = new IkasCustomPropValueProvider(this.value, selectedCustomData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
|
|
25465
|
+
return [4 /*yield*/, nestedProvider.getValue()];
|
|
25466
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
25467
|
+
}
|
|
25468
|
+
});
|
|
25469
|
+
});
|
|
25470
|
+
};
|
|
25413
25471
|
IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
|
|
25414
25472
|
return __awaiter(this, void 0, void 0, function () {
|
|
25415
25473
|
var pageComponents;
|
|
@@ -26495,7 +26553,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26495
26553
|
for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
|
|
26496
26554
|
var nestedCustomData = _a[_i];
|
|
26497
26555
|
var value = propValue[nestedCustomData.key];
|
|
26498
|
-
|
|
26556
|
+
var selectedCustomData = void 0;
|
|
26557
|
+
if (nestedCustomData.customDataId) {
|
|
26558
|
+
selectedCustomData = value.customData;
|
|
26559
|
+
}
|
|
26560
|
+
objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, selectedCustomData || nestedCustomData, router, settings, isBrowser);
|
|
26499
26561
|
}
|
|
26500
26562
|
return objectValue;
|
|
26501
26563
|
case IkasThemeComponentPropType.DYNAMIC_LIST:
|
|
@@ -26506,7 +26568,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26506
26568
|
var listValue_1 = [];
|
|
26507
26569
|
var nestedCustomData_1 = customData.nestedData[0];
|
|
26508
26570
|
propValue.forEach(function (itemValue) {
|
|
26509
|
-
|
|
26571
|
+
var selectedCustomData;
|
|
26572
|
+
if (nestedCustomData_1.customDataId) {
|
|
26573
|
+
selectedCustomData = itemValue.customData;
|
|
26574
|
+
}
|
|
26575
|
+
listValue_1.push(_this._initCustomDataPropValue(itemValue, selectedCustomData || nestedCustomData_1, router, settings, isBrowser));
|
|
26510
26576
|
});
|
|
26511
26577
|
return listValue_1;
|
|
26512
26578
|
}
|
|
@@ -28957,6 +29023,7 @@ var FormItemViewModel = /** @class */ (function () {
|
|
|
28957
29023
|
_this.onChange(e.target.value);
|
|
28958
29024
|
};
|
|
28959
29025
|
this.type = props.type;
|
|
29026
|
+
this.inputType = props.inputType;
|
|
28960
29027
|
this.options = props.options;
|
|
28961
29028
|
this.label = props.label;
|
|
28962
29029
|
this.value = props.value;
|
|
@@ -29007,7 +29074,13 @@ var FormItemType;
|
|
|
29007
29074
|
FormItemType[FormItemType["TEXT_AREA"] = 1] = "TEXT_AREA";
|
|
29008
29075
|
FormItemType[FormItemType["SELECT"] = 2] = "SELECT";
|
|
29009
29076
|
FormItemType[FormItemType["TEL"] = 3] = "TEL";
|
|
29010
|
-
})(FormItemType || (FormItemType = {}));
|
|
29077
|
+
})(FormItemType || (FormItemType = {}));
|
|
29078
|
+
var FormItemInputType;
|
|
29079
|
+
(function (FormItemInputType) {
|
|
29080
|
+
FormItemInputType["NUMERIC"] = "numeric";
|
|
29081
|
+
FormItemInputType["TEL"] = "tel";
|
|
29082
|
+
FormItemInputType["EMAIL"] = "email";
|
|
29083
|
+
})(FormItemInputType || (FormItemInputType = {}));
|
|
29011
29084
|
|
|
29012
29085
|
var SVGCaretDown = function (_a) {
|
|
29013
29086
|
var className = _a.className;
|
|
@@ -29023,6 +29096,11 @@ var FormItem = observer(function (props) {
|
|
|
29023
29096
|
vm.type = props.type;
|
|
29024
29097
|
});
|
|
29025
29098
|
}, [props.type]);
|
|
29099
|
+
useEffect(function () {
|
|
29100
|
+
runInAction(function () {
|
|
29101
|
+
vm.inputType = props.inputType;
|
|
29102
|
+
});
|
|
29103
|
+
}, [props.inputType]);
|
|
29026
29104
|
useEffect(function () {
|
|
29027
29105
|
runInAction(function () {
|
|
29028
29106
|
vm.value = props.value;
|
|
@@ -29065,7 +29143,7 @@ var FormItem = observer(function (props) {
|
|
|
29065
29143
|
});
|
|
29066
29144
|
var Input = observer(function (_a) {
|
|
29067
29145
|
var vm = _a.vm, autocomplete = _a.autocomplete, type = _a.type;
|
|
29068
|
-
return (createElement("input", { type: type || "text", autoComplete: autocomplete, className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
|
|
29146
|
+
return (createElement("input", { type: type || "text", autoComplete: autocomplete, inputMode: vm.inputType || "text", className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
|
|
29069
29147
|
});
|
|
29070
29148
|
var TextArea = observer(function (_a) {
|
|
29071
29149
|
var vm = _a.vm;
|
|
@@ -29504,11 +29582,11 @@ var AddressForm$1 = observer(function (_a) {
|
|
|
29504
29582
|
createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
|
|
29505
29583
|
createElement(FormItem, { type: FormItemType.SELECT, label: "\u00DClke", autocomplete: "country-name", value: ((_b = vm.country) === null || _b === void 0 ? void 0 : _b.id) || "", onChange: vm.onCountryChange, options: vm.countryOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.country), errorText: "Ülke seçin" }),
|
|
29506
29584
|
vm.hasState && (createElement(FormItem, { type: FormItemType.SELECT, label: "Eyalet", value: ((_c = vm.state) === null || _c === void 0 ? void 0 : _c.id) || "", onChange: vm.onStateChange, options: vm.stateOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.state), errorText: "Eyalet seçin" })),
|
|
29507
|
-
createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
|
|
29508
|
-
vm.districtOptions.length ? (createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (createElement(FormItem, { type: FormItemType.TEXT, label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
|
|
29585
|
+
createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", autocomplete: "off", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
|
|
29586
|
+
vm.districtOptions.length ? (createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", autocomplete: "off", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-level3", label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
|
|
29509
29587
|
!!vm.address.checkoutSettings &&
|
|
29510
29588
|
vm.address.checkoutSettings.phoneRequirement !==
|
|
29511
|
-
IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
|
|
29589
|
+
IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.TEL, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
|
|
29512
29590
|
!!vm.address.checkoutSettings &&
|
|
29513
29591
|
vm.address.checkoutSettings.identityNumberRequirement !==
|
|
29514
29592
|
IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" }))),
|
|
@@ -29598,7 +29676,7 @@ var CheckoutStepInfo = observer(function (_a) {
|
|
|
29598
29676
|
createElement("span", null, "Zaten hesab\u0131n\u0131z var m\u0131?"),
|
|
29599
29677
|
createElement(Link, { href: "/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl), passHref: true },
|
|
29600
29678
|
createElement("a", { className: styles$7.LoginBtn }, "Oturum A\u00E7"))))),
|
|
29601
|
-
!vm.checkout.hasCustomer ? (createElement(FormItem, { type: FormItemType.TEXT, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (createElement("div", { className: styles$7.CustomerInfo },
|
|
29679
|
+
!vm.checkout.hasCustomer ? (createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.EMAIL, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (createElement("div", { className: styles$7.CustomerInfo },
|
|
29602
29680
|
createElement("div", null,
|
|
29603
29681
|
createElement("div", { className: styles$7.CustonerText }, vm.checkout.customerText),
|
|
29604
29682
|
createElement("div", { className: styles$7.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
|
|
@@ -29731,12 +29809,12 @@ var CreditCardForm = observer(function (_a) {
|
|
|
29731
29809
|
});
|
|
29732
29810
|
return (createElement("div", null,
|
|
29733
29811
|
createElement("div", { className: styles$3.RowPB },
|
|
29734
|
-
createElement(FormItem, { autocomplete: "cc-number", type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
|
|
29812
|
+
createElement(FormItem, { autocomplete: "cc-number", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
|
|
29735
29813
|
createElement("div", { className: styles$3.RowPB },
|
|
29736
29814
|
createElement(FormItem, { autocomplete: "cc-name", type: FormItemType.TEXT, label: "Karttaki ad", value: cardData.cardHolderName, onChange: vm.onCardHolderNameChange, errorText: "Ad soyad girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardHolderName })),
|
|
29737
29815
|
createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
|
|
29738
|
-
createElement(FormItem, { autocomplete: "cc-exp", type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
|
|
29739
|
-
createElement(FormItem, { autocomplete: "cc-csc", type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
|
|
29816
|
+
createElement(FormItem, { autocomplete: "cc-exp", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
|
|
29817
|
+
createElement(FormItem, { autocomplete: "cc-csc", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
|
|
29740
29818
|
createElement("div", { style: { marginTop: "0.4em" } },
|
|
29741
29819
|
createElement(Checkbox, { value: cardData.threeDSecure, onChange: onThreeDSecureChange, label: "3D Secure kullan" }))));
|
|
29742
29820
|
});
|
|
@@ -29984,7 +30062,9 @@ var CartSummary = observer(function (_a) {
|
|
|
29984
30062
|
createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
|
|
29985
30063
|
" ",
|
|
29986
30064
|
createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); }),
|
|
29987
|
-
(((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
|
|
30065
|
+
(((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
|
|
30066
|
+
.filter(function (adjustment) { return adjustment.amount !== 0; })
|
|
30067
|
+
.map(function (adjustment, index) { return (createElement("div", { className: styles$g.InfoRow, key: index },
|
|
29988
30068
|
createElement("div", { className: styles$g.Label }, adjustment.name),
|
|
29989
30069
|
createElement("div", { className: styles$g.Value },
|
|
29990
30070
|
createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
|
package/build/index.js
CHANGED
|
@@ -19009,6 +19009,7 @@ var IkasThemeComponentProp = /** @class */ (function () {
|
|
|
19009
19009
|
IkasThemeComponentPropType["OBJECT"] = "OBJECT";
|
|
19010
19010
|
IkasThemeComponentPropType["STATIC_LIST"] = "STATIC_LIST";
|
|
19011
19011
|
IkasThemeComponentPropType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
|
|
19012
|
+
IkasThemeComponentPropType["ENUM"] = "ENUM";
|
|
19012
19013
|
})(exports.IkasThemeComponentPropType || (exports.IkasThemeComponentPropType = {}));
|
|
19013
19014
|
|
|
19014
19015
|
var IkasThemeComponent = /** @class */ (function () {
|
|
@@ -19030,6 +19031,8 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
19030
19031
|
function IkasThemeCustomData(data) {
|
|
19031
19032
|
var _this = this;
|
|
19032
19033
|
if (data === void 0) { data = {}; }
|
|
19034
|
+
var _a;
|
|
19035
|
+
this.customDataId = null;
|
|
19033
19036
|
this.id = data.id || "";
|
|
19034
19037
|
this.name = data.name || null;
|
|
19035
19038
|
this.type = data.type || exports.IkasThemeComponentPropType.TEXT;
|
|
@@ -19038,6 +19041,9 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
19038
19041
|
this.parent = data.parent || null;
|
|
19039
19042
|
this.itemCount = data.itemCount || null;
|
|
19040
19043
|
this.attributeTypes = data.attributeTypes || null;
|
|
19044
|
+
this.enumOptions =
|
|
19045
|
+
((_a = data.enumOptions) === null || _a === void 0 ? void 0 : _a.map(function (eo) { return new IkasThemeEnumOption(eo); })) || null;
|
|
19046
|
+
this.customDataId = data.customDataId || null;
|
|
19041
19047
|
this.isRoot = data.isRoot || false;
|
|
19042
19048
|
this.nestedData = data.nestedData
|
|
19043
19049
|
? data.nestedData.map(function (nd) {
|
|
@@ -19054,6 +19060,16 @@ var IkasThemeCustomData = /** @class */ (function () {
|
|
|
19054
19060
|
return obj;
|
|
19055
19061
|
};
|
|
19056
19062
|
return IkasThemeCustomData;
|
|
19063
|
+
}());
|
|
19064
|
+
var IkasThemeEnumOption = /** @class */ (function () {
|
|
19065
|
+
function IkasThemeEnumOption(data) {
|
|
19066
|
+
if (data === void 0) { data = {}; }
|
|
19067
|
+
this.id = data.id || "";
|
|
19068
|
+
this.displayName = data.displayName || "";
|
|
19069
|
+
this.value = data.value || "";
|
|
19070
|
+
mobx.makeAutoObservable(this);
|
|
19071
|
+
}
|
|
19072
|
+
return IkasThemeEnumOption;
|
|
19057
19073
|
}());
|
|
19058
19074
|
|
|
19059
19075
|
var IkasThemePageComponent = /** @class */ (function () {
|
|
@@ -20296,6 +20312,8 @@ var IkasProductDetail = /** @class */ (function () {
|
|
|
20296
20312
|
var newUrl = "/" + metaData.slug + "-" + this.selectedVariantValues
|
|
20297
20313
|
.map(function (vv) { return vv.slug; })
|
|
20298
20314
|
.join("-");
|
|
20315
|
+
if (newUrl === window.location.pathname)
|
|
20316
|
+
return;
|
|
20299
20317
|
var isShallow = process.env.NODE_ENV !== "production";
|
|
20300
20318
|
(_a = this.router) === null || _a === void 0 ? void 0 : _a.replace(newUrl, undefined, {
|
|
20301
20319
|
shallow: isShallow,
|
|
@@ -24920,7 +24938,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24920
24938
|
return [2 /*return*/];
|
|
24921
24939
|
_b.label = 1;
|
|
24922
24940
|
case 1:
|
|
24923
|
-
_b.trys.push([1,
|
|
24941
|
+
_b.trys.push([1, 48, , 49]);
|
|
24924
24942
|
_a = this.customData.type;
|
|
24925
24943
|
switch (_a) {
|
|
24926
24944
|
case exports.IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
|
|
@@ -24942,98 +24960,108 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24942
24960
|
case exports.IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 32];
|
|
24943
24961
|
case exports.IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 34];
|
|
24944
24962
|
case exports.IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 34];
|
|
24945
|
-
case exports.IkasThemeComponentPropType.
|
|
24946
|
-
case exports.IkasThemeComponentPropType.
|
|
24947
|
-
case exports.IkasThemeComponentPropType.
|
|
24948
|
-
case exports.IkasThemeComponentPropType.
|
|
24963
|
+
case exports.IkasThemeComponentPropType.ENUM: return [3 /*break*/, 36];
|
|
24964
|
+
case exports.IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 38];
|
|
24965
|
+
case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 40];
|
|
24966
|
+
case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 40];
|
|
24967
|
+
case exports.IkasThemeComponentPropType.BLOG: return [3 /*break*/, 42];
|
|
24968
|
+
case exports.IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 44];
|
|
24949
24969
|
}
|
|
24950
|
-
return [3 /*break*/,
|
|
24970
|
+
return [3 /*break*/, 46];
|
|
24951
24971
|
case 2: return [4 /*yield*/, this.getTextValue()];
|
|
24952
24972
|
case 3:
|
|
24953
24973
|
customDataValue = _b.sent();
|
|
24954
|
-
return [3 /*break*/,
|
|
24974
|
+
return [3 /*break*/, 47];
|
|
24955
24975
|
case 4: return [4 /*yield*/, this.getRichTextPropValue()];
|
|
24956
24976
|
case 5:
|
|
24957
24977
|
customDataValue = _b.sent();
|
|
24958
|
-
return [3 /*break*/,
|
|
24978
|
+
return [3 /*break*/, 47];
|
|
24959
24979
|
case 6: return [4 /*yield*/, this.getBooleanValue()];
|
|
24960
24980
|
case 7:
|
|
24961
24981
|
customDataValue = _b.sent();
|
|
24962
|
-
return [3 /*break*/,
|
|
24982
|
+
return [3 /*break*/, 47];
|
|
24963
24983
|
case 8: return [4 /*yield*/, this.getBrandListPropValue()];
|
|
24964
24984
|
case 9:
|
|
24965
24985
|
customDataValue = _b.sent();
|
|
24966
|
-
return [3 /*break*/,
|
|
24986
|
+
return [3 /*break*/, 47];
|
|
24967
24987
|
case 10: return [4 /*yield*/, this.getBrandPropValue()];
|
|
24968
24988
|
case 11:
|
|
24969
24989
|
customDataValue = _b.sent();
|
|
24970
|
-
return [3 /*break*/,
|
|
24990
|
+
return [3 /*break*/, 47];
|
|
24971
24991
|
case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
|
|
24972
24992
|
case 13:
|
|
24973
24993
|
customDataValue = _b.sent();
|
|
24974
|
-
return [3 /*break*/,
|
|
24994
|
+
return [3 /*break*/, 47];
|
|
24975
24995
|
case 14: return [4 /*yield*/, this.getCategoryPropValue()];
|
|
24976
24996
|
case 15:
|
|
24977
24997
|
customDataValue = _b.sent();
|
|
24978
|
-
return [3 /*break*/,
|
|
24998
|
+
return [3 /*break*/, 47];
|
|
24979
24999
|
case 16: return [4 /*yield*/, this.getColorPropValue()];
|
|
24980
25000
|
case 17:
|
|
24981
25001
|
customDataValue = _b.sent();
|
|
24982
|
-
return [3 /*break*/,
|
|
25002
|
+
return [3 /*break*/, 47];
|
|
24983
25003
|
case 18: return [4 /*yield*/, this.getImageListPropValue()];
|
|
24984
25004
|
case 19:
|
|
24985
25005
|
customDataValue = _b.sent();
|
|
24986
|
-
return [3 /*break*/,
|
|
25006
|
+
return [3 /*break*/, 47];
|
|
24987
25007
|
case 20: return [4 /*yield*/, this.getImagePropValue()];
|
|
24988
25008
|
case 21:
|
|
24989
25009
|
customDataValue = _b.sent();
|
|
24990
|
-
return [3 /*break*/,
|
|
25010
|
+
return [3 /*break*/, 47];
|
|
24991
25011
|
case 22: return [4 /*yield*/, this.getLinkPropValue()];
|
|
24992
25012
|
case 23:
|
|
24993
25013
|
customDataValue = _b.sent();
|
|
24994
|
-
return [3 /*break*/,
|
|
25014
|
+
return [3 /*break*/, 47];
|
|
24995
25015
|
case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
|
|
24996
25016
|
case 25:
|
|
24997
25017
|
customDataValue = _b.sent();
|
|
24998
|
-
return [3 /*break*/,
|
|
25018
|
+
return [3 /*break*/, 47];
|
|
24999
25019
|
case 26: return [4 /*yield*/, this.getProductListPropValue()];
|
|
25000
25020
|
case 27:
|
|
25001
25021
|
customDataValue = _b.sent();
|
|
25002
|
-
return [3 /*break*/,
|
|
25022
|
+
return [3 /*break*/, 47];
|
|
25003
25023
|
case 28: return [4 /*yield*/, this.getProductAttributePropValue()];
|
|
25004
25024
|
case 29:
|
|
25005
25025
|
customDataValue = _b.sent();
|
|
25006
|
-
return [3 /*break*/,
|
|
25026
|
+
return [3 /*break*/, 47];
|
|
25007
25027
|
case 30: return [4 /*yield*/, this.getProductAttributeListPropValue()];
|
|
25008
25028
|
case 31:
|
|
25009
25029
|
customDataValue = _b.sent();
|
|
25010
|
-
return [3 /*break*/,
|
|
25030
|
+
return [3 /*break*/, 47];
|
|
25011
25031
|
case 32: return [4 /*yield*/, this.getObjectValue()];
|
|
25012
25032
|
case 33:
|
|
25013
25033
|
customDataValue = _b.sent();
|
|
25014
|
-
return [3 /*break*/,
|
|
25034
|
+
return [3 /*break*/, 47];
|
|
25015
25035
|
case 34: return [4 /*yield*/, this.getArrayValue()];
|
|
25016
25036
|
case 35:
|
|
25017
25037
|
customDataValue = _b.sent();
|
|
25018
|
-
return [3 /*break*/,
|
|
25019
|
-
case 36: return [4 /*yield*/, this.
|
|
25038
|
+
return [3 /*break*/, 47];
|
|
25039
|
+
case 36: return [4 /*yield*/, this.getEnumValue()];
|
|
25020
25040
|
case 37:
|
|
25021
25041
|
customDataValue = _b.sent();
|
|
25022
|
-
return [3 /*break*/,
|
|
25023
|
-
case 38: return [4 /*yield*/, this.
|
|
25042
|
+
return [3 /*break*/, 47];
|
|
25043
|
+
case 38: return [4 /*yield*/, this.getCustomDataValue()];
|
|
25024
25044
|
case 39:
|
|
25025
25045
|
customDataValue = _b.sent();
|
|
25026
|
-
return [3 /*break*/,
|
|
25027
|
-
case 40: return [4 /*yield*/, this.
|
|
25046
|
+
return [3 /*break*/, 47];
|
|
25047
|
+
case 40: return [4 /*yield*/, this.getComponentListValue()];
|
|
25028
25048
|
case 41:
|
|
25029
25049
|
customDataValue = _b.sent();
|
|
25030
|
-
return [3 /*break*/,
|
|
25031
|
-
case 42: return [
|
|
25032
|
-
case 43:
|
|
25033
|
-
|
|
25050
|
+
return [3 /*break*/, 47];
|
|
25051
|
+
case 42: return [4 /*yield*/, this.getBlogValue()];
|
|
25052
|
+
case 43:
|
|
25053
|
+
customDataValue = _b.sent();
|
|
25054
|
+
return [3 /*break*/, 47];
|
|
25055
|
+
case 44: return [4 /*yield*/, this.getBlogListValue()];
|
|
25056
|
+
case 45:
|
|
25057
|
+
customDataValue = _b.sent();
|
|
25058
|
+
return [3 /*break*/, 47];
|
|
25059
|
+
case 46: return [3 /*break*/, 47];
|
|
25060
|
+
case 47: return [3 /*break*/, 49];
|
|
25061
|
+
case 48:
|
|
25034
25062
|
_b.sent();
|
|
25035
25063
|
return [2 /*return*/];
|
|
25036
|
-
case
|
|
25064
|
+
case 49:
|
|
25037
25065
|
if (this.customData.isRequired &&
|
|
25038
25066
|
((customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === undefined || (customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === null))
|
|
25039
25067
|
return [2 /*return*/];
|
|
@@ -25390,6 +25418,36 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
25390
25418
|
});
|
|
25391
25419
|
});
|
|
25392
25420
|
};
|
|
25421
|
+
IkasCustomPropValueProvider.prototype.getEnumValue = function () {
|
|
25422
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25423
|
+
return __generator(this, function (_a) {
|
|
25424
|
+
return [2 /*return*/, {
|
|
25425
|
+
value: this.value,
|
|
25426
|
+
customData: this.customData,
|
|
25427
|
+
}];
|
|
25428
|
+
});
|
|
25429
|
+
});
|
|
25430
|
+
};
|
|
25431
|
+
IkasCustomPropValueProvider.prototype.getCustomDataValue = function () {
|
|
25432
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25433
|
+
var selectedCustomData, nestedProvider;
|
|
25434
|
+
var _this = this;
|
|
25435
|
+
return __generator(this, function (_a) {
|
|
25436
|
+
switch (_a.label) {
|
|
25437
|
+
case 0:
|
|
25438
|
+
selectedCustomData = this.theme.customData.find(function (c) { return c.id === _this.customData.customDataId; });
|
|
25439
|
+
if (!selectedCustomData)
|
|
25440
|
+
return [2 /*return*/, {
|
|
25441
|
+
value: null,
|
|
25442
|
+
customData: this.customData,
|
|
25443
|
+
}];
|
|
25444
|
+
nestedProvider = new IkasCustomPropValueProvider(this.value, selectedCustomData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
|
|
25445
|
+
return [4 /*yield*/, nestedProvider.getValue()];
|
|
25446
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
25447
|
+
}
|
|
25448
|
+
});
|
|
25449
|
+
});
|
|
25450
|
+
};
|
|
25393
25451
|
IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
|
|
25394
25452
|
return __awaiter(this, void 0, void 0, function () {
|
|
25395
25453
|
var pageComponents;
|
|
@@ -26475,7 +26533,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26475
26533
|
for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
|
|
26476
26534
|
var nestedCustomData = _a[_i];
|
|
26477
26535
|
var value = propValue[nestedCustomData.key];
|
|
26478
|
-
|
|
26536
|
+
var selectedCustomData = void 0;
|
|
26537
|
+
if (nestedCustomData.customDataId) {
|
|
26538
|
+
selectedCustomData = value.customData;
|
|
26539
|
+
}
|
|
26540
|
+
objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, selectedCustomData || nestedCustomData, router, settings, isBrowser);
|
|
26479
26541
|
}
|
|
26480
26542
|
return objectValue;
|
|
26481
26543
|
case exports.IkasThemeComponentPropType.DYNAMIC_LIST:
|
|
@@ -26486,7 +26548,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26486
26548
|
var listValue_1 = [];
|
|
26487
26549
|
var nestedCustomData_1 = customData.nestedData[0];
|
|
26488
26550
|
propValue.forEach(function (itemValue) {
|
|
26489
|
-
|
|
26551
|
+
var selectedCustomData;
|
|
26552
|
+
if (nestedCustomData_1.customDataId) {
|
|
26553
|
+
selectedCustomData = itemValue.customData;
|
|
26554
|
+
}
|
|
26555
|
+
listValue_1.push(_this._initCustomDataPropValue(itemValue, selectedCustomData || nestedCustomData_1, router, settings, isBrowser));
|
|
26490
26556
|
});
|
|
26491
26557
|
return listValue_1;
|
|
26492
26558
|
}
|
|
@@ -28936,6 +29002,7 @@ var FormItemViewModel = /** @class */ (function () {
|
|
|
28936
29002
|
_this.onChange(e.target.value);
|
|
28937
29003
|
};
|
|
28938
29004
|
this.type = props.type;
|
|
29005
|
+
this.inputType = props.inputType;
|
|
28939
29006
|
this.options = props.options;
|
|
28940
29007
|
this.label = props.label;
|
|
28941
29008
|
this.value = props.value;
|
|
@@ -28986,7 +29053,13 @@ var FormItemType;
|
|
|
28986
29053
|
FormItemType[FormItemType["TEXT_AREA"] = 1] = "TEXT_AREA";
|
|
28987
29054
|
FormItemType[FormItemType["SELECT"] = 2] = "SELECT";
|
|
28988
29055
|
FormItemType[FormItemType["TEL"] = 3] = "TEL";
|
|
28989
|
-
})(FormItemType || (FormItemType = {}));
|
|
29056
|
+
})(FormItemType || (FormItemType = {}));
|
|
29057
|
+
var FormItemInputType;
|
|
29058
|
+
(function (FormItemInputType) {
|
|
29059
|
+
FormItemInputType["NUMERIC"] = "numeric";
|
|
29060
|
+
FormItemInputType["TEL"] = "tel";
|
|
29061
|
+
FormItemInputType["EMAIL"] = "email";
|
|
29062
|
+
})(FormItemInputType || (FormItemInputType = {}));
|
|
28990
29063
|
|
|
28991
29064
|
var SVGCaretDown = function (_a) {
|
|
28992
29065
|
var className = _a.className;
|
|
@@ -29002,6 +29075,11 @@ var FormItem = mobxReactLite.observer(function (props) {
|
|
|
29002
29075
|
vm.type = props.type;
|
|
29003
29076
|
});
|
|
29004
29077
|
}, [props.type]);
|
|
29078
|
+
React.useEffect(function () {
|
|
29079
|
+
mobx.runInAction(function () {
|
|
29080
|
+
vm.inputType = props.inputType;
|
|
29081
|
+
});
|
|
29082
|
+
}, [props.inputType]);
|
|
29005
29083
|
React.useEffect(function () {
|
|
29006
29084
|
mobx.runInAction(function () {
|
|
29007
29085
|
vm.value = props.value;
|
|
@@ -29044,7 +29122,7 @@ var FormItem = mobxReactLite.observer(function (props) {
|
|
|
29044
29122
|
});
|
|
29045
29123
|
var Input = mobxReactLite.observer(function (_a) {
|
|
29046
29124
|
var vm = _a.vm, autocomplete = _a.autocomplete, type = _a.type;
|
|
29047
|
-
return (React.createElement("input", { type: type || "text", autoComplete: autocomplete, className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
|
|
29125
|
+
return (React.createElement("input", { type: type || "text", autoComplete: autocomplete, inputMode: vm.inputType || "text", className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
|
|
29048
29126
|
});
|
|
29049
29127
|
var TextArea = mobxReactLite.observer(function (_a) {
|
|
29050
29128
|
var vm = _a.vm;
|
|
@@ -29483,11 +29561,11 @@ var AddressForm$1 = mobxReactLite.observer(function (_a) {
|
|
|
29483
29561
|
React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
|
|
29484
29562
|
React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u00DClke", autocomplete: "country-name", value: ((_b = vm.country) === null || _b === void 0 ? void 0 : _b.id) || "", onChange: vm.onCountryChange, options: vm.countryOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.country), errorText: "Ülke seçin" }),
|
|
29485
29563
|
vm.hasState && (React.createElement(FormItem, { type: FormItemType.SELECT, label: "Eyalet", value: ((_c = vm.state) === null || _c === void 0 ? void 0 : _c.id) || "", onChange: vm.onStateChange, options: vm.stateOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.state), errorText: "Eyalet seçin" })),
|
|
29486
|
-
React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
|
|
29487
|
-
vm.districtOptions.length ? (React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (React.createElement(FormItem, { type: FormItemType.TEXT, label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
|
|
29564
|
+
React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", autocomplete: "off", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
|
|
29565
|
+
vm.districtOptions.length ? (React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", autocomplete: "off", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (React.createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-level3", label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
|
|
29488
29566
|
!!vm.address.checkoutSettings &&
|
|
29489
29567
|
vm.address.checkoutSettings.phoneRequirement !==
|
|
29490
|
-
IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
|
|
29568
|
+
IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.TEL, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
|
|
29491
29569
|
!!vm.address.checkoutSettings &&
|
|
29492
29570
|
vm.address.checkoutSettings.identityNumberRequirement !==
|
|
29493
29571
|
IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" }))),
|
|
@@ -29577,7 +29655,7 @@ var CheckoutStepInfo = mobxReactLite.observer(function (_a) {
|
|
|
29577
29655
|
React.createElement("span", null, "Zaten hesab\u0131n\u0131z var m\u0131?"),
|
|
29578
29656
|
React.createElement(Link__default['default'], { href: "/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl), passHref: true },
|
|
29579
29657
|
React.createElement("a", { className: styles$7.LoginBtn }, "Oturum A\u00E7"))))),
|
|
29580
|
-
!vm.checkout.hasCustomer ? (React.createElement(FormItem, { type: FormItemType.TEXT, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (React.createElement("div", { className: styles$7.CustomerInfo },
|
|
29658
|
+
!vm.checkout.hasCustomer ? (React.createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.EMAIL, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (React.createElement("div", { className: styles$7.CustomerInfo },
|
|
29581
29659
|
React.createElement("div", null,
|
|
29582
29660
|
React.createElement("div", { className: styles$7.CustonerText }, vm.checkout.customerText),
|
|
29583
29661
|
React.createElement("div", { className: styles$7.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
|
|
@@ -29710,12 +29788,12 @@ var CreditCardForm = mobxReactLite.observer(function (_a) {
|
|
|
29710
29788
|
});
|
|
29711
29789
|
return (React.createElement("div", null,
|
|
29712
29790
|
React.createElement("div", { className: styles$3.RowPB },
|
|
29713
|
-
React.createElement(FormItem, { autocomplete: "cc-number", type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
|
|
29791
|
+
React.createElement(FormItem, { autocomplete: "cc-number", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
|
|
29714
29792
|
React.createElement("div", { className: styles$3.RowPB },
|
|
29715
29793
|
React.createElement(FormItem, { autocomplete: "cc-name", type: FormItemType.TEXT, label: "Karttaki ad", value: cardData.cardHolderName, onChange: vm.onCardHolderNameChange, errorText: "Ad soyad girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardHolderName })),
|
|
29716
29794
|
React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
|
|
29717
|
-
React.createElement(FormItem, { autocomplete: "cc-exp", type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
|
|
29718
|
-
React.createElement(FormItem, { autocomplete: "cc-csc", type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
|
|
29795
|
+
React.createElement(FormItem, { autocomplete: "cc-exp", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
|
|
29796
|
+
React.createElement(FormItem, { autocomplete: "cc-csc", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
|
|
29719
29797
|
React.createElement("div", { style: { marginTop: "0.4em" } },
|
|
29720
29798
|
React.createElement(Checkbox, { value: cardData.threeDSecure, onChange: onThreeDSecureChange, label: "3D Secure kullan" }))));
|
|
29721
29799
|
});
|
|
@@ -29963,7 +30041,9 @@ var CartSummary = mobxReactLite.observer(function (_a) {
|
|
|
29963
30041
|
React.createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
|
|
29964
30042
|
" ",
|
|
29965
30043
|
React.createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); }),
|
|
29966
|
-
(((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
|
|
30044
|
+
(((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
|
|
30045
|
+
.filter(function (adjustment) { return adjustment.amount !== 0; })
|
|
30046
|
+
.map(function (adjustment, index) { return (React.createElement("div", { className: styles$g.InfoRow, key: index },
|
|
29967
30047
|
React.createElement("div", { className: styles$g.Label }, adjustment.name),
|
|
29968
30048
|
React.createElement("div", { className: styles$g.Value },
|
|
29969
30049
|
React.createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
|
|
@@ -9,8 +9,16 @@ export declare class IkasThemeCustomData {
|
|
|
9
9
|
nestedData?: IkasThemeCustomData[] | null;
|
|
10
10
|
itemCount?: number | null;
|
|
11
11
|
attributeTypes?: IkasProductAttributeType[] | null;
|
|
12
|
+
enumOptions?: IkasThemeEnumOption[] | null;
|
|
13
|
+
customDataId?: string | null;
|
|
12
14
|
isRoot: boolean;
|
|
13
15
|
parent?: IkasThemeCustomData | null;
|
|
14
16
|
constructor(data?: Partial<IkasThemeCustomData>);
|
|
15
17
|
toJSON(): this;
|
|
16
18
|
}
|
|
19
|
+
export declare class IkasThemeEnumOption {
|
|
20
|
+
id: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
value: string;
|
|
23
|
+
constructor(data?: Partial<IkasThemeEnumOption>);
|
|
24
|
+
}
|
|
@@ -28,6 +28,8 @@ export declare class IkasCustomPropValueProvider implements IkasPropValueProvide
|
|
|
28
28
|
private getTextValue;
|
|
29
29
|
private getObjectValue;
|
|
30
30
|
private getArrayValue;
|
|
31
|
+
private getEnumValue;
|
|
32
|
+
private getCustomDataValue;
|
|
31
33
|
private getComponentListValue;
|
|
32
34
|
private getBlogValue;
|
|
33
35
|
private getBlogListValue;
|