kwikid-forms 0.6.5 → 0.6.7
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 +115 -15
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder-form-editor/builder-form-editor.component.js +40 -4
- package/esm2015/lib/builder/builder-form-editor/builder-form-editor.module.js +4 -3
- package/esm2015/lib/builder/builder-form-editor/builder.form-editor.constants.js +2 -1
- package/esm2015/lib/builder/builder-form-editor/pipes/json-formatter.pipe.js +19 -0
- package/esm2015/lib/renderer/config-converter/config-converter.constants.js +13 -1
- package/esm2015/lib/renderer/config-converter/config-converter.js +19 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +3 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +2 -2
- package/esm2015/lib/renderer/form-view/form-view.module.js +8 -5
- package/esm2015/lib/renderer/renderer.component.js +9 -2
- package/fesm2015/kwikid-forms.js +107 -11
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/builder/builder-form-editor/builder-form-editor.component.d.ts +4 -0
- package/lib/builder/builder-form-editor/builder-form-editor.module.d.ts +6 -5
- package/lib/builder/builder-form-editor/pipes/json-formatter.pipe.d.ts +7 -0
- package/lib/renderer/config-converter/config-converter.constants.d.ts +12 -0
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +18 -2
- package/lib/renderer/form-view/form-view.module.d.ts +1 -1
- package/package.json +3 -3
package/fesm2015/kwikid-forms.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { EventEmitter, Component, Input, Output, ChangeDetectionStrategy, Pipe, Inject, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
4
4
|
import { checkObjectKeyExists, setValueToObjectPath, isEmptyValue, getObjectDeepCopy, logMethod, isNotEmptyValue, mergeObjects, checkObjectPathExists, setMissingKeyValue, getObjectValueFromPath, getObjectFromLocalStorage, Source, Rule, Condition, Action, PATTERNS, hasWhitespacesOnly, Validation, ESourceKey, replaceString, isUndefined, isNull, isEmptyString } from 'kwikid-toolkit';
|
|
5
5
|
import * as i2 from 'kwikui';
|
|
6
|
-
import { KwikUIModule, KwikUIPipeModule } from 'kwikui';
|
|
6
|
+
import { KwikUIModule, KwikUIPipeModule, KwikUIInputEmailModule } from 'kwikui';
|
|
7
7
|
import * as i3$1 from '@angular/forms';
|
|
8
8
|
import { FormGroup, FormControl, Validators, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i3 from '@taiga-ui/core';
|
|
@@ -210,6 +210,8 @@ var EFieldType;
|
|
|
210
210
|
EFieldType["AADHAAR_NUMBER"] = "aadhaar-number";
|
|
211
211
|
EFieldType["SLIDER"] = "slider";
|
|
212
212
|
EFieldType["FILE"] = "file";
|
|
213
|
+
EFieldType["PASSWORD"] = "password";
|
|
214
|
+
EFieldType["EMAIL"] = "email";
|
|
213
215
|
})(EFieldType || (EFieldType = {}));
|
|
214
216
|
|
|
215
217
|
const FIELD_PROPERTIES = {
|
|
@@ -230,6 +232,18 @@ const FIELD_PROPERTIES = {
|
|
|
230
232
|
postfix: "",
|
|
231
233
|
prefix: ""
|
|
232
234
|
},
|
|
235
|
+
email: {
|
|
236
|
+
case: "default",
|
|
237
|
+
containerStyles: "",
|
|
238
|
+
postfix: "",
|
|
239
|
+
prefix: ""
|
|
240
|
+
},
|
|
241
|
+
password: {
|
|
242
|
+
containerStyles: "",
|
|
243
|
+
hintContent: "",
|
|
244
|
+
postfix: "",
|
|
245
|
+
prefix: ""
|
|
246
|
+
},
|
|
233
247
|
"aadhaar-number": {
|
|
234
248
|
containerStyles: "",
|
|
235
249
|
mask: "# # # # - # # # # - # # # #"
|
|
@@ -696,6 +710,18 @@ class Converter {
|
|
|
696
710
|
field = updateFormFieldProperties(field);
|
|
697
711
|
return field;
|
|
698
712
|
};
|
|
713
|
+
const formatFieldTypePassword = (field) => {
|
|
714
|
+
field = setFieldKeyHidden(field);
|
|
715
|
+
field = setFieldAsFormElement(field, true);
|
|
716
|
+
field = updateFormFieldProperties(field);
|
|
717
|
+
return field;
|
|
718
|
+
};
|
|
719
|
+
const formatFieldTypeEmail = (field) => {
|
|
720
|
+
field = setFieldKeyHidden(field);
|
|
721
|
+
field = setFieldAsFormElement(field, true);
|
|
722
|
+
field = updateFormFieldProperties(field);
|
|
723
|
+
return field;
|
|
724
|
+
};
|
|
699
725
|
const formatFieldTypeTextarea = (field) => {
|
|
700
726
|
field = setFieldKeyHidden(field);
|
|
701
727
|
field = setFieldAsFormElement(field, true);
|
|
@@ -859,6 +885,12 @@ class Converter {
|
|
|
859
885
|
case EFieldType.TEXT:
|
|
860
886
|
field = formatFieldTypeText(field);
|
|
861
887
|
break;
|
|
888
|
+
case EFieldType.PASSWORD:
|
|
889
|
+
field = formatFieldTypePassword(field);
|
|
890
|
+
break;
|
|
891
|
+
case EFieldType.EMAIL:
|
|
892
|
+
field = formatFieldTypeEmail(field);
|
|
893
|
+
break;
|
|
862
894
|
case EFieldType.TEXTAREA:
|
|
863
895
|
field = formatFieldTypeTextarea(field);
|
|
864
896
|
break;
|
|
@@ -1192,6 +1224,7 @@ const TABLE_COLUMNS = [
|
|
|
1192
1224
|
"disabled",
|
|
1193
1225
|
"validators",
|
|
1194
1226
|
"properties",
|
|
1227
|
+
"options",
|
|
1195
1228
|
"delete"
|
|
1196
1229
|
];
|
|
1197
1230
|
const OPTIONS = {
|
|
@@ -1474,6 +1507,8 @@ class KwikIDBuilderFormEditorComponent {
|
|
|
1474
1507
|
this.activeFieldConfigValidatorsConfig = {};
|
|
1475
1508
|
this.showFieldConfigPropertiesConfigEditor = false;
|
|
1476
1509
|
this.activeFieldConfigPropertiesConfig = {};
|
|
1510
|
+
this.showFieldConfigOptionsConfigEditor = false;
|
|
1511
|
+
this.activeFieldConfigOptionsConfig = [];
|
|
1477
1512
|
// General Editor Variables
|
|
1478
1513
|
this.editorTypeOptions = [
|
|
1479
1514
|
{ key: "FIELDS", label: "fields" },
|
|
@@ -1531,13 +1566,15 @@ class KwikIDBuilderFormEditorComponent {
|
|
|
1531
1566
|
this.activeFormConfig_NoFields = getObjectDeepCopy(activeFormConfig);
|
|
1532
1567
|
delete this.activeFormConfig_NoFields.fields;
|
|
1533
1568
|
this.rows = this.activeFormConfig_Fields.map((field) => {
|
|
1569
|
+
var _a;
|
|
1534
1570
|
return {
|
|
1535
1571
|
key: field.key,
|
|
1536
1572
|
label: field.label,
|
|
1537
1573
|
type: field.type,
|
|
1538
1574
|
disabled: field.disabled,
|
|
1539
1575
|
validators: Object.assign(Object.assign({}, FIELD_VALIDATORS_CONFIG), field.validators),
|
|
1540
|
-
properties: Object.assign(Object.assign({}, FIELD_PROPERTIES_CONFIG[field.type]), field.properties)
|
|
1576
|
+
properties: Object.assign(Object.assign({}, FIELD_PROPERTIES_CONFIG[field.type]), field.properties),
|
|
1577
|
+
options: (_a = field === null || field === void 0 ? void 0 : field.options) !== null && _a !== void 0 ? _a : []
|
|
1541
1578
|
};
|
|
1542
1579
|
});
|
|
1543
1580
|
this.formGroup = this.kwikidBuilderFormEditorService.createNestedFormGroup(this.rows);
|
|
@@ -1589,6 +1626,13 @@ class KwikIDBuilderFormEditorComponent {
|
|
|
1589
1626
|
this.showFieldConfigPropertiesConfigEditor = true;
|
|
1590
1627
|
this.activeFieldConfigEditing = fieldConfig;
|
|
1591
1628
|
}
|
|
1629
|
+
handleOnClickEditOptions(e) {
|
|
1630
|
+
const fieldConfig = this.formGroup.getRawValue()[e.index];
|
|
1631
|
+
const fieldConfigOptions = fieldConfig["options"];
|
|
1632
|
+
this.activeFieldConfigOptionsConfig = mergeObjects([], fieldConfigOptions);
|
|
1633
|
+
this.showFieldConfigOptionsConfigEditor = true;
|
|
1634
|
+
this.activeFieldConfigEditing = fieldConfig;
|
|
1635
|
+
}
|
|
1592
1636
|
/**
|
|
1593
1637
|
* Methods to handle change in input values for Fields Keys
|
|
1594
1638
|
*/
|
|
@@ -1652,6 +1696,24 @@ class KwikIDBuilderFormEditorComponent {
|
|
|
1652
1696
|
this.showDialogError();
|
|
1653
1697
|
}
|
|
1654
1698
|
}
|
|
1699
|
+
handleOnInputFieldConfigOptionsConfig(e) {
|
|
1700
|
+
this.markUnsaved();
|
|
1701
|
+
try {
|
|
1702
|
+
this.hideDialogError();
|
|
1703
|
+
const optionsConfig = JSON.parse(e);
|
|
1704
|
+
const rowIndex = getFieldIndex(this.rows, this.activeFieldConfigEditing.key);
|
|
1705
|
+
if (rowIndex !== -1) {
|
|
1706
|
+
this.rows[rowIndex].options = optionsConfig;
|
|
1707
|
+
}
|
|
1708
|
+
this.activeFieldConfigEditing = mergeObjects(this.activeFieldConfigEditing, { options: optionsConfig });
|
|
1709
|
+
this.formGroup.controls[rowIndex].setValue(this.activeFieldConfigEditing, {
|
|
1710
|
+
emitEvent: false
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
catch (err) {
|
|
1714
|
+
this.showDialogError();
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1655
1717
|
/**
|
|
1656
1718
|
* Methods to handle deletion of field
|
|
1657
1719
|
*/
|
|
@@ -1688,6 +1750,7 @@ class KwikIDBuilderFormEditorComponent {
|
|
|
1688
1750
|
this.hideDialog();
|
|
1689
1751
|
this.showFieldConfigValidatorsConfigEditor = false;
|
|
1690
1752
|
this.showFieldConfigPropertiesConfigEditor = false;
|
|
1753
|
+
this.showFieldConfigOptionsConfigEditor = false;
|
|
1691
1754
|
}
|
|
1692
1755
|
/**
|
|
1693
1756
|
* Other Helper Methods
|
|
@@ -1765,7 +1828,7 @@ class KwikIDBuilderFormEditorComponent {
|
|
|
1765
1828
|
}
|
|
1766
1829
|
}
|
|
1767
1830
|
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDBuilderFormEditorComponent, deps: [{ token: i2.KwikUILoaderService }, { token: KwikIDFormBuilderFormEditorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1768
|
-
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵcmp = i0.ɵɵ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, 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 \"\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 </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 <pre\n contenteditable=\"true\"\n (keyup)=\"\n handleOnClickSaveActiveFormConfig_NoFields(\n $event.target.innerHTML\n )\n \"\n >\n {{ activeFormConfig_NoFields | json }}\n </pre>\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 \"\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 <pre>\n <code>{{ activeFormConfig | json }}</code>\n </pre>\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 <pre\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigValidatorsConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigValidatorsConfig | json }}\n </pre>\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 <pre\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigPropertiesConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigPropertiesConfig | json }}\n </pre>\n </div>\n </div>\n </div>\n</div>\n<!-- END -->\n\n<!-- Template for rendering different field types -->\n<!-- General Field Template -->\n<ng-template\n #getFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container\n [ngTemplateOutlet]=\"\n isObject(value) ? objectFieldTemplate : notObjectFieldTemplate\n \"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: value,\n fieldKey: key,\n parentPath: path\n }\"\n >\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Object Type Field Template -->\n<ng-template\n #objectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <ng-container *ngFor=\"let item of value | keyvalue\">\n <ng-container\n [ngTemplateOutlet]=\"getFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: item.value,\n fieldKey: item.key,\n parentPath: path === '' ? key : path + '.' + key\n }\"\n >\n </ng-container>\n </ng-container>\n</ng-template>\n\n<!-- Non Object Type Field Template -->\n<ng-template\n #notObjectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container *ngIf=\"isOptions(index, value, key, path)\">\n <ng-container\n [ngTemplateOutlet]=\"optionFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n key: key,\n value: value,\n path: path,\n options: memoizedGetOptions(index, value, key, path)\n }\"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isString(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n textFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isNumber(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n numberFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Options Field Template -->\n<ng-template\n #optionFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n let-options=\"options\"\n>\n <div class=\"field-container options\">\n <select\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n >\n <option\n *ngFor=\"let option of options\"\n [value]=\"option\"\n [selected]=\"option === value\"\n >{{ option }}</option\n >\n </select>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Boolean Field Template -->\n<ng-template\n #booleanFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container checkbox\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.checked }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Text Field Template -->\n<ng-template\n #textFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container text\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"text\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Number Field Template -->\n<ng-template\n #numberFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container number\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"number\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n<!-- END -->\n", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;-webkit-appearance:auto!important;appearance:auto!important}input[type=checkbox]{-webkit-appearance:auto!important;appearance:auto!important;width:1rem;height:1rem}select{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}textarea{overflow-wrap:anywhere;resize:none;unicode-bidi:embed;white-space:pre-wrap}button{display:inline-block;padding:8px 12px;background-color:#007bff;color:#fff;text-decoration:none;border-radius:4px;border:none;cursor:pointer}button:hover{background-color:#0069d9}button:active{background-color:#0056b3}button:focus{outline:none}button.secondary{padding:7px 11px;border:1px solid #007bff;background-color:#fff;color:#007bff}button.secondary:hover{background-color:#b7daff}button.secondary:active{background-color:#b7daff}button.secondary:focus{outline:none}.field-container{display:flex}.field-container label{color:gray}.field-container.checkbox{flex-direction:row;align-items:center;justify-content:center;padding:8px 12px;margin:auto}.field-container.options,.field-container.number,.field-container.text{flex-direction:column}.disclaimer{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#121212;width:100%;height:100%}.disclaimer>*:not(:last-child){margin-bottom:1.5rem}.disclaimer .icon{width:3rem;height:3rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.disclaimer.no-form-selected h1{transform:scaleX(-1)}.disclaimer h1{font-size:5rem;font-weight:100}.disclaimer p{font-size:1rem}\n", ":host{all:unset;position:relative;width:100%;height:100%;overflow:auto}.container{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;height:100%;border:1px solid #ccc}.container header{padding:.5rem;display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;border-bottom:1px solid #ccc}.container header .header-form-editor-btns{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.container header .header-form-editor-btns>*:not(:last-child){margin-right:1rem}.container main{padding:.5rem;flex-grow:1;overflow:auto;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;white-space:nowrap;position:relative}.container main>*:not(:last-child){margin-right:1rem}.container main .no-fields{position:absolute;top:0;left:0;background:white}.container main .form-config-no-fields{overflow:auto;width:100%}.container main .form-config-fields{overflow:auto;width:100%}.container main .form-config-fields .add-field-btn-container{width:100%;text-align:center}.container main .validators,.container main .properties{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch}.container main .validators>*:not(:last-child),.container main .properties>*:not(:last-child){margin-bottom:.5rem}.container main .input-checkbox-container{display:flex;flex-direction:row}.container footer{padding:.5rem;display:flex;flex-direction:row;justify-content:flex-end;align-items:stretch;border-top:1px solid lightgray}.container footer>*:not(:last-child){margin-right:1rem}.modal{position:absolute;top:0;background-color:#0000004d;width:100%;height:100%;display:flex;justify-content:center;align-items:center;left:0;flex-direction:row}.modal.error{background-color:#ff00004d}.modal-box{width:75%;height:75%;margin:auto;background-color:#fff;border-radius:1rem;box-shadow:#64646f33 0 7px 29px}.modal-content{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;width:100%;height:100%}.modal-heading{padding:.5rem 1rem;width:100%;display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid lightgray;align-items:center}.modal-title{font-weight:bold;font-size:1rem}.modal-actions{display:flex;flex-direction:row;cursor:pointer}.modal-actions>*:not(:last-child){margin-right:1rem}.modal-body{overflow:auto}.modal-body pre{padding:1rem}pre{white-space:pre-wrap;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.KwikUILoaderComponent, selector: "kwikui-loader" }], directives: [{ type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "json": i3$2.JsonPipe, "keyvalue": i3$2.KeyValuePipe }, animations: [
|
|
1831
|
+
/** @nocollapse */ KwikIDBuilderFormEditorComponent.ɵcmp = i0.ɵɵ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, template: "<!-- Component Loader -->\n<kwikui-loader></kwikui-loader>\n\n<!-- Component Main View -->\n<div class=\"container\">\n <ng-container *ngIf=\"activeFormConfig; else noFormSelectedTemplate\">\n <header>\n <div>\n Editing Config of Form: <b>{{ activeFormConfig.props.title }}</b>\n </div>\n <div class=\"header-form-editor-btns\">\n <button (click)=\"handleOnClickPreview()\">preview</button>\n <div>Editor Type:</div>\n <select (change)=\"handleOnClickChangeActiveEditor($event.target.value)\">\n <option\n *ngFor=\"let option of editorTypeOptions\"\n [value]=\"option.key\"\n [selected]=\"option.key === activeEditorType\"\n >\n {{ option.label }}\n </option>\n </select>\n </div>\n </header>\n <main>\n <div\n class=\"form-config-fields\"\n *ngIf=\"activeEditorType == 'FIELDS'; else nonFieldsEditorTemplate\"\n >\n <ng-container *ngIf=\"rows.length <= 0\">\n <div class=\"no-fields disclaimer\">\n <div><p>Please add field to get started</p></div>\n <div class=\"icon\"><h1>+</h1></div>\n <button (click)=\"handleOnClickAddField()\">add field</button>\n </div>\n </ng-container>\n <table>\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\">\n {{ column }}\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let row of rows; let i = index; trackBy: trackByFn\"\n >\n <tr>\n <ng-container *ngFor=\"let column of columns; let j = index\">\n <td>\n <div [class]=\"column\">\n <ng-container\n *ngIf=\"\n column !== 'delete' &&\n column !== 'validators' &&\n column !== 'properties' &&\n column !== 'type' &&\n column !== 'disabled' &&\n column !== 'options'\n \"\n [ngTemplateOutlet]=\"getFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n fieldValue: row[column],\n fieldKey: column,\n parentPath: ''\n }\"\n ></ng-container>\n <ng-container *ngIf=\"column === 'type'\">\n <ng-container\n [ngTemplateOutlet]=\"optionFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n key: column,\n value: row[column],\n path: '',\n options: memoizedGetOptions(\n i,\n row[column],\n column,\n ''\n )\n }\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"column === 'disabled'\">\n <ng-container\n [ngTemplateOutlet]=\"booleanFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: i,\n key: column,\n value: row[column],\n path: '',\n options: memoizedGetOptions(\n i,\n row[column],\n column,\n ''\n )\n }\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"column === 'delete'\">\n <button\n (click)=\"\n handleOnClickDeleteField({\n index: i,\n key: row['key']\n })\n \"\n [disabled]=\"rows.length === 1\"\n >\n delete\n </button>\n </ng-container>\n <ng-container *ngIf=\"column === 'validators'\">\n <button\n (click)=\"\n handleOnClickEditValidators({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n edit\n </button>\n </ng-container>\n <ng-container *ngIf=\"column === 'properties'\">\n <button\n (click)=\"\n handleOnClickEditProperties({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n edit\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"row['type'] === 'radio' && column === 'options'\"\n >\n <button\n (click)=\"\n handleOnClickEditOptions({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n add\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"row['type'] === 'select' && column === 'options'\"\n >\n <button\n (click)=\"\n handleOnClickEditOptions({\n index: i,\n key: row['key'],\n type: row['type']\n })\n \"\n >\n add\n </button>\n </ng-container>\n </div>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <div class=\"add-field-btn-container\"> </div>\n </div>\n <ng-template #nonFieldsEditorTemplate>\n <div class=\"form-config-no-fields\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnClickSaveActiveFormConfig_NoFields(\n $event.target.innerHTML\n )\n \"\n >\n {{ activeFormConfig_NoFields | json }}\n </div>\n </div>\n </ng-template>\n </main>\n <footer>\n <button\n *ngIf=\"rows.length > 0\"\n (click)=\"handleOnClickAddField()\"\n >\n add field\n </button>\n <button\n (click)=\"handleOnClickSaveActiveFormConfig()\"\n [class.secondary]=\"!savedConfig\"\n >\n {{ savedConfig ? \"saved\" : \"unsaved\" }}\n </button>\n </footer>\n </ng-container>\n <ng-template #noFormSelectedTemplate>\n <div class=\"no-form-selected disclaimer\">\n <div class=\"icon\"><h1>➦</h1></div>\n <div><p>Please select a form to edit it's fields</p></div>\n </div>\n </ng-template>\n</div>\n\n<!-- Component Dialog -->\n<div\n class=\"modal\"\n [class.error]=\"dialogError === true\"\n *ngIf=\"\n dialogOpen ||\n showFieldConfigValidatorsConfigEditor ||\n showFieldConfigPropertiesConfigEditor ||\n showFieldConfigOptionsConfigEditor\n \"\n [@panelInOut]\n>\n <div class=\"modal-box\">\n <div\n class=\"modal-content\"\n *ngIf=\"dialogOpen\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Config Preview\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"convertToMinifiedJson()\">minify</button>\n <button (click)=\"convertToCompleteJson()\">full</button>\n <button (click)=\"downloadJSON()\">download</button>\n <button (click)=\"copyToClipboard()\">copy</button>\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div class=\"json-editor\">\n <code>{{ activeFormConfig | json }}</code>\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigValidatorsConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Validator Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigValidatorsConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigValidatorsConfig | json }}\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigPropertiesConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Properties Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigPropertiesConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigPropertiesConfig | json }}\n </div>\n </div>\n </div>\n <div\n class=\"modal-content\"\n *ngIf=\"showFieldConfigOptionsConfigEditor\"\n >\n <div class=\"modal-heading\">\n <div class=\"modal-title\">\n {{ activeFormConfig.props.title }}'s Options Config Editor\n </div>\n <div class=\"modal-actions\">\n <button (click)=\"closeJSONPopup()\">close</button>\n </div>\n </div>\n <div class=\"modal-body\">\n <div\n class=\"json-editor\"\n contenteditable=\"true\"\n (keyup)=\"\n handleOnInputFieldConfigOptionsConfig($event.target.innerHTML)\n \"\n >\n {{ this.activeFieldConfigOptionsConfig | json }}\n </div>\n </div>\n </div>\n </div>\n</div>\n<!-- END -->\n\n<!-- Template for rendering different field types -->\n<!-- General Field Template -->\n<ng-template\n #getFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container\n [ngTemplateOutlet]=\"\n isObject(value) ? objectFieldTemplate : notObjectFieldTemplate\n \"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: value,\n fieldKey: key,\n parentPath: path\n }\"\n >\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Object Type Field Template -->\n<ng-template\n #objectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <ng-container *ngFor=\"let item of value | keyvalue\">\n <ng-container\n [ngTemplateOutlet]=\"getFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n fieldValue: item.value,\n fieldKey: item.key,\n parentPath: path === '' ? key : path + '.' + key\n }\"\n >\n </ng-container>\n </ng-container>\n</ng-template>\n\n<!-- Non Object Type Field Template -->\n<ng-template\n #notObjectFieldTemplate\n let-index=\"index\"\n let-value=\"fieldValue\"\n let-key=\"fieldKey\"\n let-path=\"parentPath\"\n>\n <div>\n <ng-container *ngIf=\"isOptions(index, value, key, path)\">\n <ng-container\n [ngTemplateOutlet]=\"optionFieldTemplate\"\n [ngTemplateOutletContext]=\"{\n index: index,\n key: key,\n value: value,\n path: path,\n options: memoizedGetOptions(index, value, key, path)\n }\"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isString(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n textFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"!isOptions(index, value, key, path) && isNumber(value)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n numberFieldTemplate;\n context: { index: index, key: key, value: value, path: path }\n \"\n ></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Options Field Template -->\n<ng-template\n #optionFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n let-options=\"options\"\n>\n <div class=\"field-container options\">\n <select\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n >\n <option\n *ngFor=\"let option of options\"\n [value]=\"option\"\n [selected]=\"option === value\"\n >{{ option }}</option\n >\n </select>\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Boolean Field Template -->\n<ng-template\n #booleanFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container checkbox\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n (change)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.checked }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Text Field Template -->\n<ng-template\n #textFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container text\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"text\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n\n<!-- Non Object Type Field :: Number Field Template -->\n<ng-template\n #numberFieldTemplate\n let-index=\"index\"\n let-key=\"key\"\n let-value=\"value\"\n let-path=\"path\"\n>\n <div class=\"field-container number\">\n <input\n placeholder=\"Enter {{ key }}\"\n type=\"number\"\n [value]=\"value\"\n (blur)=\"handleOnInput({ index, key, value: { previous: value, new: $event.target.value }, path })\"\n />\n </div>\n</ng-template>\n<!-- END -->\n", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}input[type=text],input[type=number]{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;-webkit-appearance:auto!important;appearance:auto!important}input[type=checkbox]{-webkit-appearance:auto!important;appearance:auto!important;width:1rem;height:1rem}select{width:100%;padding:8px 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}textarea{overflow-wrap:anywhere;resize:none;unicode-bidi:embed;white-space:pre-wrap}button{display:inline-block;padding:8px 12px;background-color:#007bff;color:#fff;text-decoration:none;border-radius:4px;border:none;cursor:pointer}button:hover{background-color:#0069d9}button:active{background-color:#0056b3}button:focus{outline:none}button.secondary{padding:7px 11px;border:1px solid #007bff;background-color:#fff;color:#007bff}button.secondary:hover{background-color:#b7daff}button.secondary:active{background-color:#b7daff}button.secondary:focus{outline:none}.field-container{display:flex}.field-container label{color:gray}.field-container.checkbox{flex-direction:row;align-items:center;justify-content:center;padding:8px 12px;margin:auto}.field-container.options,.field-container.number,.field-container.text{flex-direction:column}.disclaimer{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#121212;width:100%;height:100%}.disclaimer>*:not(:last-child){margin-bottom:1.5rem}.disclaimer .icon{width:3rem;height:3rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.disclaimer.no-form-selected h1{transform:scaleX(-1)}.disclaimer h1{font-size:5rem;font-weight:100}.disclaimer p{font-size:1rem}\n", ":host{all:unset;position:relative;width:100%;height:100%;overflow:auto}.container{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;height:100%;border:1px solid #ccc}.container header{padding:.5rem;display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;border-bottom:1px solid #ccc}.container header .header-form-editor-btns{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.container header .header-form-editor-btns>*:not(:last-child){margin-right:1rem}.container main{padding:.5rem;flex-grow:1;overflow:auto;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;white-space:nowrap;position:relative}.container main>*:not(:last-child){margin-right:1rem}.container main .no-fields{position:absolute;top:0;left:0;background:white}.container main .form-config-no-fields{overflow:auto;width:100%}.container main .form-config-fields{overflow:auto;width:100%}.container main .form-config-fields .add-field-btn-container{width:100%;text-align:center}.container main .validators,.container main .properties{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch}.container main .validators>*:not(:last-child),.container main .properties>*:not(:last-child){margin-bottom:.5rem}.container main .input-checkbox-container{display:flex;flex-direction:row}.container footer{padding:.5rem;display:flex;flex-direction:row;justify-content:flex-end;align-items:stretch;border-top:1px solid lightgray}.container footer>*:not(:last-child){margin-right:1rem}.modal{position:absolute;top:0;background-color:#0000004d;width:100%;height:100%;display:flex;justify-content:center;align-items:center;left:0;flex-direction:row}.modal.error{background-color:#ff00004d}.modal-box{width:75%;height:75%;margin:auto;background-color:#fff;border-radius:1rem;box-shadow:#64646f33 0 7px 29px}.modal-content{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;width:100%;height:100%}.modal-heading{padding:.5rem 1rem;width:100%;display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid lightgray;align-items:center}.modal-title{font-weight:bold;font-size:1rem}.modal-actions{display:flex;flex-direction:row;cursor:pointer}.modal-actions>*:not(:last-child){margin-right:1rem}.modal-body{overflow:auto;flex:1}.modal-body .json-editor{font-family:monospace;white-space:pre-wrap;border:none;padding:0;background-color:#f5f5f5;height:100%;outline:none;overflow:auto}.json-editor{font-family:monospace;white-space:pre-wrap;border:none;padding:0;background-color:#f5f5f5;height:100%;outline:none;overflow:auto}table{width:100%;border-collapse:collapse;margin-bottom:20px}table th,table td{padding:8px;text-align:left;border:1px solid #ccc;vertical-align:top}table th{background-color:#f2f2f2}table tr:nth-child(even){background-color:#f9f9f9}table tr:hover{background-color:#eaeaea}\n"], components: [{ type: i2.KwikUILoaderComponent, selector: "kwikui-loader" }], directives: [{ type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "json": i3$2.JsonPipe, "keyvalue": i3$2.KeyValuePipe }, animations: [
|
|
1769
1832
|
trigger("panelInOut", [
|
|
1770
1833
|
transition(":enter", [
|
|
1771
1834
|
style({ transform: "translateY(100%)" }),
|
|
@@ -1800,6 +1863,9 @@ __decorate([
|
|
|
1800
1863
|
__decorate([
|
|
1801
1864
|
logMethod
|
|
1802
1865
|
], KwikIDBuilderFormEditorComponent.prototype, "handleOnClickEditProperties", null);
|
|
1866
|
+
__decorate([
|
|
1867
|
+
logMethod
|
|
1868
|
+
], KwikIDBuilderFormEditorComponent.prototype, "handleOnClickEditOptions", null);
|
|
1803
1869
|
__decorate([
|
|
1804
1870
|
logMethod
|
|
1805
1871
|
], KwikIDBuilderFormEditorComponent.prototype, "handleOnInput", null);
|
|
@@ -1809,6 +1875,9 @@ __decorate([
|
|
|
1809
1875
|
__decorate([
|
|
1810
1876
|
logMethod
|
|
1811
1877
|
], KwikIDBuilderFormEditorComponent.prototype, "handleOnInputFieldConfigPropertiesConfig", null);
|
|
1878
|
+
__decorate([
|
|
1879
|
+
logMethod
|
|
1880
|
+
], KwikIDBuilderFormEditorComponent.prototype, "handleOnInputFieldConfigOptionsConfig", null);
|
|
1812
1881
|
__decorate([
|
|
1813
1882
|
logMethod
|
|
1814
1883
|
], KwikIDBuilderFormEditorComponent.prototype, "handleOnClickDeleteField", null);
|
|
@@ -1859,7 +1928,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1859
1928
|
type: Input
|
|
1860
1929
|
}], onClickSaveActiveFormConfig: [{
|
|
1861
1930
|
type: Output
|
|
1862
|
-
}], ngOnInit: [], ngOnChanges: [], initFormEditor: [], handleOnClickChangeActiveEditor: [], handleOnClickSaveActiveFormConfig: [], handleOnClickAddField: [], handleOnClickEditValidators: [], handleOnClickEditProperties: [], handleOnInput: [], handleOnInputFieldConfigValidatorsConfig: [], handleOnInputFieldConfigPropertiesConfig: [], handleOnClickDeleteField: [], handleOnClickSaveActiveFormConfig_NoFields: [], handleOnClickPreview: [], toggleLoader: [], closeJSONPopup: [], copyToClipboard: [], convertToMinifiedJson: [], convertToCompleteJson: [], downloadJSON: [] } });
|
|
1931
|
+
}], ngOnInit: [], ngOnChanges: [], initFormEditor: [], handleOnClickChangeActiveEditor: [], handleOnClickSaveActiveFormConfig: [], handleOnClickAddField: [], handleOnClickEditValidators: [], handleOnClickEditProperties: [], handleOnClickEditOptions: [], handleOnInput: [], handleOnInputFieldConfigValidatorsConfig: [], handleOnInputFieldConfigPropertiesConfig: [], handleOnInputFieldConfigOptionsConfig: [], handleOnClickDeleteField: [], handleOnClickSaveActiveFormConfig_NoFields: [], handleOnClickPreview: [], toggleLoader: [], closeJSONPopup: [], copyToClipboard: [], convertToMinifiedJson: [], convertToCompleteJson: [], downloadJSON: [] } });
|
|
1863
1932
|
|
|
1864
1933
|
class KwikIDFormsBuilderComponent {
|
|
1865
1934
|
constructor(loaderService) {
|
|
@@ -4205,7 +4274,7 @@ class KwikIDFormViewComponent {
|
|
|
4205
4274
|
}
|
|
4206
4275
|
}
|
|
4207
4276
|
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: KwikIDFormViewService }, { token: TuiPushService }, { token: TuiAlertService }, { token: TuiPreviewDialogService }, { token: TuiDialogService }, { token: i2.KwikUILoaderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4208
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", userConfig: "userConfig", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", getUnsavedDataState: "getUnsavedDataState", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm", onClickFormFieldButton: "onClickFormFieldButton" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of\n {{ formConfig.formsListLength }}</div\n >\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [style]=\"formConfig.properties?.main?.styles | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- 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 [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n", styles: [".kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}.preview-container>*:not(:last-child){margin-bottom:1rem}.preview-container .preview-html{flex-grow:1}.preview-container .preview-iframe-content{height:100%;flex-grow:1}.preview-container .preview-iframe-content .preview-iframe{width:100%;height:100%}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.preview-container .preview-unavailable>*:not(:last-child){margin-bottom:1rem}\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.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2.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.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2.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.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.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2.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.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.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2.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.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2.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: i2.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i4.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4.TuiPushDirective, selector: "tui-push" }, { type: i5.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2.KwikUISafeUrlPipe } });
|
|
4277
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData", userConfig: "userConfig", apiCallResponse: "apiCallResponse", buttonClickResponse: "buttonClickResponse", popupFormCallback: "popupFormCallback" }, outputs: { onClickGoBack: "onClickGoBack", onClickViewForms: "onClickViewForms", getUnsavedDataState: "getUnsavedDataState", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", onActionShowPopupForm: "onActionShowPopupForm", onClickFormFieldButton: "onClickFormFieldButton" }, providers: [KwikIDFormViewService], viewQueries: [{ propertyName: "preview", first: true, predicate: ["preview"], descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties?.header?.title?.hidden ||\n !formConfig.properties?.header?.steps?.hidden ||\n !formConfig.properties?.header?.backButton?.hidden\n \"\n >\n <img\n id=\"uf-header-logo\"\n *ngIf=\"!formConfig.properties?.header?.logo?.hidden && isMobileView\"\n [src]=\"formConfig.properties?.header?.logo?.src\"\n [alt]=\"formConfig.properties?.header?.logo?.alt\"\n />\n <div id=\"uf-form-fields-header-main\">\n <div id=\"uf-form-fields-header-left\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties?.header.backButton.hidden && isMobileView\n \"\n [disabled]=\"backButton.disabled\"\n [showLoader]=\"backButton.showLoader\"\n appearance=\"mono\"\n icon=\"tuiIconArrowLeft\"\n shape=\"rounded\"\n (onClick)=\"\n handleOnClickGoBack(\n $event,\n formConfig.properties?.header.backButton.mode\n )\n \"\n ></kwikui-button>\n </div>\n <div id=\"uf-form-fields-header-right\">\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties?.header.title.hidden\"\n >{{ formConfig.properties?.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties?.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of\n {{ formConfig.formsListLength }}</div\n >\n </div>\n </div>\n <hr\n *ngIf=\"\n !formConfig.properties?.header.title.hidden ||\n !formConfig.properties?.header.steps.hidden ||\n !formConfig.properties?.header.backButton.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [style]=\"formConfig.properties?.main?.styles | styleSanitizer\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | kwikuiSafeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Button -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button\n [appearance]=\"field?.properties?.appearance ?? 'primary'\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [icon]=\"field?.properties?.icon\"\n [iconRight]=\"field?.properties?.iconRight\"\n [id]=\"field?.key\"\n [label]=\"field?.label\"\n [shape]=\"field?.properties?.shape\"\n [showLoader]=\"field?.properties?.loading ?? false\"\n [size]=\"field?.properties?.size\"\n [styles]=\"field?.properties?.styles\"\n [type]=\"'button'\"\n (onClick)=\"handleOnClickFormFieldButton(field)\"\n ></kwikui-button>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Email -->\n <ng-container *ngSwitchCase=\"'email'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-email\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [domains]=\"field?.properties?.domains\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-email>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Password -->\n <ng-container *ngSwitchCase=\"'password'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-password\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [hintContent]=\"field?.properties?.hintContent\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-password>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Textarea -->\n <ng-container *ngSwitchCase=\"'textarea'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-textarea\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-textarea>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n [variant]=\"field?.properties?.variant ?? 'block'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-input-radio\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-radio>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'select'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-select\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [searchable]=\"field?.properties?.searchable\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-select>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix\"\n [prefix]=\"field?.properties?.prefix\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [mode]=\"field?.properties?.mode\"\n [otpLength]=\"field?.properties?.otpLength\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Preview Image -->\n <ng-container *ngSwitchCase=\"'image'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-image\n [altText]=\"field?.properties?.altText\"\n [class]=\"field?.properties?.class\"\n [html]=\"field?.properties?.html\"\n [id]=\"field.key\"\n [imageSrc]=\"field?.default?.value?.value ?? ''\"\n [imageType]=\"field?.properties?.imageType\"\n [loadingType]=\"field?.properties?.loadingType\"\n [styles]=\"field?.properties?.styles\"\n ></kwikui-image>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- File Upload -->\n <ng-container *ngSwitchCase=\"'file'\">\n <div\n [hidden]=\"field?.hidden\"\n [style]=\"field?.properties?.containerStyles | styleSanitizer\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto\"\n >\n <kwikui-input-files\n [accept]=\"field?.properties?.accept\"\n [class]=\"field?.properties?.class\"\n [disabled]=\"field?.disabled\"\n [files]=\"files[field.key]\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field?.key\"\n [label]=\"field?.properties?.label\"\n [link]=\"field?.properties?.link\"\n [maxFileSize]=\"field?.properties?.maxFileSize\"\n [multiple]=\"field?.properties?.multiple\"\n [setFileTypesToForm]=\"['NORMAL']\"\n [styles]=\"field?.properties?.styles\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValueFile($event)\"\n (getRemovedFile)=\"handleRemovedFile($event)\"\n ></kwikui-input-files>\n </label>\n <ng-template #labelTemplate>\n <p\n style=\"padding: 0px 0.25rem; margin-bottom: 0.25rem\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\">*</span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div\n class=\"kwikid-form-buttons\"\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden ||\n !formConfig.properties.footer.saveButton.hidden\n \"\n >\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [appearance]=\"'secondary'\"\n [disabled]=\"viewFormsButton.disabled\"\n [label]=\"formConfig.properties.footer.viewFormsButton.label\"\n [showLoader]=\"viewFormsButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n [label]=\"formConfig.properties.footer.saveButton.label\"\n [showLoader]=\"saveFormButton.showLoader\"\n [styles]=\"'width: 100%'\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n *ngFor=\"let item of [].constructor(7); let i = index\"\n class=\"large-wrapper tui-skeleton tui-skeleton_rounded\"\n >\n </div>\n</div>\n\n<kwikui-loader></kwikui-loader>\n\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n\n<ng-template\n #preview\n let-preview\n>\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n class=\"preview-container\"\n >\n <tui-preview-title *ngIf=\"previewProperties.title !== ''\">{{\n previewProperties.title\n }}</tui-preview-title>\n\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n\n <button\n tuiIconButton\n tuiPreviewAction\n icon=\"tuiIconCloseLarge\"\n title=\"Close\"\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n</ng-template>\n\n<ng-template\n #dialog\n let-dialog\n>\n <div class=\"preview-container\">\n <ng-container *ngIf=\"!previewProperties.unavailable\">\n <div\n *ngIf=\"previewProperties?.html?.before !== ''\"\n class=\"preview-html preview-html-before\"\n [style]=\"previewProperties?.html?.beforeStyles\"\n [innerHtml]=\"previewProperties.html.before | kwikuiSafeHtml\"\n ></div>\n\n <!-- Content within the iframe -->\n <div\n class=\"preview-iframe-content\"\n [style]=\"previewProperties?.iframe?.containerStyles\"\n *ngIf=\"previewProperties.iframe.src !== ''\"\n >\n <!-- Your HTML content here -->\n <iframe\n [src]=\"previewProperties.iframe.src | kwikuiSafeUrl\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n allowfullscreen\n [title]=\"previewProperties.iframe.title\"\n class=\"preview-iframe\"\n scrolling=\"auto\"\n ></iframe>\n </div>\n\n <div\n *ngIf=\"previewProperties?.html?.after !== ''\"\n class=\"preview-html preview-html-after\"\n [style]=\"previewProperties?.html?.afterStyles\"\n [innerHtml]=\"previewProperties.html.after | kwikuiSafeHtml\"\n ></div>\n </ng-container>\n\n <ng-container *ngIf=\"previewProperties.unavailable\">\n <div class=\"preview-unavailable\">\n <tui-svg\n src=\"tuiIconFileLarge\"\n class=\"t-icon\"\n ></tui-svg>\n <div>Preview unavailable</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n", styles: [".kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.kwikid-form.show>*:not(:last-child){margin-bottom:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.kwikid-form-buttons>*:not(:last-child){margin-right:1rem}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;padding:1rem 1rem 0}#uf-form-fields-header-container>*:not(:last-child){margin-bottom:.5rem}#uf-form-fields-header-container #uf-header-logo{width:-moz-fit-content;width:fit-content;height:50px}#uf-form-fields-header-container #uf-form-fields-header-main{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;width:100%}#uf-form-fields-header-container #uf-form-fields-header-main>*:not(:last-child){margin-right:.25rem}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start}#uf-form-fields-header-container #uf-form-fields-header-main #uf-form-fields-header-right>*{margin-bottom:.5rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1rem}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center}.title>*:not(:last-child){margin-right:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;padding:1rem}.kwikid-form-container-loading>* :not(:last-child){margin-bottom:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}.preview-container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-content:center;height:calc(100vh - 3rem)}.preview-container>*:not(:last-child){margin-bottom:1rem}.preview-container .preview-html{flex-grow:1}.preview-container .preview-iframe-content{height:100%;flex-grow:1}.preview-container .preview-iframe-content .preview-iframe{width:100%;height:100%}.preview-container .preview-unavailable{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;color:#fff;font-size:1.2rem;top:50%;left:50%;width:100%;height:100vh}.preview-container .preview-unavailable>*:not(:last-child){margin-bottom:1rem}\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.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type"], outputs: ["onClick"] }, { type: i2.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["id", "messages"] }, { type: i2.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.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.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.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2.KwikUICheckboxComponent, selector: "kwikui-checkbox", inputs: ["contentAlign", "disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "placeholder", "properties", "size", "validators", "variant"], outputs: ["getKeyValue"] }, { type: i2.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.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.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["countryCode", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "phoneMaskAfterCountryCode", "placeholder", "postfix", "prefix", "properties", "removeCountryCodeFromValue", "size", "validators"], outputs: ["getKeyValue"] }, { type: i3.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2.KwikUIInputRadioComponent, selector: "kwikui-input-radio", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "items", "label", "orientation", "placeholder", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i2.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.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.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["apiStatus", "class", "disabled", "id", "label", "shape", "showLoader", "size", "styles"], outputs: ["onClick"] }, { type: i2.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.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["disabled", "focus", "formControl", "formControlName", "id", "invalid", "label", "mask", "placeholder", "properties", "validators"], outputs: ["getKeyValue"] }, { type: i2.KwikUIImageComponent, selector: "kwikui-image", inputs: ["altText", "class", "html", "id", "imageSrc", "imageType", "loadingType", "styles"], outputs: ["onClick"] }, { type: i2.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: i2.KwikUILoaderComponent, selector: "kwikui-loader" }, { type: i4.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i5.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { type: i5.TuiPreviewTitleComponent, selector: "tui-preview-title" }, { type: i3.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4.TuiPushDirective, selector: "tui-push" }, { type: i5.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }], pipes: { "styleSanitizer": StyleSanitizerPipe, "kwikuiSafeHtml": i2.KwikUISafeHtmlPipe, "kwikuiSafeUrl": i2.KwikUISafeUrlPipe } });
|
|
4209
4278
|
__decorate([
|
|
4210
4279
|
logMethod
|
|
4211
4280
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -4815,7 +4884,14 @@ class KwikIDFormsRendererComponent {
|
|
|
4815
4884
|
}
|
|
4816
4885
|
fetchFormConfig(url) {
|
|
4817
4886
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4818
|
-
const
|
|
4887
|
+
const FETCH_URL = "https://auat.vkyc.getkwikid.com:3358/v1/fetch_json_from_s3";
|
|
4888
|
+
const response = yield fetch(FETCH_URL, {
|
|
4889
|
+
method: "POST",
|
|
4890
|
+
headers: {
|
|
4891
|
+
"Content-type": "application/json; charset=UTF-8"
|
|
4892
|
+
},
|
|
4893
|
+
body: JSON.stringify({ s3_url: url })
|
|
4894
|
+
});
|
|
4819
4895
|
const data = yield response.json();
|
|
4820
4896
|
return data;
|
|
4821
4897
|
});
|
|
@@ -5613,10 +5689,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
5613
5689
|
type: Output
|
|
5614
5690
|
}], toggleLoader: [], fetchFormConfig: [], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], showPreview: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleGetUnsavedState: [], handleOnClickFormFieldButton: [], handleOnActionShowPopupForm: [], handleOnClickSaveForm: [], handleOnClickGoBack: [], handleOnClickSubmitForms: [] } });
|
|
5615
5691
|
|
|
5692
|
+
class JsonFormatPipe {
|
|
5693
|
+
transform(value) {
|
|
5694
|
+
if (!value)
|
|
5695
|
+
return "";
|
|
5696
|
+
// Trim spaces from start and end, then JSON.stringify with indentation for formatting
|
|
5697
|
+
return JSON.stringify(value, null, 2).trim();
|
|
5698
|
+
}
|
|
5699
|
+
}
|
|
5700
|
+
/** @nocollapse */ JsonFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: JsonFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5701
|
+
/** @nocollapse */ JsonFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: JsonFormatPipe, name: "jsonFormat" });
|
|
5702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: JsonFormatPipe, decorators: [{
|
|
5703
|
+
type: Pipe,
|
|
5704
|
+
args: [{
|
|
5705
|
+
name: "jsonFormat"
|
|
5706
|
+
}]
|
|
5707
|
+
}] });
|
|
5708
|
+
|
|
5616
5709
|
class KwikIDBuilderFormEditorModule {
|
|
5617
5710
|
}
|
|
5618
5711
|
/** @nocollapse */ KwikIDBuilderFormEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDBuilderFormEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5619
|
-
/** @nocollapse */ KwikIDBuilderFormEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDBuilderFormEditorModule, declarations: [KwikIDBuilderFormEditorComponent], imports: [CommonModule,
|
|
5712
|
+
/** @nocollapse */ KwikIDBuilderFormEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDBuilderFormEditorModule, declarations: [KwikIDBuilderFormEditorComponent, JsonFormatPipe], imports: [CommonModule,
|
|
5620
5713
|
FormsModule,
|
|
5621
5714
|
ReactiveFormsModule,
|
|
5622
5715
|
KwikUIModule,
|
|
@@ -5631,7 +5724,7 @@ class KwikIDBuilderFormEditorModule {
|
|
|
5631
5724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDBuilderFormEditorModule, decorators: [{
|
|
5632
5725
|
type: NgModule,
|
|
5633
5726
|
args: [{
|
|
5634
|
-
declarations: [KwikIDBuilderFormEditorComponent],
|
|
5727
|
+
declarations: [KwikIDBuilderFormEditorComponent, JsonFormatPipe],
|
|
5635
5728
|
imports: [
|
|
5636
5729
|
CommonModule,
|
|
5637
5730
|
FormsModule,
|
|
@@ -5728,7 +5821,8 @@ class KwikIDFormViewModule {
|
|
|
5728
5821
|
TuiPreviewActionModule,
|
|
5729
5822
|
TuiDialogModule,
|
|
5730
5823
|
KwikUIPipeModule,
|
|
5731
|
-
KwikUIModule
|
|
5824
|
+
KwikUIModule,
|
|
5825
|
+
KwikUIInputEmailModule], exports: [KwikIDFormViewComponent] });
|
|
5732
5826
|
/** @nocollapse */ KwikIDFormViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewModule, imports: [[
|
|
5733
5827
|
CommonModule,
|
|
5734
5828
|
FormsModule,
|
|
@@ -5741,7 +5835,8 @@ class KwikIDFormViewModule {
|
|
|
5741
5835
|
TuiPreviewActionModule,
|
|
5742
5836
|
TuiDialogModule,
|
|
5743
5837
|
KwikUIPipeModule,
|
|
5744
|
-
KwikUIModule
|
|
5838
|
+
KwikUIModule,
|
|
5839
|
+
KwikUIInputEmailModule
|
|
5745
5840
|
]] });
|
|
5746
5841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewModule, decorators: [{
|
|
5747
5842
|
type: NgModule,
|
|
@@ -5759,7 +5854,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
5759
5854
|
TuiPreviewActionModule,
|
|
5760
5855
|
TuiDialogModule,
|
|
5761
5856
|
KwikUIPipeModule,
|
|
5762
|
-
KwikUIModule
|
|
5857
|
+
KwikUIModule,
|
|
5858
|
+
KwikUIInputEmailModule
|
|
5763
5859
|
],
|
|
5764
5860
|
exports: [KwikIDFormViewComponent]
|
|
5765
5861
|
}]
|