kwikid-forms 0.1.19 → 0.1.20

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.
Files changed (28) hide show
  1. package/bundles/kwikid-forms.umd.js +1114 -430
  2. package/bundles/kwikid-forms.umd.js.map +1 -1
  3. package/esm2015/lib/builder/builder.component.js +236 -104
  4. package/esm2015/lib/builder/builder.module.js +42 -5
  5. package/esm2015/lib/builder/element-config-editor/editors/basic/radio-config.editor.component.js +302 -0
  6. package/esm2015/lib/builder/element-config-editor/editors/basic/text-config.editor.component.js +135 -0
  7. package/esm2015/lib/builder/element-config-editor/editors/basic-element-config.editor.component.js +542 -0
  8. package/esm2015/lib/builder/element-config-editor/element-config-editor.component.js +89 -0
  9. package/esm2015/lib/builder/shared/elements.js +44 -0
  10. package/esm2015/lib/builder/shared/helpers.js +6 -0
  11. package/esm2015/lib/renderer/form-view/definitions/form-view.apis.definition.js +1 -1
  12. package/esm2015/lib/renderer/form-view/form-view.component.js +35 -34
  13. package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +22 -12
  14. package/esm2015/lib/renderer/renderer.component.js +24 -4
  15. package/esm2015/lib/renderer/renderer.config-converter.helper.js +6 -6
  16. package/fesm2015/kwikid-forms.js +1441 -165
  17. package/fesm2015/kwikid-forms.js.map +1 -1
  18. package/lib/builder/builder.component.d.ts +21 -53
  19. package/lib/builder/builder.module.d.ts +9 -4
  20. package/lib/builder/element-config-editor/editors/basic/radio-config.editor.component.d.ts +25 -0
  21. package/lib/builder/element-config-editor/editors/basic/text-config.editor.component.d.ts +16 -0
  22. package/lib/builder/element-config-editor/editors/basic-element-config.editor.component.d.ts +20 -0
  23. package/lib/builder/element-config-editor/element-config-editor.component.d.ts +20 -0
  24. package/lib/builder/shared/elements.d.ts +32 -0
  25. package/lib/builder/shared/helpers.d.ts +1 -0
  26. package/lib/renderer/form-view/definitions/form-view.apis.definition.d.ts +2 -1
  27. package/lib/renderer/form-view/form-view.component.d.ts +1 -2
  28. package/package.json +1 -1
