kwikid-forms 0.3.8 → 0.3.10
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 +315 -326
- 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 +118 -31
- package/esm2015/lib/renderer/form-view/form-view.service.js +7 -2
- package/esm2015/lib/renderer/renderer.component.js +82 -25
- package/fesm2015/kwikid-forms.js +205 -224
- 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
package/fesm2015/kwikid-forms.js
CHANGED
|
@@ -4316,175 +4316,8 @@ class Converter {
|
|
|
4316
4316
|
else if (checkObjectKeyExists(field, "default")) {
|
|
4317
4317
|
return field;
|
|
4318
4318
|
}
|
|
4319
|
-
else {
|
|
4320
|
-
if (checkObjectKeyExists(field, "defaultVal")) {
|
|
4321
|
-
// Currently below line is commented because it caused issues in setting Default Value.
|
|
4322
|
-
// field["defaultValue"] = field["defaultVal"];
|
|
4323
|
-
// delete field["defaultVal"];
|
|
4324
|
-
}
|
|
4325
|
-
// TODO: Condition for all_forms_data is not considered yet.
|
|
4326
|
-
if (field.autoPopulateFromSummaryData) {
|
|
4327
|
-
field["defaultValue"] = {
|
|
4328
|
-
is_found: false,
|
|
4329
|
-
value: "",
|
|
4330
|
-
sources: [
|
|
4331
|
-
{
|
|
4332
|
-
source: "summary_data",
|
|
4333
|
-
summary_data: {
|
|
4334
|
-
path: `$.${field.key}`,
|
|
4335
|
-
validation: {
|
|
4336
|
-
rules: [
|
|
4337
|
-
{
|
|
4338
|
-
key: "1",
|
|
4339
|
-
type: "is_not_empty",
|
|
4340
|
-
is_not_empty: {
|
|
4341
|
-
value: true
|
|
4342
|
-
}
|
|
4343
|
-
}
|
|
4344
|
-
],
|
|
4345
|
-
actions: [
|
|
4346
|
-
{
|
|
4347
|
-
type: "set_default_value_found",
|
|
4348
|
-
condition: "1",
|
|
4349
|
-
set_default_value_found: {
|
|
4350
|
-
value: true
|
|
4351
|
-
}
|
|
4352
|
-
},
|
|
4353
|
-
{
|
|
4354
|
-
type: "enable_field",
|
|
4355
|
-
condition: "1 OR NOT(1)",
|
|
4356
|
-
enable_field: { value: true }
|
|
4357
|
-
}
|
|
4358
|
-
]
|
|
4359
|
-
}
|
|
4360
|
-
}
|
|
4361
|
-
}
|
|
4362
|
-
]
|
|
4363
|
-
};
|
|
4364
|
-
}
|
|
4365
|
-
else if (checkObjectKeyExists(field, "autofill")) {
|
|
4366
|
-
if (checkObjectKeyExists(field.autofill, "type")) {
|
|
4367
|
-
if (field.autofill.type === "storage") {
|
|
4368
|
-
field["defaultValue"] = {
|
|
4369
|
-
is_found: false,
|
|
4370
|
-
value: "",
|
|
4371
|
-
sources: [
|
|
4372
|
-
{
|
|
4373
|
-
source: "browser_storage",
|
|
4374
|
-
browser_storage: {
|
|
4375
|
-
path: `$.${field.key}`,
|
|
4376
|
-
validation: {
|
|
4377
|
-
rules: [
|
|
4378
|
-
{
|
|
4379
|
-
key: "1",
|
|
4380
|
-
type: "is_not_empty",
|
|
4381
|
-
is_not_empty: {
|
|
4382
|
-
value: true
|
|
4383
|
-
}
|
|
4384
|
-
}
|
|
4385
|
-
],
|
|
4386
|
-
actions: [
|
|
4387
|
-
{
|
|
4388
|
-
type: "set_default_value_found",
|
|
4389
|
-
condition: "1",
|
|
4390
|
-
set_default_value_found: {
|
|
4391
|
-
value: true
|
|
4392
|
-
}
|
|
4393
|
-
},
|
|
4394
|
-
{
|
|
4395
|
-
type: "enable_field",
|
|
4396
|
-
condition: "1 OR NOT(1)",
|
|
4397
|
-
enable_field: { value: true }
|
|
4398
|
-
}
|
|
4399
|
-
]
|
|
4400
|
-
}
|
|
4401
|
-
}
|
|
4402
|
-
}
|
|
4403
|
-
]
|
|
4404
|
-
};
|
|
4405
|
-
}
|
|
4406
|
-
else if (field.autofill.type === "config") {
|
|
4407
|
-
field["defaultValue"] = {
|
|
4408
|
-
is_found: false,
|
|
4409
|
-
value: "",
|
|
4410
|
-
sources: [
|
|
4411
|
-
{
|
|
4412
|
-
source: "field_config",
|
|
4413
|
-
field_config: {
|
|
4414
|
-
path: `$.${field.key}`,
|
|
4415
|
-
validation: {
|
|
4416
|
-
rules: [
|
|
4417
|
-
{
|
|
4418
|
-
key: "1",
|
|
4419
|
-
type: "is_not_empty",
|
|
4420
|
-
is_not_empty: {
|
|
4421
|
-
value: true
|
|
4422
|
-
}
|
|
4423
|
-
}
|
|
4424
|
-
],
|
|
4425
|
-
actions: [
|
|
4426
|
-
{
|
|
4427
|
-
type: "set_default_value_found",
|
|
4428
|
-
condition: "1",
|
|
4429
|
-
set_default_value_found: {
|
|
4430
|
-
value: true
|
|
4431
|
-
}
|
|
4432
|
-
},
|
|
4433
|
-
{
|
|
4434
|
-
type: "enable_field",
|
|
4435
|
-
condition: "1 OR NOT(1)",
|
|
4436
|
-
enable_field: { value: true }
|
|
4437
|
-
}
|
|
4438
|
-
]
|
|
4439
|
-
}
|
|
4440
|
-
}
|
|
4441
|
-
}
|
|
4442
|
-
]
|
|
4443
|
-
};
|
|
4444
|
-
}
|
|
4445
|
-
}
|
|
4446
|
-
}
|
|
4447
|
-
else {
|
|
4448
|
-
field["defaultValue"] = {
|
|
4449
|
-
is_found: false,
|
|
4450
|
-
value: "",
|
|
4451
|
-
sources: [
|
|
4452
|
-
{
|
|
4453
|
-
source: "form_data",
|
|
4454
|
-
form_data: {
|
|
4455
|
-
path: `$.${field.key}`,
|
|
4456
|
-
validation: {
|
|
4457
|
-
rules: [
|
|
4458
|
-
{
|
|
4459
|
-
key: "1",
|
|
4460
|
-
type: "is_not_empty",
|
|
4461
|
-
is_not_empty: {
|
|
4462
|
-
value: true
|
|
4463
|
-
}
|
|
4464
|
-
}
|
|
4465
|
-
],
|
|
4466
|
-
actions: [
|
|
4467
|
-
{
|
|
4468
|
-
type: "set_default_value_found",
|
|
4469
|
-
condition: "1",
|
|
4470
|
-
set_default_value_found: {
|
|
4471
|
-
value: true
|
|
4472
|
-
}
|
|
4473
|
-
},
|
|
4474
|
-
{
|
|
4475
|
-
type: "enable_field",
|
|
4476
|
-
condition: "1 OR NOT(1)",
|
|
4477
|
-
enable_field: { value: true }
|
|
4478
|
-
}
|
|
4479
|
-
]
|
|
4480
|
-
}
|
|
4481
|
-
}
|
|
4482
|
-
}
|
|
4483
|
-
]
|
|
4484
|
-
};
|
|
4485
|
-
}
|
|
4486
|
-
}
|
|
4487
4319
|
delete field["defaultVal"];
|
|
4320
|
+
delete field["defaultValue"];
|
|
4488
4321
|
}
|
|
4489
4322
|
return field;
|
|
4490
4323
|
};
|
|
@@ -4591,7 +4424,7 @@ var EActionKey;
|
|
|
4591
4424
|
EActionKey["TASK_API_CALL_MULTIPLE_END"] = "TASK_API_CALL_MULTIPLE_END";
|
|
4592
4425
|
EActionKey["PREVIEW_DIALOG_SHOW"] = "PREVIEW_DIALOG_SHOW";
|
|
4593
4426
|
EActionKey["POPUP_FORM_SHOW"] = "POPUP_FORM_SHOW";
|
|
4594
|
-
EActionKey["
|
|
4427
|
+
EActionKey["STOP_WAITING"] = "STOP_WAITING";
|
|
4595
4428
|
EActionKey["NOTIFICATION_ERROR_SHOW"] = "NOTIFICATION_ERROR_SHOW";
|
|
4596
4429
|
EActionKey["NOTIFICATION_ERROR_HIDE"] = "NOTIFICATION_ERROR_HIDE";
|
|
4597
4430
|
EActionKey["DIALOG_SHOW"] = "DIALOG_SHOW";
|
|
@@ -4826,7 +4659,12 @@ class KwikIDFormViewService {
|
|
|
4826
4659
|
for (let field of fields) {
|
|
4827
4660
|
if (field.isFormElement) {
|
|
4828
4661
|
const defaults = new Defaults(field, fields, allFormsData, formData, previousFormData, takeAction);
|
|
4829
|
-
let value =
|
|
4662
|
+
let value = "";
|
|
4663
|
+
if (checkObjectKeyExists(field, "default")) {
|
|
4664
|
+
if (checkObjectKeyExists(field.default, "value")) {
|
|
4665
|
+
value = yield defaults.getFormFieldValue();
|
|
4666
|
+
}
|
|
4667
|
+
}
|
|
4830
4668
|
if (checkObjectKeyExists(field, "default")) {
|
|
4831
4669
|
if (checkObjectKeyExists(field.default, "options")) {
|
|
4832
4670
|
if (field.default.options.triggers.includes("ON_INIT")) {
|
|
@@ -5196,16 +5034,18 @@ class KwikIDFormViewComponent {
|
|
|
5196
5034
|
this.stopTaskExecution = false;
|
|
5197
5035
|
this.waitingForChanges = false;
|
|
5198
5036
|
this.popupFormConfig = undefined;
|
|
5199
|
-
this.popupFormData =
|
|
5200
|
-
this.
|
|
5037
|
+
this.popupFormData = {};
|
|
5038
|
+
this.taskData = {};
|
|
5201
5039
|
this.formGroup = new FormGroup({});
|
|
5202
5040
|
this.showErrorNotification = false;
|
|
5203
5041
|
this.dialogRef = undefined;
|
|
5204
5042
|
}
|
|
5205
5043
|
ngOnInit() {
|
|
5206
5044
|
(() => __awaiter(this, void 0, void 0, function* () {
|
|
5207
|
-
yield this.initFormConfig(this.formConfig);
|
|
5208
|
-
|
|
5045
|
+
const res = yield this.initFormConfig(this.formConfig);
|
|
5046
|
+
if (res) {
|
|
5047
|
+
this.loading = false;
|
|
5048
|
+
}
|
|
5209
5049
|
}))();
|
|
5210
5050
|
}
|
|
5211
5051
|
ngAfterViewInit() { }
|
|
@@ -5248,7 +5088,7 @@ class KwikIDFormViewComponent {
|
|
|
5248
5088
|
this.setFormFieldGroupsFromFormConfig(formConfig);
|
|
5249
5089
|
this.setFormDataFromAllFormsData();
|
|
5250
5090
|
/**
|
|
5251
|
-
* PRE Tasks
|
|
5091
|
+
* PRE Form Tasks
|
|
5252
5092
|
* 1. API Calls.
|
|
5253
5093
|
* 2. Alter Data Structure.
|
|
5254
5094
|
* 3. Alter Form Config.
|
|
@@ -5260,14 +5100,17 @@ class KwikIDFormViewComponent {
|
|
|
5260
5100
|
FORM_CONFIG: this.formConfig,
|
|
5261
5101
|
FORM_FIELDS: this.formFields,
|
|
5262
5102
|
FORM_DATA: this.formData,
|
|
5103
|
+
TASK_DATA: this.taskData,
|
|
5263
5104
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5264
5105
|
ALL_FORMS_DATA: this.allFormsData
|
|
5265
5106
|
}, this.takeAction.bind(this));
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5107
|
+
this.stopTaskExecution = false;
|
|
5108
|
+
if (checkObjectKeyExists(preTask, "wait")) {
|
|
5109
|
+
this.waitingForChanges = preTask.wait;
|
|
5110
|
+
}
|
|
5111
|
+
else {
|
|
5112
|
+
this.waitingForChanges = false;
|
|
5113
|
+
}
|
|
5271
5114
|
yield task.execute();
|
|
5272
5115
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5273
5116
|
yield new Promise((resolve) => {
|
|
@@ -5285,7 +5128,7 @@ class KwikIDFormViewComponent {
|
|
|
5285
5128
|
this.formData = mergeObjects(this.formData, this.popupFormData);
|
|
5286
5129
|
}
|
|
5287
5130
|
if (this.stopTaskExecution) {
|
|
5288
|
-
return;
|
|
5131
|
+
return false;
|
|
5289
5132
|
}
|
|
5290
5133
|
this.formGroup = yield this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this));
|
|
5291
5134
|
for (let field of this.formFields) {
|
|
@@ -5308,6 +5151,7 @@ class KwikIDFormViewComponent {
|
|
|
5308
5151
|
FIELD_CONFIG: field,
|
|
5309
5152
|
FORM_FIELDS: this.formFields,
|
|
5310
5153
|
FORM_DATA: this.formData,
|
|
5154
|
+
TASK_DATA: this.taskData,
|
|
5311
5155
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5312
5156
|
ALL_FORMS_DATA: this.allFormsData
|
|
5313
5157
|
}, this.takeAction.bind(this));
|
|
@@ -5322,6 +5166,7 @@ class KwikIDFormViewComponent {
|
|
|
5322
5166
|
}
|
|
5323
5167
|
}
|
|
5324
5168
|
}
|
|
5169
|
+
return true;
|
|
5325
5170
|
});
|
|
5326
5171
|
}
|
|
5327
5172
|
setFormFieldsFromFormConfig(formConfig) {
|
|
@@ -5350,6 +5195,7 @@ class KwikIDFormViewComponent {
|
|
|
5350
5195
|
const rulesMapping = new Rule(childFieldGroupConfig.rules, {
|
|
5351
5196
|
FIELD_CONFIG: parentField,
|
|
5352
5197
|
FORM_DATA: this.formData,
|
|
5198
|
+
TASK_DATA: this.taskData,
|
|
5353
5199
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5354
5200
|
ALL_FORMS_DATA: this.allFormsData
|
|
5355
5201
|
}).mapping();
|
|
@@ -5360,6 +5206,7 @@ class KwikIDFormViewComponent {
|
|
|
5360
5206
|
FIELD_CONFIG: parentField,
|
|
5361
5207
|
FORM_FIELDS: this.formFields,
|
|
5362
5208
|
FORM_DATA: this.formData,
|
|
5209
|
+
TASK_DATA: this.taskData,
|
|
5363
5210
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5364
5211
|
ALL_FORMS_DATA: this.allFormsData
|
|
5365
5212
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
@@ -5384,6 +5231,7 @@ class KwikIDFormViewComponent {
|
|
|
5384
5231
|
const rulesMapping = new Rule(connectedFieldConfig.rules, {
|
|
5385
5232
|
FIELD_CONFIG: connectedField,
|
|
5386
5233
|
FORM_DATA: this.formData,
|
|
5234
|
+
TASK_DATA: this.taskData,
|
|
5387
5235
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5388
5236
|
ALL_FORMS_DATA: this.allFormsData
|
|
5389
5237
|
}).mapping();
|
|
@@ -5394,6 +5242,7 @@ class KwikIDFormViewComponent {
|
|
|
5394
5242
|
FORM_FIELDS: this.formFields,
|
|
5395
5243
|
FIELD_CONFIG: connectedField,
|
|
5396
5244
|
FORM_DATA: this.formData,
|
|
5245
|
+
TASK_DATA: this.taskData,
|
|
5397
5246
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5398
5247
|
ALL_FORMS_DATA: this.allFormsData
|
|
5399
5248
|
}, this.takeAction.bind(this));
|
|
@@ -5458,6 +5307,7 @@ class KwikIDFormViewComponent {
|
|
|
5458
5307
|
FIELD_CONFIG: field,
|
|
5459
5308
|
FORM_FIELDS: this.formFields,
|
|
5460
5309
|
FORM_DATA: this.formData,
|
|
5310
|
+
TASK_DATA: this.taskData,
|
|
5461
5311
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5462
5312
|
ALL_FORMS_DATA: this.allFormsData
|
|
5463
5313
|
}, this.takeAction.bind(this));
|
|
@@ -5484,6 +5334,7 @@ class KwikIDFormViewComponent {
|
|
|
5484
5334
|
FIELD_CONFIG: resetField,
|
|
5485
5335
|
FORM_FIELDS: this.formFields,
|
|
5486
5336
|
FORM_DATA: this.formData,
|
|
5337
|
+
TASK_DATA: this.taskData,
|
|
5487
5338
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5488
5339
|
ALL_FORMS_DATA: this.allFormsData
|
|
5489
5340
|
}, this.takeAction.bind(this));
|
|
@@ -5510,6 +5361,7 @@ class KwikIDFormViewComponent {
|
|
|
5510
5361
|
API_CONFIG: api,
|
|
5511
5362
|
FORM_FIELDS: this.formFields,
|
|
5512
5363
|
FORM_DATA: this.formData,
|
|
5364
|
+
TASK_DATA: this.taskData,
|
|
5513
5365
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5514
5366
|
ALL_FORMS_DATA: this.allFormsData
|
|
5515
5367
|
});
|
|
@@ -5526,6 +5378,7 @@ class KwikIDFormViewComponent {
|
|
|
5526
5378
|
API_CONFIG: api,
|
|
5527
5379
|
FORM_FIELDS: this.formFields,
|
|
5528
5380
|
FORM_DATA: this.formData,
|
|
5381
|
+
TASK_DATA: this.taskData,
|
|
5529
5382
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5530
5383
|
ALL_FORMS_DATA: this.allFormsData
|
|
5531
5384
|
}, this.takeAction.bind(this));
|
|
@@ -5547,6 +5400,7 @@ class KwikIDFormViewComponent {
|
|
|
5547
5400
|
API_CONFIG: api,
|
|
5548
5401
|
FORM_FIELDS: this.formFields,
|
|
5549
5402
|
FORM_DATA: this.formData,
|
|
5403
|
+
TASK_DATA: this.taskData,
|
|
5550
5404
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5551
5405
|
ALL_FORMS_DATA: this.allFormsData
|
|
5552
5406
|
});
|
|
@@ -5555,6 +5409,7 @@ class KwikIDFormViewComponent {
|
|
|
5555
5409
|
API_CONFIG: api,
|
|
5556
5410
|
FORM_FIELDS: this.formFields,
|
|
5557
5411
|
FORM_DATA: this.formData,
|
|
5412
|
+
TASK_DATA: this.taskData,
|
|
5558
5413
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5559
5414
|
ALL_FORMS_DATA: this.allFormsData
|
|
5560
5415
|
}, this.takeAction.bind(this));
|
|
@@ -5579,7 +5434,11 @@ class KwikIDFormViewComponent {
|
|
|
5579
5434
|
api.request.headers.validation.is_valid) {
|
|
5580
5435
|
if (api.request.url.hasOwnProperty("type") &&
|
|
5581
5436
|
api.request.url.type === EApiRequestUrlType.MOCK) {
|
|
5582
|
-
apiCallResponse =
|
|
5437
|
+
apiCallResponse = yield new Promise((resolve) => {
|
|
5438
|
+
setTimeout(() => {
|
|
5439
|
+
resolve(api.request.url.props.mockedData);
|
|
5440
|
+
}, 1000); // 1000 ms = 1 sec
|
|
5441
|
+
});
|
|
5583
5442
|
}
|
|
5584
5443
|
else {
|
|
5585
5444
|
const url = api.request.url.value;
|
|
@@ -5628,6 +5487,7 @@ class KwikIDFormViewComponent {
|
|
|
5628
5487
|
API_CONFIG: {},
|
|
5629
5488
|
FORM_FIELDS: this.formFields,
|
|
5630
5489
|
FORM_DATA: this.formData,
|
|
5490
|
+
TASK_DATA: this.taskData,
|
|
5631
5491
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5632
5492
|
ALL_FORMS_DATA: this.allFormsData
|
|
5633
5493
|
}, this.takeAction.bind(this));
|
|
@@ -5710,6 +5570,7 @@ class KwikIDFormViewComponent {
|
|
|
5710
5570
|
FIELD_CONFIG: field,
|
|
5711
5571
|
FORM_FIELDS: this.formFields,
|
|
5712
5572
|
FORM_DATA: this.formData,
|
|
5573
|
+
TASK_DATA: this.taskData,
|
|
5713
5574
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5714
5575
|
ALL_FORMS_DATA: this.allFormsData
|
|
5715
5576
|
}, this.takeAction.bind(this));
|
|
@@ -5742,10 +5603,17 @@ class KwikIDFormViewComponent {
|
|
|
5742
5603
|
FORM_CONFIG: this.formConfig,
|
|
5743
5604
|
FORM_FIELDS: this.formFields,
|
|
5744
5605
|
FORM_DATA: this.formData,
|
|
5606
|
+
TASK_DATA: this.taskData,
|
|
5745
5607
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5746
5608
|
ALL_FORMS_DATA: this.allFormsData
|
|
5747
5609
|
}, this.takeAction.bind(this));
|
|
5748
|
-
this.
|
|
5610
|
+
this.stopTaskExecution = false;
|
|
5611
|
+
if (checkObjectKeyExists(postTask, "wait")) {
|
|
5612
|
+
this.waitingForChanges = postTask.wait;
|
|
5613
|
+
}
|
|
5614
|
+
else {
|
|
5615
|
+
this.waitingForChanges = false;
|
|
5616
|
+
}
|
|
5749
5617
|
yield task.execute();
|
|
5750
5618
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5751
5619
|
yield new Promise((resolve) => {
|
|
@@ -5760,18 +5628,19 @@ class KwikIDFormViewComponent {
|
|
|
5760
5628
|
break;
|
|
5761
5629
|
}
|
|
5762
5630
|
}
|
|
5763
|
-
if (this.stopTaskExecution) {
|
|
5631
|
+
if (this.stopTaskExecution || this.waitingForChanges) {
|
|
5632
|
+
this.stopTaskExecution = false;
|
|
5764
5633
|
return;
|
|
5765
5634
|
}
|
|
5766
5635
|
this.onClickSaveForm.emit({
|
|
5767
5636
|
formConfig: this.formConfig,
|
|
5768
|
-
data: mergeObjects(formData, this.popupFormData, this.
|
|
5637
|
+
data: mergeObjects(this.allFormsData[this.formConfig.key], formData, this.popupFormData, this.taskData)
|
|
5769
5638
|
});
|
|
5770
5639
|
}
|
|
5771
5640
|
else {
|
|
5772
5641
|
this.onClickSaveForm.emit({
|
|
5773
5642
|
formConfig: this.formConfig,
|
|
5774
|
-
data: formData
|
|
5643
|
+
data: mergeObjects(this.allFormsData[this.formConfig.key], formData, this.popupFormData, this.taskData)
|
|
5775
5644
|
});
|
|
5776
5645
|
}
|
|
5777
5646
|
});
|
|
@@ -6020,7 +5889,7 @@ class KwikIDFormViewComponent {
|
|
|
6020
5889
|
const response = yield this.handleTaskApiCall(apiConfig);
|
|
6021
5890
|
apiConfig = response.api;
|
|
6022
5891
|
this.formConfig = setValueToObjectPath(this.formConfig, `apis.${action.props.formApiKey}`, apiConfig);
|
|
6023
|
-
this.
|
|
5892
|
+
this.taskData = mergeObjects(this.taskData, {
|
|
6024
5893
|
[action.props.formApiKey]: apiConfig.response.value
|
|
6025
5894
|
});
|
|
6026
5895
|
this.waitingForChanges = false;
|
|
@@ -6047,6 +5916,7 @@ class KwikIDFormViewComponent {
|
|
|
6047
5916
|
API_CONFIG: multipleApiConfig,
|
|
6048
5917
|
FORM_FIELDS: this.formFields,
|
|
6049
5918
|
FORM_DATA: this.formData,
|
|
5919
|
+
TASK_DATA: this.taskData,
|
|
6050
5920
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
6051
5921
|
ALL_FORMS_DATA: this.allFormsData
|
|
6052
5922
|
}, this.takeAction.bind(this));
|
|
@@ -6062,7 +5932,7 @@ class KwikIDFormViewComponent {
|
|
|
6062
5932
|
if (checkObjectKeyExists(api.response, "value"))
|
|
6063
5933
|
multipleApiCallResponses = setValueToObjectPath(multipleApiCallResponses, `${api.apiKey}`, api.response.value);
|
|
6064
5934
|
});
|
|
6065
|
-
this.
|
|
5935
|
+
this.taskData = Object.assign(Object.assign({}, this.taskData), { [action.props.formApiKey]: multipleApiCallResponses });
|
|
6066
5936
|
this.waitingForChanges = false;
|
|
6067
5937
|
this.hideApiLoader();
|
|
6068
5938
|
});
|
|
@@ -6126,13 +5996,30 @@ class KwikIDFormViewComponent {
|
|
|
6126
5996
|
else {
|
|
6127
5997
|
this.previewProperties.unavailable = false;
|
|
6128
5998
|
}
|
|
6129
|
-
this.previewDialogService.open(this.preview || "").subscribe(
|
|
5999
|
+
this.previewDialogService.open(this.preview || "").subscribe({
|
|
6000
|
+
complete: () => {
|
|
6001
|
+
this.previewProperties = {
|
|
6002
|
+
html: {
|
|
6003
|
+
before: "",
|
|
6004
|
+
after: ""
|
|
6005
|
+
},
|
|
6006
|
+
iframe: {
|
|
6007
|
+
src: "",
|
|
6008
|
+
title: ""
|
|
6009
|
+
},
|
|
6010
|
+
popupFormKey: "",
|
|
6011
|
+
title: "",
|
|
6012
|
+
unavailable: false
|
|
6013
|
+
};
|
|
6014
|
+
}
|
|
6015
|
+
});
|
|
6130
6016
|
}
|
|
6131
|
-
showPopupForm(popupFormKey) {
|
|
6017
|
+
showPopupForm(popupFormKey, popupType = "DIALOG") {
|
|
6132
6018
|
const popupFormConfig = this.formConfig.popupForms[popupFormKey];
|
|
6133
6019
|
this.onActionShowPopupForm.emit({
|
|
6134
|
-
activeFormData: mergeObjects(this.formData, this.
|
|
6135
|
-
popupFormConfig: popupFormConfig
|
|
6020
|
+
activeFormData: mergeObjects(this.formData, this.taskData),
|
|
6021
|
+
popupFormConfig: popupFormConfig,
|
|
6022
|
+
popupType: popupType
|
|
6136
6023
|
});
|
|
6137
6024
|
}
|
|
6138
6025
|
takeActionOnFieldGroup(action, object) {
|
|
@@ -6156,7 +6043,7 @@ class KwikIDFormViewComponent {
|
|
|
6156
6043
|
});
|
|
6157
6044
|
}
|
|
6158
6045
|
takeAction(action, object) {
|
|
6159
|
-
var _a, _b, _c, _d;
|
|
6046
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6160
6047
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6161
6048
|
switch (action.key) {
|
|
6162
6049
|
case EActionKey.FIELD_HIDE:
|
|
@@ -6190,6 +6077,18 @@ class KwikIDFormViewComponent {
|
|
|
6190
6077
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
6191
6078
|
break;
|
|
6192
6079
|
case EActionKey.FIELD_ERROR_HIDE:
|
|
6080
|
+
if (checkObjectKeyExists(action.props.message, "source")) {
|
|
6081
|
+
const fieldErrorHide_Source = new Source(object);
|
|
6082
|
+
let fieldErrorHideSourceValue = yield fieldErrorHide_Source.getValueFromSource(action.props.message.source);
|
|
6083
|
+
if (typeof fieldErrorHideSourceValue == "string" ||
|
|
6084
|
+
typeof fieldErrorHideSourceValue == "number") {
|
|
6085
|
+
fieldErrorHideSourceValue = String(fieldErrorHideSourceValue);
|
|
6086
|
+
}
|
|
6087
|
+
else {
|
|
6088
|
+
fieldErrorHideSourceValue = "";
|
|
6089
|
+
}
|
|
6090
|
+
action = setValueToObjectPath(action, "props.message.message", fieldErrorHideSourceValue);
|
|
6091
|
+
}
|
|
6193
6092
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
6194
6093
|
break;
|
|
6195
6094
|
case EActionKey.FIELD_MESSAGE_SHOW:
|
|
@@ -6231,9 +6130,9 @@ class KwikIDFormViewComponent {
|
|
|
6231
6130
|
this.showPreview(action.props);
|
|
6232
6131
|
break;
|
|
6233
6132
|
case EActionKey.POPUP_FORM_SHOW:
|
|
6234
|
-
this.showPopupForm(action.props.popupFormKey);
|
|
6133
|
+
this.showPopupForm(action.props.popupFormKey, (_b = (_a = action.props) === null || _a === void 0 ? void 0 : _a.popupType) !== null && _b !== void 0 ? _b : "DIALOG");
|
|
6235
6134
|
break;
|
|
6236
|
-
case EActionKey.
|
|
6135
|
+
case EActionKey.STOP_WAITING:
|
|
6237
6136
|
this.waitingForChanges = false;
|
|
6238
6137
|
break;
|
|
6239
6138
|
case EActionKey.NOTIFICATION_ERROR_SHOW:
|
|
@@ -6250,10 +6149,10 @@ class KwikIDFormViewComponent {
|
|
|
6250
6149
|
break;
|
|
6251
6150
|
case EActionKey.DIALOG_SHOW:
|
|
6252
6151
|
this.dialogShow({
|
|
6253
|
-
html: (
|
|
6254
|
-
label: (
|
|
6255
|
-
size: (
|
|
6256
|
-
button: (
|
|
6152
|
+
html: (_c = action.props) === null || _c === void 0 ? void 0 : _c.html,
|
|
6153
|
+
label: (_d = action.props) === null || _d === void 0 ? void 0 : _d.label,
|
|
6154
|
+
size: (_e = action.props) === null || _e === void 0 ? void 0 : _e.size,
|
|
6155
|
+
button: (_f = action.props) === null || _f === void 0 ? void 0 : _f.button
|
|
6257
6156
|
});
|
|
6258
6157
|
break;
|
|
6259
6158
|
case EActionKey.DIALOG_HIDE:
|
|
@@ -6264,9 +6163,35 @@ class KwikIDFormViewComponent {
|
|
|
6264
6163
|
}
|
|
6265
6164
|
});
|
|
6266
6165
|
}
|
|
6166
|
+
/**
|
|
6167
|
+
* Miscellaneous Methods for Debugging
|
|
6168
|
+
*/
|
|
6169
|
+
logVariables(message, ...obj) {
|
|
6170
|
+
console.log(message !== null && message !== void 0 ? message : "");
|
|
6171
|
+
console.log(JSON.parse(JSON.stringify(obj !== null && obj !== void 0 ? obj : { EMPTY: true })));
|
|
6172
|
+
console.log(JSON.parse(JSON.stringify({
|
|
6173
|
+
formConfig: this.formConfig,
|
|
6174
|
+
formData: this.formData,
|
|
6175
|
+
allFormsData: this.allFormsData,
|
|
6176
|
+
popupFormCallback: this.popupFormCallback,
|
|
6177
|
+
fieldGroups: this.fieldGroups,
|
|
6178
|
+
formFields: this.formFields,
|
|
6179
|
+
previousFormData: this.previousFormData,
|
|
6180
|
+
previewProperties: this.previewProperties,
|
|
6181
|
+
loading: this.loading,
|
|
6182
|
+
backButton: this.backButton,
|
|
6183
|
+
viewFormsButton: this.viewFormsButton,
|
|
6184
|
+
saveFormButton: this.saveFormButton,
|
|
6185
|
+
stopTaskExecution: this.stopTaskExecution,
|
|
6186
|
+
waitingForChanges: this.waitingForChanges,
|
|
6187
|
+
popupFormConfig: this.popupFormConfig,
|
|
6188
|
+
popupFormData: this.popupFormData,
|
|
6189
|
+
taskData: this.taskData
|
|
6190
|
+
})));
|
|
6191
|
+
}
|
|
6267
6192
|
}
|
|
6268
6193
|
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: KwikIDFormViewService }, { token: TuiPushService }, { token: TuiAlertService }, { token: TuiPreviewDialogService }, { token: TuiDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6269
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵ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, 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.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i1.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.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.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIPreviewImageComponent, selector: "kwikui-preview-image", inputs: ["id", "imageSrc", "altText", "imageType", "styles", "class", "loadingType", "html"], outputs: ["onClick"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }, { type: i5.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "safeHtml": SafeHtmlPipe$1, "safeUrl": SafeUrlPipe } });
|
|
6194
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵ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, 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:.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.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i1.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.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.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1.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.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIPreviewImageComponent, selector: "kwikui-preview-image", inputs: ["id", "imageSrc", "altText", "imageType", "styles", "class", "loadingType", "html"], outputs: ["onClick"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }, { type: i5.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "safeHtml": SafeHtmlPipe$1, "safeUrl": SafeUrlPipe } });
|
|
6270
6195
|
__decorate([
|
|
6271
6196
|
logMethod
|
|
6272
6197
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -6709,10 +6634,11 @@ const getFormConfigByKey = (forms, key) => {
|
|
|
6709
6634
|
};
|
|
6710
6635
|
|
|
6711
6636
|
class KwikIDFormsRendererComponent {
|
|
6712
|
-
constructor(hostElement, cdr, previewDialogService) {
|
|
6637
|
+
constructor(hostElement, cdr, previewDialogService, dialogs) {
|
|
6713
6638
|
this.hostElement = hostElement;
|
|
6714
6639
|
this.cdr = cdr;
|
|
6715
6640
|
this.previewDialogService = previewDialogService;
|
|
6641
|
+
this.dialogs = dialogs;
|
|
6716
6642
|
this.formsData = {};
|
|
6717
6643
|
this.activeFormData = {};
|
|
6718
6644
|
this.apiCallResponse = {};
|
|
@@ -6723,7 +6649,7 @@ class KwikIDFormsRendererComponent {
|
|
|
6723
6649
|
this.loader = false;
|
|
6724
6650
|
this.showErrorNotification = false;
|
|
6725
6651
|
this.activePopupFormData = {};
|
|
6726
|
-
this.popupFormCallback =
|
|
6652
|
+
this.popupFormCallback = {};
|
|
6727
6653
|
this.allFormsData = {};
|
|
6728
6654
|
this.allFormsSubmitted = false;
|
|
6729
6655
|
this.formsList = [];
|
|
@@ -6741,7 +6667,7 @@ class KwikIDFormsRendererComponent {
|
|
|
6741
6667
|
title: "",
|
|
6742
6668
|
unavailable: false
|
|
6743
6669
|
};
|
|
6744
|
-
this.popupFormConfig =
|
|
6670
|
+
this.popupFormConfig = {};
|
|
6745
6671
|
// display forms and list conditionally
|
|
6746
6672
|
this.showForm = false;
|
|
6747
6673
|
this.showFormFields = true;
|
|
@@ -7172,36 +7098,88 @@ class KwikIDFormsRendererComponent {
|
|
|
7172
7098
|
this.loader = true;
|
|
7173
7099
|
this.onClickApiCall.emit(e);
|
|
7174
7100
|
}
|
|
7175
|
-
handleOnActionShowPopupForm(e) {
|
|
7101
|
+
handleOnActionShowPopupForm(e, content) {
|
|
7102
|
+
var _a;
|
|
7176
7103
|
if (checkObjectKeyExists(e, "activeFormData") &&
|
|
7177
7104
|
checkObjectKeyExists(e, "popupFormConfig")) {
|
|
7178
7105
|
const popupFormData = { [this.activeFormConfig.key]: e.activeFormData };
|
|
7179
7106
|
this.activePopupFormData = mergeObjects(this.allFormsData, popupFormData);
|
|
7180
7107
|
this.popupFormConfig = e.popupFormConfig;
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7108
|
+
const popupType = (_a = e === null || e === void 0 ? void 0 : e.popupType) !== null && _a !== void 0 ? _a : "DIALOG";
|
|
7109
|
+
switch (popupType) {
|
|
7110
|
+
case "DIALOG":
|
|
7111
|
+
this.previewDialogRef = this.dialogs
|
|
7112
|
+
.open(content, {
|
|
7113
|
+
closeable: true,
|
|
7114
|
+
dismissible: false,
|
|
7115
|
+
size: "s",
|
|
7116
|
+
required: true
|
|
7117
|
+
})
|
|
7118
|
+
.subscribe({
|
|
7119
|
+
next: (data) => {
|
|
7120
|
+
this.popupFormCallback = {
|
|
7121
|
+
popupFormData: data["data"],
|
|
7122
|
+
popupFormConfig: data["formConfig"],
|
|
7123
|
+
activeFormConfig: this.activeFormConfig
|
|
7124
|
+
};
|
|
7125
|
+
this.activePopupFormData = {};
|
|
7126
|
+
this.popupFormConfig = {};
|
|
7127
|
+
this.previewDialogRef.complete();
|
|
7128
|
+
},
|
|
7129
|
+
error: () => {
|
|
7130
|
+
this.popupFormCallback = {
|
|
7131
|
+
popupFormData: {},
|
|
7132
|
+
popupFormConfig: this.popupFormConfig,
|
|
7133
|
+
activeFormConfig: this.activeFormConfig
|
|
7134
|
+
};
|
|
7135
|
+
this.activePopupFormData = {};
|
|
7136
|
+
this.popupFormConfig = {};
|
|
7137
|
+
console.info("Dialog error");
|
|
7138
|
+
},
|
|
7139
|
+
complete: () => {
|
|
7140
|
+
console.info("Dialog closed");
|
|
7141
|
+
}
|
|
7142
|
+
});
|
|
7143
|
+
break;
|
|
7144
|
+
case "POPUP":
|
|
7145
|
+
this.previewDialogRef = this.previewDialogService
|
|
7146
|
+
.open(this.preview || "")
|
|
7147
|
+
.subscribe({
|
|
7148
|
+
next: (data) => {
|
|
7149
|
+
this.popupFormCallback = {
|
|
7150
|
+
popupFormData: data["data"],
|
|
7151
|
+
popupFormConfig: data["formConfig"],
|
|
7152
|
+
activeFormConfig: this.activeFormConfig
|
|
7153
|
+
};
|
|
7154
|
+
this.activePopupFormData = {};
|
|
7155
|
+
this.popupFormConfig = {};
|
|
7156
|
+
this.previewDialogRef.complete();
|
|
7157
|
+
},
|
|
7158
|
+
error: () => {
|
|
7159
|
+
this.popupFormCallback = {
|
|
7160
|
+
popupFormData: {},
|
|
7161
|
+
popupFormConfig: this.popupFormConfig,
|
|
7162
|
+
activeFormConfig: this.activeFormConfig
|
|
7163
|
+
};
|
|
7164
|
+
this.activePopupFormData = {};
|
|
7165
|
+
this.popupFormConfig = {};
|
|
7166
|
+
console.info("Preview error");
|
|
7167
|
+
},
|
|
7168
|
+
complete: () => {
|
|
7169
|
+
console.info("Preview closed");
|
|
7170
|
+
}
|
|
7171
|
+
});
|
|
7172
|
+
break;
|
|
7173
|
+
default:
|
|
7174
|
+
break;
|
|
7175
|
+
}
|
|
7198
7176
|
}
|
|
7199
7177
|
}
|
|
7200
7178
|
/**
|
|
7201
7179
|
* 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.
|
|
7202
7180
|
* @param e any
|
|
7203
7181
|
*/
|
|
7204
|
-
handleOnClickSaveForm(e, eventType) {
|
|
7182
|
+
handleOnClickSaveForm(e, eventType, context) {
|
|
7205
7183
|
switch (eventType) {
|
|
7206
7184
|
case "FORM":
|
|
7207
7185
|
this.loader = true;
|
|
@@ -7335,8 +7313,8 @@ class KwikIDFormsRendererComponent {
|
|
|
7335
7313
|
}
|
|
7336
7314
|
}
|
|
7337
7315
|
}
|
|
7338
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsRendererComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TuiPreviewDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7339
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0.ɵɵ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, 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{
|
|
7316
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsRendererComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TuiPreviewDialogService }, { token: TuiDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7317
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0.ɵɵ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, 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$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }, { type: i5.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], animations: [
|
|
7340
7318
|
trigger("panelInOut", [
|
|
7341
7319
|
transition(":enter", [
|
|
7342
7320
|
style({ transform: "translateY(100%)" }),
|
|
@@ -7422,6 +7400,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
7422
7400
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i5.TuiPreviewDialogService, decorators: [{
|
|
7423
7401
|
type: Inject,
|
|
7424
7402
|
args: [TuiPreviewDialogService]
|
|
7403
|
+
}] }, { type: i3$1.TuiDialogService, decorators: [{
|
|
7404
|
+
type: Inject,
|
|
7405
|
+
args: [TuiDialogService]
|
|
7425
7406
|
}] }]; }, propDecorators: { windowResizeWatcher: [{
|
|
7426
7407
|
type: HostListener,
|
|
7427
7408
|
args: ["window:resize", ["$event"]]
|