kwikid-forms 0.6.28 → 0.6.29
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 +448 -438
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +19 -11
- package/esm2015/lib/renderer/forms-list/forms-list.component.js +2 -2
- package/fesm2015/kwikid-forms.js +20 -12
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/package.json +1 -1
|
@@ -4536,11 +4536,11 @@
|
|
|
4536
4536
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4537
4537
|
var res;
|
|
4538
4538
|
var _this = this;
|
|
4539
|
-
return __generator(this, function (
|
|
4540
|
-
switch (
|
|
4539
|
+
return __generator(this, function (_7) {
|
|
4540
|
+
switch (_7.label) {
|
|
4541
4541
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4542
4542
|
case 1:
|
|
4543
|
-
res =
|
|
4543
|
+
res = _7.sent();
|
|
4544
4544
|
if (res) {
|
|
4545
4545
|
this.loading = false;
|
|
4546
4546
|
this.cameraRecordingTimerSubcription = this.cameraRecordService
|
|
@@ -4563,7 +4563,7 @@
|
|
|
4563
4563
|
};
|
|
4564
4564
|
KwikIDFormViewComponent.prototype.ngAfterViewInit = function () { };
|
|
4565
4565
|
KwikIDFormViewComponent.prototype.ngOnChanges = function (changes) {
|
|
4566
|
-
var
|
|
4566
|
+
var _7, _8, _9;
|
|
4567
4567
|
var _this = this;
|
|
4568
4568
|
var _a, _b, _c, _d;
|
|
4569
4569
|
var verifyChange = function (key) {
|
|
@@ -4591,9 +4591,9 @@
|
|
|
4591
4591
|
? changes.popupFormCallback.currentValue.popupFormData["data"]
|
|
4592
4592
|
: changes.popupFormCallback.currentValue.popupFormData;
|
|
4593
4593
|
var popupFormConfig = changes.popupFormCallback.currentValue.popupFormConfig;
|
|
4594
|
-
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (
|
|
4595
|
-
|
|
4596
|
-
|
|
4594
|
+
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (_7 = {},
|
|
4595
|
+
_7[popupFormConfig.key] = popupFormData,
|
|
4596
|
+
_7));
|
|
4597
4597
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4598
4598
|
if (kwikidToolkit.checkObjectKeyExists(changes.popupFormCallback.currentValue, "stopTaskExecution")) {
|
|
4599
4599
|
this.stopTaskExecution =
|
|
@@ -4645,9 +4645,9 @@
|
|
|
4645
4645
|
emitEvent: false,
|
|
4646
4646
|
onlySelf: false
|
|
4647
4647
|
});
|
|
4648
|
-
this.formGroup.patchValue((
|
|
4649
|
-
|
|
4650
|
-
|
|
4648
|
+
this.formGroup.patchValue((_8 = {},
|
|
4649
|
+
_8[field_1.key] = kwikidToolkit.getObjectDeepCopy([image]),
|
|
4650
|
+
_8), { emitEvent: false });
|
|
4651
4651
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
4652
4652
|
emitEvent: false
|
|
4653
4653
|
});
|
|
@@ -4667,11 +4667,11 @@
|
|
|
4667
4667
|
ALL_FORMS_DATA: this.allFormsData
|
|
4668
4668
|
}, this.takeAction.bind(this));
|
|
4669
4669
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4670
|
-
return __generator(this, function (
|
|
4671
|
-
switch (
|
|
4670
|
+
return __generator(this, function (_7) {
|
|
4671
|
+
switch (_7.label) {
|
|
4672
4672
|
case 0: return [4 /*yield*/, validations_1.validate(field_1.validation)];
|
|
4673
4673
|
case 1:
|
|
4674
|
-
|
|
4674
|
+
_7.sent();
|
|
4675
4675
|
return [2 /*return*/];
|
|
4676
4676
|
}
|
|
4677
4677
|
});
|
|
@@ -4711,9 +4711,9 @@
|
|
|
4711
4711
|
emitEvent: false,
|
|
4712
4712
|
onlySelf: false
|
|
4713
4713
|
});
|
|
4714
|
-
this.formGroup.patchValue((
|
|
4715
|
-
|
|
4716
|
-
|
|
4714
|
+
this.formGroup.patchValue((_9 = {},
|
|
4715
|
+
_9[field_1.key] = kwikidToolkit.getObjectDeepCopy([video]),
|
|
4716
|
+
_9), { emitEvent: false });
|
|
4717
4717
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
4718
4718
|
emitEvent: false
|
|
4719
4719
|
});
|
|
@@ -4733,11 +4733,11 @@
|
|
|
4733
4733
|
ALL_FORMS_DATA: this.allFormsData
|
|
4734
4734
|
}, this.takeAction.bind(this));
|
|
4735
4735
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4736
|
-
return __generator(this, function (
|
|
4737
|
-
switch (
|
|
4736
|
+
return __generator(this, function (_7) {
|
|
4737
|
+
switch (_7.label) {
|
|
4738
4738
|
case 0: return [4 /*yield*/, validations_2.validate(field_1.validation)];
|
|
4739
4739
|
case 1:
|
|
4740
|
-
|
|
4740
|
+
_7.sent();
|
|
4741
4741
|
return [2 /*return*/];
|
|
4742
4742
|
}
|
|
4743
4743
|
});
|
|
@@ -4800,11 +4800,11 @@
|
|
|
4800
4800
|
ALL_FORMS_DATA: this.allFormsData
|
|
4801
4801
|
}, this.takeAction.bind(this));
|
|
4802
4802
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4803
|
-
return __generator(this, function (
|
|
4804
|
-
switch (
|
|
4803
|
+
return __generator(this, function (_7) {
|
|
4804
|
+
switch (_7.label) {
|
|
4805
4805
|
case 0: return [4 /*yield*/, validations_3.validate(field_2.validation)];
|
|
4806
4806
|
case 1:
|
|
4807
|
-
|
|
4807
|
+
_7.sent();
|
|
4808
4808
|
return [2 /*return*/];
|
|
4809
4809
|
}
|
|
4810
4810
|
});
|
|
@@ -4819,11 +4819,11 @@
|
|
|
4819
4819
|
if (verifyChange("formConfig")) {
|
|
4820
4820
|
this.formConfig = changes.formConfig.currentValue;
|
|
4821
4821
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4822
|
-
return __generator(this, function (
|
|
4823
|
-
switch (
|
|
4822
|
+
return __generator(this, function (_7) {
|
|
4823
|
+
switch (_7.label) {
|
|
4824
4824
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4825
4825
|
case 1:
|
|
4826
|
-
|
|
4826
|
+
_7.sent();
|
|
4827
4827
|
return [2 /*return*/];
|
|
4828
4828
|
}
|
|
4829
4829
|
});
|
|
@@ -4843,11 +4843,11 @@
|
|
|
4843
4843
|
};
|
|
4844
4844
|
KwikIDFormViewComponent.prototype.initFormConfig = function (formConfig) {
|
|
4845
4845
|
return __awaiter(this, void 0, void 0, function () {
|
|
4846
|
-
var
|
|
4847
|
-
var e_1,
|
|
4846
|
+
var _7, _8, preTask, task, e_1_1, _9, _loop_1, this_1, _10, _11, field, _12, _13, field, validations, e_2_1;
|
|
4847
|
+
var e_1, _14, e_3, _15, e_2, _16;
|
|
4848
4848
|
var _this = this;
|
|
4849
|
-
return __generator(this, function (
|
|
4850
|
-
switch (
|
|
4849
|
+
return __generator(this, function (_17) {
|
|
4850
|
+
switch (_17.label) {
|
|
4851
4851
|
case 0:
|
|
4852
4852
|
formConfig = new Converter().convertFormConfig(formConfig);
|
|
4853
4853
|
formConfig = new Converter().updateFormConfigProperties(formConfig);
|
|
@@ -4861,14 +4861,14 @@
|
|
|
4861
4861
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
4862
4862
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "pre"))) return [3 /*break*/, 10];
|
|
4863
4863
|
this.triggerLogs(ELogEventType$1.FORM__TASK_PRE, {});
|
|
4864
|
-
|
|
4864
|
+
_17.label = 1;
|
|
4865
4865
|
case 1:
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4866
|
+
_17.trys.push([1, 7, 8, 9]);
|
|
4867
|
+
_7 = __values(this.formConfig.tasks.pre), _8 = _7.next();
|
|
4868
|
+
_17.label = 2;
|
|
4869
4869
|
case 2:
|
|
4870
|
-
if (!!
|
|
4871
|
-
preTask =
|
|
4870
|
+
if (!!_8.done) return [3 /*break*/, 6];
|
|
4871
|
+
preTask = _8.value;
|
|
4872
4872
|
task = new Tasks(preTask, {
|
|
4873
4873
|
FORM_CONFIG: this.formConfig,
|
|
4874
4874
|
FORM_FIELDS: this.formFields,
|
|
@@ -4886,7 +4886,7 @@
|
|
|
4886
4886
|
}
|
|
4887
4887
|
return [4 /*yield*/, task.execute()];
|
|
4888
4888
|
case 3:
|
|
4889
|
-
|
|
4889
|
+
_17.sent();
|
|
4890
4890
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4891
4891
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
4892
4892
|
var intervalId = setInterval(function () {
|
|
@@ -4898,36 +4898,36 @@
|
|
|
4898
4898
|
})];
|
|
4899
4899
|
case 4:
|
|
4900
4900
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4901
|
-
|
|
4901
|
+
_17.sent();
|
|
4902
4902
|
if (this.stopTaskExecution) {
|
|
4903
4903
|
return [3 /*break*/, 6];
|
|
4904
4904
|
}
|
|
4905
|
-
|
|
4905
|
+
_17.label = 5;
|
|
4906
4906
|
case 5:
|
|
4907
|
-
|
|
4907
|
+
_8 = _7.next();
|
|
4908
4908
|
return [3 /*break*/, 2];
|
|
4909
4909
|
case 6: return [3 /*break*/, 9];
|
|
4910
4910
|
case 7:
|
|
4911
|
-
e_1_1 =
|
|
4911
|
+
e_1_1 = _17.sent();
|
|
4912
4912
|
e_1 = { error: e_1_1 };
|
|
4913
4913
|
return [3 /*break*/, 9];
|
|
4914
4914
|
case 8:
|
|
4915
4915
|
try {
|
|
4916
|
-
if (
|
|
4916
|
+
if (_8 && !_8.done && (_14 = _7.return)) _14.call(_7);
|
|
4917
4917
|
}
|
|
4918
4918
|
finally { if (e_1) throw e_1.error; }
|
|
4919
4919
|
return [7 /*endfinally*/];
|
|
4920
4920
|
case 9:
|
|
4921
4921
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4922
|
-
|
|
4922
|
+
_17.label = 10;
|
|
4923
4923
|
case 10:
|
|
4924
4924
|
if (this.stopTaskExecution) {
|
|
4925
4925
|
return [2 /*return*/, false];
|
|
4926
4926
|
}
|
|
4927
|
-
|
|
4927
|
+
_9 = this;
|
|
4928
4928
|
return [4 /*yield*/, this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this))];
|
|
4929
4929
|
case 11:
|
|
4930
|
-
|
|
4930
|
+
_9.formGroup = _17.sent();
|
|
4931
4931
|
/**
|
|
4932
4932
|
* For some reason if their a field of type 'IMAGE' then
|
|
4933
4933
|
* formData is adding a 'undefined' key with last image's value from the array.
|
|
@@ -4937,10 +4937,10 @@
|
|
|
4937
4937
|
delete this.formData["undefined"];
|
|
4938
4938
|
}
|
|
4939
4939
|
_loop_1 = function (field) {
|
|
4940
|
-
var
|
|
4940
|
+
var _18, _19;
|
|
4941
4941
|
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), (
|
|
4942
|
+
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_18 = {}, _18[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _18));
|
|
4943
|
+
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
4944
|
if (field.type === EFieldType.FILE) {
|
|
4945
4945
|
this_1.files[field.key] = this_1.formGroup.controls[field.key].value;
|
|
4946
4946
|
}
|
|
@@ -4954,11 +4954,11 @@
|
|
|
4954
4954
|
}
|
|
4955
4955
|
this_1.formGroup.controls[field.key].valueChanges
|
|
4956
4956
|
.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), (
|
|
4957
|
+
.subscribe(function (_7) {
|
|
4958
|
+
var _8, _9;
|
|
4959
|
+
var _10 = __read(_7, 2), previousValue = _10[0], currentValue = _10[1];
|
|
4960
|
+
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (_8 = {}, _8[field.key] = convertFormFieldValueToStandardFormat(field, previousValue), _8));
|
|
4961
|
+
_this.formData = Object.assign(Object.assign({}, _this.formData), (_9 = {}, _9[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _9));
|
|
4962
4962
|
if (field.type === EFieldType.FILE) {
|
|
4963
4963
|
_this.files[field.key] = currentValue;
|
|
4964
4964
|
}
|
|
@@ -4975,26 +4975,26 @@
|
|
|
4975
4975
|
};
|
|
4976
4976
|
this_1 = this;
|
|
4977
4977
|
try {
|
|
4978
|
-
for (
|
|
4979
|
-
field =
|
|
4978
|
+
for (_10 = __values(this.formFields), _11 = _10.next(); !_11.done; _11 = _10.next()) {
|
|
4979
|
+
field = _11.value;
|
|
4980
4980
|
_loop_1(field);
|
|
4981
4981
|
}
|
|
4982
4982
|
}
|
|
4983
4983
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
4984
4984
|
finally {
|
|
4985
4985
|
try {
|
|
4986
|
-
if (
|
|
4986
|
+
if (_11 && !_11.done && (_15 = _10.return)) _15.call(_10);
|
|
4987
4987
|
}
|
|
4988
4988
|
finally { if (e_3) throw e_3.error; }
|
|
4989
4989
|
}
|
|
4990
|
-
|
|
4990
|
+
_17.label = 12;
|
|
4991
4991
|
case 12:
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4992
|
+
_17.trys.push([12, 18, 19, 20]);
|
|
4993
|
+
_12 = __values(this.formFields), _13 = _12.next();
|
|
4994
|
+
_17.label = 13;
|
|
4995
4995
|
case 13:
|
|
4996
|
-
if (!!
|
|
4997
|
-
field =
|
|
4996
|
+
if (!!_13.done) return [3 /*break*/, 17];
|
|
4997
|
+
field = _13.value;
|
|
4998
4998
|
if (!field.isFormElement) return [3 /*break*/, 16];
|
|
4999
4999
|
if (!kwikidToolkit.checkObjectKeyExists(field, "validation")) return [3 /*break*/, 15];
|
|
5000
5000
|
if (!field.validation.triggers.includes("ON_INIT")) return [3 /*break*/, 15];
|
|
@@ -5008,8 +5008,8 @@
|
|
|
5008
5008
|
}, this.takeAction.bind(this));
|
|
5009
5009
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
5010
5010
|
case 14:
|
|
5011
|
-
|
|
5012
|
-
|
|
5011
|
+
_17.sent();
|
|
5012
|
+
_17.label = 15;
|
|
5013
5013
|
case 15:
|
|
5014
5014
|
if (kwikidToolkit.checkObjectKeyExists(field, "connectedElements")) {
|
|
5015
5015
|
this.handleConnectedElements({
|
|
@@ -5017,18 +5017,18 @@
|
|
|
5017
5017
|
value: this.formGroup.controls[field.key].value
|
|
5018
5018
|
}, "ON_INIT");
|
|
5019
5019
|
}
|
|
5020
|
-
|
|
5020
|
+
_17.label = 16;
|
|
5021
5021
|
case 16:
|
|
5022
|
-
|
|
5022
|
+
_13 = _12.next();
|
|
5023
5023
|
return [3 /*break*/, 13];
|
|
5024
5024
|
case 17: return [3 /*break*/, 20];
|
|
5025
5025
|
case 18:
|
|
5026
|
-
e_2_1 =
|
|
5026
|
+
e_2_1 = _17.sent();
|
|
5027
5027
|
e_2 = { error: e_2_1 };
|
|
5028
5028
|
return [3 /*break*/, 20];
|
|
5029
5029
|
case 19:
|
|
5030
5030
|
try {
|
|
5031
|
-
if (
|
|
5031
|
+
if (_13 && !_13.done && (_16 = _12.return)) _16.call(_12);
|
|
5032
5032
|
}
|
|
5033
5033
|
finally { if (e_2) throw e_2.error; }
|
|
5034
5034
|
return [7 /*endfinally*/];
|
|
@@ -5066,10 +5066,10 @@
|
|
|
5066
5066
|
};
|
|
5067
5067
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroupActions = function (childFieldGroupConfig, parentField) {
|
|
5068
5068
|
return __awaiter(this, void 0, void 0, function () {
|
|
5069
|
-
var rulesMapping,
|
|
5070
|
-
var e_4,
|
|
5071
|
-
return __generator(this, function (
|
|
5072
|
-
switch (
|
|
5069
|
+
var rulesMapping, _7, _8, action, conditionSuccess, actions, e_4_1;
|
|
5070
|
+
var e_4, _9;
|
|
5071
|
+
return __generator(this, function (_10) {
|
|
5072
|
+
switch (_10.label) {
|
|
5073
5073
|
case 0:
|
|
5074
5074
|
if (!kwikidToolkit.checkObjectKeyExists(childFieldGroupConfig, "rules")) return [3 /*break*/, 8];
|
|
5075
5075
|
rulesMapping = new kwikidToolkit.Rule(childFieldGroupConfig.rules, {
|
|
@@ -5079,14 +5079,14 @@
|
|
|
5079
5079
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5080
5080
|
ALL_FORMS_DATA: this.allFormsData
|
|
5081
5081
|
}).mapping();
|
|
5082
|
-
|
|
5082
|
+
_10.label = 1;
|
|
5083
5083
|
case 1:
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5084
|
+
_10.trys.push([1, 6, 7, 8]);
|
|
5085
|
+
_7 = __values(childFieldGroupConfig.actions), _8 = _7.next();
|
|
5086
|
+
_10.label = 2;
|
|
5087
5087
|
case 2:
|
|
5088
|
-
if (!!
|
|
5089
|
-
action =
|
|
5088
|
+
if (!!_8.done) return [3 /*break*/, 5];
|
|
5089
|
+
action = _8.value;
|
|
5090
5090
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5091
5091
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5092
5092
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5099,19 +5099,19 @@
|
|
|
5099
5099
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
5100
5100
|
return [4 /*yield*/, actions.execute()];
|
|
5101
5101
|
case 3:
|
|
5102
|
-
|
|
5103
|
-
|
|
5102
|
+
_10.sent();
|
|
5103
|
+
_10.label = 4;
|
|
5104
5104
|
case 4:
|
|
5105
|
-
|
|
5105
|
+
_8 = _7.next();
|
|
5106
5106
|
return [3 /*break*/, 2];
|
|
5107
5107
|
case 5: return [3 /*break*/, 8];
|
|
5108
5108
|
case 6:
|
|
5109
|
-
e_4_1 =
|
|
5109
|
+
e_4_1 = _10.sent();
|
|
5110
5110
|
e_4 = { error: e_4_1 };
|
|
5111
5111
|
return [3 /*break*/, 8];
|
|
5112
5112
|
case 7:
|
|
5113
5113
|
try {
|
|
5114
|
-
if (
|
|
5114
|
+
if (_8 && !_8.done && (_9 = _7.return)) _9.call(_7);
|
|
5115
5115
|
}
|
|
5116
5116
|
finally { if (e_4) throw e_4.error; }
|
|
5117
5117
|
return [7 /*endfinally*/];
|
|
@@ -5122,15 +5122,15 @@
|
|
|
5122
5122
|
};
|
|
5123
5123
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroup = function (currentField, connectedFieldGroupConfig, eventType) {
|
|
5124
5124
|
return __awaiter(this, void 0, void 0, function () {
|
|
5125
|
-
return __generator(this, function (
|
|
5126
|
-
switch (
|
|
5125
|
+
return __generator(this, function (_7) {
|
|
5126
|
+
switch (_7.label) {
|
|
5127
5127
|
case 0:
|
|
5128
5128
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldGroupConfig, "triggers")) return [3 /*break*/, 2];
|
|
5129
5129
|
if (!connectedFieldGroupConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5130
5130
|
return [4 /*yield*/, this.handleConnectedElementFieldGroupActions(connectedFieldGroupConfig, currentField)];
|
|
5131
5131
|
case 1:
|
|
5132
|
-
|
|
5133
|
-
|
|
5132
|
+
_7.sent();
|
|
5133
|
+
_7.label = 2;
|
|
5134
5134
|
case 2: return [2 /*return*/];
|
|
5135
5135
|
}
|
|
5136
5136
|
});
|
|
@@ -5138,10 +5138,10 @@
|
|
|
5138
5138
|
};
|
|
5139
5139
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldActions = function (connectedFieldConfig, connectedField) {
|
|
5140
5140
|
return __awaiter(this, void 0, void 0, function () {
|
|
5141
|
-
var rulesMapping,
|
|
5142
|
-
var e_5,
|
|
5143
|
-
return __generator(this, function (
|
|
5144
|
-
switch (
|
|
5141
|
+
var rulesMapping, _7, _8, action, conditionSuccess, actions, e_5_1;
|
|
5142
|
+
var e_5, _9;
|
|
5143
|
+
return __generator(this, function (_10) {
|
|
5144
|
+
switch (_10.label) {
|
|
5145
5145
|
case 0:
|
|
5146
5146
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "rules")) return [3 /*break*/, 8];
|
|
5147
5147
|
rulesMapping = new kwikidToolkit.Rule(connectedFieldConfig.rules, {
|
|
@@ -5151,14 +5151,14 @@
|
|
|
5151
5151
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5152
5152
|
ALL_FORMS_DATA: this.allFormsData
|
|
5153
5153
|
}).mapping();
|
|
5154
|
-
|
|
5154
|
+
_10.label = 1;
|
|
5155
5155
|
case 1:
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5156
|
+
_10.trys.push([1, 6, 7, 8]);
|
|
5157
|
+
_7 = __values(connectedFieldConfig.actions), _8 = _7.next();
|
|
5158
|
+
_10.label = 2;
|
|
5159
5159
|
case 2:
|
|
5160
|
-
if (!!
|
|
5161
|
-
action =
|
|
5160
|
+
if (!!_8.done) return [3 /*break*/, 5];
|
|
5161
|
+
action = _8.value;
|
|
5162
5162
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5163
5163
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5164
5164
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5171,19 +5171,19 @@
|
|
|
5171
5171
|
}, this.takeAction.bind(this));
|
|
5172
5172
|
return [4 /*yield*/, actions.execute()];
|
|
5173
5173
|
case 3:
|
|
5174
|
-
|
|
5175
|
-
|
|
5174
|
+
_10.sent();
|
|
5175
|
+
_10.label = 4;
|
|
5176
5176
|
case 4:
|
|
5177
|
-
|
|
5177
|
+
_8 = _7.next();
|
|
5178
5178
|
return [3 /*break*/, 2];
|
|
5179
5179
|
case 5: return [3 /*break*/, 8];
|
|
5180
5180
|
case 6:
|
|
5181
|
-
e_5_1 =
|
|
5181
|
+
e_5_1 = _10.sent();
|
|
5182
5182
|
e_5 = { error: e_5_1 };
|
|
5183
5183
|
return [3 /*break*/, 8];
|
|
5184
5184
|
case 7:
|
|
5185
5185
|
try {
|
|
5186
|
-
if (
|
|
5186
|
+
if (_8 && !_8.done && (_9 = _7.return)) _9.call(_7);
|
|
5187
5187
|
}
|
|
5188
5188
|
finally { if (e_5) throw e_5.error; }
|
|
5189
5189
|
return [7 /*endfinally*/];
|
|
@@ -5195,16 +5195,16 @@
|
|
|
5195
5195
|
KwikIDFormViewComponent.prototype.handleConnectedElementFields = function (currentField, connectedFieldConfig, eventType, nested) {
|
|
5196
5196
|
return __awaiter(this, void 0, void 0, function () {
|
|
5197
5197
|
var connectedField;
|
|
5198
|
-
return __generator(this, function (
|
|
5199
|
-
switch (
|
|
5198
|
+
return __generator(this, function (_7) {
|
|
5199
|
+
switch (_7.label) {
|
|
5200
5200
|
case 0:
|
|
5201
5201
|
connectedField = getFormFieldByKey(this.formFields, connectedFieldConfig["key"]);
|
|
5202
5202
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "triggers")) return [3 /*break*/, 2];
|
|
5203
5203
|
if (!connectedFieldConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5204
5204
|
return [4 /*yield*/, this.handleConnectedElementFieldActions(connectedFieldConfig, connectedField)];
|
|
5205
5205
|
case 1:
|
|
5206
|
-
connectedField =
|
|
5207
|
-
|
|
5206
|
+
connectedField = _7.sent();
|
|
5207
|
+
_7.label = 2;
|
|
5208
5208
|
case 2:
|
|
5209
5209
|
if (kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "handleNestedFields")) {
|
|
5210
5210
|
if (connectedFieldConfig.handleNestedFields) {
|
|
@@ -5219,67 +5219,67 @@
|
|
|
5219
5219
|
KwikIDFormViewComponent.prototype.handleConnectedElements = function (e, eventType) {
|
|
5220
5220
|
return __awaiter(this, void 0, void 0, function () {
|
|
5221
5221
|
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 (
|
|
5222
|
+
var e_6, _7, e_7, _8;
|
|
5223
|
+
return __generator(this, function (_9) {
|
|
5224
|
+
switch (_9.label) {
|
|
5225
5225
|
case 0:
|
|
5226
5226
|
currentField = getFormFieldByKey(this.formFields, e.key);
|
|
5227
5227
|
if (!(currentField !== undefined)) return [3 /*break*/, 17];
|
|
5228
5228
|
if (!kwikidToolkit.checkObjectKeyExists(currentField, "connectedElements")) return [3 /*break*/, 16];
|
|
5229
5229
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFieldGroups")) return [3 /*break*/, 8];
|
|
5230
5230
|
connectedFieldGroups = currentField.connectedElements.connectedFieldGroups;
|
|
5231
|
-
|
|
5231
|
+
_9.label = 1;
|
|
5232
5232
|
case 1:
|
|
5233
|
-
|
|
5233
|
+
_9.trys.push([1, 6, 7, 8]);
|
|
5234
5234
|
connectedFieldGroups_1 = __values(connectedFieldGroups), connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5235
|
-
|
|
5235
|
+
_9.label = 2;
|
|
5236
5236
|
case 2:
|
|
5237
5237
|
if (!!connectedFieldGroups_1_1.done) return [3 /*break*/, 5];
|
|
5238
5238
|
connectedFieldGroupConfig = connectedFieldGroups_1_1.value;
|
|
5239
5239
|
return [4 /*yield*/, this.handleConnectedElementFieldGroup(currentField, connectedFieldGroupConfig, eventType)];
|
|
5240
5240
|
case 3:
|
|
5241
|
-
|
|
5242
|
-
|
|
5241
|
+
_9.sent();
|
|
5242
|
+
_9.label = 4;
|
|
5243
5243
|
case 4:
|
|
5244
5244
|
connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5245
5245
|
return [3 /*break*/, 2];
|
|
5246
5246
|
case 5: return [3 /*break*/, 8];
|
|
5247
5247
|
case 6:
|
|
5248
|
-
e_6_1 =
|
|
5248
|
+
e_6_1 = _9.sent();
|
|
5249
5249
|
e_6 = { error: e_6_1 };
|
|
5250
5250
|
return [3 /*break*/, 8];
|
|
5251
5251
|
case 7:
|
|
5252
5252
|
try {
|
|
5253
|
-
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (
|
|
5253
|
+
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (_7 = connectedFieldGroups_1.return)) _7.call(connectedFieldGroups_1);
|
|
5254
5254
|
}
|
|
5255
5255
|
finally { if (e_6) throw e_6.error; }
|
|
5256
5256
|
return [7 /*endfinally*/];
|
|
5257
5257
|
case 8:
|
|
5258
5258
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFields")) return [3 /*break*/, 16];
|
|
5259
5259
|
connectedFields = currentField.connectedElements.connectedFields;
|
|
5260
|
-
|
|
5260
|
+
_9.label = 9;
|
|
5261
5261
|
case 9:
|
|
5262
|
-
|
|
5262
|
+
_9.trys.push([9, 14, 15, 16]);
|
|
5263
5263
|
connectedFields_1 = __values(connectedFields), connectedFields_1_1 = connectedFields_1.next();
|
|
5264
|
-
|
|
5264
|
+
_9.label = 10;
|
|
5265
5265
|
case 10:
|
|
5266
5266
|
if (!!connectedFields_1_1.done) return [3 /*break*/, 13];
|
|
5267
5267
|
connectedFieldConfig = connectedFields_1_1.value;
|
|
5268
5268
|
return [4 /*yield*/, this.handleConnectedElementFields(currentField, connectedFieldConfig, eventType, eventType)];
|
|
5269
5269
|
case 11:
|
|
5270
|
-
currentField =
|
|
5271
|
-
|
|
5270
|
+
currentField = _9.sent();
|
|
5271
|
+
_9.label = 12;
|
|
5272
5272
|
case 12:
|
|
5273
5273
|
connectedFields_1_1 = connectedFields_1.next();
|
|
5274
5274
|
return [3 /*break*/, 10];
|
|
5275
5275
|
case 13: return [3 /*break*/, 16];
|
|
5276
5276
|
case 14:
|
|
5277
|
-
e_7_1 =
|
|
5277
|
+
e_7_1 = _9.sent();
|
|
5278
5278
|
e_7 = { error: e_7_1 };
|
|
5279
5279
|
return [3 /*break*/, 16];
|
|
5280
5280
|
case 15:
|
|
5281
5281
|
try {
|
|
5282
|
-
if (connectedFields_1_1 && !connectedFields_1_1.done && (
|
|
5282
|
+
if (connectedFields_1_1 && !connectedFields_1_1.done && (_8 = connectedFields_1.return)) _8.call(connectedFields_1);
|
|
5283
5283
|
}
|
|
5284
5284
|
finally { if (e_7) throw e_7.error; }
|
|
5285
5285
|
return [7 /*endfinally*/];
|
|
@@ -5291,15 +5291,15 @@
|
|
|
5291
5291
|
});
|
|
5292
5292
|
};
|
|
5293
5293
|
KwikIDFormViewComponent.prototype.handleRemovedFile = function (e) {
|
|
5294
|
-
var
|
|
5294
|
+
var _7;
|
|
5295
5295
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5296
5296
|
this.showApiLoader();
|
|
5297
5297
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
5298
5298
|
this.files[e.key] = e.files;
|
|
5299
5299
|
this.formData[e.key] = filterDuplicatesFiles(this.files[e.key]);
|
|
5300
|
-
this.formGroup.patchValue((
|
|
5301
|
-
|
|
5302
|
-
|
|
5300
|
+
this.formGroup.patchValue((_7 = {},
|
|
5301
|
+
_7[e.key] = this.formData[e.key],
|
|
5302
|
+
_7), { emitEvent: false });
|
|
5303
5303
|
}
|
|
5304
5304
|
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
5305
|
this.hideApiLoader();
|
|
@@ -5308,9 +5308,9 @@
|
|
|
5308
5308
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5309
5309
|
return __awaiter(this, void 0, void 0, function () {
|
|
5310
5310
|
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 (
|
|
5311
|
+
var e_8, _7, e_9, _8;
|
|
5312
|
+
return __generator(this, function (_9) {
|
|
5313
|
+
switch (_9.label) {
|
|
5314
5314
|
case 0:
|
|
5315
5315
|
this.showApiLoader();
|
|
5316
5316
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
@@ -5318,42 +5318,42 @@
|
|
|
5318
5318
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
5319
5319
|
kwikidToolkit.checkObjectKeyExists(field.properties, "uploadFileToServer") &&
|
|
5320
5320
|
field.properties.uploadFileToServer)) return [3 /*break*/, 9];
|
|
5321
|
-
|
|
5321
|
+
_9.label = 1;
|
|
5322
5322
|
case 1:
|
|
5323
|
-
|
|
5323
|
+
_9.trys.push([1, 6, 7, 8]);
|
|
5324
5324
|
values_1 = __values(values), values_1_1 = values_1.next();
|
|
5325
|
-
|
|
5325
|
+
_9.label = 2;
|
|
5326
5326
|
case 2:
|
|
5327
5327
|
if (!!values_1_1.done) return [3 /*break*/, 5];
|
|
5328
5328
|
value = values_1_1.value;
|
|
5329
5329
|
return [4 /*yield*/, this.uploadFile(field, value)];
|
|
5330
5330
|
case 3:
|
|
5331
|
-
|
|
5332
|
-
|
|
5331
|
+
_9.sent();
|
|
5332
|
+
_9.label = 4;
|
|
5333
5333
|
case 4:
|
|
5334
5334
|
values_1_1 = values_1.next();
|
|
5335
5335
|
return [3 /*break*/, 2];
|
|
5336
5336
|
case 5: return [3 /*break*/, 8];
|
|
5337
5337
|
case 6:
|
|
5338
|
-
e_8_1 =
|
|
5338
|
+
e_8_1 = _9.sent();
|
|
5339
5339
|
e_8 = { error: e_8_1 };
|
|
5340
5340
|
return [3 /*break*/, 8];
|
|
5341
5341
|
case 7:
|
|
5342
5342
|
try {
|
|
5343
|
-
if (values_1_1 && !values_1_1.done && (
|
|
5343
|
+
if (values_1_1 && !values_1_1.done && (_7 = values_1.return)) _7.call(values_1);
|
|
5344
5344
|
}
|
|
5345
5345
|
finally { if (e_8) throw e_8.error; }
|
|
5346
5346
|
return [7 /*endfinally*/];
|
|
5347
5347
|
case 8: return [3 /*break*/, 18];
|
|
5348
5348
|
case 9:
|
|
5349
5349
|
_loop_2 = function (value) {
|
|
5350
|
-
var updatedFile,
|
|
5351
|
-
return __generator(this, function (
|
|
5352
|
-
switch (
|
|
5350
|
+
var updatedFile, _10;
|
|
5351
|
+
return __generator(this, function (_11) {
|
|
5352
|
+
switch (_11.label) {
|
|
5353
5353
|
case 0:
|
|
5354
5354
|
this_2.updateFiles(value, "LOADING", e.key);
|
|
5355
5355
|
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
|
-
|
|
5356
|
+
_10 = kwikidToolkit.getObjectDeepCopy;
|
|
5357
5357
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
5358
5358
|
setTimeout(function () {
|
|
5359
5359
|
resolve({
|
|
@@ -5367,42 +5367,42 @@
|
|
|
5367
5367
|
}, 300); // 1000 ms = 1 sec
|
|
5368
5368
|
})];
|
|
5369
5369
|
case 1:
|
|
5370
|
-
updatedFile =
|
|
5370
|
+
updatedFile = _10.apply(void 0, [_11.sent()]);
|
|
5371
5371
|
this_2.updateFiles(updatedFile, "NORMAL", e.key);
|
|
5372
5372
|
return [2 /*return*/];
|
|
5373
5373
|
}
|
|
5374
5374
|
});
|
|
5375
5375
|
};
|
|
5376
5376
|
this_2 = this;
|
|
5377
|
-
|
|
5377
|
+
_9.label = 10;
|
|
5378
5378
|
case 10:
|
|
5379
|
-
|
|
5379
|
+
_9.trys.push([10, 15, 16, 17]);
|
|
5380
5380
|
values_2 = __values(values), values_2_1 = values_2.next();
|
|
5381
|
-
|
|
5381
|
+
_9.label = 11;
|
|
5382
5382
|
case 11:
|
|
5383
5383
|
if (!!values_2_1.done) return [3 /*break*/, 14];
|
|
5384
5384
|
value = values_2_1.value;
|
|
5385
5385
|
return [5 /*yield**/, _loop_2(value)];
|
|
5386
5386
|
case 12:
|
|
5387
|
-
|
|
5388
|
-
|
|
5387
|
+
_9.sent();
|
|
5388
|
+
_9.label = 13;
|
|
5389
5389
|
case 13:
|
|
5390
5390
|
values_2_1 = values_2.next();
|
|
5391
5391
|
return [3 /*break*/, 11];
|
|
5392
5392
|
case 14: return [3 /*break*/, 17];
|
|
5393
5393
|
case 15:
|
|
5394
|
-
e_9_1 =
|
|
5394
|
+
e_9_1 = _9.sent();
|
|
5395
5395
|
e_9 = { error: e_9_1 };
|
|
5396
5396
|
return [3 /*break*/, 17];
|
|
5397
5397
|
case 16:
|
|
5398
5398
|
try {
|
|
5399
|
-
if (values_2_1 && !values_2_1.done && (
|
|
5399
|
+
if (values_2_1 && !values_2_1.done && (_8 = values_2.return)) _8.call(values_2);
|
|
5400
5400
|
}
|
|
5401
5401
|
finally { if (e_9) throw e_9.error; }
|
|
5402
5402
|
return [7 /*endfinally*/];
|
|
5403
5403
|
case 17:
|
|
5404
5404
|
this.hideApiLoader();
|
|
5405
|
-
|
|
5405
|
+
_9.label = 18;
|
|
5406
5406
|
case 18: return [2 /*return*/];
|
|
5407
5407
|
}
|
|
5408
5408
|
});
|
|
@@ -5410,16 +5410,16 @@
|
|
|
5410
5410
|
};
|
|
5411
5411
|
/** Methods for Camera related fields like 'CAPTURE' or 'RECORD' */
|
|
5412
5412
|
KwikIDFormViewComponent.prototype.handleOnClickGetRemovedMediaFile = function (e) {
|
|
5413
|
-
var
|
|
5413
|
+
var _7;
|
|
5414
5414
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5415
5415
|
this.showApiLoader();
|
|
5416
5416
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
5417
5417
|
this.resetCamera();
|
|
5418
5418
|
this.mediaFiles[e.key] = e.mediaFiles;
|
|
5419
5419
|
this.formData[e.key] = filterDuplicatesMediaFiles(this.mediaFiles[e.key]);
|
|
5420
|
-
this.formGroup.patchValue((
|
|
5421
|
-
|
|
5422
|
-
|
|
5420
|
+
this.formGroup.patchValue((_7 = {},
|
|
5421
|
+
_7[e.key] = this.formData[e.key],
|
|
5422
|
+
_7), { emitEvent: false });
|
|
5423
5423
|
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
5424
|
}
|
|
5425
5425
|
this.hideApiLoader();
|
|
@@ -5427,9 +5427,9 @@
|
|
|
5427
5427
|
KwikIDFormViewComponent.prototype.handleOnClickInputCamera = function (e, field) {
|
|
5428
5428
|
var _a, _b, _c, _d, _e, _f;
|
|
5429
5429
|
return __awaiter(this, void 0, void 0, function () {
|
|
5430
|
-
var fieldKey, fieldcameraConfig,
|
|
5431
|
-
return __generator(this, function (
|
|
5432
|
-
switch (
|
|
5430
|
+
var fieldKey, fieldcameraConfig, _7, cameraHelper, _8, _9;
|
|
5431
|
+
return __generator(this, function (_10) {
|
|
5432
|
+
switch (_10.label) {
|
|
5433
5433
|
case 0:
|
|
5434
5434
|
this.loaderService.show({
|
|
5435
5435
|
loaderText: "Loading Camera...",
|
|
@@ -5444,8 +5444,8 @@
|
|
|
5444
5444
|
field_type: field.type,
|
|
5445
5445
|
camera_type: this.cameraType
|
|
5446
5446
|
});
|
|
5447
|
-
|
|
5448
|
-
switch (
|
|
5447
|
+
_7 = this.cameraType;
|
|
5448
|
+
switch (_7) {
|
|
5449
5449
|
case "CAPTURE": return [3 /*break*/, 1];
|
|
5450
5450
|
case "RECORD": return [3 /*break*/, 5];
|
|
5451
5451
|
}
|
|
@@ -5458,16 +5458,16 @@
|
|
|
5458
5458
|
if (!(((_d = (_c = this.cameraConfig) === null || _c === void 0 ? void 0 : _c.others) === null || _d === void 0 ? void 0 : _d.isWatermark) ||
|
|
5459
5459
|
((_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
5460
|
cameraHelper = new CameraHelper(field, this.formFields, this.allFormsData, this.formData, this.previousFormData);
|
|
5461
|
-
|
|
5462
|
-
|
|
5461
|
+
_8 = this;
|
|
5462
|
+
_9 = {};
|
|
5463
5463
|
return [4 /*yield*/, cameraHelper.getCameraWatermarkData()];
|
|
5464
5464
|
case 2:
|
|
5465
|
-
|
|
5466
|
-
|
|
5465
|
+
_8.cameraData = (_9.watermark = _10.sent(),
|
|
5466
|
+
_9);
|
|
5467
5467
|
return [3 /*break*/, 4];
|
|
5468
5468
|
case 3:
|
|
5469
5469
|
this.cameraData = undefined;
|
|
5470
|
-
|
|
5470
|
+
_10.label = 4;
|
|
5471
5471
|
case 4: return [3 /*break*/, 7];
|
|
5472
5472
|
case 5:
|
|
5473
5473
|
this.cameraConfig = kwikidToolkit.mergeObjectsDeep([
|
|
@@ -5494,10 +5494,10 @@
|
|
|
5494
5494
|
KwikIDFormViewComponent.prototype.setCameraMedia = function (media) {
|
|
5495
5495
|
return __awaiter(this, void 0, void 0, function () {
|
|
5496
5496
|
var field, validations_4;
|
|
5497
|
-
var
|
|
5497
|
+
var _7;
|
|
5498
5498
|
var _this = this;
|
|
5499
|
-
return __generator(this, function (
|
|
5500
|
-
switch (
|
|
5499
|
+
return __generator(this, function (_8) {
|
|
5500
|
+
switch (_8.label) {
|
|
5501
5501
|
case 0:
|
|
5502
5502
|
field = getFormFieldByKey(this.formFields, this.cameraFieldKey);
|
|
5503
5503
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
@@ -5505,7 +5505,7 @@
|
|
|
5505
5505
|
field.properties.uploadFileToServer)) return [3 /*break*/, 2];
|
|
5506
5506
|
return [4 /*yield*/, this.uploadFile(field, media)];
|
|
5507
5507
|
case 1:
|
|
5508
|
-
|
|
5508
|
+
_8.sent();
|
|
5509
5509
|
return [3 /*break*/, 3];
|
|
5510
5510
|
case 2:
|
|
5511
5511
|
this.resetCamera();
|
|
@@ -5515,9 +5515,9 @@
|
|
|
5515
5515
|
emitEvent: false,
|
|
5516
5516
|
onlySelf: false
|
|
5517
5517
|
});
|
|
5518
|
-
this.formGroup.patchValue((
|
|
5519
|
-
|
|
5520
|
-
|
|
5518
|
+
this.formGroup.patchValue((_7 = {},
|
|
5519
|
+
_7[field.key] = kwikidToolkit.getObjectDeepCopy([media]),
|
|
5520
|
+
_7), { emitEvent: false });
|
|
5521
5521
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
5522
5522
|
emitEvent: false
|
|
5523
5523
|
});
|
|
@@ -5537,11 +5537,11 @@
|
|
|
5537
5537
|
ALL_FORMS_DATA: this.allFormsData
|
|
5538
5538
|
}, this.takeAction.bind(this));
|
|
5539
5539
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5540
|
-
return __generator(this, function (
|
|
5541
|
-
switch (
|
|
5540
|
+
return __generator(this, function (_7) {
|
|
5541
|
+
switch (_7.label) {
|
|
5542
5542
|
case 0: return [4 /*yield*/, validations_4.validate(field.validation)];
|
|
5543
5543
|
case 1:
|
|
5544
|
-
|
|
5544
|
+
_7.sent();
|
|
5545
5545
|
return [2 /*return*/];
|
|
5546
5546
|
}
|
|
5547
5547
|
});
|
|
@@ -5558,7 +5558,7 @@
|
|
|
5558
5558
|
field_key: field.key,
|
|
5559
5559
|
field_type: field.type
|
|
5560
5560
|
});
|
|
5561
|
-
|
|
5561
|
+
_8.label = 3;
|
|
5562
5562
|
case 3: return [2 /*return*/];
|
|
5563
5563
|
}
|
|
5564
5564
|
});
|
|
@@ -5670,7 +5670,7 @@
|
|
|
5670
5670
|
* 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
5671
|
*/
|
|
5672
5672
|
KwikIDFormViewComponent.prototype.updateFiles = function (file, state, key) {
|
|
5673
|
-
var
|
|
5673
|
+
var _7;
|
|
5674
5674
|
var _this = this;
|
|
5675
5675
|
var _a;
|
|
5676
5676
|
var fileWithState = kwikidToolkit.mergeObjects(file, { state: state });
|
|
@@ -5698,9 +5698,9 @@
|
|
|
5698
5698
|
emitEvent: false,
|
|
5699
5699
|
onlySelf: false
|
|
5700
5700
|
});
|
|
5701
|
-
this.formGroup.patchValue((
|
|
5702
|
-
|
|
5703
|
-
|
|
5701
|
+
this.formGroup.patchValue((_7 = {},
|
|
5702
|
+
_7[key] = normalFiles,
|
|
5703
|
+
_7), { emitEvent: false });
|
|
5704
5704
|
this.getUnsavedDataState.emit(true);
|
|
5705
5705
|
if (field.isFormElement &&
|
|
5706
5706
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -5714,11 +5714,11 @@
|
|
|
5714
5714
|
ALL_FORMS_DATA: this.allFormsData
|
|
5715
5715
|
}, this.takeAction.bind(this));
|
|
5716
5716
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5717
|
-
return __generator(this, function (
|
|
5718
|
-
switch (
|
|
5717
|
+
return __generator(this, function (_7) {
|
|
5718
|
+
switch (_7.label) {
|
|
5719
5719
|
case 0: return [4 /*yield*/, validations_5.validate(field.validation)];
|
|
5720
5720
|
case 1:
|
|
5721
|
-
|
|
5721
|
+
_7.sent();
|
|
5722
5722
|
return [2 /*return*/];
|
|
5723
5723
|
}
|
|
5724
5724
|
});
|
|
@@ -5737,7 +5737,7 @@
|
|
|
5737
5737
|
*/
|
|
5738
5738
|
KwikIDFormViewComponent.prototype.uploadFile = function (field, file) {
|
|
5739
5739
|
return __awaiter(this, void 0, void 0, function () {
|
|
5740
|
-
return __generator(this, function (
|
|
5740
|
+
return __generator(this, function (_7) {
|
|
5741
5741
|
switch (field.type) {
|
|
5742
5742
|
case EFieldType.FILE:
|
|
5743
5743
|
this.updateFiles(file, "LOADING", field.key);
|
|
@@ -5823,11 +5823,11 @@
|
|
|
5823
5823
|
});
|
|
5824
5824
|
};
|
|
5825
5825
|
KwikIDFormViewComponent.prototype.handleOnClickFormFieldButton = function (field) {
|
|
5826
|
-
var e_10,
|
|
5826
|
+
var e_10, _7;
|
|
5827
5827
|
var formData = this.formGroup.getRawValue();
|
|
5828
5828
|
try {
|
|
5829
|
-
for (var
|
|
5830
|
-
var field_3 =
|
|
5829
|
+
for (var _8 = __values(this.formFields), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
5830
|
+
var field_3 = _9.value;
|
|
5831
5831
|
if (field_3.isFormElement) {
|
|
5832
5832
|
if (field_3.hidden) {
|
|
5833
5833
|
delete formData[field_3.key];
|
|
@@ -5841,22 +5841,22 @@
|
|
|
5841
5841
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
5842
5842
|
finally {
|
|
5843
5843
|
try {
|
|
5844
|
-
if (
|
|
5844
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
5845
5845
|
}
|
|
5846
5846
|
finally { if (e_10) throw e_10.error; }
|
|
5847
5847
|
}
|
|
5848
5848
|
var extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
5849
|
-
var
|
|
5849
|
+
var _7;
|
|
5850
5850
|
if (field.isFormElement && !field.hidden) {
|
|
5851
|
-
var fieldData = (
|
|
5852
|
-
|
|
5851
|
+
var fieldData = (_7 = {},
|
|
5852
|
+
_7[field.key] = {
|
|
5853
5853
|
key: field.key,
|
|
5854
5854
|
label: field.label,
|
|
5855
5855
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
5856
5856
|
type: field.type,
|
|
5857
5857
|
index: index
|
|
5858
5858
|
},
|
|
5859
|
-
|
|
5859
|
+
_7);
|
|
5860
5860
|
result[field.key] = fieldData[field.key];
|
|
5861
5861
|
}
|
|
5862
5862
|
return result;
|
|
@@ -5874,11 +5874,11 @@
|
|
|
5874
5874
|
};
|
|
5875
5875
|
// DOM Event Handlers
|
|
5876
5876
|
KwikIDFormViewComponent.prototype.handleGetKeyValue = function (e) {
|
|
5877
|
-
var
|
|
5877
|
+
var _7;
|
|
5878
5878
|
var _this = this;
|
|
5879
|
-
this.formGroup.patchValue((
|
|
5880
|
-
|
|
5881
|
-
|
|
5879
|
+
this.formGroup.patchValue((_7 = {},
|
|
5880
|
+
_7[e.key] = e.value,
|
|
5881
|
+
_7), { emitEvent: false });
|
|
5882
5882
|
var field = getFormFieldByKey(this.formFields, e.key);
|
|
5883
5883
|
this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
|
|
5884
5884
|
this.getUnsavedDataState.emit(true);
|
|
@@ -5894,11 +5894,11 @@
|
|
|
5894
5894
|
ALL_FORMS_DATA: this.allFormsData
|
|
5895
5895
|
}, this.takeAction.bind(this));
|
|
5896
5896
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5897
|
-
return __generator(this, function (
|
|
5898
|
-
switch (
|
|
5897
|
+
return __generator(this, function (_7) {
|
|
5898
|
+
switch (_7.label) {
|
|
5899
5899
|
case 0: return [4 /*yield*/, validations_6.validate(field.validation)];
|
|
5900
5900
|
case 1:
|
|
5901
|
-
|
|
5901
|
+
_7.sent();
|
|
5902
5902
|
return [2 /*return*/];
|
|
5903
5903
|
}
|
|
5904
5904
|
});
|
|
@@ -5917,30 +5917,30 @@
|
|
|
5917
5917
|
return __awaiter(this, void 0, void 0, function () {
|
|
5918
5918
|
var resetFormFields, BYPASS_RESET_CONFIRM, CONFIRM_RESET;
|
|
5919
5919
|
var _this = this;
|
|
5920
|
-
return __generator(this, function (
|
|
5920
|
+
return __generator(this, function (_7) {
|
|
5921
5921
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_RESET_BUTTON_CLICK, {
|
|
5922
5922
|
field_key: field.key
|
|
5923
5923
|
});
|
|
5924
5924
|
resetFormFields = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5925
|
-
var
|
|
5926
|
-
var e_12,
|
|
5927
|
-
return __generator(this, function (
|
|
5928
|
-
switch (
|
|
5925
|
+
var _7, _8, f, _9, _10, action, resetField, actions, e_11_1, e_12_1;
|
|
5926
|
+
var e_12, _11, e_11, _12;
|
|
5927
|
+
return __generator(this, function (_13) {
|
|
5928
|
+
switch (_13.label) {
|
|
5929
5929
|
case 0:
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5930
|
+
_13.trys.push([0, 11, 12, 13]);
|
|
5931
|
+
_7 = __values(field.reset.fields), _8 = _7.next();
|
|
5932
|
+
_13.label = 1;
|
|
5933
5933
|
case 1:
|
|
5934
|
-
if (!!
|
|
5935
|
-
f =
|
|
5936
|
-
|
|
5934
|
+
if (!!_8.done) return [3 /*break*/, 10];
|
|
5935
|
+
f = _8.value;
|
|
5936
|
+
_13.label = 2;
|
|
5937
5937
|
case 2:
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5938
|
+
_13.trys.push([2, 7, 8, 9]);
|
|
5939
|
+
_9 = (e_11 = void 0, __values(f.actions)), _10 = _9.next();
|
|
5940
|
+
_13.label = 3;
|
|
5941
5941
|
case 3:
|
|
5942
|
-
if (!!
|
|
5943
|
-
action =
|
|
5942
|
+
if (!!_10.done) return [3 /*break*/, 6];
|
|
5943
|
+
action = _10.value;
|
|
5944
5944
|
resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
5945
5945
|
actions = new kwikidToolkit.Action(action, {}, {
|
|
5946
5946
|
FIELD_CONFIG: resetField,
|
|
@@ -5952,33 +5952,33 @@
|
|
|
5952
5952
|
}, this.takeAction.bind(this));
|
|
5953
5953
|
return [4 /*yield*/, actions.execute()];
|
|
5954
5954
|
case 4:
|
|
5955
|
-
|
|
5956
|
-
|
|
5955
|
+
_13.sent();
|
|
5956
|
+
_13.label = 5;
|
|
5957
5957
|
case 5:
|
|
5958
|
-
|
|
5958
|
+
_10 = _9.next();
|
|
5959
5959
|
return [3 /*break*/, 3];
|
|
5960
5960
|
case 6: return [3 /*break*/, 9];
|
|
5961
5961
|
case 7:
|
|
5962
|
-
e_11_1 =
|
|
5962
|
+
e_11_1 = _13.sent();
|
|
5963
5963
|
e_11 = { error: e_11_1 };
|
|
5964
5964
|
return [3 /*break*/, 9];
|
|
5965
5965
|
case 8:
|
|
5966
5966
|
try {
|
|
5967
|
-
if (
|
|
5967
|
+
if (_10 && !_10.done && (_12 = _9.return)) _12.call(_9);
|
|
5968
5968
|
}
|
|
5969
5969
|
finally { if (e_11) throw e_11.error; }
|
|
5970
5970
|
return [7 /*endfinally*/];
|
|
5971
5971
|
case 9:
|
|
5972
|
-
|
|
5972
|
+
_8 = _7.next();
|
|
5973
5973
|
return [3 /*break*/, 1];
|
|
5974
5974
|
case 10: return [3 /*break*/, 13];
|
|
5975
5975
|
case 11:
|
|
5976
|
-
e_12_1 =
|
|
5976
|
+
e_12_1 = _13.sent();
|
|
5977
5977
|
e_12 = { error: e_12_1 };
|
|
5978
5978
|
return [3 /*break*/, 13];
|
|
5979
5979
|
case 12:
|
|
5980
5980
|
try {
|
|
5981
|
-
if (
|
|
5981
|
+
if (_8 && !_8.done && (_11 = _7.return)) _11.call(_7);
|
|
5982
5982
|
}
|
|
5983
5983
|
finally { if (e_12) throw e_12.error; }
|
|
5984
5984
|
return [7 /*endfinally*/];
|
|
@@ -6003,9 +6003,9 @@
|
|
|
6003
6003
|
KwikIDFormViewComponent.prototype.handleFieldApiCall = function (field, api) {
|
|
6004
6004
|
return __awaiter(this, void 0, void 0, function () {
|
|
6005
6005
|
var apis;
|
|
6006
|
-
var
|
|
6007
|
-
return __generator(this, function (
|
|
6008
|
-
switch (
|
|
6006
|
+
var _7, _8;
|
|
6007
|
+
return __generator(this, function (_9) {
|
|
6008
|
+
switch (_9.label) {
|
|
6009
6009
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
6010
6010
|
FIELD_CONFIG: field,
|
|
6011
6011
|
API_CONFIG: api,
|
|
@@ -6016,13 +6016,13 @@
|
|
|
6016
6016
|
ALL_FORMS_DATA: this.allFormsData
|
|
6017
6017
|
})];
|
|
6018
6018
|
case 1:
|
|
6019
|
-
api =
|
|
6019
|
+
api = _9.sent();
|
|
6020
6020
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
6021
6021
|
if (kwikidToolkit.checkObjectKeyExists(field.api, "request")) {
|
|
6022
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
6023
|
-
this.formGroup.patchValue((
|
|
6024
|
-
|
|
6025
|
-
|
|
6022
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_7 = {}, _7[field.key] = api.response.value, _7));
|
|
6023
|
+
this.formGroup.patchValue((_8 = {},
|
|
6024
|
+
_8[field.key] = api.response.value,
|
|
6025
|
+
_8), { emitEvent: false });
|
|
6026
6026
|
}
|
|
6027
6027
|
apis = new Apis({
|
|
6028
6028
|
FIELD_CONFIG: field,
|
|
@@ -6036,14 +6036,14 @@
|
|
|
6036
6036
|
}, this.takeAction.bind(this));
|
|
6037
6037
|
return [4 /*yield*/, apis.validateResponse()];
|
|
6038
6038
|
case 2:
|
|
6039
|
-
api =
|
|
6039
|
+
api = _9.sent();
|
|
6040
6040
|
return [3 /*break*/, 4];
|
|
6041
6041
|
case 3:
|
|
6042
6042
|
setTimeout(function () {
|
|
6043
6043
|
field["api"]["status"]["value"] = EApiStatusType.FAILED;
|
|
6044
6044
|
field["showLoader"] = false;
|
|
6045
6045
|
}, 500);
|
|
6046
|
-
|
|
6046
|
+
_9.label = 4;
|
|
6047
6047
|
case 4: return [2 /*return*/, { field: field, api: api }];
|
|
6048
6048
|
}
|
|
6049
6049
|
});
|
|
@@ -6052,8 +6052,8 @@
|
|
|
6052
6052
|
KwikIDFormViewComponent.prototype.handleApiCall = function (api) {
|
|
6053
6053
|
return __awaiter(this, void 0, void 0, function () {
|
|
6054
6054
|
var apis;
|
|
6055
|
-
return __generator(this, function (
|
|
6056
|
-
switch (
|
|
6055
|
+
return __generator(this, function (_7) {
|
|
6056
|
+
switch (_7.label) {
|
|
6057
6057
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
6058
6058
|
FORM_CONFIG: this.formConfig,
|
|
6059
6059
|
API_CONFIG: api,
|
|
@@ -6064,7 +6064,7 @@
|
|
|
6064
6064
|
ALL_FORMS_DATA: this.allFormsData
|
|
6065
6065
|
})];
|
|
6066
6066
|
case 1:
|
|
6067
|
-
api =
|
|
6067
|
+
api = _7.sent();
|
|
6068
6068
|
apis = new Apis({
|
|
6069
6069
|
FORM_CONFIG: this.formConfig,
|
|
6070
6070
|
API_CONFIG: api,
|
|
@@ -6077,38 +6077,38 @@
|
|
|
6077
6077
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
6078
6078
|
return [4 /*yield*/, apis.validateResponse()];
|
|
6079
6079
|
case 2:
|
|
6080
|
-
api =
|
|
6081
|
-
|
|
6080
|
+
api = _7.sent();
|
|
6081
|
+
_7.label = 3;
|
|
6082
6082
|
case 3: return [2 /*return*/, { api: api }];
|
|
6083
6083
|
}
|
|
6084
6084
|
});
|
|
6085
6085
|
});
|
|
6086
6086
|
};
|
|
6087
6087
|
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;
|
|
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, _6;
|
|
6089
6089
|
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 (
|
|
6090
|
+
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers, response, isSecure, encryptedResponse, decryptedResponse, err_1, body, isSecure, response, isSecure_1, encryptedResponse, decryptedResponse, err_2;
|
|
6091
|
+
return __generator(this, function (_7) {
|
|
6092
|
+
switch (_7.label) {
|
|
6093
6093
|
case 0:
|
|
6094
6094
|
apis = new Apis(object, this.takeAction.bind(this));
|
|
6095
6095
|
return [4 /*yield*/, apis.setUrl()];
|
|
6096
6096
|
case 1:
|
|
6097
|
-
api =
|
|
6097
|
+
api = _7.sent();
|
|
6098
6098
|
return [4 /*yield*/, apis.setRequestHeaders()];
|
|
6099
6099
|
case 2:
|
|
6100
|
-
api =
|
|
6100
|
+
api = _7.sent();
|
|
6101
6101
|
return [4 /*yield*/, apis.validateRequestHeaders()];
|
|
6102
6102
|
case 3:
|
|
6103
|
-
api =
|
|
6103
|
+
api = _7.sent();
|
|
6104
6104
|
return [4 /*yield*/, apis.setRequestBody()];
|
|
6105
6105
|
case 4:
|
|
6106
|
-
api =
|
|
6106
|
+
api = _7.sent();
|
|
6107
6107
|
return [4 /*yield*/, apis.validateRequestBody()];
|
|
6108
6108
|
case 5:
|
|
6109
|
-
api =
|
|
6109
|
+
api = _7.sent();
|
|
6110
6110
|
apiCallResponse = {};
|
|
6111
|
-
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/,
|
|
6111
|
+
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 25];
|
|
6112
6112
|
if (!(api.request.url.hasOwnProperty("type") &&
|
|
6113
6113
|
api.request.url.type === EApiRequestUrlType.MOCK)) return [3 /*break*/, 7];
|
|
6114
6114
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
@@ -6117,90 +6117,100 @@
|
|
|
6117
6117
|
}, 1000); // 1000 ms = 1 sec
|
|
6118
6118
|
})];
|
|
6119
6119
|
case 6:
|
|
6120
|
-
apiCallResponse =
|
|
6120
|
+
apiCallResponse = _7.sent();
|
|
6121
6121
|
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*/,
|
|
6122
|
+
return [3 /*break*/, 24];
|
|
6123
6123
|
case 7:
|
|
6124
6124
|
url = api.request.url.value;
|
|
6125
6125
|
method = (_d = (_c = api.request) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : "POST";
|
|
6126
6126
|
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*/,
|
|
6127
|
+
if (!(method === "GET")) return [3 /*break*/, 16];
|
|
6128
6128
|
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, {
|
|
6129
6129
|
form_api_method: method,
|
|
6130
6130
|
form_api_key: (_g = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _g !== void 0 ? _g : ""
|
|
6131
6131
|
});
|
|
6132
|
-
|
|
6132
|
+
_7.label = 8;
|
|
6133
6133
|
case 8:
|
|
6134
|
-
|
|
6134
|
+
_7.trys.push([8, 14, , 15]);
|
|
6135
6135
|
return [4 /*yield*/, fetch(url, {
|
|
6136
6136
|
method: method,
|
|
6137
6137
|
headers: Object.assign({}, headers)
|
|
6138
6138
|
})];
|
|
6139
6139
|
case 9:
|
|
6140
|
-
response =
|
|
6141
|
-
|
|
6140
|
+
response = _7.sent();
|
|
6141
|
+
isSecure = (_h = api === null || api === void 0 ? void 0 : api.response) === null || _h === void 0 ? void 0 : _h.isSecure;
|
|
6142
|
+
if (!isSecure) return [3 /*break*/, 11];
|
|
6143
|
+
return [4 /*yield*/, response.text()];
|
|
6142
6144
|
case 10:
|
|
6143
|
-
|
|
6145
|
+
encryptedResponse = _7.sent();
|
|
6146
|
+
decryptedResponse = kwikidToolkit.decryptWithAES(encryptedResponse);
|
|
6147
|
+
apiCallResponse = JSON.parse(decryptedResponse);
|
|
6148
|
+
return [3 /*break*/, 13];
|
|
6149
|
+
case 11: return [4 /*yield*/, response.json()];
|
|
6150
|
+
case 12:
|
|
6151
|
+
apiCallResponse = _7.sent();
|
|
6152
|
+
_7.label = 13;
|
|
6153
|
+
case 13:
|
|
6144
6154
|
apiCallResponseStatusCode = response.status;
|
|
6145
|
-
return [3 /*break*/,
|
|
6146
|
-
case
|
|
6147
|
-
err_1 =
|
|
6155
|
+
return [3 /*break*/, 15];
|
|
6156
|
+
case 14:
|
|
6157
|
+
err_1 = _7.sent();
|
|
6148
6158
|
apiCallResponse = {};
|
|
6149
6159
|
apiCallResponseStatusCode = 500;
|
|
6150
|
-
return [3 /*break*/,
|
|
6151
|
-
case
|
|
6152
|
-
case
|
|
6153
|
-
body = JSON.stringify((
|
|
6154
|
-
isSecure = (
|
|
6160
|
+
return [3 /*break*/, 15];
|
|
6161
|
+
case 15: return [3 /*break*/, 24];
|
|
6162
|
+
case 16:
|
|
6163
|
+
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 : {});
|
|
6164
|
+
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
6165
|
if (isSecure) {
|
|
6156
6166
|
body = kwikidToolkit.encryptWithAES(body);
|
|
6157
6167
|
}
|
|
6158
|
-
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, Object.assign({ form_api_method: method, form_api_key: (
|
|
6168
|
+
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
6169
|
form_api_request_body: body
|
|
6160
6170
|
})));
|
|
6161
|
-
|
|
6162
|
-
case
|
|
6163
|
-
|
|
6171
|
+
_7.label = 17;
|
|
6172
|
+
case 17:
|
|
6173
|
+
_7.trys.push([17, 23, , 24]);
|
|
6164
6174
|
return [4 /*yield*/, fetch(url, {
|
|
6165
6175
|
method: method,
|
|
6166
6176
|
headers: Object.assign({}, headers),
|
|
6167
6177
|
body: body
|
|
6168
6178
|
})];
|
|
6169
|
-
case
|
|
6170
|
-
response =
|
|
6171
|
-
isSecure_1 = (
|
|
6172
|
-
if (!isSecure_1) return [3 /*break*/,
|
|
6179
|
+
case 18:
|
|
6180
|
+
response = _7.sent();
|
|
6181
|
+
isSecure_1 = (_r = api === null || api === void 0 ? void 0 : api.response) === null || _r === void 0 ? void 0 : _r.isSecure;
|
|
6182
|
+
if (!isSecure_1) return [3 /*break*/, 20];
|
|
6173
6183
|
return [4 /*yield*/, response.text()];
|
|
6174
|
-
case
|
|
6175
|
-
encryptedResponse =
|
|
6184
|
+
case 19:
|
|
6185
|
+
encryptedResponse = _7.sent();
|
|
6176
6186
|
decryptedResponse = kwikidToolkit.decryptWithAES(encryptedResponse);
|
|
6177
6187
|
apiCallResponse = JSON.parse(decryptedResponse);
|
|
6178
|
-
return [3 /*break*/,
|
|
6179
|
-
case
|
|
6180
|
-
case
|
|
6181
|
-
apiCallResponse =
|
|
6182
|
-
|
|
6183
|
-
case
|
|
6188
|
+
return [3 /*break*/, 22];
|
|
6189
|
+
case 20: return [4 /*yield*/, response.json()];
|
|
6190
|
+
case 21:
|
|
6191
|
+
apiCallResponse = _7.sent();
|
|
6192
|
+
_7.label = 22;
|
|
6193
|
+
case 22:
|
|
6184
6194
|
apiCallResponseStatusCode = response.status;
|
|
6185
|
-
return [3 /*break*/,
|
|
6186
|
-
case
|
|
6187
|
-
err_2 =
|
|
6195
|
+
return [3 /*break*/, 24];
|
|
6196
|
+
case 23:
|
|
6197
|
+
err_2 = _7.sent();
|
|
6188
6198
|
apiCallResponse = {};
|
|
6189
6199
|
apiCallResponseStatusCode = 500;
|
|
6190
|
-
return [3 /*break*/,
|
|
6191
|
-
case
|
|
6200
|
+
return [3 /*break*/, 24];
|
|
6201
|
+
case 24:
|
|
6192
6202
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "value", apiCallResponse);
|
|
6193
6203
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "status", apiCallResponseStatusCode);
|
|
6194
|
-
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE, Object.assign(Object.assign({ form_api_key: (
|
|
6204
|
+
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
6205
|
form_api_response_body: apiCallResponse !== null && apiCallResponse !== void 0 ? apiCallResponse : {}
|
|
6196
6206
|
})), { 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: (
|
|
6207
|
+
return [3 /*break*/, 26];
|
|
6208
|
+
case 25:
|
|
6209
|
+
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) && {
|
|
6210
|
+
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
6211
|
})));
|
|
6202
|
-
|
|
6203
|
-
case
|
|
6212
|
+
_7.label = 26;
|
|
6213
|
+
case 26: return [2 /*return*/, api];
|
|
6204
6214
|
}
|
|
6205
6215
|
});
|
|
6206
6216
|
});
|
|
@@ -6237,8 +6247,8 @@
|
|
|
6237
6247
|
KwikIDFormViewComponent.prototype.handleOnClickApiCall = function (e) {
|
|
6238
6248
|
return __awaiter(this, void 0, void 0, function () {
|
|
6239
6249
|
var field, apis;
|
|
6240
|
-
return __generator(this, function (
|
|
6241
|
-
switch (
|
|
6250
|
+
return __generator(this, function (_7) {
|
|
6251
|
+
switch (_7.label) {
|
|
6242
6252
|
case 0:
|
|
6243
6253
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
6244
6254
|
if (!(field.type === EFieldType.API)) return [3 /*break*/, 5];
|
|
@@ -6253,7 +6263,7 @@
|
|
|
6253
6263
|
if (!kwikidToolkit.checkObjectKeyExists(field.api, "request")) return [3 /*break*/, 2];
|
|
6254
6264
|
return [4 /*yield*/, this.handleFieldApiCall(field, field.api)];
|
|
6255
6265
|
case 1:
|
|
6256
|
-
|
|
6266
|
+
_7.sent();
|
|
6257
6267
|
return [3 /*break*/, 4];
|
|
6258
6268
|
case 2:
|
|
6259
6269
|
apis = new Apis({
|
|
@@ -6267,11 +6277,11 @@
|
|
|
6267
6277
|
}, this.takeAction.bind(this));
|
|
6268
6278
|
return [4 /*yield*/, apis.callNextApi(field.api.entrypoint)];
|
|
6269
6279
|
case 3:
|
|
6270
|
-
|
|
6271
|
-
|
|
6280
|
+
_7.sent();
|
|
6281
|
+
_7.label = 4;
|
|
6272
6282
|
case 4:
|
|
6273
6283
|
this.hideApiLoader();
|
|
6274
|
-
|
|
6284
|
+
_7.label = 5;
|
|
6275
6285
|
case 5: return [2 /*return*/];
|
|
6276
6286
|
}
|
|
6277
6287
|
});
|
|
@@ -6317,11 +6327,11 @@
|
|
|
6317
6327
|
};
|
|
6318
6328
|
KwikIDFormViewComponent.prototype.handleOnClickSaveForm = function (e) {
|
|
6319
6329
|
return __awaiter(this, void 0, void 0, function () {
|
|
6320
|
-
var controls, firstFieldWithError, controls_1, controls_1_1, control, field,
|
|
6321
|
-
var e_15,
|
|
6330
|
+
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;
|
|
6331
|
+
var e_15, _13, e_13, _14, e_16, _15, e_14, _16;
|
|
6322
6332
|
var _this = this;
|
|
6323
|
-
return __generator(this, function (
|
|
6324
|
-
switch (
|
|
6333
|
+
return __generator(this, function (_17) {
|
|
6334
|
+
switch (_17.label) {
|
|
6325
6335
|
case 0:
|
|
6326
6336
|
if (e) {
|
|
6327
6337
|
this.triggerLogs(ELogEventType$1.FORM__SAVE_BUTTON_CLICK, {});
|
|
@@ -6351,7 +6361,7 @@
|
|
|
6351
6361
|
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
6352
6362
|
finally {
|
|
6353
6363
|
try {
|
|
6354
|
-
if (controls_1_1 && !controls_1_1.done && (
|
|
6364
|
+
if (controls_1_1 && !controls_1_1.done && (_13 = controls_1.return)) _13.call(controls_1);
|
|
6355
6365
|
}
|
|
6356
6366
|
finally { if (e_15) throw e_15.error; }
|
|
6357
6367
|
}
|
|
@@ -6362,14 +6372,14 @@
|
|
|
6362
6372
|
}, 3000);
|
|
6363
6373
|
return [2 /*return*/];
|
|
6364
6374
|
}
|
|
6365
|
-
|
|
6375
|
+
_17.label = 1;
|
|
6366
6376
|
case 1:
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6377
|
+
_17.trys.push([1, 6, 7, 8]);
|
|
6378
|
+
_7 = __values(this.formFields), _8 = _7.next();
|
|
6379
|
+
_17.label = 2;
|
|
6370
6380
|
case 2:
|
|
6371
|
-
if (!!
|
|
6372
|
-
field =
|
|
6381
|
+
if (!!_8.done) return [3 /*break*/, 5];
|
|
6382
|
+
field = _8.value;
|
|
6373
6383
|
if (!(field.isFormElement &&
|
|
6374
6384
|
!field.hidden &&
|
|
6375
6385
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -6384,7 +6394,7 @@
|
|
|
6384
6394
|
}, this.takeAction.bind(this));
|
|
6385
6395
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
6386
6396
|
case 3:
|
|
6387
|
-
|
|
6397
|
+
_17.sent();
|
|
6388
6398
|
if (!field.validation.is_valid) {
|
|
6389
6399
|
this.toggleErrorNotification(true);
|
|
6390
6400
|
setTimeout(function () {
|
|
@@ -6392,26 +6402,26 @@
|
|
|
6392
6402
|
}, 3000);
|
|
6393
6403
|
return [2 /*return*/];
|
|
6394
6404
|
}
|
|
6395
|
-
|
|
6405
|
+
_17.label = 4;
|
|
6396
6406
|
case 4:
|
|
6397
|
-
|
|
6407
|
+
_8 = _7.next();
|
|
6398
6408
|
return [3 /*break*/, 2];
|
|
6399
6409
|
case 5: return [3 /*break*/, 8];
|
|
6400
6410
|
case 6:
|
|
6401
|
-
e_13_1 =
|
|
6411
|
+
e_13_1 = _17.sent();
|
|
6402
6412
|
e_13 = { error: e_13_1 };
|
|
6403
6413
|
return [3 /*break*/, 8];
|
|
6404
6414
|
case 7:
|
|
6405
6415
|
try {
|
|
6406
|
-
if (
|
|
6416
|
+
if (_8 && !_8.done && (_14 = _7.return)) _14.call(_7);
|
|
6407
6417
|
}
|
|
6408
6418
|
finally { if (e_13) throw e_13.error; }
|
|
6409
6419
|
return [7 /*endfinally*/];
|
|
6410
6420
|
case 8:
|
|
6411
6421
|
formData = this.formGroup.getRawValue();
|
|
6412
6422
|
try {
|
|
6413
|
-
for (
|
|
6414
|
-
field =
|
|
6423
|
+
for (_9 = __values(this.formFields), _10 = _9.next(); !_10.done; _10 = _9.next()) {
|
|
6424
|
+
field = _10.value;
|
|
6415
6425
|
if (field.isFormElement) {
|
|
6416
6426
|
if (field.hidden) {
|
|
6417
6427
|
delete formData[field.key];
|
|
@@ -6425,22 +6435,22 @@
|
|
|
6425
6435
|
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
6426
6436
|
finally {
|
|
6427
6437
|
try {
|
|
6428
|
-
if (
|
|
6438
|
+
if (_10 && !_10.done && (_15 = _9.return)) _15.call(_9);
|
|
6429
6439
|
}
|
|
6430
6440
|
finally { if (e_16) throw e_16.error; }
|
|
6431
6441
|
}
|
|
6432
6442
|
extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
6433
|
-
var
|
|
6443
|
+
var _7;
|
|
6434
6444
|
if (field.isFormElement && !field.hidden) {
|
|
6435
|
-
var fieldData = (
|
|
6436
|
-
|
|
6445
|
+
var fieldData = (_7 = {},
|
|
6446
|
+
_7[field.key] = {
|
|
6437
6447
|
key: field.key,
|
|
6438
6448
|
label: field.label,
|
|
6439
6449
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
6440
6450
|
type: field.type,
|
|
6441
6451
|
index: index
|
|
6442
6452
|
},
|
|
6443
|
-
|
|
6453
|
+
_7);
|
|
6444
6454
|
result[field.key] = fieldData[field.key];
|
|
6445
6455
|
}
|
|
6446
6456
|
return result;
|
|
@@ -6453,14 +6463,14 @@
|
|
|
6453
6463
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
6454
6464
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "post"))) return [3 /*break*/, 18];
|
|
6455
6465
|
this.triggerLogs(ELogEventType$1.FORM__TASK_POST, {});
|
|
6456
|
-
|
|
6466
|
+
_17.label = 9;
|
|
6457
6467
|
case 9:
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6468
|
+
_17.trys.push([9, 15, 16, 17]);
|
|
6469
|
+
_11 = __values(this.formConfig.tasks.post), _12 = _11.next();
|
|
6470
|
+
_17.label = 10;
|
|
6461
6471
|
case 10:
|
|
6462
|
-
if (!!
|
|
6463
|
-
postTask =
|
|
6472
|
+
if (!!_12.done) return [3 /*break*/, 14];
|
|
6473
|
+
postTask = _12.value;
|
|
6464
6474
|
task = new Tasks(postTask, {
|
|
6465
6475
|
FORM_CONFIG: this.formConfig,
|
|
6466
6476
|
FORM_FIELDS: this.formFields,
|
|
@@ -6478,7 +6488,7 @@
|
|
|
6478
6488
|
}
|
|
6479
6489
|
return [4 /*yield*/, task.execute()];
|
|
6480
6490
|
case 11:
|
|
6481
|
-
|
|
6491
|
+
_17.sent();
|
|
6482
6492
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
6483
6493
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
6484
6494
|
var intervalId = setInterval(function () {
|
|
@@ -6490,22 +6500,22 @@
|
|
|
6490
6500
|
})];
|
|
6491
6501
|
case 12:
|
|
6492
6502
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
6493
|
-
|
|
6503
|
+
_17.sent();
|
|
6494
6504
|
if (this.stopTaskExecution) {
|
|
6495
6505
|
return [3 /*break*/, 14];
|
|
6496
6506
|
}
|
|
6497
|
-
|
|
6507
|
+
_17.label = 13;
|
|
6498
6508
|
case 13:
|
|
6499
|
-
|
|
6509
|
+
_12 = _11.next();
|
|
6500
6510
|
return [3 /*break*/, 10];
|
|
6501
6511
|
case 14: return [3 /*break*/, 17];
|
|
6502
6512
|
case 15:
|
|
6503
|
-
e_14_1 =
|
|
6513
|
+
e_14_1 = _17.sent();
|
|
6504
6514
|
e_14 = { error: e_14_1 };
|
|
6505
6515
|
return [3 /*break*/, 17];
|
|
6506
6516
|
case 16:
|
|
6507
6517
|
try {
|
|
6508
|
-
if (
|
|
6518
|
+
if (_12 && !_12.done && (_16 = _11.return)) _16.call(_11);
|
|
6509
6519
|
}
|
|
6510
6520
|
finally { if (e_14) throw e_14.error; }
|
|
6511
6521
|
return [7 /*endfinally*/];
|
|
@@ -6527,7 +6537,7 @@
|
|
|
6527
6537
|
data: kwikidToolkit.mergeObjects(formData, this.popupFormData, this.taskData),
|
|
6528
6538
|
extendedData: extendedFormData
|
|
6529
6539
|
});
|
|
6530
|
-
|
|
6540
|
+
_17.label = 19;
|
|
6531
6541
|
case 19: return [2 /*return*/];
|
|
6532
6542
|
}
|
|
6533
6543
|
});
|
|
@@ -6550,17 +6560,17 @@
|
|
|
6550
6560
|
});
|
|
6551
6561
|
};
|
|
6552
6562
|
KwikIDFormViewComponent.prototype.fieldGroupHide = function (fieldGroup) {
|
|
6553
|
-
var e_17,
|
|
6563
|
+
var e_17, _7;
|
|
6554
6564
|
try {
|
|
6555
|
-
for (var
|
|
6556
|
-
var fieldKey =
|
|
6565
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6566
|
+
var fieldKey = _9.value;
|
|
6557
6567
|
this.fieldHide(fieldKey);
|
|
6558
6568
|
}
|
|
6559
6569
|
}
|
|
6560
6570
|
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
6561
6571
|
finally {
|
|
6562
6572
|
try {
|
|
6563
|
-
if (
|
|
6573
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6564
6574
|
}
|
|
6565
6575
|
finally { if (e_17) throw e_17.error; }
|
|
6566
6576
|
}
|
|
@@ -6578,17 +6588,17 @@
|
|
|
6578
6588
|
});
|
|
6579
6589
|
};
|
|
6580
6590
|
KwikIDFormViewComponent.prototype.fieldGroupShow = function (fieldGroup) {
|
|
6581
|
-
var e_18,
|
|
6591
|
+
var e_18, _7;
|
|
6582
6592
|
try {
|
|
6583
|
-
for (var
|
|
6584
|
-
var fieldKey =
|
|
6593
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6594
|
+
var fieldKey = _9.value;
|
|
6585
6595
|
this.fieldShow(fieldKey);
|
|
6586
6596
|
}
|
|
6587
6597
|
}
|
|
6588
6598
|
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
6589
6599
|
finally {
|
|
6590
6600
|
try {
|
|
6591
|
-
if (
|
|
6601
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6592
6602
|
}
|
|
6593
6603
|
finally { if (e_18) throw e_18.error; }
|
|
6594
6604
|
}
|
|
@@ -6616,17 +6626,17 @@
|
|
|
6616
6626
|
});
|
|
6617
6627
|
};
|
|
6618
6628
|
KwikIDFormViewComponent.prototype.fieldGroupDisable = function (fieldGroup) {
|
|
6619
|
-
var e_19,
|
|
6629
|
+
var e_19, _7;
|
|
6620
6630
|
try {
|
|
6621
|
-
for (var
|
|
6622
|
-
var fieldKey =
|
|
6631
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6632
|
+
var fieldKey = _9.value;
|
|
6623
6633
|
this.fieldDisable(fieldKey);
|
|
6624
6634
|
}
|
|
6625
6635
|
}
|
|
6626
6636
|
catch (e_19_1) { e_19 = { error: e_19_1 }; }
|
|
6627
6637
|
finally {
|
|
6628
6638
|
try {
|
|
6629
|
-
if (
|
|
6639
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6630
6640
|
}
|
|
6631
6641
|
finally { if (e_19) throw e_19.error; }
|
|
6632
6642
|
}
|
|
@@ -6654,23 +6664,23 @@
|
|
|
6654
6664
|
});
|
|
6655
6665
|
};
|
|
6656
6666
|
KwikIDFormViewComponent.prototype.fieldGroupEnable = function (fieldGroup) {
|
|
6657
|
-
var e_20,
|
|
6667
|
+
var e_20, _7;
|
|
6658
6668
|
try {
|
|
6659
|
-
for (var
|
|
6660
|
-
var fieldKey =
|
|
6669
|
+
for (var _8 = __values(this.fieldGroups[fieldGroup]), _9 = _8.next(); !_9.done; _9 = _8.next()) {
|
|
6670
|
+
var fieldKey = _9.value;
|
|
6661
6671
|
this.fieldEnable(fieldKey);
|
|
6662
6672
|
}
|
|
6663
6673
|
}
|
|
6664
6674
|
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
6665
6675
|
finally {
|
|
6666
6676
|
try {
|
|
6667
|
-
if (
|
|
6677
|
+
if (_9 && !_9.done && (_7 = _8.return)) _7.call(_8);
|
|
6668
6678
|
}
|
|
6669
6679
|
finally { if (e_20) throw e_20.error; }
|
|
6670
6680
|
}
|
|
6671
6681
|
};
|
|
6672
6682
|
KwikIDFormViewComponent.prototype.fieldReset = function (fieldKey) {
|
|
6673
|
-
var
|
|
6683
|
+
var _7;
|
|
6674
6684
|
// Find the field and its index in the formFields array
|
|
6675
6685
|
var field = getFormFieldByKey(this.formFields, fieldKey);
|
|
6676
6686
|
var fieldIndex = getFormFieldIndexByKey(this.formFields, fieldKey);
|
|
@@ -6681,9 +6691,9 @@
|
|
|
6681
6691
|
emitEvent: false,
|
|
6682
6692
|
onlySelf: true
|
|
6683
6693
|
});
|
|
6684
|
-
this.formGroup.patchValue((
|
|
6685
|
-
|
|
6686
|
-
|
|
6694
|
+
this.formGroup.patchValue((_7 = {},
|
|
6695
|
+
_7[field.key] = resetValue,
|
|
6696
|
+
_7), { emitEvent: false });
|
|
6687
6697
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
6688
6698
|
emitEvent: true
|
|
6689
6699
|
});
|
|
@@ -6783,13 +6793,13 @@
|
|
|
6783
6793
|
KwikIDFormViewComponent.prototype.setValue = function (action, object) {
|
|
6784
6794
|
return __awaiter(this, void 0, void 0, function () {
|
|
6785
6795
|
var source, sourceValue;
|
|
6786
|
-
return __generator(this, function (
|
|
6787
|
-
switch (
|
|
6796
|
+
return __generator(this, function (_7) {
|
|
6797
|
+
switch (_7.label) {
|
|
6788
6798
|
case 0:
|
|
6789
6799
|
source = new kwikidToolkit.Source(object);
|
|
6790
6800
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6791
6801
|
case 1:
|
|
6792
|
-
sourceValue =
|
|
6802
|
+
sourceValue = _7.sent();
|
|
6793
6803
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
6794
6804
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
6795
6805
|
this.formData = source.object.FORM_DATA;
|
|
@@ -6804,13 +6814,13 @@
|
|
|
6804
6814
|
KwikIDFormViewComponent.prototype.setFieldDefaultValue = function (action, object) {
|
|
6805
6815
|
return __awaiter(this, void 0, void 0, function () {
|
|
6806
6816
|
var source, sourceValue;
|
|
6807
|
-
return __generator(this, function (
|
|
6808
|
-
switch (
|
|
6817
|
+
return __generator(this, function (_7) {
|
|
6818
|
+
switch (_7.label) {
|
|
6809
6819
|
case 0:
|
|
6810
6820
|
source = new kwikidToolkit.Source(object);
|
|
6811
6821
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6812
6822
|
case 1:
|
|
6813
|
-
sourceValue =
|
|
6823
|
+
sourceValue = _7.sent();
|
|
6814
6824
|
source.setValueToSource({
|
|
6815
6825
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6816
6826
|
props: {
|
|
@@ -6842,7 +6852,7 @@
|
|
|
6842
6852
|
KwikIDFormViewComponent.prototype.setApiStatus = function (action, object) {
|
|
6843
6853
|
return __awaiter(this, void 0, void 0, function () {
|
|
6844
6854
|
var source, sourceValue;
|
|
6845
|
-
return __generator(this, function (
|
|
6855
|
+
return __generator(this, function (_7) {
|
|
6846
6856
|
source = new kwikidToolkit.Source(object);
|
|
6847
6857
|
sourceValue = action.props.status;
|
|
6848
6858
|
source.setValueToSource({
|
|
@@ -6862,13 +6872,13 @@
|
|
|
6862
6872
|
KwikIDFormViewComponent.prototype.setApiHeaderValue = function (action, object) {
|
|
6863
6873
|
return __awaiter(this, void 0, void 0, function () {
|
|
6864
6874
|
var source, sourceValue;
|
|
6865
|
-
return __generator(this, function (
|
|
6866
|
-
switch (
|
|
6875
|
+
return __generator(this, function (_7) {
|
|
6876
|
+
switch (_7.label) {
|
|
6867
6877
|
case 0:
|
|
6868
6878
|
source = new kwikidToolkit.Source(object);
|
|
6869
6879
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
6870
6880
|
case 1:
|
|
6871
|
-
sourceValue =
|
|
6881
|
+
sourceValue = _7.sent();
|
|
6872
6882
|
source.setValueToSource({
|
|
6873
6883
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6874
6884
|
props: {
|
|
@@ -6887,7 +6897,7 @@
|
|
|
6887
6897
|
KwikIDFormViewComponent.prototype.setApiHeaderValidity = function (action, object) {
|
|
6888
6898
|
return __awaiter(this, void 0, void 0, function () {
|
|
6889
6899
|
var source, sourceValue;
|
|
6890
|
-
return __generator(this, function (
|
|
6900
|
+
return __generator(this, function (_7) {
|
|
6891
6901
|
source = new kwikidToolkit.Source(object);
|
|
6892
6902
|
sourceValue = action.props.valid;
|
|
6893
6903
|
source.setValueToSource({
|
|
@@ -6907,13 +6917,13 @@
|
|
|
6907
6917
|
KwikIDFormViewComponent.prototype.setApiBodyValue = function (action, object) {
|
|
6908
6918
|
return __awaiter(this, void 0, void 0, function () {
|
|
6909
6919
|
var source, sourceValue;
|
|
6910
|
-
return __generator(this, function (
|
|
6911
|
-
switch (
|
|
6920
|
+
return __generator(this, function (_7) {
|
|
6921
|
+
switch (_7.label) {
|
|
6912
6922
|
case 0:
|
|
6913
6923
|
source = new kwikidToolkit.Source(object);
|
|
6914
6924
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
6915
6925
|
case 1:
|
|
6916
|
-
sourceValue =
|
|
6926
|
+
sourceValue = _7.sent();
|
|
6917
6927
|
source.setValueToSource({
|
|
6918
6928
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6919
6929
|
props: {
|
|
@@ -6932,7 +6942,7 @@
|
|
|
6932
6942
|
KwikIDFormViewComponent.prototype.setApiBodyValidity = function (action, object) {
|
|
6933
6943
|
return __awaiter(this, void 0, void 0, function () {
|
|
6934
6944
|
var source, sourceValue;
|
|
6935
|
-
return __generator(this, function (
|
|
6945
|
+
return __generator(this, function (_7) {
|
|
6936
6946
|
source = new kwikidToolkit.Source(object);
|
|
6937
6947
|
sourceValue = action.props.valid;
|
|
6938
6948
|
source.setValueToSource({
|
|
@@ -6952,7 +6962,7 @@
|
|
|
6952
6962
|
KwikIDFormViewComponent.prototype.setFieldValidity = function (action, object) {
|
|
6953
6963
|
return __awaiter(this, void 0, void 0, function () {
|
|
6954
6964
|
var source, sourceValue;
|
|
6955
|
-
return __generator(this, function (
|
|
6965
|
+
return __generator(this, function (_7) {
|
|
6956
6966
|
source = new kwikidToolkit.Source(object);
|
|
6957
6967
|
sourceValue = action.props.valid;
|
|
6958
6968
|
source.setValueToSource({
|
|
@@ -6972,18 +6982,18 @@
|
|
|
6972
6982
|
KwikIDFormViewComponent.prototype.setDropdownOptions = function (action, object) {
|
|
6973
6983
|
return __awaiter(this, void 0, void 0, function () {
|
|
6974
6984
|
var source, sourceValue, appendToPath, appendToPathStr, optionsPath;
|
|
6975
|
-
return __generator(this, function (
|
|
6976
|
-
switch (
|
|
6985
|
+
return __generator(this, function (_7) {
|
|
6986
|
+
switch (_7.label) {
|
|
6977
6987
|
case 0:
|
|
6978
6988
|
source = new kwikidToolkit.Source(object);
|
|
6979
6989
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6980
6990
|
case 1:
|
|
6981
|
-
sourceValue =
|
|
6991
|
+
sourceValue = _7.sent();
|
|
6982
6992
|
if (!kwikidToolkit.checkObjectKeyExists(action.props, "options")) return [3 /*break*/, 4];
|
|
6983
6993
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.options, "appendToPath")) return [3 /*break*/, 3];
|
|
6984
6994
|
return [4 /*yield*/, source.getValueFromSource(action.props.options.appendToPath.source)];
|
|
6985
6995
|
case 2:
|
|
6986
|
-
appendToPath =
|
|
6996
|
+
appendToPath = _7.sent();
|
|
6987
6997
|
if (kwikidToolkit.isNotEmptyValue(appendToPath)) {
|
|
6988
6998
|
appendToPathStr = kwikidToolkit.replaceString(appendToPath.match("" + action.props.options.appendToPath.filterSourceValue)[0], "[^a-zA-Z0-9_]", "_");
|
|
6989
6999
|
optionsPath = "" + action.props.options.path + appendToPathStr;
|
|
@@ -6992,7 +7002,7 @@
|
|
|
6992
7002
|
return [3 /*break*/, 4];
|
|
6993
7003
|
case 3:
|
|
6994
7004
|
sourceValue = kwikidToolkit.getObjectValueFromPath(sourceValue, action.props.options.path);
|
|
6995
|
-
|
|
7005
|
+
_7.label = 4;
|
|
6996
7006
|
case 4:
|
|
6997
7007
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
6998
7008
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
@@ -7007,19 +7017,19 @@
|
|
|
7007
7017
|
KwikIDFormViewComponent.prototype.apiCall = function (action, object) {
|
|
7008
7018
|
return __awaiter(this, void 0, void 0, function () {
|
|
7009
7019
|
var apiConfig, response;
|
|
7010
|
-
var
|
|
7011
|
-
return __generator(this, function (
|
|
7012
|
-
switch (
|
|
7020
|
+
var _7;
|
|
7021
|
+
return __generator(this, function (_8) {
|
|
7022
|
+
switch (_8.label) {
|
|
7013
7023
|
case 0:
|
|
7014
7024
|
apiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
7015
7025
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
7016
7026
|
case 1:
|
|
7017
|
-
response =
|
|
7027
|
+
response = _8.sent();
|
|
7018
7028
|
apiConfig = response.api;
|
|
7019
7029
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, apiConfig);
|
|
7020
|
-
this.formData = kwikidToolkit.mergeObjects(this.formData, (
|
|
7021
|
-
|
|
7022
|
-
|
|
7030
|
+
this.formData = kwikidToolkit.mergeObjects(this.formData, (_7 = {},
|
|
7031
|
+
_7[action.props.formApiKey] = apiConfig.response.value,
|
|
7032
|
+
_7));
|
|
7023
7033
|
return [2 /*return*/, apiConfig];
|
|
7024
7034
|
}
|
|
7025
7035
|
});
|
|
@@ -7028,13 +7038,13 @@
|
|
|
7028
7038
|
KwikIDFormViewComponent.prototype.fieldApiCall = function (action, object) {
|
|
7029
7039
|
return __awaiter(this, void 0, void 0, function () {
|
|
7030
7040
|
var apiConfig;
|
|
7031
|
-
return __generator(this, function (
|
|
7032
|
-
switch (
|
|
7041
|
+
return __generator(this, function (_7) {
|
|
7042
|
+
switch (_7.label) {
|
|
7033
7043
|
case 0:
|
|
7034
7044
|
this.showApiLoader();
|
|
7035
7045
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
7036
7046
|
case 1:
|
|
7037
|
-
apiConfig =
|
|
7047
|
+
apiConfig = _7.sent();
|
|
7038
7048
|
this.hideApiLoader();
|
|
7039
7049
|
return [2 /*return*/];
|
|
7040
7050
|
}
|
|
@@ -7044,8 +7054,8 @@
|
|
|
7044
7054
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCalls = function (action, object) {
|
|
7045
7055
|
return __awaiter(this, void 0, void 0, function () {
|
|
7046
7056
|
var entrypointApiKey, field, endpoints, nextApiIndex, apiConfig, response;
|
|
7047
|
-
return __generator(this, function (
|
|
7048
|
-
switch (
|
|
7057
|
+
return __generator(this, function (_7) {
|
|
7058
|
+
switch (_7.label) {
|
|
7049
7059
|
case 0:
|
|
7050
7060
|
entrypointApiKey = action.props.apiKey;
|
|
7051
7061
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
@@ -7054,7 +7064,7 @@
|
|
|
7054
7064
|
apiConfig = endpoints[nextApiIndex];
|
|
7055
7065
|
return [4 /*yield*/, this.handleFieldApiCall(field, apiConfig)];
|
|
7056
7066
|
case 1:
|
|
7057
|
-
response =
|
|
7067
|
+
response = _7.sent();
|
|
7058
7068
|
field = response.field;
|
|
7059
7069
|
field.api.endpoints[nextApiIndex] = response.api;
|
|
7060
7070
|
return [2 /*return*/];
|
|
@@ -7065,15 +7075,15 @@
|
|
|
7065
7075
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCallsEnd = function (action, object) {
|
|
7066
7076
|
return __awaiter(this, void 0, void 0, function () {
|
|
7067
7077
|
var field, multipleApiCallResponses;
|
|
7068
|
-
var
|
|
7069
|
-
return __generator(this, function (
|
|
7078
|
+
var _7;
|
|
7079
|
+
return __generator(this, function (_8) {
|
|
7070
7080
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
7071
7081
|
multipleApiCallResponses = {};
|
|
7072
7082
|
field.api.endpoints.map(function (api) {
|
|
7073
7083
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
7074
7084
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
7075
7085
|
});
|
|
7076
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
7086
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_7 = {}, _7[field.key] = multipleApiCallResponses, _7));
|
|
7077
7087
|
this.patchFormGroup(this.formData);
|
|
7078
7088
|
return [2 /*return*/];
|
|
7079
7089
|
});
|
|
@@ -7082,17 +7092,17 @@
|
|
|
7082
7092
|
KwikIDFormViewComponent.prototype.taskApiCall = function (action, object) {
|
|
7083
7093
|
return __awaiter(this, void 0, void 0, function () {
|
|
7084
7094
|
var apiConfig;
|
|
7085
|
-
var
|
|
7086
|
-
return __generator(this, function (
|
|
7087
|
-
switch (
|
|
7095
|
+
var _7;
|
|
7096
|
+
return __generator(this, function (_8) {
|
|
7097
|
+
switch (_8.label) {
|
|
7088
7098
|
case 0:
|
|
7089
7099
|
this.showApiLoader();
|
|
7090
7100
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
7091
7101
|
case 1:
|
|
7092
|
-
apiConfig =
|
|
7093
|
-
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (
|
|
7094
|
-
|
|
7095
|
-
|
|
7102
|
+
apiConfig = _8.sent();
|
|
7103
|
+
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (_7 = {},
|
|
7104
|
+
_7[action.props.formApiKey] = apiConfig.response.value,
|
|
7105
|
+
_7));
|
|
7096
7106
|
this.waitingForChanges = false;
|
|
7097
7107
|
this.hideApiLoader();
|
|
7098
7108
|
return [2 /*return*/];
|
|
@@ -7103,8 +7113,8 @@
|
|
|
7103
7113
|
KwikIDFormViewComponent.prototype.taskMultipleApiCalls = function (action, object) {
|
|
7104
7114
|
return __awaiter(this, void 0, void 0, function () {
|
|
7105
7115
|
var multipleApiConfig, entrypointApiKey_1, endpoints, nextApiIndex, apiConfig, response, apis;
|
|
7106
|
-
return __generator(this, function (
|
|
7107
|
-
switch (
|
|
7116
|
+
return __generator(this, function (_7) {
|
|
7117
|
+
switch (_7.label) {
|
|
7108
7118
|
case 0:
|
|
7109
7119
|
this.showApiLoader();
|
|
7110
7120
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
@@ -7115,7 +7125,7 @@
|
|
|
7115
7125
|
apiConfig = endpoints[nextApiIndex];
|
|
7116
7126
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
7117
7127
|
case 1:
|
|
7118
|
-
response =
|
|
7128
|
+
response = _7.sent();
|
|
7119
7129
|
multipleApiConfig.endpoints[nextApiIndex] = response.api;
|
|
7120
7130
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, multipleApiConfig);
|
|
7121
7131
|
this.hideApiLoader();
|
|
@@ -7132,8 +7142,8 @@
|
|
|
7132
7142
|
}, this.takeAction.bind(this));
|
|
7133
7143
|
return [4 /*yield*/, apis.callNextApi(multipleApiConfig.entrypoint)];
|
|
7134
7144
|
case 3:
|
|
7135
|
-
|
|
7136
|
-
|
|
7145
|
+
_7.sent();
|
|
7146
|
+
_7.label = 4;
|
|
7137
7147
|
case 4: return [2 /*return*/];
|
|
7138
7148
|
}
|
|
7139
7149
|
});
|
|
@@ -7142,15 +7152,15 @@
|
|
|
7142
7152
|
KwikIDFormViewComponent.prototype.taskMultipleApiCallsEnd = function (action, object) {
|
|
7143
7153
|
return __awaiter(this, void 0, void 0, function () {
|
|
7144
7154
|
var multipleApiConfig, multipleApiCallResponses;
|
|
7145
|
-
var
|
|
7146
|
-
return __generator(this, function (
|
|
7155
|
+
var _7;
|
|
7156
|
+
return __generator(this, function (_8) {
|
|
7147
7157
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
7148
7158
|
multipleApiCallResponses = {};
|
|
7149
7159
|
multipleApiConfig.endpoints.map(function (api) {
|
|
7150
7160
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
7151
7161
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
7152
7162
|
});
|
|
7153
|
-
this.taskData = Object.assign(Object.assign({}, this.taskData), (
|
|
7163
|
+
this.taskData = Object.assign(Object.assign({}, this.taskData), (_7 = {}, _7[action.props.formApiKey] = multipleApiCallResponses, _7));
|
|
7154
7164
|
this.waitingForChanges = false;
|
|
7155
7165
|
this.hideApiLoader();
|
|
7156
7166
|
return [2 /*return*/];
|
|
@@ -7362,7 +7372,7 @@
|
|
|
7362
7372
|
};
|
|
7363
7373
|
KwikIDFormViewComponent.prototype.takeActionOnFieldGroup = function (action, object) {
|
|
7364
7374
|
return __awaiter(this, void 0, void 0, function () {
|
|
7365
|
-
return __generator(this, function (
|
|
7375
|
+
return __generator(this, function (_7) {
|
|
7366
7376
|
/**
|
|
7367
7377
|
* This below code is currently commented because not all actions need to be logged at backend.
|
|
7368
7378
|
* Will look later into where only specific actions needs to be logged or all.
|
|
@@ -7397,12 +7407,12 @@
|
|
|
7397
7407
|
KwikIDFormViewComponent.prototype.takeAction = function (action, object) {
|
|
7398
7408
|
var _a, _b, _c, _d, _e, _f;
|
|
7399
7409
|
return __awaiter(this, void 0, void 0, function () {
|
|
7400
|
-
var
|
|
7401
|
-
return __generator(this, function (
|
|
7402
|
-
switch (
|
|
7410
|
+
var _7, fieldErrorShow_Source, fieldErrorShowSourceValue, fieldErrorHide_Source, fieldErrorHideSourceValue, redirectToUrl_Source, redirectToUrlSourceValue, previewErrorShow_Source, previewErrorShowSourceValue, fieldHtmlMessage_Source, fieldHtmlMessageSourceValue;
|
|
7411
|
+
return __generator(this, function (_8) {
|
|
7412
|
+
switch (_8.label) {
|
|
7403
7413
|
case 0:
|
|
7404
|
-
|
|
7405
|
-
switch (
|
|
7414
|
+
_7 = action.key;
|
|
7415
|
+
switch (_7) {
|
|
7406
7416
|
case EActionKey.FIELD_HIDE: return [3 /*break*/, 1];
|
|
7407
7417
|
case EActionKey.FIELD_SHOW: return [3 /*break*/, 2];
|
|
7408
7418
|
case EActionKey.FIELD_DISABLE: return [3 /*break*/, 3];
|
|
@@ -7464,7 +7474,7 @@
|
|
|
7464
7474
|
fieldErrorShow_Source = new kwikidToolkit.Source(object);
|
|
7465
7475
|
return [4 /*yield*/, fieldErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
7466
7476
|
case 7:
|
|
7467
|
-
fieldErrorShowSourceValue =
|
|
7477
|
+
fieldErrorShowSourceValue = _8.sent();
|
|
7468
7478
|
if (typeof fieldErrorShowSourceValue == "string" ||
|
|
7469
7479
|
typeof fieldErrorShowSourceValue == "number") {
|
|
7470
7480
|
fieldErrorShowSourceValue = String(fieldErrorShowSourceValue);
|
|
@@ -7473,7 +7483,7 @@
|
|
|
7473
7483
|
fieldErrorShowSourceValue = "";
|
|
7474
7484
|
}
|
|
7475
7485
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorShowSourceValue);
|
|
7476
|
-
|
|
7486
|
+
_8.label = 8;
|
|
7477
7487
|
case 8:
|
|
7478
7488
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
7479
7489
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
@@ -7483,7 +7493,7 @@
|
|
|
7483
7493
|
fieldErrorHide_Source = new kwikidToolkit.Source(object);
|
|
7484
7494
|
return [4 /*yield*/, fieldErrorHide_Source.getValueFromSource(action.props.message.source)];
|
|
7485
7495
|
case 10:
|
|
7486
|
-
fieldErrorHideSourceValue =
|
|
7496
|
+
fieldErrorHideSourceValue = _8.sent();
|
|
7487
7497
|
if (typeof fieldErrorHideSourceValue == "string" ||
|
|
7488
7498
|
typeof fieldErrorHideSourceValue == "number") {
|
|
7489
7499
|
fieldErrorHideSourceValue = String(fieldErrorHideSourceValue);
|
|
@@ -7492,7 +7502,7 @@
|
|
|
7492
7502
|
fieldErrorHideSourceValue = "";
|
|
7493
7503
|
}
|
|
7494
7504
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorHideSourceValue);
|
|
7495
|
-
|
|
7505
|
+
_8.label = 11;
|
|
7496
7506
|
case 11:
|
|
7497
7507
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
7498
7508
|
return [3 /*break*/, 66];
|
|
@@ -7504,81 +7514,81 @@
|
|
|
7504
7514
|
return [3 /*break*/, 66];
|
|
7505
7515
|
case 14: return [4 /*yield*/, this.setValue(action, object)];
|
|
7506
7516
|
case 15:
|
|
7507
|
-
|
|
7517
|
+
_8.sent();
|
|
7508
7518
|
return [3 /*break*/, 66];
|
|
7509
7519
|
case 16: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
7510
7520
|
case 17:
|
|
7511
|
-
|
|
7521
|
+
_8.sent();
|
|
7512
7522
|
return [3 /*break*/, 66];
|
|
7513
7523
|
case 18: return [4 /*yield*/, this.setApiStatus(action, object)];
|
|
7514
7524
|
case 19:
|
|
7515
|
-
|
|
7525
|
+
_8.sent();
|
|
7516
7526
|
return [3 /*break*/, 66];
|
|
7517
7527
|
case 20: return [4 /*yield*/, this.setApiHeaderValue(action, object)];
|
|
7518
7528
|
case 21:
|
|
7519
|
-
|
|
7529
|
+
_8.sent();
|
|
7520
7530
|
return [3 /*break*/, 66];
|
|
7521
7531
|
case 22: return [4 /*yield*/, this.setApiHeaderValidity(action, object)];
|
|
7522
7532
|
case 23:
|
|
7523
|
-
|
|
7533
|
+
_8.sent();
|
|
7524
7534
|
return [3 /*break*/, 66];
|
|
7525
7535
|
case 24: return [4 /*yield*/, this.setApiBodyValue(action, object)];
|
|
7526
7536
|
case 25:
|
|
7527
|
-
|
|
7537
|
+
_8.sent();
|
|
7528
7538
|
return [3 /*break*/, 66];
|
|
7529
7539
|
case 26: return [4 /*yield*/, this.setApiBodyValidity(action, object)];
|
|
7530
7540
|
case 27:
|
|
7531
|
-
|
|
7541
|
+
_8.sent();
|
|
7532
7542
|
return [3 /*break*/, 66];
|
|
7533
7543
|
case 28: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
7534
7544
|
case 29:
|
|
7535
|
-
|
|
7545
|
+
_8.sent();
|
|
7536
7546
|
return [3 /*break*/, 66];
|
|
7537
7547
|
case 30: return [4 /*yield*/, this.setFieldValidity(action, object)];
|
|
7538
7548
|
case 31:
|
|
7539
|
-
|
|
7549
|
+
_8.sent();
|
|
7540
7550
|
return [3 /*break*/, 66];
|
|
7541
7551
|
case 32:
|
|
7542
7552
|
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
7543
7553
|
return [3 /*break*/, 66];
|
|
7544
7554
|
case 33: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
7545
7555
|
case 34:
|
|
7546
|
-
|
|
7556
|
+
_8.sent();
|
|
7547
7557
|
return [3 /*break*/, 66];
|
|
7548
7558
|
case 35: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
7549
7559
|
case 36:
|
|
7550
|
-
|
|
7560
|
+
_8.sent();
|
|
7551
7561
|
return [3 /*break*/, 66];
|
|
7552
7562
|
case 37: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
7553
7563
|
case 38:
|
|
7554
|
-
|
|
7564
|
+
_8.sent();
|
|
7555
7565
|
return [3 /*break*/, 66];
|
|
7556
7566
|
case 39: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
7557
7567
|
case 40:
|
|
7558
|
-
|
|
7568
|
+
_8.sent();
|
|
7559
7569
|
return [3 /*break*/, 66];
|
|
7560
7570
|
case 41: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
7561
7571
|
case 42:
|
|
7562
|
-
|
|
7572
|
+
_8.sent();
|
|
7563
7573
|
return [3 /*break*/, 66];
|
|
7564
7574
|
case 43: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
7565
7575
|
case 44:
|
|
7566
|
-
|
|
7576
|
+
_8.sent();
|
|
7567
7577
|
return [3 /*break*/, 66];
|
|
7568
7578
|
case 45:
|
|
7569
7579
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.url, "source")) return [3 /*break*/, 47];
|
|
7570
7580
|
redirectToUrl_Source = new kwikidToolkit.Source(object);
|
|
7571
7581
|
return [4 /*yield*/, redirectToUrl_Source.getValueFromSource(action.props.url.source)];
|
|
7572
7582
|
case 46:
|
|
7573
|
-
redirectToUrlSourceValue =
|
|
7583
|
+
redirectToUrlSourceValue = _8.sent();
|
|
7574
7584
|
if (kwikidToolkit.isEmptyString(redirectToUrlSourceValue)) {
|
|
7575
7585
|
redirectToUrlSourceValue = "";
|
|
7576
7586
|
}
|
|
7577
7587
|
action = kwikidToolkit.setValueToObjectPath(action, "props.url.url", redirectToUrlSourceValue);
|
|
7578
|
-
|
|
7588
|
+
_8.label = 47;
|
|
7579
7589
|
case 47:
|
|
7580
7590
|
this.redirectToUrl(action);
|
|
7581
|
-
|
|
7591
|
+
_8.label = 48;
|
|
7582
7592
|
case 48:
|
|
7583
7593
|
this.showPreview(action.props);
|
|
7584
7594
|
return [3 /*break*/, 66];
|
|
@@ -7587,7 +7597,7 @@
|
|
|
7587
7597
|
previewErrorShow_Source = new kwikidToolkit.Source(object);
|
|
7588
7598
|
return [4 /*yield*/, previewErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
7589
7599
|
case 50:
|
|
7590
|
-
previewErrorShowSourceValue =
|
|
7600
|
+
previewErrorShowSourceValue = _8.sent();
|
|
7591
7601
|
if (typeof previewErrorShowSourceValue == "string" ||
|
|
7592
7602
|
typeof previewErrorShowSourceValue == "number") {
|
|
7593
7603
|
previewErrorShowSourceValue = String(previewErrorShowSourceValue);
|
|
@@ -7596,7 +7606,7 @@
|
|
|
7596
7606
|
previewErrorShowSourceValue = "";
|
|
7597
7607
|
}
|
|
7598
7608
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", previewErrorShowSourceValue);
|
|
7599
|
-
|
|
7609
|
+
_8.label = 51;
|
|
7600
7610
|
case 51:
|
|
7601
7611
|
this.showErrorPreview(action.props);
|
|
7602
7612
|
return [3 /*break*/, 66];
|
|
@@ -7640,7 +7650,7 @@
|
|
|
7640
7650
|
fieldHtmlMessage_Source = new kwikidToolkit.Source(object);
|
|
7641
7651
|
return [4 /*yield*/, fieldHtmlMessage_Source.getValueFromSource(action.props.message.source)];
|
|
7642
7652
|
case 63:
|
|
7643
|
-
fieldHtmlMessageSourceValue =
|
|
7653
|
+
fieldHtmlMessageSourceValue = _8.sent();
|
|
7644
7654
|
if (typeof fieldHtmlMessageSourceValue == "string" ||
|
|
7645
7655
|
typeof fieldHtmlMessageSourceValue == "number") {
|
|
7646
7656
|
fieldHtmlMessageSourceValue = String(fieldHtmlMessageSourceValue);
|
|
@@ -7649,7 +7659,7 @@
|
|
|
7649
7659
|
fieldHtmlMessageSourceValue = "";
|
|
7650
7660
|
}
|
|
7651
7661
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldHtmlMessageSourceValue);
|
|
7652
|
-
|
|
7662
|
+
_8.label = 64;
|
|
7653
7663
|
case 64:
|
|
7654
7664
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
7655
7665
|
this.setHtml(action.props.fieldKey, action.props.message);
|
|
@@ -7663,7 +7673,7 @@
|
|
|
7663
7673
|
return KwikIDFormViewComponent;
|
|
7664
7674
|
}());
|
|
7665
7675
|
/** @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 } });
|
|
7676
|
+
/** @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
7677
|
__decorate([
|
|
7668
7678
|
kwikidToolkit.logMethod
|
|
7669
7679
|
], KwikIDFormViewComponent.prototype, "resetCamera", null);
|
|
@@ -8178,7 +8188,7 @@
|
|
|
8178
8188
|
return;
|
|
8179
8189
|
}
|
|
8180
8190
|
this.triggerLogs(ELogEventType$2.FORM__FORM_OPEN_BUTTON_CLICK, {
|
|
8181
|
-
form_key:
|
|
8191
|
+
form_key: selectedForm,
|
|
8182
8192
|
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
8193
|
});
|
|
8184
8194
|
this.selectedForm = selectedForm;
|