kwikid-forms 0.6.13 → 0.6.15
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 +464 -388
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/config-converter/config-converter.helper.js +19 -1
- package/esm2015/lib/renderer/config-converter/config-converter.js +36 -5
- package/esm2015/lib/renderer/form-view/definitions/from-view.logs.definition.js +5 -0
- package/esm2015/lib/renderer/form-view/form-view.component.js +21 -13
- package/esm2015/lib/renderer/form-view/form-view.service.js +2 -7
- package/esm2015/lib/renderer/forms-list/forms-list.component.js +15 -2
- package/esm2015/lib/renderer/renderer.component.js +12 -3
- package/fesm2015/kwikid-forms.js +98 -22
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/config-converter/config-converter.helper.d.ts +3 -0
- package/lib/renderer/form-view/definitions/from-view.logs.definition.d.ts +3 -0
- package/lib/renderer/form-view/form-view.component.d.ts +2 -1
- package/lib/renderer/forms-list/forms-list.component.d.ts +1 -0
- package/lib/renderer/renderer.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1176,6 +1176,24 @@
|
|
|
1176
1176
|
);
|
|
1177
1177
|
}
|
|
1178
1178
|
};
|
|
1179
|
+
var updateDisplayLanguage = function (object, language) {
|
|
1180
|
+
if (isObject(object)) {
|
|
1181
|
+
if (language && kwikidToolkit.checkObjectKeyExists(object, language)) {
|
|
1182
|
+
object = object[language];
|
|
1183
|
+
}
|
|
1184
|
+
else {
|
|
1185
|
+
object = object["en"];
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
return object;
|
|
1189
|
+
};
|
|
1190
|
+
var isObject = function (variable) {
|
|
1191
|
+
return typeof variable === "object" && variable !== null;
|
|
1192
|
+
};
|
|
1193
|
+
var getLanguage = function () {
|
|
1194
|
+
var _a, _b, _c;
|
|
1195
|
+
return ((_c = (_b = (_a = localStorage.getItem("lng")) !== null && _a !== void 0 ? _a : localStorage.getItem("lang")) !== null && _b !== void 0 ? _b : localStorage.getItem("language")) !== null && _c !== void 0 ? _c : "en");
|
|
1196
|
+
};
|
|
1179
1197
|
|
|
1180
1198
|
var Converter = /** @class */ (function () {
|
|
1181
1199
|
function Converter() {
|
|
@@ -1745,6 +1763,38 @@
|
|
|
1745
1763
|
}
|
|
1746
1764
|
return fieldGroups;
|
|
1747
1765
|
};
|
|
1766
|
+
var updateFormDisplayLanguage = function (formConfig, language) {
|
|
1767
|
+
if (kwikidToolkit.checkObjectPathExists(formConfig, "properties.header.title.label")) {
|
|
1768
|
+
formConfig.properties.header.title.label = updateDisplayLanguage(formConfig.properties.header.title.label, language);
|
|
1769
|
+
}
|
|
1770
|
+
if (kwikidToolkit.checkObjectPathExists(formConfig, "properties.footer.viewFormsButton.label")) {
|
|
1771
|
+
formConfig.properties.footer.viewFormsButton.label =
|
|
1772
|
+
updateDisplayLanguage(formConfig.properties.footer.viewFormsButton.label, language);
|
|
1773
|
+
}
|
|
1774
|
+
if (kwikidToolkit.checkObjectPathExists(formConfig, "properties.footer.saveButton.label")) {
|
|
1775
|
+
formConfig.properties.footer.saveButton.label = updateDisplayLanguage(formConfig.properties.footer.saveButton.label, language);
|
|
1776
|
+
}
|
|
1777
|
+
return formConfig;
|
|
1778
|
+
};
|
|
1779
|
+
var updateFieldDisplayLanguage = function (field, language) {
|
|
1780
|
+
if (kwikidToolkit.checkObjectKeyExists(field, "label")) {
|
|
1781
|
+
field.label = updateDisplayLanguage(field.label, language);
|
|
1782
|
+
}
|
|
1783
|
+
if (kwikidToolkit.checkObjectPathExists(field, "properties.placeholder")) {
|
|
1784
|
+
field.properties["placeholder"] = updateDisplayLanguage(field.properties["placeholder"], language);
|
|
1785
|
+
}
|
|
1786
|
+
var updateApiStatus = function (fieldApiStatus) {
|
|
1787
|
+
for (var status in fieldApiStatus) {
|
|
1788
|
+
fieldApiStatus[status] = updateDisplayLanguage(fieldApiStatus[status], language);
|
|
1789
|
+
}
|
|
1790
|
+
return fieldApiStatus;
|
|
1791
|
+
};
|
|
1792
|
+
if (field.type == EFieldType.API_CALL &&
|
|
1793
|
+
kwikidToolkit.checkObjectPathExists(field, "api.status")) {
|
|
1794
|
+
field["api"]["status"]["labels"] = updateApiStatus(field["api"]["status"]["labels"]);
|
|
1795
|
+
}
|
|
1796
|
+
return field;
|
|
1797
|
+
};
|
|
1748
1798
|
var fields = getFormFields(formConfig);
|
|
1749
1799
|
var fieldGroups = {};
|
|
1750
1800
|
try {
|
|
@@ -1753,12 +1803,10 @@
|
|
|
1753
1803
|
field = formatOnFieldType(field);
|
|
1754
1804
|
field = updateFieldDisability(field);
|
|
1755
1805
|
fieldGroups = updateFormFieldGroups(fieldGroups, field);
|
|
1756
|
-
console.log("sadssadasdsdda");
|
|
1757
|
-
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
1758
1806
|
field = updateFieldDefaultValue(field);
|
|
1759
|
-
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
1760
1807
|
field = updateFieldValidators(field);
|
|
1761
1808
|
field = updateFieldResetButton(field);
|
|
1809
|
+
field = updateFieldDisplayLanguage(field, getLanguage());
|
|
1762
1810
|
field = updateFieldMessages(field);
|
|
1763
1811
|
}
|
|
1764
1812
|
}
|
|
@@ -1769,6 +1817,7 @@
|
|
|
1769
1817
|
}
|
|
1770
1818
|
finally { if (e_1) throw e_1.error; }
|
|
1771
1819
|
}
|
|
1820
|
+
formConfig = updateFormDisplayLanguage(formConfig, getLanguage());
|
|
1772
1821
|
formConfig = setFormFieldGroups(formConfig, fieldGroups);
|
|
1773
1822
|
formConfig = setFormFields(formConfig, fields);
|
|
1774
1823
|
return formConfig;
|
|
@@ -3225,13 +3274,8 @@
|
|
|
3225
3274
|
value = _b.sent();
|
|
3226
3275
|
_b.label = 4;
|
|
3227
3276
|
case 4:
|
|
3228
|
-
console.log("sdasgdjsgsadaghas");
|
|
3229
|
-
console.log("sdasgdjsgsadaghas1");
|
|
3230
3277
|
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 6];
|
|
3231
|
-
console.log("sdasgdjsgsadaghas2");
|
|
3232
|
-
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
3233
3278
|
if (!kwikidToolkit.checkObjectKeyExists(field.default, "api")) return [3 /*break*/, 6];
|
|
3234
|
-
console.log("sdasgdjsgsadaghas3");
|
|
3235
3279
|
return [4 /*yield*/, defaults.getFormFieldApiValue()];
|
|
3236
3280
|
case 5:
|
|
3237
3281
|
_b.sent();
|
|
@@ -4013,6 +4057,11 @@
|
|
|
4013
4057
|
kwikidToolkit.logMethod
|
|
4014
4058
|
], Tasks.prototype, "execute", null);
|
|
4015
4059
|
|
|
4060
|
+
var ETypeLogs;
|
|
4061
|
+
(function (ETypeLogs) {
|
|
4062
|
+
ETypeLogs["API"] = "API";
|
|
4063
|
+
})(ETypeLogs || (ETypeLogs = {}));
|
|
4064
|
+
|
|
4016
4065
|
var StyleSanitizerPipe = /** @class */ (function () {
|
|
4017
4066
|
function StyleSanitizerPipe(sanitizer) {
|
|
4018
4067
|
this.sanitizer = sanitizer;
|
|
@@ -4047,6 +4096,7 @@
|
|
|
4047
4096
|
this.getUnsavedDataState = new i0.EventEmitter();
|
|
4048
4097
|
this.onClickSaveForm = new i0.EventEmitter();
|
|
4049
4098
|
this.onClickApiCall = new i0.EventEmitter();
|
|
4099
|
+
this.getLogs = new i0.EventEmitter();
|
|
4050
4100
|
this.onActionShowPopupForm = new i0.EventEmitter();
|
|
4051
4101
|
this.onClickFormFieldButton = new i0.EventEmitter();
|
|
4052
4102
|
this.fieldGroups = {};
|
|
@@ -4104,11 +4154,11 @@
|
|
|
4104
4154
|
var _this = this;
|
|
4105
4155
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4106
4156
|
var res;
|
|
4107
|
-
return __generator(this, function (
|
|
4108
|
-
switch (
|
|
4157
|
+
return __generator(this, function (_k) {
|
|
4158
|
+
switch (_k.label) {
|
|
4109
4159
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4110
4160
|
case 1:
|
|
4111
|
-
res =
|
|
4161
|
+
res = _k.sent();
|
|
4112
4162
|
if (res) {
|
|
4113
4163
|
this.loading = false;
|
|
4114
4164
|
}
|
|
@@ -4119,7 +4169,7 @@
|
|
|
4119
4169
|
};
|
|
4120
4170
|
KwikIDFormViewComponent.prototype.ngAfterViewInit = function () { };
|
|
4121
4171
|
KwikIDFormViewComponent.prototype.ngOnChanges = function (changes) {
|
|
4122
|
-
var
|
|
4172
|
+
var _k;
|
|
4123
4173
|
var _this = this;
|
|
4124
4174
|
var _a, _b, _c, _d;
|
|
4125
4175
|
var verifyChange = function (key) {
|
|
@@ -4141,9 +4191,9 @@
|
|
|
4141
4191
|
? changes.popupFormCallback.currentValue.popupFormData["data"]
|
|
4142
4192
|
: changes.popupFormCallback.currentValue.popupFormData;
|
|
4143
4193
|
var popupFormConfig = changes.popupFormCallback.currentValue.popupFormConfig;
|
|
4144
|
-
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (
|
|
4145
|
-
|
|
4146
|
-
|
|
4194
|
+
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (_k = {},
|
|
4195
|
+
_k[popupFormConfig.key] = popupFormData,
|
|
4196
|
+
_k));
|
|
4147
4197
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4148
4198
|
if (kwikidToolkit.checkObjectKeyExists(changes.popupFormCallback.currentValue, "stopTaskExecution")) {
|
|
4149
4199
|
this.stopTaskExecution =
|
|
@@ -4228,11 +4278,11 @@
|
|
|
4228
4278
|
ALL_FORMS_DATA: this.allFormsData
|
|
4229
4279
|
}, this.takeAction.bind(this));
|
|
4230
4280
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4231
|
-
return __generator(this, function (
|
|
4232
|
-
switch (
|
|
4281
|
+
return __generator(this, function (_k) {
|
|
4282
|
+
switch (_k.label) {
|
|
4233
4283
|
case 0: return [4 /*yield*/, validations_1.validate(field_1.validation)];
|
|
4234
4284
|
case 1:
|
|
4235
|
-
|
|
4285
|
+
_k.sent();
|
|
4236
4286
|
return [2 /*return*/];
|
|
4237
4287
|
}
|
|
4238
4288
|
});
|
|
@@ -4247,11 +4297,11 @@
|
|
|
4247
4297
|
if (verifyChange("formConfig")) {
|
|
4248
4298
|
this.formConfig = changes.formConfig.currentValue;
|
|
4249
4299
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4250
|
-
return __generator(this, function (
|
|
4251
|
-
switch (
|
|
4300
|
+
return __generator(this, function (_k) {
|
|
4301
|
+
switch (_k.label) {
|
|
4252
4302
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4253
4303
|
case 1:
|
|
4254
|
-
|
|
4304
|
+
_k.sent();
|
|
4255
4305
|
return [2 /*return*/];
|
|
4256
4306
|
}
|
|
4257
4307
|
});
|
|
@@ -4260,11 +4310,11 @@
|
|
|
4260
4310
|
};
|
|
4261
4311
|
KwikIDFormViewComponent.prototype.initFormConfig = function (formConfig) {
|
|
4262
4312
|
return __awaiter(this, void 0, void 0, function () {
|
|
4263
|
-
var
|
|
4264
|
-
var e_1,
|
|
4313
|
+
var _k, _l, preTask, task, e_1_1, _m, _loop_1, this_1, _o, _p, field, _q, _r, field, validations, e_2_1;
|
|
4314
|
+
var e_1, _s, e_3, _t, e_2, _u;
|
|
4265
4315
|
var _this = this;
|
|
4266
|
-
return __generator(this, function (
|
|
4267
|
-
switch (
|
|
4316
|
+
return __generator(this, function (_v) {
|
|
4317
|
+
switch (_v.label) {
|
|
4268
4318
|
case 0:
|
|
4269
4319
|
formConfig = new Converter().convertFormConfig(formConfig);
|
|
4270
4320
|
formConfig = new Converter().updateFormConfigProperties(formConfig);
|
|
@@ -4273,14 +4323,14 @@
|
|
|
4273
4323
|
this.setFormDataFromAllFormsData();
|
|
4274
4324
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
4275
4325
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "pre"))) return [3 /*break*/, 10];
|
|
4276
|
-
|
|
4326
|
+
_v.label = 1;
|
|
4277
4327
|
case 1:
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4328
|
+
_v.trys.push([1, 7, 8, 9]);
|
|
4329
|
+
_k = __values(this.formConfig.tasks.pre), _l = _k.next();
|
|
4330
|
+
_v.label = 2;
|
|
4281
4331
|
case 2:
|
|
4282
|
-
if (!!
|
|
4283
|
-
preTask =
|
|
4332
|
+
if (!!_l.done) return [3 /*break*/, 6];
|
|
4333
|
+
preTask = _l.value;
|
|
4284
4334
|
task = new Tasks(preTask, {
|
|
4285
4335
|
FORM_CONFIG: this.formConfig,
|
|
4286
4336
|
FORM_FIELDS: this.formFields,
|
|
@@ -4298,7 +4348,7 @@
|
|
|
4298
4348
|
}
|
|
4299
4349
|
return [4 /*yield*/, task.execute()];
|
|
4300
4350
|
case 3:
|
|
4301
|
-
|
|
4351
|
+
_v.sent();
|
|
4302
4352
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4303
4353
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
4304
4354
|
var intervalId = setInterval(function () {
|
|
@@ -4310,36 +4360,36 @@
|
|
|
4310
4360
|
})];
|
|
4311
4361
|
case 4:
|
|
4312
4362
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4313
|
-
|
|
4363
|
+
_v.sent();
|
|
4314
4364
|
if (this.stopTaskExecution) {
|
|
4315
4365
|
return [3 /*break*/, 6];
|
|
4316
4366
|
}
|
|
4317
|
-
|
|
4367
|
+
_v.label = 5;
|
|
4318
4368
|
case 5:
|
|
4319
|
-
|
|
4369
|
+
_l = _k.next();
|
|
4320
4370
|
return [3 /*break*/, 2];
|
|
4321
4371
|
case 6: return [3 /*break*/, 9];
|
|
4322
4372
|
case 7:
|
|
4323
|
-
e_1_1 =
|
|
4373
|
+
e_1_1 = _v.sent();
|
|
4324
4374
|
e_1 = { error: e_1_1 };
|
|
4325
4375
|
return [3 /*break*/, 9];
|
|
4326
4376
|
case 8:
|
|
4327
4377
|
try {
|
|
4328
|
-
if (
|
|
4378
|
+
if (_l && !_l.done && (_s = _k.return)) _s.call(_k);
|
|
4329
4379
|
}
|
|
4330
4380
|
finally { if (e_1) throw e_1.error; }
|
|
4331
4381
|
return [7 /*endfinally*/];
|
|
4332
4382
|
case 9:
|
|
4333
4383
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4334
|
-
|
|
4384
|
+
_v.label = 10;
|
|
4335
4385
|
case 10:
|
|
4336
4386
|
if (this.stopTaskExecution) {
|
|
4337
4387
|
return [2 /*return*/, false];
|
|
4338
4388
|
}
|
|
4339
|
-
|
|
4389
|
+
_m = this;
|
|
4340
4390
|
return [4 /*yield*/, this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this))];
|
|
4341
4391
|
case 11:
|
|
4342
|
-
|
|
4392
|
+
_m.formGroup = _v.sent();
|
|
4343
4393
|
/**
|
|
4344
4394
|
* For some reason if their a field of type 'IMAGE' then
|
|
4345
4395
|
* formData is adding a 'undefined' key with last image's value from the array.
|
|
@@ -4349,10 +4399,10 @@
|
|
|
4349
4399
|
delete this.formData["undefined"];
|
|
4350
4400
|
}
|
|
4351
4401
|
_loop_1 = function (field) {
|
|
4352
|
-
var
|
|
4402
|
+
var _w, _x;
|
|
4353
4403
|
if (field.isFormElement) {
|
|
4354
|
-
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (
|
|
4355
|
-
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (
|
|
4404
|
+
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_w = {}, _w[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _w));
|
|
4405
|
+
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (_x = {}, _x[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _x));
|
|
4356
4406
|
if (field.type === EFieldType.FILE) {
|
|
4357
4407
|
this_1.files[field.key] = this_1.formGroup.controls[field.key].value;
|
|
4358
4408
|
}
|
|
@@ -4363,11 +4413,11 @@
|
|
|
4363
4413
|
}
|
|
4364
4414
|
this_1.formGroup.controls[field.key].valueChanges
|
|
4365
4415
|
.pipe(operators.pairwise())
|
|
4366
|
-
.subscribe(function (
|
|
4367
|
-
var
|
|
4368
|
-
var
|
|
4369
|
-
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (
|
|
4370
|
-
_this.formData = Object.assign(Object.assign({}, _this.formData), (
|
|
4416
|
+
.subscribe(function (_k) {
|
|
4417
|
+
var _l, _m;
|
|
4418
|
+
var _o = __read(_k, 2), previousValue = _o[0], currentValue = _o[1];
|
|
4419
|
+
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (_l = {}, _l[field.key] = convertFormFieldValueToStandardFormat(field, previousValue), _l));
|
|
4420
|
+
_this.formData = Object.assign(Object.assign({}, _this.formData), (_m = {}, _m[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _m));
|
|
4371
4421
|
if (field.type === EFieldType.FILE) {
|
|
4372
4422
|
_this.files[field.key] = currentValue;
|
|
4373
4423
|
}
|
|
@@ -4381,26 +4431,26 @@
|
|
|
4381
4431
|
};
|
|
4382
4432
|
this_1 = this;
|
|
4383
4433
|
try {
|
|
4384
|
-
for (
|
|
4385
|
-
field =
|
|
4434
|
+
for (_o = __values(this.formFields), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
4435
|
+
field = _p.value;
|
|
4386
4436
|
_loop_1(field);
|
|
4387
4437
|
}
|
|
4388
4438
|
}
|
|
4389
4439
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
4390
4440
|
finally {
|
|
4391
4441
|
try {
|
|
4392
|
-
if (
|
|
4442
|
+
if (_p && !_p.done && (_t = _o.return)) _t.call(_o);
|
|
4393
4443
|
}
|
|
4394
4444
|
finally { if (e_3) throw e_3.error; }
|
|
4395
4445
|
}
|
|
4396
|
-
|
|
4446
|
+
_v.label = 12;
|
|
4397
4447
|
case 12:
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4448
|
+
_v.trys.push([12, 18, 19, 20]);
|
|
4449
|
+
_q = __values(this.formFields), _r = _q.next();
|
|
4450
|
+
_v.label = 13;
|
|
4401
4451
|
case 13:
|
|
4402
|
-
if (!!
|
|
4403
|
-
field =
|
|
4452
|
+
if (!!_r.done) return [3 /*break*/, 17];
|
|
4453
|
+
field = _r.value;
|
|
4404
4454
|
if (!field.isFormElement) return [3 /*break*/, 16];
|
|
4405
4455
|
if (!kwikidToolkit.checkObjectKeyExists(field, "validation")) return [3 /*break*/, 15];
|
|
4406
4456
|
if (!field.validation.triggers.includes("ON_INIT")) return [3 /*break*/, 15];
|
|
@@ -4414,8 +4464,8 @@
|
|
|
4414
4464
|
}, this.takeAction.bind(this));
|
|
4415
4465
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
4416
4466
|
case 14:
|
|
4417
|
-
|
|
4418
|
-
|
|
4467
|
+
_v.sent();
|
|
4468
|
+
_v.label = 15;
|
|
4419
4469
|
case 15:
|
|
4420
4470
|
if (kwikidToolkit.checkObjectKeyExists(field, "connectedElements")) {
|
|
4421
4471
|
this.handleConnectedElements({
|
|
@@ -4423,18 +4473,18 @@
|
|
|
4423
4473
|
value: this.formGroup.controls[field.key].value
|
|
4424
4474
|
}, "ON_INIT");
|
|
4425
4475
|
}
|
|
4426
|
-
|
|
4476
|
+
_v.label = 16;
|
|
4427
4477
|
case 16:
|
|
4428
|
-
|
|
4478
|
+
_r = _q.next();
|
|
4429
4479
|
return [3 /*break*/, 13];
|
|
4430
4480
|
case 17: return [3 /*break*/, 20];
|
|
4431
4481
|
case 18:
|
|
4432
|
-
e_2_1 =
|
|
4482
|
+
e_2_1 = _v.sent();
|
|
4433
4483
|
e_2 = { error: e_2_1 };
|
|
4434
4484
|
return [3 /*break*/, 20];
|
|
4435
4485
|
case 19:
|
|
4436
4486
|
try {
|
|
4437
|
-
if (
|
|
4487
|
+
if (_r && !_r.done && (_u = _q.return)) _u.call(_q);
|
|
4438
4488
|
}
|
|
4439
4489
|
finally { if (e_2) throw e_2.error; }
|
|
4440
4490
|
return [7 /*endfinally*/];
|
|
@@ -4472,10 +4522,10 @@
|
|
|
4472
4522
|
};
|
|
4473
4523
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroupActions = function (childFieldGroupConfig, parentField) {
|
|
4474
4524
|
return __awaiter(this, void 0, void 0, function () {
|
|
4475
|
-
var rulesMapping,
|
|
4476
|
-
var e_4,
|
|
4477
|
-
return __generator(this, function (
|
|
4478
|
-
switch (
|
|
4525
|
+
var rulesMapping, _k, _l, action, conditionSuccess, actions, e_4_1;
|
|
4526
|
+
var e_4, _m;
|
|
4527
|
+
return __generator(this, function (_o) {
|
|
4528
|
+
switch (_o.label) {
|
|
4479
4529
|
case 0:
|
|
4480
4530
|
if (!kwikidToolkit.checkObjectKeyExists(childFieldGroupConfig, "rules")) return [3 /*break*/, 8];
|
|
4481
4531
|
rulesMapping = new kwikidToolkit.Rule(childFieldGroupConfig.rules, {
|
|
@@ -4485,14 +4535,14 @@
|
|
|
4485
4535
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4486
4536
|
ALL_FORMS_DATA: this.allFormsData
|
|
4487
4537
|
}).mapping();
|
|
4488
|
-
|
|
4538
|
+
_o.label = 1;
|
|
4489
4539
|
case 1:
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4540
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
4541
|
+
_k = __values(childFieldGroupConfig.actions), _l = _k.next();
|
|
4542
|
+
_o.label = 2;
|
|
4493
4543
|
case 2:
|
|
4494
|
-
if (!!
|
|
4495
|
-
action =
|
|
4544
|
+
if (!!_l.done) return [3 /*break*/, 5];
|
|
4545
|
+
action = _l.value;
|
|
4496
4546
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
4497
4547
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
4498
4548
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -4505,19 +4555,19 @@
|
|
|
4505
4555
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
4506
4556
|
return [4 /*yield*/, actions.execute()];
|
|
4507
4557
|
case 3:
|
|
4508
|
-
|
|
4509
|
-
|
|
4558
|
+
_o.sent();
|
|
4559
|
+
_o.label = 4;
|
|
4510
4560
|
case 4:
|
|
4511
|
-
|
|
4561
|
+
_l = _k.next();
|
|
4512
4562
|
return [3 /*break*/, 2];
|
|
4513
4563
|
case 5: return [3 /*break*/, 8];
|
|
4514
4564
|
case 6:
|
|
4515
|
-
e_4_1 =
|
|
4565
|
+
e_4_1 = _o.sent();
|
|
4516
4566
|
e_4 = { error: e_4_1 };
|
|
4517
4567
|
return [3 /*break*/, 8];
|
|
4518
4568
|
case 7:
|
|
4519
4569
|
try {
|
|
4520
|
-
if (
|
|
4570
|
+
if (_l && !_l.done && (_m = _k.return)) _m.call(_k);
|
|
4521
4571
|
}
|
|
4522
4572
|
finally { if (e_4) throw e_4.error; }
|
|
4523
4573
|
return [7 /*endfinally*/];
|
|
@@ -4528,15 +4578,15 @@
|
|
|
4528
4578
|
};
|
|
4529
4579
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroup = function (currentField, connectedFieldGroupConfig, eventType) {
|
|
4530
4580
|
return __awaiter(this, void 0, void 0, function () {
|
|
4531
|
-
return __generator(this, function (
|
|
4532
|
-
switch (
|
|
4581
|
+
return __generator(this, function (_k) {
|
|
4582
|
+
switch (_k.label) {
|
|
4533
4583
|
case 0:
|
|
4534
4584
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldGroupConfig, "triggers")) return [3 /*break*/, 2];
|
|
4535
4585
|
if (!connectedFieldGroupConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
4536
4586
|
return [4 /*yield*/, this.handleConnectedElementFieldGroupActions(connectedFieldGroupConfig, currentField)];
|
|
4537
4587
|
case 1:
|
|
4538
|
-
|
|
4539
|
-
|
|
4588
|
+
_k.sent();
|
|
4589
|
+
_k.label = 2;
|
|
4540
4590
|
case 2: return [2 /*return*/];
|
|
4541
4591
|
}
|
|
4542
4592
|
});
|
|
@@ -4544,10 +4594,10 @@
|
|
|
4544
4594
|
};
|
|
4545
4595
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldActions = function (connectedFieldConfig, connectedField) {
|
|
4546
4596
|
return __awaiter(this, void 0, void 0, function () {
|
|
4547
|
-
var rulesMapping,
|
|
4548
|
-
var e_5,
|
|
4549
|
-
return __generator(this, function (
|
|
4550
|
-
switch (
|
|
4597
|
+
var rulesMapping, _k, _l, action, conditionSuccess, actions, e_5_1;
|
|
4598
|
+
var e_5, _m;
|
|
4599
|
+
return __generator(this, function (_o) {
|
|
4600
|
+
switch (_o.label) {
|
|
4551
4601
|
case 0:
|
|
4552
4602
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "rules")) return [3 /*break*/, 8];
|
|
4553
4603
|
rulesMapping = new kwikidToolkit.Rule(connectedFieldConfig.rules, {
|
|
@@ -4557,14 +4607,14 @@
|
|
|
4557
4607
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4558
4608
|
ALL_FORMS_DATA: this.allFormsData
|
|
4559
4609
|
}).mapping();
|
|
4560
|
-
|
|
4610
|
+
_o.label = 1;
|
|
4561
4611
|
case 1:
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4612
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
4613
|
+
_k = __values(connectedFieldConfig.actions), _l = _k.next();
|
|
4614
|
+
_o.label = 2;
|
|
4565
4615
|
case 2:
|
|
4566
|
-
if (!!
|
|
4567
|
-
action =
|
|
4616
|
+
if (!!_l.done) return [3 /*break*/, 5];
|
|
4617
|
+
action = _l.value;
|
|
4568
4618
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
4569
4619
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
4570
4620
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -4577,19 +4627,19 @@
|
|
|
4577
4627
|
}, this.takeAction.bind(this));
|
|
4578
4628
|
return [4 /*yield*/, actions.execute()];
|
|
4579
4629
|
case 3:
|
|
4580
|
-
|
|
4581
|
-
|
|
4630
|
+
_o.sent();
|
|
4631
|
+
_o.label = 4;
|
|
4582
4632
|
case 4:
|
|
4583
|
-
|
|
4633
|
+
_l = _k.next();
|
|
4584
4634
|
return [3 /*break*/, 2];
|
|
4585
4635
|
case 5: return [3 /*break*/, 8];
|
|
4586
4636
|
case 6:
|
|
4587
|
-
e_5_1 =
|
|
4637
|
+
e_5_1 = _o.sent();
|
|
4588
4638
|
e_5 = { error: e_5_1 };
|
|
4589
4639
|
return [3 /*break*/, 8];
|
|
4590
4640
|
case 7:
|
|
4591
4641
|
try {
|
|
4592
|
-
if (
|
|
4642
|
+
if (_l && !_l.done && (_m = _k.return)) _m.call(_k);
|
|
4593
4643
|
}
|
|
4594
4644
|
finally { if (e_5) throw e_5.error; }
|
|
4595
4645
|
return [7 /*endfinally*/];
|
|
@@ -4601,16 +4651,16 @@
|
|
|
4601
4651
|
KwikIDFormViewComponent.prototype.handleConnectedElementFields = function (currentField, connectedFieldConfig, eventType, nested) {
|
|
4602
4652
|
return __awaiter(this, void 0, void 0, function () {
|
|
4603
4653
|
var connectedField;
|
|
4604
|
-
return __generator(this, function (
|
|
4605
|
-
switch (
|
|
4654
|
+
return __generator(this, function (_k) {
|
|
4655
|
+
switch (_k.label) {
|
|
4606
4656
|
case 0:
|
|
4607
4657
|
connectedField = getFormFieldByKey(this.formFields, connectedFieldConfig["key"]);
|
|
4608
4658
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "triggers")) return [3 /*break*/, 2];
|
|
4609
4659
|
if (!connectedFieldConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
4610
4660
|
return [4 /*yield*/, this.handleConnectedElementFieldActions(connectedFieldConfig, connectedField)];
|
|
4611
4661
|
case 1:
|
|
4612
|
-
connectedField =
|
|
4613
|
-
|
|
4662
|
+
connectedField = _k.sent();
|
|
4663
|
+
_k.label = 2;
|
|
4614
4664
|
case 2:
|
|
4615
4665
|
if (kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "handleNestedFields")) {
|
|
4616
4666
|
if (connectedFieldConfig.handleNestedFields) {
|
|
@@ -4625,67 +4675,67 @@
|
|
|
4625
4675
|
KwikIDFormViewComponent.prototype.handleConnectedElements = function (e, eventType) {
|
|
4626
4676
|
return __awaiter(this, void 0, void 0, function () {
|
|
4627
4677
|
var currentField, connectedFieldGroups, connectedFieldGroups_1, connectedFieldGroups_1_1, connectedFieldGroupConfig, e_6_1, connectedFields, connectedFields_1, connectedFields_1_1, connectedFieldConfig, e_7_1;
|
|
4628
|
-
var e_6,
|
|
4629
|
-
return __generator(this, function (
|
|
4630
|
-
switch (
|
|
4678
|
+
var e_6, _k, e_7, _l;
|
|
4679
|
+
return __generator(this, function (_m) {
|
|
4680
|
+
switch (_m.label) {
|
|
4631
4681
|
case 0:
|
|
4632
4682
|
currentField = getFormFieldByKey(this.formFields, e.key);
|
|
4633
4683
|
if (!(currentField !== undefined)) return [3 /*break*/, 17];
|
|
4634
4684
|
if (!kwikidToolkit.checkObjectKeyExists(currentField, "connectedElements")) return [3 /*break*/, 16];
|
|
4635
4685
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFieldGroups")) return [3 /*break*/, 8];
|
|
4636
4686
|
connectedFieldGroups = currentField.connectedElements.connectedFieldGroups;
|
|
4637
|
-
|
|
4687
|
+
_m.label = 1;
|
|
4638
4688
|
case 1:
|
|
4639
|
-
|
|
4689
|
+
_m.trys.push([1, 6, 7, 8]);
|
|
4640
4690
|
connectedFieldGroups_1 = __values(connectedFieldGroups), connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
4641
|
-
|
|
4691
|
+
_m.label = 2;
|
|
4642
4692
|
case 2:
|
|
4643
4693
|
if (!!connectedFieldGroups_1_1.done) return [3 /*break*/, 5];
|
|
4644
4694
|
connectedFieldGroupConfig = connectedFieldGroups_1_1.value;
|
|
4645
4695
|
return [4 /*yield*/, this.handleConnectedElementFieldGroup(currentField, connectedFieldGroupConfig, eventType)];
|
|
4646
4696
|
case 3:
|
|
4647
|
-
|
|
4648
|
-
|
|
4697
|
+
_m.sent();
|
|
4698
|
+
_m.label = 4;
|
|
4649
4699
|
case 4:
|
|
4650
4700
|
connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
4651
4701
|
return [3 /*break*/, 2];
|
|
4652
4702
|
case 5: return [3 /*break*/, 8];
|
|
4653
4703
|
case 6:
|
|
4654
|
-
e_6_1 =
|
|
4704
|
+
e_6_1 = _m.sent();
|
|
4655
4705
|
e_6 = { error: e_6_1 };
|
|
4656
4706
|
return [3 /*break*/, 8];
|
|
4657
4707
|
case 7:
|
|
4658
4708
|
try {
|
|
4659
|
-
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (
|
|
4709
|
+
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (_k = connectedFieldGroups_1.return)) _k.call(connectedFieldGroups_1);
|
|
4660
4710
|
}
|
|
4661
4711
|
finally { if (e_6) throw e_6.error; }
|
|
4662
4712
|
return [7 /*endfinally*/];
|
|
4663
4713
|
case 8:
|
|
4664
4714
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFields")) return [3 /*break*/, 16];
|
|
4665
4715
|
connectedFields = currentField.connectedElements.connectedFields;
|
|
4666
|
-
|
|
4716
|
+
_m.label = 9;
|
|
4667
4717
|
case 9:
|
|
4668
|
-
|
|
4718
|
+
_m.trys.push([9, 14, 15, 16]);
|
|
4669
4719
|
connectedFields_1 = __values(connectedFields), connectedFields_1_1 = connectedFields_1.next();
|
|
4670
|
-
|
|
4720
|
+
_m.label = 10;
|
|
4671
4721
|
case 10:
|
|
4672
4722
|
if (!!connectedFields_1_1.done) return [3 /*break*/, 13];
|
|
4673
4723
|
connectedFieldConfig = connectedFields_1_1.value;
|
|
4674
4724
|
return [4 /*yield*/, this.handleConnectedElementFields(currentField, connectedFieldConfig, eventType, eventType)];
|
|
4675
4725
|
case 11:
|
|
4676
|
-
currentField =
|
|
4677
|
-
|
|
4726
|
+
currentField = _m.sent();
|
|
4727
|
+
_m.label = 12;
|
|
4678
4728
|
case 12:
|
|
4679
4729
|
connectedFields_1_1 = connectedFields_1.next();
|
|
4680
4730
|
return [3 /*break*/, 10];
|
|
4681
4731
|
case 13: return [3 /*break*/, 16];
|
|
4682
4732
|
case 14:
|
|
4683
|
-
e_7_1 =
|
|
4733
|
+
e_7_1 = _m.sent();
|
|
4684
4734
|
e_7 = { error: e_7_1 };
|
|
4685
4735
|
return [3 /*break*/, 16];
|
|
4686
4736
|
case 15:
|
|
4687
4737
|
try {
|
|
4688
|
-
if (connectedFields_1_1 && !connectedFields_1_1.done && (
|
|
4738
|
+
if (connectedFields_1_1 && !connectedFields_1_1.done && (_l = connectedFields_1.return)) _l.call(connectedFields_1);
|
|
4689
4739
|
}
|
|
4690
4740
|
finally { if (e_7) throw e_7.error; }
|
|
4691
4741
|
return [7 /*endfinally*/];
|
|
@@ -4697,23 +4747,23 @@
|
|
|
4697
4747
|
});
|
|
4698
4748
|
};
|
|
4699
4749
|
KwikIDFormViewComponent.prototype.handleRemovedFile = function (e) {
|
|
4700
|
-
var
|
|
4750
|
+
var _k;
|
|
4701
4751
|
this.showApiLoader();
|
|
4702
4752
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
4703
4753
|
this.files[e.key] = e.files;
|
|
4704
4754
|
this.formData[e.key] = filterDuplicatesFiles(this.files[e.key]);
|
|
4705
|
-
this.formGroup.patchValue((
|
|
4706
|
-
|
|
4707
|
-
|
|
4755
|
+
this.formGroup.patchValue((_k = {},
|
|
4756
|
+
_k[e.key] = this.formData[e.key],
|
|
4757
|
+
_k), { emitEvent: false });
|
|
4708
4758
|
}
|
|
4709
4759
|
this.hideApiLoader();
|
|
4710
4760
|
};
|
|
4711
4761
|
KwikIDFormViewComponent.prototype.handleGetKeyValueFile = function (e) {
|
|
4712
4762
|
return __awaiter(this, void 0, void 0, function () {
|
|
4713
4763
|
var field, values, values_1, values_1_1, value, e_8_1, _loop_2, this_2, values_2, values_2_1, value, e_9_1;
|
|
4714
|
-
var e_8,
|
|
4715
|
-
return __generator(this, function (
|
|
4716
|
-
switch (
|
|
4764
|
+
var e_8, _k, e_9, _l;
|
|
4765
|
+
return __generator(this, function (_m) {
|
|
4766
|
+
switch (_m.label) {
|
|
4717
4767
|
case 0:
|
|
4718
4768
|
this.showApiLoader();
|
|
4719
4769
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
@@ -4721,41 +4771,41 @@
|
|
|
4721
4771
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
4722
4772
|
kwikidToolkit.checkObjectKeyExists(field.properties, "uploadFileToServer") &&
|
|
4723
4773
|
field.properties.uploadFileToServer)) return [3 /*break*/, 9];
|
|
4724
|
-
|
|
4774
|
+
_m.label = 1;
|
|
4725
4775
|
case 1:
|
|
4726
|
-
|
|
4776
|
+
_m.trys.push([1, 6, 7, 8]);
|
|
4727
4777
|
values_1 = __values(values), values_1_1 = values_1.next();
|
|
4728
|
-
|
|
4778
|
+
_m.label = 2;
|
|
4729
4779
|
case 2:
|
|
4730
4780
|
if (!!values_1_1.done) return [3 /*break*/, 5];
|
|
4731
4781
|
value = values_1_1.value;
|
|
4732
4782
|
return [4 /*yield*/, this.uploadFile(field, value)];
|
|
4733
4783
|
case 3:
|
|
4734
|
-
|
|
4735
|
-
|
|
4784
|
+
_m.sent();
|
|
4785
|
+
_m.label = 4;
|
|
4736
4786
|
case 4:
|
|
4737
4787
|
values_1_1 = values_1.next();
|
|
4738
4788
|
return [3 /*break*/, 2];
|
|
4739
4789
|
case 5: return [3 /*break*/, 8];
|
|
4740
4790
|
case 6:
|
|
4741
|
-
e_8_1 =
|
|
4791
|
+
e_8_1 = _m.sent();
|
|
4742
4792
|
e_8 = { error: e_8_1 };
|
|
4743
4793
|
return [3 /*break*/, 8];
|
|
4744
4794
|
case 7:
|
|
4745
4795
|
try {
|
|
4746
|
-
if (values_1_1 && !values_1_1.done && (
|
|
4796
|
+
if (values_1_1 && !values_1_1.done && (_k = values_1.return)) _k.call(values_1);
|
|
4747
4797
|
}
|
|
4748
4798
|
finally { if (e_8) throw e_8.error; }
|
|
4749
4799
|
return [7 /*endfinally*/];
|
|
4750
4800
|
case 8: return [3 /*break*/, 18];
|
|
4751
4801
|
case 9:
|
|
4752
4802
|
_loop_2 = function (value) {
|
|
4753
|
-
var updatedFile,
|
|
4754
|
-
return __generator(this, function (
|
|
4755
|
-
switch (
|
|
4803
|
+
var updatedFile, _o;
|
|
4804
|
+
return __generator(this, function (_p) {
|
|
4805
|
+
switch (_p.label) {
|
|
4756
4806
|
case 0:
|
|
4757
4807
|
this_2.updateFiles(value, "LOADING", e.key);
|
|
4758
|
-
|
|
4808
|
+
_o = kwikidToolkit.getObjectDeepCopy;
|
|
4759
4809
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
4760
4810
|
setTimeout(function () {
|
|
4761
4811
|
resolve({
|
|
@@ -4769,42 +4819,42 @@
|
|
|
4769
4819
|
}, 300); // 1000 ms = 1 sec
|
|
4770
4820
|
})];
|
|
4771
4821
|
case 1:
|
|
4772
|
-
updatedFile =
|
|
4822
|
+
updatedFile = _o.apply(void 0, [_p.sent()]);
|
|
4773
4823
|
this_2.updateFiles(updatedFile, "NORMAL", e.key);
|
|
4774
4824
|
return [2 /*return*/];
|
|
4775
4825
|
}
|
|
4776
4826
|
});
|
|
4777
4827
|
};
|
|
4778
4828
|
this_2 = this;
|
|
4779
|
-
|
|
4829
|
+
_m.label = 10;
|
|
4780
4830
|
case 10:
|
|
4781
|
-
|
|
4831
|
+
_m.trys.push([10, 15, 16, 17]);
|
|
4782
4832
|
values_2 = __values(values), values_2_1 = values_2.next();
|
|
4783
|
-
|
|
4833
|
+
_m.label = 11;
|
|
4784
4834
|
case 11:
|
|
4785
4835
|
if (!!values_2_1.done) return [3 /*break*/, 14];
|
|
4786
4836
|
value = values_2_1.value;
|
|
4787
4837
|
return [5 /*yield**/, _loop_2(value)];
|
|
4788
4838
|
case 12:
|
|
4789
|
-
|
|
4790
|
-
|
|
4839
|
+
_m.sent();
|
|
4840
|
+
_m.label = 13;
|
|
4791
4841
|
case 13:
|
|
4792
4842
|
values_2_1 = values_2.next();
|
|
4793
4843
|
return [3 /*break*/, 11];
|
|
4794
4844
|
case 14: return [3 /*break*/, 17];
|
|
4795
4845
|
case 15:
|
|
4796
|
-
e_9_1 =
|
|
4846
|
+
e_9_1 = _m.sent();
|
|
4797
4847
|
e_9 = { error: e_9_1 };
|
|
4798
4848
|
return [3 /*break*/, 17];
|
|
4799
4849
|
case 16:
|
|
4800
4850
|
try {
|
|
4801
|
-
if (values_2_1 && !values_2_1.done && (
|
|
4851
|
+
if (values_2_1 && !values_2_1.done && (_l = values_2.return)) _l.call(values_2);
|
|
4802
4852
|
}
|
|
4803
4853
|
finally { if (e_9) throw e_9.error; }
|
|
4804
4854
|
return [7 /*endfinally*/];
|
|
4805
4855
|
case 17:
|
|
4806
4856
|
this.hideApiLoader();
|
|
4807
|
-
|
|
4857
|
+
_m.label = 18;
|
|
4808
4858
|
case 18: return [2 /*return*/];
|
|
4809
4859
|
}
|
|
4810
4860
|
});
|
|
@@ -4812,16 +4862,16 @@
|
|
|
4812
4862
|
};
|
|
4813
4863
|
/** Methods for Camera related fields like 'CAPTURE' */
|
|
4814
4864
|
KwikIDFormViewComponent.prototype.handleOnClickGetRemovedMediaFile = function (e) {
|
|
4815
|
-
var
|
|
4865
|
+
var _k;
|
|
4816
4866
|
this.showApiLoader();
|
|
4817
4867
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
4818
4868
|
this.cameraCaptureFieldKey = "";
|
|
4819
4869
|
this.cameraCaptureImage = "";
|
|
4820
4870
|
this.mediaFiles[e.key] = e.mediaFiles;
|
|
4821
4871
|
this.formData[e.key] = filterDuplicatesMediaFiles(this.mediaFiles[e.key]);
|
|
4822
|
-
this.formGroup.patchValue((
|
|
4823
|
-
|
|
4824
|
-
|
|
4872
|
+
this.formGroup.patchValue((_k = {},
|
|
4873
|
+
_k[e.key] = this.formData[e.key],
|
|
4874
|
+
_k), { emitEvent: false });
|
|
4825
4875
|
}
|
|
4826
4876
|
this.hideApiLoader();
|
|
4827
4877
|
};
|
|
@@ -4840,8 +4890,8 @@
|
|
|
4840
4890
|
KwikIDFormViewComponent.prototype.setImage = function (image) {
|
|
4841
4891
|
return __awaiter(this, void 0, void 0, function () {
|
|
4842
4892
|
var field;
|
|
4843
|
-
return __generator(this, function (
|
|
4844
|
-
switch (
|
|
4893
|
+
return __generator(this, function (_k) {
|
|
4894
|
+
switch (_k.label) {
|
|
4845
4895
|
case 0:
|
|
4846
4896
|
field = getFormFieldByKey(this.formFields, this.cameraCaptureFieldKey);
|
|
4847
4897
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
@@ -4849,7 +4899,7 @@
|
|
|
4849
4899
|
field.properties.uploadFileToServer)) return [3 /*break*/, 2];
|
|
4850
4900
|
return [4 /*yield*/, this.uploadFile(field, image)];
|
|
4851
4901
|
case 1:
|
|
4852
|
-
|
|
4902
|
+
_k.sent();
|
|
4853
4903
|
return [3 /*break*/, 3];
|
|
4854
4904
|
case 2:
|
|
4855
4905
|
this.cameraCaptureImage = "";
|
|
@@ -4862,7 +4912,7 @@
|
|
|
4862
4912
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
4863
4913
|
emitEvent: false
|
|
4864
4914
|
});
|
|
4865
|
-
|
|
4915
|
+
_k.label = 3;
|
|
4866
4916
|
case 3: return [2 /*return*/];
|
|
4867
4917
|
}
|
|
4868
4918
|
});
|
|
@@ -4917,7 +4967,7 @@
|
|
|
4917
4967
|
* This method is used to update the files array with the new file and it's state and response from the api of uploading the file.
|
|
4918
4968
|
*/
|
|
4919
4969
|
KwikIDFormViewComponent.prototype.updateFiles = function (file, state, key) {
|
|
4920
|
-
var
|
|
4970
|
+
var _k;
|
|
4921
4971
|
var _a;
|
|
4922
4972
|
var fileWithState = kwikidToolkit.mergeObjects(file, { state: state });
|
|
4923
4973
|
var field = getFormFieldByKey(this.formFields, key);
|
|
@@ -4944,16 +4994,16 @@
|
|
|
4944
4994
|
emitEvent: false,
|
|
4945
4995
|
onlySelf: false
|
|
4946
4996
|
});
|
|
4947
|
-
this.formGroup.patchValue((
|
|
4948
|
-
|
|
4949
|
-
|
|
4997
|
+
this.formGroup.patchValue((_k = {},
|
|
4998
|
+
_k[key] = normalFiles,
|
|
4999
|
+
_k), { emitEvent: false });
|
|
4950
5000
|
};
|
|
4951
5001
|
/**
|
|
4952
5002
|
* This is a api upload mocking method. Set's to loading at first at point when API is called and then changes the status to random status after 2 seconds of delay showing a mocked response from API.
|
|
4953
5003
|
*/
|
|
4954
5004
|
KwikIDFormViewComponent.prototype.uploadFile = function (field, file) {
|
|
4955
5005
|
return __awaiter(this, void 0, void 0, function () {
|
|
4956
|
-
return __generator(this, function (
|
|
5006
|
+
return __generator(this, function (_k) {
|
|
4957
5007
|
switch (field.type) {
|
|
4958
5008
|
case EFieldType.FILE:
|
|
4959
5009
|
this.updateFiles(file, "LOADING", field.key);
|
|
@@ -4999,11 +5049,11 @@
|
|
|
4999
5049
|
});
|
|
5000
5050
|
};
|
|
5001
5051
|
KwikIDFormViewComponent.prototype.handleOnClickFormFieldButton = function (field) {
|
|
5002
|
-
var e_10,
|
|
5052
|
+
var e_10, _k;
|
|
5003
5053
|
var formData = this.formGroup.getRawValue();
|
|
5004
5054
|
try {
|
|
5005
|
-
for (var
|
|
5006
|
-
var field_2 =
|
|
5055
|
+
for (var _l = __values(this.formFields), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
5056
|
+
var field_2 = _m.value;
|
|
5007
5057
|
if (field_2.isFormElement) {
|
|
5008
5058
|
if (field_2.hidden) {
|
|
5009
5059
|
delete formData[field_2.key];
|
|
@@ -5017,22 +5067,22 @@
|
|
|
5017
5067
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
5018
5068
|
finally {
|
|
5019
5069
|
try {
|
|
5020
|
-
if (
|
|
5070
|
+
if (_m && !_m.done && (_k = _l.return)) _k.call(_l);
|
|
5021
5071
|
}
|
|
5022
5072
|
finally { if (e_10) throw e_10.error; }
|
|
5023
5073
|
}
|
|
5024
5074
|
var extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
5025
|
-
var
|
|
5075
|
+
var _k;
|
|
5026
5076
|
if (field.isFormElement && !field.hidden) {
|
|
5027
|
-
var fieldData = (
|
|
5028
|
-
|
|
5077
|
+
var fieldData = (_k = {},
|
|
5078
|
+
_k[field.key] = {
|
|
5029
5079
|
key: field.key,
|
|
5030
5080
|
label: field.label,
|
|
5031
5081
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
5032
5082
|
type: field.type,
|
|
5033
5083
|
index: index
|
|
5034
5084
|
},
|
|
5035
|
-
|
|
5085
|
+
_k);
|
|
5036
5086
|
result[field.key] = fieldData[field.key];
|
|
5037
5087
|
}
|
|
5038
5088
|
return result;
|
|
@@ -5045,11 +5095,11 @@
|
|
|
5045
5095
|
};
|
|
5046
5096
|
// DOM Event Handlers
|
|
5047
5097
|
KwikIDFormViewComponent.prototype.handleGetKeyValue = function (e) {
|
|
5048
|
-
var
|
|
5098
|
+
var _k;
|
|
5049
5099
|
var _this = this;
|
|
5050
|
-
this.formGroup.patchValue((
|
|
5051
|
-
|
|
5052
|
-
|
|
5100
|
+
this.formGroup.patchValue((_k = {},
|
|
5101
|
+
_k[e.key] = e.value,
|
|
5102
|
+
_k), { emitEvent: false });
|
|
5053
5103
|
var field = getFormFieldByKey(this.formFields, e.key);
|
|
5054
5104
|
this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
|
|
5055
5105
|
this.getUnsavedDataState.emit(true);
|
|
@@ -5065,11 +5115,11 @@
|
|
|
5065
5115
|
ALL_FORMS_DATA: this.allFormsData
|
|
5066
5116
|
}, this.takeAction.bind(this));
|
|
5067
5117
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5068
|
-
return __generator(this, function (
|
|
5069
|
-
switch (
|
|
5118
|
+
return __generator(this, function (_k) {
|
|
5119
|
+
switch (_k.label) {
|
|
5070
5120
|
case 0: return [4 /*yield*/, validations_2.validate(field.validation)];
|
|
5071
5121
|
case 1:
|
|
5072
|
-
|
|
5122
|
+
_k.sent();
|
|
5073
5123
|
return [2 /*return*/];
|
|
5074
5124
|
}
|
|
5075
5125
|
});
|
|
@@ -5088,27 +5138,27 @@
|
|
|
5088
5138
|
return __awaiter(this, void 0, void 0, function () {
|
|
5089
5139
|
var resetFormFields, BYPASS_RESET_CONFIRM, CONFIRM_RESET;
|
|
5090
5140
|
var _this = this;
|
|
5091
|
-
return __generator(this, function (
|
|
5141
|
+
return __generator(this, function (_k) {
|
|
5092
5142
|
resetFormFields = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5093
|
-
var
|
|
5094
|
-
var e_12,
|
|
5095
|
-
return __generator(this, function (
|
|
5096
|
-
switch (
|
|
5143
|
+
var _k, _l, f, _m, _o, action, resetField, actions, e_11_1, e_12_1;
|
|
5144
|
+
var e_12, _p, e_11, _q;
|
|
5145
|
+
return __generator(this, function (_r) {
|
|
5146
|
+
switch (_r.label) {
|
|
5097
5147
|
case 0:
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5148
|
+
_r.trys.push([0, 11, 12, 13]);
|
|
5149
|
+
_k = __values(field.reset.fields), _l = _k.next();
|
|
5150
|
+
_r.label = 1;
|
|
5101
5151
|
case 1:
|
|
5102
|
-
if (!!
|
|
5103
|
-
f =
|
|
5104
|
-
|
|
5152
|
+
if (!!_l.done) return [3 /*break*/, 10];
|
|
5153
|
+
f = _l.value;
|
|
5154
|
+
_r.label = 2;
|
|
5105
5155
|
case 2:
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5156
|
+
_r.trys.push([2, 7, 8, 9]);
|
|
5157
|
+
_m = (e_11 = void 0, __values(f.actions)), _o = _m.next();
|
|
5158
|
+
_r.label = 3;
|
|
5109
5159
|
case 3:
|
|
5110
|
-
if (!!
|
|
5111
|
-
action =
|
|
5160
|
+
if (!!_o.done) return [3 /*break*/, 6];
|
|
5161
|
+
action = _o.value;
|
|
5112
5162
|
resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
5113
5163
|
actions = new kwikidToolkit.Action(action, {}, {
|
|
5114
5164
|
FIELD_CONFIG: resetField,
|
|
@@ -5120,33 +5170,33 @@
|
|
|
5120
5170
|
}, this.takeAction.bind(this));
|
|
5121
5171
|
return [4 /*yield*/, actions.execute()];
|
|
5122
5172
|
case 4:
|
|
5123
|
-
|
|
5124
|
-
|
|
5173
|
+
_r.sent();
|
|
5174
|
+
_r.label = 5;
|
|
5125
5175
|
case 5:
|
|
5126
|
-
|
|
5176
|
+
_o = _m.next();
|
|
5127
5177
|
return [3 /*break*/, 3];
|
|
5128
5178
|
case 6: return [3 /*break*/, 9];
|
|
5129
5179
|
case 7:
|
|
5130
|
-
e_11_1 =
|
|
5180
|
+
e_11_1 = _r.sent();
|
|
5131
5181
|
e_11 = { error: e_11_1 };
|
|
5132
5182
|
return [3 /*break*/, 9];
|
|
5133
5183
|
case 8:
|
|
5134
5184
|
try {
|
|
5135
|
-
if (
|
|
5185
|
+
if (_o && !_o.done && (_q = _m.return)) _q.call(_m);
|
|
5136
5186
|
}
|
|
5137
5187
|
finally { if (e_11) throw e_11.error; }
|
|
5138
5188
|
return [7 /*endfinally*/];
|
|
5139
5189
|
case 9:
|
|
5140
|
-
|
|
5190
|
+
_l = _k.next();
|
|
5141
5191
|
return [3 /*break*/, 1];
|
|
5142
5192
|
case 10: return [3 /*break*/, 13];
|
|
5143
5193
|
case 11:
|
|
5144
|
-
e_12_1 =
|
|
5194
|
+
e_12_1 = _r.sent();
|
|
5145
5195
|
e_12 = { error: e_12_1 };
|
|
5146
5196
|
return [3 /*break*/, 13];
|
|
5147
5197
|
case 12:
|
|
5148
5198
|
try {
|
|
5149
|
-
if (
|
|
5199
|
+
if (_l && !_l.done && (_p = _k.return)) _p.call(_k);
|
|
5150
5200
|
}
|
|
5151
5201
|
finally { if (e_12) throw e_12.error; }
|
|
5152
5202
|
return [7 /*endfinally*/];
|
|
@@ -5171,9 +5221,9 @@
|
|
|
5171
5221
|
KwikIDFormViewComponent.prototype.handleFieldApiCall = function (field, api) {
|
|
5172
5222
|
return __awaiter(this, void 0, void 0, function () {
|
|
5173
5223
|
var apis;
|
|
5174
|
-
var
|
|
5175
|
-
return __generator(this, function (
|
|
5176
|
-
switch (
|
|
5224
|
+
var _k, _l;
|
|
5225
|
+
return __generator(this, function (_m) {
|
|
5226
|
+
switch (_m.label) {
|
|
5177
5227
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
5178
5228
|
FIELD_CONFIG: field,
|
|
5179
5229
|
API_CONFIG: api,
|
|
@@ -5184,13 +5234,13 @@
|
|
|
5184
5234
|
ALL_FORMS_DATA: this.allFormsData
|
|
5185
5235
|
})];
|
|
5186
5236
|
case 1:
|
|
5187
|
-
api =
|
|
5237
|
+
api = _m.sent();
|
|
5188
5238
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
5189
5239
|
if (kwikidToolkit.checkObjectKeyExists(field.api, "request")) {
|
|
5190
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
5191
|
-
this.formGroup.patchValue((
|
|
5192
|
-
|
|
5193
|
-
|
|
5240
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_k = {}, _k[field.key] = api.response.value, _k));
|
|
5241
|
+
this.formGroup.patchValue((_l = {},
|
|
5242
|
+
_l[field.key] = api.response.value,
|
|
5243
|
+
_l), { emitEvent: false });
|
|
5194
5244
|
}
|
|
5195
5245
|
apis = new Apis({
|
|
5196
5246
|
FIELD_CONFIG: field,
|
|
@@ -5204,14 +5254,14 @@
|
|
|
5204
5254
|
}, this.takeAction.bind(this));
|
|
5205
5255
|
return [4 /*yield*/, apis.validateResponse()];
|
|
5206
5256
|
case 2:
|
|
5207
|
-
api =
|
|
5257
|
+
api = _m.sent();
|
|
5208
5258
|
return [3 /*break*/, 4];
|
|
5209
5259
|
case 3:
|
|
5210
5260
|
setTimeout(function () {
|
|
5211
5261
|
field["api"]["status"]["value"] = EApiStatusType.FAILED;
|
|
5212
5262
|
field["showLoader"] = false;
|
|
5213
5263
|
}, 500);
|
|
5214
|
-
|
|
5264
|
+
_m.label = 4;
|
|
5215
5265
|
case 4: return [2 /*return*/, { field: field, api: api }];
|
|
5216
5266
|
}
|
|
5217
5267
|
});
|
|
@@ -5220,8 +5270,8 @@
|
|
|
5220
5270
|
KwikIDFormViewComponent.prototype.handleApiCall = function (api) {
|
|
5221
5271
|
return __awaiter(this, void 0, void 0, function () {
|
|
5222
5272
|
var apis;
|
|
5223
|
-
return __generator(this, function (
|
|
5224
|
-
switch (
|
|
5273
|
+
return __generator(this, function (_k) {
|
|
5274
|
+
switch (_k.label) {
|
|
5225
5275
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
5226
5276
|
FORM_CONFIG: this.formConfig,
|
|
5227
5277
|
API_CONFIG: api,
|
|
@@ -5232,7 +5282,7 @@
|
|
|
5232
5282
|
ALL_FORMS_DATA: this.allFormsData
|
|
5233
5283
|
})];
|
|
5234
5284
|
case 1:
|
|
5235
|
-
api =
|
|
5285
|
+
api = _k.sent();
|
|
5236
5286
|
apis = new Apis({
|
|
5237
5287
|
FORM_CONFIG: this.formConfig,
|
|
5238
5288
|
API_CONFIG: api,
|
|
@@ -5245,36 +5295,36 @@
|
|
|
5245
5295
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
5246
5296
|
return [4 /*yield*/, apis.validateResponse()];
|
|
5247
5297
|
case 2:
|
|
5248
|
-
api =
|
|
5249
|
-
|
|
5298
|
+
api = _k.sent();
|
|
5299
|
+
_k.label = 3;
|
|
5250
5300
|
case 3: return [2 /*return*/, { api: api }];
|
|
5251
5301
|
}
|
|
5252
5302
|
});
|
|
5253
5303
|
});
|
|
5254
5304
|
};
|
|
5255
5305
|
KwikIDFormViewComponent.prototype.executeApiCall = function (api, object) {
|
|
5256
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
5306
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5257
5307
|
return __awaiter(this, void 0, void 0, function () {
|
|
5258
5308
|
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers, body, response, err_1, response, err_2;
|
|
5259
|
-
return __generator(this, function (
|
|
5260
|
-
switch (
|
|
5309
|
+
return __generator(this, function (_k) {
|
|
5310
|
+
switch (_k.label) {
|
|
5261
5311
|
case 0:
|
|
5262
5312
|
apis = new Apis(object, this.takeAction.bind(this));
|
|
5263
5313
|
return [4 /*yield*/, apis.setUrl()];
|
|
5264
5314
|
case 1:
|
|
5265
|
-
api =
|
|
5315
|
+
api = _k.sent();
|
|
5266
5316
|
return [4 /*yield*/, apis.setRequestHeaders()];
|
|
5267
5317
|
case 2:
|
|
5268
|
-
api =
|
|
5318
|
+
api = _k.sent();
|
|
5269
5319
|
return [4 /*yield*/, apis.validateRequestHeaders()];
|
|
5270
5320
|
case 3:
|
|
5271
|
-
api =
|
|
5321
|
+
api = _k.sent();
|
|
5272
5322
|
return [4 /*yield*/, apis.setRequestBody()];
|
|
5273
5323
|
case 4:
|
|
5274
|
-
api =
|
|
5324
|
+
api = _k.sent();
|
|
5275
5325
|
return [4 /*yield*/, apis.validateRequestBody()];
|
|
5276
5326
|
case 5:
|
|
5277
|
-
api =
|
|
5327
|
+
api = _k.sent();
|
|
5278
5328
|
apiCallResponse = {};
|
|
5279
5329
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 18];
|
|
5280
5330
|
if (!(api.request.url.hasOwnProperty("type") &&
|
|
@@ -5285,55 +5335,64 @@
|
|
|
5285
5335
|
}, 1000); // 1000 ms = 1 sec
|
|
5286
5336
|
})];
|
|
5287
5337
|
case 6:
|
|
5288
|
-
apiCallResponse =
|
|
5338
|
+
apiCallResponse = _k.sent();
|
|
5339
|
+
apiCallResponseStatusCode = (_b = (_a = api.request.url.props) === null || _a === void 0 ? void 0 : _a.statusCode) !== null && _b !== void 0 ? _b : 200; // Default Status Code for Mocked APIs
|
|
5289
5340
|
return [3 /*break*/, 17];
|
|
5290
5341
|
case 7:
|
|
5291
5342
|
url = api.request.url.value;
|
|
5292
|
-
method = (
|
|
5293
|
-
headers = Object.assign({ "Content-Type": "application/json" }, (((
|
|
5294
|
-
body = (
|
|
5343
|
+
method = (_d = (_c = api.request) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : "POST";
|
|
5344
|
+
headers = Object.assign({ "Content-Type": "application/json" }, (((_f = (_e = api.request) === null || _e === void 0 ? void 0 : _e.headers) === null || _f === void 0 ? void 0 : _f.value) || {}));
|
|
5345
|
+
body = (_j = (_h = (_g = api.request) === null || _g === void 0 ? void 0 : _g.body) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : null;
|
|
5295
5346
|
if (!(method === "GET")) return [3 /*break*/, 13];
|
|
5296
|
-
|
|
5347
|
+
_k.label = 8;
|
|
5297
5348
|
case 8:
|
|
5298
|
-
|
|
5349
|
+
_k.trys.push([8, 11, , 12]);
|
|
5299
5350
|
return [4 /*yield*/, fetch(url, {
|
|
5300
5351
|
method: method,
|
|
5301
5352
|
headers: Object.assign({}, headers)
|
|
5302
5353
|
})];
|
|
5303
5354
|
case 9:
|
|
5304
|
-
response =
|
|
5355
|
+
response = _k.sent();
|
|
5305
5356
|
return [4 /*yield*/, response.json()];
|
|
5306
5357
|
case 10:
|
|
5307
|
-
apiCallResponse =
|
|
5358
|
+
apiCallResponse = _k.sent();
|
|
5308
5359
|
apiCallResponseStatusCode = response.status;
|
|
5309
5360
|
return [3 /*break*/, 12];
|
|
5310
5361
|
case 11:
|
|
5311
|
-
err_1 =
|
|
5362
|
+
err_1 = _k.sent();
|
|
5312
5363
|
apiCallResponse = {};
|
|
5313
5364
|
return [3 /*break*/, 12];
|
|
5314
5365
|
case 12: return [3 /*break*/, 17];
|
|
5315
5366
|
case 13:
|
|
5316
|
-
|
|
5367
|
+
_k.trys.push([13, 16, , 17]);
|
|
5317
5368
|
return [4 /*yield*/, fetch(url, {
|
|
5318
5369
|
method: method,
|
|
5319
5370
|
headers: Object.assign({}, headers),
|
|
5320
5371
|
body: JSON.stringify(body)
|
|
5321
5372
|
})];
|
|
5322
5373
|
case 14:
|
|
5323
|
-
response =
|
|
5374
|
+
response = _k.sent();
|
|
5324
5375
|
return [4 /*yield*/, response.json()];
|
|
5325
5376
|
case 15:
|
|
5326
|
-
apiCallResponse =
|
|
5377
|
+
apiCallResponse = _k.sent();
|
|
5327
5378
|
apiCallResponseStatusCode = response.status;
|
|
5328
5379
|
return [3 /*break*/, 17];
|
|
5329
5380
|
case 16:
|
|
5330
|
-
err_2 =
|
|
5381
|
+
err_2 = _k.sent();
|
|
5331
5382
|
apiCallResponse = {};
|
|
5332
5383
|
return [3 /*break*/, 17];
|
|
5333
5384
|
case 17:
|
|
5334
5385
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "value", apiCallResponse);
|
|
5335
5386
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "status", apiCallResponseStatusCode);
|
|
5336
|
-
|
|
5387
|
+
this.getLogs.emit({
|
|
5388
|
+
type: ETypeLogs.API,
|
|
5389
|
+
timestamp: new Date().getTime(),
|
|
5390
|
+
data: {
|
|
5391
|
+
request: api.request,
|
|
5392
|
+
response: api.response
|
|
5393
|
+
}
|
|
5394
|
+
});
|
|
5395
|
+
_k.label = 18;
|
|
5337
5396
|
case 18: return [2 /*return*/, api];
|
|
5338
5397
|
}
|
|
5339
5398
|
});
|
|
@@ -5371,8 +5430,8 @@
|
|
|
5371
5430
|
KwikIDFormViewComponent.prototype.handleOnClickApiCall = function (e) {
|
|
5372
5431
|
return __awaiter(this, void 0, void 0, function () {
|
|
5373
5432
|
var field, apis;
|
|
5374
|
-
return __generator(this, function (
|
|
5375
|
-
switch (
|
|
5433
|
+
return __generator(this, function (_k) {
|
|
5434
|
+
switch (_k.label) {
|
|
5376
5435
|
case 0:
|
|
5377
5436
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
5378
5437
|
if (!(field.type === EFieldType.API)) return [3 /*break*/, 5];
|
|
@@ -5383,7 +5442,7 @@
|
|
|
5383
5442
|
if (!kwikidToolkit.checkObjectKeyExists(field.api, "request")) return [3 /*break*/, 2];
|
|
5384
5443
|
return [4 /*yield*/, this.handleFieldApiCall(field, field.api)];
|
|
5385
5444
|
case 1:
|
|
5386
|
-
|
|
5445
|
+
_k.sent();
|
|
5387
5446
|
return [3 /*break*/, 4];
|
|
5388
5447
|
case 2:
|
|
5389
5448
|
apis = new Apis({
|
|
@@ -5397,11 +5456,11 @@
|
|
|
5397
5456
|
}, this.takeAction.bind(this));
|
|
5398
5457
|
return [4 /*yield*/, apis.callNextApi(field.api.entrypoint)];
|
|
5399
5458
|
case 3:
|
|
5400
|
-
|
|
5401
|
-
|
|
5459
|
+
_k.sent();
|
|
5460
|
+
_k.label = 4;
|
|
5402
5461
|
case 4:
|
|
5403
5462
|
this.hideApiLoader();
|
|
5404
|
-
|
|
5463
|
+
_k.label = 5;
|
|
5405
5464
|
case 5: return [2 /*return*/];
|
|
5406
5465
|
}
|
|
5407
5466
|
});
|
|
@@ -5446,11 +5505,11 @@
|
|
|
5446
5505
|
};
|
|
5447
5506
|
KwikIDFormViewComponent.prototype.handleOnClickSaveForm = function (e) {
|
|
5448
5507
|
return __awaiter(this, void 0, void 0, function () {
|
|
5449
|
-
var controls, firstFieldWithError, controls_1, controls_1_1, control,
|
|
5450
|
-
var e_15,
|
|
5508
|
+
var controls, firstFieldWithError, controls_1, controls_1_1, control, _k, _l, field, validations, e_13_1, formData, _m, _o, field, extendedFormData, _p, _q, postTask, task, e_14_1;
|
|
5509
|
+
var e_15, _r, e_13, _s, e_16, _t, e_14, _u;
|
|
5451
5510
|
var _this = this;
|
|
5452
|
-
return __generator(this, function (
|
|
5453
|
-
switch (
|
|
5511
|
+
return __generator(this, function (_v) {
|
|
5512
|
+
switch (_v.label) {
|
|
5454
5513
|
case 0:
|
|
5455
5514
|
controls = new FormValidation().getFormFieldsInvalidControls(this.formGroup);
|
|
5456
5515
|
firstFieldWithError = "";
|
|
@@ -5466,7 +5525,7 @@
|
|
|
5466
5525
|
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
5467
5526
|
finally {
|
|
5468
5527
|
try {
|
|
5469
|
-
if (controls_1_1 && !controls_1_1.done && (
|
|
5528
|
+
if (controls_1_1 && !controls_1_1.done && (_r = controls_1.return)) _r.call(controls_1);
|
|
5470
5529
|
}
|
|
5471
5530
|
finally { if (e_15) throw e_15.error; }
|
|
5472
5531
|
}
|
|
@@ -5477,14 +5536,14 @@
|
|
|
5477
5536
|
}, 3000);
|
|
5478
5537
|
return [2 /*return*/];
|
|
5479
5538
|
}
|
|
5480
|
-
|
|
5539
|
+
_v.label = 1;
|
|
5481
5540
|
case 1:
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5541
|
+
_v.trys.push([1, 6, 7, 8]);
|
|
5542
|
+
_k = __values(this.formFields), _l = _k.next();
|
|
5543
|
+
_v.label = 2;
|
|
5485
5544
|
case 2:
|
|
5486
|
-
if (!!
|
|
5487
|
-
field =
|
|
5545
|
+
if (!!_l.done) return [3 /*break*/, 5];
|
|
5546
|
+
field = _l.value;
|
|
5488
5547
|
if (!(field.isFormElement &&
|
|
5489
5548
|
!field.hidden &&
|
|
5490
5549
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -5499,7 +5558,7 @@
|
|
|
5499
5558
|
}, this.takeAction.bind(this));
|
|
5500
5559
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
5501
5560
|
case 3:
|
|
5502
|
-
|
|
5561
|
+
_v.sent();
|
|
5503
5562
|
if (!field.validation.is_valid) {
|
|
5504
5563
|
this.toggleErrorNotification(true);
|
|
5505
5564
|
setTimeout(function () {
|
|
@@ -5507,26 +5566,26 @@
|
|
|
5507
5566
|
}, 3000);
|
|
5508
5567
|
return [2 /*return*/];
|
|
5509
5568
|
}
|
|
5510
|
-
|
|
5569
|
+
_v.label = 4;
|
|
5511
5570
|
case 4:
|
|
5512
|
-
|
|
5571
|
+
_l = _k.next();
|
|
5513
5572
|
return [3 /*break*/, 2];
|
|
5514
5573
|
case 5: return [3 /*break*/, 8];
|
|
5515
5574
|
case 6:
|
|
5516
|
-
e_13_1 =
|
|
5575
|
+
e_13_1 = _v.sent();
|
|
5517
5576
|
e_13 = { error: e_13_1 };
|
|
5518
5577
|
return [3 /*break*/, 8];
|
|
5519
5578
|
case 7:
|
|
5520
5579
|
try {
|
|
5521
|
-
if (
|
|
5580
|
+
if (_l && !_l.done && (_s = _k.return)) _s.call(_k);
|
|
5522
5581
|
}
|
|
5523
5582
|
finally { if (e_13) throw e_13.error; }
|
|
5524
5583
|
return [7 /*endfinally*/];
|
|
5525
5584
|
case 8:
|
|
5526
5585
|
formData = this.formGroup.getRawValue();
|
|
5527
5586
|
try {
|
|
5528
|
-
for (
|
|
5529
|
-
field =
|
|
5587
|
+
for (_m = __values(this.formFields), _o = _m.next(); !_o.done; _o = _m.next()) {
|
|
5588
|
+
field = _o.value;
|
|
5530
5589
|
if (field.isFormElement) {
|
|
5531
5590
|
if (field.hidden) {
|
|
5532
5591
|
delete formData[field.key];
|
|
@@ -5540,22 +5599,22 @@
|
|
|
5540
5599
|
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
5541
5600
|
finally {
|
|
5542
5601
|
try {
|
|
5543
|
-
if (
|
|
5602
|
+
if (_o && !_o.done && (_t = _m.return)) _t.call(_m);
|
|
5544
5603
|
}
|
|
5545
5604
|
finally { if (e_16) throw e_16.error; }
|
|
5546
5605
|
}
|
|
5547
5606
|
extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
5548
|
-
var
|
|
5607
|
+
var _k;
|
|
5549
5608
|
if (field.isFormElement && !field.hidden) {
|
|
5550
|
-
var fieldData = (
|
|
5551
|
-
|
|
5609
|
+
var fieldData = (_k = {},
|
|
5610
|
+
_k[field.key] = {
|
|
5552
5611
|
key: field.key,
|
|
5553
5612
|
label: field.label,
|
|
5554
5613
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
5555
5614
|
type: field.type,
|
|
5556
5615
|
index: index
|
|
5557
5616
|
},
|
|
5558
|
-
|
|
5617
|
+
_k);
|
|
5559
5618
|
result[field.key] = fieldData[field.key];
|
|
5560
5619
|
}
|
|
5561
5620
|
return result;
|
|
@@ -5567,14 +5626,14 @@
|
|
|
5567
5626
|
});
|
|
5568
5627
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
5569
5628
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "post"))) return [3 /*break*/, 18];
|
|
5570
|
-
|
|
5629
|
+
_v.label = 9;
|
|
5571
5630
|
case 9:
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5631
|
+
_v.trys.push([9, 15, 16, 17]);
|
|
5632
|
+
_p = __values(this.formConfig.tasks.post), _q = _p.next();
|
|
5633
|
+
_v.label = 10;
|
|
5575
5634
|
case 10:
|
|
5576
|
-
if (!!
|
|
5577
|
-
postTask =
|
|
5635
|
+
if (!!_q.done) return [3 /*break*/, 14];
|
|
5636
|
+
postTask = _q.value;
|
|
5578
5637
|
task = new Tasks(postTask, {
|
|
5579
5638
|
FORM_CONFIG: this.formConfig,
|
|
5580
5639
|
FORM_FIELDS: this.formFields,
|
|
@@ -5592,7 +5651,7 @@
|
|
|
5592
5651
|
}
|
|
5593
5652
|
return [4 /*yield*/, task.execute()];
|
|
5594
5653
|
case 11:
|
|
5595
|
-
|
|
5654
|
+
_v.sent();
|
|
5596
5655
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5597
5656
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
5598
5657
|
var intervalId = setInterval(function () {
|
|
@@ -5604,22 +5663,22 @@
|
|
|
5604
5663
|
})];
|
|
5605
5664
|
case 12:
|
|
5606
5665
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5607
|
-
|
|
5666
|
+
_v.sent();
|
|
5608
5667
|
if (this.stopTaskExecution) {
|
|
5609
5668
|
return [3 /*break*/, 14];
|
|
5610
5669
|
}
|
|
5611
|
-
|
|
5670
|
+
_v.label = 13;
|
|
5612
5671
|
case 13:
|
|
5613
|
-
|
|
5672
|
+
_q = _p.next();
|
|
5614
5673
|
return [3 /*break*/, 10];
|
|
5615
5674
|
case 14: return [3 /*break*/, 17];
|
|
5616
5675
|
case 15:
|
|
5617
|
-
e_14_1 =
|
|
5676
|
+
e_14_1 = _v.sent();
|
|
5618
5677
|
e_14 = { error: e_14_1 };
|
|
5619
5678
|
return [3 /*break*/, 17];
|
|
5620
5679
|
case 16:
|
|
5621
5680
|
try {
|
|
5622
|
-
if (
|
|
5681
|
+
if (_q && !_q.done && (_u = _p.return)) _u.call(_p);
|
|
5623
5682
|
}
|
|
5624
5683
|
finally { if (e_14) throw e_14.error; }
|
|
5625
5684
|
return [7 /*endfinally*/];
|
|
@@ -5641,7 +5700,7 @@
|
|
|
5641
5700
|
data: kwikidToolkit.mergeObjects(formData, this.popupFormData, this.taskData),
|
|
5642
5701
|
extendedData: extendedFormData
|
|
5643
5702
|
});
|
|
5644
|
-
|
|
5703
|
+
_v.label = 19;
|
|
5645
5704
|
case 19: return [2 /*return*/];
|
|
5646
5705
|
}
|
|
5647
5706
|
});
|
|
@@ -5660,17 +5719,17 @@
|
|
|
5660
5719
|
this.formGroup.updateValueAndValidity();
|
|
5661
5720
|
};
|
|
5662
5721
|
KwikIDFormViewComponent.prototype.fieldGroupHide = function (fieldGroup) {
|
|
5663
|
-
var e_17,
|
|
5722
|
+
var e_17, _k;
|
|
5664
5723
|
try {
|
|
5665
|
-
for (var
|
|
5666
|
-
var fieldKey =
|
|
5724
|
+
for (var _l = __values(this.fieldGroups[fieldGroup]), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
5725
|
+
var fieldKey = _m.value;
|
|
5667
5726
|
this.fieldHide(fieldKey);
|
|
5668
5727
|
}
|
|
5669
5728
|
}
|
|
5670
5729
|
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
5671
5730
|
finally {
|
|
5672
5731
|
try {
|
|
5673
|
-
if (
|
|
5732
|
+
if (_m && !_m.done && (_k = _l.return)) _k.call(_l);
|
|
5674
5733
|
}
|
|
5675
5734
|
finally { if (e_17) throw e_17.error; }
|
|
5676
5735
|
}
|
|
@@ -5684,17 +5743,17 @@
|
|
|
5684
5743
|
this.formGroup.updateValueAndValidity();
|
|
5685
5744
|
};
|
|
5686
5745
|
KwikIDFormViewComponent.prototype.fieldGroupShow = function (fieldGroup) {
|
|
5687
|
-
var e_18,
|
|
5746
|
+
var e_18, _k;
|
|
5688
5747
|
try {
|
|
5689
|
-
for (var
|
|
5690
|
-
var fieldKey =
|
|
5748
|
+
for (var _l = __values(this.fieldGroups[fieldGroup]), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
5749
|
+
var fieldKey = _m.value;
|
|
5691
5750
|
this.fieldShow(fieldKey);
|
|
5692
5751
|
}
|
|
5693
5752
|
}
|
|
5694
5753
|
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
5695
5754
|
finally {
|
|
5696
5755
|
try {
|
|
5697
|
-
if (
|
|
5756
|
+
if (_m && !_m.done && (_k = _l.return)) _k.call(_l);
|
|
5698
5757
|
}
|
|
5699
5758
|
finally { if (e_18) throw e_18.error; }
|
|
5700
5759
|
}
|
|
@@ -5718,17 +5777,17 @@
|
|
|
5718
5777
|
}
|
|
5719
5778
|
};
|
|
5720
5779
|
KwikIDFormViewComponent.prototype.fieldGroupDisable = function (fieldGroup) {
|
|
5721
|
-
var e_19,
|
|
5780
|
+
var e_19, _k;
|
|
5722
5781
|
try {
|
|
5723
|
-
for (var
|
|
5724
|
-
var fieldKey =
|
|
5782
|
+
for (var _l = __values(this.fieldGroups[fieldGroup]), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
5783
|
+
var fieldKey = _m.value;
|
|
5725
5784
|
this.fieldDisable(fieldKey);
|
|
5726
5785
|
}
|
|
5727
5786
|
}
|
|
5728
5787
|
catch (e_19_1) { e_19 = { error: e_19_1 }; }
|
|
5729
5788
|
finally {
|
|
5730
5789
|
try {
|
|
5731
|
-
if (
|
|
5790
|
+
if (_m && !_m.done && (_k = _l.return)) _k.call(_l);
|
|
5732
5791
|
}
|
|
5733
5792
|
finally { if (e_19) throw e_19.error; }
|
|
5734
5793
|
}
|
|
@@ -5752,23 +5811,23 @@
|
|
|
5752
5811
|
}
|
|
5753
5812
|
};
|
|
5754
5813
|
KwikIDFormViewComponent.prototype.fieldGroupEnable = function (fieldGroup) {
|
|
5755
|
-
var e_20,
|
|
5814
|
+
var e_20, _k;
|
|
5756
5815
|
try {
|
|
5757
|
-
for (var
|
|
5758
|
-
var fieldKey =
|
|
5816
|
+
for (var _l = __values(this.fieldGroups[fieldGroup]), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
5817
|
+
var fieldKey = _m.value;
|
|
5759
5818
|
this.fieldEnable(fieldKey);
|
|
5760
5819
|
}
|
|
5761
5820
|
}
|
|
5762
5821
|
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
5763
5822
|
finally {
|
|
5764
5823
|
try {
|
|
5765
|
-
if (
|
|
5824
|
+
if (_m && !_m.done && (_k = _l.return)) _k.call(_l);
|
|
5766
5825
|
}
|
|
5767
5826
|
finally { if (e_20) throw e_20.error; }
|
|
5768
5827
|
}
|
|
5769
5828
|
};
|
|
5770
5829
|
KwikIDFormViewComponent.prototype.fieldReset = function (fieldKey) {
|
|
5771
|
-
var
|
|
5830
|
+
var _k;
|
|
5772
5831
|
// Find the field and its index in the formFields array
|
|
5773
5832
|
var field = getFormFieldByKey(this.formFields, fieldKey);
|
|
5774
5833
|
var fieldIndex = getFormFieldIndexByKey(this.formFields, fieldKey);
|
|
@@ -5779,9 +5838,9 @@
|
|
|
5779
5838
|
emitEvent: false,
|
|
5780
5839
|
onlySelf: true
|
|
5781
5840
|
});
|
|
5782
|
-
this.formGroup.patchValue((
|
|
5783
|
-
|
|
5784
|
-
|
|
5841
|
+
this.formGroup.patchValue((_k = {},
|
|
5842
|
+
_k[field.key] = resetValue,
|
|
5843
|
+
_k), { emitEvent: false });
|
|
5785
5844
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
5786
5845
|
emitEvent: true
|
|
5787
5846
|
});
|
|
@@ -5849,13 +5908,13 @@
|
|
|
5849
5908
|
KwikIDFormViewComponent.prototype.setValue = function (action, object) {
|
|
5850
5909
|
return __awaiter(this, void 0, void 0, function () {
|
|
5851
5910
|
var source, sourceValue;
|
|
5852
|
-
return __generator(this, function (
|
|
5853
|
-
switch (
|
|
5911
|
+
return __generator(this, function (_k) {
|
|
5912
|
+
switch (_k.label) {
|
|
5854
5913
|
case 0:
|
|
5855
5914
|
source = new kwikidToolkit.Source(object);
|
|
5856
5915
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
5857
5916
|
case 1:
|
|
5858
|
-
sourceValue =
|
|
5917
|
+
sourceValue = _k.sent();
|
|
5859
5918
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
5860
5919
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
5861
5920
|
this.formData = source.object.FORM_DATA;
|
|
@@ -5870,13 +5929,13 @@
|
|
|
5870
5929
|
KwikIDFormViewComponent.prototype.setFieldDefaultValue = function (action, object) {
|
|
5871
5930
|
return __awaiter(this, void 0, void 0, function () {
|
|
5872
5931
|
var source, sourceValue;
|
|
5873
|
-
return __generator(this, function (
|
|
5874
|
-
switch (
|
|
5932
|
+
return __generator(this, function (_k) {
|
|
5933
|
+
switch (_k.label) {
|
|
5875
5934
|
case 0:
|
|
5876
5935
|
source = new kwikidToolkit.Source(object);
|
|
5877
5936
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
5878
5937
|
case 1:
|
|
5879
|
-
sourceValue =
|
|
5938
|
+
sourceValue = _k.sent();
|
|
5880
5939
|
source.setValueToSource({
|
|
5881
5940
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5882
5941
|
props: {
|
|
@@ -5908,7 +5967,7 @@
|
|
|
5908
5967
|
KwikIDFormViewComponent.prototype.setApiStatus = function (action, object) {
|
|
5909
5968
|
return __awaiter(this, void 0, void 0, function () {
|
|
5910
5969
|
var source, sourceValue;
|
|
5911
|
-
return __generator(this, function (
|
|
5970
|
+
return __generator(this, function (_k) {
|
|
5912
5971
|
source = new kwikidToolkit.Source(object);
|
|
5913
5972
|
sourceValue = action.props.status;
|
|
5914
5973
|
source.setValueToSource({
|
|
@@ -5921,7 +5980,6 @@
|
|
|
5921
5980
|
}
|
|
5922
5981
|
}, sourceValue);
|
|
5923
5982
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
5924
|
-
console.log("PRINT0", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5925
5983
|
return [2 /*return*/];
|
|
5926
5984
|
});
|
|
5927
5985
|
});
|
|
@@ -5929,13 +5987,13 @@
|
|
|
5929
5987
|
KwikIDFormViewComponent.prototype.setApiHeaderValue = function (action, object) {
|
|
5930
5988
|
return __awaiter(this, void 0, void 0, function () {
|
|
5931
5989
|
var source, sourceValue;
|
|
5932
|
-
return __generator(this, function (
|
|
5933
|
-
switch (
|
|
5990
|
+
return __generator(this, function (_k) {
|
|
5991
|
+
switch (_k.label) {
|
|
5934
5992
|
case 0:
|
|
5935
5993
|
source = new kwikidToolkit.Source(object);
|
|
5936
5994
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
5937
5995
|
case 1:
|
|
5938
|
-
sourceValue =
|
|
5996
|
+
sourceValue = _k.sent();
|
|
5939
5997
|
source.setValueToSource({
|
|
5940
5998
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5941
5999
|
props: {
|
|
@@ -5946,7 +6004,6 @@
|
|
|
5946
6004
|
}
|
|
5947
6005
|
}, sourceValue);
|
|
5948
6006
|
object.API_CONFIG = source.object.API_CONFIG;
|
|
5949
|
-
console.log("PRINT1", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5950
6007
|
return [2 /*return*/];
|
|
5951
6008
|
}
|
|
5952
6009
|
});
|
|
@@ -5955,7 +6012,7 @@
|
|
|
5955
6012
|
KwikIDFormViewComponent.prototype.setApiHeaderValidity = function (action, object) {
|
|
5956
6013
|
return __awaiter(this, void 0, void 0, function () {
|
|
5957
6014
|
var source, sourceValue;
|
|
5958
|
-
return __generator(this, function (
|
|
6015
|
+
return __generator(this, function (_k) {
|
|
5959
6016
|
source = new kwikidToolkit.Source(object);
|
|
5960
6017
|
sourceValue = action.props.valid;
|
|
5961
6018
|
source.setValueToSource({
|
|
@@ -5968,7 +6025,6 @@
|
|
|
5968
6025
|
}
|
|
5969
6026
|
}, sourceValue);
|
|
5970
6027
|
object.API_CONFIG = source.object.API_CONFIG;
|
|
5971
|
-
console.log("PRINT2", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5972
6028
|
return [2 /*return*/];
|
|
5973
6029
|
});
|
|
5974
6030
|
});
|
|
@@ -5976,13 +6032,13 @@
|
|
|
5976
6032
|
KwikIDFormViewComponent.prototype.setApiBodyValue = function (action, object) {
|
|
5977
6033
|
return __awaiter(this, void 0, void 0, function () {
|
|
5978
6034
|
var source, sourceValue;
|
|
5979
|
-
return __generator(this, function (
|
|
5980
|
-
switch (
|
|
6035
|
+
return __generator(this, function (_k) {
|
|
6036
|
+
switch (_k.label) {
|
|
5981
6037
|
case 0:
|
|
5982
6038
|
source = new kwikidToolkit.Source(object);
|
|
5983
6039
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
5984
6040
|
case 1:
|
|
5985
|
-
sourceValue =
|
|
6041
|
+
sourceValue = _k.sent();
|
|
5986
6042
|
source.setValueToSource({
|
|
5987
6043
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5988
6044
|
props: {
|
|
@@ -5993,7 +6049,6 @@
|
|
|
5993
6049
|
}
|
|
5994
6050
|
}, sourceValue);
|
|
5995
6051
|
object.API_CONFIG = source.object.API_CONFIG;
|
|
5996
|
-
console.log("PRINT3", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5997
6052
|
return [2 /*return*/];
|
|
5998
6053
|
}
|
|
5999
6054
|
});
|
|
@@ -6002,7 +6057,7 @@
|
|
|
6002
6057
|
KwikIDFormViewComponent.prototype.setApiBodyValidity = function (action, object) {
|
|
6003
6058
|
return __awaiter(this, void 0, void 0, function () {
|
|
6004
6059
|
var source, sourceValue;
|
|
6005
|
-
return __generator(this, function (
|
|
6060
|
+
return __generator(this, function (_k) {
|
|
6006
6061
|
source = new kwikidToolkit.Source(object);
|
|
6007
6062
|
sourceValue = action.props.valid;
|
|
6008
6063
|
source.setValueToSource({
|
|
@@ -6015,7 +6070,6 @@
|
|
|
6015
6070
|
}
|
|
6016
6071
|
}, sourceValue);
|
|
6017
6072
|
object.API_CONFIG = source.object.API_CONFIG;
|
|
6018
|
-
console.log("PRINT4", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
6019
6073
|
return [2 /*return*/];
|
|
6020
6074
|
});
|
|
6021
6075
|
});
|
|
@@ -6023,9 +6077,8 @@
|
|
|
6023
6077
|
KwikIDFormViewComponent.prototype.setFieldValidity = function (action, object) {
|
|
6024
6078
|
return __awaiter(this, void 0, void 0, function () {
|
|
6025
6079
|
var source, sourceValue;
|
|
6026
|
-
return __generator(this, function (
|
|
6080
|
+
return __generator(this, function (_k) {
|
|
6027
6081
|
source = new kwikidToolkit.Source(object);
|
|
6028
|
-
console.log(kwikidToolkit.getObjectDeepCopy(object));
|
|
6029
6082
|
sourceValue = action.props.valid;
|
|
6030
6083
|
source.setValueToSource({
|
|
6031
6084
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
@@ -6037,7 +6090,6 @@
|
|
|
6037
6090
|
}
|
|
6038
6091
|
}, sourceValue);
|
|
6039
6092
|
object.API_CONFIG = source.object.API_CONFIG;
|
|
6040
|
-
console.log("PRINT5", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
6041
6093
|
return [2 /*return*/];
|
|
6042
6094
|
});
|
|
6043
6095
|
});
|
|
@@ -6045,18 +6097,18 @@
|
|
|
6045
6097
|
KwikIDFormViewComponent.prototype.setDropdownOptions = function (action, object) {
|
|
6046
6098
|
return __awaiter(this, void 0, void 0, function () {
|
|
6047
6099
|
var source, sourceValue, appendToPath, appendToPathStr, optionsPath;
|
|
6048
|
-
return __generator(this, function (
|
|
6049
|
-
switch (
|
|
6100
|
+
return __generator(this, function (_k) {
|
|
6101
|
+
switch (_k.label) {
|
|
6050
6102
|
case 0:
|
|
6051
6103
|
source = new kwikidToolkit.Source(object);
|
|
6052
6104
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6053
6105
|
case 1:
|
|
6054
|
-
sourceValue =
|
|
6106
|
+
sourceValue = _k.sent();
|
|
6055
6107
|
if (!kwikidToolkit.checkObjectKeyExists(action.props, "options")) return [3 /*break*/, 4];
|
|
6056
6108
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.options, "appendToPath")) return [3 /*break*/, 3];
|
|
6057
6109
|
return [4 /*yield*/, source.getValueFromSource(action.props.options.appendToPath.source)];
|
|
6058
6110
|
case 2:
|
|
6059
|
-
appendToPath =
|
|
6111
|
+
appendToPath = _k.sent();
|
|
6060
6112
|
if (kwikidToolkit.isNotEmptyValue(appendToPath)) {
|
|
6061
6113
|
appendToPathStr = kwikidToolkit.replaceString(appendToPath.match("" + action.props.options.appendToPath.filterSourceValue)[0], "[^a-zA-Z0-9_]", "_");
|
|
6062
6114
|
optionsPath = "" + action.props.options.path + appendToPathStr;
|
|
@@ -6065,7 +6117,7 @@
|
|
|
6065
6117
|
return [3 /*break*/, 4];
|
|
6066
6118
|
case 3:
|
|
6067
6119
|
sourceValue = kwikidToolkit.getObjectValueFromPath(sourceValue, action.props.options.path);
|
|
6068
|
-
|
|
6120
|
+
_k.label = 4;
|
|
6069
6121
|
case 4:
|
|
6070
6122
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
6071
6123
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
@@ -6080,19 +6132,19 @@
|
|
|
6080
6132
|
KwikIDFormViewComponent.prototype.apiCall = function (action, object) {
|
|
6081
6133
|
return __awaiter(this, void 0, void 0, function () {
|
|
6082
6134
|
var apiConfig, response;
|
|
6083
|
-
var
|
|
6084
|
-
return __generator(this, function (
|
|
6085
|
-
switch (
|
|
6135
|
+
var _k;
|
|
6136
|
+
return __generator(this, function (_l) {
|
|
6137
|
+
switch (_l.label) {
|
|
6086
6138
|
case 0:
|
|
6087
6139
|
apiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
6088
6140
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
6089
6141
|
case 1:
|
|
6090
|
-
response =
|
|
6142
|
+
response = _l.sent();
|
|
6091
6143
|
apiConfig = response.api;
|
|
6092
6144
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, apiConfig);
|
|
6093
|
-
this.formData = kwikidToolkit.mergeObjects(this.formData, (
|
|
6094
|
-
|
|
6095
|
-
|
|
6145
|
+
this.formData = kwikidToolkit.mergeObjects(this.formData, (_k = {},
|
|
6146
|
+
_k[action.props.formApiKey] = apiConfig.response.value,
|
|
6147
|
+
_k));
|
|
6096
6148
|
return [2 /*return*/, apiConfig];
|
|
6097
6149
|
}
|
|
6098
6150
|
});
|
|
@@ -6101,13 +6153,13 @@
|
|
|
6101
6153
|
KwikIDFormViewComponent.prototype.fieldApiCall = function (action, object) {
|
|
6102
6154
|
return __awaiter(this, void 0, void 0, function () {
|
|
6103
6155
|
var apiConfig;
|
|
6104
|
-
return __generator(this, function (
|
|
6105
|
-
switch (
|
|
6156
|
+
return __generator(this, function (_k) {
|
|
6157
|
+
switch (_k.label) {
|
|
6106
6158
|
case 0:
|
|
6107
6159
|
this.showApiLoader();
|
|
6108
6160
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
6109
6161
|
case 1:
|
|
6110
|
-
apiConfig =
|
|
6162
|
+
apiConfig = _k.sent();
|
|
6111
6163
|
this.hideApiLoader();
|
|
6112
6164
|
return [2 /*return*/];
|
|
6113
6165
|
}
|
|
@@ -6117,8 +6169,8 @@
|
|
|
6117
6169
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCalls = function (action, object) {
|
|
6118
6170
|
return __awaiter(this, void 0, void 0, function () {
|
|
6119
6171
|
var entrypointApiKey, field, endpoints, nextApiIndex, apiConfig, response;
|
|
6120
|
-
return __generator(this, function (
|
|
6121
|
-
switch (
|
|
6172
|
+
return __generator(this, function (_k) {
|
|
6173
|
+
switch (_k.label) {
|
|
6122
6174
|
case 0:
|
|
6123
6175
|
entrypointApiKey = action.props.apiKey;
|
|
6124
6176
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
@@ -6127,7 +6179,7 @@
|
|
|
6127
6179
|
apiConfig = endpoints[nextApiIndex];
|
|
6128
6180
|
return [4 /*yield*/, this.handleFieldApiCall(field, apiConfig)];
|
|
6129
6181
|
case 1:
|
|
6130
|
-
response =
|
|
6182
|
+
response = _k.sent();
|
|
6131
6183
|
field = response.field;
|
|
6132
6184
|
field.api.endpoints[nextApiIndex] = response.api;
|
|
6133
6185
|
return [2 /*return*/];
|
|
@@ -6138,15 +6190,15 @@
|
|
|
6138
6190
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCallsEnd = function (action, object) {
|
|
6139
6191
|
return __awaiter(this, void 0, void 0, function () {
|
|
6140
6192
|
var field, multipleApiCallResponses;
|
|
6141
|
-
var
|
|
6142
|
-
return __generator(this, function (
|
|
6193
|
+
var _k;
|
|
6194
|
+
return __generator(this, function (_l) {
|
|
6143
6195
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
6144
6196
|
multipleApiCallResponses = {};
|
|
6145
6197
|
field.api.endpoints.map(function (api) {
|
|
6146
6198
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
6147
6199
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
6148
6200
|
});
|
|
6149
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
6201
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_k = {}, _k[field.key] = multipleApiCallResponses, _k));
|
|
6150
6202
|
this.patchFormGroup(this.formData);
|
|
6151
6203
|
return [2 /*return*/];
|
|
6152
6204
|
});
|
|
@@ -6155,17 +6207,17 @@
|
|
|
6155
6207
|
KwikIDFormViewComponent.prototype.taskApiCall = function (action, object) {
|
|
6156
6208
|
return __awaiter(this, void 0, void 0, function () {
|
|
6157
6209
|
var apiConfig;
|
|
6158
|
-
var
|
|
6159
|
-
return __generator(this, function (
|
|
6160
|
-
switch (
|
|
6210
|
+
var _k;
|
|
6211
|
+
return __generator(this, function (_l) {
|
|
6212
|
+
switch (_l.label) {
|
|
6161
6213
|
case 0:
|
|
6162
6214
|
this.showApiLoader();
|
|
6163
6215
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
6164
6216
|
case 1:
|
|
6165
|
-
apiConfig =
|
|
6166
|
-
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (
|
|
6167
|
-
|
|
6168
|
-
|
|
6217
|
+
apiConfig = _l.sent();
|
|
6218
|
+
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (_k = {},
|
|
6219
|
+
_k[action.props.formApiKey] = apiConfig.response.value,
|
|
6220
|
+
_k));
|
|
6169
6221
|
this.waitingForChanges = false;
|
|
6170
6222
|
this.hideApiLoader();
|
|
6171
6223
|
return [2 /*return*/];
|
|
@@ -6176,8 +6228,8 @@
|
|
|
6176
6228
|
KwikIDFormViewComponent.prototype.taskMultipleApiCalls = function (action, object) {
|
|
6177
6229
|
return __awaiter(this, void 0, void 0, function () {
|
|
6178
6230
|
var multipleApiConfig, entrypointApiKey_1, endpoints, nextApiIndex, apiConfig, response, apis;
|
|
6179
|
-
return __generator(this, function (
|
|
6180
|
-
switch (
|
|
6231
|
+
return __generator(this, function (_k) {
|
|
6232
|
+
switch (_k.label) {
|
|
6181
6233
|
case 0:
|
|
6182
6234
|
this.showApiLoader();
|
|
6183
6235
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
@@ -6188,7 +6240,7 @@
|
|
|
6188
6240
|
apiConfig = endpoints[nextApiIndex];
|
|
6189
6241
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
6190
6242
|
case 1:
|
|
6191
|
-
response =
|
|
6243
|
+
response = _k.sent();
|
|
6192
6244
|
multipleApiConfig.endpoints[nextApiIndex] = response.api;
|
|
6193
6245
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, multipleApiConfig);
|
|
6194
6246
|
this.hideApiLoader();
|
|
@@ -6205,8 +6257,8 @@
|
|
|
6205
6257
|
}, this.takeAction.bind(this));
|
|
6206
6258
|
return [4 /*yield*/, apis.callNextApi(multipleApiConfig.entrypoint)];
|
|
6207
6259
|
case 3:
|
|
6208
|
-
|
|
6209
|
-
|
|
6260
|
+
_k.sent();
|
|
6261
|
+
_k.label = 4;
|
|
6210
6262
|
case 4: return [2 /*return*/];
|
|
6211
6263
|
}
|
|
6212
6264
|
});
|
|
@@ -6215,15 +6267,15 @@
|
|
|
6215
6267
|
KwikIDFormViewComponent.prototype.taskMultipleApiCallsEnd = function (action, object) {
|
|
6216
6268
|
return __awaiter(this, void 0, void 0, function () {
|
|
6217
6269
|
var multipleApiConfig, multipleApiCallResponses;
|
|
6218
|
-
var
|
|
6219
|
-
return __generator(this, function (
|
|
6270
|
+
var _k;
|
|
6271
|
+
return __generator(this, function (_l) {
|
|
6220
6272
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
6221
6273
|
multipleApiCallResponses = {};
|
|
6222
6274
|
multipleApiConfig.endpoints.map(function (api) {
|
|
6223
6275
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
6224
6276
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
6225
6277
|
});
|
|
6226
|
-
this.taskData = Object.assign(Object.assign({}, this.taskData), (
|
|
6278
|
+
this.taskData = Object.assign(Object.assign({}, this.taskData), (_k = {}, _k[action.props.formApiKey] = multipleApiCallResponses, _k));
|
|
6227
6279
|
this.waitingForChanges = false;
|
|
6228
6280
|
this.hideApiLoader();
|
|
6229
6281
|
return [2 /*return*/];
|
|
@@ -6405,7 +6457,7 @@
|
|
|
6405
6457
|
};
|
|
6406
6458
|
KwikIDFormViewComponent.prototype.takeActionOnFieldGroup = function (action, object) {
|
|
6407
6459
|
return __awaiter(this, void 0, void 0, function () {
|
|
6408
|
-
return __generator(this, function (
|
|
6460
|
+
return __generator(this, function (_k) {
|
|
6409
6461
|
switch (action.key) {
|
|
6410
6462
|
case EActionKey.FIELD_GROUP_HIDE:
|
|
6411
6463
|
this.fieldGroupHide(action.props.groupKey);
|
|
@@ -6429,12 +6481,12 @@
|
|
|
6429
6481
|
KwikIDFormViewComponent.prototype.takeAction = function (action, object) {
|
|
6430
6482
|
var _a, _b, _c, _d, _e, _f;
|
|
6431
6483
|
return __awaiter(this, void 0, void 0, function () {
|
|
6432
|
-
var
|
|
6433
|
-
return __generator(this, function (
|
|
6434
|
-
switch (
|
|
6484
|
+
var _k, fieldErrorShow_Source, fieldErrorShowSourceValue, fieldErrorHide_Source, fieldErrorHideSourceValue, redirectToUrl_Source, redirectToUrlSourceValue, previewErrorShow_Source, previewErrorShowSourceValue;
|
|
6485
|
+
return __generator(this, function (_l) {
|
|
6486
|
+
switch (_l.label) {
|
|
6435
6487
|
case 0:
|
|
6436
|
-
|
|
6437
|
-
switch (
|
|
6488
|
+
_k = action.key;
|
|
6489
|
+
switch (_k) {
|
|
6438
6490
|
case EActionKey.FIELD_HIDE: return [3 /*break*/, 1];
|
|
6439
6491
|
case EActionKey.FIELD_SHOW: return [3 /*break*/, 2];
|
|
6440
6492
|
case EActionKey.FIELD_DISABLE: return [3 /*break*/, 3];
|
|
@@ -6495,7 +6547,7 @@
|
|
|
6495
6547
|
fieldErrorShow_Source = new kwikidToolkit.Source(object);
|
|
6496
6548
|
return [4 /*yield*/, fieldErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
6497
6549
|
case 7:
|
|
6498
|
-
fieldErrorShowSourceValue =
|
|
6550
|
+
fieldErrorShowSourceValue = _l.sent();
|
|
6499
6551
|
if (typeof fieldErrorShowSourceValue == "string" ||
|
|
6500
6552
|
typeof fieldErrorShowSourceValue == "number") {
|
|
6501
6553
|
fieldErrorShowSourceValue = String(fieldErrorShowSourceValue);
|
|
@@ -6504,8 +6556,9 @@
|
|
|
6504
6556
|
fieldErrorShowSourceValue = "";
|
|
6505
6557
|
}
|
|
6506
6558
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorShowSourceValue);
|
|
6507
|
-
|
|
6559
|
+
_l.label = 8;
|
|
6508
6560
|
case 8:
|
|
6561
|
+
action.props.message.message = updateDisplayLanguage(action.props.message.message, getLanguage());
|
|
6509
6562
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
6510
6563
|
return [3 /*break*/, 63];
|
|
6511
6564
|
case 9:
|
|
@@ -6513,7 +6566,7 @@
|
|
|
6513
6566
|
fieldErrorHide_Source = new kwikidToolkit.Source(object);
|
|
6514
6567
|
return [4 /*yield*/, fieldErrorHide_Source.getValueFromSource(action.props.message.source)];
|
|
6515
6568
|
case 10:
|
|
6516
|
-
fieldErrorHideSourceValue =
|
|
6569
|
+
fieldErrorHideSourceValue = _l.sent();
|
|
6517
6570
|
if (typeof fieldErrorHideSourceValue == "string" ||
|
|
6518
6571
|
typeof fieldErrorHideSourceValue == "number") {
|
|
6519
6572
|
fieldErrorHideSourceValue = String(fieldErrorHideSourceValue);
|
|
@@ -6522,7 +6575,7 @@
|
|
|
6522
6575
|
fieldErrorHideSourceValue = "";
|
|
6523
6576
|
}
|
|
6524
6577
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorHideSourceValue);
|
|
6525
|
-
|
|
6578
|
+
_l.label = 11;
|
|
6526
6579
|
case 11:
|
|
6527
6580
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
6528
6581
|
return [3 /*break*/, 63];
|
|
@@ -6534,81 +6587,81 @@
|
|
|
6534
6587
|
return [3 /*break*/, 63];
|
|
6535
6588
|
case 14: return [4 /*yield*/, this.setValue(action, object)];
|
|
6536
6589
|
case 15:
|
|
6537
|
-
|
|
6590
|
+
_l.sent();
|
|
6538
6591
|
return [3 /*break*/, 63];
|
|
6539
6592
|
case 16: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
6540
6593
|
case 17:
|
|
6541
|
-
|
|
6594
|
+
_l.sent();
|
|
6542
6595
|
return [3 /*break*/, 63];
|
|
6543
6596
|
case 18: return [4 /*yield*/, this.setApiStatus(action, object)];
|
|
6544
6597
|
case 19:
|
|
6545
|
-
|
|
6598
|
+
_l.sent();
|
|
6546
6599
|
return [3 /*break*/, 63];
|
|
6547
6600
|
case 20: return [4 /*yield*/, this.setApiHeaderValue(action, object)];
|
|
6548
6601
|
case 21:
|
|
6549
|
-
|
|
6602
|
+
_l.sent();
|
|
6550
6603
|
return [3 /*break*/, 63];
|
|
6551
6604
|
case 22: return [4 /*yield*/, this.setApiHeaderValidity(action, object)];
|
|
6552
6605
|
case 23:
|
|
6553
|
-
|
|
6606
|
+
_l.sent();
|
|
6554
6607
|
return [3 /*break*/, 63];
|
|
6555
6608
|
case 24: return [4 /*yield*/, this.setApiBodyValue(action, object)];
|
|
6556
6609
|
case 25:
|
|
6557
|
-
|
|
6610
|
+
_l.sent();
|
|
6558
6611
|
return [3 /*break*/, 63];
|
|
6559
6612
|
case 26: return [4 /*yield*/, this.setApiBodyValidity(action, object)];
|
|
6560
6613
|
case 27:
|
|
6561
|
-
|
|
6614
|
+
_l.sent();
|
|
6562
6615
|
return [3 /*break*/, 63];
|
|
6563
6616
|
case 28: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
6564
6617
|
case 29:
|
|
6565
|
-
|
|
6618
|
+
_l.sent();
|
|
6566
6619
|
return [3 /*break*/, 63];
|
|
6567
6620
|
case 30: return [4 /*yield*/, this.setFieldValidity(action, object)];
|
|
6568
6621
|
case 31:
|
|
6569
|
-
|
|
6622
|
+
_l.sent();
|
|
6570
6623
|
return [3 /*break*/, 63];
|
|
6571
6624
|
case 32:
|
|
6572
6625
|
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
6573
6626
|
return [3 /*break*/, 63];
|
|
6574
6627
|
case 33: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
6575
6628
|
case 34:
|
|
6576
|
-
|
|
6629
|
+
_l.sent();
|
|
6577
6630
|
return [3 /*break*/, 63];
|
|
6578
6631
|
case 35: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
6579
6632
|
case 36:
|
|
6580
|
-
|
|
6633
|
+
_l.sent();
|
|
6581
6634
|
return [3 /*break*/, 63];
|
|
6582
6635
|
case 37: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
6583
6636
|
case 38:
|
|
6584
|
-
|
|
6637
|
+
_l.sent();
|
|
6585
6638
|
return [3 /*break*/, 63];
|
|
6586
6639
|
case 39: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
6587
6640
|
case 40:
|
|
6588
|
-
|
|
6641
|
+
_l.sent();
|
|
6589
6642
|
return [3 /*break*/, 63];
|
|
6590
6643
|
case 41: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
6591
6644
|
case 42:
|
|
6592
|
-
|
|
6645
|
+
_l.sent();
|
|
6593
6646
|
return [3 /*break*/, 63];
|
|
6594
6647
|
case 43: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
6595
6648
|
case 44:
|
|
6596
|
-
|
|
6649
|
+
_l.sent();
|
|
6597
6650
|
return [3 /*break*/, 63];
|
|
6598
6651
|
case 45:
|
|
6599
6652
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.url, "source")) return [3 /*break*/, 47];
|
|
6600
6653
|
redirectToUrl_Source = new kwikidToolkit.Source(object);
|
|
6601
6654
|
return [4 /*yield*/, redirectToUrl_Source.getValueFromSource(action.props.url.source)];
|
|
6602
6655
|
case 46:
|
|
6603
|
-
redirectToUrlSourceValue =
|
|
6656
|
+
redirectToUrlSourceValue = _l.sent();
|
|
6604
6657
|
if (kwikidToolkit.isEmptyString(redirectToUrlSourceValue)) {
|
|
6605
6658
|
redirectToUrlSourceValue = "";
|
|
6606
6659
|
}
|
|
6607
6660
|
action = kwikidToolkit.setValueToObjectPath(action, "props.url.url", redirectToUrlSourceValue);
|
|
6608
|
-
|
|
6661
|
+
_l.label = 47;
|
|
6609
6662
|
case 47:
|
|
6610
6663
|
this.redirectToUrl(action);
|
|
6611
|
-
|
|
6664
|
+
_l.label = 48;
|
|
6612
6665
|
case 48:
|
|
6613
6666
|
this.showPreview(action.props);
|
|
6614
6667
|
return [3 /*break*/, 63];
|
|
@@ -6617,7 +6670,7 @@
|
|
|
6617
6670
|
previewErrorShow_Source = new kwikidToolkit.Source(object);
|
|
6618
6671
|
return [4 /*yield*/, previewErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
6619
6672
|
case 50:
|
|
6620
|
-
previewErrorShowSourceValue =
|
|
6673
|
+
previewErrorShowSourceValue = _l.sent();
|
|
6621
6674
|
if (typeof previewErrorShowSourceValue == "string" ||
|
|
6622
6675
|
typeof previewErrorShowSourceValue == "number") {
|
|
6623
6676
|
previewErrorShowSourceValue = String(previewErrorShowSourceValue);
|
|
@@ -6626,7 +6679,7 @@
|
|
|
6626
6679
|
previewErrorShowSourceValue = "";
|
|
6627
6680
|
}
|
|
6628
6681
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", previewErrorShowSourceValue);
|
|
6629
|
-
|
|
6682
|
+
_l.label = 51;
|
|
6630
6683
|
case 51:
|
|
6631
6684
|
this.showErrorPreview(action.props);
|
|
6632
6685
|
return [3 /*break*/, 63];
|
|
@@ -6674,7 +6727,7 @@
|
|
|
6674
6727
|
return KwikIDFormViewComponent;
|
|
6675
6728
|
}());
|
|
6676
6729
|
/** @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 });
|
|
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 } });
|
|
6730
|
+
/** @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", getLogs: "getLogs", 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 } });
|
|
6678
6731
|
__decorate([
|
|
6679
6732
|
kwikidToolkit.logMethod
|
|
6680
6733
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -6963,6 +7016,8 @@
|
|
|
6963
7016
|
type: i0.Output
|
|
6964
7017
|
}], onClickApiCall: [{
|
|
6965
7018
|
type: i0.Output
|
|
7019
|
+
}], getLogs: [{
|
|
7020
|
+
type: i0.Output
|
|
6966
7021
|
}], onActionShowPopupForm: [{
|
|
6967
7022
|
type: i0.Output
|
|
6968
7023
|
}], onClickFormFieldButton: [{
|
|
@@ -7002,6 +7057,7 @@
|
|
|
7002
7057
|
this.setSelectedForm((_b = (_a = this.activeFormConfig) === null || _a === void 0 ? void 0 : _a.key) !== null && _b !== void 0 ? _b : "");
|
|
7003
7058
|
this.stepConfig = this.formatStepConfig(this.stepConfig);
|
|
7004
7059
|
this.formsList = this.filterHiddenForms(this.formsList);
|
|
7060
|
+
this.formsList = this.setFormTitles(this.formsList);
|
|
7005
7061
|
this.formsListLength = this.findFormsListLength(this.formsList);
|
|
7006
7062
|
this.isAllFormsCompleted = this.checkIsAllFormsCompleted(this.formsList);
|
|
7007
7063
|
this.loading = false;
|
|
@@ -7022,6 +7078,7 @@
|
|
|
7022
7078
|
}
|
|
7023
7079
|
if (verifyChange("formsList")) {
|
|
7024
7080
|
this.formsList = this.filterHiddenForms(this.formsList);
|
|
7081
|
+
this.formsList = this.setFormTitles(this.formsList);
|
|
7025
7082
|
this.formsListLength = this.findFormsListLength(this.formsList);
|
|
7026
7083
|
this.isAllFormsCompleted = this.checkIsAllFormsCompleted(this.formsList);
|
|
7027
7084
|
}
|
|
@@ -7059,6 +7116,8 @@
|
|
|
7059
7116
|
stepConfig = kwikidToolkit.setValueToObjectPath(stepConfig, "props", stepConfigProperties);
|
|
7060
7117
|
}
|
|
7061
7118
|
}
|
|
7119
|
+
stepConfig.props.formListProperties.footer.submitFormButton.label =
|
|
7120
|
+
updateDisplayLanguage(stepConfig.props.formListProperties.footer.submitFormButton.label, getLanguage());
|
|
7062
7121
|
return stepConfig;
|
|
7063
7122
|
};
|
|
7064
7123
|
KwikIDFormsListComponent.prototype.filterHiddenForms = function (formsList) {
|
|
@@ -7070,6 +7129,14 @@
|
|
|
7070
7129
|
}
|
|
7071
7130
|
});
|
|
7072
7131
|
};
|
|
7132
|
+
KwikIDFormsListComponent.prototype.setFormTitles = function (formsList) {
|
|
7133
|
+
return formsList.filter(function (form) {
|
|
7134
|
+
if (kwikidToolkit.checkObjectPathExists(form, "props.title")) {
|
|
7135
|
+
form.props.title = updateDisplayLanguage(form.props.title, getLanguage());
|
|
7136
|
+
return form;
|
|
7137
|
+
}
|
|
7138
|
+
});
|
|
7139
|
+
};
|
|
7073
7140
|
KwikIDFormsListComponent.prototype.findFormsListLength = function (formsList) {
|
|
7074
7141
|
var _formsList = formsList.filter(function (form) {
|
|
7075
7142
|
if (kwikidToolkit.checkObjectKeyExists(form, "type")) {
|
|
@@ -7225,6 +7292,7 @@
|
|
|
7225
7292
|
this.onClickSubmit = new i0.EventEmitter();
|
|
7226
7293
|
this.getFormData = new i0.EventEmitter();
|
|
7227
7294
|
this.onClickApiCall = new i0.EventEmitter();
|
|
7295
|
+
this.getLogs = new i0.EventEmitter();
|
|
7228
7296
|
this.onClickFormFieldButton = new i0.EventEmitter();
|
|
7229
7297
|
this.loading = false;
|
|
7230
7298
|
this.showErrorNotification = false;
|
|
@@ -8148,6 +8216,9 @@
|
|
|
8148
8216
|
});
|
|
8149
8217
|
});
|
|
8150
8218
|
};
|
|
8219
|
+
KwikIDFormsRendererComponent.prototype.handleGetLogs = function (event) {
|
|
8220
|
+
this.getLogs.emit(event);
|
|
8221
|
+
};
|
|
8151
8222
|
/**
|
|
8152
8223
|
* Miscellaneous Methods
|
|
8153
8224
|
*/
|
|
@@ -8175,7 +8246,7 @@
|
|
|
8175
8246
|
return KwikIDFormsRendererComponent;
|
|
8176
8247
|
}());
|
|
8177
8248
|
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i6.TuiPreviewDialogService }, { token: i2__namespace.KwikUILoaderService }, { token: i3$1.TuiDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8178
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", activeFormData: "activeFormData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall", onClickFormFieldButton: "onClickFormFieldButton" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [isUnsavedData]=\"this.isUnsavedData\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n *ngIf=\"this.activeFormConfig.type === 'FORM'\"\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n [userConfig]=\"this.userConfig\"\n [popupFormCallback]=\"this.popupFormCallback\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getUnsavedDataState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (onActionShowPopupForm)=\"\n this.handleOnActionShowPopupForm($event, content)\n \"\n (onClickGoBack)=\"this.handleOnClickGoBack($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\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<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n *ngIf=\"popupFormConfig\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\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<ng-template\n #content\n let-context\n>\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', context)\n \"\n ></kwikid-form-view>\n </div>\n</ng-template>\n", styles: [":host{position:relative;height:100%}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:min(50%,600px);margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.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-form-view-popup-container{border-radius:1rem;background:var(--tui-base-01)}\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: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView", "isUnsavedData"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData", "userConfig", "apiCallResponse", "buttonClickResponse", "popupFormCallback"], outputs: ["onClickGoBack", "onClickViewForms", "getUnsavedDataState", "onClickSaveForm", "onClickApiCall", "onActionShowPopupForm", "onClickFormFieldButton"] }, { 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"] }], directives: [{ type: i3__namespace$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], animations: [
|
|
8249
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", activeFormData: "activeFormData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall", getLogs: "getLogs", onClickFormFieldButton: "onClickFormFieldButton" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [isUnsavedData]=\"this.isUnsavedData\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n *ngIf=\"this.activeFormConfig.type === 'FORM'\"\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n [userConfig]=\"this.userConfig\"\n [popupFormCallback]=\"this.popupFormCallback\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getUnsavedDataState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (onActionShowPopupForm)=\"\n this.handleOnActionShowPopupForm($event, content)\n \"\n (onClickGoBack)=\"this.handleOnClickGoBack($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\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<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n *ngIf=\"popupFormConfig\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\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<ng-template\n #content\n let-context\n>\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', context)\n \"\n ></kwikid-form-view>\n </div>\n</ng-template>\n", styles: [":host{position:relative;height:100%}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:min(50%,600px);margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.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-form-view-popup-container{border-radius:1rem;background:var(--tui-base-01)}\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: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView", "isUnsavedData"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData", "userConfig", "apiCallResponse", "buttonClickResponse", "popupFormCallback"], outputs: ["onClickGoBack", "onClickViewForms", "getUnsavedDataState", "onClickSaveForm", "onClickApiCall", "getLogs", "onActionShowPopupForm", "onClickFormFieldButton"] }, { 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"] }], directives: [{ type: i3__namespace$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], animations: [
|
|
8179
8250
|
animations.trigger("panelInOut", [
|
|
8180
8251
|
animations.transition(":enter", [
|
|
8181
8252
|
animations.style({ transform: "translateY(100%)" }),
|
|
@@ -8252,6 +8323,9 @@
|
|
|
8252
8323
|
__decorate([
|
|
8253
8324
|
kwikidToolkit.logMethod
|
|
8254
8325
|
], KwikIDFormsRendererComponent.prototype, "handleOnClickSubmitForms", null);
|
|
8326
|
+
__decorate([
|
|
8327
|
+
kwikidToolkit.logMethod
|
|
8328
|
+
], KwikIDFormsRendererComponent.prototype, "handleGetLogs", null);
|
|
8255
8329
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, decorators: [{
|
|
8256
8330
|
type: i0.Component,
|
|
8257
8331
|
args: [{
|
|
@@ -8302,9 +8376,11 @@
|
|
|
8302
8376
|
type: i0.Output
|
|
8303
8377
|
}], onClickApiCall: [{
|
|
8304
8378
|
type: i0.Output
|
|
8379
|
+
}], getLogs: [{
|
|
8380
|
+
type: i0.Output
|
|
8305
8381
|
}], onClickFormFieldButton: [{
|
|
8306
8382
|
type: i0.Output
|
|
8307
|
-
}], toggleLoader: [], fetchFormConfig: [], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], showPreview: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleGetUnsavedState: [], handleOnClickFormFieldButton: [], handleOnActionShowPopupForm: [], handleOnClickSaveForm: [], handleOnClickGoBack: [], handleOnClickSubmitForms: [] } });
|
|
8383
|
+
}], toggleLoader: [], fetchFormConfig: [], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], showPreview: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleGetUnsavedState: [], handleOnClickFormFieldButton: [], handleOnActionShowPopupForm: [], handleOnClickSaveForm: [], handleOnClickGoBack: [], handleOnClickSubmitForms: [], handleGetLogs: [] } });
|
|
8308
8384
|
|
|
8309
8385
|
var JsonFormatPipe = /** @class */ (function () {
|
|
8310
8386
|
function JsonFormatPipe() {
|