@@ -1,8 +1,10 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/drag-drop'), require('@angular/core'), require('@angular/forms'), require('kwikui'), require('lodash'), require('@taiga-ui/core'), require('@taiga-ui/kit'), require('kwikid-toolkit'), require('rxjs/operators'), require('@taiga-ui/cdk'), require('@angular/common'), require('@angular/platform-browser'), require('@angular/animations'), require('lodash/cloneDeep'), require('@angular/common/http')) :
3
- typeof define === 'function' && define.amd ? define('kwikid-forms', ['exports', '@angular/cdk/drag-drop', '@angular/core', '@angular/forms', 'kwikui', 'lodash', '@taiga-ui/core', '@taiga-ui/kit', 'kwikid-toolkit', 'rxjs/operators', '@taiga-ui/cdk', '@angular/common', '@angular/platform-browser', '@angular/animations', 'lodash/cloneDeep', '@angular/common/http'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-forms"] = {}, global.ng.cdk.dragDrop, global.ng.core, global.ng.forms, global.kwikui, global.lodash, global["@taiga-ui/core"], global["@taiga-ui/kit"], global["kwikid-toolkit"], global.rxjs.operators, global["@taiga-ui/cdk"], global.ng.common, global.ng.platformBrowser, global.ng.animations, global.cloneDeep, global.ng.common.http));
5
- })(this, (function (exports, dragDrop, i0, i6, i2, lodash, i3, i4, kwikidToolkit, operators, cdk, i5, i1, animations, cloneDeep, http) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/drag-drop'), require('@angular/core'), require('@angular/forms'), require('kwikid-toolkit'), require('kwikui'), require('lodash'), require('@angular/common'), require('@taiga-ui/core'), require('@taiga-ui/kit'), require('rxjs/operators'), require('@taiga-ui/cdk'), require('@angular/platform-browser'), require('@angular/animations'), require('lodash/cloneDeep'), require('@angular/common/http')) :
3
+ typeof define === 'function' && define.amd ? define('kwikid-forms', ['exports', '@angular/cdk/drag-drop', '@angular/core', '@angular/forms', 'kwikid-toolkit', 'kwikui', 'lodash', '@angular/common', '@taiga-ui/core', '@taiga-ui/kit', 'rxjs/operators', '@taiga-ui/cdk', '@angular/platform-browser', '@angular/animations', 'lodash/cloneDeep', '@angular/common/http'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-forms"] = {}, global.ng.cdk.dragDrop, global.ng.core, global.ng.forms, global["kwikid-toolkit"], global.kwikui, global.lodash, global.ng.common, global["@taiga-ui/core"], global["@taiga-ui/kit"], global.rxjs.operators, global["@taiga-ui/cdk"], global.ng.platformBrowser, global.ng.animations, global.cloneDeep, global.ng.common.http));
5
+ })(this, (function (exports, i4, i0, i1, kwikidToolkit, i2, _, i3, i3$1, i4$1, operators, cdk, i1$1, animations, cloneDeep, http) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
8
 
7
9
  function _interopNamespace(e) {
8
10
  if (e && e.__esModule) return e;
@@ -22,13 +24,15 @@
22
24
  return Object.freeze(n);
23
25
  }
24
26
 
27
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
25
28
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
29
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
30
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
+ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
28
32
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
30
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
31
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
33
+ var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
34
+ var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
35
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
32
36
  var cloneDeep__namespace = /*#__PURE__*/_interopNamespace(cloneDeep);
33
37
 
34
38
  /******************************************************************************
@@ -416,71 +420,570 @@
416
420
  return typeof state === "function" ? receiver === state : state.has(receiver);
417
421
  }
418
422
 
419
- var KwikIDFormsBuilderComponent = /** @class */ (function () {
420
- function KwikIDFormsBuilderComponent() {
421
- this.buttonComponent = {
423
+ var Elements = /** @class */ (function () {
424
+ function Elements() {
425
+ this.commonValidators = {
426
+ max: null,
427
+ maxLength: null,
428
+ min: null,
429
+ minLength: null,
430
+ required: true
431
+ };
432
+ this.commonProperties = {
433
+ placeholder: "",
434
+ readOnly: false
435
+ };
436
+ this.commonCore = {
437
+ key: "",
438
+ label: "",
422
439
  disabled: false,
423
- id: "",
424
- label: "Button",
425
- showLoader: false,
426
- styles: "",
427
- class: "tui-space_right-3 tui-space_bottom-3",
428
- type: "button",
429
- appearance: "primary",
430
- icon: "",
431
- iconRight: "",
432
- shape: null,
433
- size: "m"
440
+ messages: [],
441
+ default: {
442
+ value: true
443
+ }
434
444
  };
435
- this.progressSegmentedComponent = {
436
- colors: "tui(--tui-primary)",
437
- max: "5",
438
- size: "m",
439
- value: "2"
445
+ this.basic = [
446
+ Object.assign(Object.assign({ elementTitle: "Text", elementType: "text", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { case: "default" }) }),
447
+ Object.assign(Object.assign({ elementTitle: "Radio", elementType: "radio", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { orientation: "vertical" }) })
448
+ ];
449
+ this.documents = [
450
+ Object.assign(Object.assign({ elementTitle: "Aadhaar Number", elementType: "aadhaar-number", isElement: true, elementCategory: "document" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { mask: "####-####-####" }) })
451
+ ];
452
+ this.others = [
453
+ Object.assign(Object.assign({ elementTitle: "Gender", elementType: "gender", isElement: true, elementCategory: "others" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) })
454
+ ];
455
+ this.templates = [
456
+ Object.assign(Object.assign({ elementTitle: "PAN with NSDL", elementType: "pan_with_nsdl", isElement: true, elementCategory: "template" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) })
457
+ ];
458
+ this.elementMapping = {
459
+ basic: ["text", "radio"],
460
+ documents: ["aadhaar-number"],
461
+ others: [],
462
+ templates: []
440
463
  };
441
- this.inputComponent = {
442
- case: "default",
464
+ }
465
+ return Elements;
466
+ }());
467
+
468
+ function revisedRandId() {
469
+ return Math.random()
470
+ .toString(36)
471
+ .replace(/[^a-z]+/g, "");
472
+ }
473
+
474
+ var BasicTextConfigEditor = /** @class */ (function () {
475
+ function BasicTextConfigEditor() {
476
+ this.saveBasicClickCounter = 0;
477
+ this.elementConfig = {
478
+ properties: {
479
+ case: "default"
480
+ }
481
+ };
482
+ this.updateElement = new i0.EventEmitter();
483
+ this.basicTextFormGroup = undefined;
484
+ }
485
+ BasicTextConfigEditor.prototype.ngOnInit = function () {
486
+ this.createBasicTextFormGroup();
487
+ };
488
+ BasicTextConfigEditor.prototype.ngOnChanges = function (changes) {
489
+ var verifyChange = function (key) {
490
+ return changes.hasOwnProperty(key) && !changes[key].firstChange;
491
+ };
492
+ if (verifyChange("elementConfig")) {
493
+ this.elementConfig = changes.elementConfig.currentValue;
494
+ this.createBasicTextFormGroup();
495
+ }
496
+ if (verifyChange("saveBasicClickCounter")) {
497
+ if (changes.saveBasicClickCounter.previousValue !==
498
+ changes.saveBasicClickCounter.currentValue) {
499
+ this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
500
+ this.handleOnSave();
501
+ }
502
+ }
503
+ };
504
+ BasicTextConfigEditor.prototype.createBasicTextFormGroup = function () {
505
+ this.basicTextFormGroup = new i1.FormGroup({
506
+ properties: new i1.FormGroup({
507
+ case: new i1.FormControl(this.elementConfig.properties.case, {
508
+ updateOn: "change"
509
+ })
510
+ })
511
+ });
512
+ this.basicTextFormGroup.updateValueAndValidity();
513
+ };
514
+ BasicTextConfigEditor.prototype.handleOnSave = function () {
515
+ var basicElementConfig = this.basicTextFormGroup.getRawValue();
516
+ this.updateElement.emit({
517
+ basicElementConfig: basicElementConfig
518
+ });
519
+ };
520
+ return BasicTextConfigEditor;
521
+ }());
522
+ /** @nocollapse */ BasicTextConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicTextConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
523
+ /** @nocollapse */ BasicTextConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicTextConfigEditor, selector: "basic-text-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"basicTextFormGroup\">\n <fieldset formGroupName=\"properties\">\n <legend>Miscellaneous</legend>\n <div class=\"form-group\">\n <label for=\"basic-text-config-case\">Case</label>\n <select\n class=\"form-control\"\n formControlName=\"case\"\n id=\"basic-text-config-case\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select Case</option\n >\n <option\n *ngFor=\"let case of ['default', 'upper', 'lower']\"\n [ngValue]=\"case\"\n >\n {{ case }}\n </option>\n </select>\n </div>\n </fieldset>\n </form>\n ", isInline: true, styles: [""], directives: [{ type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i1__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
524
+ __decorate([
525
+ kwikidToolkit.logMethod
526
+ ], BasicTextConfigEditor.prototype, "ngOnInit", null);
527
+ __decorate([
528
+ kwikidToolkit.logMethod
529
+ ], BasicTextConfigEditor.prototype, "ngOnChanges", null);
530
+ __decorate([
531
+ kwikidToolkit.logMethod
532
+ ], BasicTextConfigEditor.prototype, "createBasicTextFormGroup", null);
533
+ __decorate([
534
+ kwikidToolkit.logMethod
535
+ ], BasicTextConfigEditor.prototype, "handleOnSave", null);
536
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicTextConfigEditor, decorators: [{
537
+ type: i0.Component,
538
+ args: [{
539
+ selector: "basic-text-config-editor",
540
+ template: "\n <form [formGroup]=\"basicTextFormGroup\">\n <fieldset formGroupName=\"properties\">\n <legend>Miscellaneous</legend>\n <div class=\"form-group\">\n <label for=\"basic-text-config-case\">Case</label>\n <select\n class=\"form-control\"\n formControlName=\"case\"\n id=\"basic-text-config-case\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select Case</option\n >\n <option\n *ngFor=\"let case of ['default', 'upper', 'lower']\"\n [ngValue]=\"case\"\n >\n {{ case }}\n </option>\n </select>\n </div>\n </fieldset>\n </form>\n ",
541
+ styles: [""]
542
+ }]
543
+ }], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
544
+ type: i0.Input
545
+ }], elementConfig: [{
546
+ type: i0.Input
547
+ }], updateElement: [{
548
+ type: i0.Output
549
+ }], ngOnInit: [], ngOnChanges: [], createBasicTextFormGroup: [], handleOnSave: [] } });
550
+
551
+ var BasicRadioConfigEditor = /** @class */ (function () {
552
+ function BasicRadioConfigEditor() {
553
+ this.optionType = {
554
+ label: "",
443
555
  disabled: false,
444
- focus: false,
445
- id: "id",
446
- invalid: false,
447
- label: "label",
448
- placeholder: "placeholder",
449
- type: "text",
556
+ description: ""
557
+ };
558
+ this.saveBasicClickCounter = 0;
559
+ this.elementConfig = {
560
+ properties: {
561
+ orientation: "horizontal"
562
+ },
563
+ options: []
564
+ };
565
+ this.updateElement = new i0.EventEmitter();
566
+ this.basicRadioFormGroup = undefined;
567
+ }
568
+ BasicRadioConfigEditor.prototype.ngOnInit = function () {
569
+ this.createBasicRadioFormGroup();
570
+ };
571
+ BasicRadioConfigEditor.prototype.ngOnChanges = function (changes) {
572
+ var verifyChange = function (key) {
573
+ return changes.hasOwnProperty(key) && !changes[key].firstChange;
574
+ };
575
+ if (verifyChange("elementConfig")) {
576
+ this.elementConfig = changes.elementConfig.currentValue;
577
+ this.createBasicRadioFormGroup();
578
+ }
579
+ if (verifyChange("saveBasicClickCounter")) {
580
+ if (changes.saveBasicClickCounter.previousValue !==
581
+ changes.saveBasicClickCounter.currentValue) {
582
+ this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
583
+ this.handleOnSave();
584
+ }
585
+ }
586
+ };
587
+ BasicRadioConfigEditor.prototype.createBasicRadioFormGroup = function () {
588
+ var e_1, _a;
589
+ var optionsFormArray = [];
590
+ this.elementConfig = kwikidToolkit.setMissingKeyValue(this.elementConfig, "options", [
591
+ this.optionType
592
+ ]);
593
+ try {
594
+ for (var _b = __values(this.elementConfig.options), _c = _b.next(); !_c.done; _c = _b.next()) {
595
+ var option = _c.value;
596
+ optionsFormArray.push(this.createOptionConfigFormGroup(option));
597
+ }
598
+ }
599
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
600
+ finally {
601
+ try {
602
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
603
+ }
604
+ finally { if (e_1) throw e_1.error; }
605
+ }
606
+ this.basicRadioFormGroup = new i1.FormGroup({
607
+ properties: new i1.FormGroup({
608
+ orientation: new i1.FormControl(this.elementConfig.properties.orientation, {
609
+ updateOn: "change"
610
+ })
611
+ }),
612
+ options: new i1.FormArray(optionsFormArray)
613
+ });
614
+ this.basicRadioFormGroup.updateValueAndValidity();
615
+ };
616
+ BasicRadioConfigEditor.prototype.handleOnSave = function () {
617
+ var basicElementConfig = this.basicRadioFormGroup.getRawValue();
618
+ this.updateElement.emit({
619
+ basicElementConfig: basicElementConfig
620
+ });
621
+ };
622
+ Object.defineProperty(BasicRadioConfigEditor.prototype, "optionsArray", {
623
+ get: function () {
624
+ return this.basicRadioFormGroup.get("options");
625
+ },
626
+ enumerable: false,
627
+ configurable: true
628
+ });
629
+ BasicRadioConfigEditor.prototype.createOptionConfigFormGroup = function (optionConfig) {
630
+ var optionFormGroup = new i1.FormGroup({
631
+ label: new i1.FormControl(optionConfig.label, {
632
+ updateOn: "change"
633
+ }),
634
+ disabled: new i1.FormControl(optionConfig.disabled, {
635
+ updateOn: "change"
636
+ }),
637
+ description: new i1.FormControl(optionConfig.description, {
638
+ updateOn: "change"
639
+ })
640
+ });
641
+ return optionFormGroup;
642
+ };
643
+ BasicRadioConfigEditor.prototype.addOption = function () {
644
+ var options = this.basicRadioFormGroup.get("options");
645
+ options.push(this.createOptionConfigFormGroup(this.optionType));
646
+ };
647
+ BasicRadioConfigEditor.prototype.removeOption = function (optionIndex) {
648
+ var options = this.basicRadioFormGroup.get("options");
649
+ if (options.length > 1) {
650
+ options.removeAt(optionIndex);
651
+ }
652
+ else {
653
+ this.addOption();
654
+ // options.reset();
655
+ }
656
+ };
657
+ return BasicRadioConfigEditor;
658
+ }());
659
+ /** @nocollapse */ BasicRadioConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicRadioConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
660
+ /** @nocollapse */ BasicRadioConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicRadioConfigEditor, selector: "basic-radio-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"basicRadioFormGroup\">\n <fieldset formArrayName=\"options\">\n <legend>Options</legend>\n <ng-container\n *ngFor=\"let option of optionsArray.controls; let i = index\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"form-group\">\n <label for=\"basic-radio-config-placeholder\">label</label>\n <input\n class=\"form-control\"\n formControlName=\"label\"\n id=\"basic-radio-config-placeholder\"\n type=\"text\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-radio-config-disabled\">disabled</label>\n <select\n class=\"form-control\"\n formControlName=\"disabled\"\n id=\"basic-radio-config-disabled\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select Disability</option\n >\n <option\n *ngFor=\"let disabled of [true, false]\"\n [ngValue]=\"disabled\"\n >\n {{ disabled }}\n </option>\n </select>\n </div>\n <div class=\"form-group\">\n <label for=\"basic-radio-config-description\">description</label>\n <input\n class=\"form-control\"\n formControlName=\"description\"\n id=\"basic-radio-config-description\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"form-array-actions\">\n <button (click)=\"removeOption(i)\">Remove</button>\n <button (click)=\"addOption()\">Add</button>\n </div>\n </ng-container>\n </fieldset>\n <fieldset formGroupName=\"properties\">\n <legend>Miscellaneous</legend>\n <div class=\"form-group\">\n <label for=\"basic-radio-config-orientation\">Orientation</label>\n <select\n class=\"form-control\"\n formControlName=\"orientation\"\n id=\"basic-radio-config-orientation\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select Orientation</option\n >\n <option\n *ngFor=\"let orientation of ['horizontal', 'vertical']\"\n [ngValue]=\"orientation\"\n >\n {{ orientation }}\n </option>\n </select>\n </div>\n </fieldset>\n </form>\n ", isInline: true, styles: ["\n .form-array-actions {\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n }\n "], directives: [{ type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i1__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
661
+ __decorate([
662
+ kwikidToolkit.logMethod
663
+ ], BasicRadioConfigEditor.prototype, "ngOnInit", null);
664
+ __decorate([
665
+ kwikidToolkit.logMethod
666
+ ], BasicRadioConfigEditor.prototype, "ngOnChanges", null);
667
+ __decorate([
668
+ kwikidToolkit.logMethod
669
+ ], BasicRadioConfigEditor.prototype, "createBasicRadioFormGroup", null);
670
+ __decorate([
671
+ kwikidToolkit.logMethod
672
+ ], BasicRadioConfigEditor.prototype, "handleOnSave", null);
673
+ __decorate([
674
+ kwikidToolkit.logMethod
675
+ ], BasicRadioConfigEditor.prototype, "createOptionConfigFormGroup", null);
676
+ __decorate([
677
+ kwikidToolkit.logMethod
678
+ ], BasicRadioConfigEditor.prototype, "addOption", null);
679
+ __decorate([
680
+ kwikidToolkit.logMethod
681
+ ], BasicRadioConfigEditor.prototype, "removeOption", null);
682
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicRadioConfigEditor, decorators: [{
683
+ type: i0.Component,
684
+ args: [{
685
+ selector: "basic-radio-config-editor",
686
+ template: "\n <form [formGroup]=\"basicRadioFormGroup\">\n <fieldset formArrayName=\"options\">\n <legend>Options</legend>\n <ng-container\n *ngFor=\"let option of optionsArray.controls; let i = index\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"form-group\">\n <label for=\"basic-radio-config-placeholder\">label</label>\n <input\n class=\"form-control\"\n formControlName=\"label\"\n id=\"basic-radio-config-placeholder\"\n type=\"text\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-radio-config-disabled\">disabled</label>\n <select\n class=\"form-control\"\n formControlName=\"disabled\"\n id=\"basic-radio-config-disabled\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select Disability</option\n >\n <option\n *ngFor=\"let disabled of [true, false]\"\n [ngValue]=\"disabled\"\n >\n {{ disabled }}\n </option>\n </select>\n </div>\n <div class=\"form-group\">\n <label for=\"basic-radio-config-description\">description</label>\n <input\n class=\"form-control\"\n formControlName=\"description\"\n id=\"basic-radio-config-description\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"form-array-actions\">\n <button (click)=\"removeOption(i)\">Remove</button>\n <button (click)=\"addOption()\">Add</button>\n </div>\n </ng-container>\n </fieldset>\n <fieldset formGroupName=\"properties\">\n <legend>Miscellaneous</legend>\n <div class=\"form-group\">\n <label for=\"basic-radio-config-orientation\">Orientation</label>\n <select\n class=\"form-control\"\n formControlName=\"orientation\"\n id=\"basic-radio-config-orientation\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select Orientation</option\n >\n <option\n *ngFor=\"let orientation of ['horizontal', 'vertical']\"\n [ngValue]=\"orientation\"\n >\n {{ orientation }}\n </option>\n </select>\n </div>\n </fieldset>\n </form>\n ",
687
+ styles: [
688
+ "\n .form-array-actions {\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n }\n "
689
+ ]
690
+ }]
691
+ }], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
692
+ type: i0.Input
693
+ }], elementConfig: [{
694
+ type: i0.Input
695
+ }], updateElement: [{
696
+ type: i0.Output
697
+ }], ngOnInit: [], ngOnChanges: [], createBasicRadioFormGroup: [], handleOnSave: [], createOptionConfigFormGroup: [], addOption: [], removeOption: [] } });
698
+
699
+ var BasicElementConfigEditor = /** @class */ (function () {
700
+ function BasicElementConfigEditor() {
701
+ this.saveClickCounter = 0;
702
+ this.elementConfig = {
703
+ label: "",
704
+ key: "",
705
+ disabled: false,
706
+ default: {
707
+ value: true
708
+ },
450
709
  validators: {
710
+ min: null,
711
+ max: null,
712
+ minLength: null,
713
+ maxLength: null,
451
714
  required: true
715
+ },
716
+ properties: {
717
+ placeholder: "",
718
+ readOnly: false
452
719
  }
453
720
  };
454
- this.formGroup = new i6.FormGroup({});
455
- this.name = "Angular " + i0.VERSION.major;
456
- this.menu = [
457
- {
458
- title: "button",
459
- key: "button",
460
- component: i2.KwikUIButtonComponent,
461
- props: this.buttonComponent
462
- },
463
- {
464
- title: "progress-segmented",
465
- key: "progress_segmented",
466
- component: i2.KwikUIProgressSegmentedComponent,
467
- props: this.progressSegmentedComponent
468
- },
469
- {
470
- title: "input",
471
- key: "input",
472
- component: i2.KwikUIInputComponent,
473
- props: this.inputComponent
721
+ this.updateElement = new i0.EventEmitter();
722
+ this.elementType = "";
723
+ this.saveBasicClickCounter = 0;
724
+ this.basicFormGroup = undefined;
725
+ }
726
+ BasicElementConfigEditor.prototype.ngOnInit = function () {
727
+ this.assignVariables();
728
+ this.createBasicFormGroup();
729
+ };
730
+ BasicElementConfigEditor.prototype.ngOnChanges = function (changes) {
731
+ var verifyChange = function (key) {
732
+ return changes.hasOwnProperty(key) && !changes[key].firstChange;
733
+ };
734
+ if (verifyChange("elementConfig")) {
735
+ this.elementConfig = changes.elementConfig.currentValue;
736
+ this.assignVariables();
737
+ this.createBasicFormGroup();
738
+ }
739
+ if (verifyChange("saveClickCounter")) {
740
+ if (changes.saveClickCounter.previousValue !==
741
+ changes.saveClickCounter.currentValue) {
742
+ this.saveClickCounter = changes.saveClickCounter.currentValue;
743
+ this.handleOnSave();
474
744
  }
475
- ];
476
- this.table = [];
745
+ }
746
+ };
747
+ BasicElementConfigEditor.prototype.assignVariables = function () {
748
+ this.elementType = this.elementConfig.elementType;
749
+ };
750
+ BasicElementConfigEditor.prototype.createBasicFormGroup = function () {
751
+ this.basicFormGroup = new i1.FormGroup({
752
+ label: new i1.FormControl(this.elementConfig.label),
753
+ key: new i1.FormControl(this.elementConfig.key),
754
+ disabled: new i1.FormControl(this.elementConfig.disabled),
755
+ default: new i1.FormGroup({
756
+ value: new i1.FormControl(this.elementConfig.default.value, {
757
+ updateOn: "change"
758
+ })
759
+ }),
760
+ validators: new i1.FormGroup({
761
+ min: new i1.FormControl(this.elementConfig.validators.min, {
762
+ updateOn: "change"
763
+ }),
764
+ minLength: new i1.FormControl(this.elementConfig.validators.minLength, {
765
+ updateOn: "change"
766
+ }),
767
+ max: new i1.FormControl(this.elementConfig.validators.max, {
768
+ updateOn: "change"
769
+ }),
770
+ maxLength: new i1.FormControl(this.elementConfig.validators.maxLength, {
771
+ updateOn: "change"
772
+ }),
773
+ required: new i1.FormControl(this.elementConfig.validators.required, {
774
+ updateOn: "change"
775
+ })
776
+ }),
777
+ properties: new i1.FormGroup({
778
+ placeholder: new i1.FormControl(this.elementConfig.properties.placeholder, {
779
+ updateOn: "change"
780
+ }),
781
+ readOnly: new i1.FormControl(this.elementConfig.properties.readOnly, {
782
+ updateOn: "change"
783
+ })
784
+ })
785
+ });
786
+ this.basicFormGroup.updateValueAndValidity();
787
+ };
788
+ BasicElementConfigEditor.prototype.handleOnSaveUpdateElement = function (event) {
789
+ // Get Common Config
790
+ var basicElementCommonConfig = this.basicFormGroup.getRawValue();
791
+ basicElementCommonConfig.key = basicElementCommonConfig.key.replace(/\s/g, "_");
792
+ // Get Basic Element Config
793
+ var basicElementConfig = event.basicElementConfig;
794
+ this.elementConfig = ___default["default"].merge(this.elementConfig, basicElementCommonConfig, basicElementConfig);
795
+ this.updateElement.emit({ elementConfig: this.elementConfig });
796
+ };
797
+ BasicElementConfigEditor.prototype.handleOnSave = function () {
798
+ this.saveBasicClickCounter++;
799
+ };
800
+ return BasicElementConfigEditor;
801
+ }());
802
+ /** @nocollapse */ BasicElementConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicElementConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
803
+ /** @nocollapse */ BasicElementConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicElementConfigEditor, selector: "basic-element-config-editor", inputs: { saveClickCounter: "saveClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <table>\n <tr>\n <td>Id</td>\n <td>{{ elementConfig.elementId }}</td>\n </tr>\n <tr>\n <td>Type</td>\n <td>{{ elementConfig.elementType }}</td>\n </tr>\n <tr>\n <td>Category</td>\n <td>{{ elementConfig.elementCategory }}</td>\n </tr>\n </table>\n </ng-container>\n <form [formGroup]=\"basicFormGroup\">\n <fieldset>\n <legend>Standard</legend>\n <div class=\"form-group\">\n <label for=\"basic-field-label\">Label</label>\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"basic-field-label\"\n formControlName=\"label\"\n required\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-field-key\">Key</label>\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"basic-field-key\"\n formControlName=\"key\"\n required\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-property-disabled\">disabled</label>\n <select\n class=\"form-control\"\n formControlName=\"disabled\"\n id=\"basic-input-property-disabled\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select either true or false</option\n >\n <option\n *ngFor=\"let disabled of [true, false]\"\n [ngValue]=\"disabled\"\n >\n {{ disabled }}\n </option>\n </select>\n </div>\n </fieldset>\n <fieldset formGroupName=\"default\">\n <legend>Default</legend>\n <div class=\"form-group\">\n <label for=\"basic-input-property-value\">value</label>\n <select\n class=\"form-control\"\n formControlName=\"value\"\n id=\"basic-input-property-value\"\n >\n <option\n [ngValue]=\"null\"\n value\n >Select either true or false</option\n >\n <option\n *ngFor=\"let value of [true, false]\"\n [ngValue]=\"value\"\n >\n {{ value }}\n </option>\n </select>\n </div>\n </fieldset>\n <fieldset formGroupName=\"validators\">\n <legend>Validators</legend>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-min\">min</label>\n <input\n class=\"form-control\"\n formControlName=\"min\"\n id=\"basic-input-validators-min\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-max\">max</label>\n <input\n class=\"form-control\"\n formControlName=\"max\"\n id=\"basic-input-validators-max\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-minLength\">minLength</label>\n <input\n class=\"form-control\"\n formControlName=\"minLength\"\n id=\"basic-input-validators-minLength\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-maxLength\">maxLength</label>\n <input\n class=\"form-control\"\n formControlName=\"maxLength\"\n id=\"basic-input-validators-maxLength\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-property-required\">required</label>\n <select\n class=\"form-control\"\n formControlName=\"required\"\n id=\"basic-input-property-required\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select either true or false</option\n >\n <option\n *ngFor=\"let required of [true, false]\"\n [ngValue]=\"required\"\n >\n {{ required }}\n </option>\n </select>\n </div>\n </fieldset>\n <fieldset formGroupName=\"properties\">\n <legend>Properties</legend>\n <div class=\"form-group\">\n <label for=\"basic-input-property-placeholder\">Placeholder</label>\n <input\n class=\"form-control\"\n formControlName=\"placeholder\"\n id=\"basic-input-property-placeholder\"\n type=\"text\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-property-readonly\">readOnly</label>\n <select\n class=\"form-control\"\n formControlName=\"readOnly\"\n id=\"basic-input-property-readonly\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select either true or false</option\n >\n <option\n *ngFor=\"let readonly of [true, false]\"\n [ngValue]=\"readonly\"\n >\n {{ readonly }}\n </option>\n </select>\n </div>\n </fieldset>\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <basic-text-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-text-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <basic-radio-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-radio-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ", isInline: true, styles: ["\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "], components: [{ type: BasicTextConfigEditor, selector: "basic-text-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicRadioConfigEditor, selector: "basic-radio-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i1__namespace.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
804
+ __decorate([
805
+ kwikidToolkit.logMethod
806
+ ], BasicElementConfigEditor.prototype, "ngOnInit", null);
807
+ __decorate([
808
+ kwikidToolkit.logMethod
809
+ ], BasicElementConfigEditor.prototype, "ngOnChanges", null);
810
+ __decorate([
811
+ kwikidToolkit.logMethod
812
+ ], BasicElementConfigEditor.prototype, "assignVariables", null);
813
+ __decorate([
814
+ kwikidToolkit.logMethod
815
+ ], BasicElementConfigEditor.prototype, "createBasicFormGroup", null);
816
+ __decorate([
817
+ kwikidToolkit.logMethod
818
+ ], BasicElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
819
+ __decorate([
820
+ kwikidToolkit.logMethod
821
+ ], BasicElementConfigEditor.prototype, "handleOnSave", null);
822
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicElementConfigEditor, decorators: [{
823
+ type: i0.Component,
824
+ args: [{
825
+ selector: "basic-element-config-editor",
826
+ template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <table>\n <tr>\n <td>Id</td>\n <td>{{ elementConfig.elementId }}</td>\n </tr>\n <tr>\n <td>Type</td>\n <td>{{ elementConfig.elementType }}</td>\n </tr>\n <tr>\n <td>Category</td>\n <td>{{ elementConfig.elementCategory }}</td>\n </tr>\n </table>\n </ng-container>\n <form [formGroup]=\"basicFormGroup\">\n <fieldset>\n <legend>Standard</legend>\n <div class=\"form-group\">\n <label for=\"basic-field-label\">Label</label>\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"basic-field-label\"\n formControlName=\"label\"\n required\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-field-key\">Key</label>\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"basic-field-key\"\n formControlName=\"key\"\n required\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-property-disabled\">disabled</label>\n <select\n class=\"form-control\"\n formControlName=\"disabled\"\n id=\"basic-input-property-disabled\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select either true or false</option\n >\n <option\n *ngFor=\"let disabled of [true, false]\"\n [ngValue]=\"disabled\"\n >\n {{ disabled }}\n </option>\n </select>\n </div>\n </fieldset>\n <fieldset formGroupName=\"default\">\n <legend>Default</legend>\n <div class=\"form-group\">\n <label for=\"basic-input-property-value\">value</label>\n <select\n class=\"form-control\"\n formControlName=\"value\"\n id=\"basic-input-property-value\"\n >\n <option\n [ngValue]=\"null\"\n value\n >Select either true or false</option\n >\n <option\n *ngFor=\"let value of [true, false]\"\n [ngValue]=\"value\"\n >\n {{ value }}\n </option>\n </select>\n </div>\n </fieldset>\n <fieldset formGroupName=\"validators\">\n <legend>Validators</legend>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-min\">min</label>\n <input\n class=\"form-control\"\n formControlName=\"min\"\n id=\"basic-input-validators-min\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-max\">max</label>\n <input\n class=\"form-control\"\n formControlName=\"max\"\n id=\"basic-input-validators-max\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-minLength\">minLength</label>\n <input\n class=\"form-control\"\n formControlName=\"minLength\"\n id=\"basic-input-validators-minLength\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-validators-maxLength\">maxLength</label>\n <input\n class=\"form-control\"\n formControlName=\"maxLength\"\n id=\"basic-input-validators-maxLength\"\n type=\"number\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-property-required\">required</label>\n <select\n class=\"form-control\"\n formControlName=\"required\"\n id=\"basic-input-property-required\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select either true or false</option\n >\n <option\n *ngFor=\"let required of [true, false]\"\n [ngValue]=\"required\"\n >\n {{ required }}\n </option>\n </select>\n </div>\n </fieldset>\n <fieldset formGroupName=\"properties\">\n <legend>Properties</legend>\n <div class=\"form-group\">\n <label for=\"basic-input-property-placeholder\">Placeholder</label>\n <input\n class=\"form-control\"\n formControlName=\"placeholder\"\n id=\"basic-input-property-placeholder\"\n type=\"text\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"basic-input-property-readonly\">readOnly</label>\n <select\n class=\"form-control\"\n formControlName=\"readOnly\"\n id=\"basic-input-property-readonly\"\n >\n <option\n [ngValue]=\"null\"\n disabled\n >Select either true or false</option\n >\n <option\n *ngFor=\"let readonly of [true, false]\"\n [ngValue]=\"readonly\"\n >\n {{ readonly }}\n </option>\n </select>\n </div>\n </fieldset>\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <basic-text-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-text-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <basic-radio-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-radio-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ",
827
+ styles: [
828
+ "\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "
829
+ ]
830
+ }]
831
+ }], ctorParameters: function () { return []; }, propDecorators: { saveClickCounter: [{
832
+ type: i0.Input
833
+ }], elementConfig: [{
834
+ type: i0.Input
835
+ }], updateElement: [{
836
+ type: i0.Output
837
+ }], ngOnInit: [], ngOnChanges: [], assignVariables: [], createBasicFormGroup: [], handleOnSaveUpdateElement: [], handleOnSave: [] } });
838
+
839
+ var ElementConfigEditor = /** @class */ (function () {
840
+ function ElementConfigEditor() {
841
+ this.formKey = "";
842
+ this.elementConfig = undefined;
843
+ this.updateElement = new i0.EventEmitter();
844
+ this.elementType = "";
845
+ this.elementCategory = "";
846
+ this.elementEditorFormGroup = undefined;
847
+ this.saveClickCounter = 0;
848
+ }
849
+ ElementConfigEditor.prototype.ngOnInit = function () { };
850
+ ElementConfigEditor.prototype.ngOnChanges = function (changes) {
851
+ var verifyChange = function (key) {
852
+ return changes.hasOwnProperty(key) && !changes[key].firstChange;
853
+ };
854
+ if (verifyChange("formKey")) {
855
+ this.formKey = changes.formKey.currentValue;
856
+ }
857
+ if (verifyChange("elementConfig")) {
858
+ this.elementConfig = changes.elementConfig.currentValue;
859
+ if (this.elementConfig !== undefined) {
860
+ this.elementType = this.elementConfig.elementType;
861
+ this.elementCategory = this.elementConfig.elementCategory;
862
+ }
863
+ else {
864
+ throw new Error("'elementConfig' doesn't have 'elementType'");
865
+ }
866
+ }
867
+ };
868
+ ElementConfigEditor.prototype.updateFormGroup = function () {
869
+ this.elementEditorFormGroup = new i1.FormGroup({
870
+ properties: new i1.FormGroup({
871
+ orientation: new i1.FormControl(this.elementConfig.properties.orientation, {
872
+ updateOn: "change"
873
+ })
874
+ })
875
+ });
876
+ this.elementEditorFormGroup.updateValueAndValidity();
877
+ };
878
+ ElementConfigEditor.prototype.handleOnSaveUpdateElement = function (event) {
879
+ this.updateElement.emit(event);
880
+ };
881
+ ElementConfigEditor.prototype.handleOnClickSave = function () {
882
+ this.saveClickCounter++;
883
+ };
884
+ return ElementConfigEditor;
885
+ }());
886
+ /** @nocollapse */ ElementConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ElementConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
887
+ /** @nocollapse */ ElementConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ElementConfigEditor, selector: "element-config-editor", inputs: { formKey: "formKey", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"container\" *ngIf=\"elementConfig\">\n <div class=\"element-config-editor-header\">\n '{{ elementConfig.elementType }}' Element Config Editor\n </div>\n <div class=\"element-config-editor-body\"\n ><ng-container [ngSwitch]=\"elementCategory\">\n <!-- Basic -->\n <ng-container *ngSwitchCase=\"'basic'\">\n <basic-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-element-config-editor>\n </ng-container>\n </ng-container>\n </div>\n <div class=\"element-config-editor-footer\">\n <button\n class=\"save-button\"\n type=\"submit\"\n (click)=\"handleOnClickSave()\"\n >\n Save\n </button></div\n >\n</div>\n", styles: ["form{display:flex;align-content:center;justify-content:flex-start;flex:1;flex-direction:column;align-items:stretch;grid-gap:1rem;gap:1rem}.form-group{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:.25rem;gap:.25rem}.container{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem}.container .element-config-editor-footer{display:flex;flex-direction:row;align-items:center;justify-content:center;align-content:center;grid-gap:1rem;gap:1rem}\n", "kwikid-forms-builder button{align-content:center;align-items:center;background:black;border-color:transparent;box-shadow:0 2px 10px -6px #000;border-radius:1rem;color:#fff;cursor:pointer;display:flex;flex-direction:row;justify-content:center;padding:.5rem;transform:scale(1);transition:.05s ease-in}kwikid-forms-builder button:hover{box-shadow:0 2px 10px -5px #000}kwikid-forms-builder button:active{transform:scale(.98);transition:.05s ease-out}kwikid-forms-builder fieldset{display:flex;flex-direction:column;justify-content:center;align-items:stretch;align-content:center;grid-gap:.5rem;gap:.5rem;padding:.5rem 1rem 1rem;box-shadow:0 2px 10px -6px #000;border:1px solid gray}kwikid-forms-builder input,kwikid-forms-builder select{flex:1;width:100%;border:1px solid black;outline:none;padding:.25rem;overflow-x:auto}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}\n"], components: [{ type: BasicElementConfigEditor, selector: "basic-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
888
+ __decorate([
889
+ kwikidToolkit.logMethod
890
+ ], ElementConfigEditor.prototype, "ngOnInit", null);
891
+ __decorate([
892
+ kwikidToolkit.logMethod
893
+ ], ElementConfigEditor.prototype, "ngOnChanges", null);
894
+ __decorate([
895
+ kwikidToolkit.logMethod
896
+ ], ElementConfigEditor.prototype, "updateFormGroup", null);
897
+ __decorate([
898
+ kwikidToolkit.logMethod
899
+ ], ElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
900
+ __decorate([
901
+ kwikidToolkit.logMethod
902
+ ], ElementConfigEditor.prototype, "handleOnClickSave", null);
903
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ElementConfigEditor, decorators: [{
904
+ type: i0.Component,
905
+ args: [{
906
+ selector: "element-config-editor",
907
+ templateUrl: "./element-config-editor.component.html",
908
+ styleUrls: [
909
+ "./element-config-editor.component.scss",
910
+ "../shared/shared.scss"
911
+ ],
912
+ encapsulation: i0.ViewEncapsulation.None
913
+ }]
914
+ }], ctorParameters: function () { return []; }, propDecorators: { formKey: [{
915
+ type: i0.Input
916
+ }], elementConfig: [{
917
+ type: i0.Input
918
+ }], updateElement: [{
919
+ type: i0.Output
920
+ }], ngOnInit: [], ngOnChanges: [], updateFormGroup: [], handleOnSaveUpdateElement: [], handleOnClickSave: [] } });
921
+
922
+ var KwikIDFormsBuilderComponent = /** @class */ (function () {
923
+ function KwikIDFormsBuilderComponent() {
924
+ var _this = this;
925
+ this.formKey = "";
926
+ this.formTitle = "";
927
+ this.builderFormGroup = undefined;
928
+ this.basicElements = new Elements().basic;
929
+ this.documentElements = new Elements().documents;
930
+ this.otherElements = new Elements().others;
931
+ this.templateElements = new Elements().templates;
932
+ this.elementsMapping = new Elements().elementMapping;
933
+ this.formElementsDragList = [];
934
+ this.formElementsDropList = [];
935
+ this.elementEditorElementConfig = undefined;
936
+ this.builderFormGroup = new i1.FormGroup({
937
+ formKey: new i1.FormControl("", [i1.Validators.required]),
938
+ formTitle: new i1.FormControl("", [i1.Validators.required])
939
+ });
940
+ var formDropConfig = kwikidToolkit.getObjectFromLocalStorage("formDropConfig");
941
+ if (kwikidToolkit.isNotEmptyValue(formDropConfig)) {
942
+ this.formKey = formDropConfig.key;
943
+ this.formTitle = formDropConfig.title;
944
+ var formFields = formDropConfig.fields.map(function (item) {
945
+ item.elementId = revisedRandId();
946
+ item.elementCategory = _this.elementsMapping.basic.includes(item.type)
947
+ ? "basic"
948
+ : _this.elementsMapping.documents.includes(item.type)
949
+ ? "document"
950
+ : "others";
951
+ item.elementType =
952
+ item.elementCategory === "basic" ||
953
+ item.elementCategory === "document"
954
+ ? item.type
955
+ : String("NA<>" + item.type);
956
+ item.isElement = true;
957
+ var elementFiltered = item.elementCategory === "basic"
958
+ ? _this.basicElements.find(function (element) { return element.elementType === item.type; })
959
+ : item.elementCategory === "document"
960
+ ? _this.documentElements.find(function (element) { return element.elementType === item.type; })
961
+ : item.elementCategory === "others"
962
+ ? _this.otherElements.find(function (element) { return element.elementType === item.type; })
963
+ : undefined;
964
+ console.log(elementFiltered);
965
+ item.elementTitle = kwikidToolkit.isEmptyValue(elementFiltered)
966
+ ? item.elementCategory + "::" + item.elementType
967
+ : elementFiltered.elementTitle;
968
+ return item;
969
+ });
970
+ this.formElementsDropList = formFields;
971
+ console.log(formFields);
972
+ }
477
973
  }
478
974
  KwikIDFormsBuilderComponent.prototype.ngOnInit = function () {
479
975
  var e_1, _a;
976
+ this.formElementsDragList = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
977
+ { isElement: false, elementTitle: "Basic Elements" }
978
+ ], __read(this.basicElements)), [
979
+ { isElement: false, elementTitle: "Document Elements" }
980
+ ]), __read(this.documentElements)), [
981
+ { isElement: false, elementTitle: "Other Elements" }
982
+ ]), __read(this.otherElements));
480
983
  try {
481
- for (var _b = __values(this.menu), _c = _b.next(); !_c.done; _c = _b.next()) {
482
- var m = _c.value;
483
- m.id = this.revisedRandId();
984
+ for (var _b = __values(this.formElementsDragList), _c = _b.next(); !_c.done; _c = _b.next()) {
985
+ var formElementsDragItem = _c.value;
986
+ formElementsDragItem.elementId = revisedRandId();
484
987
  }
485
988
  }
486
989
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -491,85 +994,201 @@
491
994
  finally { if (e_1) throw e_1.error; }
492
995
  }
493
996
  };
494
- KwikIDFormsBuilderComponent.prototype.revisedRandId = function () {
495
- return Math.random()
496
- .toString(36)
497
- .replace(/[^a-z]+/g, "");
498
- };
499
997
  KwikIDFormsBuilderComponent.prototype.handleOnChange = function (event, id, key, idx) {
500
998
  var _value = event.target.value;
501
- this.formGroup.controls[id]["controls"][key].patchValue(_value);
502
999
  };
503
- KwikIDFormsBuilderComponent.prototype.toggleShow = function (id) {
504
- console.log(id);
1000
+ // DOM Event Handlers
1001
+ KwikIDFormsBuilderComponent.prototype.handleGetKeyValue = function (e) {
1002
+ var _a;
1003
+ this.builderFormGroup.patchValue((_a = {},
1004
+ _a[e.key] = e.value,
1005
+ _a), { emitEvent: false });
505
1006
  };
506
- KwikIDFormsBuilderComponent.prototype.drop = function (event) {
1007
+ KwikIDFormsBuilderComponent.prototype.drop = function (event, elementCategory) {
507
1008
  // let item = JSON.parse(JSON.stringify(event));
508
1009
  if (event.previousContainer !== event.container) {
509
1010
  console.log("copying");
510
- // Clone the item that was dropped.
511
- var clone = lodash.cloneDeep(event.previousContainer.data[event.previousIndex]);
512
- clone.id = clone.key + "__" + this.revisedRandId();
513
- event.previousContainer.data[event.previousIndex] = clone;
514
- var newFormGroup_1 = new i6.FormGroup({});
515
- var props_1 = clone.props;
516
- Object.keys(props_1).forEach(function (key) {
517
- newFormGroup_1.addControl(key, new i6.FormControl({ value: props_1[key], disabled: false }));
518
- });
519
- this.formGroup.addControl(clone.id, newFormGroup_1);
520
- dragDrop.copyArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
1011
+ if (event.item.data.isElement) {
1012
+ // Clone the item that was dropped.
1013
+ var draggedItemIndex = this.formElementsDragList.findIndex(function (item) {
1014
+ return item.elementId === event.item.data.elementId;
1015
+ });
1016
+ i4.copyArrayItem(this.formElementsDragList, this.formElementsDropList, draggedItemIndex, event.currentIndex);
1017
+ this.formElementsDragList = JSON.parse(JSON.stringify(this.formElementsDragList.map(function (item) {
1018
+ item.elementId = revisedRandId();
1019
+ return item;
1020
+ })));
1021
+ }
521
1022
  }
522
1023
  else {
523
1024
  console.log("moving");
524
- dragDrop.moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
525
- }
526
- if (event.previousContainer.data) {
527
- this.menu = this.menu.filter(function (f) { return !f.temp; });
1025
+ i4.moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
528
1026
  }
529
1027
  };
530
- KwikIDFormsBuilderComponent.prototype.exited = function (event) {
531
- var currentIdx = event.container.data.findIndex(function (f) { return f.id === event.item.data.id; });
532
- this.menu.splice(currentIdx + 1, 0, Object.assign(Object.assign({}, event.item.data), { temp: true }));
533
- };
534
- KwikIDFormsBuilderComponent.prototype.entered = function () {
535
- this.menu = this.menu.filter(function (f) { return !f.temp; });
536
- };
537
- KwikIDFormsBuilderComponent.prototype.isNumber = function (val) {
538
- return typeof val;
1028
+ KwikIDFormsBuilderComponent.prototype.exit = function (event, elementCategory) { };
1029
+ KwikIDFormsBuilderComponent.prototype.enter = function (event, elementCategory) { };
1030
+ /** Predicate function that only allows isElement: true items to be dropped into a list. */
1031
+ KwikIDFormsBuilderComponent.prototype.isElementPredicate = function (item) {
1032
+ return item.data.isElement;
539
1033
  };
540
1034
  KwikIDFormsBuilderComponent.prototype.removeElement = function (idx, id) {
541
- this.formGroup.removeControl(id);
542
- this.table.splice(idx, 1);
1035
+ this.formElementsDropList.splice(idx, 1);
543
1036
  };
544
- KwikIDFormsBuilderComponent.prototype.getJSON = function () {
545
- var e_2, _a;
546
- try {
547
- for (var _b = __values(this.table), _c = _b.next(); !_c.done; _c = _b.next()) {
548
- var t = _c.value;
549
- t.props = this.formGroup.getRawValue()[t.id];
550
- }
1037
+ KwikIDFormsBuilderComponent.prototype.editElement = function (idx, item) {
1038
+ this.elementEditorElementConfig = item;
1039
+ };
1040
+ KwikIDFormsBuilderComponent.prototype.handleOnSaveUpdateElement = function (event) { };
1041
+ KwikIDFormsBuilderComponent.prototype.handleOnClickSaveForms = function (event) {
1042
+ var _this = this;
1043
+ if (kwikidToolkit.isEmptyValue(this.formKey)) {
1044
+ window.alert("Please provide Form Key");
1045
+ return;
551
1046
  }
552
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
553
- finally {
554
- try {
555
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
556
- }
557
- finally { if (e_2) throw e_2.error; }
1047
+ else {
1048
+ this.formKey = this.formKey.replace(/\s/g, "_").toLocaleUpperCase();
1049
+ }
1050
+ if (kwikidToolkit.isEmptyValue(this.formTitle)) {
1051
+ window.alert("Please provide Form Title");
1052
+ return;
558
1053
  }
559
- console.log(this.table);
1054
+ var finalFields = JSON.parse(JSON.stringify(this.formElementsDropList));
1055
+ finalFields = finalFields.map(function (item) {
1056
+ if (item.elementType.startsWith("NA<>", 0)) {
1057
+ delete item.elementId;
1058
+ delete item.elementType;
1059
+ delete item.elementTitle;
1060
+ delete item.elementCategory;
1061
+ delete item.isElement;
1062
+ return item;
1063
+ }
1064
+ delete item.elementId;
1065
+ delete item.elementType;
1066
+ delete item.elementTitle;
1067
+ delete item.elementCategory;
1068
+ delete item.isElement;
1069
+ if (item.default.value) {
1070
+ item.default = {
1071
+ value: {
1072
+ is_found: false,
1073
+ value: "",
1074
+ sources: [
1075
+ {
1076
+ key: "OBJECT",
1077
+ props: {
1078
+ object: {
1079
+ key: "ALL_FORMS_DATA",
1080
+ path: String("$." + _this.formKey + "." + item.key)
1081
+ }
1082
+ },
1083
+ value: "",
1084
+ validation: {
1085
+ is_valid: false,
1086
+ triggers: ["ON_INIT"],
1087
+ rules: [
1088
+ {
1089
+ id: "1",
1090
+ key: "VALUE_CHECK",
1091
+ props: {
1092
+ value: {
1093
+ source: {
1094
+ key: "OBJECT",
1095
+ props: {
1096
+ object: {
1097
+ key: "ALL_FORMS_DATA",
1098
+ path: String("$." + _this.formKey + "." + item.key)
1099
+ }
1100
+ }
1101
+ }
1102
+ },
1103
+ pattern: { key: "IS_NOT_EMPTY" }
1104
+ }
1105
+ }
1106
+ ],
1107
+ actions: [
1108
+ {
1109
+ id: "1",
1110
+ key: "SET_FIELD_DEFAULT_VALUE",
1111
+ condition: "1",
1112
+ props: {
1113
+ fieldKey: String("" + item.key),
1114
+ value: {
1115
+ source: {
1116
+ key: "OBJECT",
1117
+ props: {
1118
+ object: {
1119
+ key: "ALL_FORMS_DATA",
1120
+ path: String("$." + _this.formKey + "." + item.key)
1121
+ }
1122
+ }
1123
+ }
1124
+ }
1125
+ }
1126
+ }
1127
+ ]
1128
+ }
1129
+ }
1130
+ ]
1131
+ }
1132
+ };
1133
+ }
1134
+ else {
1135
+ item.default = {
1136
+ value: {
1137
+ is_found: false,
1138
+ value: "",
1139
+ sources: []
1140
+ }
1141
+ };
1142
+ }
1143
+ return item;
1144
+ });
1145
+ var finalFormConfig = {
1146
+ key: this.formKey,
1147
+ title: this.formTitle,
1148
+ fields: finalFields
1149
+ };
1150
+ localStorage.setItem("rendererFormConfig", JSON.stringify(finalFormConfig));
1151
+ localStorage.setItem("builderFormConfig", JSON.stringify({
1152
+ key: this.formKey,
1153
+ title: this.formTitle,
1154
+ fields: this.formElementsDropList
1155
+ }));
1156
+ console.log(finalFormConfig);
1157
+ console.log(this.formElementsDropList);
560
1158
  };
561
1159
  return KwikIDFormsBuilderComponent;
562
1160
  }());
563
1161
  /** @nocollapse */ KwikIDFormsBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsBuilderComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
564
- /** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0__namespace, template: "<!-- <div>{{ name }}</div>\n<p>Start editing to see some magic happen :)</p>\n\n<button (click)=\"getJSON()\">Get JSON</button>\n\n<div class=\"drap-copy\">\n <div>\n <ul\n class=\"menu\"\n cdkDropList\n #menuList=\"cdkDropList\"\n [cdkDropListData]=\"menu\"\n cdkDropListSortingDisabled\n [cdkDropListConnectedTo]=\"[tableList]\"\n (cdkDropListDropped)=\"drop($event)\"\n (cdkDropListExited)=\"exited($event)\"\n (cdkDropListEntered)=\"entered()\"\n >\n <li class=\"item\" *ngFor=\"let item of menu\" cdkDrag [cdkDragData]=\"item\">\n <div class=\"item\" *cdkDragPlaceholder>\n <a>{{ item.title }}</a>\n </div>\n <ng-container *ngComponentOutlet=\"item.component\"> </ng-container>\n </li>\n </ul>\n </div>\n\n <div\n class=\"table\"\n cdkDropList\n #tableList=\"cdkDropList\"\n [cdkDropListData]=\"table\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n <div class=\"content\">\n <div>\n <div class=\"item\" *ngFor=\"let item of table; let idx = index\" cdkDrag>\n <ng-container *ngComponentOutlet=\"item.component\"> </ng-container>\n <div class=\"item-header\">\n <p>{{ idx }}--{{ item.title }}</p>\n <button (click)=\"removeElement(idx, item.id)\">Remove</button>\n </div>\n <div class=\"desc\">\n <div>id - {{ item.id }}</div>\n <div>key - {{ item.key }}</div>\n </div>\n <ng-container\n *ngTemplateOutlet=\"formModal; context: item\"\n ></ng-container>\n </div>\n </div>\n </div>\n </div>\n</div>\n<ng-template #formModal let-component=\"component\" let-props=\"props\" let-id=\"id\">\n <div class=\"field_editor\">\n <div *ngFor=\"let i of props | keyvalue; let idx = index\">\n <div class=\"formModalInputGroup\">\n <label>{{ i.key }}</label>\n <input\n value=\"{{ i.value }}\"\n (keyup)=\"handleOnChange($event, id, i.key, idx)\"\n />\n </div>\n </div>\n </div>\n</ng-template> -->\n", styles: [":host{--padding: 1rem;--border: 1px solid #e8e8e8}ul,li{list-style:none}*{margin:0;padding:0}p{font-family:Lato}.item{margin-bottom:12px;padding:var(--padding);border:var(--border);background:#fff;cursor:move;display:flex;flex-direction:column;grid-row-gap:.5rem;row-gap:.5rem}.item-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;grid-column-gap:.5rem;column-gap:.5rem}.table,.menu{padding:var(--padding)}.drap-copy{display:flex;border:var(--border)}.drap-copy>div{flex:1}.drap-copy>div:first-child{border-right:var(--border)}.desc{display:flex;justify-content:space-between;font-size:1em;color:#00000073}.field_editor{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;grid-row-gap:.5rem;row-gap:.5rem}.formModalInputGroup{display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;grid-column-gap:.5rem;column-gap:.5rem}\n"] });
1162
+ /** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0__namespace, template: "<div class=\"container\">\n <div class=\"wrapper\">\n <div class=\"builder-header\">\n <div class=\"builder-title\">KwikID Form Builder</div>\n <form\n [formGroup]=\"builderFormGroup\"\n class=\"builder-form\"\n >\n <kwikui-input\n [label]=\"'Form Key'\"\n [id]=\"'form_key'\"\n [type]=\"'text'\"\n [formControlName]=\"'formKey'\"\n [formControl]=\"builderFormGroup.controls['formKey']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter a Form Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'upper'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-input\n [label]=\"'Form Title'\"\n [id]=\"'form_title'\"\n [type]=\"'text'\"\n [formControlName]=\"'formTitle'\"\n [formControl]=\"builderFormGroup.controls['formTitle']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter a Form Title'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-button\n [disabled]=\"builderFormGroup.valid\"\n id=\"save_form_btn\"\n label=\"Save Form\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"'rounded'\"\n size=\"m\"\n (onClick)=\"handleOnClickSaveForms($event)\"\n ></kwikui-button>\n </form>\n </div>\n <div class=\"builder-body\">\n <div class=\"form-elements-drag-wrapper\">\n <div\n class=\"form-elements-drag\"\n cdkDropList\n [cdkDropListData]=\"formElementsDragList\"\n cdkDropListSortingDisabled\n [cdkDropListConnectedTo]=\"[formElementsList]\"\n (cdkDropListExited)=\"exit($event, 'other')\"\n (cdkDropListEntered)=\"enter($event, 'other')\"\n >\n <ng-container\n *ngFor=\"let formElementDragItem of formElementsDragList\"\n >\n <ng-container *ngIf=\"formElementDragItem.isElement\">\n <div\n class=\"form-element-drag\"\n cdkDrag\n [cdkDragData]=\"formElementDragItem\"\n >\n &#8942;&#8942;&nbsp;&nbsp;{{ formElementDragItem.elementTitle }}\n <!-- <ng-container *ngComponentOutlet=\"formElementDragItem.component\"></ng-container> -->\n </div>\n <div\n class=\"form-element-drag\"\n *cdkDragPlaceholder\n >\n {{ formElementDragItem.elementTitle }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"!formElementDragItem.isElement\">\n <div class=\"form-element-category\">\n {{ formElementDragItem.elementTitle }}\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div\n class=\"form-elements-drop-wrapper\"\n cdkDropList\n #formElementsList=\"cdkDropList\"\n [cdkDropListData]=\"formElementsDropList\"\n (cdkDropListDropped)=\"drop($event, '')\"\n [cdkDropListEnterPredicate]=\"isElementPredicate\"\n >\n <ng-container\n *ngFor=\"\n let formElementDropItem of formElementsDropList;\n let idx = index\n \"\n >\n <div\n class=\"form-drop-element\"\n cdkDrag\n >\n <div class=\"form-drop-element-grab-symbol\">&#8942;&#8942;</div>\n <div class=\"form-drop-element-main\">\n <div class=\"form-drop-element-header\">\n <div class=\"form-drop-element-title\">\n {{ formElementDropItem.elementTitle }}\n </div>\n <div class=\"form-drop-element-actions\">\n <kwikui-button-icon\n [disabled]=\"false\"\n [id]=\"'edit-element'\"\n [showLoader]=\"false\"\n [styles]=\"\"\n [class]=\"\"\n [type]=\"'button'\"\n [appearance]=\"'secondary'\"\n [icon]=\"'tuiIconEdit'\"\n [shape]=\"'rounded'\"\n [size]=\"'s'\"\n (onClick)=\"editElement(idx, formElementDropItem)\"\n ></kwikui-button-icon>\n <kwikui-button-icon\n [disabled]=\"false\"\n [id]=\"'remove-element'\"\n [showLoader]=\"false\"\n [styles]=\"\"\n [class]=\"\"\n [type]=\"'button'\"\n [appearance]=\"'accent'\"\n [icon]=\"'tuiIconCloseLarge'\"\n [shape]=\"'rounded'\"\n [size]=\"'s'\"\n (onClick)=\"removeElement(idx, formElementDropItem)\"\n ></kwikui-button-icon>\n <!-- <button\n (click)=\"editElement(idx, formElementDropItem)\"\n title=\"edit element properties\"\n >\n &#9998;\n </button>\n <button\n (click)=\"removeElement(idx, formElementDropItem)\"\n title=\"delete element\"\n >\n &#10006;\n </button> -->\n </div>\n </div>\n <div class=\"form-drop-element-body\"> </div>\n <div class=\"form-drop-element-footer\">\n <div class=\"form-drop-element-id\">\n {{ formElementDropItem.elementId }}\n </div>\n <div class=\"form-drop-element-category\">\n {{ formElementDropItem.elementCategory }}\n </div>\n <div class=\"form-drop-element-type\">\n {{ formElementDropItem.elementType }}\n </div>\n </div>\n <div\n class=\"example-custom-placeholder\"\n *cdkDragPlaceholder\n ></div>\n <!-- <ng-container *ngComponentOutlet=\"formElementDropItem.component\"> </ng-container> -->\n <!-- <ng-container *ngTemplateOutlet=\"formModal; context: formElementDropItem\"></ng-container> -->\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"element-property-editor-wrapper\">\n <element-config-editor\n [elementConfig]=\"elementEditorElementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></element-config-editor>\n </div>\n </div>\n <div class=\"builder-footer\"> &copy; Baiju Dodhia, KwikID </div>\n </div>\n</div>\n", styles: ["kwikid-forms-builder button{align-content:center;align-items:center;background:black;border-color:transparent;box-shadow:0 2px 10px -6px #000;border-radius:1rem;color:#fff;cursor:pointer;display:flex;flex-direction:row;justify-content:center;padding:.5rem;transform:scale(1);transition:.05s ease-in}kwikid-forms-builder button:hover{box-shadow:0 2px 10px -5px #000}kwikid-forms-builder button:active{transform:scale(.98);transition:.05s ease-out}kwikid-forms-builder fieldset{display:flex;flex-direction:column;justify-content:center;align-items:stretch;align-content:center;grid-gap:.5rem;gap:.5rem;padding:.5rem 1rem 1rem;box-shadow:0 2px 10px -6px #000;border:1px solid gray}kwikid-forms-builder input,kwikid-forms-builder select{flex:1;width:100%;border:1px solid black;outline:none;padding:.25rem;overflow-x:auto}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}\n", ":host{all:unset;position:relative;width:100%;height:100%}.container{width:100%;height:100%;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.container .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.container .wrapper .builder-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:max-content;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.container .wrapper .builder-header .builder-title{font-weight:bold;display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center}.container .wrapper .builder-header .builder-form{display:flex;align-content:center;justify-content:flex-end;flex:1;flex-direction:row;align-items:center;grid-gap:1rem;gap:1rem;width:100%}.container .wrapper .builder-header .builder-form kwikui-input{width:16rem}.container .wrapper .builder-body{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:stretch;grid-gap:1rem;gap:1rem;flex:1;padding:1rem;overflow:auto}.container .wrapper .builder-body>*{width:100%;border:1px solid lightgray;overflow:auto;box-shadow:0 2px 10px -6px #000}.container .wrapper .builder-body .form-elements-drag-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;padding:1rem;min-width:16rem;max-width:16rem}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;border-bottom:none}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag .form-element-drag{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:1rem;gap:1rem;border:1px solid lightgray;padding:1rem;cursor:grab;box-shadow:0 2px 10px -6px #000;text-transform:capitalize}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag .form-element-category{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:1rem;gap:1rem;border-left:.25rem solid blue;padding:.5rem;background:lightblue}.container .wrapper .builder-body .form-elements-drop-wrapper{padding:1rem;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;min-width:20rem;max-width:28rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder{display:flex;justify-content:flex-start;justify-items:start;align-items:center;padding:1rem;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000;cursor:grab;flex-direction:row;position:relative;grid-gap:1rem;gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main{flex:1;display:flex;justify-content:space-between;justify-items:start;align-items:stretch;flex-direction:column;width:100%;grid-gap:.5rem;gap:.5rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button{width:1.6rem;height:1.6rem;transform:rotate(90deg)!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:first-child,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:first-child{background-color:#dc143c!important;color:#fff!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:last-child,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:last-child{background-color:gray!important;color:#fff!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-body,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-body{border-top:1px dashed lightgray;border-bottom:1px dashed lightgray}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:.5rem;gap:.5rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-id,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-id{background:orange;padding:0 5px;border-radius:1rem;color:#fff}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-category,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-category{background:blue;padding:0 5px;border-radius:1rem;color:#fff}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-type,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-type{background:green;padding:0 5px;border-radius:1rem;color:#fff}.container .wrapper .builder-body .element-property-editor-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;padding:1rem;min-width:20rem;grid-gap:1rem;gap:1rem}.container .wrapper .builder-footer{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:30px;border:1px solid lightgray;box-shadow:0 -2px 10px -6px #000;font-weight:bold}.cdk-drag-preview{width:-moz-fit-content;width:fit-content;height:auto;box-sizing:border-box;background-color:transparent;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;cursor:grabbing}.cdk-drag-placeholder{opacity:1}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], components: [{ type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: ElementConfigEditor, selector: "element-config-editor", inputs: ["formKey", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i4__namespace.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
1163
+ __decorate([
1164
+ kwikidToolkit.logMethod
1165
+ ], KwikIDFormsBuilderComponent.prototype, "handleGetKeyValue", null);
1166
+ __decorate([
1167
+ kwikidToolkit.logMethod
1168
+ ], KwikIDFormsBuilderComponent.prototype, "drop", null);
1169
+ __decorate([
1170
+ kwikidToolkit.logMethod
1171
+ ], KwikIDFormsBuilderComponent.prototype, "exit", null);
1172
+ __decorate([
1173
+ kwikidToolkit.logMethod
1174
+ ], KwikIDFormsBuilderComponent.prototype, "enter", null);
1175
+ __decorate([
1176
+ kwikidToolkit.logMethod
1177
+ ], KwikIDFormsBuilderComponent.prototype, "removeElement", null);
1178
+ __decorate([
1179
+ kwikidToolkit.logMethod
1180
+ ], KwikIDFormsBuilderComponent.prototype, "editElement", null);
1181
+ __decorate([
1182
+ kwikidToolkit.logMethod
1183
+ ], KwikIDFormsBuilderComponent.prototype, "handleOnSaveUpdateElement", null);
565
1184
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsBuilderComponent, decorators: [{
566
1185
  type: i0.Component,
567
1186
  args: [{
568
1187
  selector: "kwikid-forms-builder",
569
1188
  templateUrl: "./builder.component.html",
570
- styleUrls: ["./builder.component.scss"]
1189
+ styleUrls: ["shared/shared.scss", "./builder.component.scss"]
571
1190
  }]
572
- }], ctorParameters: function () { return []; } });
1191
+ }], ctorParameters: function () { return []; }, propDecorators: { handleGetKeyValue: [], drop: [], exit: [], enter: [], removeElement: [], editElement: [], handleOnSaveUpdateElement: [] } });
573
1192
 
574
1193
  var EActionKey;
575
1194
  (function (EActionKey) {
@@ -997,38 +1616,38 @@
997
1616
  if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
998
1617
  kwikidToolkit.checkObjectKeyExists(field.validators, "min") &&
999
1618
  kwikidToolkit.isNotEmptyValue(field.validators.min)) {
1000
- validators.push(i6.Validators.min(field.validators.min));
1619
+ validators.push(i1.Validators.min(field.validators.min));
1001
1620
  }
1002
1621
  if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
1003
1622
  kwikidToolkit.checkObjectKeyExists(field.validators, "max") &&
1004
1623
  kwikidToolkit.isNotEmptyValue(field.validators.max)) {
1005
- validators.push(i6.Validators.max(field.validators.max));
1624
+ validators.push(i1.Validators.max(field.validators.max));
1006
1625
  }
1007
1626
  if ((kwikidToolkit.checkObjectKeyExists(field, "required") && field.required) ||
1008
1627
  (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
1009
1628
  kwikidToolkit.checkObjectKeyExists(field.validators, "required") &&
1010
1629
  field.validators.required)) {
1011
- validators.push(i6.Validators.required);
1630
+ validators.push(i1.Validators.required);
1012
1631
  }
1013
1632
  if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
1014
1633
  kwikidToolkit.checkObjectKeyExists(field.validators, "minLength") &&
1015
1634
  kwikidToolkit.isNotEmptyValue(field.validators.minLength)) {
1016
- validators.push(i6.Validators.minLength(field.validators.minLength));
1635
+ validators.push(i1.Validators.minLength(field.validators.minLength));
1017
1636
  }
1018
1637
  if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
1019
1638
  kwikidToolkit.checkObjectKeyExists(field.validators, "maxLength") &&
1020
1639
  kwikidToolkit.isNotEmptyValue(field.validators.maxLength)) {
1021
- validators.push(i6.Validators.maxLength(field.validators.maxLength));
1640
+ validators.push(i1.Validators.maxLength(field.validators.maxLength));
1022
1641
  }
1023
1642
  if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
1024
1643
  kwikidToolkit.checkObjectKeyExists(field.validators, "pattern") &&
1025
1644
  kwikidToolkit.isNotEmptyValue(field.validators.pattern)) {
1026
1645
  if (kwikidToolkit.checkObjectKeyExists(field.validators.pattern, "key")) {
1027
1646
  if (field.validators.pattern.key === "CUSTOM") {
1028
- validators.push(i6.Validators.pattern(field.validators.pattern.pattern));
1647
+ validators.push(i1.Validators.pattern(field.validators.pattern.pattern));
1029
1648
  }
1030
1649
  else {
1031
- validators.push(i6.Validators.pattern(kwikidToolkit.PATTERNS[field.validators.pattern.key]));
1650
+ validators.push(i1.Validators.pattern(kwikidToolkit.PATTERNS[field.validators.pattern.key]));
1032
1651
  }
1033
1652
  }
1034
1653
  }
@@ -1069,10 +1688,10 @@
1069
1688
  invalid: false
1070
1689
  });
1071
1690
  }
1072
- if (control instanceof i6.FormGroup) {
1691
+ if (control instanceof i1.FormGroup) {
1073
1692
  recursiveFunc(control);
1074
1693
  }
1075
- else if (control instanceof i6.FormArray) {
1694
+ else if (control instanceof i1.FormArray) {
1076
1695
  recursiveFunc(control);
1077
1696
  }
1078
1697
  });
@@ -1103,7 +1722,7 @@
1103
1722
  return __generator(this, function (_b) {
1104
1723
  switch (_b.label) {
1105
1724
  case 0:
1106
- formGroup = new i6.FormGroup({});
1725
+ formGroup = new i1.FormGroup({});
1107
1726
  _b.label = 1;
1108
1727
  case 1:
1109
1728
  _b.trys.push([1, 8, 9, 10]);
@@ -1127,7 +1746,7 @@
1127
1746
  case 5:
1128
1747
  value = convertFormFieldValueToKwikUIFormat(field, value);
1129
1748
  validators = new FormValidation().getFormFieldValidators(field);
1130
- formGroup.addControl(field.key, new i6.FormControl({ value: value, disabled: field.disabled }, { validators: validators }));
1749
+ formGroup.addControl(field.key, new i1.FormControl({ value: value, disabled: field.disabled }, { validators: validators }));
1131
1750
  _b.label = 6;
1132
1751
  case 6:
1133
1752
  fields_1_1 = fields_1.next();
@@ -1446,6 +2065,8 @@
1446
2065
  switch (_f.label) {
1447
2066
  case 0:
1448
2067
  headers = this._request.headers;
2068
+ if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/, 11];
2069
+ if (!kwikidToolkit.checkObjectKeyExists(this._request.headers, "validation")) return [3 /*break*/, 9];
1449
2070
  validation = headers.validation;
1450
2071
  triggers = validation.triggers;
1451
2072
  rules = validation.rules;
@@ -1481,6 +2102,10 @@
1481
2102
  finally { if (e_8) throw e_8.error; }
1482
2103
  return [7 /*endfinally*/];
1483
2104
  case 8: return [2 /*return*/, this._object.FIELD_CONFIG];
2105
+ case 9: return [2 /*return*/, this._object.FIELD_CONFIG];
2106
+ case 10: return [3 /*break*/, 12];
2107
+ case 11: return [2 /*return*/, this._object.FIELD_CONFIG];
2108
+ case 12: return [2 /*return*/];
1484
2109
  }
1485
2110
  });
1486
2111
  });
@@ -1563,21 +2188,20 @@
1563
2188
  };
1564
2189
  return SafeHtmlPipe;
1565
2190
  }());
