kwikid-forms 0.6.28 → 0.6.30
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 +463 -447
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.logs.definition.js +7 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +28 -20
- package/esm2015/lib/renderer/forms-list/forms-list.component.js +2 -2
- package/fesm2015/kwikid-forms.js +35 -21
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/definitions/form-view.logs.definition.d.ts +6 -0
- package/package.json +1 -1
|
@@ -3120,7 +3120,13 @@
|
|
|
3120
3120
|
ELogEventType["FORM__API_BUTTON_CLICK"] = "FORM__API_BUTTON_CLICK";
|
|
3121
3121
|
ELogEventType["FORM__API_REQUEST"] = "FORM__API_REQUEST";
|
|
3122
3122
|
ELogEventType["FORM__API_REQUEST_INVALID"] = "FORM__API_REQUEST_INVALID";
|
|
3123
|
+
ELogEventType["FORM__API_REQUEST_UPLOAD_FILE"] = "FORM__API_REQUEST_UPLOAD_FILE";
|
|
3124
|
+
ELogEventType["FORM__API_REQUEST_UPLOAD_IMAGE"] = "FORM__API_REQUEST_UPLOAD_IMAGE";
|
|
3125
|
+
ELogEventType["FORM__API_REQUEST_UPLOAD_VIDEO"] = "FORM__API_REQUEST_UPLOAD_VIDEO";
|
|
3123
3126
|
ELogEventType["FORM__API_RESPONSE"] = "FORM__API_RESPONSE";
|
|
3127
|
+
ELogEventType["FORM__API_RESPONSE_UPLOAD_FILE"] = "FORM__API_RESPONSE_UPLOAD_FILE";
|
|
3128
|
+
ELogEventType["FORM__API_RESPONSE_UPLOAD_IMAGE"] = "FORM__API_RESPONSE_UPLOAD_IMAGE";
|
|
3129
|
+
ELogEventType["FORM__API_RESPONSE_UPLOAD_VIDEO"] = "FORM__API_RESPONSE_UPLOAD_VIDEO";
|
|
3124
3130
|
ELogEventType["FORM__CAMERA_BACK_BUTTON_CLICK"] = "FORM__CAMERA_BACK_BUTTON_CLICK";
|
|
3125
3131
|
ELogEventType["FORM__CAMERA_CLOSE_BUTTON_CLICK"] = "FORM__CAMERA_CLOSE_BUTTON_CLICK";
|
|
3126
3132
|
ELogEventType["FORM__CAMERA_SAVE_BUTTON_CLICK"] = "FORM__CAMERA_SAVE_BUTTON_CLICK";
|
|
@@ -4536,11 +4542,11 @@
|
|
|
4536
4542
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4537
4543
|
var res;
|
|
4538
4544
|
var _this = this;
|
|
4539
|
-
return __generator(this, function (
|
|
4540
|
-
switch (
|
|
4545
|
+
return __generator(this, function (_7) {
|
|
4546
|
+
switch (_7.label) {
|
|
4541
4547
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4542
4548
|
case 1:
|
|
4543
|
-
res =
|
|
4549
|
+
res = _7.sent();
|
|
4544
4550
|
if (res) {
|
|
4545
4551
|
this.loading = false;
|
|
4546
4552
|
this.cameraRecordingTimerSubcription = this.cameraRecordService
|
|
@@ -4563,7 +4569,7 @@
|
|
|
4563
4569
|
};
|
|
4564
4570
|
KwikIDFormViewComponent.prototype.ngAfterViewInit = function () { };
|
|
4565
4571
|
KwikIDFormViewComponent.prototype.ngOnChanges = function (changes) {
|
|
4566
|
-
var
|
|
4572
|
+
var _7, _8, _9;
|
|
4567
4573
|
var _this = this;
|
|
4568
4574
|
var _a, _b, _c, _d;
|
|
4569
4575
|
var verifyChange = function (key) {
|
|
@@ -4591,9 +4597,9 @@
|
|
|
4591
4597
|
? changes.popupFormCallback.currentValue.popupFormData["data"]
|
|
4592
4598
|
: changes.popupFormCallback.currentValue.popupFormData;
|
|
4593
4599
|
var popupFormConfig = changes.popupFormCallback.currentValue.popupFormConfig;
|
|
4594
|
-
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (
|
|
4595
|
-
|
|
4596
|
-
|
|
4600
|
+
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (_7 = {},
|
|
4601
|
+
_7[popupFormConfig.key] = popupFormData,
|
|
4602
|
+
_7));
|
|
4597
4603
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4598
4604
|
if (kwikidToolkit.checkObjectKeyExists(changes.popupFormCallback.currentValue, "stopTaskExecution")) {
|
|
4599
4605
|
this.stopTaskExecution =
|
|
@@ -4616,7 +4622,7 @@
|
|
|
4616
4622
|
case EFieldType.FILE:
|
|
4617
4623
|
if (response) {
|
|
4618
4624
|
var updatedFile = kwikidToolkit.getObjectDeepCopy(Object.assign({ id: uuid.v4() }, response));
|
|
4619
|
-
this.triggerLogs(ELogEventType$1.
|
|
4625
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE_UPLOAD_FILE, {
|
|
4620
4626
|
api_key: this.apiCallResponse.key,
|
|
4621
4627
|
field_key: this.apiCallResponse.key,
|
|
4622
4628
|
response_type: "FILE_UPLOAD_API_SUCCESS",
|
|
@@ -4626,7 +4632,7 @@
|
|
|
4626
4632
|
}
|
|
4627
4633
|
else {
|
|
4628
4634
|
var updatedFile = kwikidToolkit.getObjectDeepCopy(Object.assign({ id: uuid.v4() }, (_c = (_b = this.apiCallResponse) === null || _b === void 0 ? void 0 : _b.payload) === null || _c === void 0 ? void 0 : _c.metadata));
|
|
4629
|
-
this.triggerLogs(ELogEventType$1.
|
|
4635
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE_UPLOAD_FILE, {
|
|
4630
4636
|
api_key: this.apiCallResponse.key,
|
|
4631
4637
|
field_key: this.apiCallResponse.key,
|
|
4632
4638
|
response_type: "FILE_UPLOAD_API_ERROR"
|
|
@@ -4645,9 +4651,9 @@
|
|
|
4645
4651
|
emitEvent: false,
|
|
4646
4652
|
onlySelf: false
|
|
4647
4653
|
});
|
|
4648
|
-
this.formGroup.patchValue((
|
|
4649
|
-
|
|
4650
|
-
|
|
4654
|
+
this.formGroup.patchValue((_8 = {},
|
|
4655
|
+
_8[field_1.key] = kwikidToolkit.getObjectDeepCopy([image]),
|
|
4656
|
+
_8), { emitEvent: false });
|
|
4651
4657
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
4652
4658
|
emitEvent: false
|
|
4653
4659
|
});
|
|
@@ -4667,11 +4673,11 @@
|
|
|
4667
4673
|
ALL_FORMS_DATA: this.allFormsData
|
|
4668
4674
|
}, this.takeAction.bind(this));
|
|
4669
4675
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4670
|
-
return __generator(this, function (
|
|
4671
|
-
switch (
|
|
4676
|
+
return __generator(this, function (_7) {
|
|
4677
|
+
switch (_7.label) {
|
|
4672
4678
|
case 0: return [4 /*yield*/, validations_1.validate(field_1.validation)];
|
|
4673
4679
|
case 1:
|
|
4674
|
-
|
|
4680
|
+
_7.sent();
|
|
4675
4681
|
return [2 /*return*/];
|
|
4676
4682
|
}
|
|
4677
4683
|
});
|
|
@@ -4684,7 +4690,7 @@
|
|
|
4684
4690
|
value: this.formGroup.controls[field_1.key].value
|
|
4685
4691
|
}, "ON_CHANGE");
|
|
4686
4692
|
}
|
|
4687
|
-
this.triggerLogs(ELogEventType$1.
|
|
4693
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE_UPLOAD_IMAGE, {
|
|
4688
4694
|
api_key: this.apiCallResponse.key,
|
|
4689
4695
|
field_key: this.apiCallResponse.key,
|
|
4690
4696
|
response_type: "IMAGE_UPLOAD_API_SUCCESS",
|
|
@@ -4692,7 +4698,7 @@
|
|
|
4692
4698
|
});
|
|
4693
4699
|
}
|
|
4694
4700
|
else {
|
|
4695
|
-
this.triggerLogs(ELogEventType$1.
|
|
4701
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE_UPLOAD_IMAGE, {
|
|
4696
4702
|
api_key: this.apiCallResponse.key,
|
|
4697
4703
|
field_key: this.apiCallResponse.key,
|
|
4698
4704
|
response_type: "IMAGE_UPLOAD_API_ERROR"
|
|
@@ -4711,9 +4717,9 @@
|
|
|
4711
4717
|
emitEvent: false,
|
|
4712
4718
|
onlySelf: false
|
|
4713
4719
|
});
|
|
4714
|
-
this.formGroup.patchValue((
|
|
4715
|
-
|
|
4716
|
-
|
|
4720
|
+
this.formGroup.patchValue((_9 = {},
|
|
4721
|
+
_9[field_1.key] = kwikidToolkit.getObjectDeepCopy([video]),
|
|
4722
|
+
_9), { emitEvent: false });
|
|
4717
4723
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
4718
4724
|
emitEvent: false
|
|
4719
4725
|
});
|
|
@@ -4733,11 +4739,11 @@
|
|
|
4733
4739
|
ALL_FORMS_DATA: this.allFormsData
|
|
4734
4740
|
}, this.takeAction.bind(this));
|
|
4735
4741
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4736
|
-
return __generator(this, function (
|
|
4737
|
-
switch (
|
|
4742
|
+
return __generator(this, function (_7) {
|
|
4743
|
+
switch (_7.label) {
|
|
4738
4744
|
case 0: return [4 /*yield*/, validations_2.validate(field_1.validation)];
|
|
4739
4745
|
case 1:
|
|
4740
|
-
|
|
4746
|
+
_7.sent();
|
|
4741
4747
|
return [2 /*return*/];
|
|
4742
4748
|
}
|
|
4743
4749
|
});
|
|
@@ -4750,7 +4756,7 @@
|
|
|
4750
4756
|
value: this.formGroup.controls[field_1.key].value
|
|
4751
4757
|
}, "ON_CHANGE");
|
|
4752
4758
|
}
|
|
4753
|
-
this.triggerLogs(ELogEventType$1.
|
|
4759
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE_UPLOAD_VIDEO, {
|
|
4754
4760
|
api_key: this.apiCallResponse.key,
|
|
4755
4761
|
field_key: this.apiCallResponse.key,
|
|
4756
4762
|
response_type: "VIDEO_UPLOAD_API_SUCCESS",
|
|
@@ -4758,7 +4764,7 @@
|
|
|
4758
4764
|
});
|
|
4759
4765
|
}
|
|
4760
4766
|
else {
|
|
4761
|
-
this.triggerLogs(ELogEventType$1.
|
|
4767
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE_UPLOAD_VIDEO, {
|
|
4762
4768
|
api_key: this.apiCallResponse.key,
|
|
4763
4769
|
field_key: this.apiCallResponse.key,
|
|
4764
4770
|
response_type: "VIDEO_UPLOAD_API_ERROR"
|
|
@@ -4800,11 +4806,11 @@
|
|
|
4800
4806
|
ALL_FORMS_DATA: this.allFormsData
|
|
4801
4807
|
}, this.takeAction.bind(this));
|
|
4802
4808
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4803
|
-
return __generator(this, function (
|
|
4804
|
-
switch (
|
|
4809
|
+
return __generator(this, function (_7) {
|
|
4810
|
+
switch (_7.label) {
|
|
4805
4811
|
case 0: return [4 /*yield*/, validations_3.validate(field_2.validation)];
|
|
4806
4812
|
case 1:
|
|
4807
|
-
|
|
4813
|
+
_7.sent();
|
|
4808
4814
|
return [2 /*return*/];
|
|
4809
4815
|
}
|
|
4810
4816
|
});
|
|
@@ -4819,11 +4825,11 @@
|
|
|
4819
4825
|
if (verifyChange("formConfig")) {
|
|
4820
4826
|
this.formConfig = changes.formConfig.currentValue;
|
|
4821
4827
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4822
|
-
return __generator(this, function (
|
|
4823
|
-
switch (
|
|
4828
|
+
return __generator(this, function (_7) {
|
|
4829
|
+
switch (_7.label) {
|
|
4824
4830
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4825
4831
|
case 1:
|
|
4826
|
-
|
|
4832
|
+
_7.sent();
|
|
4827
4833
|
return [2 /*return*/];
|
|
4828
4834
|
}
|
|
4829
4835
|
});
|
|
@@ -4843,11 +4849,11 @@
|
|
|
4843
4849
|
};
|
|
4844
4850
|
KwikIDFormViewComponent.prototype.initFormConfig = function (formConfig) {
|
|
4845
4851
|
return __awaiter(this, void 0, void 0, function () {
|
|
4846
|
-
var
|
|
4847
|
-
var e_1,
|
|
4852
|
+
var _7, _8, preTask, task, e_1_1, _9, _loop_1, this_1, _10, _11, field, _12, _13, field, validations, e_2_1;
|
|
4853
|
+
var e_1, _14, e_3, _15, e_2, _16;
|
|
4848
4854
|
var _this = this;
|
|
4849
|
-
return __generator(this, function (
|
|
4850
|
-
switch (
|
|
4855
|
+
return __generator(this, function (_17) {
|
|
4856
|
+
switch (_17.label) {
|
|
4851
4857
|
case 0:
|
|
4852
4858
|
formConfig = new Converter().convertFormConfig(formConfig);
|
|
4853
4859
|
formConfig = new Converter().updateFormConfigProperties(formConfig);
|
|
@@ -4861,14 +4867,14 @@
|
|
|
4861
4867
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
4862
4868
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "pre"))) return [3 /*break*/, 10];
|
|
4863
4869
|
this.triggerLogs(ELogEventType$1.FORM__TASK_PRE, {});
|
|
4864
|
-
|
|
4870
|
+
_17.label = 1;
|
|
4865
4871
|
case 1:
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4872
|
+
_17.trys.push([1, 7, 8, 9]);
|
|
4873
|
+
_7 = __values(this.formConfig.tasks.pre), _8 = _7.next();
|
|
4874
|
+
_17.label = 2;
|
|
4869
4875
|
case 2:
|
|
4870
|
-
if (!!
|
|
4871
|
-
preTask =
|
|
4876
|
+
if (!!_8.done) return [3 /*break*/, 6];
|
|
4877
|
+
preTask = _8.value;
|
|
4872
4878
|
task = new Tasks(preTask, {
|
|
4873
4879
|
FORM_CONFIG: this.formConfig,
|
|
4874
4880
|
FORM_FIELDS: this.formFields,
|
|
@@ -4886,7 +4892,7 @@
|
|
|
4886
4892
|
}
|
|
4887
4893
|
return [4 /*yield*/, task.execute()];
|
|
4888
4894
|
case 3:
|
|
4889
|
-
|
|
4895
|
+
_17.sent();
|
|
4890
4896
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4891
4897
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
4892
4898
|
var intervalId = setInterval(function () {
|
|
@@ -4898,36 +4904,36 @@
|
|
|
4898
4904
|
})];
|
|
4899
4905
|
case 4:
|
|
4900
4906
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4901
|
-
|
|
4907
|
+
_17.sent();
|
|
4902
4908
|
if (this.stopTaskExecution) {
|
|
4903
4909
|
return [3 /*break*/, 6];
|
|
4904
4910
|
}
|
|
4905
|
-
|
|
4911
|
+
_17.label = 5;
|
|
4906
4912
|
case 5:
|
|
4907
|
-
|
|
4913
|
+
_8 = _7.next();
|
|
4908
4914
|
return [3 /*break*/, 2];
|
|
4909
4915
|
case 6: return [3 /*break*/, 9];
|
|
4910
4916
|
case 7:
|
|
4911
|
-
e_1_1 =
|
|
4917
|
+
e_1_1 = _17.sent();
|
|
4912
4918
|
e_1 = { error: e_1_1 };
|
|
4913
4919
|
return [3 /*break*/, 9];
|
|
4914
4920
|
case 8:
|
|
4915
4921
|
try {
|
|
4916
|
-
if (
|
|
4922
|
+
if (_8 && !_8.done && (_14 = _7.return)) _14.call(_7);
|
|
4917
4923
|
}
|
|
4918
4924
|
finally { if (e_1) throw e_1.error; }
|
|
4919
4925
|
return [7 /*endfinally*/];
|
|
4920
4926
|
case 9:
|
|
4921
4927
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4922
|
-
|
|
4928
|
+
_17.label = 10;
|
|
4923
4929
|
case 10:
|
|
4924
4930
|
if (this.stopTaskExecution) {
|
|
4925
4931
|
return [2 /*return*/, false];
|
|
4926
4932
|
}
|
|
4927
|
-
|
|
4933
|
+
_9 = this;
|
|
4928
4934
|
return [4 /*yield*/, this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this))];
|
|
4929
4935
|
case 11:
|
|
4930
|
-
|
|
4936
|
+
_9.formGroup = _17.sent();
|
|
4931
4937
|
/**
|
|
4932
4938
|
* For some reason if their a field of type 'IMAGE' then
|
|
4933
4939
|
* formData is adding a 'undefined' key with last image's value from the array.
|
|
@@ -4937,10 +4943,10 @@
|
|
|
4937
4943
|
delete this.formData["undefined"];
|
|
4938
4944
|
}
|
|
4939
4945
|
_loop_1 = function (field) {
|
|
4940
|
-
var
|
|
4946
|
+
var _18, _19;
|
|
4941
4947
|
if (field.isFormElement) {
|
|
4942
|
-
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (
|
|
4943
|
-
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (
|
|
4948
|
+
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_18 = {}, _18[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _18));
|
|
4949
|
+
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (_19 = {}, _19[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _19));
|
|
4944
4950
|
if (field.type === EFieldType.FILE) {
|
|
4945
4951
|
this_1.files[field.key] = this_1.formGroup.controls[field.key].value;
|
|
4946
4952
|
}
|
|
@@ -4954,11 +4960,11 @@
|
|
|
4954
4960
|
}
|
|
4955
4961
|
this_1.formGroup.controls[field.key].valueChanges
|
|
4956
4962
|
.pipe(operators.pairwise())
|
|
4957
|
-
.subscribe(function (
|
|
4958
|
-
var
|
|
4959
|
-
var
|
|
4960
|
-
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (
|
|
4961
|
-
_this.formData = Object.assign(Object.assign({}, _this.formData), (
|
|
4963
|
+
.subscribe(function (_7) {
|
|
4964
|
+
var _8, _9;
|
|
4965
|
+
var _10 = __read(_7, 2), previousValue = _10[0], currentValue = _10[1];
|
|
4966
|
+
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (_8 = {}, _8[field.key] = convertFormFieldValueToStandardFormat(field, previousValue), _8));
|
|
4967
|
+
_this.formData = Object.assign(Object.assign({}, _this.formData), (_9 = {}, _9[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _9));
|
|
4962
4968
|
if (field.type === EFieldType.FILE) {
|
|
4963
4969
|
_this.files[field.key] = currentValue;
|
|
4964
4970
|
}
|
|
@@ -4975,26 +4981,26 @@
|
|
|
4975
4981
|
};
|
|
4976
4982
|
this_1 = this;
|
|
4977
4983
|
try {
|
|
4978
|
-
for (
|
|
4979
|
-
field =
|
|
4984
|
+
for (_10 = __values(this.formFields), _11 = _10.next(); !_11.done; _11 = _10.next()) {
|
|
4985
|
+
field = _11.value;
|
|
4980
4986
|
_loop_1(field);
|
|
4981
4987
|
}
|
|
4982
4988
|
}
|
|
4983
4989
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
4984
4990
|
finally {
|
|
4985
4991
|
try {
|
|
4986
|
-
if (
|
|
4992
|
+
if (_11 && !_11.done && (_15 = _10.return)) _15.call(_10);
|
|
4987
4993
|
}
|
|
4988
4994
|
finally { if (e_3) throw e_3.error; }
|
|
4989
4995
|
}
|
|
4990
|
-
|
|
4996
|
+
_17.label = 12;
|
|
4991
4997
|
case 12:
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4998
|
+
_17.trys.push([12, 18, 19, 20]);
|
|
4999
|
+
_12 = __values(this.formFields), _13 = _12.next();
|
|
5000
|
+
_17.label = 13;
|
|
4995
5001
|
case 13:
|
|
4996
|
-
if (!!
|
|
4997
|
-
field =
|
|
5002
|
+
if (!!_13.done) return [3 /*break*/, 17];
|
|
5003
|
+
field = _13.value;
|
|
4998
5004
|
if (!field.isFormElement) return [3 /*break*/, 16];
|
|
4999
5005
|
if (!kwikidToolkit.checkObjectKeyExists(field, "validation")) return [3 /*break*/, 15];
|
|
5000
5006
|
if (!field.validation.triggers.includes("ON_INIT")) return [3 /*break*/, 15];
|
|
@@ -5008,8 +5014,8 @@
|
|
|
5008
5014
|
}, this.takeAction.bind(this));
|
|
5009
5015
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
5010
5016
|
case 14:
|
|
5011
|
-
|
|
5012
|
-
|
|
5017
|
+
_17.sent();
|
|
5018
|
+
_17.label = 15;
|
|
5013
5019
|
case 15:
|
|
5014
5020
|
if (kwikidToolkit.checkObjectKeyExists(field, "connectedElements")) {
|
|
5015
5021
|
this.handleConnectedElements({
|
|
@@ -5017,18 +5023,18 @@
|
|
|
5017
5023
|
value: this.formGroup.controls[field.key].value
|
|
5018
5024
|
}, "ON_INIT");
|
|
5019
5025
|
}
|
|
5020
|
-
|
|
5026
|
+
_17.label = 16;
|
|
5021
5027
|
case 16:
|
|
5022
|
-
|
|
5028
|
+
_13 = _12.next();
|
|
5023
5029
|
return [3 /*break*/, 13];
|
|
5024
5030
|
case 17: return [3 /*break*/, 20];
|
|
5025
5031
|
case 18:
|
|
5026
|
-
e_2_1 =
|
|
5032
|
+
e_2_1 = _17.sent();
|
|
5027
5033
|
e_2 = { error: e_2_1 };
|
|
5028
5034
|
return [3 /*break*/, 20];
|
|
5029
5035
|
case 19:
|
|
5030
5036
|
try {
|
|
5031
|
-
if (
|
|
5037
|
+
if (_13 && !_13.done && (_16 = _12.return)) _16.call(_12);
|
|
5032
5038
|
}
|
|
5033
5039
|
finally { if (e_2) throw e_2.error; }
|
|
5034
5040
|
return [7 /*endfinally*/];
|
|
@@ -5066,10 +5072,10 @@
|
|
|
5066
5072
|
};
|
|
5067
5073
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroupActions = function (childFieldGroupConfig, parentField) {
|
|
5068
5074
|
return __awaiter(this, void 0, void 0, function () {
|
|
5069
|
-
var rulesMapping,
|
|
5070
|
-
var e_4,
|
|
5071
|
-
return __generator(this, function (
|
|
5072
|
-
switch (
|
|
5075
|
+
var rulesMapping, _7, _8, action, conditionSuccess, actions, e_4_1;
|
|
5076
|
+
var e_4, _9;
|
|
5077
|
+
return __generator(this, function (_10) {
|
|
5078
|
+
switch (_10.label) {
|
|
5073
5079
|
case 0:
|
|
5074
5080
|
if (!kwikidToolkit.checkObjectKeyExists(childFieldGroupConfig, "rules")) return [3 /*break*/, 8];
|
|
5075
5081
|
rulesMapping = new kwikidToolkit.Rule(childFieldGroupConfig.rules, {
|
|
@@ -5079,14 +5085,14 @@
|
|
|
5079
5085
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5080
5086
|
ALL_FORMS_DATA: this.allFormsData
|
|
5081
5087
|
}).mapping();
|
|
5082
|
-
|
|
5088
|
+
_10.label = 1;
|
|
5083
5089
|
case 1:
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5090
|
+
_10.trys.push([1, 6, 7, 8]);
|
|
5091
|
+
_7 = __values(childFieldGroupConfig.actions), _8 = _7.next();
|
|
5092
|
+
_10.label = 2;
|
|
5087
5093
|
case 2:
|
|
5088
|
-
if (!!
|
|
5089
|
-
action =
|
|
5094
|
+
if (!!_8.done) return [3 /*break*/, 5];
|
|
5095
|
+
action = _8.value;
|
|
5090
5096
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5091
5097
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5092
5098
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5099,19 +5105,19 @@
|
|
|
5099
5105
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
5100
5106
|
return [4 /*yield*/, actions.execute()];
|
|
5101
5107
|
case 3:
|
|
5102
|
-
|
|
5103
|
-
|
|
5108
|
+
_10.sent();
|
|
5109
|
+
_10.label = 4;
|
|
5104
5110
|
case 4:
|
|
5105
|
-
|
|
5111
|
+
_8 = _7.next();
|
|
5106
5112
|
return [3 /*break*/, 2];
|
|
5107
5113
|
case 5: return [3 /*break*/, 8];
|
|
5108
5114
|
case 6:
|
|
5109
|
-
e_4_1 =
|
|
5115
|
+
e_4_1 = _10.sent();
|
|
5110
5116
|
e_4 = { error: e_4_1 };
|
|
5111
5117
|
return [3 /*break*/, 8];
|
|
5112
5118
|
case 7:
|
|
5113
5119
|
try {
|
|
5114
|
-
if (
|
|
5120
|
+
if (_8 && !_8.done && (_9 = _7.return)) _9.call(_7);
|
|
5115
5121
|
}
|
|
5116
5122
|
finally { if (e_4) throw e_4.error; }
|
|
5117
5123
|
return [7 /*endfinally*/];
|
|
@@ -5122,15 +5128,15 @@
|
|
|
5122
5128
|
};
|
|
5123
5129
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroup = function (currentField, connectedFieldGroupConfig, eventType) {
|
|
5124
5130
|
return __awaiter(this, void 0, void 0, function () {
|
|
5125
|
-
return __generator(this, function (
|
|
5126
|
-
switch (
|
|
5131
|
+
return __generator(this, function (_7) {
|
|
5132
|
+
switch (_7.label) {
|
|
5127
5133
|
case 0:
|
|
5128
5134
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldGroupConfig, "triggers")) return [3 /*break*/, 2];
|
|
5129
5135
|
if (!connectedFieldGroupConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5130
5136
|
return [4 /*yield*/, this.handleConnectedElementFieldGroupActions(connectedFieldGroupConfig, currentField)];
|
|
5131
5137
|
case 1:
|
|
5132
|
-
|
|
5133
|
-
|
|
5138
|
+
_7.sent();
|
|
5139
|
+
_7.label = 2;
|
|
5134
5140
|
case 2: return [2 /*return*/];
|
|
5135
5141
|
}
|
|
5136
5142
|
});
|
|
@@ -5138,10 +5144,10 @@
|
|
|
5138
5144
|
};
|
|
5139
5145
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldActions = function (connectedFieldConfig, connectedField) {
|
|
5140
5146
|
return __awaiter(this, void 0, void 0, function () {
|
|
5141
|
-
var rulesMapping,
|
|
5142
|
-
var e_5,
|
|
5143
|
-
return __generator(this, function (
|
|
5144
|
-
switch (
|
|
5147
|
+
var rulesMapping, _7, _8, action, conditionSuccess, actions, e_5_1;
|
|
5148
|
+
var e_5, _9;
|
|
5149
|
+
return __generator(this, function (_10) {
|
|
5150
|
+
switch (_10.label) {
|
|
5145
5151
|
case 0:
|
|
5146
5152
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "rules")) return [3 /*break*/, 8];
|
|
5147
5153
|
rulesMapping = new kwikidToolkit.Rule(connectedFieldConfig.rules, {
|
|
@@ -5151,14 +5157,14 @@
|
|
|
5151
5157
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5152
5158
|
ALL_FORMS_DATA: this.allFormsData
|
|
5153
5159
|
}).mapping();
|
|
5154
|
-
|
|
5160
|
+
_10.label = 1;
|
|
5155
5161
|
case 1:
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5162
|
+
_10.trys.push([1, 6, 7, 8]);
|
|
5163
|
+
_7 = __values(connectedFieldConfig.actions), _8 = _7.next();
|
|
5164
|
+
_10.label = 2;
|
|
5159
5165
|
case 2:
|
|
5160
|
-
if (!!
|
|
5161
|
-
action =
|
|
5166
|
+
if (!!_8.done) return [3 /*break*/, 5];
|
|
5167
|
+
action = _8.value;
|
|
5162
5168
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5163
5169
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5164
5170
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5171,19 +5177,19 @@
|
|
|
5171
5177
|
}, this.takeAction.bind(this));
|
|
5172
5178
|
return [4 /*yield*/, actions.execute()];
|
|
5173
5179
|
case 3:
|
|
5174
|
-
|
|
5175
|
-
|
|
5180
|
+
_10.sent();
|
|
5181
|
+
_10.label = 4;
|
|
5176
5182
|
case 4:
|
|
5177
|
-
|
|
5183
|
+
_8 = _7.next();
|
|
5178
5184
|
return [3 /*break*/, 2];
|
|
5179
5185
|
case 5: return [3 /*break*/, 8];
|
|
5180
5186
|
case 6:
|
|
5181
|
-
e_5_1 =
|
|
5187
|
+
e_5_1 = _10.sent();
|
|
5182
5188
|
e_5 = { error: e_5_1 };
|
|
5183
5189
|
return [3 /*break*/, 8];
|
|
5184
5190
|
case 7:
|
|
5185
5191
|
try {
|
|
5186
|
-
if (
|
|
5192
|
+
if (_8 && !_8.done && (_9 = _7.return)) _9.call(_7);
|
|
5187
5193
|
}
|
|
5188
5194
|
finally { if (e_5) throw e_5.error; }
|
|
5189
5195
|
return [7 /*endfinally*/];
|
|
@@ -5195,16 +5201,16 @@
|
|
|
5195
5201
|
KwikIDFormViewComponent.prototype.handleConnectedElementFields = function (currentField, connectedFieldConfig, eventType, nested) {
|
|
5196
5202
|
return __awaiter(this, void 0, void 0, function () {
|
|
5197
5203
|
var connectedField;
|
|
5198
|
-
return __generator(this, function (
|
|
5199
|
-
switch (
|
|
5204
|
+
return __generator(this, function (_7) {
|
|
5205
|
+
switch (_7.label) {
|
|
5200
5206
|
case 0:
|
|
5201
5207
|
connectedField = getFormFieldByKey(this.formFields, connectedFieldConfig["key"]);
|
|
5202
5208
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "triggers")) return [3 /*break*/, 2];
|
|
5203
5209
|
if (!connectedFieldConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5204
5210
|
return [4 /*yield*/, this.handleConnectedElementFieldActions(connectedFieldConfig, connectedField)];
|
|
5205
5211
|
case 1:
|
|
5206
|
-
connectedField =
|
|
5207
|
-
|
|
5212
|
+
connectedField = _7.sent();
|
|
5213
|
+
_7.label = 2;
|
|
5208
5214
|
case 2:
|
|
5209
5215
|
if (kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "handleNestedFields")) {
|
|
5210
5216
|
if (connectedFieldConfig.handleNestedFields) {
|
|
@@ -5219,67 +5225,67 @@
|
|
|
5219
5225
|
KwikIDFormViewComponent.prototype.handleConnectedElements = function (e, eventType) {
|
|
5220
5226
|
return __awaiter(this, void 0, void 0, function () {
|
|
5221
5227
|
var currentField, connectedFieldGroups, connectedFieldGroups_1, connectedFieldGroups_1_1, connectedFieldGroupConfig, e_6_1, connectedFields, connectedFields_1, connectedFields_1_1, connectedFieldConfig, e_7_1;
|
|
5222
|
-
var e_6,
|
|
5223
|
-
return __generator(this, function (
|
|
5224
|
-
switch (
|
|
5228
|
+
var e_6, _7, e_7, _8;
|
|
5229
|
+
return __generator(this, function (_9) {
|
|
5230
|
+
switch (_9.label) {
|
|
5225
5231
|
case 0:
|
|
5226
5232
|
currentField = getFormFieldByKey(this.formFields, e.key);
|
|
5227
5233
|
if (!(currentField !== undefined)) return [3 /*break*/, 17];
|
|
5228
5234
|
if (!kwikidToolkit.checkObjectKeyExists(currentField, "connectedElements")) return [3 /*break*/, 16];
|
|
5229
5235
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFieldGroups")) return [3 /*break*/, 8];
|
|
5230
5236
|
connectedFieldGroups = currentField.connectedElements.connectedFieldGroups;
|
|
5231
|
-
|
|
5237
|
+
_9.label = 1;
|
|
5232
5238
|
case 1:
|
|
5233
|
-
|
|
5239
|
+
_9.trys.push([1, 6, 7, 8]);
|
|
5234
5240
|
connectedFieldGroups_1 = __values(connectedFieldGroups), connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5235
|
-
|
|
5241
|
+
_9.label = 2;
|
|
5236
5242
|
case 2:
|
|
5237
5243
|
if (!!connectedFieldGroups_1_1.done) return [3 /*break*/, 5];
|
|
5238
5244
|
connectedFieldGroupConfig = connectedFieldGroups_1_1.value;
|
|
5239
5245
|
return [4 /*yield*/, this.handleConnectedElementFieldGroup(currentField, connectedFieldGroupConfig, eventType)];
|
|
5240
5246
|
case 3:
|
|
5241
|
-
|
|
5242
|
-
|
|
5247
|
+
_9.sent();
|
|
5248
|
+
_9.label = 4;
|
|
5243
5249
|
case 4:
|
|
5244
5250
|
connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5245
5251
|
return [3 /*break*/, 2];
|
|
5246
5252
|
case 5: return [3 /*break*/, 8];
|
|
5247
5253
|
case 6:
|
|
5248
|
-
e_6_1 =
|
|
5254
|
+
e_6_1 = _9.sent();
|
|
5249
5255
|
e_6 = { error: e_6_1 };
|
|
5250
5256
|
return [3 /*break*/, 8];
|
|
5251
5257
|
case 7:
|
|
5252
5258
|
try {
|
|
5253
|
-
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (
|
|
5259
|
+
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (_7 = connectedFieldGroups_1.return)) _7.call(connectedFieldGroups_1);
|
|
5254
5260
|
}
|
|
5255
5261
|
finally { if (e_6) throw e_6.error; }
|
|
5256
5262
|
return [7 /*endfinally*/];
|
|
5257
5263
|
case 8:
|
|
5258
5264
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFields")) return [3 /*break*/, 16];
|
|
5259
5265
|
connectedFields = currentField.connectedElements.connectedFields;
|
|
5260
|
-
|
|
5266
|
+
_9.label = 9;
|
|
5261
5267
|
case 9:
|
|
5262
|
-
|
|
5268
|
+
_9.trys.push([9, 14, 15, 16]);
|
|
5263
5269
|
connectedFields_1 = __values(connectedFields), connectedFields_1_1 = connectedFields_1.next();
|
|
5264
|
-
|
|
5270
|
+
_9.label = 10;
|
|
5265
5271
|
case 10:
|
|
5266
5272
|
if (!!connectedFields_1_1.done) return [3 /*break*/, 13];
|
|
5267
5273
|
connectedFieldConfig = connectedFields_1_1.value;
|
|
5268
5274
|
return [4 /*yield*/, this.handleConnectedElementFields(currentField, connectedFieldConfig, eventType, eventType)];
|
|
5269
5275
|
case 11:
|
|
5270
|
-
currentField =
|
|
5271
|
-
|
|
5276
|
+
currentField = _9.sent();
|
|
5277
|
+
_9.label = 12;
|
|
5272
5278
|
case 12:
|
|
5273
5279
|
connectedFields_1_1 = connectedFields_1.next();
|
|
5274
5280
|
return [3 /*break*/, 10];
|
|
5275
5281
|
case 13: return [3 /*break*/, 16];
|
|
5276
5282
|
case 14:
|
|
5277
|
-
e_7_1 =
|
|
5283
|
+
e_7_1 = _9.sent();
|
|
5278
5284
|
e_7 = { error: e_7_1 };
|
|
5279
5285
|
return [3 /*break*/, 16];
|
|
5280
5286
|
case 15:
|
|
5281
5287
|
try {
|
|
5282
|
-
if (connectedFields_1_1 && !connectedFields_1_1.done && (
|
|
5288
|
+
if (connectedFields_1_1 && !connectedFields_1_1.done && (_8 = connectedFields_1.return)) _8.call(connectedFields_1);
|
|
5283
5289
|
}
|
|
5284
5290
|
finally { if (e_7) throw e_7.error; }
|
|
5285
5291
|
return [7 /*endfinally*/];
|
|
@@ -5291,15 +5297,15 @@
|
|
|
5291
5297
|
});
|
|
5292
5298
|
};
|
|
5293
5299
|
KwikIDFormViewComponent.prototype.handleRemovedFile = function (e) {
|
|
5294
|
-
var
|
|
5300
|
+
var _7;
|
|
5295
5301
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5296
5302
|
this.showApiLoader();
|
|
5297
5303
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
5298
5304
|
this.files[e.key] = e.files;
|
|
5299
5305
|
this.formData[e.key] = filterDuplicatesFiles(this.files[e.key]);
|
|
5300
|
-
this.formGroup.patchValue((
|
|
5301
|
-
|
|
5302
|
-
|
|
5306
|
+
this.formGroup.patchValue((_7 = {},
|
|
5307
|
+
_7[e.key] = this.formData[e.key],
|
|
5308
|
+
_7), { emitEvent: false });
|
|
5303
5309
|
}
|
|
5304
5310
|
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 })));
|
|
5305
5311
|
this.hideApiLoader();
|
|
@@ -5308,9 +5314,9 @@
|
|
|
5308
5314
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5309
5315
|
return __awaiter(this, void 0, void 0, function () {
|
|
5310
5316
|
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;
|
|
5311
|
-
var e_8,
|
|
5312
|
-
return __generator(this, function (
|
|
5313
|
-
switch (
|
|
5317
|
+
var e_8, _7, e_9, _8;
|
|
5318
|
+
return __generator(this, function (_9) {
|
|
5319
|
+
switch (_9.label) {
|
|
5314
5320
|
case 0:
|
|
5315
5321
|
this.showApiLoader();
|
|
5316
5322
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
@@ -5318,42 +5324,42 @@
|
|
|
5318
5324
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
5319
5325
|
kwikidToolkit.checkObjectKeyExists(field.properties, "uploadFileToServer") &&
|
|
5320
5326
|
field.properties.uploadFileToServer)) return [3 /*break*/, 9];
|
|
5321
|
-
|
|
5327
|
+
_9.label = 1;
|
|
5322
5328
|
case 1:
|
|
5323
|
-
|
|
5329
|
+
_9.trys.push([1, 6, 7, 8]);
|
|
5324
5330
|
values_1 = __values(values), values_1_1 = values_1.next();
|
|
5325
|
-
|
|
5331
|
+
_9.label = 2;
|
|
5326
5332
|
case 2:
|
|
5327
5333
|
if (!!values_1_1.done) return [3 /*break*/, 5];
|
|
5328
5334
|
value = values_1_1.value;
|
|
5329
5335
|
return [4 /*yield*/, this.uploadFile(field, value)];
|
|
5330
5336
|
case 3:
|
|
5331
|
-
|
|
5332
|
-
|
|
5337
|
+
_9.sent();
|
|
5338
|
+
_9.label = 4;
|
|
5333
5339
|
case 4:
|
|
5334
5340
|
values_1_1 = values_1.next();
|
|
5335
5341
|
return [3 /*break*/, 2];
|
|
5336
5342
|
case 5: return [3 /*break*/, 8];
|
|
5337
5343
|
case 6:
|
|
5338
|
-
e_8_1 =
|
|
5344
|
+
e_8_1 = _9.sent();
|
|
5339
5345
|
e_8 = { error: e_8_1 };
|
|
5340
5346
|
return [3 /*break*/, 8];
|
|
5341
5347
|
case 7:
|
|
5342
5348
|
try {
|
|
5343
|
-
if (values_1_1 && !values_1_1.done && (
|
|
5349
|
+
if (values_1_1 && !values_1_1.done && (_7 = values_1.return)) _7.call(values_1);
|
|
5344
5350
|
}
|
|
5345
5351
|
finally { if (e_8) throw e_8.error; }
|
|
5346
5352
|
return [7 /*endfinally*/];
|
|
5347
5353
|
case 8: return [3 /*break*/, 18];
|
|
5348
5354
|
case 9:
|
|
5349
5355
|
_loop_2 = function (value) {
|
|
5350
|
-
var updatedFile,
|
|
5351
|
-
return __generator(this, function (
|
|
5352
|
-
switch (
|
|
5356
|
+
var updatedFile, _10;
|
|
5357
|
+
return __generator(this, function (_11) {
|
|
5358
|
+
switch (_11.label) {
|
|
5353
5359
|
case 0:
|
|
5354
5360
|
this_2.updateFiles(value, "LOADING", e.key);
|
|
5355
5361
|
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 })));
|
|
5356
|
-
|
|
5362
|
+
_10 = kwikidToolkit.getObjectDeepCopy;
|
|
5357
5363
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
5358
5364
|
setTimeout(function () {
|
|
5359
5365
|
resolve({
|
|
@@ -5367,42 +5373,42 @@
|
|
|
5367
5373
|
}, 300); // 1000 ms = 1 sec
|
|
5368
5374
|
})];
|
|
5369
5375
|
case 1:
|
|
5370
|
-
updatedFile =
|
|
5376
|
+
updatedFile = _10.apply(void 0, [_11.sent()]);
|
|
5371
5377
|
this_2.updateFiles(updatedFile, "NORMAL", e.key);
|
|
5372
5378
|
return [2 /*return*/];
|
|
5373
5379
|
}
|
|
5374
5380
|
});
|
|
5375
5381
|
};
|
|
5376
5382
|
this_2 = this;
|
|
5377
|
-
|
|
5383
|
+
_9.label = 10;
|
|
5378
5384
|
case 10:
|
|
5379
|
-
|
|
5385
|
+
_9.trys.push([10, 15, 16, 17]);
|
|
5380
5386
|
values_2 = __values(values), values_2_1 = values_2.next();
|
|
5381
|
-
|
|
5387
|
+
_9.label = 11;
|
|
5382
5388
|
case 11:
|
|
5383
5389
|
if (!!values_2_1.done) return [3 /*break*/, 14];
|
|
5384
5390
|
value = values_2_1.value;
|
|
5385
5391
|
return [5 /*yield**/, _loop_2(value)];
|
|
5386
5392
|
case 12:
|
|
5387
|
-
|
|
5388
|
-
|
|
5393
|
+
_9.sent();
|
|
5394
|
+
_9.label = 13;
|
|
5389
5395
|
case 13:
|
|
5390
5396
|
values_2_1 = values_2.next();
|
|
5391
5397
|
return [3 /*break*/, 11];
|
|
5392
5398
|
case 14: return [3 /*break*/, 17];
|
|
5393
5399
|
case 15:
|
|
5394
|
-
e_9_1 =
|
|
5400
|
+
e_9_1 = _9.sent();
|
|
5395
5401
|
e_9 = { error: e_9_1 };
|
|
5396
5402
|
return [3 /*break*/, 17];
|
|
5397
5403
|
case 16:
|
|
5398
5404
|
try {
|
|
5399
|
-
if (values_2_1 && !values_2_1.done && (
|
|
5405
|
+
if (values_2_1 && !values_2_1.done && (_8 = values_2.return)) _8.call(values_2);
|
|
5400
5406
|
}
|
|
5401
5407
|
finally { if (e_9) throw e_9.error; }
|
|
5402
5408
|
return [7 /*endfinally*/];
|
|
5403
5409
|
case 17:
|
|
5404
5410
|
this.hideApiLoader();
|
|
5405
|
-
|
|
5411
|
+
_9.label = 18;
|
|
5406
5412
|
case 18: return [2 /*return*/];
|
|
5407
5413
|
}
|
|
5408
5414
|
});
|
|
@@ -5410,16 +5416,16 @@
|
|
|
5410
5416
|
};
|
|
5411
5417
|
/** Methods for Camera related fields like 'CAPTURE' or 'RECORD' */
|
|
5412
5418
|
KwikIDFormViewComponent.prototype.handleOnClickGetRemovedMediaFile = function (e) {
|
|
5413
|
-
var
|
|
5419
|
+
var _7;
|
|
5414
5420
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5415
5421
|
this.showApiLoader();
|
|
5416
5422
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
5417
5423
|
this.resetCamera();
|
|
5418
5424
|
this.mediaFiles[e.key] = e.mediaFiles;
|
|
5419
5425
|
this.formData[e.key] = filterDuplicatesMediaFiles(this.mediaFiles[e.key]);
|
|
5420
|
-
this.formGroup.patchValue((
|
|
5421
|
-
|
|
5422
|
-
|
|
5426
|
+
this.formGroup.patchValue((_7 = {},
|
|
5427
|
+
_7[e.key] = this.formData[e.key],
|
|
5428
|
+
_7), { emitEvent: false });
|
|
5423
5429
|
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 })));
|
|
5424
5430
|
}
|
|
5425
5431
|
this.hideApiLoader();
|
|
@@ -5427,9 +5433,9 @@
|
|
|
5427
5433
|
KwikIDFormViewComponent.prototype.handleOnClickInputCamera = function (e, field) {
|
|
5428
5434
|
var _a, _b, _c, _d, _e, _f;
|
|
5429
5435
|
return __awaiter(this, void 0, void 0, function () {
|
|
5430
|
-
var fieldKey, fieldcameraConfig,
|
|
5431
|
-
return __generator(this, function (
|
|
5432
|
-
switch (
|
|
5436
|
+
var fieldKey, fieldcameraConfig, _7, cameraHelper, _8, _9;
|
|
5437
|
+
return __generator(this, function (_10) {
|
|
5438
|
+
switch (_10.label) {
|
|
5433
5439
|
case 0:
|
|
5434
5440
|
this.loaderService.show({
|
|
5435
5441
|
loaderText: "Loading Camera...",
|
|
@@ -5444,8 +5450,8 @@
|
|
|
5444
5450
|
field_type: field.type,
|
|
5445
5451
|
camera_type: this.cameraType
|
|
5446
5452
|
});
|
|
5447
|
-
|
|
5448
|
-
switch (
|
|
5453
|
+
_7 = this.cameraType;
|
|
5454
|
+
switch (_7) {
|
|
5449
5455
|
case "CAPTURE": return [3 /*break*/, 1];
|
|
5450
5456
|
case "RECORD": return [3 /*break*/, 5];
|
|
5451
5457
|
}
|
|
@@ -5458,16 +5464,16 @@
|
|
|
5458
5464
|
if (!(((_d = (_c = this.cameraConfig) === null || _c === void 0 ? void 0 : _c.others) === null || _d === void 0 ? void 0 : _d.isWatermark) ||
|
|
5459
5465
|
((_f = (_e = this.cameraConfig) === null || _e === void 0 ? void 0 : _e.others) === null || _f === void 0 ? void 0 : _f.isWatermarkForImageUpload))) return [3 /*break*/, 3];
|
|
5460
5466
|
cameraHelper = new CameraHelper(field, this.formFields, this.allFormsData, this.formData, this.previousFormData);
|
|
5461
|
-
|
|
5462
|
-
|
|
5467
|
+
_8 = this;
|
|
5468
|
+
_9 = {};
|
|
5463
5469
|
return [4 /*yield*/, cameraHelper.getCameraWatermarkData()];
|
|
5464
5470
|
case 2:
|
|
5465
|
-
|
|
5466
|
-
|
|
5471
|
+
_8.cameraData = (_9.watermark = _10.sent(),
|
|
5472
|
+
_9);
|
|
5467
5473
|
return [3 /*break*/, 4];
|
|
5468
5474
|
case 3:
|
|
5469
5475
|
this.cameraData = undefined;
|
|
5470
|
-
|
|
5476
|
+
_10.label = 4;
|
|
5471
5477
|
case 4: return [3 /*break*/, 7];
|
|
5472
5478
|
case 5:
|
|
5473
5479
|
this.cameraConfig = kwikidToolkit.mergeObjectsDeep([
|
|
@@ -5494,10 +5500,10 @@
|
|
|
5494
5500
|
KwikIDFormViewComponent.prototype.setCameraMedia = function (media) {
|
|
5495
5501
|
return __awaiter(this, void 0, void 0, function () {
|
|
5496
5502
|
var field, validations_4;
|
|
5497
|
-
var
|
|
5503
|
+
var _7;
|
|
5498
5504
|
var _this = this;
|
|
5499
|
-
return __generator(this, function (
|
|
5500
|
-
switch (
|
|
5505
|
+
return __generator(this, function (_8) {
|
|
5506
|
+
switch (_8.label) {
|
|
5501
5507
|
case 0:
|
|
5502
5508
|
field = getFormFieldByKey(this.formFields, this.cameraFieldKey);
|
|
5503
5509
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
@@ -5505,7 +5511,7 @@
|
|
|
5505
5511
|
field.properties.uploadFileToServer)) return [3 /*break*/, 2];
|
|
5506
5512
|
return [4 /*yield*/, this.uploadFile(field, media)];
|
|
5507
5513
|
case 1:
|
|
5508
|
-
|
|
5514
|
+
_8.sent();
|
|
5509
5515
|
return [3 /*break*/, 3];
|
|
5510
5516
|
case 2:
|
|
5511
5517
|
this.resetCamera();
|
|
@@ -5515,9 +5521,9 @@
|
|
|
5515
5521
|
emitEvent: false,
|
|
5516
5522
|
onlySelf: false
|
|
5517
5523
|
});
|
|
5518
|
-
this.formGroup.patchValue((
|
|
5519
|
-
|
|
5520
|
-
|
|
5524
|
+
this.formGroup.patchValue((_7 = {},
|
|
5525
|
+
_7[field.key] = kwikidToolkit.getObjectDeepCopy([media]),
|
|
5526
|
+
_7), { emitEvent: false });
|
|
5521
5527
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
5522
5528
|
emitEvent: false
|
|
5523
5529
|
});
|
|
@@ -5537,11 +5543,11 @@
|
|
|
5537
5543
|
ALL_FORMS_DATA: this.allFormsData
|
|
5538
5544
|
}, this.takeAction.bind(this));
|
|
5539
5545
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5540
|
-
return __generator(this, function (
|
|
5541
|
-
switch (
|
|
5546
|
+
return __generator(this, function (_7) {
|
|
5547
|
+
switch (_7.label) {
|
|
5542
5548
|
case 0: return [4 /*yield*/, validations_4.validate(field.validation)];
|
|
5543
5549
|
case 1:
|
|
5544
|
-
|
|
5550
|
+
_7.sent();
|
|
5545
5551
|
return [2 /*return*/];
|
|
5546
5552
|
}
|
|
5547
5553
|
});
|
|
@@ -5558,7 +5564,7 @@
|
|
|
5558
5564
|
field_key: field.key,
|
|
5559
5565
|
field_type: field.type
|
|
5560
5566
|
});
|
|
5561
|
-
|
|
5567
|
+
_8.label = 3;
|
|
5562
5568
|
case 3: return [2 /*return*/];
|
|
5563
5569
|
}
|
|
5564
5570
|
});
|
|
@@ -5670,7 +5676,7 @@
|
|
|
5670
5676
|
* 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.
|
|
5671
5677
|
*/
|
|
5672
5678
|
KwikIDFormViewComponent.prototype.updateFiles = function (file, state, key) {
|
|
5673
|
-
var
|
|
5679
|
+
var _7;
|
|
5674
5680
|
var _this = this;
|
|
5675
5681
|
var _a;
|
|
5676
5682
|
var fileWithState = kwikidToolkit.mergeObjects(file, { state: state });
|
|
@@ -5698,9 +5704,9 @@
|
|
|
5698
5704
|
emitEvent: false,
|
|
5699
5705
|
onlySelf: false
|
|
5700
5706
|
});
|
|
5701
|
-
this.formGroup.patchValue((
|
|
5702
|
-
|
|
5703
|
-
|
|
5707
|
+
this.formGroup.patchValue((_7 = {},
|
|
5708
|
+
_7[key] = normalFiles,
|
|
5709
|
+
_7), { emitEvent: false });
|
|
5704
5710
|
this.getUnsavedDataState.emit(true);
|
|
5705
5711
|
if (field.isFormElement &&
|
|
5706
5712
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -5714,11 +5720,11 @@
|
|
|
5714
5720
|
ALL_FORMS_DATA: this.allFormsData
|
|
5715
5721
|
}, this.takeAction.bind(this));
|
|
5716
5722
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5717
|
-
return __generator(this, function (
|
|
5718
|
-
switch (
|
|
5723
|
+
return __generator(this, function (_7) {
|
|
5724
|
+
switch (_7.label) {
|
|
5719
5725
|
case 0: return [4 /*yield*/, validations_5.validate(field.validation)];
|
|
5720
5726
|
case 1:
|
|
5721
|
-
|
|
5727
|
+
_7.sent();
|
|
5722
5728
|
return [2 /*return*/];
|
|
5723
5729
|
}
|
|
5724
5730
|
});
|
|
@@ -5737,11 +5743,11 @@
|
|
|
5737
5743
|
*/
|
|
5738
5744
|
KwikIDFormViewComponent.prototype.uploadFile = function (field, file) {
|
|
5739
5745
|
return __awaiter(this, void 0, void 0, function () {
|
|
5740
|
-
return __generator(this, function (
|
|
5746
|
+
return __generator(this, function (_7) {
|
|
5741
5747
|
switch (field.type) {
|
|
5742
5748
|
case EFieldType.FILE:
|
|
5743
5749
|
this.updateFiles(file, "LOADING", field.key);
|
|
5744
|
-
this.triggerLogs(ELogEventType$1.
|
|
5750
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_UPLOAD_FILE, {
|
|
5745
5751
|
field_key: field.key,
|
|
5746
5752
|
field_type: field.type,
|
|
5747
5753
|
request: kwikidToolkit.getObjectDeepCopy({
|
|
@@ -5775,7 +5781,7 @@
|
|
|
5775
5781
|
break;
|
|
5776
5782
|
case EFieldType.CAPTURE:
|
|
5777
5783
|
// Actual API Call
|
|
5778
|
-
this.triggerLogs(ELogEventType$1.
|
|
5784
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_UPLOAD_IMAGE, {
|
|
5779
5785
|
field_key: field.key,
|
|
5780
5786
|
field_type: field.type,
|
|
5781
5787
|
request: {
|
|
@@ -5797,7 +5803,7 @@
|
|
|
5797
5803
|
break;
|
|
5798
5804
|
case EFieldType.RECORD:
|
|
5799
5805
|
// Actual API Call
|
|
5800
|
-
this.triggerLogs(ELogEventType$1.
|
|
5806
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_UPLOAD_VIDEO, {
|
|
5801
5807
|
field_key: field.key,
|
|
5802
5808
|
field_type: field.type,
|
|
5803
5809
|
request: {
|
|
@@ -5823,11 +5829,11 @@
|
|
|
5823
5829
|
});
|
|
5824
5830
|
};
|
|
5825
5831
|
KwikIDFormViewComponent.prototype.handleOnClickFormFieldButton = function (field) {
|
|
5826
|
-
var e_10,
|
|
5832
|
+
var e_10, _7;
|
|
5827
5833
|
var formData = this.formGroup.getRawValue();
|
|
5828
5834
|
try {
|
|
5829
|
-
for (var
|
|
5830
|
-
var field_3 =
|
|
5835
|
+
for (var _8 = __values(this.formFields), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
5836
|
+
var field_3 = _9.value;
|
|
5831
5837
|
if (field_3.isFormElement) {
|
|
5832
5838
|
if (field_3.hidden) {
|
|
5833
5839
|
delete formData[field_3.key];
|
|
@@ -5841,22 +5847,22 @@
|
|
|
5841
5847
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
5842
5848
|
finally {
|
|
5843
5849
|
try {
|
|
5844
|
-
if (
|
|
5850
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
5845
5851
|
}
|
|
5846
5852
|
finally { if (e_10) throw e_10.error; }
|
|
5847
5853
|
}
|
|
5848
5854
|
var extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
5849
|
-
var
|
|
5855
|
+
var _7;
|
|
5850
5856
|
if (field.isFormElement && !field.hidden) {
|
|
5851
|
-
var fieldData = (
|
|
5852
|
-
|
|
5857
|
+
var fieldData = (_7 = {},
|
|
5858
|
+
_7[field.key] = {
|
|
5853
5859
|
key: field.key,
|
|
5854
5860
|
label: field.label,
|
|
5855
5861
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
5856
5862
|
type: field.type,
|
|
5857
5863
|
index: index
|
|
5858
5864
|
},
|
|
5859
|
-
|
|
5865
|
+
_7);
|
|
5860
5866
|
result[field.key] = fieldData[field.key];
|
|
5861
5867
|
}
|
|
5862
5868
|
return result;
|
|
@@ -5874,11 +5880,11 @@
|
|
|
5874
5880
|
};
|
|
5875
5881
|
// DOM Event Handlers
|
|
5876
5882
|
KwikIDFormViewComponent.prototype.handleGetKeyValue = function (e) {
|
|
5877
|
-
var
|
|
5883
|
+
var _7;
|
|
5878
5884
|
var _this = this;
|
|
5879
|
-
this.formGroup.patchValue((
|
|
5880
|
-
|
|
5881
|
-
|
|
5885
|
+
this.formGroup.patchValue((_7 = {},
|
|
5886
|
+
_7[e.key] = e.value,
|
|
5887
|
+
_7), { emitEvent: false });
|
|
5882
5888
|
var field = getFormFieldByKey(this.formFields, e.key);
|
|
5883
5889
|
this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
|
|
5884
5890
|
this.getUnsavedDataState.emit(true);
|
|
@@ -5894,11 +5900,11 @@
|
|
|
5894
5900
|
ALL_FORMS_DATA: this.allFormsData
|
|
5895
5901
|
}, this.takeAction.bind(this));
|
|
5896
5902
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5897
|
-
return __generator(this, function (
|
|
5898
|
-
switch (
|
|
5903
|
+
return __generator(this, function (_7) {
|
|
5904
|
+
switch (_7.label) {
|
|
5899
5905
|
case 0: return [4 /*yield*/, validations_6.validate(field.validation)];
|
|
5900
5906
|
case 1:
|
|
5901
|
-
|
|
5907
|
+
_7.sent();
|
|
5902
5908
|
return [2 /*return*/];
|
|
5903
5909
|
}
|
|
5904
5910
|
});
|
|
@@ -5917,30 +5923,30 @@
|
|
|
5917
5923
|
return __awaiter(this, void 0, void 0, function () {
|
|
5918
5924
|
var resetFormFields, BYPASS_RESET_CONFIRM, CONFIRM_RESET;
|
|
5919
5925
|
var _this = this;
|
|
5920
|
-
return __generator(this, function (
|
|
5926
|
+
return __generator(this, function (_7) {
|
|
5921
5927
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_RESET_BUTTON_CLICK, {
|
|
5922
5928
|
field_key: field.key
|
|
5923
5929
|
});
|
|
5924
5930
|
resetFormFields = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5925
|
-
var
|
|
5926
|
-
var e_12,
|
|
5927
|
-
return __generator(this, function (
|
|
5928
|
-
switch (
|
|
5931
|
+
var _7, _8, f, _9, _10, action, resetField, actions, e_11_1, e_12_1;
|
|
5932
|
+
var e_12, _11, e_11, _12;
|
|
5933
|
+
return __generator(this, function (_13) {
|
|
5934
|
+
switch (_13.label) {
|
|
5929
5935
|
case 0:
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5936
|
+
_13.trys.push([0, 11, 12, 13]);
|
|
5937
|
+
_7 = __values(field.reset.fields), _8 = _7.next();
|
|
5938
|
+
_13.label = 1;
|
|
5933
5939
|
case 1:
|
|
5934
|
-
if (!!
|
|
5935
|
-
f =
|
|
5936
|
-
|
|
5940
|
+
if (!!_8.done) return [3 /*break*/, 10];
|
|
5941
|
+
f = _8.value;
|
|
5942
|
+
_13.label = 2;
|
|
5937
5943
|
case 2:
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5944
|
+
_13.trys.push([2, 7, 8, 9]);
|
|
5945
|
+
_9 = (e_11 = void 0, __values(f.actions)), _10 = _9.next();
|
|
5946
|
+
_13.label = 3;
|
|
5941
5947
|
case 3:
|
|
5942
|
-
if (!!
|
|
5943
|
-
action =
|
|
5948
|
+
if (!!_10.done) return [3 /*break*/, 6];
|
|
5949
|
+
action = _10.value;
|
|
5944
5950
|
resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
5945
5951
|
actions = new kwikidToolkit.Action(action, {}, {
|
|
5946
5952
|
FIELD_CONFIG: resetField,
|
|
@@ -5952,33 +5958,33 @@
|
|
|
5952
5958
|
}, this.takeAction.bind(this));
|
|
5953
5959
|
return [4 /*yield*/, actions.execute()];
|
|
5954
5960
|
case 4:
|
|
5955
|
-
|
|
5956
|
-
|
|
5961
|
+
_13.sent();
|
|
5962
|
+
_13.label = 5;
|
|
5957
5963
|
case 5:
|
|
5958
|
-
|
|
5964
|
+
_10 = _9.next();
|
|
5959
5965
|
return [3 /*break*/, 3];
|
|
5960
5966
|
case 6: return [3 /*break*/, 9];
|
|
5961
5967
|
case 7:
|
|
5962
|
-
e_11_1 =
|
|
5968
|
+
e_11_1 = _13.sent();
|
|
5963
5969
|
e_11 = { error: e_11_1 };
|
|
5964
5970
|
return [3 /*break*/, 9];
|
|
5965
5971
|
case 8:
|
|
5966
5972
|
try {
|
|
5967
|
-
if (
|
|
5973
|
+
if (_10 && !_10.done && (_12 = _9.return)) _12.call(_9);
|
|
5968
5974
|
}
|
|
5969
5975
|
finally { if (e_11) throw e_11.error; }
|
|
5970
5976
|
return [7 /*endfinally*/];
|
|
5971
5977
|
case 9:
|
|
5972
|
-
|
|
5978
|
+
_8 = _7.next();
|
|
5973
5979
|
return [3 /*break*/, 1];
|
|
5974
5980
|
case 10: return [3 /*break*/, 13];
|
|
5975
5981
|
case 11:
|
|
5976
|
-
e_12_1 =
|
|
5982
|
+
e_12_1 = _13.sent();
|
|
5977
5983
|
e_12 = { error: e_12_1 };
|
|
5978
5984
|
return [3 /*break*/, 13];
|
|
5979
5985
|
case 12:
|
|
5980
5986
|
try {
|
|
5981
|
-
if (
|
|
5987
|
+
if (_8 && !_8.done && (_11 = _7.return)) _11.call(_7);
|
|
5982
5988
|
}
|
|
5983
5989
|
finally { if (e_12) throw e_12.error; }
|
|
5984
5990
|
return [7 /*endfinally*/];
|
|
@@ -6003,9 +6009,9 @@
|
|
|
6003
6009
|
KwikIDFormViewComponent.prototype.handleFieldApiCall = function (field, api) {
|
|
6004
6010
|
return __awaiter(this, void 0, void 0, function () {
|
|
6005
6011
|
var apis;
|
|
6006
|
-
var
|
|
6007
|
-
return __generator(this, function (
|
|
6008
|
-
switch (
|
|
6012
|
+
var _7, _8;
|
|
6013
|
+
return __generator(this, function (_9) {
|
|
6014
|
+
switch (_9.label) {
|
|
6009
6015
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
6010
6016
|
FIELD_CONFIG: field,
|
|
6011
6017
|
API_CONFIG: api,
|
|
@@ -6016,13 +6022,13 @@
|
|
|
6016
6022
|
ALL_FORMS_DATA: this.allFormsData
|
|
6017
6023
|
})];
|
|
6018
6024
|
case 1:
|
|
6019
|
-
api =
|
|
6025
|
+
api = _9.sent();
|
|
6020
6026
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
6021
6027
|
if (kwikidToolkit.checkObjectKeyExists(field.api, "request")) {
|
|
6022
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
6023
|
-
this.formGroup.patchValue((
|
|
6024
|
-
|
|
6025
|
-
|
|
6028
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_7 = {}, _7[field.key] = api.response.value, _7));
|
|
6029
|
+
this.formGroup.patchValue((_8 = {},
|
|
6030
|
+
_8[field.key] = api.response.value,
|
|
6031
|
+
_8), { emitEvent: false });
|
|
6026
6032
|
}
|
|
6027
6033
|
apis = new Apis({
|
|
6028
6034
|
FIELD_CONFIG: field,
|
|
@@ -6036,14 +6042,14 @@
|
|
|
6036
6042
|
}, this.takeAction.bind(this));
|
|
6037
6043
|
return [4 /*yield*/, apis.validateResponse()];
|
|
6038
6044
|
case 2:
|
|
6039
|
-
api =
|
|
6045
|
+
api = _9.sent();
|
|
6040
6046
|
return [3 /*break*/, 4];
|
|
6041
6047
|
case 3:
|
|
6042
6048
|
setTimeout(function () {
|
|
6043
6049
|
field["api"]["status"]["value"] = EApiStatusType.FAILED;
|
|
6044
6050
|
field["showLoader"] = false;
|
|
6045
6051
|
}, 500);
|
|
6046
|
-
|
|
6052
|
+
_9.label = 4;
|
|
6047
6053
|
case 4: return [2 /*return*/, { field: field, api: api }];
|
|
6048
6054
|
}
|
|
6049
6055
|
});
|
|
@@ -6052,8 +6058,8 @@
|
|
|
6052
6058
|
KwikIDFormViewComponent.prototype.handleApiCall = function (api) {
|
|
6053
6059
|
return __awaiter(this, void 0, void 0, function () {
|
|
6054
6060
|
var apis;
|
|
6055
|
-
return __generator(this, function (
|
|
6056
|
-
switch (
|
|
6061
|
+
return __generator(this, function (_7) {
|
|
6062
|
+
switch (_7.label) {
|
|
6057
6063
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
6058
6064
|
FORM_CONFIG: this.formConfig,
|
|
6059
6065
|
API_CONFIG: api,
|
|
@@ -6064,7 +6070,7 @@
|
|
|
6064
6070
|
ALL_FORMS_DATA: this.allFormsData
|
|
6065
6071
|
})];
|
|
6066
6072
|
case 1:
|
|
6067
|
-
api =
|
|
6073
|
+
api = _7.sent();
|
|
6068
6074
|
apis = new Apis({
|
|
6069
6075
|
FORM_CONFIG: this.formConfig,
|
|
6070
6076
|
API_CONFIG: api,
|
|
@@ -6077,38 +6083,38 @@
|
|
|
6077
6083
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
6078
6084
|
return [4 /*yield*/, apis.validateResponse()];
|
|
6079
6085
|
case 2:
|
|
6080
|
-
api =
|
|
6081
|
-
|
|
6086
|
+
api = _7.sent();
|
|
6087
|
+
_7.label = 3;
|
|
6082
6088
|
case 3: return [2 /*return*/, { api: api }];
|
|
6083
6089
|
}
|
|
6084
6090
|
});
|
|
6085
6091
|
});
|
|
6086
6092
|
};
|
|
6087
6093
|
KwikIDFormViewComponent.prototype.executeApiCall = function (api, object) {
|
|
6088
|
-
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;
|
|
6094
|
+
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;
|
|
6089
6095
|
return __awaiter(this, void 0, void 0, function () {
|
|
6090
|
-
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers, response, err_1, body, isSecure, response, isSecure_1, encryptedResponse, decryptedResponse, err_2;
|
|
6091
|
-
return __generator(this, function (
|
|
6092
|
-
switch (
|
|
6096
|
+
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers, response, isSecure, encryptedResponse, decryptedResponse, err_1, body, isSecure, response, isSecure_1, encryptedResponse, decryptedResponse, err_2;
|
|
6097
|
+
return __generator(this, function (_7) {
|
|
6098
|
+
switch (_7.label) {
|
|
6093
6099
|
case 0:
|
|
6094
6100
|
apis = new Apis(object, this.takeAction.bind(this));
|
|
6095
6101
|
return [4 /*yield*/, apis.setUrl()];
|
|
6096
6102
|
case 1:
|
|
6097
|
-
api =
|
|
6103
|
+
api = _7.sent();
|
|
6098
6104
|
return [4 /*yield*/, apis.setRequestHeaders()];
|
|
6099
6105
|
case 2:
|
|
6100
|
-
api =
|
|
6106
|
+
api = _7.sent();
|
|
6101
6107
|
return [4 /*yield*/, apis.validateRequestHeaders()];
|
|
6102
6108
|
case 3:
|
|
6103
|
-
api =
|
|
6109
|
+
api = _7.sent();
|
|
6104
6110
|
return [4 /*yield*/, apis.setRequestBody()];
|
|
6105
6111
|
case 4:
|
|
6106
|
-
api =
|
|
6112
|
+
api = _7.sent();
|
|
6107
6113
|
return [4 /*yield*/, apis.validateRequestBody()];
|
|
6108
6114
|
case 5:
|
|
6109
|
-
api =
|
|
6115
|
+
api = _7.sent();
|
|
6110
6116
|
apiCallResponse = {};
|
|
6111
|
-
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/,
|
|
6117
|
+
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 25];
|
|
6112
6118
|
if (!(api.request.url.hasOwnProperty("type") &&
|
|
6113
6119
|
api.request.url.type === EApiRequestUrlType.MOCK)) return [3 /*break*/, 7];
|
|
6114
6120
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
@@ -6117,90 +6123,100 @@
|
|
|
6117
6123
|
}, 1000); // 1000 ms = 1 sec
|
|
6118
6124
|
})];
|
|
6119
6125
|
case 6:
|
|
6120
|
-
apiCallResponse =
|
|
6126
|
+
apiCallResponse = _7.sent();
|
|
6121
6127
|
apiCallResponseStatusCode = (_b = (_a = api.request.url.props) === null || _a === void 0 ? void 0 : _a.statusCode) !== null && _b !== void 0 ? _b : 200; // Default Status Code for Mocked APIs
|
|
6122
|
-
return [3 /*break*/,
|
|
6128
|
+
return [3 /*break*/, 24];
|
|
6123
6129
|
case 7:
|
|
6124
6130
|
url = api.request.url.value;
|
|
6125
6131
|
method = (_d = (_c = api.request) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : "POST";
|
|
6126
6132
|
headers = Object.assign({ "Content-Type": "application/json" }, (((_f = (_e = api.request) === null || _e === void 0 ? void 0 : _e.headers) === null || _f === void 0 ? void 0 : _f.value) || {}));
|
|
6127
|
-
if (!(method === "GET")) return [3 /*break*/,
|
|
6133
|
+
if (!(method === "GET")) return [3 /*break*/, 16];
|
|
6128
6134
|
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, {
|
|
6129
6135
|
form_api_method: method,
|
|
6130
6136
|
form_api_key: (_g = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _g !== void 0 ? _g : ""
|
|
6131
6137
|
});
|
|
6132
|
-
|
|
6138
|
+
_7.label = 8;
|
|
6133
6139
|
case 8:
|
|
6134
|
-
|
|
6140
|
+
_7.trys.push([8, 14, , 15]);
|
|
6135
6141
|
return [4 /*yield*/, fetch(url, {
|
|
6136
6142
|
method: method,
|
|
6137
6143
|
headers: Object.assign({}, headers)
|
|
6138
6144
|
})];
|
|
6139
6145
|
case 9:
|
|
6140
|
-
response =
|
|
6141
|
-
|
|
6146
|
+
response = _7.sent();
|
|
6147
|
+
isSecure = (_h = api === null || api === void 0 ? void 0 : api.response) === null || _h === void 0 ? void 0 : _h.isSecure;
|
|
6148
|
+
if (!isSecure) return [3 /*break*/, 11];
|
|
6149
|
+
return [4 /*yield*/, response.text()];
|
|
6142
6150
|
case 10:
|
|
6143
|
-
|
|
6151
|
+
encryptedResponse = _7.sent();
|
|
6152
|
+
decryptedResponse = kwikidToolkit.decryptWithAES(encryptedResponse);
|
|
6153
|
+
apiCallResponse = JSON.parse(decryptedResponse);
|
|
6154
|
+
return [3 /*break*/, 13];
|
|
6155
|
+
case 11: return [4 /*yield*/, response.json()];
|
|
6156
|
+
case 12:
|
|
6157
|
+
apiCallResponse = _7.sent();
|
|
6158
|
+
_7.label = 13;
|
|
6159
|
+
case 13:
|
|
6144
6160
|
apiCallResponseStatusCode = response.status;
|
|
6145
|
-
return [3 /*break*/,
|
|
6146
|
-
case
|
|
6147
|
-
err_1 =
|
|
6161
|
+
return [3 /*break*/, 15];
|
|
6162
|
+
case 14:
|
|
6163
|
+
err_1 = _7.sent();
|
|
6148
6164
|
apiCallResponse = {};
|
|
6149
6165
|
apiCallResponseStatusCode = 500;
|
|
6150
|
-
return [3 /*break*/,
|
|
6151
|
-
case
|
|
6152
|
-
case
|
|
6153
|
-
body = JSON.stringify((
|
|
6154
|
-
isSecure = (
|
|
6166
|
+
return [3 /*break*/, 15];
|
|
6167
|
+
case 15: return [3 /*break*/, 24];
|
|
6168
|
+
case 16:
|
|
6169
|
+
body = JSON.stringify((_l = (_k = (_j = api === null || api === void 0 ? void 0 : api.request) === null || _j === void 0 ? void 0 : _j.body) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : {});
|
|
6170
|
+
isSecure = (_p = (_o = (_m = api === null || api === void 0 ? void 0 : api.request) === null || _m === void 0 ? void 0 : _m.body) === null || _o === void 0 ? void 0 : _o.isSecure) !== null && _p !== void 0 ? _p : false;
|
|
6155
6171
|
if (isSecure) {
|
|
6156
6172
|
body = kwikidToolkit.encryptWithAES(body);
|
|
6157
6173
|
}
|
|
6158
|
-
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, Object.assign({ form_api_method: method, form_api_key: (
|
|
6174
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, Object.assign({ form_api_method: method, form_api_key: (_q = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _q !== void 0 ? _q : "", form_api_request_encrypted: isSecure }, (!isSecure && {
|
|
6159
6175
|
form_api_request_body: body
|
|
6160
6176
|
})));
|
|
6161
|
-
|
|
6162
|
-
case
|
|
6163
|
-
|
|
6177
|
+
_7.label = 17;
|
|
6178
|
+
case 17:
|
|
6179
|
+
_7.trys.push([17, 23, , 24]);
|
|
6164
6180
|
return [4 /*yield*/, fetch(url, {
|
|
6165
6181
|
method: method,
|
|
6166
6182
|
headers: Object.assign({}, headers),
|
|
6167
6183
|
body: body
|
|
6168
6184
|
})];
|
|
6169
|
-
case
|
|
6170
|
-
response =
|
|
6171
|
-
isSecure_1 = (
|
|
6172
|
-
if (!isSecure_1) return [3 /*break*/,
|
|
6185
|
+
case 18:
|
|
6186
|
+
response = _7.sent();
|
|
6187
|
+
isSecure_1 = (_r = api === null || api === void 0 ? void 0 : api.response) === null || _r === void 0 ? void 0 : _r.isSecure;
|
|
6188
|
+
if (!isSecure_1) return [3 /*break*/, 20];
|
|
6173
6189
|
return [4 /*yield*/, response.text()];
|
|
6174
|
-
case
|
|
6175
|
-
encryptedResponse =
|
|
6190
|
+
case 19:
|
|
6191
|
+
encryptedResponse = _7.sent();
|
|
6176
6192
|
decryptedResponse = kwikidToolkit.decryptWithAES(encryptedResponse);
|
|
6177
6193
|
apiCallResponse = JSON.parse(decryptedResponse);
|
|
6178
|
-
return [3 /*break*/,
|
|
6179
|
-
case
|
|
6180
|
-
case
|
|
6181
|
-
apiCallResponse =
|
|
6182
|
-
|
|
6183
|
-
case
|
|
6194
|
+
return [3 /*break*/, 22];
|
|
6195
|
+
case 20: return [4 /*yield*/, response.json()];
|
|
6196
|
+
case 21:
|
|
6197
|
+
apiCallResponse = _7.sent();
|
|
6198
|
+
_7.label = 22;
|
|
6199
|
+
case 22:
|
|
6184
6200
|
apiCallResponseStatusCode = response.status;
|
|
6185
|
-
return [3 /*break*/,
|
|
6186
|
-
case
|
|
6187
|
-
err_2 =
|
|
6201
|
+
return [3 /*break*/, 24];
|
|
6202
|
+
case 23:
|
|
6203
|
+
err_2 = _7.sent();
|
|
6188
6204
|
apiCallResponse = {};
|
|
6189
6205
|
apiCallResponseStatusCode = 500;
|
|
6190
|
-
return [3 /*break*/,
|
|
6191
|
-
case
|
|
6206
|
+
return [3 /*break*/, 24];
|
|
6207
|
+
case 24:
|
|
6192
6208
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "value", apiCallResponse);
|
|
6193
6209
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "status", apiCallResponseStatusCode);
|
|
6194
|
-
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE, Object.assign(Object.assign({ form_api_key: (
|
|
6210
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE, Object.assign(Object.assign({ form_api_key: (_s = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _s !== void 0 ? _s : "", form_api_response_encrypted: (_u = (_t = api === null || api === void 0 ? void 0 : api.response) === null || _t === void 0 ? void 0 : _t.isSecure) !== null && _u !== void 0 ? _u : false }, (((_w = !((_v = api === null || api === void 0 ? void 0 : api.response) === null || _v === void 0 ? void 0 : _v.isSecure)) !== null && _w !== void 0 ? _w : false) && {
|
|
6195
6211
|
form_api_response_body: apiCallResponse !== null && apiCallResponse !== void 0 ? apiCallResponse : {}
|
|
6196
6212
|
})), { form_api_status_code: apiCallResponseStatusCode }));
|
|
6197
|
-
return [3 /*break*/,
|
|
6198
|
-
case
|
|
6199
|
-
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_INVALID, Object.assign({ form_api_key: (
|
|
6200
|
-
form_api_request_body: (
|
|
6213
|
+
return [3 /*break*/, 26];
|
|
6214
|
+
case 25:
|
|
6215
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_INVALID, Object.assign({ form_api_key: (_x = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _x !== void 0 ? _x : "", form_api_request_encrypted: (_0 = (_z = (_y = api === null || api === void 0 ? void 0 : api.request) === null || _y === void 0 ? void 0 : _y.body) === null || _z === void 0 ? void 0 : _z.isSecure) !== null && _0 !== void 0 ? _0 : false }, (((_3 = !((_2 = (_1 = api === null || api === void 0 ? void 0 : api.request) === null || _1 === void 0 ? void 0 : _1.body) === null || _2 === void 0 ? void 0 : _2.isSecure)) !== null && _3 !== void 0 ? _3 : false) && {
|
|
6216
|
+
form_api_request_body: (_6 = (_5 = (_4 = api === null || api === void 0 ? void 0 : api.request) === null || _4 === void 0 ? void 0 : _4.body) === null || _5 === void 0 ? void 0 : _5.value) !== null && _6 !== void 0 ? _6 : {}
|
|
6201
6217
|
})));
|
|
6202
|
-
|
|
6203
|
-
case
|
|
6218
|
+
_7.label = 26;
|
|
6219
|
+
case 26: return [2 /*return*/, api];
|
|
6204
6220
|
}
|
|
6205
6221
|
});
|
|
6206
6222
|
});
|
|
@@ -6237,8 +6253,8 @@
|
|
|
6237
6253
|
KwikIDFormViewComponent.prototype.handleOnClickApiCall = function (e) {
|
|
6238
6254
|
return __awaiter(this, void 0, void 0, function () {
|
|
6239
6255
|
var field, apis;
|
|
6240
|
-
return __generator(this, function (
|
|
6241
|
-
switch (
|
|
6256
|
+
return __generator(this, function (_7) {
|
|
6257
|
+
switch (_7.label) {
|
|
6242
6258
|
case 0:
|
|
6243
6259
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
6244
6260
|
if (!(field.type === EFieldType.API)) return [3 /*break*/, 5];
|
|
@@ -6253,7 +6269,7 @@
|
|
|
6253
6269
|
if (!kwikidToolkit.checkObjectKeyExists(field.api, "request")) return [3 /*break*/, 2];
|
|
6254
6270
|
return [4 /*yield*/, this.handleFieldApiCall(field, field.api)];
|
|
6255
6271
|
case 1:
|
|
6256
|
-
|
|
6272
|
+
_7.sent();
|
|
6257
6273
|
return [3 /*break*/, 4];
|
|
6258
6274
|
case 2:
|
|
6259
6275
|
apis = new Apis({
|
|
@@ -6267,11 +6283,11 @@
|
|
|
6267
6283
|
}, this.takeAction.bind(this));
|
|
6268
6284
|
return [4 /*yield*/, apis.callNextApi(field.api.entrypoint)];
|
|
6269
6285
|
case 3:
|
|
6270
|
-
|
|
6271
|
-
|
|
6286
|
+
_7.sent();
|
|
6287
|
+
_7.label = 4;
|
|
6272
6288
|
case 4:
|
|
6273
6289
|
this.hideApiLoader();
|
|
6274
|
-
|
|
6290
|
+
_7.label = 5;
|
|
6275
6291
|
case 5: return [2 /*return*/];
|
|
6276
6292
|
}
|
|
6277
6293
|
});
|
|
@@ -6317,11 +6333,11 @@
|
|
|
6317
6333
|
};
|
|
6318
6334
|
KwikIDFormViewComponent.prototype.handleOnClickSaveForm = function (e) {
|
|
6319
6335
|
return __awaiter(this, void 0, void 0, function () {
|
|
6320
|
-
var controls, firstFieldWithError, controls_1, controls_1_1, control, field,
|
|
6321
|
-
var e_15,
|
|
6336
|
+
var controls, firstFieldWithError, controls_1, controls_1_1, control, field, _7, _8, field, validations, e_13_1, formData, _9, _10, field, extendedFormData, _11, _12, postTask, task, e_14_1;
|
|
6337
|
+
var e_15, _13, e_13, _14, e_16, _15, e_14, _16;
|
|
6322
6338
|
var _this = this;
|
|
6323
|
-
return __generator(this, function (
|
|
6324
|
-
switch (
|
|
6339
|
+
return __generator(this, function (_17) {
|
|
6340
|
+
switch (_17.label) {
|
|
6325
6341
|
case 0:
|
|
6326
6342
|
if (e) {
|
|
6327
6343
|
this.triggerLogs(ELogEventType$1.FORM__SAVE_BUTTON_CLICK, {});
|
|
@@ -6351,7 +6367,7 @@
|
|
|
6351
6367
|
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
6352
6368
|
finally {
|
|
6353
6369
|
try {
|
|
6354
|
-
if (controls_1_1 && !controls_1_1.done && (
|
|
6370
|
+
if (controls_1_1 && !controls_1_1.done && (_13 = controls_1.return)) _13.call(controls_1);
|
|
6355
6371
|
}
|
|
6356
6372
|
finally { if (e_15) throw e_15.error; }
|
|
6357
6373
|
}
|
|
@@ -6362,14 +6378,14 @@
|
|
|
6362
6378
|
}, 3000);
|
|
6363
6379
|
return [2 /*return*/];
|
|
6364
6380
|
}
|
|
6365
|
-
|
|
6381
|
+
_17.label = 1;
|
|
6366
6382
|
case 1:
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6383
|
+
_17.trys.push([1, 6, 7, 8]);
|
|
6384
|
+
_7 = __values(this.formFields), _8 = _7.next();
|
|
6385
|
+
_17.label = 2;
|
|
6370
6386
|
case 2:
|
|
6371
|
-
if (!!
|
|
6372
|
-
field =
|
|
6387
|
+
if (!!_8.done) return [3 /*break*/, 5];
|
|
6388
|
+
field = _8.value;
|
|
6373
6389
|
if (!(field.isFormElement &&
|
|
6374
6390
|
!field.hidden &&
|
|
6375
6391
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -6384,7 +6400,7 @@
|
|
|
6384
6400
|
}, this.takeAction.bind(this));
|
|
6385
6401
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
6386
6402
|
case 3:
|
|
6387
|
-
|
|
6403
|
+
_17.sent();
|
|
6388
6404
|
if (!field.validation.is_valid) {
|
|
6389
6405
|
this.toggleErrorNotification(true);
|
|
6390
6406
|
setTimeout(function () {
|
|
@@ -6392,26 +6408,26 @@
|
|
|
6392
6408
|
}, 3000);
|
|
6393
6409
|
return [2 /*return*/];
|
|
6394
6410
|
}
|
|
6395
|
-
|
|
6411
|
+
_17.label = 4;
|
|
6396
6412
|
case 4:
|
|
6397
|
-
|
|
6413
|
+
_8 = _7.next();
|
|
6398
6414
|
return [3 /*break*/, 2];
|
|
6399
6415
|
case 5: return [3 /*break*/, 8];
|
|
6400
6416
|
case 6:
|
|
6401
|
-
e_13_1 =
|
|
6417
|
+
e_13_1 = _17.sent();
|
|
6402
6418
|
e_13 = { error: e_13_1 };
|
|
6403
6419
|
return [3 /*break*/, 8];
|
|
6404
6420
|
case 7:
|
|
6405
6421
|
try {
|
|
6406
|
-
if (
|
|
6422
|
+
if (_8 && !_8.done && (_14 = _7.return)) _14.call(_7);
|
|
6407
6423
|
}
|
|
6408
6424
|
finally { if (e_13) throw e_13.error; }
|
|
6409
6425
|
return [7 /*endfinally*/];
|
|
6410
6426
|
case 8:
|
|
6411
6427
|
formData = this.formGroup.getRawValue();
|
|
6412
6428
|
try {
|
|
6413
|
-
for (
|
|
6414
|
-
field =
|
|
6429
|
+
for (_9 = __values(this.formFields), _10 = _9.next(); !_10.done; _10 = _9.next()) {
|
|
6430
|
+
field = _10.value;
|
|
6415
6431
|
if (field.isFormElement) {
|
|
6416
6432
|
if (field.hidden) {
|
|
6417
6433
|
delete formData[field.key];
|
|
@@ -6425,22 +6441,22 @@
|
|
|
6425
6441
|
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
6426
6442
|
finally {
|
|
6427
6443
|
try {
|
|
6428
|
-
if (
|
|
6444
|
+
if (_10 && !_10.done && (_15 = _9.return)) _15.call(_9);
|
|
6429
6445
|
}
|
|
6430
6446
|
finally { if (e_16) throw e_16.error; }
|
|
6431
6447
|
}
|
|
6432
6448
|
extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
6433
|
-
var
|
|
6449
|
+
var _7;
|
|
6434
6450
|
if (field.isFormElement && !field.hidden) {
|
|
6435
|
-
var fieldData = (
|
|
6436
|
-
|
|
6451
|
+
var fieldData = (_7 = {},
|
|
6452
|
+
_7[field.key] = {
|
|
6437
6453
|
key: field.key,
|
|
6438
6454
|
label: field.label,
|
|
6439
6455
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
6440
6456
|
type: field.type,
|
|
6441
6457
|
index: index
|
|
6442
6458
|
},
|
|
6443
|
-
|
|
6459
|
+
_7);
|
|
6444
6460
|
result[field.key] = fieldData[field.key];
|
|
6445
6461
|
}
|
|
6446
6462
|
return result;
|
|
@@ -6453,14 +6469,14 @@
|
|
|
6453
6469
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
6454
6470
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "post"))) return [3 /*break*/, 18];
|
|
6455
6471
|
this.triggerLogs(ELogEventType$1.FORM__TASK_POST, {});
|
|
6456
|
-
|
|
6472
|
+
_17.label = 9;
|
|
6457
6473
|
case 9:
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6474
|
+
_17.trys.push([9, 15, 16, 17]);
|
|
6475
|
+
_11 = __values(this.formConfig.tasks.post), _12 = _11.next();
|
|
6476
|
+
_17.label = 10;
|
|
6461
6477
|
case 10:
|
|
6462
|
-
if (!!
|
|
6463
|
-
postTask =
|
|
6478
|
+
if (!!_12.done) return [3 /*break*/, 14];
|
|
6479
|
+
postTask = _12.value;
|
|
6464
6480
|
task = new Tasks(postTask, {
|
|
6465
6481
|
FORM_CONFIG: this.formConfig,
|
|
6466
6482
|
FORM_FIELDS: this.formFields,
|
|
@@ -6478,7 +6494,7 @@
|
|
|
6478
6494
|
}
|
|
6479
6495
|
return [4 /*yield*/, task.execute()];
|
|
6480
6496
|
case 11:
|
|
6481
|
-
|
|
6497
|
+
_17.sent();
|
|
6482
6498
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
6483
6499
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
6484
6500
|
var intervalId = setInterval(function () {
|
|
@@ -6490,22 +6506,22 @@
|
|
|
6490
6506
|
})];
|
|
6491
6507
|
case 12:
|
|
6492
6508
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
6493
|
-
|
|
6509
|
+
_17.sent();
|
|
6494
6510
|
if (this.stopTaskExecution) {
|
|
6495
6511
|
return [3 /*break*/, 14];
|
|
6496
6512
|
}
|
|
6497
|
-
|
|
6513
|
+
_17.label = 13;
|
|
6498
6514
|
case 13:
|
|
6499
|
-
|
|
6515
|
+
_12 = _11.next();
|
|
6500
6516
|
return [3 /*break*/, 10];
|
|
6501
6517
|
case 14: return [3 /*break*/, 17];
|
|
6502
6518
|
case 15:
|
|
6503
|
-
e_14_1 =
|
|
6519
|
+
e_14_1 = _17.sent();
|
|
6504
6520
|
e_14 = { error: e_14_1 };
|
|
6505
6521
|
return [3 /*break*/, 17];
|
|
6506
6522
|
case 16:
|
|
6507
6523
|
try {
|
|
6508
|
-
if (
|
|
6524
|
+
if (_12 && !_12.done && (_16 = _11.return)) _16.call(_11);
|
|
6509
6525
|
}
|
|
6510
6526
|
finally { if (e_14) throw e_14.error; }
|
|
6511
6527
|
return [7 /*endfinally*/];
|
|
@@ -6527,7 +6543,7 @@
|
|
|
6527
6543
|
data: kwikidToolkit.mergeObjects(formData, this.popupFormData, this.taskData),
|
|
6528
6544
|
extendedData: extendedFormData
|
|
6529
6545
|
});
|
|
6530
|
-
|
|
6546
|
+
_17.label = 19;
|
|
6531
6547
|
case 19: return [2 /*return*/];
|
|
6532
6548
|
}
|
|
6533
6549
|
});
|
|
@@ -6550,17 +6566,17 @@
|
|
|
6550
6566
|
});
|
|
6551
6567
|
};
|
|
6552
6568
|
KwikIDFormViewComponent.prototype.fieldGroupHide = function (fieldGroup) {
|
|
6553
|
-
var e_17,
|
|
6569
|
+
var e_17, _7;
|
|
6554
6570
|
try {
|
|
6555
|
-
for (var
|
|
6556
|
-
var fieldKey =
|
|
6571
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6572
|
+
var fieldKey = _9.value;
|
|
6557
6573
|
this.fieldHide(fieldKey);
|
|
6558
6574
|
}
|
|
6559
6575
|
}
|
|
6560
6576
|
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
6561
6577
|
finally {
|
|
6562
6578
|
try {
|
|
6563
|
-
if (
|
|
6579
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6564
6580
|
}
|
|
6565
6581
|
finally { if (e_17) throw e_17.error; }
|
|
6566
6582
|
}
|
|
@@ -6578,17 +6594,17 @@
|
|
|
6578
6594
|
});
|
|
6579
6595
|
};
|
|
6580
6596
|
KwikIDFormViewComponent.prototype.fieldGroupShow = function (fieldGroup) {
|
|
6581
|
-
var e_18,
|
|
6597
|
+
var e_18, _7;
|
|
6582
6598
|
try {
|
|
6583
|
-
for (var
|
|
6584
|
-
var fieldKey =
|
|
6599
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6600
|
+
var fieldKey = _9.value;
|
|
6585
6601
|
this.fieldShow(fieldKey);
|
|
6586
6602
|
}
|
|
6587
6603
|
}
|
|
6588
6604
|
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
6589
6605
|
finally {
|
|
6590
6606
|
try {
|
|
6591
|
-
if (
|
|
6607
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6592
6608
|
}
|
|
6593
6609
|
finally { if (e_18) throw e_18.error; }
|
|
6594
6610
|
}
|
|
@@ -6616,17 +6632,17 @@
|
|
|
6616
6632
|
});
|
|
6617
6633
|
};
|
|
6618
6634
|
KwikIDFormViewComponent.prototype.fieldGroupDisable = function (fieldGroup) {
|
|
6619
|
-
var e_19,
|
|
6635
|
+
var e_19, _7;
|
|
6620
6636
|
try {
|
|
6621
|
-
for (var
|
|
6622
|
-
var fieldKey =
|
|
6637
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6638
|
+
var fieldKey = _9.value;
|
|
6623
6639
|
this.fieldDisable(fieldKey);
|
|
6624
6640
|
}
|
|
6625
6641
|
}
|
|
6626
6642
|
catch (e_19_1) { e_19 = { error: e_19_1 }; }
|
|
6627
6643
|
finally {
|
|
6628
6644
|
try {
|
|
6629
|
-
if (
|
|
6645
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6630
6646
|
}
|
|
6631
6647
|
finally { if (e_19) throw e_19.error; }
|
|
6632
6648
|
}
|
|
@@ -6654,23 +6670,23 @@
|
|
|
6654
6670
|
});
|
|
6655
6671
|
};
|
|
6656
6672
|
KwikIDFormViewComponent.prototype.fieldGroupEnable = function (fieldGroup) {
|
|
6657
|
-
var e_20,
|
|
6673
|
+
var e_20, _7;
|
|
6658
6674
|
try {
|
|
6659
|
-
for (var
|
|
6660
|
-
var fieldKey =
|
|
6675
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6676
|
+
var fieldKey = _9.value;
|
|
6661
6677
|
this.fieldEnable(fieldKey);
|
|
6662
6678
|
}
|
|
6663
6679
|
}
|
|
6664
6680
|
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
6665
6681
|
finally {
|
|
6666
6682
|
try {
|
|
6667
|
-
if (
|
|
6683
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6668
6684
|
}
|
|
6669
6685
|
finally { if (e_20) throw e_20.error; }
|
|
6670
6686
|
}
|
|
6671
6687
|
};
|
|
6672
6688
|
KwikIDFormViewComponent.prototype.fieldReset = function (fieldKey) {
|
|
6673
|
-
var
|
|
6689
|
+
var _7;
|
|
6674
6690
|
// Find the field and its index in the formFields array
|
|
6675
6691
|
var field = getFormFieldByKey(this.formFields, fieldKey);
|
|
6676
6692
|
var fieldIndex = getFormFieldIndexByKey(this.formFields, fieldKey);
|
|
@@ -6681,9 +6697,9 @@
|
|
|
6681
6697
|
emitEvent: false,
|
|
6682
6698
|
onlySelf: true
|
|
6683
6699
|
});
|
|
6684
|
-
this.formGroup.patchValue((
|
|
6685
|
-
|
|
6686
|
-
|
|
6700
|
+
this.formGroup.patchValue((_7 = {},
|
|
6701
|
+
_7[field.key] = resetValue,
|
|
6702
|
+
_7), { emitEvent: false });
|
|
6687
6703
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
6688
6704
|
emitEvent: true
|
|
6689
6705
|
});
|
|
@@ -6783,13 +6799,13 @@
|
|
|
6783
6799
|
KwikIDFormViewComponent.prototype.setValue = function (action, object) {
|
|
6784
6800
|
return __awaiter(this, void 0, void 0, function () {
|
|
6785
6801
|
var source, sourceValue;
|
|
6786
|
-
return __generator(this, function (
|
|
6787
|
-
switch (
|
|
6802
|
+
return __generator(this, function (_7) {
|
|
6803
|
+
switch (_7.label) {
|
|
6788
6804
|
case 0:
|
|
6789
6805
|
source = new kwikidToolkit.Source(object);
|
|
6790
6806
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6791
6807
|
case 1:
|
|
6792
|
-
sourceValue =
|
|
6808
|
+
sourceValue = _7.sent();
|
|
6793
6809
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
6794
6810
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
6795
6811
|
this.formData = source.object.FORM_DATA;
|
|
@@ -6804,13 +6820,13 @@
|
|
|
6804
6820
|
KwikIDFormViewComponent.prototype.setFieldDefaultValue = function (action, object) {
|
|
6805
6821
|
return __awaiter(this, void 0, void 0, function () {
|
|
6806
6822
|
var source, sourceValue;
|
|
6807
|
-
return __generator(this, function (
|
|
6808
|
-
switch (
|
|
6823
|
+
return __generator(this, function (_7) {
|
|
6824
|
+
switch (_7.label) {
|
|
6809
6825
|
case 0:
|
|
6810
6826
|
source = new kwikidToolkit.Source(object);
|
|
6811
6827
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6812
6828
|
case 1:
|
|
6813
|
-
sourceValue =
|
|
6829
|
+
sourceValue = _7.sent();
|
|
6814
6830
|
source.setValueToSource({
|
|
6815
6831
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6816
6832
|
props: {
|
|
@@ -6842,7 +6858,7 @@
|
|
|
6842
6858
|
KwikIDFormViewComponent.prototype.setApiStatus = function (action, object) {
|
|
6843
6859
|
return __awaiter(this, void 0, void 0, function () {
|
|
6844
6860
|
var source, sourceValue;
|
|
6845
|
-
return __generator(this, function (
|
|
6861
|
+
return __generator(this, function (_7) {
|
|
6846
6862
|
source = new kwikidToolkit.Source(object);
|
|
6847
6863
|
sourceValue = action.props.status;
|
|
6848
6864
|
source.setValueToSource({
|
|
@@ -6862,13 +6878,13 @@
|
|
|
6862
6878
|
KwikIDFormViewComponent.prototype.setApiHeaderValue = function (action, object) {
|
|
6863
6879
|
return __awaiter(this, void 0, void 0, function () {
|
|
6864
6880
|
var source, sourceValue;
|
|
6865
|
-
return __generator(this, function (
|
|
6866
|
-
switch (
|
|
6881
|
+
return __generator(this, function (_7) {
|
|
6882
|
+
switch (_7.label) {
|
|
6867
6883
|
case 0:
|
|
6868
6884
|
source = new kwikidToolkit.Source(object);
|
|
6869
6885
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
6870
6886
|
case 1:
|
|
6871
|
-
sourceValue =
|
|
6887
|
+
sourceValue = _7.sent();
|
|
6872
6888
|
source.setValueToSource({
|
|
6873
6889
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6874
6890
|
props: {
|
|
@@ -6887,7 +6903,7 @@
|
|
|
6887
6903
|
KwikIDFormViewComponent.prototype.setApiHeaderValidity = function (action, object) {
|
|
6888
6904
|
return __awaiter(this, void 0, void 0, function () {
|
|
6889
6905
|
var source, sourceValue;
|
|
6890
|
-
return __generator(this, function (
|
|
6906
|
+
return __generator(this, function (_7) {
|
|
6891
6907
|
source = new kwikidToolkit.Source(object);
|
|
6892
6908
|
sourceValue = action.props.valid;
|
|
6893
6909
|
source.setValueToSource({
|
|
@@ -6907,13 +6923,13 @@
|
|
|
6907
6923
|
KwikIDFormViewComponent.prototype.setApiBodyValue = function (action, object) {
|
|
6908
6924
|
return __awaiter(this, void 0, void 0, function () {
|
|
6909
6925
|
var source, sourceValue;
|
|
6910
|
-
return __generator(this, function (
|
|
6911
|
-
switch (
|
|
6926
|
+
return __generator(this, function (_7) {
|
|
6927
|
+
switch (_7.label) {
|
|
6912
6928
|
case 0:
|
|
6913
6929
|
source = new kwikidToolkit.Source(object);
|
|
6914
6930
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
6915
6931
|
case 1:
|
|
6916
|
-
sourceValue =
|
|
6932
|
+
sourceValue = _7.sent();
|
|
6917
6933
|
source.setValueToSource({
|
|
6918
6934
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6919
6935
|
props: {
|
|
@@ -6932,7 +6948,7 @@
|
|
|
6932
6948
|
KwikIDFormViewComponent.prototype.setApiBodyValidity = function (action, object) {
|
|
6933
6949
|
return __awaiter(this, void 0, void 0, function () {
|
|
6934
6950
|
var source, sourceValue;
|
|
6935
|
-
return __generator(this, function (
|
|
6951
|
+
return __generator(this, function (_7) {
|
|
6936
6952
|
source = new kwikidToolkit.Source(object);
|
|
6937
6953
|
sourceValue = action.props.valid;
|
|
6938
6954
|
source.setValueToSource({
|
|
@@ -6952,7 +6968,7 @@
|
|
|
6952
6968
|
KwikIDFormViewComponent.prototype.setFieldValidity = function (action, object) {
|
|
6953
6969
|
return __awaiter(this, void 0, void 0, function () {
|
|
6954
6970
|
var source, sourceValue;
|
|
6955
|
-
return __generator(this, function (
|
|
6971
|
+
return __generator(this, function (_7) {
|
|
6956
6972
|
source = new kwikidToolkit.Source(object);
|
|
6957
6973
|
sourceValue = action.props.valid;
|
|
6958
6974
|
source.setValueToSource({
|
|
@@ -6972,18 +6988,18 @@
|
|
|
6972
6988
|
KwikIDFormViewComponent.prototype.setDropdownOptions = function (action, object) {
|
|
6973
6989
|
return __awaiter(this, void 0, void 0, function () {
|
|
6974
6990
|
var source, sourceValue, appendToPath, appendToPathStr, optionsPath;
|
|
6975
|
-
return __generator(this, function (
|
|
6976
|
-
switch (
|
|
6991
|
+
return __generator(this, function (_7) {
|
|
6992
|
+
switch (_7.label) {
|
|
6977
6993
|
case 0:
|
|
6978
6994
|
source = new kwikidToolkit.Source(object);
|
|
6979
6995
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6980
6996
|
case 1:
|
|
6981
|
-
sourceValue =
|
|
6997
|
+
sourceValue = _7.sent();
|
|
6982
6998
|
if (!kwikidToolkit.checkObjectKeyExists(action.props, "options")) return [3 /*break*/, 4];
|
|
6983
6999
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.options, "appendToPath")) return [3 /*break*/, 3];
|
|
6984
7000
|
return [4 /*yield*/, source.getValueFromSource(action.props.options.appendToPath.source)];
|
|
6985
7001
|
case 2:
|
|
6986
|
-
appendToPath =
|
|
7002
|
+
appendToPath = _7.sent();
|
|
6987
7003
|
if (kwikidToolkit.isNotEmptyValue(appendToPath)) {
|
|
6988
7004
|
appendToPathStr = kwikidToolkit.replaceString(appendToPath.match("" + action.props.options.appendToPath.filterSourceValue)[0], "[^a-zA-Z0-9_]", "_");
|
|
6989
7005
|
optionsPath = "" + action.props.options.path + appendToPathStr;
|
|
@@ -6992,7 +7008,7 @@
|
|
|
6992
7008
|
return [3 /*break*/, 4];
|
|
6993
7009
|
case 3:
|
|
6994
7010
|
sourceValue = kwikidToolkit.getObjectValueFromPath(sourceValue, action.props.options.path);
|
|
6995
|
-
|
|
7011
|
+
_7.label = 4;
|
|
6996
7012
|
case 4:
|
|
6997
7013
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
6998
7014
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
@@ -7007,19 +7023,19 @@
|
|
|
7007
7023
|
KwikIDFormViewComponent.prototype.apiCall = function (action, object) {
|
|
7008
7024
|
return __awaiter(this, void 0, void 0, function () {
|
|
7009
7025
|
var apiConfig, response;
|
|
7010
|
-
var
|
|
7011
|
-
return __generator(this, function (
|
|
7012
|
-
switch (
|
|
7026
|
+
var _7;
|
|
7027
|
+
return __generator(this, function (_8) {
|
|
7028
|
+
switch (_8.label) {
|
|
7013
7029
|
case 0:
|
|
7014
7030
|
apiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
7015
7031
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
7016
7032
|
case 1:
|
|
7017
|
-
response =
|
|
7033
|
+
response = _8.sent();
|
|
7018
7034
|
apiConfig = response.api;
|
|
7019
7035
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, apiConfig);
|
|
7020
|
-
this.formData = kwikidToolkit.mergeObjects(this.formData, (
|
|
7021
|
-
|
|
7022
|
-
|
|
7036
|
+
this.formData = kwikidToolkit.mergeObjects(this.formData, (_7 = {},
|
|
7037
|
+
_7[action.props.formApiKey] = apiConfig.response.value,
|
|
7038
|
+
_7));
|
|
7023
7039
|
return [2 /*return*/, apiConfig];
|
|
7024
7040
|
}
|
|
7025
7041
|
});
|
|
@@ -7028,13 +7044,13 @@
|
|
|
7028
7044
|
KwikIDFormViewComponent.prototype.fieldApiCall = function (action, object) {
|
|
7029
7045
|
return __awaiter(this, void 0, void 0, function () {
|
|
7030
7046
|
var apiConfig;
|
|
7031
|
-
return __generator(this, function (
|
|
7032
|
-
switch (
|
|
7047
|
+
return __generator(this, function (_7) {
|
|
7048
|
+
switch (_7.label) {
|
|
7033
7049
|
case 0:
|
|
7034
7050
|
this.showApiLoader();
|
|
7035
7051
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
7036
7052
|
case 1:
|
|
7037
|
-
apiConfig =
|
|
7053
|
+
apiConfig = _7.sent();
|
|
7038
7054
|
this.hideApiLoader();
|
|
7039
7055
|
return [2 /*return*/];
|
|
7040
7056
|
}
|
|
@@ -7044,8 +7060,8 @@
|
|
|
7044
7060
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCalls = function (action, object) {
|
|
7045
7061
|
return __awaiter(this, void 0, void 0, function () {
|
|
7046
7062
|
var entrypointApiKey, field, endpoints, nextApiIndex, apiConfig, response;
|
|
7047
|
-
return __generator(this, function (
|
|
7048
|
-
switch (
|
|
7063
|
+
return __generator(this, function (_7) {
|
|
7064
|
+
switch (_7.label) {
|
|
7049
7065
|
case 0:
|
|
7050
7066
|
entrypointApiKey = action.props.apiKey;
|
|
7051
7067
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
@@ -7054,7 +7070,7 @@
|
|
|
7054
7070
|
apiConfig = endpoints[nextApiIndex];
|
|
7055
7071
|
return [4 /*yield*/, this.handleFieldApiCall(field, apiConfig)];
|
|
7056
7072
|
case 1:
|
|
7057
|
-
response =
|
|
7073
|
+
response = _7.sent();
|
|
7058
7074
|
field = response.field;
|
|
7059
7075
|
field.api.endpoints[nextApiIndex] = response.api;
|
|
7060
7076
|
return [2 /*return*/];
|
|
@@ -7065,15 +7081,15 @@
|
|
|
7065
7081
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCallsEnd = function (action, object) {
|
|
7066
7082
|
return __awaiter(this, void 0, void 0, function () {
|
|
7067
7083
|
var field, multipleApiCallResponses;
|
|
7068
|
-
var
|
|
7069
|
-
return __generator(this, function (
|
|
7084
|
+
var _7;
|
|
7085
|
+
return __generator(this, function (_8) {
|
|
7070
7086
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
7071
7087
|
multipleApiCallResponses = {};
|
|
7072
7088
|
field.api.endpoints.map(function (api) {
|
|
7073
7089
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
7074
7090
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
7075
7091
|
});
|
|
7076
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
7092
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_7 = {}, _7[field.key] = multipleApiCallResponses, _7));
|
|
7077
7093
|
this.patchFormGroup(this.formData);
|
|
7078
7094
|
return [2 /*return*/];
|
|
7079
7095
|
});
|
|
@@ -7082,17 +7098,17 @@
|
|
|
7082
7098
|
KwikIDFormViewComponent.prototype.taskApiCall = function (action, object) {
|
|
7083
7099
|
return __awaiter(this, void 0, void 0, function () {
|
|
7084
7100
|
var apiConfig;
|
|
7085
|
-
var
|
|
7086
|
-
return __generator(this, function (
|
|
7087
|
-
switch (
|
|
7101
|
+
var _7;
|
|
7102
|
+
return __generator(this, function (_8) {
|
|
7103
|
+
switch (_8.label) {
|
|
7088
7104
|
case 0:
|
|
7089
7105
|
this.showApiLoader();
|
|
7090
7106
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
7091
7107
|
case 1:
|
|
7092
|
-
apiConfig =
|
|
7093
|
-
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (
|
|
7094
|
-
|
|
7095
|
-
|
|
7108
|
+
apiConfig = _8.sent();
|
|
7109
|
+
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (_7 = {},
|
|
7110
|
+
_7[action.props.formApiKey] = apiConfig.response.value,
|
|
7111
|
+
_7));
|
|
7096
7112
|
this.waitingForChanges = false;
|
|
7097
7113
|
this.hideApiLoader();
|
|
7098
7114
|
return [2 /*return*/];
|
|
@@ -7103,8 +7119,8 @@
|
|
|
7103
7119
|
KwikIDFormViewComponent.prototype.taskMultipleApiCalls = function (action, object) {
|
|
7104
7120
|
return __awaiter(this, void 0, void 0, function () {
|
|
7105
7121
|
var multipleApiConfig, entrypointApiKey_1, endpoints, nextApiIndex, apiConfig, response, apis;
|
|
7106
|
-
return __generator(this, function (
|
|
7107
|
-
switch (
|
|
7122
|
+
return __generator(this, function (_7) {
|
|
7123
|
+
switch (_7.label) {
|
|
7108
7124
|
case 0:
|
|
7109
7125
|
this.showApiLoader();
|
|
7110
7126
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
@@ -7115,7 +7131,7 @@
|
|
|
7115
7131
|
apiConfig = endpoints[nextApiIndex];
|
|
7116
7132
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
7117
7133
|
case 1:
|
|
7118
|
-
response =
|
|
7134
|
+
response = _7.sent();
|
|
7119
7135
|
multipleApiConfig.endpoints[nextApiIndex] = response.api;
|
|
7120
7136
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, multipleApiConfig);
|
|
7121
7137
|
this.hideApiLoader();
|
|
@@ -7132,8 +7148,8 @@
|
|
|
7132
7148
|
}, this.takeAction.bind(this));
|
|
7133
7149
|
return [4 /*yield*/, apis.callNextApi(multipleApiConfig.entrypoint)];
|
|
7134
7150
|
case 3:
|
|
7135
|
-
|
|
7136
|
-
|
|
7151
|
+
_7.sent();
|
|
7152
|
+
_7.label = 4;
|
|
7137
7153
|
case 4: return [2 /*return*/];
|
|
7138
7154
|
}
|
|
7139
7155
|
});
|
|
@@ -7142,15 +7158,15 @@
|
|
|
7142
7158
|
KwikIDFormViewComponent.prototype.taskMultipleApiCallsEnd = function (action, object) {
|
|
7143
7159
|
return __awaiter(this, void 0, void 0, function () {
|
|
7144
7160
|
var multipleApiConfig, multipleApiCallResponses;
|
|
7145
|
-
var
|
|
7146
|
-
return __generator(this, function (
|
|
7161
|
+
var _7;
|
|
7162
|
+
return __generator(this, function (_8) {
|
|
7147
7163
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
7148
7164
|
multipleApiCallResponses = {};
|
|
7149
7165
|
multipleApiConfig.endpoints.map(function (api) {
|
|
7150
7166
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
7151
7167
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
7152
7168
|
});
|
|
7153
|
-
this.taskData = Object.assign(Object.assign({}, this.taskData), (
|
|
7169
|
+
this.taskData = Object.assign(Object.assign({}, this.taskData), (_7 = {}, _7[action.props.formApiKey] = multipleApiCallResponses, _7));
|
|
7154
7170
|
this.waitingForChanges = false;
|
|
7155
7171
|
this.hideApiLoader();
|
|
7156
7172
|
return [2 /*return*/];
|
|
@@ -7362,7 +7378,7 @@
|
|
|
7362
7378
|
};
|
|
7363
7379
|
KwikIDFormViewComponent.prototype.takeActionOnFieldGroup = function (action, object) {
|
|
7364
7380
|
return __awaiter(this, void 0, void 0, function () {
|
|
7365
|
-
return __generator(this, function (
|
|
7381
|
+
return __generator(this, function (_7) {
|
|
7366
7382
|
/**
|
|
7367
7383
|
* This below code is currently commented because not all actions need to be logged at backend.
|
|
7368
7384
|
* Will look later into where only specific actions needs to be logged or all.
|
|
@@ -7397,12 +7413,12 @@
|
|
|
7397
7413
|
KwikIDFormViewComponent.prototype.takeAction = function (action, object) {
|
|
7398
7414
|
var _a, _b, _c, _d, _e, _f;
|
|
7399
7415
|
return __awaiter(this, void 0, void 0, function () {
|
|
7400
|
-
var
|
|
7401
|
-
return __generator(this, function (
|
|
7402
|
-
switch (
|
|
7416
|
+
var _7, fieldErrorShow_Source, fieldErrorShowSourceValue, fieldErrorHide_Source, fieldErrorHideSourceValue, redirectToUrl_Source, redirectToUrlSourceValue, previewErrorShow_Source, previewErrorShowSourceValue, fieldHtmlMessage_Source, fieldHtmlMessageSourceValue;
|
|
7417
|
+
return __generator(this, function (_8) {
|
|
7418
|
+
switch (_8.label) {
|
|
7403
7419
|
case 0:
|
|
7404
|
-
|
|
7405
|
-
switch (
|
|
7420
|
+
_7 = action.key;
|
|
7421
|
+
switch (_7) {
|
|
7406
7422
|
case EActionKey.FIELD_HIDE: return [3 /*break*/, 1];
|
|
7407
7423
|
case EActionKey.FIELD_SHOW: return [3 /*break*/, 2];
|
|
7408
7424
|
case EActionKey.FIELD_DISABLE: return [3 /*break*/, 3];
|
|
@@ -7464,7 +7480,7 @@
|
|
|
7464
7480
|
fieldErrorShow_Source = new kwikidToolkit.Source(object);
|
|
7465
7481
|
return [4 /*yield*/, fieldErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
7466
7482
|
case 7:
|
|
7467
|
-
fieldErrorShowSourceValue =
|
|
7483
|
+
fieldErrorShowSourceValue = _8.sent();
|
|
7468
7484
|
if (typeof fieldErrorShowSourceValue == "string" ||
|
|
7469
7485
|
typeof fieldErrorShowSourceValue == "number") {
|
|
7470
7486
|
fieldErrorShowSourceValue = String(fieldErrorShowSourceValue);
|
|
@@ -7473,7 +7489,7 @@
|
|
|
7473
7489
|
fieldErrorShowSourceValue = "";
|
|
7474
7490
|
}
|
|
7475
7491
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorShowSourceValue);
|
|
7476
|
-
|
|
7492
|
+
_8.label = 8;
|
|
7477
7493
|
case 8:
|
|
7478
7494
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
7479
7495
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
@@ -7483,7 +7499,7 @@
|
|
|
7483
7499
|
fieldErrorHide_Source = new kwikidToolkit.Source(object);
|
|
7484
7500
|
return [4 /*yield*/, fieldErrorHide_Source.getValueFromSource(action.props.message.source)];
|
|
7485
7501
|
case 10:
|
|
7486
|
-
fieldErrorHideSourceValue =
|
|
7502
|
+
fieldErrorHideSourceValue = _8.sent();
|
|
7487
7503
|
if (typeof fieldErrorHideSourceValue == "string" ||
|
|
7488
7504
|
typeof fieldErrorHideSourceValue == "number") {
|
|
7489
7505
|
fieldErrorHideSourceValue = String(fieldErrorHideSourceValue);
|
|
@@ -7492,7 +7508,7 @@
|
|
|
7492
7508
|
fieldErrorHideSourceValue = "";
|
|
7493
7509
|
}
|
|
7494
7510
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorHideSourceValue);
|
|
7495
|
-
|
|
7511
|
+
_8.label = 11;
|
|
7496
7512
|
case 11:
|
|
7497
7513
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
7498
7514
|
return [3 /*break*/, 66];
|
|
@@ -7504,81 +7520,81 @@
|
|
|
7504
7520
|
return [3 /*break*/, 66];
|
|
7505
7521
|
case 14: return [4 /*yield*/, this.setValue(action, object)];
|
|
7506
7522
|
case 15:
|
|
7507
|
-
|
|
7523
|
+
_8.sent();
|
|
7508
7524
|
return [3 /*break*/, 66];
|
|
7509
7525
|
case 16: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
7510
7526
|
case 17:
|
|
7511
|
-
|
|
7527
|
+
_8.sent();
|
|
7512
7528
|
return [3 /*break*/, 66];
|
|
7513
7529
|
case 18: return [4 /*yield*/, this.setApiStatus(action, object)];
|
|
7514
7530
|
case 19:
|
|
7515
|
-
|
|
7531
|
+
_8.sent();
|
|
7516
7532
|
return [3 /*break*/, 66];
|
|
7517
7533
|
case 20: return [4 /*yield*/, this.setApiHeaderValue(action, object)];
|
|
7518
7534
|
case 21:
|
|
7519
|
-
|
|
7535
|
+
_8.sent();
|
|
7520
7536
|
return [3 /*break*/, 66];
|
|
7521
7537
|
case 22: return [4 /*yield*/, this.setApiHeaderValidity(action, object)];
|
|
7522
7538
|
case 23:
|
|
7523
|
-
|
|
7539
|
+
_8.sent();
|
|
7524
7540
|
return [3 /*break*/, 66];
|
|
7525
7541
|
case 24: return [4 /*yield*/, this.setApiBodyValue(action, object)];
|
|
7526
7542
|
case 25:
|
|
7527
|
-
|
|
7543
|
+
_8.sent();
|
|
7528
7544
|
return [3 /*break*/, 66];
|
|
7529
7545
|
case 26: return [4 /*yield*/, this.setApiBodyValidity(action, object)];
|
|
7530
7546
|
case 27:
|
|
7531
|
-
|
|
7547
|
+
_8.sent();
|
|
7532
7548
|
return [3 /*break*/, 66];
|
|
7533
7549
|
case 28: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
7534
7550
|
case 29:
|
|
7535
|
-
|
|
7551
|
+
_8.sent();
|
|
7536
7552
|
return [3 /*break*/, 66];
|
|
7537
7553
|
case 30: return [4 /*yield*/, this.setFieldValidity(action, object)];
|
|
7538
7554
|
case 31:
|
|
7539
|
-
|
|
7555
|
+
_8.sent();
|
|
7540
7556
|
return [3 /*break*/, 66];
|
|
7541
7557
|
case 32:
|
|
7542
7558
|
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
7543
7559
|
return [3 /*break*/, 66];
|
|
7544
7560
|
case 33: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
7545
7561
|
case 34:
|
|
7546
|
-
|
|
7562
|
+
_8.sent();
|
|
7547
7563
|
return [3 /*break*/, 66];
|
|
7548
7564
|
case 35: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
7549
7565
|
case 36:
|
|
7550
|
-
|
|
7566
|
+
_8.sent();
|
|
7551
7567
|
return [3 /*break*/, 66];
|
|
7552
7568
|
case 37: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
7553
7569
|
case 38:
|
|
7554
|
-
|
|
7570
|
+
_8.sent();
|
|
7555
7571
|
return [3 /*break*/, 66];
|
|
7556
7572
|
case 39: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
7557
7573
|
case 40:
|
|
7558
|
-
|
|
7574
|
+
_8.sent();
|
|
7559
7575
|
return [3 /*break*/, 66];
|
|
7560
7576
|
case 41: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
7561
7577
|
case 42:
|
|
7562
|
-
|
|
7578
|
+
_8.sent();
|
|
7563
7579
|
return [3 /*break*/, 66];
|
|
7564
7580
|
case 43: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
7565
7581
|
case 44:
|
|
7566
|
-
|
|
7582
|
+
_8.sent();
|
|
7567
7583
|
return [3 /*break*/, 66];
|
|
7568
7584
|
case 45:
|
|
7569
7585
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.url, "source")) return [3 /*break*/, 47];
|
|
7570
7586
|
redirectToUrl_Source = new kwikidToolkit.Source(object);
|
|
7571
7587
|
return [4 /*yield*/, redirectToUrl_Source.getValueFromSource(action.props.url.source)];
|
|
7572
7588
|
case 46:
|
|
7573
|
-
redirectToUrlSourceValue =
|
|
7589
|
+
redirectToUrlSourceValue = _8.sent();
|
|
7574
7590
|
if (kwikidToolkit.isEmptyString(redirectToUrlSourceValue)) {
|
|
7575
7591
|
redirectToUrlSourceValue = "";
|
|
7576
7592
|
}
|
|
7577
7593
|
action = kwikidToolkit.setValueToObjectPath(action, "props.url.url", redirectToUrlSourceValue);
|
|
7578
|
-
|
|
7594
|
+
_8.label = 47;
|
|
7579
7595
|
case 47:
|
|
7580
7596
|
this.redirectToUrl(action);
|
|
7581
|
-
|
|
7597
|
+
_8.label = 48;
|
|
7582
7598
|
case 48:
|
|
7583
7599
|
this.showPreview(action.props);
|
|
7584
7600
|
return [3 /*break*/, 66];
|
|
@@ -7587,7 +7603,7 @@
|
|
|
7587
7603
|
previewErrorShow_Source = new kwikidToolkit.Source(object);
|
|
7588
7604
|
return [4 /*yield*/, previewErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
7589
7605
|
case 50:
|
|
7590
|
-
previewErrorShowSourceValue =
|
|
7606
|
+
previewErrorShowSourceValue = _8.sent();
|
|
7591
7607
|
if (typeof previewErrorShowSourceValue == "string" ||
|
|
7592
7608
|
typeof previewErrorShowSourceValue == "number") {
|
|
7593
7609
|
previewErrorShowSourceValue = String(previewErrorShowSourceValue);
|
|
@@ -7596,7 +7612,7 @@
|
|
|
7596
7612
|
previewErrorShowSourceValue = "";
|
|
7597
7613
|
}
|
|
7598
7614
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", previewErrorShowSourceValue);
|
|
7599
|
-
|
|
7615
|
+
_8.label = 51;
|
|
7600
7616
|
case 51:
|
|
7601
7617
|
this.showErrorPreview(action.props);
|
|
7602
7618
|
return [3 /*break*/, 66];
|
|
@@ -7640,7 +7656,7 @@
|
|
|
7640
7656
|
fieldHtmlMessage_Source = new kwikidToolkit.Source(object);
|
|
7641
7657
|
return [4 /*yield*/, fieldHtmlMessage_Source.getValueFromSource(action.props.message.source)];
|
|
7642
7658
|
case 63:
|
|
7643
|
-
fieldHtmlMessageSourceValue =
|
|
7659
|
+
fieldHtmlMessageSourceValue = _8.sent();
|
|
7644
7660
|
if (typeof fieldHtmlMessageSourceValue == "string" ||
|
|
7645
7661
|
typeof fieldHtmlMessageSourceValue == "number") {
|
|
7646
7662
|
fieldHtmlMessageSourceValue = String(fieldHtmlMessageSourceValue);
|
|
@@ -7649,7 +7665,7 @@
|
|
|
7649
7665
|
fieldHtmlMessageSourceValue = "";
|
|
7650
7666
|
}
|
|
7651
7667
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldHtmlMessageSourceValue);
|
|
7652
|
-
|
|
7668
|
+
_8.label = 64;
|
|
7653
7669
|
case 64:
|
|
7654
7670
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
7655
7671
|
this.setHtml(action.props.fieldKey, action.props.message);
|
|
@@ -7663,7 +7679,7 @@
|
|
|
7663
7679
|
return KwikIDFormViewComponent;
|
|
7664
7680
|
}());
|
|
7665
7681
|
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: KwikIDFormViewService }, { token: i5.TuiPushService }, { token: i4.TuiAlertService }, { token: i6.TuiPreviewDialogService }, { token: i4.TuiDialogService }, { token: i2__namespace.KwikUILoaderService }, { token: i3__namespace$2.KwikIDCameraRecordService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7666
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { allFormsData: "allFormsData", 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", onClickFormFieldButton: "onClickFormFieldButton", onClickGoBack: "onClickGoBack", onClickSaveForm: "onClickSaveForm", onClickViewForms: "onClickViewForms" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.logo?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n [style]=\"\n formConfig.properties?.header?.logo?.styles ?? '' | styleSanitizer\n \"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >\n Step {{ formConfig.sequenceNo }} of {{ formConfig.formsListLength }}\n </div>\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [style]=\"formConfig.properties?.main?.styles ?? '' | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Email -->\n <ng-container *ngSwitchCase=\"'email'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-email\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [domains]=\"field?.properties?.domains\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-email>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Password -->\n <ng-container *ngSwitchCase=\"'password'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-password\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [hintContent]=\"field?.properties?.hintContent\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-password>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Time -->\n <ng-container *ngSwitchCase=\"'time'\">\n <div\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 [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Capture -->\n <ng-container *ngSwitchCase=\"'capture'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'capture'\"\n [validators]=\"field?.validators\"\n (onClick)=\"handleOnClickInputCamera($event, field)\"\n (getRemovedFile)=\"handleOnClickGetRemovedMediaFile($event)\"\n ></kwikui-input-camera>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Record -->\n <ng-container *ngSwitchCase=\"'record'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'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 [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-star-rating\n [color]=\"field?.properties?.color\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [iconMarked]=\"field?.properties?.iconMarked\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-star-rating>\n </label>\n <ng-template #labelTemplate>\n <p>\n <b\n >{{ field?.properties?.placeholder }}\n <span *ngIf=\"field.validators?.required\">*</span></b\n >\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n id=\"kwikid-camera-container\"\n *ngIf=\"isShowCamera\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"cameraType\"\n [data]=\"cameraData\"\n [image]=\"cameraImage\"\n [video]=\"cameraVideo\"\n [config]=\"cameraConfig\"\n (getImage)=\"handleGetCameraMedia($event, 'CAPTURE')\"\n (getVideo)=\"handleGetCameraMedia($event, 'RECORD')\"\n (onClickBack)=\"handleOnClickCameraBack($event)\"\n (onClickClose)=\"handleOnClickCameraClose($event)\"\n (onClickSave)=\"handleOnClickSaveCameraMedia($event, cameraType)\"\n >\n <ng-container\n *ngIf=\"cameraType === '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=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"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=\"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=\"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=\"cameraType === '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 cameraConfig?.header?.isBack && cameraRecordingState == '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=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"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=\"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]=\"cameraRecordingState == 'RECORDING'\"\n [class.paused]=\"cameraRecordingState == 'PAUSED'\"\n [class.recorded]=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n >\n <div\n *ngIf=\"cameraRecordingState == 'RECORDING'\"\n class=\"dot recording blink\"\n >\n </div>\n <div\n *ngIf=\"cameraRecordingState === 'PAUSED'\"\n class=\"dot paused\"\n >\n </div>\n <div\n *ngIf=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n class=\"dot recorded\"\n >\n </div>\n <div>\n {{ cameraRecordingTime | formatTimer }}\n <ng-container\n *ngIf=\"cameraConfig?.others?.maxRecordingTimeInSeconds\"\n >\n /\n {{\n cameraConfig?.others?.maxRecordingTimeInSeconds\n | 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}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}@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: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputEmailComponent, selector: "kwikui-input-email", inputs: ["case", "disabled", "domains", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPasswordComponent, selector: "kwikui-input-password", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["decimal", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "precision", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxCalculatedFromToday", "min", "minCalculatedFromToday", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.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: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i4__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSelectComponent, selector: "kwikui-input-select", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "options", "placeholder", "properties", "searchable", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "prefix", "properties", "quantum", "size", "steps", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "mode", "otpLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators"], outputs: ["getKeyValue", "getRemovedFile"] }, { type: i3__namespace$2.KwikUIInputCameraComponent, selector: "kwikui-input-camera", inputs: ["buttonText", "disabled", "focus", "formControl", "formControlName", "icon", "id", "invalid", "mediaFiles", "properties", "showMediaFiles", "size", "type", "validators"], outputs: ["onClick", "getRemovedFile"] }, { type: i2__namespace.KwikUIStarRatingComponent, selector: "kwikui-star-rating", inputs: ["color", "disabled", "focus", "formControl", "formControlName", "icon", "iconMarked", "id", "invalid", "label", "max", "min", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i5__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "lines", "timestamp"], outputs: ["close"] }, { type: i4__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i6__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i6__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i4__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i3__namespace$2.KwikIDCameraComponent, selector: "kwikid-camera", inputs: ["type", "config", "data", "image", "video"], outputs: ["getImage", "onClickSave", "getVideo"] }], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2__namespace.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2__namespace.KwikUISafeUrlPipe, "formatTimer": TimerPipe } });
|
|
7682
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { allFormsData: "allFormsData", 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", onClickFormFieldButton: "onClickFormFieldButton", onClickGoBack: "onClickGoBack", onClickSaveForm: "onClickSaveForm", onClickViewForms: "onClickViewForms" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.logo?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n [style]=\"\n formConfig.properties?.header?.logo?.styles ?? '' | styleSanitizer\n \"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >\n Step {{ formConfig.sequenceNo }} of {{ formConfig.formsListLength }}\n </div>\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [style]=\"formConfig.properties?.main?.styles ?? '' | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n [label]=\"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 [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Email -->\n <ng-container *ngSwitchCase=\"'email'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-email\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [domains]=\"field?.properties?.domains\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-email>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Password -->\n <ng-container *ngSwitchCase=\"'password'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-password\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [hintContent]=\"field?.properties?.hintContent\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-password>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Time -->\n <ng-container *ngSwitchCase=\"'time'\">\n <div\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 [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Capture -->\n <ng-container *ngSwitchCase=\"'capture'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'capture'\"\n [validators]=\"field?.validators\"\n (onClick)=\"handleOnClickInputCamera($event, field)\"\n (getRemovedFile)=\"handleOnClickGetRemovedMediaFile($event)\"\n ></kwikui-input-camera>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Record -->\n <ng-container *ngSwitchCase=\"'record'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'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 [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-star-rating\n [color]=\"field?.properties?.color\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [iconMarked]=\"field?.properties?.iconMarked\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-star-rating>\n </label>\n <ng-template #labelTemplate>\n <p>\n <b\n >{{ field?.properties?.placeholder }}\n <span *ngIf=\"field.validators?.required\">*</span></b\n >\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n id=\"kwikid-camera-container\"\n *ngIf=\"isShowCamera\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"cameraType\"\n [data]=\"cameraData\"\n [image]=\"cameraImage\"\n [video]=\"cameraVideo\"\n [config]=\"cameraConfig\"\n (getImage)=\"handleGetCameraMedia($event, 'CAPTURE')\"\n (getVideo)=\"handleGetCameraMedia($event, 'RECORD')\"\n (onClickBack)=\"handleOnClickCameraBack($event)\"\n (onClickClose)=\"handleOnClickCameraClose($event)\"\n (onClickSave)=\"handleOnClickSaveCameraMedia($event, cameraType)\"\n >\n <ng-container\n *ngIf=\"cameraType === '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=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"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=\"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=\"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=\"cameraType === '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 cameraConfig?.header?.isBack && cameraRecordingState == '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=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"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=\"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]=\"cameraRecordingState == 'RECORDING'\"\n [class.paused]=\"cameraRecordingState == 'PAUSED'\"\n [class.recorded]=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n >\n <div\n *ngIf=\"cameraRecordingState == 'RECORDING'\"\n class=\"dot recording blink\"\n >\n </div>\n <div\n *ngIf=\"cameraRecordingState === 'PAUSED'\"\n class=\"dot paused\"\n >\n </div>\n <div\n *ngIf=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n class=\"dot recorded\"\n >\n </div>\n <div>\n {{ cameraRecordingTime | formatTimer }}\n <ng-container\n *ngIf=\"cameraConfig?.others?.maxRecordingTimeInSeconds\"\n >\n /\n {{\n cameraConfig?.others?.maxRecordingTimeInSeconds\n | 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}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}@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: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputEmailComponent, selector: "kwikui-input-email", inputs: ["case", "disabled", "domains", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPasswordComponent, selector: "kwikui-input-password", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["decimal", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "precision", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxCalculatedFromToday", "min", "minCalculatedFromToday", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.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: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i4__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSelectComponent, selector: "kwikui-input-select", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "options", "placeholder", "properties", "searchable", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "prefix", "properties", "quantum", "size", "steps", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "mode", "otpLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators"], outputs: ["getKeyValue", "getRemovedFile"] }, { type: i3__namespace$2.KwikUIInputCameraComponent, selector: "kwikui-input-camera", inputs: ["buttonText", "disabled", "focus", "formControl", "formControlName", "icon", "id", "invalid", "mediaFiles", "properties", "showMediaFiles", "size", "type", "validators"], outputs: ["onClick", "getRemovedFile"] }, { type: i2__namespace.KwikUIStarRatingComponent, selector: "kwikui-star-rating", inputs: ["color", "disabled", "focus", "formControl", "formControlName", "icon", "iconMarked", "id", "invalid", "label", "max", "min", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i5__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "lines", "timestamp"], outputs: ["close"] }, { type: i4__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i6__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i6__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i4__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i3__namespace$2.KwikIDCameraComponent, selector: "kwikid-camera", inputs: ["type", "config", "data", "image", "video"], outputs: ["getImage", "onClickSave", "getVideo"] }], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2__namespace.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2__namespace.KwikUISafeUrlPipe, "formatTimer": TimerPipe } });
|
|
7667
7683
|
__decorate([
|
|
7668
7684
|
kwikidToolkit.logMethod
|
|
7669
7685
|
], KwikIDFormViewComponent.prototype, "resetCamera", null);
|
|
@@ -8178,7 +8194,7 @@
|
|
|
8178
8194
|
return;
|
|
8179
8195
|
}
|
|
8180
8196
|
this.triggerLogs(ELogEventType$2.FORM__FORM_OPEN_BUTTON_CLICK, {
|
|
8181
|
-
form_key:
|
|
8197
|
+
form_key: selectedForm,
|
|
8182
8198
|
form_label: (_d = (_c = this.activeFormConfig) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : (_f = (_e = this.activeFormConfig) === null || _e === void 0 ? void 0 : _e.props) === null || _f === void 0 ? void 0 : _f.title
|
|
8183
8199
|
});
|
|
8184
8200
|
this.selectedForm = selectedForm;
|