kwikid-forms 0.6.47 → 0.6.49
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 +707 -626
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder-form-editor/pipes/json-formatter.pipe.js +3 -2
- package/esm2015/lib/renderer/config-converter/config-converter.js +5 -3
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +2 -1
- package/esm2015/lib/renderer/form-view/form-view.api.service.js +5 -3
- package/esm2015/lib/renderer/form-view/form-view.component.js +42 -12
- package/esm2015/lib/renderer/renderer.component.js +17 -1
- package/fesm2015/kwikid-forms.js +68 -16
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +1 -0
- package/lib/renderer/form-view/form-view.component.d.ts +1 -0
- package/package.json +2 -2
|
@@ -389,14 +389,24 @@
|
|
|
389
389
|
}) : function (o, v) {
|
|
390
390
|
o["default"] = v;
|
|
391
391
|
};
|
|
392
|
+
var ownKeys = function (o) {
|
|
393
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
394
|
+
var ar = [];
|
|
395
|
+
for (var k in o)
|
|
396
|
+
if (Object.prototype.hasOwnProperty.call(o, k))
|
|
397
|
+
ar[ar.length] = k;
|
|
398
|
+
return ar;
|
|
399
|
+
};
|
|
400
|
+
return ownKeys(o);
|
|
401
|
+
};
|
|
392
402
|
function __importStar(mod) {
|
|
393
403
|
if (mod && mod.__esModule)
|
|
394
404
|
return mod;
|
|
395
405
|
var result = {};
|
|
396
406
|
if (mod != null)
|
|
397
|
-
for (var k
|
|
398
|
-
if (k !== "default"
|
|
399
|
-
__createBinding(result, mod, k);
|
|
407
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
408
|
+
if (k[i] !== "default")
|
|
409
|
+
__createBinding(result, mod, k[i]);
|
|
400
410
|
__setModuleDefault(result, mod);
|
|
401
411
|
return result;
|
|
402
412
|
}
|
|
@@ -491,12 +501,24 @@
|
|
|
491
501
|
}
|
|
492
502
|
return next();
|
|
493
503
|
}
|
|
504
|
+
function __rewriteRelativeImportExtension(path, preserveJsx) {
|
|
505
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
506
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
507
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
return path;
|
|
511
|
+
}
|
|
494
512
|
var tslib_es6 = {
|
|
495
513
|
__extends: __extends,
|
|
496
514
|
__assign: __assign,
|
|
497
515
|
__rest: __rest,
|
|
498
516
|
__decorate: __decorate,
|
|
499
517
|
__param: __param,
|
|
518
|
+
__esDecorate: __esDecorate,
|
|
519
|
+
__runInitializers: __runInitializers,
|
|
520
|
+
__propKey: __propKey,
|
|
521
|
+
__setFunctionName: __setFunctionName,
|
|
500
522
|
__metadata: __metadata,
|
|
501
523
|
__awaiter: __awaiter,
|
|
502
524
|
__generator: __generator,
|
|
@@ -519,6 +541,7 @@
|
|
|
519
541
|
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
520
542
|
__addDisposableResource: __addDisposableResource,
|
|
521
543
|
__disposeResources: __disposeResources,
|
|
544
|
+
__rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
|
|
522
545
|
};
|
|
523
546
|
|
|
524
547
|
function convertFormListConfig(formsList) {
|
|
@@ -1459,11 +1482,13 @@
|
|
|
1459
1482
|
viewFormsButton: {
|
|
1460
1483
|
bypassConfirmation: false,
|
|
1461
1484
|
hidden: false,
|
|
1462
|
-
label: "View Forms"
|
|
1485
|
+
label: "View Forms",
|
|
1486
|
+
styles: "width: 100%"
|
|
1463
1487
|
},
|
|
1464
1488
|
saveButton: {
|
|
1465
1489
|
hidden: false,
|
|
1466
|
-
label: "Save"
|
|
1490
|
+
label: "Save",
|
|
1491
|
+
styles: "width: 100%"
|
|
1467
1492
|
}
|
|
1468
1493
|
},
|
|
1469
1494
|
isUnsavedDataAlertEnabled: false
|
|
@@ -3186,6 +3211,7 @@
|
|
|
3186
3211
|
|
|
3187
3212
|
var EActionKey;
|
|
3188
3213
|
(function (EActionKey) {
|
|
3214
|
+
EActionKey["REMOVE_KEY_FROM_OBJECT_PATH"] = "REMOVE_KEY_FROM_OBJECT_PATH";
|
|
3189
3215
|
EActionKey["SET_VALUE"] = "SET_VALUE";
|
|
3190
3216
|
EActionKey["SET_FIELD_DEFAULT_VALUE"] = "SET_FIELD_DEFAULT_VALUE";
|
|
3191
3217
|
EActionKey["SET_API_STATUS"] = "SET_API_STATUS";
|
|
@@ -3363,10 +3389,12 @@
|
|
|
3363
3389
|
};
|
|
3364
3390
|
// Function to preprocess header data
|
|
3365
3391
|
KwikIDFormViewApiService.prototype.preProcessHeader = function (headerData, isVerifySignature) {
|
|
3366
|
-
if (!headerData)
|
|
3392
|
+
if (!headerData) {
|
|
3367
3393
|
headerData = {};
|
|
3368
|
-
|
|
3394
|
+
}
|
|
3395
|
+
if (!headerData.headers) {
|
|
3369
3396
|
headerData.headers = {};
|
|
3397
|
+
}
|
|
3370
3398
|
// Generate a unique identifier if signature verification is required
|
|
3371
3399
|
if (isVerifySignature) {
|
|
3372
3400
|
headerData.headers.xrid = uuid.v4();
|
|
@@ -5090,11 +5118,11 @@
|
|
|
5090
5118
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5091
5119
|
var res;
|
|
5092
5120
|
var _this = this;
|
|
5093
|
-
return __generator(this, function (
|
|
5094
|
-
switch (
|
|
5121
|
+
return __generator(this, function (_13) {
|
|
5122
|
+
switch (_13.label) {
|
|
5095
5123
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
5096
5124
|
case 1:
|
|
5097
|
-
res =
|
|
5125
|
+
res = _13.sent();
|
|
5098
5126
|
if (res) {
|
|
5099
5127
|
this.loading = false;
|
|
5100
5128
|
this.activeCameraRecordingTimerSubcription = this.cameraRecordService
|
|
@@ -5116,7 +5144,7 @@
|
|
|
5116
5144
|
}); })();
|
|
5117
5145
|
};
|
|
5118
5146
|
KwikIDFormViewComponent.prototype.ngOnChanges = function (changes) {
|
|
5119
|
-
var
|
|
5147
|
+
var _13, _14, _15, _16;
|
|
5120
5148
|
var _this = this;
|
|
5121
5149
|
var _a, _b, _c, _d;
|
|
5122
5150
|
var verifyChange = function (key) {
|
|
@@ -5147,9 +5175,9 @@
|
|
|
5147
5175
|
? changes.popupFormCallback.currentValue.popupFormData.data
|
|
5148
5176
|
: changes.popupFormCallback.currentValue.popupFormData;
|
|
5149
5177
|
var popupFormConfig = changes.popupFormCallback.currentValue.popupFormConfig;
|
|
5150
|
-
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (
|
|
5151
|
-
|
|
5152
|
-
|
|
5178
|
+
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (_13 = {},
|
|
5179
|
+
_13[popupFormConfig.key] = popupFormData,
|
|
5180
|
+
_13));
|
|
5153
5181
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
5154
5182
|
if (kwikidToolkit.checkObjectKeyExists(changes.popupFormCallback.currentValue, "stopTaskExecution")) {
|
|
5155
5183
|
this.stopTaskExecution =
|
|
@@ -5211,9 +5239,9 @@
|
|
|
5211
5239
|
emitEvent: false,
|
|
5212
5240
|
onlySelf: false
|
|
5213
5241
|
});
|
|
5214
|
-
this.formGroup.patchValue((
|
|
5215
|
-
|
|
5216
|
-
|
|
5242
|
+
this.formGroup.patchValue((_14 = {},
|
|
5243
|
+
_14[field_1.key] = kwikidToolkit.getObjectDeepCopy([imageData]),
|
|
5244
|
+
_14), { emitEvent: false });
|
|
5217
5245
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
5218
5246
|
emitEvent: false
|
|
5219
5247
|
});
|
|
@@ -5235,11 +5263,11 @@
|
|
|
5235
5263
|
EXTRA_DATA: this.extraData
|
|
5236
5264
|
}, this.takeAction.bind(this));
|
|
5237
5265
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5238
|
-
return __generator(this, function (
|
|
5239
|
-
switch (
|
|
5266
|
+
return __generator(this, function (_13) {
|
|
5267
|
+
switch (_13.label) {
|
|
5240
5268
|
case 0: return [4 /*yield*/, ruleEngine_1.run(field_1.validation)];
|
|
5241
5269
|
case 1:
|
|
5242
|
-
|
|
5270
|
+
_13.sent();
|
|
5243
5271
|
return [2 /*return*/];
|
|
5244
5272
|
}
|
|
5245
5273
|
});
|
|
@@ -5280,9 +5308,9 @@
|
|
|
5280
5308
|
emitEvent: false,
|
|
5281
5309
|
onlySelf: false
|
|
5282
5310
|
});
|
|
5283
|
-
this.formGroup.patchValue((
|
|
5284
|
-
|
|
5285
|
-
|
|
5311
|
+
this.formGroup.patchValue((_15 = {},
|
|
5312
|
+
_15[field_1.key] = kwikidToolkit.getObjectDeepCopy([video]),
|
|
5313
|
+
_15), { emitEvent: false });
|
|
5286
5314
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
5287
5315
|
emitEvent: false
|
|
5288
5316
|
});
|
|
@@ -5304,11 +5332,11 @@
|
|
|
5304
5332
|
EXTRA_DATA: this.extraData
|
|
5305
5333
|
}, this.takeAction.bind(this));
|
|
5306
5334
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5307
|
-
return __generator(this, function (
|
|
5308
|
-
switch (
|
|
5335
|
+
return __generator(this, function (_13) {
|
|
5336
|
+
switch (_13.label) {
|
|
5309
5337
|
case 0: return [4 /*yield*/, ruleEngine_2.run(field_1.validation)];
|
|
5310
5338
|
case 1:
|
|
5311
|
-
|
|
5339
|
+
_13.sent();
|
|
5312
5340
|
return [2 /*return*/];
|
|
5313
5341
|
}
|
|
5314
5342
|
});
|
|
@@ -5345,9 +5373,9 @@
|
|
|
5345
5373
|
emitEvent: false,
|
|
5346
5374
|
onlySelf: false
|
|
5347
5375
|
});
|
|
5348
|
-
this.formGroup.patchValue((
|
|
5349
|
-
|
|
5350
|
-
|
|
5376
|
+
this.formGroup.patchValue((_16 = {},
|
|
5377
|
+
_16[field_1.key] = kwikidToolkit.getObjectDeepCopy(response),
|
|
5378
|
+
_16), { emitEvent: false });
|
|
5351
5379
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
5352
5380
|
emitEvent: false
|
|
5353
5381
|
});
|
|
@@ -5369,11 +5397,11 @@
|
|
|
5369
5397
|
}, this.takeAction.bind(this));
|
|
5370
5398
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5371
5399
|
var api;
|
|
5372
|
-
return __generator(this, function (
|
|
5373
|
-
switch (
|
|
5400
|
+
return __generator(this, function (_13) {
|
|
5401
|
+
switch (_13.label) {
|
|
5374
5402
|
case 0: return [4 /*yield*/, apis_1.validateResponse()];
|
|
5375
5403
|
case 1:
|
|
5376
|
-
api =
|
|
5404
|
+
api = _13.sent();
|
|
5377
5405
|
field_1.api = api;
|
|
5378
5406
|
return [2 /*return*/];
|
|
5379
5407
|
}
|
|
@@ -5393,11 +5421,11 @@
|
|
|
5393
5421
|
EXTRA_DATA: this.extraData
|
|
5394
5422
|
}, this.takeAction.bind(this));
|
|
5395
5423
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5396
|
-
return __generator(this, function (
|
|
5397
|
-
switch (
|
|
5424
|
+
return __generator(this, function (_13) {
|
|
5425
|
+
switch (_13.label) {
|
|
5398
5426
|
case 0: return [4 /*yield*/, ruleEngine_3.run(field_1.validation)];
|
|
5399
5427
|
case 1:
|
|
5400
|
-
|
|
5428
|
+
_13.sent();
|
|
5401
5429
|
return [2 /*return*/];
|
|
5402
5430
|
}
|
|
5403
5431
|
});
|
|
@@ -5438,11 +5466,11 @@
|
|
|
5438
5466
|
}, this.takeAction.bind(this));
|
|
5439
5467
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5440
5468
|
var api;
|
|
5441
|
-
return __generator(this, function (
|
|
5442
|
-
switch (
|
|
5469
|
+
return __generator(this, function (_13) {
|
|
5470
|
+
switch (_13.label) {
|
|
5443
5471
|
case 0: return [4 /*yield*/, apis_2.validateResponse()];
|
|
5444
5472
|
case 1:
|
|
5445
|
-
api =
|
|
5473
|
+
api = _13.sent();
|
|
5446
5474
|
field_1.api = api;
|
|
5447
5475
|
return [2 /*return*/];
|
|
5448
5476
|
}
|
|
@@ -5487,11 +5515,11 @@
|
|
|
5487
5515
|
EXTRA_DATA: this.extraData
|
|
5488
5516
|
}, this.takeAction.bind(this));
|
|
5489
5517
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5490
|
-
return __generator(this, function (
|
|
5491
|
-
switch (
|
|
5518
|
+
return __generator(this, function (_13) {
|
|
5519
|
+
switch (_13.label) {
|
|
5492
5520
|
case 0: return [4 /*yield*/, ruleEngine_4.run(field_2.validation)];
|
|
5493
5521
|
case 1:
|
|
5494
|
-
|
|
5522
|
+
_13.sent();
|
|
5495
5523
|
return [2 /*return*/];
|
|
5496
5524
|
}
|
|
5497
5525
|
});
|
|
@@ -5506,11 +5534,11 @@
|
|
|
5506
5534
|
if (verifyChange("formConfig")) {
|
|
5507
5535
|
this.formConfig = changes.formConfig.currentValue;
|
|
5508
5536
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5509
|
-
return __generator(this, function (
|
|
5510
|
-
switch (
|
|
5537
|
+
return __generator(this, function (_13) {
|
|
5538
|
+
switch (_13.label) {
|
|
5511
5539
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
5512
5540
|
case 1:
|
|
5513
|
-
|
|
5541
|
+
_13.sent();
|
|
5514
5542
|
return [2 /*return*/];
|
|
5515
5543
|
}
|
|
5516
5544
|
});
|
|
@@ -5530,11 +5558,11 @@
|
|
|
5530
5558
|
};
|
|
5531
5559
|
KwikIDFormViewComponent.prototype.initFormConfig = function (formConfig) {
|
|
5532
5560
|
return __awaiter(this, void 0, void 0, function () {
|
|
5533
|
-
var
|
|
5534
|
-
var e_1,
|
|
5561
|
+
var _13, _14, preTask, task, e_1_1, _15, _loop_1, this_1, _16, _17, field, _18, _19, field, ruleEngine, e_2_1;
|
|
5562
|
+
var e_1, _20, e_3, _21, e_2, _22;
|
|
5535
5563
|
var _this = this;
|
|
5536
|
-
return __generator(this, function (
|
|
5537
|
-
switch (
|
|
5564
|
+
return __generator(this, function (_23) {
|
|
5565
|
+
switch (_23.label) {
|
|
5538
5566
|
case 0:
|
|
5539
5567
|
formConfig = new Converter().convertFormConfig(formConfig);
|
|
5540
5568
|
formConfig = new Converter().updateFormConfigProperties(formConfig);
|
|
@@ -5548,14 +5576,14 @@
|
|
|
5548
5576
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
5549
5577
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "pre"))) return [3 /*break*/, 10];
|
|
5550
5578
|
this.triggerLogs(ELogEventType$1.FORM__TASK_PRE, {});
|
|
5551
|
-
|
|
5579
|
+
_23.label = 1;
|
|
5552
5580
|
case 1:
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5581
|
+
_23.trys.push([1, 7, 8, 9]);
|
|
5582
|
+
_13 = __values(this.formConfig.tasks.pre), _14 = _13.next();
|
|
5583
|
+
_23.label = 2;
|
|
5556
5584
|
case 2:
|
|
5557
|
-
if (!!
|
|
5558
|
-
preTask =
|
|
5585
|
+
if (!!_14.done) return [3 /*break*/, 6];
|
|
5586
|
+
preTask = _14.value;
|
|
5559
5587
|
task = new Tasks(preTask, {
|
|
5560
5588
|
FORM_CONFIG: this.formConfig,
|
|
5561
5589
|
FORM_FIELDS: this.formFields,
|
|
@@ -5575,7 +5603,7 @@
|
|
|
5575
5603
|
}
|
|
5576
5604
|
return [4 /*yield*/, task.execute()];
|
|
5577
5605
|
case 3:
|
|
5578
|
-
|
|
5606
|
+
_23.sent();
|
|
5579
5607
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5580
5608
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
5581
5609
|
var intervalId = setInterval(function () {
|
|
@@ -5587,33 +5615,33 @@
|
|
|
5587
5615
|
})];
|
|
5588
5616
|
case 4:
|
|
5589
5617
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5590
|
-
|
|
5618
|
+
_23.sent();
|
|
5591
5619
|
if (this.stopTaskExecution) {
|
|
5592
5620
|
return [3 /*break*/, 6];
|
|
5593
5621
|
}
|
|
5594
|
-
|
|
5622
|
+
_23.label = 5;
|
|
5595
5623
|
case 5:
|
|
5596
|
-
|
|
5624
|
+
_14 = _13.next();
|
|
5597
5625
|
return [3 /*break*/, 2];
|
|
5598
5626
|
case 6: return [3 /*break*/, 9];
|
|
5599
5627
|
case 7:
|
|
5600
|
-
e_1_1 =
|
|
5628
|
+
e_1_1 = _23.sent();
|
|
5601
5629
|
e_1 = { error: e_1_1 };
|
|
5602
5630
|
return [3 /*break*/, 9];
|
|
5603
5631
|
case 8:
|
|
5604
5632
|
try {
|
|
5605
|
-
if (
|
|
5633
|
+
if (_14 && !_14.done && (_20 = _13.return)) _20.call(_13);
|
|
5606
5634
|
}
|
|
5607
5635
|
finally { if (e_1) throw e_1.error; }
|
|
5608
5636
|
return [7 /*endfinally*/];
|
|
5609
5637
|
case 9:
|
|
5610
5638
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
5611
|
-
|
|
5639
|
+
_23.label = 10;
|
|
5612
5640
|
case 10:
|
|
5613
5641
|
if (this.stopTaskExecution) {
|
|
5614
5642
|
return [2 /*return*/, false];
|
|
5615
5643
|
}
|
|
5616
|
-
|
|
5644
|
+
_15 = this;
|
|
5617
5645
|
return [4 /*yield*/, this.formViewService.createFormGroup(this.formFields, {
|
|
5618
5646
|
FORM_CONFIG: this.formConfig,
|
|
5619
5647
|
FORM_DATA: this.formData,
|
|
@@ -5624,7 +5652,7 @@
|
|
|
5624
5652
|
EXTRA_DATA: this.extraData
|
|
5625
5653
|
}, this.takeAction.bind(this))];
|
|
5626
5654
|
case 11:
|
|
5627
|
-
|
|
5655
|
+
_15.formGroup = _23.sent();
|
|
5628
5656
|
/**
|
|
5629
5657
|
* For some reason if their a field of type 'IMAGE' then
|
|
5630
5658
|
* formData is adding a 'undefined' key with last image's value from the array.
|
|
@@ -5634,41 +5662,41 @@
|
|
|
5634
5662
|
delete this.formData.undefined;
|
|
5635
5663
|
}
|
|
5636
5664
|
_loop_1 = function (field) {
|
|
5637
|
-
var
|
|
5665
|
+
var _24, _25, _26, _27;
|
|
5638
5666
|
if (field.isFormElement) {
|
|
5639
|
-
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (
|
|
5640
|
-
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (
|
|
5667
|
+
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_24 = {}, _24[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _24));
|
|
5668
|
+
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (_25 = {}, _25[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _25));
|
|
5641
5669
|
if (field.type === EFieldType.FILE) {
|
|
5642
5670
|
this_1.files[field.key] = this_1.formGroup.controls[field.key].value;
|
|
5643
5671
|
}
|
|
5644
5672
|
if (field.type === EFieldType.CAPTURE) {
|
|
5645
5673
|
this_1.resetCamera();
|
|
5646
|
-
this_1.cameraData = Object.assign(Object.assign({}, this_1.cameraData), (
|
|
5674
|
+
this_1.cameraData = Object.assign(Object.assign({}, this_1.cameraData), (_26 = {}, _26[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _26));
|
|
5647
5675
|
this_1.mediaFiles[field.key] = this_1.formGroup.controls[field.key].value;
|
|
5648
5676
|
}
|
|
5649
5677
|
if (field.type === EFieldType.RECORD) {
|
|
5650
5678
|
this_1.resetCamera();
|
|
5651
|
-
this_1.cameraData = Object.assign(Object.assign({}, this_1.cameraData), (
|
|
5679
|
+
this_1.cameraData = Object.assign(Object.assign({}, this_1.cameraData), (_27 = {}, _27[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _27));
|
|
5652
5680
|
this_1.mediaFiles[field.key] = this_1.formGroup.controls[field.key].value;
|
|
5653
5681
|
}
|
|
5654
5682
|
this_1.formGroup.controls[field.key].valueChanges
|
|
5655
5683
|
.pipe(operators.pairwise())
|
|
5656
|
-
.subscribe(function (
|
|
5657
|
-
var
|
|
5658
|
-
var
|
|
5659
|
-
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (
|
|
5660
|
-
_this.formData = Object.assign(Object.assign({}, _this.formData), (
|
|
5684
|
+
.subscribe(function (_13) {
|
|
5685
|
+
var _14, _15, _16, _17;
|
|
5686
|
+
var _18 = __read(_13, 2), previousValue = _18[0], currentValue = _18[1];
|
|
5687
|
+
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (_14 = {}, _14[field.key] = convertFormFieldValueToStandardFormat(field, previousValue), _14));
|
|
5688
|
+
_this.formData = Object.assign(Object.assign({}, _this.formData), (_15 = {}, _15[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _15));
|
|
5661
5689
|
if (field.type === EFieldType.FILE) {
|
|
5662
5690
|
_this.files[field.key] = currentValue;
|
|
5663
5691
|
}
|
|
5664
5692
|
if (field.type === EFieldType.CAPTURE) {
|
|
5665
5693
|
_this.resetCamera();
|
|
5666
|
-
_this.cameraData = Object.assign(Object.assign({}, _this.cameraData), (
|
|
5694
|
+
_this.cameraData = Object.assign(Object.assign({}, _this.cameraData), (_16 = {}, _16[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _16));
|
|
5667
5695
|
_this.mediaFiles[field.key] = currentValue;
|
|
5668
5696
|
}
|
|
5669
5697
|
if (field.type === EFieldType.RECORD) {
|
|
5670
5698
|
_this.resetCamera();
|
|
5671
|
-
_this.cameraData = Object.assign(Object.assign({}, _this.cameraData), (
|
|
5699
|
+
_this.cameraData = Object.assign(Object.assign({}, _this.cameraData), (_17 = {}, _17[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _17));
|
|
5672
5700
|
_this.mediaFiles[field.key] = currentValue;
|
|
5673
5701
|
}
|
|
5674
5702
|
});
|
|
@@ -5676,26 +5704,26 @@
|
|
|
5676
5704
|
};
|
|
5677
5705
|
this_1 = this;
|
|
5678
5706
|
try {
|
|
5679
|
-
for (
|
|
5680
|
-
field =
|
|
5707
|
+
for (_16 = __values(this.formFields), _17 = _16.next(); !_17.done; _17 = _16.next()) {
|
|
5708
|
+
field = _17.value;
|
|
5681
5709
|
_loop_1(field);
|
|
5682
5710
|
}
|
|
5683
5711
|
}
|
|
5684
5712
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
5685
5713
|
finally {
|
|
5686
5714
|
try {
|
|
5687
|
-
if (
|
|
5715
|
+
if (_17 && !_17.done && (_21 = _16.return)) _21.call(_16);
|
|
5688
5716
|
}
|
|
5689
5717
|
finally { if (e_3) throw e_3.error; }
|
|
5690
5718
|
}
|
|
5691
|
-
|
|
5719
|
+
_23.label = 12;
|
|
5692
5720
|
case 12:
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5721
|
+
_23.trys.push([12, 18, 19, 20]);
|
|
5722
|
+
_18 = __values(this.formFields), _19 = _18.next();
|
|
5723
|
+
_23.label = 13;
|
|
5696
5724
|
case 13:
|
|
5697
|
-
if (!!
|
|
5698
|
-
field =
|
|
5725
|
+
if (!!_19.done) return [3 /*break*/, 17];
|
|
5726
|
+
field = _19.value;
|
|
5699
5727
|
if (!field.isFormElement) return [3 /*break*/, 16];
|
|
5700
5728
|
if (!kwikidToolkit.checkObjectKeyExists(field, "validation")) return [3 /*break*/, 15];
|
|
5701
5729
|
if (!field.validation.triggers.includes("ON_INIT")) return [3 /*break*/, 15];
|
|
@@ -5711,8 +5739,8 @@
|
|
|
5711
5739
|
}, this.takeAction.bind(this));
|
|
5712
5740
|
return [4 /*yield*/, ruleEngine.run(field.validation)];
|
|
5713
5741
|
case 14:
|
|
5714
|
-
|
|
5715
|
-
|
|
5742
|
+
_23.sent();
|
|
5743
|
+
_23.label = 15;
|
|
5716
5744
|
case 15:
|
|
5717
5745
|
if (kwikidToolkit.checkObjectKeyExists(field, "connectedElements")) {
|
|
5718
5746
|
this.handleConnectedElements({
|
|
@@ -5720,18 +5748,18 @@
|
|
|
5720
5748
|
value: this.formGroup.controls[field.key].value
|
|
5721
5749
|
}, "ON_INIT");
|
|
5722
5750
|
}
|
|
5723
|
-
|
|
5751
|
+
_23.label = 16;
|
|
5724
5752
|
case 16:
|
|
5725
|
-
|
|
5753
|
+
_19 = _18.next();
|
|
5726
5754
|
return [3 /*break*/, 13];
|
|
5727
5755
|
case 17: return [3 /*break*/, 20];
|
|
5728
5756
|
case 18:
|
|
5729
|
-
e_2_1 =
|
|
5757
|
+
e_2_1 = _23.sent();
|
|
5730
5758
|
e_2 = { error: e_2_1 };
|
|
5731
5759
|
return [3 /*break*/, 20];
|
|
5732
5760
|
case 19:
|
|
5733
5761
|
try {
|
|
5734
|
-
if (
|
|
5762
|
+
if (_19 && !_19.done && (_22 = _18.return)) _22.call(_18);
|
|
5735
5763
|
}
|
|
5736
5764
|
finally { if (e_2) throw e_2.error; }
|
|
5737
5765
|
return [7 /*endfinally*/];
|
|
@@ -5769,10 +5797,10 @@
|
|
|
5769
5797
|
};
|
|
5770
5798
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroupActions = function (childFieldGroupConfig, parentField) {
|
|
5771
5799
|
return __awaiter(this, void 0, void 0, function () {
|
|
5772
|
-
var rulesMapping,
|
|
5773
|
-
var e_4,
|
|
5774
|
-
return __generator(this, function (
|
|
5775
|
-
switch (
|
|
5800
|
+
var rulesMapping, _13, _14, action, conditionSuccess, actions, e_4_1;
|
|
5801
|
+
var e_4, _15;
|
|
5802
|
+
return __generator(this, function (_16) {
|
|
5803
|
+
switch (_16.label) {
|
|
5776
5804
|
case 0:
|
|
5777
5805
|
if (!kwikidToolkit.checkObjectKeyExists(childFieldGroupConfig, "rules")) return [3 /*break*/, 8];
|
|
5778
5806
|
rulesMapping = new kwikidToolkit.Rule(childFieldGroupConfig.rules, {
|
|
@@ -5784,14 +5812,14 @@
|
|
|
5784
5812
|
ALL_FORMS_DATA: this.allFormsData,
|
|
5785
5813
|
EXTRA_DATA: this.extraData
|
|
5786
5814
|
}).mapping();
|
|
5787
|
-
|
|
5815
|
+
_16.label = 1;
|
|
5788
5816
|
case 1:
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5817
|
+
_16.trys.push([1, 6, 7, 8]);
|
|
5818
|
+
_13 = __values(childFieldGroupConfig.actions), _14 = _13.next();
|
|
5819
|
+
_16.label = 2;
|
|
5792
5820
|
case 2:
|
|
5793
|
-
if (!!
|
|
5794
|
-
action =
|
|
5821
|
+
if (!!_14.done) return [3 /*break*/, 5];
|
|
5822
|
+
action = _14.value;
|
|
5795
5823
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5796
5824
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5797
5825
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5806,19 +5834,19 @@
|
|
|
5806
5834
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
5807
5835
|
return [4 /*yield*/, actions.execute()];
|
|
5808
5836
|
case 3:
|
|
5809
|
-
|
|
5810
|
-
|
|
5837
|
+
_16.sent();
|
|
5838
|
+
_16.label = 4;
|
|
5811
5839
|
case 4:
|
|
5812
|
-
|
|
5840
|
+
_14 = _13.next();
|
|
5813
5841
|
return [3 /*break*/, 2];
|
|
5814
5842
|
case 5: return [3 /*break*/, 8];
|
|
5815
5843
|
case 6:
|
|
5816
|
-
e_4_1 =
|
|
5844
|
+
e_4_1 = _16.sent();
|
|
5817
5845
|
e_4 = { error: e_4_1 };
|
|
5818
5846
|
return [3 /*break*/, 8];
|
|
5819
5847
|
case 7:
|
|
5820
5848
|
try {
|
|
5821
|
-
if (
|
|
5849
|
+
if (_14 && !_14.done && (_15 = _13.return)) _15.call(_13);
|
|
5822
5850
|
}
|
|
5823
5851
|
finally { if (e_4) throw e_4.error; }
|
|
5824
5852
|
return [7 /*endfinally*/];
|
|
@@ -5829,15 +5857,15 @@
|
|
|
5829
5857
|
};
|
|
5830
5858
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroup = function (currentField, connectedFieldGroupConfig, eventType) {
|
|
5831
5859
|
return __awaiter(this, void 0, void 0, function () {
|
|
5832
|
-
return __generator(this, function (
|
|
5833
|
-
switch (
|
|
5860
|
+
return __generator(this, function (_13) {
|
|
5861
|
+
switch (_13.label) {
|
|
5834
5862
|
case 0:
|
|
5835
5863
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldGroupConfig, "triggers")) return [3 /*break*/, 2];
|
|
5836
5864
|
if (!connectedFieldGroupConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5837
5865
|
return [4 /*yield*/, this.handleConnectedElementFieldGroupActions(connectedFieldGroupConfig, currentField)];
|
|
5838
5866
|
case 1:
|
|
5839
|
-
|
|
5840
|
-
|
|
5867
|
+
_13.sent();
|
|
5868
|
+
_13.label = 2;
|
|
5841
5869
|
case 2: return [2 /*return*/];
|
|
5842
5870
|
}
|
|
5843
5871
|
});
|
|
@@ -5845,10 +5873,10 @@
|
|
|
5845
5873
|
};
|
|
5846
5874
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldActions = function (connectedFieldConfig, connectedField) {
|
|
5847
5875
|
return __awaiter(this, void 0, void 0, function () {
|
|
5848
|
-
var rulesMapping,
|
|
5849
|
-
var e_5,
|
|
5850
|
-
return __generator(this, function (
|
|
5851
|
-
switch (
|
|
5876
|
+
var rulesMapping, _13, _14, action, conditionSuccess, actions, e_5_1;
|
|
5877
|
+
var e_5, _15;
|
|
5878
|
+
return __generator(this, function (_16) {
|
|
5879
|
+
switch (_16.label) {
|
|
5852
5880
|
case 0:
|
|
5853
5881
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "rules")) return [3 /*break*/, 8];
|
|
5854
5882
|
rulesMapping = new kwikidToolkit.Rule(connectedFieldConfig.rules, {
|
|
@@ -5860,14 +5888,14 @@
|
|
|
5860
5888
|
ALL_FORMS_DATA: this.allFormsData,
|
|
5861
5889
|
EXTRA_DATA: this.extraData
|
|
5862
5890
|
}).mapping();
|
|
5863
|
-
|
|
5891
|
+
_16.label = 1;
|
|
5864
5892
|
case 1:
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5893
|
+
_16.trys.push([1, 6, 7, 8]);
|
|
5894
|
+
_13 = __values(connectedFieldConfig.actions), _14 = _13.next();
|
|
5895
|
+
_16.label = 2;
|
|
5868
5896
|
case 2:
|
|
5869
|
-
if (!!
|
|
5870
|
-
action =
|
|
5897
|
+
if (!!_14.done) return [3 /*break*/, 5];
|
|
5898
|
+
action = _14.value;
|
|
5871
5899
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5872
5900
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5873
5901
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5882,19 +5910,19 @@
|
|
|
5882
5910
|
}, this.takeAction.bind(this));
|
|
5883
5911
|
return [4 /*yield*/, actions.execute()];
|
|
5884
5912
|
case 3:
|
|
5885
|
-
|
|
5886
|
-
|
|
5913
|
+
_16.sent();
|
|
5914
|
+
_16.label = 4;
|
|
5887
5915
|
case 4:
|
|
5888
|
-
|
|
5916
|
+
_14 = _13.next();
|
|
5889
5917
|
return [3 /*break*/, 2];
|
|
5890
5918
|
case 5: return [3 /*break*/, 8];
|
|
5891
5919
|
case 6:
|
|
5892
|
-
e_5_1 =
|
|
5920
|
+
e_5_1 = _16.sent();
|
|
5893
5921
|
e_5 = { error: e_5_1 };
|
|
5894
5922
|
return [3 /*break*/, 8];
|
|
5895
5923
|
case 7:
|
|
5896
5924
|
try {
|
|
5897
|
-
if (
|
|
5925
|
+
if (_14 && !_14.done && (_15 = _13.return)) _15.call(_13);
|
|
5898
5926
|
}
|
|
5899
5927
|
finally { if (e_5) throw e_5.error; }
|
|
5900
5928
|
return [7 /*endfinally*/];
|
|
@@ -5906,16 +5934,16 @@
|
|
|
5906
5934
|
KwikIDFormViewComponent.prototype.handleConnectedElementFields = function (currentField, connectedFieldConfig, eventType, nested) {
|
|
5907
5935
|
return __awaiter(this, void 0, void 0, function () {
|
|
5908
5936
|
var connectedField;
|
|
5909
|
-
return __generator(this, function (
|
|
5910
|
-
switch (
|
|
5937
|
+
return __generator(this, function (_13) {
|
|
5938
|
+
switch (_13.label) {
|
|
5911
5939
|
case 0:
|
|
5912
5940
|
connectedField = getFormFieldByKey(this.formFields, connectedFieldConfig.key);
|
|
5913
5941
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "triggers")) return [3 /*break*/, 2];
|
|
5914
5942
|
if (!connectedFieldConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5915
5943
|
return [4 /*yield*/, this.handleConnectedElementFieldActions(connectedFieldConfig, connectedField)];
|
|
5916
5944
|
case 1:
|
|
5917
|
-
connectedField =
|
|
5918
|
-
|
|
5945
|
+
connectedField = _13.sent();
|
|
5946
|
+
_13.label = 2;
|
|
5919
5947
|
case 2:
|
|
5920
5948
|
if (kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "handleNestedFields")) {
|
|
5921
5949
|
if (connectedFieldConfig.handleNestedFields) {
|
|
@@ -5930,67 +5958,67 @@
|
|
|
5930
5958
|
KwikIDFormViewComponent.prototype.handleConnectedElements = function (e, eventType) {
|
|
5931
5959
|
return __awaiter(this, void 0, void 0, function () {
|
|
5932
5960
|
var currentField, connectedFieldGroups, connectedFieldGroups_1, connectedFieldGroups_1_1, connectedFieldGroupConfig, e_6_1, connectedFields, connectedFields_1, connectedFields_1_1, connectedFieldConfig, e_7_1;
|
|
5933
|
-
var e_6,
|
|
5934
|
-
return __generator(this, function (
|
|
5935
|
-
switch (
|
|
5961
|
+
var e_6, _13, e_7, _14;
|
|
5962
|
+
return __generator(this, function (_15) {
|
|
5963
|
+
switch (_15.label) {
|
|
5936
5964
|
case 0:
|
|
5937
5965
|
currentField = getFormFieldByKey(this.formFields, e.key);
|
|
5938
5966
|
if (!(currentField !== undefined)) return [3 /*break*/, 17];
|
|
5939
5967
|
if (!kwikidToolkit.checkObjectKeyExists(currentField, "connectedElements")) return [3 /*break*/, 16];
|
|
5940
5968
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFieldGroups")) return [3 /*break*/, 8];
|
|
5941
5969
|
connectedFieldGroups = currentField.connectedElements.connectedFieldGroups;
|
|
5942
|
-
|
|
5970
|
+
_15.label = 1;
|
|
5943
5971
|
case 1:
|
|
5944
|
-
|
|
5972
|
+
_15.trys.push([1, 6, 7, 8]);
|
|
5945
5973
|
connectedFieldGroups_1 = __values(connectedFieldGroups), connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5946
|
-
|
|
5974
|
+
_15.label = 2;
|
|
5947
5975
|
case 2:
|
|
5948
5976
|
if (!!connectedFieldGroups_1_1.done) return [3 /*break*/, 5];
|
|
5949
5977
|
connectedFieldGroupConfig = connectedFieldGroups_1_1.value;
|
|
5950
5978
|
return [4 /*yield*/, this.handleConnectedElementFieldGroup(currentField, connectedFieldGroupConfig, eventType)];
|
|
5951
5979
|
case 3:
|
|
5952
|
-
|
|
5953
|
-
|
|
5980
|
+
_15.sent();
|
|
5981
|
+
_15.label = 4;
|
|
5954
5982
|
case 4:
|
|
5955
5983
|
connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5956
5984
|
return [3 /*break*/, 2];
|
|
5957
5985
|
case 5: return [3 /*break*/, 8];
|
|
5958
5986
|
case 6:
|
|
5959
|
-
e_6_1 =
|
|
5987
|
+
e_6_1 = _15.sent();
|
|
5960
5988
|
e_6 = { error: e_6_1 };
|
|
5961
5989
|
return [3 /*break*/, 8];
|
|
5962
5990
|
case 7:
|
|
5963
5991
|
try {
|
|
5964
|
-
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (
|
|
5992
|
+
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (_13 = connectedFieldGroups_1.return)) _13.call(connectedFieldGroups_1);
|
|
5965
5993
|
}
|
|
5966
5994
|
finally { if (e_6) throw e_6.error; }
|
|
5967
5995
|
return [7 /*endfinally*/];
|
|
5968
5996
|
case 8:
|
|
5969
5997
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFields")) return [3 /*break*/, 16];
|
|
5970
5998
|
connectedFields = currentField.connectedElements.connectedFields;
|
|
5971
|
-
|
|
5999
|
+
_15.label = 9;
|
|
5972
6000
|
case 9:
|
|
5973
|
-
|
|
6001
|
+
_15.trys.push([9, 14, 15, 16]);
|
|
5974
6002
|
connectedFields_1 = __values(connectedFields), connectedFields_1_1 = connectedFields_1.next();
|
|
5975
|
-
|
|
6003
|
+
_15.label = 10;
|
|
5976
6004
|
case 10:
|
|
5977
6005
|
if (!!connectedFields_1_1.done) return [3 /*break*/, 13];
|
|
5978
6006
|
connectedFieldConfig = connectedFields_1_1.value;
|
|
5979
6007
|
return [4 /*yield*/, this.handleConnectedElementFields(currentField, connectedFieldConfig, eventType, eventType)];
|
|
5980
6008
|
case 11:
|
|
5981
|
-
currentField =
|
|
5982
|
-
|
|
6009
|
+
currentField = _15.sent();
|
|
6010
|
+
_15.label = 12;
|
|
5983
6011
|
case 12:
|
|
5984
6012
|
connectedFields_1_1 = connectedFields_1.next();
|
|
5985
6013
|
return [3 /*break*/, 10];
|
|
5986
6014
|
case 13: return [3 /*break*/, 16];
|
|
5987
6015
|
case 14:
|
|
5988
|
-
e_7_1 =
|
|
6016
|
+
e_7_1 = _15.sent();
|
|
5989
6017
|
e_7 = { error: e_7_1 };
|
|
5990
6018
|
return [3 /*break*/, 16];
|
|
5991
6019
|
case 15:
|
|
5992
6020
|
try {
|
|
5993
|
-
if (connectedFields_1_1 && !connectedFields_1_1.done && (
|
|
6021
|
+
if (connectedFields_1_1 && !connectedFields_1_1.done && (_14 = connectedFields_1.return)) _14.call(connectedFields_1);
|
|
5994
6022
|
}
|
|
5995
6023
|
finally { if (e_7) throw e_7.error; }
|
|
5996
6024
|
return [7 /*endfinally*/];
|
|
@@ -6002,15 +6030,15 @@
|
|
|
6002
6030
|
});
|
|
6003
6031
|
};
|
|
6004
6032
|
KwikIDFormViewComponent.prototype.handleRemovedFile = function (e) {
|
|
6005
|
-
var
|
|
6033
|
+
var _13;
|
|
6006
6034
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6007
6035
|
this.showApiLoader();
|
|
6008
6036
|
if (this.formGroup.controls[e.key].enabled) {
|
|
6009
6037
|
this.files[e.key] = e.files;
|
|
6010
6038
|
this.formData[e.key] = filterDuplicatesFiles(this.files[e.key]);
|
|
6011
|
-
this.formGroup.patchValue((
|
|
6012
|
-
|
|
6013
|
-
|
|
6039
|
+
this.formGroup.patchValue((_13 = {},
|
|
6040
|
+
_13[e.key] = this.formData[e.key],
|
|
6041
|
+
_13), { emitEvent: false });
|
|
6014
6042
|
}
|
|
6015
6043
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_FILE_REMOVE, Object.assign(Object.assign(Object.assign({ field_key: e.key }, ((_b = (_a = e.file) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : { file_name: (_c = e.file) === null || _c === void 0 ? void 0 : _c.name })), ((_e = (_d = e.file) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : { file_size: (_f = e.file) === null || _f === void 0 ? void 0 : _f.size })), ((_h = (_g = e.file) === null || _g === void 0 ? void 0 : _g.type) !== null && _h !== void 0 ? _h : { file_type: (_j = e.file) === null || _j === void 0 ? void 0 : _j.type })));
|
|
6016
6044
|
this.hideApiLoader();
|
|
@@ -6029,9 +6057,9 @@
|
|
|
6029
6057
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6030
6058
|
return __awaiter(this, void 0, void 0, function () {
|
|
6031
6059
|
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;
|
|
6032
|
-
var e_8,
|
|
6033
|
-
return __generator(this, function (
|
|
6034
|
-
switch (
|
|
6060
|
+
var e_8, _13, e_9, _14;
|
|
6061
|
+
return __generator(this, function (_15) {
|
|
6062
|
+
switch (_15.label) {
|
|
6035
6063
|
case 0:
|
|
6036
6064
|
this.showApiLoader();
|
|
6037
6065
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
@@ -6039,42 +6067,42 @@
|
|
|
6039
6067
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
6040
6068
|
kwikidToolkit.checkObjectKeyExists(field.properties, "uploadFileToServer") &&
|
|
6041
6069
|
field.properties.uploadFileToServer)) return [3 /*break*/, 9];
|
|
6042
|
-
|
|
6070
|
+
_15.label = 1;
|
|
6043
6071
|
case 1:
|
|
6044
|
-
|
|
6072
|
+
_15.trys.push([1, 6, 7, 8]);
|
|
6045
6073
|
values_1 = __values(values), values_1_1 = values_1.next();
|
|
6046
|
-
|
|
6074
|
+
_15.label = 2;
|
|
6047
6075
|
case 2:
|
|
6048
6076
|
if (!!values_1_1.done) return [3 /*break*/, 5];
|
|
6049
6077
|
value = values_1_1.value;
|
|
6050
6078
|
return [4 /*yield*/, this.uploadFile(field, value)];
|
|
6051
6079
|
case 3:
|
|
6052
|
-
|
|
6053
|
-
|
|
6080
|
+
_15.sent();
|
|
6081
|
+
_15.label = 4;
|
|
6054
6082
|
case 4:
|
|
6055
6083
|
values_1_1 = values_1.next();
|
|
6056
6084
|
return [3 /*break*/, 2];
|
|
6057
6085
|
case 5: return [3 /*break*/, 8];
|
|
6058
6086
|
case 6:
|
|
6059
|
-
e_8_1 =
|
|
6087
|
+
e_8_1 = _15.sent();
|
|
6060
6088
|
e_8 = { error: e_8_1 };
|
|
6061
6089
|
return [3 /*break*/, 8];
|
|
6062
6090
|
case 7:
|
|
6063
6091
|
try {
|
|
6064
|
-
if (values_1_1 && !values_1_1.done && (
|
|
6092
|
+
if (values_1_1 && !values_1_1.done && (_13 = values_1.return)) _13.call(values_1);
|
|
6065
6093
|
}
|
|
6066
6094
|
finally { if (e_8) throw e_8.error; }
|
|
6067
6095
|
return [7 /*endfinally*/];
|
|
6068
6096
|
case 8: return [3 /*break*/, 18];
|
|
6069
6097
|
case 9:
|
|
6070
6098
|
_loop_2 = function (value) {
|
|
6071
|
-
var updatedFile,
|
|
6072
|
-
return __generator(this, function (
|
|
6073
|
-
switch (
|
|
6099
|
+
var updatedFile, _16;
|
|
6100
|
+
return __generator(this, function (_17) {
|
|
6101
|
+
switch (_17.label) {
|
|
6074
6102
|
case 0:
|
|
6075
6103
|
this_2.updateFiles(value, "LOADING", e.key);
|
|
6076
6104
|
this_2.triggerLogs(ELogEventType$1.FORM__FIELD_FILE_ADD, Object.assign(Object.assign(Object.assign({ field_key: e.key }, ((_b = (_a = e.file) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : { file_name: (_c = e.file) === null || _c === void 0 ? void 0 : _c.name })), ((_e = (_d = e.file) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : { file_size: (_f = e.file) === null || _f === void 0 ? void 0 : _f.size })), ((_h = (_g = e.file) === null || _g === void 0 ? void 0 : _g.type) !== null && _h !== void 0 ? _h : { file_type: (_j = e.file) === null || _j === void 0 ? void 0 : _j.type })));
|
|
6077
|
-
|
|
6105
|
+
_16 = kwikidToolkit.getObjectDeepCopy;
|
|
6078
6106
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
6079
6107
|
setTimeout(function () {
|
|
6080
6108
|
resolve({
|
|
@@ -6088,42 +6116,42 @@
|
|
|
6088
6116
|
}, FORM_VIEW_TIMERS.WAIT_FOR_FILE_METADATA_DEEPCOPY); // 1000 ms = 1 sec
|
|
6089
6117
|
})];
|
|
6090
6118
|
case 1:
|
|
6091
|
-
updatedFile =
|
|
6119
|
+
updatedFile = _16.apply(void 0, [_17.sent()]);
|
|
6092
6120
|
this_2.updateFiles(updatedFile, "NORMAL", e.key);
|
|
6093
6121
|
return [2 /*return*/];
|
|
6094
6122
|
}
|
|
6095
6123
|
});
|
|
6096
6124
|
};
|
|
6097
6125
|
this_2 = this;
|
|
6098
|
-
|
|
6126
|
+
_15.label = 10;
|
|
6099
6127
|
case 10:
|
|
6100
|
-
|
|
6128
|
+
_15.trys.push([10, 15, 16, 17]);
|
|
6101
6129
|
values_2 = __values(values), values_2_1 = values_2.next();
|
|
6102
|
-
|
|
6130
|
+
_15.label = 11;
|
|
6103
6131
|
case 11:
|
|
6104
6132
|
if (!!values_2_1.done) return [3 /*break*/, 14];
|
|
6105
6133
|
value = values_2_1.value;
|
|
6106
6134
|
return [5 /*yield**/, _loop_2(value)];
|
|
6107
6135
|
case 12:
|
|
6108
|
-
|
|
6109
|
-
|
|
6136
|
+
_15.sent();
|
|
6137
|
+
_15.label = 13;
|
|
6110
6138
|
case 13:
|
|
6111
6139
|
values_2_1 = values_2.next();
|
|
6112
6140
|
return [3 /*break*/, 11];
|
|
6113
6141
|
case 14: return [3 /*break*/, 17];
|
|
6114
6142
|
case 15:
|
|
6115
|
-
e_9_1 =
|
|
6143
|
+
e_9_1 = _15.sent();
|
|
6116
6144
|
e_9 = { error: e_9_1 };
|
|
6117
6145
|
return [3 /*break*/, 17];
|
|
6118
6146
|
case 16:
|
|
6119
6147
|
try {
|
|
6120
|
-
if (values_2_1 && !values_2_1.done && (
|
|
6148
|
+
if (values_2_1 && !values_2_1.done && (_14 = values_2.return)) _14.call(values_2);
|
|
6121
6149
|
}
|
|
6122
6150
|
finally { if (e_9) throw e_9.error; }
|
|
6123
6151
|
return [7 /*endfinally*/];
|
|
6124
6152
|
case 17:
|
|
6125
6153
|
this.hideApiLoader();
|
|
6126
|
-
|
|
6154
|
+
_15.label = 18;
|
|
6127
6155
|
case 18: return [2 /*return*/];
|
|
6128
6156
|
}
|
|
6129
6157
|
});
|
|
@@ -6131,7 +6159,7 @@
|
|
|
6131
6159
|
};
|
|
6132
6160
|
/** Methods for Camera related fields like 'CAPTURE' or 'RECORD' */
|
|
6133
6161
|
KwikIDFormViewComponent.prototype.handleOnClickGetRemovedMediaFile = function (e) {
|
|
6134
|
-
var
|
|
6162
|
+
var _13;
|
|
6135
6163
|
var _this = this;
|
|
6136
6164
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6137
6165
|
if (this.formGroup.controls[e.key].enabled) {
|
|
@@ -6141,9 +6169,9 @@
|
|
|
6141
6169
|
this.mediaFiles[e.key] = e.mediaFiles;
|
|
6142
6170
|
this.formData[e.key] = filterDuplicatesMediaFiles(this.mediaFiles[e.key]);
|
|
6143
6171
|
this.cameraData[e.key] = convertFormFieldValueToStandardFormat(field_3, this.formData[e.key]);
|
|
6144
|
-
this.formGroup.patchValue((
|
|
6145
|
-
|
|
6146
|
-
|
|
6172
|
+
this.formGroup.patchValue((_13 = {},
|
|
6173
|
+
_13[e.key] = this.formData[e.key],
|
|
6174
|
+
_13), { emitEvent: false });
|
|
6147
6175
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_MEDIA_FILE_REMOVE, Object.assign(Object.assign(Object.assign({ field_key: e.key }, ((_b = (_a = e.file) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : { file_name: (_c = e.file) === null || _c === void 0 ? void 0 : _c.name })), ((_e = (_d = e.file) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : { file_size: (_f = e.file) === null || _f === void 0 ? void 0 : _f.size })), ((_h = (_g = e.file) === null || _g === void 0 ? void 0 : _g.type) !== null && _h !== void 0 ? _h : { file_type: (_j = e.file) === null || _j === void 0 ? void 0 : _j.type })));
|
|
6148
6176
|
this.getUnsavedDataState.emit(true);
|
|
6149
6177
|
if (field_3.isFormElement &&
|
|
@@ -6160,11 +6188,11 @@
|
|
|
6160
6188
|
EXTRA_DATA: this.extraData
|
|
6161
6189
|
}, this.takeAction.bind(this));
|
|
6162
6190
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6163
|
-
return __generator(this, function (
|
|
6164
|
-
switch (
|
|
6191
|
+
return __generator(this, function (_13) {
|
|
6192
|
+
switch (_13.label) {
|
|
6165
6193
|
case 0: return [4 /*yield*/, ruleEngine_5.run(field_3.validation)];
|
|
6166
6194
|
case 1:
|
|
6167
|
-
|
|
6195
|
+
_13.sent();
|
|
6168
6196
|
return [2 /*return*/];
|
|
6169
6197
|
}
|
|
6170
6198
|
});
|
|
@@ -6185,9 +6213,9 @@
|
|
|
6185
6213
|
KwikIDFormViewComponent.prototype.handleOnClickInputCamera = function (e, field) {
|
|
6186
6214
|
var _a, _b, _c, _d, _e, _f;
|
|
6187
6215
|
return __awaiter(this, void 0, void 0, function () {
|
|
6188
|
-
var fieldKey, fieldCameraConfig,
|
|
6189
|
-
return __generator(this, function (
|
|
6190
|
-
switch (
|
|
6216
|
+
var fieldKey, fieldCameraConfig, _13, cameraHelper, _14, _15;
|
|
6217
|
+
return __generator(this, function (_16) {
|
|
6218
|
+
switch (_16.label) {
|
|
6191
6219
|
case 0:
|
|
6192
6220
|
this.loaderService.show({
|
|
6193
6221
|
loaderText: "Loading Camera...",
|
|
@@ -6202,8 +6230,8 @@
|
|
|
6202
6230
|
field_type: field.type,
|
|
6203
6231
|
camera_type: this.activeCameraType
|
|
6204
6232
|
});
|
|
6205
|
-
|
|
6206
|
-
switch (
|
|
6233
|
+
_13 = this.activeCameraType;
|
|
6234
|
+
switch (_13) {
|
|
6207
6235
|
case "CAPTURE": return [3 /*break*/, 1];
|
|
6208
6236
|
case "RECORD": return [3 /*break*/, 4];
|
|
6209
6237
|
}
|
|
@@ -6226,13 +6254,13 @@
|
|
|
6226
6254
|
ALL_FORMS_DATA: this.allFormsData,
|
|
6227
6255
|
EXTRA_DATA: this.extraData
|
|
6228
6256
|
});
|
|
6229
|
-
|
|
6230
|
-
|
|
6257
|
+
_14 = this;
|
|
6258
|
+
_15 = {};
|
|
6231
6259
|
return [4 /*yield*/, cameraHelper.getCameraWatermarkData()];
|
|
6232
6260
|
case 2:
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6261
|
+
_14.activeCameraData = (_15.watermark = _16.sent(),
|
|
6262
|
+
_15);
|
|
6263
|
+
_16.label = 3;
|
|
6236
6264
|
case 3: return [3 /*break*/, 6];
|
|
6237
6265
|
case 4:
|
|
6238
6266
|
this.activeCameraConfig = kwikidToolkit.mergeObjectsDeep([
|
|
@@ -6259,10 +6287,10 @@
|
|
|
6259
6287
|
KwikIDFormViewComponent.prototype.setCameraMedia = function (media) {
|
|
6260
6288
|
return __awaiter(this, void 0, void 0, function () {
|
|
6261
6289
|
var field, activeCameraData, updatedMedia, ruleEngine_6;
|
|
6262
|
-
var
|
|
6290
|
+
var _13;
|
|
6263
6291
|
var _this = this;
|
|
6264
|
-
return __generator(this, function (
|
|
6265
|
-
switch (
|
|
6292
|
+
return __generator(this, function (_14) {
|
|
6293
|
+
switch (_14.label) {
|
|
6266
6294
|
case 0:
|
|
6267
6295
|
field = getFormFieldByKey(this.formFields, this.activeCameraFieldKey);
|
|
6268
6296
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
@@ -6270,7 +6298,7 @@
|
|
|
6270
6298
|
field.properties.uploadFileToServer)) return [3 /*break*/, 2];
|
|
6271
6299
|
return [4 /*yield*/, this.uploadFile(field, media)];
|
|
6272
6300
|
case 1:
|
|
6273
|
-
|
|
6301
|
+
_14.sent();
|
|
6274
6302
|
return [3 /*break*/, 3];
|
|
6275
6303
|
case 2:
|
|
6276
6304
|
activeCameraData = this.activeCameraData;
|
|
@@ -6293,9 +6321,9 @@
|
|
|
6293
6321
|
emitEvent: false,
|
|
6294
6322
|
onlySelf: false
|
|
6295
6323
|
});
|
|
6296
|
-
this.formGroup.patchValue((
|
|
6297
|
-
|
|
6298
|
-
|
|
6324
|
+
this.formGroup.patchValue((_13 = {},
|
|
6325
|
+
_13[field.key] = kwikidToolkit.getObjectDeepCopy([updatedMedia]),
|
|
6326
|
+
_13), { emitEvent: false });
|
|
6299
6327
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
6300
6328
|
emitEvent: false
|
|
6301
6329
|
});
|
|
@@ -6317,11 +6345,11 @@
|
|
|
6317
6345
|
EXTRA_DATA: this.extraData
|
|
6318
6346
|
}, this.takeAction.bind(this));
|
|
6319
6347
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6320
|
-
return __generator(this, function (
|
|
6321
|
-
switch (
|
|
6348
|
+
return __generator(this, function (_13) {
|
|
6349
|
+
switch (_13.label) {
|
|
6322
6350
|
case 0: return [4 /*yield*/, ruleEngine_6.run(field.validation)];
|
|
6323
6351
|
case 1:
|
|
6324
|
-
|
|
6352
|
+
_13.sent();
|
|
6325
6353
|
return [2 /*return*/];
|
|
6326
6354
|
}
|
|
6327
6355
|
});
|
|
@@ -6338,7 +6366,7 @@
|
|
|
6338
6366
|
field_key: field.key,
|
|
6339
6367
|
field_type: field.type
|
|
6340
6368
|
});
|
|
6341
|
-
|
|
6369
|
+
_14.label = 3;
|
|
6342
6370
|
case 3: return [2 /*return*/];
|
|
6343
6371
|
}
|
|
6344
6372
|
});
|
|
@@ -6471,7 +6499,7 @@
|
|
|
6471
6499
|
* 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.
|
|
6472
6500
|
*/
|
|
6473
6501
|
KwikIDFormViewComponent.prototype.updateFiles = function (file, state, key) {
|
|
6474
|
-
var
|
|
6502
|
+
var _13;
|
|
6475
6503
|
var _this = this;
|
|
6476
6504
|
var _a;
|
|
6477
6505
|
var fileWithState = kwikidToolkit.mergeObjects(file, { state: state });
|
|
@@ -6499,9 +6527,9 @@
|
|
|
6499
6527
|
emitEvent: false,
|
|
6500
6528
|
onlySelf: false
|
|
6501
6529
|
});
|
|
6502
|
-
this.formGroup.patchValue((
|
|
6503
|
-
|
|
6504
|
-
|
|
6530
|
+
this.formGroup.patchValue((_13 = {},
|
|
6531
|
+
_13[key] = normalFiles,
|
|
6532
|
+
_13), { emitEvent: false });
|
|
6505
6533
|
this.getUnsavedDataState.emit(true);
|
|
6506
6534
|
if (field.isFormElement &&
|
|
6507
6535
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -6517,11 +6545,11 @@
|
|
|
6517
6545
|
EXTRA_DATA: this.extraData
|
|
6518
6546
|
}, this.takeAction.bind(this));
|
|
6519
6547
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6520
|
-
return __generator(this, function (
|
|
6521
|
-
switch (
|
|
6548
|
+
return __generator(this, function (_13) {
|
|
6549
|
+
switch (_13.label) {
|
|
6522
6550
|
case 0: return [4 /*yield*/, ruleEngine_7.run(field.validation)];
|
|
6523
6551
|
case 1:
|
|
6524
|
-
|
|
6552
|
+
_13.sent();
|
|
6525
6553
|
return [2 /*return*/];
|
|
6526
6554
|
}
|
|
6527
6555
|
});
|
|
@@ -6541,13 +6569,13 @@
|
|
|
6541
6569
|
KwikIDFormViewComponent.prototype.uploadFile = function (field, file) {
|
|
6542
6570
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6543
6571
|
return __awaiter(this, void 0, void 0, function () {
|
|
6544
|
-
var
|
|
6545
|
-
var e_10,
|
|
6546
|
-
return __generator(this, function (
|
|
6547
|
-
switch (
|
|
6572
|
+
var _13, ocrPayload, facematchPayload, facematchSources, facematchSources_1, facematchSources_1_1, facematchSourceConfig, source, sourceValue, facematchSource, e_10_1, watermarkPayload, watermarkSources, watermarkSources_1, watermarkSources_1_1, watermarkSourceConfig, source, sourceValue, watermarkSource, e_11_1, livelinessPayload, imageUploadPayload;
|
|
6573
|
+
var e_10, _14, e_11, _15;
|
|
6574
|
+
return __generator(this, function (_16) {
|
|
6575
|
+
switch (_16.label) {
|
|
6548
6576
|
case 0:
|
|
6549
|
-
|
|
6550
|
-
switch (
|
|
6577
|
+
_13 = field.type;
|
|
6578
|
+
switch (_13) {
|
|
6551
6579
|
case EFieldType.FILE: return [3 /*break*/, 1];
|
|
6552
6580
|
case EFieldType.CAPTURE: return [3 /*break*/, 2];
|
|
6553
6581
|
case EFieldType.RECORD: return [3 /*break*/, 19];
|
|
@@ -6600,11 +6628,11 @@
|
|
|
6600
6628
|
field.properties.features.facematch.isFacematchFromServer;
|
|
6601
6629
|
facematchPayload.images = [];
|
|
6602
6630
|
facematchSources = field.properties.features.facematch.sources;
|
|
6603
|
-
|
|
6631
|
+
_16.label = 3;
|
|
6604
6632
|
case 3:
|
|
6605
|
-
|
|
6633
|
+
_16.trys.push([3, 8, 9, 10]);
|
|
6606
6634
|
facematchSources_1 = __values(facematchSources), facematchSources_1_1 = facematchSources_1.next();
|
|
6607
|
-
|
|
6635
|
+
_16.label = 4;
|
|
6608
6636
|
case 4:
|
|
6609
6637
|
if (!!facematchSources_1_1.done) return [3 /*break*/, 7];
|
|
6610
6638
|
facematchSourceConfig = facematchSources_1_1.value;
|
|
@@ -6620,24 +6648,24 @@
|
|
|
6620
6648
|
});
|
|
6621
6649
|
return [4 /*yield*/, source.getValueFromSource(facematchSourceConfig)];
|
|
6622
6650
|
case 5:
|
|
6623
|
-
sourceValue =
|
|
6651
|
+
sourceValue = _16.sent();
|
|
6624
6652
|
facematchSource = {
|
|
6625
6653
|
key: facematchSourceConfig.id,
|
|
6626
6654
|
value: sourceValue
|
|
6627
6655
|
};
|
|
6628
6656
|
facematchPayload.images.push(facematchSource);
|
|
6629
|
-
|
|
6657
|
+
_16.label = 6;
|
|
6630
6658
|
case 6:
|
|
6631
6659
|
facematchSources_1_1 = facematchSources_1.next();
|
|
6632
6660
|
return [3 /*break*/, 4];
|
|
6633
6661
|
case 7: return [3 /*break*/, 10];
|
|
6634
6662
|
case 8:
|
|
6635
|
-
e_10_1 =
|
|
6663
|
+
e_10_1 = _16.sent();
|
|
6636
6664
|
e_10 = { error: e_10_1 };
|
|
6637
6665
|
return [3 /*break*/, 10];
|
|
6638
6666
|
case 9:
|
|
6639
6667
|
try {
|
|
6640
|
-
if (facematchSources_1_1 && !facematchSources_1_1.done && (
|
|
6668
|
+
if (facematchSources_1_1 && !facematchSources_1_1.done && (_14 = facematchSources_1.return)) _14.call(facematchSources_1);
|
|
6641
6669
|
}
|
|
6642
6670
|
finally { if (e_10) throw e_10.error; }
|
|
6643
6671
|
return [7 /*endfinally*/];
|
|
@@ -6651,11 +6679,11 @@
|
|
|
6651
6679
|
watermarkPayload.data = [];
|
|
6652
6680
|
watermarkSources = field.properties.features.watermark.sources;
|
|
6653
6681
|
watermarkPayload.config = field.properties.features.watermark.sources;
|
|
6654
|
-
|
|
6682
|
+
_16.label = 11;
|
|
6655
6683
|
case 11:
|
|
6656
|
-
|
|
6684
|
+
_16.trys.push([11, 16, 17, 18]);
|
|
6657
6685
|
watermarkSources_1 = __values(watermarkSources), watermarkSources_1_1 = watermarkSources_1.next();
|
|
6658
|
-
|
|
6686
|
+
_16.label = 12;
|
|
6659
6687
|
case 12:
|
|
6660
6688
|
if (!!watermarkSources_1_1.done) return [3 /*break*/, 15];
|
|
6661
6689
|
watermarkSourceConfig = watermarkSources_1_1.value;
|
|
@@ -6671,24 +6699,24 @@
|
|
|
6671
6699
|
});
|
|
6672
6700
|
return [4 /*yield*/, source.getValueFromSource(watermarkSourceConfig)];
|
|
6673
6701
|
case 13:
|
|
6674
|
-
sourceValue =
|
|
6702
|
+
sourceValue = _16.sent();
|
|
6675
6703
|
watermarkSource = {
|
|
6676
6704
|
key: watermarkSourceConfig.id,
|
|
6677
6705
|
value: sourceValue
|
|
6678
6706
|
};
|
|
6679
6707
|
watermarkPayload.data.push(watermarkSource);
|
|
6680
|
-
|
|
6708
|
+
_16.label = 14;
|
|
6681
6709
|
case 14:
|
|
6682
6710
|
watermarkSources_1_1 = watermarkSources_1.next();
|
|
6683
6711
|
return [3 /*break*/, 12];
|
|
6684
6712
|
case 15: return [3 /*break*/, 18];
|
|
6685
6713
|
case 16:
|
|
6686
|
-
e_11_1 =
|
|
6714
|
+
e_11_1 = _16.sent();
|
|
6687
6715
|
e_11 = { error: e_11_1 };
|
|
6688
6716
|
return [3 /*break*/, 18];
|
|
6689
6717
|
case 17:
|
|
6690
6718
|
try {
|
|
6691
|
-
if (watermarkSources_1_1 && !watermarkSources_1_1.done && (
|
|
6719
|
+
if (watermarkSources_1_1 && !watermarkSources_1_1.done && (_15 = watermarkSources_1.return)) _15.call(watermarkSources_1);
|
|
6692
6720
|
}
|
|
6693
6721
|
finally { if (e_11) throw e_11.error; }
|
|
6694
6722
|
return [7 /*endfinally*/];
|
|
@@ -6751,11 +6779,11 @@
|
|
|
6751
6779
|
});
|
|
6752
6780
|
};
|
|
6753
6781
|
KwikIDFormViewComponent.prototype.handleOnClickFormFieldButton = function (field) {
|
|
6754
|
-
var e_12,
|
|
6782
|
+
var e_12, _13;
|
|
6755
6783
|
var formData = this.formGroup.getRawValue();
|
|
6756
6784
|
try {
|
|
6757
|
-
for (var
|
|
6758
|
-
var field_4 =
|
|
6785
|
+
for (var _14 = __values(this.formFields), _15 = _14.next(); !_15.done; _15 = _14.next()) {
|
|
6786
|
+
var field_4 = _15.value;
|
|
6759
6787
|
if (field_4.isFormElement) {
|
|
6760
6788
|
if (field_4.hidden) {
|
|
6761
6789
|
delete formData[field_4.key];
|
|
@@ -6769,22 +6797,22 @@
|
|
|
6769
6797
|
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
6770
6798
|
finally {
|
|
6771
6799
|
try {
|
|
6772
|
-
if (
|
|
6800
|
+
if (_15 && !_15.done && (_13 = _14.return)) _13.call(_14);
|
|
6773
6801
|
}
|
|
6774
6802
|
finally { if (e_12) throw e_12.error; }
|
|
6775
6803
|
}
|
|
6776
6804
|
var extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
6777
|
-
var
|
|
6805
|
+
var _13;
|
|
6778
6806
|
if (field.isFormElement && !field.hidden) {
|
|
6779
|
-
var fieldData = (
|
|
6780
|
-
|
|
6807
|
+
var fieldData = (_13 = {},
|
|
6808
|
+
_13[field.key] = {
|
|
6781
6809
|
key: field.key,
|
|
6782
6810
|
label: field.label,
|
|
6783
6811
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
6784
6812
|
type: field.type,
|
|
6785
6813
|
index: index
|
|
6786
6814
|
},
|
|
6787
|
-
|
|
6815
|
+
_13);
|
|
6788
6816
|
result[field.key] = fieldData[field.key];
|
|
6789
6817
|
}
|
|
6790
6818
|
return result;
|
|
@@ -6840,10 +6868,10 @@
|
|
|
6840
6868
|
KwikIDFormViewComponent.prototype.handleOnClickLiveLocation = function (e) {
|
|
6841
6869
|
return __awaiter(this, void 0, void 0, function () {
|
|
6842
6870
|
var field, ruleEngine_8;
|
|
6843
|
-
var
|
|
6871
|
+
var _13;
|
|
6844
6872
|
var _this = this;
|
|
6845
|
-
return __generator(this, function (
|
|
6846
|
-
switch (
|
|
6873
|
+
return __generator(this, function (_14) {
|
|
6874
|
+
switch (_14.label) {
|
|
6847
6875
|
case 0:
|
|
6848
6876
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
6849
6877
|
this.triggerLogs(ELogEventType$1.FORM__LIVE_LOCATION_BUTTON_CLICK, {
|
|
@@ -6854,9 +6882,9 @@
|
|
|
6854
6882
|
field.api.status.value = EApiStatusType.LOADING;
|
|
6855
6883
|
field.showLoader = true;
|
|
6856
6884
|
this.showApiLoader();
|
|
6857
|
-
this.formGroup.patchValue((
|
|
6858
|
-
|
|
6859
|
-
|
|
6885
|
+
this.formGroup.patchValue((_13 = {},
|
|
6886
|
+
_13[e.key] = e.value,
|
|
6887
|
+
_13), { emitEvent: false });
|
|
6860
6888
|
this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
|
|
6861
6889
|
this.getUnsavedDataState.emit(true);
|
|
6862
6890
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
@@ -6874,7 +6902,7 @@
|
|
|
6874
6902
|
}, FORM_VIEW_TIMERS.TIMER_300); // 1000 ms = 1 sec
|
|
6875
6903
|
})];
|
|
6876
6904
|
case 2:
|
|
6877
|
-
|
|
6905
|
+
_14.sent();
|
|
6878
6906
|
// set button status to success
|
|
6879
6907
|
field.api.status.value = EApiStatusType.SUCCESS;
|
|
6880
6908
|
field.showLoader = false;
|
|
@@ -6892,11 +6920,11 @@
|
|
|
6892
6920
|
EXTRA_DATA: this.extraData
|
|
6893
6921
|
}, this.takeAction.bind(this));
|
|
6894
6922
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6895
|
-
return __generator(this, function (
|
|
6896
|
-
switch (
|
|
6923
|
+
return __generator(this, function (_13) {
|
|
6924
|
+
switch (_13.label) {
|
|
6897
6925
|
case 0: return [4 /*yield*/, ruleEngine_8.run(field.validation)];
|
|
6898
6926
|
case 1:
|
|
6899
|
-
|
|
6927
|
+
_13.sent();
|
|
6900
6928
|
return [2 /*return*/];
|
|
6901
6929
|
}
|
|
6902
6930
|
});
|
|
@@ -6910,7 +6938,7 @@
|
|
|
6910
6938
|
}, "ON_CHANGE");
|
|
6911
6939
|
}
|
|
6912
6940
|
this.hideApiLoader();
|
|
6913
|
-
|
|
6941
|
+
_14.label = 3;
|
|
6914
6942
|
case 3: return [2 /*return*/];
|
|
6915
6943
|
}
|
|
6916
6944
|
});
|
|
@@ -6918,11 +6946,11 @@
|
|
|
6918
6946
|
};
|
|
6919
6947
|
// DOM Event Handlers
|
|
6920
6948
|
KwikIDFormViewComponent.prototype.handleGetKeyValue = function (e) {
|
|
6921
|
-
var
|
|
6949
|
+
var _13;
|
|
6922
6950
|
var _this = this;
|
|
6923
|
-
this.formGroup.patchValue((
|
|
6924
|
-
|
|
6925
|
-
|
|
6951
|
+
this.formGroup.patchValue((_13 = {},
|
|
6952
|
+
_13[e.key] = e.value,
|
|
6953
|
+
_13), { emitEvent: false });
|
|
6926
6954
|
var field = getFormFieldByKey(this.formFields, e.key);
|
|
6927
6955
|
this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
|
|
6928
6956
|
this.getUnsavedDataState.emit(true);
|
|
@@ -6940,11 +6968,11 @@
|
|
|
6940
6968
|
EXTRA_DATA: this.extraData
|
|
6941
6969
|
}, this.takeAction.bind(this));
|
|
6942
6970
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6943
|
-
return __generator(this, function (
|
|
6944
|
-
switch (
|
|
6971
|
+
return __generator(this, function (_13) {
|
|
6972
|
+
switch (_13.label) {
|
|
6945
6973
|
case 0: return [4 /*yield*/, ruleEngine_9.run(field.validation)];
|
|
6946
6974
|
case 1:
|
|
6947
|
-
|
|
6975
|
+
_13.sent();
|
|
6948
6976
|
return [2 /*return*/];
|
|
6949
6977
|
}
|
|
6950
6978
|
});
|
|
@@ -6963,33 +6991,33 @@
|
|
|
6963
6991
|
return __awaiter(this, void 0, void 0, function () {
|
|
6964
6992
|
var resetFormFields, BYPASS_RESET_CONFIRM, CONFIRM_RESET;
|
|
6965
6993
|
var _this = this;
|
|
6966
|
-
return __generator(this, function (
|
|
6994
|
+
return __generator(this, function (_13) {
|
|
6967
6995
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_RESET_BUTTON_CLICK, {
|
|
6968
6996
|
field_key: field.key
|
|
6969
6997
|
});
|
|
6970
6998
|
resetFormFields = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6971
|
-
var
|
|
6972
|
-
var e_14,
|
|
6973
|
-
return __generator(this, function (
|
|
6974
|
-
switch (
|
|
6999
|
+
var _13, _14, f, _15, _16, action, resetField, actions, e_13_1, e_14_1, _17, _18, fg, _19, _20, action, _21, _22, fieldKey, resetField, actions, e_15_1, e_16_1, e_17_1;
|
|
7000
|
+
var e_14, _23, e_13, _24, e_17, _25, e_16, _26, e_15, _27;
|
|
7001
|
+
return __generator(this, function (_28) {
|
|
7002
|
+
switch (_28.label) {
|
|
6975
7003
|
case 0:
|
|
6976
7004
|
if (!kwikidToolkit.checkObjectPathExists(field, "reset.fields")) return [3 /*break*/, 14];
|
|
6977
|
-
|
|
7005
|
+
_28.label = 1;
|
|
6978
7006
|
case 1:
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
7007
|
+
_28.trys.push([1, 12, 13, 14]);
|
|
7008
|
+
_13 = __values(field.reset.fields), _14 = _13.next();
|
|
7009
|
+
_28.label = 2;
|
|
6982
7010
|
case 2:
|
|
6983
|
-
if (!!
|
|
6984
|
-
f =
|
|
6985
|
-
|
|
7011
|
+
if (!!_14.done) return [3 /*break*/, 11];
|
|
7012
|
+
f = _14.value;
|
|
7013
|
+
_28.label = 3;
|
|
6986
7014
|
case 3:
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
7015
|
+
_28.trys.push([3, 8, 9, 10]);
|
|
7016
|
+
_15 = (e_13 = void 0, __values(f.actions)), _16 = _15.next();
|
|
7017
|
+
_28.label = 4;
|
|
6990
7018
|
case 4:
|
|
6991
|
-
if (!!
|
|
6992
|
-
action =
|
|
7019
|
+
if (!!_16.done) return [3 /*break*/, 7];
|
|
7020
|
+
action = _16.value;
|
|
6993
7021
|
resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
6994
7022
|
actions = new kwikidToolkit.Action(action, {}, {
|
|
6995
7023
|
FIELD_CONFIG: resetField,
|
|
@@ -7003,62 +7031,62 @@
|
|
|
7003
7031
|
}, this.takeAction.bind(this));
|
|
7004
7032
|
return [4 /*yield*/, actions.execute()];
|
|
7005
7033
|
case 5:
|
|
7006
|
-
|
|
7007
|
-
|
|
7034
|
+
_28.sent();
|
|
7035
|
+
_28.label = 6;
|
|
7008
7036
|
case 6:
|
|
7009
|
-
|
|
7037
|
+
_16 = _15.next();
|
|
7010
7038
|
return [3 /*break*/, 4];
|
|
7011
7039
|
case 7: return [3 /*break*/, 10];
|
|
7012
7040
|
case 8:
|
|
7013
|
-
e_13_1 =
|
|
7041
|
+
e_13_1 = _28.sent();
|
|
7014
7042
|
e_13 = { error: e_13_1 };
|
|
7015
7043
|
return [3 /*break*/, 10];
|
|
7016
7044
|
case 9:
|
|
7017
7045
|
try {
|
|
7018
|
-
if (
|
|
7046
|
+
if (_16 && !_16.done && (_24 = _15.return)) _24.call(_15);
|
|
7019
7047
|
}
|
|
7020
7048
|
finally { if (e_13) throw e_13.error; }
|
|
7021
7049
|
return [7 /*endfinally*/];
|
|
7022
7050
|
case 10:
|
|
7023
|
-
|
|
7051
|
+
_14 = _13.next();
|
|
7024
7052
|
return [3 /*break*/, 2];
|
|
7025
7053
|
case 11: return [3 /*break*/, 14];
|
|
7026
7054
|
case 12:
|
|
7027
|
-
e_14_1 =
|
|
7055
|
+
e_14_1 = _28.sent();
|
|
7028
7056
|
e_14 = { error: e_14_1 };
|
|
7029
7057
|
return [3 /*break*/, 14];
|
|
7030
7058
|
case 13:
|
|
7031
7059
|
try {
|
|
7032
|
-
if (
|
|
7060
|
+
if (_14 && !_14.done && (_23 = _13.return)) _23.call(_13);
|
|
7033
7061
|
}
|
|
7034
7062
|
finally { if (e_14) throw e_14.error; }
|
|
7035
7063
|
return [7 /*endfinally*/];
|
|
7036
7064
|
case 14:
|
|
7037
7065
|
if (!kwikidToolkit.checkObjectPathExists(field, "reset.fieldGroups")) return [3 /*break*/, 34];
|
|
7038
|
-
|
|
7066
|
+
_28.label = 15;
|
|
7039
7067
|
case 15:
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7068
|
+
_28.trys.push([15, 32, 33, 34]);
|
|
7069
|
+
_17 = __values(field.reset.fieldGroups), _18 = _17.next();
|
|
7070
|
+
_28.label = 16;
|
|
7043
7071
|
case 16:
|
|
7044
|
-
if (!!
|
|
7045
|
-
fg =
|
|
7046
|
-
|
|
7072
|
+
if (!!_18.done) return [3 /*break*/, 31];
|
|
7073
|
+
fg = _18.value;
|
|
7074
|
+
_28.label = 17;
|
|
7047
7075
|
case 17:
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7076
|
+
_28.trys.push([17, 28, 29, 30]);
|
|
7077
|
+
_19 = (e_16 = void 0, __values(fg.actions)), _20 = _19.next();
|
|
7078
|
+
_28.label = 18;
|
|
7051
7079
|
case 18:
|
|
7052
|
-
if (!!
|
|
7053
|
-
action =
|
|
7054
|
-
|
|
7080
|
+
if (!!_20.done) return [3 /*break*/, 27];
|
|
7081
|
+
action = _20.value;
|
|
7082
|
+
_28.label = 19;
|
|
7055
7083
|
case 19:
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7084
|
+
_28.trys.push([19, 24, 25, 26]);
|
|
7085
|
+
_21 = (e_15 = void 0, __values(this.fieldGroups[fg.groupKey])), _22 = _21.next();
|
|
7086
|
+
_28.label = 20;
|
|
7059
7087
|
case 20:
|
|
7060
|
-
if (!!
|
|
7061
|
-
fieldKey =
|
|
7088
|
+
if (!!_22.done) return [3 /*break*/, 23];
|
|
7089
|
+
fieldKey = _22.value;
|
|
7062
7090
|
resetField = getFormFieldByKey(this.formFields, fieldKey);
|
|
7063
7091
|
actions = new kwikidToolkit.Action(action, {}, {
|
|
7064
7092
|
FIELD_CONFIG: resetField,
|
|
@@ -7072,47 +7100,47 @@
|
|
|
7072
7100
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
7073
7101
|
return [4 /*yield*/, actions.execute()];
|
|
7074
7102
|
case 21:
|
|
7075
|
-
|
|
7076
|
-
|
|
7103
|
+
_28.sent();
|
|
7104
|
+
_28.label = 22;
|
|
7077
7105
|
case 22:
|
|
7078
|
-
|
|
7106
|
+
_22 = _21.next();
|
|
7079
7107
|
return [3 /*break*/, 20];
|
|
7080
7108
|
case 23: return [3 /*break*/, 26];
|
|
7081
7109
|
case 24:
|
|
7082
|
-
e_15_1 =
|
|
7110
|
+
e_15_1 = _28.sent();
|
|
7083
7111
|
e_15 = { error: e_15_1 };
|
|
7084
7112
|
return [3 /*break*/, 26];
|
|
7085
7113
|
case 25:
|
|
7086
7114
|
try {
|
|
7087
|
-
if (
|
|
7115
|
+
if (_22 && !_22.done && (_27 = _21.return)) _27.call(_21);
|
|
7088
7116
|
}
|
|
7089
7117
|
finally { if (e_15) throw e_15.error; }
|
|
7090
7118
|
return [7 /*endfinally*/];
|
|
7091
7119
|
case 26:
|
|
7092
|
-
|
|
7120
|
+
_20 = _19.next();
|
|
7093
7121
|
return [3 /*break*/, 18];
|
|
7094
7122
|
case 27: return [3 /*break*/, 30];
|
|
7095
7123
|
case 28:
|
|
7096
|
-
e_16_1 =
|
|
7124
|
+
e_16_1 = _28.sent();
|
|
7097
7125
|
e_16 = { error: e_16_1 };
|
|
7098
7126
|
return [3 /*break*/, 30];
|
|
7099
7127
|
case 29:
|
|
7100
7128
|
try {
|
|
7101
|
-
if (
|
|
7129
|
+
if (_20 && !_20.done && (_26 = _19.return)) _26.call(_19);
|
|
7102
7130
|
}
|
|
7103
7131
|
finally { if (e_16) throw e_16.error; }
|
|
7104
7132
|
return [7 /*endfinally*/];
|
|
7105
7133
|
case 30:
|
|
7106
|
-
|
|
7134
|
+
_18 = _17.next();
|
|
7107
7135
|
return [3 /*break*/, 16];
|
|
7108
7136
|
case 31: return [3 /*break*/, 34];
|
|
7109
7137
|
case 32:
|
|
7110
|
-
e_17_1 =
|
|
7138
|
+
e_17_1 = _28.sent();
|
|
7111
7139
|
e_17 = { error: e_17_1 };
|
|
7112
7140
|
return [3 /*break*/, 34];
|
|
7113
7141
|
case 33:
|
|
7114
7142
|
try {
|
|
7115
|
-
if (
|
|
7143
|
+
if (_18 && !_18.done && (_25 = _17.return)) _25.call(_17);
|
|
7116
7144
|
}
|
|
7117
7145
|
finally { if (e_17) throw e_17.error; }
|
|
7118
7146
|
return [7 /*endfinally*/];
|
|
@@ -7137,9 +7165,9 @@
|
|
|
7137
7165
|
KwikIDFormViewComponent.prototype.handleFieldApiCall = function (field, api) {
|
|
7138
7166
|
return __awaiter(this, void 0, void 0, function () {
|
|
7139
7167
|
var apis;
|
|
7140
|
-
var
|
|
7141
|
-
return __generator(this, function (
|
|
7142
|
-
switch (
|
|
7168
|
+
var _13, _14;
|
|
7169
|
+
return __generator(this, function (_15) {
|
|
7170
|
+
switch (_15.label) {
|
|
7143
7171
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
7144
7172
|
FIELD_CONFIG: field,
|
|
7145
7173
|
API_CONFIG: api,
|
|
@@ -7152,13 +7180,13 @@
|
|
|
7152
7180
|
EXTRA_DATA: this.extraData
|
|
7153
7181
|
})];
|
|
7154
7182
|
case 1:
|
|
7155
|
-
api =
|
|
7183
|
+
api = _15.sent();
|
|
7156
7184
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
7157
7185
|
if (kwikidToolkit.checkObjectKeyExists(field.api, "request")) {
|
|
7158
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
7159
|
-
this.formGroup.patchValue((
|
|
7160
|
-
|
|
7161
|
-
|
|
7186
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_13 = {}, _13[field.key] = api.response.value, _13));
|
|
7187
|
+
this.formGroup.patchValue((_14 = {},
|
|
7188
|
+
_14[field.key] = api.response.value,
|
|
7189
|
+
_14), { emitEvent: false });
|
|
7162
7190
|
}
|
|
7163
7191
|
apis = new Apis({
|
|
7164
7192
|
FIELD_CONFIG: field,
|
|
@@ -7174,14 +7202,14 @@
|
|
|
7174
7202
|
}, this.takeAction.bind(this));
|
|
7175
7203
|
return [4 /*yield*/, apis.validateResponse()];
|
|
7176
7204
|
case 2:
|
|
7177
|
-
api =
|
|
7205
|
+
api = _15.sent();
|
|
7178
7206
|
return [3 /*break*/, 4];
|
|
7179
7207
|
case 3:
|
|
7180
7208
|
setTimeout(function () {
|
|
7181
7209
|
field.api.status.value = EApiStatusType.FAILED;
|
|
7182
7210
|
field.showLoader = false;
|
|
7183
7211
|
}, FORM_VIEW_TIMERS.TIMER_500);
|
|
7184
|
-
|
|
7212
|
+
_15.label = 4;
|
|
7185
7213
|
case 4: return [2 /*return*/, { field: field, api: api }];
|
|
7186
7214
|
}
|
|
7187
7215
|
});
|
|
@@ -7190,8 +7218,8 @@
|
|
|
7190
7218
|
KwikIDFormViewComponent.prototype.handleApiCall = function (api) {
|
|
7191
7219
|
return __awaiter(this, void 0, void 0, function () {
|
|
7192
7220
|
var apis;
|
|
7193
|
-
return __generator(this, function (
|
|
7194
|
-
switch (
|
|
7221
|
+
return __generator(this, function (_13) {
|
|
7222
|
+
switch (_13.label) {
|
|
7195
7223
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
7196
7224
|
FORM_CONFIG: this.formConfig,
|
|
7197
7225
|
API_CONFIG: api,
|
|
@@ -7204,7 +7232,7 @@
|
|
|
7204
7232
|
EXTRA_DATA: this.extraData
|
|
7205
7233
|
})];
|
|
7206
7234
|
case 1:
|
|
7207
|
-
api =
|
|
7235
|
+
api = _13.sent();
|
|
7208
7236
|
apis = new Apis({
|
|
7209
7237
|
FORM_CONFIG: this.formConfig,
|
|
7210
7238
|
API_CONFIG: api,
|
|
@@ -7219,36 +7247,36 @@
|
|
|
7219
7247
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
7220
7248
|
return [4 /*yield*/, apis.validateResponse()];
|
|
7221
7249
|
case 2:
|
|
7222
|
-
api =
|
|
7223
|
-
|
|
7250
|
+
api = _13.sent();
|
|
7251
|
+
_13.label = 3;
|
|
7224
7252
|
case 3: return [2 /*return*/, { api: api }];
|
|
7225
7253
|
}
|
|
7226
7254
|
});
|
|
7227
7255
|
});
|
|
7228
7256
|
};
|
|
7229
7257
|
KwikIDFormViewComponent.prototype.executeApiCall = function (api, object) {
|
|
7230
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10
|
|
7258
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
|
|
7231
7259
|
return __awaiter(this, void 0, void 0, function () {
|
|
7232
|
-
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers, isDecryptResponse, isVerifySignature, executedApiCall,
|
|
7233
|
-
return __generator(this, function (
|
|
7234
|
-
switch (
|
|
7260
|
+
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers, isDecryptResponse, isVerifySignature, executedApiCall, _11_1, body, isEncryptRequestBody, isDecryptResponse, isVerifySignature, executedApiCall, _12_1;
|
|
7261
|
+
return __generator(this, function (_13) {
|
|
7262
|
+
switch (_13.label) {
|
|
7235
7263
|
case 0:
|
|
7236
7264
|
apis = new Apis(object, this.takeAction.bind(this));
|
|
7237
7265
|
return [4 /*yield*/, apis.setUrl()];
|
|
7238
7266
|
case 1:
|
|
7239
|
-
api =
|
|
7267
|
+
api = _13.sent();
|
|
7240
7268
|
return [4 /*yield*/, apis.setRequestHeaders()];
|
|
7241
7269
|
case 2:
|
|
7242
|
-
api =
|
|
7270
|
+
api = _13.sent();
|
|
7243
7271
|
return [4 /*yield*/, apis.validateRequestHeaders()];
|
|
7244
7272
|
case 3:
|
|
7245
|
-
api =
|
|
7273
|
+
api = _13.sent();
|
|
7246
7274
|
return [4 /*yield*/, apis.setRequestBody()];
|
|
7247
7275
|
case 4:
|
|
7248
|
-
api =
|
|
7276
|
+
api = _13.sent();
|
|
7249
7277
|
return [4 /*yield*/, apis.validateRequestBody()];
|
|
7250
7278
|
case 5:
|
|
7251
|
-
api =
|
|
7279
|
+
api = _13.sent();
|
|
7252
7280
|
apiCallResponse = {};
|
|
7253
7281
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 17];
|
|
7254
7282
|
if (!(kwikidToolkit.checkObjectKeyExists(api.request.url, "type") &&
|
|
@@ -7259,7 +7287,7 @@
|
|
|
7259
7287
|
}, FORM_VIEW_TIMERS.WAIT_FOR_API_MOCK_DATA); // 1000 ms = 1 sec
|
|
7260
7288
|
})];
|
|
7261
7289
|
case 6:
|
|
7262
|
-
apiCallResponse =
|
|
7290
|
+
apiCallResponse = _13.sent();
|
|
7263
7291
|
apiCallResponseStatusCode =
|
|
7264
7292
|
(_b = (_a = api.request.url.props) === null || _a === void 0 ? void 0 : _a.statusCode) !== null && _b !== void 0 ? _b : FORM_VIEW_TIMERS.API_MOCK_SUCCESS_STATUS_CODE; // Default Status Code for Mocked APIs
|
|
7265
7293
|
return [3 /*break*/, 16];
|
|
@@ -7273,21 +7301,21 @@
|
|
|
7273
7301
|
form_api_method: method,
|
|
7274
7302
|
form_api_key: (_g = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _g !== void 0 ? _g : ""
|
|
7275
7303
|
});
|
|
7276
|
-
|
|
7304
|
+
_13.label = 8;
|
|
7277
7305
|
case 8:
|
|
7278
|
-
|
|
7306
|
+
_13.trys.push([8, 10, , 11]);
|
|
7279
7307
|
isDecryptResponse = (_j = (_h = api === null || api === void 0 ? void 0 : api.response) === null || _h === void 0 ? void 0 : _h.isSecure) !== null && _j !== void 0 ? _j : false;
|
|
7280
7308
|
isVerifySignature = (_l = (_k = api === null || api === void 0 ? void 0 : api.response) === null || _k === void 0 ? void 0 : _k.isVerifySignature) !== null && _l !== void 0 ? _l : false;
|
|
7281
7309
|
return [4 /*yield*/, this.formViewApiService.executeApiCall(url, "GET", {}, // No request body for GET method
|
|
7282
7310
|
headers, false, // isEncryptRequestBody is not applicable for GET method
|
|
7283
7311
|
isDecryptResponse, isVerifySignature)];
|
|
7284
7312
|
case 9:
|
|
7285
|
-
executedApiCall =
|
|
7313
|
+
executedApiCall = _13.sent();
|
|
7286
7314
|
apiCallResponse = executedApiCall.data;
|
|
7287
7315
|
apiCallResponseStatusCode = executedApiCall.status;
|
|
7288
7316
|
return [3 /*break*/, 11];
|
|
7289
7317
|
case 10:
|
|
7290
|
-
|
|
7318
|
+
_11_1 = _13.sent();
|
|
7291
7319
|
// Handle any errors
|
|
7292
7320
|
apiCallResponse = {};
|
|
7293
7321
|
apiCallResponseStatusCode =
|
|
@@ -7303,17 +7331,17 @@
|
|
|
7303
7331
|
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, Object.assign({ form_api_method: method, form_api_key: (_x = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _x !== void 0 ? _x : "", form_api_request_encrypted: isEncryptRequestBody }, (!isEncryptRequestBody && {
|
|
7304
7332
|
form_api_request_body: body
|
|
7305
7333
|
})));
|
|
7306
|
-
|
|
7334
|
+
_13.label = 13;
|
|
7307
7335
|
case 13:
|
|
7308
|
-
|
|
7336
|
+
_13.trys.push([13, 15, , 16]);
|
|
7309
7337
|
return [4 /*yield*/, this.formViewApiService.executeApiCall(url, "POST", body, headers, isEncryptRequestBody, isDecryptResponse, isVerifySignature)];
|
|
7310
7338
|
case 14:
|
|
7311
|
-
executedApiCall =
|
|
7339
|
+
executedApiCall = _13.sent();
|
|
7312
7340
|
apiCallResponse = executedApiCall.data;
|
|
7313
7341
|
apiCallResponseStatusCode = executedApiCall.status;
|
|
7314
7342
|
return [3 /*break*/, 16];
|
|
7315
7343
|
case 15:
|
|
7316
|
-
|
|
7344
|
+
_12_1 = _13.sent();
|
|
7317
7345
|
// Handle any errors
|
|
7318
7346
|
apiCallResponse = {};
|
|
7319
7347
|
apiCallResponseStatusCode =
|
|
@@ -7322,15 +7350,15 @@
|
|
|
7322
7350
|
case 16:
|
|
7323
7351
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "value", apiCallResponse);
|
|
7324
7352
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "status", apiCallResponseStatusCode);
|
|
7325
|
-
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE, Object.assign(Object.assign({ form_api_key: (_y = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _y !== void 0 ? _y : "", form_api_response_encrypted: (_0 = (_z = api === null || api === void 0 ? void 0 : api.response) === null || _z === void 0 ? void 0 : _z.isSecure) !== null && _0 !== void 0 ? _0 : false }, (
|
|
7353
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE, Object.assign(Object.assign({ form_api_key: (_y = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _y !== void 0 ? _y : "", form_api_response_encrypted: (_0 = (_z = api === null || api === void 0 ? void 0 : api.response) === null || _z === void 0 ? void 0 : _z.isSecure) !== null && _0 !== void 0 ? _0 : false }, (!((_1 = api === null || api === void 0 ? void 0 : api.response) === null || _1 === void 0 ? void 0 : _1.isSecure) && {
|
|
7326
7354
|
form_api_response_body: apiCallResponse !== null && apiCallResponse !== void 0 ? apiCallResponse : {}
|
|
7327
7355
|
})), { form_api_status_code: apiCallResponseStatusCode }));
|
|
7328
7356
|
return [3 /*break*/, 18];
|
|
7329
7357
|
case 17:
|
|
7330
|
-
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_INVALID, Object.assign({ form_api_key: (
|
|
7331
|
-
form_api_request_body: (
|
|
7358
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_INVALID, Object.assign({ form_api_key: (_2 = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _2 !== void 0 ? _2 : "", form_api_request_encrypted: (_5 = (_4 = (_3 = api === null || api === void 0 ? void 0 : api.request) === null || _3 === void 0 ? void 0 : _3.body) === null || _4 === void 0 ? void 0 : _4.isSecure) !== null && _5 !== void 0 ? _5 : false }, (!((_7 = (_6 = api === null || api === void 0 ? void 0 : api.request) === null || _6 === void 0 ? void 0 : _6.body) === null || _7 === void 0 ? void 0 : _7.isSecure) && {
|
|
7359
|
+
form_api_request_body: (_10 = (_9 = (_8 = api === null || api === void 0 ? void 0 : api.request) === null || _8 === void 0 ? void 0 : _8.body) === null || _9 === void 0 ? void 0 : _9.value) !== null && _10 !== void 0 ? _10 : {}
|
|
7332
7360
|
})));
|
|
7333
|
-
|
|
7361
|
+
_13.label = 18;
|
|
7334
7362
|
case 18: return [2 /*return*/, api];
|
|
7335
7363
|
}
|
|
7336
7364
|
});
|
|
@@ -7368,8 +7396,8 @@
|
|
|
7368
7396
|
KwikIDFormViewComponent.prototype.handleOnClickApiCall = function (e) {
|
|
7369
7397
|
return __awaiter(this, void 0, void 0, function () {
|
|
7370
7398
|
var field, apis;
|
|
7371
|
-
return __generator(this, function (
|
|
7372
|
-
switch (
|
|
7399
|
+
return __generator(this, function (_13) {
|
|
7400
|
+
switch (_13.label) {
|
|
7373
7401
|
case 0:
|
|
7374
7402
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
7375
7403
|
if (!(field.type === EFieldType.API)) return [3 /*break*/, 5];
|
|
@@ -7384,7 +7412,7 @@
|
|
|
7384
7412
|
if (!kwikidToolkit.checkObjectKeyExists(field.api, "request")) return [3 /*break*/, 2];
|
|
7385
7413
|
return [4 /*yield*/, this.handleFieldApiCall(field, field.api)];
|
|
7386
7414
|
case 1:
|
|
7387
|
-
|
|
7415
|
+
_13.sent();
|
|
7388
7416
|
return [3 /*break*/, 4];
|
|
7389
7417
|
case 2:
|
|
7390
7418
|
apis = new Apis({
|
|
@@ -7400,11 +7428,11 @@
|
|
|
7400
7428
|
}, this.takeAction.bind(this));
|
|
7401
7429
|
return [4 /*yield*/, apis.callNextApi(field.api.entrypoint)];
|
|
7402
7430
|
case 3:
|
|
7403
|
-
|
|
7404
|
-
|
|
7431
|
+
_13.sent();
|
|
7432
|
+
_13.label = 4;
|
|
7405
7433
|
case 4:
|
|
7406
7434
|
this.hideApiLoader();
|
|
7407
|
-
|
|
7435
|
+
_13.label = 5;
|
|
7408
7436
|
case 5: return [2 /*return*/];
|
|
7409
7437
|
}
|
|
7410
7438
|
});
|
|
@@ -7450,11 +7478,11 @@
|
|
|
7450
7478
|
};
|
|
7451
7479
|
KwikIDFormViewComponent.prototype.handleOnClickSaveForm = function (e) {
|
|
7452
7480
|
return __awaiter(this, void 0, void 0, function () {
|
|
7453
|
-
var controls, firstFieldWithError, controls_1, controls_1_1, control, field,
|
|
7454
|
-
var e_20,
|
|
7481
|
+
var controls, firstFieldWithError, controls_1, controls_1_1, control, field, _13, _14, field, ruleEngine, e_18_1, formData, _15, _16, field, extendedFormData, _17, _18, postTask, task, e_19_1;
|
|
7482
|
+
var e_20, _19, e_18, _20, e_21, _21, e_19, _22;
|
|
7455
7483
|
var _this = this;
|
|
7456
|
-
return __generator(this, function (
|
|
7457
|
-
switch (
|
|
7484
|
+
return __generator(this, function (_23) {
|
|
7485
|
+
switch (_23.label) {
|
|
7458
7486
|
case 0:
|
|
7459
7487
|
if (e) {
|
|
7460
7488
|
this.triggerLogs(ELogEventType$1.FORM__SAVE_BUTTON_CLICK, {});
|
|
@@ -7484,7 +7512,7 @@
|
|
|
7484
7512
|
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
7485
7513
|
finally {
|
|
7486
7514
|
try {
|
|
7487
|
-
if (controls_1_1 && !controls_1_1.done && (
|
|
7515
|
+
if (controls_1_1 && !controls_1_1.done && (_19 = controls_1.return)) _19.call(controls_1);
|
|
7488
7516
|
}
|
|
7489
7517
|
finally { if (e_20) throw e_20.error; }
|
|
7490
7518
|
}
|
|
@@ -7496,14 +7524,14 @@
|
|
|
7496
7524
|
// }, 3000);
|
|
7497
7525
|
return [2 /*return*/];
|
|
7498
7526
|
}
|
|
7499
|
-
|
|
7527
|
+
_23.label = 1;
|
|
7500
7528
|
case 1:
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7529
|
+
_23.trys.push([1, 6, 7, 8]);
|
|
7530
|
+
_13 = __values(this.formFields), _14 = _13.next();
|
|
7531
|
+
_23.label = 2;
|
|
7504
7532
|
case 2:
|
|
7505
|
-
if (!!
|
|
7506
|
-
field =
|
|
7533
|
+
if (!!_14.done) return [3 /*break*/, 5];
|
|
7534
|
+
field = _14.value;
|
|
7507
7535
|
if (!(field.isFormElement &&
|
|
7508
7536
|
!field.hidden &&
|
|
7509
7537
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -7520,7 +7548,7 @@
|
|
|
7520
7548
|
}, this.takeAction.bind(this));
|
|
7521
7549
|
return [4 /*yield*/, ruleEngine.run(field.validation)];
|
|
7522
7550
|
case 3:
|
|
7523
|
-
|
|
7551
|
+
_23.sent();
|
|
7524
7552
|
if (!field.validation.is_valid) {
|
|
7525
7553
|
this.toggleErrorNotification(true);
|
|
7526
7554
|
setTimeout(function () {
|
|
@@ -7528,26 +7556,26 @@
|
|
|
7528
7556
|
}, FORM_VIEW_TIMERS.INVALID_FIELDS_SAVE_FORM_ERROR_TOGGLE);
|
|
7529
7557
|
return [2 /*return*/];
|
|
7530
7558
|
}
|
|
7531
|
-
|
|
7559
|
+
_23.label = 4;
|
|
7532
7560
|
case 4:
|
|
7533
|
-
|
|
7561
|
+
_14 = _13.next();
|
|
7534
7562
|
return [3 /*break*/, 2];
|
|
7535
7563
|
case 5: return [3 /*break*/, 8];
|
|
7536
7564
|
case 6:
|
|
7537
|
-
e_18_1 =
|
|
7565
|
+
e_18_1 = _23.sent();
|
|
7538
7566
|
e_18 = { error: e_18_1 };
|
|
7539
7567
|
return [3 /*break*/, 8];
|
|
7540
7568
|
case 7:
|
|
7541
7569
|
try {
|
|
7542
|
-
if (
|
|
7570
|
+
if (_14 && !_14.done && (_20 = _13.return)) _20.call(_13);
|
|
7543
7571
|
}
|
|
7544
7572
|
finally { if (e_18) throw e_18.error; }
|
|
7545
7573
|
return [7 /*endfinally*/];
|
|
7546
7574
|
case 8:
|
|
7547
7575
|
formData = this.formGroup.getRawValue();
|
|
7548
7576
|
try {
|
|
7549
|
-
for (
|
|
7550
|
-
field =
|
|
7577
|
+
for (_15 = __values(this.formFields), _16 = _15.next(); !_16.done; _16 = _15.next()) {
|
|
7578
|
+
field = _16.value;
|
|
7551
7579
|
if (field.isFormElement) {
|
|
7552
7580
|
if (field.hidden) {
|
|
7553
7581
|
delete formData[field.key];
|
|
@@ -7561,22 +7589,22 @@
|
|
|
7561
7589
|
catch (e_21_1) { e_21 = { error: e_21_1 }; }
|
|
7562
7590
|
finally {
|
|
7563
7591
|
try {
|
|
7564
|
-
if (
|
|
7592
|
+
if (_16 && !_16.done && (_21 = _15.return)) _21.call(_15);
|
|
7565
7593
|
}
|
|
7566
7594
|
finally { if (e_21) throw e_21.error; }
|
|
7567
7595
|
}
|
|
7568
7596
|
extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
7569
|
-
var
|
|
7597
|
+
var _13;
|
|
7570
7598
|
if (field.isFormElement && !field.hidden) {
|
|
7571
|
-
var fieldData = (
|
|
7572
|
-
|
|
7599
|
+
var fieldData = (_13 = {},
|
|
7600
|
+
_13[field.key] = {
|
|
7573
7601
|
key: field.key,
|
|
7574
7602
|
label: field.label,
|
|
7575
7603
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
7576
7604
|
type: field.type,
|
|
7577
7605
|
index: index
|
|
7578
7606
|
},
|
|
7579
|
-
|
|
7607
|
+
_13);
|
|
7580
7608
|
result[field.key] = fieldData[field.key];
|
|
7581
7609
|
}
|
|
7582
7610
|
return result;
|
|
@@ -7590,14 +7618,14 @@
|
|
|
7590
7618
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
7591
7619
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "post"))) return [3 /*break*/, 18];
|
|
7592
7620
|
this.triggerLogs(ELogEventType$1.FORM__TASK_POST, {});
|
|
7593
|
-
|
|
7621
|
+
_23.label = 9;
|
|
7594
7622
|
case 9:
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7623
|
+
_23.trys.push([9, 15, 16, 17]);
|
|
7624
|
+
_17 = __values(this.formConfig.tasks.post), _18 = _17.next();
|
|
7625
|
+
_23.label = 10;
|
|
7598
7626
|
case 10:
|
|
7599
|
-
if (!!
|
|
7600
|
-
postTask =
|
|
7627
|
+
if (!!_18.done) return [3 /*break*/, 14];
|
|
7628
|
+
postTask = _18.value;
|
|
7601
7629
|
task = new Tasks(postTask, {
|
|
7602
7630
|
FORM_CONFIG: this.formConfig,
|
|
7603
7631
|
FORM_FIELDS: this.formFields,
|
|
@@ -7617,7 +7645,7 @@
|
|
|
7617
7645
|
}
|
|
7618
7646
|
return [4 /*yield*/, task.execute()];
|
|
7619
7647
|
case 11:
|
|
7620
|
-
|
|
7648
|
+
_23.sent();
|
|
7621
7649
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
7622
7650
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
7623
7651
|
var intervalId = setInterval(function () {
|
|
@@ -7629,22 +7657,22 @@
|
|
|
7629
7657
|
})];
|
|
7630
7658
|
case 12:
|
|
7631
7659
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
7632
|
-
|
|
7660
|
+
_23.sent();
|
|
7633
7661
|
if (this.stopTaskExecution) {
|
|
7634
7662
|
return [3 /*break*/, 14];
|
|
7635
7663
|
}
|
|
7636
|
-
|
|
7664
|
+
_23.label = 13;
|
|
7637
7665
|
case 13:
|
|
7638
|
-
|
|
7666
|
+
_18 = _17.next();
|
|
7639
7667
|
return [3 /*break*/, 10];
|
|
7640
7668
|
case 14: return [3 /*break*/, 17];
|
|
7641
7669
|
case 15:
|
|
7642
|
-
e_19_1 =
|
|
7670
|
+
e_19_1 = _23.sent();
|
|
7643
7671
|
e_19 = { error: e_19_1 };
|
|
7644
7672
|
return [3 /*break*/, 17];
|
|
7645
7673
|
case 16:
|
|
7646
7674
|
try {
|
|
7647
|
-
if (
|
|
7675
|
+
if (_18 && !_18.done && (_22 = _17.return)) _22.call(_17);
|
|
7648
7676
|
}
|
|
7649
7677
|
finally { if (e_19) throw e_19.error; }
|
|
7650
7678
|
return [7 /*endfinally*/];
|
|
@@ -7666,7 +7694,7 @@
|
|
|
7666
7694
|
data: kwikidToolkit.mergeObjects(formData, this.popupFormData, this.taskData),
|
|
7667
7695
|
extendedData: extendedFormData
|
|
7668
7696
|
});
|
|
7669
|
-
|
|
7697
|
+
_23.label = 19;
|
|
7670
7698
|
case 19: return [2 /*return*/];
|
|
7671
7699
|
}
|
|
7672
7700
|
});
|
|
@@ -7674,7 +7702,7 @@
|
|
|
7674
7702
|
};
|
|
7675
7703
|
KwikIDFormViewComponent.prototype.handleOnApiTimerStop = function (e) {
|
|
7676
7704
|
return __awaiter(this, void 0, void 0, function () {
|
|
7677
|
-
return __generator(this, function (
|
|
7705
|
+
return __generator(this, function (_13) {
|
|
7678
7706
|
this.fieldApiTimerMessageHide(e.key);
|
|
7679
7707
|
return [2 /*return*/];
|
|
7680
7708
|
});
|
|
@@ -7710,17 +7738,17 @@
|
|
|
7710
7738
|
});
|
|
7711
7739
|
};
|
|
7712
7740
|
KwikIDFormViewComponent.prototype.fieldGroupHide = function (fieldGroup) {
|
|
7713
|
-
var e_22,
|
|
7741
|
+
var e_22, _13;
|
|
7714
7742
|
try {
|
|
7715
|
-
for (var
|
|
7716
|
-
var fieldKey =
|
|
7743
|
+
for (var _14 = __values(this.fieldGroups[fieldGroup]), _15 = _14.next(); !_15.done; _15 = _14.next()) {
|
|
7744
|
+
var fieldKey = _15.value;
|
|
7717
7745
|
this.fieldHide(fieldKey);
|
|
7718
7746
|
}
|
|
7719
7747
|
}
|
|
7720
7748
|
catch (e_22_1) { e_22 = { error: e_22_1 }; }
|
|
7721
7749
|
finally {
|
|
7722
7750
|
try {
|
|
7723
|
-
if (
|
|
7751
|
+
if (_15 && !_15.done && (_13 = _14.return)) _13.call(_14);
|
|
7724
7752
|
}
|
|
7725
7753
|
finally { if (e_22) throw e_22.error; }
|
|
7726
7754
|
}
|
|
@@ -7738,17 +7766,17 @@
|
|
|
7738
7766
|
});
|
|
7739
7767
|
};
|
|
7740
7768
|
KwikIDFormViewComponent.prototype.fieldGroupShow = function (fieldGroup) {
|
|
7741
|
-
var e_23,
|
|
7769
|
+
var e_23, _13;
|
|
7742
7770
|
try {
|
|
7743
|
-
for (var
|
|
7744
|
-
var fieldKey =
|
|
7771
|
+
for (var _14 = __values(this.fieldGroups[fieldGroup]), _15 = _14.next(); !_15.done; _15 = _14.next()) {
|
|
7772
|
+
var fieldKey = _15.value;
|
|
7745
7773
|
this.fieldShow(fieldKey);
|
|
7746
7774
|
}
|
|
7747
7775
|
}
|
|
7748
7776
|
catch (e_23_1) { e_23 = { error: e_23_1 }; }
|
|
7749
7777
|
finally {
|
|
7750
7778
|
try {
|
|
7751
|
-
if (
|
|
7779
|
+
if (_15 && !_15.done && (_13 = _14.return)) _13.call(_14);
|
|
7752
7780
|
}
|
|
7753
7781
|
finally { if (e_23) throw e_23.error; }
|
|
7754
7782
|
}
|
|
@@ -7776,17 +7804,17 @@
|
|
|
7776
7804
|
});
|
|
7777
7805
|
};
|
|
7778
7806
|
KwikIDFormViewComponent.prototype.fieldGroupDisable = function (fieldGroup) {
|
|
7779
|
-
var e_24,
|
|
7807
|
+
var e_24, _13;
|
|
7780
7808
|
try {
|
|
7781
|
-
for (var
|
|
7782
|
-
var fieldKey =
|
|
7809
|
+
for (var _14 = __values(this.fieldGroups[fieldGroup]), _15 = _14.next(); !_15.done; _15 = _14.next()) {
|
|
7810
|
+
var fieldKey = _15.value;
|
|
7783
7811
|
this.fieldDisable(fieldKey);
|
|
7784
7812
|
}
|
|
7785
7813
|
}
|
|
7786
7814
|
catch (e_24_1) { e_24 = { error: e_24_1 }; }
|
|
7787
7815
|
finally {
|
|
7788
7816
|
try {
|
|
7789
|
-
if (
|
|
7817
|
+
if (_15 && !_15.done && (_13 = _14.return)) _13.call(_14);
|
|
7790
7818
|
}
|
|
7791
7819
|
finally { if (e_24) throw e_24.error; }
|
|
7792
7820
|
}
|
|
@@ -7814,23 +7842,23 @@
|
|
|
7814
7842
|
});
|
|
7815
7843
|
};
|
|
7816
7844
|
KwikIDFormViewComponent.prototype.fieldGroupEnable = function (fieldGroup) {
|
|
7817
|
-
var e_25,
|
|
7845
|
+
var e_25, _13;
|
|
7818
7846
|
try {
|
|
7819
|
-
for (var
|
|
7820
|
-
var fieldKey =
|
|
7847
|
+
for (var _14 = __values(this.fieldGroups[fieldGroup]), _15 = _14.next(); !_15.done; _15 = _14.next()) {
|
|
7848
|
+
var fieldKey = _15.value;
|
|
7821
7849
|
this.fieldEnable(fieldKey);
|
|
7822
7850
|
}
|
|
7823
7851
|
}
|
|
7824
7852
|
catch (e_25_1) { e_25 = { error: e_25_1 }; }
|
|
7825
7853
|
finally {
|
|
7826
7854
|
try {
|
|
7827
|
-
if (
|
|
7855
|
+
if (_15 && !_15.done && (_13 = _14.return)) _13.call(_14);
|
|
7828
7856
|
}
|
|
7829
7857
|
finally { if (e_25) throw e_25.error; }
|
|
7830
7858
|
}
|
|
7831
7859
|
};
|
|
7832
7860
|
KwikIDFormViewComponent.prototype.fieldReset = function (fieldKey) {
|
|
7833
|
-
var
|
|
7861
|
+
var _13;
|
|
7834
7862
|
// Find the field and its index in the formFields array
|
|
7835
7863
|
var field = getFormFieldByKey(this.formFields, fieldKey);
|
|
7836
7864
|
var fieldIndex = getFormFieldIndexByKey(this.formFields, fieldKey);
|
|
@@ -7841,9 +7869,9 @@
|
|
|
7841
7869
|
emitEvent: false,
|
|
7842
7870
|
onlySelf: true
|
|
7843
7871
|
});
|
|
7844
|
-
this.formGroup.patchValue((
|
|
7845
|
-
|
|
7846
|
-
|
|
7872
|
+
this.formGroup.patchValue((_13 = {},
|
|
7873
|
+
_13[field.key] = resetValue,
|
|
7874
|
+
_13), { emitEvent: false });
|
|
7847
7875
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
7848
7876
|
emitEvent: true
|
|
7849
7877
|
});
|
|
@@ -7887,17 +7915,17 @@
|
|
|
7887
7915
|
});
|
|
7888
7916
|
};
|
|
7889
7917
|
KwikIDFormViewComponent.prototype.fieldGroupReset = function (fieldGroup) {
|
|
7890
|
-
var e_26,
|
|
7918
|
+
var e_26, _13;
|
|
7891
7919
|
try {
|
|
7892
|
-
for (var
|
|
7893
|
-
var fieldKey =
|
|
7920
|
+
for (var _14 = __values(this.fieldGroups[fieldGroup]), _15 = _14.next(); !_15.done; _15 = _14.next()) {
|
|
7921
|
+
var fieldKey = _15.value;
|
|
7894
7922
|
this.fieldReset(fieldKey);
|
|
7895
7923
|
}
|
|
7896
7924
|
}
|
|
7897
7925
|
catch (e_26_1) { e_26 = { error: e_26_1 }; }
|
|
7898
7926
|
finally {
|
|
7899
7927
|
try {
|
|
7900
|
-
if (
|
|
7928
|
+
if (_15 && !_15.done && (_13 = _14.return)) _13.call(_14);
|
|
7901
7929
|
}
|
|
7902
7930
|
finally { if (e_26) throw e_26.error; }
|
|
7903
7931
|
}
|
|
@@ -8015,7 +8043,7 @@
|
|
|
8015
8043
|
KwikIDFormViewComponent.prototype.fieldApiTimerMessageShow = function (fieldKey, timer) {
|
|
8016
8044
|
return __awaiter(this, void 0, void 0, function () {
|
|
8017
8045
|
var field, fieldIndex;
|
|
8018
|
-
return __generator(this, function (
|
|
8046
|
+
return __generator(this, function (_13) {
|
|
8019
8047
|
field = getFormFieldByKey(this.formFields, fieldKey);
|
|
8020
8048
|
fieldIndex = this.formFields.findIndex(function (_) {
|
|
8021
8049
|
return field.key === _.key;
|
|
@@ -8036,7 +8064,7 @@
|
|
|
8036
8064
|
return __awaiter(this, void 0, void 0, function () {
|
|
8037
8065
|
var field, fieldIndex, ruleEngine_10;
|
|
8038
8066
|
var _this = this;
|
|
8039
|
-
return __generator(this, function (
|
|
8067
|
+
return __generator(this, function (_13) {
|
|
8040
8068
|
field = getFormFieldByKey(this.formFields, fieldKey);
|
|
8041
8069
|
fieldIndex = this.formFields.findIndex(function (_) {
|
|
8042
8070
|
return field.key === _.key;
|
|
@@ -8056,11 +8084,11 @@
|
|
|
8056
8084
|
EXTRA_DATA: this.extraData
|
|
8057
8085
|
}, this.takeAction.bind(this));
|
|
8058
8086
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
8059
|
-
return __generator(this, function (
|
|
8060
|
-
switch (
|
|
8087
|
+
return __generator(this, function (_13) {
|
|
8088
|
+
switch (_13.label) {
|
|
8061
8089
|
case 0: return [4 /*yield*/, ruleEngine_10.run(field.validation)];
|
|
8062
8090
|
case 1:
|
|
8063
|
-
|
|
8091
|
+
_13.sent();
|
|
8064
8092
|
return [2 /*return*/];
|
|
8065
8093
|
}
|
|
8066
8094
|
});
|
|
@@ -8082,16 +8110,42 @@
|
|
|
8082
8110
|
});
|
|
8083
8111
|
});
|
|
8084
8112
|
};
|
|
8113
|
+
KwikIDFormViewComponent.prototype.removeKeyFromObjectPath = function (action, object) {
|
|
8114
|
+
var _a, _b, _c, _d;
|
|
8115
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8116
|
+
var source, sourceValue, objectKey, objectPath;
|
|
8117
|
+
return __generator(this, function (_13) {
|
|
8118
|
+
source = new kwikidToolkit.Source(object);
|
|
8119
|
+
sourceValue = action.props.source;
|
|
8120
|
+
objectKey = (_b = (_a = sourceValue === null || sourceValue === void 0 ? void 0 : sourceValue.props) === null || _a === void 0 ? void 0 : _a.object) === null || _b === void 0 ? void 0 : _b.key;
|
|
8121
|
+
objectPath = (_d = (_c = sourceValue === null || sourceValue === void 0 ? void 0 : sourceValue.props) === null || _c === void 0 ? void 0 : _c.object) === null || _d === void 0 ? void 0 : _d.path;
|
|
8122
|
+
if (sourceValue.key === kwikidToolkit.ESourceKey.OBJECT &&
|
|
8123
|
+
kwikidToolkit.isNotEmptyString(objectKey) &&
|
|
8124
|
+
kwikidToolkit.isNotEmptyString(objectPath)) {
|
|
8125
|
+
if (kwikidToolkit.checkObjectKeyExists(source._object, objectKey)) {
|
|
8126
|
+
source._object[objectKey] = kwikidToolkit.removeKeyFromObjectPath(source._object[objectKey], objectPath);
|
|
8127
|
+
}
|
|
8128
|
+
}
|
|
8129
|
+
object.FIELD_CONFIG = source._object.FIELD_CONFIG;
|
|
8130
|
+
this.formData = source._object.FORM_DATA;
|
|
8131
|
+
this.patchFormGroup(this.formData);
|
|
8132
|
+
this.allFormsData = source._object.ALL_FORMS_DATA;
|
|
8133
|
+
this.previousFormData = source._object.PREVIOUS_FORM_DATA;
|
|
8134
|
+
this.extraData = source._object.EXTRA_DATA;
|
|
8135
|
+
return [2 /*return*/];
|
|
8136
|
+
});
|
|
8137
|
+
});
|
|
8138
|
+
};
|
|
8085
8139
|
KwikIDFormViewComponent.prototype.setValue = function (action, object) {
|
|
8086
8140
|
return __awaiter(this, void 0, void 0, function () {
|
|
8087
8141
|
var source, sourceValue;
|
|
8088
|
-
return __generator(this, function (
|
|
8089
|
-
switch (
|
|
8142
|
+
return __generator(this, function (_13) {
|
|
8143
|
+
switch (_13.label) {
|
|
8090
8144
|
case 0:
|
|
8091
8145
|
source = new kwikidToolkit.Source(object);
|
|
8092
8146
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
8093
8147
|
case 1:
|
|
8094
|
-
sourceValue =
|
|
8148
|
+
sourceValue = _13.sent();
|
|
8095
8149
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
8096
8150
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
8097
8151
|
this.formData = source.object.FORM_DATA;
|
|
@@ -8107,13 +8161,13 @@
|
|
|
8107
8161
|
KwikIDFormViewComponent.prototype.setFieldDefaultValue = function (action, object) {
|
|
8108
8162
|
return __awaiter(this, void 0, void 0, function () {
|
|
8109
8163
|
var source, sourceValue;
|
|
8110
|
-
return __generator(this, function (
|
|
8111
|
-
switch (
|
|
8164
|
+
return __generator(this, function (_13) {
|
|
8165
|
+
switch (_13.label) {
|
|
8112
8166
|
case 0:
|
|
8113
8167
|
source = new kwikidToolkit.Source(object);
|
|
8114
8168
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
8115
8169
|
case 1:
|
|
8116
|
-
sourceValue =
|
|
8170
|
+
sourceValue = _13.sent();
|
|
8117
8171
|
source.setValueToSource({
|
|
8118
8172
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
8119
8173
|
props: {
|
|
@@ -8146,7 +8200,7 @@
|
|
|
8146
8200
|
KwikIDFormViewComponent.prototype.setApiStatus = function (action, object) {
|
|
8147
8201
|
return __awaiter(this, void 0, void 0, function () {
|
|
8148
8202
|
var source, sourceValue;
|
|
8149
|
-
return __generator(this, function (
|
|
8203
|
+
return __generator(this, function (_13) {
|
|
8150
8204
|
source = new kwikidToolkit.Source(object);
|
|
8151
8205
|
sourceValue = action.props.status;
|
|
8152
8206
|
source.setValueToSource({
|
|
@@ -8166,13 +8220,13 @@
|
|
|
8166
8220
|
KwikIDFormViewComponent.prototype.setApiHeaderValue = function (action, object) {
|
|
8167
8221
|
return __awaiter(this, void 0, void 0, function () {
|
|
8168
8222
|
var source, sourceValue;
|
|
8169
|
-
return __generator(this, function (
|
|
8170
|
-
switch (
|
|
8223
|
+
return __generator(this, function (_13) {
|
|
8224
|
+
switch (_13.label) {
|
|
8171
8225
|
case 0:
|
|
8172
8226
|
source = new kwikidToolkit.Source(object);
|
|
8173
8227
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
8174
8228
|
case 1:
|
|
8175
|
-
sourceValue =
|
|
8229
|
+
sourceValue = _13.sent();
|
|
8176
8230
|
source.setValueToSource({
|
|
8177
8231
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
8178
8232
|
props: {
|
|
@@ -8191,7 +8245,7 @@
|
|
|
8191
8245
|
KwikIDFormViewComponent.prototype.setApiHeaderValidity = function (action, object) {
|
|
8192
8246
|
return __awaiter(this, void 0, void 0, function () {
|
|
8193
8247
|
var source, sourceValue;
|
|
8194
|
-
return __generator(this, function (
|
|
8248
|
+
return __generator(this, function (_13) {
|
|
8195
8249
|
source = new kwikidToolkit.Source(object);
|
|
8196
8250
|
sourceValue = action.props.valid;
|
|
8197
8251
|
source.setValueToSource({
|
|
@@ -8211,13 +8265,13 @@
|
|
|
8211
8265
|
KwikIDFormViewComponent.prototype.setApiBodyValue = function (action, object) {
|
|
8212
8266
|
return __awaiter(this, void 0, void 0, function () {
|
|
8213
8267
|
var source, sourceValue;
|
|
8214
|
-
return __generator(this, function (
|
|
8215
|
-
switch (
|
|
8268
|
+
return __generator(this, function (_13) {
|
|
8269
|
+
switch (_13.label) {
|
|
8216
8270
|
case 0:
|
|
8217
8271
|
source = new kwikidToolkit.Source(object);
|
|
8218
8272
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
8219
8273
|
case 1:
|
|
8220
|
-
sourceValue =
|
|
8274
|
+
sourceValue = _13.sent();
|
|
8221
8275
|
source.setValueToSource({
|
|
8222
8276
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
8223
8277
|
props: {
|
|
@@ -8236,7 +8290,7 @@
|
|
|
8236
8290
|
KwikIDFormViewComponent.prototype.setApiBodyValidity = function (action, object) {
|
|
8237
8291
|
return __awaiter(this, void 0, void 0, function () {
|
|
8238
8292
|
var source, sourceValue;
|
|
8239
|
-
return __generator(this, function (
|
|
8293
|
+
return __generator(this, function (_13) {
|
|
8240
8294
|
source = new kwikidToolkit.Source(object);
|
|
8241
8295
|
sourceValue = action.props.valid;
|
|
8242
8296
|
source.setValueToSource({
|
|
@@ -8256,7 +8310,7 @@
|
|
|
8256
8310
|
KwikIDFormViewComponent.prototype.setFieldValidity = function (action, object) {
|
|
8257
8311
|
return __awaiter(this, void 0, void 0, function () {
|
|
8258
8312
|
var source, sourceValue;
|
|
8259
|
-
return __generator(this, function (
|
|
8313
|
+
return __generator(this, function (_13) {
|
|
8260
8314
|
source = new kwikidToolkit.Source(object);
|
|
8261
8315
|
sourceValue = action.props.valid;
|
|
8262
8316
|
source.setValueToSource({
|
|
@@ -8277,18 +8331,18 @@
|
|
|
8277
8331
|
KwikIDFormViewComponent.prototype.setDropdownOptions = function (action, object) {
|
|
8278
8332
|
return __awaiter(this, void 0, void 0, function () {
|
|
8279
8333
|
var source, sourceValue, appendToPath, appendToPathStr, optionsPath;
|
|
8280
|
-
return __generator(this, function (
|
|
8281
|
-
switch (
|
|
8334
|
+
return __generator(this, function (_13) {
|
|
8335
|
+
switch (_13.label) {
|
|
8282
8336
|
case 0:
|
|
8283
8337
|
source = new kwikidToolkit.Source(object);
|
|
8284
8338
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
8285
8339
|
case 1:
|
|
8286
|
-
sourceValue =
|
|
8340
|
+
sourceValue = _13.sent();
|
|
8287
8341
|
if (!kwikidToolkit.checkObjectKeyExists(action.props, "options")) return [3 /*break*/, 4];
|
|
8288
8342
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.options, "appendToPath")) return [3 /*break*/, 3];
|
|
8289
8343
|
return [4 /*yield*/, source.getValueFromSource(action.props.options.appendToPath.source)];
|
|
8290
8344
|
case 2:
|
|
8291
|
-
appendToPath =
|
|
8345
|
+
appendToPath = _13.sent();
|
|
8292
8346
|
if (kwikidToolkit.isNotEmptyValue(appendToPath)) {
|
|
8293
8347
|
appendToPathStr = kwikidToolkit.replaceString(appendToPath.match("" + action.props.options.appendToPath.filterSourceValue)[0], "[^a-zA-Z0-9_]", "_");
|
|
8294
8348
|
optionsPath = "" + action.props.options.path + appendToPathStr;
|
|
@@ -8297,7 +8351,7 @@
|
|
|
8297
8351
|
return [3 /*break*/, 4];
|
|
8298
8352
|
case 3:
|
|
8299
8353
|
sourceValue = kwikidToolkit.getObjectValueFromPath(sourceValue, action.props.options.path);
|
|
8300
|
-
|
|
8354
|
+
_13.label = 4;
|
|
8301
8355
|
case 4:
|
|
8302
8356
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
8303
8357
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
@@ -8313,19 +8367,19 @@
|
|
|
8313
8367
|
KwikIDFormViewComponent.prototype.apiCall = function (action, object) {
|
|
8314
8368
|
return __awaiter(this, void 0, void 0, function () {
|
|
8315
8369
|
var apiConfig, response;
|
|
8316
|
-
var
|
|
8317
|
-
return __generator(this, function (
|
|
8318
|
-
switch (
|
|
8370
|
+
var _13;
|
|
8371
|
+
return __generator(this, function (_14) {
|
|
8372
|
+
switch (_14.label) {
|
|
8319
8373
|
case 0:
|
|
8320
8374
|
apiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
8321
8375
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
8322
8376
|
case 1:
|
|
8323
|
-
response =
|
|
8377
|
+
response = _14.sent();
|
|
8324
8378
|
apiConfig = response.api;
|
|
8325
8379
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, apiConfig);
|
|
8326
|
-
this.formData = kwikidToolkit.mergeObjects(this.formData, (
|
|
8327
|
-
|
|
8328
|
-
|
|
8380
|
+
this.formData = kwikidToolkit.mergeObjects(this.formData, (_13 = {},
|
|
8381
|
+
_13[action.props.formApiKey] = apiConfig.response.value,
|
|
8382
|
+
_13));
|
|
8329
8383
|
return [2 /*return*/, apiConfig];
|
|
8330
8384
|
}
|
|
8331
8385
|
});
|
|
@@ -8334,13 +8388,13 @@
|
|
|
8334
8388
|
KwikIDFormViewComponent.prototype.fieldApiCall = function (action, object) {
|
|
8335
8389
|
return __awaiter(this, void 0, void 0, function () {
|
|
8336
8390
|
var apiConfig;
|
|
8337
|
-
return __generator(this, function (
|
|
8338
|
-
switch (
|
|
8391
|
+
return __generator(this, function (_13) {
|
|
8392
|
+
switch (_13.label) {
|
|
8339
8393
|
case 0:
|
|
8340
8394
|
this.showApiLoader();
|
|
8341
8395
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
8342
8396
|
case 1:
|
|
8343
|
-
apiConfig =
|
|
8397
|
+
apiConfig = _13.sent();
|
|
8344
8398
|
this.hideApiLoader();
|
|
8345
8399
|
return [2 /*return*/];
|
|
8346
8400
|
}
|
|
@@ -8350,8 +8404,8 @@
|
|
|
8350
8404
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCalls = function (action, object) {
|
|
8351
8405
|
return __awaiter(this, void 0, void 0, function () {
|
|
8352
8406
|
var entrypointApiKey, field, endpoints, nextApiIndex, apiConfig, response;
|
|
8353
|
-
return __generator(this, function (
|
|
8354
|
-
switch (
|
|
8407
|
+
return __generator(this, function (_13) {
|
|
8408
|
+
switch (_13.label) {
|
|
8355
8409
|
case 0:
|
|
8356
8410
|
entrypointApiKey = action.props.apiKey;
|
|
8357
8411
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
@@ -8360,7 +8414,7 @@
|
|
|
8360
8414
|
apiConfig = endpoints[nextApiIndex];
|
|
8361
8415
|
return [4 /*yield*/, this.handleFieldApiCall(field, apiConfig)];
|
|
8362
8416
|
case 1:
|
|
8363
|
-
response =
|
|
8417
|
+
response = _13.sent();
|
|
8364
8418
|
// eslint-disable-next-line prefer-destructuring
|
|
8365
8419
|
field = response.field;
|
|
8366
8420
|
field.api.endpoints[nextApiIndex] = response.api;
|
|
@@ -8372,15 +8426,16 @@
|
|
|
8372
8426
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCallsEnd = function (action, object) {
|
|
8373
8427
|
return __awaiter(this, void 0, void 0, function () {
|
|
8374
8428
|
var field, multipleApiCallResponses;
|
|
8375
|
-
var
|
|
8376
|
-
return __generator(this, function (
|
|
8429
|
+
var _13;
|
|
8430
|
+
return __generator(this, function (_14) {
|
|
8377
8431
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
8378
8432
|
multipleApiCallResponses = {};
|
|
8379
8433
|
field.api.endpoints.forEach(function (api) {
|
|
8380
|
-
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
8434
|
+
if (kwikidToolkit.checkObjectKeyExists(api.response, "value")) {
|
|
8381
8435
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
8436
|
+
}
|
|
8382
8437
|
});
|
|
8383
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
8438
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_13 = {}, _13[field.key] = multipleApiCallResponses, _13));
|
|
8384
8439
|
this.patchFormGroup(this.formData);
|
|
8385
8440
|
return [2 /*return*/];
|
|
8386
8441
|
});
|
|
@@ -8389,17 +8444,17 @@
|
|
|
8389
8444
|
KwikIDFormViewComponent.prototype.taskApiCall = function (action, object) {
|
|
8390
8445
|
return __awaiter(this, void 0, void 0, function () {
|
|
8391
8446
|
var apiConfig;
|
|
8392
|
-
var
|
|
8393
|
-
return __generator(this, function (
|
|
8394
|
-
switch (
|
|
8447
|
+
var _13;
|
|
8448
|
+
return __generator(this, function (_14) {
|
|
8449
|
+
switch (_14.label) {
|
|
8395
8450
|
case 0:
|
|
8396
8451
|
this.showApiLoader();
|
|
8397
8452
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
8398
8453
|
case 1:
|
|
8399
|
-
apiConfig =
|
|
8400
|
-
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (
|
|
8401
|
-
|
|
8402
|
-
|
|
8454
|
+
apiConfig = _14.sent();
|
|
8455
|
+
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (_13 = {},
|
|
8456
|
+
_13[action.props.formApiKey] = apiConfig.response.value,
|
|
8457
|
+
_13));
|
|
8403
8458
|
this.waitingForChanges = false;
|
|
8404
8459
|
this.hideApiLoader();
|
|
8405
8460
|
return [2 /*return*/];
|
|
@@ -8410,8 +8465,8 @@
|
|
|
8410
8465
|
KwikIDFormViewComponent.prototype.taskMultipleApiCalls = function (action, object) {
|
|
8411
8466
|
return __awaiter(this, void 0, void 0, function () {
|
|
8412
8467
|
var multipleApiConfig, entrypointApiKey_1, endpoints, nextApiIndex, apiConfig, response, apis;
|
|
8413
|
-
return __generator(this, function (
|
|
8414
|
-
switch (
|
|
8468
|
+
return __generator(this, function (_13) {
|
|
8469
|
+
switch (_13.label) {
|
|
8415
8470
|
case 0:
|
|
8416
8471
|
this.showApiLoader();
|
|
8417
8472
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
@@ -8422,7 +8477,7 @@
|
|
|
8422
8477
|
apiConfig = endpoints[nextApiIndex];
|
|
8423
8478
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
8424
8479
|
case 1:
|
|
8425
|
-
response =
|
|
8480
|
+
response = _13.sent();
|
|
8426
8481
|
multipleApiConfig.endpoints[nextApiIndex] = response.api;
|
|
8427
8482
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, multipleApiConfig);
|
|
8428
8483
|
this.hideApiLoader();
|
|
@@ -8441,8 +8496,8 @@
|
|
|
8441
8496
|
}, this.takeAction.bind(this));
|
|
8442
8497
|
return [4 /*yield*/, apis.callNextApi(multipleApiConfig.entrypoint)];
|
|
8443
8498
|
case 3:
|
|
8444
|
-
|
|
8445
|
-
|
|
8499
|
+
_13.sent();
|
|
8500
|
+
_13.label = 4;
|
|
8446
8501
|
case 4: return [2 /*return*/];
|
|
8447
8502
|
}
|
|
8448
8503
|
});
|
|
@@ -8451,15 +8506,16 @@
|
|
|
8451
8506
|
KwikIDFormViewComponent.prototype.taskMultipleApiCallsEnd = function (action, object) {
|
|
8452
8507
|
return __awaiter(this, void 0, void 0, function () {
|
|
8453
8508
|
var multipleApiConfig, multipleApiCallResponses;
|
|
8454
|
-
var
|
|
8455
|
-
return __generator(this, function (
|
|
8509
|
+
var _13;
|
|
8510
|
+
return __generator(this, function (_14) {
|
|
8456
8511
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
8457
8512
|
multipleApiCallResponses = {};
|
|
8458
8513
|
multipleApiConfig.endpoints.forEach(function (api) {
|
|
8459
|
-
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
8514
|
+
if (kwikidToolkit.checkObjectKeyExists(api.response, "value")) {
|
|
8460
8515
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
8516
|
+
}
|
|
8461
8517
|
});
|
|
8462
|
-
this.taskData = Object.assign(Object.assign({}, this.taskData), (
|
|
8518
|
+
this.taskData = Object.assign(Object.assign({}, this.taskData), (_13 = {}, _13[action.props.formApiKey] = multipleApiCallResponses, _13));
|
|
8463
8519
|
this.waitingForChanges = false;
|
|
8464
8520
|
this.hideApiLoader();
|
|
8465
8521
|
return [2 /*return*/];
|
|
@@ -8674,7 +8730,7 @@
|
|
|
8674
8730
|
};
|
|
8675
8731
|
KwikIDFormViewComponent.prototype.takeActionOnFieldGroup = function (action, object) {
|
|
8676
8732
|
return __awaiter(this, void 0, void 0, function () {
|
|
8677
|
-
return __generator(this, function (
|
|
8733
|
+
return __generator(this, function (_13) {
|
|
8678
8734
|
/**
|
|
8679
8735
|
* This below code is currently commented because not all actions need to be logged at backend.
|
|
8680
8736
|
* Will look later into where only specific actions needs to be logged or all.
|
|
@@ -8718,12 +8774,12 @@
|
|
|
8718
8774
|
KwikIDFormViewComponent.prototype.takeAction = function (action, object) {
|
|
8719
8775
|
var _a, _b, _c, _d, _e, _f;
|
|
8720
8776
|
return __awaiter(this, void 0, void 0, function () {
|
|
8721
|
-
var
|
|
8722
|
-
return __generator(this, function (
|
|
8723
|
-
switch (
|
|
8777
|
+
var _13, fieldErrorShowSource, fieldErrorShowSourceValue, fieldErrorHideSource, fieldErrorHideSourceValue, redirectToUrlSource, redirectToUrlSourceValue, previewErrorShowSource, previewErrorShowSourceValue, fieldHtmlMessageSource, fieldHtmlMessageSourceValue;
|
|
8778
|
+
return __generator(this, function (_14) {
|
|
8779
|
+
switch (_14.label) {
|
|
8724
8780
|
case 0:
|
|
8725
|
-
|
|
8726
|
-
switch (
|
|
8781
|
+
_13 = action.key;
|
|
8782
|
+
switch (_13) {
|
|
8727
8783
|
case EActionKey.FIELD_HIDE: return [3 /*break*/, 1];
|
|
8728
8784
|
case EActionKey.FIELD_SHOW: return [3 /*break*/, 2];
|
|
8729
8785
|
case EActionKey.FIELD_DISABLE: return [3 /*break*/, 3];
|
|
@@ -8737,66 +8793,67 @@
|
|
|
8737
8793
|
case EActionKey.FIELD_MESSAGES_HIDE: return [3 /*break*/, 15];
|
|
8738
8794
|
case EActionKey.FIELD_API_TIMER_MESSAGE_SHOW: return [3 /*break*/, 16];
|
|
8739
8795
|
case EActionKey.FIELD_API_TIMER_MESSAGE_HIDE: return [3 /*break*/, 18];
|
|
8740
|
-
case EActionKey.
|
|
8741
|
-
case EActionKey.
|
|
8742
|
-
case EActionKey.
|
|
8743
|
-
case EActionKey.
|
|
8744
|
-
case EActionKey.
|
|
8745
|
-
case EActionKey.
|
|
8746
|
-
case EActionKey.
|
|
8747
|
-
case EActionKey.
|
|
8748
|
-
case EActionKey.
|
|
8749
|
-
case EActionKey.
|
|
8750
|
-
case EActionKey.
|
|
8751
|
-
case EActionKey.
|
|
8752
|
-
case EActionKey.
|
|
8753
|
-
case EActionKey.
|
|
8754
|
-
case EActionKey.
|
|
8755
|
-
case EActionKey.
|
|
8756
|
-
case EActionKey.
|
|
8757
|
-
case EActionKey.
|
|
8758
|
-
case EActionKey.
|
|
8759
|
-
case EActionKey.
|
|
8760
|
-
case EActionKey.
|
|
8761
|
-
case EActionKey.
|
|
8762
|
-
case EActionKey.
|
|
8763
|
-
case EActionKey.
|
|
8764
|
-
case EActionKey.
|
|
8765
|
-
case EActionKey.
|
|
8766
|
-
case EActionKey.
|
|
8767
|
-
case EActionKey.
|
|
8768
|
-
case EActionKey.
|
|
8769
|
-
case EActionKey.
|
|
8770
|
-
case EActionKey.
|
|
8771
|
-
|
|
8772
|
-
|
|
8796
|
+
case EActionKey.REMOVE_KEY_FROM_OBJECT_PATH: return [3 /*break*/, 20];
|
|
8797
|
+
case EActionKey.SET_VALUE: return [3 /*break*/, 22];
|
|
8798
|
+
case EActionKey.SET_FIELD_DEFAULT_VALUE: return [3 /*break*/, 24];
|
|
8799
|
+
case EActionKey.SET_API_STATUS: return [3 /*break*/, 26];
|
|
8800
|
+
case EActionKey.SET_API_HEADER_VALUE: return [3 /*break*/, 28];
|
|
8801
|
+
case EActionKey.SET_API_HEADER_VALIDITY: return [3 /*break*/, 30];
|
|
8802
|
+
case EActionKey.SET_API_BODY_VALUE: return [3 /*break*/, 32];
|
|
8803
|
+
case EActionKey.SET_API_BODY_VALIDITY: return [3 /*break*/, 34];
|
|
8804
|
+
case EActionKey.SET_DROPDOWN_OPTIONS: return [3 /*break*/, 36];
|
|
8805
|
+
case EActionKey.SET_FIELD_VALIDITY: return [3 /*break*/, 38];
|
|
8806
|
+
case EActionKey.HANDLE_CONNECTED_ELEMENTS: return [3 /*break*/, 40];
|
|
8807
|
+
case EActionKey.API_CALL: return [3 /*break*/, 41];
|
|
8808
|
+
case EActionKey.API_CALL_MULTIPLE: return [3 /*break*/, 43];
|
|
8809
|
+
case EActionKey.API_CALL_MULTIPLE_END: return [3 /*break*/, 45];
|
|
8810
|
+
case EActionKey.TASK_API_CALL: return [3 /*break*/, 47];
|
|
8811
|
+
case EActionKey.TASK_API_CALL_MULTIPLE: return [3 /*break*/, 49];
|
|
8812
|
+
case EActionKey.TASK_API_CALL_MULTIPLE_END: return [3 /*break*/, 51];
|
|
8813
|
+
case EActionKey.REDIRECT_TO_URL: return [3 /*break*/, 53];
|
|
8814
|
+
case EActionKey.PREVIEW_DIALOG_SHOW: return [3 /*break*/, 56];
|
|
8815
|
+
case EActionKey.PREVIEW_ERROR_SHOW: return [3 /*break*/, 57];
|
|
8816
|
+
case EActionKey.POPUP_FORM_SHOW: return [3 /*break*/, 60];
|
|
8817
|
+
case EActionKey.STOP_WAITING: return [3 /*break*/, 61];
|
|
8818
|
+
case EActionKey.SCROLL_TO_FIELD: return [3 /*break*/, 62];
|
|
8819
|
+
case EActionKey.NOTIFICATION_ERROR_SHOW: return [3 /*break*/, 63];
|
|
8820
|
+
case EActionKey.NOTIFICATION_ERROR_HIDE: return [3 /*break*/, 64];
|
|
8821
|
+
case EActionKey.RESUME_TASK_EXECUTION: return [3 /*break*/, 65];
|
|
8822
|
+
case EActionKey.STOP_TASK_EXECUTION: return [3 /*break*/, 66];
|
|
8823
|
+
case EActionKey.DIALOG_SHOW: return [3 /*break*/, 67];
|
|
8824
|
+
case EActionKey.DIALOG_HIDE: return [3 /*break*/, 68];
|
|
8825
|
+
case EActionKey.SAVE_FORM: return [3 /*break*/, 69];
|
|
8826
|
+
case EActionKey.ALERT_SHOW: return [3 /*break*/, 70];
|
|
8827
|
+
case EActionKey.SET_HTML: return [3 /*break*/, 71];
|
|
8828
|
+
}
|
|
8829
|
+
return [3 /*break*/, 74];
|
|
8773
8830
|
case 1:
|
|
8774
8831
|
this.fieldHide(action.props.fieldKey);
|
|
8775
|
-
return [3 /*break*/,
|
|
8832
|
+
return [3 /*break*/, 75];
|
|
8776
8833
|
case 2:
|
|
8777
8834
|
this.fieldShow(action.props.fieldKey);
|
|
8778
|
-
return [3 /*break*/,
|
|
8835
|
+
return [3 /*break*/, 75];
|
|
8779
8836
|
case 3:
|
|
8780
8837
|
this.fieldDisable(action.props.fieldKey);
|
|
8781
|
-
return [3 /*break*/,
|
|
8838
|
+
return [3 /*break*/, 75];
|
|
8782
8839
|
case 4:
|
|
8783
8840
|
this.fieldEnable(action.props.fieldKey);
|
|
8784
|
-
return [3 /*break*/,
|
|
8841
|
+
return [3 /*break*/, 75];
|
|
8785
8842
|
case 5:
|
|
8786
8843
|
this.fieldEnable(action.props.fieldKey);
|
|
8787
|
-
return [3 /*break*/,
|
|
8844
|
+
return [3 /*break*/, 75];
|
|
8788
8845
|
case 6:
|
|
8789
8846
|
this.fieldEnable(action.props.fieldKey);
|
|
8790
|
-
return [3 /*break*/,
|
|
8847
|
+
return [3 /*break*/, 75];
|
|
8791
8848
|
case 7:
|
|
8792
8849
|
this.fieldReset(action.props.fieldKey);
|
|
8793
|
-
return [3 /*break*/,
|
|
8850
|
+
return [3 /*break*/, 75];
|
|
8794
8851
|
case 8:
|
|
8795
8852
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 10];
|
|
8796
8853
|
fieldErrorShowSource = new kwikidToolkit.Source(object);
|
|
8797
8854
|
return [4 /*yield*/, fieldErrorShowSource.getValueFromSource(action.props.message.source)];
|
|
8798
8855
|
case 9:
|
|
8799
|
-
fieldErrorShowSourceValue =
|
|
8856
|
+
fieldErrorShowSourceValue = _14.sent();
|
|
8800
8857
|
if (typeof fieldErrorShowSourceValue === "string" ||
|
|
8801
8858
|
typeof fieldErrorShowSourceValue === "number") {
|
|
8802
8859
|
fieldErrorShowSourceValue = String(fieldErrorShowSourceValue);
|
|
@@ -8805,17 +8862,17 @@
|
|
|
8805
8862
|
fieldErrorShowSourceValue = "";
|
|
8806
8863
|
}
|
|
8807
8864
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorShowSourceValue);
|
|
8808
|
-
|
|
8865
|
+
_14.label = 10;
|
|
8809
8866
|
case 10:
|
|
8810
8867
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
8811
8868
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
8812
|
-
return [3 /*break*/,
|
|
8869
|
+
return [3 /*break*/, 75];
|
|
8813
8870
|
case 11:
|
|
8814
8871
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 13];
|
|
8815
8872
|
fieldErrorHideSource = new kwikidToolkit.Source(object);
|
|
8816
8873
|
return [4 /*yield*/, fieldErrorHideSource.getValueFromSource(action.props.message.source)];
|
|
8817
8874
|
case 12:
|
|
8818
|
-
fieldErrorHideSourceValue =
|
|
8875
|
+
fieldErrorHideSourceValue = _14.sent();
|
|
8819
8876
|
if (typeof fieldErrorHideSourceValue === "string" ||
|
|
8820
8877
|
typeof fieldErrorHideSourceValue === "number") {
|
|
8821
8878
|
fieldErrorHideSourceValue = String(fieldErrorHideSourceValue);
|
|
@@ -8824,110 +8881,114 @@
|
|
|
8824
8881
|
fieldErrorHideSourceValue = "";
|
|
8825
8882
|
}
|
|
8826
8883
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorHideSourceValue);
|
|
8827
|
-
|
|
8884
|
+
_14.label = 13;
|
|
8828
8885
|
case 13:
|
|
8829
8886
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
8830
|
-
return [3 /*break*/,
|
|
8887
|
+
return [3 /*break*/, 75];
|
|
8831
8888
|
case 14:
|
|
8832
8889
|
this.fieldMessageShow(action.props.fieldKey, action.props.message);
|
|
8833
|
-
return [3 /*break*/,
|
|
8890
|
+
return [3 /*break*/, 75];
|
|
8834
8891
|
case 15:
|
|
8835
8892
|
this.fieldMessageHide(action.props.fieldKey, action.props.message);
|
|
8836
|
-
return [3 /*break*/,
|
|
8893
|
+
return [3 /*break*/, 75];
|
|
8837
8894
|
case 16: return [4 /*yield*/, this.fieldApiTimerMessageShow(action.props.fieldKey, action.props.timer)];
|
|
8838
8895
|
case 17:
|
|
8839
|
-
|
|
8840
|
-
return [3 /*break*/,
|
|
8896
|
+
_14.sent();
|
|
8897
|
+
return [3 /*break*/, 75];
|
|
8841
8898
|
case 18: return [4 /*yield*/, this.fieldApiTimerMessageHide(action.props.fieldKey)];
|
|
8842
8899
|
case 19:
|
|
8843
|
-
|
|
8844
|
-
return [3 /*break*/,
|
|
8845
|
-
case 20: return [4 /*yield*/, this.
|
|
8900
|
+
_14.sent();
|
|
8901
|
+
return [3 /*break*/, 75];
|
|
8902
|
+
case 20: return [4 /*yield*/, this.removeKeyFromObjectPath(action, object)];
|
|
8846
8903
|
case 21:
|
|
8847
|
-
|
|
8848
|
-
return [3 /*break*/,
|
|
8849
|
-
case 22: return [4 /*yield*/, this.
|
|
8904
|
+
_14.sent();
|
|
8905
|
+
return [3 /*break*/, 75];
|
|
8906
|
+
case 22: return [4 /*yield*/, this.setValue(action, object)];
|
|
8850
8907
|
case 23:
|
|
8851
|
-
|
|
8852
|
-
return [3 /*break*/,
|
|
8853
|
-
case 24: return [4 /*yield*/, this.
|
|
8908
|
+
_14.sent();
|
|
8909
|
+
return [3 /*break*/, 75];
|
|
8910
|
+
case 24: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
8854
8911
|
case 25:
|
|
8855
|
-
|
|
8856
|
-
return [3 /*break*/,
|
|
8857
|
-
case 26: return [4 /*yield*/, this.
|
|
8912
|
+
_14.sent();
|
|
8913
|
+
return [3 /*break*/, 75];
|
|
8914
|
+
case 26: return [4 /*yield*/, this.setApiStatus(action, object)];
|
|
8858
8915
|
case 27:
|
|
8859
|
-
|
|
8860
|
-
return [3 /*break*/,
|
|
8861
|
-
case 28: return [4 /*yield*/, this.
|
|
8916
|
+
_14.sent();
|
|
8917
|
+
return [3 /*break*/, 75];
|
|
8918
|
+
case 28: return [4 /*yield*/, this.setApiHeaderValue(action, object)];
|
|
8862
8919
|
case 29:
|
|
8863
|
-
|
|
8864
|
-
return [3 /*break*/,
|
|
8865
|
-
case 30: return [4 /*yield*/, this.
|
|
8920
|
+
_14.sent();
|
|
8921
|
+
return [3 /*break*/, 75];
|
|
8922
|
+
case 30: return [4 /*yield*/, this.setApiHeaderValidity(action, object)];
|
|
8866
8923
|
case 31:
|
|
8867
|
-
|
|
8868
|
-
return [3 /*break*/,
|
|
8869
|
-
case 32: return [4 /*yield*/, this.
|
|
8924
|
+
_14.sent();
|
|
8925
|
+
return [3 /*break*/, 75];
|
|
8926
|
+
case 32: return [4 /*yield*/, this.setApiBodyValue(action, object)];
|
|
8870
8927
|
case 33:
|
|
8871
|
-
|
|
8872
|
-
return [3 /*break*/,
|
|
8873
|
-
case 34: return [4 /*yield*/, this.
|
|
8928
|
+
_14.sent();
|
|
8929
|
+
return [3 /*break*/, 75];
|
|
8930
|
+
case 34: return [4 /*yield*/, this.setApiBodyValidity(action, object)];
|
|
8874
8931
|
case 35:
|
|
8875
|
-
|
|
8876
|
-
return [3 /*break*/,
|
|
8877
|
-
case 36: return [4 /*yield*/, this.
|
|
8932
|
+
_14.sent();
|
|
8933
|
+
return [3 /*break*/, 75];
|
|
8934
|
+
case 36: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
8878
8935
|
case 37:
|
|
8879
|
-
|
|
8880
|
-
return [3 /*break*/,
|
|
8881
|
-
case 38:
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8936
|
+
_14.sent();
|
|
8937
|
+
return [3 /*break*/, 75];
|
|
8938
|
+
case 38: return [4 /*yield*/, this.setFieldValidity(action, object)];
|
|
8939
|
+
case 39:
|
|
8940
|
+
_14.sent();
|
|
8941
|
+
return [3 /*break*/, 75];
|
|
8885
8942
|
case 40:
|
|
8886
|
-
|
|
8887
|
-
return [3 /*break*/,
|
|
8888
|
-
case 41: return [4 /*yield*/, this.
|
|
8943
|
+
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
8944
|
+
return [3 /*break*/, 75];
|
|
8945
|
+
case 41: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
8889
8946
|
case 42:
|
|
8890
|
-
|
|
8891
|
-
return [3 /*break*/,
|
|
8892
|
-
case 43: return [4 /*yield*/, this.
|
|
8947
|
+
_14.sent();
|
|
8948
|
+
return [3 /*break*/, 75];
|
|
8949
|
+
case 43: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
8893
8950
|
case 44:
|
|
8894
|
-
|
|
8895
|
-
return [3 /*break*/,
|
|
8896
|
-
case 45: return [4 /*yield*/, this.
|
|
8951
|
+
_14.sent();
|
|
8952
|
+
return [3 /*break*/, 75];
|
|
8953
|
+
case 45: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
8897
8954
|
case 46:
|
|
8898
|
-
|
|
8899
|
-
return [3 /*break*/,
|
|
8900
|
-
case 47: return [4 /*yield*/, this.
|
|
8955
|
+
_14.sent();
|
|
8956
|
+
return [3 /*break*/, 75];
|
|
8957
|
+
case 47: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
8901
8958
|
case 48:
|
|
8902
|
-
|
|
8903
|
-
return [3 /*break*/,
|
|
8904
|
-
case 49: return [4 /*yield*/, this.
|
|
8959
|
+
_14.sent();
|
|
8960
|
+
return [3 /*break*/, 75];
|
|
8961
|
+
case 49: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
8905
8962
|
case 50:
|
|
8906
|
-
|
|
8907
|
-
return [3 /*break*/,
|
|
8908
|
-
case 51:
|
|
8909
|
-
|
|
8963
|
+
_14.sent();
|
|
8964
|
+
return [3 /*break*/, 75];
|
|
8965
|
+
case 51: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
8966
|
+
case 52:
|
|
8967
|
+
_14.sent();
|
|
8968
|
+
return [3 /*break*/, 75];
|
|
8969
|
+
case 53:
|
|
8970
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.url, "source")) return [3 /*break*/, 55];
|
|
8910
8971
|
redirectToUrlSource = new kwikidToolkit.Source(object);
|
|
8911
8972
|
return [4 /*yield*/, redirectToUrlSource.getValueFromSource(action.props.url.source)];
|
|
8912
|
-
case
|
|
8913
|
-
redirectToUrlSourceValue =
|
|
8973
|
+
case 54:
|
|
8974
|
+
redirectToUrlSourceValue = _14.sent();
|
|
8914
8975
|
if (kwikidToolkit.isEmptyString(redirectToUrlSourceValue)) {
|
|
8915
8976
|
redirectToUrlSourceValue = "";
|
|
8916
8977
|
}
|
|
8917
8978
|
action = kwikidToolkit.setValueToObjectPath(action, "props.url.url", redirectToUrlSourceValue);
|
|
8918
|
-
|
|
8919
|
-
case
|
|
8979
|
+
_14.label = 55;
|
|
8980
|
+
case 55:
|
|
8920
8981
|
this.redirectToUrl(action);
|
|
8921
|
-
return [3 /*break*/,
|
|
8922
|
-
case
|
|
8982
|
+
return [3 /*break*/, 75];
|
|
8983
|
+
case 56:
|
|
8923
8984
|
this.showPreview(action.props);
|
|
8924
|
-
return [3 /*break*/,
|
|
8925
|
-
case
|
|
8926
|
-
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/,
|
|
8985
|
+
return [3 /*break*/, 75];
|
|
8986
|
+
case 57:
|
|
8987
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 59];
|
|
8927
8988
|
previewErrorShowSource = new kwikidToolkit.Source(object);
|
|
8928
8989
|
return [4 /*yield*/, previewErrorShowSource.getValueFromSource(action.props.message.source)];
|
|
8929
|
-
case
|
|
8930
|
-
previewErrorShowSourceValue =
|
|
8990
|
+
case 58:
|
|
8991
|
+
previewErrorShowSourceValue = _14.sent();
|
|
8931
8992
|
if (typeof previewErrorShowSourceValue === "string" ||
|
|
8932
8993
|
typeof previewErrorShowSourceValue === "number") {
|
|
8933
8994
|
previewErrorShowSourceValue = String(previewErrorShowSourceValue);
|
|
@@ -8936,54 +8997,54 @@
|
|
|
8936
8997
|
previewErrorShowSourceValue = "";
|
|
8937
8998
|
}
|
|
8938
8999
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", previewErrorShowSourceValue);
|
|
8939
|
-
|
|
8940
|
-
case
|
|
9000
|
+
_14.label = 59;
|
|
9001
|
+
case 59:
|
|
8941
9002
|
this.showErrorPreview(action.props);
|
|
8942
|
-
return [3 /*break*/,
|
|
8943
|
-
case
|
|
9003
|
+
return [3 /*break*/, 75];
|
|
9004
|
+
case 60:
|
|
8944
9005
|
this.showPopupForm(action.props.popupFormKey, (_b = (_a = action.props) === null || _a === void 0 ? void 0 : _a.popupType) !== null && _b !== void 0 ? _b : "DIALOG");
|
|
8945
|
-
return [3 /*break*/,
|
|
8946
|
-
case
|
|
9006
|
+
return [3 /*break*/, 75];
|
|
9007
|
+
case 61:
|
|
8947
9008
|
this.waitingForChanges = false;
|
|
8948
|
-
return [3 /*break*/,
|
|
8949
|
-
case
|
|
9009
|
+
return [3 /*break*/, 75];
|
|
9010
|
+
case 62:
|
|
8950
9011
|
this.handleOnScrollToField(action.props.fieldKey);
|
|
8951
|
-
return [3 /*break*/,
|
|
8952
|
-
case
|
|
9012
|
+
return [3 /*break*/, 75];
|
|
9013
|
+
case 63:
|
|
8953
9014
|
this.toggleErrorNotification(true);
|
|
8954
|
-
return [3 /*break*/,
|
|
8955
|
-
case
|
|
9015
|
+
return [3 /*break*/, 75];
|
|
9016
|
+
case 64:
|
|
8956
9017
|
this.toggleErrorNotification(false);
|
|
8957
|
-
return [3 /*break*/,
|
|
8958
|
-
case
|
|
9018
|
+
return [3 /*break*/, 75];
|
|
9019
|
+
case 65:
|
|
8959
9020
|
this.stopTaskExecution = false;
|
|
8960
|
-
return [3 /*break*/,
|
|
8961
|
-
case
|
|
9021
|
+
return [3 /*break*/, 75];
|
|
9022
|
+
case 66:
|
|
8962
9023
|
this.stopTaskExecution = true;
|
|
8963
|
-
return [3 /*break*/,
|
|
8964
|
-
case
|
|
9024
|
+
return [3 /*break*/, 75];
|
|
9025
|
+
case 67:
|
|
8965
9026
|
this.dialogShow({
|
|
8966
9027
|
html: (_c = action.props) === null || _c === void 0 ? void 0 : _c.html,
|
|
8967
9028
|
label: (_d = action.props) === null || _d === void 0 ? void 0 : _d.label,
|
|
8968
9029
|
size: (_e = action.props) === null || _e === void 0 ? void 0 : _e.size,
|
|
8969
9030
|
button: (_f = action.props) === null || _f === void 0 ? void 0 : _f.button
|
|
8970
9031
|
});
|
|
8971
|
-
return [3 /*break*/,
|
|
8972
|
-
case
|
|
9032
|
+
return [3 /*break*/, 75];
|
|
9033
|
+
case 68:
|
|
8973
9034
|
this.dialogHide();
|
|
8974
|
-
return [3 /*break*/,
|
|
8975
|
-
case
|
|
9035
|
+
return [3 /*break*/, 75];
|
|
9036
|
+
case 69:
|
|
8976
9037
|
this.handleOnClickSaveForm(undefined);
|
|
8977
|
-
return [3 /*break*/,
|
|
8978
|
-
case
|
|
9038
|
+
return [3 /*break*/, 75];
|
|
9039
|
+
case 70:
|
|
8979
9040
|
this.alertShow(action.props.type, action.props.message);
|
|
8980
|
-
return [3 /*break*/,
|
|
8981
|
-
case
|
|
8982
|
-
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/,
|
|
9041
|
+
return [3 /*break*/, 75];
|
|
9042
|
+
case 71:
|
|
9043
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 73];
|
|
8983
9044
|
fieldHtmlMessageSource = new kwikidToolkit.Source(object);
|
|
8984
9045
|
return [4 /*yield*/, fieldHtmlMessageSource.getValueFromSource(action.props.message.source)];
|
|
8985
|
-
case
|
|
8986
|
-
fieldHtmlMessageSourceValue =
|
|
9046
|
+
case 72:
|
|
9047
|
+
fieldHtmlMessageSourceValue = _14.sent();
|
|
8987
9048
|
if (typeof fieldHtmlMessageSourceValue === "string" ||
|
|
8988
9049
|
typeof fieldHtmlMessageSourceValue === "number") {
|
|
8989
9050
|
fieldHtmlMessageSourceValue = String(fieldHtmlMessageSourceValue);
|
|
@@ -8992,13 +9053,13 @@
|
|
|
8992
9053
|
fieldHtmlMessageSourceValue = "";
|
|
8993
9054
|
}
|
|
8994
9055
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldHtmlMessageSourceValue);
|
|
8995
|
-
|
|
8996
|
-
case
|
|
9056
|
+
_14.label = 73;
|
|
9057
|
+
case 73:
|
|
8997
9058
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
8998
9059
|
this.setHtml(action.props.fieldKey, action.props.message);
|
|
8999
|
-
return [3 /*break*/,
|
|
9000
|
-
case
|
|
9001
|
-
case
|
|
9060
|
+
return [3 /*break*/, 75];
|
|
9061
|
+
case 74: return [3 /*break*/, 75];
|
|
9062
|
+
case 75: return [2 /*return*/];
|
|
9002
9063
|
}
|
|
9003
9064
|
});
|
|
9004
9065
|
});
|
|
@@ -9006,7 +9067,7 @@
|
|
|
9006
9067
|
return KwikIDFormViewComponent;
|
|
9007
9068
|
}());
|
|
9008
9069
|
/** @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: KwikIDFormViewApiService }, { token: i6.TuiPushService }, { token: i5.TuiAlertService }, { token: i7.TuiPreviewDialogService }, { token: i5.TuiDialogService }, { token: i3__namespace.KwikUILoaderService }, { token: i4__namespace.KwikIDCameraRecordService }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9009
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { allFormsData: "allFormsData", extraData: "extraData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", popupFormCallback: "popupFormCallback", userConfig: "userConfig", stepConfig: "stepConfig" }, outputs: { getLogs: "getLogs", getUnsavedDataState: "getUnsavedDataState", onActionShowPopupForm: "onActionShowPopupForm", onClickApiCall: "onClickApiCall", onClickViewFile: "onClickViewFile", onClickFormFieldButton: "onClickFormFieldButton", onClickGoBack: "onClickGoBack", onClickSaveForm: "onClickSaveForm", onClickViewForms: "onClickViewForms" }, providers: [KwikIDFormViewService, KwikIDFormViewApiService], viewQueries: [{ propertyName: "formFieldContainerRef", first: true, predicate: ["formFieldContainerRef"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "formFieldsRef", predicate: ["formFieldsRef"], 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 #formFieldContainerRef\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 #formFieldsRef\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 #formFieldsRef\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]=\"field?.properties?.resetButtonLabel ?? 'Reset'\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n #formFieldsRef\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 #formFieldsRef\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 <!-- Input Currency -->\n <ng-container *ngSwitchCase=\"'currency'\">\n <div\n #formFieldsRef\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-currency\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [currencyType]=\"field?.properties?.currencyType\"\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 [value]=\"formGroup.controls[field.key].value\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-currency>\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 Time -->\n <ng-container *ngSwitchCase=\"'time'\">\n <div\n #formFieldsRef\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-time\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?.properties?.items\"\n [label]=\"field?.label\"\n [mode]=\"field?.properties?.mode\"\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-time>\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 [apiTimer]=\"field?.api?.timer\"\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 [size]=\"field?.properties?.size\"\n [styles]=\"\n field?.properties?.styles\n ? field?.properties?.styles\n : 'width: fit-content'\n \"\n (onClick)=\"handleOnClickApiCall($event)\"\n (onApiTimerStop)=\"handleOnApiTimerStop($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 <!-- Live Location -->\n <ng-container *ngSwitchCase=\"'live-location'\">\n <div\n #formFieldsRef\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-live-location\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [liveLocationStatus]=\"field?.api?.status?.value\"\n [shape]=\"field?.properties?.shape\"\n [isShowLatLongCaptureTimestamp]=\"\n field?.properties?.isShowLatLongCaptureTimestamp\n \"\n [showLoader]=\"field?.disabled\"\n [size]=\"field?.properties?.size\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickLiveLocation($event)\"\n (onLocationPermission)=\"handleOnLocationPermission($event)\"\n ></kwikui-button-live-location>\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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]=\"formGroup.controls[field.key].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 #formFieldsRef\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 [showViewButton]=\"field?.properties?.showViewButton\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n (getViewButtonClick)=\"handleViewButtonClick($event, field)\"\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 #formFieldsRef\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]=\"\n mediaFiles[field.key] | filterImageUrlOrBase64FromObject\n \"\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 <!-- Camera Record -->\n <ng-container *ngSwitchCase=\"'record'\">\n <div\n #formFieldsRef\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]=\"\n mediaFiles[field.key] | filterVideoUrlOrBase64FromObject\n \"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'record'\"\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 #formFieldsRef\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<tui-push\n id=\"permission-error-notification\"\n *tuiPush=\"showPermissionErrorNotification\"\n heading=\"Please provide required permissions!\"\n type=\"Error\"\n (close)=\"togglePermissionErrorNotification(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=\"isShowCamera\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"activeCameraType\"\n [data]=\"activeCameraData\"\n [image]=\"activeCameraImage\"\n [video]=\"activeCameraVideo\"\n [config]=\"activeCameraConfig?.cameraConfig\"\n (getImage)=\"handleGetCameraMedia($event, 'CAPTURE')\"\n (getVideo)=\"handleGetCameraMedia($event, 'RECORD')\"\n (onClickBack)=\"handleOnClickCameraBack($event)\"\n (onClickClose)=\"handleOnClickCameraClose($event)\"\n (onClickSave)=\"handleOnClickSaveCameraMedia($event, activeCameraType)\"\n >\n <ng-container\n *ngIf=\"activeCameraType === 'CAPTURE'\"\n slot=\"capture-header\"\n >\n <div class=\"capture-header-container\">\n <div class=\"capture-header-left\"> </div>\n <div class=\"capture-header-center\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"activeCameraConfig?.cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"capture-header-right\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.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=\"activeCameraConfig?.cameraConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"activeCameraType === 'RECORD'\"\n slot=\"record-header\"\n >\n <div class=\"record-header-container\">\n <div class=\"record-header-row row-1\">\n <div class=\"record-header-left\">\n <kwikui-button\n *ngIf=\"\n activeCameraConfig?.cameraConfig?.header?.isBack &&\n activeCameraRecordingState == 'NONE'\n \"\n appearance=\"whiteblock\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-center\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"activeCameraConfig?.cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-right\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen\n ? 'tuiIconMinimize2'\n : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n </div>\n </div>\n <div class=\"record-header-row row-2\">\n <div\n id=\"blinking-dot-container\"\n [class.recording]=\"activeCameraRecordingState == 'RECORDING'\"\n [class.paused]=\"activeCameraRecordingState == 'PAUSED'\"\n [class.recorded]=\"\n activeCameraRecordingState == 'NONE' ||\n activeCameraRecordingState === 'RECORDED'\n \"\n >\n <div\n *ngIf=\"activeCameraRecordingState == 'RECORDING'\"\n class=\"dot recording blink\"\n >\n </div>\n <div\n *ngIf=\"activeCameraRecordingState === 'PAUSED'\"\n class=\"dot paused\"\n >\n </div>\n <div\n *ngIf=\"\n activeCameraRecordingState == 'NONE' ||\n activeCameraRecordingState === 'RECORDED'\n \"\n class=\"dot recorded\"\n >\n </div>\n <div>\n {{ activeCameraRecordingTime | formatTimer }}\n <ng-container\n *ngIf=\"\n activeCameraConfig?.cameraConfig?.others\n ?.maxRecordingTimeInSeconds\n \"\n >\n /\n {{\n activeCameraConfig?.cameraConfig?.others\n ?.maxRecordingTimeInSeconds | formatTimer\n }}\n </ng-container>\n </div>\n </div>\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;scroll-behavior:smooth}.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,#permission-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top,#permission-error-notification .t-top{color:#fff!important}#field-error-notification .t-close,#permission-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)}@media only screen and (min-width: 768px){.preview-container{height:calc(100vh - 10rem);width:calc(100vw - 10rem)}}.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 .capture-header-container{display:flex;width:100%;max-width:100%;padding:0}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-left{flex:1;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container{display:flex;width:100%;max-width:100%;padding:0;color:#fff;flex-direction:column;justify-content:flex-start;align-items:stretch}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-left{flex:1;display:flex;justify-content:flex-start;grid-gap:1rem;gap:1rem;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2{display:flex;flex-direction:row;justify-content:center;align-items:center}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;grid-gap:.25rem;gap:.25rem;padding:.35rem .6rem;width:-moz-fit-content;width:fit-content;border-radius:2rem;background-color:#f5f5f5}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recording{color:red;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.paused{color:#525252;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recorded{color:#000;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot{display:inline-block;width:.75rem;height:.75rem;border-radius:100%}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recording{background-color:red;box-shadow:0 0 5px -1px red}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.paused{background-color:#525252;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recorded{background-color:#000;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.blink{animation:blinker 1s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{opacity:1}to{opacity:0}}#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: i3__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i3__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i3__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: i3__namespace.KwikUIInputCurrencyComponent, selector: "kwikui-input-currency", inputs: ["currencyType", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators", "value"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUIInputTimeComponent, selector: "kwikui-input-time", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "items", "invalid", "label", "mode", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__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: i5__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i3__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiTimer", "apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick", "onApiTimerStop"] }, { type: i3__namespace.KwikUIButtonLiveLocationComponent, selector: "kwikui-button-live-location", inputs: ["liveLocationStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles", "isShowLatLongCaptureTimestamp"], outputs: ["onClick", "onLocationPermission"] }, { type: i3__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: i3__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i3__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators", "variant", "showViewButton"], outputs: ["getKeyValue", "getRemovedFile", "getViewButtonClick"] }, { 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: i3__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: i3__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i6__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "lines", "timestamp"], outputs: ["close"] }, { type: i5__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i7__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i7__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i5__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", "video"], outputs: ["getImage", "onClickSave", "getVideo"] }], 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: i6__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i6__namespace.TuiPushDirective, selector: "tui-push" }, { type: i7__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i3__namespace.KwikUISafeHtmlPipe, "filterImageUrlOrBase64FromObject": FilterImageUrlOrBase64FromObjectPipe, "filterVideoUrlOrBase64FromObject": FilterVideoUrlOrBase64FromObjectPipe, "kwikuiSafeUrl": i3__namespace.KwikUISafeUrlPipe, "formatTimer": TimerPipe } });
|
|
9070
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { allFormsData: "allFormsData", extraData: "extraData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", popupFormCallback: "popupFormCallback", userConfig: "userConfig", stepConfig: "stepConfig" }, outputs: { getLogs: "getLogs", getUnsavedDataState: "getUnsavedDataState", onActionShowPopupForm: "onActionShowPopupForm", onClickApiCall: "onClickApiCall", onClickViewFile: "onClickViewFile", onClickFormFieldButton: "onClickFormFieldButton", onClickGoBack: "onClickGoBack", onClickSaveForm: "onClickSaveForm", onClickViewForms: "onClickViewForms" }, providers: [KwikIDFormViewService, KwikIDFormViewApiService], viewQueries: [{ propertyName: "formFieldContainerRef", first: true, predicate: ["formFieldContainerRef"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "formFieldsRef", predicate: ["formFieldsRef"], 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 #formFieldContainerRef\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 #formFieldsRef\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 #formFieldsRef\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]=\"field?.properties?.resetButtonLabel ?? 'Reset'\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n #formFieldsRef\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 #formFieldsRef\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 <!-- Input Currency -->\n <ng-container *ngSwitchCase=\"'currency'\">\n <div\n #formFieldsRef\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-currency\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [currencyType]=\"field?.properties?.currencyType\"\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 [value]=\"formGroup.controls[field.key].value\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-currency>\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 Time -->\n <ng-container *ngSwitchCase=\"'time'\">\n <div\n #formFieldsRef\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-time\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?.properties?.items\"\n [label]=\"field?.label\"\n [mode]=\"field?.properties?.mode\"\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-time>\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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 [apiTimer]=\"field?.api?.timer\"\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 [size]=\"field?.properties?.size\"\n [styles]=\"\n field?.properties?.styles\n ? field?.properties?.styles\n : 'width: fit-content'\n \"\n (onClick)=\"handleOnClickApiCall($event)\"\n (onApiTimerStop)=\"handleOnApiTimerStop($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 <!-- Live Location -->\n <ng-container *ngSwitchCase=\"'live-location'\">\n <div\n #formFieldsRef\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-live-location\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [liveLocationStatus]=\"field?.api?.status?.value\"\n [shape]=\"field?.properties?.shape\"\n [isShowLatLongCaptureTimestamp]=\"\n field?.properties?.isShowLatLongCaptureTimestamp\n \"\n [showLoader]=\"field?.disabled\"\n [size]=\"field?.properties?.size\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickLiveLocation($event)\"\n (onLocationPermission)=\"handleOnLocationPermission($event)\"\n ></kwikui-button-live-location>\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 #formFieldsRef\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 #formFieldsRef\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 #formFieldsRef\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]=\"formGroup.controls[field.key].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 #formFieldsRef\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 [showViewButton]=\"field?.properties?.showViewButton\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n (getViewButtonClick)=\"handleViewButtonClick($event, field)\"\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 #formFieldsRef\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]=\"\n mediaFiles[field.key] | filterImageUrlOrBase64FromObject\n \"\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 <!-- Camera Record -->\n <ng-container *ngSwitchCase=\"'record'\">\n <div\n #formFieldsRef\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]=\"\n mediaFiles[field.key] | filterVideoUrlOrBase64FromObject\n \"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'record'\"\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 #formFieldsRef\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]=\"formConfig.properties.footer.viewFormsButton.styles\"\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]=\"formConfig.properties.footer.saveButton.styles\"\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<tui-push\n id=\"permission-error-notification\"\n *tuiPush=\"showPermissionErrorNotification\"\n heading=\"Please provide required permissions!\"\n type=\"Error\"\n (close)=\"togglePermissionErrorNotification(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=\"isShowCamera\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"activeCameraType\"\n [data]=\"activeCameraData\"\n [image]=\"activeCameraImage\"\n [video]=\"activeCameraVideo\"\n [config]=\"activeCameraConfig?.cameraConfig\"\n (getImage)=\"handleGetCameraMedia($event, 'CAPTURE')\"\n (getVideo)=\"handleGetCameraMedia($event, 'RECORD')\"\n (onClickBack)=\"handleOnClickCameraBack($event)\"\n (onClickClose)=\"handleOnClickCameraClose($event)\"\n (onClickSave)=\"handleOnClickSaveCameraMedia($event, activeCameraType)\"\n >\n <ng-container\n *ngIf=\"activeCameraType === 'CAPTURE'\"\n slot=\"capture-header\"\n >\n <div class=\"capture-header-container\">\n <div class=\"capture-header-left\"> </div>\n <div class=\"capture-header-center\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"activeCameraConfig?.cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"capture-header-right\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.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=\"activeCameraConfig?.cameraConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"activeCameraType === 'RECORD'\"\n slot=\"record-header\"\n >\n <div class=\"record-header-container\">\n <div class=\"record-header-row row-1\">\n <div class=\"record-header-left\">\n <kwikui-button\n *ngIf=\"\n activeCameraConfig?.cameraConfig?.header?.isBack &&\n activeCameraRecordingState == 'NONE'\n \"\n appearance=\"whiteblock\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-center\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"activeCameraConfig?.cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-right\">\n <kwikui-button\n *ngIf=\"activeCameraConfig?.cameraConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen\n ? 'tuiIconMinimize2'\n : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n </div>\n </div>\n <div class=\"record-header-row row-2\">\n <div\n id=\"blinking-dot-container\"\n [class.recording]=\"activeCameraRecordingState == 'RECORDING'\"\n [class.paused]=\"activeCameraRecordingState == 'PAUSED'\"\n [class.recorded]=\"\n activeCameraRecordingState == 'NONE' ||\n activeCameraRecordingState === 'RECORDED'\n \"\n >\n <div\n *ngIf=\"activeCameraRecordingState == 'RECORDING'\"\n class=\"dot recording blink\"\n >\n </div>\n <div\n *ngIf=\"activeCameraRecordingState === 'PAUSED'\"\n class=\"dot paused\"\n >\n </div>\n <div\n *ngIf=\"\n activeCameraRecordingState == 'NONE' ||\n activeCameraRecordingState === 'RECORDED'\n \"\n class=\"dot recorded\"\n >\n </div>\n <div>\n {{ activeCameraRecordingTime | formatTimer }}\n <ng-container\n *ngIf=\"\n activeCameraConfig?.cameraConfig?.others\n ?.maxRecordingTimeInSeconds\n \"\n >\n /\n {{\n activeCameraConfig?.cameraConfig?.others\n ?.maxRecordingTimeInSeconds | formatTimer\n }}\n </ng-container>\n </div>\n </div>\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;scroll-behavior:smooth}.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,#permission-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top,#permission-error-notification .t-top{color:#fff!important}#field-error-notification .t-close,#permission-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)}@media only screen and (min-width: 768px){.preview-container{height:calc(100vh - 10rem);width:calc(100vw - 10rem)}}.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 .capture-header-container{display:flex;width:100%;max-width:100%;padding:0}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-left{flex:1;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container{display:flex;width:100%;max-width:100%;padding:0;color:#fff;flex-direction:column;justify-content:flex-start;align-items:stretch}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-left{flex:1;display:flex;justify-content:flex-start;grid-gap:1rem;gap:1rem;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2{display:flex;flex-direction:row;justify-content:center;align-items:center}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;grid-gap:.25rem;gap:.25rem;padding:.35rem .6rem;width:-moz-fit-content;width:fit-content;border-radius:2rem;background-color:#f5f5f5}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recording{color:red;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.paused{color:#525252;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recorded{color:#000;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot{display:inline-block;width:.75rem;height:.75rem;border-radius:100%}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recording{background-color:red;box-shadow:0 0 5px -1px red}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.paused{background-color:#525252;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recorded{background-color:#000;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.blink{animation:blinker 1s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{opacity:1}to{opacity:0}}#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: i3__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i3__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i3__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: i3__namespace.KwikUIInputCurrencyComponent, selector: "kwikui-input-currency", inputs: ["currencyType", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators", "value"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUIInputTimeComponent, selector: "kwikui-input-time", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "items", "invalid", "label", "mode", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__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: i5__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i3__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiTimer", "apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick", "onApiTimerStop"] }, { type: i3__namespace.KwikUIButtonLiveLocationComponent, selector: "kwikui-button-live-location", inputs: ["liveLocationStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles", "isShowLatLongCaptureTimestamp"], outputs: ["onClick", "onLocationPermission"] }, { type: i3__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: i3__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i3__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators", "variant", "showViewButton"], outputs: ["getKeyValue", "getRemovedFile", "getViewButtonClick"] }, { 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: i3__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: i3__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i6__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "lines", "timestamp"], outputs: ["close"] }, { type: i5__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i7__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i7__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i5__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", "video"], outputs: ["getImage", "onClickSave", "getVideo"] }], 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: i6__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i6__namespace.TuiPushDirective, selector: "tui-push" }, { type: i7__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i3__namespace.KwikUISafeHtmlPipe, "filterImageUrlOrBase64FromObject": FilterImageUrlOrBase64FromObjectPipe, "filterVideoUrlOrBase64FromObject": FilterVideoUrlOrBase64FromObjectPipe, "kwikuiSafeUrl": i3__namespace.KwikUISafeUrlPipe, "formatTimer": TimerPipe } });
|
|
9010
9071
|
__decorate([
|
|
9011
9072
|
kwikidToolkit.logMethod
|
|
9012
9073
|
], KwikIDFormViewComponent.prototype, "resetCamera", null);
|
|
@@ -9187,6 +9248,9 @@
|
|
|
9187
9248
|
__decorate([
|
|
9188
9249
|
kwikidToolkit.logMethod
|
|
9189
9250
|
], KwikIDFormViewComponent.prototype, "fieldMessageHide", null);
|
|
9251
|
+
__decorate([
|
|
9252
|
+
kwikidToolkit.logMethod
|
|
9253
|
+
], KwikIDFormViewComponent.prototype, "removeKeyFromObjectPath", null);
|
|
9190
9254
|
__decorate([
|
|
9191
9255
|
kwikidToolkit.logMethod
|
|
9192
9256
|
], KwikIDFormViewComponent.prototype, "setValue", null);
|
|
@@ -9352,7 +9416,7 @@
|
|
|
9352
9416
|
type: i0.Output
|
|
9353
9417
|
}], onClickViewForms: [{
|
|
9354
9418
|
type: i0.Output
|
|
9355
|
-
}], resetCamera: [], ngOnInit: [], ngOnChanges: [], ngOnDestroy: [], triggerLogs: [], initFormConfig: [], setFormFieldsFromFormConfig: [], setFormFieldGroupsFromFormConfig: [], setFormDataFromAllFormsData: [], handleConnectedElementFieldGroupActions: [], handleConnectedElementFieldGroup: [], handleConnectedElementFieldActions: [], handleConnectedElementFields: [], handleConnectedElements: [], handleRemovedFile: [], handleViewButtonClick: [], handleGetKeyValueFile: [], handleOnClickGetRemovedMediaFile: [], handleOnClickInputCamera: [], setCameraMedia: [], handleGetCameraMedia: [], handleOnClickSaveCameraMedia: [], handleOnClickCameraBack: [], handleOnClickCameraClose: [], updateFiles: [], uploadFile: [], handleOnClickFormFieldButton: [], handleOnLocationPermission: [], handleOnClickLiveLocation: [], handleGetKeyValue: [], handleOnClickResetFormFields: [], handleFieldApiCall: [], handleApiCall: [], executeApiCall: [], isValidRequestHeadersAndBody: [], handleOnClickApiCall: [], handleOnClickGoBack: [], handleOnClickViewForms: [], handleOnClickSaveForm: [], handleOnApiTimerStop: [], handleOnScrollToField: [], toggleErrorNotification: [], togglePermissionErrorNotification: [], fieldHide: [], fieldGroupHide: [], fieldShow: [], fieldGroupShow: [], fieldDisable: [], fieldGroupDisable: [], fieldEnable: [], fieldGroupEnable: [], fieldReset: [], fieldGroupReset: [], fieldHideApiLoader: [], fieldShowApiLoader: [], setHtml: [], fieldErrorShow: [], fieldErrorHide: [], fieldMessageShow: [], fieldMessageHide: [], setValue: [], setFieldDefaultValue: [], setApiStatus: [], setApiHeaderValue: [], setApiHeaderValidity: [], setApiBodyValue: [], setApiBodyValidity: [], setFieldValidity: [], setDropdownOptions: [], apiCall: [], fieldApiCall: [], fieldMultipleApiCalls: [], fieldMultipleApiCallsEnd: [], taskApiCall: [], taskMultipleApiCalls: [], taskMultipleApiCallsEnd: [], dialogShow: [], dialogHide: [], redirectToUrl: [], patchFieldControlValue: [], setFieldControlValue: [], patchFormGroup: [], isFieldValid: [], isFieldEnabled: [], getFormGroupRawValues: [], showPreview: [], showErrorPreview: [], showPopupForm: [], alertShow: [], takeActionOnFieldGroup: [], takeAction: [] } });
|
|
9419
|
+
}], resetCamera: [], ngOnInit: [], ngOnChanges: [], ngOnDestroy: [], triggerLogs: [], initFormConfig: [], setFormFieldsFromFormConfig: [], setFormFieldGroupsFromFormConfig: [], setFormDataFromAllFormsData: [], handleConnectedElementFieldGroupActions: [], handleConnectedElementFieldGroup: [], handleConnectedElementFieldActions: [], handleConnectedElementFields: [], handleConnectedElements: [], handleRemovedFile: [], handleViewButtonClick: [], handleGetKeyValueFile: [], handleOnClickGetRemovedMediaFile: [], handleOnClickInputCamera: [], setCameraMedia: [], handleGetCameraMedia: [], handleOnClickSaveCameraMedia: [], handleOnClickCameraBack: [], handleOnClickCameraClose: [], updateFiles: [], uploadFile: [], handleOnClickFormFieldButton: [], handleOnLocationPermission: [], handleOnClickLiveLocation: [], handleGetKeyValue: [], handleOnClickResetFormFields: [], handleFieldApiCall: [], handleApiCall: [], executeApiCall: [], isValidRequestHeadersAndBody: [], handleOnClickApiCall: [], handleOnClickGoBack: [], handleOnClickViewForms: [], handleOnClickSaveForm: [], handleOnApiTimerStop: [], handleOnScrollToField: [], toggleErrorNotification: [], togglePermissionErrorNotification: [], fieldHide: [], fieldGroupHide: [], fieldShow: [], fieldGroupShow: [], fieldDisable: [], fieldGroupDisable: [], fieldEnable: [], fieldGroupEnable: [], fieldReset: [], fieldGroupReset: [], fieldHideApiLoader: [], fieldShowApiLoader: [], setHtml: [], fieldErrorShow: [], fieldErrorHide: [], fieldMessageShow: [], fieldMessageHide: [], removeKeyFromObjectPath: [], setValue: [], setFieldDefaultValue: [], setApiStatus: [], setApiHeaderValue: [], setApiHeaderValidity: [], setApiBodyValue: [], setApiBodyValidity: [], setFieldValidity: [], setDropdownOptions: [], apiCall: [], fieldApiCall: [], fieldMultipleApiCalls: [], fieldMultipleApiCallsEnd: [], taskApiCall: [], taskMultipleApiCalls: [], taskMultipleApiCallsEnd: [], dialogShow: [], dialogHide: [], redirectToUrl: [], patchFieldControlValue: [], setFieldControlValue: [], patchFormGroup: [], isFieldValid: [], isFieldEnabled: [], getFormGroupRawValues: [], showPreview: [], showErrorPreview: [], showPopupForm: [], alertShow: [], takeActionOnFieldGroup: [], takeAction: [] } });
|
|
9356
9420
|
|
|
9357
9421
|
/* eslint-disable no-unused-vars */
|
|
9358
9422
|
var EFormType;
|
|
@@ -9986,6 +10050,22 @@
|
|
|
9986
10050
|
form = kwikidToolkit.setValueToObjectPath(form, "status", "completed");
|
|
9987
10051
|
form = kwikidToolkit.setValueToObjectPath(form, "disabled", false);
|
|
9988
10052
|
}
|
|
10053
|
+
else if (kwikidToolkit.checkObjectKeyExists(form, "dependentOn")) {
|
|
10054
|
+
var isDependent = form.dependentOn.every(function (r) { return formsListCompleted.includes(r); });
|
|
10055
|
+
if (isDependent) {
|
|
10056
|
+
form = kwikidToolkit.setValueToObjectPath(form, "status", "editable");
|
|
10057
|
+
form = kwikidToolkit.setValueToObjectPath(form, "disabled", false);
|
|
10058
|
+
}
|
|
10059
|
+
else {
|
|
10060
|
+
form = kwikidToolkit.setValueToObjectPath(form, "status", "locked");
|
|
10061
|
+
form = kwikidToolkit.setValueToObjectPath(form, "disabled", true);
|
|
10062
|
+
}
|
|
10063
|
+
}
|
|
10064
|
+
else {
|
|
10065
|
+
form = kwikidToolkit.setValueToObjectPath(form, "dependentOn", []);
|
|
10066
|
+
form = kwikidToolkit.setValueToObjectPath(form, "status", "editable");
|
|
10067
|
+
form = kwikidToolkit.setValueToObjectPath(form, "disabled", false);
|
|
10068
|
+
}
|
|
9989
10069
|
}
|
|
9990
10070
|
}
|
|
9991
10071
|
}
|
|
@@ -10801,8 +10881,9 @@
|
|
|
10801
10881
|
function JsonFormatPipe() {
|
|
10802
10882
|
}
|
|
10803
10883
|
JsonFormatPipe.prototype.transform = function (value) {
|
|
10804
|
-
if (!value)
|
|
10884
|
+
if (!value) {
|
|
10805
10885
|
return "";
|
|
10886
|
+
}
|
|
10806
10887
|
// Trim spaces from start and end, then JSON.stringify with indentation for formatting
|
|
10807
10888
|
return JSON.stringify(value, null, 2).trim();
|
|
10808
10889
|
};
|