kwikid-forms 0.3.9 → 0.3.11
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 -408
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/config-converter.helper.js +2 -169
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +2 -2
- package/esm2015/lib/renderer/form-view/form-view.component.js +125 -31
- package/esm2015/lib/renderer/form-view/form-view.service.js +7 -2
- package/esm2015/lib/renderer/renderer.component.js +125 -30
- package/fesm2015/kwikid-forms.js +255 -229
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +2 -2
- package/lib/renderer/form-view/form-view.component.d.ts +7 -3
- package/lib/renderer/renderer.component.d.ts +5 -4
- package/package.json +2 -2
|
@@ -2916,175 +2916,8 @@
|
|
|
2916
2916
|
else if (kwikidToolkit.checkObjectKeyExists(field, "default")) {
|
|
2917
2917
|
return field;
|
|
2918
2918
|
}
|
|
2919
|
-
else {
|
|
2920
|
-
if (kwikidToolkit.checkObjectKeyExists(field, "defaultVal")) {
|
|
2921
|
-
// Currently below line is commented because it caused issues in setting Default Value.
|
|
2922
|
-
// field["defaultValue"] = field["defaultVal"];
|
|
2923
|
-
// delete field["defaultVal"];
|
|
2924
|
-
}
|
|
2925
|
-
// TODO: Condition for all_forms_data is not considered yet.
|
|
2926
|
-
if (field.autoPopulateFromSummaryData) {
|
|
2927
|
-
field["defaultValue"] = {
|
|
2928
|
-
is_found: false,
|
|
2929
|
-
value: "",
|
|
2930
|
-
sources: [
|
|
2931
|
-
{
|
|
2932
|
-
source: "summary_data",
|
|
2933
|
-
summary_data: {
|
|
2934
|
-
path: "$." + field.key,
|
|
2935
|
-
validation: {
|
|
2936
|
-
rules: [
|
|
2937
|
-
{
|
|
2938
|
-
key: "1",
|
|
2939
|
-
type: "is_not_empty",
|
|
2940
|
-
is_not_empty: {
|
|
2941
|
-
value: true
|
|
2942
|
-
}
|
|
2943
|
-
}
|
|
2944
|
-
],
|
|
2945
|
-
actions: [
|
|
2946
|
-
{
|
|
2947
|
-
type: "set_default_value_found",
|
|
2948
|
-
condition: "1",
|
|
2949
|
-
set_default_value_found: {
|
|
2950
|
-
value: true
|
|
2951
|
-
}
|
|
2952
|
-
},
|
|
2953
|
-
{
|
|
2954
|
-
type: "enable_field",
|
|
2955
|
-
condition: "1 OR NOT(1)",
|
|
2956
|
-
enable_field: { value: true }
|
|
2957
|
-
}
|
|
2958
|
-
]
|
|
2959
|
-
}
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
]
|
|
2963
|
-
};
|
|
2964
|
-
}
|
|
2965
|
-
else if (kwikidToolkit.checkObjectKeyExists(field, "autofill")) {
|
|
2966
|
-
if (kwikidToolkit.checkObjectKeyExists(field.autofill, "type")) {
|
|
2967
|
-
if (field.autofill.type === "storage") {
|
|
2968
|
-
field["defaultValue"] = {
|
|
2969
|
-
is_found: false,
|
|
2970
|
-
value: "",
|
|
2971
|
-
sources: [
|
|
2972
|
-
{
|
|
2973
|
-
source: "browser_storage",
|
|
2974
|
-
browser_storage: {
|
|
2975
|
-
path: "$." + field.key,
|
|
2976
|
-
validation: {
|
|
2977
|
-
rules: [
|
|
2978
|
-
{
|
|
2979
|
-
key: "1",
|
|
2980
|
-
type: "is_not_empty",
|
|
2981
|
-
is_not_empty: {
|
|
2982
|
-
value: true
|
|
2983
|
-
}
|
|
2984
|
-
}
|
|
2985
|
-
],
|
|
2986
|
-
actions: [
|
|
2987
|
-
{
|
|
2988
|
-
type: "set_default_value_found",
|
|
2989
|
-
condition: "1",
|
|
2990
|
-
set_default_value_found: {
|
|
2991
|
-
value: true
|
|
2992
|
-
}
|
|
2993
|
-
},
|
|
2994
|
-
{
|
|
2995
|
-
type: "enable_field",
|
|
2996
|
-
condition: "1 OR NOT(1)",
|
|
2997
|
-
enable_field: { value: true }
|
|
2998
|
-
}
|
|
2999
|
-
]
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
}
|
|
3003
|
-
]
|
|
3004
|
-
};
|
|
3005
|
-
}
|
|
3006
|
-
else if (field.autofill.type === "config") {
|
|
3007
|
-
field["defaultValue"] = {
|
|
3008
|
-
is_found: false,
|
|
3009
|
-
value: "",
|
|
3010
|
-
sources: [
|
|
3011
|
-
{
|
|
3012
|
-
source: "field_config",
|
|
3013
|
-
field_config: {
|
|
3014
|
-
path: "$." + field.key,
|
|
3015
|
-
validation: {
|
|
3016
|
-
rules: [
|
|
3017
|
-
{
|
|
3018
|
-
key: "1",
|
|
3019
|
-
type: "is_not_empty",
|
|
3020
|
-
is_not_empty: {
|
|
3021
|
-
value: true
|
|
3022
|
-
}
|
|
3023
|
-
}
|
|
3024
|
-
],
|
|
3025
|
-
actions: [
|
|
3026
|
-
{
|
|
3027
|
-
type: "set_default_value_found",
|
|
3028
|
-
condition: "1",
|
|
3029
|
-
set_default_value_found: {
|
|
3030
|
-
value: true
|
|
3031
|
-
}
|
|
3032
|
-
},
|
|
3033
|
-
{
|
|
3034
|
-
type: "enable_field",
|
|
3035
|
-
condition: "1 OR NOT(1)",
|
|
3036
|
-
enable_field: { value: true }
|
|
3037
|
-
}
|
|
3038
|
-
]
|
|
3039
|
-
}
|
|
3040
|
-
}
|
|
3041
|
-
}
|
|
3042
|
-
]
|
|
3043
|
-
};
|
|
3044
|
-
}
|
|
3045
|
-
}
|
|
3046
|
-
}
|
|
3047
|
-
else {
|
|
3048
|
-
field["defaultValue"] = {
|
|
3049
|
-
is_found: false,
|
|
3050
|
-
value: "",
|
|
3051
|
-
sources: [
|
|
3052
|
-
{
|
|
3053
|
-
source: "form_data",
|
|
3054
|
-
form_data: {
|
|
3055
|
-
path: "$." + field.key,
|
|
3056
|
-
validation: {
|
|
3057
|
-
rules: [
|
|
3058
|
-
{
|
|
3059
|
-
key: "1",
|
|
3060
|
-
type: "is_not_empty",
|
|
3061
|
-
is_not_empty: {
|
|
3062
|
-
value: true
|
|
3063
|
-
}
|
|
3064
|
-
}
|
|
3065
|
-
],
|
|
3066
|
-
actions: [
|
|
3067
|
-
{
|
|
3068
|
-
type: "set_default_value_found",
|
|
3069
|
-
condition: "1",
|
|
3070
|
-
set_default_value_found: {
|
|
3071
|
-
value: true
|
|
3072
|
-
}
|
|
3073
|
-
},
|
|
3074
|
-
{
|
|
3075
|
-
type: "enable_field",
|
|
3076
|
-
condition: "1 OR NOT(1)",
|
|
3077
|
-
enable_field: { value: true }
|
|
3078
|
-
}
|
|
3079
|
-
]
|
|
3080
|
-
}
|
|
3081
|
-
}
|
|
3082
|
-
}
|
|
3083
|
-
]
|
|
3084
|
-
};
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
2919
|
delete field["defaultVal"];
|
|
2920
|
+
delete field["defaultValue"];
|
|
3088
2921
|
}
|
|
3089
2922
|
return field;
|
|
3090
2923
|
};
|
|
@@ -3202,7 +3035,7 @@
|
|
|
3202
3035
|
EActionKey["TASK_API_CALL_MULTIPLE_END"] = "TASK_API_CALL_MULTIPLE_END";
|
|
3203
3036
|
EActionKey["PREVIEW_DIALOG_SHOW"] = "PREVIEW_DIALOG_SHOW";
|
|
3204
3037
|
EActionKey["POPUP_FORM_SHOW"] = "POPUP_FORM_SHOW";
|
|
3205
|
-
EActionKey["
|
|
3038
|
+
EActionKey["STOP_WAITING"] = "STOP_WAITING";
|
|
3206
3039
|
EActionKey["NOTIFICATION_ERROR_SHOW"] = "NOTIFICATION_ERROR_SHOW";
|
|
3207
3040
|
EActionKey["NOTIFICATION_ERROR_HIDE"] = "NOTIFICATION_ERROR_HIDE";
|
|
3208
3041
|
EActionKey["DIALOG_SHOW"] = "DIALOG_SHOW";
|
|
@@ -3529,44 +3362,49 @@
|
|
|
3529
3362
|
formGroup = new i2.FormGroup({});
|
|
3530
3363
|
_b.label = 1;
|
|
3531
3364
|
case 1:
|
|
3532
|
-
_b.trys.push([1,
|
|
3365
|
+
_b.trys.push([1, 9, 10, 11]);
|
|
3533
3366
|
fields_1 = __values(fields), fields_1_1 = fields_1.next();
|
|
3534
3367
|
_b.label = 2;
|
|
3535
3368
|
case 2:
|
|
3536
|
-
if (!!fields_1_1.done) return [3 /*break*/,
|
|
3369
|
+
if (!!fields_1_1.done) return [3 /*break*/, 8];
|
|
3537
3370
|
field = fields_1_1.value;
|
|
3538
|
-
if (!field.isFormElement) return [3 /*break*/,
|
|
3371
|
+
if (!field.isFormElement) return [3 /*break*/, 7];
|
|
3539
3372
|
defaults = new Defaults(field, fields, allFormsData, formData, previousFormData, takeAction);
|
|
3373
|
+
value = "";
|
|
3374
|
+
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 4];
|
|
3375
|
+
if (!kwikidToolkit.checkObjectKeyExists(field.default, "value")) return [3 /*break*/, 4];
|
|
3540
3376
|
return [4 /*yield*/, defaults.getFormFieldValue()];
|
|
3541
3377
|
case 3:
|
|
3542
3378
|
value = _b.sent();
|
|
3543
|
-
|
|
3544
|
-
if (!kwikidToolkit.checkObjectKeyExists(field.default, "options")) return [3 /*break*/, 5];
|
|
3545
|
-
if (!field.default.options.triggers.includes("ON_INIT")) return [3 /*break*/, 5];
|
|
3546
|
-
return [4 /*yield*/, defaults.getFormFieldOptions()];
|
|
3379
|
+
_b.label = 4;
|
|
3547
3380
|
case 4:
|
|
3548
|
-
|
|
3549
|
-
|
|
3381
|
+
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 6];
|
|
3382
|
+
if (!kwikidToolkit.checkObjectKeyExists(field.default, "options")) return [3 /*break*/, 6];
|
|
3383
|
+
if (!field.default.options.triggers.includes("ON_INIT")) return [3 /*break*/, 6];
|
|
3384
|
+
return [4 /*yield*/, defaults.getFormFieldOptions()];
|
|
3550
3385
|
case 5:
|
|
3386
|
+
_b.sent();
|
|
3387
|
+
_b.label = 6;
|
|
3388
|
+
case 6:
|
|
3551
3389
|
value = convertFormFieldValueToKwikUIFormat(field, value);
|
|
3552
3390
|
validators = new FormValidation().getFormFieldValidators(field);
|
|
3553
3391
|
formGroup.addControl(field.key, new i2.FormControl({ value: value, disabled: field.disabled }, { validators: validators }));
|
|
3554
|
-
_b.label =
|
|
3555
|
-
case
|
|
3392
|
+
_b.label = 7;
|
|
3393
|
+
case 7:
|
|
3556
3394
|
fields_1_1 = fields_1.next();
|
|
3557
3395
|
return [3 /*break*/, 2];
|
|
3558
|
-
case
|
|
3559
|
-
case
|
|
3396
|
+
case 8: return [3 /*break*/, 11];
|
|
3397
|
+
case 9:
|
|
3560
3398
|
e_1_1 = _b.sent();
|
|
3561
3399
|
e_1 = { error: e_1_1 };
|
|
3562
|
-
return [3 /*break*/,
|
|
3563
|
-
case
|
|
3400
|
+
return [3 /*break*/, 11];
|
|
3401
|
+
case 10:
|
|
3564
3402
|
try {
|
|
3565
3403
|
if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);
|
|
3566
3404
|
}
|
|
3567
3405
|
finally { if (e_1) throw e_1.error; }
|
|
3568
3406
|
return [7 /*endfinally*/];
|
|
3569
|
-
case
|
|
3407
|
+
case 11: return [2 /*return*/, formGroup];
|
|
3570
3408
|
}
|
|
3571
3409
|
});
|
|
3572
3410
|
});
|
|
@@ -4224,8 +4062,8 @@
|
|
|
4224
4062
|
this.stopTaskExecution = false;
|
|
4225
4063
|
this.waitingForChanges = false;
|
|
4226
4064
|
this.popupFormConfig = undefined;
|
|
4227
|
-
this.popupFormData =
|
|
4228
|
-
this.
|
|
4065
|
+
this.popupFormData = {};
|
|
4066
|
+
this.taskData = {};
|
|
4229
4067
|
this.formGroup = new i2.FormGroup({});
|
|
4230
4068
|
this.showErrorNotification = false;
|
|
4231
4069
|
this.dialogRef = undefined;
|
|
@@ -4233,12 +4071,15 @@
|
|
|
4233
4071
|
KwikIDFormViewComponent.prototype.ngOnInit = function () {
|
|
4234
4072
|
var _this = this;
|
|
4235
4073
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4074
|
+
var res;
|
|
4236
4075
|
return __generator(this, function (_h) {
|
|
4237
4076
|
switch (_h.label) {
|
|
4238
4077
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4239
4078
|
case 1:
|
|
4240
|
-
_h.sent();
|
|
4241
|
-
|
|
4079
|
+
res = _h.sent();
|
|
4080
|
+
if (res) {
|
|
4081
|
+
this.loading = false;
|
|
4082
|
+
}
|
|
4242
4083
|
return [2 /*return*/];
|
|
4243
4084
|
}
|
|
4244
4085
|
});
|
|
@@ -4262,6 +4103,13 @@
|
|
|
4262
4103
|
_h[popupFormConfig.key] = popupFormData,
|
|
4263
4104
|
_h));
|
|
4264
4105
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4106
|
+
if (kwikidToolkit.checkObjectKeyExists(changes.popupFormCallback.currentValue, "stopTaskExecution")) {
|
|
4107
|
+
this.stopTaskExecution =
|
|
4108
|
+
changes.popupFormCallback.currentValue.stopTaskExecution;
|
|
4109
|
+
}
|
|
4110
|
+
else {
|
|
4111
|
+
this.stopTaskExecution = false;
|
|
4112
|
+
}
|
|
4265
4113
|
}
|
|
4266
4114
|
this.waitingForChanges = false;
|
|
4267
4115
|
}
|
|
@@ -4312,19 +4160,19 @@
|
|
|
4312
4160
|
FORM_CONFIG: this.formConfig,
|
|
4313
4161
|
FORM_FIELDS: this.formFields,
|
|
4314
4162
|
FORM_DATA: this.formData,
|
|
4163
|
+
TASK_DATA: this.taskData,
|
|
4315
4164
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4316
4165
|
ALL_FORMS_DATA: this.allFormsData
|
|
4317
4166
|
}, this.takeAction.bind(this));
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4167
|
+
this.stopTaskExecution = false;
|
|
4168
|
+
if (kwikidToolkit.checkObjectKeyExists(preTask, "wait")) {
|
|
4169
|
+
this.waitingForChanges = preTask.wait;
|
|
4170
|
+
}
|
|
4171
|
+
else {
|
|
4172
|
+
this.waitingForChanges = false;
|
|
4173
|
+
}
|
|
4323
4174
|
return [4 /*yield*/, task.execute()];
|
|
4324
4175
|
case 3:
|
|
4325
|
-
// } else {
|
|
4326
|
-
// this.waitingForChanges = false;
|
|
4327
|
-
// }
|
|
4328
4176
|
_t.sent();
|
|
4329
4177
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4330
4178
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
@@ -4361,7 +4209,7 @@
|
|
|
4361
4209
|
_t.label = 10;
|
|
4362
4210
|
case 10:
|
|
4363
4211
|
if (this.stopTaskExecution) {
|
|
4364
|
-
return [2 /*return
|
|
4212
|
+
return [2 /*return*/, false];
|
|
4365
4213
|
}
|
|
4366
4214
|
_k = this;
|
|
4367
4215
|
return [4 /*yield*/, this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this))];
|
|
@@ -4411,6 +4259,7 @@
|
|
|
4411
4259
|
FIELD_CONFIG: field,
|
|
4412
4260
|
FORM_FIELDS: this.formFields,
|
|
4413
4261
|
FORM_DATA: this.formData,
|
|
4262
|
+
TASK_DATA: this.taskData,
|
|
4414
4263
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4415
4264
|
ALL_FORMS_DATA: this.allFormsData
|
|
4416
4265
|
}, this.takeAction.bind(this));
|
|
@@ -4440,7 +4289,7 @@
|
|
|
4440
4289
|
}
|
|
4441
4290
|
finally { if (e_2) throw e_2.error; }
|
|
4442
4291
|
return [7 /*endfinally*/];
|
|
4443
|
-
case 20: return [2 /*return
|
|
4292
|
+
case 20: return [2 /*return*/, true];
|
|
4444
4293
|
}
|
|
4445
4294
|
});
|
|
4446
4295
|
});
|
|
@@ -4476,6 +4325,7 @@
|
|
|
4476
4325
|
rulesMapping = new kwikidToolkit.Rule(childFieldGroupConfig.rules, {
|
|
4477
4326
|
FIELD_CONFIG: parentField,
|
|
4478
4327
|
FORM_DATA: this.formData,
|
|
4328
|
+
TASK_DATA: this.taskData,
|
|
4479
4329
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4480
4330
|
ALL_FORMS_DATA: this.allFormsData
|
|
4481
4331
|
}).mapping();
|
|
@@ -4493,6 +4343,7 @@
|
|
|
4493
4343
|
FIELD_CONFIG: parentField,
|
|
4494
4344
|
FORM_FIELDS: this.formFields,
|
|
4495
4345
|
FORM_DATA: this.formData,
|
|
4346
|
+
TASK_DATA: this.taskData,
|
|
4496
4347
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4497
4348
|
ALL_FORMS_DATA: this.allFormsData
|
|
4498
4349
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
@@ -4546,6 +4397,7 @@
|
|
|
4546
4397
|
rulesMapping = new kwikidToolkit.Rule(connectedFieldConfig.rules, {
|
|
4547
4398
|
FIELD_CONFIG: connectedField,
|
|
4548
4399
|
FORM_DATA: this.formData,
|
|
4400
|
+
TASK_DATA: this.taskData,
|
|
4549
4401
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4550
4402
|
ALL_FORMS_DATA: this.allFormsData
|
|
4551
4403
|
}).mapping();
|
|
@@ -4563,6 +4415,7 @@
|
|
|
4563
4415
|
FORM_FIELDS: this.formFields,
|
|
4564
4416
|
FIELD_CONFIG: connectedField,
|
|
4565
4417
|
FORM_DATA: this.formData,
|
|
4418
|
+
TASK_DATA: this.taskData,
|
|
4566
4419
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4567
4420
|
ALL_FORMS_DATA: this.allFormsData
|
|
4568
4421
|
}, this.takeAction.bind(this));
|
|
@@ -4703,6 +4556,7 @@
|
|
|
4703
4556
|
FIELD_CONFIG: field,
|
|
4704
4557
|
FORM_FIELDS: this.formFields,
|
|
4705
4558
|
FORM_DATA: this.formData,
|
|
4559
|
+
TASK_DATA: this.taskData,
|
|
4706
4560
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4707
4561
|
ALL_FORMS_DATA: this.allFormsData
|
|
4708
4562
|
}, this.takeAction.bind(this));
|
|
@@ -4756,6 +4610,7 @@
|
|
|
4756
4610
|
FIELD_CONFIG: resetField,
|
|
4757
4611
|
FORM_FIELDS: this.formFields,
|
|
4758
4612
|
FORM_DATA: this.formData,
|
|
4613
|
+
TASK_DATA: this.taskData,
|
|
4759
4614
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4760
4615
|
ALL_FORMS_DATA: this.allFormsData
|
|
4761
4616
|
}, this.takeAction.bind(this));
|
|
@@ -4820,6 +4675,7 @@
|
|
|
4820
4675
|
API_CONFIG: api,
|
|
4821
4676
|
FORM_FIELDS: this.formFields,
|
|
4822
4677
|
FORM_DATA: this.formData,
|
|
4678
|
+
TASK_DATA: this.taskData,
|
|
4823
4679
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4824
4680
|
ALL_FORMS_DATA: this.allFormsData
|
|
4825
4681
|
})];
|
|
@@ -4838,6 +4694,7 @@
|
|
|
4838
4694
|
API_CONFIG: api,
|
|
4839
4695
|
FORM_FIELDS: this.formFields,
|
|
4840
4696
|
FORM_DATA: this.formData,
|
|
4697
|
+
TASK_DATA: this.taskData,
|
|
4841
4698
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4842
4699
|
ALL_FORMS_DATA: this.allFormsData
|
|
4843
4700
|
}, this.takeAction.bind(this));
|
|
@@ -4866,6 +4723,7 @@
|
|
|
4866
4723
|
API_CONFIG: api,
|
|
4867
4724
|
FORM_FIELDS: this.formFields,
|
|
4868
4725
|
FORM_DATA: this.formData,
|
|
4726
|
+
TASK_DATA: this.taskData,
|
|
4869
4727
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4870
4728
|
ALL_FORMS_DATA: this.allFormsData
|
|
4871
4729
|
})];
|
|
@@ -4876,6 +4734,7 @@
|
|
|
4876
4734
|
API_CONFIG: api,
|
|
4877
4735
|
FORM_FIELDS: this.formFields,
|
|
4878
4736
|
FORM_DATA: this.formData,
|
|
4737
|
+
TASK_DATA: this.taskData,
|
|
4879
4738
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4880
4739
|
ALL_FORMS_DATA: this.allFormsData
|
|
4881
4740
|
}, this.takeAction.bind(this));
|
|
@@ -4915,12 +4774,18 @@
|
|
|
4915
4774
|
api = _h.sent();
|
|
4916
4775
|
apiCallResponse = undefined;
|
|
4917
4776
|
if (!(api.request.body.validation.is_valid &&
|
|
4918
|
-
api.request.headers.validation.is_valid)) return [3 /*break*/,
|
|
4777
|
+
api.request.headers.validation.is_valid)) return [3 /*break*/, 11];
|
|
4919
4778
|
if (!(api.request.url.hasOwnProperty("type") &&
|
|
4920
|
-
api.request.url.type === EApiRequestUrlType.MOCK)) return [3 /*break*/,
|
|
4921
|
-
|
|
4922
|
-
|
|
4779
|
+
api.request.url.type === EApiRequestUrlType.MOCK)) return [3 /*break*/, 7];
|
|
4780
|
+
return [4 /*yield*/, new Promise(function (resolve) {
|
|
4781
|
+
setTimeout(function () {
|
|
4782
|
+
resolve(api.request.url.props.mockedData);
|
|
4783
|
+
}, 1000); // 1000 ms = 1 sec
|
|
4784
|
+
})];
|
|
4923
4785
|
case 6:
|
|
4786
|
+
apiCallResponse = _h.sent();
|
|
4787
|
+
return [3 /*break*/, 10];
|
|
4788
|
+
case 7:
|
|
4924
4789
|
url = api.request.url.value;
|
|
4925
4790
|
method = (_b = (_a = api.request) === null || _a === void 0 ? void 0 : _a.method) !== null && _b !== void 0 ? _b : "POST";
|
|
4926
4791
|
headers = Object.assign({ "Content-Type": "application/json" }, (((_d = (_c = api.request) === null || _c === void 0 ? void 0 : _c.headers) === null || _d === void 0 ? void 0 : _d.value) || {}));
|
|
@@ -4930,16 +4795,16 @@
|
|
|
4930
4795
|
headers: Object.assign({}, headers),
|
|
4931
4796
|
body: JSON.stringify(body)
|
|
4932
4797
|
})];
|
|
4933
|
-
case
|
|
4798
|
+
case 8:
|
|
4934
4799
|
response = _h.sent();
|
|
4935
4800
|
return [4 /*yield*/, response.json()];
|
|
4936
|
-
case 8:
|
|
4937
|
-
apiCallResponse = _h.sent();
|
|
4938
|
-
_h.label = 9;
|
|
4939
4801
|
case 9:
|
|
4940
|
-
|
|
4802
|
+
apiCallResponse = _h.sent();
|
|
4941
4803
|
_h.label = 10;
|
|
4942
|
-
case 10:
|
|
4804
|
+
case 10:
|
|
4805
|
+
api.response = kwikidToolkit.setValueToObjectPath(api.response, "value", apiCallResponse);
|
|
4806
|
+
_h.label = 11;
|
|
4807
|
+
case 11: return [2 /*return*/, api];
|
|
4943
4808
|
}
|
|
4944
4809
|
});
|
|
4945
4810
|
});
|
|
@@ -4979,6 +4844,7 @@
|
|
|
4979
4844
|
API_CONFIG: {},
|
|
4980
4845
|
FORM_FIELDS: this.formFields,
|
|
4981
4846
|
FORM_DATA: this.formData,
|
|
4847
|
+
TASK_DATA: this.taskData,
|
|
4982
4848
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4983
4849
|
ALL_FORMS_DATA: this.allFormsData
|
|
4984
4850
|
}, this.takeAction.bind(this));
|
|
@@ -5100,6 +4966,7 @@
|
|
|
5100
4966
|
FIELD_CONFIG: field,
|
|
5101
4967
|
FORM_FIELDS: this.formFields,
|
|
5102
4968
|
FORM_DATA: this.formData,
|
|
4969
|
+
TASK_DATA: this.taskData,
|
|
5103
4970
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5104
4971
|
ALL_FORMS_DATA: this.allFormsData
|
|
5105
4972
|
}, this.takeAction.bind(this));
|
|
@@ -5148,10 +5015,17 @@
|
|
|
5148
5015
|
FORM_CONFIG: this.formConfig,
|
|
5149
5016
|
FORM_FIELDS: this.formFields,
|
|
5150
5017
|
FORM_DATA: this.formData,
|
|
5018
|
+
TASK_DATA: this.taskData,
|
|
5151
5019
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5152
5020
|
ALL_FORMS_DATA: this.allFormsData
|
|
5153
5021
|
}, this.takeAction.bind(this));
|
|
5154
|
-
this.
|
|
5022
|
+
this.stopTaskExecution = false;
|
|
5023
|
+
if (kwikidToolkit.checkObjectKeyExists(postTask, "wait")) {
|
|
5024
|
+
this.waitingForChanges = postTask.wait;
|
|
5025
|
+
}
|
|
5026
|
+
else {
|
|
5027
|
+
this.waitingForChanges = false;
|
|
5028
|
+
}
|
|
5155
5029
|
return [4 /*yield*/, task.execute()];
|
|
5156
5030
|
case 11:
|
|
5157
5031
|
_t.sent();
|
|
@@ -5168,7 +5042,7 @@
|
|
|
5168
5042
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5169
5043
|
_t.sent();
|
|
5170
5044
|
if (this.stopTaskExecution) {
|
|
5171
|
-
return [
|
|
5045
|
+
return [3 /*break*/, 14];
|
|
5172
5046
|
}
|
|
5173
5047
|
_t.label = 13;
|
|
5174
5048
|
case 13:
|
|
@@ -5186,18 +5060,19 @@
|
|
|
5186
5060
|
finally { if (e_11) throw e_11.error; }
|
|
5187
5061
|
return [7 /*endfinally*/];
|
|
5188
5062
|
case 17:
|
|
5189
|
-
if (this.stopTaskExecution) {
|
|
5063
|
+
if (this.stopTaskExecution || this.waitingForChanges) {
|
|
5064
|
+
this.stopTaskExecution = false;
|
|
5190
5065
|
return [2 /*return*/];
|
|
5191
5066
|
}
|
|
5192
5067
|
this.onClickSaveForm.emit({
|
|
5193
5068
|
formConfig: this.formConfig,
|
|
5194
|
-
data: kwikidToolkit.mergeObjects(this.allFormsData[this.formConfig.key], formData, this.popupFormData, this.
|
|
5069
|
+
data: kwikidToolkit.mergeObjects(this.allFormsData[this.formConfig.key], formData, this.popupFormData, this.taskData)
|
|
5195
5070
|
});
|
|
5196
5071
|
return [3 /*break*/, 19];
|
|
5197
5072
|
case 18:
|
|
5198
5073
|
this.onClickSaveForm.emit({
|
|
5199
5074
|
formConfig: this.formConfig,
|
|
5200
|
-
data: kwikidToolkit.mergeObjects(this.allFormsData[this.formConfig.key], formData, this.popupFormData, this.
|
|
5075
|
+
data: kwikidToolkit.mergeObjects(this.allFormsData[this.formConfig.key], formData, this.popupFormData, this.taskData)
|
|
5201
5076
|
});
|
|
5202
5077
|
_t.label = 19;
|
|
5203
5078
|
case 19: return [2 /*return*/];
|
|
@@ -5544,7 +5419,7 @@
|
|
|
5544
5419
|
response = _j.sent();
|
|
5545
5420
|
apiConfig = response.api;
|
|
5546
5421
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, apiConfig);
|
|
5547
|
-
this.
|
|
5422
|
+
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (_h = {},
|
|
5548
5423
|
_h[action.props.formApiKey] = apiConfig.response.value,
|
|
5549
5424
|
_h));
|
|
5550
5425
|
this.waitingForChanges = false;
|
|
@@ -5580,6 +5455,7 @@
|
|
|
5580
5455
|
API_CONFIG: multipleApiConfig,
|
|
5581
5456
|
FORM_FIELDS: this.formFields,
|
|
5582
5457
|
FORM_DATA: this.formData,
|
|
5458
|
+
TASK_DATA: this.taskData,
|
|
5583
5459
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5584
5460
|
ALL_FORMS_DATA: this.allFormsData
|
|
5585
5461
|
}, this.takeAction.bind(this));
|
|
@@ -5603,7 +5479,7 @@
|
|
|
5603
5479
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
5604
5480
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
5605
5481
|
});
|
|
5606
|
-
this.
|
|
5482
|
+
this.taskData = Object.assign(Object.assign({}, this.taskData), (_h = {}, _h[action.props.formApiKey] = multipleApiCallResponses, _h));
|
|
5607
5483
|
this.waitingForChanges = false;
|
|
5608
5484
|
this.hideApiLoader();
|
|
5609
5485
|
return [2 /*return*/];
|
|
@@ -5661,6 +5537,7 @@
|
|
|
5661
5537
|
return this.formGroup.getRawValue();
|
|
5662
5538
|
};
|
|
5663
5539
|
KwikIDFormViewComponent.prototype.showPreview = function (previewProperties) {
|
|
5540
|
+
var _this = this;
|
|
5664
5541
|
this.previewProperties = kwikidToolkit.mergeObjects(this.previewProperties, previewProperties);
|
|
5665
5542
|
if (kwikidToolkit.isEmptyValue(this.previewProperties.iframe.src) &&
|
|
5666
5543
|
kwikidToolkit.isEmptyValue(this.previewProperties.html.before) &&
|
|
@@ -5670,13 +5547,31 @@
|
|
|
5670
5547
|
else {
|
|
5671
5548
|
this.previewProperties.unavailable = false;
|
|
5672
5549
|
}
|
|
5673
|
-
this.previewDialogService.open(this.preview || "").subscribe(
|
|
5550
|
+
this.previewDialogService.open(this.preview || "").subscribe({
|
|
5551
|
+
complete: function () {
|
|
5552
|
+
_this.previewProperties = {
|
|
5553
|
+
html: {
|
|
5554
|
+
before: "",
|
|
5555
|
+
after: ""
|
|
5556
|
+
},
|
|
5557
|
+
iframe: {
|
|
5558
|
+
src: "",
|
|
5559
|
+
title: ""
|
|
5560
|
+
},
|
|
5561
|
+
popupFormKey: "",
|
|
5562
|
+
title: "",
|
|
5563
|
+
unavailable: false
|
|
5564
|
+
};
|
|
5565
|
+
}
|
|
5566
|
+
});
|
|
5674
5567
|
};
|
|
5675
|
-
KwikIDFormViewComponent.prototype.showPopupForm = function (popupFormKey) {
|
|
5568
|
+
KwikIDFormViewComponent.prototype.showPopupForm = function (popupFormKey, popupType) {
|
|
5569
|
+
if (popupType === void 0) { popupType = "DIALOG"; }
|
|
5676
5570
|
var popupFormConfig = this.formConfig.popupForms[popupFormKey];
|
|
5677
5571
|
this.onActionShowPopupForm.emit({
|
|
5678
|
-
activeFormData: kwikidToolkit.mergeObjects(this.formData, this.
|
|
5679
|
-
popupFormConfig: popupFormConfig
|
|
5572
|
+
activeFormData: kwikidToolkit.mergeObjects(this.formData, this.taskData),
|
|
5573
|
+
popupFormConfig: popupFormConfig,
|
|
5574
|
+
popupType: popupType
|
|
5680
5575
|
});
|
|
5681
5576
|
};
|
|
5682
5577
|
KwikIDFormViewComponent.prototype.takeActionOnFieldGroup = function (action, object) {
|
|
@@ -5703,9 +5598,9 @@
|
|
|
5703
5598
|
});
|
|
5704
5599
|
};
|
|
5705
5600
|
KwikIDFormViewComponent.prototype.takeAction = function (action, object) {
|
|
5706
|
-
var _a, _b, _c, _d;
|
|
5601
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5707
5602
|
return __awaiter(this, void 0, void 0, function () {
|
|
5708
|
-
var _h, fieldErrorShow_Source, fieldErrorShowSourceValue;
|
|
5603
|
+
var _h, fieldErrorShow_Source, fieldErrorShowSourceValue, fieldErrorHide_Source, fieldErrorHideSourceValue;
|
|
5709
5604
|
return __generator(this, function (_j) {
|
|
5710
5605
|
switch (_j.label) {
|
|
5711
5606
|
case 0:
|
|
@@ -5718,44 +5613,44 @@
|
|
|
5718
5613
|
case EActionKey.FIELD_RESET: return [3 /*break*/, 5];
|
|
5719
5614
|
case EActionKey.FIELD_ERROR_SHOW: return [3 /*break*/, 6];
|
|
5720
5615
|
case EActionKey.FIELD_ERROR_HIDE: return [3 /*break*/, 9];
|
|
5721
|
-
case EActionKey.FIELD_MESSAGE_SHOW: return [3 /*break*/,
|
|
5722
|
-
case EActionKey.FIELD_MESSAGES_HIDE: return [3 /*break*/,
|
|
5723
|
-
case EActionKey.SET_VALUE: return [3 /*break*/,
|
|
5724
|
-
case EActionKey.SET_FIELD_DEFAULT_VALUE: return [3 /*break*/,
|
|
5725
|
-
case EActionKey.SET_DROPDOWN_OPTIONS: return [3 /*break*/,
|
|
5726
|
-
case EActionKey.HANDLE_CONNECTED_ELEMENTS: return [3 /*break*/,
|
|
5727
|
-
case EActionKey.API_CALL: return [3 /*break*/,
|
|
5728
|
-
case EActionKey.API_CALL_MULTIPLE: return [3 /*break*/,
|
|
5729
|
-
case EActionKey.API_CALL_MULTIPLE_END: return [3 /*break*/,
|
|
5730
|
-
case EActionKey.TASK_API_CALL: return [3 /*break*/,
|
|
5731
|
-
case EActionKey.TASK_API_CALL_MULTIPLE: return [3 /*break*/,
|
|
5732
|
-
case EActionKey.TASK_API_CALL_MULTIPLE_END: return [3 /*break*/,
|
|
5733
|
-
case EActionKey.PREVIEW_DIALOG_SHOW: return [3 /*break*/,
|
|
5734
|
-
case EActionKey.POPUP_FORM_SHOW: return [3 /*break*/,
|
|
5735
|
-
case EActionKey.
|
|
5736
|
-
case EActionKey.NOTIFICATION_ERROR_SHOW: return [3 /*break*/,
|
|
5737
|
-
case EActionKey.NOTIFICATION_ERROR_HIDE: return [3 /*break*/,
|
|
5738
|
-
case EActionKey.RESUME_TASK_EXECUTION: return [3 /*break*/,
|
|
5739
|
-
case EActionKey.STOP_TASK_EXECUTION: return [3 /*break*/,
|
|
5740
|
-
case EActionKey.DIALOG_SHOW: return [3 /*break*/,
|
|
5741
|
-
case EActionKey.DIALOG_HIDE: return [3 /*break*/,
|
|
5616
|
+
case EActionKey.FIELD_MESSAGE_SHOW: return [3 /*break*/, 12];
|
|
5617
|
+
case EActionKey.FIELD_MESSAGES_HIDE: return [3 /*break*/, 13];
|
|
5618
|
+
case EActionKey.SET_VALUE: return [3 /*break*/, 14];
|
|
5619
|
+
case EActionKey.SET_FIELD_DEFAULT_VALUE: return [3 /*break*/, 16];
|
|
5620
|
+
case EActionKey.SET_DROPDOWN_OPTIONS: return [3 /*break*/, 18];
|
|
5621
|
+
case EActionKey.HANDLE_CONNECTED_ELEMENTS: return [3 /*break*/, 20];
|
|
5622
|
+
case EActionKey.API_CALL: return [3 /*break*/, 21];
|
|
5623
|
+
case EActionKey.API_CALL_MULTIPLE: return [3 /*break*/, 22];
|
|
5624
|
+
case EActionKey.API_CALL_MULTIPLE_END: return [3 /*break*/, 24];
|
|
5625
|
+
case EActionKey.TASK_API_CALL: return [3 /*break*/, 26];
|
|
5626
|
+
case EActionKey.TASK_API_CALL_MULTIPLE: return [3 /*break*/, 28];
|
|
5627
|
+
case EActionKey.TASK_API_CALL_MULTIPLE_END: return [3 /*break*/, 30];
|
|
5628
|
+
case EActionKey.PREVIEW_DIALOG_SHOW: return [3 /*break*/, 32];
|
|
5629
|
+
case EActionKey.POPUP_FORM_SHOW: return [3 /*break*/, 33];
|
|
5630
|
+
case EActionKey.STOP_WAITING: return [3 /*break*/, 34];
|
|
5631
|
+
case EActionKey.NOTIFICATION_ERROR_SHOW: return [3 /*break*/, 35];
|
|
5632
|
+
case EActionKey.NOTIFICATION_ERROR_HIDE: return [3 /*break*/, 36];
|
|
5633
|
+
case EActionKey.RESUME_TASK_EXECUTION: return [3 /*break*/, 37];
|
|
5634
|
+
case EActionKey.STOP_TASK_EXECUTION: return [3 /*break*/, 38];
|
|
5635
|
+
case EActionKey.DIALOG_SHOW: return [3 /*break*/, 39];
|
|
5636
|
+
case EActionKey.DIALOG_HIDE: return [3 /*break*/, 40];
|
|
5742
5637
|
}
|
|
5743
|
-
return [3 /*break*/,
|
|
5638
|
+
return [3 /*break*/, 41];
|
|
5744
5639
|
case 1:
|
|
5745
5640
|
this.fieldHide(action.props.fieldKey);
|
|
5746
|
-
return [3 /*break*/,
|
|
5641
|
+
return [3 /*break*/, 42];
|
|
5747
5642
|
case 2:
|
|
5748
5643
|
this.fieldShow(action.props.fieldKey);
|
|
5749
|
-
return [3 /*break*/,
|
|
5644
|
+
return [3 /*break*/, 42];
|
|
5750
5645
|
case 3:
|
|
5751
5646
|
this.fieldDisable(action.props.fieldKey);
|
|
5752
|
-
return [3 /*break*/,
|
|
5647
|
+
return [3 /*break*/, 42];
|
|
5753
5648
|
case 4:
|
|
5754
5649
|
this.fieldEnable(action.props.fieldKey);
|
|
5755
|
-
return [3 /*break*/,
|
|
5650
|
+
return [3 /*break*/, 42];
|
|
5756
5651
|
case 5:
|
|
5757
5652
|
this.fieldReset(action.props.fieldKey);
|
|
5758
|
-
return [3 /*break*/,
|
|
5653
|
+
return [3 /*break*/, 42];
|
|
5759
5654
|
case 6:
|
|
5760
5655
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 8];
|
|
5761
5656
|
fieldErrorShow_Source = new kwikidToolkit.Source(object);
|
|
@@ -5773,94 +5668,139 @@
|
|
|
5773
5668
|
_j.label = 8;
|
|
5774
5669
|
case 8:
|
|
5775
5670
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
5776
|
-
return [3 /*break*/,
|
|
5671
|
+
return [3 /*break*/, 42];
|
|
5777
5672
|
case 9:
|
|
5778
|
-
|
|
5779
|
-
|
|
5673
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 11];
|
|
5674
|
+
fieldErrorHide_Source = new kwikidToolkit.Source(object);
|
|
5675
|
+
return [4 /*yield*/, fieldErrorHide_Source.getValueFromSource(action.props.message.source)];
|
|
5780
5676
|
case 10:
|
|
5781
|
-
|
|
5782
|
-
|
|
5677
|
+
fieldErrorHideSourceValue = _j.sent();
|
|
5678
|
+
if (typeof fieldErrorHideSourceValue == "string" ||
|
|
5679
|
+
typeof fieldErrorHideSourceValue == "number") {
|
|
5680
|
+
fieldErrorHideSourceValue = String(fieldErrorHideSourceValue);
|
|
5681
|
+
}
|
|
5682
|
+
else {
|
|
5683
|
+
fieldErrorHideSourceValue = "";
|
|
5684
|
+
}
|
|
5685
|
+
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorHideSourceValue);
|
|
5686
|
+
_j.label = 11;
|
|
5783
5687
|
case 11:
|
|
5784
|
-
this.
|
|
5785
|
-
return [3 /*break*/,
|
|
5786
|
-
case 12:
|
|
5688
|
+
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
5689
|
+
return [3 /*break*/, 42];
|
|
5690
|
+
case 12:
|
|
5691
|
+
this.fieldMessageShow(action.props.fieldKey, action.props.message);
|
|
5692
|
+
return [3 /*break*/, 42];
|
|
5787
5693
|
case 13:
|
|
5788
|
-
|
|
5789
|
-
return [3 /*break*/,
|
|
5790
|
-
case 14: return [4 /*yield*/, this.
|
|
5694
|
+
this.fieldMessageHide(action.props.fieldKey, action.props.message);
|
|
5695
|
+
return [3 /*break*/, 42];
|
|
5696
|
+
case 14: return [4 /*yield*/, this.setValue(action, object)];
|
|
5791
5697
|
case 15:
|
|
5792
5698
|
_j.sent();
|
|
5793
|
-
return [3 /*break*/,
|
|
5794
|
-
case 16: return [4 /*yield*/, this.
|
|
5699
|
+
return [3 /*break*/, 42];
|
|
5700
|
+
case 16: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
5795
5701
|
case 17:
|
|
5796
5702
|
_j.sent();
|
|
5797
|
-
return [3 /*break*/,
|
|
5798
|
-
case 18:
|
|
5799
|
-
|
|
5800
|
-
return [3 /*break*/, 40];
|
|
5801
|
-
case 19: return [3 /*break*/, 40];
|
|
5802
|
-
case 20: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
5803
|
-
case 21:
|
|
5703
|
+
return [3 /*break*/, 42];
|
|
5704
|
+
case 18: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
5705
|
+
case 19:
|
|
5804
5706
|
_j.sent();
|
|
5805
|
-
return [3 /*break*/,
|
|
5806
|
-
case
|
|
5707
|
+
return [3 /*break*/, 42];
|
|
5708
|
+
case 20:
|
|
5709
|
+
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
5710
|
+
return [3 /*break*/, 42];
|
|
5711
|
+
case 21: return [3 /*break*/, 42];
|
|
5712
|
+
case 22: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
5807
5713
|
case 23:
|
|
5808
5714
|
_j.sent();
|
|
5809
|
-
return [3 /*break*/,
|
|
5810
|
-
case 24: return [4 /*yield*/, this.
|
|
5715
|
+
return [3 /*break*/, 42];
|
|
5716
|
+
case 24: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
5811
5717
|
case 25:
|
|
5812
5718
|
_j.sent();
|
|
5813
|
-
return [3 /*break*/,
|
|
5814
|
-
case 26: return [4 /*yield*/, this.
|
|
5719
|
+
return [3 /*break*/, 42];
|
|
5720
|
+
case 26: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
5815
5721
|
case 27:
|
|
5816
5722
|
_j.sent();
|
|
5817
|
-
return [3 /*break*/,
|
|
5818
|
-
case 28: return [4 /*yield*/, this.
|
|
5723
|
+
return [3 /*break*/, 42];
|
|
5724
|
+
case 28: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
5819
5725
|
case 29:
|
|
5820
5726
|
_j.sent();
|
|
5821
|
-
return [3 /*break*/,
|
|
5822
|
-
case 30:
|
|
5823
|
-
this.showPreview(action.props);
|
|
5824
|
-
return [3 /*break*/, 40];
|
|
5727
|
+
return [3 /*break*/, 42];
|
|
5728
|
+
case 30: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
5825
5729
|
case 31:
|
|
5826
|
-
|
|
5827
|
-
return [3 /*break*/,
|
|
5730
|
+
_j.sent();
|
|
5731
|
+
return [3 /*break*/, 42];
|
|
5828
5732
|
case 32:
|
|
5829
|
-
this.
|
|
5830
|
-
return [3 /*break*/,
|
|
5733
|
+
this.showPreview(action.props);
|
|
5734
|
+
return [3 /*break*/, 42];
|
|
5831
5735
|
case 33:
|
|
5832
|
-
this.
|
|
5833
|
-
return [3 /*break*/,
|
|
5736
|
+
this.showPopupForm(action.props.popupFormKey, (_b = (_a = action.props) === null || _a === void 0 ? void 0 : _a.popupType) !== null && _b !== void 0 ? _b : "DIALOG");
|
|
5737
|
+
return [3 /*break*/, 42];
|
|
5834
5738
|
case 34:
|
|
5835
|
-
this.
|
|
5836
|
-
return [3 /*break*/,
|
|
5739
|
+
this.waitingForChanges = false;
|
|
5740
|
+
return [3 /*break*/, 42];
|
|
5837
5741
|
case 35:
|
|
5838
|
-
this.
|
|
5839
|
-
return [3 /*break*/,
|
|
5742
|
+
this.toggleErrorNotification(true);
|
|
5743
|
+
return [3 /*break*/, 42];
|
|
5840
5744
|
case 36:
|
|
5841
|
-
this.
|
|
5842
|
-
return [3 /*break*/,
|
|
5745
|
+
this.toggleErrorNotification(false);
|
|
5746
|
+
return [3 /*break*/, 42];
|
|
5843
5747
|
case 37:
|
|
5748
|
+
this.stopTaskExecution = false;
|
|
5749
|
+
return [3 /*break*/, 42];
|
|
5750
|
+
case 38:
|
|
5751
|
+
this.stopTaskExecution = true;
|
|
5752
|
+
return [3 /*break*/, 42];
|
|
5753
|
+
case 39:
|
|
5844
5754
|
this.dialogShow({
|
|
5845
|
-
html: (
|
|
5846
|
-
label: (
|
|
5847
|
-
size: (
|
|
5848
|
-
button: (
|
|
5755
|
+
html: (_c = action.props) === null || _c === void 0 ? void 0 : _c.html,
|
|
5756
|
+
label: (_d = action.props) === null || _d === void 0 ? void 0 : _d.label,
|
|
5757
|
+
size: (_e = action.props) === null || _e === void 0 ? void 0 : _e.size,
|
|
5758
|
+
button: (_f = action.props) === null || _f === void 0 ? void 0 : _f.button
|
|
5849
5759
|
});
|
|
5850
|
-
return [3 /*break*/,
|
|
5851
|
-
case
|
|
5760
|
+
return [3 /*break*/, 42];
|
|
5761
|
+
case 40:
|
|
5852
5762
|
this.dialogHide();
|
|
5853
|
-
return [3 /*break*/,
|
|
5854
|
-
case
|
|
5855
|
-
case
|
|
5763
|
+
return [3 /*break*/, 42];
|
|
5764
|
+
case 41: return [3 /*break*/, 42];
|
|
5765
|
+
case 42: return [2 /*return*/];
|
|
5856
5766
|
}
|
|
5857
5767
|
});
|
|
5858
5768
|
});
|
|
5859
5769
|
};
|
|
5770
|
+
/**
|
|
5771
|
+
* Miscellaneous Methods for Debugging
|
|
5772
|
+
*/
|
|
5773
|
+
KwikIDFormViewComponent.prototype.logVariables = function (message) {
|
|
5774
|
+
var obj = [];
|
|
5775
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
5776
|
+
obj[_i - 1] = arguments[_i];
|
|
5777
|
+
}
|
|
5778
|
+
console.log(message !== null && message !== void 0 ? message : "");
|
|
5779
|
+
console.log(JSON.parse(JSON.stringify(obj !== null && obj !== void 0 ? obj : { EMPTY: true })));
|
|
5780
|
+
console.log(JSON.parse(JSON.stringify({
|
|
5781
|
+
formConfig: this.formConfig,
|
|
5782
|
+
formData: this.formData,
|
|
5783
|
+
allFormsData: this.allFormsData,
|
|
5784
|
+
popupFormCallback: this.popupFormCallback,
|
|
5785
|
+
fieldGroups: this.fieldGroups,
|
|
5786
|
+
formFields: this.formFields,
|
|
5787
|
+
previousFormData: this.previousFormData,
|
|
5788
|
+
previewProperties: this.previewProperties,
|
|
5789
|
+
loading: this.loading,
|
|
5790
|
+
backButton: this.backButton,
|
|
5791
|
+
viewFormsButton: this.viewFormsButton,
|
|
5792
|
+
saveFormButton: this.saveFormButton,
|
|
5793
|
+
stopTaskExecution: this.stopTaskExecution,
|
|
5794
|
+
waitingForChanges: this.waitingForChanges,
|
|
5795
|
+
popupFormConfig: this.popupFormConfig,
|
|
5796
|
+
popupFormData: this.popupFormData,
|
|
5797
|
+
taskData: this.taskData
|
|
5798
|
+
})));
|
|
5799
|
+
};
|
|
5860
5800
|
return KwikIDFormViewComponent;
|
|
5861
5801
|
}());
|
|
5862
5802
|
/** @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: i4$1.TuiPushService }, { token: i3$1.TuiAlertService }, { token: i5.TuiPreviewDialogService }, { token: i3$1.TuiDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5863
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm" }, providers: [KwikIDFormViewService], viewQueries: [{ 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?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button-icon\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n id=\"\"\n [showLoader]=\"backButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"submit\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n size=\"m\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button-icon>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of\n {{ formConfig.formsListLength }}</div\n >\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden &&\n !formConfig.properties?.header.steps.hidden &&\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [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 id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | safeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\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 <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\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 [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 <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\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 [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 id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox-block\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 (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox-block>\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 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 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 [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n 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 [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\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 id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-radio-list\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-radio-list>\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=\"'dropdown-with-search'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-select-combobox\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 [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-select-combobox>\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 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 [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-call'\">\n <div\n [hidden]=\"field?.hidden\"\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 shape=\"null\"\n size=\"m\"\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 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 [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\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 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 [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=\"'preview-image'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-preview-image\n [altText]=\"field?.properties?.altText\"\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 [class]=\"field?.properties?.class\"\n ></kwikui-preview-image>\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 class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.viewFormsButton.label }}\"\n [showLoader]=\"viewFormsButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\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 id=\"\"\n label=\"{{ formConfig.properties.footer.saveButton.label }}\"\n [showLoader]=\"saveFormButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\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 class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n</div>\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 [innerHtml]=\"previewProperties.html.before | safeHtml\"\n ></div>\n\n <iframe\n *ngIf=\"previewProperties.iframe.src !== ''\"\n [src]=\"previewProperties.iframe.src | safeUrl\"\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 ></iframe>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n [innerHtml]=\"previewProperties.html.after | safeHtml\"\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", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.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;grid-row-gap:1rem;row-gap:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:10px;column-gap:10px}.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;grid-row-gap:.5rem;row-gap:.5rem;padding:1rem}#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;grid-gap:.25rem;gap:.25rem;width:100%}#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;grid-row-gap:.5rem;grid-row-gap:.25rem;row-gap:.25rem}#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:1em}.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;grid-gap:.5rem;gap:.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;grid-row-gap:1rem;row-gap:1rem;padding: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!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;grid-gap:1.4rem;gap:1.4rem;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}\n"], components: [{ type: i1__namespace.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minCalculatedFromToday", "max", "maxCalculatedFromToday", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1__namespace.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "size", "min", "max", "steps", "quantum", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIPreviewImageComponent, selector: "kwikui-preview-image", inputs: ["id", "imageSrc", "altText", "imageType", "styles", "class", "loadingType", "html"], outputs: ["onClick"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }, { type: i5__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "safeHtml": SafeHtmlPipe$1, "safeUrl": SafeUrlPipe } });
|
|
5803
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm" }, providers: [KwikIDFormViewService], viewQueries: [{ 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?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button-icon\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n id=\"\"\n [showLoader]=\"backButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"submit\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n size=\"m\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button-icon>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of\n {{ formConfig.formsListLength }}</div\n >\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [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 id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | safeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\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 <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\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 [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 <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\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 [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 id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox-block\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 (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox-block>\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 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 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 [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n 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 [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\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 id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-radio-list\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-radio-list>\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=\"'dropdown-with-search'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-select-combobox\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 [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-select-combobox>\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 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 [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-call'\">\n <div\n [hidden]=\"field?.hidden\"\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 shape=\"null\"\n size=\"m\"\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 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 [size]=\"field?.properties?.size\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\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 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 [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=\"'preview-image'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-preview-image\n [altText]=\"field?.properties?.altText\"\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 [class]=\"field?.properties?.class\"\n ></kwikui-preview-image>\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 class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.viewFormsButton.label }}\"\n [showLoader]=\"viewFormsButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\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 id=\"\"\n label=\"{{ formConfig.properties.footer.saveButton.label }}\"\n [showLoader]=\"saveFormButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\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 class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n</div>\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 [innerHtml]=\"previewProperties.html.before | safeHtml\"\n ></div>\n\n <iframe\n *ngIf=\"previewProperties.iframe.src !== ''\"\n [src]=\"previewProperties.iframe.src | safeUrl\"\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 ></iframe>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n [innerHtml]=\"previewProperties.html.after | safeHtml\"\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", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.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;grid-row-gap:1rem;row-gap:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:10px;column-gap:10px}.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;grid-row-gap:1rem;row-gap:1rem;padding:1rem}#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;grid-gap:.25rem;gap:.25rem;width:100%}#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;grid-row-gap:.5rem;grid-row-gap:.25rem;row-gap:.25rem}#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:1em}.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;grid-gap:.5rem;gap:.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;grid-row-gap:1rem;row-gap:1rem;padding: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!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;grid-gap:1.4rem;gap:1.4rem;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}\n"], components: [{ type: i1__namespace.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minCalculatedFromToday", "max", "maxCalculatedFromToday", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1__namespace.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "size", "min", "max", "steps", "quantum", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "size", "prefix", "postfix", "mode", "otpLength", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIPreviewImageComponent, selector: "kwikui-preview-image", inputs: ["id", "imageSrc", "altText", "imageType", "styles", "class", "loadingType", "html"], outputs: ["onClick"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }, { type: i5__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "safeHtml": SafeHtmlPipe$1, "safeUrl": SafeUrlPipe } });
|
|
5864
5804
|
__decorate([
|
|
5865
5805
|
kwikidToolkit.logMethod
|
|
5866
5806
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -6318,10 +6258,11 @@
|
|
|
6318
6258
|
};
|
|
6319
6259
|
|
|
6320
6260
|
var KwikIDFormsRendererComponent = /** @class */ (function () {
|
|
6321
|
-
function KwikIDFormsRendererComponent(hostElement, cdr, previewDialogService) {
|
|
6261
|
+
function KwikIDFormsRendererComponent(hostElement, cdr, previewDialogService, dialogs) {
|
|
6322
6262
|
this.hostElement = hostElement;
|
|
6323
6263
|
this.cdr = cdr;
|
|
6324
6264
|
this.previewDialogService = previewDialogService;
|
|
6265
|
+
this.dialogs = dialogs;
|
|
6325
6266
|
this.formsData = {};
|
|
6326
6267
|
this.activeFormData = {};
|
|
6327
6268
|
this.apiCallResponse = {};
|
|
@@ -6332,7 +6273,7 @@
|
|
|
6332
6273
|
this.loader = false;
|
|
6333
6274
|
this.showErrorNotification = false;
|
|
6334
6275
|
this.activePopupFormData = {};
|
|
6335
|
-
this.popupFormCallback =
|
|
6276
|
+
this.popupFormCallback = {};
|
|
6336
6277
|
this.allFormsData = {};
|
|
6337
6278
|
this.allFormsSubmitted = false;
|
|
6338
6279
|
this.formsList = [];
|
|
@@ -6350,7 +6291,7 @@
|
|
|
6350
6291
|
title: "",
|
|
6351
6292
|
unavailable: false
|
|
6352
6293
|
};
|
|
6353
|
-
this.popupFormConfig =
|
|
6294
|
+
this.popupFormConfig = {};
|
|
6354
6295
|
// display forms and list conditionally
|
|
6355
6296
|
this.showForm = false;
|
|
6356
6297
|
this.showFormFields = true;
|
|
@@ -6422,14 +6363,14 @@
|
|
|
6422
6363
|
KwikIDFormsRendererComponent.prototype.fetchFormConfig = function (url) {
|
|
6423
6364
|
return __awaiter(this, void 0, void 0, function () {
|
|
6424
6365
|
var response, data;
|
|
6425
|
-
return __generator(this, function (
|
|
6426
|
-
switch (
|
|
6366
|
+
return __generator(this, function (_e) {
|
|
6367
|
+
switch (_e.label) {
|
|
6427
6368
|
case 0: return [4 /*yield*/, fetch(url, { method: "GET" })];
|
|
6428
6369
|
case 1:
|
|
6429
|
-
response =
|
|
6370
|
+
response = _e.sent();
|
|
6430
6371
|
return [4 /*yield*/, response.json()];
|
|
6431
6372
|
case 2:
|
|
6432
|
-
data =
|
|
6373
|
+
data = _e.sent();
|
|
6433
6374
|
return [2 /*return*/, data];
|
|
6434
6375
|
}
|
|
6435
6376
|
});
|
|
@@ -6437,14 +6378,14 @@
|
|
|
6437
6378
|
};
|
|
6438
6379
|
KwikIDFormsRendererComponent.prototype.initializeForms = function (eventType) {
|
|
6439
6380
|
return __awaiter(this, void 0, void 0, function () {
|
|
6440
|
-
return __generator(this, function (
|
|
6441
|
-
switch (
|
|
6381
|
+
return __generator(this, function (_e) {
|
|
6382
|
+
switch (_e.label) {
|
|
6442
6383
|
case 0:
|
|
6443
6384
|
this.loader = true;
|
|
6444
6385
|
this.allFormsData = this.formsData;
|
|
6445
6386
|
return [4 /*yield*/, this.updateFormsList()];
|
|
6446
6387
|
case 1:
|
|
6447
|
-
|
|
6388
|
+
_e.sent();
|
|
6448
6389
|
if (!(eventType === "ON_CHANGE" &&
|
|
6449
6390
|
this.findFormsListLength(this.formsList) === 1)) return [3 /*break*/, 2];
|
|
6450
6391
|
this.handleOnClickSubmitForms(null);
|
|
@@ -6456,22 +6397,22 @@
|
|
|
6456
6397
|
if (!(this.activeFormConfig.type === "form")) return [3 /*break*/, 4];
|
|
6457
6398
|
return [4 /*yield*/, this.handleOnClickSetActiveForm(this.activeFormConfig.key)];
|
|
6458
6399
|
case 3:
|
|
6459
|
-
|
|
6460
|
-
|
|
6400
|
+
_e.sent();
|
|
6401
|
+
_e.label = 4;
|
|
6461
6402
|
case 4: return [3 /*break*/, 7];
|
|
6462
6403
|
case 5: return [4 /*yield*/, this.handleOnClickSetActiveForm(this.activeFormConfig.key)];
|
|
6463
6404
|
case 6:
|
|
6464
|
-
|
|
6465
|
-
|
|
6405
|
+
_e.sent();
|
|
6406
|
+
_e.label = 7;
|
|
6466
6407
|
case 7: return [3 /*break*/, 9];
|
|
6467
6408
|
case 8:
|
|
6468
6409
|
this.showForm = false;
|
|
6469
6410
|
this.showFormFields = false;
|
|
6470
|
-
|
|
6411
|
+
_e.label = 9;
|
|
6471
6412
|
case 9:
|
|
6472
6413
|
this.loader = false;
|
|
6473
6414
|
this.loading = false;
|
|
6474
|
-
|
|
6415
|
+
_e.label = 10;
|
|
6475
6416
|
case 10: return [2 /*return*/];
|
|
6476
6417
|
}
|
|
6477
6418
|
});
|
|
@@ -6483,8 +6424,14 @@
|
|
|
6483
6424
|
form.type = "form";
|
|
6484
6425
|
}
|
|
6485
6426
|
if (kwikidToolkit.checkObjectKeyExists(form, "formContent")) {
|
|
6486
|
-
|
|
6487
|
-
|
|
6427
|
+
if (kwikidToolkit.checkObjectKeyExists(form.formContent, "url")) {
|
|
6428
|
+
form = kwikidToolkit.setValueToObjectPath(form, "props.url", form.formContent.url);
|
|
6429
|
+
delete form["formContent"]["url"];
|
|
6430
|
+
}
|
|
6431
|
+
if (kwikidToolkit.checkObjectKeyExists(form.formContent, "path")) {
|
|
6432
|
+
form = kwikidToolkit.setValueToObjectPath(form, "props.path", form.formContent.path);
|
|
6433
|
+
delete form["formContent"]["path"];
|
|
6434
|
+
}
|
|
6488
6435
|
}
|
|
6489
6436
|
if (kwikidToolkit.isEmptyValue(form.formContent)) {
|
|
6490
6437
|
delete form["formContent"];
|
|
@@ -6493,6 +6440,18 @@
|
|
|
6493
6440
|
form = kwikidToolkit.setValueToObjectPath(form, "props.title", form.title);
|
|
6494
6441
|
delete form["title"];
|
|
6495
6442
|
}
|
|
6443
|
+
if (!kwikidToolkit.checkObjectKeyExists(form, "hidden")) {
|
|
6444
|
+
form.hidden = false;
|
|
6445
|
+
}
|
|
6446
|
+
if (!kwikidToolkit.checkObjectKeyExists(form, "disabled")) {
|
|
6447
|
+
form.disabled = false;
|
|
6448
|
+
}
|
|
6449
|
+
if (!kwikidToolkit.checkObjectKeyExists(form, "required")) {
|
|
6450
|
+
form.required = true;
|
|
6451
|
+
}
|
|
6452
|
+
if (!kwikidToolkit.checkObjectKeyExists(form, "dependentOn")) {
|
|
6453
|
+
form.dependentOn = [];
|
|
6454
|
+
}
|
|
6496
6455
|
return form;
|
|
6497
6456
|
});
|
|
6498
6457
|
};
|
|
@@ -6504,7 +6463,7 @@
|
|
|
6504
6463
|
* @returns any[]
|
|
6505
6464
|
*/
|
|
6506
6465
|
KwikIDFormsRendererComponent.prototype.assignSequenceNoToForm = function (formsList) {
|
|
6507
|
-
var e_1,
|
|
6466
|
+
var e_1, _e;
|
|
6508
6467
|
var sequenceNo = 1;
|
|
6509
6468
|
try {
|
|
6510
6469
|
for (var formsList_1 = __values(formsList), formsList_1_1 = formsList_1.next(); !formsList_1_1.done; formsList_1_1 = formsList_1.next()) {
|
|
@@ -6522,7 +6481,7 @@
|
|
|
6522
6481
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
6523
6482
|
finally {
|
|
6524
6483
|
try {
|
|
6525
|
-
if (formsList_1_1 && !formsList_1_1.done && (
|
|
6484
|
+
if (formsList_1_1 && !formsList_1_1.done && (_e = formsList_1.return)) _e.call(formsList_1);
|
|
6526
6485
|
}
|
|
6527
6486
|
finally { if (e_1) throw e_1.error; }
|
|
6528
6487
|
}
|
|
@@ -6542,7 +6501,7 @@
|
|
|
6542
6501
|
* @returns any[]
|
|
6543
6502
|
*/
|
|
6544
6503
|
KwikIDFormsRendererComponent.prototype.markFormInFormsListAsCompleted = function (formsList, formsListCompleted) {
|
|
6545
|
-
var e_2,
|
|
6504
|
+
var e_2, _e;
|
|
6546
6505
|
try {
|
|
6547
6506
|
for (var formsList_2 = __values(formsList), formsList_2_1 = formsList_2.next(); !formsList_2_1.done; formsList_2_1 = formsList_2.next()) {
|
|
6548
6507
|
var form = formsList_2_1.value;
|
|
@@ -6559,7 +6518,7 @@
|
|
|
6559
6518
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
6560
6519
|
finally {
|
|
6561
6520
|
try {
|
|
6562
|
-
if (formsList_2_1 && !formsList_2_1.done && (
|
|
6521
|
+
if (formsList_2_1 && !formsList_2_1.done && (_e = formsList_2.return)) _e.call(formsList_2);
|
|
6563
6522
|
}
|
|
6564
6523
|
finally { if (e_2) throw e_2.error; }
|
|
6565
6524
|
}
|
|
@@ -6572,7 +6531,7 @@
|
|
|
6572
6531
|
* @returns any[]
|
|
6573
6532
|
*/
|
|
6574
6533
|
KwikIDFormsRendererComponent.prototype.markFormInFormsListAsDisabled = function (formsList, formsListCompleted) {
|
|
6575
|
-
var e_3,
|
|
6534
|
+
var e_3, _e;
|
|
6576
6535
|
try {
|
|
6577
6536
|
for (var formsList_3 = __values(formsList), formsList_3_1 = formsList_3.next(); !formsList_3_1.done; formsList_3_1 = formsList_3.next()) {
|
|
6578
6537
|
var form = formsList_3_1.value;
|
|
@@ -6603,14 +6562,14 @@
|
|
|
6603
6562
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
6604
6563
|
finally {
|
|
6605
6564
|
try {
|
|
6606
|
-
if (formsList_3_1 && !formsList_3_1.done && (
|
|
6565
|
+
if (formsList_3_1 && !formsList_3_1.done && (_e = formsList_3.return)) _e.call(formsList_3);
|
|
6607
6566
|
}
|
|
6608
6567
|
finally { if (e_3) throw e_3.error; }
|
|
6609
6568
|
}
|
|
6610
6569
|
return formsList;
|
|
6611
6570
|
};
|
|
6612
6571
|
KwikIDFormsRendererComponent.prototype.filterAllFormsData = function (allFormsData, formsList) {
|
|
6613
|
-
var e_4,
|
|
6572
|
+
var e_4, _e, _f;
|
|
6614
6573
|
var currentUserFormAllFormsData = {};
|
|
6615
6574
|
try {
|
|
6616
6575
|
for (var formsList_4 = __values(formsList), formsList_4_1 = formsList_4.next(); !formsList_4_1.done; formsList_4_1 = formsList_4.next()) {
|
|
@@ -6619,7 +6578,7 @@
|
|
|
6619
6578
|
!form.hidden &&
|
|
6620
6579
|
form.type === "form") {
|
|
6621
6580
|
if (kwikidToolkit.checkObjectKeyExists(allFormsData, form.key)) {
|
|
6622
|
-
currentUserFormAllFormsData = Object.assign(Object.assign({}, currentUserFormAllFormsData), (
|
|
6581
|
+
currentUserFormAllFormsData = Object.assign(Object.assign({}, currentUserFormAllFormsData), (_f = {}, _f[form.key] = allFormsData[form.key], _f));
|
|
6623
6582
|
}
|
|
6624
6583
|
}
|
|
6625
6584
|
}
|
|
@@ -6627,14 +6586,14 @@
|
|
|
6627
6586
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
6628
6587
|
finally {
|
|
6629
6588
|
try {
|
|
6630
|
-
if (formsList_4_1 && !formsList_4_1.done && (
|
|
6589
|
+
if (formsList_4_1 && !formsList_4_1.done && (_e = formsList_4.return)) _e.call(formsList_4);
|
|
6631
6590
|
}
|
|
6632
6591
|
finally { if (e_4) throw e_4.error; }
|
|
6633
6592
|
}
|
|
6634
6593
|
return currentUserFormAllFormsData;
|
|
6635
6594
|
};
|
|
6636
6595
|
KwikIDFormsRendererComponent.prototype.checkIfFormsStatusCompleted = function (formsList, formsListCompleted) {
|
|
6637
|
-
var e_5,
|
|
6596
|
+
var e_5, _e;
|
|
6638
6597
|
var allFormsCompleted = true;
|
|
6639
6598
|
try {
|
|
6640
6599
|
for (var formsList_5 = __values(formsList), formsList_5_1 = formsList_5.next(); !formsList_5_1.done; formsList_5_1 = formsList_5.next()) {
|
|
@@ -6652,7 +6611,7 @@
|
|
|
6652
6611
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
6653
6612
|
finally {
|
|
6654
6613
|
try {
|
|
6655
|
-
if (formsList_5_1 && !formsList_5_1.done && (
|
|
6614
|
+
if (formsList_5_1 && !formsList_5_1.done && (_e = formsList_5.return)) _e.call(formsList_5);
|
|
6656
6615
|
}
|
|
6657
6616
|
finally { if (e_5) throw e_5.error; }
|
|
6658
6617
|
}
|
|
@@ -6670,20 +6629,20 @@
|
|
|
6670
6629
|
};
|
|
6671
6630
|
KwikIDFormsRendererComponent.prototype.updateFormsList = function () {
|
|
6672
6631
|
return __awaiter(this, void 0, void 0, function () {
|
|
6673
|
-
var
|
|
6674
|
-
var e_7,
|
|
6675
|
-
return __generator(this, function (
|
|
6676
|
-
switch (
|
|
6632
|
+
var _e, _f, form, triggers, rules, actions, rulesMapping, actions_1, actions_1_1, action, conditionEvaluation, actions_2, e_6_1, e_7_1, currentUserFormAllFormsData;
|
|
6633
|
+
var e_7, _g, e_6, _h;
|
|
6634
|
+
return __generator(this, function (_j) {
|
|
6635
|
+
switch (_j.label) {
|
|
6677
6636
|
case 0:
|
|
6678
6637
|
this.formsList = this.convertFormListConfig(this.formsList);
|
|
6679
|
-
|
|
6638
|
+
_j.label = 1;
|
|
6680
6639
|
case 1:
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6640
|
+
_j.trys.push([1, 14, 15, 16]);
|
|
6641
|
+
_e = __values(this.formsList), _f = _e.next();
|
|
6642
|
+
_j.label = 2;
|
|
6684
6643
|
case 2:
|
|
6685
|
-
if (!!
|
|
6686
|
-
form =
|
|
6644
|
+
if (!!_f.done) return [3 /*break*/, 13];
|
|
6645
|
+
form = _f.value;
|
|
6687
6646
|
if (!(kwikidToolkit.checkObjectKeyExists(form, "default") &&
|
|
6688
6647
|
kwikidToolkit.isNotEmptyValue(form.default))) return [3 /*break*/, 11];
|
|
6689
6648
|
triggers = form.default.triggers;
|
|
@@ -6694,11 +6653,11 @@
|
|
|
6694
6653
|
FORMS_LIST: this.formsList,
|
|
6695
6654
|
ALL_FORMS_DATA: this.allFormsData
|
|
6696
6655
|
}).mapping();
|
|
6697
|
-
|
|
6656
|
+
_j.label = 3;
|
|
6698
6657
|
case 3:
|
|
6699
|
-
|
|
6658
|
+
_j.trys.push([3, 8, 9, 10]);
|
|
6700
6659
|
actions_1 = (e_6 = void 0, __values(actions)), actions_1_1 = actions_1.next();
|
|
6701
|
-
|
|
6660
|
+
_j.label = 4;
|
|
6702
6661
|
case 4:
|
|
6703
6662
|
if (!!actions_1_1.done) return [3 /*break*/, 7];
|
|
6704
6663
|
action = actions_1_1.value;
|
|
@@ -6710,19 +6669,19 @@
|
|
|
6710
6669
|
}, this.takeAction.bind(this));
|
|
6711
6670
|
return [4 /*yield*/, actions_2.execute()];
|
|
6712
6671
|
case 5:
|
|
6713
|
-
|
|
6714
|
-
|
|
6672
|
+
_j.sent();
|
|
6673
|
+
_j.label = 6;
|
|
6715
6674
|
case 6:
|
|
6716
6675
|
actions_1_1 = actions_1.next();
|
|
6717
6676
|
return [3 /*break*/, 4];
|
|
6718
6677
|
case 7: return [3 /*break*/, 10];
|
|
6719
6678
|
case 8:
|
|
6720
|
-
e_6_1 =
|
|
6679
|
+
e_6_1 = _j.sent();
|
|
6721
6680
|
e_6 = { error: e_6_1 };
|
|
6722
6681
|
return [3 /*break*/, 10];
|
|
6723
6682
|
case 9:
|
|
6724
6683
|
try {
|
|
6725
|
-
if (actions_1_1 && !actions_1_1.done && (
|
|
6684
|
+
if (actions_1_1 && !actions_1_1.done && (_h = actions_1.return)) _h.call(actions_1);
|
|
6726
6685
|
}
|
|
6727
6686
|
finally { if (e_6) throw e_6.error; }
|
|
6728
6687
|
return [7 /*endfinally*/];
|
|
@@ -6731,18 +6690,18 @@
|
|
|
6731
6690
|
if (!kwikidToolkit.checkObjectKeyExists(form, "hidden")) {
|
|
6732
6691
|
form.hidden = false;
|
|
6733
6692
|
}
|
|
6734
|
-
|
|
6693
|
+
_j.label = 12;
|
|
6735
6694
|
case 12:
|
|
6736
|
-
|
|
6695
|
+
_f = _e.next();
|
|
6737
6696
|
return [3 /*break*/, 2];
|
|
6738
6697
|
case 13: return [3 /*break*/, 16];
|
|
6739
6698
|
case 14:
|
|
6740
|
-
e_7_1 =
|
|
6699
|
+
e_7_1 = _j.sent();
|
|
6741
6700
|
e_7 = { error: e_7_1 };
|
|
6742
6701
|
return [3 /*break*/, 16];
|
|
6743
6702
|
case 15:
|
|
6744
6703
|
try {
|
|
6745
|
-
if (
|
|
6704
|
+
if (_f && !_f.done && (_g = _e.return)) _g.call(_e);
|
|
6746
6705
|
}
|
|
6747
6706
|
finally { if (e_7) throw e_7.error; }
|
|
6748
6707
|
return [7 /*endfinally*/];
|
|
@@ -6791,12 +6750,12 @@
|
|
|
6791
6750
|
};
|
|
6792
6751
|
KwikIDFormsRendererComponent.prototype.takeAction = function (action, object) {
|
|
6793
6752
|
return __awaiter(this, void 0, void 0, function () {
|
|
6794
|
-
var
|
|
6795
|
-
return __generator(this, function (
|
|
6796
|
-
switch (
|
|
6753
|
+
var _e, sources, sourceValue;
|
|
6754
|
+
return __generator(this, function (_f) {
|
|
6755
|
+
switch (_f.label) {
|
|
6797
6756
|
case 0:
|
|
6798
|
-
|
|
6799
|
-
switch (
|
|
6757
|
+
_e = action.key;
|
|
6758
|
+
switch (_e) {
|
|
6800
6759
|
case ERendererActionKey.FORM_HIDE: return [3 /*break*/, 1];
|
|
6801
6760
|
case ERendererActionKey.FORM_SHOW: return [3 /*break*/, 2];
|
|
6802
6761
|
case EActionKey.SET_VALUE: return [3 /*break*/, 3];
|
|
@@ -6815,7 +6774,7 @@
|
|
|
6815
6774
|
});
|
|
6816
6775
|
return [4 /*yield*/, sources.getValueFromSource(action.props.value.source)];
|
|
6817
6776
|
case 4:
|
|
6818
|
-
sourceValue =
|
|
6777
|
+
sourceValue = _f.sent();
|
|
6819
6778
|
sources.setValueToSource(action.props.value.destination, sourceValue);
|
|
6820
6779
|
this.userConfig = sources.object.USER_CONFIG;
|
|
6821
6780
|
this.formsData = sources.object.ALL_FORMS_DATA;
|
|
@@ -6853,10 +6812,11 @@
|
|
|
6853
6812
|
* @param selectedForm string
|
|
6854
6813
|
*/
|
|
6855
6814
|
KwikIDFormsRendererComponent.prototype.handleOnClickSetActiveForm = function (selectedForm) {
|
|
6815
|
+
var _a, _b, _c, _d;
|
|
6856
6816
|
return __awaiter(this, void 0, void 0, function () {
|
|
6857
|
-
var activeFormConfig, formConfig, formConfigFromUrl, formConfigFromUrl;
|
|
6858
|
-
return __generator(this, function (
|
|
6859
|
-
switch (
|
|
6817
|
+
var activeFormConfig, formConfig, formConfigFromUrl, url, formConfigFromPath, formConfigFromUrl, url, formConfigFromPath;
|
|
6818
|
+
return __generator(this, function (_e) {
|
|
6819
|
+
switch (_e.label) {
|
|
6860
6820
|
case 0:
|
|
6861
6821
|
this.showForm = false;
|
|
6862
6822
|
this.loader = true;
|
|
@@ -6866,38 +6826,58 @@
|
|
|
6866
6826
|
}
|
|
6867
6827
|
});
|
|
6868
6828
|
formConfig = undefined;
|
|
6869
|
-
if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig, "props")) return [3 /*break*/,
|
|
6829
|
+
if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig, "props")) return [3 /*break*/, 6];
|
|
6870
6830
|
if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig.props, "url")) return [3 /*break*/, 2];
|
|
6871
6831
|
return [4 /*yield*/, this.fetchFormConfig(activeFormConfig.props.url)];
|
|
6872
6832
|
case 1:
|
|
6873
|
-
formConfigFromUrl =
|
|
6833
|
+
formConfigFromUrl = _e.sent();
|
|
6874
6834
|
formConfig = Object.assign(Object.assign({}, activeFormConfig), formConfigFromUrl);
|
|
6875
|
-
return [3 /*break*/,
|
|
6835
|
+
return [3 /*break*/, 5];
|
|
6876
6836
|
case 2:
|
|
6837
|
+
if (!(kwikidToolkit.checkObjectKeyExists(activeFormConfig.props, "path") &&
|
|
6838
|
+
kwikidToolkit.checkObjectKeyExists(this.userConfig, "backend") &&
|
|
6839
|
+
kwikidToolkit.checkObjectKeyExists(this.userConfig.backend, "CONFIG_BASE_URL"))) return [3 /*break*/, 4];
|
|
6840
|
+
url = "" + ((_b = (_a = this.userConfig) === null || _a === void 0 ? void 0 : _a.backend) === null || _b === void 0 ? void 0 : _b.CONFIG_BASE_URL) + activeFormConfig.props.path;
|
|
6841
|
+
return [4 /*yield*/, this.fetchFormConfig(url)];
|
|
6842
|
+
case 3:
|
|
6843
|
+
formConfigFromPath = _e.sent();
|
|
6844
|
+
formConfig = Object.assign(Object.assign({}, activeFormConfig), formConfigFromPath);
|
|
6845
|
+
return [3 /*break*/, 5];
|
|
6846
|
+
case 4:
|
|
6877
6847
|
if (kwikidToolkit.checkObjectKeyExists(activeFormConfig, "fields")) {
|
|
6878
6848
|
formConfig = activeFormConfig;
|
|
6879
6849
|
}
|
|
6880
6850
|
else {
|
|
6881
|
-
console.error("No
|
|
6851
|
+
console.error("No Direct URL, No Path with Base URL, No fields key found in Active Form's Config!");
|
|
6882
6852
|
}
|
|
6883
|
-
|
|
6884
|
-
case
|
|
6885
|
-
case
|
|
6886
|
-
if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig.formContent, "url")) return [3 /*break*/,
|
|
6853
|
+
_e.label = 5;
|
|
6854
|
+
case 5: return [3 /*break*/, 11];
|
|
6855
|
+
case 6:
|
|
6856
|
+
if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig.formContent, "url")) return [3 /*break*/, 8];
|
|
6887
6857
|
return [4 /*yield*/, this.fetchFormConfig(activeFormConfig.formContent.url)];
|
|
6888
|
-
case
|
|
6889
|
-
formConfigFromUrl =
|
|
6858
|
+
case 7:
|
|
6859
|
+
formConfigFromUrl = _e.sent();
|
|
6890
6860
|
formConfig = Object.assign(Object.assign({}, activeFormConfig), formConfigFromUrl);
|
|
6891
|
-
return [3 /*break*/,
|
|
6892
|
-
case
|
|
6861
|
+
return [3 /*break*/, 11];
|
|
6862
|
+
case 8:
|
|
6863
|
+
if (!(kwikidToolkit.checkObjectKeyExists(activeFormConfig.formContent, "path") &&
|
|
6864
|
+
kwikidToolkit.checkObjectKeyExists(this.userConfig, "backend") &&
|
|
6865
|
+
kwikidToolkit.checkObjectKeyExists(this.userConfig.backend, "CONFIG_BASE_URL"))) return [3 /*break*/, 10];
|
|
6866
|
+
url = "" + ((_d = (_c = this.userConfig) === null || _c === void 0 ? void 0 : _c.backend) === null || _d === void 0 ? void 0 : _d.CONFIG_BASE_URL) + activeFormConfig.props.path;
|
|
6867
|
+
return [4 /*yield*/, this.fetchFormConfig(url)];
|
|
6868
|
+
case 9:
|
|
6869
|
+
formConfigFromPath = _e.sent();
|
|
6870
|
+
formConfig = Object.assign(Object.assign({}, activeFormConfig), formConfigFromPath);
|
|
6871
|
+
return [3 /*break*/, 11];
|
|
6872
|
+
case 10:
|
|
6893
6873
|
if (kwikidToolkit.checkObjectKeyExists(activeFormConfig, "fields")) {
|
|
6894
6874
|
formConfig = activeFormConfig;
|
|
6895
6875
|
}
|
|
6896
6876
|
else {
|
|
6897
|
-
console.error("No
|
|
6877
|
+
console.error("No Direct URL, No Path with Base URL, No fields key found in Active Form's Config!");
|
|
6898
6878
|
}
|
|
6899
|
-
|
|
6900
|
-
case
|
|
6879
|
+
_e.label = 11;
|
|
6880
|
+
case 11:
|
|
6901
6881
|
formConfig = new Converter().updateFormConfigMiscellaneous(formConfig, {
|
|
6902
6882
|
formsListLength: this.findFormsListLength(this.formsList)
|
|
6903
6883
|
});
|
|
@@ -6926,45 +6906,99 @@
|
|
|
6926
6906
|
this.loader = true;
|
|
6927
6907
|
this.onClickApiCall.emit(e);
|
|
6928
6908
|
};
|
|
6929
|
-
KwikIDFormsRendererComponent.prototype.handleOnActionShowPopupForm = function (e) {
|
|
6930
|
-
var
|
|
6909
|
+
KwikIDFormsRendererComponent.prototype.handleOnActionShowPopupForm = function (e, content) {
|
|
6910
|
+
var _e;
|
|
6931
6911
|
var _this = this;
|
|
6912
|
+
var _a;
|
|
6932
6913
|
if (kwikidToolkit.checkObjectKeyExists(e, "activeFormData") &&
|
|
6933
6914
|
kwikidToolkit.checkObjectKeyExists(e, "popupFormConfig")) {
|
|
6934
|
-
var popupFormData = (
|
|
6915
|
+
var popupFormData = (_e = {}, _e[this.activeFormConfig.key] = e.activeFormData, _e);
|
|
6935
6916
|
this.activePopupFormData = kwikidToolkit.mergeObjects(this.allFormsData, popupFormData);
|
|
6936
6917
|
this.popupFormConfig = e.popupFormConfig;
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6918
|
+
var popupType = (_a = e === null || e === void 0 ? void 0 : e.popupType) !== null && _a !== void 0 ? _a : "DIALOG";
|
|
6919
|
+
switch (popupType) {
|
|
6920
|
+
case "DIALOG":
|
|
6921
|
+
this.previewDialogRef = this.dialogs
|
|
6922
|
+
.open(content, {
|
|
6923
|
+
closeable: true,
|
|
6924
|
+
dismissible: false,
|
|
6925
|
+
size: "s",
|
|
6926
|
+
required: true
|
|
6927
|
+
})
|
|
6928
|
+
.subscribe({
|
|
6929
|
+
next: function (data) {
|
|
6930
|
+
_this.popupFormCallback = {
|
|
6931
|
+
popupFormData: data["data"],
|
|
6932
|
+
popupFormConfig: data["formConfig"],
|
|
6933
|
+
activeFormConfig: _this.activeFormConfig
|
|
6934
|
+
};
|
|
6935
|
+
_this.activePopupFormData = {};
|
|
6936
|
+
_this.popupFormConfig = {};
|
|
6937
|
+
_this.previewDialogRef.complete();
|
|
6938
|
+
},
|
|
6939
|
+
error: function () {
|
|
6940
|
+
_this.popupFormCallback = {
|
|
6941
|
+
popupFormData: {},
|
|
6942
|
+
popupFormConfig: _this.popupFormConfig,
|
|
6943
|
+
activeFormConfig: _this.activeFormConfig,
|
|
6944
|
+
stopTaskExecution: true
|
|
6945
|
+
};
|
|
6946
|
+
_this.activePopupFormData = {};
|
|
6947
|
+
_this.popupFormConfig = {};
|
|
6948
|
+
console.info("Dialog error");
|
|
6949
|
+
},
|
|
6950
|
+
complete: function () {
|
|
6951
|
+
console.info("Dialog closed");
|
|
6952
|
+
}
|
|
6953
|
+
});
|
|
6954
|
+
break;
|
|
6955
|
+
case "POPUP":
|
|
6956
|
+
this.previewDialogRef = this.previewDialogService
|
|
6957
|
+
.open(this.preview || "")
|
|
6958
|
+
.subscribe({
|
|
6959
|
+
next: function (data) {
|
|
6960
|
+
_this.popupFormCallback = {
|
|
6961
|
+
popupFormData: data["data"],
|
|
6962
|
+
popupFormConfig: data["formConfig"],
|
|
6963
|
+
activeFormConfig: _this.activeFormConfig
|
|
6964
|
+
};
|
|
6965
|
+
_this.activePopupFormData = {};
|
|
6966
|
+
_this.popupFormConfig = {};
|
|
6967
|
+
_this.previewDialogRef.complete();
|
|
6968
|
+
},
|
|
6969
|
+
error: function () {
|
|
6970
|
+
_this.popupFormCallback = {
|
|
6971
|
+
popupFormData: {},
|
|
6972
|
+
popupFormConfig: _this.popupFormConfig,
|
|
6973
|
+
activeFormConfig: _this.activeFormConfig,
|
|
6974
|
+
stopTaskExecution: true
|
|
6975
|
+
};
|
|
6976
|
+
_this.activePopupFormData = {};
|
|
6977
|
+
_this.popupFormConfig = {};
|
|
6978
|
+
console.info("Preview error");
|
|
6979
|
+
},
|
|
6980
|
+
complete: function () {
|
|
6981
|
+
console.info("Preview closed");
|
|
6982
|
+
}
|
|
6983
|
+
});
|
|
6984
|
+
break;
|
|
6985
|
+
default:
|
|
6986
|
+
break;
|
|
6987
|
+
}
|
|
6954
6988
|
}
|
|
6955
6989
|
};
|
|
6956
6990
|
/**
|
|
6957
6991
|
* FormView - Listens to event of getting the Active Form's Data when the Form is Saved and emits (read as passes) the same event to the library consumer.
|
|
6958
6992
|
* @param e any
|
|
6959
6993
|
*/
|
|
6960
|
-
KwikIDFormsRendererComponent.prototype.handleOnClickSaveForm = function (e, eventType) {
|
|
6961
|
-
var
|
|
6994
|
+
KwikIDFormsRendererComponent.prototype.handleOnClickSaveForm = function (e, eventType, context) {
|
|
6995
|
+
var _e;
|
|
6962
6996
|
switch (eventType) {
|
|
6963
6997
|
case "FORM":
|
|
6964
6998
|
this.loader = true;
|
|
6965
|
-
this.getFormData.emit((
|
|
6966
|
-
|
|
6967
|
-
|
|
6999
|
+
this.getFormData.emit((_e = {},
|
|
7000
|
+
_e[this.activeFormConfig.key] = e["data"],
|
|
7001
|
+
_e));
|
|
6968
7002
|
break;
|
|
6969
7003
|
case "POPUP_FORM":
|
|
6970
7004
|
this.previewDialogRef.next(e);
|
|
@@ -7054,9 +7088,9 @@
|
|
|
7054
7088
|
KwikIDFormsRendererComponent.prototype.handleOnClickSubmitForms = function (e) {
|
|
7055
7089
|
return __awaiter(this, void 0, void 0, function () {
|
|
7056
7090
|
var formsList, formsList_6, formsList_6_1, form;
|
|
7057
|
-
var e_8,
|
|
7091
|
+
var e_8, _e;
|
|
7058
7092
|
var _this = this;
|
|
7059
|
-
return __generator(this, function (
|
|
7093
|
+
return __generator(this, function (_f) {
|
|
7060
7094
|
formsList = JSON.parse(JSON.stringify(this.formsList));
|
|
7061
7095
|
try {
|
|
7062
7096
|
for (formsList_6 = __values(formsList), formsList_6_1 = formsList_6.next(); !formsList_6_1.done; formsList_6_1 = formsList_6.next()) {
|
|
@@ -7075,7 +7109,7 @@
|
|
|
7075
7109
|
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
7076
7110
|
finally {
|
|
7077
7111
|
try {
|
|
7078
|
-
if (formsList_6_1 && !formsList_6_1.done && (
|
|
7112
|
+
if (formsList_6_1 && !formsList_6_1.done && (_e = formsList_6.return)) _e.call(formsList_6);
|
|
7079
7113
|
}
|
|
7080
7114
|
finally { if (e_8) throw e_8.error; }
|
|
7081
7115
|
}
|
|
@@ -7110,8 +7144,8 @@
|
|
|
7110
7144
|
};
|
|
7111
7145
|
return KwikIDFormsRendererComponent;
|
|
7112
7146
|
}());
|
|
7113
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i5.TuiPreviewDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7114
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", activeFormData: "activeFormData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n [popupFormCallback]=\"this.popupFormCallback\"\n (onActionShowPopupForm)=\"this.handleOnActionShowPopupForm($event)\"\n (onClickGoBack)=\"this.handleOnClickGoBack($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event, 'FORM')\"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n<div\n ngClass=\"kwikid-forms-renderer-loader\"\n *ngIf=\"loader\"\n>\n <span class=\"loader\"></span>\n</div>\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n *ngIf=\"popupFormConfig\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event, 'POPUP_FORM')\"\n ></kwikid-form-view>\n </div>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n", styles: [":host{position:relative;height:100%}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:50%;margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}.kwikid-forms-renderer-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-forms-renderer-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-forms-renderer-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-forms-renderer-loader .t-loader{display:none!important}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;grid-gap:1.4rem;gap:1.4rem;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.kwikid-form-view-popup-container{
|
|
7147
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i5.TuiPreviewDialogService }, { token: i3$1.TuiDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7148
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", activeFormData: "activeFormData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n [popupFormCallback]=\"this.popupFormCallback\"\n (onActionShowPopupForm)=\"\n this.handleOnActionShowPopupForm($event, content)\n \"\n (onClickGoBack)=\"this.handleOnClickGoBack($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n<div\n ngClass=\"kwikid-forms-renderer-loader\"\n *ngIf=\"loader\"\n>\n <span class=\"loader\"></span>\n</div>\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n *ngIf=\"popupFormConfig\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n<ng-template\n #content\n let-context\n>\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', context)\n \"\n ></kwikid-form-view>\n </div>\n</ng-template>\n", styles: [":host{position:relative;height:100%}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:50%;margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}.kwikid-forms-renderer-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-forms-renderer-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-forms-renderer-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-forms-renderer-loader .t-loader{display:none!important}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;grid-gap:1.4rem;gap:1.4rem;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.kwikid-form-view-popup-container{border-radius:1rem;background:var(--tui-base-01)}\n"], components: [{ type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData", "popupFormCallback"], outputs: ["onClickGoBack", "onClickViewForms", "onClickSaveForm", "onClickApiCall", "onActionShowPopupForm"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }, { type: i5__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], animations: [
|
|
7115
7149
|
animations.trigger("panelInOut", [
|
|
7116
7150
|
animations.transition(":enter", [
|
|
7117
7151
|
animations.style({ transform: "translateY(100%)" }),
|
|
@@ -7122,6 +7156,9 @@
|
|
|
7122
7156
|
])
|
|
7123
7157
|
])
|
|
7124
7158
|
] });
|
|
7159
|
+
__decorate([
|
|
7160
|
+
kwikidToolkit.logMethod
|
|
7161
|
+
], KwikIDFormsRendererComponent.prototype, "fetchFormConfig", null);
|
|
7125
7162
|
__decorate([
|
|
7126
7163
|
kwikidToolkit.logMethod
|
|
7127
7164
|
], KwikIDFormsRendererComponent.prototype, "convertFormListConfig", null);
|
|
@@ -7198,6 +7235,9 @@
|
|
|
7198
7235
|
return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i5__namespace.TuiPreviewDialogService, decorators: [{
|
|
7199
7236
|
type: i0.Inject,
|
|
7200
7237
|
args: [i5.TuiPreviewDialogService]
|
|
7238
|
+
}] }, { type: i3__namespace$1.TuiDialogService, decorators: [{
|
|
7239
|
+
type: i0.Inject,
|
|
7240
|
+
args: [i3$1.TuiDialogService]
|
|
7201
7241
|
}] }];
|
|
7202
7242
|
}, propDecorators: { windowResizeWatcher: [{
|
|
7203
7243
|
type: i0.HostListener,
|
|
@@ -7221,7 +7261,7 @@
|
|
|
7221
7261
|
type: i0.Output
|
|
7222
7262
|
}], onClickApiCall: [{
|
|
7223
7263
|
type: i0.Output
|
|
7224
|
-
}], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], showPreview: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleOnActionShowPopupForm: [], handleOnClickSaveForm: [], handleOnClickGoBack: [], handleOnClickSubmitForms: [] } });
|
|
7264
|
+
}], fetchFormConfig: [], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], showPreview: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleOnActionShowPopupForm: [], handleOnClickSaveForm: [], handleOnClickGoBack: [], handleOnClickSubmitForms: [] } });
|
|
7225
7265
|
|
|
7226
7266
|
var BasicDateConfigEditor = /** @class */ (function () {
|
|
7227
7267
|
function BasicDateConfigEditor() {
|