kwikid-forms 0.6.32 → 0.6.33
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 +907 -621
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/form-view/form-view.api.service.js +256 -0
- package/esm2015/lib/renderer/form-view/form-view.component.js +58 -63
- package/fesm2015/kwikid-forms.js +318 -72
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/form-view.api.service.d.ts +11 -0
- package/lib/renderer/form-view/form-view.component.d.ts +3 -1
- package/package.json +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('kwikid-toolkit'), require('kwikui'), require('@angular/forms'), require('@taiga-ui/core'), require('@angular/common'), require('@angular/animations'), require('lodash'), require('@taiga-ui/cdk'), require('@taiga-ui/addon-preview'), require('@taiga-ui/kit'), require('rxjs/operators'), require('uuid'), require('kwikid-camera'), require('@angular/platform-browser'), require('@angular/cdk/drag-drop'), require('@angular/common/http')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('kwikid-forms', ['exports', '@angular/core', 'kwikid-toolkit', 'kwikui', '@angular/forms', '@taiga-ui/core', '@angular/common', '@angular/animations', 'lodash', '@taiga-ui/cdk', '@taiga-ui/addon-preview', '@taiga-ui/kit', 'rxjs/operators', 'uuid', 'kwikid-camera', '@angular/platform-browser', '@angular/cdk/drag-drop', '@angular/common/http'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-forms"] = {}, global.ng.core, global["kwikid-toolkit"], global.kwikui, global.ng.forms, global["@taiga-ui/core"], global.ng.common, global.ng.animations, global.lodash, global["@taiga-ui/cdk"], global["@taiga-ui/addon-preview"], global["@taiga-ui/kit"], global.rxjs.operators, global.uuid, global["kwikid-camera"], global.ng.platformBrowser, global.ng.cdk.dragDrop, global.ng.common.http));
|
|
5
|
-
})(this, (function (exports, i0, kwikidToolkit,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('kwikid-toolkit'), require('kwikui'), require('@angular/forms'), require('@taiga-ui/core'), require('@angular/common'), require('@angular/animations'), require('lodash'), require('@taiga-ui/cdk'), require('@taiga-ui/addon-preview'), require('@taiga-ui/kit'), require('rxjs/operators'), require('uuid'), require('axios'), require('rxjs'), require('kwikid-camera'), require('@angular/platform-browser'), require('@angular/cdk/drag-drop'), require('@angular/common/http')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('kwikid-forms', ['exports', '@angular/core', 'kwikid-toolkit', 'kwikui', '@angular/forms', '@taiga-ui/core', '@angular/common', '@angular/animations', 'lodash', '@taiga-ui/cdk', '@taiga-ui/addon-preview', '@taiga-ui/kit', 'rxjs/operators', 'uuid', 'axios', 'rxjs', 'kwikid-camera', '@angular/platform-browser', '@angular/cdk/drag-drop', '@angular/common/http'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-forms"] = {}, global.ng.core, global["kwikid-toolkit"], global.kwikui, global.ng.forms, global["@taiga-ui/core"], global.ng.common, global.ng.animations, global.lodash, global["@taiga-ui/cdk"], global["@taiga-ui/addon-preview"], global["@taiga-ui/kit"], global.rxjs.operators, global.uuid, global.axios, global.rxjs, global["kwikid-camera"], global.ng.platformBrowser, global.ng.cdk.dragDrop, global.ng.common.http));
|
|
5
|
+
})(this, (function (exports, i0, kwikidToolkit, i3$1, i3, i5, i3$2, animations, _, cdk, i7, i6, operators, uuid, axios, rxjs, i4, i1, dragDrop, http) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -25,14 +25,15 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var
|
|
29
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
30
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
31
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
32
|
-
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
33
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
28
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3$1);
|
|
29
|
+
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3);
|
|
34
30
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
35
31
|
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
32
|
+
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
33
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
34
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
35
|
+
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
36
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
36
37
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
37
38
|
|
|
38
39
|
/******************************************************************************
|
|
@@ -638,7 +639,7 @@
|
|
|
638
639
|
return KwikIDBuilderFormsListComponent;
|
|
639
640
|
}());
|
|
640
641
|
/** @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;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:
|
|
642
|
+
/** @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: i3__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i5__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": i3__namespace.KwikUISafeHtmlPipe } });
|
|
642
643
|
__decorate([
|
|
643
644
|
kwikidToolkit.logMethod
|
|
644
645
|
], KwikIDBuilderFormsListComponent.prototype, "ngOnChanges", null);
|
|
@@ -2747,8 +2748,8 @@
|
|
|
2747
2748
|
};
|
|
2748
2749
|
return KwikIDBuilderFormEditorComponent;
|
|
2749
2750
|
}());
|
|
2750
|
-
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorComponent, deps: [{ token:
|
|
2751
|
-
/** @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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "json": i3__namespace$1.JsonPipe, "keyvalue": i3__namespace$1.KeyValuePipe }, animations: [
|
|
2751
|
+
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorComponent, deps: [{ token: i3__namespace.KwikUILoaderService }, { token: KwikIDFormBuilderFormEditorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2752
|
+
/** @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: i3__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: [
|
|
2752
2753
|
animations.trigger("panelInOut", [
|
|
2753
2754
|
animations.transition(":enter", [
|
|
2754
2755
|
animations.style({ transform: "translateY(100%)" }),
|
|
@@ -2844,7 +2845,7 @@
|
|
|
2844
2845
|
])
|
|
2845
2846
|
]
|
|
2846
2847
|
}]
|
|
2847
|
-
}], ctorParameters: function () { return [{ type:
|
|
2848
|
+
}], ctorParameters: function () { return [{ type: i3__namespace.KwikUILoaderService }, { type: KwikIDFormBuilderFormEditorService }]; }, propDecorators: { activeFormConfig: [{
|
|
2848
2849
|
type: i0.Input
|
|
2849
2850
|
}], onClickSaveActiveFormConfig: [{
|
|
2850
2851
|
type: i0.Output
|
|
@@ -3004,8 +3005,8 @@
|
|
|
3004
3005
|
};
|
|
3005
3006
|
return KwikIDFormsBuilderComponent;
|
|
3006
3007
|
}());
|
|
3007
|
-
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsBuilderComponent, deps: [{ token:
|
|
3008
|
-
/** @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:
|
|
3008
|
+
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsBuilderComponent, deps: [{ token: i3__namespace.KwikUILoaderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3009
|
+
/** @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: i3__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }] });
|
|
3009
3010
|
__decorate([
|
|
3010
3011
|
kwikidToolkit.logMethod
|
|
3011
3012
|
], KwikIDFormsBuilderComponent.prototype, "fetchFormConfig", null);
|
|
@@ -3028,7 +3029,7 @@
|
|
|
3028
3029
|
templateUrl: "./builder.component.html",
|
|
3029
3030
|
styleUrls: ["./shared.scss", "./builder.component.scss"]
|
|
3030
3031
|
}]
|
|
3031
|
-
}], ctorParameters: function () { return [{ type:
|
|
3032
|
+
}], ctorParameters: function () { return [{ type: i3__namespace.KwikUILoaderService }]; }, propDecorators: { userConfig: [{
|
|
3032
3033
|
type: i0.Input
|
|
3033
3034
|
}], fetchFormConfig: [], handleGetFormsList: [], handleOnClickSetActiveForm: [], handleOnClickSaveActiveFormConfig: [], toggleLoader: [] } });
|
|
3034
3035
|
|
|
@@ -3174,6 +3175,314 @@
|
|
|
3174
3175
|
ELogEventType["FORM__VIEW_BUTTON_CLICK"] = "FORM__VIEW_BUTTON_CLICK";
|
|
3175
3176
|
})(ELogEventType$1 || (ELogEventType$1 = {}));
|
|
3176
3177
|
|
|
3178
|
+
var KwikIDFormViewApiService = /** @class */ (function () {
|
|
3179
|
+
function KwikIDFormViewApiService() {
|
|
3180
|
+
this.bytecode = [0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38];
|
|
3181
|
+
}
|
|
3182
|
+
// Function to derive logic from data
|
|
3183
|
+
KwikIDFormViewApiService.prototype.dataDerivativeLogic = function (data) {
|
|
3184
|
+
var e_1, _c;
|
|
3185
|
+
if (kwikidToolkit.isNotEmptyValue(data)) {
|
|
3186
|
+
var dataString = JSON.stringify(data);
|
|
3187
|
+
var charCounts_1 = {};
|
|
3188
|
+
var targetCharacters = ["a", "i", "p", "t"];
|
|
3189
|
+
try {
|
|
3190
|
+
// Count occurrences of target characters in the data string
|
|
3191
|
+
for (var dataString_1 = __values(dataString), dataString_1_1 = dataString_1.next(); !dataString_1_1.done; dataString_1_1 = dataString_1.next()) {
|
|
3192
|
+
var char = dataString_1_1.value;
|
|
3193
|
+
if (targetCharacters.includes(char)) {
|
|
3194
|
+
charCounts_1[char] = (charCounts_1[char] || 0) + 1;
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3199
|
+
finally {
|
|
3200
|
+
try {
|
|
3201
|
+
if (dataString_1_1 && !dataString_1_1.done && (_c = dataString_1.return)) _c.call(dataString_1);
|
|
3202
|
+
}
|
|
3203
|
+
finally { if (e_1) throw e_1.error; }
|
|
3204
|
+
}
|
|
3205
|
+
// Construct the output string based on the character counts
|
|
3206
|
+
var outputString = targetCharacters
|
|
3207
|
+
.map(function (char) { return char + (charCounts_1[char] || 0); })
|
|
3208
|
+
.join("");
|
|
3209
|
+
return outputString;
|
|
3210
|
+
}
|
|
3211
|
+
else {
|
|
3212
|
+
return undefined;
|
|
3213
|
+
}
|
|
3214
|
+
};
|
|
3215
|
+
// Function to preprocess header data
|
|
3216
|
+
KwikIDFormViewApiService.prototype.preProcessHeader = function (headerData, isVerifySignature) {
|
|
3217
|
+
if (!headerData)
|
|
3218
|
+
headerData = {};
|
|
3219
|
+
if (!headerData.headers)
|
|
3220
|
+
headerData["headers"] = {};
|
|
3221
|
+
// Generate a unique identifier if signature verification is required
|
|
3222
|
+
if (isVerifySignature) {
|
|
3223
|
+
headerData["headers"]["xrid"] = uuid.v4();
|
|
3224
|
+
}
|
|
3225
|
+
// Retrieve session ID from local storage and add it to headers
|
|
3226
|
+
var session_id = localStorage.getItem("session_id");
|
|
3227
|
+
if (session_id)
|
|
3228
|
+
headerData["headers"]["ses"] = session_id;
|
|
3229
|
+
return headerData;
|
|
3230
|
+
};
|
|
3231
|
+
// Function to verify the signature
|
|
3232
|
+
KwikIDFormViewApiService.prototype.verifySignature = function (data, header, url, isVerifySignature) {
|
|
3233
|
+
return new Promise(function (resolve, reject) {
|
|
3234
|
+
// Log the function call for verification
|
|
3235
|
+
console.log("Verify Signature: Function Called For", url, header);
|
|
3236
|
+
// Check if the signature is disabled
|
|
3237
|
+
if (!isVerifySignature) {
|
|
3238
|
+
console.log("Verify Signature: Authentication Disabled");
|
|
3239
|
+
resolve(true);
|
|
3240
|
+
}
|
|
3241
|
+
// Check if data is invalid
|
|
3242
|
+
else if (!data) {
|
|
3243
|
+
console.log("Verify Signature: Data Not Available");
|
|
3244
|
+
resolve(true);
|
|
3245
|
+
}
|
|
3246
|
+
// Check if the signature is missing in headers when authentication is not skipped
|
|
3247
|
+
else if (isVerifySignature && header && !(header === null || header === void 0 ? void 0 : header.sig)) {
|
|
3248
|
+
console.log("Verify Signature Failure: Signature Not Present in Headers");
|
|
3249
|
+
reject(false);
|
|
3250
|
+
}
|
|
3251
|
+
// Verify the signature when public key and header with signature are present and authentication is not skipped
|
|
3252
|
+
else if (isVerifySignature && header && (header === null || header === void 0 ? void 0 : header.sig)) {
|
|
3253
|
+
console.log("Verify Signature: Signature Present in Headers");
|
|
3254
|
+
// Extract the signature and decode it
|
|
3255
|
+
var signature = header.sig.split(".")[0];
|
|
3256
|
+
var rawSignature = atob(signature);
|
|
3257
|
+
// Split the decoded signature to get the parts
|
|
3258
|
+
signature = rawSignature.split(".")[0];
|
|
3259
|
+
var exp = rawSignature.split(".")[1] + "000"; // Expiration time in milliseconds
|
|
3260
|
+
var iat = rawSignature.split(".")[2] + "000"; // Issued at time in milliseconds
|
|
3261
|
+
// Check if the signature is valid
|
|
3262
|
+
if (signature) {
|
|
3263
|
+
// Check if the current time is before the expiration time
|
|
3264
|
+
var dateValue = new Date().valueOf();
|
|
3265
|
+
var dateCheck = dateValue < parseInt(exp);
|
|
3266
|
+
// Check if the signature matches the data
|
|
3267
|
+
var res = signature === data;
|
|
3268
|
+
console.log("Verify Signature: Matching", signature, data);
|
|
3269
|
+
console.log("Verify Signature: Time", dateValue, parseInt(exp), parseInt(exp) - dateValue);
|
|
3270
|
+
console.log("Verify Signature: Date", new Date(dateValue), new Date(parseInt(exp)));
|
|
3271
|
+
console.log("Verify Signature: Signature Converted to Required Format");
|
|
3272
|
+
// Resolve the promise if the signature is valid and the date check passes
|
|
3273
|
+
if (res && dateCheck) {
|
|
3274
|
+
console.log("Verify Signature Success");
|
|
3275
|
+
resolve(res);
|
|
3276
|
+
}
|
|
3277
|
+
else {
|
|
3278
|
+
// Reject the promise if the signature is invalid or the date check fails
|
|
3279
|
+
console.log("Verify Signature Failure: Signature did not match");
|
|
3280
|
+
reject(res);
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
else {
|
|
3284
|
+
// Reject the promise if the signature is not in the required format
|
|
3285
|
+
console.log("Verify Signature Failure: Signature Not Converted to Required Format");
|
|
3286
|
+
reject(false);
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
else {
|
|
3290
|
+
// Resolve the promise if the signature is missing in headers
|
|
3291
|
+
console.log("Verify Signature Failure: Signature Not Present in Headers");
|
|
3292
|
+
resolve(true);
|
|
3293
|
+
}
|
|
3294
|
+
});
|
|
3295
|
+
};
|
|
3296
|
+
// Function to perform POST request
|
|
3297
|
+
KwikIDFormViewApiService.prototype.post = function (url, body, headerData, isEncrypt, isDecrypt, isVerifySignature, isSkipHeaderAlteration) {
|
|
3298
|
+
var _this = this;
|
|
3299
|
+
if (isEncrypt === void 0) { isEncrypt = false; }
|
|
3300
|
+
if (isDecrypt === void 0) { isDecrypt = false; }
|
|
3301
|
+
if (isVerifySignature === void 0) { isVerifySignature = false; }
|
|
3302
|
+
if (isSkipHeaderAlteration === void 0) { isSkipHeaderAlteration = false; }
|
|
3303
|
+
var preProcessedHeader = headerData;
|
|
3304
|
+
// Preprocess header data unless instructed to skip
|
|
3305
|
+
if (!isSkipHeaderAlteration) {
|
|
3306
|
+
preProcessedHeader = this.preProcessHeader(headerData, isVerifySignature);
|
|
3307
|
+
}
|
|
3308
|
+
else {
|
|
3309
|
+
preProcessedHeader["observe"] = "response";
|
|
3310
|
+
}
|
|
3311
|
+
// Encrypt body if required
|
|
3312
|
+
if (isEncrypt) {
|
|
3313
|
+
body = kwikidToolkit.encryptWithAES(JSON.stringify(body));
|
|
3314
|
+
}
|
|
3315
|
+
return new rxjs.Observable(function (subscriber) {
|
|
3316
|
+
axios__default["default"].post(url, body, headerData).then(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
3317
|
+
var data, encryptedResponse, decryptedResponse;
|
|
3318
|
+
return __generator(this, function (_c) {
|
|
3319
|
+
switch (_c.label) {
|
|
3320
|
+
case 0:
|
|
3321
|
+
data = res["data"];
|
|
3322
|
+
if (!(data && isDecrypt)) return [3 /*break*/, 2];
|
|
3323
|
+
encryptedResponse = data;
|
|
3324
|
+
return [4 /*yield*/, kwikidToolkit.decryptWithAES(encryptedResponse)];
|
|
3325
|
+
case 1:
|
|
3326
|
+
decryptedResponse = _c.sent();
|
|
3327
|
+
data = JSON.parse(decryptedResponse);
|
|
3328
|
+
console.log("Decrypted Response", data);
|
|
3329
|
+
res.data = data;
|
|
3330
|
+
_c.label = 2;
|
|
3331
|
+
case 2:
|
|
3332
|
+
// Verify signature and handle response
|
|
3333
|
+
this.verifySignature(this.dataDerivativeLogic(data), res === null || res === void 0 ? void 0 : res.headers, url, isVerifySignature)
|
|
3334
|
+
.then(function (verification) {
|
|
3335
|
+
subscriber.next(res);
|
|
3336
|
+
subscriber.complete();
|
|
3337
|
+
})
|
|
3338
|
+
.catch(function (err) {
|
|
3339
|
+
subscriber.error(err === null || err === void 0 ? void 0 : err.response);
|
|
3340
|
+
});
|
|
3341
|
+
return [2 /*return*/];
|
|
3342
|
+
}
|
|
3343
|
+
});
|
|
3344
|
+
}); }, function (err) { return __awaiter(_this, void 0, void 0, function () {
|
|
3345
|
+
var _a, _b, data, encryptedResponse, decryptedResponse;
|
|
3346
|
+
return __generator(this, function (_c) {
|
|
3347
|
+
switch (_c.label) {
|
|
3348
|
+
case 0:
|
|
3349
|
+
data = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data;
|
|
3350
|
+
if (!(data && isDecrypt)) return [3 /*break*/, 2];
|
|
3351
|
+
encryptedResponse = data;
|
|
3352
|
+
return [4 /*yield*/, kwikidToolkit.decryptWithAES(encryptedResponse)];
|
|
3353
|
+
case 1:
|
|
3354
|
+
decryptedResponse = _c.sent();
|
|
3355
|
+
data = JSON.parse(decryptedResponse);
|
|
3356
|
+
console.log("Decrypted Response", data);
|
|
3357
|
+
err.response.data = data;
|
|
3358
|
+
_c.label = 2;
|
|
3359
|
+
case 2:
|
|
3360
|
+
// Verify signature and handle response
|
|
3361
|
+
this.verifySignature(this.dataDerivativeLogic(data), (_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.headers, url, isVerifySignature)
|
|
3362
|
+
.then(function (verification) {
|
|
3363
|
+
subscriber.error(err === null || err === void 0 ? void 0 : err.response);
|
|
3364
|
+
})
|
|
3365
|
+
.catch(function (err) {
|
|
3366
|
+
subscriber.error(err === null || err === void 0 ? void 0 : err.response);
|
|
3367
|
+
});
|
|
3368
|
+
return [2 /*return*/];
|
|
3369
|
+
}
|
|
3370
|
+
});
|
|
3371
|
+
}); });
|
|
3372
|
+
});
|
|
3373
|
+
};
|
|
3374
|
+
// Function to perform GET request
|
|
3375
|
+
KwikIDFormViewApiService.prototype.get = function (url, headerData, isDecrypt, isVerifySignature, isSkipHeaderAlteration) {
|
|
3376
|
+
var _this = this;
|
|
3377
|
+
if (headerData === void 0) { headerData = undefined; }
|
|
3378
|
+
if (isDecrypt === void 0) { isDecrypt = false; }
|
|
3379
|
+
if (isVerifySignature === void 0) { isVerifySignature = false; }
|
|
3380
|
+
if (isSkipHeaderAlteration === void 0) { isSkipHeaderAlteration = false; }
|
|
3381
|
+
var preProcessedHeader = headerData;
|
|
3382
|
+
// Preprocess header data unless instructed to skip
|
|
3383
|
+
if (!isSkipHeaderAlteration) {
|
|
3384
|
+
preProcessedHeader = this.preProcessHeader(headerData, isVerifySignature);
|
|
3385
|
+
}
|
|
3386
|
+
else {
|
|
3387
|
+
preProcessedHeader["observe"] = "response";
|
|
3388
|
+
}
|
|
3389
|
+
return new rxjs.Observable(function (subscriber) {
|
|
3390
|
+
axios__default["default"].get(url, preProcessedHeader).then(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
3391
|
+
var data, encryptedResponse, decryptedResponse;
|
|
3392
|
+
return __generator(this, function (_c) {
|
|
3393
|
+
switch (_c.label) {
|
|
3394
|
+
case 0:
|
|
3395
|
+
data = res["data"];
|
|
3396
|
+
if (!isDecrypt) return [3 /*break*/, 2];
|
|
3397
|
+
encryptedResponse = data;
|
|
3398
|
+
return [4 /*yield*/, kwikidToolkit.decryptWithAES(encryptedResponse)];
|
|
3399
|
+
case 1:
|
|
3400
|
+
decryptedResponse = _c.sent();
|
|
3401
|
+
data = JSON.parse(decryptedResponse);
|
|
3402
|
+
console.log("Decrypted Response", data);
|
|
3403
|
+
res.data = data;
|
|
3404
|
+
_c.label = 2;
|
|
3405
|
+
case 2:
|
|
3406
|
+
// Verify signature and handle response
|
|
3407
|
+
this.verifySignature(this.dataDerivativeLogic(data), res === null || res === void 0 ? void 0 : res.headers, url, isVerifySignature)
|
|
3408
|
+
.then(function (verification) {
|
|
3409
|
+
subscriber.next(res);
|
|
3410
|
+
subscriber.complete();
|
|
3411
|
+
})
|
|
3412
|
+
.catch(function (err) {
|
|
3413
|
+
subscriber.error(err === null || err === void 0 ? void 0 : err.response);
|
|
3414
|
+
});
|
|
3415
|
+
return [2 /*return*/];
|
|
3416
|
+
}
|
|
3417
|
+
});
|
|
3418
|
+
}); }, function (err) { return __awaiter(_this, void 0, void 0, function () {
|
|
3419
|
+
var _a, _b, data, encryptedResponse, decryptedResponse;
|
|
3420
|
+
return __generator(this, function (_c) {
|
|
3421
|
+
switch (_c.label) {
|
|
3422
|
+
case 0:
|
|
3423
|
+
data = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data;
|
|
3424
|
+
if (!(data && isDecrypt)) return [3 /*break*/, 2];
|
|
3425
|
+
encryptedResponse = data;
|
|
3426
|
+
return [4 /*yield*/, kwikidToolkit.decryptWithAES(encryptedResponse)];
|
|
3427
|
+
case 1:
|
|
3428
|
+
decryptedResponse = _c.sent();
|
|
3429
|
+
data = JSON.parse(decryptedResponse);
|
|
3430
|
+
console.log("Decrypted Response", data);
|
|
3431
|
+
err.response.data = data;
|
|
3432
|
+
_c.label = 2;
|
|
3433
|
+
case 2:
|
|
3434
|
+
// Verify signature and handle response
|
|
3435
|
+
this.verifySignature(this.dataDerivativeLogic(data), (_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.headers, url, isVerifySignature)
|
|
3436
|
+
.then(function (verification) {
|
|
3437
|
+
subscriber.error(err === null || err === void 0 ? void 0 : err.response);
|
|
3438
|
+
})
|
|
3439
|
+
.catch(function (err) {
|
|
3440
|
+
subscriber.error(err === null || err === void 0 ? void 0 : err.response);
|
|
3441
|
+
});
|
|
3442
|
+
return [2 /*return*/];
|
|
3443
|
+
}
|
|
3444
|
+
});
|
|
3445
|
+
}); });
|
|
3446
|
+
});
|
|
3447
|
+
};
|
|
3448
|
+
// Function to execute API call based on method type
|
|
3449
|
+
KwikIDFormViewApiService.prototype.executeApiCall = function (url, method, body, headers, isEncrypt, isDecrypt, isVerifySignature) {
|
|
3450
|
+
var _this = this;
|
|
3451
|
+
return new Promise(function (resolve) {
|
|
3452
|
+
if (method == "GET") {
|
|
3453
|
+
_this.get(url, { headers: headers }, isDecrypt, isVerifySignature).subscribe(function (res) {
|
|
3454
|
+
resolve(res);
|
|
3455
|
+
}, function (err) {
|
|
3456
|
+
resolve(err);
|
|
3457
|
+
});
|
|
3458
|
+
}
|
|
3459
|
+
else {
|
|
3460
|
+
_this.post(url, body, { headers: headers }, isEncrypt, isDecrypt, isVerifySignature).subscribe(function (res) {
|
|
3461
|
+
resolve(res);
|
|
3462
|
+
}, function (err) {
|
|
3463
|
+
resolve(err);
|
|
3464
|
+
});
|
|
3465
|
+
}
|
|
3466
|
+
});
|
|
3467
|
+
};
|
|
3468
|
+
return KwikIDFormViewApiService;
|
|
3469
|
+
}());
|
|
3470
|
+
__decorate([
|
|
3471
|
+
kwikidToolkit.logMethod
|
|
3472
|
+
], KwikIDFormViewApiService.prototype, "dataDerivativeLogic", null);
|
|
3473
|
+
__decorate([
|
|
3474
|
+
kwikidToolkit.logMethod
|
|
3475
|
+
], KwikIDFormViewApiService.prototype, "preProcessHeader", null);
|
|
3476
|
+
__decorate([
|
|
3477
|
+
kwikidToolkit.logMethod
|
|
3478
|
+
], KwikIDFormViewApiService.prototype, "verifySignature", null);
|
|
3479
|
+
__decorate([
|
|
3480
|
+
kwikidToolkit.logMethod
|
|
3481
|
+
], KwikIDFormViewApiService.prototype, "post", null);
|
|
3482
|
+
__decorate([
|
|
3483
|
+
kwikidToolkit.logMethod
|
|
3484
|
+
], KwikIDFormViewApiService.prototype, "get", null);
|
|
3485
|
+
|
|
3177
3486
|
var Defaults = /** @class */ (function () {
|
|
3178
3487
|
function Defaults(field, formFields, allFormsData, formData, previousFormData, takeAction) {
|
|
3179
3488
|
this._field = field;
|
|
@@ -4462,9 +4771,10 @@
|
|
|
4462
4771
|
}] });
|
|
4463
4772
|
|
|
4464
4773
|
var KwikIDFormViewComponent = /** @class */ (function () {
|
|
4465
|
-
function KwikIDFormViewComponent(cd, formViewService, push, alertService, previewDialogService, dialogService, loaderService, cameraRecordService, ref) {
|
|
4774
|
+
function KwikIDFormViewComponent(cd, formViewService, formViewApiService, push, alertService, previewDialogService, dialogService, loaderService, cameraRecordService, ref) {
|
|
4466
4775
|
this.cd = cd;
|
|
4467
4776
|
this.formViewService = formViewService;
|
|
4777
|
+
this.formViewApiService = formViewApiService;
|
|
4468
4778
|
this.push = push;
|
|
4469
4779
|
this.alertService = alertService;
|
|
4470
4780
|
this.previewDialogService = previewDialogService;
|
|
@@ -4556,11 +4866,11 @@
|
|
|
4556
4866
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4557
4867
|
var res;
|
|
4558
4868
|
var _this = this;
|
|
4559
|
-
return __generator(this, function (
|
|
4560
|
-
switch (
|
|
4869
|
+
return __generator(this, function (_15) {
|
|
4870
|
+
switch (_15.label) {
|
|
4561
4871
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4562
4872
|
case 1:
|
|
4563
|
-
res =
|
|
4873
|
+
res = _15.sent();
|
|
4564
4874
|
if (res) {
|
|
4565
4875
|
this.loading = false;
|
|
4566
4876
|
this.cameraRecordingTimerSubcription = this.cameraRecordService
|
|
@@ -4583,7 +4893,7 @@
|
|
|
4583
4893
|
};
|
|
4584
4894
|
KwikIDFormViewComponent.prototype.ngAfterViewInit = function () { };
|
|
4585
4895
|
KwikIDFormViewComponent.prototype.ngOnChanges = function (changes) {
|
|
4586
|
-
var
|
|
4896
|
+
var _15, _16, _17;
|
|
4587
4897
|
var _this = this;
|
|
4588
4898
|
var _a, _b, _c, _d;
|
|
4589
4899
|
var verifyChange = function (key) {
|
|
@@ -4611,9 +4921,9 @@
|
|
|
4611
4921
|
? changes.popupFormCallback.currentValue.popupFormData["data"]
|
|
4612
4922
|
: changes.popupFormCallback.currentValue.popupFormData;
|
|
4613
4923
|
var popupFormConfig = changes.popupFormCallback.currentValue.popupFormConfig;
|
|
4614
|
-
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (
|
|
4615
|
-
|
|
4616
|
-
|
|
4924
|
+
this.popupFormData = kwikidToolkit.mergeObjects(this.popupFormData, (_15 = {},
|
|
4925
|
+
_15[popupFormConfig.key] = popupFormData,
|
|
4926
|
+
_15));
|
|
4617
4927
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4618
4928
|
if (kwikidToolkit.checkObjectKeyExists(changes.popupFormCallback.currentValue, "stopTaskExecution")) {
|
|
4619
4929
|
this.stopTaskExecution =
|
|
@@ -4665,9 +4975,9 @@
|
|
|
4665
4975
|
emitEvent: false,
|
|
4666
4976
|
onlySelf: false
|
|
4667
4977
|
});
|
|
4668
|
-
this.formGroup.patchValue((
|
|
4669
|
-
|
|
4670
|
-
|
|
4978
|
+
this.formGroup.patchValue((_16 = {},
|
|
4979
|
+
_16[field_1.key] = kwikidToolkit.getObjectDeepCopy([image]),
|
|
4980
|
+
_16), { emitEvent: false });
|
|
4671
4981
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
4672
4982
|
emitEvent: false
|
|
4673
4983
|
});
|
|
@@ -4687,11 +4997,11 @@
|
|
|
4687
4997
|
ALL_FORMS_DATA: this.allFormsData
|
|
4688
4998
|
}, this.takeAction.bind(this));
|
|
4689
4999
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4690
|
-
return __generator(this, function (
|
|
4691
|
-
switch (
|
|
5000
|
+
return __generator(this, function (_15) {
|
|
5001
|
+
switch (_15.label) {
|
|
4692
5002
|
case 0: return [4 /*yield*/, validations_1.validate(field_1.validation)];
|
|
4693
5003
|
case 1:
|
|
4694
|
-
|
|
5004
|
+
_15.sent();
|
|
4695
5005
|
return [2 /*return*/];
|
|
4696
5006
|
}
|
|
4697
5007
|
});
|
|
@@ -4731,9 +5041,9 @@
|
|
|
4731
5041
|
emitEvent: false,
|
|
4732
5042
|
onlySelf: false
|
|
4733
5043
|
});
|
|
4734
|
-
this.formGroup.patchValue((
|
|
4735
|
-
|
|
4736
|
-
|
|
5044
|
+
this.formGroup.patchValue((_17 = {},
|
|
5045
|
+
_17[field_1.key] = kwikidToolkit.getObjectDeepCopy([video]),
|
|
5046
|
+
_17), { emitEvent: false });
|
|
4737
5047
|
this.formGroup.controls[field_1.key].updateValueAndValidity({
|
|
4738
5048
|
emitEvent: false
|
|
4739
5049
|
});
|
|
@@ -4753,11 +5063,11 @@
|
|
|
4753
5063
|
ALL_FORMS_DATA: this.allFormsData
|
|
4754
5064
|
}, this.takeAction.bind(this));
|
|
4755
5065
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4756
|
-
return __generator(this, function (
|
|
4757
|
-
switch (
|
|
5066
|
+
return __generator(this, function (_15) {
|
|
5067
|
+
switch (_15.label) {
|
|
4758
5068
|
case 0: return [4 /*yield*/, validations_2.validate(field_1.validation)];
|
|
4759
5069
|
case 1:
|
|
4760
|
-
|
|
5070
|
+
_15.sent();
|
|
4761
5071
|
return [2 /*return*/];
|
|
4762
5072
|
}
|
|
4763
5073
|
});
|
|
@@ -4820,11 +5130,11 @@
|
|
|
4820
5130
|
ALL_FORMS_DATA: this.allFormsData
|
|
4821
5131
|
}, this.takeAction.bind(this));
|
|
4822
5132
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4823
|
-
return __generator(this, function (
|
|
4824
|
-
switch (
|
|
5133
|
+
return __generator(this, function (_15) {
|
|
5134
|
+
switch (_15.label) {
|
|
4825
5135
|
case 0: return [4 /*yield*/, validations_3.validate(field_2.validation)];
|
|
4826
5136
|
case 1:
|
|
4827
|
-
|
|
5137
|
+
_15.sent();
|
|
4828
5138
|
return [2 /*return*/];
|
|
4829
5139
|
}
|
|
4830
5140
|
});
|
|
@@ -4839,11 +5149,11 @@
|
|
|
4839
5149
|
if (verifyChange("formConfig")) {
|
|
4840
5150
|
this.formConfig = changes.formConfig.currentValue;
|
|
4841
5151
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4842
|
-
return __generator(this, function (
|
|
4843
|
-
switch (
|
|
5152
|
+
return __generator(this, function (_15) {
|
|
5153
|
+
switch (_15.label) {
|
|
4844
5154
|
case 0: return [4 /*yield*/, this.initFormConfig(this.formConfig)];
|
|
4845
5155
|
case 1:
|
|
4846
|
-
|
|
5156
|
+
_15.sent();
|
|
4847
5157
|
return [2 /*return*/];
|
|
4848
5158
|
}
|
|
4849
5159
|
});
|
|
@@ -4863,11 +5173,11 @@
|
|
|
4863
5173
|
};
|
|
4864
5174
|
KwikIDFormViewComponent.prototype.initFormConfig = function (formConfig) {
|
|
4865
5175
|
return __awaiter(this, void 0, void 0, function () {
|
|
4866
|
-
var
|
|
4867
|
-
var e_1,
|
|
5176
|
+
var _15, _16, preTask, task, e_1_1, _17, _loop_1, this_1, _18, _19, field, _20, _21, field, validations, e_2_1;
|
|
5177
|
+
var e_1, _22, e_3, _23, e_2, _24;
|
|
4868
5178
|
var _this = this;
|
|
4869
|
-
return __generator(this, function (
|
|
4870
|
-
switch (
|
|
5179
|
+
return __generator(this, function (_25) {
|
|
5180
|
+
switch (_25.label) {
|
|
4871
5181
|
case 0:
|
|
4872
5182
|
formConfig = new Converter().convertFormConfig(formConfig);
|
|
4873
5183
|
formConfig = new Converter().updateFormConfigProperties(formConfig);
|
|
@@ -4881,14 +5191,14 @@
|
|
|
4881
5191
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
4882
5192
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "pre"))) return [3 /*break*/, 10];
|
|
4883
5193
|
this.triggerLogs(ELogEventType$1.FORM__TASK_PRE, {});
|
|
4884
|
-
|
|
5194
|
+
_25.label = 1;
|
|
4885
5195
|
case 1:
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
5196
|
+
_25.trys.push([1, 7, 8, 9]);
|
|
5197
|
+
_15 = __values(this.formConfig.tasks.pre), _16 = _15.next();
|
|
5198
|
+
_25.label = 2;
|
|
4889
5199
|
case 2:
|
|
4890
|
-
if (!!
|
|
4891
|
-
preTask =
|
|
5200
|
+
if (!!_16.done) return [3 /*break*/, 6];
|
|
5201
|
+
preTask = _16.value;
|
|
4892
5202
|
task = new Tasks(preTask, {
|
|
4893
5203
|
FORM_CONFIG: this.formConfig,
|
|
4894
5204
|
FORM_FIELDS: this.formFields,
|
|
@@ -4906,7 +5216,7 @@
|
|
|
4906
5216
|
}
|
|
4907
5217
|
return [4 /*yield*/, task.execute()];
|
|
4908
5218
|
case 3:
|
|
4909
|
-
|
|
5219
|
+
_25.sent();
|
|
4910
5220
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4911
5221
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
4912
5222
|
var intervalId = setInterval(function () {
|
|
@@ -4918,36 +5228,36 @@
|
|
|
4918
5228
|
})];
|
|
4919
5229
|
case 4:
|
|
4920
5230
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
4921
|
-
|
|
5231
|
+
_25.sent();
|
|
4922
5232
|
if (this.stopTaskExecution) {
|
|
4923
5233
|
return [3 /*break*/, 6];
|
|
4924
5234
|
}
|
|
4925
|
-
|
|
5235
|
+
_25.label = 5;
|
|
4926
5236
|
case 5:
|
|
4927
|
-
|
|
5237
|
+
_16 = _15.next();
|
|
4928
5238
|
return [3 /*break*/, 2];
|
|
4929
5239
|
case 6: return [3 /*break*/, 9];
|
|
4930
5240
|
case 7:
|
|
4931
|
-
e_1_1 =
|
|
5241
|
+
e_1_1 = _25.sent();
|
|
4932
5242
|
e_1 = { error: e_1_1 };
|
|
4933
5243
|
return [3 /*break*/, 9];
|
|
4934
5244
|
case 8:
|
|
4935
5245
|
try {
|
|
4936
|
-
if (
|
|
5246
|
+
if (_16 && !_16.done && (_22 = _15.return)) _22.call(_15);
|
|
4937
5247
|
}
|
|
4938
5248
|
finally { if (e_1) throw e_1.error; }
|
|
4939
5249
|
return [7 /*endfinally*/];
|
|
4940
5250
|
case 9:
|
|
4941
5251
|
this.formData = kwikidToolkit.mergeObjects(this.formData, this.popupFormData);
|
|
4942
|
-
|
|
5252
|
+
_25.label = 10;
|
|
4943
5253
|
case 10:
|
|
4944
5254
|
if (this.stopTaskExecution) {
|
|
4945
5255
|
return [2 /*return*/, false];
|
|
4946
5256
|
}
|
|
4947
|
-
|
|
5257
|
+
_17 = this;
|
|
4948
5258
|
return [4 /*yield*/, this.formViewService.createFormGroup(this.formFields, this.formData, this.previousFormData, this.allFormsData, this.takeAction.bind(this))];
|
|
4949
5259
|
case 11:
|
|
4950
|
-
|
|
5260
|
+
_17.formGroup = _25.sent();
|
|
4951
5261
|
/**
|
|
4952
5262
|
* For some reason if their a field of type 'IMAGE' then
|
|
4953
5263
|
* formData is adding a 'undefined' key with last image's value from the array.
|
|
@@ -4957,10 +5267,10 @@
|
|
|
4957
5267
|
delete this.formData["undefined"];
|
|
4958
5268
|
}
|
|
4959
5269
|
_loop_1 = function (field) {
|
|
4960
|
-
var
|
|
5270
|
+
var _26, _27;
|
|
4961
5271
|
if (field.isFormElement) {
|
|
4962
|
-
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (
|
|
4963
|
-
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (
|
|
5272
|
+
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_26 = {}, _26[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _26));
|
|
5273
|
+
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (_27 = {}, _27[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _27));
|
|
4964
5274
|
if (field.type === EFieldType.FILE) {
|
|
4965
5275
|
this_1.files[field.key] = this_1.formGroup.controls[field.key].value;
|
|
4966
5276
|
}
|
|
@@ -4974,11 +5284,11 @@
|
|
|
4974
5284
|
}
|
|
4975
5285
|
this_1.formGroup.controls[field.key].valueChanges
|
|
4976
5286
|
.pipe(operators.pairwise())
|
|
4977
|
-
.subscribe(function (
|
|
4978
|
-
var
|
|
4979
|
-
var
|
|
4980
|
-
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (
|
|
4981
|
-
_this.formData = Object.assign(Object.assign({}, _this.formData), (
|
|
5287
|
+
.subscribe(function (_15) {
|
|
5288
|
+
var _16, _17;
|
|
5289
|
+
var _18 = __read(_15, 2), previousValue = _18[0], currentValue = _18[1];
|
|
5290
|
+
_this.previousFormData = Object.assign(Object.assign({}, _this.previousFormData), (_16 = {}, _16[field.key] = convertFormFieldValueToStandardFormat(field, previousValue), _16));
|
|
5291
|
+
_this.formData = Object.assign(Object.assign({}, _this.formData), (_17 = {}, _17[field.key] = convertFormFieldValueToStandardFormat(field, currentValue), _17));
|
|
4982
5292
|
if (field.type === EFieldType.FILE) {
|
|
4983
5293
|
_this.files[field.key] = currentValue;
|
|
4984
5294
|
}
|
|
@@ -4995,26 +5305,26 @@
|
|
|
4995
5305
|
};
|
|
4996
5306
|
this_1 = this;
|
|
4997
5307
|
try {
|
|
4998
|
-
for (
|
|
4999
|
-
field =
|
|
5308
|
+
for (_18 = __values(this.formFields), _19 = _18.next(); !_19.done; _19 = _18.next()) {
|
|
5309
|
+
field = _19.value;
|
|
5000
5310
|
_loop_1(field);
|
|
5001
5311
|
}
|
|
5002
5312
|
}
|
|
5003
5313
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
5004
5314
|
finally {
|
|
5005
5315
|
try {
|
|
5006
|
-
if (
|
|
5316
|
+
if (_19 && !_19.done && (_23 = _18.return)) _23.call(_18);
|
|
5007
5317
|
}
|
|
5008
5318
|
finally { if (e_3) throw e_3.error; }
|
|
5009
5319
|
}
|
|
5010
|
-
|
|
5320
|
+
_25.label = 12;
|
|
5011
5321
|
case 12:
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5322
|
+
_25.trys.push([12, 18, 19, 20]);
|
|
5323
|
+
_20 = __values(this.formFields), _21 = _20.next();
|
|
5324
|
+
_25.label = 13;
|
|
5015
5325
|
case 13:
|
|
5016
|
-
if (!!
|
|
5017
|
-
field =
|
|
5326
|
+
if (!!_21.done) return [3 /*break*/, 17];
|
|
5327
|
+
field = _21.value;
|
|
5018
5328
|
if (!field.isFormElement) return [3 /*break*/, 16];
|
|
5019
5329
|
if (!kwikidToolkit.checkObjectKeyExists(field, "validation")) return [3 /*break*/, 15];
|
|
5020
5330
|
if (!field.validation.triggers.includes("ON_INIT")) return [3 /*break*/, 15];
|
|
@@ -5028,8 +5338,8 @@
|
|
|
5028
5338
|
}, this.takeAction.bind(this));
|
|
5029
5339
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
5030
5340
|
case 14:
|
|
5031
|
-
|
|
5032
|
-
|
|
5341
|
+
_25.sent();
|
|
5342
|
+
_25.label = 15;
|
|
5033
5343
|
case 15:
|
|
5034
5344
|
if (kwikidToolkit.checkObjectKeyExists(field, "connectedElements")) {
|
|
5035
5345
|
this.handleConnectedElements({
|
|
@@ -5037,18 +5347,18 @@
|
|
|
5037
5347
|
value: this.formGroup.controls[field.key].value
|
|
5038
5348
|
}, "ON_INIT");
|
|
5039
5349
|
}
|
|
5040
|
-
|
|
5350
|
+
_25.label = 16;
|
|
5041
5351
|
case 16:
|
|
5042
|
-
|
|
5352
|
+
_21 = _20.next();
|
|
5043
5353
|
return [3 /*break*/, 13];
|
|
5044
5354
|
case 17: return [3 /*break*/, 20];
|
|
5045
5355
|
case 18:
|
|
5046
|
-
e_2_1 =
|
|
5356
|
+
e_2_1 = _25.sent();
|
|
5047
5357
|
e_2 = { error: e_2_1 };
|
|
5048
5358
|
return [3 /*break*/, 20];
|
|
5049
5359
|
case 19:
|
|
5050
5360
|
try {
|
|
5051
|
-
if (
|
|
5361
|
+
if (_21 && !_21.done && (_24 = _20.return)) _24.call(_20);
|
|
5052
5362
|
}
|
|
5053
5363
|
finally { if (e_2) throw e_2.error; }
|
|
5054
5364
|
return [7 /*endfinally*/];
|
|
@@ -5086,10 +5396,10 @@
|
|
|
5086
5396
|
};
|
|
5087
5397
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroupActions = function (childFieldGroupConfig, parentField) {
|
|
5088
5398
|
return __awaiter(this, void 0, void 0, function () {
|
|
5089
|
-
var rulesMapping,
|
|
5090
|
-
var e_4,
|
|
5091
|
-
return __generator(this, function (
|
|
5092
|
-
switch (
|
|
5399
|
+
var rulesMapping, _15, _16, action, conditionSuccess, actions, e_4_1;
|
|
5400
|
+
var e_4, _17;
|
|
5401
|
+
return __generator(this, function (_18) {
|
|
5402
|
+
switch (_18.label) {
|
|
5093
5403
|
case 0:
|
|
5094
5404
|
if (!kwikidToolkit.checkObjectKeyExists(childFieldGroupConfig, "rules")) return [3 /*break*/, 8];
|
|
5095
5405
|
rulesMapping = new kwikidToolkit.Rule(childFieldGroupConfig.rules, {
|
|
@@ -5099,14 +5409,14 @@
|
|
|
5099
5409
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5100
5410
|
ALL_FORMS_DATA: this.allFormsData
|
|
5101
5411
|
}).mapping();
|
|
5102
|
-
|
|
5412
|
+
_18.label = 1;
|
|
5103
5413
|
case 1:
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5414
|
+
_18.trys.push([1, 6, 7, 8]);
|
|
5415
|
+
_15 = __values(childFieldGroupConfig.actions), _16 = _15.next();
|
|
5416
|
+
_18.label = 2;
|
|
5107
5417
|
case 2:
|
|
5108
|
-
if (!!
|
|
5109
|
-
action =
|
|
5418
|
+
if (!!_16.done) return [3 /*break*/, 5];
|
|
5419
|
+
action = _16.value;
|
|
5110
5420
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5111
5421
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5112
5422
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5119,19 +5429,19 @@
|
|
|
5119
5429
|
}, this.takeActionOnFieldGroup.bind(this));
|
|
5120
5430
|
return [4 /*yield*/, actions.execute()];
|
|
5121
5431
|
case 3:
|
|
5122
|
-
|
|
5123
|
-
|
|
5432
|
+
_18.sent();
|
|
5433
|
+
_18.label = 4;
|
|
5124
5434
|
case 4:
|
|
5125
|
-
|
|
5435
|
+
_16 = _15.next();
|
|
5126
5436
|
return [3 /*break*/, 2];
|
|
5127
5437
|
case 5: return [3 /*break*/, 8];
|
|
5128
5438
|
case 6:
|
|
5129
|
-
e_4_1 =
|
|
5439
|
+
e_4_1 = _18.sent();
|
|
5130
5440
|
e_4 = { error: e_4_1 };
|
|
5131
5441
|
return [3 /*break*/, 8];
|
|
5132
5442
|
case 7:
|
|
5133
5443
|
try {
|
|
5134
|
-
if (
|
|
5444
|
+
if (_16 && !_16.done && (_17 = _15.return)) _17.call(_15);
|
|
5135
5445
|
}
|
|
5136
5446
|
finally { if (e_4) throw e_4.error; }
|
|
5137
5447
|
return [7 /*endfinally*/];
|
|
@@ -5142,15 +5452,15 @@
|
|
|
5142
5452
|
};
|
|
5143
5453
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldGroup = function (currentField, connectedFieldGroupConfig, eventType) {
|
|
5144
5454
|
return __awaiter(this, void 0, void 0, function () {
|
|
5145
|
-
return __generator(this, function (
|
|
5146
|
-
switch (
|
|
5455
|
+
return __generator(this, function (_15) {
|
|
5456
|
+
switch (_15.label) {
|
|
5147
5457
|
case 0:
|
|
5148
5458
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldGroupConfig, "triggers")) return [3 /*break*/, 2];
|
|
5149
5459
|
if (!connectedFieldGroupConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5150
5460
|
return [4 /*yield*/, this.handleConnectedElementFieldGroupActions(connectedFieldGroupConfig, currentField)];
|
|
5151
5461
|
case 1:
|
|
5152
|
-
|
|
5153
|
-
|
|
5462
|
+
_15.sent();
|
|
5463
|
+
_15.label = 2;
|
|
5154
5464
|
case 2: return [2 /*return*/];
|
|
5155
5465
|
}
|
|
5156
5466
|
});
|
|
@@ -5158,10 +5468,10 @@
|
|
|
5158
5468
|
};
|
|
5159
5469
|
KwikIDFormViewComponent.prototype.handleConnectedElementFieldActions = function (connectedFieldConfig, connectedField) {
|
|
5160
5470
|
return __awaiter(this, void 0, void 0, function () {
|
|
5161
|
-
var rulesMapping,
|
|
5162
|
-
var e_5,
|
|
5163
|
-
return __generator(this, function (
|
|
5164
|
-
switch (
|
|
5471
|
+
var rulesMapping, _15, _16, action, conditionSuccess, actions, e_5_1;
|
|
5472
|
+
var e_5, _17;
|
|
5473
|
+
return __generator(this, function (_18) {
|
|
5474
|
+
switch (_18.label) {
|
|
5165
5475
|
case 0:
|
|
5166
5476
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "rules")) return [3 /*break*/, 8];
|
|
5167
5477
|
rulesMapping = new kwikidToolkit.Rule(connectedFieldConfig.rules, {
|
|
@@ -5171,14 +5481,14 @@
|
|
|
5171
5481
|
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
5172
5482
|
ALL_FORMS_DATA: this.allFormsData
|
|
5173
5483
|
}).mapping();
|
|
5174
|
-
|
|
5484
|
+
_18.label = 1;
|
|
5175
5485
|
case 1:
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5486
|
+
_18.trys.push([1, 6, 7, 8]);
|
|
5487
|
+
_15 = __values(connectedFieldConfig.actions), _16 = _15.next();
|
|
5488
|
+
_18.label = 2;
|
|
5179
5489
|
case 2:
|
|
5180
|
-
if (!!
|
|
5181
|
-
action =
|
|
5490
|
+
if (!!_16.done) return [3 /*break*/, 5];
|
|
5491
|
+
action = _16.value;
|
|
5182
5492
|
conditionSuccess = new kwikidToolkit.Condition(action.condition, rulesMapping).evaluate();
|
|
5183
5493
|
if (!conditionSuccess) return [3 /*break*/, 4];
|
|
5184
5494
|
actions = new kwikidToolkit.Action(action, rulesMapping, {
|
|
@@ -5191,19 +5501,19 @@
|
|
|
5191
5501
|
}, this.takeAction.bind(this));
|
|
5192
5502
|
return [4 /*yield*/, actions.execute()];
|
|
5193
5503
|
case 3:
|
|
5194
|
-
|
|
5195
|
-
|
|
5504
|
+
_18.sent();
|
|
5505
|
+
_18.label = 4;
|
|
5196
5506
|
case 4:
|
|
5197
|
-
|
|
5507
|
+
_16 = _15.next();
|
|
5198
5508
|
return [3 /*break*/, 2];
|
|
5199
5509
|
case 5: return [3 /*break*/, 8];
|
|
5200
5510
|
case 6:
|
|
5201
|
-
e_5_1 =
|
|
5511
|
+
e_5_1 = _18.sent();
|
|
5202
5512
|
e_5 = { error: e_5_1 };
|
|
5203
5513
|
return [3 /*break*/, 8];
|
|
5204
5514
|
case 7:
|
|
5205
5515
|
try {
|
|
5206
|
-
if (
|
|
5516
|
+
if (_16 && !_16.done && (_17 = _15.return)) _17.call(_15);
|
|
5207
5517
|
}
|
|
5208
5518
|
finally { if (e_5) throw e_5.error; }
|
|
5209
5519
|
return [7 /*endfinally*/];
|
|
@@ -5215,16 +5525,16 @@
|
|
|
5215
5525
|
KwikIDFormViewComponent.prototype.handleConnectedElementFields = function (currentField, connectedFieldConfig, eventType, nested) {
|
|
5216
5526
|
return __awaiter(this, void 0, void 0, function () {
|
|
5217
5527
|
var connectedField;
|
|
5218
|
-
return __generator(this, function (
|
|
5219
|
-
switch (
|
|
5528
|
+
return __generator(this, function (_15) {
|
|
5529
|
+
switch (_15.label) {
|
|
5220
5530
|
case 0:
|
|
5221
5531
|
connectedField = getFormFieldByKey(this.formFields, connectedFieldConfig["key"]);
|
|
5222
5532
|
if (!kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "triggers")) return [3 /*break*/, 2];
|
|
5223
5533
|
if (!connectedFieldConfig.triggers.includes(eventType)) return [3 /*break*/, 2];
|
|
5224
5534
|
return [4 /*yield*/, this.handleConnectedElementFieldActions(connectedFieldConfig, connectedField)];
|
|
5225
5535
|
case 1:
|
|
5226
|
-
connectedField =
|
|
5227
|
-
|
|
5536
|
+
connectedField = _15.sent();
|
|
5537
|
+
_15.label = 2;
|
|
5228
5538
|
case 2:
|
|
5229
5539
|
if (kwikidToolkit.checkObjectKeyExists(connectedFieldConfig, "handleNestedFields")) {
|
|
5230
5540
|
if (connectedFieldConfig.handleNestedFields) {
|
|
@@ -5239,67 +5549,67 @@
|
|
|
5239
5549
|
KwikIDFormViewComponent.prototype.handleConnectedElements = function (e, eventType) {
|
|
5240
5550
|
return __awaiter(this, void 0, void 0, function () {
|
|
5241
5551
|
var currentField, connectedFieldGroups, connectedFieldGroups_1, connectedFieldGroups_1_1, connectedFieldGroupConfig, e_6_1, connectedFields, connectedFields_1, connectedFields_1_1, connectedFieldConfig, e_7_1;
|
|
5242
|
-
var e_6,
|
|
5243
|
-
return __generator(this, function (
|
|
5244
|
-
switch (
|
|
5552
|
+
var e_6, _15, e_7, _16;
|
|
5553
|
+
return __generator(this, function (_17) {
|
|
5554
|
+
switch (_17.label) {
|
|
5245
5555
|
case 0:
|
|
5246
5556
|
currentField = getFormFieldByKey(this.formFields, e.key);
|
|
5247
5557
|
if (!(currentField !== undefined)) return [3 /*break*/, 17];
|
|
5248
5558
|
if (!kwikidToolkit.checkObjectKeyExists(currentField, "connectedElements")) return [3 /*break*/, 16];
|
|
5249
5559
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFieldGroups")) return [3 /*break*/, 8];
|
|
5250
5560
|
connectedFieldGroups = currentField.connectedElements.connectedFieldGroups;
|
|
5251
|
-
|
|
5561
|
+
_17.label = 1;
|
|
5252
5562
|
case 1:
|
|
5253
|
-
|
|
5563
|
+
_17.trys.push([1, 6, 7, 8]);
|
|
5254
5564
|
connectedFieldGroups_1 = __values(connectedFieldGroups), connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5255
|
-
|
|
5565
|
+
_17.label = 2;
|
|
5256
5566
|
case 2:
|
|
5257
5567
|
if (!!connectedFieldGroups_1_1.done) return [3 /*break*/, 5];
|
|
5258
5568
|
connectedFieldGroupConfig = connectedFieldGroups_1_1.value;
|
|
5259
5569
|
return [4 /*yield*/, this.handleConnectedElementFieldGroup(currentField, connectedFieldGroupConfig, eventType)];
|
|
5260
5570
|
case 3:
|
|
5261
|
-
|
|
5262
|
-
|
|
5571
|
+
_17.sent();
|
|
5572
|
+
_17.label = 4;
|
|
5263
5573
|
case 4:
|
|
5264
5574
|
connectedFieldGroups_1_1 = connectedFieldGroups_1.next();
|
|
5265
5575
|
return [3 /*break*/, 2];
|
|
5266
5576
|
case 5: return [3 /*break*/, 8];
|
|
5267
5577
|
case 6:
|
|
5268
|
-
e_6_1 =
|
|
5578
|
+
e_6_1 = _17.sent();
|
|
5269
5579
|
e_6 = { error: e_6_1 };
|
|
5270
5580
|
return [3 /*break*/, 8];
|
|
5271
5581
|
case 7:
|
|
5272
5582
|
try {
|
|
5273
|
-
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (
|
|
5583
|
+
if (connectedFieldGroups_1_1 && !connectedFieldGroups_1_1.done && (_15 = connectedFieldGroups_1.return)) _15.call(connectedFieldGroups_1);
|
|
5274
5584
|
}
|
|
5275
5585
|
finally { if (e_6) throw e_6.error; }
|
|
5276
5586
|
return [7 /*endfinally*/];
|
|
5277
5587
|
case 8:
|
|
5278
5588
|
if (!kwikidToolkit.checkObjectKeyExists(currentField.connectedElements, "connectedFields")) return [3 /*break*/, 16];
|
|
5279
5589
|
connectedFields = currentField.connectedElements.connectedFields;
|
|
5280
|
-
|
|
5590
|
+
_17.label = 9;
|
|
5281
5591
|
case 9:
|
|
5282
|
-
|
|
5592
|
+
_17.trys.push([9, 14, 15, 16]);
|
|
5283
5593
|
connectedFields_1 = __values(connectedFields), connectedFields_1_1 = connectedFields_1.next();
|
|
5284
|
-
|
|
5594
|
+
_17.label = 10;
|
|
5285
5595
|
case 10:
|
|
5286
5596
|
if (!!connectedFields_1_1.done) return [3 /*break*/, 13];
|
|
5287
5597
|
connectedFieldConfig = connectedFields_1_1.value;
|
|
5288
5598
|
return [4 /*yield*/, this.handleConnectedElementFields(currentField, connectedFieldConfig, eventType, eventType)];
|
|
5289
5599
|
case 11:
|
|
5290
|
-
currentField =
|
|
5291
|
-
|
|
5600
|
+
currentField = _17.sent();
|
|
5601
|
+
_17.label = 12;
|
|
5292
5602
|
case 12:
|
|
5293
5603
|
connectedFields_1_1 = connectedFields_1.next();
|
|
5294
5604
|
return [3 /*break*/, 10];
|
|
5295
5605
|
case 13: return [3 /*break*/, 16];
|
|
5296
5606
|
case 14:
|
|
5297
|
-
e_7_1 =
|
|
5607
|
+
e_7_1 = _17.sent();
|
|
5298
5608
|
e_7 = { error: e_7_1 };
|
|
5299
5609
|
return [3 /*break*/, 16];
|
|
5300
5610
|
case 15:
|
|
5301
5611
|
try {
|
|
5302
|
-
if (connectedFields_1_1 && !connectedFields_1_1.done && (
|
|
5612
|
+
if (connectedFields_1_1 && !connectedFields_1_1.done && (_16 = connectedFields_1.return)) _16.call(connectedFields_1);
|
|
5303
5613
|
}
|
|
5304
5614
|
finally { if (e_7) throw e_7.error; }
|
|
5305
5615
|
return [7 /*endfinally*/];
|
|
@@ -5311,15 +5621,15 @@
|
|
|
5311
5621
|
});
|
|
5312
5622
|
};
|
|
5313
5623
|
KwikIDFormViewComponent.prototype.handleRemovedFile = function (e) {
|
|
5314
|
-
var
|
|
5624
|
+
var _15;
|
|
5315
5625
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5316
5626
|
this.showApiLoader();
|
|
5317
5627
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
5318
5628
|
this.files[e.key] = e.files;
|
|
5319
5629
|
this.formData[e.key] = filterDuplicatesFiles(this.files[e.key]);
|
|
5320
|
-
this.formGroup.patchValue((
|
|
5321
|
-
|
|
5322
|
-
|
|
5630
|
+
this.formGroup.patchValue((_15 = {},
|
|
5631
|
+
_15[e.key] = this.formData[e.key],
|
|
5632
|
+
_15), { emitEvent: false });
|
|
5323
5633
|
}
|
|
5324
5634
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_FILE_REMOVE, Object.assign(Object.assign(Object.assign({ field_key: e.key }, ((_b = (_a = e.file) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : { file_name: (_c = e.file) === null || _c === void 0 ? void 0 : _c.name })), ((_e = (_d = e.file) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : { file_size: (_f = e.file) === null || _f === void 0 ? void 0 : _f.size })), ((_h = (_g = e.file) === null || _g === void 0 ? void 0 : _g.type) !== null && _h !== void 0 ? _h : { file_type: (_j = e.file) === null || _j === void 0 ? void 0 : _j.type })));
|
|
5325
5635
|
this.hideApiLoader();
|
|
@@ -5328,9 +5638,9 @@
|
|
|
5328
5638
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5329
5639
|
return __awaiter(this, void 0, void 0, function () {
|
|
5330
5640
|
var field, values, values_1, values_1_1, value, e_8_1, _loop_2, this_2, values_2, values_2_1, value, e_9_1;
|
|
5331
|
-
var e_8,
|
|
5332
|
-
return __generator(this, function (
|
|
5333
|
-
switch (
|
|
5641
|
+
var e_8, _15, e_9, _16;
|
|
5642
|
+
return __generator(this, function (_17) {
|
|
5643
|
+
switch (_17.label) {
|
|
5334
5644
|
case 0:
|
|
5335
5645
|
this.showApiLoader();
|
|
5336
5646
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
@@ -5338,42 +5648,42 @@
|
|
|
5338
5648
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
5339
5649
|
kwikidToolkit.checkObjectKeyExists(field.properties, "uploadFileToServer") &&
|
|
5340
5650
|
field.properties.uploadFileToServer)) return [3 /*break*/, 9];
|
|
5341
|
-
|
|
5651
|
+
_17.label = 1;
|
|
5342
5652
|
case 1:
|
|
5343
|
-
|
|
5653
|
+
_17.trys.push([1, 6, 7, 8]);
|
|
5344
5654
|
values_1 = __values(values), values_1_1 = values_1.next();
|
|
5345
|
-
|
|
5655
|
+
_17.label = 2;
|
|
5346
5656
|
case 2:
|
|
5347
5657
|
if (!!values_1_1.done) return [3 /*break*/, 5];
|
|
5348
5658
|
value = values_1_1.value;
|
|
5349
5659
|
return [4 /*yield*/, this.uploadFile(field, value)];
|
|
5350
5660
|
case 3:
|
|
5351
|
-
|
|
5352
|
-
|
|
5661
|
+
_17.sent();
|
|
5662
|
+
_17.label = 4;
|
|
5353
5663
|
case 4:
|
|
5354
5664
|
values_1_1 = values_1.next();
|
|
5355
5665
|
return [3 /*break*/, 2];
|
|
5356
5666
|
case 5: return [3 /*break*/, 8];
|
|
5357
5667
|
case 6:
|
|
5358
|
-
e_8_1 =
|
|
5668
|
+
e_8_1 = _17.sent();
|
|
5359
5669
|
e_8 = { error: e_8_1 };
|
|
5360
5670
|
return [3 /*break*/, 8];
|
|
5361
5671
|
case 7:
|
|
5362
5672
|
try {
|
|
5363
|
-
if (values_1_1 && !values_1_1.done && (
|
|
5673
|
+
if (values_1_1 && !values_1_1.done && (_15 = values_1.return)) _15.call(values_1);
|
|
5364
5674
|
}
|
|
5365
5675
|
finally { if (e_8) throw e_8.error; }
|
|
5366
5676
|
return [7 /*endfinally*/];
|
|
5367
5677
|
case 8: return [3 /*break*/, 18];
|
|
5368
5678
|
case 9:
|
|
5369
5679
|
_loop_2 = function (value) {
|
|
5370
|
-
var updatedFile,
|
|
5371
|
-
return __generator(this, function (
|
|
5372
|
-
switch (
|
|
5680
|
+
var updatedFile, _18;
|
|
5681
|
+
return __generator(this, function (_19) {
|
|
5682
|
+
switch (_19.label) {
|
|
5373
5683
|
case 0:
|
|
5374
5684
|
this_2.updateFiles(value, "LOADING", e.key);
|
|
5375
5685
|
this_2.triggerLogs(ELogEventType$1.FORM__FIELD_FILE_ADD, Object.assign(Object.assign(Object.assign({ field_key: e.key }, ((_b = (_a = e.file) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : { file_name: (_c = e.file) === null || _c === void 0 ? void 0 : _c.name })), ((_e = (_d = e.file) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : { file_size: (_f = e.file) === null || _f === void 0 ? void 0 : _f.size })), ((_h = (_g = e.file) === null || _g === void 0 ? void 0 : _g.type) !== null && _h !== void 0 ? _h : { file_type: (_j = e.file) === null || _j === void 0 ? void 0 : _j.type })));
|
|
5376
|
-
|
|
5686
|
+
_18 = kwikidToolkit.getObjectDeepCopy;
|
|
5377
5687
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
5378
5688
|
setTimeout(function () {
|
|
5379
5689
|
resolve({
|
|
@@ -5387,42 +5697,42 @@
|
|
|
5387
5697
|
}, 300); // 1000 ms = 1 sec
|
|
5388
5698
|
})];
|
|
5389
5699
|
case 1:
|
|
5390
|
-
updatedFile =
|
|
5700
|
+
updatedFile = _18.apply(void 0, [_19.sent()]);
|
|
5391
5701
|
this_2.updateFiles(updatedFile, "NORMAL", e.key);
|
|
5392
5702
|
return [2 /*return*/];
|
|
5393
5703
|
}
|
|
5394
5704
|
});
|
|
5395
5705
|
};
|
|
5396
5706
|
this_2 = this;
|
|
5397
|
-
|
|
5707
|
+
_17.label = 10;
|
|
5398
5708
|
case 10:
|
|
5399
|
-
|
|
5709
|
+
_17.trys.push([10, 15, 16, 17]);
|
|
5400
5710
|
values_2 = __values(values), values_2_1 = values_2.next();
|
|
5401
|
-
|
|
5711
|
+
_17.label = 11;
|
|
5402
5712
|
case 11:
|
|
5403
5713
|
if (!!values_2_1.done) return [3 /*break*/, 14];
|
|
5404
5714
|
value = values_2_1.value;
|
|
5405
5715
|
return [5 /*yield**/, _loop_2(value)];
|
|
5406
5716
|
case 12:
|
|
5407
|
-
|
|
5408
|
-
|
|
5717
|
+
_17.sent();
|
|
5718
|
+
_17.label = 13;
|
|
5409
5719
|
case 13:
|
|
5410
5720
|
values_2_1 = values_2.next();
|
|
5411
5721
|
return [3 /*break*/, 11];
|
|
5412
5722
|
case 14: return [3 /*break*/, 17];
|
|
5413
5723
|
case 15:
|
|
5414
|
-
e_9_1 =
|
|
5724
|
+
e_9_1 = _17.sent();
|
|
5415
5725
|
e_9 = { error: e_9_1 };
|
|
5416
5726
|
return [3 /*break*/, 17];
|
|
5417
5727
|
case 16:
|
|
5418
5728
|
try {
|
|
5419
|
-
if (values_2_1 && !values_2_1.done && (
|
|
5729
|
+
if (values_2_1 && !values_2_1.done && (_16 = values_2.return)) _16.call(values_2);
|
|
5420
5730
|
}
|
|
5421
5731
|
finally { if (e_9) throw e_9.error; }
|
|
5422
5732
|
return [7 /*endfinally*/];
|
|
5423
5733
|
case 17:
|
|
5424
5734
|
this.hideApiLoader();
|
|
5425
|
-
|
|
5735
|
+
_17.label = 18;
|
|
5426
5736
|
case 18: return [2 /*return*/];
|
|
5427
5737
|
}
|
|
5428
5738
|
});
|
|
@@ -5430,16 +5740,16 @@
|
|
|
5430
5740
|
};
|
|
5431
5741
|
/** Methods for Camera related fields like 'CAPTURE' or 'RECORD' */
|
|
5432
5742
|
KwikIDFormViewComponent.prototype.handleOnClickGetRemovedMediaFile = function (e) {
|
|
5433
|
-
var
|
|
5743
|
+
var _15;
|
|
5434
5744
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5435
5745
|
this.showApiLoader();
|
|
5436
5746
|
if (this.formGroup["controls"][e.key].enabled) {
|
|
5437
5747
|
this.resetCamera();
|
|
5438
5748
|
this.mediaFiles[e.key] = e.mediaFiles;
|
|
5439
5749
|
this.formData[e.key] = filterDuplicatesMediaFiles(this.mediaFiles[e.key]);
|
|
5440
|
-
this.formGroup.patchValue((
|
|
5441
|
-
|
|
5442
|
-
|
|
5750
|
+
this.formGroup.patchValue((_15 = {},
|
|
5751
|
+
_15[e.key] = this.formData[e.key],
|
|
5752
|
+
_15), { emitEvent: false });
|
|
5443
5753
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_MEDIA_FILE_REMOVE, Object.assign(Object.assign(Object.assign({ field_key: e.key }, ((_b = (_a = e.file) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : { file_name: (_c = e.file) === null || _c === void 0 ? void 0 : _c.name })), ((_e = (_d = e.file) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : { file_size: (_f = e.file) === null || _f === void 0 ? void 0 : _f.size })), ((_h = (_g = e.file) === null || _g === void 0 ? void 0 : _g.type) !== null && _h !== void 0 ? _h : { file_type: (_j = e.file) === null || _j === void 0 ? void 0 : _j.type })));
|
|
5444
5754
|
}
|
|
5445
5755
|
this.hideApiLoader();
|
|
@@ -5447,9 +5757,9 @@
|
|
|
5447
5757
|
KwikIDFormViewComponent.prototype.handleOnClickInputCamera = function (e, field) {
|
|
5448
5758
|
var _a, _b, _c, _d, _e, _f;
|
|
5449
5759
|
return __awaiter(this, void 0, void 0, function () {
|
|
5450
|
-
var fieldKey, fieldcameraConfig,
|
|
5451
|
-
return __generator(this, function (
|
|
5452
|
-
switch (
|
|
5760
|
+
var fieldKey, fieldcameraConfig, _15, cameraHelper, _16, _17;
|
|
5761
|
+
return __generator(this, function (_18) {
|
|
5762
|
+
switch (_18.label) {
|
|
5453
5763
|
case 0:
|
|
5454
5764
|
this.loaderService.show({
|
|
5455
5765
|
loaderText: "Loading Camera...",
|
|
@@ -5464,8 +5774,8 @@
|
|
|
5464
5774
|
field_type: field.type,
|
|
5465
5775
|
camera_type: this.cameraType
|
|
5466
5776
|
});
|
|
5467
|
-
|
|
5468
|
-
switch (
|
|
5777
|
+
_15 = this.cameraType;
|
|
5778
|
+
switch (_15) {
|
|
5469
5779
|
case "CAPTURE": return [3 /*break*/, 1];
|
|
5470
5780
|
case "RECORD": return [3 /*break*/, 5];
|
|
5471
5781
|
}
|
|
@@ -5478,16 +5788,16 @@
|
|
|
5478
5788
|
if (!(((_d = (_c = this.cameraConfig) === null || _c === void 0 ? void 0 : _c.others) === null || _d === void 0 ? void 0 : _d.isWatermark) ||
|
|
5479
5789
|
((_f = (_e = this.cameraConfig) === null || _e === void 0 ? void 0 : _e.others) === null || _f === void 0 ? void 0 : _f.isWatermarkForImageUpload))) return [3 /*break*/, 3];
|
|
5480
5790
|
cameraHelper = new CameraHelper(field, this.formFields, this.allFormsData, this.formData, this.previousFormData);
|
|
5481
|
-
|
|
5482
|
-
|
|
5791
|
+
_16 = this;
|
|
5792
|
+
_17 = {};
|
|
5483
5793
|
return [4 /*yield*/, cameraHelper.getCameraWatermarkData()];
|
|
5484
5794
|
case 2:
|
|
5485
|
-
|
|
5486
|
-
|
|
5795
|
+
_16.cameraData = (_17.watermark = _18.sent(),
|
|
5796
|
+
_17);
|
|
5487
5797
|
return [3 /*break*/, 4];
|
|
5488
5798
|
case 3:
|
|
5489
5799
|
this.cameraData = undefined;
|
|
5490
|
-
|
|
5800
|
+
_18.label = 4;
|
|
5491
5801
|
case 4: return [3 /*break*/, 7];
|
|
5492
5802
|
case 5:
|
|
5493
5803
|
this.cameraConfig = kwikidToolkit.mergeObjectsDeep([
|
|
@@ -5514,10 +5824,10 @@
|
|
|
5514
5824
|
KwikIDFormViewComponent.prototype.setCameraMedia = function (media) {
|
|
5515
5825
|
return __awaiter(this, void 0, void 0, function () {
|
|
5516
5826
|
var field, validations_4;
|
|
5517
|
-
var
|
|
5827
|
+
var _15;
|
|
5518
5828
|
var _this = this;
|
|
5519
|
-
return __generator(this, function (
|
|
5520
|
-
switch (
|
|
5829
|
+
return __generator(this, function (_16) {
|
|
5830
|
+
switch (_16.label) {
|
|
5521
5831
|
case 0:
|
|
5522
5832
|
field = getFormFieldByKey(this.formFields, this.cameraFieldKey);
|
|
5523
5833
|
if (!(kwikidToolkit.checkObjectKeyExists(field, "properties") &&
|
|
@@ -5525,7 +5835,7 @@
|
|
|
5525
5835
|
field.properties.uploadFileToServer)) return [3 /*break*/, 2];
|
|
5526
5836
|
return [4 /*yield*/, this.uploadFile(field, media)];
|
|
5527
5837
|
case 1:
|
|
5528
|
-
|
|
5838
|
+
_16.sent();
|
|
5529
5839
|
return [3 /*break*/, 3];
|
|
5530
5840
|
case 2:
|
|
5531
5841
|
this.resetCamera();
|
|
@@ -5535,9 +5845,9 @@
|
|
|
5535
5845
|
emitEvent: false,
|
|
5536
5846
|
onlySelf: false
|
|
5537
5847
|
});
|
|
5538
|
-
this.formGroup.patchValue((
|
|
5539
|
-
|
|
5540
|
-
|
|
5848
|
+
this.formGroup.patchValue((_15 = {},
|
|
5849
|
+
_15[field.key] = kwikidToolkit.getObjectDeepCopy([media]),
|
|
5850
|
+
_15), { emitEvent: false });
|
|
5541
5851
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
5542
5852
|
emitEvent: false
|
|
5543
5853
|
});
|
|
@@ -5557,11 +5867,11 @@
|
|
|
5557
5867
|
ALL_FORMS_DATA: this.allFormsData
|
|
5558
5868
|
}, this.takeAction.bind(this));
|
|
5559
5869
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5560
|
-
return __generator(this, function (
|
|
5561
|
-
switch (
|
|
5870
|
+
return __generator(this, function (_15) {
|
|
5871
|
+
switch (_15.label) {
|
|
5562
5872
|
case 0: return [4 /*yield*/, validations_4.validate(field.validation)];
|
|
5563
5873
|
case 1:
|
|
5564
|
-
|
|
5874
|
+
_15.sent();
|
|
5565
5875
|
return [2 /*return*/];
|
|
5566
5876
|
}
|
|
5567
5877
|
});
|
|
@@ -5578,7 +5888,7 @@
|
|
|
5578
5888
|
field_key: field.key,
|
|
5579
5889
|
field_type: field.type
|
|
5580
5890
|
});
|
|
5581
|
-
|
|
5891
|
+
_16.label = 3;
|
|
5582
5892
|
case 3: return [2 /*return*/];
|
|
5583
5893
|
}
|
|
5584
5894
|
});
|
|
@@ -5690,7 +6000,7 @@
|
|
|
5690
6000
|
* This method is used to update the files array with the new file and it's state and response from the api of uploading the file.
|
|
5691
6001
|
*/
|
|
5692
6002
|
KwikIDFormViewComponent.prototype.updateFiles = function (file, state, key) {
|
|
5693
|
-
var
|
|
6003
|
+
var _15;
|
|
5694
6004
|
var _this = this;
|
|
5695
6005
|
var _a;
|
|
5696
6006
|
var fileWithState = kwikidToolkit.mergeObjects(file, { state: state });
|
|
@@ -5718,9 +6028,9 @@
|
|
|
5718
6028
|
emitEvent: false,
|
|
5719
6029
|
onlySelf: false
|
|
5720
6030
|
});
|
|
5721
|
-
this.formGroup.patchValue((
|
|
5722
|
-
|
|
5723
|
-
|
|
6031
|
+
this.formGroup.patchValue((_15 = {},
|
|
6032
|
+
_15[key] = normalFiles,
|
|
6033
|
+
_15), { emitEvent: false });
|
|
5724
6034
|
this.getUnsavedDataState.emit(true);
|
|
5725
6035
|
if (field.isFormElement &&
|
|
5726
6036
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -5734,11 +6044,11 @@
|
|
|
5734
6044
|
ALL_FORMS_DATA: this.allFormsData
|
|
5735
6045
|
}, this.takeAction.bind(this));
|
|
5736
6046
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5737
|
-
return __generator(this, function (
|
|
5738
|
-
switch (
|
|
6047
|
+
return __generator(this, function (_15) {
|
|
6048
|
+
switch (_15.label) {
|
|
5739
6049
|
case 0: return [4 /*yield*/, validations_5.validate(field.validation)];
|
|
5740
6050
|
case 1:
|
|
5741
|
-
|
|
6051
|
+
_15.sent();
|
|
5742
6052
|
return [2 /*return*/];
|
|
5743
6053
|
}
|
|
5744
6054
|
});
|
|
@@ -5757,7 +6067,7 @@
|
|
|
5757
6067
|
*/
|
|
5758
6068
|
KwikIDFormViewComponent.prototype.uploadFile = function (field, file) {
|
|
5759
6069
|
return __awaiter(this, void 0, void 0, function () {
|
|
5760
|
-
return __generator(this, function (
|
|
6070
|
+
return __generator(this, function (_15) {
|
|
5761
6071
|
switch (field.type) {
|
|
5762
6072
|
case EFieldType.FILE:
|
|
5763
6073
|
this.updateFiles(file, "LOADING", field.key);
|
|
@@ -5843,11 +6153,11 @@
|
|
|
5843
6153
|
});
|
|
5844
6154
|
};
|
|
5845
6155
|
KwikIDFormViewComponent.prototype.handleOnClickFormFieldButton = function (field) {
|
|
5846
|
-
var e_10,
|
|
6156
|
+
var e_10, _15;
|
|
5847
6157
|
var formData = this.formGroup.getRawValue();
|
|
5848
6158
|
try {
|
|
5849
|
-
for (var
|
|
5850
|
-
var field_3 =
|
|
6159
|
+
for (var _16 = __values(this.formFields), _17 = _16.next(); !_17.done; _17 = _16.next()) {
|
|
6160
|
+
var field_3 = _17.value;
|
|
5851
6161
|
if (field_3.isFormElement) {
|
|
5852
6162
|
if (field_3.hidden) {
|
|
5853
6163
|
delete formData[field_3.key];
|
|
@@ -5861,22 +6171,22 @@
|
|
|
5861
6171
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
5862
6172
|
finally {
|
|
5863
6173
|
try {
|
|
5864
|
-
if (
|
|
6174
|
+
if (_17 && !_17.done && (_15 = _16.return)) _15.call(_16);
|
|
5865
6175
|
}
|
|
5866
6176
|
finally { if (e_10) throw e_10.error; }
|
|
5867
6177
|
}
|
|
5868
6178
|
var extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
5869
|
-
var
|
|
6179
|
+
var _15;
|
|
5870
6180
|
if (field.isFormElement && !field.hidden) {
|
|
5871
|
-
var fieldData = (
|
|
5872
|
-
|
|
6181
|
+
var fieldData = (_15 = {},
|
|
6182
|
+
_15[field.key] = {
|
|
5873
6183
|
key: field.key,
|
|
5874
6184
|
label: field.label,
|
|
5875
6185
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
5876
6186
|
type: field.type,
|
|
5877
6187
|
index: index
|
|
5878
6188
|
},
|
|
5879
|
-
|
|
6189
|
+
_15);
|
|
5880
6190
|
result[field.key] = fieldData[field.key];
|
|
5881
6191
|
}
|
|
5882
6192
|
return result;
|
|
@@ -5894,11 +6204,11 @@
|
|
|
5894
6204
|
};
|
|
5895
6205
|
// DOM Event Handlers
|
|
5896
6206
|
KwikIDFormViewComponent.prototype.handleGetKeyValue = function (e) {
|
|
5897
|
-
var
|
|
6207
|
+
var _15;
|
|
5898
6208
|
var _this = this;
|
|
5899
|
-
this.formGroup.patchValue((
|
|
5900
|
-
|
|
5901
|
-
|
|
6209
|
+
this.formGroup.patchValue((_15 = {},
|
|
6210
|
+
_15[e.key] = e.value,
|
|
6211
|
+
_15), { emitEvent: false });
|
|
5902
6212
|
var field = getFormFieldByKey(this.formFields, e.key);
|
|
5903
6213
|
this.formData[e.key] = convertFormFieldValueToStandardFormat(field, e.value);
|
|
5904
6214
|
this.getUnsavedDataState.emit(true);
|
|
@@ -5914,11 +6224,11 @@
|
|
|
5914
6224
|
ALL_FORMS_DATA: this.allFormsData
|
|
5915
6225
|
}, this.takeAction.bind(this));
|
|
5916
6226
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5917
|
-
return __generator(this, function (
|
|
5918
|
-
switch (
|
|
6227
|
+
return __generator(this, function (_15) {
|
|
6228
|
+
switch (_15.label) {
|
|
5919
6229
|
case 0: return [4 /*yield*/, validations_6.validate(field.validation)];
|
|
5920
6230
|
case 1:
|
|
5921
|
-
|
|
6231
|
+
_15.sent();
|
|
5922
6232
|
return [2 /*return*/];
|
|
5923
6233
|
}
|
|
5924
6234
|
});
|
|
@@ -5937,30 +6247,30 @@
|
|
|
5937
6247
|
return __awaiter(this, void 0, void 0, function () {
|
|
5938
6248
|
var resetFormFields, BYPASS_RESET_CONFIRM, CONFIRM_RESET;
|
|
5939
6249
|
var _this = this;
|
|
5940
|
-
return __generator(this, function (
|
|
6250
|
+
return __generator(this, function (_15) {
|
|
5941
6251
|
this.triggerLogs(ELogEventType$1.FORM__FIELD_RESET_BUTTON_CLICK, {
|
|
5942
6252
|
field_key: field.key
|
|
5943
6253
|
});
|
|
5944
6254
|
resetFormFields = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5945
|
-
var
|
|
5946
|
-
var e_12,
|
|
5947
|
-
return __generator(this, function (
|
|
5948
|
-
switch (
|
|
6255
|
+
var _15, _16, f, _17, _18, action, resetField, actions, e_11_1, e_12_1;
|
|
6256
|
+
var e_12, _19, e_11, _20;
|
|
6257
|
+
return __generator(this, function (_21) {
|
|
6258
|
+
switch (_21.label) {
|
|
5949
6259
|
case 0:
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
6260
|
+
_21.trys.push([0, 11, 12, 13]);
|
|
6261
|
+
_15 = __values(field.reset.fields), _16 = _15.next();
|
|
6262
|
+
_21.label = 1;
|
|
5953
6263
|
case 1:
|
|
5954
|
-
if (!!
|
|
5955
|
-
f =
|
|
5956
|
-
|
|
6264
|
+
if (!!_16.done) return [3 /*break*/, 10];
|
|
6265
|
+
f = _16.value;
|
|
6266
|
+
_21.label = 2;
|
|
5957
6267
|
case 2:
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
6268
|
+
_21.trys.push([2, 7, 8, 9]);
|
|
6269
|
+
_17 = (e_11 = void 0, __values(f.actions)), _18 = _17.next();
|
|
6270
|
+
_21.label = 3;
|
|
5961
6271
|
case 3:
|
|
5962
|
-
if (!!
|
|
5963
|
-
action =
|
|
6272
|
+
if (!!_18.done) return [3 /*break*/, 6];
|
|
6273
|
+
action = _18.value;
|
|
5964
6274
|
resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
5965
6275
|
actions = new kwikidToolkit.Action(action, {}, {
|
|
5966
6276
|
FIELD_CONFIG: resetField,
|
|
@@ -5972,33 +6282,33 @@
|
|
|
5972
6282
|
}, this.takeAction.bind(this));
|
|
5973
6283
|
return [4 /*yield*/, actions.execute()];
|
|
5974
6284
|
case 4:
|
|
5975
|
-
|
|
5976
|
-
|
|
6285
|
+
_21.sent();
|
|
6286
|
+
_21.label = 5;
|
|
5977
6287
|
case 5:
|
|
5978
|
-
|
|
6288
|
+
_18 = _17.next();
|
|
5979
6289
|
return [3 /*break*/, 3];
|
|
5980
6290
|
case 6: return [3 /*break*/, 9];
|
|
5981
6291
|
case 7:
|
|
5982
|
-
e_11_1 =
|
|
6292
|
+
e_11_1 = _21.sent();
|
|
5983
6293
|
e_11 = { error: e_11_1 };
|
|
5984
6294
|
return [3 /*break*/, 9];
|
|
5985
6295
|
case 8:
|
|
5986
6296
|
try {
|
|
5987
|
-
if (
|
|
6297
|
+
if (_18 && !_18.done && (_20 = _17.return)) _20.call(_17);
|
|
5988
6298
|
}
|
|
5989
6299
|
finally { if (e_11) throw e_11.error; }
|
|
5990
6300
|
return [7 /*endfinally*/];
|
|
5991
6301
|
case 9:
|
|
5992
|
-
|
|
6302
|
+
_16 = _15.next();
|
|
5993
6303
|
return [3 /*break*/, 1];
|
|
5994
6304
|
case 10: return [3 /*break*/, 13];
|
|
5995
6305
|
case 11:
|
|
5996
|
-
e_12_1 =
|
|
6306
|
+
e_12_1 = _21.sent();
|
|
5997
6307
|
e_12 = { error: e_12_1 };
|
|
5998
6308
|
return [3 /*break*/, 13];
|
|
5999
6309
|
case 12:
|
|
6000
6310
|
try {
|
|
6001
|
-
if (
|
|
6311
|
+
if (_16 && !_16.done && (_19 = _15.return)) _19.call(_15);
|
|
6002
6312
|
}
|
|
6003
6313
|
finally { if (e_12) throw e_12.error; }
|
|
6004
6314
|
return [7 /*endfinally*/];
|
|
@@ -6023,9 +6333,9 @@
|
|
|
6023
6333
|
KwikIDFormViewComponent.prototype.handleFieldApiCall = function (field, api) {
|
|
6024
6334
|
return __awaiter(this, void 0, void 0, function () {
|
|
6025
6335
|
var apis;
|
|
6026
|
-
var
|
|
6027
|
-
return __generator(this, function (
|
|
6028
|
-
switch (
|
|
6336
|
+
var _15, _16;
|
|
6337
|
+
return __generator(this, function (_17) {
|
|
6338
|
+
switch (_17.label) {
|
|
6029
6339
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
6030
6340
|
FIELD_CONFIG: field,
|
|
6031
6341
|
API_CONFIG: api,
|
|
@@ -6036,13 +6346,13 @@
|
|
|
6036
6346
|
ALL_FORMS_DATA: this.allFormsData
|
|
6037
6347
|
})];
|
|
6038
6348
|
case 1:
|
|
6039
|
-
api =
|
|
6349
|
+
api = _17.sent();
|
|
6040
6350
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
6041
6351
|
if (kwikidToolkit.checkObjectKeyExists(field.api, "request")) {
|
|
6042
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
6043
|
-
this.formGroup.patchValue((
|
|
6044
|
-
|
|
6045
|
-
|
|
6352
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_15 = {}, _15[field.key] = api.response.value, _15));
|
|
6353
|
+
this.formGroup.patchValue((_16 = {},
|
|
6354
|
+
_16[field.key] = api.response.value,
|
|
6355
|
+
_16), { emitEvent: false });
|
|
6046
6356
|
}
|
|
6047
6357
|
apis = new Apis({
|
|
6048
6358
|
FIELD_CONFIG: field,
|
|
@@ -6056,14 +6366,14 @@
|
|
|
6056
6366
|
}, this.takeAction.bind(this));
|
|
6057
6367
|
return [4 /*yield*/, apis.validateResponse()];
|
|
6058
6368
|
case 2:
|
|
6059
|
-
api =
|
|
6369
|
+
api = _17.sent();
|
|
6060
6370
|
return [3 /*break*/, 4];
|
|
6061
6371
|
case 3:
|
|
6062
6372
|
setTimeout(function () {
|
|
6063
6373
|
field["api"]["status"]["value"] = EApiStatusType.FAILED;
|
|
6064
6374
|
field["showLoader"] = false;
|
|
6065
6375
|
}, 500);
|
|
6066
|
-
|
|
6376
|
+
_17.label = 4;
|
|
6067
6377
|
case 4: return [2 /*return*/, { field: field, api: api }];
|
|
6068
6378
|
}
|
|
6069
6379
|
});
|
|
@@ -6072,8 +6382,8 @@
|
|
|
6072
6382
|
KwikIDFormViewComponent.prototype.handleApiCall = function (api) {
|
|
6073
6383
|
return __awaiter(this, void 0, void 0, function () {
|
|
6074
6384
|
var apis;
|
|
6075
|
-
return __generator(this, function (
|
|
6076
|
-
switch (
|
|
6385
|
+
return __generator(this, function (_15) {
|
|
6386
|
+
switch (_15.label) {
|
|
6077
6387
|
case 0: return [4 /*yield*/, this.executeApiCall(api, {
|
|
6078
6388
|
FORM_CONFIG: this.formConfig,
|
|
6079
6389
|
API_CONFIG: api,
|
|
@@ -6084,7 +6394,7 @@
|
|
|
6084
6394
|
ALL_FORMS_DATA: this.allFormsData
|
|
6085
6395
|
})];
|
|
6086
6396
|
case 1:
|
|
6087
|
-
api =
|
|
6397
|
+
api = _15.sent();
|
|
6088
6398
|
apis = new Apis({
|
|
6089
6399
|
FORM_CONFIG: this.formConfig,
|
|
6090
6400
|
API_CONFIG: api,
|
|
@@ -6097,38 +6407,38 @@
|
|
|
6097
6407
|
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 3];
|
|
6098
6408
|
return [4 /*yield*/, apis.validateResponse()];
|
|
6099
6409
|
case 2:
|
|
6100
|
-
api =
|
|
6101
|
-
|
|
6410
|
+
api = _15.sent();
|
|
6411
|
+
_15.label = 3;
|
|
6102
6412
|
case 3: return [2 /*return*/, { api: api }];
|
|
6103
6413
|
}
|
|
6104
6414
|
});
|
|
6105
6415
|
});
|
|
6106
6416
|
};
|
|
6107
6417
|
KwikIDFormViewComponent.prototype.executeApiCall = function (api, object) {
|
|
6108
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
|
|
6418
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12;
|
|
6109
6419
|
return __awaiter(this, void 0, void 0, function () {
|
|
6110
|
-
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers,
|
|
6111
|
-
return __generator(this, function (
|
|
6112
|
-
switch (
|
|
6420
|
+
var apis, apiCallResponse, apiCallResponseStatusCode, url, method, headers, isDecryptResponse, isVerifySignature, executedApiCall, _13_1, body, isEncryptRequestBody, isDecryptResponse, isVerifySignature, executedApiCall, _14_1;
|
|
6421
|
+
return __generator(this, function (_15) {
|
|
6422
|
+
switch (_15.label) {
|
|
6113
6423
|
case 0:
|
|
6114
6424
|
apis = new Apis(object, this.takeAction.bind(this));
|
|
6115
6425
|
return [4 /*yield*/, apis.setUrl()];
|
|
6116
6426
|
case 1:
|
|
6117
|
-
api =
|
|
6427
|
+
api = _15.sent();
|
|
6118
6428
|
return [4 /*yield*/, apis.setRequestHeaders()];
|
|
6119
6429
|
case 2:
|
|
6120
|
-
api =
|
|
6430
|
+
api = _15.sent();
|
|
6121
6431
|
return [4 /*yield*/, apis.validateRequestHeaders()];
|
|
6122
6432
|
case 3:
|
|
6123
|
-
api =
|
|
6433
|
+
api = _15.sent();
|
|
6124
6434
|
return [4 /*yield*/, apis.setRequestBody()];
|
|
6125
6435
|
case 4:
|
|
6126
|
-
api =
|
|
6436
|
+
api = _15.sent();
|
|
6127
6437
|
return [4 /*yield*/, apis.validateRequestBody()];
|
|
6128
6438
|
case 5:
|
|
6129
|
-
api =
|
|
6439
|
+
api = _15.sent();
|
|
6130
6440
|
apiCallResponse = {};
|
|
6131
|
-
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/,
|
|
6441
|
+
if (!this.isValidRequestHeadersAndBody(api)) return [3 /*break*/, 17];
|
|
6132
6442
|
if (!(api.request.url.hasOwnProperty("type") &&
|
|
6133
6443
|
api.request.url.type === EApiRequestUrlType.MOCK)) return [3 /*break*/, 7];
|
|
6134
6444
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
@@ -6137,100 +6447,76 @@
|
|
|
6137
6447
|
}, 1000); // 1000 ms = 1 sec
|
|
6138
6448
|
})];
|
|
6139
6449
|
case 6:
|
|
6140
|
-
apiCallResponse =
|
|
6450
|
+
apiCallResponse = _15.sent();
|
|
6141
6451
|
apiCallResponseStatusCode = (_b = (_a = api.request.url.props) === null || _a === void 0 ? void 0 : _a.statusCode) !== null && _b !== void 0 ? _b : 200; // Default Status Code for Mocked APIs
|
|
6142
|
-
return [3 /*break*/,
|
|
6452
|
+
return [3 /*break*/, 16];
|
|
6143
6453
|
case 7:
|
|
6144
6454
|
url = api.request.url.value;
|
|
6145
6455
|
method = (_d = (_c = api.request) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : "POST";
|
|
6146
6456
|
headers = Object.assign({ "Content-Type": "application/json" }, (((_f = (_e = api.request) === null || _e === void 0 ? void 0 : _e.headers) === null || _f === void 0 ? void 0 : _f.value) || {}));
|
|
6147
|
-
if (!(method === "GET")) return [3 /*break*/,
|
|
6457
|
+
if (!(method === "GET")) return [3 /*break*/, 12];
|
|
6458
|
+
// Trigger logs for API request with the method and API key
|
|
6148
6459
|
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, {
|
|
6149
6460
|
form_api_method: method,
|
|
6150
6461
|
form_api_key: (_g = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _g !== void 0 ? _g : ""
|
|
6151
6462
|
});
|
|
6152
|
-
|
|
6463
|
+
_15.label = 8;
|
|
6153
6464
|
case 8:
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6465
|
+
_15.trys.push([8, 10, , 11]);
|
|
6466
|
+
isDecryptResponse = (_j = (_h = api === null || api === void 0 ? void 0 : api.response) === null || _h === void 0 ? void 0 : _h.isSecure) !== null && _j !== void 0 ? _j : false;
|
|
6467
|
+
isVerifySignature = (_l = (_k = api === null || api === void 0 ? void 0 : api.response) === null || _k === void 0 ? void 0 : _k.isVerifySignature) !== null && _l !== void 0 ? _l : false;
|
|
6468
|
+
return [4 /*yield*/, this.formViewApiService.executeApiCall(url, "GET", {}, // No request body for GET method
|
|
6469
|
+
headers, false, // isEncryptRequestBody is not applicable for GET method
|
|
6470
|
+
isDecryptResponse, isVerifySignature)];
|
|
6159
6471
|
case 9:
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
return [
|
|
6472
|
+
executedApiCall = _15.sent();
|
|
6473
|
+
apiCallResponse = executedApiCall.data;
|
|
6474
|
+
apiCallResponseStatusCode = executedApiCall.status;
|
|
6475
|
+
return [3 /*break*/, 11];
|
|
6164
6476
|
case 10:
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
apiCallResponse =
|
|
6168
|
-
|
|
6169
|
-
|
|
6477
|
+
_13_1 = _15.sent();
|
|
6478
|
+
// Handle any errors
|
|
6479
|
+
apiCallResponse = {};
|
|
6480
|
+
apiCallResponseStatusCode = 500; // Internal Server Error
|
|
6481
|
+
return [3 /*break*/, 11];
|
|
6482
|
+
case 11: return [3 /*break*/, 16];
|
|
6170
6483
|
case 12:
|
|
6171
|
-
|
|
6172
|
-
|
|
6484
|
+
body = (_p = (_o = (_m = api === null || api === void 0 ? void 0 : api.request) === null || _m === void 0 ? void 0 : _m.body) === null || _o === void 0 ? void 0 : _o.value) !== null && _p !== void 0 ? _p : {};
|
|
6485
|
+
isEncryptRequestBody = (_s = (_r = (_q = api === null || api === void 0 ? void 0 : api.request) === null || _q === void 0 ? void 0 : _q.body) === null || _r === void 0 ? void 0 : _r.isSecure) !== null && _s !== void 0 ? _s : false;
|
|
6486
|
+
isDecryptResponse = (_u = (_t = api === null || api === void 0 ? void 0 : api.response) === null || _t === void 0 ? void 0 : _t.isSecure) !== null && _u !== void 0 ? _u : false;
|
|
6487
|
+
isVerifySignature = (_w = (_v = api === null || api === void 0 ? void 0 : api.response) === null || _v === void 0 ? void 0 : _v.isVerifySignature) !== null && _w !== void 0 ? _w : false;
|
|
6488
|
+
// Trigger logs for API request with the method and API key
|
|
6489
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, Object.assign({ form_api_method: method, form_api_key: (_x = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _x !== void 0 ? _x : "", form_api_request_encrypted: isEncryptRequestBody }, (!isEncryptRequestBody && {
|
|
6490
|
+
form_api_request_body: body
|
|
6491
|
+
})));
|
|
6492
|
+
_15.label = 13;
|
|
6173
6493
|
case 13:
|
|
6174
|
-
|
|
6175
|
-
return [
|
|
6494
|
+
_15.trys.push([13, 15, , 16]);
|
|
6495
|
+
return [4 /*yield*/, this.formViewApiService.executeApiCall(url, "POST", body, headers, isEncryptRequestBody, isDecryptResponse, isVerifySignature)];
|
|
6176
6496
|
case 14:
|
|
6177
|
-
|
|
6497
|
+
executedApiCall = _15.sent();
|
|
6498
|
+
apiCallResponse = executedApiCall.data;
|
|
6499
|
+
apiCallResponseStatusCode = executedApiCall.status;
|
|
6500
|
+
return [3 /*break*/, 16];
|
|
6501
|
+
case 15:
|
|
6502
|
+
_14_1 = _15.sent();
|
|
6503
|
+
// Handle any errors
|
|
6178
6504
|
apiCallResponse = {};
|
|
6179
|
-
apiCallResponseStatusCode = 500;
|
|
6180
|
-
return [3 /*break*/,
|
|
6181
|
-
case 15: return [3 /*break*/, 24];
|
|
6505
|
+
apiCallResponseStatusCode = 500; // Internal Server Error
|
|
6506
|
+
return [3 /*break*/, 16];
|
|
6182
6507
|
case 16:
|
|
6183
|
-
body = JSON.stringify((_l = (_k = (_j = api === null || api === void 0 ? void 0 : api.request) === null || _j === void 0 ? void 0 : _j.body) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : {});
|
|
6184
|
-
isSecure = (_p = (_o = (_m = api === null || api === void 0 ? void 0 : api.request) === null || _m === void 0 ? void 0 : _m.body) === null || _o === void 0 ? void 0 : _o.isSecure) !== null && _p !== void 0 ? _p : false;
|
|
6185
|
-
if (isSecure) {
|
|
6186
|
-
body = kwikidToolkit.encryptWithAES(body);
|
|
6187
|
-
}
|
|
6188
|
-
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST, Object.assign({ form_api_method: method, form_api_key: (_q = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _q !== void 0 ? _q : "", form_api_request_encrypted: isSecure }, (!isSecure && {
|
|
6189
|
-
form_api_request_body: body
|
|
6190
|
-
})));
|
|
6191
|
-
_7.label = 17;
|
|
6192
|
-
case 17:
|
|
6193
|
-
_7.trys.push([17, 23, , 24]);
|
|
6194
|
-
return [4 /*yield*/, fetch(url, {
|
|
6195
|
-
method: method,
|
|
6196
|
-
headers: Object.assign({}, headers),
|
|
6197
|
-
body: body
|
|
6198
|
-
})];
|
|
6199
|
-
case 18:
|
|
6200
|
-
response = _7.sent();
|
|
6201
|
-
isSecure_1 = (_r = api === null || api === void 0 ? void 0 : api.response) === null || _r === void 0 ? void 0 : _r.isSecure;
|
|
6202
|
-
if (!isSecure_1) return [3 /*break*/, 20];
|
|
6203
|
-
return [4 /*yield*/, response.text()];
|
|
6204
|
-
case 19:
|
|
6205
|
-
encryptedResponse = _7.sent();
|
|
6206
|
-
decryptedResponse = kwikidToolkit.decryptWithAES(encryptedResponse);
|
|
6207
|
-
apiCallResponse = JSON.parse(decryptedResponse);
|
|
6208
|
-
return [3 /*break*/, 22];
|
|
6209
|
-
case 20: return [4 /*yield*/, response.json()];
|
|
6210
|
-
case 21:
|
|
6211
|
-
apiCallResponse = _7.sent();
|
|
6212
|
-
_7.label = 22;
|
|
6213
|
-
case 22:
|
|
6214
|
-
apiCallResponseStatusCode = response.status;
|
|
6215
|
-
return [3 /*break*/, 24];
|
|
6216
|
-
case 23:
|
|
6217
|
-
err_2 = _7.sent();
|
|
6218
|
-
apiCallResponse = {};
|
|
6219
|
-
apiCallResponseStatusCode = 500;
|
|
6220
|
-
return [3 /*break*/, 24];
|
|
6221
|
-
case 24:
|
|
6222
6508
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "value", apiCallResponse);
|
|
6223
6509
|
api.response = kwikidToolkit.setValueToObjectPath(api.response, "status", apiCallResponseStatusCode);
|
|
6224
|
-
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE, Object.assign(Object.assign({ form_api_key: (
|
|
6510
|
+
this.triggerLogs(ELogEventType$1.FORM__API_RESPONSE, Object.assign(Object.assign({ form_api_key: (_y = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _y !== void 0 ? _y : "", form_api_response_encrypted: (_0 = (_z = api === null || api === void 0 ? void 0 : api.response) === null || _z === void 0 ? void 0 : _z.isSecure) !== null && _0 !== void 0 ? _0 : false }, (((_2 = !((_1 = api === null || api === void 0 ? void 0 : api.response) === null || _1 === void 0 ? void 0 : _1.isSecure)) !== null && _2 !== void 0 ? _2 : false) && {
|
|
6225
6511
|
form_api_response_body: apiCallResponse !== null && apiCallResponse !== void 0 ? apiCallResponse : {}
|
|
6226
6512
|
})), { form_api_status_code: apiCallResponseStatusCode }));
|
|
6227
|
-
return [3 /*break*/,
|
|
6228
|
-
case
|
|
6229
|
-
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_INVALID, Object.assign({ form_api_key: (
|
|
6230
|
-
form_api_request_body: (
|
|
6513
|
+
return [3 /*break*/, 18];
|
|
6514
|
+
case 17:
|
|
6515
|
+
this.triggerLogs(ELogEventType$1.FORM__API_REQUEST_INVALID, Object.assign({ form_api_key: (_3 = api === null || api === void 0 ? void 0 : api.apiKey) !== null && _3 !== void 0 ? _3 : "", form_api_request_encrypted: (_6 = (_5 = (_4 = api === null || api === void 0 ? void 0 : api.request) === null || _4 === void 0 ? void 0 : _4.body) === null || _5 === void 0 ? void 0 : _5.isSecure) !== null && _6 !== void 0 ? _6 : false }, (((_9 = !((_8 = (_7 = api === null || api === void 0 ? void 0 : api.request) === null || _7 === void 0 ? void 0 : _7.body) === null || _8 === void 0 ? void 0 : _8.isSecure)) !== null && _9 !== void 0 ? _9 : false) && {
|
|
6516
|
+
form_api_request_body: (_12 = (_11 = (_10 = api === null || api === void 0 ? void 0 : api.request) === null || _10 === void 0 ? void 0 : _10.body) === null || _11 === void 0 ? void 0 : _11.value) !== null && _12 !== void 0 ? _12 : {}
|
|
6231
6517
|
})));
|
|
6232
|
-
|
|
6233
|
-
case
|
|
6518
|
+
_15.label = 18;
|
|
6519
|
+
case 18: return [2 /*return*/, api];
|
|
6234
6520
|
}
|
|
6235
6521
|
});
|
|
6236
6522
|
});
|
|
@@ -6267,8 +6553,8 @@
|
|
|
6267
6553
|
KwikIDFormViewComponent.prototype.handleOnClickApiCall = function (e) {
|
|
6268
6554
|
return __awaiter(this, void 0, void 0, function () {
|
|
6269
6555
|
var field, apis;
|
|
6270
|
-
return __generator(this, function (
|
|
6271
|
-
switch (
|
|
6556
|
+
return __generator(this, function (_15) {
|
|
6557
|
+
switch (_15.label) {
|
|
6272
6558
|
case 0:
|
|
6273
6559
|
field = getFormFieldByKey(this.formFields, e.key);
|
|
6274
6560
|
if (!(field.type === EFieldType.API)) return [3 /*break*/, 5];
|
|
@@ -6283,7 +6569,7 @@
|
|
|
6283
6569
|
if (!kwikidToolkit.checkObjectKeyExists(field.api, "request")) return [3 /*break*/, 2];
|
|
6284
6570
|
return [4 /*yield*/, this.handleFieldApiCall(field, field.api)];
|
|
6285
6571
|
case 1:
|
|
6286
|
-
|
|
6572
|
+
_15.sent();
|
|
6287
6573
|
return [3 /*break*/, 4];
|
|
6288
6574
|
case 2:
|
|
6289
6575
|
apis = new Apis({
|
|
@@ -6297,11 +6583,11 @@
|
|
|
6297
6583
|
}, this.takeAction.bind(this));
|
|
6298
6584
|
return [4 /*yield*/, apis.callNextApi(field.api.entrypoint)];
|
|
6299
6585
|
case 3:
|
|
6300
|
-
|
|
6301
|
-
|
|
6586
|
+
_15.sent();
|
|
6587
|
+
_15.label = 4;
|
|
6302
6588
|
case 4:
|
|
6303
6589
|
this.hideApiLoader();
|
|
6304
|
-
|
|
6590
|
+
_15.label = 5;
|
|
6305
6591
|
case 5: return [2 /*return*/];
|
|
6306
6592
|
}
|
|
6307
6593
|
});
|
|
@@ -6347,11 +6633,11 @@
|
|
|
6347
6633
|
};
|
|
6348
6634
|
KwikIDFormViewComponent.prototype.handleOnClickSaveForm = function (e) {
|
|
6349
6635
|
return __awaiter(this, void 0, void 0, function () {
|
|
6350
|
-
var controls, firstFieldWithError, controls_1, controls_1_1, control, field,
|
|
6351
|
-
var e_15,
|
|
6636
|
+
var controls, firstFieldWithError, controls_1, controls_1_1, control, field, _15, _16, field, validations, e_13_1, formData, _17, _18, field, extendedFormData, _19, _20, postTask, task, e_14_1;
|
|
6637
|
+
var e_15, _21, e_13, _22, e_16, _23, e_14, _24;
|
|
6352
6638
|
var _this = this;
|
|
6353
|
-
return __generator(this, function (
|
|
6354
|
-
switch (
|
|
6639
|
+
return __generator(this, function (_25) {
|
|
6640
|
+
switch (_25.label) {
|
|
6355
6641
|
case 0:
|
|
6356
6642
|
if (e) {
|
|
6357
6643
|
this.triggerLogs(ELogEventType$1.FORM__SAVE_BUTTON_CLICK, {});
|
|
@@ -6381,7 +6667,7 @@
|
|
|
6381
6667
|
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
6382
6668
|
finally {
|
|
6383
6669
|
try {
|
|
6384
|
-
if (controls_1_1 && !controls_1_1.done && (
|
|
6670
|
+
if (controls_1_1 && !controls_1_1.done && (_21 = controls_1.return)) _21.call(controls_1);
|
|
6385
6671
|
}
|
|
6386
6672
|
finally { if (e_15) throw e_15.error; }
|
|
6387
6673
|
}
|
|
@@ -6392,14 +6678,14 @@
|
|
|
6392
6678
|
}, 3000);
|
|
6393
6679
|
return [2 /*return*/];
|
|
6394
6680
|
}
|
|
6395
|
-
|
|
6681
|
+
_25.label = 1;
|
|
6396
6682
|
case 1:
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6683
|
+
_25.trys.push([1, 6, 7, 8]);
|
|
6684
|
+
_15 = __values(this.formFields), _16 = _15.next();
|
|
6685
|
+
_25.label = 2;
|
|
6400
6686
|
case 2:
|
|
6401
|
-
if (!!
|
|
6402
|
-
field =
|
|
6687
|
+
if (!!_16.done) return [3 /*break*/, 5];
|
|
6688
|
+
field = _16.value;
|
|
6403
6689
|
if (!(field.isFormElement &&
|
|
6404
6690
|
!field.hidden &&
|
|
6405
6691
|
kwikidToolkit.checkObjectKeyExists(field, "validation") &&
|
|
@@ -6414,7 +6700,7 @@
|
|
|
6414
6700
|
}, this.takeAction.bind(this));
|
|
6415
6701
|
return [4 /*yield*/, validations.validate(field.validation)];
|
|
6416
6702
|
case 3:
|
|
6417
|
-
|
|
6703
|
+
_25.sent();
|
|
6418
6704
|
if (!field.validation.is_valid) {
|
|
6419
6705
|
this.toggleErrorNotification(true);
|
|
6420
6706
|
setTimeout(function () {
|
|
@@ -6422,26 +6708,26 @@
|
|
|
6422
6708
|
}, 3000);
|
|
6423
6709
|
return [2 /*return*/];
|
|
6424
6710
|
}
|
|
6425
|
-
|
|
6711
|
+
_25.label = 4;
|
|
6426
6712
|
case 4:
|
|
6427
|
-
|
|
6713
|
+
_16 = _15.next();
|
|
6428
6714
|
return [3 /*break*/, 2];
|
|
6429
6715
|
case 5: return [3 /*break*/, 8];
|
|
6430
6716
|
case 6:
|
|
6431
|
-
e_13_1 =
|
|
6717
|
+
e_13_1 = _25.sent();
|
|
6432
6718
|
e_13 = { error: e_13_1 };
|
|
6433
6719
|
return [3 /*break*/, 8];
|
|
6434
6720
|
case 7:
|
|
6435
6721
|
try {
|
|
6436
|
-
if (
|
|
6722
|
+
if (_16 && !_16.done && (_22 = _15.return)) _22.call(_15);
|
|
6437
6723
|
}
|
|
6438
6724
|
finally { if (e_13) throw e_13.error; }
|
|
6439
6725
|
return [7 /*endfinally*/];
|
|
6440
6726
|
case 8:
|
|
6441
6727
|
formData = this.formGroup.getRawValue();
|
|
6442
6728
|
try {
|
|
6443
|
-
for (
|
|
6444
|
-
field =
|
|
6729
|
+
for (_17 = __values(this.formFields), _18 = _17.next(); !_18.done; _18 = _17.next()) {
|
|
6730
|
+
field = _18.value;
|
|
6445
6731
|
if (field.isFormElement) {
|
|
6446
6732
|
if (field.hidden) {
|
|
6447
6733
|
delete formData[field.key];
|
|
@@ -6455,22 +6741,22 @@
|
|
|
6455
6741
|
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
6456
6742
|
finally {
|
|
6457
6743
|
try {
|
|
6458
|
-
if (
|
|
6744
|
+
if (_18 && !_18.done && (_23 = _17.return)) _23.call(_17);
|
|
6459
6745
|
}
|
|
6460
6746
|
finally { if (e_16) throw e_16.error; }
|
|
6461
6747
|
}
|
|
6462
6748
|
extendedFormData = this.formFields.reduce(function (result, field, index) {
|
|
6463
|
-
var
|
|
6749
|
+
var _15;
|
|
6464
6750
|
if (field.isFormElement && !field.hidden) {
|
|
6465
|
-
var fieldData = (
|
|
6466
|
-
|
|
6751
|
+
var fieldData = (_15 = {},
|
|
6752
|
+
_15[field.key] = {
|
|
6467
6753
|
key: field.key,
|
|
6468
6754
|
label: field.label,
|
|
6469
6755
|
value: kwikidToolkit.isEmptyValue(formData[field.key]) ? "" : formData[field.key],
|
|
6470
6756
|
type: field.type,
|
|
6471
6757
|
index: index
|
|
6472
6758
|
},
|
|
6473
|
-
|
|
6759
|
+
_15);
|
|
6474
6760
|
result[field.key] = fieldData[field.key];
|
|
6475
6761
|
}
|
|
6476
6762
|
return result;
|
|
@@ -6483,14 +6769,14 @@
|
|
|
6483
6769
|
if (!(kwikidToolkit.checkObjectKeyExists(this.formConfig, "tasks") &&
|
|
6484
6770
|
kwikidToolkit.checkObjectKeyExists(this.formConfig.tasks, "post"))) return [3 /*break*/, 18];
|
|
6485
6771
|
this.triggerLogs(ELogEventType$1.FORM__TASK_POST, {});
|
|
6486
|
-
|
|
6772
|
+
_25.label = 9;
|
|
6487
6773
|
case 9:
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6774
|
+
_25.trys.push([9, 15, 16, 17]);
|
|
6775
|
+
_19 = __values(this.formConfig.tasks.post), _20 = _19.next();
|
|
6776
|
+
_25.label = 10;
|
|
6491
6777
|
case 10:
|
|
6492
|
-
if (!!
|
|
6493
|
-
postTask =
|
|
6778
|
+
if (!!_20.done) return [3 /*break*/, 14];
|
|
6779
|
+
postTask = _20.value;
|
|
6494
6780
|
task = new Tasks(postTask, {
|
|
6495
6781
|
FORM_CONFIG: this.formConfig,
|
|
6496
6782
|
FORM_FIELDS: this.formFields,
|
|
@@ -6508,7 +6794,7 @@
|
|
|
6508
6794
|
}
|
|
6509
6795
|
return [4 /*yield*/, task.execute()];
|
|
6510
6796
|
case 11:
|
|
6511
|
-
|
|
6797
|
+
_25.sent();
|
|
6512
6798
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
6513
6799
|
return [4 /*yield*/, new Promise(function (resolve) {
|
|
6514
6800
|
var intervalId = setInterval(function () {
|
|
@@ -6520,22 +6806,22 @@
|
|
|
6520
6806
|
})];
|
|
6521
6807
|
case 12:
|
|
6522
6808
|
// Wait for ngOnChanges to be called before continuing to the next task
|
|
6523
|
-
|
|
6809
|
+
_25.sent();
|
|
6524
6810
|
if (this.stopTaskExecution) {
|
|
6525
6811
|
return [3 /*break*/, 14];
|
|
6526
6812
|
}
|
|
6527
|
-
|
|
6813
|
+
_25.label = 13;
|
|
6528
6814
|
case 13:
|
|
6529
|
-
|
|
6815
|
+
_20 = _19.next();
|
|
6530
6816
|
return [3 /*break*/, 10];
|
|
6531
6817
|
case 14: return [3 /*break*/, 17];
|
|
6532
6818
|
case 15:
|
|
6533
|
-
e_14_1 =
|
|
6819
|
+
e_14_1 = _25.sent();
|
|
6534
6820
|
e_14 = { error: e_14_1 };
|
|
6535
6821
|
return [3 /*break*/, 17];
|
|
6536
6822
|
case 16:
|
|
6537
6823
|
try {
|
|
6538
|
-
if (
|
|
6824
|
+
if (_20 && !_20.done && (_24 = _19.return)) _24.call(_19);
|
|
6539
6825
|
}
|
|
6540
6826
|
finally { if (e_14) throw e_14.error; }
|
|
6541
6827
|
return [7 /*endfinally*/];
|
|
@@ -6557,7 +6843,7 @@
|
|
|
6557
6843
|
data: kwikidToolkit.mergeObjects(formData, this.popupFormData, this.taskData),
|
|
6558
6844
|
extendedData: extendedFormData
|
|
6559
6845
|
});
|
|
6560
|
-
|
|
6846
|
+
_25.label = 19;
|
|
6561
6847
|
case 19: return [2 /*return*/];
|
|
6562
6848
|
}
|
|
6563
6849
|
});
|
|
@@ -6565,7 +6851,7 @@
|
|
|
6565
6851
|
};
|
|
6566
6852
|
KwikIDFormViewComponent.prototype.handleOnApiTimerStop = function (e) {
|
|
6567
6853
|
return __awaiter(this, void 0, void 0, function () {
|
|
6568
|
-
return __generator(this, function (
|
|
6854
|
+
return __generator(this, function (_15) {
|
|
6569
6855
|
this.fieldApiTimerMessageHide(e.key);
|
|
6570
6856
|
return [2 /*return*/];
|
|
6571
6857
|
});
|
|
@@ -6588,17 +6874,17 @@
|
|
|
6588
6874
|
});
|
|
6589
6875
|
};
|
|
6590
6876
|
KwikIDFormViewComponent.prototype.fieldGroupHide = function (fieldGroup) {
|
|
6591
|
-
var e_17,
|
|
6877
|
+
var e_17, _15;
|
|
6592
6878
|
try {
|
|
6593
|
-
for (var
|
|
6594
|
-
var fieldKey =
|
|
6879
|
+
for (var _16 = __values(this.fieldGroups[fieldGroup]), _17 = _16.next(); !_17.done; _17 = _16.next()) {
|
|
6880
|
+
var fieldKey = _17.value;
|
|
6595
6881
|
this.fieldHide(fieldKey);
|
|
6596
6882
|
}
|
|
6597
6883
|
}
|
|
6598
6884
|
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
6599
6885
|
finally {
|
|
6600
6886
|
try {
|
|
6601
|
-
if (
|
|
6887
|
+
if (_17 && !_17.done && (_15 = _16.return)) _15.call(_16);
|
|
6602
6888
|
}
|
|
6603
6889
|
finally { if (e_17) throw e_17.error; }
|
|
6604
6890
|
}
|
|
@@ -6616,17 +6902,17 @@
|
|
|
6616
6902
|
});
|
|
6617
6903
|
};
|
|
6618
6904
|
KwikIDFormViewComponent.prototype.fieldGroupShow = function (fieldGroup) {
|
|
6619
|
-
var e_18,
|
|
6905
|
+
var e_18, _15;
|
|
6620
6906
|
try {
|
|
6621
|
-
for (var
|
|
6622
|
-
var fieldKey =
|
|
6907
|
+
for (var _16 = __values(this.fieldGroups[fieldGroup]), _17 = _16.next(); !_17.done; _17 = _16.next()) {
|
|
6908
|
+
var fieldKey = _17.value;
|
|
6623
6909
|
this.fieldShow(fieldKey);
|
|
6624
6910
|
}
|
|
6625
6911
|
}
|
|
6626
6912
|
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
6627
6913
|
finally {
|
|
6628
6914
|
try {
|
|
6629
|
-
if (
|
|
6915
|
+
if (_17 && !_17.done && (_15 = _16.return)) _15.call(_16);
|
|
6630
6916
|
}
|
|
6631
6917
|
finally { if (e_18) throw e_18.error; }
|
|
6632
6918
|
}
|
|
@@ -6654,17 +6940,17 @@
|
|
|
6654
6940
|
});
|
|
6655
6941
|
};
|
|
6656
6942
|
KwikIDFormViewComponent.prototype.fieldGroupDisable = function (fieldGroup) {
|
|
6657
|
-
var e_19,
|
|
6943
|
+
var e_19, _15;
|
|
6658
6944
|
try {
|
|
6659
|
-
for (var
|
|
6660
|
-
var fieldKey =
|
|
6945
|
+
for (var _16 = __values(this.fieldGroups[fieldGroup]), _17 = _16.next(); !_17.done; _17 = _16.next()) {
|
|
6946
|
+
var fieldKey = _17.value;
|
|
6661
6947
|
this.fieldDisable(fieldKey);
|
|
6662
6948
|
}
|
|
6663
6949
|
}
|
|
6664
6950
|
catch (e_19_1) { e_19 = { error: e_19_1 }; }
|
|
6665
6951
|
finally {
|
|
6666
6952
|
try {
|
|
6667
|
-
if (
|
|
6953
|
+
if (_17 && !_17.done && (_15 = _16.return)) _15.call(_16);
|
|
6668
6954
|
}
|
|
6669
6955
|
finally { if (e_19) throw e_19.error; }
|
|
6670
6956
|
}
|
|
@@ -6692,23 +6978,23 @@
|
|
|
6692
6978
|
});
|
|
6693
6979
|
};
|
|
6694
6980
|
KwikIDFormViewComponent.prototype.fieldGroupEnable = function (fieldGroup) {
|
|
6695
|
-
var e_20,
|
|
6981
|
+
var e_20, _15;
|
|
6696
6982
|
try {
|
|
6697
|
-
for (var
|
|
6698
|
-
var fieldKey =
|
|
6983
|
+
for (var _16 = __values(this.fieldGroups[fieldGroup]), _17 = _16.next(); !_17.done; _17 = _16.next()) {
|
|
6984
|
+
var fieldKey = _17.value;
|
|
6699
6985
|
this.fieldEnable(fieldKey);
|
|
6700
6986
|
}
|
|
6701
6987
|
}
|
|
6702
6988
|
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
6703
6989
|
finally {
|
|
6704
6990
|
try {
|
|
6705
|
-
if (
|
|
6991
|
+
if (_17 && !_17.done && (_15 = _16.return)) _15.call(_16);
|
|
6706
6992
|
}
|
|
6707
6993
|
finally { if (e_20) throw e_20.error; }
|
|
6708
6994
|
}
|
|
6709
6995
|
};
|
|
6710
6996
|
KwikIDFormViewComponent.prototype.fieldReset = function (fieldKey) {
|
|
6711
|
-
var
|
|
6997
|
+
var _15;
|
|
6712
6998
|
// Find the field and its index in the formFields array
|
|
6713
6999
|
var field = getFormFieldByKey(this.formFields, fieldKey);
|
|
6714
7000
|
var fieldIndex = getFormFieldIndexByKey(this.formFields, fieldKey);
|
|
@@ -6719,9 +7005,9 @@
|
|
|
6719
7005
|
emitEvent: false,
|
|
6720
7006
|
onlySelf: true
|
|
6721
7007
|
});
|
|
6722
|
-
this.formGroup.patchValue((
|
|
6723
|
-
|
|
6724
|
-
|
|
7008
|
+
this.formGroup.patchValue((_15 = {},
|
|
7009
|
+
_15[field.key] = resetValue,
|
|
7010
|
+
_15), { emitEvent: false });
|
|
6725
7011
|
this.formGroup.controls[field.key].updateValueAndValidity({
|
|
6726
7012
|
emitEvent: true
|
|
6727
7013
|
});
|
|
@@ -6821,7 +7107,7 @@
|
|
|
6821
7107
|
KwikIDFormViewComponent.prototype.fieldApiTimerMessageShow = function (fieldKey, timer) {
|
|
6822
7108
|
return __awaiter(this, void 0, void 0, function () {
|
|
6823
7109
|
var field, fieldIndex;
|
|
6824
|
-
return __generator(this, function (
|
|
7110
|
+
return __generator(this, function (_15) {
|
|
6825
7111
|
field = getFormFieldByKey(this.formFields, fieldKey);
|
|
6826
7112
|
fieldIndex = this.formFields.findIndex(function (_) {
|
|
6827
7113
|
return field.key === _.key;
|
|
@@ -6842,7 +7128,7 @@
|
|
|
6842
7128
|
return __awaiter(this, void 0, void 0, function () {
|
|
6843
7129
|
var field, fieldIndex, validations_7;
|
|
6844
7130
|
var _this = this;
|
|
6845
|
-
return __generator(this, function (
|
|
7131
|
+
return __generator(this, function (_15) {
|
|
6846
7132
|
field = getFormFieldByKey(this.formFields, fieldKey);
|
|
6847
7133
|
fieldIndex = this.formFields.findIndex(function (_) {
|
|
6848
7134
|
return field.key === _.key;
|
|
@@ -6860,11 +7146,11 @@
|
|
|
6860
7146
|
ALL_FORMS_DATA: this.allFormsData
|
|
6861
7147
|
}, this.takeAction.bind(this));
|
|
6862
7148
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6863
|
-
return __generator(this, function (
|
|
6864
|
-
switch (
|
|
7149
|
+
return __generator(this, function (_15) {
|
|
7150
|
+
switch (_15.label) {
|
|
6865
7151
|
case 0: return [4 /*yield*/, validations_7.validate(field.validation)];
|
|
6866
7152
|
case 1:
|
|
6867
|
-
|
|
7153
|
+
_15.sent();
|
|
6868
7154
|
return [2 /*return*/];
|
|
6869
7155
|
}
|
|
6870
7156
|
});
|
|
@@ -6889,13 +7175,13 @@
|
|
|
6889
7175
|
KwikIDFormViewComponent.prototype.setValue = function (action, object) {
|
|
6890
7176
|
return __awaiter(this, void 0, void 0, function () {
|
|
6891
7177
|
var source, sourceValue;
|
|
6892
|
-
return __generator(this, function (
|
|
6893
|
-
switch (
|
|
7178
|
+
return __generator(this, function (_15) {
|
|
7179
|
+
switch (_15.label) {
|
|
6894
7180
|
case 0:
|
|
6895
7181
|
source = new kwikidToolkit.Source(object);
|
|
6896
7182
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6897
7183
|
case 1:
|
|
6898
|
-
sourceValue =
|
|
7184
|
+
sourceValue = _15.sent();
|
|
6899
7185
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
6900
7186
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
6901
7187
|
this.formData = source.object.FORM_DATA;
|
|
@@ -6910,13 +7196,13 @@
|
|
|
6910
7196
|
KwikIDFormViewComponent.prototype.setFieldDefaultValue = function (action, object) {
|
|
6911
7197
|
return __awaiter(this, void 0, void 0, function () {
|
|
6912
7198
|
var source, sourceValue;
|
|
6913
|
-
return __generator(this, function (
|
|
6914
|
-
switch (
|
|
7199
|
+
return __generator(this, function (_15) {
|
|
7200
|
+
switch (_15.label) {
|
|
6915
7201
|
case 0:
|
|
6916
7202
|
source = new kwikidToolkit.Source(object);
|
|
6917
7203
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
6918
7204
|
case 1:
|
|
6919
|
-
sourceValue =
|
|
7205
|
+
sourceValue = _15.sent();
|
|
6920
7206
|
source.setValueToSource({
|
|
6921
7207
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6922
7208
|
props: {
|
|
@@ -6948,7 +7234,7 @@
|
|
|
6948
7234
|
KwikIDFormViewComponent.prototype.setApiStatus = function (action, object) {
|
|
6949
7235
|
return __awaiter(this, void 0, void 0, function () {
|
|
6950
7236
|
var source, sourceValue;
|
|
6951
|
-
return __generator(this, function (
|
|
7237
|
+
return __generator(this, function (_15) {
|
|
6952
7238
|
source = new kwikidToolkit.Source(object);
|
|
6953
7239
|
sourceValue = action.props.status;
|
|
6954
7240
|
source.setValueToSource({
|
|
@@ -6968,13 +7254,13 @@
|
|
|
6968
7254
|
KwikIDFormViewComponent.prototype.setApiHeaderValue = function (action, object) {
|
|
6969
7255
|
return __awaiter(this, void 0, void 0, function () {
|
|
6970
7256
|
var source, sourceValue;
|
|
6971
|
-
return __generator(this, function (
|
|
6972
|
-
switch (
|
|
7257
|
+
return __generator(this, function (_15) {
|
|
7258
|
+
switch (_15.label) {
|
|
6973
7259
|
case 0:
|
|
6974
7260
|
source = new kwikidToolkit.Source(object);
|
|
6975
7261
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
6976
7262
|
case 1:
|
|
6977
|
-
sourceValue =
|
|
7263
|
+
sourceValue = _15.sent();
|
|
6978
7264
|
source.setValueToSource({
|
|
6979
7265
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
6980
7266
|
props: {
|
|
@@ -6993,7 +7279,7 @@
|
|
|
6993
7279
|
KwikIDFormViewComponent.prototype.setApiHeaderValidity = function (action, object) {
|
|
6994
7280
|
return __awaiter(this, void 0, void 0, function () {
|
|
6995
7281
|
var source, sourceValue;
|
|
6996
|
-
return __generator(this, function (
|
|
7282
|
+
return __generator(this, function (_15) {
|
|
6997
7283
|
source = new kwikidToolkit.Source(object);
|
|
6998
7284
|
sourceValue = action.props.valid;
|
|
6999
7285
|
source.setValueToSource({
|
|
@@ -7013,13 +7299,13 @@
|
|
|
7013
7299
|
KwikIDFormViewComponent.prototype.setApiBodyValue = function (action, object) {
|
|
7014
7300
|
return __awaiter(this, void 0, void 0, function () {
|
|
7015
7301
|
var source, sourceValue;
|
|
7016
|
-
return __generator(this, function (
|
|
7017
|
-
switch (
|
|
7302
|
+
return __generator(this, function (_15) {
|
|
7303
|
+
switch (_15.label) {
|
|
7018
7304
|
case 0:
|
|
7019
7305
|
source = new kwikidToolkit.Source(object);
|
|
7020
7306
|
return [4 /*yield*/, source.getValueFromSource(action.props.source)];
|
|
7021
7307
|
case 1:
|
|
7022
|
-
sourceValue =
|
|
7308
|
+
sourceValue = _15.sent();
|
|
7023
7309
|
source.setValueToSource({
|
|
7024
7310
|
key: kwikidToolkit.ESourceKey.OBJECT,
|
|
7025
7311
|
props: {
|
|
@@ -7038,7 +7324,7 @@
|
|
|
7038
7324
|
KwikIDFormViewComponent.prototype.setApiBodyValidity = function (action, object) {
|
|
7039
7325
|
return __awaiter(this, void 0, void 0, function () {
|
|
7040
7326
|
var source, sourceValue;
|
|
7041
|
-
return __generator(this, function (
|
|
7327
|
+
return __generator(this, function (_15) {
|
|
7042
7328
|
source = new kwikidToolkit.Source(object);
|
|
7043
7329
|
sourceValue = action.props.valid;
|
|
7044
7330
|
source.setValueToSource({
|
|
@@ -7058,7 +7344,7 @@
|
|
|
7058
7344
|
KwikIDFormViewComponent.prototype.setFieldValidity = function (action, object) {
|
|
7059
7345
|
return __awaiter(this, void 0, void 0, function () {
|
|
7060
7346
|
var source, sourceValue;
|
|
7061
|
-
return __generator(this, function (
|
|
7347
|
+
return __generator(this, function (_15) {
|
|
7062
7348
|
source = new kwikidToolkit.Source(object);
|
|
7063
7349
|
sourceValue = action.props.valid;
|
|
7064
7350
|
source.setValueToSource({
|
|
@@ -7078,18 +7364,18 @@
|
|
|
7078
7364
|
KwikIDFormViewComponent.prototype.setDropdownOptions = function (action, object) {
|
|
7079
7365
|
return __awaiter(this, void 0, void 0, function () {
|
|
7080
7366
|
var source, sourceValue, appendToPath, appendToPathStr, optionsPath;
|
|
7081
|
-
return __generator(this, function (
|
|
7082
|
-
switch (
|
|
7367
|
+
return __generator(this, function (_15) {
|
|
7368
|
+
switch (_15.label) {
|
|
7083
7369
|
case 0:
|
|
7084
7370
|
source = new kwikidToolkit.Source(object);
|
|
7085
7371
|
return [4 /*yield*/, source.getValueFromSource(action.props.value.source)];
|
|
7086
7372
|
case 1:
|
|
7087
|
-
sourceValue =
|
|
7373
|
+
sourceValue = _15.sent();
|
|
7088
7374
|
if (!kwikidToolkit.checkObjectKeyExists(action.props, "options")) return [3 /*break*/, 4];
|
|
7089
7375
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.options, "appendToPath")) return [3 /*break*/, 3];
|
|
7090
7376
|
return [4 /*yield*/, source.getValueFromSource(action.props.options.appendToPath.source)];
|
|
7091
7377
|
case 2:
|
|
7092
|
-
appendToPath =
|
|
7378
|
+
appendToPath = _15.sent();
|
|
7093
7379
|
if (kwikidToolkit.isNotEmptyValue(appendToPath)) {
|
|
7094
7380
|
appendToPathStr = kwikidToolkit.replaceString(appendToPath.match("" + action.props.options.appendToPath.filterSourceValue)[0], "[^a-zA-Z0-9_]", "_");
|
|
7095
7381
|
optionsPath = "" + action.props.options.path + appendToPathStr;
|
|
@@ -7098,7 +7384,7 @@
|
|
|
7098
7384
|
return [3 /*break*/, 4];
|
|
7099
7385
|
case 3:
|
|
7100
7386
|
sourceValue = kwikidToolkit.getObjectValueFromPath(sourceValue, action.props.options.path);
|
|
7101
|
-
|
|
7387
|
+
_15.label = 4;
|
|
7102
7388
|
case 4:
|
|
7103
7389
|
source.setValueToSource(action.props.value.destination, sourceValue);
|
|
7104
7390
|
object.FIELD_CONFIG = source.object.FIELD_CONFIG;
|
|
@@ -7113,19 +7399,19 @@
|
|
|
7113
7399
|
KwikIDFormViewComponent.prototype.apiCall = function (action, object) {
|
|
7114
7400
|
return __awaiter(this, void 0, void 0, function () {
|
|
7115
7401
|
var apiConfig, response;
|
|
7116
|
-
var
|
|
7117
|
-
return __generator(this, function (
|
|
7118
|
-
switch (
|
|
7402
|
+
var _15;
|
|
7403
|
+
return __generator(this, function (_16) {
|
|
7404
|
+
switch (_16.label) {
|
|
7119
7405
|
case 0:
|
|
7120
7406
|
apiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
7121
7407
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
7122
7408
|
case 1:
|
|
7123
|
-
response =
|
|
7409
|
+
response = _16.sent();
|
|
7124
7410
|
apiConfig = response.api;
|
|
7125
7411
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, apiConfig);
|
|
7126
|
-
this.formData = kwikidToolkit.mergeObjects(this.formData, (
|
|
7127
|
-
|
|
7128
|
-
|
|
7412
|
+
this.formData = kwikidToolkit.mergeObjects(this.formData, (_15 = {},
|
|
7413
|
+
_15[action.props.formApiKey] = apiConfig.response.value,
|
|
7414
|
+
_15));
|
|
7129
7415
|
return [2 /*return*/, apiConfig];
|
|
7130
7416
|
}
|
|
7131
7417
|
});
|
|
@@ -7134,13 +7420,13 @@
|
|
|
7134
7420
|
KwikIDFormViewComponent.prototype.fieldApiCall = function (action, object) {
|
|
7135
7421
|
return __awaiter(this, void 0, void 0, function () {
|
|
7136
7422
|
var apiConfig;
|
|
7137
|
-
return __generator(this, function (
|
|
7138
|
-
switch (
|
|
7423
|
+
return __generator(this, function (_15) {
|
|
7424
|
+
switch (_15.label) {
|
|
7139
7425
|
case 0:
|
|
7140
7426
|
this.showApiLoader();
|
|
7141
7427
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
7142
7428
|
case 1:
|
|
7143
|
-
apiConfig =
|
|
7429
|
+
apiConfig = _15.sent();
|
|
7144
7430
|
this.hideApiLoader();
|
|
7145
7431
|
return [2 /*return*/];
|
|
7146
7432
|
}
|
|
@@ -7150,8 +7436,8 @@
|
|
|
7150
7436
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCalls = function (action, object) {
|
|
7151
7437
|
return __awaiter(this, void 0, void 0, function () {
|
|
7152
7438
|
var entrypointApiKey, field, endpoints, nextApiIndex, apiConfig, response;
|
|
7153
|
-
return __generator(this, function (
|
|
7154
|
-
switch (
|
|
7439
|
+
return __generator(this, function (_15) {
|
|
7440
|
+
switch (_15.label) {
|
|
7155
7441
|
case 0:
|
|
7156
7442
|
entrypointApiKey = action.props.apiKey;
|
|
7157
7443
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
@@ -7160,7 +7446,7 @@
|
|
|
7160
7446
|
apiConfig = endpoints[nextApiIndex];
|
|
7161
7447
|
return [4 /*yield*/, this.handleFieldApiCall(field, apiConfig)];
|
|
7162
7448
|
case 1:
|
|
7163
|
-
response =
|
|
7449
|
+
response = _15.sent();
|
|
7164
7450
|
field = response.field;
|
|
7165
7451
|
field.api.endpoints[nextApiIndex] = response.api;
|
|
7166
7452
|
return [2 /*return*/];
|
|
@@ -7171,15 +7457,15 @@
|
|
|
7171
7457
|
KwikIDFormViewComponent.prototype.fieldMultipleApiCallsEnd = function (action, object) {
|
|
7172
7458
|
return __awaiter(this, void 0, void 0, function () {
|
|
7173
7459
|
var field, multipleApiCallResponses;
|
|
7174
|
-
var
|
|
7175
|
-
return __generator(this, function (
|
|
7460
|
+
var _15;
|
|
7461
|
+
return __generator(this, function (_16) {
|
|
7176
7462
|
field = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
7177
7463
|
multipleApiCallResponses = {};
|
|
7178
7464
|
field.api.endpoints.map(function (api) {
|
|
7179
7465
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
7180
7466
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
7181
7467
|
});
|
|
7182
|
-
this.formData = Object.assign(Object.assign({}, this.formData), (
|
|
7468
|
+
this.formData = Object.assign(Object.assign({}, this.formData), (_15 = {}, _15[field.key] = multipleApiCallResponses, _15));
|
|
7183
7469
|
this.patchFormGroup(this.formData);
|
|
7184
7470
|
return [2 /*return*/];
|
|
7185
7471
|
});
|
|
@@ -7188,17 +7474,17 @@
|
|
|
7188
7474
|
KwikIDFormViewComponent.prototype.taskApiCall = function (action, object) {
|
|
7189
7475
|
return __awaiter(this, void 0, void 0, function () {
|
|
7190
7476
|
var apiConfig;
|
|
7191
|
-
var
|
|
7192
|
-
return __generator(this, function (
|
|
7193
|
-
switch (
|
|
7477
|
+
var _15;
|
|
7478
|
+
return __generator(this, function (_16) {
|
|
7479
|
+
switch (_16.label) {
|
|
7194
7480
|
case 0:
|
|
7195
7481
|
this.showApiLoader();
|
|
7196
7482
|
return [4 /*yield*/, this.apiCall(action, object)];
|
|
7197
7483
|
case 1:
|
|
7198
|
-
apiConfig =
|
|
7199
|
-
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (
|
|
7200
|
-
|
|
7201
|
-
|
|
7484
|
+
apiConfig = _16.sent();
|
|
7485
|
+
this.taskData = kwikidToolkit.mergeObjects(this.taskData, (_15 = {},
|
|
7486
|
+
_15[action.props.formApiKey] = apiConfig.response.value,
|
|
7487
|
+
_15));
|
|
7202
7488
|
this.waitingForChanges = false;
|
|
7203
7489
|
this.hideApiLoader();
|
|
7204
7490
|
return [2 /*return*/];
|
|
@@ -7209,8 +7495,8 @@
|
|
|
7209
7495
|
KwikIDFormViewComponent.prototype.taskMultipleApiCalls = function (action, object) {
|
|
7210
7496
|
return __awaiter(this, void 0, void 0, function () {
|
|
7211
7497
|
var multipleApiConfig, entrypointApiKey_1, endpoints, nextApiIndex, apiConfig, response, apis;
|
|
7212
|
-
return __generator(this, function (
|
|
7213
|
-
switch (
|
|
7498
|
+
return __generator(this, function (_15) {
|
|
7499
|
+
switch (_15.label) {
|
|
7214
7500
|
case 0:
|
|
7215
7501
|
this.showApiLoader();
|
|
7216
7502
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
@@ -7221,7 +7507,7 @@
|
|
|
7221
7507
|
apiConfig = endpoints[nextApiIndex];
|
|
7222
7508
|
return [4 /*yield*/, this.handleApiCall(apiConfig)];
|
|
7223
7509
|
case 1:
|
|
7224
|
-
response =
|
|
7510
|
+
response = _15.sent();
|
|
7225
7511
|
multipleApiConfig.endpoints[nextApiIndex] = response.api;
|
|
7226
7512
|
this.formConfig = kwikidToolkit.setValueToObjectPath(this.formConfig, "apis." + action.props.formApiKey, multipleApiConfig);
|
|
7227
7513
|
this.hideApiLoader();
|
|
@@ -7238,8 +7524,8 @@
|
|
|
7238
7524
|
}, this.takeAction.bind(this));
|
|
7239
7525
|
return [4 /*yield*/, apis.callNextApi(multipleApiConfig.entrypoint)];
|
|
7240
7526
|
case 3:
|
|
7241
|
-
|
|
7242
|
-
|
|
7527
|
+
_15.sent();
|
|
7528
|
+
_15.label = 4;
|
|
7243
7529
|
case 4: return [2 /*return*/];
|
|
7244
7530
|
}
|
|
7245
7531
|
});
|
|
@@ -7248,15 +7534,15 @@
|
|
|
7248
7534
|
KwikIDFormViewComponent.prototype.taskMultipleApiCallsEnd = function (action, object) {
|
|
7249
7535
|
return __awaiter(this, void 0, void 0, function () {
|
|
7250
7536
|
var multipleApiConfig, multipleApiCallResponses;
|
|
7251
|
-
var
|
|
7252
|
-
return __generator(this, function (
|
|
7537
|
+
var _15;
|
|
7538
|
+
return __generator(this, function (_16) {
|
|
7253
7539
|
multipleApiConfig = this.formConfig.apis[action.props.formApiKey];
|
|
7254
7540
|
multipleApiCallResponses = {};
|
|
7255
7541
|
multipleApiConfig.endpoints.map(function (api) {
|
|
7256
7542
|
if (kwikidToolkit.checkObjectKeyExists(api.response, "value"))
|
|
7257
7543
|
multipleApiCallResponses = kwikidToolkit.setValueToObjectPath(multipleApiCallResponses, "" + api.apiKey, api.response.value);
|
|
7258
7544
|
});
|
|
7259
|
-
this.taskData = Object.assign(Object.assign({}, this.taskData), (
|
|
7545
|
+
this.taskData = Object.assign(Object.assign({}, this.taskData), (_15 = {}, _15[action.props.formApiKey] = multipleApiCallResponses, _15));
|
|
7260
7546
|
this.waitingForChanges = false;
|
|
7261
7547
|
this.hideApiLoader();
|
|
7262
7548
|
return [2 /*return*/];
|
|
@@ -7450,12 +7736,12 @@
|
|
|
7450
7736
|
this.alertService
|
|
7451
7737
|
.open("" + message, {
|
|
7452
7738
|
status: type === "error"
|
|
7453
|
-
?
|
|
7739
|
+
? i5.TuiNotification.Error
|
|
7454
7740
|
: type === "warning"
|
|
7455
|
-
?
|
|
7741
|
+
? i5.TuiNotification.Warning
|
|
7456
7742
|
: type === "success"
|
|
7457
|
-
?
|
|
7458
|
-
:
|
|
7743
|
+
? i5.TuiNotification.Success
|
|
7744
|
+
: i5.TuiNotification.Info
|
|
7459
7745
|
})
|
|
7460
7746
|
.subscribe({
|
|
7461
7747
|
error: function () {
|
|
@@ -7468,7 +7754,7 @@
|
|
|
7468
7754
|
};
|
|
7469
7755
|
KwikIDFormViewComponent.prototype.takeActionOnFieldGroup = function (action, object) {
|
|
7470
7756
|
return __awaiter(this, void 0, void 0, function () {
|
|
7471
|
-
return __generator(this, function (
|
|
7757
|
+
return __generator(this, function (_15) {
|
|
7472
7758
|
/**
|
|
7473
7759
|
* This below code is currently commented because not all actions need to be logged at backend.
|
|
7474
7760
|
* Will look later into where only specific actions needs to be logged or all.
|
|
@@ -7503,12 +7789,12 @@
|
|
|
7503
7789
|
KwikIDFormViewComponent.prototype.takeAction = function (action, object) {
|
|
7504
7790
|
var _a, _b, _c, _d, _e, _f;
|
|
7505
7791
|
return __awaiter(this, void 0, void 0, function () {
|
|
7506
|
-
var
|
|
7507
|
-
return __generator(this, function (
|
|
7508
|
-
switch (
|
|
7792
|
+
var _15, fieldErrorShow_Source, fieldErrorShowSourceValue, fieldErrorHide_Source, fieldErrorHideSourceValue, redirectToUrl_Source, redirectToUrlSourceValue, previewErrorShow_Source, previewErrorShowSourceValue, fieldHtmlMessage_Source, fieldHtmlMessageSourceValue;
|
|
7793
|
+
return __generator(this, function (_16) {
|
|
7794
|
+
switch (_16.label) {
|
|
7509
7795
|
case 0:
|
|
7510
|
-
|
|
7511
|
-
switch (
|
|
7796
|
+
_15 = action.key;
|
|
7797
|
+
switch (_15) {
|
|
7512
7798
|
case EActionKey.FIELD_HIDE: return [3 /*break*/, 1];
|
|
7513
7799
|
case EActionKey.FIELD_SHOW: return [3 /*break*/, 2];
|
|
7514
7800
|
case EActionKey.FIELD_DISABLE: return [3 /*break*/, 3];
|
|
@@ -7572,7 +7858,7 @@
|
|
|
7572
7858
|
fieldErrorShow_Source = new kwikidToolkit.Source(object);
|
|
7573
7859
|
return [4 /*yield*/, fieldErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
7574
7860
|
case 7:
|
|
7575
|
-
fieldErrorShowSourceValue =
|
|
7861
|
+
fieldErrorShowSourceValue = _16.sent();
|
|
7576
7862
|
if (typeof fieldErrorShowSourceValue == "string" ||
|
|
7577
7863
|
typeof fieldErrorShowSourceValue == "number") {
|
|
7578
7864
|
fieldErrorShowSourceValue = String(fieldErrorShowSourceValue);
|
|
@@ -7581,7 +7867,7 @@
|
|
|
7581
7867
|
fieldErrorShowSourceValue = "";
|
|
7582
7868
|
}
|
|
7583
7869
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorShowSourceValue);
|
|
7584
|
-
|
|
7870
|
+
_16.label = 8;
|
|
7585
7871
|
case 8:
|
|
7586
7872
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
7587
7873
|
this.fieldErrorShow(action.props.fieldKey, action.props.message);
|
|
@@ -7591,7 +7877,7 @@
|
|
|
7591
7877
|
fieldErrorHide_Source = new kwikidToolkit.Source(object);
|
|
7592
7878
|
return [4 /*yield*/, fieldErrorHide_Source.getValueFromSource(action.props.message.source)];
|
|
7593
7879
|
case 10:
|
|
7594
|
-
fieldErrorHideSourceValue =
|
|
7880
|
+
fieldErrorHideSourceValue = _16.sent();
|
|
7595
7881
|
if (typeof fieldErrorHideSourceValue == "string" ||
|
|
7596
7882
|
typeof fieldErrorHideSourceValue == "number") {
|
|
7597
7883
|
fieldErrorHideSourceValue = String(fieldErrorHideSourceValue);
|
|
@@ -7600,7 +7886,7 @@
|
|
|
7600
7886
|
fieldErrorHideSourceValue = "";
|
|
7601
7887
|
}
|
|
7602
7888
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldErrorHideSourceValue);
|
|
7603
|
-
|
|
7889
|
+
_16.label = 11;
|
|
7604
7890
|
case 11:
|
|
7605
7891
|
this.fieldErrorHide(action.props.fieldKey, action.props.message);
|
|
7606
7892
|
return [3 /*break*/, 70];
|
|
@@ -7612,89 +7898,89 @@
|
|
|
7612
7898
|
return [3 /*break*/, 70];
|
|
7613
7899
|
case 14: return [4 /*yield*/, this.fieldApiTimerMessageShow(action.props.fieldKey, action.props.timer)];
|
|
7614
7900
|
case 15:
|
|
7615
|
-
|
|
7901
|
+
_16.sent();
|
|
7616
7902
|
return [3 /*break*/, 70];
|
|
7617
7903
|
case 16: return [4 /*yield*/, this.fieldApiTimerMessageHide(action.props.fieldKey)];
|
|
7618
7904
|
case 17:
|
|
7619
|
-
|
|
7905
|
+
_16.sent();
|
|
7620
7906
|
return [3 /*break*/, 70];
|
|
7621
7907
|
case 18: return [4 /*yield*/, this.setValue(action, object)];
|
|
7622
7908
|
case 19:
|
|
7623
|
-
|
|
7909
|
+
_16.sent();
|
|
7624
7910
|
return [3 /*break*/, 70];
|
|
7625
7911
|
case 20: return [4 /*yield*/, this.setFieldDefaultValue(action, object)];
|
|
7626
7912
|
case 21:
|
|
7627
|
-
|
|
7913
|
+
_16.sent();
|
|
7628
7914
|
return [3 /*break*/, 70];
|
|
7629
7915
|
case 22: return [4 /*yield*/, this.setApiStatus(action, object)];
|
|
7630
7916
|
case 23:
|
|
7631
|
-
|
|
7917
|
+
_16.sent();
|
|
7632
7918
|
return [3 /*break*/, 70];
|
|
7633
7919
|
case 24: return [4 /*yield*/, this.setApiHeaderValue(action, object)];
|
|
7634
7920
|
case 25:
|
|
7635
|
-
|
|
7921
|
+
_16.sent();
|
|
7636
7922
|
return [3 /*break*/, 70];
|
|
7637
7923
|
case 26: return [4 /*yield*/, this.setApiHeaderValidity(action, object)];
|
|
7638
7924
|
case 27:
|
|
7639
|
-
|
|
7925
|
+
_16.sent();
|
|
7640
7926
|
return [3 /*break*/, 70];
|
|
7641
7927
|
case 28: return [4 /*yield*/, this.setApiBodyValue(action, object)];
|
|
7642
7928
|
case 29:
|
|
7643
|
-
|
|
7929
|
+
_16.sent();
|
|
7644
7930
|
return [3 /*break*/, 70];
|
|
7645
7931
|
case 30: return [4 /*yield*/, this.setApiBodyValidity(action, object)];
|
|
7646
7932
|
case 31:
|
|
7647
|
-
|
|
7933
|
+
_16.sent();
|
|
7648
7934
|
return [3 /*break*/, 70];
|
|
7649
7935
|
case 32: return [4 /*yield*/, this.setDropdownOptions(action, object)];
|
|
7650
7936
|
case 33:
|
|
7651
|
-
|
|
7937
|
+
_16.sent();
|
|
7652
7938
|
return [3 /*break*/, 70];
|
|
7653
7939
|
case 34: return [4 /*yield*/, this.setFieldValidity(action, object)];
|
|
7654
7940
|
case 35:
|
|
7655
|
-
|
|
7941
|
+
_16.sent();
|
|
7656
7942
|
return [3 /*break*/, 70];
|
|
7657
7943
|
case 36:
|
|
7658
7944
|
this.handleConnectedElements({ key: action.props.fieldKey }, "ON_ACTION");
|
|
7659
7945
|
return [3 /*break*/, 70];
|
|
7660
7946
|
case 37: return [4 /*yield*/, this.fieldApiCall(action, object)];
|
|
7661
7947
|
case 38:
|
|
7662
|
-
|
|
7948
|
+
_16.sent();
|
|
7663
7949
|
return [3 /*break*/, 70];
|
|
7664
7950
|
case 39: return [4 /*yield*/, this.fieldMultipleApiCalls(action, object)];
|
|
7665
7951
|
case 40:
|
|
7666
|
-
|
|
7952
|
+
_16.sent();
|
|
7667
7953
|
return [3 /*break*/, 70];
|
|
7668
7954
|
case 41: return [4 /*yield*/, this.fieldMultipleApiCallsEnd(action, object)];
|
|
7669
7955
|
case 42:
|
|
7670
|
-
|
|
7956
|
+
_16.sent();
|
|
7671
7957
|
return [3 /*break*/, 70];
|
|
7672
7958
|
case 43: return [4 /*yield*/, this.taskApiCall(action, object)];
|
|
7673
7959
|
case 44:
|
|
7674
|
-
|
|
7960
|
+
_16.sent();
|
|
7675
7961
|
return [3 /*break*/, 70];
|
|
7676
7962
|
case 45: return [4 /*yield*/, this.taskMultipleApiCalls(action, object)];
|
|
7677
7963
|
case 46:
|
|
7678
|
-
|
|
7964
|
+
_16.sent();
|
|
7679
7965
|
return [3 /*break*/, 70];
|
|
7680
7966
|
case 47: return [4 /*yield*/, this.taskMultipleApiCallsEnd(action, object)];
|
|
7681
7967
|
case 48:
|
|
7682
|
-
|
|
7968
|
+
_16.sent();
|
|
7683
7969
|
return [3 /*break*/, 70];
|
|
7684
7970
|
case 49:
|
|
7685
7971
|
if (!kwikidToolkit.checkObjectKeyExists(action.props.url, "source")) return [3 /*break*/, 51];
|
|
7686
7972
|
redirectToUrl_Source = new kwikidToolkit.Source(object);
|
|
7687
7973
|
return [4 /*yield*/, redirectToUrl_Source.getValueFromSource(action.props.url.source)];
|
|
7688
7974
|
case 50:
|
|
7689
|
-
redirectToUrlSourceValue =
|
|
7975
|
+
redirectToUrlSourceValue = _16.sent();
|
|
7690
7976
|
if (kwikidToolkit.isEmptyString(redirectToUrlSourceValue)) {
|
|
7691
7977
|
redirectToUrlSourceValue = "";
|
|
7692
7978
|
}
|
|
7693
7979
|
action = kwikidToolkit.setValueToObjectPath(action, "props.url.url", redirectToUrlSourceValue);
|
|
7694
|
-
|
|
7980
|
+
_16.label = 51;
|
|
7695
7981
|
case 51:
|
|
7696
7982
|
this.redirectToUrl(action);
|
|
7697
|
-
|
|
7983
|
+
_16.label = 52;
|
|
7698
7984
|
case 52:
|
|
7699
7985
|
this.showPreview(action.props);
|
|
7700
7986
|
return [3 /*break*/, 70];
|
|
@@ -7703,7 +7989,7 @@
|
|
|
7703
7989
|
previewErrorShow_Source = new kwikidToolkit.Source(object);
|
|
7704
7990
|
return [4 /*yield*/, previewErrorShow_Source.getValueFromSource(action.props.message.source)];
|
|
7705
7991
|
case 54:
|
|
7706
|
-
previewErrorShowSourceValue =
|
|
7992
|
+
previewErrorShowSourceValue = _16.sent();
|
|
7707
7993
|
if (typeof previewErrorShowSourceValue == "string" ||
|
|
7708
7994
|
typeof previewErrorShowSourceValue == "number") {
|
|
7709
7995
|
previewErrorShowSourceValue = String(previewErrorShowSourceValue);
|
|
@@ -7712,7 +7998,7 @@
|
|
|
7712
7998
|
previewErrorShowSourceValue = "";
|
|
7713
7999
|
}
|
|
7714
8000
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", previewErrorShowSourceValue);
|
|
7715
|
-
|
|
8001
|
+
_16.label = 55;
|
|
7716
8002
|
case 55:
|
|
7717
8003
|
this.showErrorPreview(action.props);
|
|
7718
8004
|
return [3 /*break*/, 70];
|
|
@@ -7756,7 +8042,7 @@
|
|
|
7756
8042
|
fieldHtmlMessage_Source = new kwikidToolkit.Source(object);
|
|
7757
8043
|
return [4 /*yield*/, fieldHtmlMessage_Source.getValueFromSource(action.props.message.source)];
|
|
7758
8044
|
case 67:
|
|
7759
|
-
fieldHtmlMessageSourceValue =
|
|
8045
|
+
fieldHtmlMessageSourceValue = _16.sent();
|
|
7760
8046
|
if (typeof fieldHtmlMessageSourceValue == "string" ||
|
|
7761
8047
|
typeof fieldHtmlMessageSourceValue == "number") {
|
|
7762
8048
|
fieldHtmlMessageSourceValue = String(fieldHtmlMessageSourceValue);
|
|
@@ -7765,7 +8051,7 @@
|
|
|
7765
8051
|
fieldHtmlMessageSourceValue = "";
|
|
7766
8052
|
}
|
|
7767
8053
|
action = kwikidToolkit.setValueToObjectPath(action, "props.message.message", fieldHtmlMessageSourceValue);
|
|
7768
|
-
|
|
8054
|
+
_16.label = 68;
|
|
7769
8055
|
case 68:
|
|
7770
8056
|
action.props.message.message = updateLanguage(action.props.message.message, getLanguage());
|
|
7771
8057
|
this.setHtml(action.props.fieldKey, action.props.message);
|
|
@@ -7778,8 +8064,8 @@
|
|
|
7778
8064
|
};
|
|
7779
8065
|
return KwikIDFormViewComponent;
|
|
7780
8066
|
}());
|
|
7781
|
-
/** @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:
|
|
7782
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { allFormsData: "allFormsData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", popupFormCallback: "popupFormCallback", userConfig: "userConfig", stepConfig: "stepConfig" }, outputs: { getLogs: "getLogs", getUnsavedDataState: "getUnsavedDataState", onActionShowPopupForm: "onActionShowPopupForm", onClickApiCall: "onClickApiCall", onClickFormFieldButton: "onClickFormFieldButton", onClickGoBack: "onClickGoBack", onClickSaveForm: "onClickSaveForm", onClickViewForms: "onClickViewForms" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.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]=\"field?.properties?.resetButtonLabel ?? '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 Time -->\n <ng-container *ngSwitchCase=\"'time'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-time\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?.properties?.items\"\n [label]=\"field?.label\"\n [mode]=\"field?.properties?.mode\"\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-time>\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 [apiTimer]=\"field?.api?.timer\"\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 [size]=\"field?.properties?.size\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n (onApiTimerStop)=\"handleOnApiTimerStop($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 <!-- Camera Record -->\n <ng-container *ngSwitchCase=\"'record'\">\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]=\"'record'\"\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=\"isShowCamera\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"cameraType\"\n [data]=\"cameraData\"\n [image]=\"cameraImage\"\n [video]=\"cameraVideo\"\n [config]=\"cameraConfig\"\n (getImage)=\"handleGetCameraMedia($event, 'CAPTURE')\"\n (getVideo)=\"handleGetCameraMedia($event, 'RECORD')\"\n (onClickBack)=\"handleOnClickCameraBack($event)\"\n (onClickClose)=\"handleOnClickCameraClose($event)\"\n (onClickSave)=\"handleOnClickSaveCameraMedia($event, cameraType)\"\n >\n <ng-container\n *ngIf=\"cameraType === 'CAPTURE'\"\n slot=\"capture-header\"\n >\n <div class=\"capture-header-container\">\n <div class=\"capture-header-left\"> </div>\n <div class=\"capture-header-center\">\n <kwikui-button\n *ngIf=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"capture-header-right\">\n <kwikui-button\n *ngIf=\"cameraConfig?.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=\"cameraConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"cameraType === 'RECORD'\"\n slot=\"record-header\"\n >\n <div class=\"record-header-container\">\n <div class=\"record-header-row row-1\">\n <div class=\"record-header-left\">\n <kwikui-button\n *ngIf=\"\n cameraConfig?.header?.isBack && cameraRecordingState == 'NONE'\n \"\n appearance=\"whiteblock\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-center\">\n <kwikui-button\n *ngIf=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-right\">\n <kwikui-button\n *ngIf=\"cameraConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen\n ? 'tuiIconMinimize2'\n : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n </div>\n </div>\n <div class=\"record-header-row row-2\">\n <div\n id=\"blinking-dot-container\"\n [class.recording]=\"cameraRecordingState == 'RECORDING'\"\n [class.paused]=\"cameraRecordingState == 'PAUSED'\"\n [class.recorded]=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n >\n <div\n *ngIf=\"cameraRecordingState == 'RECORDING'\"\n class=\"dot recording blink\"\n >\n </div>\n <div\n *ngIf=\"cameraRecordingState === 'PAUSED'\"\n class=\"dot paused\"\n >\n </div>\n <div\n *ngIf=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n class=\"dot recorded\"\n >\n </div>\n <div>\n {{ cameraRecordingTime | formatTimer }}\n <ng-container\n *ngIf=\"cameraConfig?.others?.maxRecordingTimeInSeconds\"\n >\n /\n {{\n cameraConfig?.others?.maxRecordingTimeInSeconds\n | formatTimer\n }}\n </ng-container>\n </div>\n </div>\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)}@media only screen and (min-width: 768px){.preview-container{height:calc(100vh - 10rem);width:calc(100vw - 10rem)}}.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 .capture-header-container{display:flex;width:100%;max-width:100%;padding:0}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-left{flex:1;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container{display:flex;width:100%;max-width:100%;padding:0;color:#fff;flex-direction:column;justify-content:flex-start;align-items:stretch}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-left{flex:1;display:flex;justify-content:flex-start;grid-gap:1rem;gap:1rem;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2{display:flex;flex-direction:row;justify-content:center;align-items:center}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;grid-gap:.25rem;gap:.25rem;padding:.35rem .6rem;width:-moz-fit-content;width:fit-content;border-radius:2rem;background-color:#f5f5f5}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recording{color:red;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.paused{color:#525252;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recorded{color:#000;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot{display:inline-block;width:.75rem;height:.75rem;border-radius:100%}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recording{background-color:red;box-shadow:0 0 5px -1px red}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.paused{background-color:#525252;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recorded{background-color:#000;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.blink{animation:blinker 1s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{opacity:1}to{opacity:0}}#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.KwikUIInputTimeComponent, selector: "kwikui-input-time", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "items", "invalid", "label", "mode", "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: i4__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: ["apiTimer", "apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick", "onApiTimerStop"] }, { 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: i3__namespace$2.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", "lines", "timestamp"], outputs: ["close"] }, { type: i4__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: i4__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i3__namespace$2.KwikIDCameraComponent, selector: "kwikid-camera", inputs: ["type", "config", "data", "image", "video"], outputs: ["getImage", "onClickSave", "getVideo"] }], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace.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, "formatTimer": TimerPipe } });
|
|
8067
|
+
/** @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: KwikIDFormViewApiService }, { token: i6.TuiPushService }, { token: i5.TuiAlertService }, { token: i7.TuiPreviewDialogService }, { token: i5.TuiDialogService }, { token: i3__namespace.KwikUILoaderService }, { token: i4__namespace.KwikIDCameraRecordService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8068
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { allFormsData: "allFormsData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", popupFormCallback: "popupFormCallback", userConfig: "userConfig", stepConfig: "stepConfig" }, outputs: { getLogs: "getLogs", getUnsavedDataState: "getUnsavedDataState", onActionShowPopupForm: "onActionShowPopupForm", onClickApiCall: "onClickApiCall", onClickFormFieldButton: "onClickFormFieldButton", onClickGoBack: "onClickGoBack", onClickSaveForm: "onClickSaveForm", onClickViewForms: "onClickViewForms" }, providers: [KwikIDFormViewService, KwikIDFormViewApiService], viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.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]=\"field?.properties?.resetButtonLabel ?? '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 Time -->\n <ng-container *ngSwitchCase=\"'time'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles ?? '' | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-time\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?.properties?.items\"\n [label]=\"field?.label\"\n [mode]=\"field?.properties?.mode\"\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-time>\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 [apiTimer]=\"field?.api?.timer\"\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 [size]=\"field?.properties?.size\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n (onApiTimerStop)=\"handleOnApiTimerStop($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 <!-- Camera Record -->\n <ng-container *ngSwitchCase=\"'record'\">\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]=\"'record'\"\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=\"isShowCamera\"\n>\n <div\n id=\"kwikid-camera-wrapper\"\n [class.fullscreen]=\"isShowCameraFullscreen\"\n >\n <kwikid-camera\n [type]=\"cameraType\"\n [data]=\"cameraData\"\n [image]=\"cameraImage\"\n [video]=\"cameraVideo\"\n [config]=\"cameraConfig\"\n (getImage)=\"handleGetCameraMedia($event, 'CAPTURE')\"\n (getVideo)=\"handleGetCameraMedia($event, 'RECORD')\"\n (onClickBack)=\"handleOnClickCameraBack($event)\"\n (onClickClose)=\"handleOnClickCameraClose($event)\"\n (onClickSave)=\"handleOnClickSaveCameraMedia($event, cameraType)\"\n >\n <ng-container\n *ngIf=\"cameraType === 'CAPTURE'\"\n slot=\"capture-header\"\n >\n <div class=\"capture-header-container\">\n <div class=\"capture-header-left\"> </div>\n <div class=\"capture-header-center\">\n <kwikui-button\n *ngIf=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"capture-header-right\">\n <kwikui-button\n *ngIf=\"cameraConfig?.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=\"cameraConfig?.header?.isClose\"\n id=\"kwikid-camera-header-close-button\"\n appearance=\"whiteblock\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"cameraType === 'RECORD'\"\n slot=\"record-header\"\n >\n <div class=\"record-header-container\">\n <div class=\"record-header-row row-1\">\n <div class=\"record-header-left\">\n <kwikui-button\n *ngIf=\"\n cameraConfig?.header?.isBack && cameraRecordingState == 'NONE'\n \"\n appearance=\"whiteblock\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"handleOnClickCameraClose($event)\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-center\">\n <kwikui-button\n *ngIf=\"cameraConfig?.header?.title !== ''\"\n appearance=\"whiteblock\"\n [label]=\"cameraConfig?.header?.title\"\n shape=\"rounded\"\n size=\"s\"\n ></kwikui-button>\n </div>\n <div class=\"record-header-right\">\n <kwikui-button\n *ngIf=\"cameraConfig?.header?.isExpand\"\n id=\"kwikid-camera-header-enlarge-button\"\n appearance=\"whiteblock\"\n [icon]=\"\n isShowCameraFullscreen\n ? 'tuiIconMinimize2'\n : 'tuiIconMaximize2'\n \"\n shape=\"rounded\"\n size=\"s\"\n (click)=\"isShowCameraFullscreen = !isShowCameraFullscreen\"\n ></kwikui-button>\n </div>\n </div>\n <div class=\"record-header-row row-2\">\n <div\n id=\"blinking-dot-container\"\n [class.recording]=\"cameraRecordingState == 'RECORDING'\"\n [class.paused]=\"cameraRecordingState == 'PAUSED'\"\n [class.recorded]=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n >\n <div\n *ngIf=\"cameraRecordingState == 'RECORDING'\"\n class=\"dot recording blink\"\n >\n </div>\n <div\n *ngIf=\"cameraRecordingState === 'PAUSED'\"\n class=\"dot paused\"\n >\n </div>\n <div\n *ngIf=\"\n cameraRecordingState == 'NONE' ||\n cameraRecordingState === 'RECORDED'\n \"\n class=\"dot recorded\"\n >\n </div>\n <div>\n {{ cameraRecordingTime | formatTimer }}\n <ng-container\n *ngIf=\"cameraConfig?.others?.maxRecordingTimeInSeconds\"\n >\n /\n {{\n cameraConfig?.others?.maxRecordingTimeInSeconds\n | formatTimer\n }}\n </ng-container>\n </div>\n </div>\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)}@media only screen and (min-width: 768px){.preview-container{height:calc(100vh - 10rem);width:calc(100vw - 10rem)}}.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 .capture-header-container{display:flex;width:100%;max-width:100%;padding:0}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-left{flex:1;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .capture-header-container .capture-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container{display:flex;width:100%;max-width:100%;padding:0;color:#fff;flex-direction:column;justify-content:flex-start;align-items:stretch}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-left{flex:1;display:flex;justify-content:flex-start;grid-gap:1rem;gap:1rem;text-align:left}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-center{flex:1;width:100%;min-width:max-content;text-align:center;margin:auto}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-1 .record-header-right{flex:1;text-align:right;display:flex;justify-content:flex-end;grid-gap:1rem;gap:1rem}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2{display:flex;flex-direction:row;justify-content:center;align-items:center}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;grid-gap:.25rem;gap:.25rem;padding:.35rem .6rem;width:-moz-fit-content;width:fit-content;border-radius:2rem;background-color:#f5f5f5}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recording{color:red;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.paused{color:#525252;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container.recorded{color:#000;font-weight:bold}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot{display:inline-block;width:.75rem;height:.75rem;border-radius:100%}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recording{background-color:red;box-shadow:0 0 5px -1px red}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.paused{background-color:#525252;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.recorded{background-color:#000;box-shadow:0 0 5px -1px #000}#kwikid-camera-container #kwikid-camera-wrapper .record-header-container .record-header-row.row-2 #blinking-dot-container .dot.blink{animation:blinker 1s cubic-bezier(.5,0,1,1) infinite alternate}@keyframes blinker{0%{opacity:1}to{opacity:0}}#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: i3__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i3__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i3__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: i3__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: i3__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: i3__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUIInputTimeComponent, selector: "kwikui-input-time", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "items", "invalid", "label", "mode", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__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: i5__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i3__namespace.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3__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: i3__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: i3__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiTimer", "apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick", "onApiTimerStop"] }, { type: i3__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: i3__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i3__namespace.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i3__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: i3__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: i3__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i6__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "lines", "timestamp"], outputs: ["close"] }, { type: i5__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i7__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i7__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i5__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", "video"], outputs: ["getImage", "onClickSave", "getVideo"] }], 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: i6__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i6__namespace.TuiPushDirective, selector: "tui-push" }, { type: i7__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i3__namespace.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i3__namespace.KwikUISafeUrlPipe, "formatTimer": TimerPipe } });
|
|
7783
8069
|
__decorate([
|
|
7784
8070
|
kwikidToolkit.logMethod
|
|
7785
8071
|
], KwikIDFormViewComponent.prototype, "resetCamera", null);
|
|
@@ -8038,22 +8324,22 @@
|
|
|
8038
8324
|
selector: "kwikid-form-view",
|
|
8039
8325
|
templateUrl: "./form-view.component.html",
|
|
8040
8326
|
styleUrls: ["./form-view.component.scss", "../shared.scss"],
|
|
8041
|
-
providers: [KwikIDFormViewService]
|
|
8327
|
+
providers: [KwikIDFormViewService, KwikIDFormViewApiService]
|
|
8042
8328
|
}]
|
|
8043
8329
|
}], ctorParameters: function () {
|
|
8044
|
-
return [{ type: i0__namespace.ChangeDetectorRef }, { type: KwikIDFormViewService }, { type:
|
|
8330
|
+
return [{ type: i0__namespace.ChangeDetectorRef }, { type: KwikIDFormViewService }, { type: KwikIDFormViewApiService }, { type: i6__namespace.TuiPushService, decorators: [{
|
|
8045
8331
|
type: i0.Inject,
|
|
8046
|
-
args: [
|
|
8047
|
-
}] }, { type:
|
|
8332
|
+
args: [i6.TuiPushService]
|
|
8333
|
+
}] }, { type: i5__namespace.TuiAlertService, decorators: [{
|
|
8048
8334
|
type: i0.Inject,
|
|
8049
|
-
args: [
|
|
8050
|
-
}] }, { type:
|
|
8335
|
+
args: [i5.TuiAlertService]
|
|
8336
|
+
}] }, { type: i7__namespace.TuiPreviewDialogService, decorators: [{
|
|
8051
8337
|
type: i0.Inject,
|
|
8052
|
-
args: [
|
|
8053
|
-
}] }, { type:
|
|
8338
|
+
args: [i7.TuiPreviewDialogService]
|
|
8339
|
+
}] }, { type: i5__namespace.TuiDialogService, decorators: [{
|
|
8054
8340
|
type: i0.Inject,
|
|
8055
|
-
args: [
|
|
8056
|
-
}] }, { type:
|
|
8341
|
+
args: [i5.TuiDialogService]
|
|
8342
|
+
}] }, { type: i3__namespace.KwikUILoaderService }, { type: i4__namespace.KwikIDCameraRecordService }, { type: i0__namespace.ChangeDetectorRef }];
|
|
8057
8343
|
}, propDecorators: { dialog: [{
|
|
8058
8344
|
type: i0.ViewChild,
|
|
8059
8345
|
args: ["dialog"]
|
|
@@ -8316,7 +8602,7 @@
|
|
|
8316
8602
|
return KwikIDFormsListComponent;
|
|
8317
8603
|
}());
|
|
8318
8604
|
/** @nocollapse */ KwikIDFormsListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8319
|
-
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", stepConfig: "stepConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView", isUnsavedData: "isUnsavedData" }, outputs: { getLogs: "getLogs", onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n id=\"sidebar-container\"\n *ngIf=\"!loading\"\n>\n <div id=\"sidebar\">\n <div ngClass=\"kwikid-form-header\">\n <div id=\"uf-header\">\n <div id=\"uf-header-logo-container\">\n <img\n id=\"uf-header-logo\"\n src=\"{{ this.userConfig.theme.clientLogo }}\"\n [ngClass]=\"'large-icon'\"\n />\n </div>\n </div>\n <hr />\n </div>\n <div id=\"uf-progress\">\n <div id=\"uf-progress-steps\">\n {{ this.formsListCompleted.length }} / {{ this.formsListLength }} Steps\n Completed\n </div>\n <kwikui-progress-segmented\n [max]=\"this.formsListLength\"\n size=\"m\"\n [value]=\"this.formsListCompleted.length\"\n ></kwikui-progress-segmented>\n </div>\n <div id=\"uf-sections-container\">\n <ng-container *ngFor=\"let form of formsList; let i = index\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'HTML'\">\n <div [innerHtml]=\"form.props.htmlContent | 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 </div>\n <div id=\"submit-sidebar-btn-container\">\n <kwikui-button\n *ngIf=\"\n !stepConfig.props.formListProperties.footer.submitFormButton.hidden\n \"\n label=\"{{\n stepConfig.props.formListProperties.footer.submitFormButton.label\n }}\"\n type=\"submit\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnSubmitForms($event)\"\n ></kwikui-button>\n </div>\n </div>\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.completed]=\"form.status === 'completed' && !form.disabled\"\n [class.edit]=\"form.status === 'editable' && !form.disabled\"\n [class.locked]=\"form.status === 'locked' && form.disabled\"\n [class.active]=\"\n activeFormConfig !== undefined && form.key === activeFormConfig.key\n \"\n (click)=\"\n form.status === 'locked' && form.disabled\n ? undefined\n : handleOnClickSetActiveForm(form.key)\n \"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }} <span *ngIf=\"form?.required\">*</span>\n </div>\n <div class=\"uf-form-section-card-status\">\n <div\n *ngIf=\"form.status === 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img completed\"\n >\n <tui-svg src=\"tuiIconCheckLarge\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img edit\"\n >\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && form.disabled\"\n class=\"uf-form-section-card-status-img locked\"\n >\n <tui-svg src=\"tuiIconLock\"></tui-svg>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["#sidebar-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}#sidebar{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.uf-section-item{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;padding:1rem;cursor:pointer;box-shadow:0 1px 3px -1px var(--tui-base-05);border-radius:.5rem;background-color:var(--tui-base-02);position:relative}.uf-section-item>*:not(:last-child){margin-right:1rem}.uf-section-item:hover{box-shadow:0 1px 3px -1px var(--tui-base-08)}#submit-sidebar-btn-container{width:100%;bottom:0px;z-index:1;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#submit-sidebar-btn-container>*:not(:last-child){margin-right:1rem}#submit-sidebar-btn-container *{flex-grow:1}#uf-sections-container{display:flex;flex-direction:column;height:100%;padding:1rem;overflow-y:auto}#uf-sections-container>*:not(:last-child){margin-bottom:1rem}.uf-form-section-card{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;border:none;border-radius:8px;background-color:#e9e9e9;height:-moz-fit-content;height:fit-content;min-height:60px;padding:10px 15px;width:100%;max-width:350px;margin:0 auto}.uf-form-section-card>*:not(:last-child){margin-right:.5rem}.uf-section-item.locked{-webkit-user-select:none;user-select:none;cursor:not-allowed}.uf-form-section-card .uf-form-section-card-title{font-size:1.2em;text-align:left;line-height:1.25em}.uf-form-section-card .uf-form-section-card-status{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.uf-form-section-card .uf-form-section-card-status .uf-form-section-card-status-img{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;border-radius:100%;color:#fff;font-weight:bold}.uf-form-section-card-status-img.completed{background-color:var(--tui-success-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.edit{background-color:var(--tui-error-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.locked{background-color:var(--tui-neutral-fill);padding:.25rem;border-radius:50%;color:#fff}#uf-progress{display:flex;padding:1rem;flex-direction:column;align-content:center;justify-content:center;align-items:stretch}#uf-progress>*:not(:last-child){margin-bottom:.5rem}#uf-progress-steps{font-size:1em;text-align:right;color:#3d3d3d}.uf-form-section-card-title{font-size:1em;font-weight:bold;color:#000}@media screen and (max-width: 600px){#sidebar-container{max-width:unset}}.kwikid-form-header{height:70px;z-index:6}.kwikid-form-header hr{width:calc(100% - 1rem);margin-left:auto;margin-right:auto}#uf-header{display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:flex-start;padding:10px 20px;width:100%;max-width:calc(400px + 50vw + 2rem);margin:0 auto;height:70px;z-index:1}#uf-header>*:not(:last-child){margin-right:1rem}#uf-header #uf-header-goback-container{display:none}#uf-header #uf-header-goback-container:hover{border-radius:50%;background-color:#d3d3d3}#uf-header #uf-header-goback-container #uf-header-goback{width:100%;height:auto}#uf-header #uf-header-logo-container{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#uf-header #uf-header-logo-container #uf-header-logo.small-icon{width:100%;height:50px}#uf-header #uf-header-logo-container #uf-header-logo.large-icon{width:100%;height:50px}#uf-header #uf-header-title-container{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}#uf-header #uf-header-title-container>*:not(:last-child){margin-bottom:.5rem}#uf-header #uf-header-title-container #uf-header-title{font-size:1.4em;color:#121212}#uf-header #uf-header-title-container #uf-header-subtitle{font-size:1.2em;color:#121212}\n", "::-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:
|
|
8605
|
+
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", stepConfig: "stepConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView", isUnsavedData: "isUnsavedData" }, outputs: { getLogs: "getLogs", onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n id=\"sidebar-container\"\n *ngIf=\"!loading\"\n>\n <div id=\"sidebar\">\n <div ngClass=\"kwikid-form-header\">\n <div id=\"uf-header\">\n <div id=\"uf-header-logo-container\">\n <img\n id=\"uf-header-logo\"\n src=\"{{ this.userConfig.theme.clientLogo }}\"\n [ngClass]=\"'large-icon'\"\n />\n </div>\n </div>\n <hr />\n </div>\n <div id=\"uf-progress\">\n <div id=\"uf-progress-steps\">\n {{ this.formsListCompleted.length }} / {{ this.formsListLength }} Steps\n Completed\n </div>\n <kwikui-progress-segmented\n [max]=\"this.formsListLength\"\n size=\"m\"\n [value]=\"this.formsListCompleted.length\"\n ></kwikui-progress-segmented>\n </div>\n <div id=\"uf-sections-container\">\n <ng-container *ngFor=\"let form of formsList; let i = index\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'HTML'\">\n <div [innerHtml]=\"form.props.htmlContent | 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 </div>\n <div id=\"submit-sidebar-btn-container\">\n <kwikui-button\n *ngIf=\"\n !stepConfig.props.formListProperties.footer.submitFormButton.hidden\n \"\n label=\"{{\n stepConfig.props.formListProperties.footer.submitFormButton.label\n }}\"\n type=\"submit\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnSubmitForms($event)\"\n ></kwikui-button>\n </div>\n </div>\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.completed]=\"form.status === 'completed' && !form.disabled\"\n [class.edit]=\"form.status === 'editable' && !form.disabled\"\n [class.locked]=\"form.status === 'locked' && form.disabled\"\n [class.active]=\"\n activeFormConfig !== undefined && form.key === activeFormConfig.key\n \"\n (click)=\"\n form.status === 'locked' && form.disabled\n ? undefined\n : handleOnClickSetActiveForm(form.key)\n \"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }} <span *ngIf=\"form?.required\">*</span>\n </div>\n <div class=\"uf-form-section-card-status\">\n <div\n *ngIf=\"form.status === 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img completed\"\n >\n <tui-svg src=\"tuiIconCheckLarge\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img edit\"\n >\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && form.disabled\"\n class=\"uf-form-section-card-status-img locked\"\n >\n <tui-svg src=\"tuiIconLock\"></tui-svg>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["#sidebar-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}#sidebar{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.uf-section-item{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;padding:1rem;cursor:pointer;box-shadow:0 1px 3px -1px var(--tui-base-05);border-radius:.5rem;background-color:var(--tui-base-02);position:relative}.uf-section-item>*:not(:last-child){margin-right:1rem}.uf-section-item:hover{box-shadow:0 1px 3px -1px var(--tui-base-08)}#submit-sidebar-btn-container{width:100%;bottom:0px;z-index:1;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#submit-sidebar-btn-container>*:not(:last-child){margin-right:1rem}#submit-sidebar-btn-container *{flex-grow:1}#uf-sections-container{display:flex;flex-direction:column;height:100%;padding:1rem;overflow-y:auto}#uf-sections-container>*:not(:last-child){margin-bottom:1rem}.uf-form-section-card{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;border:none;border-radius:8px;background-color:#e9e9e9;height:-moz-fit-content;height:fit-content;min-height:60px;padding:10px 15px;width:100%;max-width:350px;margin:0 auto}.uf-form-section-card>*:not(:last-child){margin-right:.5rem}.uf-section-item.locked{-webkit-user-select:none;user-select:none;cursor:not-allowed}.uf-form-section-card .uf-form-section-card-title{font-size:1.2em;text-align:left;line-height:1.25em}.uf-form-section-card .uf-form-section-card-status{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.uf-form-section-card .uf-form-section-card-status .uf-form-section-card-status-img{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;border-radius:100%;color:#fff;font-weight:bold}.uf-form-section-card-status-img.completed{background-color:var(--tui-success-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.edit{background-color:var(--tui-error-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.locked{background-color:var(--tui-neutral-fill);padding:.25rem;border-radius:50%;color:#fff}#uf-progress{display:flex;padding:1rem;flex-direction:column;align-content:center;justify-content:center;align-items:stretch}#uf-progress>*:not(:last-child){margin-bottom:.5rem}#uf-progress-steps{font-size:1em;text-align:right;color:#3d3d3d}.uf-form-section-card-title{font-size:1em;font-weight:bold;color:#000}@media screen and (max-width: 600px){#sidebar-container{max-width:unset}}.kwikid-form-header{height:70px;z-index:6}.kwikid-form-header hr{width:calc(100% - 1rem);margin-left:auto;margin-right:auto}#uf-header{display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:flex-start;padding:10px 20px;width:100%;max-width:calc(400px + 50vw + 2rem);margin:0 auto;height:70px;z-index:1}#uf-header>*:not(:last-child){margin-right:1rem}#uf-header #uf-header-goback-container{display:none}#uf-header #uf-header-goback-container:hover{border-radius:50%;background-color:#d3d3d3}#uf-header #uf-header-goback-container #uf-header-goback{width:100%;height:auto}#uf-header #uf-header-logo-container{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#uf-header #uf-header-logo-container #uf-header-logo.small-icon{width:100%;height:50px}#uf-header #uf-header-logo-container #uf-header-logo.large-icon{width:100%;height:50px}#uf-header #uf-header-title-container{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}#uf-header #uf-header-title-container>*:not(:last-child){margin-bottom:.5rem}#uf-header #uf-header-title-container #uf-header-title{font-size:1.4em;color:#121212}#uf-header #uf-header-title-container #uf-header-subtitle{font-size:1.2em;color:#121212}\n", "::-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: i3__namespace.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["colors", "id", "max", "size", "value"] }, { type: i3__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i5__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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": i3__namespace.KwikUISafeHtmlPipe } });
|
|
8320
8606
|
__decorate([
|
|
8321
8607
|
kwikidToolkit.logMethod
|
|
8322
8608
|
], KwikIDFormsListComponent.prototype, "ngOnChanges", null);
|
|
@@ -9409,8 +9695,8 @@
|
|
|
9409
9695
|
};
|
|
9410
9696
|
return KwikIDFormsRendererComponent;
|
|
9411
9697
|
}());
|
|
9412
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token:
|
|
9413
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", activeFormData: "activeFormData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall", getLogs: "getLogs", onClickFormFieldButton: "onClickFormFieldButton" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [isUnsavedData]=\"this.isUnsavedData\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSetActiveForm)=\"\n this.handleOnClickSetActiveForm($event, 'BUTTON_CLICK')\n \"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n *ngIf=\"this.activeFormConfig.type === 'FORM'\"\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n [userConfig]=\"this.userConfig\"\n [stepConfig]=\"this.stepConfig\"\n [popupFormCallback]=\"this.popupFormCallback\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getUnsavedDataState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (onActionShowPopupForm)=\"\n this.handleOnActionShowPopupForm($event, content)\n \"\n (onClickGoBack)=\"this.handleOnClickGoBack($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n *ngIf=\"popupFormConfig\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [stepConfig]=\"this.stepConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n<ng-template\n #content\n let-context\n>\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [stepConfig]=\"this.stepConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', context)\n \"\n ></kwikid-form-view>\n </div>\n</ng-template>\n", styles: [":host{position:relative;height:100%}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:min(50%,600px);margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;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-form-view-popup-container{border-radius:1rem;background:var(--tui-base-01)}\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: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView", "isUnsavedData"], outputs: ["getLogs", "onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["allFormsData", "apiCallResponse", "buttonClickResponse", "formConfig", "formData", "isMobileView", "popupFormCallback", "userConfig", "stepConfig"], outputs: ["getLogs", "getUnsavedDataState", "onActionShowPopupForm", "onClickApiCall", "onClickFormFieldButton", "onClickGoBack", "onClickSaveForm", "onClickViewForms"] }, { type: i2__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i5__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "lines", "timestamp"], outputs: ["close"] }, { type: i4__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: i4__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i5__namespace.TuiPushDirective, selector: "tui-push" }, { type: i6__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], animations: [
|
|
9698
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i7.TuiPreviewDialogService }, { token: i3__namespace.KwikUILoaderService }, { token: i5.TuiDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9699
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", activeFormData: "activeFormData", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall", getLogs: "getLogs", onClickFormFieldButton: "onClickFormFieldButton" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [isUnsavedData]=\"this.isUnsavedData\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSetActiveForm)=\"\n this.handleOnClickSetActiveForm($event, 'BUTTON_CLICK')\n \"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n *ngIf=\"this.activeFormConfig.type === 'FORM'\"\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n [userConfig]=\"this.userConfig\"\n [stepConfig]=\"this.stepConfig\"\n [popupFormCallback]=\"this.popupFormCallback\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getUnsavedDataState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (onActionShowPopupForm)=\"\n this.handleOnActionShowPopupForm($event, content)\n \"\n (onClickGoBack)=\"this.handleOnClickGoBack($event)\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n *ngIf=\"popupFormConfig\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [stepConfig]=\"this.stepConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', undefined)\n \"\n ></kwikid-form-view>\n </div>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n<ng-template\n #content\n let-context\n>\n <div class=\"kwikid-form-view-popup-container\">\n <kwikid-form-view\n [formData]=\"activePopupFormData\"\n [formConfig]=\"popupFormConfig\"\n [allFormsData]=\"allFormsData\"\n [userConfig]=\"this.userConfig\"\n [stepConfig]=\"this.stepConfig\"\n [isMobileView]=\"this.isMobileView\"\n [apiCallResponse]=\"this.apiCallResponse\"\n [buttonClickResponse]=\"this.buttonClickResponse\"\n (onClickFormFieldButton)=\"handleOnClickFormFieldButton($event)\"\n (getSavedState)=\"handleGetUnsavedState($event)\"\n (onClickApiCall)=\"handleOnClickApiCall($event)\"\n (getLogs)=\"handleGetLogs($event)\"\n (onClickSaveForm)=\"\n this.handleOnClickSaveForm($event, 'POPUP_FORM', context)\n \"\n ></kwikid-form-view>\n </div>\n</ng-template>\n", styles: [":host{position:relative;height:100%}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:min(50%,600px);margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}.preview-container{display:flex!important;flex-grow:1!important;flex-direction:column!important;align-content:center!important;justify-content:space-between!important;align-items:stretch!important}.preview-container .preview-iframe{width:100vw;height:100vh}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;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-form-view-popup-container{border-radius:1rem;background:var(--tui-base-01)}\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: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView", "isUnsavedData"], outputs: ["getLogs", "onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["allFormsData", "apiCallResponse", "buttonClickResponse", "formConfig", "formData", "isMobileView", "popupFormCallback", "userConfig", "stepConfig"], outputs: ["getLogs", "getUnsavedDataState", "onActionShowPopupForm", "onClickApiCall", "onClickFormFieldButton", "onClickGoBack", "onClickSaveForm", "onClickViewForms"] }, { type: i3__namespace.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i6__namespace.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "lines", "timestamp"], outputs: ["close"] }, { type: i5__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i7__namespace.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i7__namespace.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i5__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3__namespace$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i6__namespace.TuiPushDirective, selector: "tui-push" }, { type: i7__namespace.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], animations: [
|
|
9414
9700
|
animations.trigger("panelInOut", [
|
|
9415
9701
|
animations.transition(":enter", [
|
|
9416
9702
|
animations.style({ transform: "translateY(100%)" }),
|
|
@@ -9512,12 +9798,12 @@
|
|
|
9512
9798
|
]
|
|
9513
9799
|
}]
|
|
9514
9800
|
}], ctorParameters: function () {
|
|
9515
|
-
return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type:
|
|
9801
|
+
return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i7__namespace.TuiPreviewDialogService, decorators: [{
|
|
9516
9802
|
type: i0.Inject,
|
|
9517
|
-
args: [
|
|
9518
|
-
}] }, { type:
|
|
9803
|
+
args: [i7.TuiPreviewDialogService]
|
|
9804
|
+
}] }, { type: i3__namespace.KwikUILoaderService }, { type: i5__namespace.TuiDialogService, decorators: [{
|
|
9519
9805
|
type: i0.Inject,
|
|
9520
|
-
args: [
|
|
9806
|
+
args: [i5.TuiDialogService]
|
|
9521
9807
|
}] }];
|
|
9522
9808
|
}, propDecorators: { windowResizeWatcher: [{
|
|
9523
9809
|
type: i0.HostListener,
|
|
@@ -9575,28 +9861,28 @@
|
|
|
9575
9861
|
return KwikIDBuilderFormEditorModule;
|
|
9576
9862
|
}());
|
|
9577
9863
|
/** @nocollapse */ KwikIDBuilderFormEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
9578
|
-
/** @nocollapse */ KwikIDBuilderFormEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorModule, declarations: [KwikIDBuilderFormEditorComponent, JsonFormatPipe], imports: [i3$
|
|
9864
|
+
/** @nocollapse */ KwikIDBuilderFormEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorModule, declarations: [KwikIDBuilderFormEditorComponent, JsonFormatPipe], imports: [i3$2.CommonModule,
|
|
9579
9865
|
i3.FormsModule,
|
|
9580
9866
|
i3.ReactiveFormsModule,
|
|
9581
|
-
|
|
9582
|
-
|
|
9867
|
+
i3$1.KwikUIModule,
|
|
9868
|
+
i5.TuiSvgModule], exports: [KwikIDBuilderFormEditorComponent] });
|
|
9583
9869
|
/** @nocollapse */ KwikIDBuilderFormEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorModule, providers: [KwikIDFormBuilderFormEditorService], imports: [[
|
|
9584
|
-
i3$
|
|
9870
|
+
i3$2.CommonModule,
|
|
9585
9871
|
i3.FormsModule,
|
|
9586
9872
|
i3.ReactiveFormsModule,
|
|
9587
|
-
|
|
9588
|
-
|
|
9873
|
+
i3$1.KwikUIModule,
|
|
9874
|
+
i5.TuiSvgModule
|
|
9589
9875
|
]] });
|
|
9590
9876
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormEditorModule, decorators: [{
|
|
9591
9877
|
type: i0.NgModule,
|
|
9592
9878
|
args: [{
|
|
9593
9879
|
declarations: [KwikIDBuilderFormEditorComponent, JsonFormatPipe],
|
|
9594
9880
|
imports: [
|
|
9595
|
-
i3$
|
|
9881
|
+
i3$2.CommonModule,
|
|
9596
9882
|
i3.FormsModule,
|
|
9597
9883
|
i3.ReactiveFormsModule,
|
|
9598
|
-
|
|
9599
|
-
|
|
9884
|
+
i3$1.KwikUIModule,
|
|
9885
|
+
i5.TuiSvgModule
|
|
9600
9886
|
],
|
|
9601
9887
|
exports: [KwikIDBuilderFormEditorComponent],
|
|
9602
9888
|
providers: [KwikIDFormBuilderFormEditorService]
|
|
@@ -9609,31 +9895,31 @@
|
|
|
9609
9895
|
return KwikIDBuilderFormsListModule;
|
|
9610
9896
|
}());
|
|
9611
9897
|
/** @nocollapse */ KwikIDBuilderFormsListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormsListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
9612
|
-
/** @nocollapse */ KwikIDBuilderFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormsListModule, declarations: [KwikIDBuilderFormsListComponent], imports: [i3$
|
|
9898
|
+
/** @nocollapse */ KwikIDBuilderFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormsListModule, declarations: [KwikIDBuilderFormsListComponent], imports: [i3$2.CommonModule,
|
|
9613
9899
|
i3.FormsModule,
|
|
9614
9900
|
i3.ReactiveFormsModule,
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9901
|
+
i3$1.KwikUIPipeModule,
|
|
9902
|
+
i3$1.KwikUIModule,
|
|
9903
|
+
i5.TuiSvgModule], exports: [KwikIDBuilderFormsListComponent] });
|
|
9618
9904
|
/** @nocollapse */ KwikIDBuilderFormsListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormsListModule, imports: [[
|
|
9619
|
-
i3$
|
|
9905
|
+
i3$2.CommonModule,
|
|
9620
9906
|
i3.FormsModule,
|
|
9621
9907
|
i3.ReactiveFormsModule,
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9908
|
+
i3$1.KwikUIPipeModule,
|
|
9909
|
+
i3$1.KwikUIModule,
|
|
9910
|
+
i5.TuiSvgModule
|
|
9625
9911
|
]] });
|
|
9626
9912
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDBuilderFormsListModule, decorators: [{
|
|
9627
9913
|
type: i0.NgModule,
|
|
9628
9914
|
args: [{
|
|
9629
9915
|
declarations: [KwikIDBuilderFormsListComponent],
|
|
9630
9916
|
imports: [
|
|
9631
|
-
i3$
|
|
9917
|
+
i3$2.CommonModule,
|
|
9632
9918
|
i3.FormsModule,
|
|
9633
9919
|
i3.ReactiveFormsModule,
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9920
|
+
i3$1.KwikUIPipeModule,
|
|
9921
|
+
i3$1.KwikUIModule,
|
|
9922
|
+
i5.TuiSvgModule
|
|
9637
9923
|
],
|
|
9638
9924
|
exports: [KwikIDBuilderFormsListComponent]
|
|
9639
9925
|
}]
|
|
@@ -9645,34 +9931,34 @@
|
|
|
9645
9931
|
return KwikIDFormBuilderModule;
|
|
9646
9932
|
}());
|
|
9647
9933
|
/** @nocollapse */ KwikIDFormBuilderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
9648
|
-
/** @nocollapse */ KwikIDFormBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, declarations: [KwikIDFormsBuilderComponent], imports: [i3$
|
|
9934
|
+
/** @nocollapse */ KwikIDFormBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, declarations: [KwikIDFormsBuilderComponent], imports: [i3$2.CommonModule,
|
|
9649
9935
|
i3.FormsModule,
|
|
9650
9936
|
i3.ReactiveFormsModule,
|
|
9651
9937
|
dragDrop.DragDropModule,
|
|
9652
9938
|
KwikIDBuilderFormsListModule,
|
|
9653
9939
|
KwikIDBuilderFormEditorModule,
|
|
9654
|
-
|
|
9940
|
+
i3$1.KwikUIModule], exports: [KwikIDFormsBuilderComponent] });
|
|
9655
9941
|
/** @nocollapse */ KwikIDFormBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, providers: [], imports: [[
|
|
9656
|
-
i3$
|
|
9942
|
+
i3$2.CommonModule,
|
|
9657
9943
|
i3.FormsModule,
|
|
9658
9944
|
i3.ReactiveFormsModule,
|
|
9659
9945
|
dragDrop.DragDropModule,
|
|
9660
9946
|
KwikIDBuilderFormsListModule,
|
|
9661
9947
|
KwikIDBuilderFormEditorModule,
|
|
9662
|
-
|
|
9948
|
+
i3$1.KwikUIModule
|
|
9663
9949
|
]] });
|
|
9664
9950
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, decorators: [{
|
|
9665
9951
|
type: i0.NgModule,
|
|
9666
9952
|
args: [{
|
|
9667
9953
|
declarations: [KwikIDFormsBuilderComponent],
|
|
9668
9954
|
imports: [
|
|
9669
|
-
i3$
|
|
9955
|
+
i3$2.CommonModule,
|
|
9670
9956
|
i3.FormsModule,
|
|
9671
9957
|
i3.ReactiveFormsModule,
|
|
9672
9958
|
dragDrop.DragDropModule,
|
|
9673
9959
|
KwikIDBuilderFormsListModule,
|
|
9674
9960
|
KwikIDBuilderFormEditorModule,
|
|
9675
|
-
|
|
9961
|
+
i3$1.KwikUIModule
|
|
9676
9962
|
],
|
|
9677
9963
|
providers: [],
|
|
9678
9964
|
exports: [KwikIDFormsBuilderComponent]
|
|
@@ -9685,58 +9971,58 @@
|
|
|
9685
9971
|
return KwikIDFormViewModule;
|
|
9686
9972
|
}());
|
|
9687
9973
|
/** @nocollapse */ KwikIDFormViewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
9688
|
-
/** @nocollapse */ KwikIDFormViewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, StyleSanitizerPipe, TimerPipe], imports: [i3$
|
|
9974
|
+
/** @nocollapse */ KwikIDFormViewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, StyleSanitizerPipe, TimerPipe], imports: [i3$2.CommonModule,
|
|
9689
9975
|
i3.FormsModule,
|
|
9690
9976
|
i3.ReactiveFormsModule,
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9977
|
+
i5.TuiLabelModule,
|
|
9978
|
+
i6.TuiPushModule,
|
|
9979
|
+
i5.TuiSvgModule,
|
|
9980
|
+
i7.TuiPreviewModule,
|
|
9981
|
+
i5.TuiButtonModule,
|
|
9982
|
+
i7.TuiPreviewActionModule,
|
|
9983
|
+
i5.TuiDialogModule,
|
|
9984
|
+
i3$1.KwikUIPipeModule,
|
|
9985
|
+
i3$1.KwikUIModule,
|
|
9986
|
+
i4.KwikIDCameraModule,
|
|
9987
|
+
i4.KwikUIInputCameraModule,
|
|
9988
|
+
i3$1.KwikUIInputEmailModule], exports: [KwikIDFormViewComponent] });
|
|
9703
9989
|
/** @nocollapse */ KwikIDFormViewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, imports: [[
|
|
9704
|
-
i3$
|
|
9990
|
+
i3$2.CommonModule,
|
|
9705
9991
|
i3.FormsModule,
|
|
9706
9992
|
i3.ReactiveFormsModule,
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9993
|
+
i5.TuiLabelModule,
|
|
9994
|
+
i6.TuiPushModule,
|
|
9995
|
+
i5.TuiSvgModule,
|
|
9996
|
+
i7.TuiPreviewModule,
|
|
9997
|
+
i5.TuiButtonModule,
|
|
9998
|
+
i7.TuiPreviewActionModule,
|
|
9999
|
+
i5.TuiDialogModule,
|
|
10000
|
+
i3$1.KwikUIPipeModule,
|
|
10001
|
+
i3$1.KwikUIModule,
|
|
10002
|
+
i4.KwikIDCameraModule,
|
|
10003
|
+
i4.KwikUIInputCameraModule,
|
|
10004
|
+
i3$1.KwikUIInputEmailModule
|
|
9719
10005
|
]] });
|
|
9720
10006
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, decorators: [{
|
|
9721
10007
|
type: i0.NgModule,
|
|
9722
10008
|
args: [{
|
|
9723
10009
|
declarations: [KwikIDFormViewComponent, StyleSanitizerPipe, TimerPipe],
|
|
9724
10010
|
imports: [
|
|
9725
|
-
i3$
|
|
10011
|
+
i3$2.CommonModule,
|
|
9726
10012
|
i3.FormsModule,
|
|
9727
10013
|
i3.ReactiveFormsModule,
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
10014
|
+
i5.TuiLabelModule,
|
|
10015
|
+
i6.TuiPushModule,
|
|
10016
|
+
i5.TuiSvgModule,
|
|
10017
|
+
i7.TuiPreviewModule,
|
|
10018
|
+
i5.TuiButtonModule,
|
|
10019
|
+
i7.TuiPreviewActionModule,
|
|
10020
|
+
i5.TuiDialogModule,
|
|
10021
|
+
i3$1.KwikUIPipeModule,
|
|
10022
|
+
i3$1.KwikUIModule,
|
|
10023
|
+
i4.KwikIDCameraModule,
|
|
10024
|
+
i4.KwikUIInputCameraModule,
|
|
10025
|
+
i3$1.KwikUIInputEmailModule
|
|
9740
10026
|
],
|
|
9741
10027
|
exports: [KwikIDFormViewComponent]
|
|
9742
10028
|
}]
|
|
@@ -9748,31 +10034,31 @@
|
|
|
9748
10034
|
return KwikIDFormsListModule;
|
|
9749
10035
|
}());
|
|
9750
10036
|
/** @nocollapse */ KwikIDFormsListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
9751
|
-
/** @nocollapse */ KwikIDFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, declarations: [KwikIDFormsListComponent], imports: [i3$
|
|
10037
|
+
/** @nocollapse */ KwikIDFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, declarations: [KwikIDFormsListComponent], imports: [i3$2.CommonModule,
|
|
9752
10038
|
i3.FormsModule,
|
|
9753
10039
|
i3.ReactiveFormsModule,
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
10040
|
+
i3$1.KwikUIPipeModule,
|
|
10041
|
+
i3$1.KwikUIModule,
|
|
10042
|
+
i5.TuiSvgModule], exports: [KwikIDFormsListComponent] });
|
|
9757
10043
|
/** @nocollapse */ KwikIDFormsListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, imports: [[
|
|
9758
|
-
i3$
|
|
10044
|
+
i3$2.CommonModule,
|
|
9759
10045
|
i3.FormsModule,
|
|
9760
10046
|
i3.ReactiveFormsModule,
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
10047
|
+
i3$1.KwikUIPipeModule,
|
|
10048
|
+
i3$1.KwikUIModule,
|
|
10049
|
+
i5.TuiSvgModule
|
|
9764
10050
|
]] });
|
|
9765
10051
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, decorators: [{
|
|
9766
10052
|
type: i0.NgModule,
|
|
9767
10053
|
args: [{
|
|
9768
10054
|
declarations: [KwikIDFormsListComponent],
|
|
9769
10055
|
imports: [
|
|
9770
|
-
i3$
|
|
10056
|
+
i3$2.CommonModule,
|
|
9771
10057
|
i3.FormsModule,
|
|
9772
10058
|
i3.ReactiveFormsModule,
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
10059
|
+
i3$1.KwikUIPipeModule,
|
|
10060
|
+
i3$1.KwikUIModule,
|
|
10061
|
+
i5.TuiSvgModule
|
|
9776
10062
|
],
|
|
9777
10063
|
exports: [KwikIDFormsListComponent]
|
|
9778
10064
|
}]
|
|
@@ -9784,49 +10070,49 @@
|
|
|
9784
10070
|
return KwikIDFormRendererModule;
|
|
9785
10071
|
}());
|
|
9786
10072
|
/** @nocollapse */ KwikIDFormRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
9787
|
-
/** @nocollapse */ KwikIDFormRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, declarations: [KwikIDFormsRendererComponent], imports: [i3$
|
|
10073
|
+
/** @nocollapse */ KwikIDFormRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, declarations: [KwikIDFormsRendererComponent], imports: [i3$2.CommonModule,
|
|
9788
10074
|
http.HttpClientModule,
|
|
9789
10075
|
KwikIDFormViewModule,
|
|
9790
10076
|
KwikIDFormsListModule,
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
10077
|
+
i3$1.KwikUIModule,
|
|
10078
|
+
i5.TuiLoaderModule,
|
|
10079
|
+
i6.TuiPushModule,
|
|
10080
|
+
i7.TuiPreviewActionModule,
|
|
10081
|
+
i7.TuiPreviewModule,
|
|
10082
|
+
i5.TuiButtonModule,
|
|
10083
|
+
i7.TuiPreviewActionModule,
|
|
10084
|
+
i5.TuiSvgModule], exports: [KwikIDFormsRendererComponent] });
|
|
9799
10085
|
/** @nocollapse */ KwikIDFormRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, providers: [], imports: [[
|
|
9800
|
-
i3$
|
|
10086
|
+
i3$2.CommonModule,
|
|
9801
10087
|
http.HttpClientModule,
|
|
9802
10088
|
KwikIDFormViewModule,
|
|
9803
10089
|
KwikIDFormsListModule,
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
10090
|
+
i3$1.KwikUIModule,
|
|
10091
|
+
i5.TuiLoaderModule,
|
|
10092
|
+
i6.TuiPushModule,
|
|
10093
|
+
i7.TuiPreviewActionModule,
|
|
10094
|
+
i7.TuiPreviewModule,
|
|
10095
|
+
i5.TuiButtonModule,
|
|
10096
|
+
i7.TuiPreviewActionModule,
|
|
10097
|
+
i5.TuiSvgModule
|
|
9812
10098
|
]] });
|
|
9813
10099
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, decorators: [{
|
|
9814
10100
|
type: i0.NgModule,
|
|
9815
10101
|
args: [{
|
|
9816
10102
|
declarations: [KwikIDFormsRendererComponent],
|
|
9817
10103
|
imports: [
|
|
9818
|
-
i3$
|
|
10104
|
+
i3$2.CommonModule,
|
|
9819
10105
|
http.HttpClientModule,
|
|
9820
10106
|
KwikIDFormViewModule,
|
|
9821
10107
|
KwikIDFormsListModule,
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
10108
|
+
i3$1.KwikUIModule,
|
|
10109
|
+
i5.TuiLoaderModule,
|
|
10110
|
+
i6.TuiPushModule,
|
|
10111
|
+
i7.TuiPreviewActionModule,
|
|
10112
|
+
i7.TuiPreviewModule,
|
|
10113
|
+
i5.TuiButtonModule,
|
|
10114
|
+
i7.TuiPreviewActionModule,
|
|
10115
|
+
i5.TuiSvgModule
|
|
9830
10116
|
],
|
|
9831
10117
|
providers: [],
|
|
9832
10118
|
exports: [KwikIDFormsRendererComponent]
|
|
@@ -9839,13 +10125,13 @@
|
|
|
9839
10125
|
return KwikIDFormsModule;
|
|
9840
10126
|
}());
|
|
9841
10127
|
/** @nocollapse */ KwikIDFormsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
9842
|
-
/** @nocollapse */ KwikIDFormsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [i3$
|
|
10128
|
+
/** @nocollapse */ KwikIDFormsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [i3$2.CommonModule,
|
|
9843
10129
|
i3.FormsModule,
|
|
9844
10130
|
i3.ReactiveFormsModule,
|
|
9845
10131
|
KwikIDFormBuilderModule,
|
|
9846
10132
|
KwikIDFormRendererModule], exports: [KwikIDFormRendererModule, KwikIDFormBuilderModule] });
|
|
9847
10133
|
/** @nocollapse */ KwikIDFormsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [[
|
|
9848
|
-
i3$
|
|
10134
|
+
i3$2.CommonModule,
|
|
9849
10135
|
i3.FormsModule,
|
|
9850
10136
|
i3.ReactiveFormsModule,
|
|
9851
10137
|
KwikIDFormBuilderModule,
|
|
@@ -9856,7 +10142,7 @@
|
|
|
9856
10142
|
args: [{
|
|
9857
10143
|
declarations: [],
|
|
9858
10144
|
imports: [
|
|
9859
|
-
i3$
|
|
10145
|
+
i3$2.CommonModule,
|
|
9860
10146
|
i3.FormsModule,
|
|
9861
10147
|
i3.ReactiveFormsModule,
|
|
9862
10148
|
KwikIDFormBuilderModule,
|