kwikid-forms 0.6.12 → 0.6.13
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/bundles/kwikid-forms.umd.js +786 -326
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/config-converter/config-converter.js +52 -48
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +7 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.apis.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +153 -6
- package/esm2015/lib/renderer/form-view/form-view.service.js +12 -2
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +81 -7
- package/esm2015/lib/renderer/form-view/helpers/form-view.defaults.helper.js +31 -1
- package/fesm2015/kwikid-forms.js +327 -56
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +7 -1
- package/lib/renderer/form-view/definitions/form-view.apis.definition.d.ts +3 -3
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +6 -0
- package/lib/renderer/form-view/form-view.component.d.ts +7 -1
- package/lib/renderer/form-view/helpers/form-view.defaults.helper.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1203,7 +1203,8 @@
|
|
|
1203
1203
|
logo: {
|
|
1204
1204
|
src: "",
|
|
1205
1205
|
alt: "Logo",
|
|
1206
|
-
hidden: false
|
|
1206
|
+
hidden: false,
|
|
1207
|
+
styles: ""
|
|
1207
1208
|
},
|
|
1208
1209
|
backButton: {
|
|
1209
1210
|
mode: "TABBED",
|
|
@@ -1212,10 +1213,12 @@
|
|
|
1212
1213
|
},
|
|
1213
1214
|
title: {
|
|
1214
1215
|
hidden: false,
|
|
1215
|
-
label: (_b = (_a = formConfig === null || formConfig === void 0 ? void 0 : formConfig.title) !== null && _a !== void 0 ? _a : formConfig === null || formConfig === void 0 ? void 0 : formConfig.props.title) !== null && _b !== void 0 ? _b : "Form"
|
|
1216
|
+
label: (_b = (_a = formConfig === null || formConfig === void 0 ? void 0 : formConfig.title) !== null && _a !== void 0 ? _a : formConfig === null || formConfig === void 0 ? void 0 : formConfig.props.title) !== null && _b !== void 0 ? _b : "Form",
|
|
1217
|
+
styles: ""
|
|
1216
1218
|
},
|
|
1217
1219
|
steps: {
|
|
1218
|
-
hidden: false
|
|
1220
|
+
hidden: false,
|
|
1221
|
+
styles: ""
|
|
1219
1222
|
}
|
|
1220
1223
|
},
|
|
1221
1224
|
main: {
|
|
@@ -1639,49 +1642,6 @@
|
|
|
1639
1642
|
return field;
|
|
1640
1643
|
};
|
|
1641
1644
|
var updateFieldDefaultValue = function (field) {
|
|
1642
|
-
var defaultValue = {
|
|
1643
|
-
value: {
|
|
1644
|
-
is_found: false,
|
|
1645
|
-
value: "",
|
|
1646
|
-
sources: [
|
|
1647
|
-
{
|
|
1648
|
-
key: "OBJECT",
|
|
1649
|
-
props: {
|
|
1650
|
-
object: {
|
|
1651
|
-
key: "FORM_DATA",
|
|
1652
|
-
path: "$." + field.key
|
|
1653
|
-
}
|
|
1654
|
-
},
|
|
1655
|
-
value: "",
|
|
1656
|
-
validation: {
|
|
1657
|
-
is_valid: false,
|
|
1658
|
-
triggers: ["ON_INIT"],
|
|
1659
|
-
rules: [],
|
|
1660
|
-
actions: [
|
|
1661
|
-
{
|
|
1662
|
-
id: "1",
|
|
1663
|
-
key: "SET_FIELD_DEFAULT_VALUE",
|
|
1664
|
-
condition: "1",
|
|
1665
|
-
props: {
|
|
1666
|
-
value: {
|
|
1667
|
-
source: {
|
|
1668
|
-
key: "OBJECT",
|
|
1669
|
-
props: {
|
|
1670
|
-
object: {
|
|
1671
|
-
key: "FORM_DATA",
|
|
1672
|
-
path: "$." + field.key
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
]
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
]
|
|
1683
|
-
}
|
|
1684
|
-
};
|
|
1685
1645
|
if (field.isFormElement) {
|
|
1686
1646
|
if (kwikidToolkit.checkObjectKeyExists(field, "defaultValue")) {
|
|
1687
1647
|
return field;
|
|
@@ -1690,7 +1650,48 @@
|
|
|
1690
1650
|
return field;
|
|
1691
1651
|
}
|
|
1692
1652
|
else if (!kwikidToolkit.checkObjectPathExists(field, "default.value.sources")) {
|
|
1693
|
-
|
|
1653
|
+
var defaultValue = {
|
|
1654
|
+
is_found: false,
|
|
1655
|
+
value: "",
|
|
1656
|
+
sources: [
|
|
1657
|
+
{
|
|
1658
|
+
key: "OBJECT",
|
|
1659
|
+
props: {
|
|
1660
|
+
object: {
|
|
1661
|
+
key: "FORM_DATA",
|
|
1662
|
+
path: "$." + field.key
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
value: "",
|
|
1666
|
+
validation: {
|
|
1667
|
+
is_valid: false,
|
|
1668
|
+
triggers: ["ON_INIT"],
|
|
1669
|
+
rules: [],
|
|
1670
|
+
actions: [
|
|
1671
|
+
{
|
|
1672
|
+
id: "1",
|
|
1673
|
+
key: "SET_FIELD_DEFAULT_VALUE",
|
|
1674
|
+
condition: "1",
|
|
1675
|
+
props: {
|
|
1676
|
+
value: {
|
|
1677
|
+
source: {
|
|
1678
|
+
key: "OBJECT",
|
|
1679
|
+
props: {
|
|
1680
|
+
object: {
|
|
1681
|
+
key: "FORM_DATA",
|
|
1682
|
+
path: "$." + field.key
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
]
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
]
|
|
1693
|
+
};
|
|
1694
|
+
field = kwikidToolkit.setValueToObjectPath(field, "default.value", defaultValue);
|
|
1694
1695
|
return field;
|
|
1695
1696
|
}
|
|
1696
1697
|
delete field["defaultVal"];
|
|
@@ -1752,7 +1753,10 @@
|
|
|
1752
1753
|
field = formatOnFieldType(field);
|
|
1753
1754
|
field = updateFieldDisability(field);
|
|
1754
1755
|
fieldGroups = updateFormFieldGroups(fieldGroups, field);
|
|
1756
|
+
console.log("sadssadasdsdda");
|
|
1757
|
+
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
1755
1758
|
field = updateFieldDefaultValue(field);
|
|
1759
|
+
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
1756
1760
|
field = updateFieldValidators(field);
|
|
1757
1761
|
field = updateFieldResetButton(field);
|
|
1758
1762
|
field = updateFieldMessages(field);
|
|
@@ -2769,6 +2773,12 @@
|
|
|
2769
2773
|
(function (EActionKey) {
|
|
2770
2774
|
EActionKey["SET_VALUE"] = "SET_VALUE";
|
|
2771
2775
|
EActionKey["SET_FIELD_DEFAULT_VALUE"] = "SET_FIELD_DEFAULT_VALUE";
|
|
2776
|
+
EActionKey["SET_API_STATUS"] = "SET_API_STATUS";
|
|
2777
|
+
EActionKey["SET_API_HEADER_VALUE"] = "SET_API_HEADER_VALUE";
|
|
2778
|
+
EActionKey["SET_API_HEADER_VALIDITY"] = "SET_API_HEADER_VALIDITY";
|
|
2779
|
+
EActionKey["SET_API_BODY_VALUE"] = "SET_API_BODY_VALUE";
|
|
2780
|
+
EActionKey["SET_API_BODY_VALIDITY"] = "SET_API_BODY_VALIDITY";
|
|
2781
|
+
EActionKey["SET_FIELD_VALIDITY"] = "SET_FIELD_VALIDITY";
|
|
2772
2782
|
EActionKey["FIELD_MESSAGE_SHOW"] = "FIELD_MESSAGE_SHOW";
|
|
2773
2783
|
EActionKey["FIELD_MESSAGES_HIDE"] = "FIELD_MESSAGES_HIDE";
|
|
2774
2784
|
EActionKey["FIELD_ERROR_SHOW"] = "FIELD_ERROR_SHOW";
|
|
@@ -2942,16 +2952,16 @@
|
|
|
2942
2952
|
});
|
|
2943
2953
|
});
|
|
2944
2954
|
};
|
|
2945
|
-
Defaults.prototype.
|
|
2955
|
+
Defaults.prototype.getFormFieldApiValue = function () {
|
|
2946
2956
|
return __awaiter(this, void 0, void 0, function () {
|
|
2947
|
-
var
|
|
2957
|
+
var apiConfig, rules, actions, rulesMapping, actions_3, actions_3_1, action, conditionEvaluation, actions_4, e_3_1;
|
|
2948
2958
|
var e_3, _a;
|
|
2949
2959
|
return __generator(this, function (_b) {
|
|
2950
2960
|
switch (_b.label) {
|
|
2951
2961
|
case 0:
|
|
2952
|
-
|
|
2953
|
-
rules =
|
|
2954
|
-
actions =
|
|
2962
|
+
apiConfig = this._field.default.api;
|
|
2963
|
+
rules = apiConfig.rules;
|
|
2964
|
+
actions = apiConfig.actions;
|
|
2955
2965
|
rulesMapping = new kwikidToolkit.Rule(rules, {
|
|
2956
2966
|
FIELD_CONFIG: this._field,
|
|
2957
2967
|
FORM_FIELDS: this._formFields,
|
|
@@ -2999,11 +3009,71 @@
|
|
|
2999
3009
|
});
|
|
3000
3010
|
});
|
|
3001
3011
|
};
|
|
3012
|
+
Defaults.prototype.getFormFieldOptions = function () {
|
|
3013
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3014
|
+
var optionsConfig, rules, actions, rulesMapping, actions_5, actions_5_1, action, conditionEvaluation, actions_6, e_4_1;
|
|
3015
|
+
var e_4, _a;
|
|
3016
|
+
return __generator(this, function (_b) {
|
|
3017
|
+
switch (_b.label) {
|
|
3018
|
+
case 0:
|
|
3019
|
+
optionsConfig = this._field.default.options;
|
|
3020
|
+
rules = optionsConfig.rules;
|
|
3021
|
+
actions = optionsConfig.actions;
|
|
3022
|
+
rulesMapping = new kwikidToolkit.Rule(rules, {
|
|
3023
|
+
FIELD_CONFIG: this._field,
|
|
3024
|
+
FORM_FIELDS: this._formFields,
|
|
3025
|
+
FORM_DATA: this._formData,
|
|
3026
|
+
PREVIOUS_FORM_DATA: this._previousFormData,
|
|
3027
|
+
ALL_FORMS_DATA: this._allFormsData
|
|
3028
|
+
}).mapping();
|
|
3029
|
+
_b.label = 1;
|
|
3030
|
+
case 1:
|
|
3031
|
+
_b.trys.push([1, 6, 7, 8]);
|
|
3032
|
+
actions_5 = __values(actions), actions_5_1 = actions_5.next();
|
|
3033
|
+
_b.label = 2;
|
|
3034
|
+
case 2:
|
|
3035
|
+
if (!!actions_5_1.done) return [3 /*break*/, 5];
|
|
3036
|
+
action = actions_5_1.value;
|
|
3037
|
+
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3038
|
+
if (!conditionEvaluation) return [3 /*break*/, 4];
|
|
3039
|
+
actions_6 = new kwikidToolkit.Action(action, rulesMapping, {
|
|
3040
|
+
FIELD_CONFIG: this._field,
|
|
3041
|
+
FORM_FIELDS: this._formFields,
|
|
3042
|
+
FORM_DATA: this._formData,
|
|
3043
|
+
PREVIOUS_FORM_DATA: this._previousFormData,
|
|
3044
|
+
ALL_FORMS_DATA: this._allFormsData
|
|
3045
|
+
}, this._takeAction);
|
|
3046
|
+
return [4 /*yield*/, actions_6.execute()];
|
|
3047
|
+
case 3:
|
|
3048
|
+
_b.sent();
|
|
3049
|
+
_b.label = 4;
|
|
3050
|
+
case 4:
|
|
3051
|
+
actions_5_1 = actions_5.next();
|
|
3052
|
+
return [3 /*break*/, 2];
|
|
3053
|
+
case 5: return [3 /*break*/, 8];
|
|
3054
|
+
case 6:
|
|
3055
|
+
e_4_1 = _b.sent();
|
|
3056
|
+
e_4 = { error: e_4_1 };
|
|
3057
|
+
return [3 /*break*/, 8];
|
|
3058
|
+
case 7:
|
|
3059
|
+
try {
|
|
3060
|
+
if (actions_5_1 && !actions_5_1.done && (_a = actions_5.return)) _a.call(actions_5);
|
|
3061
|
+
}
|
|
3062
|
+
finally { if (e_4) throw e_4.error; }
|
|
3063
|
+
return [7 /*endfinally*/];
|
|
3064
|
+
case 8: return [2 /*return*/];
|
|
3065
|
+
}
|
|
3066
|
+
});
|
|
3067
|
+
});
|
|
3068
|
+
};
|
|
3002
3069
|
return Defaults;
|
|
3003
3070
|
}());
|
|
3004
3071
|
__decorate([
|
|
3005
3072
|
kwikidToolkit.logMethod
|
|
3006
3073
|
], Defaults.prototype, "getFormFieldValue", null);
|
|
3074
|
+
__decorate([
|
|
3075
|
+
kwikidToolkit.logMethod
|
|
3076
|
+
], Defaults.prototype, "getFormFieldApiValue", null);
|
|
3007
3077
|
__decorate([
|
|
3008
3078
|
kwikidToolkit.logMethod
|
|
3009
3079
|
], Defaults.prototype, "getFormFieldOptions", null);
|
|
@@ -3139,13 +3209,13 @@
|
|
|
3139
3209
|
formGroup = new i3.FormGroup({});
|
|
3140
3210
|
_b.label = 1;
|
|
3141
3211
|
case 1:
|
|
3142
|
-
_b.trys.push([1,
|
|
3212
|
+
_b.trys.push([1, 11, 12, 13]);
|
|
3143
3213
|
fields_1 = __values(fields), fields_1_1 = fields_1.next();
|
|
3144
3214
|
_b.label = 2;
|
|
3145
3215
|
case 2:
|
|
3146
|
-
if (!!fields_1_1.done) return [3 /*break*/,
|
|
3216
|
+
if (!!fields_1_1.done) return [3 /*break*/, 10];
|
|
3147
3217
|
field = fields_1_1.value;
|
|
3148
|
-
if (!field.isFormElement) return [3 /*break*/,
|
|
3218
|
+
if (!field.isFormElement) return [3 /*break*/, 9];
|
|
3149
3219
|
defaults = new Defaults(field, fields, allFormsData, formData, previousFormData, takeAction);
|
|
3150
3220
|
value = "";
|
|
3151
3221
|
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 4];
|
|
@@ -3155,33 +3225,45 @@
|
|
|
3155
3225
|
value = _b.sent();
|
|
3156
3226
|
_b.label = 4;
|
|
3157
3227
|
case 4:
|
|
3228
|
+
console.log("sdasgdjsgsadaghas");
|
|
3229
|
+
console.log("sdasgdjsgsadaghas1");
|
|
3158
3230
|
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 6];
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
return [
|
|
3231
|
+
console.log("sdasgdjsgsadaghas2");
|
|
3232
|
+
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
3233
|
+
if (!kwikidToolkit.checkObjectKeyExists(field.default, "api")) return [3 /*break*/, 6];
|
|
3234
|
+
console.log("sdasgdjsgsadaghas3");
|
|
3235
|
+
return [4 /*yield*/, defaults.getFormFieldApiValue()];
|
|
3162
3236
|
case 5:
|
|
3163
3237
|
_b.sent();
|
|
3164
3238
|
_b.label = 6;
|
|
3165
3239
|
case 6:
|
|
3240
|
+
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 8];
|
|
3241
|
+
if (!kwikidToolkit.checkObjectKeyExists(field.default, "options")) return [3 /*break*/, 8];
|
|
3242
|
+
if (!field.default.options.triggers.includes("ON_INIT")) return [3 /*break*/, 8];
|
|
3243
|
+
return [4 /*yield*/, defaults.getFormFieldOptions()];
|
|
3244
|
+
case 7:
|
|
3245
|
+
_b.sent();
|
|
3246
|
+
_b.label = 8;
|
|
3247
|
+
case 8:
|
|
3166
3248
|
value = convertFormFieldValueToKwikUIFormat(field, value);
|
|
3167
3249
|
validators = new FormValidation().getFormFieldValidators(field);
|
|
3168
3250
|
formGroup.addControl(field.key, new i3.FormControl({ value: value, disabled: field.disabled }, { validators: validators }));
|
|
3169
|
-
_b.label =
|
|
3170
|
-
case
|
|
3251
|
+
_b.label = 9;
|
|
3252
|
+
case 9:
|
|
3171
3253
|
fields_1_1 = fields_1.next();
|
|
3172
3254
|
return [3 /*break*/, 2];
|
|
3173
|
-
case
|
|
3174
|
-
case
|
|
3255
|
+
case 10: return [3 /*break*/, 13];
|
|
3256
|
+
case 11:
|
|
3175
3257
|
e_1_1 = _b.sent();
|
|
3176
3258
|
e_1 = { error: e_1_1 };
|
|
3177
|
-
return [3 /*break*/,
|
|
3178
|
-
case
|
|
3259
|
+
return [3 /*break*/, 13];
|
|
3260
|
+
case 12:
|
|
3179
3261
|
try {
|
|
3180
3262
|
if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);
|
|
3181
3263
|
}
|
|
3182
3264
|
finally { if (e_1) throw e_1.error; }
|
|
3183
3265
|
return [7 /*endfinally*/];
|
|
3184
|
-
case
|
|
3266
|
+
case 13: return [2 /*return*/, formGroup];
|
|
3185
3267
|
}
|
|
3186
3268
|
});
|
|
3187
3269
|
});
|
|
@@ -3212,54 +3294,54 @@
|
|
|
3212
3294
|
Apis.prototype.setUrl = function () {
|
|
3213
3295
|
return __awaiter(this, void 0, void 0, function () {
|
|
3214
3296
|
var source, url;
|
|
3215
|
-
return __generator(this, function (
|
|
3216
|
-
switch (
|
|
3297
|
+
return __generator(this, function (_l) {
|
|
3298
|
+
switch (_l.label) {
|
|
3217
3299
|
case 0:
|
|
3218
3300
|
if (!(this._request.url.hasOwnProperty("type") &&
|
|
3219
3301
|
this._request.url.type === EApiRequestUrlType.CALCULATED)) return [3 /*break*/, 2];
|
|
3220
3302
|
source = new kwikidToolkit.Source(this._object);
|
|
3221
3303
|
return [4 /*yield*/, source.getValueFromSource(this._request.url.props.value.source)];
|
|
3222
3304
|
case 1:
|
|
3223
|
-
url =
|
|
3305
|
+
url = _l.sent();
|
|
3224
3306
|
this._request.url = kwikidToolkit.setValueToObjectPath(this._request.url, "value", url);
|
|
3225
3307
|
return [3 /*break*/, 3];
|
|
3226
3308
|
case 2:
|
|
3227
3309
|
if (typeof this._request.url === "string") {
|
|
3228
3310
|
this._request.url = kwikidToolkit.setValueToObjectPath({}, "value", this._request.url);
|
|
3229
3311
|
}
|
|
3230
|
-
|
|
3312
|
+
_l.label = 3;
|
|
3231
3313
|
case 3: return [2 /*return*/, this._object.API_CONFIG];
|
|
3232
3314
|
}
|
|
3233
3315
|
});
|
|
3234
3316
|
});
|
|
3235
3317
|
};
|
|
3236
3318
|
Apis.prototype.setRequestBody = function () {
|
|
3237
|
-
var _a, _b, _c, _d;
|
|
3319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3238
3320
|
return __awaiter(this, void 0, void 0, function () {
|
|
3239
|
-
var params, paramIndex, params_1, params_1_1, param, sources, sourceIndex, sources_1, sources_1_1, source, sources_2, value, validation, triggers, rules, actions, rulesMapping, actions_1, actions_1_1, action, conditionEvaluation,
|
|
3240
|
-
var e_3,
|
|
3241
|
-
return __generator(this, function (
|
|
3242
|
-
switch (
|
|
3321
|
+
var params, paramIndex, params_1, params_1_1, param, sources, sourceIndex, sources_1, sources_1_1, source, sources_2, value, validation, triggers, rules, actions, rulesMapping, actions_1, actions_1_1, action, conditionEvaluation, actions_3, e_1_1, e_2_1, e_3_1, triggers, rules, actions, rulesMapping, actions_2, actions_2_1, action, conditionEvaluation, actions_4, e_4_1;
|
|
3322
|
+
var e_3, _l, e_2, _m, e_1, _o, e_4, _p;
|
|
3323
|
+
return __generator(this, function (_q) {
|
|
3324
|
+
switch (_q.label) {
|
|
3243
3325
|
case 0:
|
|
3244
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/,
|
|
3326
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/, 34];
|
|
3245
3327
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.body, "params")) return [3 /*break*/, 23];
|
|
3246
3328
|
params = this._request.body.params;
|
|
3247
3329
|
paramIndex = 0;
|
|
3248
|
-
|
|
3330
|
+
_q.label = 1;
|
|
3249
3331
|
case 1:
|
|
3250
|
-
|
|
3332
|
+
_q.trys.push([1, 20, 21, 22]);
|
|
3251
3333
|
params_1 = __values(params), params_1_1 = params_1.next();
|
|
3252
|
-
|
|
3334
|
+
_q.label = 2;
|
|
3253
3335
|
case 2:
|
|
3254
3336
|
if (!!params_1_1.done) return [3 /*break*/, 19];
|
|
3255
3337
|
param = params_1_1.value;
|
|
3256
3338
|
sources = param.sources;
|
|
3257
3339
|
sourceIndex = 0;
|
|
3258
|
-
|
|
3340
|
+
_q.label = 3;
|
|
3259
3341
|
case 3:
|
|
3260
|
-
|
|
3342
|
+
_q.trys.push([3, 15, 16, 17]);
|
|
3261
3343
|
sources_1 = (e_2 = void 0, __values(sources)), sources_1_1 = sources_1.next();
|
|
3262
|
-
|
|
3344
|
+
_q.label = 4;
|
|
3263
3345
|
case 4:
|
|
3264
3346
|
if (!!sources_1_1.done) return [3 /*break*/, 14];
|
|
3265
3347
|
source = sources_1_1.value;
|
|
@@ -3272,87 +3354,124 @@
|
|
|
3272
3354
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3273
3355
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3274
3356
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3275
|
-
|
|
3357
|
+
_q.label = 5;
|
|
3276
3358
|
case 5:
|
|
3277
|
-
|
|
3359
|
+
_q.trys.push([5, 10, 11, 12]);
|
|
3278
3360
|
actions_1 = (e_1 = void 0, __values(actions)), actions_1_1 = actions_1.next();
|
|
3279
|
-
|
|
3361
|
+
_q.label = 6;
|
|
3280
3362
|
case 6:
|
|
3281
3363
|
if (!!actions_1_1.done) return [3 /*break*/, 9];
|
|
3282
3364
|
action = actions_1_1.value;
|
|
3283
3365
|
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3284
3366
|
if (!conditionEvaluation) return [3 /*break*/, 8];
|
|
3285
|
-
|
|
3286
|
-
return [4 /*yield*/,
|
|
3367
|
+
actions_3 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3368
|
+
return [4 /*yield*/, actions_3.execute()];
|
|
3287
3369
|
case 7:
|
|
3288
|
-
|
|
3289
|
-
|
|
3370
|
+
_q.sent();
|
|
3371
|
+
_q.label = 8;
|
|
3290
3372
|
case 8:
|
|
3291
3373
|
actions_1_1 = actions_1.next();
|
|
3292
3374
|
return [3 /*break*/, 6];
|
|
3293
3375
|
case 9: return [3 /*break*/, 12];
|
|
3294
3376
|
case 10:
|
|
3295
|
-
e_1_1 =
|
|
3377
|
+
e_1_1 = _q.sent();
|
|
3296
3378
|
e_1 = { error: e_1_1 };
|
|
3297
3379
|
return [3 /*break*/, 12];
|
|
3298
3380
|
case 11:
|
|
3299
3381
|
try {
|
|
3300
|
-
if (actions_1_1 && !actions_1_1.done && (
|
|
3382
|
+
if (actions_1_1 && !actions_1_1.done && (_o = actions_1.return)) _o.call(actions_1);
|
|
3301
3383
|
}
|
|
3302
3384
|
finally { if (e_1) throw e_1.error; }
|
|
3303
3385
|
return [7 /*endfinally*/];
|
|
3304
3386
|
case 12:
|
|
3305
3387
|
sourceIndex++;
|
|
3306
|
-
|
|
3388
|
+
_q.label = 13;
|
|
3307
3389
|
case 13:
|
|
3308
3390
|
sources_1_1 = sources_1.next();
|
|
3309
3391
|
return [3 /*break*/, 4];
|
|
3310
3392
|
case 14: return [3 /*break*/, 17];
|
|
3311
3393
|
case 15:
|
|
3312
|
-
e_2_1 =
|
|
3394
|
+
e_2_1 = _q.sent();
|
|
3313
3395
|
e_2 = { error: e_2_1 };
|
|
3314
3396
|
return [3 /*break*/, 17];
|
|
3315
3397
|
case 16:
|
|
3316
3398
|
try {
|
|
3317
|
-
if (sources_1_1 && !sources_1_1.done && (
|
|
3399
|
+
if (sources_1_1 && !sources_1_1.done && (_m = sources_1.return)) _m.call(sources_1);
|
|
3318
3400
|
}
|
|
3319
3401
|
finally { if (e_2) throw e_2.error; }
|
|
3320
3402
|
return [7 /*endfinally*/];
|
|
3321
3403
|
case 17:
|
|
3322
3404
|
paramIndex++;
|
|
3323
|
-
|
|
3405
|
+
_q.label = 18;
|
|
3324
3406
|
case 18:
|
|
3325
3407
|
params_1_1 = params_1.next();
|
|
3326
3408
|
return [3 /*break*/, 2];
|
|
3327
3409
|
case 19: return [3 /*break*/, 22];
|
|
3328
3410
|
case 20:
|
|
3329
|
-
e_3_1 =
|
|
3411
|
+
e_3_1 = _q.sent();
|
|
3330
3412
|
e_3 = { error: e_3_1 };
|
|
3331
3413
|
return [3 /*break*/, 22];
|
|
3332
3414
|
case 21:
|
|
3333
3415
|
try {
|
|
3334
|
-
if (params_1_1 && !params_1_1.done && (
|
|
3416
|
+
if (params_1_1 && !params_1_1.done && (_l = params_1.return)) _l.call(params_1);
|
|
3335
3417
|
}
|
|
3336
3418
|
finally { if (e_3) throw e_3.error; }
|
|
3337
3419
|
return [7 /*endfinally*/];
|
|
3338
3420
|
case 22: return [2 /*return*/, this._object.API_CONFIG];
|
|
3339
|
-
case 23:
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3421
|
+
case 23:
|
|
3422
|
+
if (!(kwikidToolkit.checkObjectKeyExists(this._request.body, "rules") &&
|
|
3423
|
+
kwikidToolkit.checkObjectKeyExists(this._request.body, "actions"))) return [3 /*break*/, 32];
|
|
3424
|
+
triggers = (_f = (_e = this._request.body) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3425
|
+
rules = (_h = (_g = this._request.body) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3426
|
+
actions = (_k = (_j = this._request.body) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3427
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3428
|
+
_q.label = 24;
|
|
3429
|
+
case 24:
|
|
3430
|
+
_q.trys.push([24, 29, 30, 31]);
|
|
3431
|
+
actions_2 = __values(actions), actions_2_1 = actions_2.next();
|
|
3432
|
+
_q.label = 25;
|
|
3433
|
+
case 25:
|
|
3434
|
+
if (!!actions_2_1.done) return [3 /*break*/, 28];
|
|
3435
|
+
action = actions_2_1.value;
|
|
3436
|
+
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3437
|
+
if (!conditionEvaluation) return [3 /*break*/, 27];
|
|
3438
|
+
actions_4 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3439
|
+
return [4 /*yield*/, actions_4.execute()];
|
|
3440
|
+
case 26:
|
|
3441
|
+
_q.sent();
|
|
3442
|
+
_q.label = 27;
|
|
3443
|
+
case 27:
|
|
3444
|
+
actions_2_1 = actions_2.next();
|
|
3445
|
+
return [3 /*break*/, 25];
|
|
3446
|
+
case 28: return [3 /*break*/, 31];
|
|
3447
|
+
case 29:
|
|
3448
|
+
e_4_1 = _q.sent();
|
|
3449
|
+
e_4 = { error: e_4_1 };
|
|
3450
|
+
return [3 /*break*/, 31];
|
|
3451
|
+
case 30:
|
|
3452
|
+
try {
|
|
3453
|
+
if (actions_2_1 && !actions_2_1.done && (_p = actions_2.return)) _p.call(actions_2);
|
|
3454
|
+
}
|
|
3455
|
+
finally { if (e_4) throw e_4.error; }
|
|
3456
|
+
return [7 /*endfinally*/];
|
|
3457
|
+
case 31: return [2 /*return*/, this._object.API_CONFIG];
|
|
3458
|
+
case 32: return [2 /*return*/, this._object.API_CONFIG];
|
|
3459
|
+
case 33: return [3 /*break*/, 35];
|
|
3460
|
+
case 34: return [2 /*return*/, this._object.API_CONFIG];
|
|
3461
|
+
case 35: return [2 /*return*/];
|
|
3343
3462
|
}
|
|
3344
3463
|
});
|
|
3345
3464
|
});
|
|
3346
3465
|
};
|
|
3347
3466
|
Apis.prototype.validateRequestBody = function () {
|
|
3348
|
-
var _a, _b, _c, _d;
|
|
3467
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3349
3468
|
return __awaiter(this, void 0, void 0, function () {
|
|
3350
|
-
var body, validation, triggers, rules, actions, rulesMapping,
|
|
3351
|
-
var
|
|
3352
|
-
return __generator(this, function (
|
|
3353
|
-
switch (
|
|
3469
|
+
var body, validation, triggers, rules, actions, rulesMapping, actions_5, actions_5_1, action, conditionSuccess, actions_7, e_5_1, triggers, rules, actions, rulesMapping, actions_6, actions_6_1, action, conditionSuccess, actions_8, e_6_1;
|
|
3470
|
+
var e_5, _l, e_6, _m;
|
|
3471
|
+
return __generator(this, function (_o) {
|
|
3472
|
+
switch (_o.label) {
|
|
3354
3473
|
case 0:
|
|
3355
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/,
|
|
3474
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/, 20];
|
|
3356
3475
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.body, "validation")) return [3 /*break*/, 9];
|
|
3357
3476
|
body = this._request.body;
|
|
3358
3477
|
validation = body.validation;
|
|
@@ -3360,75 +3479,112 @@
|
|
|
3360
3479
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3361
3480
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3362
3481
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3363
|
-
|
|
3482
|
+
_o.label = 1;
|
|
3364
3483
|
case 1:
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3484
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
3485
|
+
actions_5 = __values(actions), actions_5_1 = actions_5.next();
|
|
3486
|
+
_o.label = 2;
|
|
3368
3487
|
case 2:
|
|
3369
|
-
if (!!
|
|
3370
|
-
action =
|
|
3488
|
+
if (!!actions_5_1.done) return [3 /*break*/, 5];
|
|
3489
|
+
action = actions_5_1.value;
|
|
3371
3490
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3372
3491
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3373
|
-
|
|
3374
|
-
return [4 /*yield*/,
|
|
3492
|
+
actions_7 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3493
|
+
return [4 /*yield*/, actions_7.execute()];
|
|
3375
3494
|
case 3:
|
|
3376
|
-
|
|
3377
|
-
|
|
3495
|
+
_o.sent();
|
|
3496
|
+
_o.label = 4;
|
|
3378
3497
|
case 4:
|
|
3379
|
-
|
|
3498
|
+
actions_5_1 = actions_5.next();
|
|
3380
3499
|
return [3 /*break*/, 2];
|
|
3381
3500
|
case 5: return [3 /*break*/, 8];
|
|
3382
3501
|
case 6:
|
|
3383
|
-
|
|
3384
|
-
|
|
3502
|
+
e_5_1 = _o.sent();
|
|
3503
|
+
e_5 = { error: e_5_1 };
|
|
3385
3504
|
return [3 /*break*/, 8];
|
|
3386
3505
|
case 7:
|
|
3387
3506
|
try {
|
|
3388
|
-
if (
|
|
3507
|
+
if (actions_5_1 && !actions_5_1.done && (_l = actions_5.return)) _l.call(actions_5);
|
|
3389
3508
|
}
|
|
3390
|
-
finally { if (
|
|
3509
|
+
finally { if (e_5) throw e_5.error; }
|
|
3391
3510
|
return [7 /*endfinally*/];
|
|
3392
3511
|
case 8: return [2 /*return*/, this._object.API_CONFIG];
|
|
3393
3512
|
case 9:
|
|
3513
|
+
if (!(kwikidToolkit.checkObjectPathExists(this._request.body, "rules") &&
|
|
3514
|
+
kwikidToolkit.checkObjectPathExists(this._request.body, "actions"))) return [3 /*break*/, 18];
|
|
3515
|
+
triggers = (_f = (_e = this._request.body) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3516
|
+
rules = (_h = (_g = this._request.body) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3517
|
+
actions = (_k = (_j = this._request.body) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3518
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3519
|
+
_o.label = 10;
|
|
3520
|
+
case 10:
|
|
3521
|
+
_o.trys.push([10, 15, 16, 17]);
|
|
3522
|
+
actions_6 = __values(actions), actions_6_1 = actions_6.next();
|
|
3523
|
+
_o.label = 11;
|
|
3524
|
+
case 11:
|
|
3525
|
+
if (!!actions_6_1.done) return [3 /*break*/, 14];
|
|
3526
|
+
action = actions_6_1.value;
|
|
3527
|
+
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3528
|
+
if (!conditionSuccess) return [3 /*break*/, 13];
|
|
3529
|
+
actions_8 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3530
|
+
return [4 /*yield*/, actions_8.execute()];
|
|
3531
|
+
case 12:
|
|
3532
|
+
_o.sent();
|
|
3533
|
+
_o.label = 13;
|
|
3534
|
+
case 13:
|
|
3535
|
+
actions_6_1 = actions_6.next();
|
|
3536
|
+
return [3 /*break*/, 11];
|
|
3537
|
+
case 14: return [3 /*break*/, 17];
|
|
3538
|
+
case 15:
|
|
3539
|
+
e_6_1 = _o.sent();
|
|
3540
|
+
e_6 = { error: e_6_1 };
|
|
3541
|
+
return [3 /*break*/, 17];
|
|
3542
|
+
case 16:
|
|
3543
|
+
try {
|
|
3544
|
+
if (actions_6_1 && !actions_6_1.done && (_m = actions_6.return)) _m.call(actions_6);
|
|
3545
|
+
}
|
|
3546
|
+
finally { if (e_6) throw e_6.error; }
|
|
3547
|
+
return [7 /*endfinally*/];
|
|
3548
|
+
case 17: return [2 /*return*/, this._object.API_CONFIG];
|
|
3549
|
+
case 18:
|
|
3394
3550
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.body.is_valid", true);
|
|
3395
3551
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3396
|
-
case
|
|
3397
|
-
case
|
|
3552
|
+
case 19: return [3 /*break*/, 21];
|
|
3553
|
+
case 20:
|
|
3398
3554
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.body.is_valid", true);
|
|
3399
3555
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3400
|
-
case
|
|
3556
|
+
case 21: return [2 /*return*/];
|
|
3401
3557
|
}
|
|
3402
3558
|
});
|
|
3403
3559
|
});
|
|
3404
3560
|
};
|
|
3405
3561
|
Apis.prototype.setRequestHeaders = function () {
|
|
3406
|
-
var _a, _b, _c, _d;
|
|
3562
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3407
3563
|
return __awaiter(this, void 0, void 0, function () {
|
|
3408
|
-
var params, paramIndex, params_2, params_2_1, param, sources, sourceIndex, sources_3, sources_3_1, source, sources_4, value, validation, triggers, rules, actions, rulesMapping,
|
|
3409
|
-
var
|
|
3410
|
-
return __generator(this, function (
|
|
3411
|
-
switch (
|
|
3564
|
+
var params, paramIndex, params_2, params_2_1, param, sources, sourceIndex, sources_3, sources_3_1, source, sources_4, value, validation, triggers, rules, actions, rulesMapping, actions_9, actions_9_1, action, conditionEvaluation, actions_11, e_7_1, e_8_1, e_9_1, triggers, rules, actions, rulesMapping, actions_10, actions_10_1, action, conditionEvaluation, actions_12, e_10_1;
|
|
3565
|
+
var e_9, _l, e_8, _m, e_7, _o, e_10, _p;
|
|
3566
|
+
return __generator(this, function (_q) {
|
|
3567
|
+
switch (_q.label) {
|
|
3412
3568
|
case 0:
|
|
3413
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/,
|
|
3569
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/, 34];
|
|
3414
3570
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.headers, "params")) return [3 /*break*/, 23];
|
|
3415
3571
|
params = this._request.headers.params;
|
|
3416
3572
|
paramIndex = 0;
|
|
3417
|
-
|
|
3573
|
+
_q.label = 1;
|
|
3418
3574
|
case 1:
|
|
3419
|
-
|
|
3575
|
+
_q.trys.push([1, 20, 21, 22]);
|
|
3420
3576
|
params_2 = __values(params), params_2_1 = params_2.next();
|
|
3421
|
-
|
|
3577
|
+
_q.label = 2;
|
|
3422
3578
|
case 2:
|
|
3423
3579
|
if (!!params_2_1.done) return [3 /*break*/, 19];
|
|
3424
3580
|
param = params_2_1.value;
|
|
3425
3581
|
sources = param.sources;
|
|
3426
3582
|
sourceIndex = 0;
|
|
3427
|
-
|
|
3583
|
+
_q.label = 3;
|
|
3428
3584
|
case 3:
|
|
3429
|
-
|
|
3430
|
-
sources_3 = (
|
|
3431
|
-
|
|
3585
|
+
_q.trys.push([3, 15, 16, 17]);
|
|
3586
|
+
sources_3 = (e_8 = void 0, __values(sources)), sources_3_1 = sources_3.next();
|
|
3587
|
+
_q.label = 4;
|
|
3432
3588
|
case 4:
|
|
3433
3589
|
if (!!sources_3_1.done) return [3 /*break*/, 14];
|
|
3434
3590
|
source = sources_3_1.value;
|
|
@@ -3441,180 +3597,291 @@
|
|
|
3441
3597
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3442
3598
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3443
3599
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3444
|
-
|
|
3600
|
+
_q.label = 5;
|
|
3445
3601
|
case 5:
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3602
|
+
_q.trys.push([5, 10, 11, 12]);
|
|
3603
|
+
actions_9 = (e_7 = void 0, __values(actions)), actions_9_1 = actions_9.next();
|
|
3604
|
+
_q.label = 6;
|
|
3449
3605
|
case 6:
|
|
3450
|
-
if (!!
|
|
3451
|
-
action =
|
|
3606
|
+
if (!!actions_9_1.done) return [3 /*break*/, 9];
|
|
3607
|
+
action = actions_9_1.value;
|
|
3452
3608
|
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3453
3609
|
if (!conditionEvaluation) return [3 /*break*/, 8];
|
|
3454
|
-
|
|
3455
|
-
return [4 /*yield*/,
|
|
3610
|
+
actions_11 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3611
|
+
return [4 /*yield*/, actions_11.execute()];
|
|
3456
3612
|
case 7:
|
|
3457
|
-
|
|
3458
|
-
|
|
3613
|
+
_q.sent();
|
|
3614
|
+
_q.label = 8;
|
|
3459
3615
|
case 8:
|
|
3460
|
-
|
|
3616
|
+
actions_9_1 = actions_9.next();
|
|
3461
3617
|
return [3 /*break*/, 6];
|
|
3462
3618
|
case 9: return [3 /*break*/, 12];
|
|
3463
3619
|
case 10:
|
|
3464
|
-
|
|
3465
|
-
|
|
3620
|
+
e_7_1 = _q.sent();
|
|
3621
|
+
e_7 = { error: e_7_1 };
|
|
3466
3622
|
return [3 /*break*/, 12];
|
|
3467
3623
|
case 11:
|
|
3468
3624
|
try {
|
|
3469
|
-
if (
|
|
3625
|
+
if (actions_9_1 && !actions_9_1.done && (_o = actions_9.return)) _o.call(actions_9);
|
|
3470
3626
|
}
|
|
3471
|
-
finally { if (
|
|
3627
|
+
finally { if (e_7) throw e_7.error; }
|
|
3472
3628
|
return [7 /*endfinally*/];
|
|
3473
3629
|
case 12:
|
|
3474
3630
|
sourceIndex++;
|
|
3475
|
-
|
|
3631
|
+
_q.label = 13;
|
|
3476
3632
|
case 13:
|
|
3477
3633
|
sources_3_1 = sources_3.next();
|
|
3478
3634
|
return [3 /*break*/, 4];
|
|
3479
3635
|
case 14: return [3 /*break*/, 17];
|
|
3480
3636
|
case 15:
|
|
3481
|
-
|
|
3482
|
-
|
|
3637
|
+
e_8_1 = _q.sent();
|
|
3638
|
+
e_8 = { error: e_8_1 };
|
|
3483
3639
|
return [3 /*break*/, 17];
|
|
3484
3640
|
case 16:
|
|
3485
3641
|
try {
|
|
3486
|
-
if (sources_3_1 && !sources_3_1.done && (
|
|
3642
|
+
if (sources_3_1 && !sources_3_1.done && (_m = sources_3.return)) _m.call(sources_3);
|
|
3487
3643
|
}
|
|
3488
|
-
finally { if (
|
|
3644
|
+
finally { if (e_8) throw e_8.error; }
|
|
3489
3645
|
return [7 /*endfinally*/];
|
|
3490
3646
|
case 17:
|
|
3491
3647
|
paramIndex++;
|
|
3492
|
-
|
|
3648
|
+
_q.label = 18;
|
|
3493
3649
|
case 18:
|
|
3494
3650
|
params_2_1 = params_2.next();
|
|
3495
3651
|
return [3 /*break*/, 2];
|
|
3496
3652
|
case 19: return [3 /*break*/, 22];
|
|
3497
3653
|
case 20:
|
|
3498
|
-
|
|
3499
|
-
|
|
3654
|
+
e_9_1 = _q.sent();
|
|
3655
|
+
e_9 = { error: e_9_1 };
|
|
3500
3656
|
return [3 /*break*/, 22];
|
|
3501
3657
|
case 21:
|
|
3502
3658
|
try {
|
|
3503
|
-
if (params_2_1 && !params_2_1.done && (
|
|
3659
|
+
if (params_2_1 && !params_2_1.done && (_l = params_2.return)) _l.call(params_2);
|
|
3504
3660
|
}
|
|
3505
|
-
finally { if (
|
|
3661
|
+
finally { if (e_9) throw e_9.error; }
|
|
3506
3662
|
return [7 /*endfinally*/];
|
|
3507
3663
|
case 22: return [2 /*return*/, this._object.API_CONFIG];
|
|
3508
|
-
case 23:
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3664
|
+
case 23:
|
|
3665
|
+
if (!(kwikidToolkit.checkObjectKeyExists(this._request.headers, "rules") &&
|
|
3666
|
+
kwikidToolkit.checkObjectKeyExists(this._request.headers, "actions"))) return [3 /*break*/, 32];
|
|
3667
|
+
triggers = (_f = (_e = this._request.headers) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3668
|
+
rules = (_h = (_g = this._request.headers) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3669
|
+
actions = (_k = (_j = this._request.headers) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3670
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3671
|
+
_q.label = 24;
|
|
3672
|
+
case 24:
|
|
3673
|
+
_q.trys.push([24, 29, 30, 31]);
|
|
3674
|
+
actions_10 = __values(actions), actions_10_1 = actions_10.next();
|
|
3675
|
+
_q.label = 25;
|
|
3676
|
+
case 25:
|
|
3677
|
+
if (!!actions_10_1.done) return [3 /*break*/, 28];
|
|
3678
|
+
action = actions_10_1.value;
|
|
3679
|
+
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3680
|
+
if (!conditionEvaluation) return [3 /*break*/, 27];
|
|
3681
|
+
actions_12 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3682
|
+
return [4 /*yield*/, actions_12.execute()];
|
|
3683
|
+
case 26:
|
|
3684
|
+
_q.sent();
|
|
3685
|
+
_q.label = 27;
|
|
3686
|
+
case 27:
|
|
3687
|
+
actions_10_1 = actions_10.next();
|
|
3688
|
+
return [3 /*break*/, 25];
|
|
3689
|
+
case 28: return [3 /*break*/, 31];
|
|
3690
|
+
case 29:
|
|
3691
|
+
e_10_1 = _q.sent();
|
|
3692
|
+
e_10 = { error: e_10_1 };
|
|
3693
|
+
return [3 /*break*/, 31];
|
|
3694
|
+
case 30:
|
|
3695
|
+
try {
|
|
3696
|
+
if (actions_10_1 && !actions_10_1.done && (_p = actions_10.return)) _p.call(actions_10);
|
|
3697
|
+
}
|
|
3698
|
+
finally { if (e_10) throw e_10.error; }
|
|
3699
|
+
return [7 /*endfinally*/];
|
|
3700
|
+
case 31: return [2 /*return*/, this._object.API_CONFIG];
|
|
3701
|
+
case 32: return [2 /*return*/, this._object.API_CONFIG];
|
|
3702
|
+
case 33: return [3 /*break*/, 35];
|
|
3703
|
+
case 34: return [2 /*return*/, this._object.API_CONFIG];
|
|
3704
|
+
case 35: return [2 /*return*/];
|
|
3512
3705
|
}
|
|
3513
3706
|
});
|
|
3514
3707
|
});
|
|
3515
3708
|
};
|
|
3516
3709
|
Apis.prototype.validateRequestHeaders = function () {
|
|
3517
|
-
var _a, _b, _c, _d;
|
|
3710
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3518
3711
|
return __awaiter(this, void 0, void 0, function () {
|
|
3519
|
-
var headers, validation, triggers, rules, actions, rulesMapping,
|
|
3520
|
-
var
|
|
3521
|
-
return __generator(this, function (
|
|
3522
|
-
switch (
|
|
3712
|
+
var headers, validation, triggers, rules, actions, rulesMapping, actions_13, actions_13_1, action, conditionSuccess, actions_15, e_11_1, triggers, rules, actions, rulesMapping, actions_14, actions_14_1, action, conditionSuccess, actions_16, e_12_1;
|
|
3713
|
+
var e_11, _l, e_12, _m;
|
|
3714
|
+
return __generator(this, function (_o) {
|
|
3715
|
+
switch (_o.label) {
|
|
3523
3716
|
case 0:
|
|
3524
3717
|
headers = this._request.headers;
|
|
3525
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/,
|
|
3718
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/, 20];
|
|
3526
3719
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.headers, "validation")) return [3 /*break*/, 9];
|
|
3527
3720
|
validation = headers.validation;
|
|
3528
3721
|
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3529
3722
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3530
3723
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3531
3724
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3532
|
-
|
|
3725
|
+
_o.label = 1;
|
|
3533
3726
|
case 1:
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3727
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
3728
|
+
actions_13 = __values(actions), actions_13_1 = actions_13.next();
|
|
3729
|
+
_o.label = 2;
|
|
3537
3730
|
case 2:
|
|
3538
|
-
if (!!
|
|
3539
|
-
action =
|
|
3731
|
+
if (!!actions_13_1.done) return [3 /*break*/, 5];
|
|
3732
|
+
action = actions_13_1.value;
|
|
3540
3733
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3541
3734
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3542
|
-
|
|
3543
|
-
return [4 /*yield*/,
|
|
3735
|
+
actions_15 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3736
|
+
return [4 /*yield*/, actions_15.execute()];
|
|
3544
3737
|
case 3:
|
|
3545
|
-
|
|
3546
|
-
|
|
3738
|
+
_o.sent();
|
|
3739
|
+
_o.label = 4;
|
|
3547
3740
|
case 4:
|
|
3548
|
-
|
|
3741
|
+
actions_13_1 = actions_13.next();
|
|
3549
3742
|
return [3 /*break*/, 2];
|
|
3550
3743
|
case 5: return [3 /*break*/, 8];
|
|
3551
3744
|
case 6:
|
|
3552
|
-
|
|
3553
|
-
|
|
3745
|
+
e_11_1 = _o.sent();
|
|
3746
|
+
e_11 = { error: e_11_1 };
|
|
3554
3747
|
return [3 /*break*/, 8];
|
|
3555
3748
|
case 7:
|
|
3556
3749
|
try {
|
|
3557
|
-
if (
|
|
3750
|
+
if (actions_13_1 && !actions_13_1.done && (_l = actions_13.return)) _l.call(actions_13);
|
|
3558
3751
|
}
|
|
3559
|
-
finally { if (
|
|
3752
|
+
finally { if (e_11) throw e_11.error; }
|
|
3560
3753
|
return [7 /*endfinally*/];
|
|
3561
3754
|
case 8: return [2 /*return*/, this._object.API_CONFIG];
|
|
3562
3755
|
case 9:
|
|
3756
|
+
if (!(kwikidToolkit.checkObjectPathExists(this._request.headers, "rules") &&
|
|
3757
|
+
kwikidToolkit.checkObjectPathExists(this._request.headers, "actions"))) return [3 /*break*/, 18];
|
|
3758
|
+
triggers = (_e = headers === null || headers === void 0 ? void 0 : headers.triggers) !== null && _e !== void 0 ? _e : [];
|
|
3759
|
+
rules = (_f = headers === null || headers === void 0 ? void 0 : headers.rules) !== null && _f !== void 0 ? _f : [];
|
|
3760
|
+
actions = (_h = (_g = headers) === null || _g === void 0 ? void 0 : _g.actions) !== null && _h !== void 0 ? _h : [];
|
|
3761
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3762
|
+
_o.label = 10;
|
|
3763
|
+
case 10:
|
|
3764
|
+
_o.trys.push([10, 15, 16, 17]);
|
|
3765
|
+
actions_14 = __values(actions), actions_14_1 = actions_14.next();
|
|
3766
|
+
_o.label = 11;
|
|
3767
|
+
case 11:
|
|
3768
|
+
if (!!actions_14_1.done) return [3 /*break*/, 14];
|
|
3769
|
+
action = actions_14_1.value;
|
|
3770
|
+
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3771
|
+
if (!conditionSuccess) return [3 /*break*/, 13];
|
|
3772
|
+
actions_16 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3773
|
+
return [4 /*yield*/, actions_16.execute()];
|
|
3774
|
+
case 12:
|
|
3775
|
+
_o.sent();
|
|
3776
|
+
_o.label = 13;
|
|
3777
|
+
case 13:
|
|
3778
|
+
actions_14_1 = actions_14.next();
|
|
3779
|
+
return [3 /*break*/, 11];
|
|
3780
|
+
case 14: return [3 /*break*/, 17];
|
|
3781
|
+
case 15:
|
|
3782
|
+
e_12_1 = _o.sent();
|
|
3783
|
+
e_12 = { error: e_12_1 };
|
|
3784
|
+
return [3 /*break*/, 17];
|
|
3785
|
+
case 16:
|
|
3786
|
+
try {
|
|
3787
|
+
if (actions_14_1 && !actions_14_1.done && (_m = actions_14.return)) _m.call(actions_14);
|
|
3788
|
+
}
|
|
3789
|
+
finally { if (e_12) throw e_12.error; }
|
|
3790
|
+
return [7 /*endfinally*/];
|
|
3791
|
+
case 17: return [2 /*return*/, this._object.API_CONFIG];
|
|
3792
|
+
case 18:
|
|
3563
3793
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.headers.is_valid", true);
|
|
3564
3794
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3565
|
-
case
|
|
3566
|
-
case
|
|
3795
|
+
case 19: return [3 /*break*/, 21];
|
|
3796
|
+
case 20:
|
|
3567
3797
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.headers.is_valid", true);
|
|
3568
3798
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3569
|
-
case
|
|
3799
|
+
case 21: return [2 /*return*/];
|
|
3570
3800
|
}
|
|
3571
3801
|
});
|
|
3572
3802
|
});
|
|
3573
3803
|
};
|
|
3574
3804
|
Apis.prototype.validateResponse = function () {
|
|
3575
|
-
var _a, _b, _c, _d;
|
|
3805
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3576
3806
|
return __awaiter(this, void 0, void 0, function () {
|
|
3577
|
-
var validation, triggers, rules, actions, rulesMapping,
|
|
3578
|
-
var
|
|
3579
|
-
return __generator(this, function (
|
|
3580
|
-
switch (
|
|
3807
|
+
var validation, triggers, rules, actions, rulesMapping, actions_17, actions_17_1, action, conditionSuccess, actions_19, e_13_1, triggers, rules, actions, rulesMapping, actions_18, actions_18_1, action, conditionSuccess, actions_20, e_14_1;
|
|
3808
|
+
var e_13, _l, e_14, _m;
|
|
3809
|
+
return __generator(this, function (_o) {
|
|
3810
|
+
switch (_o.label) {
|
|
3581
3811
|
case 0:
|
|
3582
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._response, "validation")) return [3 /*break*/,
|
|
3812
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._response, "validation")) return [3 /*break*/, 9];
|
|
3583
3813
|
validation = this._response.validation;
|
|
3584
3814
|
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3585
3815
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3586
3816
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3587
3817
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3588
|
-
|
|
3818
|
+
_o.label = 1;
|
|
3589
3819
|
case 1:
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3820
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
3821
|
+
actions_17 = __values(actions), actions_17_1 = actions_17.next();
|
|
3822
|
+
_o.label = 2;
|
|
3593
3823
|
case 2:
|
|
3594
|
-
if (!!
|
|
3595
|
-
action =
|
|
3824
|
+
if (!!actions_17_1.done) return [3 /*break*/, 5];
|
|
3825
|
+
action = actions_17_1.value;
|
|
3596
3826
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3597
3827
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3598
|
-
|
|
3599
|
-
return [4 /*yield*/,
|
|
3828
|
+
actions_19 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3829
|
+
return [4 /*yield*/, actions_19.execute()];
|
|
3600
3830
|
case 3:
|
|
3601
|
-
|
|
3602
|
-
|
|
3831
|
+
_o.sent();
|
|
3832
|
+
_o.label = 4;
|
|
3603
3833
|
case 4:
|
|
3604
|
-
|
|
3834
|
+
actions_17_1 = actions_17.next();
|
|
3605
3835
|
return [3 /*break*/, 2];
|
|
3606
3836
|
case 5: return [3 /*break*/, 8];
|
|
3607
3837
|
case 6:
|
|
3608
|
-
|
|
3609
|
-
|
|
3838
|
+
e_13_1 = _o.sent();
|
|
3839
|
+
e_13 = { error: e_13_1 };
|
|
3610
3840
|
return [3 /*break*/, 8];
|
|
3611
3841
|
case 7:
|
|
3612
3842
|
try {
|
|
3613
|
-
if (
|
|
3843
|
+
if (actions_17_1 && !actions_17_1.done && (_l = actions_17.return)) _l.call(actions_17);
|
|
3614
3844
|
}
|
|
3615
|
-
finally { if (
|
|
3845
|
+
finally { if (e_13) throw e_13.error; }
|
|
3616
3846
|
return [7 /*endfinally*/];
|
|
3617
|
-
case 8: return [
|
|
3847
|
+
case 8: return [3 /*break*/, 17];
|
|
3848
|
+
case 9:
|
|
3849
|
+
if (!(kwikidToolkit.checkObjectKeyExists(this._response, "rules") &&
|
|
3850
|
+
kwikidToolkit.checkObjectKeyExists(this._response, "actions"))) return [3 /*break*/, 17];
|
|
3851
|
+
triggers = (_f = (_e = this._response) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3852
|
+
rules = (_h = (_g = this._response) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3853
|
+
actions = (_k = (_j = this._response) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3854
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3855
|
+
_o.label = 10;
|
|
3856
|
+
case 10:
|
|
3857
|
+
_o.trys.push([10, 15, 16, 17]);
|
|
3858
|
+
actions_18 = __values(actions), actions_18_1 = actions_18.next();
|
|
3859
|
+
_o.label = 11;
|
|
3860
|
+
case 11:
|
|
3861
|
+
if (!!actions_18_1.done) return [3 /*break*/, 14];
|
|
3862
|
+
action = actions_18_1.value;
|
|
3863
|
+
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3864
|
+
if (!conditionSuccess) return [3 /*break*/, 13];
|
|
3865
|
+
actions_20 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3866
|
+
return [4 /*yield*/, actions_20.execute()];
|
|
3867
|
+
case 12:
|
|
3868
|
+
_o.sent();
|
|
3869
|
+
_o.label = 13;
|
|
3870
|
+
case 13:
|
|
3871
|
+
actions_18_1 = actions_18.next();
|
|
3872
|
+
return [3 /*break*/, 11];
|
|
3873
|
+
case 14: return [3 /*break*/, 17];
|
|
3874
|
+
case 15:
|
|
3875
|
+
e_14_1 = _o.sent();
|
|
3876
|
+
e_14 = { error: e_14_1 };
|
|
3877
|
+
return [3 /*break*/, 17];
|
|
3878
|
+
case 16:
|
|
3879
|
+
try {
|
|
3880
|
+
if (actions_18_1 && !actions_18_1.done && (_m = actions_18.return)) _m.call(actions_18);
|
|
3881
|
+
}
|
|
3882
|
+
finally { if (e_14) throw e_14.error; }
|
|
3883
|
+
return [7 /*endfinally*/];
|
|
3884
|
+
case 17: return [2 /*return*/, this._object.API_CONFIG];
|
|
3618
3885
|
}
|
|
3619
3886
|
});
|
|
3620
3887
|
});
|
|
@@ -3622,43 +3889,43 @@
|
|
|
3622
3889
|
Apis.prototype.callNextApi = function (validation) {
|
|
3623
3890
|
var _a, _b, _c, _d;
|
|
3624
3891
|
return __awaiter(this, void 0, void 0, function () {
|
|
3625
|
-
var triggers, rules, actions, rulesMapping,
|
|
3626
|
-
var
|
|
3627
|
-
return __generator(this, function (
|
|
3628
|
-
switch (
|
|
3892
|
+
var triggers, rules, actions, rulesMapping, actions_21, actions_21_1, action, conditionSuccess, actions_22, e_15_1;
|
|
3893
|
+
var e_15, _l;
|
|
3894
|
+
return __generator(this, function (_m) {
|
|
3895
|
+
switch (_m.label) {
|
|
3629
3896
|
case 0:
|
|
3630
3897
|
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3631
3898
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3632
3899
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3633
3900
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3634
|
-
|
|
3901
|
+
_m.label = 1;
|
|
3635
3902
|
case 1:
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3903
|
+
_m.trys.push([1, 6, 7, 8]);
|
|
3904
|
+
actions_21 = __values(actions), actions_21_1 = actions_21.next();
|
|
3905
|
+
_m.label = 2;
|
|
3639
3906
|
case 2:
|
|
3640
|
-
if (!!
|
|
3641
|
-
action =
|
|
3907
|
+
if (!!actions_21_1.done) return [3 /*break*/, 5];
|
|
3908
|
+
action = actions_21_1.value;
|
|
3642
3909
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3643
3910
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3644
|
-
|
|
3645
|
-
return [4 /*yield*/,
|
|
3911
|
+
actions_22 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3912
|
+
return [4 /*yield*/, actions_22.execute()];
|
|
3646
3913
|
case 3:
|
|
3647
|
-
|
|
3648
|
-
|
|
3914
|
+
_m.sent();
|
|
3915
|
+
_m.label = 4;
|
|
3649
3916
|
case 4:
|
|
3650
|
-
|
|
3917
|
+
actions_21_1 = actions_21.next();
|
|
3651
3918
|
return [3 /*break*/, 2];
|
|
3652
3919
|
case 5: return [3 /*break*/, 8];
|
|
3653
3920
|
case 6:
|
|
3654
|
-
|
|
3655
|
-
|
|
3921
|
+
e_15_1 = _m.sent();
|
|
3922
|
+
e_15 = { error: e_15_1 };
|
|
3656
3923
|
return [3 /*break*/, 8];
|
|
3657
3924
|
case 7:
|
|
3658
3925
|
try {
|
|
3659
|
-
if (
|
|
3926
|
+
if (actions_21_1 && !actions_21_1.done && (_l = actions_21.return)) _l.call(actions_21);
|
|
3660
3927
|
}
|
|
3661
|
-
finally { if (
|
|
3928
|
+
finally { if (e_15) throw e_15.error; }
|
|
3662
3929
|
return [7 /*endfinally*/];
|
|
3663
3930
|
case 8: return [2 /*return*/];
|
|
3664
3931
|
}
|
|
@@ -5073,8 +5340,16 @@
|
|
|
5073
5340
|
});
|
|
5074
5341
|
};
|
|
5075
5342
|
KwikIDFormViewComponent.prototype.isValidRequestHeadersAndBody = function (api) {
|
|
5076
|
-
|
|
5077
|
-
|
|
5343
|
+
var _a, _b;
|
|
5344
|
+
var bodyValidation = ((_a = api.request.body) === null || _a === void 0 ? void 0 : _a.validation) ||
|
|
5345
|
+
api.request.body;
|
|
5346
|
+
var headersValidation = ((_b = api.request.headers) === null || _b === void 0 ? void 0 : _b.validation) ||
|
|
5347
|
+
api.request.headers;
|
|
5348
|
+
if (!bodyValidation && !headersValidation) {
|
|
5349
|
+
return false;
|
|
5350
|
+
}
|
|
5351
|
+
return (((bodyValidation === null || bodyValidation === void 0 ? void 0 : bodyValidation.is_valid) || false) &&
|
|
5352
|
+
((headersValidation === null || headersValidation === void 0 ? void 0 : headersValidation.is_valid) || false));
|
|
5078
5353
|
};
|
|
5079
5354
|
KwikIDFormViewComponent.prototype.showApiLoader = function () {
|
|
5080
5355
|
this.loaderService.show({
|
|
@@ -5630,6 +5905,143 @@
|
|
|
5630
5905
|
});
|
|
5631
5906
|
});
|
|
5632
5907
|
};
|
|
5908
|
+
KwikIDFormViewComponent.prototype.setApiStatus = function (action, object) {
|
|
5909
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5910
|
+
var source, sourceValue;
|
|
5911
|
+
return __generator(this, function (_h) {
|
|
5912
|
+
source = new kwikidToolkit.Source(object);
|
|
5913
|
+
sourceValue = action.props.status;
|
|
5914
|
+
source.setValueToSource({
|
|
5915
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5916
|
+
props: {
|
|
5917
|
+
object: {
|
|
5918
|
+
key: "FIELD_CONFIG",
|
|
5919
|
+
path: "api.status.value"
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5922
|
+
}, sourceValue);
|
|
5923
|
+
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
5924
|
+
console.log("PRINT0", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5925
|
+
return [2 /*return*/];
|
|
5926
|
+
});
|
|
5927
|
+
});
|
|
5928
|
+
};
|
|
5929
|
+
KwikIDFormViewComponent.prototype.setApiHeaderValue = function (action, object) {
|
|
5930
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5931
|
+
var source, sourceValue;
|
|
5932
|
+
return __generator(this, function (_h) {
|
|
5933
|
+
switch (_h.label) {
|
|
5934
|
+
case 0:
|
|
5935
|
+
source = new kwikidToolkit.Source(object);
|
|
5936
|
+
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
5937
|
+
case 1:
|
|
5938
|
+
sourceValue = _h.sent();
|
|
5939
|
+
source.setValueToSource({
|
|
5940
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5941
|
+
props: {
|
|
5942
|
+
object: {
|
|
5943
|
+
key: "API_CONFIG",
|
|
5944
|
+
path: "request.headers.value." + action.props.key
|
|
5945
|
+
}
|
|
5946
|
+
}
|
|
5947
|
+
}, sourceValue);
|
|
5948
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
5949
|
+
console.log("PRINT1", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5950
|
+
return [2 /*return*/];
|
|
5951
|
+
}
|
|
5952
|
+
});
|
|
5953
|
+
});
|
|
5954
|
+
};
|
|
5955
|
+
KwikIDFormViewComponent.prototype.setApiHeaderValidity = function (action, object) {
|
|
5956
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5957
|
+
var source, sourceValue;
|
|
5958
|
+
return __generator(this, function (_h) {
|
|
5959
|
+
source = new kwikidToolkit.Source(object);
|
|
5960
|
+
sourceValue = action.props.valid;
|
|
5961
|
+
source.setValueToSource({
|
|
5962
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5963
|
+
props: {
|
|
5964
|
+
object: {
|
|
5965
|
+
key: "API_CONFIG",
|
|
5966
|
+
path: "request.headers.is_valid"
|
|
5967
|
+
}
|
|
5968
|
+
}
|
|
5969
|
+
}, sourceValue);
|
|
5970
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
5971
|
+
console.log("PRINT2", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5972
|
+
return [2 /*return*/];
|
|
5973
|
+
});
|
|
5974
|
+
});
|
|
5975
|
+
};
|
|
5976
|
+
KwikIDFormViewComponent.prototype.setApiBodyValue = function (action, object) {
|
|
5977
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5978
|
+
var source, sourceValue;
|
|
5979
|
+
return __generator(this, function (_h) {
|
|
5980
|
+
switch (_h.label) {
|
|
5981
|
+
case 0:
|
|
5982
|
+
source = new kwikidToolkit.Source(object);
|
|
5983
|
+
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
5984
|
+
case 1:
|
|
5985
|
+
sourceValue = _h.sent();
|
|
5986
|
+
source.setValueToSource({
|
|
5987
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5988
|
+
props: {
|
|
5989
|
+
object: {
|
|
5990
|
+
key: "API_CONFIG",
|
|
5991
|
+
path: "request.body.value." + action.props.key
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5994
|
+
}, sourceValue);
|
|
5995
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
5996
|
+
console.log("PRINT3", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5997
|
+
return [2 /*return*/];
|
|
5998
|
+
}
|
|
5999
|
+
});
|
|
6000
|
+
});
|
|
6001
|
+
};
|
|
6002
|
+
KwikIDFormViewComponent.prototype.setApiBodyValidity = function (action, object) {
|
|
6003
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6004
|
+
var source, sourceValue;
|
|
6005
|
+
return __generator(this, function (_h) {
|
|
6006
|
+
source = new kwikidToolkit.Source(object);
|
|
6007
|
+
sourceValue = action.props.valid;
|
|
6008
|
+
source.setValueToSource({
|
|
6009
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6010
|
+
props: {
|
|
6011
|
+
object: {
|
|
6012
|
+
key: "API_CONFIG",
|
|
6013
|
+
path: "request.body.is_valid"
|
|
6014
|
+
}
|
|
6015
|
+
}
|
|
6016
|
+
}, sourceValue);
|
|
6017
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
6018
|
+
console.log("PRINT4", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
6019
|
+
return [2 /*return*/];
|
|
6020
|
+
});
|
|
6021
|
+
});
|
|
6022
|
+
};
|
|
6023
|
+
KwikIDFormViewComponent.prototype.setFieldValidity = function (action, object) {
|
|
6024
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6025
|
+
var source, sourceValue;
|
|
6026
|
+
return __generator(this, function (_h) {
|
|
6027
|
+
source = new kwikidToolkit.Source(object);
|
|
6028
|
+
console.log(kwikidToolkit.getObjectDeepCopy(object));
|
|
6029
|
+
sourceValue = action.props.valid;
|
|
6030
|
+
source.setValueToSource({
|
|
6031
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6032
|
+
props: {
|
|
6033
|
+
object: {
|
|
6034
|
+
key: "FIELD_CONFIG",
|
|
6035
|
+
path: "validation.is_valid"
|
|
6036
|
+
}
|
|
6037
|
+
}
|
|
6038
|
+
}, sourceValue);
|
|
6039
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
6040
|
+
console.log("PRINT5", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
6041
|
+
return [2 /*return*/];
|
|
6042
|
+
});
|
|
6043
|
+
});
|
|
6044
|
+
};
|
|
5633
6045
|
KwikIDFormViewComponent.prototype.setDropdownOptions = function (action, object) {
|
|
5634
6046
|
return __awaiter(this, void 0, void 0, function () {
|
|
5635
6047
|
var source, sourceValue, appendToPath, appendToPathStr, optionsPath;
|
|
@@ -6034,44 +6446,50 @@
|
|
|
6034
6446
|
case EActionKey.FIELD_MESSAGES_HIDE: return [3 /*break*/, 13];
|
|
6035
6447
|
case EActionKey.SET_VALUE: return [3 /*break*/, 14];
|
|
6036
6448
|
case EActionKey.SET_FIELD_DEFAULT_VALUE: return [3 /*break*/, 16];
|
|
6037
|
-
case EActionKey.
|
|
6038
|
-
case EActionKey.
|
|
6039
|
-
case EActionKey.
|
|
6040
|
-
case EActionKey.
|
|
6041
|
-
case EActionKey.
|
|
6042
|
-
case EActionKey.
|
|
6043
|
-
case EActionKey.
|
|
6044
|
-
case EActionKey.
|
|
6045
|
-
case EActionKey.
|
|
6046
|
-
case EActionKey.
|
|
6047
|
-
case EActionKey.
|
|
6048
|
-
case EActionKey.
|
|
6049
|
-
case EActionKey.
|
|
6050
|
-
case EActionKey.
|
|
6051
|
-
case EActionKey.
|
|
6052
|
-
case EActionKey.
|
|
6053
|
-
case EActionKey.
|
|
6054
|
-
case EActionKey.
|
|
6055
|
-
case EActionKey.
|
|
6056
|
-
case EActionKey.
|
|
6057
|
-
case EActionKey.
|
|
6449
|
+
case EActionKey.SET_API_STATUS: return [3 /*break*/, 18];
|
|
6450
|
+
case EActionKey.SET_API_HEADER_VALUE: return [3 /*break*/, 20];
|
|
6451
|
+
case EActionKey.SET_API_HEADER_VALIDITY: return [3 /*break*/, 22];
|
|
6452
|
+
case EActionKey.SET_API_BODY_VALUE: return [3 /*break*/, 24];
|
|
6453
|
+
case EActionKey.SET_API_BODY_VALIDITY: return [3 /*break*/, 26];
|
|
6454
|
+
case EActionKey.SET_DROPDOWN_OPTIONS: return [3 /*break*/, 28];
|
|
6455
|
+
case EActionKey.SET_FIELD_VALIDITY: return [3 /*break*/, 30];
|
|
6456
|
+
case EActionKey.HANDLE_CONNECTED_ELEMENTS: return [3 /*break*/, 32];
|
|
6457
|
+
case EActionKey.API_CALL: return [3 /*break*/, 33];
|
|
6458
|
+
case EActionKey.API_CALL_MULTIPLE: return [3 /*break*/, 35];
|
|
6459
|
+
case EActionKey.API_CALL_MULTIPLE_END: return [3 /*break*/, 37];
|
|
6460
|
+
case EActionKey.TASK_API_CALL: return [3 /*break*/, 39];
|
|
6461
|
+
case EActionKey.TASK_API_CALL_MULTIPLE: return [3 /*break*/, 41];
|
|
6462
|
+
case EActionKey.TASK_API_CALL_MULTIPLE_END: return [3 /*break*/, 43];
|
|
6463
|
+
case EActionKey.REDIRECT_TO_URL: return [3 /*break*/, 45];
|
|
6464
|
+
case EActionKey.PREVIEW_DIALOG_SHOW: return [3 /*break*/, 48];
|
|
6465
|
+
case EActionKey.PREVIEW_ERROR_SHOW: return [3 /*break*/, 49];
|
|
6466
|
+
case EActionKey.POPUP_FORM_SHOW: return [3 /*break*/, 52];
|
|
6467
|
+
case EActionKey.STOP_WAITING: return [3 /*break*/, 53];
|
|
6468
|
+
case EActionKey.NOTIFICATION_ERROR_SHOW: return [3 /*break*/, 54];
|
|
6469
|
+
case EActionKey.NOTIFICATION_ERROR_HIDE: return [3 /*break*/, 55];
|
|
6470
|
+
case EActionKey.RESUME_TASK_EXECUTION: return [3 /*break*/, 56];
|
|
6471
|
+
case EActionKey.STOP_TASK_EXECUTION: return [3 /*break*/, 57];
|
|
6472
|
+
case EActionKey.DIALOG_SHOW: return [3 /*break*/, 58];
|
|
6473
|
+
case EActionKey.DIALOG_HIDE: return [3 /*break*/, 59];
|
|
6474
|
+
case EActionKey.SAVE_FORM: return [3 /*break*/, 60];
|
|
6475
|
+
case EActionKey.ALERT_SHOW: return [3 /*break*/, 61];
|
|
6058
6476
|
}
|
|
6059
|
-
return [3 /*break*/,
|
|
6477
|
+
return [3 /*break*/, 62];
|
|
6060
6478
|
case 1:
|
|
6061
6479
|
this.fieldHide(action.props.fieldKey);
|
|
6062
|
-
return [3 /*break*/,
|
|
6480
|
+
return [3 /*break*/, 63];
|
|
6063
6481
|
case 2:
|
|
6064
6482
|
this.fieldShow(action.props.fieldKey);
|
|
6065
|
-
return [3 /*break*/,
|
|
6483
|
+
return [3 /*break*/, 63];
|
|
6066
6484
|
case 3:
|
|
6067
6485
|
this.fieldDisable(action.props.fieldKey);
|
|
6068
|
-
return [3 /*break*/,
|
|
6486
|
+
return [3 /*break*/, 63];
|
|
6069
6487
|
case 4:
|
|
6070
6488
|
this.fieldEnable(action.props.fieldKey);
|
|
6071
|
-
return [3 /*break*/,
|
|
6489
|
+
return [3 /*break*/, 63];
|
|
6072
6490
|
case 5:
|
|
6073
6491
|
this.fieldReset(action.props.fieldKey);
|
|
6074
|
-
return [3 /*break*/,
|
|
6492
|
+
return [3 /*break*/, 63];
|
|
6075
6493
|
case 6:
|
|
6076
6494
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 8];
|
|
6077
6495
|
fieldErrorShow_Source = new kwikidToolkit.Source(object);
|
|
@@ -6089,7 +6507,7 @@
|
|
|
6089
6507
|
_j.label = 8;
|
|
6090
6508
|
case 8:
|
|
6091
6509
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
6092
|
-
return [3 /*break*/,
|
|
6510
|
+
return [3 /*break*/, 63];
|
|
6093
6511
|
case 9:
|
|
6094
6512
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 11];
|
|
6095
6513
|
fieldErrorHide_Source = new kwikidToolkit.Source(object);
|
|
@@ -6107,74 +6525,98 @@
|
|
|
6107
6525
|
_j.label = 11;
|
|
6108
6526
|
case 11:
|
|
6109
6527
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
6110
|
-
return [3 /*break*/,
|
|
6528
|
+
return [3 /*break*/, 63];
|
|
6111
6529
|
case 12:
|
|
6112
6530
|
this.fieldMessageShow(action.props.fieldKey, action.props.message);
|
|
6113
|
-
return [3 /*break*/,
|
|
6531
|
+
return [3 /*break*/, 63];
|
|
6114
6532
|
case 13:
|
|
6115
6533
|
this.fieldMessageHide(action.props.fieldKey, action.props.message);
|
|
6116
|
-
return [3 /*break*/,
|
|
6534
|
+
return [3 /*break*/, 63];
|
|
6117
6535
|
case 14: return [4 /*yield*/, this.setValue(action, object)];
|
|
6118
6536
|
case 15:
|
|
6119
6537
|
_j.sent();
|
|
6120
|
-
return [3 /*break*/,
|
|
6538
|
+
return [3 /*break*/, 63];
|
|
6121
6539
|
case 16: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
6122
6540
|
case 17:
|
|
6123
6541
|
_j.sent();
|
|
6124
|
-
return [3 /*break*/,
|
|
6125
|
-
case 18: return [4 /*yield*/, this.
|
|
6542
|
+
return [3 /*break*/, 63];
|
|
6543
|
+
case 18: return [4 /*yield*/, this.setApiStatus(action, object)];
|
|
6126
6544
|
case 19:
|
|
6127
6545
|
_j.sent();
|
|
6128
|
-
return [3 /*break*/,
|
|
6129
|
-
case 20:
|
|
6130
|
-
|
|
6131
|
-
return [3 /*break*/, 51];
|
|
6132
|
-
case 21: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
6133
|
-
case 22:
|
|
6546
|
+
return [3 /*break*/, 63];
|
|
6547
|
+
case 20: return [4 /*yield*/, this.setApiHeaderValue(action, object)];
|
|
6548
|
+
case 21:
|
|
6134
6549
|
_j.sent();
|
|
6135
|
-
return [3 /*break*/,
|
|
6136
|
-
case
|
|
6137
|
-
case
|
|
6550
|
+
return [3 /*break*/, 63];
|
|
6551
|
+
case 22: return [4 /*yield*/, this.setApiHeaderValidity(action, object)];
|
|
6552
|
+
case 23:
|
|
6138
6553
|
_j.sent();
|
|
6139
|
-
return [3 /*break*/,
|
|
6140
|
-
case
|
|
6141
|
-
case
|
|
6554
|
+
return [3 /*break*/, 63];
|
|
6555
|
+
case 24: return [4 /*yield*/, this.setApiBodyValue(action, object)];
|
|
6556
|
+
case 25:
|
|
6142
6557
|
_j.sent();
|
|
6143
|
-
return [3 /*break*/,
|
|
6144
|
-
case
|
|
6145
|
-
case
|
|
6558
|
+
return [3 /*break*/, 63];
|
|
6559
|
+
case 26: return [4 /*yield*/, this.setApiBodyValidity(action, object)];
|
|
6560
|
+
case 27:
|
|
6146
6561
|
_j.sent();
|
|
6147
|
-
return [3 /*break*/,
|
|
6148
|
-
case
|
|
6149
|
-
case
|
|
6562
|
+
return [3 /*break*/, 63];
|
|
6563
|
+
case 28: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
6564
|
+
case 29:
|
|
6565
|
+
_j.sent();
|
|
6566
|
+
return [3 /*break*/, 63];
|
|
6567
|
+
case 30: return [4 /*yield*/, this.setFieldValidity(action, object)];
|
|
6568
|
+
case 31:
|
|
6150
6569
|
_j.sent();
|
|
6151
|
-
return [3 /*break*/,
|
|
6152
|
-
case 31: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
6570
|
+
return [3 /*break*/, 63];
|
|
6153
6571
|
case 32:
|
|
6572
|
+
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
6573
|
+
return [3 /*break*/, 63];
|
|
6574
|
+
case 33: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
6575
|
+
case 34:
|
|
6576
|
+
_j.sent();
|
|
6577
|
+
return [3 /*break*/, 63];
|
|
6578
|
+
case 35: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
6579
|
+
case 36:
|
|
6154
6580
|
_j.sent();
|
|
6155
|
-
return [3 /*break*/,
|
|
6156
|
-
case
|
|
6157
|
-
|
|
6581
|
+
return [3 /*break*/, 63];
|
|
6582
|
+
case 37: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
6583
|
+
case 38:
|
|
6584
|
+
_j.sent();
|
|
6585
|
+
return [3 /*break*/, 63];
|
|
6586
|
+
case 39: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
6587
|
+
case 40:
|
|
6588
|
+
_j.sent();
|
|
6589
|
+
return [3 /*break*/, 63];
|
|
6590
|
+
case 41: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
6591
|
+
case 42:
|
|
6592
|
+
_j.sent();
|
|
6593
|
+
return [3 /*break*/, 63];
|
|
6594
|
+
case 43: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
6595
|
+
case 44:
|
|
6596
|
+
_j.sent();
|
|
6597
|
+
return [3 /*break*/, 63];
|
|
6598
|
+
case 45:
|
|
6599
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.url, "source")) return [3 /*break*/, 47];
|
|
6158
6600
|
redirectToUrl_Source = new kwikidToolkit.Source(object);
|
|
6159
6601
|
return [4 /*yield*/, redirectToUrl_Source.getValueFromSource(action.props.url.source)];
|
|
6160
|
-
case
|
|
6602
|
+
case 46:
|
|
6161
6603
|
redirectToUrlSourceValue = _j.sent();
|
|
6162
6604
|
if (kwikidToolkit.isEmptyString(redirectToUrlSourceValue)) {
|
|
6163
6605
|
redirectToUrlSourceValue = "";
|
|
6164
6606
|
}
|
|
6165
6607
|
action = kwikidToolkit.setValueToObjectPath(action, "props.url.url", redirectToUrlSourceValue);
|
|
6166
|
-
_j.label =
|
|
6167
|
-
case
|
|
6608
|
+
_j.label = 47;
|
|
6609
|
+
case 47:
|
|
6168
6610
|
this.redirectToUrl(action);
|
|
6169
|
-
_j.label =
|
|
6170
|
-
case
|
|
6611
|
+
_j.label = 48;
|
|
6612
|
+
case 48:
|
|
6171
6613
|
this.showPreview(action.props);
|
|
6172
|
-
return [3 /*break*/,
|
|
6173
|
-
case
|
|
6174
|
-
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/,
|
|
6614
|
+
return [3 /*break*/, 63];
|
|
6615
|
+
case 49:
|
|
6616
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 51];
|
|
6175
6617
|
previewErrorShow_Source = new kwikidToolkit.Source(object);
|
|
6176
6618
|
return [4 /*yield*/, previewErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
6177
|
-
case
|
|
6619
|
+
case 50:
|
|
6178
6620
|
previewErrorShowSourceValue = _j.sent();
|
|
6179
6621
|
if (typeof previewErrorShowSourceValue == "string" ||
|
|
6180
6622
|
typeof previewErrorShowSourceValue == "number") {
|
|
@@ -6184,47 +6626,47 @@
|
|
|
6184
6626
|
previewErrorShowSourceValue = "";
|
|
6185
6627
|
}
|
|
6186
6628
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", previewErrorShowSourceValue);
|
|
6187
|
-
_j.label =
|
|
6188
|
-
case
|
|
6629
|
+
_j.label = 51;
|
|
6630
|
+
case 51:
|
|
6189
6631
|
this.showErrorPreview(action.props);
|
|
6190
|
-
return [3 /*break*/,
|
|
6191
|
-
case
|
|
6632
|
+
return [3 /*break*/, 63];
|
|
6633
|
+
case 52:
|
|
6192
6634
|
this.showPopupForm(action.props.popupFormKey, (_b = (_a = action.props) === null || _a === void 0 ? void 0 : _a.popupType) !== null && _b !== void 0 ? _b : "DIALOG");
|
|
6193
|
-
return [3 /*break*/,
|
|
6194
|
-
case
|
|
6635
|
+
return [3 /*break*/, 63];
|
|
6636
|
+
case 53:
|
|
6195
6637
|
this.waitingForChanges = false;
|
|
6196
|
-
return [3 /*break*/,
|
|
6197
|
-
case
|
|
6638
|
+
return [3 /*break*/, 63];
|
|
6639
|
+
case 54:
|
|
6198
6640
|
this.toggleErrorNotification(true);
|
|
6199
|
-
return [3 /*break*/,
|
|
6200
|
-
case
|
|
6641
|
+
return [3 /*break*/, 63];
|
|
6642
|
+
case 55:
|
|
6201
6643
|
this.toggleErrorNotification(false);
|
|
6202
|
-
return [3 /*break*/,
|
|
6203
|
-
case
|
|
6644
|
+
return [3 /*break*/, 63];
|
|
6645
|
+
case 56:
|
|
6204
6646
|
this.stopTaskExecution = false;
|
|
6205
|
-
return [3 /*break*/,
|
|
6206
|
-
case
|
|
6647
|
+
return [3 /*break*/, 63];
|
|
6648
|
+
case 57:
|
|
6207
6649
|
this.stopTaskExecution = true;
|
|
6208
|
-
return [3 /*break*/,
|
|
6209
|
-
case
|
|
6650
|
+
return [3 /*break*/, 63];
|
|
6651
|
+
case 58:
|
|
6210
6652
|
this.dialogShow({
|
|
6211
6653
|
html: (_c = action.props) === null || _c === void 0 ? void 0 : _c.html,
|
|
6212
6654
|
label: (_d = action.props) === null || _d === void 0 ? void 0 : _d.label,
|
|
6213
6655
|
size: (_e = action.props) === null || _e === void 0 ? void 0 : _e.size,
|
|
6214
6656
|
button: (_f = action.props) === null || _f === void 0 ? void 0 : _f.button
|
|
6215
6657
|
});
|
|
6216
|
-
return [3 /*break*/,
|
|
6217
|
-
case
|
|
6658
|
+
return [3 /*break*/, 63];
|
|
6659
|
+
case 59:
|
|
6218
6660
|
this.dialogHide();
|
|
6219
|
-
return [3 /*break*/,
|
|
6220
|
-
case
|
|
6661
|
+
return [3 /*break*/, 63];
|
|
6662
|
+
case 60:
|
|
6221
6663
|
this.handleOnClickSaveForm(undefined);
|
|
6222
|
-
return [3 /*break*/,
|
|
6223
|
-
case
|
|
6664
|
+
return [3 /*break*/, 63];
|
|
6665
|
+
case 61:
|
|
6224
6666
|
this.alertShow(action.props.type, action.props.message);
|
|
6225
|
-
return [3 /*break*/,
|
|
6226
|
-
case
|
|
6227
|
-
case
|
|
6667
|
+
return [3 /*break*/, 63];
|
|
6668
|
+
case 62: return [3 /*break*/, 63];
|
|
6669
|
+
case 63: return [2 /*return*/];
|
|
6228
6670
|
}
|
|
6229
6671
|
});
|
|
6230
6672
|
});
|
|
@@ -6232,7 +6674,7 @@
|
|
|
6232
6674
|
return KwikIDFormViewComponent;
|
|
6233
6675
|
}());
|
|
6234
6676
|
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: KwikIDFormViewService }, { token: i5.TuiPushService }, { token: i3$1.TuiAlertService }, { token: i6.TuiPreviewDialogService }, { token: i3$1.TuiDialogService }, { token: i2__namespace.KwikUILoaderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6235
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", userConfig: "userConfig", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", getUnsavedDataState: "getUnsavedDataState", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm", onClickFormFieldButton: "onClickFormFieldButton" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of\n {{ formConfig.formsListLength }}</div\n >\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [style]=\"formConfig.properties?.main?.styles | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Email -->\n <ng-container *ngSwitchCase=\"'email'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-email\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [domains]=\"field?.properties?.domains\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-email>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Password -->\n <ng-container *ngSwitchCase=\"'password'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-password\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [hintContent]=\"field?.properties?.hintContent\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-password>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Capture -->\n <ng-container *ngSwitchCase=\"'capture'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'CAPTURE'\"\n [validators]=\"field?.validators\"\n (onClick)=\"handleOnClickInputCamera($event, field)\"\n (getRemovedFile)=\"handleOnClickGetRemovedMediaFile($event)\"\n ></kwikui-input-camera>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Star Rating -->\n <ng-container *ngSwitchCase=\"'star-rating'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-star-rating\n [color]=\"field?.properties?.color\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [iconMarked]=\"field?.properties?.iconMarked\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-star-rating>\n </label>\n <ng-template #labelTemplate>\n <p>\n <b\n >{{ field?.properties?.placeholder }}\n <span *ngIf=\"field.validators?.required\">*</span></b\n >\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n id=\"kwikid-camera-container\"\n *ngIf=\"isShowCameraCapture\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"'CAPTURE'\"\n [image]=\"cameraCaptureImage\"\n [config]=\"cameraCaptureConfig\"\n (getImage)=\"handleGetImage($event)\"\n (onClickSave)=\"handleOnClickSaveCameraCapture($event)\"\n >\n <ng-container slot=\"header\">\n <div style=\"display: flex; width: 100%; max-width: 100%; padding: 0rem\">\n <div style=\"flex: 1; text-align: left\"> </div>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraCaptureConfig?.header?.title\"\n shape=\"rounded\"\n style=\"\n flex: 1;\n width: 100%;\n min-width: max-content;\n text-align: center;\n margin: auto;\n \"\n size=\"s\"\n ></kwikui-button>\n <div\n style=\"\n flex: 1;\n text-align: right;\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n \"\n >\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen ? 'tuiIconMinimize2' : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCloseCamera($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n </kwikid-camera>\n </div>\n</div>\n", styles: [".kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}.preview-container>*:not(:last-child){margin-bottom:1rem}.preview-container .preview-html{flex-grow:1}.preview-container .preview-iframe-content{height:100%;flex-grow:1}.preview-container .preview-iframe-content .preview-iframe{width:100%;height:100%}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.preview-container .preview-unavailable>*:not(:last-child){margin-bottom:1rem}#kwikid-camera-container{width:100%;height:100%;position:fixed;top:50%;left:50%;background-color:#0000008f;transform:translate(-50%,-50%);z-index:100}#kwikid-camera-container #kwikid-camera-wrapper{width:min(80%);height:max(85%);box-shadow:#0000008f 0 22px 70px 4px;overflow:hidden;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:1rem;background-color:#000;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper.fullscreen{width:100%;height:100%;border-radius:0;transition:5s linear ease}@media only screen and (max-width: 600px){#kwikid-camera-container #kwikid-camera-wrapper{width:100%;height:100%;border-radius:0;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper #kwikid-camera-header-enlarge-button{display:none}}\n", "::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputEmailComponent, selector: "kwikui-input-email", inputs: ["case", "disabled", "domains", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPasswordComponent, selector: "kwikui-input-password", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["decimal", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "precision", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxCalculatedFromToday", "min", "minCalculatedFromToday", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSelectComponent, selector: "kwikui-input-select", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "options", "placeholder", "properties", "searchable", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "prefix", "properties", "quantum", "size", "steps", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "mode", "otpLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators"], outputs: ["getKeyValue", "getRemovedFile"] }, { type: i4__namespace.KwikUIInputCameraComponent, selector: "kwikui-input-camera", inputs: ["buttonText", "disabled", "focus", "formControl", "formControlName", "icon", "id", "invalid", "mediaFiles", "properties", "showMediaFiles", "size", "type", "validators"], outputs: ["onClick", "getRemovedFile"] }, { type: i2__namespace.KwikUIStarRatingComponent, selector: "kwikui-star-rating", inputs: ["color", "disabled", "focus", "formControl", "formControlName", "icon", "iconMarked", "id", "invalid", "label", "max", "min", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i5__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i6__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i6__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i4__namespace.KwikIDCameraComponent, selector: "kwikid-camera", inputs: ["type", "config", "data", "image"], outputs: ["getImage", "onClickSave"] }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2__namespace.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2__namespace.KwikUISafeUrlPipe } });
|
|
6677
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", userConfig: "userConfig", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", getUnsavedDataState: "getUnsavedDataState", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm", onClickFormFieldButton: "onClickFormFieldButton" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.logo?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n [style]=\"\n formConfig.properties?.header?.logo?.styles ?? '' | styleSanitizer\n \"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >\n Step {{ formConfig.sequenceNo }} of {{ formConfig.formsListLength }}\n </div>\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [style]=\"formConfig.properties?.main?.styles ?? '' | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Email -->\n <ng-container *ngSwitchCase=\"'email'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-email\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [domains]=\"field?.properties?.domains\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-email>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Password -->\n <ng-container *ngSwitchCase=\"'password'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-password\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [hintContent]=\"field?.properties?.hintContent\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-password>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Capture -->\n <ng-container *ngSwitchCase=\"'capture'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'CAPTURE'\"\n [validators]=\"field?.validators\"\n (onClick)=\"handleOnClickInputCamera($event, field)\"\n (getRemovedFile)=\"handleOnClickGetRemovedMediaFile($event)\"\n ></kwikui-input-camera>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Star Rating -->\n <ng-container *ngSwitchCase=\"'star-rating'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-star-rating\n [color]=\"field?.properties?.color\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [iconMarked]=\"field?.properties?.iconMarked\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-star-rating>\n </label>\n <ng-template #labelTemplate>\n <p>\n <b\n >{{ field?.properties?.placeholder }}\n <span *ngIf=\"field.validators?.required\">*</span></b\n >\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n id=\"kwikid-camera-container\"\n *ngIf=\"isShowCameraCapture\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"'CAPTURE'\"\n [image]=\"cameraCaptureImage\"\n [config]=\"cameraCaptureConfig\"\n (getImage)=\"handleGetImage($event)\"\n (onClickSave)=\"handleOnClickSaveCameraCapture($event)\"\n >\n <ng-container slot=\"header\">\n <div style=\"display: flex; width: 100%; max-width: 100%; padding: 0rem\">\n <div style=\"flex: 1; text-align: left\"> </div>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraCaptureConfig?.header?.title\"\n shape=\"rounded\"\n style=\"\n flex: 1;\n width: 100%;\n min-width: max-content;\n text-align: center;\n margin: auto;\n \"\n size=\"s\"\n ></kwikui-button>\n <div\n style=\"\n flex: 1;\n text-align: right;\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n \"\n >\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen ? 'tuiIconMinimize2' : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCloseCamera($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n </kwikid-camera>\n </div>\n</div>\n", styles: [".kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}.preview-container>*:not(:last-child){margin-bottom:1rem}.preview-container .preview-html{flex-grow:1}.preview-container .preview-iframe-content{height:100%;flex-grow:1}.preview-container .preview-iframe-content .preview-iframe{width:100%;height:100%}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.preview-container .preview-unavailable>*:not(:last-child){margin-bottom:1rem}#kwikid-camera-container{width:100%;height:100%;position:fixed;top:50%;left:50%;background-color:#0000008f;transform:translate(-50%,-50%);z-index:100}#kwikid-camera-container #kwikid-camera-wrapper{width:min(80%);height:max(85%);box-shadow:#0000008f 0 22px 70px 4px;overflow:hidden;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:1rem;background-color:#000;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper.fullscreen{width:100%;height:100%;border-radius:0;transition:5s linear ease}@media only screen and (max-width: 600px){#kwikid-camera-container #kwikid-camera-wrapper{width:100%;height:100%;border-radius:0;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper #kwikid-camera-header-enlarge-button{display:none}}\n", "::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputEmailComponent, selector: "kwikui-input-email", inputs: ["case", "disabled", "domains", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPasswordComponent, selector: "kwikui-input-password", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["decimal", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "precision", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxCalculatedFromToday", "min", "minCalculatedFromToday", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSelectComponent, selector: "kwikui-input-select", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "options", "placeholder", "properties", "searchable", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "prefix", "properties", "quantum", "size", "steps", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "mode", "otpLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators"], outputs: ["getKeyValue", "getRemovedFile"] }, { type: i4__namespace.KwikUIInputCameraComponent, selector: "kwikui-input-camera", inputs: ["buttonText", "disabled", "focus", "formControl", "formControlName", "icon", "id", "invalid", "mediaFiles", "properties", "showMediaFiles", "size", "type", "validators"], outputs: ["onClick", "getRemovedFile"] }, { type: i2__namespace.KwikUIStarRatingComponent, selector: "kwikui-star-rating", inputs: ["color", "disabled", "focus", "formControl", "formControlName", "icon", "iconMarked", "id", "invalid", "label", "max", "min", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i5__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i6__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i6__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i4__namespace.KwikIDCameraComponent, selector: "kwikid-camera", inputs: ["type", "config", "data", "image"], outputs: ["getImage", "onClickSave"] }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2__namespace.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2__namespace.KwikUISafeUrlPipe } });
|
|
6236
6678
|
__decorate([
|
|
6237
6679
|
kwikidToolkit.logMethod
|
|
6238
6680
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -6380,6 +6822,24 @@
|
|
|
6380
6822
|
__decorate([
|
|
6381
6823
|
kwikidToolkit.logMethod
|
|
6382
6824
|
], KwikIDFormViewComponent.prototype, "setFieldDefaultValue", null);
|
|
6825
|
+
__decorate([
|
|
6826
|
+
kwikidToolkit.logMethod
|
|
6827
|
+
], KwikIDFormViewComponent.prototype, "setApiStatus", null);
|
|
6828
|
+
__decorate([
|
|
6829
|
+
kwikidToolkit.logMethod
|
|
6830
|
+
], KwikIDFormViewComponent.prototype, "setApiHeaderValue", null);
|
|
6831
|
+
__decorate([
|
|
6832
|
+
kwikidToolkit.logMethod
|
|
6833
|
+
], KwikIDFormViewComponent.prototype, "setApiHeaderValidity", null);
|
|
6834
|
+
__decorate([
|
|
6835
|
+
kwikidToolkit.logMethod
|
|
6836
|
+
], KwikIDFormViewComponent.prototype, "setApiBodyValue", null);
|
|
6837
|
+
__decorate([
|
|
6838
|
+
kwikidToolkit.logMethod
|
|
6839
|
+
], KwikIDFormViewComponent.prototype, "setApiBodyValidity", null);
|
|
6840
|
+
__decorate([
|
|
6841
|
+
kwikidToolkit.logMethod
|
|
6842
|
+
], KwikIDFormViewComponent.prototype, "setFieldValidity", null);
|
|
6383
6843
|
__decorate([
|
|
6384
6844
|
kwikidToolkit.logMethod
|
|
6385
6845
|
], KwikIDFormViewComponent.prototype, "setDropdownOptions", null);
|
|
@@ -6507,7 +6967,7 @@
|
|
|
6507
6967
|
type: i0.Output
|
|
6508
6968
|
}], onClickFormFieldButton: [{
|
|
6509
6969
|
type: i0.Output
|
|
6510
|
-
}], ngOnInit: [], ngAfterViewInit: [], ngOnChanges: [], initFormConfig: [], setFormFieldsFromFormConfig: [], setFormFieldGroupsFromFormConfig: [], setFormDataFromAllFormsData: [], handleConnectedElementFieldGroupActions: [], handleConnectedElementFieldGroup: [], handleConnectedElementFieldActions: [], handleConnectedElementFields: [], handleConnectedElements: [], handleRemovedFile: [], handleGetKeyValueFile: [], handleOnClickGetRemovedMediaFile: [], handleOnClickInputCamera: [], setImage: [], handleOnClickSaveCameraCapture: [], handleGetImage: [], handleOnClickCloseCamera: [], updateFiles: [], uploadFile: [], handleOnClickFormFieldButton: [], handleGetKeyValue: [], handleOnClickResetFormFields: [], handleFieldApiCall: [], handleApiCall: [], executeApiCall: [], isValidRequestHeadersAndBody: [], handleOnClickApiCall: [], handleOnClickGoBack: [], handleOnClickViewForms: [], handleOnClickSaveForm: [], toggleErrorNotification: [], fieldHide: [], fieldGroupHide: [], fieldShow: [], fieldGroupShow: [], fieldDisable: [], fieldGroupDisable: [], fieldEnable: [], fieldGroupEnable: [], fieldReset: [], fieldErrorShow: [], fieldErrorHide: [], fieldMessageShow: [], fieldMessageHide: [], setValue: [], setFieldDefaultValue: [], setDropdownOptions: [], apiCall: [], fieldApiCall: [], fieldMultipleApiCalls: [], fieldMultipleApiCallsEnd: [], taskApiCall: [], taskMultipleApiCalls: [], taskMultipleApiCallsEnd: [], dialogShow: [], dialogHide: [], redirectToUrl: [], patchFieldControlValue: [], setFieldControlValue: [], patchFormGroup: [], isFieldValid: [], isFieldEnabled: [], getFormGroupRawValues: [], showPreview: [], showErrorPreview: [], showPopupForm: [], alertShow: [], takeActionOnFieldGroup: [], takeAction: [] } });
|
|
6970
|
+
}], ngOnInit: [], ngAfterViewInit: [], ngOnChanges: [], initFormConfig: [], setFormFieldsFromFormConfig: [], setFormFieldGroupsFromFormConfig: [], setFormDataFromAllFormsData: [], handleConnectedElementFieldGroupActions: [], handleConnectedElementFieldGroup: [], handleConnectedElementFieldActions: [], handleConnectedElementFields: [], handleConnectedElements: [], handleRemovedFile: [], handleGetKeyValueFile: [], handleOnClickGetRemovedMediaFile: [], handleOnClickInputCamera: [], setImage: [], handleOnClickSaveCameraCapture: [], handleGetImage: [], handleOnClickCloseCamera: [], updateFiles: [], uploadFile: [], handleOnClickFormFieldButton: [], handleGetKeyValue: [], handleOnClickResetFormFields: [], handleFieldApiCall: [], handleApiCall: [], executeApiCall: [], isValidRequestHeadersAndBody: [], handleOnClickApiCall: [], handleOnClickGoBack: [], handleOnClickViewForms: [], handleOnClickSaveForm: [], toggleErrorNotification: [], fieldHide: [], fieldGroupHide: [], fieldShow: [], fieldGroupShow: [], fieldDisable: [], fieldGroupDisable: [], fieldEnable: [], fieldGroupEnable: [], fieldReset: [], fieldErrorShow: [], fieldErrorHide: [], fieldMessageShow: [], fieldMessageHide: [], setValue: [], setFieldDefaultValue: [], setApiStatus: [], setApiHeaderValue: [], setApiHeaderValidity: [], setApiBodyValue: [], setApiBodyValidity: [], setFieldValidity: [], setDropdownOptions: [], apiCall: [], fieldApiCall: [], fieldMultipleApiCalls: [], fieldMultipleApiCallsEnd: [], taskApiCall: [], taskMultipleApiCalls: [], taskMultipleApiCallsEnd: [], dialogShow: [], dialogHide: [], redirectToUrl: [], patchFieldControlValue: [], setFieldControlValue: [], patchFormGroup: [], isFieldValid: [], isFieldEnabled: [], getFormGroupRawValues: [], showPreview: [], showErrorPreview: [], showPopupForm: [], alertShow: [], takeActionOnFieldGroup: [], takeAction: [] } });
|
|
6511
6971
|
|
|
6512
6972
|
var EFormType;
|
|
6513
6973
|
(function (EFormType) {
|