1566
- /** @nocollapse */ SafeHtmlPipe$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe$1, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
2191
+ /** @nocollapse */ SafeHtmlPipe$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe$1, deps: [{ token: i1__namespace$1.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1567
2192
  /** @nocollapse */ SafeHtmlPipe$1.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe$1, name: "safeHtml" });
1568
2193
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe$1, decorators: [{
1569
2194
  type: i0.Pipe,
1570
2195
  args: [{
1571
2196
  name: "safeHtml"
1572
2197
  }]
1573
- }], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; } });
2198
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.DomSanitizer }]; } });
1574
2199
 
1575
2200
  var KwikIDFormViewComponent = /** @class */ (function () {
1576
2201
  function KwikIDFormViewComponent(push, alert, formViewService) {
1577
2202
  this.push = push;
1578
2203
  this.alert = alert;
1579
2204
  this.formViewService = formViewService;
1580
- this.apiCallResponse = {};
1581
2205
  this.isMobileView = false;
1582
2206
  this.onClickViewForms = new i0.EventEmitter();
1583
2207
  this.onClickSaveForm = new i0.EventEmitter();
@@ -1595,14 +2219,14 @@
1595
2219
  disabled: false,
1596
2220
  showLoader: false
1597
2221
  };
1598
- this.formGroup = new i6.FormGroup({});
2222
+ this.formGroup = new i1.FormGroup({});
1599
2223
  this.showErrorNotification = false;
1600
2224
  }
1601
2225
  KwikIDFormViewComponent.prototype.ngOnInit = function () {
1602
2226
  var _this = this;
1603
2227
  (function () { return __awaiter(_this, void 0, void 0, function () {
1604
- return __generator(this, function (_b) {
1605
- switch (_b.label) {
2228
+ return __generator(this, function (_h) {
2229
+ switch (_h.label) {
1606
2230
  case 0:
1607
2231
  this.formsList = this.formsList.filter(function (form) {
1608
2232
  if (kwikidToolkit.checkObjectKeyExists(form, "hidden")) {
@@ -1614,7 +2238,7 @@
1614
2238
  this.formsListLength = this.findFormsListLength(this.formsList);
1615
2239
  return [4 /*yield*/, this.initFormConfig(this.formConfig)];
1616
2240
  case 1:
1617
- _b.sent();
2241
+ _h.sent();
1618
2242
  this.loading = false;
1619
2243
  return [2 /*return*/];
1620
2244
  }
@@ -1623,7 +2247,6 @@
1623
2247
  };
1624
2248
  KwikIDFormViewComponent.prototype.ngAfterViewInit = function () { };
1625
2249
  KwikIDFormViewComponent.prototype.ngOnChanges = function (changes) {
1626
- var _b, _c;
1627
2250
  var _this = this;
1628
2251
  var verifyChange = function (key) {
1629
2252
  return kwikidToolkit.checkObjectKeyExists(changes, key) && !changes[key].firstChange;
@@ -1631,31 +2254,6 @@
1631
2254
  if (verifyChange("formData")) {
1632
2255
  this.formData = Object.assign(Object.assign({}, this.formData), changes.formData.currentValue);
1633
2256
  }
1634
- if (verifyChange("apiCallResponse")) {
1635
- this.apiCallResponse = changes.apiCallResponse.currentValue;
1636
- this.formData = Object.assign(Object.assign({}, this.formData), (_b = {}, _b[this.apiCallResponse.key] = this.apiCallResponse.response, _b));
1637
- this.formGroup.patchValue((_c = {},
1638
- _c[this.apiCallResponse.key] = this.apiCallResponse.response,
1639
- _c), { emitEvent: false });
1640
- var field_1 = getFormFieldByKey(this.formFields, this.apiCallResponse.key);
1641
- var apis_1 = new Apis({
1642
- FIELD_CONFIG: field_1,
1643
- FORM_FIELDS: this.formFields,
1644
- FORM_DATA: this.formData,
1645
- PREVIOUS_FORM_DATA: this.previousFormData,
1646
- ALL_FORMS_DATA: this.allFormsData
1647
- }, this.takeAction.bind(this));
1648
- (function () { return __awaiter(_this, void 0, void 0, function () {
1649
- return __generator(this, function (_b) {
1650
- switch (_b.label) {
1651
- case 0: return [4 /*yield*/, apis_1.validateResponse()];
1652
- case 1:
1653
- field_1 = _b.sent();
1654
- return [2 /*return*/];
1655
- }
1656
- });
1657
- }); })();
1658
- }
1659
2257
  if (verifyChange("isMobileView")) {
1660
2258
  this.isMobileView = changes.isMobileView.currentValue;
1661
2259
  }
@@ -1675,11 +2273,11 @@
1675
2273
  if (verifyChange("formConfig")) {
1676
2274
  this.formConfig = changes.formConfig.currentValue;
1677
2275
  (function () { return __awaiter(_this, void 0, void 0, function () {
1678
- return __generator(this, function (_b) {
1679
- switch (_b.label) {
2276
+ return __generator(this, function (_h) {
2277
+ switch (_h.label) {
1680
2278
  case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
1681
2279
  case 1:
1682
- _b.sent();
2280
+ _h.sent();
1683
2281
  return [2 /*return*/];
1684
2282
  }
1685
2283
  });
@@ -1707,55 +2305,55 @@
1707
2305
  };
1708
2306
  KwikIDFormViewComponent.prototype.initFormConfig = function (formConfig) {
1709
2307
  return __awaiter(this, void 0, void 0, function () {
1710
- var _b, _loop_1, this_1, _c, _d, field, _e, _f, field, validations, e_1_1;
1711
- var e_2, _g, e_1, _h;
2308
+ var _h, _loop_1, this_1, _j, _k, field, _l, _m, field, validations, e_1_1;
2309
+ var e_2, _o, e_1, _p;
1712
2310
  var _this = this;
1713
- return __generator(this, function (_j) {
1714
- switch (_j.label) {
2311
+ return __generator(this, function (_q) {
2312
+ switch (_q.label) {
1715
2313
  case 0:
1716
2314
  this.setFormFieldsFromFormConfig(formConfig);
1717
2315
  this.setFormFieldGroupsFromFormConfig(formConfig);
1718
2316
  this.setFormDataFromAllFormsData();
1719
- _b = this;
2317
+ _h = this;
1720
2318
  return [4 /*yield*/, this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this))];
1721
2319
  case 1:
1722
- _b.formGroup = _j.sent();
2320
+ _h.formGroup = _q.sent();
1723
2321
  _loop_1 = function (field) {
1724
- var _k;
2322
+ var _r;
1725
2323
  if (field.isFormElement) {
1726
- this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_k = {}, _k[field.key] = this_1.formGroup.controls[field.key].value, _k));
2324
+ this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_r = {}, _r[field.key] = this_1.formGroup.controls[field.key].value, _r));
1727
2325
  this_1.formGroup.controls[field.key].valueChanges
1728
2326
  .pipe(operators.pairwise())
1729
- .subscribe(function (_b) {
1730
- var _c, _d;
1731
- var _e = __read(_b, 2), previousValue = _e[0], currentValue = _e[1];
1732
- _this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (_c = {}, _c[field.key] = convertFormFieldValueToStandardFormat(field, previousValue), _c));
1733
- _this.formData = Object.assign(Object.assign({}, _this.formData), (_d = {}, _d[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _d));
2327
+ .subscribe(function (_h) {
2328
+ var _j, _k;
2329
+ var _l = __read(_h, 2), previousValue = _l[0], currentValue = _l[1];
2330
+ _this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (_j = {}, _j[field.key] = convertFormFieldValueToStandardFormat(field, previousValue), _j));
2331
+ _this.formData = Object.assign(Object.assign({}, _this.formData), (_k = {}, _k[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _k));
1734
2332
  });
1735
2333
  }
1736
2334
  };
1737
2335
  this_1 = this;
1738
2336
  try {
1739
- for (_c = __values(this.formFields), _d = _c.next(); !_d.done; _d = _c.next()) {
1740
- field = _d.value;
2337
+ for (_j = __values(this.formFields), _k = _j.next(); !_k.done; _k = _j.next()) {
2338
+ field = _k.value;
1741
2339
  _loop_1(field);
1742
2340
  }
1743
2341
  }
1744
2342
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
1745
2343
  finally {
1746
2344
  try {
1747
- if (_d && !_d.done && (_g = _c.return)) _g.call(_c);
2345
+ if (_k && !_k.done && (_o = _j.return)) _o.call(_j);
1748
2346
  }
1749
2347
  finally { if (e_2) throw e_2.error; }
1750
2348
  }
1751
- _j.label = 2;
2349
+ _q.label = 2;
1752
2350
  case 2:
1753
- _j.trys.push([2, 8, 9, 10]);
1754
- _e = __values(this.formFields), _f = _e.next();
1755
- _j.label = 3;
2351
+ _q.trys.push([2, 8, 9, 10]);
2352
+ _l = __values(this.formFields), _m = _l.next();
2353
+ _q.label = 3;
1756
2354
  case 3:
1757
- if (!!_f.done) return [3 /*break*/, 7];
1758
- field = _f.value;
2355
+ if (!!_m.done) return [3 /*break*/, 7];
2356
+ field = _m.value;
1759
2357
  if (!field.isFormElement) return [3 /*break*/, 6];
1760
2358
  if (!field.validation.triggers.includes("ON_INIT")) return [3 /*break*/, 5];
1761
2359
  validations = new kwikidToolkit.Validation({
@@ -1767,8 +2365,8 @@
1767
2365
  }, this.takeAction.bind(this));
1768
2366
  return [4 /*yield*/, validations.validate(field.validation)];
1769
2367
  case 4:
1770
- _j.sent();
1771
- _j.label = 5;
2368
+ _q.sent();
2369
+ _q.label = 5;
1772
2370
  case 5:
1773
2371
  if (kwikidToolkit.checkObjectKeyExists(field, "connectedElements")) {
1774
2372
  this.handleConnectedElements({
@@ -1776,18 +2374,18 @@
1776
2374
  value: this.formGroup.controls[field.key].value
1777
2375
  }, "ON_INIT");
1778
2376
  }
1779
- _j.label = 6;
2377
+ _q.label = 6;
1780
2378
  case 6:
1781
- _f = _e.next();
2379
+ _m = _l.next();
1782
2380
  return [3 /*break*/, 3];
1783
2381
  case 7: return [3 /*break*/, 10];
1784
2382
  case 8:
1785
- e_1_1 = _j.sent();
2383
+ e_1_1 = _q.sent();
1786
2384
  e_1 = { error: e_1_1 };
1787
2385
  return [3 /*break*/, 10];
1788
2386
  case 9:
1789
2387
  try {
1790
- if (_f && !_f.done && (_h = _e.return)) _h.call(_e);
2388
+ if (_m && !_m.done && (_p = _l.return)) _p.call(_l);
1791
2389
  }
1792
2390
  finally { if (e_1) throw e_1.error; }
1793
2391
  return [7 /*endfinally*/];
@@ -1818,10 +2416,10 @@
1818
2416
  };
1819
2417
  KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroupActions = function (childFieldGroupConfig, parentField) {
1820
2418
  return __awaiter(this, void 0, void 0, function () {
1821
- var rulesMapping, _b, _c, action, conditionSuccess, actions, e_3_1;
1822
- var e_3, _d;
1823
- return __generator(this, function (_e) {
1824
- switch (_e.label) {
2419
+ var rulesMapping, _h, _j, action, conditionSuccess, actions, e_3_1;
2420
+ var e_3, _k;
2421
+ return __generator(this, function (_l) {
2422
+ switch (_l.label) {
1825
2423
  case 0:
1826
2424
  if (!kwikidToolkit.checkObjectKeyExists(childFieldGroupConfig, "rules")) return [3 /*break*/, 8];
1827
2425
  rulesMapping = new kwikidToolkit.Rule(childFieldGroupConfig.rules, {
@@ -1830,14 +2428,14 @@
1830
2428
  PREVIOUS_FORM_DATA: this.previousFormData,
1831
2429
  ALL_FORMS_DATA: this.allFormsData
1832
2430
  }).mapping();
1833
- _e.label = 1;
2431
+ _l.label = 1;
1834
2432
  case 1:
1835
- _e.trys.push([1, 6, 7, 8]);
1836
- _b = __values(childFieldGroupConfig.actions), _c = _b.next();
1837
- _e.label = 2;
2433
+ _l.trys.push([1, 6, 7, 8]);
2434
+ _h = __values(childFieldGroupConfig.actions), _j = _h.next();
2435
+ _l.label = 2;
1838
2436
  case 2:
1839
- if (!!_c.done) return [3 /*break*/, 5];
1840
- action = _c.value;
2437
+ if (!!_j.done) return [3 /*break*/, 5];
2438
+ action = _j.value;
1841
2439
  conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
1842
2440
  if (!conditionSuccess) return [3 /*break*/, 4];
1843
2441
  actions = new kwikidToolkit.Action(action, rulesMapping, {
@@ -1849,19 +2447,19 @@
1849
2447
  }, this.takeActionOnFieldGroup.bind(this));
1850
2448
  return [4 /*yield*/, actions.execute()];
1851
2449
  case 3:
1852
- _e.sent();
1853
- _e.label = 4;
2450
+ _l.sent();
2451
+ _l.label = 4;
1854
2452
  case 4:
1855
- _c = _b.next();
2453
+ _j = _h.next();
1856
2454
  return [3 /*break*/, 2];
1857
2455
  case 5: return [3 /*break*/, 8];
1858
2456
  case 6:
1859
- e_3_1 = _e.sent();
2457
+ e_3_1 = _l.sent();
1860
2458
  e_3 = { error: e_3_1 };
1861
2459
  return [3 /*break*/, 8];
1862
2460
  case 7:
1863
2461
  try {
1864
- if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
2462
+ if (_j && !_j.done && (_k = _h.return)) _k.call(_h);
1865
2463
  }
1866
2464
  finally { if (e_3) throw e_3.error; }
1867
2465
  return [7 /*endfinally*/];
@@ -1872,15 +2470,15 @@
1872
2470
  };
1873
2471
  KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroup = function (currentField, connectedFieldGroupConfig, eventType) {
1874
2472
  return __awaiter(this, void 0, void 0, function () {
1875
- return __generator(this, function (_b) {
1876
- switch (_b.label) {
2473
+ return __generator(this, function (_h) {
2474
+ switch (_h.label) {
1877
2475
  case 0:
1878
2476
  if (!kwikidToolkit.checkObjectKeyExists(connectedFieldGroupConfig, "triggers")) return [3 /*break*/, 2];
1879
2477
  if (!connectedFieldGroupConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
1880
2478
  return [4 /*yield*/, this.handleConnectedElementFieldGroupActions(connectedFieldGroupConfig, currentField)];
1881
2479
  case 1:
1882
- _b.sent();
1883
- _b.label = 2;
2480
+ _h.sent();
2481
+ _h.label = 2;
1884
2482
  case 2: return [2 /*return*/];
1885
2483
  }
1886
2484
  });
@@ -1888,10 +2486,10 @@
1888
2486
  };
1889
2487
  KwikIDFormViewComponent.prototype.handleConnectedElementFieldActions = function (connectedFieldConfig, connectedField) {
1890
2488
  return __awaiter(this, void 0, void 0, function () {
1891
- var rulesMapping, _b, _c, action, conditionSuccess, actions, e_4_1;
1892
- var e_4, _d;
1893
- return __generator(this, function (_e) {
1894
- switch (_e.label) {
2489
+ var rulesMapping, _h, _j, action, conditionSuccess, actions, e_4_1;
2490
+ var e_4, _k;
2491
+ return __generator(this, function (_l) {
2492
+ switch (_l.label) {
1895
2493
  case 0:
1896
2494
  if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "rules")) return [3 /*break*/, 8];
1897
2495
  rulesMapping = new kwikidToolkit.Rule(connectedFieldConfig.rules, {
@@ -1900,14 +2498,14 @@
1900
2498
  PREVIOUS_FORM_DATA: this.previousFormData,
1901
2499
  ALL_FORMS_DATA: this.allFormsData
1902
2500
  }).mapping();
1903
- _e.label = 1;
2501
+ _l.label = 1;
1904
2502
  case 1:
1905
- _e.trys.push([1, 6, 7, 8]);
1906
- _b = __values(connectedFieldConfig.actions), _c = _b.next();
1907
- _e.label = 2;
2503
+ _l.trys.push([1, 6, 7, 8]);
2504
+ _h = __values(connectedFieldConfig.actions), _j = _h.next();
2505
+ _l.label = 2;
1908
2506
  case 2:
1909
- if (!!_c.done) return [3 /*break*/, 5];
1910
- action = _c.value;
2507
+ if (!!_j.done) return [3 /*break*/, 5];
2508
+ action = _j.value;
1911
2509
  conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
1912
2510
  if (!conditionSuccess) return [3 /*break*/, 4];
1913
2511
  actions = new kwikidToolkit.Action(action, rulesMapping, {
@@ -1919,19 +2517,19 @@
1919
2517
  }, this.takeAction.bind(this));
1920
2518
  return [4 /*yield*/, actions.execute()];
1921
2519
  case 3:
1922
- _e.sent();
1923
- _e.label = 4;
2520
+ _l.sent();
2521
+ _l.label = 4;
1924
2522
  case 4:
1925
- _c = _b.next();
2523
+ _j = _h.next();
1926
2524
  return [3 /*break*/, 2];
1927
2525
  case 5: return [3 /*break*/, 8];
1928
2526
  case 6:
1929
- e_4_1 = _e.sent();
2527
+ e_4_1 = _l.sent();
1930
2528
  e_4 = { error: e_4_1 };
1931
2529
  return [3 /*break*/, 8];
1932
2530
  case 7:
1933
2531
  try {
1934
- if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
2532
+ if (_j && !_j.done && (_k = _h.return)) _k.call(_h);
1935
2533
  }
1936
2534
  finally { if (e_4) throw e_4.error; }
1937
2535
  return [7 /*endfinally*/];
@@ -1943,16 +2541,16 @@
1943
2541
  KwikIDFormViewComponent.prototype.handleConnectedElementFields = function (currentField, connectedFieldConfig, eventType, nested) {
1944
2542
  return __awaiter(this, void 0, void 0, function () {
1945
2543
  var connectedField;
1946
- return __generator(this, function (_b) {
1947
- switch (_b.label) {
2544
+ return __generator(this, function (_h) {
2545
+ switch (_h.label) {
1948
2546
  case 0:
1949
2547
  connectedField = getFormFieldByKey(this.formFields, connectedFieldConfig["key"]);
1950
2548
  if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "triggers")) return [3 /*break*/, 2];
1951
2549
  if (!connectedFieldConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
1952
2550
  return [4 /*yield*/, this.handleConnectedElementFieldActions(connectedFieldConfig, connectedField)];
1953
2551
  case 1:
1954
- connectedField = _b.sent();
1955
- _b.label = 2;
2552
+ connectedField = _h.sent();
2553
+ _h.label = 2;
1956
2554
  case 2:
1957
2555
  if (kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "handleNestedFields")) {
1958
2556
  if (connectedFieldConfig.handleNestedFields) {
@@ -1967,67 +2565,67 @@
1967
2565
  KwikIDFormViewComponent.prototype.handleConnectedElements = function (e, eventType) {
1968
2566
  return __awaiter(this, void 0, void 0, function () {
1969
2567
  var currentField, connectedFieldGroups, connectedFieldGroups_1, connectedFieldGroups_1_1, connectedFieldGroupConfig, e_5_1, connectedFields, connectedFields_1, connectedFields_1_1, connectedFieldConfig, e_6_1;
1970
- var e_5, _b, e_6, _c;
1971
- return __generator(this, function (_d) {
1972
- switch (_d.label) {
2568
+ var e_5, _h, e_6, _j;
2569
+ return __generator(this, function (_k) {
2570
+ switch (_k.label) {
1973
2571
  case 0:
1974
2572
  currentField = getFormFieldByKey(this.formFields, e.key);
1975
2573
  if (!(currentField !== undefined)) return [3 /*break*/, 17];
1976
2574
  if (!kwikidToolkit.checkObjectKeyExists(currentField, "connectedElements")) return [3 /*break*/, 16];
1977
2575
  if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFieldGroups")) return [3 /*break*/, 8];
1978
2576
  connectedFieldGroups = currentField.connectedElements.connectedFieldGroups;
1979
- _d.label = 1;
2577
+ _k.label = 1;
1980
2578
  case 1:
1981
- _d.trys.push([1, 6, 7, 8]);
2579
+ _k.trys.push([1, 6, 7, 8]);
1982
2580
  connectedFieldGroups_1 = __values(connectedFieldGroups), connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
1983
- _d.label = 2;
2581
+ _k.label = 2;
1984
2582
  case 2:
1985
2583
  if (!!connectedFieldGroups_1_1.done) return [3 /*break*/, 5];
1986
2584
  connectedFieldGroupConfig = connectedFieldGroups_1_1.value;
1987
2585
  return [4 /*yield*/, this.handleConnectedElementFieldGroup(currentField, connectedFieldGroupConfig, eventType)];
1988
2586
  case 3:
1989
- _d.sent();
1990
- _d.label = 4;
2587
+ _k.sent();
2588
+ _k.label = 4;
1991
2589
  case 4:
1992
2590
  connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
1993
2591
  return [3 /*break*/, 2];
1994
2592
  case 5: return [3 /*break*/, 8];
1995
2593
  case 6:
1996
- e_5_1 = _d.sent();
2594
+ e_5_1 = _k.sent();
1997
2595
  e_5 = { error: e_5_1 };
1998
2596
  return [3 /*break*/, 8];
1999
2597
  case 7:
2000
2598
  try {
2001
- if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (_b = connectedFieldGroups_1.return)) _b.call(connectedFieldGroups_1);
2599
+ if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (_h = connectedFieldGroups_1.return)) _h.call(connectedFieldGroups_1);
2002
2600
  }
2003
2601
  finally { if (e_5) throw e_5.error; }
2004
2602
  return [7 /*endfinally*/];
2005
2603
  case 8:
2006
2604
  if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFields")) return [3 /*break*/, 16];
2007
2605
  connectedFields = currentField.connectedElements.connectedFields;
2008
- _d.label = 9;
2606
+ _k.label = 9;
2009
2607
  case 9:
2010
- _d.trys.push([9, 14, 15, 16]);
2608
+ _k.trys.push([9, 14, 15, 16]);
2011
2609
  connectedFields_1 = __values(connectedFields), connectedFields_1_1 = connectedFields_1.next();
2012
- _d.label = 10;
2610
+ _k.label = 10;
2013
2611
  case 10:
2014
2612
  if (!!connectedFields_1_1.done) return [3 /*break*/, 13];
2015
2613
  connectedFieldConfig = connectedFields_1_1.value;
2016
2614
  return [4 /*yield*/, this.handleConnectedElementFields(currentField, connectedFieldConfig, eventType, eventType)];
2017
2615
  case 11:
2018
- currentField = _d.sent();
2019
- _d.label = 12;
2616
+ currentField = _k.sent();
2617
+ _k.label = 12;
2020
2618
  case 12:
2021
2619
  connectedFields_1_1 = connectedFields_1.next();
2022
2620
  return [3 /*break*/, 10];
2023
2621
  case 13: return [3 /*break*/, 16];
2024
2622
  case 14:
2025
- e_6_1 = _d.sent();
2623
+ e_6_1 = _k.sent();
2026
2624
  e_6 = { error: e_6_1 };
2027
2625
  return [3 /*break*/, 16];
2028
2626
  case 15:
2029
2627
  try {
2030
- if (connectedFields_1_1 && !connectedFields_1_1.done && (_c = connectedFields_1.return)) _c.call(connectedFields_1);
2628
+ if (connectedFields_1_1 && !connectedFields_1_1.done && (_j = connectedFields_1.return)) _j.call(connectedFields_1);
2031
2629
  }
2032
2630
  finally { if (e_6) throw e_6.error; }
2033
2631
  return [7 /*endfinally*/];
@@ -2040,11 +2638,11 @@
2040
2638
  };
2041
2639
  // DOM Event Handlers
2042
2640
  KwikIDFormViewComponent.prototype.handleGetKeyValue = function (e) {
2043
- var _b;
2641
+ var _h;
2044
2642
  var _this = this;
2045
- this.formGroup.patchValue((_b = {},
2046
- _b[e.key] = e.value,
2047
- _b), { emitEvent: false });
2643
+ this.formGroup.patchValue((_h = {},
2644
+ _h[e.key] = e.value,
2645
+ _h), { emitEvent: false });
2048
2646
  var field = getFormFieldByKey(this.formFields, e.key);
2049
2647
  this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
2050
2648
  if (field.isFormElement &&
@@ -2057,11 +2655,11 @@
2057
2655
  ALL_FORMS_DATA: this.allFormsData
2058
2656
  }, this.takeAction.bind(this));
2059
2657
  (function () { return __awaiter(_this, void 0, void 0, function () {
2060
- return __generator(this, function (_b) {
2061
- switch (_b.label) {
2658
+ return __generator(this, function (_h) {
2659
+ switch (_h.label) {
2062
2660
  case 0: return [4 /*yield*/, validations_1.validate(field.validation)];
2063
2661
  case 1:
2064
- _b.sent();
2662
+ _h.sent();
2065
2663
  return [2 /*return*/];
2066
2664
  }
2067
2665
  });
@@ -2077,25 +2675,25 @@
2077
2675
  };
2078
2676
  KwikIDFormViewComponent.prototype.handleOnClickResetFormFields = function (e, field) {
2079
2677
  return __awaiter(this, void 0, void 0, function () {
2080
- var _b, _c, f, _d, _e, action, resetField, actions, e_7_1, e_8_1;
2081
- var e_8, _f, e_7, _g;
2082
- return __generator(this, function (_h) {
2083
- switch (_h.label) {
2678
+ var _h, _j, f, _k, _l, action, resetField, actions, e_7_1, e_8_1;
2679
+ var e_8, _m, e_7, _o;
2680
+ return __generator(this, function (_p) {
2681
+ switch (_p.label) {
2084
2682
  case 0:
2085
- _h.trys.push([0, 11, 12, 13]);
2086
- _b = __values(field.reset.fields), _c = _b.next();
2087
- _h.label = 1;
2683
+ _p.trys.push([0, 11, 12, 13]);
2684
+ _h = __values(field.reset.fields), _j = _h.next();
2685
+ _p.label = 1;
2088
2686
  case 1:
2089
- if (!!_c.done) return [3 /*break*/, 10];
2090
- f = _c.value;
2091
- _h.label = 2;
2687
+ if (!!_j.done) return [3 /*break*/, 10];
2688
+ f = _j.value;
2689
+ _p.label = 2;
2092
2690
  case 2:
2093
- _h.trys.push([2, 7, 8, 9]);
2094
- _d = (e_7 = void 0, __values(f.actions)), _e = _d.next();
2095
- _h.label = 3;
2691
+ _p.trys.push([2, 7, 8, 9]);
2692
+ _k = (e_7 = void 0, __values(f.actions)), _l = _k.next();
2693
+ _p.label = 3;
2096
2694
  case 3:
2097
- if (!!_e.done) return [3 /*break*/, 6];
2098
- action = _e.value;
2695
+ if (!!_l.done) return [3 /*break*/, 6];
2696
+ action = _l.value;
2099
2697
  resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
2100
2698
  actions = new kwikidToolkit.Action(action, {}, {
2101
2699
  FIELD_CONFIG: resetField,
@@ -2106,33 +2704,33 @@
2106
2704
  }, this.takeAction.bind(this));
2107
2705
  return [4 /*yield*/, actions.execute()];
2108
2706
  case 4:
2109
- _h.sent();
2110
- _h.label = 5;
2707
+ _p.sent();
2708
+ _p.label = 5;
2111
2709
  case 5:
2112
- _e = _d.next();
2710
+ _l = _k.next();
2113
2711
  return [3 /*break*/, 3];
2114
2712
  case 6: return [3 /*break*/, 9];
2115
2713
  case 7:
2116
- e_7_1 = _h.sent();
2714
+ e_7_1 = _p.sent();
2117
2715
  e_7 = { error: e_7_1 };
2118
2716
  return [3 /*break*/, 9];
2119
2717
  case 8:
2120
2718
  try {
2121
- if (_e && !_e.done && (_g = _d.return)) _g.call(_d);
2719
+ if (_l && !_l.done && (_o = _k.return)) _o.call(_k);
2122
2720
  }
2123
2721
  finally { if (e_7) throw e_7.error; }
2124
2722
  return [7 /*endfinally*/];
2125
2723
  case 9:
2126
- _c = _b.next();
2724
+ _j = _h.next();
2127
2725
  return [3 /*break*/, 1];
2128
2726
  case 10: return [3 /*break*/, 13];
2129
2727
  case 11:
2130
- e_8_1 = _h.sent();
2728
+ e_8_1 = _p.sent();
2131
2729
  e_8 = { error: e_8_1 };
2132
2730
  return [3 /*break*/, 13];
2133
2731
  case 12:
2134
2732
  try {
2135
- if (_c && !_c.done && (_f = _b.return)) _f.call(_b);
2733
+ if (_j && !_j.done && (_m = _h.return)) _m.call(_h);
2136
2734
  }
2137
2735
  finally { if (e_8) throw e_8.error; }
2138
2736
  return [7 /*endfinally*/];
@@ -2142,14 +2740,16 @@
2142
2740
  });
2143
2741
  };
2144
2742
  KwikIDFormViewComponent.prototype.handleOnClickApiCall = function (e) {
2145
- var _a;
2743
+ var _a, _b, _c, _d, _e, _f, _g;
2146
2744
  return __awaiter(this, void 0, void 0, function () {
2147
- var field, apis;
2148
- return __generator(this, function (_b) {
2149
- switch (_b.label) {
2745
+ var field, apis, apiCallResponse, url, method, headers, body, response, apis_1;
2746
+ var _h, _j;
2747
+ var _this = this;
2748
+ return __generator(this, function (_k) {
2749
+ switch (_k.label) {
2150
2750
  case 0:
2151
2751
  field = getFormFieldByKey(this.formFields, e.key);
2152
- if (!(field.type === "api-call")) return [3 /*break*/, 5];
2752
+ if (!(field.type === "api-call")) return [3 /*break*/, 11];
2153
2753
  // set button status to loading
2154
2754
  field["api"]["status"]["value"] = EApiStatusType.LOADING;
2155
2755
  field["showLoader"] = true;
@@ -2166,43 +2766,77 @@
2166
2766
  }, this.takeAction.bind(this));
2167
2767
  return [4 /*yield*/, apis.setRequestHeaders()];
2168
2768
  case 1:
2169
- field = _b.sent();
2769
+ field = _k.sent();
2170
2770
  return [4 /*yield*/, apis.validateRequestHeaders()];
2171
2771
  case 2:
2172
- field = _b.sent();
2772
+ field = _k.sent();
2173
2773
  return [4 /*yield*/, apis.setRequestBody()];
2174
2774
  case 3:
2175
- field = _b.sent();
2775
+ field = _k.sent();
2176
2776
  return [4 /*yield*/, apis.validateRequestBody()];
2177
2777
  case 4:
2178
- field = _b.sent();
2179
- if (field.api.request.body.validation.is_valid) {
2180
- // Call API Here
2181
- this.onClickApiCall.emit({
2182
- key: e.key,
2183
- request: {
2184
- mode: "POST",
2185
- body: field.api.request.body.value,
2186
- headers: (_a = field.api.request.headers.value) !== null && _a !== void 0 ? _a : {},
2187
- url: field.api.request.url
2778
+ field = _k.sent();
2779
+ if (!field.api.request.body.validation.is_valid) return [3 /*break*/, 9];
2780
+ apiCallResponse = undefined;
2781
+ if (!(field.api.request.url.hasOwnProperty("type") &&
2782
+ field.api.request.url.type === "MOCK")) return [3 /*break*/, 5];
2783
+ apiCallResponse = field.api.request.url.data;
2784
+ return [3 /*break*/, 8];
2785
+ case 5:
2786
+ url = field.api.request.url;
2787
+ method = (_b = (_a = field.api.request) === null || _a === void 0 ? void 0 : _a.method) !== null && _b !== void 0 ? _b : "POST";
2788
+ headers = Object.assign({ "Content-Type": "application/json" }, (((_d = (_c = field.api.request) === null || _c === void 0 ? void 0 : _c.headers) === null || _d === void 0 ? void 0 : _d.value) || {}));
2789
+ body = (_g = (_f = (_e = field.api.request) === null || _e === void 0 ? void 0 : _e.body) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : null;
2790
+ return [4 /*yield*/, fetch(url, {
2791
+ method: method,
2792
+ headers: Object.assign({}, headers),
2793
+ body: JSON.stringify(body)
2794
+ })];
2795
+ case 6:
2796
+ response = _k.sent();
2797
+ return [4 /*yield*/, response.json()];
2798
+ case 7:
2799
+ apiCallResponse = _k.sent();
2800
+ _k.label = 8;
2801
+ case 8:
2802
+ this.formData = Object.assign(Object.assign({}, this.formData), (_h = {}, _h[field.key] = apiCallResponse, _h));
2803
+ this.formGroup.patchValue((_j = {},
2804
+ _j[field.key] = apiCallResponse,
2805
+ _j), { emitEvent: false });
2806
+ apis_1 = new Apis({
2807
+ FIELD_CONFIG: field,
2808
+ FORM_FIELDS: this.formFields,
2809
+ FORM_DATA: this.formData,
2810
+ PREVIOUS_FORM_DATA: this.previousFormData,
2811
+ ALL_FORMS_DATA: this.allFormsData
2812
+ }, this.takeAction.bind(this));
2813
+ (function () { return __awaiter(_this, void 0, void 0, function () {
2814
+ return __generator(this, function (_h) {
2815
+ switch (_h.label) {
2816
+ case 0: return [4 /*yield*/, apis_1.validateResponse()];
2817
+ case 1:
2818
+ field = _h.sent();
2819
+ return [2 /*return*/];
2188
2820
  }
2189
2821
  });
2190
- }
2191
- else {
2192
- // Request Body Validation Failed
2193
- // Highlight Error in UI to User to Retry After Sometime.
2194
- // Take Action based on Validation
2195
- setTimeout(function () {
2196
- field["api"]["status"]["value"] = EApiStatusType.FAILED;
2197
- field["showLoader"] = false;
2198
- }, 500);
2199
- }
2822
+ }); })();
2823
+ return [3 /*break*/, 10];
2824
+ case 9:
2825
+ // Request Body Validation Failed
2826
+ // Highlight Error in UI to User to Retry After Sometime.
2827
+ // Take Action based on Validation
2828
+ setTimeout(function () {
2829
+ field["api"]["status"]["value"] = EApiStatusType.FAILED;
2830
+ field["showLoader"] = false;
2831
+ }, 500);
2832
+ _k.label = 10;
2833
+ case 10:
2200
2834
  this.viewFormsButton["disabled"] = false;
2201
2835
  this.viewFormsButton["showLoader"] = false;
2202
2836
  this.saveFormButton["disabled"] = false;
2203
2837
  this.saveFormButton["showLoader"] = false;
2204
- _b.label = 5;
2205
- case 5: return [2 /*return*/];
2838
+ _k.label = 11;
2839
+ case 11: return [2 /*return*/];
2206
2840
  }
2207
2841
  });
2208
2842
  });
@@ -2214,16 +2848,16 @@
2214
2848
  };
2215
2849
  KwikIDFormViewComponent.prototype.handleOnClickSaveForm = function (e) {
2216
2850
  return __awaiter(this, void 0, void 0, function () {
2217
- var formData, _b, _c, field, controls, firstFieldWithError, controls_1, controls_1_1, control, _d, _e, field, validations, e_9_1;
2218
- var e_10, _f, e_11, _g, e_9, _h;
2851
+ var formData, _h, _j, field, controls, firstFieldWithError, controls_1, controls_1_1, control, _k, _l, field, validations, e_9_1;
2852
+ var e_10, _m, e_11, _o, e_9, _p;
2219
2853
  var _this = this;
2220
- return __generator(this, function (_j) {
2221
- switch (_j.label) {
2854
+ return __generator(this, function (_q) {
2855
+ switch (_q.label) {
2222
2856
  case 0:
2223
2857
  formData = this.formGroup.getRawValue();
2224
2858
  try {
2225
- for (_b = __values(this.formFields), _c = _b.next(); !_c.done; _c = _b.next()) {
2226
- field = _c.value;
2859
+ for (_h = __values(this.formFields), _j = _h.next(); !_j.done; _j = _h.next()) {
2860
+ field = _j.value;
2227
2861
  if (field.isFormElement) {
2228
2862
  if (field.hidden) {
2229
2863
  delete formData[field.key];
@@ -2237,7 +2871,7 @@
2237
2871
  catch (e_10_1) { e_10 = { error: e_10_1 }; }
2238
2872
  finally {
2239
2873
  try {
2240
- if (_c && !_c.done && (_f = _b.return)) _f.call(_b);
2874
+ if (_j && !_j.done && (_m = _h.return)) _m.call(_h);
2241
2875
  }
2242
2876
  finally { if (e_10) throw e_10.error; }
2243
2877
  }
@@ -2256,7 +2890,7 @@
2256
2890
  catch (e_11_1) { e_11 = { error: e_11_1 }; }
2257
2891
  finally {
2258
2892
  try {
2259
- if (controls_1_1 && !controls_1_1.done && (_g = controls_1.return)) _g.call(controls_1);
2893
+ if (controls_1_1 && !controls_1_1.done && (_o = controls_1.return)) _o.call(controls_1);
2260
2894
  }
2261
2895
  finally { if (e_11) throw e_11.error; }
2262
2896
  }
@@ -2266,14 +2900,14 @@
2266
2900
  }, 3000);
2267
2901
  return [2 /*return*/];
2268
2902
  }
2269
- _j.label = 1;
2903
+ _q.label = 1;
2270
2904
  case 1:
2271
- _j.trys.push([1, 6, 7, 8]);
2272
- _d = __values(this.formFields), _e = _d.next();
2273
- _j.label = 2;
2905
+ _q.trys.push([1, 6, 7, 8]);
2906
+ _k = __values(this.formFields), _l = _k.next();
2907
+ _q.label = 2;
2274
2908
  case 2:
2275
- if (!!_e.done) return [3 /*break*/, 5];
2276
- field = _e.value;
2909
+ if (!!_l.done) return [3 /*break*/, 5];
2910
+ field = _l.value;
2277
2911
  if (!(field.isFormElement &&
2278
2912
  field.validation.triggers.includes("ON_SAVE"))) return [3 /*break*/, 4];
2279
2913
  validations = new kwikidToolkit.Validation({
@@ -2285,7 +2919,7 @@
2285
2919
  }, this.takeAction.bind(this));
2286
2920
  return [4 /*yield*/, validations.validate(field.validation)];
2287
2921
  case 3:
2288
- _j.sent();
2922
+ _q.sent();
2289
2923
  if (!field.validation.is_valid) {
2290
2924
  this.toggleErrorNotification(true);
2291
2925
  setTimeout(function () {
@@ -2293,18 +2927,18 @@
2293
2927
  }, 3000);
2294
2928
  return [2 /*return*/];
2295
2929
  }
2296
- _j.label = 4;
2930
+ _q.label = 4;
2297
2931
  case 4:
2298
- _e = _d.next();
2932
+ _l = _k.next();
2299
2933
  return [3 /*break*/, 2];
2300
2934
  case 5: return [3 /*break*/, 8];
2301
2935
  case 6:
2302
- e_9_1 = _j.sent();
2936
+ e_9_1 = _q.sent();
2303
2937
  e_9 = { error: e_9_1 };
2304
2938
  return [3 /*break*/, 8];
2305
2939
  case 7:
2306
2940
  try {
2307
- if (_e && !_e.done && (_h = _d.return)) _h.call(_d);
2941
+ if (_l && !_l.done && (_p = _k.return)) _p.call(_k);
2308
2942
  }
2309
2943
  finally { if (e_9) throw e_9.error; }
2310
2944
  return [7 /*endfinally*/];
@@ -2333,17 +2967,17 @@
2333
2967
  this.formGroup.updateValueAndValidity();
2334
2968
  };
2335
2969
  KwikIDFormViewComponent.prototype.fieldGroupHide = function (fieldGroup) {
2336
- var e_12, _b;
2970
+ var e_12, _h;
2337
2971
  try {
2338
- for (var _c = __values(this.fieldGroups[fieldGroup]), _d = _c.next(); !_d.done; _d = _c.next()) {
2339
- var fieldKey = _d.value;
2972
+ for (var _j = __values(this.fieldGroups[fieldGroup]), _k = _j.next(); !_k.done; _k = _j.next()) {
2973
+ var fieldKey = _k.value;
2340
2974
  this.fieldHide(fieldKey);
2341
2975
  }
2342
2976
  }
2343
2977
  catch (e_12_1) { e_12 = { error: e_12_1 }; }
2344
2978
  finally {
2345
2979
  try {
2346
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
2980
+ if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
2347
2981
  }
2348
2982
  finally { if (e_12) throw e_12.error; }
2349
2983
  }
@@ -2357,17 +2991,17 @@
2357
2991
  this.formGroup.updateValueAndValidity();
2358
2992
  };
2359
2993
  KwikIDFormViewComponent.prototype.fieldGroupShow = function (fieldGroup) {
2360
- var e_13, _b;
2994
+ var e_13, _h;
2361
2995
  try {
2362
- for (var _c = __values(this.fieldGroups[fieldGroup]), _d = _c.next(); !_d.done; _d = _c.next()) {
2363
- var fieldKey = _d.value;
2996
+ for (var _j = __values(this.fieldGroups[fieldGroup]), _k = _j.next(); !_k.done; _k = _j.next()) {
2997
+ var fieldKey = _k.value;
2364
2998
  this.fieldShow(fieldKey);
2365
2999
  }
2366
3000
  }
2367
3001
  catch (e_13_1) { e_13 = { error: e_13_1 }; }
2368
3002
  finally {
2369
3003
  try {
2370
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
3004
+ if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
2371
3005
  }
2372
3006
  finally { if (e_13) throw e_13.error; }
2373
3007
  }
@@ -2388,17 +3022,17 @@
2388
3022
  }
2389
3023
  };
2390
3024
  KwikIDFormViewComponent.prototype.fieldGroupDisable = function (fieldGroup) {
2391
- var e_14, _b;
3025
+ var e_14, _h;
2392
3026
  try {
2393
- for (var _c = __values(this.fieldGroups[fieldGroup]), _d = _c.next(); !_d.done; _d = _c.next()) {
2394
- var fieldKey = _d.value;
3027
+ for (var _j = __values(this.fieldGroups[fieldGroup]), _k = _j.next(); !_k.done; _k = _j.next()) {
3028
+ var fieldKey = _k.value;
2395
3029
  this.fieldDisable(fieldKey);
2396
3030
  }
2397
3031
  }
2398
3032
  catch (e_14_1) { e_14 = { error: e_14_1 }; }
2399
3033
  finally {
2400
3034
  try {
2401
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
3035
+ if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
2402
3036
  }
2403
3037
  finally { if (e_14) throw e_14.error; }
2404
3038
  }
@@ -2419,17 +3053,17 @@
2419
3053
  }
2420
3054
  };
2421
3055
  KwikIDFormViewComponent.prototype.fieldGroupEnable = function (fieldGroup) {
2422
- var e_15, _b;
3056
+ var e_15, _h;
2423
3057
  try {
2424
- for (var _c = __values(this.fieldGroups[fieldGroup]), _d = _c.next(); !_d.done; _d = _c.next()) {
2425
- var fieldKey = _d.value;
3058
+ for (var _j = __values(this.fieldGroups[fieldGroup]), _k = _j.next(); !_k.done; _k = _j.next()) {
3059
+ var fieldKey = _k.value;
2426
3060
  this.fieldEnable(fieldKey);
2427
3061
  }
2428
3062
  }
2429
3063
  catch (e_15_1) { e_15 = { error: e_15_1 }; }
2430
3064
  finally {
2431
3065
  try {
2432
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
3066
+ if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
2433
3067
  }
2434
3068
  finally { if (e_15) throw e_15.error; }
2435
3069
  }
@@ -2507,10 +3141,10 @@
2507
3141
  };
2508
3142
  KwikIDFormViewComponent.prototype.setObjectValue = function (field, path, value) { };
2509
3143
  KwikIDFormViewComponent.prototype.patchFieldControlValue = function (key, value) {
2510
- var _b;
2511
- this.formGroup.patchValue((_b = {},
2512
- _b[key] = value,
2513
- _b), { emitEvent: false });
3144
+ var _h;
3145
+ this.formGroup.patchValue((_h = {},
3146
+ _h[key] = value,
3147
+ _h), { emitEvent: false });
2514
3148
  };
2515
3149
  KwikIDFormViewComponent.prototype.patchFormGroup = function (formData) {
2516
3150
  if (kwikidToolkit.isUndefined(this.formGroup) || kwikidToolkit.isUndefined(formData)) {
@@ -2531,7 +3165,7 @@
2531
3165
  };
2532
3166
  KwikIDFormViewComponent.prototype.takeActionOnFieldGroup = function (action, object) {
2533
3167
  return __awaiter(this, void 0, void 0, function () {
2534
- return __generator(this, function (_b) {
3168
+ return __generator(this, function (_h) {
2535
3169
  switch (action.key) {
2536
3170
  case EActionKey.FIELD_GROUP_HIDE:
2537
3171
  this.fieldGroupHide(action.props.groupKey);
@@ -2554,12 +3188,12 @@
2554
3188
  };
2555
3189
  KwikIDFormViewComponent.prototype.takeAction = function (action, object) {
2556
3190
  return __awaiter(this, void 0, void 0, function () {
2557
- var _b, setValue_Source, sourceValue, setDefaultValue_Source, sourceDefaultValue, destinationDefaultValue_FieldConfig_Config, destinationDefaultValue_FormData_Config__Props__Object__Path, destinationDefaultValue_FormData_Config, setDropdownValue_Sources, dropdownValue, appendToPath, appendToPathStr, optionsPath;
2558
- return __generator(this, function (_c) {
2559
- switch (_c.label) {
3191
+ var _h, setValue_Source, sourceValue, setDefaultValue_Source, sourceDefaultValue, destinationDefaultValue_FieldConfig_Config, destinationDefaultValue_FormData_Config__Props__Object__Path, destinationDefaultValue_FormData_Config, setDropdownValue_Sources, dropdownValue, appendToPath, appendToPathStr, optionsPath;
3192
+ return __generator(this, function (_j) {
3193
+ switch (_j.label) {
2560
3194
  case 0:
2561
- _b = action.key;
2562
- switch (_b) {
3195
+ _h = action.key;
3196
+ switch (_h) {
2563
3197
  case EActionKey.FIELD_HIDE: return [3 /*break*/, 1];
2564
3198
  case EActionKey.FIELD_SHOW: return [3 /*break*/, 2];
2565
3199
  case EActionKey.FIELD_DISABLE: return [3 /*break*/, 3];
@@ -2607,7 +3241,7 @@
2607
3241
  setValue_Source = new kwikidToolkit.Source(object);
2608
3242
  return [4 /*yield*/, setValue_Source.getValueFromSource(action.props.value.source)];
2609
3243
  case 11:
2610
- sourceValue = _c.sent();
3244
+ sourceValue = _j.sent();
2611
3245
  setValue_Source.setValueToSource(action.props.value.destination, sourceValue);
2612
3246
  object.FIELD_CONFIG = setValue_Source.object.FIELD_CONFIG;
2613
3247
  this.formData = setValue_Source.object.FORM_DATA;
@@ -2619,7 +3253,7 @@
2619
3253
  setDefaultValue_Source = new kwikidToolkit.Source(object);
2620
3254
  return [4 /*yield*/, setDefaultValue_Source.getValueFromSource(action.props.value.source)];
2621
3255
  case 13:
2622
- sourceDefaultValue = _c.sent();
3256
+ sourceDefaultValue = _j.sent();
2623
3257
  destinationDefaultValue_FieldConfig_Config = {
2624
3258
  key: kwikidToolkit.ESourceKey.OBJECT,
2625
3259
  props: {
@@ -2652,12 +3286,12 @@
2652
3286
  setDropdownValue_Sources = new kwikidToolkit.Source(object);
2653
3287
  return [4 /*yield*/, setDropdownValue_Sources.getValueFromSource(action.props.value.source)];
2654
3288
  case 15:
2655
- dropdownValue = _c.sent();
3289
+ dropdownValue = _j.sent();
2656
3290
  if (!kwikidToolkit.checkObjectKeyExists(action.props, "options")) return [3 /*break*/, 18];
2657
3291
  if (!kwikidToolkit.checkObjectKeyExists(action.props.options, "appendToPath")) return [3 /*break*/, 17];
2658
3292
  return [4 /*yield*/, setDropdownValue_Sources.getValueFromSource(action.props.options.appendToPath.source)];
2659
3293
  case 16:
2660
- appendToPath = _c.sent();
3294
+ appendToPath = _j.sent();
2661
3295
  if (kwikidToolkit.isNotEmptyValue(appendToPath)) {
2662
3296
  appendToPathStr = kwikidToolkit.replaceString(appendToPath.match("" + action.props.options.appendToPath.filterSourceValue)[0], "[^a-zA-Z0-9_]", "_");
2663
3297
  optionsPath = "" + action.props.options.path + appendToPathStr;
@@ -2666,7 +3300,7 @@
2666
3300
  return [3 /*break*/, 18];
2667
3301
  case 17:
2668
3302
  dropdownValue = kwikidToolkit.getObjectValueFromPath(dropdownValue, action.props.options.path);
2669
- _c.label = 18;
3303
+ _j.label = 18;
2670
3304
  case 18:
2671
3305
  setDropdownValue_Sources.setValueToSource(action.props.value.destination, dropdownValue);
2672
3306
  object.FIELD_CONFIG = setDropdownValue_Sources.object.FIELD_CONFIG;
@@ -2687,8 +3321,8 @@
2687
3321
  };
2688
3322
  return KwikIDFormViewComponent;
2689
3323
  }());
2690
- /** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i4.TuiPushService }, { token: i3.TuiAlertService }, { token: KwikIDFormViewService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2691
- /** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", apiCallResponse: "apiCallResponse", isMobileView: "isMobileView", allFormsData: "allFormsData", formsList: "formsList" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div id=\"uf-form-fields-header-container\">\n <div id=\"uf-form-fields-title\">\n {{ formConfig.title }}\n </div>\n <div id=\"uf-form-fields-steps\">\n Step {{ formConfig.sequenceNo }} of {{ this.formsListLength }}\n </div>\n <hr />\n </div>\n <form\n class=\"kwikid-form show\"\n [formGroup]=\"formGroup\"\n >\n <ng-container *ngFor=\"let field of formFields; let i = index\">\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 [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 <!-- 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 [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\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 [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 <!-- 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 </ng-container>\n </ng-container>\n </form>\n <div class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"isMobileView\"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"View Forms\"\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 [disabled]=\"saveFormButton.disabled\"\n id=\"\"\n label=\"Save\"\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 ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\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=\"tuiIconCancel\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\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 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}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i2__namespace.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i4__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace.TuiPushDirective, selector: "tui-push" }], pipes: { "safeHtml": SafeHtmlPipe$1 } });
3324
+ /** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i4$1.TuiPushService }, { token: i3$1.TuiAlertService }, { token: KwikIDFormViewService }], target: i0__namespace.ɵɵFactoryTarget.Component });
3325
+ /** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", formsList: "formsList" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div id=\"uf-form-fields-header-container\">\n <div id=\"uf-form-fields-title\">\n {{ formConfig.title }}\n </div>\n <div id=\"uf-form-fields-steps\">\n Step {{ formConfig.sequenceNo }} of {{ this.formsListLength }}\n </div>\n <hr />\n </div>\n <form\n class=\"kwikid-form show\"\n [formGroup]=\"formGroup\"\n >\n <ng-container *ngFor=\"let field of formFields; let i = index\">\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 [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 <!-- 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 [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\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 [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 <!-- 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 </ng-container>\n </ng-container>\n </form>\n <div class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"isMobileView\"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"View Forms\"\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 [disabled]=\"saveFormButton.disabled\"\n id=\"\"\n label=\"Save\"\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 ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\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=\"tuiIconCancel\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\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 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}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i2__namespace.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }], pipes: { "safeHtml": SafeHtmlPipe$1 } });
2692
3326
  __decorate([
2693
3327
  kwikidToolkit.logMethod
2694
3328
  ], KwikIDFormViewComponent.prototype, "ngOnInit", null);
@@ -2818,19 +3452,17 @@
2818
3452
  providers: [KwikIDFormViewService]
2819
3453
  }]
2820
3454
  }], ctorParameters: function () {
2821
- return [{ type: i4__namespace.TuiPushService, decorators: [{
3455
+ return [{ type: i4__namespace$1.TuiPushService, decorators: [{
2822
3456
  type: i0.Inject,
2823
- args: [i4.TuiPushService]
2824
- }] }, { type: i3__namespace.TuiAlertService, decorators: [{
3457
+ args: [i4$1.TuiPushService]
3458
+ }] }, { type: i3__namespace$1.TuiAlertService, decorators: [{
2825
3459
  type: i0.Inject,
2826
- args: [i3.TuiAlertService]
3460
+ args: [i3$1.TuiAlertService]
2827
3461
  }] }, { type: KwikIDFormViewService }];
2828
3462
  }, propDecorators: { formConfig: [{
2829
3463
  type: i0.Input
2830
3464
  }], formData: [{
2831
3465
  type: i0.Input
2832
- }], apiCallResponse: [{
2833
- type: i0.Input
2834
3466
  }], isMobileView: [{
2835
3467
  type: i0.Input
2836
3468
  }], allFormsData: [{
@@ -2859,14 +3491,14 @@
2859
3491
  };
2860
3492
  return SafeHtmlPipe;
2861
3493
  }());
2862
- /** @nocollapse */ SafeHtmlPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
3494
+ /** @nocollapse */ SafeHtmlPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe, deps: [{ token: i1__namespace$1.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
2863
3495
  /** @nocollapse */ SafeHtmlPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe, name: "safeHtml" });
2864
3496
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SafeHtmlPipe, decorators: [{
2865
3497
  type: i0.Pipe,
2866
3498
  args: [{
2867
3499
  name: "safeHtml"
2868
3500
  }]
2869
- }], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; } });
3501
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.DomSanitizer }]; } });
2870
3502
 
2871
3503
  var KwikIDFormsListComponent = /** @class */ (function () {
2872
3504
  function KwikIDFormsListComponent() {
@@ -2970,7 +3602,7 @@
2970
3602
  return KwikIDFormsListComponent;
2971
3603
  }());
2972
3604
  /** @nocollapse */ KwikIDFormsListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2973
- /** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div id=\"sidebar-container\">\n <div id=\"sidebar\">\n <div ngClass=\"kwikid-form-header\">\n <div id=\"uf-header\">\n <div id=\"uf-header-logo-container\">\n <img\n id=\"uf-header-logo\"\n src=\"{{ this.userConfig.theme.clientLogo }}\"\n [ngClass]=\"'large-icon'\"\n />\n </div>\n </div>\n <hr />\n </div>\n <div id=\"uf-progress\">\n <div id=\"uf-progress-steps\">\n {{ this.formsListCompleted.length }} / {{ this.formsListLength }} Steps\n Completed\n </div>\n <kwikui-progress-segmented\n [max]=\"this.formsListLength\"\n size=\"m\"\n [value]=\"this.formsListCompleted.length\"\n ></kwikui-progress-segmented>\n </div>\n <div id=\"uf-sections-container\">\n <ng-container *ngFor=\"let form of formsList; let i = index\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div [innerHtml]=\"form.props.htmlContent | safeHtml\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form'\">\n <div\n [class]=\"'uf-section-item'\"\n [class.completed]=\"form.status === 'completed' && !form.disabled\"\n [class.edit]=\"form.status === 'editable' && !form.disabled\"\n [class.locked]=\"form.status === 'locked' && form.disabled\"\n [class.active]=\"\n activeFormConfig !== undefined &&\n form.key === activeFormConfig.key\n \"\n (click)=\"\n form.status === 'locked' && form.disabled\n ? undefined\n : handleOnClickSetActiveForm(form.key)\n \"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }}&nbsp;<span *ngIf=\"form?.required\"\n >*</span\n >\n </div>\n <div class=\"uf-form-section-card-status\">\n <div\n *ngIf=\"form.status === 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img completed\"\n >\n <tui-svg src=\"tuiIconCheckLarge\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img edit\"\n >\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && form.disabled\"\n class=\"uf-form-section-card-status-img locked\"\n >\n <tui-svg src=\"tuiIconLock\"></tui-svg>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div id=\"submit-sidebar-btn-container\">\n <kwikui-button\n [disabled]=\"false\"\n id=\"\"\n label=\"Submit\"\n [showLoader]=\"false\"\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)=\"handleOnSubmitForms($event)\"\n ></kwikui-button>\n </div>\n </div>\n</div>\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}#sidebar-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}#sidebar{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.uf-section-item{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;padding:1rem;grid-gap:1rem;gap:1rem;cursor:pointer;box-shadow:0 1px 3px -1px var(--tui-base-05);border-radius:.5rem;background-color:var(--tui-base-02);position:relative}.uf-section-item:hover{box-shadow:0 1px 3px -1px var(--tui-base-08)}#submit-sidebar-btn-container{width:100%;bottom:0px;z-index:1;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;gap:1rem}#submit-sidebar-btn-container *{flex-grow:1}#uf-sections-container{display:flex;flex-direction:column;height:100%;grid-row-gap:20px;row-gap:20px;padding:1rem;overflow-y:auto}.uf-form-section-card{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:10px;column-gap:10px;border:none;border-radius:8px;background-color:#e9e9e9;height:-moz-fit-content;height:fit-content;min-height:60px;padding:10px 15px;width:100%;max-width:350px;margin:0 auto}.uf-section-item.locked{-webkit-user-select:none;user-select:none;cursor:not-allowed}.uf-form-section-card .uf-form-section-card-title{font-size:1.2em;text-align:left;line-height:1.25em}.uf-form-section-card .uf-form-section-card-status{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.uf-form-section-card .uf-form-section-card-status .uf-form-section-card-status-img{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;border-radius:100%;color:#fff;font-weight:bold}.uf-form-section-card-status-img.completed{background-color:var(--tui-success-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.edit{background-color:var(--tui-error-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.locked{background-color:var(--tui-neutral-fill);padding:.25rem;border-radius:50%;color:#fff}#uf-progress{display:flex;padding:1rem;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;grid-gap:.5rem;gap:.5rem}#uf-progress-steps{font-size:1em;text-align:right;color:#3d3d3d}.uf-form-section-card-title{font-size:1em;font-weight:bold;color:#000}@media screen and (max-width: 600px){#sidebar-container{max-width:unset}}.kwikid-form-header{height:70px;z-index:6}.kwikid-form-header hr{width:calc(100% - 1rem);margin-left:auto;margin-right:auto}#uf-header{display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:flex-start;grid-column-gap:10px;column-gap:10px;padding:10px 20px;width:100%;max-width:calc(400px + 50vw + 2rem);margin:0 auto;height:70px;z-index:1}#uf-header #uf-header-goback-container{display:none}#uf-header #uf-header-goback-container:hover{border-radius:50%;background-color:#d3d3d3}#uf-header #uf-header-goback-container #uf-header-goback{width:100%;height:auto}#uf-header #uf-header-logo-container{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#uf-header #uf-header-logo-container #uf-header-logo.small-icon{width:100%;height:50px}#uf-header #uf-header-logo-container #uf-header-logo.large-icon{width:100%;height:50px}#uf-header #uf-header-title-container{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;grid-row-gap:4px;row-gap:4px}#uf-header #uf-header-title-container #uf-header-title{font-size:1.4em;color:#121212}#uf-header #uf-header-title-container #uf-header-subtitle{font-size:1.2em;color:#121212}\n"], components: [{ type: i2__namespace.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["id", "value", "max", "size", "colors"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeHtml": SafeHtmlPipe } });
3605
+ /** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div id=\"sidebar-container\">\n <div id=\"sidebar\">\n <div ngClass=\"kwikid-form-header\">\n <div id=\"uf-header\">\n <div id=\"uf-header-logo-container\">\n <img\n id=\"uf-header-logo\"\n src=\"{{ this.userConfig.theme.clientLogo }}\"\n [ngClass]=\"'large-icon'\"\n />\n </div>\n </div>\n <hr />\n </div>\n <div id=\"uf-progress\">\n <div id=\"uf-progress-steps\">\n {{ this.formsListCompleted.length }} / {{ this.formsListLength }} Steps\n Completed\n </div>\n <kwikui-progress-segmented\n [max]=\"this.formsListLength\"\n size=\"m\"\n [value]=\"this.formsListCompleted.length\"\n ></kwikui-progress-segmented>\n </div>\n <div id=\"uf-sections-container\">\n <ng-container *ngFor=\"let form of formsList; let i = index\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div [innerHtml]=\"form.props.htmlContent | safeHtml\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form'\">\n <div\n [class]=\"'uf-section-item'\"\n [class.completed]=\"form.status === 'completed' && !form.disabled\"\n [class.edit]=\"form.status === 'editable' && !form.disabled\"\n [class.locked]=\"form.status === 'locked' && form.disabled\"\n [class.active]=\"\n activeFormConfig !== undefined &&\n form.key === activeFormConfig.key\n \"\n (click)=\"\n form.status === 'locked' && form.disabled\n ? undefined\n : handleOnClickSetActiveForm(form.key)\n \"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }}&nbsp;<span *ngIf=\"form?.required\"\n >*</span\n >\n </div>\n <div class=\"uf-form-section-card-status\">\n <div\n *ngIf=\"form.status === 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img completed\"\n >\n <tui-svg src=\"tuiIconCheckLarge\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img edit\"\n >\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && form.disabled\"\n class=\"uf-form-section-card-status-img locked\"\n >\n <tui-svg src=\"tuiIconLock\"></tui-svg>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div id=\"submit-sidebar-btn-container\">\n <kwikui-button\n [disabled]=\"false\"\n id=\"\"\n label=\"Submit\"\n [showLoader]=\"false\"\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)=\"handleOnSubmitForms($event)\"\n ></kwikui-button>\n </div>\n </div>\n</div>\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}#sidebar-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}#sidebar{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.uf-section-item{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;padding:1rem;grid-gap:1rem;gap:1rem;cursor:pointer;box-shadow:0 1px 3px -1px var(--tui-base-05);border-radius:.5rem;background-color:var(--tui-base-02);position:relative}.uf-section-item:hover{box-shadow:0 1px 3px -1px var(--tui-base-08)}#submit-sidebar-btn-container{width:100%;bottom:0px;z-index:1;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;gap:1rem}#submit-sidebar-btn-container *{flex-grow:1}#uf-sections-container{display:flex;flex-direction:column;height:100%;grid-row-gap:20px;row-gap:20px;padding:1rem;overflow-y:auto}.uf-form-section-card{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:10px;column-gap:10px;border:none;border-radius:8px;background-color:#e9e9e9;height:-moz-fit-content;height:fit-content;min-height:60px;padding:10px 15px;width:100%;max-width:350px;margin:0 auto}.uf-section-item.locked{-webkit-user-select:none;user-select:none;cursor:not-allowed}.uf-form-section-card .uf-form-section-card-title{font-size:1.2em;text-align:left;line-height:1.25em}.uf-form-section-card .uf-form-section-card-status{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.uf-form-section-card .uf-form-section-card-status .uf-form-section-card-status-img{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;border-radius:100%;color:#fff;font-weight:bold}.uf-form-section-card-status-img.completed{background-color:var(--tui-success-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.edit{background-color:var(--tui-error-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.locked{background-color:var(--tui-neutral-fill);padding:.25rem;border-radius:50%;color:#fff}#uf-progress{display:flex;padding:1rem;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;grid-gap:.5rem;gap:.5rem}#uf-progress-steps{font-size:1em;text-align:right;color:#3d3d3d}.uf-form-section-card-title{font-size:1em;font-weight:bold;color:#000}@media screen and (max-width: 600px){#sidebar-container{max-width:unset}}.kwikid-form-header{height:70px;z-index:6}.kwikid-form-header hr{width:calc(100% - 1rem);margin-left:auto;margin-right:auto}#uf-header{display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:flex-start;grid-column-gap:10px;column-gap:10px;padding:10px 20px;width:100%;max-width:calc(400px + 50vw + 2rem);margin:0 auto;height:70px;z-index:1}#uf-header #uf-header-goback-container{display:none}#uf-header #uf-header-goback-container:hover{border-radius:50%;background-color:#d3d3d3}#uf-header #uf-header-goback-container #uf-header-goback{width:100%;height:auto}#uf-header #uf-header-logo-container{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#uf-header #uf-header-logo-container #uf-header-logo.small-icon{width:100%;height:50px}#uf-header #uf-header-logo-container #uf-header-logo.large-icon{width:100%;height:50px}#uf-header #uf-header-title-container{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;grid-row-gap:4px;row-gap:4px}#uf-header #uf-header-title-container #uf-header-title{font-size:1.4em;color:#121212}#uf-header #uf-header-title-container #uf-header-subtitle{font-size:1.2em;color:#121212}\n"], components: [{ type: i2__namespace.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["id", "value", "max", "size", "colors"] }, { type: i3__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeHtml": SafeHtmlPipe } });
2974
3606
  __decorate([
2975
3607
  kwikidToolkit.logMethod
2976
3608
  ], KwikIDFormsListComponent.prototype, "ngOnChanges", null);
@@ -3255,7 +3887,7 @@
3255
3887
  }
3256
3888
  return field;
3257
3889
  };
3258
- var getConnectedElementKeyValueObject = function (key) {
3890
+ var getConnectedelementTypeValueObject = function (key) {
3259
3891
  var object = {
3260
3892
  key: key,
3261
3893
  conditions: { formula: "", rules: [] },
@@ -3267,12 +3899,12 @@
3267
3899
  if (kwikidToolkit.checkObjectKeyExists(field, "connectedTo")) {
3268
3900
  if (typeof field["connectedTo"] === "string") {
3269
3901
  field["connectedElements"] = [
3270
- getConnectedElementKeyValueObject(field["connectedTo"])
3902
+ getConnectedelementTypeValueObject(field["connectedTo"])
3271
3903
  ];
3272
3904
  }
3273
3905
  else {
3274
3906
  field["connectedTo"] = field["connectedTo"].map(function (key) {
3275
- return getConnectedElementKeyValueObject(key);
3907
+ return getConnectedelementTypeValueObject(key);
3276
3908
  });
3277
3909
  field["connectedElements"] = field["connectedTo"];
3278
3910
  }
@@ -3281,11 +3913,11 @@
3281
3913
  if (kwikidToolkit.checkObjectKeyExists(field, "connectedToParent")) {
3282
3914
  if (typeof field["connectedToParent"] === "string") {
3283
3915
  field["connectedParentFields"] = [
3284
- getConnectedElementKeyValueObject(field["connectedToParent"])
3916
+ getConnectedelementTypeValueObject(field["connectedToParent"])
3285
3917
  ];
3286
3918
  }
3287
3919
  else {
3288
- field["connectedParentFields"] = getConnectedElementKeyValueObject(field["connectedToParent"]);
3920
+ field["connectedParentFields"] = getConnectedelementTypeValueObject(field["connectedToParent"]);
3289
3921
  }
3290
3922
  }
3291
3923
  _this.removeFieldKey(field, "connectedToParent");
@@ -4186,16 +4818,36 @@
4186
4818
  }
4187
4819
  });
4188
4820
  formConfig = undefined;
4189
- if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig, "props")) return [3 /*break*/, 2];
4821
+ if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig, "props")) return [3 /*break*/, 4];
4822
+ if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig.props, "url")) return [3 /*break*/, 2];
4190
4823
  return [4 /*yield*/, this.fetchFormConfig(activeFormConfig.props.url)];
4191
4824
  case 1:
4192
4825
  formConfig = _d.sent();
4193
- return [3 /*break*/, 4];
4194
- case 2: return [4 /*yield*/, this.fetchFormConfig(activeFormConfig.formContent.url)];
4195
- case 3:
4196
- formConfig = _d.sent();
4197
- _d.label = 4;
4826
+ return [3 /*break*/, 3];
4827
+ case 2:
4828
+ if (kwikidToolkit.checkObjectKeyExists(activeFormConfig, "fields")) {
4829
+ formConfig = activeFormConfig;
4830
+ }
4831
+ else {
4832
+ console.error("No url or fields key in activeFormConfig");
4833
+ }
4834
+ _d.label = 3;
4835
+ case 3: return [3 /*break*/, 7];
4198
4836
  case 4:
4837
+ if (!kwikidToolkit.checkObjectKeyExists(activeFormConfig.formContent, "url")) return [3 /*break*/, 6];
4838
+ return [4 /*yield*/, this.fetchFormConfig(activeFormConfig.formContent.url)];
4839
+ case 5:
4840
+ formConfig = _d.sent();
4841
+ return [3 /*break*/, 7];
4842
+ case 6:
4843
+ if (kwikidToolkit.checkObjectKeyExists(activeFormConfig, "fields")) {
4844
+ formConfig = activeFormConfig;
4845
+ }
4846
+ else {
4847
+ console.error("No url or fields key in activeFormConfig");
4848
+ }
4849
+ _d.label = 7;
4850
+ case 7:
4199
4851
  console.log(JSON.parse(JSON.stringify(formConfig)));
4200
4852
  formConfig = new Converter().convertFormConfig(formConfig);
4201
4853
  activeFormData = (_a = this.allFormsData[formConfig.key]) !== null && _a !== void 0 ? _a : {};
@@ -4308,7 +4960,7 @@
4308
4960
  return KwikIDFormsRendererComponent;
4309
4961
  }());
4310
4962
  /** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
4311
- /** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [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 [formData]=\"this.activeFormData\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [formsList]=\"this.formsList\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickApiCall)=\"this.handleOnClickApiCall($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\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=\"tuiIconCancel\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", styles: [":host{position:relative}.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}\n"], components: [{ type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "apiCallResponse", "isMobileView", "allFormsData", "formsList"], outputs: ["onClickViewForms", "onClickSaveForm", "onClickApiCall"] }, { type: i4__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace.TuiPushDirective, selector: "tui-push" }], animations: [
4963
+ /** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [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 [formData]=\"this.activeFormData\"\n [formsList]=\"this.formsList\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\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=\"tuiIconCancel\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", styles: [":host{position:relative}.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}\n"], components: [{ type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData", "formsList"], outputs: ["onClickViewForms", "onClickSaveForm", "onClickApiCall"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }], animations: [
4312
4964
  animations.trigger("panelInOut", [
4313
4965
  animations.transition(":enter", [
4314
4966
  animations.style({ transform: "translateY(100%)" }),
@@ -4401,13 +5053,45 @@
4401
5053
  return KwikIDFormBuilderModule;
4402
5054
  }());
4403
5055
  /** @nocollapse */ KwikIDFormBuilderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
4404
- /** @nocollapse */ KwikIDFormBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, declarations: [KwikIDFormsBuilderComponent], imports: [i5.CommonModule, i6.FormsModule, i6.ReactiveFormsModule, dragDrop.DragDropModule], exports: [KwikIDFormsBuilderComponent] });
4405
- /** @nocollapse */ KwikIDFormBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, providers: [], imports: [[i5.CommonModule, i6.FormsModule, i6.ReactiveFormsModule, dragDrop.DragDropModule]] });
5056
+ /** @nocollapse */ KwikIDFormBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, declarations: [KwikIDFormsBuilderComponent,
5057
+ ElementConfigEditor,
5058
+ BasicElementConfigEditor,
5059
+ BasicTextConfigEditor,
5060
+ BasicRadioConfigEditor], imports: [i3.CommonModule,
5061
+ i1.FormsModule,
5062
+ i1.ReactiveFormsModule,
5063
+ i4.DragDropModule,
5064
+ i2.KwikUIButtonModule,
5065
+ i2.KwikUIInputModule,
5066
+ i2.KwikUIButtonIconModule], exports: [KwikIDFormsBuilderComponent] });
5067
+ /** @nocollapse */ KwikIDFormBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, providers: [], imports: [[
5068
+ i3.CommonModule,
5069
+ i1.FormsModule,
5070
+ i1.ReactiveFormsModule,
5071
+ i4.DragDropModule,
5072
+ i2.KwikUIButtonModule,
5073
+ i2.KwikUIInputModule,
5074
+ i2.KwikUIButtonIconModule
5075
+ ]] });
4406
5076
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, decorators: [{
4407
5077
  type: i0.NgModule,
4408
5078
  args: [{
4409
- declarations: [KwikIDFormsBuilderComponent],
4410
- imports: [i5.CommonModule, i6.FormsModule, i6.ReactiveFormsModule, dragDrop.DragDropModule],
5079
+ declarations: [
5080
+ KwikIDFormsBuilderComponent,
5081
+ ElementConfigEditor,
5082
+ BasicElementConfigEditor,
5083
+ BasicTextConfigEditor,
5084
+ BasicRadioConfigEditor
5085
+ ],
5086
+ imports: [
5087
+ i3.CommonModule,
5088
+ i1.FormsModule,
5089
+ i1.ReactiveFormsModule,
5090
+ i4.DragDropModule,
5091
+ i2.KwikUIButtonModule,
5092
+ i2.KwikUIInputModule,
5093
+ i2.KwikUIButtonIconModule
5094
+ ],
4411
5095
  providers: [],
4412
5096
  exports: [KwikIDFormsBuilderComponent]
4413
5097
  }]
@@ -4419,20 +5103,20 @@
4419
5103
  return KwikIDFormViewModule;
4420
5104
  }());
4421
5105
  /** @nocollapse */ KwikIDFormViewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
4422
- /** @nocollapse */ KwikIDFormViewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1], imports: [i5.CommonModule,
4423
- i6.FormsModule,
4424
- i6.ReactiveFormsModule,
4425
- i3.TuiLabelModule,
4426
- i4.TuiPushModule,
4427
- i3.TuiSvgModule,
5106
+ /** @nocollapse */ KwikIDFormViewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1], imports: [i3.CommonModule,
5107
+ i1.FormsModule,
5108
+ i1.ReactiveFormsModule,
5109
+ i3$1.TuiLabelModule,
5110
+ i4$1.TuiPushModule,
5111
+ i3$1.TuiSvgModule,
4428
5112
  i2.KwikUIModule], exports: [KwikIDFormViewComponent] });
4429
5113
  /** @nocollapse */ KwikIDFormViewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, imports: [[
4430
- i5.CommonModule,
4431
- i6.FormsModule,
4432
- i6.ReactiveFormsModule,
4433
- i3.TuiLabelModule,
4434
- i4.TuiPushModule,
4435
- i3.TuiSvgModule,
5114
+ i3.CommonModule,
5115
+ i1.FormsModule,
5116
+ i1.ReactiveFormsModule,
5117
+ i3$1.TuiLabelModule,
5118
+ i4$1.TuiPushModule,
5119
+ i3$1.TuiSvgModule,
4436
5120
  i2.KwikUIModule
4437
5121
  ]] });
4438
5122
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, decorators: [{
@@ -4440,12 +5124,12 @@
4440
5124
  args: [{
4441
5125
  declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1],
4442
5126
  imports: [
4443
- i5.CommonModule,
4444
- i6.FormsModule,
4445
- i6.ReactiveFormsModule,
4446
- i3.TuiLabelModule,
4447
- i4.TuiPushModule,
4448
- i3.TuiSvgModule,
5127
+ i3.CommonModule,
5128
+ i1.FormsModule,
5129
+ i1.ReactiveFormsModule,
5130
+ i3$1.TuiLabelModule,
5131
+ i4$1.TuiPushModule,
5132
+ i3$1.TuiSvgModule,
4449
5133
  i2.KwikUIModule
4450
5134
  ],
4451
5135
  exports: [KwikIDFormViewComponent]
@@ -4458,28 +5142,28 @@
4458
5142
  return KwikIDFormsListModule;
4459
5143
  }());
4460
5144
  /** @nocollapse */ KwikIDFormsListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
4461
- /** @nocollapse */ KwikIDFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, declarations: [KwikIDFormsListComponent, SafeHtmlPipe], imports: [i5.CommonModule,
4462
- i6.FormsModule,
4463
- i6.ReactiveFormsModule,
5145
+ /** @nocollapse */ KwikIDFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, declarations: [KwikIDFormsListComponent, SafeHtmlPipe], imports: [i3.CommonModule,
5146
+ i1.FormsModule,
5147
+ i1.ReactiveFormsModule,
4464
5148
  i2.KwikUIModule,
4465
- i3.TuiSvgModule], exports: [KwikIDFormsListComponent] });
5149
+ i3$1.TuiSvgModule], exports: [KwikIDFormsListComponent] });
4466
5150
  /** @nocollapse */ KwikIDFormsListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, imports: [[
4467
- i5.CommonModule,
4468
- i6.FormsModule,
4469
- i6.ReactiveFormsModule,
5151
+ i3.CommonModule,
5152
+ i1.FormsModule,
5153
+ i1.ReactiveFormsModule,
4470
5154
  i2.KwikUIModule,
4471
- i3.TuiSvgModule
5155
+ i3$1.TuiSvgModule
4472
5156
  ]] });
4473
5157
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, decorators: [{
4474
5158
  type: i0.NgModule,
4475
5159
  args: [{
4476
5160
  declarations: [KwikIDFormsListComponent, SafeHtmlPipe],
4477
5161
  imports: [
4478
- i5.CommonModule,
4479
- i6.FormsModule,
4480
- i6.ReactiveFormsModule,
5162
+ i3.CommonModule,
5163
+ i1.FormsModule,
5164
+ i1.ReactiveFormsModule,
4481
5165
  i2.KwikUIModule,
4482
- i3.TuiSvgModule
5166
+ i3$1.TuiSvgModule
4483
5167
  ],
4484
5168
  exports: [KwikIDFormsListComponent]
4485
5169
  }]
@@ -4491,37 +5175,37 @@
4491
5175
  return KwikIDFormRendererModule;
4492
5176
  }());
4493
5177
  /** @nocollapse */ KwikIDFormRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
4494
- /** @nocollapse */ KwikIDFormRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, declarations: [KwikIDFormsRendererComponent], imports: [i5.CommonModule,
5178
+ /** @nocollapse */ KwikIDFormRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, declarations: [KwikIDFormsRendererComponent], imports: [i3.CommonModule,
4495
5179
  http.HttpClientModule,
4496
5180
  KwikIDFormViewModule,
4497
5181
  KwikIDFormsListModule,
4498
5182
  i2.KwikUIModule,
4499
- i3.TuiLoaderModule,
4500
- i4.TuiPushModule,
4501
- i3.TuiSvgModule], exports: [KwikIDFormsRendererComponent] });
5183
+ i3$1.TuiLoaderModule,
5184
+ i4$1.TuiPushModule,
5185
+ i3$1.TuiSvgModule], exports: [KwikIDFormsRendererComponent] });
4502
5186
  /** @nocollapse */ KwikIDFormRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, providers: [], imports: [[
4503
- i5.CommonModule,
5187
+ i3.CommonModule,
4504
5188
  http.HttpClientModule,
4505
5189
  KwikIDFormViewModule,
4506
5190
  KwikIDFormsListModule,
4507
5191
  i2.KwikUIModule,
4508
- i3.TuiLoaderModule,
4509
- i4.TuiPushModule,
4510
- i3.TuiSvgModule
5192
+ i3$1.TuiLoaderModule,
5193
+ i4$1.TuiPushModule,
5194
+ i3$1.TuiSvgModule
4511
5195
  ]] });
4512
5196
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, decorators: [{
4513
5197
  type: i0.NgModule,
4514
5198
  args: [{
4515
5199
  declarations: [KwikIDFormsRendererComponent],
4516
5200
  imports: [
4517
- i5.CommonModule,
5201
+ i3.CommonModule,
4518
5202
  http.HttpClientModule,
4519
5203
  KwikIDFormViewModule,
4520
5204
  KwikIDFormsListModule,
4521
5205
  i2.KwikUIModule,
4522
- i3.TuiLoaderModule,
4523
- i4.TuiPushModule,
4524
- i3.TuiSvgModule
5206
+ i3$1.TuiLoaderModule,
5207
+ i4$1.TuiPushModule,
5208
+ i3$1.TuiSvgModule
4525
5209
  ],
4526
5210
  providers: [],
4527
5211
  exports: [KwikIDFormsRendererComponent]
@@ -4534,15 +5218,15 @@
4534
5218
  return KwikIDFormsModule;
4535
5219
  }());
4536
5220
  /** @nocollapse */ KwikIDFormsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
4537
- /** @nocollapse */ KwikIDFormsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [i5.CommonModule,
4538
- i6.FormsModule,
4539
- i6.ReactiveFormsModule,
5221
+ /** @nocollapse */ KwikIDFormsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [i3.CommonModule,
5222
+ i1.FormsModule,
5223
+ i1.ReactiveFormsModule,
4540
5224
  KwikIDFormBuilderModule,
4541
5225
  KwikIDFormRendererModule], exports: [KwikIDFormBuilderModule, KwikIDFormRendererModule] });
4542
5226
  /** @nocollapse */ KwikIDFormsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [[
4543
- i5.CommonModule,
4544
- i6.FormsModule,
4545
- i6.ReactiveFormsModule,
5227
+ i3.CommonModule,
5228
+ i1.FormsModule,
5229
+ i1.ReactiveFormsModule,
4546
5230
  KwikIDFormBuilderModule,
4547
5231
  KwikIDFormRendererModule
4548
5232
  ], KwikIDFormBuilderModule, KwikIDFormRendererModule] });
@@ -4551,9 +5235,9 @@
4551
5235
  args: [{
4552
5236
  declarations: [],
4553
5237
  imports: [
4554
- i5.CommonModule,
4555
- i6.FormsModule,
4556
- i6.ReactiveFormsModule,
5238
+ i3.CommonModule,
5239
+ i1.FormsModule,
5240
+ i1.ReactiveFormsModule,
4557
5241
  KwikIDFormBuilderModule,
4558
5242
  KwikIDFormRendererModule
4559
5243
  ],