kwikid-forms 0.6.11 → 0.6.13
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 +816 -337
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder-form-editor/builder-form-editor.component.js +2 -2
- package/esm2015/lib/builder/builder-form-editor/builder.form-editor.constants.js +6 -4
- package/esm2015/lib/builder/builder-form-list/builder-forms-list.component.js +1 -1
- package/esm2015/lib/builder/builder.component.js +1 -1
- package/esm2015/lib/renderer/config-converter/config-converter.constants.js +7 -3
- package/esm2015/lib/renderer/config-converter/config-converter.js +52 -48
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +7 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.apis.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +169 -9
- package/esm2015/lib/renderer/form-view/form-view.service.js +12 -2
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +81 -7
- package/esm2015/lib/renderer/form-view/helpers/form-view.defaults.helper.js +31 -1
- package/fesm2015/kwikid-forms.js +357 -67
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/builder/builder-form-editor/builder.form-editor.constants.d.ts +8 -0
- package/lib/renderer/config-converter/config-converter.constants.d.ts +4 -0
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +7 -1
- package/lib/renderer/form-view/definitions/form-view.apis.definition.d.ts +3 -3
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +10 -0
- package/lib/renderer/form-view/form-view.component.d.ts +7 -1
- package/lib/renderer/form-view/helpers/form-view.defaults.helper.d.ts +1 -0
- package/package.json +1 -1
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
return KwikIDBuilderFormsListComponent;
|
|
639
639
|
}());
|
|
640
640
|
/** @nocollapse */ KwikIDBuilderFormsListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormsListComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
641
|
-
/** @nocollapse */ KwikIDBuilderFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDBuilderFormsListComponent, selector: "kwikid-builder-forms-list", inputs: { activeFormConfig: "activeFormConfig", formsList: "formsList" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", getFormsList: "getFormsList" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"container\">\n <form\n class=\"add-form-container\"\n [formGroup]=\"addForm\"\n >\n <input\n type=\"text\"\n formControlName=\"key\"\n placeholder=\"form key\"\n />\n <input\n type=\"text\"\n formControlName=\"title\"\n placeholder=\"form title\"\n />\n <kwikui-button\n size=\"s\"\n styles=\"width: 100%\"\n label=\"add form\"\n shape=\"rounded\"\n (click)=\"handleOnClickAddForm()\"\n ></kwikui-button>\n </form>\n <hr />\n <div class=\"forms-list\">\n <ng-container *ngIf=\"formsList.length > 0; else NoForms\">\n <ng-container *ngFor=\"let form of formsList\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'HTML'\">\n <div [innerHtml]=\"form.props.htmlContent | kwikuiSafeHtml\"></div>\n </ng-container>\n <!-- Type FORM -->\n <ng-container *ngSwitchCase=\"'FORM'\">\n <ng-container\n [ngTemplateOutlet]=\"FORM_BUTTON\"\n [ngTemplateOutletContext]=\"{\n form: form,\n activeFormConfig: activeFormConfig\n }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-template #NoForms>\n <div class=\"no-form\">\n <div class=\"no-fields disclaimer\">\n <div class=\"icon\"><h1>+</h1></div>\n <div><p>Please add a new form to start</p></div>\n </div>\n </div>\n </ng-template>\n </div>\n <ng-container *ngIf=\"formsList.length > 0\">\n <hr />\n <div>\n <b>Total Forms: {{ formsList.length }}</b>\n </div>\n </ng-container>\n</div>\n\n<ng-template\n #FORM_BUTTON\n let-form=\"form\"\n let-activeFormConfig=\"activeFormConfig\"\n>\n <div\n [class]=\"'uf-section-item'\"\n [class.active]=\"\n activeFormConfig !== undefined && form.key === activeFormConfig.key\n \"\n (click)=\"handleOnClickSetActiveForm(form.key)\"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }} <span *ngIf=\"form?.required\">*</span>\n </div>\n <div class=\"uf-form-section-card-status\">\n <div class=\"uf-form-section-card-status-img edit\">\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n </div>\n </div>\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}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box
|
|
641
|
+
/** @nocollapse */ KwikIDBuilderFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDBuilderFormsListComponent, selector: "kwikid-builder-forms-list", inputs: { activeFormConfig: "activeFormConfig", formsList: "formsList" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", getFormsList: "getFormsList" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"container\">\n <form\n class=\"add-form-container\"\n [formGroup]=\"addForm\"\n >\n <input\n type=\"text\"\n formControlName=\"key\"\n placeholder=\"form key\"\n />\n <input\n type=\"text\"\n formControlName=\"title\"\n placeholder=\"form title\"\n />\n <kwikui-button\n size=\"s\"\n styles=\"width: 100%\"\n label=\"add form\"\n shape=\"rounded\"\n (click)=\"handleOnClickAddForm()\"\n ></kwikui-button>\n </form>\n <hr />\n <div class=\"forms-list\">\n <ng-container *ngIf=\"formsList.length > 0; else NoForms\">\n <ng-container *ngFor=\"let form of formsList\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'HTML'\">\n <div [innerHtml]=\"form.props.htmlContent | kwikuiSafeHtml\"></div>\n </ng-container>\n <!-- Type FORM -->\n <ng-container *ngSwitchCase=\"'FORM'\">\n <ng-container\n [ngTemplateOutlet]=\"FORM_BUTTON\"\n [ngTemplateOutletContext]=\"{\n form: form,\n activeFormConfig: activeFormConfig\n }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-template #NoForms>\n <div class=\"no-form\">\n <div class=\"no-fields disclaimer\">\n <div class=\"icon\"><h1>+</h1></div>\n <div><p>Please add a new form to start</p></div>\n </div>\n </div>\n </ng-template>\n </div>\n <ng-container *ngIf=\"formsList.length > 0\">\n <hr />\n <div>\n <b>Total Forms: {{ formsList.length }}</b>\n </div>\n </ng-container>\n</div>\n\n<ng-template\n #FORM_BUTTON\n let-form=\"form\"\n let-activeFormConfig=\"activeFormConfig\"\n>\n <div\n [class]=\"'uf-section-item'\"\n [class.active]=\"\n activeFormConfig !== undefined && form.key === activeFormConfig.key\n \"\n (click)=\"handleOnClickSetActiveForm(form.key)\"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }} <span *ngIf=\"form?.required\">*</span>\n </div>\n <div class=\"uf-form-section-card-status\">\n <div class=\"uf-form-section-card-status-img edit\">\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n </div>\n </div>\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}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;appearance:auto!important}input[type=checkbox]{appearance:auto!important;width:1rem;height:1rem}select{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}textarea{overflow-wrap:anywhere;resize:none;unicode-bidi:embed;white-space:pre-wrap}button{display:inline-block;padding:8px 12px;background-color:#007bff;color:#fff;text-decoration:none;border-radius:4px;border:none;cursor:pointer}button:hover{background-color:#0069d9}button:active{background-color:#0056b3}button:focus{outline:none}button.secondary{padding:7px 11px;border:1px solid #007bff;background-color:#fff;color:#007bff}button.secondary:hover{background-color:#b7daff}button.secondary:active{background-color:#b7daff}button.secondary:focus{outline:none}.field-container{display:flex}.field-container label{color:gray}.field-container.checkbox{flex-direction:row;align-items:center;justify-content:center;padding:8px 12px;margin:auto}.field-container.options,.field-container.number,.field-container.text{flex-direction:column}.disclaimer{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#121212;width:100%;height:100%}.disclaimer>*:not(:last-child){margin-bottom:1.5rem}.disclaimer .icon{width:3rem;height:3rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.disclaimer.no-form-selected h1{transform:scaleX(-1)}.disclaimer h1{font-size:5rem;font-weight:100}.disclaimer p{font-size:1rem}\n", ":host{all:unset;position:relative;height:100%}.container{width:100%;min-width:280px;max-width:400px;height:100%;display:flex;flex-direction:column;align-content:flex-start;justify-content:space-between;align-items:stretch;padding:1rem;border:1px solid #ccc}.container>*:not(:last-child){margin-bottom:1rem}.container .add-form-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end}.container .add-form-container>*:not(:last-child){margin-bottom:1rem}.container .forms-list{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;flex-grow:1;overflow:auto;padding-right:.5rem}.container .forms-list>*:not(:last-child){margin-bottom:1rem}.container .forms-list .uf-section-item{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;padding:1rem;cursor:pointer;box-shadow:0 1px 3px -1px var(--tui-base-05);border-radius:.5rem;background-color:var(--tui-base-02);position:relative}.container .forms-list .uf-section-item>*:not(:last-child){margin-right:1rem}.container .forms-list .uf-section-item:hover{box-shadow:0 1px 3px -1px var(--tui-base-08)}.container .forms-list .uf-section-item .uf-form-section-card-title{font-size:1em;text-align:left;line-height:1.25em;font-weight:bold;white-space:nowrap}.container .forms-list .uf-section-item .uf-form-section-card-status{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.container .forms-list .uf-section-item .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}.container .forms-list .uf-section-item .uf-form-section-card-status .uf-form-section-card-status-img.edit{background-color:var(--tui-error-fill);padding:.25rem;border-radius:50%;color:#fff}.container .forms-list .form-item{background-color:#ccc3;border:1px solid gray;color:gray;cursor:pointer;display:inline-block;padding:12px 6px;text-decoration:none}.container .forms-list .form-item.active{background-color:#007bff0f;border:1px solid #007bff;color:#007bff}.container .forms-list .form-item.active span{transform:scaleX(-1)}.container .forms-list .no-form{height:100%;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;text-align:center}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i3__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "kwikuiSafeHtml": i2__namespace.KwikUISafeHtmlPipe } });
|
|
642
642
|
__decorate([
|
|
643
643
|
kwikidToolkit.logMethod
|
|
644
644
|
], KwikIDBuilderFormsListComponent.prototype, "ngOnChanges", null);
|
|
@@ -828,6 +828,8 @@
|
|
|
828
828
|
icon: "tuiIconCameraLarge",
|
|
829
829
|
showMediaFiles: true,
|
|
830
830
|
uploadFileToServer: false,
|
|
831
|
+
isCroppedImage: false,
|
|
832
|
+
isMaskedImage: false,
|
|
831
833
|
cameraConfig: {
|
|
832
834
|
header: {
|
|
833
835
|
title: "Camera",
|
|
@@ -837,10 +839,12 @@
|
|
|
837
839
|
},
|
|
838
840
|
footer: {
|
|
839
841
|
isUpload: true,
|
|
840
|
-
isFlip:
|
|
842
|
+
isFlip: false,
|
|
843
|
+
isSwitch: true
|
|
841
844
|
},
|
|
842
845
|
others: {
|
|
843
|
-
|
|
846
|
+
isFrontCamera: false,
|
|
847
|
+
flipHorizontal: false,
|
|
844
848
|
mask: {
|
|
845
849
|
shape: ""
|
|
846
850
|
},
|
|
@@ -1199,7 +1203,8 @@
|
|
|
1199
1203
|
logo: {
|
|
1200
1204
|
src: "",
|
|
1201
1205
|
alt: "Logo",
|
|
1202
|
-
hidden: false
|
|
1206
|
+
hidden: false,
|
|
1207
|
+
styles: ""
|
|
1203
1208
|
},
|
|
1204
1209
|
backButton: {
|
|
1205
1210
|
mode: "TABBED",
|
|
@@ -1208,10 +1213,12 @@
|
|
|
1208
1213
|
},
|
|
1209
1214
|
title: {
|
|
1210
1215
|
hidden: false,
|
|
1211
|
-
label: (_b = (_a = formConfig === null || formConfig === void 0 ? void 0 : formConfig.title) !== null && _a !== void 0 ? _a : formConfig === null || formConfig === void 0 ? void 0 : formConfig.props.title) !== null && _b !== void 0 ? _b : "Form"
|
|
1216
|
+
label: (_b = (_a = formConfig === null || formConfig === void 0 ? void 0 : formConfig.title) !== null && _a !== void 0 ? _a : formConfig === null || formConfig === void 0 ? void 0 : formConfig.props.title) !== null && _b !== void 0 ? _b : "Form",
|
|
1217
|
+
styles: ""
|
|
1212
1218
|
},
|
|
1213
1219
|
steps: {
|
|
1214
|
-
hidden: false
|
|
1220
|
+
hidden: false,
|
|
1221
|
+
styles: ""
|
|
1215
1222
|
}
|
|
1216
1223
|
},
|
|
1217
1224
|
main: {
|
|
@@ -1635,49 +1642,6 @@
|
|
|
1635
1642
|
return field;
|
|
1636
1643
|
};
|
|
1637
1644
|
var updateFieldDefaultValue = function (field) {
|
|
1638
|
-
var defaultValue = {
|
|
1639
|
-
value: {
|
|
1640
|
-
is_found: false,
|
|
1641
|
-
value: "",
|
|
1642
|
-
sources: [
|
|
1643
|
-
{
|
|
1644
|
-
key: "OBJECT",
|
|
1645
|
-
props: {
|
|
1646
|
-
object: {
|
|
1647
|
-
key: "FORM_DATA",
|
|
1648
|
-
path: "$." + field.key
|
|
1649
|
-
}
|
|
1650
|
-
},
|
|
1651
|
-
value: "",
|
|
1652
|
-
validation: {
|
|
1653
|
-
is_valid: false,
|
|
1654
|
-
triggers: ["ON_INIT"],
|
|
1655
|
-
rules: [],
|
|
1656
|
-
actions: [
|
|
1657
|
-
{
|
|
1658
|
-
id: "1",
|
|
1659
|
-
key: "SET_FIELD_DEFAULT_VALUE",
|
|
1660
|
-
condition: "1",
|
|
1661
|
-
props: {
|
|
1662
|
-
value: {
|
|
1663
|
-
source: {
|
|
1664
|
-
key: "OBJECT",
|
|
1665
|
-
props: {
|
|
1666
|
-
object: {
|
|
1667
|
-
key: "FORM_DATA",
|
|
1668
|
-
path: "$." + field.key
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
]
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
]
|
|
1679
|
-
}
|
|
1680
|
-
};
|
|
1681
1645
|
if (field.isFormElement) {
|
|
1682
1646
|
if (kwikidToolkit.checkObjectKeyExists(field, "defaultValue")) {
|
|
1683
1647
|
return field;
|
|
@@ -1686,7 +1650,48 @@
|
|
|
1686
1650
|
return field;
|
|
1687
1651
|
}
|
|
1688
1652
|
else if (!kwikidToolkit.checkObjectPathExists(field, "default.value.sources")) {
|
|
1689
|
-
|
|
1653
|
+
var defaultValue = {
|
|
1654
|
+
is_found: false,
|
|
1655
|
+
value: "",
|
|
1656
|
+
sources: [
|
|
1657
|
+
{
|
|
1658
|
+
key: "OBJECT",
|
|
1659
|
+
props: {
|
|
1660
|
+
object: {
|
|
1661
|
+
key: "FORM_DATA",
|
|
1662
|
+
path: "$." + field.key
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
value: "",
|
|
1666
|
+
validation: {
|
|
1667
|
+
is_valid: false,
|
|
1668
|
+
triggers: ["ON_INIT"],
|
|
1669
|
+
rules: [],
|
|
1670
|
+
actions: [
|
|
1671
|
+
{
|
|
1672
|
+
id: "1",
|
|
1673
|
+
key: "SET_FIELD_DEFAULT_VALUE",
|
|
1674
|
+
condition: "1",
|
|
1675
|
+
props: {
|
|
1676
|
+
value: {
|
|
1677
|
+
source: {
|
|
1678
|
+
key: "OBJECT",
|
|
1679
|
+
props: {
|
|
1680
|
+
object: {
|
|
1681
|
+
key: "FORM_DATA",
|
|
1682
|
+
path: "$." + field.key
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
]
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
]
|
|
1693
|
+
};
|
|
1694
|
+
field = kwikidToolkit.setValueToObjectPath(field, "default.value", defaultValue);
|
|
1690
1695
|
return field;
|
|
1691
1696
|
}
|
|
1692
1697
|
delete field["defaultVal"];
|
|
@@ -1748,7 +1753,10 @@
|
|
|
1748
1753
|
field = formatOnFieldType(field);
|
|
1749
1754
|
field = updateFieldDisability(field);
|
|
1750
1755
|
fieldGroups = updateFormFieldGroups(fieldGroups, field);
|
|
1756
|
+
console.log("sadssadasdsdda");
|
|
1757
|
+
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
1751
1758
|
field = updateFieldDefaultValue(field);
|
|
1759
|
+
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
1752
1760
|
field = updateFieldValidators(field);
|
|
1753
1761
|
field = updateFieldResetButton(field);
|
|
1754
1762
|
field = updateFieldMessages(field);
|
|
@@ -1980,7 +1988,7 @@
|
|
|
1980
1988
|
"preview-image": Object.assign(Object.assign({}, FIELD_PROPERTIES_COMMON_CONFIG), { altText: "", html: { before: "", after: "" }, imageType: "url", loadingType: "auto", styles: "", class: "" }),
|
|
1981
1989
|
html: Object.assign({}, FIELD_PROPERTIES_COMMON_CONFIG),
|
|
1982
1990
|
file: Object.assign(Object.assign({}, FIELD_PROPERTIES_COMMON_CONFIG), { accept: "application/pdf", containerStyles: "", label: "drop a file or", link: "click to upload", maxFileSize: 1000000, multiple: true, size: "m", uploadFileToServer: true }),
|
|
1983
|
-
capture: Object.assign(Object.assign({}, FIELD_PROPERTIES_COMMON_CONFIG), { containerStyles: "", buttonText: "Camera", icon: "tuiIconCameraLarge", showMediaFiles: true, uploadFileToServer: false, cameraConfig: {
|
|
1991
|
+
capture: Object.assign(Object.assign({}, FIELD_PROPERTIES_COMMON_CONFIG), { containerStyles: "", buttonText: "Camera", icon: "tuiIconCameraLarge", showMediaFiles: true, uploadFileToServer: false, isCroppedImage: false, isMaskedImage: false, cameraConfig: {
|
|
1984
1992
|
header: {
|
|
1985
1993
|
title: "Camera",
|
|
1986
1994
|
isBack: false,
|
|
@@ -1989,10 +1997,12 @@
|
|
|
1989
1997
|
},
|
|
1990
1998
|
footer: {
|
|
1991
1999
|
isUpload: true,
|
|
1992
|
-
isFlip:
|
|
2000
|
+
isFlip: false,
|
|
2001
|
+
isSwitch: true
|
|
1993
2002
|
},
|
|
1994
2003
|
others: {
|
|
1995
|
-
|
|
2004
|
+
isFrontCamera: false,
|
|
2005
|
+
flipHorizontal: false,
|
|
1996
2006
|
mask: {
|
|
1997
2007
|
shape: ""
|
|
1998
2008
|
},
|
|
@@ -2468,7 +2478,7 @@
|
|
|
2468
2478
|
return KwikIDBuilderFormEditorComponent;
|
|
2469
2479
|
}());
|
|
2470
2480
|
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorComponent, deps: [{ token: i2__namespace.KwikUILoaderService }, { token: KwikIDFormBuilderFormEditorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2471
|
-
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDBuilderFormEditorComponent, selector: "kwikid-builder-form-editor", inputs: { activeFormConfig: "activeFormConfig" }, outputs: { onClickSaveActiveFormConfig: "onClickSaveActiveFormConfig" }, usesOnChanges: true, ngImport: i0__namespace, template: "<!-- Component Loader -->\n<kwikui-loader></kwikui-loader>\n\n<!-- Component Main View -->\n<div class=\"container\">\n <ng-container *ngIf=\"activeFormConfig; else noFormSelectedTemplate\">\n <header>\n <div>\n Editing Config of Form: <b>{{ activeFormConfig.props.title }}</b>\n </div>\n <div class=\"header-form-editor-btns\">\n <button (click)=\"handleOnClickPreview()\">preview</button>\n <div>Editor Type:</div>\n <select (change)=\"handleOnClickChangeActiveEditor($event.target.value)\">\n <option\n *ngFor=\"let option of editorTypeOptions\"\n [value]=\"option.key\"\n [selected]=\"option.key === activeEditorType\"\n >\n {{ option.label }}\n </option>\n </select>\n </div>\n </header>\n <main>\n <div\n class=\"form-config-fields\"\n *ngIf=\"activeEditorType == 'FIELDS'; else nonFieldsEditorTemplate\"\n >\n <ng-container *ngIf=\"rows.length <= 0\">\n <div class=\"no-fields disclaimer\">\n <div><p>Please add field to get started</p></div>\n <div class=\"icon\"><h1>+</h1></div>\n <button (click)=\"handleOnClickAddField()\">add field</button>\n </div>\n </ng-container>\n <table>\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\">\n {{ column }}\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let row of rows; let i = index; trackBy: trackByFn\"\n >\n <tr>\n <ng-container *ngFor=\"let column of columns; let j = index\">\n <td>\n <div [class]=\"column\">\n <ng-container\n *ngIf=\"\n column !== 'delete' &&\n column !== 'validators' &&\n column !== 'properties' &&\n column !== 'type' &&\n column !== 'disabled' &&\n column !== 'options'\n \"\n [ngTemplateOutlet]=\"getFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n fieldValue: row[column],\n fieldKey: column,\n parentPath: ''\n }\"\n ></ng-container>\n <ng-container *ngIf=\"column === 'type'\">\n <ng-container\n [ngTemplateOutlet]=\"optionFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n key: column,\n value: row[column],\n path: '',\n options: memoizedGetOptions(\n i,\n row[column],\n column,\n ''\n )\n }\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"column === 'disabled'\">\n <ng-container\n [ngTemplateOutlet]=\"booleanFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n key: column,\n value: row[column],\n path: '',\n options: memoizedGetOptions(\n i,\n row[column],\n column,\n ''\n )\n }\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"column === 'delete'\">\n <button\n (click)=\"\n handleOnClickDeleteField({\n index: i,\n key: row['key']\n })\n \"\n [disabled]=\"rows.length === 1\"\n >\n delete\n </button>\n </ng-container>\n <ng-container *ngIf=\"column === 'validators'\">\n <button\n (click)=\"\n handleOnClickEditValidators({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n edit\n </button>\n </ng-container>\n <ng-container *ngIf=\"column === 'properties'\">\n <button\n (click)=\"\n handleOnClickEditProperties({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n edit\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"row['type'] === 'radio' && column === 'options'\"\n >\n <button\n (click)=\"\n handleOnClickEditOptions({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n add\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"row['type'] === 'select' && column === 'options'\"\n >\n <button\n (click)=\"\n handleOnClickEditOptions({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n add\n </button>\n </ng-container>\n </div>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <div class=\"add-field-btn-container\"> </div>\n </div>\n <ng-template #nonFieldsEditorTemplate>\n <div class=\"form-config-no-fields\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnClickSaveActiveFormConfig_NoFields(\n $event.target.innerHTML\n )\n \"\n >\n {{ activeFormConfig_NoFields | json }}\n </div>\n </div>\n </ng-template>\n </main>\n <footer>\n <button\n *ngIf=\"rows.length > 0\"\n (click)=\"handleOnClickAddField()\"\n >\n add field\n </button>\n <button\n (click)=\"handleOnClickSaveActiveFormConfig()\"\n [class.secondary]=\"!savedConfig\"\n >\n {{ savedConfig ? \"saved\" : \"unsaved\" }}\n </button>\n </footer>\n </ng-container>\n <ng-template #noFormSelectedTemplate>\n <div class=\"no-form-selected disclaimer\">\n <div class=\"icon\"><h1>➦</h1></div>\n <div><p>Please select a form to edit it's fields</p></div>\n </div>\n </ng-template>\n</div>\n\n<!-- Component Dialog -->\n<div\n class=\"modal\"\n [class.error]=\"dialogError === true\"\n *ngIf=\"\n dialogOpen ||\n showFieldConfigValidatorsConfigEditor ||\n showFieldConfigPropertiesConfigEditor ||\n showFieldConfigOptionsConfigEditor\n \"\n [@panelInOut]\n>\n <div class=\"modal-box\">\n <div\n class=\"modal-content\"\n *ngIf=\"dialogOpen\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Config Preview\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"convertToMinifiedJson()\">minify</button>\n <button (click)=\"convertToCompleteJson()\">full</button>\n <button (click)=\"downloadJSON()\">download</button>\n <button (click)=\"copyToClipboard()\">copy</button>\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div class=\"json-editor\">\n <code>{{ activeFormConfig | json }}</code>\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigValidatorsConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Validator Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigValidatorsConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigValidatorsConfig | json }}\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigPropertiesConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Properties Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigPropertiesConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigPropertiesConfig | json }}\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigOptionsConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Options Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigOptionsConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigOptionsConfig | json }}\n </div>\n </div>\n </div>\n </div>\n</div>\n<!-- END -->\n\n<!-- Template for rendering different field types -->\n<!-- General Field Template -->\n<ng-template\n #getFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container\n [ngTemplateOutlet]=\"\n isObject(value) ? objectFieldTemplate : notObjectFieldTemplate\n \"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: value,\n fieldKey: key,\n parentPath: path\n }\"\n >\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Object Type Field Template -->\n<ng-template\n #objectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <ng-container *ngFor=\"let item of value | keyvalue\">\n <ng-container\n [ngTemplateOutlet]=\"getFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: item.value,\n fieldKey: item.key,\n parentPath: path === '' ? key : path + '.' + key\n }\"\n >\n </ng-container>\n </ng-container>\n</ng-template>\n\n<!-- Non Object Type Field Template -->\n<ng-template\n #notObjectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container *ngIf=\"isOptions(index, value, key, path)\">\n <ng-container\n [ngTemplateOutlet]=\"optionFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n key: key,\n value: value,\n path: path,\n options: memoizedGetOptions(index, value, key, path)\n }\"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isString(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n textFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isNumber(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n numberFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Options Field Template -->\n<ng-template\n #optionFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n let-options=\"options\"\n>\n <div class=\"field-container options\">\n <select\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n >\n <option\n *ngFor=\"let option of options\"\n [value]=\"option\"\n [selected]=\"option === value\"\n >{{ option }}</option\n >\n </select>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Boolean Field Template -->\n<ng-template\n #booleanFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container checkbox\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.checked }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Text Field Template -->\n<ng-template\n #textFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container text\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"text\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Number Field Template -->\n<ng-template\n #numberFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container number\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"number\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n<!-- END -->\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}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;-webkit-appearance:auto!important;appearance:auto!important}input[type=checkbox]{-webkit-appearance:auto!important;appearance:auto!important;width:1rem;height:1rem}select{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}textarea{overflow-wrap:anywhere;resize:none;unicode-bidi:embed;white-space:pre-wrap}button{display:inline-block;padding:8px 12px;background-color:#007bff;color:#fff;text-decoration:none;border-radius:4px;border:none;cursor:pointer}button:hover{background-color:#0069d9}button:active{background-color:#0056b3}button:focus{outline:none}button.secondary{padding:7px 11px;border:1px solid #007bff;background-color:#fff;color:#007bff}button.secondary:hover{background-color:#b7daff}button.secondary:active{background-color:#b7daff}button.secondary:focus{outline:none}.field-container{display:flex}.field-container label{color:gray}.field-container.checkbox{flex-direction:row;align-items:center;justify-content:center;padding:8px 12px;margin:auto}.field-container.options,.field-container.number,.field-container.text{flex-direction:column}.disclaimer{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#121212;width:100%;height:100%}.disclaimer>*:not(:last-child){margin-bottom:1.5rem}.disclaimer .icon{width:3rem;height:3rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.disclaimer.no-form-selected h1{transform:scaleX(-1)}.disclaimer h1{font-size:5rem;font-weight:100}.disclaimer p{font-size:1rem}\n", ":host{all:unset;position:relative;width:100%;height:100%;overflow:auto}.container{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;height:100%;border:1px solid #ccc}.container header{padding:.5rem;display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;border-bottom:1px solid #ccc}.container header .header-form-editor-btns{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.container header .header-form-editor-btns>*:not(:last-child){margin-right:1rem}.container main{padding:.5rem;flex-grow:1;overflow:auto;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;white-space:nowrap;position:relative}.container main>*:not(:last-child){margin-right:1rem}.container main .no-fields{position:absolute;top:0;left:0;background:white}.container main .form-config-no-fields{overflow:auto;width:100%}.container main .form-config-fields{overflow:auto;width:100%}.container main .form-config-fields .add-field-btn-container{width:100%;text-align:center}.container main .validators,.container main .properties{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch}.container main .validators>*:not(:last-child),.container main .properties>*:not(:last-child){margin-bottom:.5rem}.container main .input-checkbox-container{display:flex;flex-direction:row}.container footer{padding:.5rem;display:flex;flex-direction:row;justify-content:flex-end;align-items:stretch;border-top:1px solid lightgray}.container footer>*:not(:last-child){margin-right:1rem}.modal{position:absolute;top:0;background-color:#0000004d;width:100%;height:100%;display:flex;justify-content:center;align-items:center;left:0;flex-direction:row}.modal.error{background-color:#ff00004d}.modal-box{width:75%;height:75%;margin:auto;background-color:#fff;border-radius:1rem;box-shadow:#64646f33 0 7px 29px}.modal-content{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;width:100%;height:100%}.modal-heading{padding:.5rem 1rem;width:100%;display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid lightgray;align-items:center}.modal-title{font-weight:bold;font-size:1rem}.modal-actions{display:flex;flex-direction:row;cursor:pointer}.modal-actions>*:not(:last-child){margin-right:1rem}.modal-body{overflow:auto;flex:1}.modal-body .json-editor{font-family:monospace;white-space:pre-wrap;border:none;padding:0;background-color:#f5f5f5;height:100%;outline:none;overflow:auto}.json-editor{font-family:monospace;white-space:pre-wrap;border:none;padding:0;background-color:#f5f5f5;height:100%;outline:none;overflow:auto}table{width:100%;border-collapse:collapse;margin-bottom:20px}table th,table td{padding:8px;text-align:left;border:1px solid #ccc;vertical-align:top}table th{background-color:#f2f2f2}table tr:nth-child(even){background-color:#f9f9f9}table tr:hover{background-color:#eaeaea}\n"], components: [{ type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "json": i3__namespace$2.JsonPipe, "keyvalue": i3__namespace$2.KeyValuePipe }, animations: [
|
|
2481
|
+
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDBuilderFormEditorComponent, selector: "kwikid-builder-form-editor", inputs: { activeFormConfig: "activeFormConfig" }, outputs: { onClickSaveActiveFormConfig: "onClickSaveActiveFormConfig" }, usesOnChanges: true, ngImport: i0__namespace, template: "<!-- Component Loader -->\n<kwikui-loader></kwikui-loader>\n\n<!-- Component Main View -->\n<div class=\"container\">\n <ng-container *ngIf=\"activeFormConfig; else noFormSelectedTemplate\">\n <header>\n <div>\n Editing Config of Form: <b>{{ activeFormConfig.props.title }}</b>\n </div>\n <div class=\"header-form-editor-btns\">\n <button (click)=\"handleOnClickPreview()\">preview</button>\n <div>Editor Type:</div>\n <select (change)=\"handleOnClickChangeActiveEditor($event.target.value)\">\n <option\n *ngFor=\"let option of editorTypeOptions\"\n [value]=\"option.key\"\n [selected]=\"option.key === activeEditorType\"\n >\n {{ option.label }}\n </option>\n </select>\n </div>\n </header>\n <main>\n <div\n class=\"form-config-fields\"\n *ngIf=\"activeEditorType == 'FIELDS'; else nonFieldsEditorTemplate\"\n >\n <ng-container *ngIf=\"rows.length <= 0\">\n <div class=\"no-fields disclaimer\">\n <div><p>Please add field to get started</p></div>\n <div class=\"icon\"><h1>+</h1></div>\n <button (click)=\"handleOnClickAddField()\">add field</button>\n </div>\n </ng-container>\n <table>\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\">\n {{ column }}\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let row of rows; let i = index; trackBy: trackByFn\"\n >\n <tr>\n <ng-container *ngFor=\"let column of columns; let j = index\">\n <td>\n <div [class]=\"column\">\n <ng-container\n *ngIf=\"\n column !== 'delete' &&\n column !== 'validators' &&\n column !== 'properties' &&\n column !== 'type' &&\n column !== 'disabled' &&\n column !== 'options'\n \"\n [ngTemplateOutlet]=\"getFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n fieldValue: row[column],\n fieldKey: column,\n parentPath: ''\n }\"\n ></ng-container>\n <ng-container *ngIf=\"column === 'type'\">\n <ng-container\n [ngTemplateOutlet]=\"optionFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n key: column,\n value: row[column],\n path: '',\n options: memoizedGetOptions(\n i,\n row[column],\n column,\n ''\n )\n }\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"column === 'disabled'\">\n <ng-container\n [ngTemplateOutlet]=\"booleanFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n key: column,\n value: row[column],\n path: '',\n options: memoizedGetOptions(\n i,\n row[column],\n column,\n ''\n )\n }\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"column === 'delete'\">\n <button\n (click)=\"\n handleOnClickDeleteField({\n index: i,\n key: row['key']\n })\n \"\n [disabled]=\"rows.length === 1\"\n >\n delete\n </button>\n </ng-container>\n <ng-container *ngIf=\"column === 'validators'\">\n <button\n (click)=\"\n handleOnClickEditValidators({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n edit\n </button>\n </ng-container>\n <ng-container *ngIf=\"column === 'properties'\">\n <button\n (click)=\"\n handleOnClickEditProperties({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n edit\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"row['type'] === 'radio' && column === 'options'\"\n >\n <button\n (click)=\"\n handleOnClickEditOptions({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n add\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"row['type'] === 'select' && column === 'options'\"\n >\n <button\n (click)=\"\n handleOnClickEditOptions({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n add\n </button>\n </ng-container>\n </div>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <div class=\"add-field-btn-container\"> </div>\n </div>\n <ng-template #nonFieldsEditorTemplate>\n <div class=\"form-config-no-fields\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnClickSaveActiveFormConfig_NoFields(\n $event.target.innerHTML\n )\n \"\n >\n {{ activeFormConfig_NoFields | json }}\n </div>\n </div>\n </ng-template>\n </main>\n <footer>\n <button\n *ngIf=\"rows.length > 0\"\n (click)=\"handleOnClickAddField()\"\n >\n add field\n </button>\n <button\n (click)=\"handleOnClickSaveActiveFormConfig()\"\n [class.secondary]=\"!savedConfig\"\n >\n {{ savedConfig ? \"saved\" : \"unsaved\" }}\n </button>\n </footer>\n </ng-container>\n <ng-template #noFormSelectedTemplate>\n <div class=\"no-form-selected disclaimer\">\n <div class=\"icon\"><h1>➦</h1></div>\n <div><p>Please select a form to edit it's fields</p></div>\n </div>\n </ng-template>\n</div>\n\n<!-- Component Dialog -->\n<div\n class=\"modal\"\n [class.error]=\"dialogError === true\"\n *ngIf=\"\n dialogOpen ||\n showFieldConfigValidatorsConfigEditor ||\n showFieldConfigPropertiesConfigEditor ||\n showFieldConfigOptionsConfigEditor\n \"\n [@panelInOut]\n>\n <div class=\"modal-box\">\n <div\n class=\"modal-content\"\n *ngIf=\"dialogOpen\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Config Preview\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"convertToMinifiedJson()\">minify</button>\n <button (click)=\"convertToCompleteJson()\">full</button>\n <button (click)=\"downloadJSON()\">download</button>\n <button (click)=\"copyToClipboard()\">copy</button>\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div class=\"json-editor\">\n <code>{{ activeFormConfig | json }}</code>\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigValidatorsConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Validator Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigValidatorsConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigValidatorsConfig | json }}\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigPropertiesConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Properties Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigPropertiesConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigPropertiesConfig | json }}\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigOptionsConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Options Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigOptionsConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigOptionsConfig | json }}\n </div>\n </div>\n </div>\n </div>\n</div>\n<!-- END -->\n\n<!-- Template for rendering different field types -->\n<!-- General Field Template -->\n<ng-template\n #getFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container\n [ngTemplateOutlet]=\"\n isObject(value) ? objectFieldTemplate : notObjectFieldTemplate\n \"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: value,\n fieldKey: key,\n parentPath: path\n }\"\n >\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Object Type Field Template -->\n<ng-template\n #objectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <ng-container *ngFor=\"let item of value | keyvalue\">\n <ng-container\n [ngTemplateOutlet]=\"getFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: item.value,\n fieldKey: item.key,\n parentPath: path === '' ? key : path + '.' + key\n }\"\n >\n </ng-container>\n </ng-container>\n</ng-template>\n\n<!-- Non Object Type Field Template -->\n<ng-template\n #notObjectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container *ngIf=\"isOptions(index, value, key, path)\">\n <ng-container\n [ngTemplateOutlet]=\"optionFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n key: key,\n value: value,\n path: path,\n options: memoizedGetOptions(index, value, key, path)\n }\"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isString(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n textFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isNumber(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n numberFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Options Field Template -->\n<ng-template\n #optionFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n let-options=\"options\"\n>\n <div class=\"field-container options\">\n <select\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n >\n <option\n *ngFor=\"let option of options\"\n [value]=\"option\"\n [selected]=\"option === value\"\n >{{ option }}</option\n >\n </select>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Boolean Field Template -->\n<ng-template\n #booleanFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container checkbox\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.checked }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Text Field Template -->\n<ng-template\n #textFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container text\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"text\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Number Field Template -->\n<ng-template\n #numberFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container number\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"number\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n<!-- END -->\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}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;appearance:auto!important}input[type=checkbox]{appearance:auto!important;width:1rem;height:1rem}select{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}textarea{overflow-wrap:anywhere;resize:none;unicode-bidi:embed;white-space:pre-wrap}button{display:inline-block;padding:8px 12px;background-color:#007bff;color:#fff;text-decoration:none;border-radius:4px;border:none;cursor:pointer}button:hover{background-color:#0069d9}button:active{background-color:#0056b3}button:focus{outline:none}button.secondary{padding:7px 11px;border:1px solid #007bff;background-color:#fff;color:#007bff}button.secondary:hover{background-color:#b7daff}button.secondary:active{background-color:#b7daff}button.secondary:focus{outline:none}.field-container{display:flex}.field-container label{color:gray}.field-container.checkbox{flex-direction:row;align-items:center;justify-content:center;padding:8px 12px;margin:auto}.field-container.options,.field-container.number,.field-container.text{flex-direction:column}.disclaimer{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#121212;width:100%;height:100%}.disclaimer>*:not(:last-child){margin-bottom:1.5rem}.disclaimer .icon{width:3rem;height:3rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.disclaimer.no-form-selected h1{transform:scaleX(-1)}.disclaimer h1{font-size:5rem;font-weight:100}.disclaimer p{font-size:1rem}\n", ":host{all:unset;position:relative;width:100%;height:100%;overflow:auto}.container{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;height:100%;border:1px solid #ccc}.container header{padding:.5rem;display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;border-bottom:1px solid #ccc}.container header .header-form-editor-btns{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.container header .header-form-editor-btns>*:not(:last-child){margin-right:1rem}.container main{padding:.5rem;flex-grow:1;overflow:auto;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;white-space:nowrap;position:relative}.container main>*:not(:last-child){margin-right:1rem}.container main .no-fields{position:absolute;top:0;left:0;background:white}.container main .form-config-no-fields{overflow:auto;width:100%}.container main .form-config-fields{overflow:auto;width:100%}.container main .form-config-fields .add-field-btn-container{width:100%;text-align:center}.container main .validators,.container main .properties{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch}.container main .validators>*:not(:last-child),.container main .properties>*:not(:last-child){margin-bottom:.5rem}.container main .input-checkbox-container{display:flex;flex-direction:row}.container footer{padding:.5rem;display:flex;flex-direction:row;justify-content:flex-end;align-items:stretch;border-top:1px solid lightgray}.container footer>*:not(:last-child){margin-right:1rem}.modal{position:absolute;top:0;background-color:#0000004d;width:100%;height:100%;display:flex;justify-content:center;align-items:center;left:0;flex-direction:row}.modal.error{background-color:#ff00004d}.modal-box{width:75%;height:75%;margin:auto;background-color:#fff;border-radius:1rem;box-shadow:#64646f33 0 7px 29px}.modal-content{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;width:100%;height:100%}.modal-heading{padding:.5rem 1rem;width:100%;display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid lightgray;align-items:center}.modal-title{font-weight:bold;font-size:1rem}.modal-actions{display:flex;flex-direction:row;cursor:pointer}.modal-actions>*:not(:last-child){margin-right:1rem}.modal-body{overflow:auto;flex:1}.modal-body .json-editor{font-family:monospace;white-space:pre-wrap;border:none;padding:0;background-color:#f5f5f5;height:100%;outline:none;overflow:auto}.json-editor{font-family:monospace;white-space:pre-wrap;border:none;padding:0;background-color:#f5f5f5;height:100%;outline:none;overflow:auto}table{width:100%;border-collapse:collapse;margin-bottom:20px}table th,table td{padding:8px;text-align:left;border:1px solid #ccc;vertical-align:top}table th{background-color:#f2f2f2}table tr:nth-child(even){background-color:#f9f9f9}table tr:hover{background-color:#eaeaea}\n"], components: [{ type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "json": i3__namespace$2.JsonPipe, "keyvalue": i3__namespace$2.KeyValuePipe }, animations: [
|
|
2472
2482
|
animations.trigger("panelInOut", [
|
|
2473
2483
|
animations.transition(":enter", [
|
|
2474
2484
|
animations.style({ transform: "translateY(100%)" }),
|
|
@@ -2725,7 +2735,7 @@
|
|
|
2725
2735
|
return KwikIDFormsBuilderComponent;
|
|
2726
2736
|
}());
|
|
2727
2737
|
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsBuilderComponent, deps: [{ token: i2__namespace.KwikUILoaderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2728
|
-
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", inputs: { userConfig: "userConfig" }, ngImport: i0__namespace, template: "<div class=\"container\">\n <kwikid-builder-forms-list\n [activeFormConfig]=\"this.activeFormConfig\"\n [formsList]=\"this.formsList\"\n (getFormsList)=\"this.handleGetFormsList($event)\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n ></kwikid-builder-forms-list>\n <kwikid-builder-form-editor\n [activeFormConfig]=\"activeFormConfig\"\n (onClickSaveActiveFormConfig)=\"\n this.handleOnClickSaveActiveFormConfig($event)\n \"\n ></kwikid-builder-form-editor>\n</div>\n\n<kwikui-loader\n></kwikui-loader>\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}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box
|
|
2738
|
+
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", inputs: { userConfig: "userConfig" }, ngImport: i0__namespace, template: "<div class=\"container\">\n <kwikid-builder-forms-list\n [activeFormConfig]=\"this.activeFormConfig\"\n [formsList]=\"this.formsList\"\n (getFormsList)=\"this.handleGetFormsList($event)\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n ></kwikid-builder-forms-list>\n <kwikid-builder-form-editor\n [activeFormConfig]=\"activeFormConfig\"\n (onClickSaveActiveFormConfig)=\"\n this.handleOnClickSaveActiveFormConfig($event)\n \"\n ></kwikid-builder-form-editor>\n</div>\n\n<kwikui-loader\n></kwikui-loader>\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}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;appearance:auto!important}input[type=checkbox]{appearance:auto!important;width:1rem;height:1rem}select{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}textarea{overflow-wrap:anywhere;resize:none;unicode-bidi:embed;white-space:pre-wrap}button{display:inline-block;padding:8px 12px;background-color:#007bff;color:#fff;text-decoration:none;border-radius:4px;border:none;cursor:pointer}button:hover{background-color:#0069d9}button:active{background-color:#0056b3}button:focus{outline:none}button.secondary{padding:7px 11px;border:1px solid #007bff;background-color:#fff;color:#007bff}button.secondary:hover{background-color:#b7daff}button.secondary:active{background-color:#b7daff}button.secondary:focus{outline:none}.field-container{display:flex}.field-container label{color:gray}.field-container.checkbox{flex-direction:row;align-items:center;justify-content:center;padding:8px 12px;margin:auto}.field-container.options,.field-container.number,.field-container.text{flex-direction:column}.disclaimer{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#121212;width:100%;height:100%}.disclaimer>*:not(:last-child){margin-bottom:1.5rem}.disclaimer .icon{width:3rem;height:3rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.disclaimer.no-form-selected h1{transform:scaleX(-1)}.disclaimer h1{font-size:5rem;font-weight:100}.disclaimer p{font-size:1rem}\n", ":host{all:unset;position:relative;width:100%;height:100%}.container{width:100%;height:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:stretch;padding:1rem}.container>*:not(:last-child){margin-right:1rem}\n"], components: [{ type: KwikIDBuilderFormsListComponent, selector: "kwikid-builder-forms-list", inputs: ["activeFormConfig", "formsList"], outputs: ["onClickSetActiveForm", "getFormsList"] }, { type: KwikIDBuilderFormEditorComponent, selector: "kwikid-builder-form-editor", inputs: ["activeFormConfig"], outputs: ["onClickSaveActiveFormConfig"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }] });
|
|
2729
2739
|
__decorate([
|
|
2730
2740
|
kwikidToolkit.logMethod
|
|
2731
2741
|
], KwikIDFormsBuilderComponent.prototype, "fetchFormConfig", null);
|
|
@@ -2763,6 +2773,12 @@
|
|
|
2763
2773
|
(function (EActionKey) {
|
|
2764
2774
|
EActionKey["SET_VALUE"] = "SET_VALUE";
|
|
2765
2775
|
EActionKey["SET_FIELD_DEFAULT_VALUE"] = "SET_FIELD_DEFAULT_VALUE";
|
|
2776
|
+
EActionKey["SET_API_STATUS"] = "SET_API_STATUS";
|
|
2777
|
+
EActionKey["SET_API_HEADER_VALUE"] = "SET_API_HEADER_VALUE";
|
|
2778
|
+
EActionKey["SET_API_HEADER_VALIDITY"] = "SET_API_HEADER_VALIDITY";
|
|
2779
|
+
EActionKey["SET_API_BODY_VALUE"] = "SET_API_BODY_VALUE";
|
|
2780
|
+
EActionKey["SET_API_BODY_VALIDITY"] = "SET_API_BODY_VALIDITY";
|
|
2781
|
+
EActionKey["SET_FIELD_VALIDITY"] = "SET_FIELD_VALIDITY";
|
|
2766
2782
|
EActionKey["FIELD_MESSAGE_SHOW"] = "FIELD_MESSAGE_SHOW";
|
|
2767
2783
|
EActionKey["FIELD_MESSAGES_HIDE"] = "FIELD_MESSAGES_HIDE";
|
|
2768
2784
|
EActionKey["FIELD_ERROR_SHOW"] = "FIELD_ERROR_SHOW";
|
|
@@ -2936,16 +2952,16 @@
|
|
|
2936
2952
|
});
|
|
2937
2953
|
});
|
|
2938
2954
|
};
|
|
2939
|
-
Defaults.prototype.
|
|
2955
|
+
Defaults.prototype.getFormFieldApiValue = function () {
|
|
2940
2956
|
return __awaiter(this, void 0, void 0, function () {
|
|
2941
|
-
var
|
|
2957
|
+
var apiConfig, rules, actions, rulesMapping, actions_3, actions_3_1, action, conditionEvaluation, actions_4, e_3_1;
|
|
2942
2958
|
var e_3, _a;
|
|
2943
2959
|
return __generator(this, function (_b) {
|
|
2944
2960
|
switch (_b.label) {
|
|
2945
2961
|
case 0:
|
|
2946
|
-
|
|
2947
|
-
rules =
|
|
2948
|
-
actions =
|
|
2962
|
+
apiConfig = this._field.default.api;
|
|
2963
|
+
rules = apiConfig.rules;
|
|
2964
|
+
actions = apiConfig.actions;
|
|
2949
2965
|
rulesMapping = new kwikidToolkit.Rule(rules, {
|
|
2950
2966
|
FIELD_CONFIG: this._field,
|
|
2951
2967
|
FORM_FIELDS: this._formFields,
|
|
@@ -2993,11 +3009,71 @@
|
|
|
2993
3009
|
});
|
|
2994
3010
|
});
|
|
2995
3011
|
};
|
|
3012
|
+
Defaults.prototype.getFormFieldOptions = function () {
|
|
3013
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3014
|
+
var optionsConfig, rules, actions, rulesMapping, actions_5, actions_5_1, action, conditionEvaluation, actions_6, e_4_1;
|
|
3015
|
+
var e_4, _a;
|
|
3016
|
+
return __generator(this, function (_b) {
|
|
3017
|
+
switch (_b.label) {
|
|
3018
|
+
case 0:
|
|
3019
|
+
optionsConfig = this._field.default.options;
|
|
3020
|
+
rules = optionsConfig.rules;
|
|
3021
|
+
actions = optionsConfig.actions;
|
|
3022
|
+
rulesMapping = new kwikidToolkit.Rule(rules, {
|
|
3023
|
+
FIELD_CONFIG: this._field,
|
|
3024
|
+
FORM_FIELDS: this._formFields,
|
|
3025
|
+
FORM_DATA: this._formData,
|
|
3026
|
+
PREVIOUS_FORM_DATA: this._previousFormData,
|
|
3027
|
+
ALL_FORMS_DATA: this._allFormsData
|
|
3028
|
+
}).mapping();
|
|
3029
|
+
_b.label = 1;
|
|
3030
|
+
case 1:
|
|
3031
|
+
_b.trys.push([1, 6, 7, 8]);
|
|
3032
|
+
actions_5 = __values(actions), actions_5_1 = actions_5.next();
|
|
3033
|
+
_b.label = 2;
|
|
3034
|
+
case 2:
|
|
3035
|
+
if (!!actions_5_1.done) return [3 /*break*/, 5];
|
|
3036
|
+
action = actions_5_1.value;
|
|
3037
|
+
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3038
|
+
if (!conditionEvaluation) return [3 /*break*/, 4];
|
|
3039
|
+
actions_6 = new kwikidToolkit.Action(action, rulesMapping, {
|
|
3040
|
+
FIELD_CONFIG: this._field,
|
|
3041
|
+
FORM_FIELDS: this._formFields,
|
|
3042
|
+
FORM_DATA: this._formData,
|
|
3043
|
+
PREVIOUS_FORM_DATA: this._previousFormData,
|
|
3044
|
+
ALL_FORMS_DATA: this._allFormsData
|
|
3045
|
+
}, this._takeAction);
|
|
3046
|
+
return [4 /*yield*/, actions_6.execute()];
|
|
3047
|
+
case 3:
|
|
3048
|
+
_b.sent();
|
|
3049
|
+
_b.label = 4;
|
|
3050
|
+
case 4:
|
|
3051
|
+
actions_5_1 = actions_5.next();
|
|
3052
|
+
return [3 /*break*/, 2];
|
|
3053
|
+
case 5: return [3 /*break*/, 8];
|
|
3054
|
+
case 6:
|
|
3055
|
+
e_4_1 = _b.sent();
|
|
3056
|
+
e_4 = { error: e_4_1 };
|
|
3057
|
+
return [3 /*break*/, 8];
|
|
3058
|
+
case 7:
|
|
3059
|
+
try {
|
|
3060
|
+
if (actions_5_1 && !actions_5_1.done && (_a = actions_5.return)) _a.call(actions_5);
|
|
3061
|
+
}
|
|
3062
|
+
finally { if (e_4) throw e_4.error; }
|
|
3063
|
+
return [7 /*endfinally*/];
|
|
3064
|
+
case 8: return [2 /*return*/];
|
|
3065
|
+
}
|
|
3066
|
+
});
|
|
3067
|
+
});
|
|
3068
|
+
};
|
|
2996
3069
|
return Defaults;
|
|
2997
3070
|
}());
|
|
2998
3071
|
__decorate([
|
|
2999
3072
|
kwikidToolkit.logMethod
|
|
3000
3073
|
], Defaults.prototype, "getFormFieldValue", null);
|
|
3074
|
+
__decorate([
|
|
3075
|
+
kwikidToolkit.logMethod
|
|
3076
|
+
], Defaults.prototype, "getFormFieldApiValue", null);
|
|
3001
3077
|
__decorate([
|
|
3002
3078
|
kwikidToolkit.logMethod
|
|
3003
3079
|
], Defaults.prototype, "getFormFieldOptions", null);
|
|
@@ -3133,13 +3209,13 @@
|
|
|
3133
3209
|
formGroup = new i3.FormGroup({});
|
|
3134
3210
|
_b.label = 1;
|
|
3135
3211
|
case 1:
|
|
3136
|
-
_b.trys.push([1,
|
|
3212
|
+
_b.trys.push([1, 11, 12, 13]);
|
|
3137
3213
|
fields_1 = __values(fields), fields_1_1 = fields_1.next();
|
|
3138
3214
|
_b.label = 2;
|
|
3139
3215
|
case 2:
|
|
3140
|
-
if (!!fields_1_1.done) return [3 /*break*/,
|
|
3216
|
+
if (!!fields_1_1.done) return [3 /*break*/, 10];
|
|
3141
3217
|
field = fields_1_1.value;
|
|
3142
|
-
if (!field.isFormElement) return [3 /*break*/,
|
|
3218
|
+
if (!field.isFormElement) return [3 /*break*/, 9];
|
|
3143
3219
|
defaults = new Defaults(field, fields, allFormsData, formData, previousFormData, takeAction);
|
|
3144
3220
|
value = "";
|
|
3145
3221
|
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 4];
|
|
@@ -3149,33 +3225,45 @@
|
|
|
3149
3225
|
value = _b.sent();
|
|
3150
3226
|
_b.label = 4;
|
|
3151
3227
|
case 4:
|
|
3228
|
+
console.log("sdasgdjsgsadaghas");
|
|
3229
|
+
console.log("sdasgdjsgsadaghas1");
|
|
3152
3230
|
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 6];
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
return [
|
|
3231
|
+
console.log("sdasgdjsgsadaghas2");
|
|
3232
|
+
console.log(kwikidToolkit.getObjectDeepCopy(field));
|
|
3233
|
+
if (!kwikidToolkit.checkObjectKeyExists(field.default, "api")) return [3 /*break*/, 6];
|
|
3234
|
+
console.log("sdasgdjsgsadaghas3");
|
|
3235
|
+
return [4 /*yield*/, defaults.getFormFieldApiValue()];
|
|
3156
3236
|
case 5:
|
|
3157
3237
|
_b.sent();
|
|
3158
3238
|
_b.label = 6;
|
|
3159
3239
|
case 6:
|
|
3240
|
+
if (!kwikidToolkit.checkObjectKeyExists(field, "default")) return [3 /*break*/, 8];
|
|
3241
|
+
if (!kwikidToolkit.checkObjectKeyExists(field.default, "options")) return [3 /*break*/, 8];
|
|
3242
|
+
if (!field.default.options.triggers.includes("ON_INIT")) return [3 /*break*/, 8];
|
|
3243
|
+
return [4 /*yield*/, defaults.getFormFieldOptions()];
|
|
3244
|
+
case 7:
|
|
3245
|
+
_b.sent();
|
|
3246
|
+
_b.label = 8;
|
|
3247
|
+
case 8:
|
|
3160
3248
|
value = convertFormFieldValueToKwikUIFormat(field, value);
|
|
3161
3249
|
validators = new FormValidation().getFormFieldValidators(field);
|
|
3162
3250
|
formGroup.addControl(field.key, new i3.FormControl({ value: value, disabled: field.disabled }, { validators: validators }));
|
|
3163
|
-
_b.label =
|
|
3164
|
-
case
|
|
3251
|
+
_b.label = 9;
|
|
3252
|
+
case 9:
|
|
3165
3253
|
fields_1_1 = fields_1.next();
|
|
3166
3254
|
return [3 /*break*/, 2];
|
|
3167
|
-
case
|
|
3168
|
-
case
|
|
3255
|
+
case 10: return [3 /*break*/, 13];
|
|
3256
|
+
case 11:
|
|
3169
3257
|
e_1_1 = _b.sent();
|
|
3170
3258
|
e_1 = { error: e_1_1 };
|
|
3171
|
-
return [3 /*break*/,
|
|
3172
|
-
case
|
|
3259
|
+
return [3 /*break*/, 13];
|
|
3260
|
+
case 12:
|
|
3173
3261
|
try {
|
|
3174
3262
|
if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);
|
|
3175
3263
|
}
|
|
3176
3264
|
finally { if (e_1) throw e_1.error; }
|
|
3177
3265
|
return [7 /*endfinally*/];
|
|
3178
|
-
case
|
|
3266
|
+
case 13: return [2 /*return*/, formGroup];
|
|
3179
3267
|
}
|
|
3180
3268
|
});
|
|
3181
3269
|
});
|
|
@@ -3206,54 +3294,54 @@
|
|
|
3206
3294
|
Apis.prototype.setUrl = function () {
|
|
3207
3295
|
return __awaiter(this, void 0, void 0, function () {
|
|
3208
3296
|
var source, url;
|
|
3209
|
-
return __generator(this, function (
|
|
3210
|
-
switch (
|
|
3297
|
+
return __generator(this, function (_l) {
|
|
3298
|
+
switch (_l.label) {
|
|
3211
3299
|
case 0:
|
|
3212
3300
|
if (!(this._request.url.hasOwnProperty("type") &&
|
|
3213
3301
|
this._request.url.type === EApiRequestUrlType.CALCULATED)) return [3 /*break*/, 2];
|
|
3214
3302
|
source = new kwikidToolkit.Source(this._object);
|
|
3215
3303
|
return [4 /*yield*/, source.getValueFromSource(this._request.url.props.value.source)];
|
|
3216
3304
|
case 1:
|
|
3217
|
-
url =
|
|
3305
|
+
url = _l.sent();
|
|
3218
3306
|
this._request.url = kwikidToolkit.setValueToObjectPath(this._request.url, "value", url);
|
|
3219
3307
|
return [3 /*break*/, 3];
|
|
3220
3308
|
case 2:
|
|
3221
3309
|
if (typeof this._request.url === "string") {
|
|
3222
3310
|
this._request.url = kwikidToolkit.setValueToObjectPath({}, "value", this._request.url);
|
|
3223
3311
|
}
|
|
3224
|
-
|
|
3312
|
+
_l.label = 3;
|
|
3225
3313
|
case 3: return [2 /*return*/, this._object.API_CONFIG];
|
|
3226
3314
|
}
|
|
3227
3315
|
});
|
|
3228
3316
|
});
|
|
3229
3317
|
};
|
|
3230
3318
|
Apis.prototype.setRequestBody = function () {
|
|
3231
|
-
var _a, _b, _c, _d;
|
|
3319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3232
3320
|
return __awaiter(this, void 0, void 0, function () {
|
|
3233
|
-
var params, paramIndex, params_1, params_1_1, param, sources, sourceIndex, sources_1, sources_1_1, source, sources_2, value, validation, triggers, rules, actions, rulesMapping, actions_1, actions_1_1, action, conditionEvaluation,
|
|
3234
|
-
var e_3,
|
|
3235
|
-
return __generator(this, function (
|
|
3236
|
-
switch (
|
|
3321
|
+
var params, paramIndex, params_1, params_1_1, param, sources, sourceIndex, sources_1, sources_1_1, source, sources_2, value, validation, triggers, rules, actions, rulesMapping, actions_1, actions_1_1, action, conditionEvaluation, actions_3, e_1_1, e_2_1, e_3_1, triggers, rules, actions, rulesMapping, actions_2, actions_2_1, action, conditionEvaluation, actions_4, e_4_1;
|
|
3322
|
+
var e_3, _l, e_2, _m, e_1, _o, e_4, _p;
|
|
3323
|
+
return __generator(this, function (_q) {
|
|
3324
|
+
switch (_q.label) {
|
|
3237
3325
|
case 0:
|
|
3238
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/,
|
|
3326
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/, 34];
|
|
3239
3327
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.body, "params")) return [3 /*break*/, 23];
|
|
3240
3328
|
params = this._request.body.params;
|
|
3241
3329
|
paramIndex = 0;
|
|
3242
|
-
|
|
3330
|
+
_q.label = 1;
|
|
3243
3331
|
case 1:
|
|
3244
|
-
|
|
3332
|
+
_q.trys.push([1, 20, 21, 22]);
|
|
3245
3333
|
params_1 = __values(params), params_1_1 = params_1.next();
|
|
3246
|
-
|
|
3334
|
+
_q.label = 2;
|
|
3247
3335
|
case 2:
|
|
3248
3336
|
if (!!params_1_1.done) return [3 /*break*/, 19];
|
|
3249
3337
|
param = params_1_1.value;
|
|
3250
3338
|
sources = param.sources;
|
|
3251
3339
|
sourceIndex = 0;
|
|
3252
|
-
|
|
3340
|
+
_q.label = 3;
|
|
3253
3341
|
case 3:
|
|
3254
|
-
|
|
3342
|
+
_q.trys.push([3, 15, 16, 17]);
|
|
3255
3343
|
sources_1 = (e_2 = void 0, __values(sources)), sources_1_1 = sources_1.next();
|
|
3256
|
-
|
|
3344
|
+
_q.label = 4;
|
|
3257
3345
|
case 4:
|
|
3258
3346
|
if (!!sources_1_1.done) return [3 /*break*/, 14];
|
|
3259
3347
|
source = sources_1_1.value;
|
|
@@ -3266,87 +3354,124 @@
|
|
|
3266
3354
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3267
3355
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3268
3356
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3269
|
-
|
|
3357
|
+
_q.label = 5;
|
|
3270
3358
|
case 5:
|
|
3271
|
-
|
|
3359
|
+
_q.trys.push([5, 10, 11, 12]);
|
|
3272
3360
|
actions_1 = (e_1 = void 0, __values(actions)), actions_1_1 = actions_1.next();
|
|
3273
|
-
|
|
3361
|
+
_q.label = 6;
|
|
3274
3362
|
case 6:
|
|
3275
3363
|
if (!!actions_1_1.done) return [3 /*break*/, 9];
|
|
3276
3364
|
action = actions_1_1.value;
|
|
3277
3365
|
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3278
3366
|
if (!conditionEvaluation) return [3 /*break*/, 8];
|
|
3279
|
-
|
|
3280
|
-
return [4 /*yield*/,
|
|
3367
|
+
actions_3 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3368
|
+
return [4 /*yield*/, actions_3.execute()];
|
|
3281
3369
|
case 7:
|
|
3282
|
-
|
|
3283
|
-
|
|
3370
|
+
_q.sent();
|
|
3371
|
+
_q.label = 8;
|
|
3284
3372
|
case 8:
|
|
3285
3373
|
actions_1_1 = actions_1.next();
|
|
3286
3374
|
return [3 /*break*/, 6];
|
|
3287
3375
|
case 9: return [3 /*break*/, 12];
|
|
3288
3376
|
case 10:
|
|
3289
|
-
e_1_1 =
|
|
3377
|
+
e_1_1 = _q.sent();
|
|
3290
3378
|
e_1 = { error: e_1_1 };
|
|
3291
3379
|
return [3 /*break*/, 12];
|
|
3292
3380
|
case 11:
|
|
3293
3381
|
try {
|
|
3294
|
-
if (actions_1_1 && !actions_1_1.done && (
|
|
3382
|
+
if (actions_1_1 && !actions_1_1.done && (_o = actions_1.return)) _o.call(actions_1);
|
|
3295
3383
|
}
|
|
3296
3384
|
finally { if (e_1) throw e_1.error; }
|
|
3297
3385
|
return [7 /*endfinally*/];
|
|
3298
3386
|
case 12:
|
|
3299
3387
|
sourceIndex++;
|
|
3300
|
-
|
|
3388
|
+
_q.label = 13;
|
|
3301
3389
|
case 13:
|
|
3302
3390
|
sources_1_1 = sources_1.next();
|
|
3303
3391
|
return [3 /*break*/, 4];
|
|
3304
3392
|
case 14: return [3 /*break*/, 17];
|
|
3305
3393
|
case 15:
|
|
3306
|
-
e_2_1 =
|
|
3394
|
+
e_2_1 = _q.sent();
|
|
3307
3395
|
e_2 = { error: e_2_1 };
|
|
3308
3396
|
return [3 /*break*/, 17];
|
|
3309
3397
|
case 16:
|
|
3310
3398
|
try {
|
|
3311
|
-
if (sources_1_1 && !sources_1_1.done && (
|
|
3399
|
+
if (sources_1_1 && !sources_1_1.done && (_m = sources_1.return)) _m.call(sources_1);
|
|
3312
3400
|
}
|
|
3313
3401
|
finally { if (e_2) throw e_2.error; }
|
|
3314
3402
|
return [7 /*endfinally*/];
|
|
3315
3403
|
case 17:
|
|
3316
3404
|
paramIndex++;
|
|
3317
|
-
|
|
3405
|
+
_q.label = 18;
|
|
3318
3406
|
case 18:
|
|
3319
3407
|
params_1_1 = params_1.next();
|
|
3320
3408
|
return [3 /*break*/, 2];
|
|
3321
3409
|
case 19: return [3 /*break*/, 22];
|
|
3322
3410
|
case 20:
|
|
3323
|
-
e_3_1 =
|
|
3411
|
+
e_3_1 = _q.sent();
|
|
3324
3412
|
e_3 = { error: e_3_1 };
|
|
3325
3413
|
return [3 /*break*/, 22];
|
|
3326
3414
|
case 21:
|
|
3327
3415
|
try {
|
|
3328
|
-
if (params_1_1 && !params_1_1.done && (
|
|
3416
|
+
if (params_1_1 && !params_1_1.done && (_l = params_1.return)) _l.call(params_1);
|
|
3329
3417
|
}
|
|
3330
3418
|
finally { if (e_3) throw e_3.error; }
|
|
3331
3419
|
return [7 /*endfinally*/];
|
|
3332
3420
|
case 22: return [2 /*return*/, this._object.API_CONFIG];
|
|
3333
|
-
case 23:
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3421
|
+
case 23:
|
|
3422
|
+
if (!(kwikidToolkit.checkObjectKeyExists(this._request.body, "rules") &&
|
|
3423
|
+
kwikidToolkit.checkObjectKeyExists(this._request.body, "actions"))) return [3 /*break*/, 32];
|
|
3424
|
+
triggers = (_f = (_e = this._request.body) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3425
|
+
rules = (_h = (_g = this._request.body) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3426
|
+
actions = (_k = (_j = this._request.body) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3427
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3428
|
+
_q.label = 24;
|
|
3429
|
+
case 24:
|
|
3430
|
+
_q.trys.push([24, 29, 30, 31]);
|
|
3431
|
+
actions_2 = __values(actions), actions_2_1 = actions_2.next();
|
|
3432
|
+
_q.label = 25;
|
|
3433
|
+
case 25:
|
|
3434
|
+
if (!!actions_2_1.done) return [3 /*break*/, 28];
|
|
3435
|
+
action = actions_2_1.value;
|
|
3436
|
+
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3437
|
+
if (!conditionEvaluation) return [3 /*break*/, 27];
|
|
3438
|
+
actions_4 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3439
|
+
return [4 /*yield*/, actions_4.execute()];
|
|
3440
|
+
case 26:
|
|
3441
|
+
_q.sent();
|
|
3442
|
+
_q.label = 27;
|
|
3443
|
+
case 27:
|
|
3444
|
+
actions_2_1 = actions_2.next();
|
|
3445
|
+
return [3 /*break*/, 25];
|
|
3446
|
+
case 28: return [3 /*break*/, 31];
|
|
3447
|
+
case 29:
|
|
3448
|
+
e_4_1 = _q.sent();
|
|
3449
|
+
e_4 = { error: e_4_1 };
|
|
3450
|
+
return [3 /*break*/, 31];
|
|
3451
|
+
case 30:
|
|
3452
|
+
try {
|
|
3453
|
+
if (actions_2_1 && !actions_2_1.done && (_p = actions_2.return)) _p.call(actions_2);
|
|
3454
|
+
}
|
|
3455
|
+
finally { if (e_4) throw e_4.error; }
|
|
3456
|
+
return [7 /*endfinally*/];
|
|
3457
|
+
case 31: return [2 /*return*/, this._object.API_CONFIG];
|
|
3458
|
+
case 32: return [2 /*return*/, this._object.API_CONFIG];
|
|
3459
|
+
case 33: return [3 /*break*/, 35];
|
|
3460
|
+
case 34: return [2 /*return*/, this._object.API_CONFIG];
|
|
3461
|
+
case 35: return [2 /*return*/];
|
|
3337
3462
|
}
|
|
3338
3463
|
});
|
|
3339
3464
|
});
|
|
3340
3465
|
};
|
|
3341
3466
|
Apis.prototype.validateRequestBody = function () {
|
|
3342
|
-
var _a, _b, _c, _d;
|
|
3467
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3343
3468
|
return __awaiter(this, void 0, void 0, function () {
|
|
3344
|
-
var body, validation, triggers, rules, actions, rulesMapping,
|
|
3345
|
-
var
|
|
3346
|
-
return __generator(this, function (
|
|
3347
|
-
switch (
|
|
3469
|
+
var body, validation, triggers, rules, actions, rulesMapping, actions_5, actions_5_1, action, conditionSuccess, actions_7, e_5_1, triggers, rules, actions, rulesMapping, actions_6, actions_6_1, action, conditionSuccess, actions_8, e_6_1;
|
|
3470
|
+
var e_5, _l, e_6, _m;
|
|
3471
|
+
return __generator(this, function (_o) {
|
|
3472
|
+
switch (_o.label) {
|
|
3348
3473
|
case 0:
|
|
3349
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/,
|
|
3474
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "body")) return [3 /*break*/, 20];
|
|
3350
3475
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.body, "validation")) return [3 /*break*/, 9];
|
|
3351
3476
|
body = this._request.body;
|
|
3352
3477
|
validation = body.validation;
|
|
@@ -3354,75 +3479,112 @@
|
|
|
3354
3479
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3355
3480
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3356
3481
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3357
|
-
|
|
3482
|
+
_o.label = 1;
|
|
3358
3483
|
case 1:
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3484
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
3485
|
+
actions_5 = __values(actions), actions_5_1 = actions_5.next();
|
|
3486
|
+
_o.label = 2;
|
|
3362
3487
|
case 2:
|
|
3363
|
-
if (!!
|
|
3364
|
-
action =
|
|
3488
|
+
if (!!actions_5_1.done) return [3 /*break*/, 5];
|
|
3489
|
+
action = actions_5_1.value;
|
|
3365
3490
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3366
3491
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3367
|
-
|
|
3368
|
-
return [4 /*yield*/,
|
|
3492
|
+
actions_7 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3493
|
+
return [4 /*yield*/, actions_7.execute()];
|
|
3369
3494
|
case 3:
|
|
3370
|
-
|
|
3371
|
-
|
|
3495
|
+
_o.sent();
|
|
3496
|
+
_o.label = 4;
|
|
3372
3497
|
case 4:
|
|
3373
|
-
|
|
3498
|
+
actions_5_1 = actions_5.next();
|
|
3374
3499
|
return [3 /*break*/, 2];
|
|
3375
3500
|
case 5: return [3 /*break*/, 8];
|
|
3376
3501
|
case 6:
|
|
3377
|
-
|
|
3378
|
-
|
|
3502
|
+
e_5_1 = _o.sent();
|
|
3503
|
+
e_5 = { error: e_5_1 };
|
|
3379
3504
|
return [3 /*break*/, 8];
|
|
3380
3505
|
case 7:
|
|
3381
3506
|
try {
|
|
3382
|
-
if (
|
|
3507
|
+
if (actions_5_1 && !actions_5_1.done && (_l = actions_5.return)) _l.call(actions_5);
|
|
3383
3508
|
}
|
|
3384
|
-
finally { if (
|
|
3509
|
+
finally { if (e_5) throw e_5.error; }
|
|
3385
3510
|
return [7 /*endfinally*/];
|
|
3386
3511
|
case 8: return [2 /*return*/, this._object.API_CONFIG];
|
|
3387
3512
|
case 9:
|
|
3513
|
+
if (!(kwikidToolkit.checkObjectPathExists(this._request.body, "rules") &&
|
|
3514
|
+
kwikidToolkit.checkObjectPathExists(this._request.body, "actions"))) return [3 /*break*/, 18];
|
|
3515
|
+
triggers = (_f = (_e = this._request.body) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3516
|
+
rules = (_h = (_g = this._request.body) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3517
|
+
actions = (_k = (_j = this._request.body) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3518
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3519
|
+
_o.label = 10;
|
|
3520
|
+
case 10:
|
|
3521
|
+
_o.trys.push([10, 15, 16, 17]);
|
|
3522
|
+
actions_6 = __values(actions), actions_6_1 = actions_6.next();
|
|
3523
|
+
_o.label = 11;
|
|
3524
|
+
case 11:
|
|
3525
|
+
if (!!actions_6_1.done) return [3 /*break*/, 14];
|
|
3526
|
+
action = actions_6_1.value;
|
|
3527
|
+
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3528
|
+
if (!conditionSuccess) return [3 /*break*/, 13];
|
|
3529
|
+
actions_8 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3530
|
+
return [4 /*yield*/, actions_8.execute()];
|
|
3531
|
+
case 12:
|
|
3532
|
+
_o.sent();
|
|
3533
|
+
_o.label = 13;
|
|
3534
|
+
case 13:
|
|
3535
|
+
actions_6_1 = actions_6.next();
|
|
3536
|
+
return [3 /*break*/, 11];
|
|
3537
|
+
case 14: return [3 /*break*/, 17];
|
|
3538
|
+
case 15:
|
|
3539
|
+
e_6_1 = _o.sent();
|
|
3540
|
+
e_6 = { error: e_6_1 };
|
|
3541
|
+
return [3 /*break*/, 17];
|
|
3542
|
+
case 16:
|
|
3543
|
+
try {
|
|
3544
|
+
if (actions_6_1 && !actions_6_1.done && (_m = actions_6.return)) _m.call(actions_6);
|
|
3545
|
+
}
|
|
3546
|
+
finally { if (e_6) throw e_6.error; }
|
|
3547
|
+
return [7 /*endfinally*/];
|
|
3548
|
+
case 17: return [2 /*return*/, this._object.API_CONFIG];
|
|
3549
|
+
case 18:
|
|
3388
3550
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.body.is_valid", true);
|
|
3389
3551
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3390
|
-
case
|
|
3391
|
-
case
|
|
3552
|
+
case 19: return [3 /*break*/, 21];
|
|
3553
|
+
case 20:
|
|
3392
3554
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.body.is_valid", true);
|
|
3393
3555
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3394
|
-
case
|
|
3556
|
+
case 21: return [2 /*return*/];
|
|
3395
3557
|
}
|
|
3396
3558
|
});
|
|
3397
3559
|
});
|
|
3398
3560
|
};
|
|
3399
3561
|
Apis.prototype.setRequestHeaders = function () {
|
|
3400
|
-
var _a, _b, _c, _d;
|
|
3562
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3401
3563
|
return __awaiter(this, void 0, void 0, function () {
|
|
3402
|
-
var params, paramIndex, params_2, params_2_1, param, sources, sourceIndex, sources_3, sources_3_1, source, sources_4, value, validation, triggers, rules, actions, rulesMapping,
|
|
3403
|
-
var
|
|
3404
|
-
return __generator(this, function (
|
|
3405
|
-
switch (
|
|
3564
|
+
var params, paramIndex, params_2, params_2_1, param, sources, sourceIndex, sources_3, sources_3_1, source, sources_4, value, validation, triggers, rules, actions, rulesMapping, actions_9, actions_9_1, action, conditionEvaluation, actions_11, e_7_1, e_8_1, e_9_1, triggers, rules, actions, rulesMapping, actions_10, actions_10_1, action, conditionEvaluation, actions_12, e_10_1;
|
|
3565
|
+
var e_9, _l, e_8, _m, e_7, _o, e_10, _p;
|
|
3566
|
+
return __generator(this, function (_q) {
|
|
3567
|
+
switch (_q.label) {
|
|
3406
3568
|
case 0:
|
|
3407
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/,
|
|
3569
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/, 34];
|
|
3408
3570
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.headers, "params")) return [3 /*break*/, 23];
|
|
3409
3571
|
params = this._request.headers.params;
|
|
3410
3572
|
paramIndex = 0;
|
|
3411
|
-
|
|
3573
|
+
_q.label = 1;
|
|
3412
3574
|
case 1:
|
|
3413
|
-
|
|
3575
|
+
_q.trys.push([1, 20, 21, 22]);
|
|
3414
3576
|
params_2 = __values(params), params_2_1 = params_2.next();
|
|
3415
|
-
|
|
3577
|
+
_q.label = 2;
|
|
3416
3578
|
case 2:
|
|
3417
3579
|
if (!!params_2_1.done) return [3 /*break*/, 19];
|
|
3418
3580
|
param = params_2_1.value;
|
|
3419
3581
|
sources = param.sources;
|
|
3420
3582
|
sourceIndex = 0;
|
|
3421
|
-
|
|
3583
|
+
_q.label = 3;
|
|
3422
3584
|
case 3:
|
|
3423
|
-
|
|
3424
|
-
sources_3 = (
|
|
3425
|
-
|
|
3585
|
+
_q.trys.push([3, 15, 16, 17]);
|
|
3586
|
+
sources_3 = (e_8 = void 0, __values(sources)), sources_3_1 = sources_3.next();
|
|
3587
|
+
_q.label = 4;
|
|
3426
3588
|
case 4:
|
|
3427
3589
|
if (!!sources_3_1.done) return [3 /*break*/, 14];
|
|
3428
3590
|
source = sources_3_1.value;
|
|
@@ -3435,180 +3597,291 @@
|
|
|
3435
3597
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3436
3598
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3437
3599
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3438
|
-
|
|
3600
|
+
_q.label = 5;
|
|
3439
3601
|
case 5:
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3602
|
+
_q.trys.push([5, 10, 11, 12]);
|
|
3603
|
+
actions_9 = (e_7 = void 0, __values(actions)), actions_9_1 = actions_9.next();
|
|
3604
|
+
_q.label = 6;
|
|
3443
3605
|
case 6:
|
|
3444
|
-
if (!!
|
|
3445
|
-
action =
|
|
3606
|
+
if (!!actions_9_1.done) return [3 /*break*/, 9];
|
|
3607
|
+
action = actions_9_1.value;
|
|
3446
3608
|
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3447
3609
|
if (!conditionEvaluation) return [3 /*break*/, 8];
|
|
3448
|
-
|
|
3449
|
-
return [4 /*yield*/,
|
|
3610
|
+
actions_11 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3611
|
+
return [4 /*yield*/, actions_11.execute()];
|
|
3450
3612
|
case 7:
|
|
3451
|
-
|
|
3452
|
-
|
|
3613
|
+
_q.sent();
|
|
3614
|
+
_q.label = 8;
|
|
3453
3615
|
case 8:
|
|
3454
|
-
|
|
3616
|
+
actions_9_1 = actions_9.next();
|
|
3455
3617
|
return [3 /*break*/, 6];
|
|
3456
3618
|
case 9: return [3 /*break*/, 12];
|
|
3457
3619
|
case 10:
|
|
3458
|
-
|
|
3459
|
-
|
|
3620
|
+
e_7_1 = _q.sent();
|
|
3621
|
+
e_7 = { error: e_7_1 };
|
|
3460
3622
|
return [3 /*break*/, 12];
|
|
3461
3623
|
case 11:
|
|
3462
3624
|
try {
|
|
3463
|
-
if (
|
|
3625
|
+
if (actions_9_1 && !actions_9_1.done && (_o = actions_9.return)) _o.call(actions_9);
|
|
3464
3626
|
}
|
|
3465
|
-
finally { if (
|
|
3627
|
+
finally { if (e_7) throw e_7.error; }
|
|
3466
3628
|
return [7 /*endfinally*/];
|
|
3467
3629
|
case 12:
|
|
3468
3630
|
sourceIndex++;
|
|
3469
|
-
|
|
3631
|
+
_q.label = 13;
|
|
3470
3632
|
case 13:
|
|
3471
3633
|
sources_3_1 = sources_3.next();
|
|
3472
3634
|
return [3 /*break*/, 4];
|
|
3473
3635
|
case 14: return [3 /*break*/, 17];
|
|
3474
3636
|
case 15:
|
|
3475
|
-
|
|
3476
|
-
|
|
3637
|
+
e_8_1 = _q.sent();
|
|
3638
|
+
e_8 = { error: e_8_1 };
|
|
3477
3639
|
return [3 /*break*/, 17];
|
|
3478
3640
|
case 16:
|
|
3479
3641
|
try {
|
|
3480
|
-
if (sources_3_1 && !sources_3_1.done && (
|
|
3642
|
+
if (sources_3_1 && !sources_3_1.done && (_m = sources_3.return)) _m.call(sources_3);
|
|
3481
3643
|
}
|
|
3482
|
-
finally { if (
|
|
3644
|
+
finally { if (e_8) throw e_8.error; }
|
|
3483
3645
|
return [7 /*endfinally*/];
|
|
3484
3646
|
case 17:
|
|
3485
3647
|
paramIndex++;
|
|
3486
|
-
|
|
3648
|
+
_q.label = 18;
|
|
3487
3649
|
case 18:
|
|
3488
3650
|
params_2_1 = params_2.next();
|
|
3489
3651
|
return [3 /*break*/, 2];
|
|
3490
3652
|
case 19: return [3 /*break*/, 22];
|
|
3491
3653
|
case 20:
|
|
3492
|
-
|
|
3493
|
-
|
|
3654
|
+
e_9_1 = _q.sent();
|
|
3655
|
+
e_9 = { error: e_9_1 };
|
|
3494
3656
|
return [3 /*break*/, 22];
|
|
3495
3657
|
case 21:
|
|
3496
3658
|
try {
|
|
3497
|
-
if (params_2_1 && !params_2_1.done && (
|
|
3659
|
+
if (params_2_1 && !params_2_1.done && (_l = params_2.return)) _l.call(params_2);
|
|
3498
3660
|
}
|
|
3499
|
-
finally { if (
|
|
3661
|
+
finally { if (e_9) throw e_9.error; }
|
|
3500
3662
|
return [7 /*endfinally*/];
|
|
3501
3663
|
case 22: return [2 /*return*/, this._object.API_CONFIG];
|
|
3502
|
-
case 23:
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3664
|
+
case 23:
|
|
3665
|
+
if (!(kwikidToolkit.checkObjectKeyExists(this._request.headers, "rules") &&
|
|
3666
|
+
kwikidToolkit.checkObjectKeyExists(this._request.headers, "actions"))) return [3 /*break*/, 32];
|
|
3667
|
+
triggers = (_f = (_e = this._request.headers) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3668
|
+
rules = (_h = (_g = this._request.headers) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3669
|
+
actions = (_k = (_j = this._request.headers) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3670
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3671
|
+
_q.label = 24;
|
|
3672
|
+
case 24:
|
|
3673
|
+
_q.trys.push([24, 29, 30, 31]);
|
|
3674
|
+
actions_10 = __values(actions), actions_10_1 = actions_10.next();
|
|
3675
|
+
_q.label = 25;
|
|
3676
|
+
case 25:
|
|
3677
|
+
if (!!actions_10_1.done) return [3 /*break*/, 28];
|
|
3678
|
+
action = actions_10_1.value;
|
|
3679
|
+
conditionEvaluation = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3680
|
+
if (!conditionEvaluation) return [3 /*break*/, 27];
|
|
3681
|
+
actions_12 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3682
|
+
return [4 /*yield*/, actions_12.execute()];
|
|
3683
|
+
case 26:
|
|
3684
|
+
_q.sent();
|
|
3685
|
+
_q.label = 27;
|
|
3686
|
+
case 27:
|
|
3687
|
+
actions_10_1 = actions_10.next();
|
|
3688
|
+
return [3 /*break*/, 25];
|
|
3689
|
+
case 28: return [3 /*break*/, 31];
|
|
3690
|
+
case 29:
|
|
3691
|
+
e_10_1 = _q.sent();
|
|
3692
|
+
e_10 = { error: e_10_1 };
|
|
3693
|
+
return [3 /*break*/, 31];
|
|
3694
|
+
case 30:
|
|
3695
|
+
try {
|
|
3696
|
+
if (actions_10_1 && !actions_10_1.done && (_p = actions_10.return)) _p.call(actions_10);
|
|
3697
|
+
}
|
|
3698
|
+
finally { if (e_10) throw e_10.error; }
|
|
3699
|
+
return [7 /*endfinally*/];
|
|
3700
|
+
case 31: return [2 /*return*/, this._object.API_CONFIG];
|
|
3701
|
+
case 32: return [2 /*return*/, this._object.API_CONFIG];
|
|
3702
|
+
case 33: return [3 /*break*/, 35];
|
|
3703
|
+
case 34: return [2 /*return*/, this._object.API_CONFIG];
|
|
3704
|
+
case 35: return [2 /*return*/];
|
|
3506
3705
|
}
|
|
3507
3706
|
});
|
|
3508
3707
|
});
|
|
3509
3708
|
};
|
|
3510
3709
|
Apis.prototype.validateRequestHeaders = function () {
|
|
3511
|
-
var _a, _b, _c, _d;
|
|
3710
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3512
3711
|
return __awaiter(this, void 0, void 0, function () {
|
|
3513
|
-
var headers, validation, triggers, rules, actions, rulesMapping,
|
|
3514
|
-
var
|
|
3515
|
-
return __generator(this, function (
|
|
3516
|
-
switch (
|
|
3712
|
+
var headers, validation, triggers, rules, actions, rulesMapping, actions_13, actions_13_1, action, conditionSuccess, actions_15, e_11_1, triggers, rules, actions, rulesMapping, actions_14, actions_14_1, action, conditionSuccess, actions_16, e_12_1;
|
|
3713
|
+
var e_11, _l, e_12, _m;
|
|
3714
|
+
return __generator(this, function (_o) {
|
|
3715
|
+
switch (_o.label) {
|
|
3517
3716
|
case 0:
|
|
3518
3717
|
headers = this._request.headers;
|
|
3519
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/,
|
|
3718
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/, 20];
|
|
3520
3719
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.headers, "validation")) return [3 /*break*/, 9];
|
|
3521
3720
|
validation = headers.validation;
|
|
3522
3721
|
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3523
3722
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3524
3723
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3525
3724
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3526
|
-
|
|
3725
|
+
_o.label = 1;
|
|
3527
3726
|
case 1:
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3727
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
3728
|
+
actions_13 = __values(actions), actions_13_1 = actions_13.next();
|
|
3729
|
+
_o.label = 2;
|
|
3531
3730
|
case 2:
|
|
3532
|
-
if (!!
|
|
3533
|
-
action =
|
|
3731
|
+
if (!!actions_13_1.done) return [3 /*break*/, 5];
|
|
3732
|
+
action = actions_13_1.value;
|
|
3534
3733
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3535
3734
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3536
|
-
|
|
3537
|
-
return [4 /*yield*/,
|
|
3735
|
+
actions_15 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3736
|
+
return [4 /*yield*/, actions_15.execute()];
|
|
3538
3737
|
case 3:
|
|
3539
|
-
|
|
3540
|
-
|
|
3738
|
+
_o.sent();
|
|
3739
|
+
_o.label = 4;
|
|
3541
3740
|
case 4:
|
|
3542
|
-
|
|
3741
|
+
actions_13_1 = actions_13.next();
|
|
3543
3742
|
return [3 /*break*/, 2];
|
|
3544
3743
|
case 5: return [3 /*break*/, 8];
|
|
3545
3744
|
case 6:
|
|
3546
|
-
|
|
3547
|
-
|
|
3745
|
+
e_11_1 = _o.sent();
|
|
3746
|
+
e_11 = { error: e_11_1 };
|
|
3548
3747
|
return [3 /*break*/, 8];
|
|
3549
3748
|
case 7:
|
|
3550
3749
|
try {
|
|
3551
|
-
if (
|
|
3750
|
+
if (actions_13_1 && !actions_13_1.done && (_l = actions_13.return)) _l.call(actions_13);
|
|
3552
3751
|
}
|
|
3553
|
-
finally { if (
|
|
3752
|
+
finally { if (e_11) throw e_11.error; }
|
|
3554
3753
|
return [7 /*endfinally*/];
|
|
3555
3754
|
case 8: return [2 /*return*/, this._object.API_CONFIG];
|
|
3556
3755
|
case 9:
|
|
3756
|
+
if (!(kwikidToolkit.checkObjectPathExists(this._request.headers, "rules") &&
|
|
3757
|
+
kwikidToolkit.checkObjectPathExists(this._request.headers, "actions"))) return [3 /*break*/, 18];
|
|
3758
|
+
triggers = (_e = headers === null || headers === void 0 ? void 0 : headers.triggers) !== null && _e !== void 0 ? _e : [];
|
|
3759
|
+
rules = (_f = headers === null || headers === void 0 ? void 0 : headers.rules) !== null && _f !== void 0 ? _f : [];
|
|
3760
|
+
actions = (_h = (_g = headers) === null || _g === void 0 ? void 0 : _g.actions) !== null && _h !== void 0 ? _h : [];
|
|
3761
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3762
|
+
_o.label = 10;
|
|
3763
|
+
case 10:
|
|
3764
|
+
_o.trys.push([10, 15, 16, 17]);
|
|
3765
|
+
actions_14 = __values(actions), actions_14_1 = actions_14.next();
|
|
3766
|
+
_o.label = 11;
|
|
3767
|
+
case 11:
|
|
3768
|
+
if (!!actions_14_1.done) return [3 /*break*/, 14];
|
|
3769
|
+
action = actions_14_1.value;
|
|
3770
|
+
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3771
|
+
if (!conditionSuccess) return [3 /*break*/, 13];
|
|
3772
|
+
actions_16 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3773
|
+
return [4 /*yield*/, actions_16.execute()];
|
|
3774
|
+
case 12:
|
|
3775
|
+
_o.sent();
|
|
3776
|
+
_o.label = 13;
|
|
3777
|
+
case 13:
|
|
3778
|
+
actions_14_1 = actions_14.next();
|
|
3779
|
+
return [3 /*break*/, 11];
|
|
3780
|
+
case 14: return [3 /*break*/, 17];
|
|
3781
|
+
case 15:
|
|
3782
|
+
e_12_1 = _o.sent();
|
|
3783
|
+
e_12 = { error: e_12_1 };
|
|
3784
|
+
return [3 /*break*/, 17];
|
|
3785
|
+
case 16:
|
|
3786
|
+
try {
|
|
3787
|
+
if (actions_14_1 && !actions_14_1.done && (_m = actions_14.return)) _m.call(actions_14);
|
|
3788
|
+
}
|
|
3789
|
+
finally { if (e_12) throw e_12.error; }
|
|
3790
|
+
return [7 /*endfinally*/];
|
|
3791
|
+
case 17: return [2 /*return*/, this._object.API_CONFIG];
|
|
3792
|
+
case 18:
|
|
3557
3793
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.headers.is_valid", true);
|
|
3558
3794
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3559
|
-
case
|
|
3560
|
-
case
|
|
3795
|
+
case 19: return [3 /*break*/, 21];
|
|
3796
|
+
case 20:
|
|
3561
3797
|
this._object = kwikidToolkit.setValueToObjectPath(this._object, "API_CONFIG.request.validation.headers.is_valid", true);
|
|
3562
3798
|
return [2 /*return*/, this._object.API_CONFIG];
|
|
3563
|
-
case
|
|
3799
|
+
case 21: return [2 /*return*/];
|
|
3564
3800
|
}
|
|
3565
3801
|
});
|
|
3566
3802
|
});
|
|
3567
3803
|
};
|
|
3568
3804
|
Apis.prototype.validateResponse = function () {
|
|
3569
|
-
var _a, _b, _c, _d;
|
|
3805
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3570
3806
|
return __awaiter(this, void 0, void 0, function () {
|
|
3571
|
-
var validation, triggers, rules, actions, rulesMapping,
|
|
3572
|
-
var
|
|
3573
|
-
return __generator(this, function (
|
|
3574
|
-
switch (
|
|
3807
|
+
var validation, triggers, rules, actions, rulesMapping, actions_17, actions_17_1, action, conditionSuccess, actions_19, e_13_1, triggers, rules, actions, rulesMapping, actions_18, actions_18_1, action, conditionSuccess, actions_20, e_14_1;
|
|
3808
|
+
var e_13, _l, e_14, _m;
|
|
3809
|
+
return __generator(this, function (_o) {
|
|
3810
|
+
switch (_o.label) {
|
|
3575
3811
|
case 0:
|
|
3576
|
-
if (!kwikidToolkit.checkObjectKeyExists(this._response, "validation")) return [3 /*break*/,
|
|
3812
|
+
if (!kwikidToolkit.checkObjectKeyExists(this._response, "validation")) return [3 /*break*/, 9];
|
|
3577
3813
|
validation = this._response.validation;
|
|
3578
3814
|
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3579
3815
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3580
3816
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3581
3817
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3582
|
-
|
|
3818
|
+
_o.label = 1;
|
|
3583
3819
|
case 1:
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3820
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
3821
|
+
actions_17 = __values(actions), actions_17_1 = actions_17.next();
|
|
3822
|
+
_o.label = 2;
|
|
3587
3823
|
case 2:
|
|
3588
|
-
if (!!
|
|
3589
|
-
action =
|
|
3824
|
+
if (!!actions_17_1.done) return [3 /*break*/, 5];
|
|
3825
|
+
action = actions_17_1.value;
|
|
3590
3826
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3591
3827
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3592
|
-
|
|
3593
|
-
return [4 /*yield*/,
|
|
3828
|
+
actions_19 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3829
|
+
return [4 /*yield*/, actions_19.execute()];
|
|
3594
3830
|
case 3:
|
|
3595
|
-
|
|
3596
|
-
|
|
3831
|
+
_o.sent();
|
|
3832
|
+
_o.label = 4;
|
|
3597
3833
|
case 4:
|
|
3598
|
-
|
|
3834
|
+
actions_17_1 = actions_17.next();
|
|
3599
3835
|
return [3 /*break*/, 2];
|
|
3600
3836
|
case 5: return [3 /*break*/, 8];
|
|
3601
3837
|
case 6:
|
|
3602
|
-
|
|
3603
|
-
|
|
3838
|
+
e_13_1 = _o.sent();
|
|
3839
|
+
e_13 = { error: e_13_1 };
|
|
3604
3840
|
return [3 /*break*/, 8];
|
|
3605
3841
|
case 7:
|
|
3606
3842
|
try {
|
|
3607
|
-
if (
|
|
3843
|
+
if (actions_17_1 && !actions_17_1.done && (_l = actions_17.return)) _l.call(actions_17);
|
|
3608
3844
|
}
|
|
3609
|
-
finally { if (
|
|
3845
|
+
finally { if (e_13) throw e_13.error; }
|
|
3610
3846
|
return [7 /*endfinally*/];
|
|
3611
|
-
case 8: return [
|
|
3847
|
+
case 8: return [3 /*break*/, 17];
|
|
3848
|
+
case 9:
|
|
3849
|
+
if (!(kwikidToolkit.checkObjectKeyExists(this._response, "rules") &&
|
|
3850
|
+
kwikidToolkit.checkObjectKeyExists(this._response, "actions"))) return [3 /*break*/, 17];
|
|
3851
|
+
triggers = (_f = (_e = this._response) === null || _e === void 0 ? void 0 : _e.triggers) !== null && _f !== void 0 ? _f : [];
|
|
3852
|
+
rules = (_h = (_g = this._response) === null || _g === void 0 ? void 0 : _g.rules) !== null && _h !== void 0 ? _h : [];
|
|
3853
|
+
actions = (_k = (_j = this._response) === null || _j === void 0 ? void 0 : _j.actions) !== null && _k !== void 0 ? _k : [];
|
|
3854
|
+
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3855
|
+
_o.label = 10;
|
|
3856
|
+
case 10:
|
|
3857
|
+
_o.trys.push([10, 15, 16, 17]);
|
|
3858
|
+
actions_18 = __values(actions), actions_18_1 = actions_18.next();
|
|
3859
|
+
_o.label = 11;
|
|
3860
|
+
case 11:
|
|
3861
|
+
if (!!actions_18_1.done) return [3 /*break*/, 14];
|
|
3862
|
+
action = actions_18_1.value;
|
|
3863
|
+
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3864
|
+
if (!conditionSuccess) return [3 /*break*/, 13];
|
|
3865
|
+
actions_20 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3866
|
+
return [4 /*yield*/, actions_20.execute()];
|
|
3867
|
+
case 12:
|
|
3868
|
+
_o.sent();
|
|
3869
|
+
_o.label = 13;
|
|
3870
|
+
case 13:
|
|
3871
|
+
actions_18_1 = actions_18.next();
|
|
3872
|
+
return [3 /*break*/, 11];
|
|
3873
|
+
case 14: return [3 /*break*/, 17];
|
|
3874
|
+
case 15:
|
|
3875
|
+
e_14_1 = _o.sent();
|
|
3876
|
+
e_14 = { error: e_14_1 };
|
|
3877
|
+
return [3 /*break*/, 17];
|
|
3878
|
+
case 16:
|
|
3879
|
+
try {
|
|
3880
|
+
if (actions_18_1 && !actions_18_1.done && (_m = actions_18.return)) _m.call(actions_18);
|
|
3881
|
+
}
|
|
3882
|
+
finally { if (e_14) throw e_14.error; }
|
|
3883
|
+
return [7 /*endfinally*/];
|
|
3884
|
+
case 17: return [2 /*return*/, this._object.API_CONFIG];
|
|
3612
3885
|
}
|
|
3613
3886
|
});
|
|
3614
3887
|
});
|
|
@@ -3616,43 +3889,43 @@
|
|
|
3616
3889
|
Apis.prototype.callNextApi = function (validation) {
|
|
3617
3890
|
var _a, _b, _c, _d;
|
|
3618
3891
|
return __awaiter(this, void 0, void 0, function () {
|
|
3619
|
-
var triggers, rules, actions, rulesMapping,
|
|
3620
|
-
var
|
|
3621
|
-
return __generator(this, function (
|
|
3622
|
-
switch (
|
|
3892
|
+
var triggers, rules, actions, rulesMapping, actions_21, actions_21_1, action, conditionSuccess, actions_22, e_15_1;
|
|
3893
|
+
var e_15, _l;
|
|
3894
|
+
return __generator(this, function (_m) {
|
|
3895
|
+
switch (_m.label) {
|
|
3623
3896
|
case 0:
|
|
3624
3897
|
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3625
3898
|
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3626
3899
|
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
3627
3900
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
3628
|
-
|
|
3901
|
+
_m.label = 1;
|
|
3629
3902
|
case 1:
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3903
|
+
_m.trys.push([1, 6, 7, 8]);
|
|
3904
|
+
actions_21 = __values(actions), actions_21_1 = actions_21.next();
|
|
3905
|
+
_m.label = 2;
|
|
3633
3906
|
case 2:
|
|
3634
|
-
if (!!
|
|
3635
|
-
action =
|
|
3907
|
+
if (!!actions_21_1.done) return [3 /*break*/, 5];
|
|
3908
|
+
action = actions_21_1.value;
|
|
3636
3909
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
3637
3910
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
3638
|
-
|
|
3639
|
-
return [4 /*yield*/,
|
|
3911
|
+
actions_22 = new kwikidToolkit.Action(action, rulesMapping, this._object, this._takeAction);
|
|
3912
|
+
return [4 /*yield*/, actions_22.execute()];
|
|
3640
3913
|
case 3:
|
|
3641
|
-
|
|
3642
|
-
|
|
3914
|
+
_m.sent();
|
|
3915
|
+
_m.label = 4;
|
|
3643
3916
|
case 4:
|
|
3644
|
-
|
|
3917
|
+
actions_21_1 = actions_21.next();
|
|
3645
3918
|
return [3 /*break*/, 2];
|
|
3646
3919
|
case 5: return [3 /*break*/, 8];
|
|
3647
3920
|
case 6:
|
|
3648
|
-
|
|
3649
|
-
|
|
3921
|
+
e_15_1 = _m.sent();
|
|
3922
|
+
e_15 = { error: e_15_1 };
|
|
3650
3923
|
return [3 /*break*/, 8];
|
|
3651
3924
|
case 7:
|
|
3652
3925
|
try {
|
|
3653
|
-
if (
|
|
3926
|
+
if (actions_21_1 && !actions_21_1.done && (_l = actions_21.return)) _l.call(actions_21);
|
|
3654
3927
|
}
|
|
3655
|
-
finally { if (
|
|
3928
|
+
finally { if (e_15) throw e_15.error; }
|
|
3656
3929
|
return [7 /*endfinally*/];
|
|
3657
3930
|
case 8: return [2 /*return*/];
|
|
3658
3931
|
}
|
|
@@ -4610,9 +4883,22 @@
|
|
|
4610
4883
|
this.showApiLoader();
|
|
4611
4884
|
this.cameraCaptureImage = "";
|
|
4612
4885
|
setTimeout(function () {
|
|
4613
|
-
var _a, _b, _c;
|
|
4614
|
-
|
|
4615
|
-
|
|
4886
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4887
|
+
/**
|
|
4888
|
+
* Priority of Image to Set for Config Based
|
|
4889
|
+
* 1. Masked
|
|
4890
|
+
* 2. Cropped
|
|
4891
|
+
* 3. Original
|
|
4892
|
+
*
|
|
4893
|
+
* If no masked or cropped image is available then directly set Original Image
|
|
4894
|
+
*/
|
|
4895
|
+
var field = getFormFieldByKey(_this.formFields, _this.cameraCaptureFieldKey);
|
|
4896
|
+
var image = ((_a = field.properties) === null || _a === void 0 ? void 0 : _a.isMaskedImage)
|
|
4897
|
+
? (_b = e === null || e === void 0 ? void 0 : e.maskedImage) !== null && _b !== void 0 ? _b : e === null || e === void 0 ? void 0 : e.originalImage
|
|
4898
|
+
: ((_c = field.properties) === null || _c === void 0 ? void 0 : _c.isCroppedImage)
|
|
4899
|
+
? (_d = e === null || e === void 0 ? void 0 : e.croppedImage) !== null && _d !== void 0 ? _d : e === null || e === void 0 ? void 0 : e.originalImage
|
|
4900
|
+
: e === null || e === void 0 ? void 0 : e.originalImage;
|
|
4901
|
+
var isShowImagePreview = (_g = (_f = (_e = _this.cameraCaptureConfig) === null || _e === void 0 ? void 0 : _e.others) === null || _f === void 0 ? void 0 : _f.preview) === null || _g === void 0 ? void 0 : _g.show;
|
|
4616
4902
|
if (isShowImagePreview) {
|
|
4617
4903
|
_this.cameraCaptureImage = image;
|
|
4618
4904
|
}
|
|
@@ -5054,8 +5340,16 @@
|
|
|
5054
5340
|
});
|
|
5055
5341
|
};
|
|
5056
5342
|
KwikIDFormViewComponent.prototype.isValidRequestHeadersAndBody = function (api) {
|
|
5057
|
-
|
|
5058
|
-
|
|
5343
|
+
var _a, _b;
|
|
5344
|
+
var bodyValidation = ((_a = api.request.body) === null || _a === void 0 ? void 0 : _a.validation) ||
|
|
5345
|
+
api.request.body;
|
|
5346
|
+
var headersValidation = ((_b = api.request.headers) === null || _b === void 0 ? void 0 : _b.validation) ||
|
|
5347
|
+
api.request.headers;
|
|
5348
|
+
if (!bodyValidation && !headersValidation) {
|
|
5349
|
+
return false;
|
|
5350
|
+
}
|
|
5351
|
+
return (((bodyValidation === null || bodyValidation === void 0 ? void 0 : bodyValidation.is_valid) || false) &&
|
|
5352
|
+
((headersValidation === null || headersValidation === void 0 ? void 0 : headersValidation.is_valid) || false));
|
|
5059
5353
|
};
|
|
5060
5354
|
KwikIDFormViewComponent.prototype.showApiLoader = function () {
|
|
5061
5355
|
this.loaderService.show({
|
|
@@ -5611,6 +5905,143 @@
|
|
|
5611
5905
|
});
|
|
5612
5906
|
});
|
|
5613
5907
|
};
|
|
5908
|
+
KwikIDFormViewComponent.prototype.setApiStatus = function (action, object) {
|
|
5909
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5910
|
+
var source, sourceValue;
|
|
5911
|
+
return __generator(this, function (_h) {
|
|
5912
|
+
source = new kwikidToolkit.Source(object);
|
|
5913
|
+
sourceValue = action.props.status;
|
|
5914
|
+
source.setValueToSource({
|
|
5915
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5916
|
+
props: {
|
|
5917
|
+
object: {
|
|
5918
|
+
key: "FIELD_CONFIG",
|
|
5919
|
+
path: "api.status.value"
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5922
|
+
}, sourceValue);
|
|
5923
|
+
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
5924
|
+
console.log("PRINT0", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5925
|
+
return [2 /*return*/];
|
|
5926
|
+
});
|
|
5927
|
+
});
|
|
5928
|
+
};
|
|
5929
|
+
KwikIDFormViewComponent.prototype.setApiHeaderValue = function (action, object) {
|
|
5930
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5931
|
+
var source, sourceValue;
|
|
5932
|
+
return __generator(this, function (_h) {
|
|
5933
|
+
switch (_h.label) {
|
|
5934
|
+
case 0:
|
|
5935
|
+
source = new kwikidToolkit.Source(object);
|
|
5936
|
+
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
5937
|
+
case 1:
|
|
5938
|
+
sourceValue = _h.sent();
|
|
5939
|
+
source.setValueToSource({
|
|
5940
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5941
|
+
props: {
|
|
5942
|
+
object: {
|
|
5943
|
+
key: "API_CONFIG",
|
|
5944
|
+
path: "request.headers.value." + action.props.key
|
|
5945
|
+
}
|
|
5946
|
+
}
|
|
5947
|
+
}, sourceValue);
|
|
5948
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
5949
|
+
console.log("PRINT1", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5950
|
+
return [2 /*return*/];
|
|
5951
|
+
}
|
|
5952
|
+
});
|
|
5953
|
+
});
|
|
5954
|
+
};
|
|
5955
|
+
KwikIDFormViewComponent.prototype.setApiHeaderValidity = function (action, object) {
|
|
5956
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5957
|
+
var source, sourceValue;
|
|
5958
|
+
return __generator(this, function (_h) {
|
|
5959
|
+
source = new kwikidToolkit.Source(object);
|
|
5960
|
+
sourceValue = action.props.valid;
|
|
5961
|
+
source.setValueToSource({
|
|
5962
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5963
|
+
props: {
|
|
5964
|
+
object: {
|
|
5965
|
+
key: "API_CONFIG",
|
|
5966
|
+
path: "request.headers.is_valid"
|
|
5967
|
+
}
|
|
5968
|
+
}
|
|
5969
|
+
}, sourceValue);
|
|
5970
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
5971
|
+
console.log("PRINT2", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5972
|
+
return [2 /*return*/];
|
|
5973
|
+
});
|
|
5974
|
+
});
|
|
5975
|
+
};
|
|
5976
|
+
KwikIDFormViewComponent.prototype.setApiBodyValue = function (action, object) {
|
|
5977
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5978
|
+
var source, sourceValue;
|
|
5979
|
+
return __generator(this, function (_h) {
|
|
5980
|
+
switch (_h.label) {
|
|
5981
|
+
case 0:
|
|
5982
|
+
source = new kwikidToolkit.Source(object);
|
|
5983
|
+
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
5984
|
+
case 1:
|
|
5985
|
+
sourceValue = _h.sent();
|
|
5986
|
+
source.setValueToSource({
|
|
5987
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
5988
|
+
props: {
|
|
5989
|
+
object: {
|
|
5990
|
+
key: "API_CONFIG",
|
|
5991
|
+
path: "request.body.value." + action.props.key
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5994
|
+
}, sourceValue);
|
|
5995
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
5996
|
+
console.log("PRINT3", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
5997
|
+
return [2 /*return*/];
|
|
5998
|
+
}
|
|
5999
|
+
});
|
|
6000
|
+
});
|
|
6001
|
+
};
|
|
6002
|
+
KwikIDFormViewComponent.prototype.setApiBodyValidity = function (action, object) {
|
|
6003
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6004
|
+
var source, sourceValue;
|
|
6005
|
+
return __generator(this, function (_h) {
|
|
6006
|
+
source = new kwikidToolkit.Source(object);
|
|
6007
|
+
sourceValue = action.props.valid;
|
|
6008
|
+
source.setValueToSource({
|
|
6009
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6010
|
+
props: {
|
|
6011
|
+
object: {
|
|
6012
|
+
key: "API_CONFIG",
|
|
6013
|
+
path: "request.body.is_valid"
|
|
6014
|
+
}
|
|
6015
|
+
}
|
|
6016
|
+
}, sourceValue);
|
|
6017
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
6018
|
+
console.log("PRINT4", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
6019
|
+
return [2 /*return*/];
|
|
6020
|
+
});
|
|
6021
|
+
});
|
|
6022
|
+
};
|
|
6023
|
+
KwikIDFormViewComponent.prototype.setFieldValidity = function (action, object) {
|
|
6024
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6025
|
+
var source, sourceValue;
|
|
6026
|
+
return __generator(this, function (_h) {
|
|
6027
|
+
source = new kwikidToolkit.Source(object);
|
|
6028
|
+
console.log(kwikidToolkit.getObjectDeepCopy(object));
|
|
6029
|
+
sourceValue = action.props.valid;
|
|
6030
|
+
source.setValueToSource({
|
|
6031
|
+
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6032
|
+
props: {
|
|
6033
|
+
object: {
|
|
6034
|
+
key: "FIELD_CONFIG",
|
|
6035
|
+
path: "validation.is_valid"
|
|
6036
|
+
}
|
|
6037
|
+
}
|
|
6038
|
+
}, sourceValue);
|
|
6039
|
+
object.API_CONFIG = source.object.API_CONFIG;
|
|
6040
|
+
console.log("PRINT5", kwikidToolkit.getObjectDeepCopy(source), sourceValue);
|
|
6041
|
+
return [2 /*return*/];
|
|
6042
|
+
});
|
|
6043
|
+
});
|
|
6044
|
+
};
|
|
5614
6045
|
KwikIDFormViewComponent.prototype.setDropdownOptions = function (action, object) {
|
|
5615
6046
|
return __awaiter(this, void 0, void 0, function () {
|
|
5616
6047
|
var source, sourceValue, appendToPath, appendToPathStr, optionsPath;
|
|
@@ -6015,44 +6446,50 @@
|
|
|
6015
6446
|
case EActionKey.FIELD_MESSAGES_HIDE: return [3 /*break*/, 13];
|
|
6016
6447
|
case EActionKey.SET_VALUE: return [3 /*break*/, 14];
|
|
6017
6448
|
case EActionKey.SET_FIELD_DEFAULT_VALUE: return [3 /*break*/, 16];
|
|
6018
|
-
case EActionKey.
|
|
6019
|
-
case EActionKey.
|
|
6020
|
-
case EActionKey.
|
|
6021
|
-
case EActionKey.
|
|
6022
|
-
case EActionKey.
|
|
6023
|
-
case EActionKey.
|
|
6024
|
-
case EActionKey.
|
|
6025
|
-
case EActionKey.
|
|
6026
|
-
case EActionKey.
|
|
6027
|
-
case EActionKey.
|
|
6028
|
-
case EActionKey.
|
|
6029
|
-
case EActionKey.
|
|
6030
|
-
case EActionKey.
|
|
6031
|
-
case EActionKey.
|
|
6032
|
-
case EActionKey.
|
|
6033
|
-
case EActionKey.
|
|
6034
|
-
case EActionKey.
|
|
6035
|
-
case EActionKey.
|
|
6036
|
-
case EActionKey.
|
|
6037
|
-
case EActionKey.
|
|
6038
|
-
case EActionKey.
|
|
6449
|
+
case EActionKey.SET_API_STATUS: return [3 /*break*/, 18];
|
|
6450
|
+
case EActionKey.SET_API_HEADER_VALUE: return [3 /*break*/, 20];
|
|
6451
|
+
case EActionKey.SET_API_HEADER_VALIDITY: return [3 /*break*/, 22];
|
|
6452
|
+
case EActionKey.SET_API_BODY_VALUE: return [3 /*break*/, 24];
|
|
6453
|
+
case EActionKey.SET_API_BODY_VALIDITY: return [3 /*break*/, 26];
|
|
6454
|
+
case EActionKey.SET_DROPDOWN_OPTIONS: return [3 /*break*/, 28];
|
|
6455
|
+
case EActionKey.SET_FIELD_VALIDITY: return [3 /*break*/, 30];
|
|
6456
|
+
case EActionKey.HANDLE_CONNECTED_ELEMENTS: return [3 /*break*/, 32];
|
|
6457
|
+
case EActionKey.API_CALL: return [3 /*break*/, 33];
|
|
6458
|
+
case EActionKey.API_CALL_MULTIPLE: return [3 /*break*/, 35];
|
|
6459
|
+
case EActionKey.API_CALL_MULTIPLE_END: return [3 /*break*/, 37];
|
|
6460
|
+
case EActionKey.TASK_API_CALL: return [3 /*break*/, 39];
|
|
6461
|
+
case EActionKey.TASK_API_CALL_MULTIPLE: return [3 /*break*/, 41];
|
|
6462
|
+
case EActionKey.TASK_API_CALL_MULTIPLE_END: return [3 /*break*/, 43];
|
|
6463
|
+
case EActionKey.REDIRECT_TO_URL: return [3 /*break*/, 45];
|
|
6464
|
+
case EActionKey.PREVIEW_DIALOG_SHOW: return [3 /*break*/, 48];
|
|
6465
|
+
case EActionKey.PREVIEW_ERROR_SHOW: return [3 /*break*/, 49];
|
|
6466
|
+
case EActionKey.POPUP_FORM_SHOW: return [3 /*break*/, 52];
|
|
6467
|
+
case EActionKey.STOP_WAITING: return [3 /*break*/, 53];
|
|
6468
|
+
case EActionKey.NOTIFICATION_ERROR_SHOW: return [3 /*break*/, 54];
|
|
6469
|
+
case EActionKey.NOTIFICATION_ERROR_HIDE: return [3 /*break*/, 55];
|
|
6470
|
+
case EActionKey.RESUME_TASK_EXECUTION: return [3 /*break*/, 56];
|
|
6471
|
+
case EActionKey.STOP_TASK_EXECUTION: return [3 /*break*/, 57];
|
|
6472
|
+
case EActionKey.DIALOG_SHOW: return [3 /*break*/, 58];
|
|
6473
|
+
case EActionKey.DIALOG_HIDE: return [3 /*break*/, 59];
|
|
6474
|
+
case EActionKey.SAVE_FORM: return [3 /*break*/, 60];
|
|
6475
|
+
case EActionKey.ALERT_SHOW: return [3 /*break*/, 61];
|
|
6039
6476
|
}
|
|
6040
|
-
return [3 /*break*/,
|
|
6477
|
+
return [3 /*break*/, 62];
|
|
6041
6478
|
case 1:
|
|
6042
6479
|
this.fieldHide(action.props.fieldKey);
|
|
6043
|
-
return [3 /*break*/,
|
|
6480
|
+
return [3 /*break*/, 63];
|
|
6044
6481
|
case 2:
|
|
6045
6482
|
this.fieldShow(action.props.fieldKey);
|
|
6046
|
-
return [3 /*break*/,
|
|
6483
|
+
return [3 /*break*/, 63];
|
|
6047
6484
|
case 3:
|
|
6048
6485
|
this.fieldDisable(action.props.fieldKey);
|
|
6049
|
-
return [3 /*break*/,
|
|
6486
|
+
return [3 /*break*/, 63];
|
|
6050
6487
|
case 4:
|
|
6051
6488
|
this.fieldEnable(action.props.fieldKey);
|
|
6052
|
-
return [3 /*break*/,
|
|
6489
|
+
return [3 /*break*/, 63];
|
|
6053
6490
|
case 5:
|
|
6054
6491
|
this.fieldReset(action.props.fieldKey);
|
|
6055
|
-
return [3 /*break*/,
|
|
6492
|
+
return [3 /*break*/, 63];
|
|
6056
6493
|
case 6:
|
|
6057
6494
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 8];
|
|
6058
6495
|
fieldErrorShow_Source = new kwikidToolkit.Source(object);
|
|
@@ -6070,7 +6507,7 @@
|
|
|
6070
6507
|
_j.label = 8;
|
|
6071
6508
|
case 8:
|
|
6072
6509
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
6073
|
-
return [3 /*break*/,
|
|
6510
|
+
return [3 /*break*/, 63];
|
|
6074
6511
|
case 9:
|
|
6075
6512
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 11];
|
|
6076
6513
|
fieldErrorHide_Source = new kwikidToolkit.Source(object);
|
|
@@ -6088,74 +6525,98 @@
|
|
|
6088
6525
|
_j.label = 11;
|
|
6089
6526
|
case 11:
|
|
6090
6527
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
6091
|
-
return [3 /*break*/,
|
|
6528
|
+
return [3 /*break*/, 63];
|
|
6092
6529
|
case 12:
|
|
6093
6530
|
this.fieldMessageShow(action.props.fieldKey, action.props.message);
|
|
6094
|
-
return [3 /*break*/,
|
|
6531
|
+
return [3 /*break*/, 63];
|
|
6095
6532
|
case 13:
|
|
6096
6533
|
this.fieldMessageHide(action.props.fieldKey, action.props.message);
|
|
6097
|
-
return [3 /*break*/,
|
|
6534
|
+
return [3 /*break*/, 63];
|
|
6098
6535
|
case 14: return [4 /*yield*/, this.setValue(action, object)];
|
|
6099
6536
|
case 15:
|
|
6100
6537
|
_j.sent();
|
|
6101
|
-
return [3 /*break*/,
|
|
6538
|
+
return [3 /*break*/, 63];
|
|
6102
6539
|
case 16: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
6103
6540
|
case 17:
|
|
6104
6541
|
_j.sent();
|
|
6105
|
-
return [3 /*break*/,
|
|
6106
|
-
case 18: return [4 /*yield*/, this.
|
|
6542
|
+
return [3 /*break*/, 63];
|
|
6543
|
+
case 18: return [4 /*yield*/, this.setApiStatus(action, object)];
|
|
6107
6544
|
case 19:
|
|
6108
6545
|
_j.sent();
|
|
6109
|
-
return [3 /*break*/,
|
|
6110
|
-
case 20:
|
|
6111
|
-
|
|
6112
|
-
return [3 /*break*/, 51];
|
|
6113
|
-
case 21: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
6114
|
-
case 22:
|
|
6546
|
+
return [3 /*break*/, 63];
|
|
6547
|
+
case 20: return [4 /*yield*/, this.setApiHeaderValue(action, object)];
|
|
6548
|
+
case 21:
|
|
6115
6549
|
_j.sent();
|
|
6116
|
-
return [3 /*break*/,
|
|
6117
|
-
case
|
|
6118
|
-
case
|
|
6550
|
+
return [3 /*break*/, 63];
|
|
6551
|
+
case 22: return [4 /*yield*/, this.setApiHeaderValidity(action, object)];
|
|
6552
|
+
case 23:
|
|
6119
6553
|
_j.sent();
|
|
6120
|
-
return [3 /*break*/,
|
|
6121
|
-
case
|
|
6122
|
-
case
|
|
6554
|
+
return [3 /*break*/, 63];
|
|
6555
|
+
case 24: return [4 /*yield*/, this.setApiBodyValue(action, object)];
|
|
6556
|
+
case 25:
|
|
6123
6557
|
_j.sent();
|
|
6124
|
-
return [3 /*break*/,
|
|
6125
|
-
case
|
|
6126
|
-
case
|
|
6558
|
+
return [3 /*break*/, 63];
|
|
6559
|
+
case 26: return [4 /*yield*/, this.setApiBodyValidity(action, object)];
|
|
6560
|
+
case 27:
|
|
6127
6561
|
_j.sent();
|
|
6128
|
-
return [3 /*break*/,
|
|
6129
|
-
case
|
|
6130
|
-
case
|
|
6562
|
+
return [3 /*break*/, 63];
|
|
6563
|
+
case 28: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
6564
|
+
case 29:
|
|
6565
|
+
_j.sent();
|
|
6566
|
+
return [3 /*break*/, 63];
|
|
6567
|
+
case 30: return [4 /*yield*/, this.setFieldValidity(action, object)];
|
|
6568
|
+
case 31:
|
|
6131
6569
|
_j.sent();
|
|
6132
|
-
return [3 /*break*/,
|
|
6133
|
-
case 31: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
6570
|
+
return [3 /*break*/, 63];
|
|
6134
6571
|
case 32:
|
|
6572
|
+
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
6573
|
+
return [3 /*break*/, 63];
|
|
6574
|
+
case 33: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
6575
|
+
case 34:
|
|
6576
|
+
_j.sent();
|
|
6577
|
+
return [3 /*break*/, 63];
|
|
6578
|
+
case 35: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
6579
|
+
case 36:
|
|
6135
6580
|
_j.sent();
|
|
6136
|
-
return [3 /*break*/,
|
|
6137
|
-
case
|
|
6138
|
-
|
|
6581
|
+
return [3 /*break*/, 63];
|
|
6582
|
+
case 37: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
6583
|
+
case 38:
|
|
6584
|
+
_j.sent();
|
|
6585
|
+
return [3 /*break*/, 63];
|
|
6586
|
+
case 39: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
6587
|
+
case 40:
|
|
6588
|
+
_j.sent();
|
|
6589
|
+
return [3 /*break*/, 63];
|
|
6590
|
+
case 41: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
6591
|
+
case 42:
|
|
6592
|
+
_j.sent();
|
|
6593
|
+
return [3 /*break*/, 63];
|
|
6594
|
+
case 43: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
6595
|
+
case 44:
|
|
6596
|
+
_j.sent();
|
|
6597
|
+
return [3 /*break*/, 63];
|
|
6598
|
+
case 45:
|
|
6599
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.url, "source")) return [3 /*break*/, 47];
|
|
6139
6600
|
redirectToUrl_Source = new kwikidToolkit.Source(object);
|
|
6140
6601
|
return [4 /*yield*/, redirectToUrl_Source.getValueFromSource(action.props.url.source)];
|
|
6141
|
-
case
|
|
6602
|
+
case 46:
|
|
6142
6603
|
redirectToUrlSourceValue = _j.sent();
|
|
6143
6604
|
if (kwikidToolkit.isEmptyString(redirectToUrlSourceValue)) {
|
|
6144
6605
|
redirectToUrlSourceValue = "";
|
|
6145
6606
|
}
|
|
6146
6607
|
action = kwikidToolkit.setValueToObjectPath(action, "props.url.url", redirectToUrlSourceValue);
|
|
6147
|
-
_j.label =
|
|
6148
|
-
case
|
|
6608
|
+
_j.label = 47;
|
|
6609
|
+
case 47:
|
|
6149
6610
|
this.redirectToUrl(action);
|
|
6150
|
-
_j.label =
|
|
6151
|
-
case
|
|
6611
|
+
_j.label = 48;
|
|
6612
|
+
case 48:
|
|
6152
6613
|
this.showPreview(action.props);
|
|
6153
|
-
return [3 /*break*/,
|
|
6154
|
-
case
|
|
6155
|
-
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/,
|
|
6614
|
+
return [3 /*break*/, 63];
|
|
6615
|
+
case 49:
|
|
6616
|
+
if (!kwikidToolkit.checkObjectKeyExists(action.props.message, "source")) return [3 /*break*/, 51];
|
|
6156
6617
|
previewErrorShow_Source = new kwikidToolkit.Source(object);
|
|
6157
6618
|
return [4 /*yield*/, previewErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
6158
|
-
case
|
|
6619
|
+
case 50:
|
|
6159
6620
|
previewErrorShowSourceValue = _j.sent();
|
|
6160
6621
|
if (typeof previewErrorShowSourceValue == "string" ||
|
|
6161
6622
|
typeof previewErrorShowSourceValue == "number") {
|
|
@@ -6165,47 +6626,47 @@
|
|
|
6165
6626
|
previewErrorShowSourceValue = "";
|
|
6166
6627
|
}
|
|
6167
6628
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", previewErrorShowSourceValue);
|
|
6168
|
-
_j.label =
|
|
6169
|
-
case
|
|
6629
|
+
_j.label = 51;
|
|
6630
|
+
case 51:
|
|
6170
6631
|
this.showErrorPreview(action.props);
|
|
6171
|
-
return [3 /*break*/,
|
|
6172
|
-
case
|
|
6632
|
+
return [3 /*break*/, 63];
|
|
6633
|
+
case 52:
|
|
6173
6634
|
this.showPopupForm(action.props.popupFormKey, (_b = (_a = action.props) === null || _a === void 0 ? void 0 : _a.popupType) !== null && _b !== void 0 ? _b : "DIALOG");
|
|
6174
|
-
return [3 /*break*/,
|
|
6175
|
-
case
|
|
6635
|
+
return [3 /*break*/, 63];
|
|
6636
|
+
case 53:
|
|
6176
6637
|
this.waitingForChanges = false;
|
|
6177
|
-
return [3 /*break*/,
|
|
6178
|
-
case
|
|
6638
|
+
return [3 /*break*/, 63];
|
|
6639
|
+
case 54:
|
|
6179
6640
|
this.toggleErrorNotification(true);
|
|
6180
|
-
return [3 /*break*/,
|
|
6181
|
-
case
|
|
6641
|
+
return [3 /*break*/, 63];
|
|
6642
|
+
case 55:
|
|
6182
6643
|
this.toggleErrorNotification(false);
|
|
6183
|
-
return [3 /*break*/,
|
|
6184
|
-
case
|
|
6644
|
+
return [3 /*break*/, 63];
|
|
6645
|
+
case 56:
|
|
6185
6646
|
this.stopTaskExecution = false;
|
|
6186
|
-
return [3 /*break*/,
|
|
6187
|
-
case
|
|
6647
|
+
return [3 /*break*/, 63];
|
|
6648
|
+
case 57:
|
|
6188
6649
|
this.stopTaskExecution = true;
|
|
6189
|
-
return [3 /*break*/,
|
|
6190
|
-
case
|
|
6650
|
+
return [3 /*break*/, 63];
|
|
6651
|
+
case 58:
|
|
6191
6652
|
this.dialogShow({
|
|
6192
6653
|
html: (_c = action.props) === null || _c === void 0 ? void 0 : _c.html,
|
|
6193
6654
|
label: (_d = action.props) === null || _d === void 0 ? void 0 : _d.label,
|
|
6194
6655
|
size: (_e = action.props) === null || _e === void 0 ? void 0 : _e.size,
|
|
6195
6656
|
button: (_f = action.props) === null || _f === void 0 ? void 0 : _f.button
|
|
6196
6657
|
});
|
|
6197
|
-
return [3 /*break*/,
|
|
6198
|
-
case
|
|
6658
|
+
return [3 /*break*/, 63];
|
|
6659
|
+
case 59:
|
|
6199
6660
|
this.dialogHide();
|
|
6200
|
-
return [3 /*break*/,
|
|
6201
|
-
case
|
|
6661
|
+
return [3 /*break*/, 63];
|
|
6662
|
+
case 60:
|
|
6202
6663
|
this.handleOnClickSaveForm(undefined);
|
|
6203
|
-
return [3 /*break*/,
|
|
6204
|
-
case
|
|
6664
|
+
return [3 /*break*/, 63];
|
|
6665
|
+
case 61:
|
|
6205
6666
|
this.alertShow(action.props.type, action.props.message);
|
|
6206
|
-
return [3 /*break*/,
|
|
6207
|
-
case
|
|
6208
|
-
case
|
|
6667
|
+
return [3 /*break*/, 63];
|
|
6668
|
+
case 62: return [3 /*break*/, 63];
|
|
6669
|
+
case 63: return [2 /*return*/];
|
|
6209
6670
|
}
|
|
6210
6671
|
});
|
|
6211
6672
|
});
|
|
@@ -6213,7 +6674,7 @@
|
|
|
6213
6674
|
return KwikIDFormViewComponent;
|
|
6214
6675
|
}());
|
|
6215
6676
|
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: KwikIDFormViewService }, { token: i5.TuiPushService }, { token: i3$1.TuiAlertService }, { token: i6.TuiPreviewDialogService }, { token: i3$1.TuiDialogService }, { token: i2__namespace.KwikUILoaderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6216
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", userConfig: "userConfig", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", getUnsavedDataState: "getUnsavedDataState", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm", onClickFormFieldButton: "onClickFormFieldButton" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >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 [style]=\"formConfig.properties?.main?.styles | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Email -->\n <ng-container *ngSwitchCase=\"'email'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-email\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [domains]=\"field?.properties?.domains\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-email>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Password -->\n <ng-container *ngSwitchCase=\"'password'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-password\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [hintContent]=\"field?.properties?.hintContent\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-password>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Capture -->\n <ng-container *ngSwitchCase=\"'capture'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'CAPTURE'\"\n [validators]=\"field?.validators\"\n (onClick)=\"handleOnClickInputCamera($event, field)\"\n (getRemovedFile)=\"handleOnClickGetRemovedMediaFile($event)\"\n ></kwikui-input-camera>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Star Rating -->\n <ng-container *ngSwitchCase=\"'star-rating'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-star-rating\n [color]=\"field?.properties?.color\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [iconMarked]=\"field?.properties?.iconMarked\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-star-rating>\n </label>\n <ng-template #labelTemplate>\n <p>\n <b\n >{{ field?.properties?.placeholder }}\n <span *ngIf=\"field.validators?.required\">*</span></b\n >\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n id=\"kwikid-camera-container\"\n *ngIf=\"isShowCameraCapture\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"'CAPTURE'\"\n [image]=\"cameraCaptureImage\"\n [config]=\"cameraCaptureConfig\"\n (getImage)=\"handleGetImage($event)\"\n (onClickSave)=\"handleOnClickSaveCameraCapture($event)\"\n >\n <ng-container slot=\"header\">\n <div style=\"display: flex; width: 100%; max-width: 100%; padding: 0rem\">\n <div style=\"flex: 1; text-align: left\"> </div>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraCaptureConfig?.header?.title\"\n shape=\"rounded\"\n style=\"\n flex: 1;\n width: 100%;\n min-width: max-content;\n text-align: center;\n margin: auto;\n \"\n size=\"s\"\n ></kwikui-button>\n <div\n style=\"\n flex: 1;\n text-align: right;\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n \"\n >\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen ? 'tuiIconMinimize2' : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCloseCamera($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n </kwikid-camera>\n </div>\n</div>\n", styles: [".kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}.preview-container>*:not(:last-child){margin-bottom:1rem}.preview-container .preview-html{flex-grow:1}.preview-container .preview-iframe-content{height:100%;flex-grow:1}.preview-container .preview-iframe-content .preview-iframe{width:100%;height:100%}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.preview-container .preview-unavailable>*:not(:last-child){margin-bottom:1rem}#kwikid-camera-container{width:100vw;height:100vh;position:fixed;top:50%;left:50%;background-color:#0000008f;transform:translate(-50%,-50%);z-index:100}#kwikid-camera-container #kwikid-camera-wrapper{width:min(80%);height:max(85%);box-shadow:#0000008f 0 22px 70px 4px;overflow:hidden;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:1rem;background-color:#000;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper.fullscreen{width:100%;height:100%;border-radius:0;transition:5s linear ease}@media only screen and (max-width: 600px){#kwikid-camera-container #kwikid-camera-wrapper{width:100%;height:100%;border-radius:0;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper #kwikid-camera-header-enlarge-button{display:none}}\n", "::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputEmailComponent, selector: "kwikui-input-email", inputs: ["case", "disabled", "domains", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPasswordComponent, selector: "kwikui-input-password", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["decimal", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "precision", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxCalculatedFromToday", "min", "minCalculatedFromToday", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSelectComponent, selector: "kwikui-input-select", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "options", "placeholder", "properties", "searchable", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "prefix", "properties", "quantum", "size", "steps", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "mode", "otpLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators"], outputs: ["getKeyValue", "getRemovedFile"] }, { type: i4__namespace.KwikUIInputCameraComponent, selector: "kwikui-input-camera", inputs: ["buttonText", "disabled", "focus", "formControl", "formControlName", "icon", "id", "invalid", "mediaFiles", "properties", "showMediaFiles", "size", "type", "validators"], outputs: ["onClick", "getRemovedFile"] }, { type: i2__namespace.KwikUIStarRatingComponent, selector: "kwikui-star-rating", inputs: ["color", "disabled", "focus", "formControl", "formControlName", "icon", "iconMarked", "id", "invalid", "label", "max", "min", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i5__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i6__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i6__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i4__namespace.KwikIDCameraComponent, selector: "kwikid-camera", inputs: ["type", "config", "data", "image"], outputs: ["getImage", "onClickSave"] }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2__namespace.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2__namespace.KwikUISafeUrlPipe } });
|
|
6677
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", userConfig: "userConfig", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", getUnsavedDataState: "getUnsavedDataState", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm", onClickFormFieldButton: "onClickFormFieldButton" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.logo?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n [style]=\"\n formConfig.properties?.header?.logo?.styles ?? '' | styleSanitizer\n \"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >\n Step {{ formConfig.sequenceNo }} of {{ formConfig.formsListLength }}\n </div>\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [style]=\"formConfig.properties?.main?.styles ?? '' | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Email -->\n <ng-container *ngSwitchCase=\"'email'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-email\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [domains]=\"field?.properties?.domains\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-email>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Password -->\n <ng-container *ngSwitchCase=\"'password'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-password\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [hintContent]=\"field?.properties?.hintContent\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-password>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Camera Capture -->\n <ng-container *ngSwitchCase=\"'capture'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n *ngIf=\"\n field?.label !== '' &&\n field?.label !== undefined &&\n field?.label !== null\n \"\n style=\"min-height: auto\"\n >\n <p\n *ngIf=\"field?.label !== ''\"\n style=\"padding: 0px 0.25rem; margin-bottom: 0.5rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </label>\n <kwikui-input-camera\n [buttonText]=\"field?.properties?.buttonText\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [mediaFiles]=\"mediaFiles[field.key]\"\n [properties]=\"field?.properties\"\n [showMediaFiles]=\"field?.properties?.showMediaFiles\"\n [type]=\"'CAPTURE'\"\n [validators]=\"field?.validators\"\n (onClick)=\"handleOnClickInputCamera($event, field)\"\n (getRemovedFile)=\"handleOnClickGetRemovedMediaFile($event)\"\n ></kwikui-input-camera>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Star Rating -->\n <ng-container *ngSwitchCase=\"'star-rating'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-star-rating\n [color]=\"field?.properties?.color\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [icon]=\"field?.properties?.icon\"\n [iconMarked]=\"field?.properties?.iconMarked\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-star-rating>\n </label>\n <ng-template #labelTemplate>\n <p>\n <b\n >{{ field?.properties?.placeholder }}\n <span *ngIf=\"field.validators?.required\">*</span></b\n >\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"\n previewProperties?.iframe?.containerStyles ?? '' | styleSanitizer\n \"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles ?? '' | styleSanitizer\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n id=\"kwikid-camera-container\"\n *ngIf=\"isShowCameraCapture\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"'CAPTURE'\"\n [image]=\"cameraCaptureImage\"\n [config]=\"cameraCaptureConfig\"\n (getImage)=\"handleGetImage($event)\"\n (onClickSave)=\"handleOnClickSaveCameraCapture($event)\"\n >\n <ng-container slot=\"header\">\n <div style=\"display: flex; width: 100%; max-width: 100%; padding: 0rem\">\n <div style=\"flex: 1; text-align: left\"> </div>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraCaptureConfig?.header?.title\"\n shape=\"rounded\"\n style=\"\n flex: 1;\n width: 100%;\n min-width: max-content;\n text-align: center;\n margin: auto;\n \"\n size=\"s\"\n ></kwikui-button>\n <div\n style=\"\n flex: 1;\n text-align: right;\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n \"\n >\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen ? 'tuiIconMinimize2' : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"cameraCaptureConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCloseCamera($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n </kwikid-camera>\n </div>\n</div>\n", styles: [".kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}.preview-container>*:not(:last-child){margin-bottom:1rem}.preview-container .preview-html{flex-grow:1}.preview-container .preview-iframe-content{height:100%;flex-grow:1}.preview-container .preview-iframe-content .preview-iframe{width:100%;height:100%}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.preview-container .preview-unavailable>*:not(:last-child){margin-bottom:1rem}#kwikid-camera-container{width:100%;height:100%;position:fixed;top:50%;left:50%;background-color:#0000008f;transform:translate(-50%,-50%);z-index:100}#kwikid-camera-container #kwikid-camera-wrapper{width:min(80%);height:max(85%);box-shadow:#0000008f 0 22px 70px 4px;overflow:hidden;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:1rem;background-color:#000;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper.fullscreen{width:100%;height:100%;border-radius:0;transition:5s linear ease}@media only screen and (max-width: 600px){#kwikid-camera-container #kwikid-camera-wrapper{width:100%;height:100%;border-radius:0;transition:5s linear ease}#kwikid-camera-container #kwikid-camera-wrapper #kwikid-camera-header-enlarge-button{display:none}}\n", "::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputEmailComponent, selector: "kwikui-input-email", inputs: ["case", "disabled", "domains", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPasswordComponent, selector: "kwikui-input-password", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["decimal", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "precision", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxCalculatedFromToday", "min", "minCalculatedFromToday", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSelectComponent, selector: "kwikui-input-select", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "options", "placeholder", "properties", "searchable", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "min", "placeholder", "postfix", "prefix", "properties", "quantum", "size", "steps", "type", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "mode", "otpLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputFilesComponent, selector: "kwikui-input-files", inputs: ["accept", "class", "disabled", "files", "formControl", "formControlName", "icon", "id", "label", "link", "maxFileSize", "multiple", "setFileTypesToForm", "showAddedFiles", "size", "styles", "validators"], outputs: ["getKeyValue", "getRemovedFile"] }, { type: i4__namespace.KwikUIInputCameraComponent, selector: "kwikui-input-camera", inputs: ["buttonText", "disabled", "focus", "formControl", "formControlName", "icon", "id", "invalid", "mediaFiles", "properties", "showMediaFiles", "size", "type", "validators"], outputs: ["onClick", "getRemovedFile"] }, { type: i2__namespace.KwikUIStarRatingComponent, selector: "kwikui-star-rating", inputs: ["color", "disabled", "focus", "formControl", "formControlName", "icon", "iconMarked", "id", "invalid", "label", "max", "min", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i5__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i6__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i6__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i4__namespace.KwikIDCameraComponent, selector: "kwikid-camera", inputs: ["type", "config", "data", "image"], outputs: ["getImage", "onClickSave"] }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2__namespace.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2__namespace.KwikUISafeUrlPipe } });
|
|
6217
6678
|
__decorate([
|
|
6218
6679
|
kwikidToolkit.logMethod
|
|
6219
6680
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -6361,6 +6822,24 @@
|
|
|
6361
6822
|
__decorate([
|
|
6362
6823
|
kwikidToolkit.logMethod
|
|
6363
6824
|
], KwikIDFormViewComponent.prototype, "setFieldDefaultValue", null);
|
|
6825
|
+
__decorate([
|
|
6826
|
+
kwikidToolkit.logMethod
|
|
6827
|
+
], KwikIDFormViewComponent.prototype, "setApiStatus", null);
|
|
6828
|
+
__decorate([
|
|
6829
|
+
kwikidToolkit.logMethod
|
|
6830
|
+
], KwikIDFormViewComponent.prototype, "setApiHeaderValue", null);
|
|
6831
|
+
__decorate([
|
|
6832
|
+
kwikidToolkit.logMethod
|
|
6833
|
+
], KwikIDFormViewComponent.prototype, "setApiHeaderValidity", null);
|
|
6834
|
+
__decorate([
|
|
6835
|
+
kwikidToolkit.logMethod
|
|
6836
|
+
], KwikIDFormViewComponent.prototype, "setApiBodyValue", null);
|
|
6837
|
+
__decorate([
|
|
6838
|
+
kwikidToolkit.logMethod
|
|
6839
|
+
], KwikIDFormViewComponent.prototype, "setApiBodyValidity", null);
|
|
6840
|
+
__decorate([
|
|
6841
|
+
kwikidToolkit.logMethod
|
|
6842
|
+
], KwikIDFormViewComponent.prototype, "setFieldValidity", null);
|
|
6364
6843
|
__decorate([
|
|
6365
6844
|
kwikidToolkit.logMethod
|
|
6366
6845
|
], KwikIDFormViewComponent.prototype, "setDropdownOptions", null);
|
|
@@ -6488,7 +6967,7 @@
|
|
|
6488
6967
|
type: i0.Output
|
|
6489
6968
|
}], onClickFormFieldButton: [{
|
|
6490
6969
|
type: i0.Output
|
|
6491
|
-
}], ngOnInit: [], ngAfterViewInit: [], ngOnChanges: [], initFormConfig: [], setFormFieldsFromFormConfig: [], setFormFieldGroupsFromFormConfig: [], setFormDataFromAllFormsData: [], handleConnectedElementFieldGroupActions: [], handleConnectedElementFieldGroup: [], handleConnectedElementFieldActions: [], handleConnectedElementFields: [], handleConnectedElements: [], handleRemovedFile: [], handleGetKeyValueFile: [], handleOnClickGetRemovedMediaFile: [], handleOnClickInputCamera: [], setImage: [], handleOnClickSaveCameraCapture: [], handleGetImage: [], handleOnClickCloseCamera: [], updateFiles: [], uploadFile: [], handleOnClickFormFieldButton: [], handleGetKeyValue: [], handleOnClickResetFormFields: [], handleFieldApiCall: [], handleApiCall: [], executeApiCall: [], isValidRequestHeadersAndBody: [], handleOnClickApiCall: [], handleOnClickGoBack: [], handleOnClickViewForms: [], handleOnClickSaveForm: [], toggleErrorNotification: [], fieldHide: [], fieldGroupHide: [], fieldShow: [], fieldGroupShow: [], fieldDisable: [], fieldGroupDisable: [], fieldEnable: [], fieldGroupEnable: [], fieldReset: [], fieldErrorShow: [], fieldErrorHide: [], fieldMessageShow: [], fieldMessageHide: [], setValue: [], setFieldDefaultValue: [], setDropdownOptions: [], apiCall: [], fieldApiCall: [], fieldMultipleApiCalls: [], fieldMultipleApiCallsEnd: [], taskApiCall: [], taskMultipleApiCalls: [], taskMultipleApiCallsEnd: [], dialogShow: [], dialogHide: [], redirectToUrl: [], patchFieldControlValue: [], setFieldControlValue: [], patchFormGroup: [], isFieldValid: [], isFieldEnabled: [], getFormGroupRawValues: [], showPreview: [], showErrorPreview: [], showPopupForm: [], alertShow: [], takeActionOnFieldGroup: [], takeAction: [] } });
|
|
6970
|
+
}], ngOnInit: [], ngAfterViewInit: [], ngOnChanges: [], initFormConfig: [], setFormFieldsFromFormConfig: [], setFormFieldGroupsFromFormConfig: [], setFormDataFromAllFormsData: [], handleConnectedElementFieldGroupActions: [], handleConnectedElementFieldGroup: [], handleConnectedElementFieldActions: [], handleConnectedElementFields: [], handleConnectedElements: [], handleRemovedFile: [], handleGetKeyValueFile: [], handleOnClickGetRemovedMediaFile: [], handleOnClickInputCamera: [], setImage: [], handleOnClickSaveCameraCapture: [], handleGetImage: [], handleOnClickCloseCamera: [], updateFiles: [], uploadFile: [], handleOnClickFormFieldButton: [], handleGetKeyValue: [], handleOnClickResetFormFields: [], handleFieldApiCall: [], handleApiCall: [], executeApiCall: [], isValidRequestHeadersAndBody: [], handleOnClickApiCall: [], handleOnClickGoBack: [], handleOnClickViewForms: [], handleOnClickSaveForm: [], toggleErrorNotification: [], fieldHide: [], fieldGroupHide: [], fieldShow: [], fieldGroupShow: [], fieldDisable: [], fieldGroupDisable: [], fieldEnable: [], fieldGroupEnable: [], fieldReset: [], fieldErrorShow: [], fieldErrorHide: [], fieldMessageShow: [], fieldMessageHide: [], setValue: [], setFieldDefaultValue: [], setApiStatus: [], setApiHeaderValue: [], setApiHeaderValidity: [], setApiBodyValue: [], setApiBodyValidity: [], setFieldValidity: [], setDropdownOptions: [], apiCall: [], fieldApiCall: [], fieldMultipleApiCalls: [], fieldMultipleApiCallsEnd: [], taskApiCall: [], taskMultipleApiCalls: [], taskMultipleApiCallsEnd: [], dialogShow: [], dialogHide: [], redirectToUrl: [], patchFieldControlValue: [], setFieldControlValue: [], patchFormGroup: [], isFieldValid: [], isFieldEnabled: [], getFormGroupRawValues: [], showPreview: [], showErrorPreview: [], showPopupForm: [], alertShow: [], takeActionOnFieldGroup: [], takeAction: [] } });
|
|
6492
6971
|
|
|
6493
6972
|
var EFormType;
|
|
6494
6973
|
(function (EFormType) {
|