kwikid-forms 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kwikid-forms.umd.js +1364 -401
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder.component.js +20 -13
- package/esm2015/lib/builder/builder.module.js +4 -1
- package/esm2015/lib/builder/element-config-editor/editors/basic/dropdown-with-search-config.editor.component.js +302 -0
- package/esm2015/lib/builder/element-config-editor/editors/basic/otp-config.editor.component.js +2 -2
- package/esm2015/lib/builder/element-config-editor/editors/basic/phone-config.editor.component.js +6 -4
- package/esm2015/lib/builder/element-config-editor/editors/basic-element-config.editor.component.js +22 -7
- package/esm2015/lib/builder/shared/elements.js +19 -7
- package/esm2015/lib/renderer/config-converter.helper.js +11 -32
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +15 -2
- package/esm2015/lib/renderer/form-view/definitions/form-view.commons.definition.js +6 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +530 -136
- package/esm2015/lib/renderer/form-view/form-view.module.js +18 -4
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +5 -1
- package/esm2015/lib/renderer/form-view/helpers/form-view.tasks.helper.js +28 -0
- package/esm2015/lib/renderer/form-view/pipes/safe-url.pipe.js +25 -0
- package/esm2015/lib/renderer/forms-list/forms-list.component.js +7 -1
- package/esm2015/lib/renderer/renderer.component.js +176 -14
- package/esm2015/lib/renderer/renderer.module.js +15 -2
- package/fesm2015/kwikid-forms.js +1166 -205
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/builder/builder.component.d.ts +1 -0
- package/lib/builder/builder.module.d.ts +17 -16
- package/lib/builder/element-config-editor/editors/basic/dropdown-with-search-config.editor.component.d.ts +24 -0
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +28 -2
- package/lib/renderer/form-view/definitions/form-view.commons.definition.d.ts +5 -0
- package/lib/renderer/form-view/form-view.component.d.ts +45 -7
- package/lib/renderer/form-view/form-view.module.d.ts +8 -6
- package/lib/renderer/form-view/helpers/form-view.tasks.helper.d.ts +7 -0
- package/lib/renderer/form-view/pipes/safe-url.pipe.d.ts +15 -0
- package/lib/renderer/renderer.component.d.ts +33 -4
- package/lib/renderer/renderer.module.d.ts +2 -1
- package/package.json +2 -2
package/fesm2015/kwikid-forms.js
CHANGED
|
@@ -2,17 +2,19 @@ import { __decorate, __awaiter } from 'tslib';
|
|
|
2
2
|
import * as i4 from '@angular/cdk/drag-drop';
|
|
3
3
|
import { copyArrayItem, moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { EventEmitter, Component, Input, Output, ViewEncapsulation, Pipe, Inject, HostListener, NgModule } from '@angular/core';
|
|
5
|
+
import { EventEmitter, Component, Input, Output, ViewEncapsulation, Pipe, Inject, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
6
6
|
import * as i2 from '@angular/forms';
|
|
7
7
|
import { FormGroup, FormControl, FormArray, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import { logMethod, setMissingKeyValue, mergeObjects, checkObjectKeyExists, getObjectFromLocalStorage, isNotEmptyValue, isEmptyValue, setValueToObjectPath, Source, Rule, Condition, Action, PATTERNS, Validation,
|
|
8
|
+
import { logMethod, setMissingKeyValue, mergeObjects, checkObjectKeyExists, getObjectFromLocalStorage, isNotEmptyValue, isEmptyValue, setValueToObjectPath, Source, Rule, Condition, Action, PATTERNS, Validation, ESourceKey, replaceString, getObjectValueFromPath, isUndefined, isNull, getObjectDeepCopy } from 'kwikid-toolkit';
|
|
9
9
|
import * as i1 from 'kwikui';
|
|
10
10
|
import { KwikUIButtonIconModule, KwikUIButtonModule, KwikUIInputModule, KwikUIInputNumberModule, KwikUISelectComboboxModule, KwikUITableModule, KwikUITextareaModule, KwikUIModule } from 'kwikui';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i3 from '@angular/common';
|
|
12
12
|
import { CommonModule } from '@angular/common';
|
|
13
13
|
import _ from 'lodash';
|
|
14
|
-
import * as
|
|
15
|
-
import {
|
|
14
|
+
import * as i5 from '@taiga-ui/addon-preview';
|
|
15
|
+
import { TuiPreviewDialogService, TuiPreviewModule, TuiPreviewActionModule } from '@taiga-ui/addon-preview';
|
|
16
|
+
import * as i3$1 from '@taiga-ui/core';
|
|
17
|
+
import { TuiAlertService, TuiDialogService, TuiLabelModule, TuiSvgModule, TuiButtonModule, TuiDialogModule, TuiLoaderModule } from '@taiga-ui/core';
|
|
16
18
|
import * as i4$1 from '@taiga-ui/kit';
|
|
17
19
|
import { TuiPushService, TuiPushModule } from '@taiga-ui/kit';
|
|
18
20
|
import { pairwise } from 'rxjs/operators';
|
|
@@ -46,15 +48,27 @@ class Elements {
|
|
|
46
48
|
this.basic = [
|
|
47
49
|
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" }) }),
|
|
48
50
|
Object.assign(Object.assign({ elementTitle: "Number", elementType: "number", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
49
|
-
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" }), options: [
|
|
51
|
+
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" }), options: [
|
|
52
|
+
{
|
|
53
|
+
label: "",
|
|
54
|
+
disabled: false,
|
|
55
|
+
description: ""
|
|
56
|
+
}
|
|
57
|
+
] }),
|
|
58
|
+
Object.assign(Object.assign({ elementTitle: "Dropdown with Search", elementType: "dropdown-with-search", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { orientation: "vertical" }), options: [
|
|
59
|
+
{
|
|
60
|
+
title: "",
|
|
61
|
+
value: ""
|
|
62
|
+
}
|
|
63
|
+
] }),
|
|
50
64
|
Object.assign(Object.assign({ elementTitle: "Checkbox", elementType: "checkbox", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
51
65
|
Object.assign(Object.assign({ elementTitle: "Date", elementType: "date", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
52
|
-
Object.assign(Object.assign({ elementTitle: "OTP", elementType: "otp", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { mask: "
|
|
53
|
-
Object.assign(Object.assign({ elementTitle: "Phone", elementType: "phone", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), {
|
|
66
|
+
Object.assign(Object.assign({ elementTitle: "OTP", elementType: "otp", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { mask: "####" }) }),
|
|
67
|
+
Object.assign(Object.assign({ elementTitle: "Phone", elementType: "phone", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { countryCode: "+91", removeCountryCodeFromValue: true, phoneMaskAfterCountryCode: "##########" }) })
|
|
54
68
|
];
|
|
55
69
|
this.documents = [
|
|
56
70
|
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: "####-####-####" }) }),
|
|
57
|
-
Object.assign(Object.assign({ elementTitle: "PAN Number", elementType: "
|
|
71
|
+
Object.assign(Object.assign({ elementTitle: "PAN Number", elementType: "text", isElement: true, elementCategory: "document" }, this.commonCore), { validators: Object.assign({ pattern: { key: "IS_PAN_NUMBER" } }, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { case: "upper" }) })
|
|
58
72
|
];
|
|
59
73
|
this.others = [
|
|
60
74
|
{
|
|
@@ -63,7 +77,7 @@ class Elements {
|
|
|
63
77
|
isElement: true,
|
|
64
78
|
elementCategory: "other",
|
|
65
79
|
key: "",
|
|
66
|
-
html: ""
|
|
80
|
+
html: ""
|
|
67
81
|
},
|
|
68
82
|
{
|
|
69
83
|
elementTitle: "Title",
|
|
@@ -81,7 +95,7 @@ class Elements {
|
|
|
81
95
|
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) })
|
|
82
96
|
];
|
|
83
97
|
this.elementMapping = {
|
|
84
|
-
basic: ["text", "number", "radio", "checkbox", "date", "otp", "phone"],
|
|
98
|
+
basic: ["text", "number", "radio", "dropdown-with-search", "checkbox", "date", "otp", "phone"],
|
|
85
99
|
documents: ["aadhaar-number", "pan-number"],
|
|
86
100
|
others: ["html", "title"],
|
|
87
101
|
templates: [],
|
|
@@ -505,7 +519,7 @@ class BasicRadioConfigEditor {
|
|
|
505
519
|
</fieldset>
|
|
506
520
|
</div>
|
|
507
521
|
</form>
|
|
508
|
-
`, 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 "], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type:
|
|
522
|
+
`, 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 "], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
509
523
|
__decorate([
|
|
510
524
|
logMethod
|
|
511
525
|
], BasicRadioConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -676,6 +690,300 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
676
690
|
type: Output
|
|
677
691
|
}], ngOnInit: [], ngOnChanges: [], createBasicRadioFormGroup: [], handleOnSave: [], createOptionConfigFormGroup: [], addOption: [], removeOption: [] } });
|
|
678
692
|
|
|
693
|
+
class BasicDropdownWithSearchConfigEditor {
|
|
694
|
+
constructor() {
|
|
695
|
+
this.optionType = {
|
|
696
|
+
title: "",
|
|
697
|
+
value: ""
|
|
698
|
+
};
|
|
699
|
+
this.saveBasicClickCounter = 0;
|
|
700
|
+
this.elementConfig = {
|
|
701
|
+
options: []
|
|
702
|
+
};
|
|
703
|
+
this.updateElement = new EventEmitter();
|
|
704
|
+
this.basicDropdownWithSearchFormGroup = undefined;
|
|
705
|
+
}
|
|
706
|
+
ngOnInit() {
|
|
707
|
+
this.createBasicDropdownWithSearchFormGroup();
|
|
708
|
+
}
|
|
709
|
+
ngOnChanges(changes) {
|
|
710
|
+
var _a;
|
|
711
|
+
const verifyChange = (key) => {
|
|
712
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
713
|
+
};
|
|
714
|
+
if (verifyChange("elementConfig")) {
|
|
715
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
716
|
+
(_a = this.basicDropdownWithSearchFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
717
|
+
}
|
|
718
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
719
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
720
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
721
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
722
|
+
this.handleOnSave();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
createBasicDropdownWithSearchFormGroup() {
|
|
727
|
+
let optionsFormArray = [];
|
|
728
|
+
this.elementConfig = setMissingKeyValue(this.elementConfig, "options", [
|
|
729
|
+
this.optionType
|
|
730
|
+
]);
|
|
731
|
+
for (let option of this.elementConfig.options) {
|
|
732
|
+
optionsFormArray.push(this.createOptionConfigFormGroup(option));
|
|
733
|
+
}
|
|
734
|
+
this.basicDropdownWithSearchFormGroup = new FormGroup({
|
|
735
|
+
options: new FormArray(optionsFormArray)
|
|
736
|
+
});
|
|
737
|
+
this.basicDropdownWithSearchFormGroup.updateValueAndValidity();
|
|
738
|
+
}
|
|
739
|
+
handleOnSave() {
|
|
740
|
+
let basicElementConfig = this.basicDropdownWithSearchFormGroup.getRawValue();
|
|
741
|
+
this.updateElement.emit({
|
|
742
|
+
basicElementConfig: basicElementConfig
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
get optionsArray() {
|
|
746
|
+
return this.basicDropdownWithSearchFormGroup.get("options");
|
|
747
|
+
}
|
|
748
|
+
createOptionConfigFormGroup(optionConfig) {
|
|
749
|
+
const optionFormGroup = new FormGroup({
|
|
750
|
+
title: new FormControl(optionConfig.title, {
|
|
751
|
+
updateOn: "change"
|
|
752
|
+
}),
|
|
753
|
+
value: new FormControl(optionConfig.value, {
|
|
754
|
+
updateOn: "change"
|
|
755
|
+
})
|
|
756
|
+
});
|
|
757
|
+
return optionFormGroup;
|
|
758
|
+
}
|
|
759
|
+
addOption() {
|
|
760
|
+
const options = this.basicDropdownWithSearchFormGroup.get("options");
|
|
761
|
+
options.push(this.createOptionConfigFormGroup(this.optionType));
|
|
762
|
+
}
|
|
763
|
+
removeOption(optionIndex) {
|
|
764
|
+
const options = this.basicDropdownWithSearchFormGroup.get("options");
|
|
765
|
+
if (options.length > 1) {
|
|
766
|
+
options.removeAt(optionIndex);
|
|
767
|
+
}
|
|
768
|
+
else {
|
|
769
|
+
this.addOption();
|
|
770
|
+
// options.reset();
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
/** @nocollapse */ BasicDropdownWithSearchConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicDropdownWithSearchConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
775
|
+
/** @nocollapse */ BasicDropdownWithSearchConfigEditor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicDropdownWithSearchConfigEditor, selector: "basic-dropdown-with-search-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0, template: `
|
|
776
|
+
<form [formGroup]="basicDropdownWithSearchFormGroup">
|
|
777
|
+
<fieldset>
|
|
778
|
+
<legend class="form-group-title">Options</legend>
|
|
779
|
+
<div formArrayName="options">
|
|
780
|
+
<ng-container
|
|
781
|
+
*ngFor="let option of optionsArray.controls; let i = index"
|
|
782
|
+
>
|
|
783
|
+
<div [formGroupName]="i">
|
|
784
|
+
<div class="form-group">
|
|
785
|
+
<kwikui-input
|
|
786
|
+
[label]="'Title'"
|
|
787
|
+
[id]="'basic-dropdown-with-search-config-title'"
|
|
788
|
+
[type]="'text'"
|
|
789
|
+
[formControlName]="'title'"
|
|
790
|
+
[formControl]="
|
|
791
|
+
basicDropdownWithSearchFormGroup['controls'].options['controls'][i][
|
|
792
|
+
'controls'
|
|
793
|
+
].title
|
|
794
|
+
"
|
|
795
|
+
[disabled]="false"
|
|
796
|
+
[placeholder]="'Please enter your title'"
|
|
797
|
+
[focus]="false"
|
|
798
|
+
[invalid]="false"
|
|
799
|
+
[case]="'default'"
|
|
800
|
+
size="m"
|
|
801
|
+
></kwikui-input>
|
|
802
|
+
</div>
|
|
803
|
+
<div class="form-group">
|
|
804
|
+
<kwikui-input
|
|
805
|
+
[label]="'Value'"
|
|
806
|
+
[id]="'basic-dropdown-with-search-config-value'"
|
|
807
|
+
[type]="'text'"
|
|
808
|
+
[formControlName]="'value'"
|
|
809
|
+
[formControl]="
|
|
810
|
+
basicDropdownWithSearchFormGroup['controls'].options['controls'][i][
|
|
811
|
+
'controls'
|
|
812
|
+
].value
|
|
813
|
+
"
|
|
814
|
+
[disabled]="false"
|
|
815
|
+
[placeholder]="'Please enter your value'"
|
|
816
|
+
[focus]="false"
|
|
817
|
+
[invalid]="false"
|
|
818
|
+
[case]="'default'"
|
|
819
|
+
size="m"
|
|
820
|
+
></kwikui-input>
|
|
821
|
+
</div>
|
|
822
|
+
<div class="form-array-actions">
|
|
823
|
+
<kwikui-button
|
|
824
|
+
[disabled]="false"
|
|
825
|
+
label="Remove"
|
|
826
|
+
[showLoader]="false"
|
|
827
|
+
styles=""
|
|
828
|
+
class="save-button"
|
|
829
|
+
type="button"
|
|
830
|
+
appearance="secondary"
|
|
831
|
+
icon=""
|
|
832
|
+
iconRight=""
|
|
833
|
+
[shape]="'rounded'"
|
|
834
|
+
size="s"
|
|
835
|
+
(onClick)="removeOption(i)"
|
|
836
|
+
></kwikui-button>
|
|
837
|
+
<kwikui-button
|
|
838
|
+
[disabled]="false"
|
|
839
|
+
label="Add"
|
|
840
|
+
[showLoader]="false"
|
|
841
|
+
styles=""
|
|
842
|
+
class="save-button"
|
|
843
|
+
type="button"
|
|
844
|
+
appearance="secondary"
|
|
845
|
+
icon=""
|
|
846
|
+
iconRight=""
|
|
847
|
+
[shape]="'rounded'"
|
|
848
|
+
size="s"
|
|
849
|
+
(onClick)="addOption()"
|
|
850
|
+
></kwikui-button>
|
|
851
|
+
</div>
|
|
852
|
+
</div>
|
|
853
|
+
</ng-container>
|
|
854
|
+
</div>
|
|
855
|
+
</fieldset>
|
|
856
|
+
</form>
|
|
857
|
+
`, 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 "], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
858
|
+
__decorate([
|
|
859
|
+
logMethod
|
|
860
|
+
], BasicDropdownWithSearchConfigEditor.prototype, "ngOnInit", null);
|
|
861
|
+
__decorate([
|
|
862
|
+
logMethod
|
|
863
|
+
], BasicDropdownWithSearchConfigEditor.prototype, "ngOnChanges", null);
|
|
864
|
+
__decorate([
|
|
865
|
+
logMethod
|
|
866
|
+
], BasicDropdownWithSearchConfigEditor.prototype, "createBasicDropdownWithSearchFormGroup", null);
|
|
867
|
+
__decorate([
|
|
868
|
+
logMethod
|
|
869
|
+
], BasicDropdownWithSearchConfigEditor.prototype, "handleOnSave", null);
|
|
870
|
+
__decorate([
|
|
871
|
+
logMethod
|
|
872
|
+
], BasicDropdownWithSearchConfigEditor.prototype, "createOptionConfigFormGroup", null);
|
|
873
|
+
__decorate([
|
|
874
|
+
logMethod
|
|
875
|
+
], BasicDropdownWithSearchConfigEditor.prototype, "addOption", null);
|
|
876
|
+
__decorate([
|
|
877
|
+
logMethod
|
|
878
|
+
], BasicDropdownWithSearchConfigEditor.prototype, "removeOption", null);
|
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicDropdownWithSearchConfigEditor, decorators: [{
|
|
880
|
+
type: Component,
|
|
881
|
+
args: [{
|
|
882
|
+
selector: "basic-dropdown-with-search-config-editor",
|
|
883
|
+
template: `
|
|
884
|
+
<form [formGroup]="basicDropdownWithSearchFormGroup">
|
|
885
|
+
<fieldset>
|
|
886
|
+
<legend class="form-group-title">Options</legend>
|
|
887
|
+
<div formArrayName="options">
|
|
888
|
+
<ng-container
|
|
889
|
+
*ngFor="let option of optionsArray.controls; let i = index"
|
|
890
|
+
>
|
|
891
|
+
<div [formGroupName]="i">
|
|
892
|
+
<div class="form-group">
|
|
893
|
+
<kwikui-input
|
|
894
|
+
[label]="'Title'"
|
|
895
|
+
[id]="'basic-dropdown-with-search-config-title'"
|
|
896
|
+
[type]="'text'"
|
|
897
|
+
[formControlName]="'title'"
|
|
898
|
+
[formControl]="
|
|
899
|
+
basicDropdownWithSearchFormGroup['controls'].options['controls'][i][
|
|
900
|
+
'controls'
|
|
901
|
+
].title
|
|
902
|
+
"
|
|
903
|
+
[disabled]="false"
|
|
904
|
+
[placeholder]="'Please enter your title'"
|
|
905
|
+
[focus]="false"
|
|
906
|
+
[invalid]="false"
|
|
907
|
+
[case]="'default'"
|
|
908
|
+
size="m"
|
|
909
|
+
></kwikui-input>
|
|
910
|
+
</div>
|
|
911
|
+
<div class="form-group">
|
|
912
|
+
<kwikui-input
|
|
913
|
+
[label]="'Value'"
|
|
914
|
+
[id]="'basic-dropdown-with-search-config-value'"
|
|
915
|
+
[type]="'text'"
|
|
916
|
+
[formControlName]="'value'"
|
|
917
|
+
[formControl]="
|
|
918
|
+
basicDropdownWithSearchFormGroup['controls'].options['controls'][i][
|
|
919
|
+
'controls'
|
|
920
|
+
].value
|
|
921
|
+
"
|
|
922
|
+
[disabled]="false"
|
|
923
|
+
[placeholder]="'Please enter your value'"
|
|
924
|
+
[focus]="false"
|
|
925
|
+
[invalid]="false"
|
|
926
|
+
[case]="'default'"
|
|
927
|
+
size="m"
|
|
928
|
+
></kwikui-input>
|
|
929
|
+
</div>
|
|
930
|
+
<div class="form-array-actions">
|
|
931
|
+
<kwikui-button
|
|
932
|
+
[disabled]="false"
|
|
933
|
+
label="Remove"
|
|
934
|
+
[showLoader]="false"
|
|
935
|
+
styles=""
|
|
936
|
+
class="save-button"
|
|
937
|
+
type="button"
|
|
938
|
+
appearance="secondary"
|
|
939
|
+
icon=""
|
|
940
|
+
iconRight=""
|
|
941
|
+
[shape]="'rounded'"
|
|
942
|
+
size="s"
|
|
943
|
+
(onClick)="removeOption(i)"
|
|
944
|
+
></kwikui-button>
|
|
945
|
+
<kwikui-button
|
|
946
|
+
[disabled]="false"
|
|
947
|
+
label="Add"
|
|
948
|
+
[showLoader]="false"
|
|
949
|
+
styles=""
|
|
950
|
+
class="save-button"
|
|
951
|
+
type="button"
|
|
952
|
+
appearance="secondary"
|
|
953
|
+
icon=""
|
|
954
|
+
iconRight=""
|
|
955
|
+
[shape]="'rounded'"
|
|
956
|
+
size="s"
|
|
957
|
+
(onClick)="addOption()"
|
|
958
|
+
></kwikui-button>
|
|
959
|
+
</div>
|
|
960
|
+
</div>
|
|
961
|
+
</ng-container>
|
|
962
|
+
</div>
|
|
963
|
+
</fieldset>
|
|
964
|
+
</form>
|
|
965
|
+
`,
|
|
966
|
+
styles: [
|
|
967
|
+
`
|
|
968
|
+
.form-array-actions {
|
|
969
|
+
display: flex;
|
|
970
|
+
flex-direction: row;
|
|
971
|
+
align-content: center;
|
|
972
|
+
justify-content: center;
|
|
973
|
+
align-items: center;
|
|
974
|
+
gap: 1rem;
|
|
975
|
+
}
|
|
976
|
+
`
|
|
977
|
+
]
|
|
978
|
+
}]
|
|
979
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
980
|
+
type: Input
|
|
981
|
+
}], elementConfig: [{
|
|
982
|
+
type: Input
|
|
983
|
+
}], updateElement: [{
|
|
984
|
+
type: Output
|
|
985
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicDropdownWithSearchFormGroup: [], handleOnSave: [], createOptionConfigFormGroup: [], addOption: [], removeOption: [] } });
|
|
986
|
+
|
|
679
987
|
class BasicCheckboxConfigEditor {
|
|
680
988
|
constructor() {
|
|
681
989
|
this.saveBasicClickCounter = 0;
|
|
@@ -748,7 +1056,7 @@ class BasicOtpConfigEditor {
|
|
|
748
1056
|
this.saveBasicClickCounter = 0;
|
|
749
1057
|
this.elementConfig = {
|
|
750
1058
|
properties: {
|
|
751
|
-
mask: "
|
|
1059
|
+
mask: "####"
|
|
752
1060
|
}
|
|
753
1061
|
};
|
|
754
1062
|
this.updateElement = new EventEmitter();
|
|
@@ -871,7 +1179,9 @@ class BasicPhoneConfigEditor {
|
|
|
871
1179
|
this.saveBasicClickCounter = 0;
|
|
872
1180
|
this.elementConfig = {
|
|
873
1181
|
properties: {
|
|
874
|
-
|
|
1182
|
+
countryCode: "+91",
|
|
1183
|
+
removeCountryCodeFromValue: true,
|
|
1184
|
+
phoneMaskAfterCountryCode: "##########"
|
|
875
1185
|
}
|
|
876
1186
|
};
|
|
877
1187
|
this.updateElement = new EventEmitter();
|
|
@@ -926,7 +1236,7 @@ class BasicPhoneConfigEditor {
|
|
|
926
1236
|
[type]="'text'"
|
|
927
1237
|
[formControlName]="'mask'"
|
|
928
1238
|
[formControl]="
|
|
929
|
-
|
|
1239
|
+
basicPhoneFormGroup.controls.properties['controls'].mask
|
|
930
1240
|
"
|
|
931
1241
|
[disabled]="false"
|
|
932
1242
|
[placeholder]="'Please enter your mask'"
|
|
@@ -966,7 +1276,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
966
1276
|
[type]="'text'"
|
|
967
1277
|
[formControlName]="'mask'"
|
|
968
1278
|
[formControl]="
|
|
969
|
-
|
|
1279
|
+
basicPhoneFormGroup.controls.properties['controls'].mask
|
|
970
1280
|
"
|
|
971
1281
|
[disabled]="false"
|
|
972
1282
|
[placeholder]="'Please enter your mask'"
|
|
@@ -1323,6 +1633,13 @@ class BasicElementConfigEditor {
|
|
|
1323
1633
|
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1324
1634
|
></basic-radio-config-editor>
|
|
1325
1635
|
</ng-container>
|
|
1636
|
+
<ng-container *ngSwitchCase="'dropdown-with-search'">
|
|
1637
|
+
<basic-dropdown-with-search-config-editor
|
|
1638
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1639
|
+
[elementConfig]="elementConfig"
|
|
1640
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1641
|
+
></basic-dropdown-with-search-config-editor>
|
|
1642
|
+
</ng-container>
|
|
1326
1643
|
<ng-container *ngSwitchCase="'checkbox'">
|
|
1327
1644
|
<basic-checkbox-config-editor
|
|
1328
1645
|
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
@@ -1353,7 +1670,7 @@ class BasicElementConfigEditor {
|
|
|
1353
1670
|
</ng-container>
|
|
1354
1671
|
</ng-container>
|
|
1355
1672
|
</form>
|
|
1356
|
-
`, 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: i1.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: BasicTextConfigEditor, selector: "basic-text-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicNumberConfigEditor, selector: "basic-number-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicRadioConfigEditor, selector: "basic-radio-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicCheckboxConfigEditor, selector: "basic-checkbox-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicOtpConfigEditor, selector: "basic-otp-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicPhoneConfigEditor, selector: "basic-phone-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type:
|
|
1673
|
+
`, 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: i1.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: BasicTextConfigEditor, selector: "basic-text-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicNumberConfigEditor, selector: "basic-number-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicRadioConfigEditor, selector: "basic-radio-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicDropdownWithSearchConfigEditor, selector: "basic-dropdown-with-search-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicCheckboxConfigEditor, selector: "basic-checkbox-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicOtpConfigEditor, selector: "basic-otp-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicPhoneConfigEditor, selector: "basic-phone-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
1357
1674
|
__decorate([
|
|
1358
1675
|
logMethod
|
|
1359
1676
|
], BasicElementConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -1606,6 +1923,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1606
1923
|
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1607
1924
|
></basic-radio-config-editor>
|
|
1608
1925
|
</ng-container>
|
|
1926
|
+
<ng-container *ngSwitchCase="'dropdown-with-search'">
|
|
1927
|
+
<basic-dropdown-with-search-config-editor
|
|
1928
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1929
|
+
[elementConfig]="elementConfig"
|
|
1930
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1931
|
+
></basic-dropdown-with-search-config-editor>
|
|
1932
|
+
</ng-container>
|
|
1609
1933
|
<ng-container *ngSwitchCase="'checkbox'">
|
|
1610
1934
|
<basic-checkbox-config-editor
|
|
1611
1935
|
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
@@ -2238,7 +2562,7 @@ class DocumentElementConfigEditor {
|
|
|
2238
2562
|
</ng-container>
|
|
2239
2563
|
</ng-container>
|
|
2240
2564
|
</form>
|
|
2241
|
-
`, 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: i1.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: DocumentAadhaarNumberConfigEditor, selector: "document-aadhaar-number-config-editor", inputs: ["saveDocumentClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: DocumentPanNumberConfigEditor, selector: "document-pan-number-config-editor", inputs: ["saveDocumentClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type:
|
|
2565
|
+
`, 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: i1.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: DocumentAadhaarNumberConfigEditor, selector: "document-aadhaar-number-config-editor", inputs: ["saveDocumentClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: DocumentPanNumberConfigEditor, selector: "document-pan-number-config-editor", inputs: ["saveDocumentClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
2242
2566
|
__decorate([
|
|
2243
2567
|
logMethod
|
|
2244
2568
|
], DocumentElementConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -2842,7 +3166,7 @@ class OtherElementConfigEditor {
|
|
|
2842
3166
|
</ng-container>
|
|
2843
3167
|
</ng-container>
|
|
2844
3168
|
</form>
|
|
2845
|
-
`, 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: i1.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: OtherHTMLConfigEditor, selector: "other-html-config-editor", inputs: ["saveOtherClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: OtherTitleConfigEditor, selector: "other-title-config-editor", inputs: ["saveOtherClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type:
|
|
3169
|
+
`, 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: i1.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: OtherHTMLConfigEditor, selector: "other-html-config-editor", inputs: ["saveOtherClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: OtherTitleConfigEditor, selector: "other-title-config-editor", inputs: ["saveOtherClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
2846
3170
|
__decorate([
|
|
2847
3171
|
logMethod
|
|
2848
3172
|
], OtherElementConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -2990,7 +3314,7 @@ class ElementConfigEditor {
|
|
|
2990
3314
|
}
|
|
2991
3315
|
}
|
|
2992
3316
|
/** @nocollapse */ ElementConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2993
|
-
/** @nocollapse */ ElementConfigEditor.ɵcmp = i0.ɵɵ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, template: "<div\n class=\"container\"\n *ngIf=\"elementConfig\"\n>\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 <!-- Document -->\n <ng-container *ngSwitchCase=\"'document'\">\n <document-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></document-element-config-editor>\n </ng-container>\n <!-- Other -->\n <ng-container *ngSwitchCase=\"'other'\">\n <other-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></other-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> -->\n <kwikui-button\n [disabled]=\"false\"\n label=\"Save\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"save-button\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n size=\"m\"\n (onClick)=\"handleOnClickSave()\"\n ></kwikui-button>\n </div>\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;padding:.5rem 0}.form-group-title{margin-top:1rem}.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 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 0 10px -6px #000;border:0px solid gray;border-radius:1rem}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}kwikui-table table{width:100%;box-shadow:0 0 10px -6px #000;border:0px solid gray;padding:0}\n"], components: [{ type: BasicElementConfigEditor, selector: "basic-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: DocumentElementConfigEditor, selector: "document-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: OtherElementConfigEditor, selector: "other-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type:
|
|
3317
|
+
/** @nocollapse */ ElementConfigEditor.ɵcmp = i0.ɵɵ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, template: "<div\n class=\"container\"\n *ngIf=\"elementConfig\"\n>\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 <!-- Document -->\n <ng-container *ngSwitchCase=\"'document'\">\n <document-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></document-element-config-editor>\n </ng-container>\n <!-- Other -->\n <ng-container *ngSwitchCase=\"'other'\">\n <other-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></other-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> -->\n <kwikui-button\n [disabled]=\"false\"\n label=\"Save\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"save-button\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n size=\"m\"\n (onClick)=\"handleOnClickSave()\"\n ></kwikui-button>\n </div>\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;padding:.5rem 0}.form-group-title{margin-top:1rem}.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 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 0 10px -6px #000;border:0px solid gray;border-radius:1rem}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}kwikui-table table{width:100%;box-shadow:0 0 10px -6px #000;border:0px solid gray;padding:0}\n"], components: [{ type: BasicElementConfigEditor, selector: "basic-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: DocumentElementConfigEditor, selector: "document-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: OtherElementConfigEditor, selector: "other-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2994
3318
|
__decorate([
|
|
2995
3319
|
logMethod
|
|
2996
3320
|
], ElementConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -3044,29 +3368,24 @@ class KwikIDFormsBuilderComponent {
|
|
|
3044
3368
|
formKey: new FormControl("", [Validators.required]),
|
|
3045
3369
|
formTitle: new FormControl("", [Validators.required])
|
|
3046
3370
|
});
|
|
3047
|
-
const formDropConfig = getObjectFromLocalStorage("
|
|
3371
|
+
const formDropConfig = getObjectFromLocalStorage("builderFormConfig");
|
|
3048
3372
|
if (isNotEmptyValue(formDropConfig)) {
|
|
3049
3373
|
this.formKey = formDropConfig.key;
|
|
3050
3374
|
this.formTitle = formDropConfig.title;
|
|
3051
3375
|
const formFields = formDropConfig.fields.map((item) => {
|
|
3052
3376
|
item.elementId = revisedRandId();
|
|
3053
|
-
item.elementCategory = this.elementsMapping.basic.includes(item.
|
|
3377
|
+
item.elementCategory = this.elementsMapping.basic.includes(item.elementType)
|
|
3054
3378
|
? "basic"
|
|
3055
|
-
: this.elementsMapping.documents.includes(item.
|
|
3379
|
+
: this.elementsMapping.documents.includes(item.elementType)
|
|
3056
3380
|
? "document"
|
|
3057
3381
|
: "others";
|
|
3058
|
-
item.elementType =
|
|
3059
|
-
item.elementCategory === "basic" ||
|
|
3060
|
-
item.elementCategory === "document"
|
|
3061
|
-
? item.type
|
|
3062
|
-
: String(`NA<>${item.type}`);
|
|
3063
3382
|
item.isElement = true;
|
|
3064
3383
|
const elementFiltered = item.elementCategory === "basic"
|
|
3065
|
-
? this.basicElements.find((element) => element.elementType === item.
|
|
3384
|
+
? this.basicElements.find((element) => element.elementType === item.elementType)
|
|
3066
3385
|
: item.elementCategory === "document"
|
|
3067
|
-
? this.documentElements.find((element) => element.elementType === item.
|
|
3386
|
+
? this.documentElements.find((element) => element.elementType === item.elementType)
|
|
3068
3387
|
: item.elementCategory === "others"
|
|
3069
|
-
? this.otherElements.find((element) => element.elementType === item.
|
|
3388
|
+
? this.otherElements.find((element) => element.elementType === item.elementType)
|
|
3070
3389
|
: undefined;
|
|
3071
3390
|
item.elementTitle = isEmptyValue(elementFiltered)
|
|
3072
3391
|
? item.elementCategory + "::" + item.elementType
|
|
@@ -3264,12 +3583,24 @@ class KwikIDFormsBuilderComponent {
|
|
|
3264
3583
|
navigator.clipboard.writeText(JSON.stringify(this.finalJSONConfig));
|
|
3265
3584
|
alert("JSON Config is copied");
|
|
3266
3585
|
}
|
|
3586
|
+
downloadJSON() {
|
|
3587
|
+
const DATA = this.finalJSONConfig;
|
|
3588
|
+
let type = "application/json";
|
|
3589
|
+
const FILE_NAME = `${this.formKey}.json`;
|
|
3590
|
+
let blob = new Blob([DATA], { type });
|
|
3591
|
+
let url = window.URL.createObjectURL(blob);
|
|
3592
|
+
let link = document.createElement("a");
|
|
3593
|
+
link.download = FILE_NAME;
|
|
3594
|
+
link.href = url;
|
|
3595
|
+
link.click();
|
|
3596
|
+
window.URL.revokeObjectURL(url);
|
|
3597
|
+
}
|
|
3267
3598
|
closeJSONPopup() {
|
|
3268
3599
|
this.finalJSONConfig = undefined;
|
|
3269
3600
|
}
|
|
3270
3601
|
}
|
|
3271
3602
|
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3272
|
-
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0, 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 size=\"m\"\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 size=\"m\"\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 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 ⋮⋮ {{ 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\">⋮⋮</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 ✎\n </button>\n <button\n (click)=\"removeElement(idx, formElementDropItem)\"\n title=\"delete element\"\n >\n ✖\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\"> © Baiju Dodhia, KwikID </div>\n </div>\n <div\n class=\"modal\"\n *ngIf=\"finalJSONConfig\"\n >\n <div class=\"modal-box\">\n <div class=\"modal-content\">\n <div class=\"modal-heading\">\n <div class=\"modal-title\">{{ formTitle }}</div>\n <div class=\"modal-actions\">\n <div\n class=\"modal-code-copy\"\n (click)=\"copyToClipboard()\"\n >Copy to Clipboard</div\n >\n <div\n class=\"modal-close\"\n (click)=\"closeJSONPopup()\"\n >\n Close\n </div>\n </div>\n </div>\n <pre>\n <code>{{JSON.stringify(finalJSONConfig, undefined, 2)}}</code>\n </pre>\n </div>\n </div>\n </div>\n</div>\n", styles: ["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 0 10px -6px #000;border:0px solid gray;border-radius:1rem}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}kwikui-table table{width:100%;box-shadow:0 0 10px -6px #000;border:0px solid gray;padding:0}\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;font-size:1rem}.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-radius:.5rem;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 var(--tui-primary);padding:1rem;background:var(--tui-secondary)}.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-radius:1rem;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:var(--tui-secondary);padding:0 .3rem;border-radius:1rem;color:var(--tui-primary)}.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:var(--tui-primary);padding:0 .3rem;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:var(--tui-positive);padding:0 .3rem;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)}.modal{position:absolute;background-color:#0000004d;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-box{width:75%;height:75%;margin:auto;background-color:#fff;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.modal-content{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;width:100%;height:100%}.modal-heading{padding:1rem;width:100%;display:flex;flex-direction:row;justify-content:space-between;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.modal-title{font-weight:bold;font-size:1rem}.modal-actions{display:flex;flex-direction:row;grid-gap:1rem;gap:1rem;cursor:pointer}pre{float:left;justify-content:center;width:100%;height:100%;box-sizing:border-box;overflow:auto}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.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: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.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.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
3603
|
+
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0, 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 size=\"m\"\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 size=\"m\"\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 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 ⋮⋮ {{ 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\">⋮⋮</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 ✎\n </button>\n <button\n (click)=\"removeElement(idx, formElementDropItem)\"\n title=\"delete element\"\n >\n ✖\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\"> © Baiju Dodhia, KwikID </div>\n </div>\n <div\n class=\"modal\"\n *ngIf=\"finalJSONConfig\"\n >\n <div class=\"modal-box\">\n <div class=\"modal-content\">\n <div class=\"modal-heading\">\n <div class=\"modal-title\">{{ formTitle }}</div>\n <div class=\"modal-actions\">\n <div\n class=\"modal-code-download\"\n (click)=\"downloadJSON()\"\n >Download JSON</div\n >\n <div\n class=\"modal-code-copy\"\n (click)=\"copyToClipboard()\"\n >Copy to Clipboard</div\n >\n <div\n class=\"modal-close\"\n (click)=\"closeJSONPopup()\"\n >\n Close\n </div>\n </div>\n </div>\n <pre>\n <code>{{JSON.stringify(finalJSONConfig, undefined, 2)}}</code>\n </pre>\n </div>\n </div>\n </div>\n</div>\n", styles: ["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 0 10px -6px #000;border:0px solid gray;border-radius:1rem}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}kwikui-table table{width:100%;box-shadow:0 0 10px -6px #000;border:0px solid gray;padding:0}\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;font-size:1rem}.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-radius:.5rem;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 var(--tui-primary);padding:1rem;background:var(--tui-secondary)}.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-radius:1rem;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:var(--tui-secondary);padding:0 .3rem;border-radius:1rem;color:var(--tui-primary)}.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:var(--tui-primary);padding:0 .3rem;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:var(--tui-positive);padding:0 .3rem;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)}.modal{position:absolute;background-color:#0000004d;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-box{width:75%;height:75%;margin:auto;background-color:#fff;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.modal-content{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;width:100%;height:100%}.modal-heading{padding:1rem;width:100%;display:flex;flex-direction:row;justify-content:space-between;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.modal-title{font-weight:bold;font-size:1rem}.modal-actions{display:flex;flex-direction:row;grid-gap:1rem;gap:1rem;cursor:pointer}pre{float:left;justify-content:center;width:100%;height:100%;box-sizing:border-box;overflow:auto}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.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: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.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.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
3273
3604
|
__decorate([
|
|
3274
3605
|
logMethod
|
|
3275
3606
|
], KwikIDFormsBuilderComponent.prototype, "handleGetKeyValue", null);
|
|
@@ -3547,12 +3878,17 @@ class Converter {
|
|
|
3547
3878
|
return formConfig;
|
|
3548
3879
|
}
|
|
3549
3880
|
updateFormConfigProperties(formConfig) {
|
|
3550
|
-
var _a
|
|
3881
|
+
var _a;
|
|
3551
3882
|
const formViewProperties = {
|
|
3552
3883
|
header: {
|
|
3884
|
+
backButton: {
|
|
3885
|
+
mode: "TABBED",
|
|
3886
|
+
bypassConfirmation: false,
|
|
3887
|
+
hidden: true
|
|
3888
|
+
},
|
|
3553
3889
|
title: {
|
|
3554
3890
|
hidden: false,
|
|
3555
|
-
label: formConfig.title
|
|
3891
|
+
label: (_a = formConfig === null || formConfig === void 0 ? void 0 : formConfig.title) !== null && _a !== void 0 ? _a : "Form"
|
|
3556
3892
|
},
|
|
3557
3893
|
steps: {
|
|
3558
3894
|
hidden: false
|
|
@@ -3560,6 +3896,7 @@ class Converter {
|
|
|
3560
3896
|
},
|
|
3561
3897
|
footer: {
|
|
3562
3898
|
viewFormsButton: {
|
|
3899
|
+
bypassConfirmation: false,
|
|
3563
3900
|
hidden: false,
|
|
3564
3901
|
label: "View Forms"
|
|
3565
3902
|
},
|
|
@@ -3570,34 +3907,7 @@ class Converter {
|
|
|
3570
3907
|
}
|
|
3571
3908
|
};
|
|
3572
3909
|
if (checkObjectKeyExists(formConfig, "properties")) {
|
|
3573
|
-
|
|
3574
|
-
const headerTitleLabel = (_f = (_e = (_d = formConfig.properties.header) === null || _d === void 0 ? void 0 : _d.title) === null || _e === void 0 ? void 0 : _e.label) !== null && _f !== void 0 ? _f : formConfig.title;
|
|
3575
|
-
const headerStepsHidden = (_j = (_h = (_g = formConfig.properties.header) === null || _g === void 0 ? void 0 : _g.steps) === null || _h === void 0 ? void 0 : _h.hidden) !== null && _j !== void 0 ? _j : formViewProperties.header.steps.hidden;
|
|
3576
|
-
const viewFormsButtonHidden = (_m = (_l = (_k = formConfig.properties.footer) === null || _k === void 0 ? void 0 : _k.viewFormsButton) === null || _l === void 0 ? void 0 : _l.hidden) !== null && _m !== void 0 ? _m : formViewProperties.footer.viewFormsButton.hidden;
|
|
3577
|
-
const viewFormsButtonLabel = (_q = (_p = (_o = formConfig.properties.footer) === null || _o === void 0 ? void 0 : _o.viewFormsButton) === null || _p === void 0 ? void 0 : _p.label) !== null && _q !== void 0 ? _q : formViewProperties.footer.viewFormsButton.label;
|
|
3578
|
-
const saveButtonHidden = (_t = (_s = (_r = formConfig.properties.footer) === null || _r === void 0 ? void 0 : _r.saveButton) === null || _s === void 0 ? void 0 : _s.hidden) !== null && _t !== void 0 ? _t : formViewProperties.footer.saveButton.hidden;
|
|
3579
|
-
const saveButtonLabel = (_w = (_v = (_u = formConfig.properties.footer) === null || _u === void 0 ? void 0 : _u.saveButton) === null || _v === void 0 ? void 0 : _v.label) !== null && _w !== void 0 ? _w : formViewProperties.footer.saveButton.label;
|
|
3580
|
-
formConfig.properties = {
|
|
3581
|
-
header: {
|
|
3582
|
-
title: {
|
|
3583
|
-
hidden: headerTitleHidden,
|
|
3584
|
-
label: headerTitleLabel
|
|
3585
|
-
},
|
|
3586
|
-
steps: {
|
|
3587
|
-
hidden: headerStepsHidden
|
|
3588
|
-
}
|
|
3589
|
-
},
|
|
3590
|
-
footer: {
|
|
3591
|
-
viewFormsButton: {
|
|
3592
|
-
hidden: viewFormsButtonHidden,
|
|
3593
|
-
label: viewFormsButtonLabel
|
|
3594
|
-
},
|
|
3595
|
-
saveButton: {
|
|
3596
|
-
hidden: saveButtonHidden,
|
|
3597
|
-
label: saveButtonLabel
|
|
3598
|
-
}
|
|
3599
|
-
}
|
|
3600
|
-
};
|
|
3910
|
+
formConfig.properties = mergeObjects(formViewProperties, formConfig.properties);
|
|
3601
3911
|
}
|
|
3602
3912
|
else {
|
|
3603
3913
|
formConfig.properties = formViewProperties;
|
|
@@ -4274,7 +4584,20 @@ var EActionKey;
|
|
|
4274
4584
|
EActionKey["FIELD_GROUP_DISABLE"] = "FIELD_GROUP_DISABLE";
|
|
4275
4585
|
EActionKey["SET_DROPDOWN_OPTIONS"] = "SET_DROPDOWN_OPTIONS";
|
|
4276
4586
|
EActionKey["API_CALL"] = "API_CALL";
|
|
4277
|
-
EActionKey["
|
|
4587
|
+
EActionKey["API_CALL_MULTIPLE"] = "API_CALL_MULTIPLE";
|
|
4588
|
+
EActionKey["API_CALL_MULTIPLE_END"] = "API_CALL_MULTIPLE_END";
|
|
4589
|
+
EActionKey["TASK_API_CALL"] = "TASK_API_CALL";
|
|
4590
|
+
EActionKey["TASK_API_CALL_MULTIPLE"] = "TASK_API_CALL_MULTIPLE";
|
|
4591
|
+
EActionKey["TASK_API_CALL_MULTIPLE_END"] = "TASK_API_CALL_MULTIPLE_END";
|
|
4592
|
+
EActionKey["PREVIEW_DIALOG_SHOW"] = "PREVIEW_DIALOG_SHOW";
|
|
4593
|
+
EActionKey["POPUP_FORM_SHOW"] = "POPUP_FORM_SHOW";
|
|
4594
|
+
EActionKey["MOVE_AHEAD"] = "MOVE_AHEAD";
|
|
4595
|
+
EActionKey["NOTIFICATION_ERROR_SHOW"] = "NOTIFICATION_ERROR_SHOW";
|
|
4596
|
+
EActionKey["NOTIFICATION_ERROR_HIDE"] = "NOTIFICATION_ERROR_HIDE";
|
|
4597
|
+
EActionKey["DIALOG_SHOW"] = "DIALOG_SHOW";
|
|
4598
|
+
EActionKey["DIALOG_HIDE"] = "DIALOG_HIDE";
|
|
4599
|
+
EActionKey["RESUME_TASK_EXECUTION"] = "RESUME_TASK_EXECUTION";
|
|
4600
|
+
EActionKey["STOP_TASK_EXECUTION"] = "STOP_TASK_EXECUTION";
|
|
4278
4601
|
})(EActionKey || (EActionKey = {}));
|
|
4279
4602
|
|
|
4280
4603
|
var EApiStatusType;
|
|
@@ -4297,6 +4620,11 @@ var EMessageType;
|
|
|
4297
4620
|
EMessageType["SUCCESS"] = "success";
|
|
4298
4621
|
EMessageType["WARNING"] = "warning";
|
|
4299
4622
|
})(EMessageType || (EMessageType = {}));
|
|
4623
|
+
var EFormViewGoBackMode;
|
|
4624
|
+
(function (EFormViewGoBackMode) {
|
|
4625
|
+
EFormViewGoBackMode["DIRECT"] = "DIRECT";
|
|
4626
|
+
EFormViewGoBackMode["TABBED"] = "TABBED";
|
|
4627
|
+
})(EFormViewGoBackMode || (EFormViewGoBackMode = {}));
|
|
4300
4628
|
|
|
4301
4629
|
class Defaults {
|
|
4302
4630
|
constructor(field, formFields, allFormsData, formData, previousFormData, takeAction) {
|
|
@@ -4609,10 +4937,12 @@ class Apis {
|
|
|
4609
4937
|
return this._object.API_CONFIG;
|
|
4610
4938
|
}
|
|
4611
4939
|
else {
|
|
4940
|
+
this._object = setValueToObjectPath(this._object, "API_CONFIG.request.validation.body.is_valid", true);
|
|
4612
4941
|
return this._object.API_CONFIG;
|
|
4613
4942
|
}
|
|
4614
4943
|
}
|
|
4615
4944
|
else {
|
|
4945
|
+
this._object = setValueToObjectPath(this._object, "API_CONFIG.request.validation.body.is_valid", true);
|
|
4616
4946
|
return this._object.API_CONFIG;
|
|
4617
4947
|
}
|
|
4618
4948
|
});
|
|
@@ -4680,10 +5010,12 @@ class Apis {
|
|
|
4680
5010
|
return this._object.API_CONFIG;
|
|
4681
5011
|
}
|
|
4682
5012
|
else {
|
|
5013
|
+
this._object = setValueToObjectPath(this._object, "API_CONFIG.request.validation.headers.is_valid", true);
|
|
4683
5014
|
return this._object.API_CONFIG;
|
|
4684
5015
|
}
|
|
4685
5016
|
}
|
|
4686
5017
|
else {
|
|
5018
|
+
this._object = setValueToObjectPath(this._object, "API_CONFIG.request.validation.headers.is_valid", true);
|
|
4687
5019
|
return this._object.API_CONFIG;
|
|
4688
5020
|
}
|
|
4689
5021
|
});
|
|
@@ -4747,6 +5079,32 @@ __decorate([
|
|
|
4747
5079
|
logMethod
|
|
4748
5080
|
], Apis.prototype, "callNextApi", null);
|
|
4749
5081
|
|
|
5082
|
+
class Tasks {
|
|
5083
|
+
constructor(task, object, takeAction) {
|
|
5084
|
+
this._task = task;
|
|
5085
|
+
this._object = object;
|
|
5086
|
+
this._takeAction = takeAction;
|
|
5087
|
+
}
|
|
5088
|
+
execute() {
|
|
5089
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5090
|
+
const triggers = this._task.triggers;
|
|
5091
|
+
const rules = this._task.rules;
|
|
5092
|
+
const actions = this._task.actions;
|
|
5093
|
+
const rulesMapping = new Rule(rules, this._object).mapping();
|
|
5094
|
+
for (let action of actions) {
|
|
5095
|
+
const conditionEvaluation = new Condition(action.condition, rulesMapping).evaluate();
|
|
5096
|
+
if (conditionEvaluation) {
|
|
5097
|
+
const actions = new Action(action, rulesMapping, this._object, this._takeAction);
|
|
5098
|
+
yield actions.execute();
|
|
5099
|
+
}
|
|
5100
|
+
}
|
|
5101
|
+
});
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
__decorate([
|
|
5105
|
+
logMethod
|
|
5106
|
+
], Tasks.prototype, "execute", null);
|
|
5107
|
+
|
|
4750
5108
|
/**
|
|
4751
5109
|
* Generated class for the SafeHtmlPipe pipe.
|
|
4752
5110
|
*
|
|
@@ -4769,19 +5127,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
4769
5127
|
}]
|
|
4770
5128
|
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
|
|
4771
5129
|
|
|
5130
|
+
/**
|
|
5131
|
+
* Generated class for the SafeUrlPipe pipe.
|
|
5132
|
+
*
|
|
5133
|
+
* See https://angular.io/api/core/Pipe for more info on Angular Pipes.
|
|
5134
|
+
*/
|
|
5135
|
+
class SafeUrlPipe {
|
|
5136
|
+
constructor(sanitizer) {
|
|
5137
|
+
this.sanitizer = sanitizer;
|
|
5138
|
+
}
|
|
5139
|
+
transform(url) {
|
|
5140
|
+
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
5141
|
+
}
|
|
5142
|
+
}
|
|
5143
|
+
/** @nocollapse */ SafeUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeUrlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5144
|
+
/** @nocollapse */ SafeUrlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeUrlPipe, name: "safeUrl" });
|
|
5145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeUrlPipe, decorators: [{
|
|
5146
|
+
type: Pipe,
|
|
5147
|
+
args: [{
|
|
5148
|
+
name: "safeUrl"
|
|
5149
|
+
}]
|
|
5150
|
+
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
|
|
5151
|
+
|
|
4772
5152
|
class KwikIDFormViewComponent {
|
|
4773
|
-
constructor(push, alert,
|
|
5153
|
+
constructor(cd, formViewService, push, alert, previewDialogService, dialogs) {
|
|
5154
|
+
this.cd = cd;
|
|
5155
|
+
this.formViewService = formViewService;
|
|
4774
5156
|
this.push = push;
|
|
4775
5157
|
this.alert = alert;
|
|
4776
|
-
this.
|
|
5158
|
+
this.previewDialogService = previewDialogService;
|
|
5159
|
+
this.dialogs = dialogs;
|
|
4777
5160
|
this.isMobileView = false;
|
|
5161
|
+
this.popupFormCallback = undefined;
|
|
5162
|
+
this.onClickGoBack = new EventEmitter();
|
|
4778
5163
|
this.onClickViewForms = new EventEmitter();
|
|
4779
5164
|
this.onClickSaveForm = new EventEmitter();
|
|
4780
5165
|
this.onClickApiCall = new EventEmitter();
|
|
5166
|
+
this.onActionShowPopupForm = new EventEmitter();
|
|
4781
5167
|
this.fieldGroups = {};
|
|
4782
5168
|
this.formFields = [];
|
|
4783
5169
|
this.previousFormData = {};
|
|
5170
|
+
this.previewProperties = {
|
|
5171
|
+
html: {
|
|
5172
|
+
before: "",
|
|
5173
|
+
after: ""
|
|
5174
|
+
},
|
|
5175
|
+
iframe: {
|
|
5176
|
+
src: "",
|
|
5177
|
+
title: ""
|
|
5178
|
+
},
|
|
5179
|
+
popupFormKey: "",
|
|
5180
|
+
title: "",
|
|
5181
|
+
unavailable: false
|
|
5182
|
+
};
|
|
4784
5183
|
this.loading = true;
|
|
5184
|
+
this.backButton = {
|
|
5185
|
+
disabled: false,
|
|
5186
|
+
showLoader: false
|
|
5187
|
+
};
|
|
4785
5188
|
this.viewFormsButton = {
|
|
4786
5189
|
disabled: false,
|
|
4787
5190
|
showLoader: false
|
|
@@ -4790,8 +5193,14 @@ class KwikIDFormViewComponent {
|
|
|
4790
5193
|
disabled: false,
|
|
4791
5194
|
showLoader: false
|
|
4792
5195
|
};
|
|
5196
|
+
this.stopTaskExecution = false;
|
|
5197
|
+
this.waitingForChanges = false;
|
|
5198
|
+
this.popupFormConfig = undefined;
|
|
5199
|
+
this.popupFormData = undefined;
|
|
5200
|
+
this.tasksData = undefined;
|
|
4793
5201
|
this.formGroup = new FormGroup({});
|
|
4794
5202
|
this.showErrorNotification = false;
|
|
5203
|
+
this.dialogRef = undefined;
|
|
4795
5204
|
}
|
|
4796
5205
|
ngOnInit() {
|
|
4797
5206
|
(() => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4807,6 +5216,17 @@ class KwikIDFormViewComponent {
|
|
|
4807
5216
|
if (verifyChange("formData")) {
|
|
4808
5217
|
this.formData = Object.assign(Object.assign({}, this.formData), changes.formData.currentValue);
|
|
4809
5218
|
}
|
|
5219
|
+
if (verifyChange("popupFormCallback")) {
|
|
5220
|
+
if (isNotEmptyValue(changes.popupFormCallback.currentValue)) {
|
|
5221
|
+
const popupFormData = changes.popupFormCallback.currentValue.popupFormData;
|
|
5222
|
+
const popupFormConfig = changes.popupFormCallback.currentValue.popupFormConfig;
|
|
5223
|
+
this.popupFormData = mergeObjects(this.popupFormData, {
|
|
5224
|
+
[popupFormConfig.key]: popupFormData
|
|
5225
|
+
});
|
|
5226
|
+
this.formData = mergeObjects(this.formData, this.popupFormData);
|
|
5227
|
+
}
|
|
5228
|
+
this.waitingForChanges = false;
|
|
5229
|
+
}
|
|
4810
5230
|
if (verifyChange("isMobileView")) {
|
|
4811
5231
|
this.isMobileView = changes.isMobileView.currentValue;
|
|
4812
5232
|
}
|
|
@@ -4827,6 +5247,46 @@ class KwikIDFormViewComponent {
|
|
|
4827
5247
|
this.setFormFieldsFromFormConfig(formConfig);
|
|
4828
5248
|
this.setFormFieldGroupsFromFormConfig(formConfig);
|
|
4829
5249
|
this.setFormDataFromAllFormsData();
|
|
5250
|
+
/**
|
|
5251
|
+
* PRE Tasks
|
|
5252
|
+
* 1. API Calls.
|
|
5253
|
+
* 2. Alter Data Structure.
|
|
5254
|
+
* 3. Alter Form Config.
|
|
5255
|
+
*/
|
|
5256
|
+
if (checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
5257
|
+
checkObjectKeyExists(this.formConfig.tasks, "pre")) {
|
|
5258
|
+
for (let preTask of this.formConfig.tasks.pre) {
|
|
5259
|
+
const task = new Tasks(preTask, {
|
|
5260
|
+
FORM_CONFIG: this.formConfig,
|
|
5261
|
+
FORM_FIELDS: this.formFields,
|
|
5262
|
+
FORM_DATA: this.formData,
|
|
5263
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5264
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
5265
|
+
}, this.takeAction.bind(this));
|
|
5266
|
+
// if (preTask.wait) {
|
|
5267
|
+
this.waitingForChanges = true;
|
|
5268
|
+
// } else {
|
|
5269
|
+
// this.waitingForChanges = false;
|
|
5270
|
+
// }
|
|
5271
|
+
yield task.execute();
|
|
5272
|
+
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5273
|
+
yield new Promise((resolve) => {
|
|
5274
|
+
const intervalId = setInterval(() => {
|
|
5275
|
+
if (!this.waitingForChanges) {
|
|
5276
|
+
clearInterval(intervalId);
|
|
5277
|
+
resolve();
|
|
5278
|
+
}
|
|
5279
|
+
}, 10);
|
|
5280
|
+
});
|
|
5281
|
+
if (this.stopTaskExecution) {
|
|
5282
|
+
break;
|
|
5283
|
+
}
|
|
5284
|
+
}
|
|
5285
|
+
this.formData = mergeObjects(this.formData, this.popupFormData);
|
|
5286
|
+
}
|
|
5287
|
+
if (this.stopTaskExecution) {
|
|
5288
|
+
return;
|
|
5289
|
+
}
|
|
4830
5290
|
this.formGroup = yield this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this));
|
|
4831
5291
|
for (let field of this.formFields) {
|
|
4832
5292
|
if (field.isFormElement) {
|
|
@@ -5043,24 +5503,80 @@ class KwikIDFormViewComponent {
|
|
|
5043
5503
|
}
|
|
5044
5504
|
});
|
|
5045
5505
|
}
|
|
5046
|
-
|
|
5047
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
5506
|
+
handleFieldApiCall(field, api) {
|
|
5048
5507
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5049
|
-
|
|
5508
|
+
api = yield this.handleApiCall(api, {
|
|
5050
5509
|
FIELD_CONFIG: field,
|
|
5051
5510
|
API_CONFIG: api,
|
|
5052
5511
|
FORM_FIELDS: this.formFields,
|
|
5053
5512
|
FORM_DATA: this.formData,
|
|
5054
5513
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5055
5514
|
ALL_FORMS_DATA: this.allFormsData
|
|
5515
|
+
});
|
|
5516
|
+
if (api.request.body.validation.is_valid &&
|
|
5517
|
+
api.request.headers.validation.is_valid) {
|
|
5518
|
+
if (checkObjectKeyExists(field.api, "request")) {
|
|
5519
|
+
this.formData = Object.assign(Object.assign({}, this.formData), { [field.key]: api.response.value });
|
|
5520
|
+
this.formGroup.patchValue({
|
|
5521
|
+
[field.key]: api.response.value
|
|
5522
|
+
}, { emitEvent: false });
|
|
5523
|
+
}
|
|
5524
|
+
const apis = new Apis({
|
|
5525
|
+
FIELD_CONFIG: field,
|
|
5526
|
+
API_CONFIG: api,
|
|
5527
|
+
FORM_FIELDS: this.formFields,
|
|
5528
|
+
FORM_DATA: this.formData,
|
|
5529
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5530
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
5531
|
+
}, this.takeAction.bind(this));
|
|
5532
|
+
api = yield apis.validateResponse();
|
|
5533
|
+
}
|
|
5534
|
+
else {
|
|
5535
|
+
setTimeout(() => {
|
|
5536
|
+
field["api"]["status"]["value"] = EApiStatusType.FAILED;
|
|
5537
|
+
field["showLoader"] = false;
|
|
5538
|
+
}, 500);
|
|
5539
|
+
}
|
|
5540
|
+
return { field: field, api: api };
|
|
5541
|
+
});
|
|
5542
|
+
}
|
|
5543
|
+
handleTaskApiCall(api) {
|
|
5544
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5545
|
+
api = yield this.handleApiCall(api, {
|
|
5546
|
+
FORM_CONFIG: this.formConfig,
|
|
5547
|
+
API_CONFIG: api,
|
|
5548
|
+
FORM_FIELDS: this.formFields,
|
|
5549
|
+
FORM_DATA: this.formData,
|
|
5550
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5551
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
5552
|
+
});
|
|
5553
|
+
const apis = new Apis({
|
|
5554
|
+
FORM_CONFIG: this.formConfig,
|
|
5555
|
+
API_CONFIG: api,
|
|
5556
|
+
FORM_FIELDS: this.formFields,
|
|
5557
|
+
FORM_DATA: this.formData,
|
|
5558
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5559
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
5056
5560
|
}, this.takeAction.bind(this));
|
|
5561
|
+
if (api.request.body.validation.is_valid &&
|
|
5562
|
+
api.request.headers.validation.is_valid) {
|
|
5563
|
+
api = yield apis.validateResponse();
|
|
5564
|
+
}
|
|
5565
|
+
return { api: api };
|
|
5566
|
+
});
|
|
5567
|
+
}
|
|
5568
|
+
handleApiCall(api, object) {
|
|
5569
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
5570
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5571
|
+
const apis = new Apis(object, this.takeAction.bind(this));
|
|
5057
5572
|
api = yield apis.setUrl();
|
|
5058
5573
|
api = yield apis.setRequestHeaders();
|
|
5059
5574
|
api = yield apis.validateRequestHeaders();
|
|
5060
5575
|
api = yield apis.setRequestBody();
|
|
5061
5576
|
api = yield apis.validateRequestBody();
|
|
5062
5577
|
let apiCallResponse = undefined;
|
|
5063
|
-
if (api.request.body.validation.is_valid
|
|
5578
|
+
if (api.request.body.validation.is_valid &&
|
|
5579
|
+
api.request.headers.validation.is_valid) {
|
|
5064
5580
|
if (api.request.url.hasOwnProperty("type") &&
|
|
5065
5581
|
api.request.url.type === EApiRequestUrlType.MOCK) {
|
|
5066
5582
|
apiCallResponse = api.request.url.props.mockedData;
|
|
@@ -5077,40 +5593,23 @@ class KwikIDFormViewComponent {
|
|
|
5077
5593
|
});
|
|
5078
5594
|
apiCallResponse = yield response.json();
|
|
5079
5595
|
}
|
|
5080
|
-
|
|
5081
|
-
* This runs when API is in old format or new.
|
|
5082
|
-
* If Old Format then it directly patches api response to field data
|
|
5083
|
-
*/
|
|
5084
|
-
if (checkObjectKeyExists(field.api, "request")) {
|
|
5085
|
-
this.formData = Object.assign(Object.assign({}, this.formData), { [field.key]: apiCallResponse });
|
|
5086
|
-
this.formGroup.patchValue({
|
|
5087
|
-
[field.key]: apiCallResponse
|
|
5088
|
-
}, { emitEvent: false });
|
|
5089
|
-
}
|
|
5090
|
-
console.log(api.response);
|
|
5091
|
-
console.log(apiCallResponse);
|
|
5092
|
-
api.response = setMissingKeyValue(api.response, "value", apiCallResponse);
|
|
5093
|
-
const apis = new Apis({
|
|
5094
|
-
FIELD_CONFIG: field,
|
|
5095
|
-
API_CONFIG: api,
|
|
5096
|
-
FORM_FIELDS: this.formFields,
|
|
5097
|
-
FORM_DATA: this.formData,
|
|
5098
|
-
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5099
|
-
ALL_FORMS_DATA: this.allFormsData
|
|
5100
|
-
}, this.takeAction.bind(this));
|
|
5101
|
-
(() => __awaiter(this, void 0, void 0, function* () {
|
|
5102
|
-
api = yield apis.validateResponse();
|
|
5103
|
-
}))();
|
|
5104
|
-
}
|
|
5105
|
-
else {
|
|
5106
|
-
setTimeout(() => {
|
|
5107
|
-
field["api"]["status"]["value"] = EApiStatusType.FAILED;
|
|
5108
|
-
field["showLoader"] = false;
|
|
5109
|
-
}, 500);
|
|
5596
|
+
api.response = setValueToObjectPath(api.response, "value", apiCallResponse);
|
|
5110
5597
|
}
|
|
5111
|
-
return
|
|
5598
|
+
return api;
|
|
5112
5599
|
});
|
|
5113
5600
|
}
|
|
5601
|
+
showApiLoader() {
|
|
5602
|
+
this.viewFormsButton["disabled"] = true;
|
|
5603
|
+
this.viewFormsButton["showLoader"] = true;
|
|
5604
|
+
this.saveFormButton["disabled"] = true;
|
|
5605
|
+
this.saveFormButton["showLoader"] = true;
|
|
5606
|
+
}
|
|
5607
|
+
hideApiLoader() {
|
|
5608
|
+
this.viewFormsButton["disabled"] = false;
|
|
5609
|
+
this.viewFormsButton["showLoader"] = false;
|
|
5610
|
+
this.saveFormButton["disabled"] = false;
|
|
5611
|
+
this.saveFormButton["showLoader"] = false;
|
|
5612
|
+
}
|
|
5114
5613
|
handleOnClickApiCall(e) {
|
|
5115
5614
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5116
5615
|
let field = getFormFieldByKey(this.formFields, e.key);
|
|
@@ -5118,12 +5617,10 @@ class KwikIDFormViewComponent {
|
|
|
5118
5617
|
// set button status to loading
|
|
5119
5618
|
field["api"]["status"]["value"] = EApiStatusType.LOADING;
|
|
5120
5619
|
field["showLoader"] = true;
|
|
5121
|
-
this.
|
|
5122
|
-
|
|
5123
|
-
this.saveFormButton["disabled"] = true;
|
|
5124
|
-
this.saveFormButton["showLoader"] = true;
|
|
5620
|
+
this.showApiLoader();
|
|
5621
|
+
// Determine API Call time
|
|
5125
5622
|
if (checkObjectKeyExists(field.api, "request")) {
|
|
5126
|
-
yield this.
|
|
5623
|
+
yield this.handleFieldApiCall(field, field.api);
|
|
5127
5624
|
}
|
|
5128
5625
|
else {
|
|
5129
5626
|
const apis = new Apis({
|
|
@@ -5136,10 +5633,7 @@ class KwikIDFormViewComponent {
|
|
|
5136
5633
|
}, this.takeAction.bind(this));
|
|
5137
5634
|
yield apis.callNextApi(field.api.entrypoint);
|
|
5138
5635
|
}
|
|
5139
|
-
this.
|
|
5140
|
-
this.viewFormsButton["showLoader"] = false;
|
|
5141
|
-
this.saveFormButton["disabled"] = false;
|
|
5142
|
-
this.saveFormButton["showLoader"] = false;
|
|
5636
|
+
this.hideApiLoader();
|
|
5143
5637
|
}
|
|
5144
5638
|
});
|
|
5145
5639
|
}
|
|
@@ -5152,13 +5646,29 @@ class KwikIDFormViewComponent {
|
|
|
5152
5646
|
getUniqueIdentifier(index, item) {
|
|
5153
5647
|
return item.key;
|
|
5154
5648
|
}
|
|
5649
|
+
handleOnClickGoBack(e, mode) {
|
|
5650
|
+
if (this.formConfig.status === EFormsListStatus.COMPLETED) {
|
|
5651
|
+
this.onClickGoBack.emit({
|
|
5652
|
+
clicked: true,
|
|
5653
|
+
mode: mode
|
|
5654
|
+
});
|
|
5655
|
+
}
|
|
5656
|
+
else if (this.formConfig.properties.header.backButton.bypassConfirmation ||
|
|
5657
|
+
window.confirm("Your data will be lost if you leave this page! Continue?")) {
|
|
5658
|
+
this.onClickGoBack.emit({
|
|
5659
|
+
clicked: true,
|
|
5660
|
+
mode: mode
|
|
5661
|
+
});
|
|
5662
|
+
}
|
|
5663
|
+
}
|
|
5155
5664
|
handleOnClickViewForms(e) {
|
|
5156
5665
|
if (this.formConfig.status === EFormsListStatus.COMPLETED) {
|
|
5157
5666
|
this.onClickViewForms.emit({
|
|
5158
5667
|
clicked: true
|
|
5159
5668
|
});
|
|
5160
5669
|
}
|
|
5161
|
-
else if (
|
|
5670
|
+
else if (this.formConfig.properties.footer.viewFormsButton.bypassConfirmation ||
|
|
5671
|
+
window.confirm("Your data will be lost if you leave this page! Continue?")) {
|
|
5162
5672
|
this.onClickViewForms.emit({
|
|
5163
5673
|
clicked: true
|
|
5164
5674
|
});
|
|
@@ -5218,7 +5728,52 @@ class KwikIDFormViewComponent {
|
|
|
5218
5728
|
formData[key] = "";
|
|
5219
5729
|
}
|
|
5220
5730
|
});
|
|
5221
|
-
|
|
5731
|
+
/**
|
|
5732
|
+
* POST Tasks
|
|
5733
|
+
* 1. API Calls.
|
|
5734
|
+
* 2. Alter Data Structure.
|
|
5735
|
+
* 3. Trigger an Internal Popup Form.
|
|
5736
|
+
* 4. URL Redirection or new opening of URL in external tab.
|
|
5737
|
+
*/
|
|
5738
|
+
if (checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
5739
|
+
checkObjectKeyExists(this.formConfig.tasks, "post")) {
|
|
5740
|
+
for (let postTask of this.formConfig.tasks.post) {
|
|
5741
|
+
const task = new Tasks(postTask, {
|
|
5742
|
+
FORM_CONFIG: this.formConfig,
|
|
5743
|
+
FORM_FIELDS: this.formFields,
|
|
5744
|
+
FORM_DATA: this.formData,
|
|
5745
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5746
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
5747
|
+
}, this.takeAction.bind(this));
|
|
5748
|
+
this.waitingForChanges = true;
|
|
5749
|
+
yield task.execute();
|
|
5750
|
+
// Wait for ngOnChanges to be called before continuing to the next task
|
|
5751
|
+
yield new Promise((resolve) => {
|
|
5752
|
+
const intervalId = setInterval(() => {
|
|
5753
|
+
if (!this.waitingForChanges) {
|
|
5754
|
+
clearInterval(intervalId);
|
|
5755
|
+
resolve();
|
|
5756
|
+
}
|
|
5757
|
+
}, 10);
|
|
5758
|
+
});
|
|
5759
|
+
if (this.stopTaskExecution) {
|
|
5760
|
+
break;
|
|
5761
|
+
}
|
|
5762
|
+
}
|
|
5763
|
+
if (this.stopTaskExecution) {
|
|
5764
|
+
return;
|
|
5765
|
+
}
|
|
5766
|
+
this.onClickSaveForm.emit({
|
|
5767
|
+
formConfig: this.formConfig,
|
|
5768
|
+
data: mergeObjects(formData, this.popupFormData, this.tasksData)
|
|
5769
|
+
});
|
|
5770
|
+
}
|
|
5771
|
+
else {
|
|
5772
|
+
this.onClickSaveForm.emit({
|
|
5773
|
+
formConfig: this.formConfig,
|
|
5774
|
+
data: formData
|
|
5775
|
+
});
|
|
5776
|
+
}
|
|
5222
5777
|
});
|
|
5223
5778
|
}
|
|
5224
5779
|
toggleErrorNotification(show) {
|
|
@@ -5369,6 +5924,168 @@ class KwikIDFormViewComponent {
|
|
|
5369
5924
|
field = removeFormFieldMessage(field, message);
|
|
5370
5925
|
this.formFields[fieldIndex] = field;
|
|
5371
5926
|
}
|
|
5927
|
+
setValue(action, object) {
|
|
5928
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5929
|
+
const source = new Source(object);
|
|
5930
|
+
const sourceValue = yield source.getValueFromSource(action.props.value.source);
|
|
5931
|
+
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
5932
|
+
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
5933
|
+
this.formData = source.object.FORM_DATA;
|
|
5934
|
+
this.patchFormGroup(this.formData);
|
|
5935
|
+
this.allFormsData = source.object.ALL_FORMS_DATA;
|
|
5936
|
+
this.previousFormData = source.object.PREVIOUS_FORM_DATA;
|
|
5937
|
+
});
|
|
5938
|
+
}
|
|
5939
|
+
setFieldDefaultValue(action, object) {
|
|
5940
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5941
|
+
const source = new Source(object);
|
|
5942
|
+
const sourceValue = yield source.getValueFromSource(action.props.value.source);
|
|
5943
|
+
source.setValueToSource({
|
|
5944
|
+
key: ESourceKey.OBJECT,
|
|
5945
|
+
props: {
|
|
5946
|
+
object: {
|
|
5947
|
+
key: "FIELD_CONFIG",
|
|
5948
|
+
path: "default.value.value"
|
|
5949
|
+
}
|
|
5950
|
+
}
|
|
5951
|
+
}, sourceValue);
|
|
5952
|
+
source.setValueToSource({
|
|
5953
|
+
key: ESourceKey.OBJECT,
|
|
5954
|
+
props: {
|
|
5955
|
+
object: {
|
|
5956
|
+
key: "FORM_DATA",
|
|
5957
|
+
path: String(action.props.fieldKey)
|
|
5958
|
+
}
|
|
5959
|
+
}
|
|
5960
|
+
}, sourceValue);
|
|
5961
|
+
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
5962
|
+
this.formData = source.object.FORM_DATA;
|
|
5963
|
+
this.patchFormGroup(this.formData);
|
|
5964
|
+
this.allFormsData = source.object.ALL_FORMS_DATA;
|
|
5965
|
+
this.previousFormData = source.object.PREVIOUS_FORM_DATA;
|
|
5966
|
+
});
|
|
5967
|
+
}
|
|
5968
|
+
setDropdownOptions(action, object) {
|
|
5969
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5970
|
+
const source = new Source(object);
|
|
5971
|
+
let sourceValue = yield source.getValueFromSource(action.props.value.source);
|
|
5972
|
+
if (checkObjectKeyExists(action.props, "options")) {
|
|
5973
|
+
if (checkObjectKeyExists(action.props.options, "appendToPath")) {
|
|
5974
|
+
let appendToPath = yield source.getValueFromSource(action.props.options.appendToPath.source);
|
|
5975
|
+
if (isNotEmptyValue(appendToPath)) {
|
|
5976
|
+
const appendToPathStr = replaceString(appendToPath.match(`${action.props.options.appendToPath.filterSourceValue}`)[0], "[^a-zA-Z0-9_]", "_");
|
|
5977
|
+
const optionsPath = `${action.props.options.path}${appendToPathStr}`;
|
|
5978
|
+
sourceValue = getObjectValueFromPath(sourceValue, optionsPath);
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
else {
|
|
5982
|
+
sourceValue = getObjectValueFromPath(sourceValue, action.props.options.path);
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5985
|
+
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
5986
|
+
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
5987
|
+
this.formData = source.object.FORM_DATA;
|
|
5988
|
+
this.allFormsData = source.object.ALL_FORMS_DATA;
|
|
5989
|
+
this.previousFormData = source.object.PREVIOUS_FORM_DATA;
|
|
5990
|
+
});
|
|
5991
|
+
}
|
|
5992
|
+
fieldMultipleApiCalls(action, object) {
|
|
5993
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5994
|
+
const entrypointApiKey = action.props.apiKey;
|
|
5995
|
+
let field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
5996
|
+
const endpoints = field.api.endpoints;
|
|
5997
|
+
const nextApiIndex = endpoints.findIndex((api) => api.apiKey == entrypointApiKey);
|
|
5998
|
+
const apiConfig = endpoints[nextApiIndex];
|
|
5999
|
+
const response = yield this.handleFieldApiCall(field, apiConfig);
|
|
6000
|
+
field = response.field;
|
|
6001
|
+
field.api.endpoints[nextApiIndex] = response.api;
|
|
6002
|
+
});
|
|
6003
|
+
}
|
|
6004
|
+
fieldMultipleApiCallsEnd(action, object) {
|
|
6005
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6006
|
+
const field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
6007
|
+
let multipleApiCallResponses = {};
|
|
6008
|
+
field.api.endpoints.map((api) => {
|
|
6009
|
+
if (checkObjectKeyExists(api.response, "value"))
|
|
6010
|
+
multipleApiCallResponses = setValueToObjectPath(multipleApiCallResponses, `${api.apiKey}`, api.response.value);
|
|
6011
|
+
});
|
|
6012
|
+
this.formData = Object.assign(Object.assign({}, this.formData), { [field.key]: multipleApiCallResponses });
|
|
6013
|
+
this.patchFormGroup(this.formData);
|
|
6014
|
+
});
|
|
6015
|
+
}
|
|
6016
|
+
taskApiCall(action, object) {
|
|
6017
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6018
|
+
this.showApiLoader();
|
|
6019
|
+
let apiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
6020
|
+
const response = yield this.handleTaskApiCall(apiConfig);
|
|
6021
|
+
apiConfig = response.api;
|
|
6022
|
+
this.formConfig = setValueToObjectPath(this.formConfig, `apis.${action.props.formApiKey}`, apiConfig);
|
|
6023
|
+
this.tasksData = mergeObjects(this.tasksData, {
|
|
6024
|
+
[action.props.formApiKey]: apiConfig.response.value
|
|
6025
|
+
});
|
|
6026
|
+
this.waitingForChanges = false;
|
|
6027
|
+
this.hideApiLoader();
|
|
6028
|
+
});
|
|
6029
|
+
}
|
|
6030
|
+
taskMultipleApiCalls(action, object) {
|
|
6031
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6032
|
+
this.showApiLoader();
|
|
6033
|
+
let multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
6034
|
+
if (checkObjectKeyExists(action.props, "apiKey")) {
|
|
6035
|
+
const entrypointApiKey = action.props.apiKey;
|
|
6036
|
+
const endpoints = multipleApiConfig.endpoints;
|
|
6037
|
+
const nextApiIndex = endpoints.findIndex((api) => api.apiKey == entrypointApiKey);
|
|
6038
|
+
const apiConfig = endpoints[nextApiIndex];
|
|
6039
|
+
const response = yield this.handleTaskApiCall(apiConfig);
|
|
6040
|
+
multipleApiConfig.endpoints[nextApiIndex] = response.api;
|
|
6041
|
+
this.formConfig = setValueToObjectPath(this.formConfig, `apis.${action.props.formApiKey}`, multipleApiConfig);
|
|
6042
|
+
this.hideApiLoader();
|
|
6043
|
+
}
|
|
6044
|
+
else {
|
|
6045
|
+
const apis = new Apis({
|
|
6046
|
+
FORM_CONFIG: this.formConfig,
|
|
6047
|
+
API_CONFIG: multipleApiConfig,
|
|
6048
|
+
FORM_FIELDS: this.formFields,
|
|
6049
|
+
FORM_DATA: this.formData,
|
|
6050
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
6051
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
6052
|
+
}, this.takeAction.bind(this));
|
|
6053
|
+
yield apis.callNextApi(multipleApiConfig.entrypoint);
|
|
6054
|
+
}
|
|
6055
|
+
});
|
|
6056
|
+
}
|
|
6057
|
+
taskMultipleApiCallsEnd(action, object) {
|
|
6058
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6059
|
+
const multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
6060
|
+
let multipleApiCallResponses = {};
|
|
6061
|
+
multipleApiConfig.endpoints.map((api) => {
|
|
6062
|
+
if (checkObjectKeyExists(api.response, "value"))
|
|
6063
|
+
multipleApiCallResponses = setValueToObjectPath(multipleApiCallResponses, `${api.apiKey}`, api.response.value);
|
|
6064
|
+
});
|
|
6065
|
+
this.tasksData = Object.assign(Object.assign({}, this.tasksData), { [action.props.formApiKey]: multipleApiCallResponses });
|
|
6066
|
+
this.waitingForChanges = false;
|
|
6067
|
+
this.hideApiLoader();
|
|
6068
|
+
});
|
|
6069
|
+
}
|
|
6070
|
+
dialogShow(options) {
|
|
6071
|
+
var _a;
|
|
6072
|
+
this.dialogRef = this.dialogs
|
|
6073
|
+
.open(options === null || options === void 0 ? void 0 : options.html, {
|
|
6074
|
+
closeable: true,
|
|
6075
|
+
dismissible: true,
|
|
6076
|
+
label: options === null || options === void 0 ? void 0 : options.label,
|
|
6077
|
+
size: (_a = options === null || options === void 0 ? void 0 : options.size) !== null && _a !== void 0 ? _a : "s",
|
|
6078
|
+
data: { button: options === null || options === void 0 ? void 0 : options.button }
|
|
6079
|
+
})
|
|
6080
|
+
.subscribe({
|
|
6081
|
+
complete: () => { }
|
|
6082
|
+
});
|
|
6083
|
+
}
|
|
6084
|
+
dialogHide() {
|
|
6085
|
+
if (this.dialogRef) {
|
|
6086
|
+
this.dialogRef.complete();
|
|
6087
|
+
}
|
|
6088
|
+
}
|
|
5372
6089
|
patchFieldControlValue(key, value) {
|
|
5373
6090
|
this.formGroup.patchValue({
|
|
5374
6091
|
[key]: value
|
|
@@ -5399,6 +6116,25 @@ class KwikIDFormViewComponent {
|
|
|
5399
6116
|
getFormGroupRawValues() {
|
|
5400
6117
|
return this.formGroup.getRawValue();
|
|
5401
6118
|
}
|
|
6119
|
+
showPreview(previewProperties) {
|
|
6120
|
+
this.previewProperties = mergeObjects(this.previewProperties, previewProperties);
|
|
6121
|
+
if (isEmptyValue(this.previewProperties.iframe.src) &&
|
|
6122
|
+
isEmptyValue(this.previewProperties.html.before) &&
|
|
6123
|
+
isEmptyValue(this.previewProperties.html.after)) {
|
|
6124
|
+
this.previewProperties.unavailable = true;
|
|
6125
|
+
}
|
|
6126
|
+
else {
|
|
6127
|
+
this.previewProperties.unavailable = false;
|
|
6128
|
+
}
|
|
6129
|
+
this.previewDialogService.open(this.preview || "").subscribe();
|
|
6130
|
+
}
|
|
6131
|
+
showPopupForm(popupFormKey) {
|
|
6132
|
+
const popupFormConfig = this.formConfig.popupForms[popupFormKey];
|
|
6133
|
+
this.onActionShowPopupForm.emit({
|
|
6134
|
+
activeFormData: mergeObjects(this.formData, this.tasksData),
|
|
6135
|
+
popupFormConfig: popupFormConfig
|
|
6136
|
+
});
|
|
6137
|
+
}
|
|
5402
6138
|
takeActionOnFieldGroup(action, object) {
|
|
5403
6139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5404
6140
|
switch (action.key) {
|
|
@@ -5420,6 +6156,7 @@ class KwikIDFormViewComponent {
|
|
|
5420
6156
|
});
|
|
5421
6157
|
}
|
|
5422
6158
|
takeAction(action, object) {
|
|
6159
|
+
var _a, _b, _c, _d;
|
|
5423
6160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5424
6161
|
switch (action.key) {
|
|
5425
6162
|
case EActionKey.FIELD_HIDE:
|
|
@@ -5462,92 +6199,65 @@ class KwikIDFormViewComponent {
|
|
|
5462
6199
|
this.fieldMessageHide(action.props.fieldKey, action.props.message);
|
|
5463
6200
|
break;
|
|
5464
6201
|
case EActionKey.SET_VALUE:
|
|
5465
|
-
|
|
5466
|
-
const sourceValue = yield setValue_Source.getValueFromSource(action.props.value.source);
|
|
5467
|
-
setValue_Source.setValueToSource(action.props.value.destination, sourceValue);
|
|
5468
|
-
object.FIELD_CONFIG = setValue_Source.object.FIELD_CONFIG;
|
|
5469
|
-
this.formData = setValue_Source.object.FORM_DATA;
|
|
5470
|
-
this.patchFormGroup(this.formData);
|
|
5471
|
-
this.allFormsData = setValue_Source.object.ALL_FORMS_DATA;
|
|
5472
|
-
this.previousFormData = setValue_Source.object.PREVIOUS_FORM_DATA;
|
|
6202
|
+
yield this.setValue(action, object);
|
|
5473
6203
|
break;
|
|
5474
6204
|
case EActionKey.SET_FIELD_DEFAULT_VALUE:
|
|
5475
|
-
|
|
5476
|
-
const sourceDefaultValue = yield setDefaultValue_Source.getValueFromSource(action.props.value.source);
|
|
5477
|
-
const destinationDefaultValue_FieldConfig_Config = {
|
|
5478
|
-
key: ESourceKey.OBJECT,
|
|
5479
|
-
props: {
|
|
5480
|
-
object: {
|
|
5481
|
-
key: "FIELD_CONFIG",
|
|
5482
|
-
path: "default.value.value"
|
|
5483
|
-
}
|
|
5484
|
-
}
|
|
5485
|
-
};
|
|
5486
|
-
setDefaultValue_Source.setValueToSource(destinationDefaultValue_FieldConfig_Config, sourceDefaultValue);
|
|
5487
|
-
const destinationDefaultValue_FormData_Config__Props__Object__Path = String(`${action.props.fieldKey}`);
|
|
5488
|
-
const destinationDefaultValue_FormData_Config = {
|
|
5489
|
-
key: ESourceKey.OBJECT,
|
|
5490
|
-
props: {
|
|
5491
|
-
object: {
|
|
5492
|
-
key: "FORM_DATA",
|
|
5493
|
-
path: String(action.props.fieldKey)
|
|
5494
|
-
}
|
|
5495
|
-
}
|
|
5496
|
-
};
|
|
5497
|
-
setDefaultValue_Source.setValueToSource(destinationDefaultValue_FormData_Config, sourceDefaultValue);
|
|
5498
|
-
object.FIELD_CONFIG = setDefaultValue_Source.object.FIELD_CONFIG;
|
|
5499
|
-
this.formData = setDefaultValue_Source.object.FORM_DATA;
|
|
5500
|
-
this.patchFormGroup(this.formData);
|
|
5501
|
-
this.allFormsData = setDefaultValue_Source.object.ALL_FORMS_DATA;
|
|
5502
|
-
this.previousFormData =
|
|
5503
|
-
setDefaultValue_Source.object.PREVIOUS_FORM_DATA;
|
|
6205
|
+
yield this.setFieldDefaultValue(action, object);
|
|
5504
6206
|
break;
|
|
5505
6207
|
case EActionKey.SET_DROPDOWN_OPTIONS:
|
|
5506
|
-
|
|
5507
|
-
let dropdownValue = yield setDropdownValue_Sources.getValueFromSource(action.props.value.source);
|
|
5508
|
-
if (checkObjectKeyExists(action.props, "options")) {
|
|
5509
|
-
if (checkObjectKeyExists(action.props.options, "appendToPath")) {
|
|
5510
|
-
let appendToPath = yield setDropdownValue_Sources.getValueFromSource(action.props.options.appendToPath.source);
|
|
5511
|
-
if (isNotEmptyValue(appendToPath)) {
|
|
5512
|
-
const appendToPathStr = replaceString(appendToPath.match(`${action.props.options.appendToPath.filterSourceValue}`)[0], "[^a-zA-Z0-9_]", "_");
|
|
5513
|
-
const optionsPath = `${action.props.options.path}${appendToPathStr}`;
|
|
5514
|
-
dropdownValue = getObjectValueFromPath(dropdownValue, optionsPath);
|
|
5515
|
-
}
|
|
5516
|
-
}
|
|
5517
|
-
else {
|
|
5518
|
-
dropdownValue = getObjectValueFromPath(dropdownValue, action.props.options.path);
|
|
5519
|
-
}
|
|
5520
|
-
}
|
|
5521
|
-
setDropdownValue_Sources.setValueToSource(action.props.value.destination, dropdownValue);
|
|
5522
|
-
object.FIELD_CONFIG = setDropdownValue_Sources.object.FIELD_CONFIG;
|
|
5523
|
-
this.formData = setDropdownValue_Sources.object.FORM_DATA;
|
|
5524
|
-
this.allFormsData = setDropdownValue_Sources.object.ALL_FORMS_DATA;
|
|
5525
|
-
this.previousFormData =
|
|
5526
|
-
setDropdownValue_Sources.object.PREVIOUS_FORM_DATA;
|
|
6208
|
+
yield this.setDropdownOptions(action, object);
|
|
5527
6209
|
break;
|
|
5528
6210
|
case EActionKey.HANDLE_CONNECTED_ELEMENTS:
|
|
5529
6211
|
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
5530
6212
|
break;
|
|
5531
|
-
case EActionKey.CUSTOM:
|
|
5532
|
-
break;
|
|
5533
6213
|
case EActionKey.API_CALL:
|
|
5534
|
-
const entrypointKey = action.props.apiKey;
|
|
5535
|
-
let apiField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
5536
|
-
const endpoints = apiField.api.endpoints;
|
|
5537
|
-
const nextApiIndex = endpoints.findIndex((api) => api.apiKey == entrypointKey);
|
|
5538
|
-
const response = yield this.handleApiCall(apiField, endpoints[nextApiIndex]);
|
|
5539
|
-
apiField = response.field;
|
|
5540
|
-
apiField.api.endpoints[nextApiIndex] = response.api;
|
|
5541
6214
|
break;
|
|
5542
|
-
case EActionKey.
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
6215
|
+
case EActionKey.API_CALL_MULTIPLE:
|
|
6216
|
+
yield this.fieldMultipleApiCalls(action, object);
|
|
6217
|
+
break;
|
|
6218
|
+
case EActionKey.API_CALL_MULTIPLE_END:
|
|
6219
|
+
yield this.fieldMultipleApiCallsEnd(action, object);
|
|
6220
|
+
break;
|
|
6221
|
+
case EActionKey.TASK_API_CALL:
|
|
6222
|
+
yield this.taskApiCall(action, object);
|
|
6223
|
+
break;
|
|
6224
|
+
case EActionKey.TASK_API_CALL_MULTIPLE:
|
|
6225
|
+
yield this.taskMultipleApiCalls(action, object);
|
|
6226
|
+
break;
|
|
6227
|
+
case EActionKey.TASK_API_CALL_MULTIPLE_END:
|
|
6228
|
+
yield this.taskMultipleApiCallsEnd(action, object);
|
|
6229
|
+
break;
|
|
6230
|
+
case EActionKey.PREVIEW_DIALOG_SHOW:
|
|
6231
|
+
this.showPreview(action.props);
|
|
6232
|
+
break;
|
|
6233
|
+
case EActionKey.POPUP_FORM_SHOW:
|
|
6234
|
+
this.showPopupForm(action.props.popupFormKey);
|
|
6235
|
+
break;
|
|
6236
|
+
case EActionKey.MOVE_AHEAD:
|
|
6237
|
+
this.waitingForChanges = false;
|
|
6238
|
+
break;
|
|
6239
|
+
case EActionKey.NOTIFICATION_ERROR_SHOW:
|
|
6240
|
+
this.toggleErrorNotification(true);
|
|
6241
|
+
break;
|
|
6242
|
+
case EActionKey.NOTIFICATION_ERROR_HIDE:
|
|
6243
|
+
this.toggleErrorNotification(false);
|
|
6244
|
+
break;
|
|
6245
|
+
case EActionKey.RESUME_TASK_EXECUTION:
|
|
6246
|
+
this.stopTaskExecution = false;
|
|
6247
|
+
break;
|
|
6248
|
+
case EActionKey.STOP_TASK_EXECUTION:
|
|
6249
|
+
this.stopTaskExecution = true;
|
|
6250
|
+
break;
|
|
6251
|
+
case EActionKey.DIALOG_SHOW:
|
|
6252
|
+
this.dialogShow({
|
|
6253
|
+
html: (_a = action.props) === null || _a === void 0 ? void 0 : _a.html,
|
|
6254
|
+
label: (_b = action.props) === null || _b === void 0 ? void 0 : _b.label,
|
|
6255
|
+
size: (_c = action.props) === null || _c === void 0 ? void 0 : _c.size,
|
|
6256
|
+
button: (_d = action.props) === null || _d === void 0 ? void 0 : _d.button
|
|
5548
6257
|
});
|
|
5549
|
-
|
|
5550
|
-
|
|
6258
|
+
break;
|
|
6259
|
+
case EActionKey.DIALOG_HIDE:
|
|
6260
|
+
this.dialogHide();
|
|
5551
6261
|
break;
|
|
5552
6262
|
default:
|
|
5553
6263
|
break;
|
|
@@ -5555,8 +6265,8 @@ class KwikIDFormViewComponent {
|
|
|
5555
6265
|
});
|
|
5556
6266
|
}
|
|
5557
6267
|
}
|
|
5558
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewComponent, deps: [{ token: TuiPushService }, { token: TuiAlertService }, { token:
|
|
5559
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties.header.title.hidden ||\n !formConfig.properties.header.steps.hidden\n \"\n >\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties.header.title.hidden\"\n >{{ formConfig.properties.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of {{ formConfig.formsListLength }}</div\n >\n <hr\n *ngIf=\"\n !formConfig.properties.header.title.hidden &&\n !formConfig.properties.header.steps.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | safeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox-block\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox-block>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-radio-list\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-radio-list>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\"></span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'dropdown-with-search'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-select-combobox\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-select-combobox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api-call'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n shape=\"null\"\n size=\"m\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'preview-image'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-preview-image\n [altText]=\"field?.properties?.altText\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n [class]=\"field?.properties?.class\"\n ></kwikui-preview-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.viewFormsButton.label }}\"\n [showLoader]=\"viewFormsButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.saveButton.label }}\"\n [showLoader]=\"saveFormButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n</div>\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", 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: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i1.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minCalculatedFromToday", "max", "maxCalculatedFromToday", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "size", "min", "max", "steps", "quantum", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIPreviewImageComponent, selector: "kwikui-preview-image", inputs: ["id", "imageSrc", "altText", "imageType", "styles", "class", "loadingType", "html"], outputs: ["onClick"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }], pipes: { "safeHtml": SafeHtmlPipe$1 } });
|
|
6268
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: KwikIDFormViewService }, { token: TuiPushService }, { token: TuiAlertService }, { token: TuiPreviewDialogService }, { token: TuiDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6269
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button-icon\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n id=\"\"\n [showLoader]=\"backButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"submit\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n size=\"m\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button-icon>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of\n {{ formConfig.formsListLength }}</div\n >\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden &&\n !formConfig.properties?.header.steps.hidden &&\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | safeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox-block\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox-block>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-radio-list\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-radio-list>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\"></span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'dropdown-with-search'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-select-combobox\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-select-combobox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api-call'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n shape=\"null\"\n size=\"m\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'preview-image'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-preview-image\n [altText]=\"field?.properties?.altText\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n [class]=\"field?.properties?.class\"\n ></kwikui-preview-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.viewFormsButton.label }}\"\n [showLoader]=\"viewFormsButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.saveButton.label }}\"\n [showLoader]=\"saveFormButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n >\n </div>\n</div>\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n [innerHtml]=\"previewProperties.html.before | safeHtml\"\n ></div>\n\n <iframe\n *ngIf=\"previewProperties.iframe.src !== ''\"\n [src]=\"previewProperties.iframe.src | safeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n ></iframe>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n [innerHtml]=\"previewProperties.html.after | safeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-row-gap:1rem;row-gap:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:10px;column-gap:10px}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;grid-row-gap:.5rem;row-gap:.5rem;padding:1rem}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:.25rem;gap:.25rem;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;grid-row-gap:.5rem;grid-row-gap:.25rem;row-gap:.25rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1em}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-gap:.5rem;gap:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;grid-row-gap:1rem;row-gap:1rem;padding:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;grid-gap:1.4rem;gap:1.4rem;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}\n"], components: [{ type: i1.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i1.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minCalculatedFromToday", "max", "maxCalculatedFromToday", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "size", "min", "max", "steps", "quantum", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIPreviewImageComponent, selector: "kwikui-preview-image", inputs: ["id", "imageSrc", "altText", "imageType", "styles", "class", "loadingType", "html"], outputs: ["onClick"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }, { type: i5.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "safeHtml": SafeHtmlPipe$1, "safeUrl": SafeUrlPipe } });
|
|
5560
6270
|
__decorate([
|
|
5561
6271
|
logMethod
|
|
5562
6272
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -5599,12 +6309,21 @@ __decorate([
|
|
|
5599
6309
|
__decorate([
|
|
5600
6310
|
logMethod
|
|
5601
6311
|
], KwikIDFormViewComponent.prototype, "handleOnClickResetFormFields", null);
|
|
6312
|
+
__decorate([
|
|
6313
|
+
logMethod
|
|
6314
|
+
], KwikIDFormViewComponent.prototype, "handleFieldApiCall", null);
|
|
6315
|
+
__decorate([
|
|
6316
|
+
logMethod
|
|
6317
|
+
], KwikIDFormViewComponent.prototype, "handleTaskApiCall", null);
|
|
5602
6318
|
__decorate([
|
|
5603
6319
|
logMethod
|
|
5604
6320
|
], KwikIDFormViewComponent.prototype, "handleApiCall", null);
|
|
5605
6321
|
__decorate([
|
|
5606
6322
|
logMethod
|
|
5607
6323
|
], KwikIDFormViewComponent.prototype, "handleOnClickApiCall", null);
|
|
6324
|
+
__decorate([
|
|
6325
|
+
logMethod
|
|
6326
|
+
], KwikIDFormViewComponent.prototype, "handleOnClickGoBack", null);
|
|
5608
6327
|
__decorate([
|
|
5609
6328
|
logMethod
|
|
5610
6329
|
], KwikIDFormViewComponent.prototype, "handleOnClickViewForms", null);
|
|
@@ -5653,6 +6372,36 @@ __decorate([
|
|
|
5653
6372
|
__decorate([
|
|
5654
6373
|
logMethod
|
|
5655
6374
|
], KwikIDFormViewComponent.prototype, "fieldMessageHide", null);
|
|
6375
|
+
__decorate([
|
|
6376
|
+
logMethod
|
|
6377
|
+
], KwikIDFormViewComponent.prototype, "setValue", null);
|
|
6378
|
+
__decorate([
|
|
6379
|
+
logMethod
|
|
6380
|
+
], KwikIDFormViewComponent.prototype, "setFieldDefaultValue", null);
|
|
6381
|
+
__decorate([
|
|
6382
|
+
logMethod
|
|
6383
|
+
], KwikIDFormViewComponent.prototype, "setDropdownOptions", null);
|
|
6384
|
+
__decorate([
|
|
6385
|
+
logMethod
|
|
6386
|
+
], KwikIDFormViewComponent.prototype, "fieldMultipleApiCalls", null);
|
|
6387
|
+
__decorate([
|
|
6388
|
+
logMethod
|
|
6389
|
+
], KwikIDFormViewComponent.prototype, "fieldMultipleApiCallsEnd", null);
|
|
6390
|
+
__decorate([
|
|
6391
|
+
logMethod
|
|
6392
|
+
], KwikIDFormViewComponent.prototype, "taskApiCall", null);
|
|
6393
|
+
__decorate([
|
|
6394
|
+
logMethod
|
|
6395
|
+
], KwikIDFormViewComponent.prototype, "taskMultipleApiCalls", null);
|
|
6396
|
+
__decorate([
|
|
6397
|
+
logMethod
|
|
6398
|
+
], KwikIDFormViewComponent.prototype, "taskMultipleApiCallsEnd", null);
|
|
6399
|
+
__decorate([
|
|
6400
|
+
logMethod
|
|
6401
|
+
], KwikIDFormViewComponent.prototype, "dialogShow", null);
|
|
6402
|
+
__decorate([
|
|
6403
|
+
logMethod
|
|
6404
|
+
], KwikIDFormViewComponent.prototype, "dialogHide", null);
|
|
5656
6405
|
__decorate([
|
|
5657
6406
|
logMethod
|
|
5658
6407
|
], KwikIDFormViewComponent.prototype, "patchFieldControlValue", null);
|
|
@@ -5668,6 +6417,12 @@ __decorate([
|
|
|
5668
6417
|
__decorate([
|
|
5669
6418
|
logMethod
|
|
5670
6419
|
], KwikIDFormViewComponent.prototype, "getFormGroupRawValues", null);
|
|
6420
|
+
__decorate([
|
|
6421
|
+
logMethod
|
|
6422
|
+
], KwikIDFormViewComponent.prototype, "showPreview", null);
|
|
6423
|
+
__decorate([
|
|
6424
|
+
logMethod
|
|
6425
|
+
], KwikIDFormViewComponent.prototype, "showPopupForm", null);
|
|
5671
6426
|
__decorate([
|
|
5672
6427
|
logMethod
|
|
5673
6428
|
], KwikIDFormViewComponent.prototype, "takeActionOnFieldGroup", null);
|
|
@@ -5682,13 +6437,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
5682
6437
|
styleUrls: ["./form-view.component.scss"],
|
|
5683
6438
|
providers: [KwikIDFormViewService]
|
|
5684
6439
|
}]
|
|
5685
|
-
}], ctorParameters: function () { return [{ type: i4$1.TuiPushService, decorators: [{
|
|
6440
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: KwikIDFormViewService }, { type: i4$1.TuiPushService, decorators: [{
|
|
5686
6441
|
type: Inject,
|
|
5687
6442
|
args: [TuiPushService]
|
|
5688
|
-
}] }, { type: i3.TuiAlertService, decorators: [{
|
|
6443
|
+
}] }, { type: i3$1.TuiAlertService, decorators: [{
|
|
5689
6444
|
type: Inject,
|
|
5690
6445
|
args: [TuiAlertService]
|
|
5691
|
-
}] }, { type:
|
|
6446
|
+
}] }, { type: i5.TuiPreviewDialogService, decorators: [{
|
|
6447
|
+
type: Inject,
|
|
6448
|
+
args: [TuiPreviewDialogService]
|
|
6449
|
+
}] }, { type: i3$1.TuiDialogService, decorators: [{
|
|
6450
|
+
type: Inject,
|
|
6451
|
+
args: [TuiDialogService]
|
|
6452
|
+
}] }]; }, propDecorators: { preview: [{
|
|
6453
|
+
type: ViewChild,
|
|
6454
|
+
args: ["preview"]
|
|
6455
|
+
}], formConfig: [{
|
|
5692
6456
|
type: Input
|
|
5693
6457
|
}], formData: [{
|
|
5694
6458
|
type: Input
|
|
@@ -5696,13 +6460,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
5696
6460
|
type: Input
|
|
5697
6461
|
}], allFormsData: [{
|
|
5698
6462
|
type: Input
|
|
6463
|
+
}], popupFormCallback: [{
|
|
6464
|
+
type: Input
|
|
6465
|
+
}], onClickGoBack: [{
|
|
6466
|
+
type: Output
|
|
5699
6467
|
}], onClickViewForms: [{
|
|
5700
6468
|
type: Output
|
|
5701
6469
|
}], onClickSaveForm: [{
|
|
5702
6470
|
type: Output
|
|
5703
6471
|
}], onClickApiCall: [{
|
|
5704
6472
|
type: Output
|
|
5705
|
-
}],
|
|
6473
|
+
}], onActionShowPopupForm: [{
|
|
6474
|
+
type: Output
|
|
6475
|
+
}], ngOnInit: [], ngAfterViewInit: [], ngOnChanges: [], initFormConfig: [], setFormFieldsFromFormConfig: [], setFormFieldGroupsFromFormConfig: [], setFormDataFromAllFormsData: [], handleConnectedElementFieldGroupActions: [], handleConnectedElementFieldGroup: [], handleConnectedElementFieldActions: [], handleConnectedElementFields: [], handleConnectedElements: [], handleGetKeyValue: [], handleOnClickResetFormFields: [], handleFieldApiCall: [], handleTaskApiCall: [], handleApiCall: [], handleOnClickApiCall: [], handleOnClickGoBack: [], handleOnClickViewForms: [], handleOnClickSaveForm: [], toggleErrorNotification: [], fieldHide: [], fieldGroupHide: [], fieldShow: [], fieldGroupShow: [], fieldDisable: [], fieldGroupDisable: [], fieldEnable: [], fieldGroupEnable: [], fieldReset: [], fieldErrorShow: [], fieldErrorHide: [], fieldMessageShow: [], fieldMessageHide: [], setValue: [], setFieldDefaultValue: [], setDropdownOptions: [], fieldMultipleApiCalls: [], fieldMultipleApiCallsEnd: [], taskApiCall: [], taskMultipleApiCalls: [], taskMultipleApiCallsEnd: [], dialogShow: [], dialogHide: [], patchFieldControlValue: [], patchFormGroup: [], isFieldValid: [], isFieldEnabled: [], getFormGroupRawValues: [], showPreview: [], showPopupForm: [], takeActionOnFieldGroup: [], takeAction: [] } });
|
|
5706
6476
|
|
|
5707
6477
|
/**
|
|
5708
6478
|
* Generated class for the SafeHtmlPipe pipe.
|
|
@@ -5859,11 +6629,17 @@ class KwikIDFormsListComponent {
|
|
|
5859
6629
|
}
|
|
5860
6630
|
}
|
|
5861
6631
|
handleOnSubmitForms(e) {
|
|
6632
|
+
/**
|
|
6633
|
+
* POST ACTIONS
|
|
6634
|
+
* 1. API Calls.
|
|
6635
|
+
* 2. Preview of all filled data.
|
|
6636
|
+
* 3. URL Redirection or new opening of URL in external tab.
|
|
6637
|
+
*/
|
|
5862
6638
|
this.onClickSubmitForms.emit(e);
|
|
5863
6639
|
}
|
|
5864
6640
|
}
|
|
5865
6641
|
/** @nocollapse */ KwikIDFormsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5866
|
-
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", stepConfig: "stepConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0, template: "<div\n id=\"sidebar-container\"\n *ngIf=\"!loading\"\n>\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 }} <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 *ngIf=\"\n !stepConfig.props.formListProperties.footer.submitFormButton.hidden\n \"\n [disabled]=\"false\"\n id=\"\"\n label=\"{{\n stepConfig.props.formListProperties.footer.submitFormButton.label\n }}\"\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: i1.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["id", "value", "max", "size", "colors"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type:
|
|
6642
|
+
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", stepConfig: "stepConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0, template: "<div\n id=\"sidebar-container\"\n *ngIf=\"!loading\"\n>\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 }} <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 *ngIf=\"\n !stepConfig.props.formListProperties.footer.submitFormButton.hidden\n \"\n [disabled]=\"false\"\n id=\"\"\n label=\"{{\n stepConfig.props.formListProperties.footer.submitFormButton.label\n }}\"\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: i1.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["id", "value", "max", "size", "colors"] }, { type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "safeHtml": SafeHtmlPipe } });
|
|
5867
6643
|
__decorate([
|
|
5868
6644
|
logMethod
|
|
5869
6645
|
], KwikIDFormsListComponent.prototype, "ngOnChanges", null);
|
|
@@ -5933,10 +6709,12 @@ const getFormConfigByKey = (forms, key) => {
|
|
|
5933
6709
|
};
|
|
5934
6710
|
|
|
5935
6711
|
class KwikIDFormsRendererComponent {
|
|
5936
|
-
constructor(hostElement, cdr) {
|
|
6712
|
+
constructor(hostElement, cdr, previewDialogService) {
|
|
5937
6713
|
this.hostElement = hostElement;
|
|
5938
6714
|
this.cdr = cdr;
|
|
6715
|
+
this.previewDialogService = previewDialogService;
|
|
5939
6716
|
this.formsData = {};
|
|
6717
|
+
this.activeFormData = {};
|
|
5940
6718
|
this.apiCallResponse = {};
|
|
5941
6719
|
this.onClickSubmit = new EventEmitter();
|
|
5942
6720
|
this.getFormData = new EventEmitter();
|
|
@@ -5944,9 +6722,26 @@ class KwikIDFormsRendererComponent {
|
|
|
5944
6722
|
this.loading = false;
|
|
5945
6723
|
this.loader = false;
|
|
5946
6724
|
this.showErrorNotification = false;
|
|
6725
|
+
this.activePopupFormData = {};
|
|
6726
|
+
this.popupFormCallback = undefined;
|
|
5947
6727
|
this.allFormsData = {};
|
|
6728
|
+
this.allFormsSubmitted = false;
|
|
5948
6729
|
this.formsList = [];
|
|
5949
6730
|
this.isMobileView = false;
|
|
6731
|
+
this.previewProperties = {
|
|
6732
|
+
html: {
|
|
6733
|
+
before: "",
|
|
6734
|
+
after: ""
|
|
6735
|
+
},
|
|
6736
|
+
iframe: {
|
|
6737
|
+
src: "",
|
|
6738
|
+
title: ""
|
|
6739
|
+
},
|
|
6740
|
+
popupFormKey: "",
|
|
6741
|
+
title: "",
|
|
6742
|
+
unavailable: false
|
|
6743
|
+
};
|
|
6744
|
+
this.popupFormConfig = undefined;
|
|
5950
6745
|
// display forms and list conditionally
|
|
5951
6746
|
this.showForm = false;
|
|
5952
6747
|
this.showFormFields = true;
|
|
@@ -6234,6 +7029,28 @@ class KwikIDFormsRendererComponent {
|
|
|
6234
7029
|
this.activeFormConfig = this.findActiveFormConfig(this.formsList);
|
|
6235
7030
|
});
|
|
6236
7031
|
}
|
|
7032
|
+
showPreview(previewProperties) {
|
|
7033
|
+
this.previewProperties = mergeObjects(this.previewProperties, previewProperties);
|
|
7034
|
+
if (isEmptyValue(this.previewProperties.iframe.src) &&
|
|
7035
|
+
isEmptyValue(this.previewProperties.html.before) &&
|
|
7036
|
+
isEmptyValue(this.previewProperties.html.after) &&
|
|
7037
|
+
isEmptyValue(this.previewProperties.popupFormKey)) {
|
|
7038
|
+
this.previewProperties.unavailable = true;
|
|
7039
|
+
}
|
|
7040
|
+
else {
|
|
7041
|
+
if (isNotEmptyValue(this.previewProperties.popupFormKey)) {
|
|
7042
|
+
if (checkObjectKeyExists(this.activeFormConfig, "popupForms")) {
|
|
7043
|
+
this.popupFormConfig =
|
|
7044
|
+
this.activeFormConfig.popupForms[this.previewProperties.popupFormKey];
|
|
7045
|
+
}
|
|
7046
|
+
else {
|
|
7047
|
+
this.popupFormConfig = undefined;
|
|
7048
|
+
}
|
|
7049
|
+
}
|
|
7050
|
+
this.previewProperties.unavailable = false;
|
|
7051
|
+
}
|
|
7052
|
+
this.previewDialogService.open(this.preview || "").subscribe();
|
|
7053
|
+
}
|
|
6237
7054
|
formHide(formKey) {
|
|
6238
7055
|
let form = getFormConfigByKey(this.formsList, formKey);
|
|
6239
7056
|
form = setValueToObjectPath(form, "hidden", true);
|
|
@@ -6355,15 +7172,49 @@ class KwikIDFormsRendererComponent {
|
|
|
6355
7172
|
this.loader = true;
|
|
6356
7173
|
this.onClickApiCall.emit(e);
|
|
6357
7174
|
}
|
|
7175
|
+
handleOnActionShowPopupForm(e) {
|
|
7176
|
+
if (checkObjectKeyExists(e, "activeFormData") &&
|
|
7177
|
+
checkObjectKeyExists(e, "popupFormConfig")) {
|
|
7178
|
+
const popupFormData = { [this.activeFormConfig.key]: e.activeFormData };
|
|
7179
|
+
this.activePopupFormData = mergeObjects(this.allFormsData, popupFormData);
|
|
7180
|
+
this.popupFormConfig = e.popupFormConfig;
|
|
7181
|
+
this.previewDialogRef = this.previewDialogService
|
|
7182
|
+
.open(this.preview || "")
|
|
7183
|
+
.subscribe({
|
|
7184
|
+
next: (data) => {
|
|
7185
|
+
this.popupFormCallback = {
|
|
7186
|
+
popupFormData: data["data"],
|
|
7187
|
+
popupFormConfig: data["formConfig"],
|
|
7188
|
+
activeFormConfig: this.activeFormConfig
|
|
7189
|
+
};
|
|
7190
|
+
this.activePopupFormData = {};
|
|
7191
|
+
this.popupFormConfig = undefined;
|
|
7192
|
+
this.previewDialogRef.complete();
|
|
7193
|
+
},
|
|
7194
|
+
complete: () => {
|
|
7195
|
+
console.info("Dialog closed");
|
|
7196
|
+
}
|
|
7197
|
+
});
|
|
7198
|
+
}
|
|
7199
|
+
}
|
|
6358
7200
|
/**
|
|
6359
7201
|
* FormView - Listens to event of getting the Active Form's Data when the Form is Saved and emits (read as passes) the same event to the library consumer.
|
|
6360
7202
|
* @param e any
|
|
6361
7203
|
*/
|
|
6362
|
-
handleOnClickSaveForm(e) {
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
7204
|
+
handleOnClickSaveForm(e, eventType) {
|
|
7205
|
+
switch (eventType) {
|
|
7206
|
+
case "FORM":
|
|
7207
|
+
this.loader = true;
|
|
7208
|
+
this.getFormData.emit({
|
|
7209
|
+
[this.activeFormConfig.key]: e["data"]
|
|
7210
|
+
});
|
|
7211
|
+
break;
|
|
7212
|
+
case "POPUP_FORM":
|
|
7213
|
+
this.previewDialogRef.next(e);
|
|
7214
|
+
break;
|
|
7215
|
+
default:
|
|
7216
|
+
break;
|
|
7217
|
+
}
|
|
6367
7218
|
}
|
|
6368
7219
|
/**
|
|
6369
7220
|
* FormView - Listens to event of showing the Forms List in Mobile View.
|
|
@@ -6374,6 +7225,70 @@ class KwikIDFormsRendererComponent {
|
|
|
6374
7225
|
this.showForm = false;
|
|
6375
7226
|
this.showFormFields = false;
|
|
6376
7227
|
}
|
|
7228
|
+
/**
|
|
7229
|
+
* Handles the event of going back to the previous form directly or by tabbing, without showing the form list in mobile view.
|
|
7230
|
+
*
|
|
7231
|
+
* Prerequisite: The current form can never be locked; it should either be in an editable or completed state.
|
|
7232
|
+
*
|
|
7233
|
+
* Logic:
|
|
7234
|
+
* 1. For DIRECT mode, find the config of the previous form starting from the first form, such that the previous form is editable and its sequence number is one less than the current active form's sequence number.
|
|
7235
|
+
* If no previous form is found or all forms have been completed, show the form list.
|
|
7236
|
+
* 2. For TABBED mode, find the config of the previous form in the list, such that the previous form's sequence number is less than the current active form's sequence number and the form is editable.
|
|
7237
|
+
* If no previous form is found, show the form list.
|
|
7238
|
+
*
|
|
7239
|
+
* @param {Object} e - The event object containing the mode to go back in.
|
|
7240
|
+
* @param {string} e.mode - The mode of going back: DIRECT or TABBED.
|
|
7241
|
+
* @returns {void}
|
|
7242
|
+
*/
|
|
7243
|
+
handleOnClickGoBack(e) {
|
|
7244
|
+
switch (e.mode) {
|
|
7245
|
+
case EFormViewGoBackMode.DIRECT:
|
|
7246
|
+
if (this.activeFormConfig.sequenceNo === 1) {
|
|
7247
|
+
this.showFormSections = true;
|
|
7248
|
+
this.showForm = false;
|
|
7249
|
+
this.showFormFields = false;
|
|
7250
|
+
return;
|
|
7251
|
+
}
|
|
7252
|
+
else {
|
|
7253
|
+
if (this.checkIfFormsStatusCompleted(this.formsList, this.formsListCompleted)) {
|
|
7254
|
+
this.showFormSections = true;
|
|
7255
|
+
this.showForm = false;
|
|
7256
|
+
this.showFormFields = false;
|
|
7257
|
+
return;
|
|
7258
|
+
}
|
|
7259
|
+
else {
|
|
7260
|
+
const previousFormConfigDirect = this.formsList.find((form) => {
|
|
7261
|
+
if (form.sequenceNo === this.activeFormConfig.sequenceNo - 1 &&
|
|
7262
|
+
form.status !== EFormsListStatus.LOCKED) {
|
|
7263
|
+
return form;
|
|
7264
|
+
}
|
|
7265
|
+
});
|
|
7266
|
+
if (previousFormConfigDirect) {
|
|
7267
|
+
this.handleOnClickSetActiveForm(previousFormConfigDirect.key);
|
|
7268
|
+
}
|
|
7269
|
+
}
|
|
7270
|
+
}
|
|
7271
|
+
break;
|
|
7272
|
+
case EFormViewGoBackMode.TABBED:
|
|
7273
|
+
const previousFormConfig = this.formsList.find((form) => {
|
|
7274
|
+
if (form.sequenceNo < this.activeFormConfig.sequenceNo &&
|
|
7275
|
+
form.status === EFormsListStatus.EDITABLE) {
|
|
7276
|
+
return form;
|
|
7277
|
+
}
|
|
7278
|
+
});
|
|
7279
|
+
if (previousFormConfig) {
|
|
7280
|
+
this.handleOnClickSetActiveForm(previousFormConfig.key);
|
|
7281
|
+
}
|
|
7282
|
+
else {
|
|
7283
|
+
this.showFormSections = true;
|
|
7284
|
+
this.showForm = false;
|
|
7285
|
+
this.showFormFields = false;
|
|
7286
|
+
}
|
|
7287
|
+
break;
|
|
7288
|
+
default:
|
|
7289
|
+
break;
|
|
7290
|
+
}
|
|
7291
|
+
}
|
|
6377
7292
|
/**
|
|
6378
7293
|
* FormList - Listens to event of submitting all the forms and moving out of the library and also handles the validation of all the forms.
|
|
6379
7294
|
* @param e any
|
|
@@ -6420,8 +7335,8 @@ class KwikIDFormsRendererComponent {
|
|
|
6420
7335
|
}
|
|
6421
7336
|
}
|
|
6422
7337
|
}
|
|
6423
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsRendererComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6424
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (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=\"tuiIconXCircle\"\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", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData"], outputs: ["onClickViewForms", "onClickSaveForm", "onClickApiCall"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type:
|
|
7338
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsRendererComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TuiPreviewDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7339
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", activeFormData: "activeFormData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n [popupFormCallback]=\"this.popupFormCallback\"\n (onActionShowPopupForm)=\"this.handleOnActionShowPopupForm($event)\"\n (onClickGoBack)=\"this.handleOnClickGoBack($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event, 'FORM')\"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n<div\n ngClass=\"kwikid-forms-renderer-loader\"\n *ngIf=\"loader\"\n>\n <span class=\"loader\"></span>\n</div>\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n *ngIf=\"popupFormConfig\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event, 'POPUP_FORM')\"\n ></kwikid-form-view>\n </div>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n", styles: [":host{position:relative;height:100%}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:50%;margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}.kwikid-forms-renderer-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-forms-renderer-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-forms-renderer-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-forms-renderer-loader .t-loader{display:none!important}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;grid-gap:1.4rem;gap:1.4rem;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.kwikid-form-view-popup-container{width:100%;height:100vh;border-radius:1rem;background:var(--tui-base-01);padding:1rem}\n"], components: [{ type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData", "popupFormCallback"], outputs: ["onClickGoBack", "onClickViewForms", "onClickSaveForm", "onClickApiCall", "onActionShowPopupForm"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }, { type: i5.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], animations: [
|
|
6425
7340
|
trigger("panelInOut", [
|
|
6426
7341
|
transition(":enter", [
|
|
6427
7342
|
style({ transform: "translateY(100%)" }),
|
|
@@ -6459,6 +7374,9 @@ __decorate([
|
|
|
6459
7374
|
__decorate([
|
|
6460
7375
|
logMethod
|
|
6461
7376
|
], KwikIDFormsRendererComponent.prototype, "updateFormsList", null);
|
|
7377
|
+
__decorate([
|
|
7378
|
+
logMethod
|
|
7379
|
+
], KwikIDFormsRendererComponent.prototype, "showPreview", null);
|
|
6462
7380
|
__decorate([
|
|
6463
7381
|
logMethod
|
|
6464
7382
|
], KwikIDFormsRendererComponent.prototype, "formHide", null);
|
|
@@ -6471,6 +7389,15 @@ __decorate([
|
|
|
6471
7389
|
__decorate([
|
|
6472
7390
|
logMethod
|
|
6473
7391
|
], KwikIDFormsRendererComponent.prototype, "handleOnClickSetActiveForm", null);
|
|
7392
|
+
__decorate([
|
|
7393
|
+
logMethod
|
|
7394
|
+
], KwikIDFormsRendererComponent.prototype, "handleOnActionShowPopupForm", null);
|
|
7395
|
+
__decorate([
|
|
7396
|
+
logMethod
|
|
7397
|
+
], KwikIDFormsRendererComponent.prototype, "handleOnClickSaveForm", null);
|
|
7398
|
+
__decorate([
|
|
7399
|
+
logMethod
|
|
7400
|
+
], KwikIDFormsRendererComponent.prototype, "handleOnClickGoBack", null);
|
|
6474
7401
|
__decorate([
|
|
6475
7402
|
logMethod
|
|
6476
7403
|
], KwikIDFormsRendererComponent.prototype, "handleOnClickSubmitForms", null);
|
|
@@ -6492,15 +7419,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
6492
7419
|
])
|
|
6493
7420
|
]
|
|
6494
7421
|
}]
|
|
6495
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }
|
|
7422
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i5.TuiPreviewDialogService, decorators: [{
|
|
7423
|
+
type: Inject,
|
|
7424
|
+
args: [TuiPreviewDialogService]
|
|
7425
|
+
}] }]; }, propDecorators: { windowResizeWatcher: [{
|
|
6496
7426
|
type: HostListener,
|
|
6497
7427
|
args: ["window:resize", ["$event"]]
|
|
7428
|
+
}], preview: [{
|
|
7429
|
+
type: ViewChild,
|
|
7430
|
+
args: ["preview"]
|
|
6498
7431
|
}], stepConfig: [{
|
|
6499
7432
|
type: Input
|
|
6500
7433
|
}], userConfig: [{
|
|
6501
7434
|
type: Input
|
|
6502
7435
|
}], formsData: [{
|
|
6503
7436
|
type: Input
|
|
7437
|
+
}], activeFormData: [{
|
|
7438
|
+
type: Input
|
|
6504
7439
|
}], apiCallResponse: [{
|
|
6505
7440
|
type: Input
|
|
6506
7441
|
}], onClickSubmit: [{
|
|
@@ -6509,7 +7444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
6509
7444
|
type: Output
|
|
6510
7445
|
}], onClickApiCall: [{
|
|
6511
7446
|
type: Output
|
|
6512
|
-
}], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleOnClickSubmitForms: [] } });
|
|
7447
|
+
}], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], showPreview: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleOnActionShowPopupForm: [], handleOnClickSaveForm: [], handleOnClickGoBack: [], handleOnClickSubmitForms: [] } });
|
|
6513
7448
|
|
|
6514
7449
|
class BasicDateConfigEditor {
|
|
6515
7450
|
constructor() {
|
|
@@ -6586,6 +7521,7 @@ class KwikIDFormBuilderModule {
|
|
|
6586
7521
|
BasicElementConfigEditor,
|
|
6587
7522
|
BasicTextConfigEditor,
|
|
6588
7523
|
BasicRadioConfigEditor,
|
|
7524
|
+
BasicDropdownWithSearchConfigEditor,
|
|
6589
7525
|
BasicNumberConfigEditor,
|
|
6590
7526
|
BasicCheckboxConfigEditor,
|
|
6591
7527
|
BasicDateConfigEditor,
|
|
@@ -6629,6 +7565,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
6629
7565
|
BasicElementConfigEditor,
|
|
6630
7566
|
BasicTextConfigEditor,
|
|
6631
7567
|
BasicRadioConfigEditor,
|
|
7568
|
+
BasicDropdownWithSearchConfigEditor,
|
|
6632
7569
|
BasicNumberConfigEditor,
|
|
6633
7570
|
BasicCheckboxConfigEditor,
|
|
6634
7571
|
BasicDateConfigEditor,
|
|
@@ -6662,12 +7599,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
6662
7599
|
class KwikIDFormViewModule {
|
|
6663
7600
|
}
|
|
6664
7601
|
/** @nocollapse */ KwikIDFormViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6665
|
-
/** @nocollapse */ KwikIDFormViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1], imports: [CommonModule,
|
|
7602
|
+
/** @nocollapse */ KwikIDFormViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1, SafeUrlPipe], imports: [CommonModule,
|
|
6666
7603
|
FormsModule,
|
|
6667
7604
|
ReactiveFormsModule,
|
|
6668
7605
|
TuiLabelModule,
|
|
6669
7606
|
TuiPushModule,
|
|
6670
7607
|
TuiSvgModule,
|
|
7608
|
+
TuiPreviewModule,
|
|
7609
|
+
TuiButtonModule,
|
|
7610
|
+
TuiPreviewActionModule,
|
|
7611
|
+
TuiDialogModule,
|
|
6671
7612
|
KwikUIModule], exports: [KwikIDFormViewComponent] });
|
|
6672
7613
|
/** @nocollapse */ KwikIDFormViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewModule, imports: [[
|
|
6673
7614
|
CommonModule,
|
|
@@ -6676,12 +7617,16 @@ class KwikIDFormViewModule {
|
|
|
6676
7617
|
TuiLabelModule,
|
|
6677
7618
|
TuiPushModule,
|
|
6678
7619
|
TuiSvgModule,
|
|
7620
|
+
TuiPreviewModule,
|
|
7621
|
+
TuiButtonModule,
|
|
7622
|
+
TuiPreviewActionModule,
|
|
7623
|
+
TuiDialogModule,
|
|
6679
7624
|
KwikUIModule
|
|
6680
7625
|
]] });
|
|
6681
7626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewModule, decorators: [{
|
|
6682
7627
|
type: NgModule,
|
|
6683
7628
|
args: [{
|
|
6684
|
-
declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1],
|
|
7629
|
+
declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1, SafeUrlPipe],
|
|
6685
7630
|
imports: [
|
|
6686
7631
|
CommonModule,
|
|
6687
7632
|
FormsModule,
|
|
@@ -6689,6 +7634,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
6689
7634
|
TuiLabelModule,
|
|
6690
7635
|
TuiPushModule,
|
|
6691
7636
|
TuiSvgModule,
|
|
7637
|
+
TuiPreviewModule,
|
|
7638
|
+
TuiButtonModule,
|
|
7639
|
+
TuiPreviewActionModule,
|
|
7640
|
+
TuiDialogModule,
|
|
6692
7641
|
KwikUIModule
|
|
6693
7642
|
],
|
|
6694
7643
|
exports: [KwikIDFormViewComponent]
|
|
@@ -6735,6 +7684,10 @@ class KwikIDFormRendererModule {
|
|
|
6735
7684
|
KwikUIModule,
|
|
6736
7685
|
TuiLoaderModule,
|
|
6737
7686
|
TuiPushModule,
|
|
7687
|
+
TuiPreviewActionModule,
|
|
7688
|
+
TuiPreviewModule,
|
|
7689
|
+
TuiButtonModule,
|
|
7690
|
+
TuiPreviewActionModule,
|
|
6738
7691
|
TuiSvgModule], exports: [KwikIDFormsRendererComponent] });
|
|
6739
7692
|
/** @nocollapse */ KwikIDFormRendererModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormRendererModule, providers: [], imports: [[
|
|
6740
7693
|
CommonModule,
|
|
@@ -6744,6 +7697,10 @@ class KwikIDFormRendererModule {
|
|
|
6744
7697
|
KwikUIModule,
|
|
6745
7698
|
TuiLoaderModule,
|
|
6746
7699
|
TuiPushModule,
|
|
7700
|
+
TuiPreviewActionModule,
|
|
7701
|
+
TuiPreviewModule,
|
|
7702
|
+
TuiButtonModule,
|
|
7703
|
+
TuiPreviewActionModule,
|
|
6747
7704
|
TuiSvgModule
|
|
6748
7705
|
]] });
|
|
6749
7706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormRendererModule, decorators: [{
|
|
@@ -6758,6 +7715,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
6758
7715
|
KwikUIModule,
|
|
6759
7716
|
TuiLoaderModule,
|
|
6760
7717
|
TuiPushModule,
|
|
7718
|
+
TuiPreviewActionModule,
|
|
7719
|
+
TuiPreviewModule,
|
|
7720
|
+
TuiButtonModule,
|
|
7721
|
+
TuiPreviewActionModule,
|
|
6761
7722
|
TuiSvgModule
|
|
6762
7723
|
],
|
|
6763
7724
|
providers: [],
|