@ikas/storefront 0.0.158-alpha.21 → 0.0.158-alpha.22
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 +123 -45
- package/build/index.js +123 -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 () {
|
|
@@ -24940,7 +24956,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24940
24956
|
return [2 /*return*/];
|
|
24941
24957
|
_b.label = 1;
|
|
24942
24958
|
case 1:
|
|
24943
|
-
_b.trys.push([1,
|
|
24959
|
+
_b.trys.push([1, 48, , 49]);
|
|
24944
24960
|
_a = this.customData.type;
|
|
24945
24961
|
switch (_a) {
|
|
24946
24962
|
case IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
|
|
@@ -24962,98 +24978,108 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24962
24978
|
case IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 32];
|
|
24963
24979
|
case IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 34];
|
|
24964
24980
|
case IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 34];
|
|
24965
|
-
case IkasThemeComponentPropType.
|
|
24966
|
-
case IkasThemeComponentPropType.
|
|
24967
|
-
case IkasThemeComponentPropType.
|
|
24968
|
-
case IkasThemeComponentPropType.
|
|
24981
|
+
case IkasThemeComponentPropType.ENUM: return [3 /*break*/, 36];
|
|
24982
|
+
case IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 38];
|
|
24983
|
+
case IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 40];
|
|
24984
|
+
case IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 40];
|
|
24985
|
+
case IkasThemeComponentPropType.BLOG: return [3 /*break*/, 42];
|
|
24986
|
+
case IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 44];
|
|
24969
24987
|
}
|
|
24970
|
-
return [3 /*break*/,
|
|
24988
|
+
return [3 /*break*/, 46];
|
|
24971
24989
|
case 2: return [4 /*yield*/, this.getTextValue()];
|
|
24972
24990
|
case 3:
|
|
24973
24991
|
customDataValue = _b.sent();
|
|
24974
|
-
return [3 /*break*/,
|
|
24992
|
+
return [3 /*break*/, 47];
|
|
24975
24993
|
case 4: return [4 /*yield*/, this.getRichTextPropValue()];
|
|
24976
24994
|
case 5:
|
|
24977
24995
|
customDataValue = _b.sent();
|
|
24978
|
-
return [3 /*break*/,
|
|
24996
|
+
return [3 /*break*/, 47];
|
|
24979
24997
|
case 6: return [4 /*yield*/, this.getBooleanValue()];
|
|
24980
24998
|
case 7:
|
|
24981
24999
|
customDataValue = _b.sent();
|
|
24982
|
-
return [3 /*break*/,
|
|
25000
|
+
return [3 /*break*/, 47];
|
|
24983
25001
|
case 8: return [4 /*yield*/, this.getBrandListPropValue()];
|
|
24984
25002
|
case 9:
|
|
24985
25003
|
customDataValue = _b.sent();
|
|
24986
|
-
return [3 /*break*/,
|
|
25004
|
+
return [3 /*break*/, 47];
|
|
24987
25005
|
case 10: return [4 /*yield*/, this.getBrandPropValue()];
|
|
24988
25006
|
case 11:
|
|
24989
25007
|
customDataValue = _b.sent();
|
|
24990
|
-
return [3 /*break*/,
|
|
25008
|
+
return [3 /*break*/, 47];
|
|
24991
25009
|
case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
|
|
24992
25010
|
case 13:
|
|
24993
25011
|
customDataValue = _b.sent();
|
|
24994
|
-
return [3 /*break*/,
|
|
25012
|
+
return [3 /*break*/, 47];
|
|
24995
25013
|
case 14: return [4 /*yield*/, this.getCategoryPropValue()];
|
|
24996
25014
|
case 15:
|
|
24997
25015
|
customDataValue = _b.sent();
|
|
24998
|
-
return [3 /*break*/,
|
|
25016
|
+
return [3 /*break*/, 47];
|
|
24999
25017
|
case 16: return [4 /*yield*/, this.getColorPropValue()];
|
|
25000
25018
|
case 17:
|
|
25001
25019
|
customDataValue = _b.sent();
|
|
25002
|
-
return [3 /*break*/,
|
|
25020
|
+
return [3 /*break*/, 47];
|
|
25003
25021
|
case 18: return [4 /*yield*/, this.getImageListPropValue()];
|
|
25004
25022
|
case 19:
|
|
25005
25023
|
customDataValue = _b.sent();
|
|
25006
|
-
return [3 /*break*/,
|
|
25024
|
+
return [3 /*break*/, 47];
|
|
25007
25025
|
case 20: return [4 /*yield*/, this.getImagePropValue()];
|
|
25008
25026
|
case 21:
|
|
25009
25027
|
customDataValue = _b.sent();
|
|
25010
|
-
return [3 /*break*/,
|
|
25028
|
+
return [3 /*break*/, 47];
|
|
25011
25029
|
case 22: return [4 /*yield*/, this.getLinkPropValue()];
|
|
25012
25030
|
case 23:
|
|
25013
25031
|
customDataValue = _b.sent();
|
|
25014
|
-
return [3 /*break*/,
|
|
25032
|
+
return [3 /*break*/, 47];
|
|
25015
25033
|
case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
|
|
25016
25034
|
case 25:
|
|
25017
25035
|
customDataValue = _b.sent();
|
|
25018
|
-
return [3 /*break*/,
|
|
25036
|
+
return [3 /*break*/, 47];
|
|
25019
25037
|
case 26: return [4 /*yield*/, this.getProductListPropValue()];
|
|
25020
25038
|
case 27:
|
|
25021
25039
|
customDataValue = _b.sent();
|
|
25022
|
-
return [3 /*break*/,
|
|
25040
|
+
return [3 /*break*/, 47];
|
|
25023
25041
|
case 28: return [4 /*yield*/, this.getProductAttributePropValue()];
|
|
25024
25042
|
case 29:
|
|
25025
25043
|
customDataValue = _b.sent();
|
|
25026
|
-
return [3 /*break*/,
|
|
25044
|
+
return [3 /*break*/, 47];
|
|
25027
25045
|
case 30: return [4 /*yield*/, this.getProductAttributeListPropValue()];
|
|
25028
25046
|
case 31:
|
|
25029
25047
|
customDataValue = _b.sent();
|
|
25030
|
-
return [3 /*break*/,
|
|
25048
|
+
return [3 /*break*/, 47];
|
|
25031
25049
|
case 32: return [4 /*yield*/, this.getObjectValue()];
|
|
25032
25050
|
case 33:
|
|
25033
25051
|
customDataValue = _b.sent();
|
|
25034
|
-
return [3 /*break*/,
|
|
25052
|
+
return [3 /*break*/, 47];
|
|
25035
25053
|
case 34: return [4 /*yield*/, this.getArrayValue()];
|
|
25036
25054
|
case 35:
|
|
25037
25055
|
customDataValue = _b.sent();
|
|
25038
|
-
return [3 /*break*/,
|
|
25039
|
-
case 36: return [4 /*yield*/, this.
|
|
25056
|
+
return [3 /*break*/, 47];
|
|
25057
|
+
case 36: return [4 /*yield*/, this.getEnumValue()];
|
|
25040
25058
|
case 37:
|
|
25041
25059
|
customDataValue = _b.sent();
|
|
25042
|
-
return [3 /*break*/,
|
|
25043
|
-
case 38: return [4 /*yield*/, this.
|
|
25060
|
+
return [3 /*break*/, 47];
|
|
25061
|
+
case 38: return [4 /*yield*/, this.getCustomDataValue()];
|
|
25044
25062
|
case 39:
|
|
25045
25063
|
customDataValue = _b.sent();
|
|
25046
|
-
return [3 /*break*/,
|
|
25047
|
-
case 40: return [4 /*yield*/, this.
|
|
25064
|
+
return [3 /*break*/, 47];
|
|
25065
|
+
case 40: return [4 /*yield*/, this.getComponentListValue()];
|
|
25048
25066
|
case 41:
|
|
25049
25067
|
customDataValue = _b.sent();
|
|
25050
|
-
return [3 /*break*/,
|
|
25051
|
-
case 42: return [
|
|
25052
|
-
case 43:
|
|
25053
|
-
|
|
25068
|
+
return [3 /*break*/, 47];
|
|
25069
|
+
case 42: return [4 /*yield*/, this.getBlogValue()];
|
|
25070
|
+
case 43:
|
|
25071
|
+
customDataValue = _b.sent();
|
|
25072
|
+
return [3 /*break*/, 47];
|
|
25073
|
+
case 44: return [4 /*yield*/, this.getBlogListValue()];
|
|
25074
|
+
case 45:
|
|
25075
|
+
customDataValue = _b.sent();
|
|
25076
|
+
return [3 /*break*/, 47];
|
|
25077
|
+
case 46: return [3 /*break*/, 47];
|
|
25078
|
+
case 47: return [3 /*break*/, 49];
|
|
25079
|
+
case 48:
|
|
25054
25080
|
_b.sent();
|
|
25055
25081
|
return [2 /*return*/];
|
|
25056
|
-
case
|
|
25082
|
+
case 49:
|
|
25057
25083
|
if (this.customData.isRequired &&
|
|
25058
25084
|
((customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === undefined || (customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === null))
|
|
25059
25085
|
return [2 /*return*/];
|
|
@@ -25410,6 +25436,36 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
25410
25436
|
});
|
|
25411
25437
|
});
|
|
25412
25438
|
};
|
|
25439
|
+
IkasCustomPropValueProvider.prototype.getEnumValue = function () {
|
|
25440
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25441
|
+
return __generator(this, function (_a) {
|
|
25442
|
+
return [2 /*return*/, {
|
|
25443
|
+
value: this.value,
|
|
25444
|
+
customData: this.customData,
|
|
25445
|
+
}];
|
|
25446
|
+
});
|
|
25447
|
+
});
|
|
25448
|
+
};
|
|
25449
|
+
IkasCustomPropValueProvider.prototype.getCustomDataValue = function () {
|
|
25450
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25451
|
+
var selectedCustomData, nestedProvider;
|
|
25452
|
+
var _this = this;
|
|
25453
|
+
return __generator(this, function (_a) {
|
|
25454
|
+
switch (_a.label) {
|
|
25455
|
+
case 0:
|
|
25456
|
+
selectedCustomData = this.theme.customData.find(function (c) { return c.id === _this.customData.customDataId; });
|
|
25457
|
+
if (!selectedCustomData)
|
|
25458
|
+
return [2 /*return*/, {
|
|
25459
|
+
value: null,
|
|
25460
|
+
customData: this.customData,
|
|
25461
|
+
}];
|
|
25462
|
+
nestedProvider = new IkasCustomPropValueProvider(this.value, selectedCustomData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
|
|
25463
|
+
return [4 /*yield*/, nestedProvider.getValue()];
|
|
25464
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
25465
|
+
}
|
|
25466
|
+
});
|
|
25467
|
+
});
|
|
25468
|
+
};
|
|
25413
25469
|
IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
|
|
25414
25470
|
return __awaiter(this, void 0, void 0, function () {
|
|
25415
25471
|
var pageComponents;
|
|
@@ -26495,7 +26551,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26495
26551
|
for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
|
|
26496
26552
|
var nestedCustomData = _a[_i];
|
|
26497
26553
|
var value = propValue[nestedCustomData.key];
|
|
26498
|
-
|
|
26554
|
+
var selectedCustomData = void 0;
|
|
26555
|
+
if (nestedCustomData.customDataId) {
|
|
26556
|
+
selectedCustomData = value.customData;
|
|
26557
|
+
}
|
|
26558
|
+
objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, selectedCustomData || nestedCustomData, router, settings, isBrowser);
|
|
26499
26559
|
}
|
|
26500
26560
|
return objectValue;
|
|
26501
26561
|
case IkasThemeComponentPropType.DYNAMIC_LIST:
|
|
@@ -26506,7 +26566,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26506
26566
|
var listValue_1 = [];
|
|
26507
26567
|
var nestedCustomData_1 = customData.nestedData[0];
|
|
26508
26568
|
propValue.forEach(function (itemValue) {
|
|
26509
|
-
|
|
26569
|
+
var selectedCustomData;
|
|
26570
|
+
if (nestedCustomData_1.customDataId) {
|
|
26571
|
+
selectedCustomData = itemValue.customData;
|
|
26572
|
+
}
|
|
26573
|
+
listValue_1.push(_this._initCustomDataPropValue(itemValue, selectedCustomData || nestedCustomData_1, router, settings, isBrowser));
|
|
26510
26574
|
});
|
|
26511
26575
|
return listValue_1;
|
|
26512
26576
|
}
|
|
@@ -28957,6 +29021,7 @@ var FormItemViewModel = /** @class */ (function () {
|
|
|
28957
29021
|
_this.onChange(e.target.value);
|
|
28958
29022
|
};
|
|
28959
29023
|
this.type = props.type;
|
|
29024
|
+
this.inputType = props.inputType;
|
|
28960
29025
|
this.options = props.options;
|
|
28961
29026
|
this.label = props.label;
|
|
28962
29027
|
this.value = props.value;
|
|
@@ -29007,7 +29072,13 @@ var FormItemType;
|
|
|
29007
29072
|
FormItemType[FormItemType["TEXT_AREA"] = 1] = "TEXT_AREA";
|
|
29008
29073
|
FormItemType[FormItemType["SELECT"] = 2] = "SELECT";
|
|
29009
29074
|
FormItemType[FormItemType["TEL"] = 3] = "TEL";
|
|
29010
|
-
})(FormItemType || (FormItemType = {}));
|
|
29075
|
+
})(FormItemType || (FormItemType = {}));
|
|
29076
|
+
var FormItemInputType;
|
|
29077
|
+
(function (FormItemInputType) {
|
|
29078
|
+
FormItemInputType["NUMERIC"] = "numeric";
|
|
29079
|
+
FormItemInputType["TEL"] = "tel";
|
|
29080
|
+
FormItemInputType["EMAIL"] = "email";
|
|
29081
|
+
})(FormItemInputType || (FormItemInputType = {}));
|
|
29011
29082
|
|
|
29012
29083
|
var SVGCaretDown = function (_a) {
|
|
29013
29084
|
var className = _a.className;
|
|
@@ -29023,6 +29094,11 @@ var FormItem = observer(function (props) {
|
|
|
29023
29094
|
vm.type = props.type;
|
|
29024
29095
|
});
|
|
29025
29096
|
}, [props.type]);
|
|
29097
|
+
useEffect(function () {
|
|
29098
|
+
runInAction(function () {
|
|
29099
|
+
vm.inputType = props.inputType;
|
|
29100
|
+
});
|
|
29101
|
+
}, [props.inputType]);
|
|
29026
29102
|
useEffect(function () {
|
|
29027
29103
|
runInAction(function () {
|
|
29028
29104
|
vm.value = props.value;
|
|
@@ -29065,7 +29141,7 @@ var FormItem = observer(function (props) {
|
|
|
29065
29141
|
});
|
|
29066
29142
|
var Input = observer(function (_a) {
|
|
29067
29143
|
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 }));
|
|
29144
|
+
return (createElement("input", { type: type || "text", autoComplete: autocomplete, inputMode: vm.inputType || "text", className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
|
|
29069
29145
|
});
|
|
29070
29146
|
var TextArea = observer(function (_a) {
|
|
29071
29147
|
var vm = _a.vm;
|
|
@@ -29504,11 +29580,11 @@ var AddressForm$1 = observer(function (_a) {
|
|
|
29504
29580
|
createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
|
|
29505
29581
|
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
29582
|
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 })),
|
|
29583
|
+
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" }),
|
|
29584
|
+
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
29585
|
!!vm.address.checkoutSettings &&
|
|
29510
29586
|
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" })),
|
|
29587
|
+
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
29588
|
!!vm.address.checkoutSettings &&
|
|
29513
29589
|
vm.address.checkoutSettings.identityNumberRequirement !==
|
|
29514
29590
|
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 +29674,7 @@ var CheckoutStepInfo = observer(function (_a) {
|
|
|
29598
29674
|
createElement("span", null, "Zaten hesab\u0131n\u0131z var m\u0131?"),
|
|
29599
29675
|
createElement(Link, { href: "/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl), passHref: true },
|
|
29600
29676
|
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 },
|
|
29677
|
+
!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
29678
|
createElement("div", null,
|
|
29603
29679
|
createElement("div", { className: styles$7.CustonerText }, vm.checkout.customerText),
|
|
29604
29680
|
createElement("div", { className: styles$7.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
|
|
@@ -29731,12 +29807,12 @@ var CreditCardForm = observer(function (_a) {
|
|
|
29731
29807
|
});
|
|
29732
29808
|
return (createElement("div", null,
|
|
29733
29809
|
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 })),
|
|
29810
|
+
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
29811
|
createElement("div", { className: styles$3.RowPB },
|
|
29736
29812
|
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
29813
|
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 })),
|
|
29814
|
+
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 }),
|
|
29815
|
+
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
29816
|
createElement("div", { style: { marginTop: "0.4em" } },
|
|
29741
29817
|
createElement(Checkbox, { value: cardData.threeDSecure, onChange: onThreeDSecureChange, label: "3D Secure kullan" }))));
|
|
29742
29818
|
});
|
|
@@ -29984,7 +30060,9 @@ var CartSummary = observer(function (_a) {
|
|
|
29984
30060
|
createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
|
|
29985
30061
|
" ",
|
|
29986
30062
|
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)) || [])
|
|
30063
|
+
(((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
|
|
30064
|
+
.filter(function (adjustment) { return adjustment.amount !== 0; })
|
|
30065
|
+
.map(function (adjustment, index) { return (createElement("div", { className: styles$g.InfoRow, key: index },
|
|
29988
30066
|
createElement("div", { className: styles$g.Label }, adjustment.name),
|
|
29989
30067
|
createElement("div", { className: styles$g.Value },
|
|
29990
30068
|
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 () {
|
|
@@ -24920,7 +24936,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24920
24936
|
return [2 /*return*/];
|
|
24921
24937
|
_b.label = 1;
|
|
24922
24938
|
case 1:
|
|
24923
|
-
_b.trys.push([1,
|
|
24939
|
+
_b.trys.push([1, 48, , 49]);
|
|
24924
24940
|
_a = this.customData.type;
|
|
24925
24941
|
switch (_a) {
|
|
24926
24942
|
case exports.IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
|
|
@@ -24942,98 +24958,108 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
24942
24958
|
case exports.IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 32];
|
|
24943
24959
|
case exports.IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 34];
|
|
24944
24960
|
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.
|
|
24961
|
+
case exports.IkasThemeComponentPropType.ENUM: return [3 /*break*/, 36];
|
|
24962
|
+
case exports.IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 38];
|
|
24963
|
+
case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 40];
|
|
24964
|
+
case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 40];
|
|
24965
|
+
case exports.IkasThemeComponentPropType.BLOG: return [3 /*break*/, 42];
|
|
24966
|
+
case exports.IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 44];
|
|
24949
24967
|
}
|
|
24950
|
-
return [3 /*break*/,
|
|
24968
|
+
return [3 /*break*/, 46];
|
|
24951
24969
|
case 2: return [4 /*yield*/, this.getTextValue()];
|
|
24952
24970
|
case 3:
|
|
24953
24971
|
customDataValue = _b.sent();
|
|
24954
|
-
return [3 /*break*/,
|
|
24972
|
+
return [3 /*break*/, 47];
|
|
24955
24973
|
case 4: return [4 /*yield*/, this.getRichTextPropValue()];
|
|
24956
24974
|
case 5:
|
|
24957
24975
|
customDataValue = _b.sent();
|
|
24958
|
-
return [3 /*break*/,
|
|
24976
|
+
return [3 /*break*/, 47];
|
|
24959
24977
|
case 6: return [4 /*yield*/, this.getBooleanValue()];
|
|
24960
24978
|
case 7:
|
|
24961
24979
|
customDataValue = _b.sent();
|
|
24962
|
-
return [3 /*break*/,
|
|
24980
|
+
return [3 /*break*/, 47];
|
|
24963
24981
|
case 8: return [4 /*yield*/, this.getBrandListPropValue()];
|
|
24964
24982
|
case 9:
|
|
24965
24983
|
customDataValue = _b.sent();
|
|
24966
|
-
return [3 /*break*/,
|
|
24984
|
+
return [3 /*break*/, 47];
|
|
24967
24985
|
case 10: return [4 /*yield*/, this.getBrandPropValue()];
|
|
24968
24986
|
case 11:
|
|
24969
24987
|
customDataValue = _b.sent();
|
|
24970
|
-
return [3 /*break*/,
|
|
24988
|
+
return [3 /*break*/, 47];
|
|
24971
24989
|
case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
|
|
24972
24990
|
case 13:
|
|
24973
24991
|
customDataValue = _b.sent();
|
|
24974
|
-
return [3 /*break*/,
|
|
24992
|
+
return [3 /*break*/, 47];
|
|
24975
24993
|
case 14: return [4 /*yield*/, this.getCategoryPropValue()];
|
|
24976
24994
|
case 15:
|
|
24977
24995
|
customDataValue = _b.sent();
|
|
24978
|
-
return [3 /*break*/,
|
|
24996
|
+
return [3 /*break*/, 47];
|
|
24979
24997
|
case 16: return [4 /*yield*/, this.getColorPropValue()];
|
|
24980
24998
|
case 17:
|
|
24981
24999
|
customDataValue = _b.sent();
|
|
24982
|
-
return [3 /*break*/,
|
|
25000
|
+
return [3 /*break*/, 47];
|
|
24983
25001
|
case 18: return [4 /*yield*/, this.getImageListPropValue()];
|
|
24984
25002
|
case 19:
|
|
24985
25003
|
customDataValue = _b.sent();
|
|
24986
|
-
return [3 /*break*/,
|
|
25004
|
+
return [3 /*break*/, 47];
|
|
24987
25005
|
case 20: return [4 /*yield*/, this.getImagePropValue()];
|
|
24988
25006
|
case 21:
|
|
24989
25007
|
customDataValue = _b.sent();
|
|
24990
|
-
return [3 /*break*/,
|
|
25008
|
+
return [3 /*break*/, 47];
|
|
24991
25009
|
case 22: return [4 /*yield*/, this.getLinkPropValue()];
|
|
24992
25010
|
case 23:
|
|
24993
25011
|
customDataValue = _b.sent();
|
|
24994
|
-
return [3 /*break*/,
|
|
25012
|
+
return [3 /*break*/, 47];
|
|
24995
25013
|
case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
|
|
24996
25014
|
case 25:
|
|
24997
25015
|
customDataValue = _b.sent();
|
|
24998
|
-
return [3 /*break*/,
|
|
25016
|
+
return [3 /*break*/, 47];
|
|
24999
25017
|
case 26: return [4 /*yield*/, this.getProductListPropValue()];
|
|
25000
25018
|
case 27:
|
|
25001
25019
|
customDataValue = _b.sent();
|
|
25002
|
-
return [3 /*break*/,
|
|
25020
|
+
return [3 /*break*/, 47];
|
|
25003
25021
|
case 28: return [4 /*yield*/, this.getProductAttributePropValue()];
|
|
25004
25022
|
case 29:
|
|
25005
25023
|
customDataValue = _b.sent();
|
|
25006
|
-
return [3 /*break*/,
|
|
25024
|
+
return [3 /*break*/, 47];
|
|
25007
25025
|
case 30: return [4 /*yield*/, this.getProductAttributeListPropValue()];
|
|
25008
25026
|
case 31:
|
|
25009
25027
|
customDataValue = _b.sent();
|
|
25010
|
-
return [3 /*break*/,
|
|
25028
|
+
return [3 /*break*/, 47];
|
|
25011
25029
|
case 32: return [4 /*yield*/, this.getObjectValue()];
|
|
25012
25030
|
case 33:
|
|
25013
25031
|
customDataValue = _b.sent();
|
|
25014
|
-
return [3 /*break*/,
|
|
25032
|
+
return [3 /*break*/, 47];
|
|
25015
25033
|
case 34: return [4 /*yield*/, this.getArrayValue()];
|
|
25016
25034
|
case 35:
|
|
25017
25035
|
customDataValue = _b.sent();
|
|
25018
|
-
return [3 /*break*/,
|
|
25019
|
-
case 36: return [4 /*yield*/, this.
|
|
25036
|
+
return [3 /*break*/, 47];
|
|
25037
|
+
case 36: return [4 /*yield*/, this.getEnumValue()];
|
|
25020
25038
|
case 37:
|
|
25021
25039
|
customDataValue = _b.sent();
|
|
25022
|
-
return [3 /*break*/,
|
|
25023
|
-
case 38: return [4 /*yield*/, this.
|
|
25040
|
+
return [3 /*break*/, 47];
|
|
25041
|
+
case 38: return [4 /*yield*/, this.getCustomDataValue()];
|
|
25024
25042
|
case 39:
|
|
25025
25043
|
customDataValue = _b.sent();
|
|
25026
|
-
return [3 /*break*/,
|
|
25027
|
-
case 40: return [4 /*yield*/, this.
|
|
25044
|
+
return [3 /*break*/, 47];
|
|
25045
|
+
case 40: return [4 /*yield*/, this.getComponentListValue()];
|
|
25028
25046
|
case 41:
|
|
25029
25047
|
customDataValue = _b.sent();
|
|
25030
|
-
return [3 /*break*/,
|
|
25031
|
-
case 42: return [
|
|
25032
|
-
case 43:
|
|
25033
|
-
|
|
25048
|
+
return [3 /*break*/, 47];
|
|
25049
|
+
case 42: return [4 /*yield*/, this.getBlogValue()];
|
|
25050
|
+
case 43:
|
|
25051
|
+
customDataValue = _b.sent();
|
|
25052
|
+
return [3 /*break*/, 47];
|
|
25053
|
+
case 44: return [4 /*yield*/, this.getBlogListValue()];
|
|
25054
|
+
case 45:
|
|
25055
|
+
customDataValue = _b.sent();
|
|
25056
|
+
return [3 /*break*/, 47];
|
|
25057
|
+
case 46: return [3 /*break*/, 47];
|
|
25058
|
+
case 47: return [3 /*break*/, 49];
|
|
25059
|
+
case 48:
|
|
25034
25060
|
_b.sent();
|
|
25035
25061
|
return [2 /*return*/];
|
|
25036
|
-
case
|
|
25062
|
+
case 49:
|
|
25037
25063
|
if (this.customData.isRequired &&
|
|
25038
25064
|
((customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === undefined || (customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === null))
|
|
25039
25065
|
return [2 /*return*/];
|
|
@@ -25390,6 +25416,36 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
25390
25416
|
});
|
|
25391
25417
|
});
|
|
25392
25418
|
};
|
|
25419
|
+
IkasCustomPropValueProvider.prototype.getEnumValue = function () {
|
|
25420
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25421
|
+
return __generator(this, function (_a) {
|
|
25422
|
+
return [2 /*return*/, {
|
|
25423
|
+
value: this.value,
|
|
25424
|
+
customData: this.customData,
|
|
25425
|
+
}];
|
|
25426
|
+
});
|
|
25427
|
+
});
|
|
25428
|
+
};
|
|
25429
|
+
IkasCustomPropValueProvider.prototype.getCustomDataValue = function () {
|
|
25430
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25431
|
+
var selectedCustomData, nestedProvider;
|
|
25432
|
+
var _this = this;
|
|
25433
|
+
return __generator(this, function (_a) {
|
|
25434
|
+
switch (_a.label) {
|
|
25435
|
+
case 0:
|
|
25436
|
+
selectedCustomData = this.theme.customData.find(function (c) { return c.id === _this.customData.customDataId; });
|
|
25437
|
+
if (!selectedCustomData)
|
|
25438
|
+
return [2 /*return*/, {
|
|
25439
|
+
value: null,
|
|
25440
|
+
customData: this.customData,
|
|
25441
|
+
}];
|
|
25442
|
+
nestedProvider = new IkasCustomPropValueProvider(this.value, selectedCustomData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
|
|
25443
|
+
return [4 /*yield*/, nestedProvider.getValue()];
|
|
25444
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
25445
|
+
}
|
|
25446
|
+
});
|
|
25447
|
+
});
|
|
25448
|
+
};
|
|
25393
25449
|
IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
|
|
25394
25450
|
return __awaiter(this, void 0, void 0, function () {
|
|
25395
25451
|
var pageComponents;
|
|
@@ -26475,7 +26531,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26475
26531
|
for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
|
|
26476
26532
|
var nestedCustomData = _a[_i];
|
|
26477
26533
|
var value = propValue[nestedCustomData.key];
|
|
26478
|
-
|
|
26534
|
+
var selectedCustomData = void 0;
|
|
26535
|
+
if (nestedCustomData.customDataId) {
|
|
26536
|
+
selectedCustomData = value.customData;
|
|
26537
|
+
}
|
|
26538
|
+
objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, selectedCustomData || nestedCustomData, router, settings, isBrowser);
|
|
26479
26539
|
}
|
|
26480
26540
|
return objectValue;
|
|
26481
26541
|
case exports.IkasThemeComponentPropType.DYNAMIC_LIST:
|
|
@@ -26486,7 +26546,11 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
26486
26546
|
var listValue_1 = [];
|
|
26487
26547
|
var nestedCustomData_1 = customData.nestedData[0];
|
|
26488
26548
|
propValue.forEach(function (itemValue) {
|
|
26489
|
-
|
|
26549
|
+
var selectedCustomData;
|
|
26550
|
+
if (nestedCustomData_1.customDataId) {
|
|
26551
|
+
selectedCustomData = itemValue.customData;
|
|
26552
|
+
}
|
|
26553
|
+
listValue_1.push(_this._initCustomDataPropValue(itemValue, selectedCustomData || nestedCustomData_1, router, settings, isBrowser));
|
|
26490
26554
|
});
|
|
26491
26555
|
return listValue_1;
|
|
26492
26556
|
}
|
|
@@ -28936,6 +29000,7 @@ var FormItemViewModel = /** @class */ (function () {
|
|
|
28936
29000
|
_this.onChange(e.target.value);
|
|
28937
29001
|
};
|
|
28938
29002
|
this.type = props.type;
|
|
29003
|
+
this.inputType = props.inputType;
|
|
28939
29004
|
this.options = props.options;
|
|
28940
29005
|
this.label = props.label;
|
|
28941
29006
|
this.value = props.value;
|
|
@@ -28986,7 +29051,13 @@ var FormItemType;
|
|
|
28986
29051
|
FormItemType[FormItemType["TEXT_AREA"] = 1] = "TEXT_AREA";
|
|
28987
29052
|
FormItemType[FormItemType["SELECT"] = 2] = "SELECT";
|
|
28988
29053
|
FormItemType[FormItemType["TEL"] = 3] = "TEL";
|
|
28989
|
-
})(FormItemType || (FormItemType = {}));
|
|
29054
|
+
})(FormItemType || (FormItemType = {}));
|
|
29055
|
+
var FormItemInputType;
|
|
29056
|
+
(function (FormItemInputType) {
|
|
29057
|
+
FormItemInputType["NUMERIC"] = "numeric";
|
|
29058
|
+
FormItemInputType["TEL"] = "tel";
|
|
29059
|
+
FormItemInputType["EMAIL"] = "email";
|
|
29060
|
+
})(FormItemInputType || (FormItemInputType = {}));
|
|
28990
29061
|
|
|
28991
29062
|
var SVGCaretDown = function (_a) {
|
|
28992
29063
|
var className = _a.className;
|
|
@@ -29002,6 +29073,11 @@ var FormItem = mobxReactLite.observer(function (props) {
|
|
|
29002
29073
|
vm.type = props.type;
|
|
29003
29074
|
});
|
|
29004
29075
|
}, [props.type]);
|
|
29076
|
+
React.useEffect(function () {
|
|
29077
|
+
mobx.runInAction(function () {
|
|
29078
|
+
vm.inputType = props.inputType;
|
|
29079
|
+
});
|
|
29080
|
+
}, [props.inputType]);
|
|
29005
29081
|
React.useEffect(function () {
|
|
29006
29082
|
mobx.runInAction(function () {
|
|
29007
29083
|
vm.value = props.value;
|
|
@@ -29044,7 +29120,7 @@ var FormItem = mobxReactLite.observer(function (props) {
|
|
|
29044
29120
|
});
|
|
29045
29121
|
var Input = mobxReactLite.observer(function (_a) {
|
|
29046
29122
|
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 }));
|
|
29123
|
+
return (React.createElement("input", { type: type || "text", autoComplete: autocomplete, inputMode: vm.inputType || "text", className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
|
|
29048
29124
|
});
|
|
29049
29125
|
var TextArea = mobxReactLite.observer(function (_a) {
|
|
29050
29126
|
var vm = _a.vm;
|
|
@@ -29483,11 +29559,11 @@ var AddressForm$1 = mobxReactLite.observer(function (_a) {
|
|
|
29483
29559
|
React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
|
|
29484
29560
|
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
29561
|
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 })),
|
|
29562
|
+
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" }),
|
|
29563
|
+
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
29564
|
!!vm.address.checkoutSettings &&
|
|
29489
29565
|
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" })),
|
|
29566
|
+
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
29567
|
!!vm.address.checkoutSettings &&
|
|
29492
29568
|
vm.address.checkoutSettings.identityNumberRequirement !==
|
|
29493
29569
|
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 +29653,7 @@ var CheckoutStepInfo = mobxReactLite.observer(function (_a) {
|
|
|
29577
29653
|
React.createElement("span", null, "Zaten hesab\u0131n\u0131z var m\u0131?"),
|
|
29578
29654
|
React.createElement(Link__default['default'], { href: "/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl), passHref: true },
|
|
29579
29655
|
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 },
|
|
29656
|
+
!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
29657
|
React.createElement("div", null,
|
|
29582
29658
|
React.createElement("div", { className: styles$7.CustonerText }, vm.checkout.customerText),
|
|
29583
29659
|
React.createElement("div", { className: styles$7.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
|
|
@@ -29710,12 +29786,12 @@ var CreditCardForm = mobxReactLite.observer(function (_a) {
|
|
|
29710
29786
|
});
|
|
29711
29787
|
return (React.createElement("div", null,
|
|
29712
29788
|
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 })),
|
|
29789
|
+
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
29790
|
React.createElement("div", { className: styles$3.RowPB },
|
|
29715
29791
|
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
29792
|
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 })),
|
|
29793
|
+
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 }),
|
|
29794
|
+
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
29795
|
React.createElement("div", { style: { marginTop: "0.4em" } },
|
|
29720
29796
|
React.createElement(Checkbox, { value: cardData.threeDSecure, onChange: onThreeDSecureChange, label: "3D Secure kullan" }))));
|
|
29721
29797
|
});
|
|
@@ -29963,7 +30039,9 @@ var CartSummary = mobxReactLite.observer(function (_a) {
|
|
|
29963
30039
|
React.createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
|
|
29964
30040
|
" ",
|
|
29965
30041
|
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)) || [])
|
|
30042
|
+
(((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
|
|
30043
|
+
.filter(function (adjustment) { return adjustment.amount !== 0; })
|
|
30044
|
+
.map(function (adjustment, index) { return (React.createElement("div", { className: styles$g.InfoRow, key: index },
|
|
29967
30045
|
React.createElement("div", { className: styles$g.Label }, adjustment.name),
|
|
29968
30046
|
React.createElement("div", { className: styles$g.Value },
|
|
29969
30047
|
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;
|