kwikid-forms 0.3.2 → 0.3.4
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 +1396 -393
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder.component.js +86 -67
- package/esm2015/lib/builder/builder.module.js +52 -7
- package/esm2015/lib/builder/element-config-editor/editors/basic/checkbox-config.editor.component.js +72 -0
- package/esm2015/lib/builder/element-config-editor/editors/basic/date-config.editor.component.js +72 -0
- package/esm2015/lib/builder/element-config-editor/editors/basic/number-config.editor.component.js +72 -0
- package/esm2015/lib/builder/element-config-editor/editors/basic/otp-config.editor.component.js +130 -0
- package/esm2015/lib/builder/element-config-editor/editors/basic/phone-config.editor.component.js +130 -0
- package/esm2015/lib/builder/element-config-editor/editors/basic/radio-config.editor.component.js +241 -147
- package/esm2015/lib/builder/element-config-editor/editors/basic/text-config.editor.component.js +48 -51
- package/esm2015/lib/builder/element-config-editor/editors/basic-element-config.editor.component.js +475 -333
- package/esm2015/lib/builder/element-config-editor/editors/document/aadhaar-number-config.editor.component.js +130 -0
- package/esm2015/lib/builder/element-config-editor/editors/document/pan-number-config.editor.component.js +135 -0
- package/esm2015/lib/builder/element-config-editor/editors/document-element-config.editor.component.js +610 -0
- package/esm2015/lib/builder/element-config-editor/editors/other/html-config.editor.component.js +120 -0
- package/esm2015/lib/builder/element-config-editor/editors/other/title-config.editor.component.js +121 -0
- package/esm2015/lib/builder/element-config-editor/editors/other-element-config.editor.component.js +214 -0
- package/esm2015/lib/builder/element-config-editor/element-config-editor.component.js +6 -3
- package/esm2015/lib/builder/shared/elements.js +33 -8
- package/esm2015/lib/renderer/config-converter.helper.js +2 -2
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +29 -14
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +17 -15
- package/esm2015/lib/renderer/renderer.component.js +1 -2
- package/fesm2015/kwikid-forms.js +2787 -738
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/builder/builder.component.d.ts +4 -0
- package/lib/builder/builder.module.d.ts +16 -5
- package/lib/builder/element-config-editor/editors/basic/checkbox-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/basic/date-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/basic/number-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/basic/otp-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/basic/phone-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/document/aadhaar-number-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/document/pan-number-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/document-element-config.editor.component.d.ts +20 -0
- package/lib/builder/element-config-editor/editors/other/html-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/other/title-config.editor.component.d.ts +16 -0
- package/lib/builder/element-config-editor/editors/other-element-config.editor.component.d.ts +20 -0
- package/lib/builder/shared/elements.d.ts +3 -1
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/drag-drop'), require('@angular/core'), require('@angular/forms'), require('kwikid-toolkit'), require('kwikui'), require('@angular/common'), require('@taiga-ui/core'), require('@taiga-ui/kit'), require('rxjs/operators'), require('@taiga-ui/cdk'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common/http')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('kwikid-forms', ['exports', '@angular/cdk/drag-drop', '@angular/core', '@angular/forms', 'kwikid-toolkit', 'kwikui', '@angular/common', '@taiga-ui/core', '@taiga-ui/kit', 'rxjs/operators', '@taiga-ui/cdk', '@angular/platform-browser', '@angular/animations', '@angular/common/http'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-forms"] = {}, global.ng.cdk.dragDrop, global.ng.core, global.ng.forms, global["kwikid-toolkit"], global.kwikui, global.ng.common, global["@taiga-ui/core"], global["@taiga-ui/kit"], global.rxjs.operators, global["@taiga-ui/cdk"], global.ng.platformBrowser, global.ng.animations, global.ng.common.http));
|
|
5
|
-
})(this, (function (exports, i4, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/drag-drop'), require('@angular/core'), require('@angular/forms'), require('kwikid-toolkit'), require('kwikui'), require('@angular/common'), require('lodash'), require('@taiga-ui/core'), require('@taiga-ui/kit'), require('rxjs/operators'), require('@taiga-ui/cdk'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common/http')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('kwikid-forms', ['exports', '@angular/cdk/drag-drop', '@angular/core', '@angular/forms', 'kwikid-toolkit', 'kwikui', '@angular/common', 'lodash', '@taiga-ui/core', '@taiga-ui/kit', 'rxjs/operators', '@taiga-ui/cdk', '@angular/platform-browser', '@angular/animations', '@angular/common/http'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["kwikid-forms"] = {}, global.ng.cdk.dragDrop, global.ng.core, global.ng.forms, global["kwikid-toolkit"], global.kwikui, global.ng.common, global.lodash, global["@taiga-ui/core"], global["@taiga-ui/kit"], global.rxjs.operators, global["@taiga-ui/cdk"], global.ng.platformBrowser, global.ng.animations, global.ng.common.http));
|
|
5
|
+
})(this, (function (exports, i4, i0, i2, kwikidToolkit, i1, i5, _, i3, i4$1, operators, cdk, i1$1, animations, http) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
8
|
|
|
7
9
|
function _interopNamespace(e) {
|
|
8
10
|
if (e && e.__esModule) return e;
|
|
@@ -24,10 +26,11 @@
|
|
|
24
26
|
|
|
25
27
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
26
28
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
29
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
32
|
+
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
29
33
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
30
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
31
34
|
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
32
35
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
33
36
|
|
|
@@ -440,22 +443,47 @@
|
|
|
440
443
|
};
|
|
441
444
|
this.basic = [
|
|
442
445
|
Object.assign(Object.assign({ elementTitle: "Text", elementType: "text", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { case: "default" }) }),
|
|
443
|
-
Object.assign(Object.assign({ elementTitle: "
|
|
446
|
+
Object.assign(Object.assign({ elementTitle: "Number", elementType: "number", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
447
|
+
Object.assign(Object.assign({ elementTitle: "Radio", elementType: "radio", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { orientation: "vertical" }), options: ["2", "3"] }),
|
|
448
|
+
Object.assign(Object.assign({ elementTitle: "Checkbox", elementType: "checkbox", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
449
|
+
Object.assign(Object.assign({ elementTitle: "Date", elementType: "date", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
450
|
+
Object.assign(Object.assign({ elementTitle: "OTP", elementType: "otp", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { mask: "****" }) }),
|
|
451
|
+
Object.assign(Object.assign({ elementTitle: "Phone", elementType: "phone", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { mask: "####-######" }) })
|
|
444
452
|
];
|
|
445
453
|
this.documents = [
|
|
446
|
-
Object.assign(Object.assign({ elementTitle: "Aadhaar Number", elementType: "aadhaar-number", isElement: true, elementCategory: "document" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { mask: "####-####-####" }) })
|
|
454
|
+
Object.assign(Object.assign({ elementTitle: "Aadhaar Number", elementType: "aadhaar-number", isElement: true, elementCategory: "document" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { mask: "####-####-####" }) }),
|
|
455
|
+
Object.assign(Object.assign({ elementTitle: "PAN Number", elementType: "pan-number", isElement: true, elementCategory: "document" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign(Object.assign({}, this.commonProperties), { case: "upper" }) })
|
|
447
456
|
];
|
|
448
457
|
this.others = [
|
|
449
|
-
|
|
458
|
+
{
|
|
459
|
+
elementTitle: "HTML",
|
|
460
|
+
elementType: "html",
|
|
461
|
+
isElement: true,
|
|
462
|
+
elementCategory: "other",
|
|
463
|
+
key: "",
|
|
464
|
+
html: "",
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
elementTitle: "Title",
|
|
468
|
+
elementType: "title",
|
|
469
|
+
isElement: true,
|
|
470
|
+
elementCategory: "other",
|
|
471
|
+
key: "",
|
|
472
|
+
label: ""
|
|
473
|
+
}
|
|
474
|
+
];
|
|
475
|
+
this.demographics = [
|
|
476
|
+
Object.assign(Object.assign({ elementTitle: "Gender", elementType: "gender", isElement: true, elementCategory: "demographics" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) })
|
|
450
477
|
];
|
|
451
478
|
this.templates = [
|
|
452
479
|
Object.assign(Object.assign({ elementTitle: "PAN with NSDL", elementType: "pan_with_nsdl", isElement: true, elementCategory: "template" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) })
|
|
453
480
|
];
|
|
454
481
|
this.elementMapping = {
|
|
455
|
-
basic: ["text", "radio"],
|
|
456
|
-
documents: ["aadhaar-number"],
|
|
457
|
-
others: [],
|
|
458
|
-
templates: []
|
|
482
|
+
basic: ["text", "number", "radio", "checkbox", "date", "otp", "phone"],
|
|
483
|
+
documents: ["aadhaar-number", "pan-number"],
|
|
484
|
+
others: ["html", "title"],
|
|
485
|
+
templates: [],
|
|
486
|
+
demographics: []
|
|
459
487
|
};
|
|
460
488
|
}
|
|
461
489
|
return Elements;
|
|
@@ -482,12 +510,13 @@
|
|
|
482
510
|
this.createBasicTextFormGroup();
|
|
483
511
|
};
|
|
484
512
|
BasicTextConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
513
|
+
var _a;
|
|
485
514
|
var verifyChange = function (key) {
|
|
486
515
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
487
516
|
};
|
|
488
517
|
if (verifyChange("elementConfig")) {
|
|
489
518
|
this.elementConfig = changes.elementConfig.currentValue;
|
|
490
|
-
this.
|
|
519
|
+
(_a = this.basicTextFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
491
520
|
}
|
|
492
521
|
if (verifyChange("saveBasicClickCounter")) {
|
|
493
522
|
if (changes.saveBasicClickCounter.previousValue !==
|
|
@@ -498,9 +527,9 @@
|
|
|
498
527
|
}
|
|
499
528
|
};
|
|
500
529
|
BasicTextConfigEditor.prototype.createBasicTextFormGroup = function () {
|
|
501
|
-
this.basicTextFormGroup = new
|
|
502
|
-
properties: new
|
|
503
|
-
case: new
|
|
530
|
+
this.basicTextFormGroup = new i2.FormGroup({
|
|
531
|
+
properties: new i2.FormGroup({
|
|
532
|
+
case: new i2.FormControl(this.elementConfig.properties.case, {
|
|
504
533
|
updateOn: "change"
|
|
505
534
|
})
|
|
506
535
|
})
|
|
@@ -516,7 +545,7 @@
|
|
|
516
545
|
return BasicTextConfigEditor;
|
|
517
546
|
}());
|
|
518
547
|
/** @nocollapse */ BasicTextConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicTextConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
519
|
-
/** @nocollapse */ BasicTextConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicTextConfigEditor, selector: "basic-text-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"basicTextFormGroup\">\n <
|
|
548
|
+
/** @nocollapse */ BasicTextConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicTextConfigEditor, selector: "basic-text-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"basicTextFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"['default', 'upper', 'lower']\"\n [label]=\"'case'\"\n [id]=\"'basic-text-config-case'\"\n size=\"m\"\n [formControlName]=\"'case'\"\n [formControl]=\"\n basicTextFormGroup['controls'].properties['controls'].case\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n </form>\n ", isInline: true, styles: [""], components: [{ type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
520
549
|
__decorate([
|
|
521
550
|
kwikidToolkit.logMethod
|
|
522
551
|
], BasicTextConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -533,7 +562,7 @@
|
|
|
533
562
|
type: i0.Component,
|
|
534
563
|
args: [{
|
|
535
564
|
selector: "basic-text-config-editor",
|
|
536
|
-
template: "\n <form [formGroup]=\"basicTextFormGroup\">\n <
|
|
565
|
+
template: "\n <form [formGroup]=\"basicTextFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"['default', 'upper', 'lower']\"\n [label]=\"'case'\"\n [id]=\"'basic-text-config-case'\"\n size=\"m\"\n [formControlName]=\"'case'\"\n [formControl]=\"\n basicTextFormGroup['controls'].properties['controls'].case\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n </form>\n ",
|
|
537
566
|
styles: [""]
|
|
538
567
|
}]
|
|
539
568
|
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
@@ -544,6 +573,74 @@
|
|
|
544
573
|
type: i0.Output
|
|
545
574
|
}], ngOnInit: [], ngOnChanges: [], createBasicTextFormGroup: [], handleOnSave: [] } });
|
|
546
575
|
|
|
576
|
+
var BasicNumberConfigEditor = /** @class */ (function () {
|
|
577
|
+
function BasicNumberConfigEditor() {
|
|
578
|
+
this.saveBasicClickCounter = 0;
|
|
579
|
+
this.elementConfig = {};
|
|
580
|
+
this.updateElement = new i0.EventEmitter();
|
|
581
|
+
this.basicNumberFormGroup = undefined;
|
|
582
|
+
}
|
|
583
|
+
BasicNumberConfigEditor.prototype.ngOnInit = function () {
|
|
584
|
+
this.createBasicNumberFormGroup();
|
|
585
|
+
};
|
|
586
|
+
BasicNumberConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
587
|
+
var _a;
|
|
588
|
+
var verifyChange = function (key) {
|
|
589
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
590
|
+
};
|
|
591
|
+
if (verifyChange("elementConfig")) {
|
|
592
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
593
|
+
(_a = this.basicNumberFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
594
|
+
}
|
|
595
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
596
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
597
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
598
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
599
|
+
this.handleOnSave();
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
BasicNumberConfigEditor.prototype.createBasicNumberFormGroup = function () {
|
|
604
|
+
this.basicNumberFormGroup = new i2.FormGroup({});
|
|
605
|
+
this.basicNumberFormGroup.updateValueAndValidity();
|
|
606
|
+
};
|
|
607
|
+
BasicNumberConfigEditor.prototype.handleOnSave = function () {
|
|
608
|
+
var basicElementConfig = this.basicNumberFormGroup.getRawValue();
|
|
609
|
+
this.updateElement.emit({
|
|
610
|
+
basicElementConfig: basicElementConfig
|
|
611
|
+
});
|
|
612
|
+
};
|
|
613
|
+
return BasicNumberConfigEditor;
|
|
614
|
+
}());
|
|
615
|
+
/** @nocollapse */ BasicNumberConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicNumberConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
616
|
+
/** @nocollapse */ BasicNumberConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicNumberConfigEditor, selector: "basic-number-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "", isInline: true, styles: [""] });
|
|
617
|
+
__decorate([
|
|
618
|
+
kwikidToolkit.logMethod
|
|
619
|
+
], BasicNumberConfigEditor.prototype, "ngOnInit", null);
|
|
620
|
+
__decorate([
|
|
621
|
+
kwikidToolkit.logMethod
|
|
622
|
+
], BasicNumberConfigEditor.prototype, "ngOnChanges", null);
|
|
623
|
+
__decorate([
|
|
624
|
+
kwikidToolkit.logMethod
|
|
625
|
+
], BasicNumberConfigEditor.prototype, "createBasicNumberFormGroup", null);
|
|
626
|
+
__decorate([
|
|
627
|
+
kwikidToolkit.logMethod
|
|
628
|
+
], BasicNumberConfigEditor.prototype, "handleOnSave", null);
|
|
629
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicNumberConfigEditor, decorators: [{
|
|
630
|
+
type: i0.Component,
|
|
631
|
+
args: [{
|
|
632
|
+
selector: "basic-number-config-editor",
|
|
633
|
+
template: "",
|
|
634
|
+
styles: [""]
|
|
635
|
+
}]
|
|
636
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
637
|
+
type: i0.Input
|
|
638
|
+
}], elementConfig: [{
|
|
639
|
+
type: i0.Input
|
|
640
|
+
}], updateElement: [{
|
|
641
|
+
type: i0.Output
|
|
642
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicNumberFormGroup: [], handleOnSave: [] } });
|
|
643
|
+
|
|
547
644
|
var BasicRadioConfigEditor = /** @class */ (function () {
|
|
548
645
|
function BasicRadioConfigEditor() {
|
|
549
646
|
this.optionType = {
|
|
@@ -565,12 +662,13 @@
|
|
|
565
662
|
this.createBasicRadioFormGroup();
|
|
566
663
|
};
|
|
567
664
|
BasicRadioConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
665
|
+
var _a;
|
|
568
666
|
var verifyChange = function (key) {
|
|
569
667
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
570
668
|
};
|
|
571
669
|
if (verifyChange("elementConfig")) {
|
|
572
670
|
this.elementConfig = changes.elementConfig.currentValue;
|
|
573
|
-
this.
|
|
671
|
+
(_a = this.basicRadioFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
574
672
|
}
|
|
575
673
|
if (verifyChange("saveBasicClickCounter")) {
|
|
576
674
|
if (changes.saveBasicClickCounter.previousValue !==
|
|
@@ -581,31 +679,31 @@
|
|
|
581
679
|
}
|
|
582
680
|
};
|
|
583
681
|
BasicRadioConfigEditor.prototype.createBasicRadioFormGroup = function () {
|
|
584
|
-
var e_1,
|
|
682
|
+
var e_1, _b;
|
|
585
683
|
var optionsFormArray = [];
|
|
586
684
|
this.elementConfig = kwikidToolkit.setMissingKeyValue(this.elementConfig, "options", [
|
|
587
685
|
this.optionType
|
|
588
686
|
]);
|
|
589
687
|
try {
|
|
590
|
-
for (var
|
|
591
|
-
var option =
|
|
688
|
+
for (var _c = __values(this.elementConfig.options), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
689
|
+
var option = _d.value;
|
|
592
690
|
optionsFormArray.push(this.createOptionConfigFormGroup(option));
|
|
593
691
|
}
|
|
594
692
|
}
|
|
595
693
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
596
694
|
finally {
|
|
597
695
|
try {
|
|
598
|
-
if (
|
|
696
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
599
697
|
}
|
|
600
698
|
finally { if (e_1) throw e_1.error; }
|
|
601
699
|
}
|
|
602
|
-
this.basicRadioFormGroup = new
|
|
603
|
-
properties: new
|
|
604
|
-
orientation: new
|
|
700
|
+
this.basicRadioFormGroup = new i2.FormGroup({
|
|
701
|
+
properties: new i2.FormGroup({
|
|
702
|
+
orientation: new i2.FormControl(this.elementConfig.properties.orientation, {
|
|
605
703
|
updateOn: "change"
|
|
606
704
|
})
|
|
607
705
|
}),
|
|
608
|
-
options: new
|
|
706
|
+
options: new i2.FormArray(optionsFormArray)
|
|
609
707
|
});
|
|
610
708
|
this.basicRadioFormGroup.updateValueAndValidity();
|
|
611
709
|
};
|
|
@@ -623,114 +721,909 @@
|
|
|
623
721
|
configurable: true
|
|
624
722
|
});
|
|
625
723
|
BasicRadioConfigEditor.prototype.createOptionConfigFormGroup = function (optionConfig) {
|
|
626
|
-
var optionFormGroup = new
|
|
627
|
-
label: new
|
|
724
|
+
var optionFormGroup = new i2.FormGroup({
|
|
725
|
+
label: new i2.FormControl(optionConfig.label, {
|
|
628
726
|
updateOn: "change"
|
|
629
727
|
}),
|
|
630
|
-
disabled: new
|
|
728
|
+
disabled: new i2.FormControl(optionConfig.disabled, {
|
|
631
729
|
updateOn: "change"
|
|
632
730
|
}),
|
|
633
|
-
description: new
|
|
731
|
+
description: new i2.FormControl(optionConfig.description, {
|
|
732
|
+
updateOn: "change"
|
|
733
|
+
})
|
|
734
|
+
});
|
|
735
|
+
return optionFormGroup;
|
|
736
|
+
};
|
|
737
|
+
BasicRadioConfigEditor.prototype.addOption = function () {
|
|
738
|
+
var options = this.basicRadioFormGroup.get("options");
|
|
739
|
+
options.push(this.createOptionConfigFormGroup(this.optionType));
|
|
740
|
+
};
|
|
741
|
+
BasicRadioConfigEditor.prototype.removeOption = function (optionIndex) {
|
|
742
|
+
var options = this.basicRadioFormGroup.get("options");
|
|
743
|
+
if (options.length > 1) {
|
|
744
|
+
options.removeAt(optionIndex);
|
|
745
|
+
}
|
|
746
|
+
else {
|
|
747
|
+
this.addOption();
|
|
748
|
+
// options.reset();
|
|
749
|
+
}
|
|
750
|
+
};
|
|
751
|
+
return BasicRadioConfigEditor;
|
|
752
|
+
}());
|
|
753
|
+
/** @nocollapse */ BasicRadioConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicRadioConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
754
|
+
/** @nocollapse */ BasicRadioConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicRadioConfigEditor, selector: "basic-radio-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"basicRadioFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Options</legend>\n <div formArrayName=\"options\">\n <ng-container\n *ngFor=\"let option of optionsArray.controls; let i = index\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'basic-radio-config-placeholder'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].options['controls'][i][\n 'controls'\n ].label\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'disabled'\"\n [id]=\"'basic-radio-config-disabled'\"\n size=\"m\"\n [formControlName]=\"'disabled'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].options['controls'][i][\n 'controls'\n ].disabled\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Description'\"\n [id]=\"'basic-radio-config-description'\"\n [type]=\"'text'\"\n [formControlName]=\"'description'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].options['controls'][i][\n 'controls'\n ].description\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your description'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-array-actions\">\n <kwikui-button\n [disabled]=\"false\"\n label=\"Remove\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"save-button\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"'rounded'\"\n size=\"s\"\n (onClick)=\"removeOption(i)\"\n ></kwikui-button>\n <kwikui-button\n [disabled]=\"false\"\n label=\"Add\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"save-button\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"'rounded'\"\n size=\"s\"\n (onClick)=\"addOption()\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n </div>\n </fieldset>\n\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"['horizontal', 'vertical']\"\n [label]=\"'Orientation'\"\n [id]=\"'basic-radio-config-orientation'\"\n size=\"m\"\n [formControlName]=\"'orientation'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].properties['controls']\n .orientation\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select orientation'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n </form>\n ", isInline: true, styles: ["\n .form-array-actions {\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n }\n "], components: [{ type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
755
|
+
__decorate([
|
|
756
|
+
kwikidToolkit.logMethod
|
|
757
|
+
], BasicRadioConfigEditor.prototype, "ngOnInit", null);
|
|
758
|
+
__decorate([
|
|
759
|
+
kwikidToolkit.logMethod
|
|
760
|
+
], BasicRadioConfigEditor.prototype, "ngOnChanges", null);
|
|
761
|
+
__decorate([
|
|
762
|
+
kwikidToolkit.logMethod
|
|
763
|
+
], BasicRadioConfigEditor.prototype, "createBasicRadioFormGroup", null);
|
|
764
|
+
__decorate([
|
|
765
|
+
kwikidToolkit.logMethod
|
|
766
|
+
], BasicRadioConfigEditor.prototype, "handleOnSave", null);
|
|
767
|
+
__decorate([
|
|
768
|
+
kwikidToolkit.logMethod
|
|
769
|
+
], BasicRadioConfigEditor.prototype, "createOptionConfigFormGroup", null);
|
|
770
|
+
__decorate([
|
|
771
|
+
kwikidToolkit.logMethod
|
|
772
|
+
], BasicRadioConfigEditor.prototype, "addOption", null);
|
|
773
|
+
__decorate([
|
|
774
|
+
kwikidToolkit.logMethod
|
|
775
|
+
], BasicRadioConfigEditor.prototype, "removeOption", null);
|
|
776
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicRadioConfigEditor, decorators: [{
|
|
777
|
+
type: i0.Component,
|
|
778
|
+
args: [{
|
|
779
|
+
selector: "basic-radio-config-editor",
|
|
780
|
+
template: "\n <form [formGroup]=\"basicRadioFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Options</legend>\n <div formArrayName=\"options\">\n <ng-container\n *ngFor=\"let option of optionsArray.controls; let i = index\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'basic-radio-config-placeholder'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].options['controls'][i][\n 'controls'\n ].label\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'disabled'\"\n [id]=\"'basic-radio-config-disabled'\"\n size=\"m\"\n [formControlName]=\"'disabled'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].options['controls'][i][\n 'controls'\n ].disabled\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Description'\"\n [id]=\"'basic-radio-config-description'\"\n [type]=\"'text'\"\n [formControlName]=\"'description'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].options['controls'][i][\n 'controls'\n ].description\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your description'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-array-actions\">\n <kwikui-button\n [disabled]=\"false\"\n label=\"Remove\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"save-button\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"'rounded'\"\n size=\"s\"\n (onClick)=\"removeOption(i)\"\n ></kwikui-button>\n <kwikui-button\n [disabled]=\"false\"\n label=\"Add\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"save-button\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"'rounded'\"\n size=\"s\"\n (onClick)=\"addOption()\"\n ></kwikui-button>\n </div>\n </div>\n </ng-container>\n </div>\n </fieldset>\n\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"['horizontal', 'vertical']\"\n [label]=\"'Orientation'\"\n [id]=\"'basic-radio-config-orientation'\"\n size=\"m\"\n [formControlName]=\"'orientation'\"\n [formControl]=\"\n basicRadioFormGroup['controls'].properties['controls']\n .orientation\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select orientation'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n </form>\n ",
|
|
781
|
+
styles: [
|
|
782
|
+
"\n .form-array-actions {\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n }\n "
|
|
783
|
+
]
|
|
784
|
+
}]
|
|
785
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
786
|
+
type: i0.Input
|
|
787
|
+
}], elementConfig: [{
|
|
788
|
+
type: i0.Input
|
|
789
|
+
}], updateElement: [{
|
|
790
|
+
type: i0.Output
|
|
791
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicRadioFormGroup: [], handleOnSave: [], createOptionConfigFormGroup: [], addOption: [], removeOption: [] } });
|
|
792
|
+
|
|
793
|
+
var BasicCheckboxConfigEditor = /** @class */ (function () {
|
|
794
|
+
function BasicCheckboxConfigEditor() {
|
|
795
|
+
this.saveBasicClickCounter = 0;
|
|
796
|
+
this.elementConfig = {};
|
|
797
|
+
this.updateElement = new i0.EventEmitter();
|
|
798
|
+
this.basicCheckboxFormGroup = undefined;
|
|
799
|
+
}
|
|
800
|
+
BasicCheckboxConfigEditor.prototype.ngOnInit = function () {
|
|
801
|
+
this.createBasicCheckboxFormGroup();
|
|
802
|
+
};
|
|
803
|
+
BasicCheckboxConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
804
|
+
var _a;
|
|
805
|
+
var verifyChange = function (key) {
|
|
806
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
807
|
+
};
|
|
808
|
+
if (verifyChange("elementConfig")) {
|
|
809
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
810
|
+
(_a = this.basicCheckboxFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
811
|
+
}
|
|
812
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
813
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
814
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
815
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
816
|
+
this.handleOnSave();
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
BasicCheckboxConfigEditor.prototype.createBasicCheckboxFormGroup = function () {
|
|
821
|
+
this.basicCheckboxFormGroup = new i2.FormGroup({});
|
|
822
|
+
this.basicCheckboxFormGroup.updateValueAndValidity();
|
|
823
|
+
};
|
|
824
|
+
BasicCheckboxConfigEditor.prototype.handleOnSave = function () {
|
|
825
|
+
var basicElementConfig = this.basicCheckboxFormGroup.getRawValue();
|
|
826
|
+
this.updateElement.emit({
|
|
827
|
+
basicElementConfig: basicElementConfig
|
|
828
|
+
});
|
|
829
|
+
};
|
|
830
|
+
return BasicCheckboxConfigEditor;
|
|
831
|
+
}());
|
|
832
|
+
/** @nocollapse */ BasicCheckboxConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicCheckboxConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
833
|
+
/** @nocollapse */ BasicCheckboxConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicCheckboxConfigEditor, selector: "basic-checkbox-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "", isInline: true, styles: [""] });
|
|
834
|
+
__decorate([
|
|
835
|
+
kwikidToolkit.logMethod
|
|
836
|
+
], BasicCheckboxConfigEditor.prototype, "ngOnInit", null);
|
|
837
|
+
__decorate([
|
|
838
|
+
kwikidToolkit.logMethod
|
|
839
|
+
], BasicCheckboxConfigEditor.prototype, "ngOnChanges", null);
|
|
840
|
+
__decorate([
|
|
841
|
+
kwikidToolkit.logMethod
|
|
842
|
+
], BasicCheckboxConfigEditor.prototype, "createBasicCheckboxFormGroup", null);
|
|
843
|
+
__decorate([
|
|
844
|
+
kwikidToolkit.logMethod
|
|
845
|
+
], BasicCheckboxConfigEditor.prototype, "handleOnSave", null);
|
|
846
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicCheckboxConfigEditor, decorators: [{
|
|
847
|
+
type: i0.Component,
|
|
848
|
+
args: [{
|
|
849
|
+
selector: "basic-checkbox-config-editor",
|
|
850
|
+
template: "",
|
|
851
|
+
styles: [""]
|
|
852
|
+
}]
|
|
853
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
854
|
+
type: i0.Input
|
|
855
|
+
}], elementConfig: [{
|
|
856
|
+
type: i0.Input
|
|
857
|
+
}], updateElement: [{
|
|
858
|
+
type: i0.Output
|
|
859
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicCheckboxFormGroup: [], handleOnSave: [] } });
|
|
860
|
+
|
|
861
|
+
var BasicOtpConfigEditor = /** @class */ (function () {
|
|
862
|
+
function BasicOtpConfigEditor() {
|
|
863
|
+
this.saveBasicClickCounter = 0;
|
|
864
|
+
this.elementConfig = {
|
|
865
|
+
properties: {
|
|
866
|
+
mask: "****"
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
this.updateElement = new i0.EventEmitter();
|
|
870
|
+
this.basicOtpFormGroup = undefined;
|
|
871
|
+
}
|
|
872
|
+
BasicOtpConfigEditor.prototype.ngOnInit = function () {
|
|
873
|
+
this.createBasicOtpFormGroup();
|
|
874
|
+
};
|
|
875
|
+
BasicOtpConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
876
|
+
var _a;
|
|
877
|
+
var verifyChange = function (key) {
|
|
878
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
879
|
+
};
|
|
880
|
+
if (verifyChange("elementConfig")) {
|
|
881
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
882
|
+
(_a = this.basicOtpFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
883
|
+
}
|
|
884
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
885
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
886
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
887
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
888
|
+
this.handleOnSave();
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
BasicOtpConfigEditor.prototype.createBasicOtpFormGroup = function () {
|
|
893
|
+
this.basicOtpFormGroup = new i2.FormGroup({
|
|
894
|
+
properties: new i2.FormGroup({
|
|
895
|
+
mask: new i2.FormControl(this.elementConfig.properties.mask, {
|
|
896
|
+
updateOn: "change"
|
|
897
|
+
})
|
|
898
|
+
})
|
|
899
|
+
});
|
|
900
|
+
this.basicOtpFormGroup.updateValueAndValidity();
|
|
901
|
+
};
|
|
902
|
+
BasicOtpConfigEditor.prototype.handleOnSave = function () {
|
|
903
|
+
var basicElementConfig = this.basicOtpFormGroup.getRawValue();
|
|
904
|
+
this.updateElement.emit({
|
|
905
|
+
basicElementConfig: basicElementConfig
|
|
906
|
+
});
|
|
907
|
+
};
|
|
908
|
+
return BasicOtpConfigEditor;
|
|
909
|
+
}());
|
|
910
|
+
/** @nocollapse */ BasicOtpConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicOtpConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
911
|
+
/** @nocollapse */ BasicOtpConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicOtpConfigEditor, selector: "basic-otp-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"basicOtpFormGroup\">\n <div formGroupName=\"properties\">\n <div class=\"form-group-title\">Properties</div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Mask'\"\n [id]=\"'basic-otp-config-mask'\"\n [type]=\"'text'\"\n [formControlName]=\"'mask'\"\n [formControl]=\"\n basicOtpFormGroup.controls.properties['controls'].mask\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your mask'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n </div>\n </form>\n ", isInline: true, styles: [""], components: [{ type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
912
|
+
__decorate([
|
|
913
|
+
kwikidToolkit.logMethod
|
|
914
|
+
], BasicOtpConfigEditor.prototype, "ngOnInit", null);
|
|
915
|
+
__decorate([
|
|
916
|
+
kwikidToolkit.logMethod
|
|
917
|
+
], BasicOtpConfigEditor.prototype, "ngOnChanges", null);
|
|
918
|
+
__decorate([
|
|
919
|
+
kwikidToolkit.logMethod
|
|
920
|
+
], BasicOtpConfigEditor.prototype, "createBasicOtpFormGroup", null);
|
|
921
|
+
__decorate([
|
|
922
|
+
kwikidToolkit.logMethod
|
|
923
|
+
], BasicOtpConfigEditor.prototype, "handleOnSave", null);
|
|
924
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicOtpConfigEditor, decorators: [{
|
|
925
|
+
type: i0.Component,
|
|
926
|
+
args: [{
|
|
927
|
+
selector: "basic-otp-config-editor",
|
|
928
|
+
template: "\n <form [formGroup]=\"basicOtpFormGroup\">\n <div formGroupName=\"properties\">\n <div class=\"form-group-title\">Properties</div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Mask'\"\n [id]=\"'basic-otp-config-mask'\"\n [type]=\"'text'\"\n [formControlName]=\"'mask'\"\n [formControl]=\"\n basicOtpFormGroup.controls.properties['controls'].mask\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your mask'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n </div>\n </form>\n ",
|
|
929
|
+
styles: [""]
|
|
930
|
+
}]
|
|
931
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
932
|
+
type: i0.Input
|
|
933
|
+
}], elementConfig: [{
|
|
934
|
+
type: i0.Input
|
|
935
|
+
}], updateElement: [{
|
|
936
|
+
type: i0.Output
|
|
937
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicOtpFormGroup: [], handleOnSave: [] } });
|
|
938
|
+
|
|
939
|
+
var BasicPhoneConfigEditor = /** @class */ (function () {
|
|
940
|
+
function BasicPhoneConfigEditor() {
|
|
941
|
+
this.saveBasicClickCounter = 0;
|
|
942
|
+
this.elementConfig = {
|
|
943
|
+
properties: {
|
|
944
|
+
mask: "####-######"
|
|
945
|
+
}
|
|
946
|
+
};
|
|
947
|
+
this.updateElement = new i0.EventEmitter();
|
|
948
|
+
this.basicPhoneFormGroup = undefined;
|
|
949
|
+
}
|
|
950
|
+
BasicPhoneConfigEditor.prototype.ngOnInit = function () {
|
|
951
|
+
this.createBasicPhoneFormGroup();
|
|
952
|
+
};
|
|
953
|
+
BasicPhoneConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
954
|
+
var _a;
|
|
955
|
+
var verifyChange = function (key) {
|
|
956
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
957
|
+
};
|
|
958
|
+
if (verifyChange("elementConfig")) {
|
|
959
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
960
|
+
(_a = this.basicPhoneFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
961
|
+
}
|
|
962
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
963
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
964
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
965
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
966
|
+
this.handleOnSave();
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
BasicPhoneConfigEditor.prototype.createBasicPhoneFormGroup = function () {
|
|
971
|
+
this.basicPhoneFormGroup = new i2.FormGroup({
|
|
972
|
+
properties: new i2.FormGroup({
|
|
973
|
+
mask: new i2.FormControl(this.elementConfig.properties.mask, {
|
|
974
|
+
updateOn: "change"
|
|
975
|
+
})
|
|
976
|
+
})
|
|
977
|
+
});
|
|
978
|
+
this.basicPhoneFormGroup.updateValueAndValidity();
|
|
979
|
+
};
|
|
980
|
+
BasicPhoneConfigEditor.prototype.handleOnSave = function () {
|
|
981
|
+
var basicElementConfig = this.basicPhoneFormGroup.getRawValue();
|
|
982
|
+
this.updateElement.emit({
|
|
983
|
+
basicElementConfig: basicElementConfig
|
|
984
|
+
});
|
|
985
|
+
};
|
|
986
|
+
return BasicPhoneConfigEditor;
|
|
987
|
+
}());
|
|
988
|
+
/** @nocollapse */ BasicPhoneConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicPhoneConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
989
|
+
/** @nocollapse */ BasicPhoneConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicPhoneConfigEditor, selector: "basic-phone-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"basicPhoneFormGroup\">\n <div formGroupName=\"properties\">\n <div class=\"form-group-title\">Properties</div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Mask'\"\n [id]=\"'basic-phone-config-mask'\"\n [type]=\"'text'\"\n [formControlName]=\"'mask'\"\n [formControl]=\"\n basicPhoneFormGroup.controls.properties['controls'].mask\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your mask'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n </div>\n </form>\n ", isInline: true, styles: [""], components: [{ type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
990
|
+
__decorate([
|
|
991
|
+
kwikidToolkit.logMethod
|
|
992
|
+
], BasicPhoneConfigEditor.prototype, "ngOnInit", null);
|
|
993
|
+
__decorate([
|
|
994
|
+
kwikidToolkit.logMethod
|
|
995
|
+
], BasicPhoneConfigEditor.prototype, "ngOnChanges", null);
|
|
996
|
+
__decorate([
|
|
997
|
+
kwikidToolkit.logMethod
|
|
998
|
+
], BasicPhoneConfigEditor.prototype, "createBasicPhoneFormGroup", null);
|
|
999
|
+
__decorate([
|
|
1000
|
+
kwikidToolkit.logMethod
|
|
1001
|
+
], BasicPhoneConfigEditor.prototype, "handleOnSave", null);
|
|
1002
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicPhoneConfigEditor, decorators: [{
|
|
1003
|
+
type: i0.Component,
|
|
1004
|
+
args: [{
|
|
1005
|
+
selector: "basic-phone-config-editor",
|
|
1006
|
+
template: "\n <form [formGroup]=\"basicPhoneFormGroup\">\n <div formGroupName=\"properties\">\n <div class=\"form-group-title\">Properties</div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Mask'\"\n [id]=\"'basic-phone-config-mask'\"\n [type]=\"'text'\"\n [formControlName]=\"'mask'\"\n [formControl]=\"\n basicPhoneFormGroup.controls.properties['controls'].mask\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your mask'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n </div>\n </form>\n ",
|
|
1007
|
+
styles: [""]
|
|
1008
|
+
}]
|
|
1009
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
1010
|
+
type: i0.Input
|
|
1011
|
+
}], elementConfig: [{
|
|
1012
|
+
type: i0.Input
|
|
1013
|
+
}], updateElement: [{
|
|
1014
|
+
type: i0.Output
|
|
1015
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicPhoneFormGroup: [], handleOnSave: [] } });
|
|
1016
|
+
|
|
1017
|
+
var BasicElementConfigEditor = /** @class */ (function () {
|
|
1018
|
+
function BasicElementConfigEditor() {
|
|
1019
|
+
this.saveClickCounter = 0;
|
|
1020
|
+
this.elementConfig = {
|
|
1021
|
+
label: "",
|
|
1022
|
+
key: "",
|
|
1023
|
+
disabled: false,
|
|
1024
|
+
default: {
|
|
1025
|
+
value: true
|
|
1026
|
+
},
|
|
1027
|
+
validators: {
|
|
1028
|
+
min: null,
|
|
1029
|
+
max: null,
|
|
1030
|
+
minLength: null,
|
|
1031
|
+
maxLength: null,
|
|
1032
|
+
required: true
|
|
1033
|
+
},
|
|
1034
|
+
properties: {
|
|
1035
|
+
placeholder: "",
|
|
1036
|
+
readOnly: false
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
this.updateElement = new i0.EventEmitter();
|
|
1040
|
+
this.elementType = "";
|
|
1041
|
+
this.saveBasicClickCounter = 0;
|
|
1042
|
+
this.basicFormGroup = undefined;
|
|
1043
|
+
}
|
|
1044
|
+
BasicElementConfigEditor.prototype.ngOnInit = function () {
|
|
1045
|
+
this.assignVariables();
|
|
1046
|
+
this.createBasicFormGroup();
|
|
1047
|
+
};
|
|
1048
|
+
BasicElementConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
1049
|
+
var _a;
|
|
1050
|
+
var verifyChange = function (key) {
|
|
1051
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1052
|
+
};
|
|
1053
|
+
if (verifyChange("elementConfig")) {
|
|
1054
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1055
|
+
this.assignVariables();
|
|
1056
|
+
(_a = this.basicFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1057
|
+
}
|
|
1058
|
+
if (verifyChange("saveClickCounter")) {
|
|
1059
|
+
if (changes.saveClickCounter.previousValue !==
|
|
1060
|
+
changes.saveClickCounter.currentValue) {
|
|
1061
|
+
this.saveClickCounter = changes.saveClickCounter.currentValue;
|
|
1062
|
+
this.handleOnSave();
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
BasicElementConfigEditor.prototype.assignVariables = function () {
|
|
1067
|
+
this.elementType = this.elementConfig.elementType;
|
|
1068
|
+
};
|
|
1069
|
+
BasicElementConfigEditor.prototype.createBasicFormGroup = function () {
|
|
1070
|
+
this.basicFormGroup = new i2.FormGroup({
|
|
1071
|
+
label: new i2.FormControl(this.elementConfig.label),
|
|
1072
|
+
key: new i2.FormControl(this.elementConfig.key),
|
|
1073
|
+
disabled: new i2.FormControl(this.elementConfig.disabled),
|
|
1074
|
+
default: new i2.FormGroup({
|
|
1075
|
+
value: new i2.FormControl(this.elementConfig.default.value, {
|
|
1076
|
+
updateOn: "change"
|
|
1077
|
+
})
|
|
1078
|
+
}),
|
|
1079
|
+
validators: new i2.FormGroup({
|
|
1080
|
+
min: new i2.FormControl(this.elementConfig.validators.min, {
|
|
1081
|
+
updateOn: "change"
|
|
1082
|
+
}),
|
|
1083
|
+
minLength: new i2.FormControl(this.elementConfig.validators.minLength, {
|
|
1084
|
+
updateOn: "change"
|
|
1085
|
+
}),
|
|
1086
|
+
max: new i2.FormControl(this.elementConfig.validators.max, {
|
|
1087
|
+
updateOn: "change"
|
|
1088
|
+
}),
|
|
1089
|
+
maxLength: new i2.FormControl(this.elementConfig.validators.maxLength, {
|
|
1090
|
+
updateOn: "change"
|
|
1091
|
+
}),
|
|
1092
|
+
required: new i2.FormControl(this.elementConfig.validators.required, {
|
|
1093
|
+
updateOn: "change"
|
|
1094
|
+
})
|
|
1095
|
+
}),
|
|
1096
|
+
properties: new i2.FormGroup({
|
|
1097
|
+
placeholder: new i2.FormControl(this.elementConfig.properties.placeholder, {
|
|
1098
|
+
updateOn: "change"
|
|
1099
|
+
}),
|
|
1100
|
+
readOnly: new i2.FormControl(this.elementConfig.properties.readOnly, {
|
|
1101
|
+
updateOn: "change"
|
|
1102
|
+
})
|
|
1103
|
+
})
|
|
1104
|
+
});
|
|
1105
|
+
this.basicFormGroup.updateValueAndValidity();
|
|
1106
|
+
};
|
|
1107
|
+
BasicElementConfigEditor.prototype.handleOnSaveUpdateElement = function (event) {
|
|
1108
|
+
// Get Common Config
|
|
1109
|
+
var basicElementCommonConfig = this.basicFormGroup.getRawValue();
|
|
1110
|
+
basicElementCommonConfig.key = basicElementCommonConfig.key.replace(/\s/g, "_");
|
|
1111
|
+
// Get Basic Element Config
|
|
1112
|
+
var basicElementConfig = event.basicElementConfig;
|
|
1113
|
+
this.elementConfig = kwikidToolkit.mergeObjects(this.elementConfig, basicElementCommonConfig, basicElementConfig);
|
|
1114
|
+
this.updateElement.emit({ elementConfig: this.elementConfig });
|
|
1115
|
+
};
|
|
1116
|
+
BasicElementConfigEditor.prototype.handleOnSave = function () {
|
|
1117
|
+
this.saveBasicClickCounter++;
|
|
1118
|
+
};
|
|
1119
|
+
return BasicElementConfigEditor;
|
|
1120
|
+
}());
|
|
1121
|
+
/** @nocollapse */ BasicElementConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicElementConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1122
|
+
/** @nocollapse */ BasicElementConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicElementConfigEditor, selector: "basic-element-config-editor", inputs: { saveClickCounter: "saveClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <kwikui-table\n style=\"width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;\"\n [columns]=\"['id', 'type', 'category']\"\n [headers]=\"{ id: 'ID', type: 'Type', category: 'Category' }\"\n [data]=\"[\n {\n id: elementConfig.elementId,\n type: elementConfig.elementType,\n category: elementConfig.elementCategory\n }\n ]\"\n (onClick)=\"(undefined)\"\n ></kwikui-table>\n </ng-container>\n <form [formGroup]=\"basicFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Standard</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'basic-field-label'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"basicFormGroup.controls['label']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Key'\"\n [id]=\"'basic-field-key'\"\n [type]=\"'text'\"\n [formControlName]=\"'key'\"\n [formControl]=\"basicFormGroup.controls['key']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'Disabled'\"\n [id]=\"'basic-input-property-disabled'\"\n size=\"m\"\n [formControlName]=\"'disabled'\"\n [formControl]=\"basicFormGroup.controls['disabled']\"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n\n <div formGroupName=\"default\">\n <fieldset>\n <legend class=\"form-group-title\">Default</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'value'\"\n [id]=\"'basic-input-property-value'\"\n size=\"m\"\n [formControlName]=\"'value'\"\n [formControl]=\"\n basicFormGroup['controls'].default['controls'].value\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"validators\">\n <fieldset>\n <legend class=\"form-group-title\">Validators</legend>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'min'\"\n [id]=\"'basic-input-validators-min'\"\n [formControlName]=\"'min'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].min\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'max'\"\n [id]=\"'basic-input-validators-max'\"\n [formControlName]=\"'max'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].max\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'minLength'\"\n [id]=\"'basic-input-validators-minLength'\"\n [formControlName]=\"'minLength'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].minLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'maxLength'\"\n [id]=\"'basic-input-validators-maxLength'\"\n [formControlName]=\"'maxLength'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].maxLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'required'\"\n [id]=\"'basic-input-property-required'\"\n size=\"m\"\n [formControlName]=\"'required'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].required\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Properties</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Placeholder'\"\n [id]=\"'basic-field-placeholder'\"\n [type]=\"'text'\"\n [formControlName]=\"'placeholder'\"\n [formControl]=\"\n basicFormGroup.controls.properties['controls'].placeholder\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your placeholder'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'readOnly'\"\n [id]=\"'basic-input-property-readOnly'\"\n size=\"m\"\n [formControlName]=\"'readOnly'\"\n [formControl]=\"\n basicFormGroup['controls'].properties['controls'].readOnly\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <basic-text-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-text-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <basic-number-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-number-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <basic-radio-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-radio-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <basic-checkbox-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-checkbox-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <basic-checkbox-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-checkbox-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otp'\">\n <basic-otp-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-otp-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'phone'\">\n <basic-phone-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-phone-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ", isInline: true, styles: ["\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "], components: [{ type: i1__namespace.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: BasicTextConfigEditor, selector: "basic-text-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicNumberConfigEditor, selector: "basic-number-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicRadioConfigEditor, selector: "basic-radio-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicCheckboxConfigEditor, selector: "basic-checkbox-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicOtpConfigEditor, selector: "basic-otp-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: BasicPhoneConfigEditor, selector: "basic-phone-config-editor", inputs: ["saveBasicClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
1123
|
+
__decorate([
|
|
1124
|
+
kwikidToolkit.logMethod
|
|
1125
|
+
], BasicElementConfigEditor.prototype, "ngOnInit", null);
|
|
1126
|
+
__decorate([
|
|
1127
|
+
kwikidToolkit.logMethod
|
|
1128
|
+
], BasicElementConfigEditor.prototype, "ngOnChanges", null);
|
|
1129
|
+
__decorate([
|
|
1130
|
+
kwikidToolkit.logMethod
|
|
1131
|
+
], BasicElementConfigEditor.prototype, "assignVariables", null);
|
|
1132
|
+
__decorate([
|
|
1133
|
+
kwikidToolkit.logMethod
|
|
1134
|
+
], BasicElementConfigEditor.prototype, "createBasicFormGroup", null);
|
|
1135
|
+
__decorate([
|
|
1136
|
+
kwikidToolkit.logMethod
|
|
1137
|
+
], BasicElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
|
|
1138
|
+
__decorate([
|
|
1139
|
+
kwikidToolkit.logMethod
|
|
1140
|
+
], BasicElementConfigEditor.prototype, "handleOnSave", null);
|
|
1141
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicElementConfigEditor, decorators: [{
|
|
1142
|
+
type: i0.Component,
|
|
1143
|
+
args: [{
|
|
1144
|
+
selector: "basic-element-config-editor",
|
|
1145
|
+
template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <kwikui-table\n style=\"width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;\"\n [columns]=\"['id', 'type', 'category']\"\n [headers]=\"{ id: 'ID', type: 'Type', category: 'Category' }\"\n [data]=\"[\n {\n id: elementConfig.elementId,\n type: elementConfig.elementType,\n category: elementConfig.elementCategory\n }\n ]\"\n (onClick)=\"(undefined)\"\n ></kwikui-table>\n </ng-container>\n <form [formGroup]=\"basicFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Standard</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'basic-field-label'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"basicFormGroup.controls['label']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Key'\"\n [id]=\"'basic-field-key'\"\n [type]=\"'text'\"\n [formControlName]=\"'key'\"\n [formControl]=\"basicFormGroup.controls['key']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'Disabled'\"\n [id]=\"'basic-input-property-disabled'\"\n size=\"m\"\n [formControlName]=\"'disabled'\"\n [formControl]=\"basicFormGroup.controls['disabled']\"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n\n <div formGroupName=\"default\">\n <fieldset>\n <legend class=\"form-group-title\">Default</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'value'\"\n [id]=\"'basic-input-property-value'\"\n size=\"m\"\n [formControlName]=\"'value'\"\n [formControl]=\"\n basicFormGroup['controls'].default['controls'].value\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"validators\">\n <fieldset>\n <legend class=\"form-group-title\">Validators</legend>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'min'\"\n [id]=\"'basic-input-validators-min'\"\n [formControlName]=\"'min'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].min\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'max'\"\n [id]=\"'basic-input-validators-max'\"\n [formControlName]=\"'max'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].max\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'minLength'\"\n [id]=\"'basic-input-validators-minLength'\"\n [formControlName]=\"'minLength'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].minLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'maxLength'\"\n [id]=\"'basic-input-validators-maxLength'\"\n [formControlName]=\"'maxLength'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].maxLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'required'\"\n [id]=\"'basic-input-property-required'\"\n size=\"m\"\n [formControlName]=\"'required'\"\n [formControl]=\"\n basicFormGroup['controls'].validators['controls'].required\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Properties</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Placeholder'\"\n [id]=\"'basic-field-placeholder'\"\n [type]=\"'text'\"\n [formControlName]=\"'placeholder'\"\n [formControl]=\"\n basicFormGroup.controls.properties['controls'].placeholder\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your placeholder'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'readOnly'\"\n [id]=\"'basic-input-property-readOnly'\"\n size=\"m\"\n [formControlName]=\"'readOnly'\"\n [formControl]=\"\n basicFormGroup['controls'].properties['controls'].readOnly\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <basic-text-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-text-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <basic-number-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-number-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <basic-radio-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-radio-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <basic-checkbox-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-checkbox-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <basic-checkbox-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-checkbox-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otp'\">\n <basic-otp-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-otp-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'phone'\">\n <basic-phone-config-editor\n [saveBasicClickCounter]=\"saveBasicClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-phone-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ",
|
|
1146
|
+
styles: [
|
|
1147
|
+
"\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "
|
|
1148
|
+
]
|
|
1149
|
+
}]
|
|
1150
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveClickCounter: [{
|
|
1151
|
+
type: i0.Input
|
|
1152
|
+
}], elementConfig: [{
|
|
1153
|
+
type: i0.Input
|
|
1154
|
+
}], updateElement: [{
|
|
1155
|
+
type: i0.Output
|
|
1156
|
+
}], ngOnInit: [], ngOnChanges: [], assignVariables: [], createBasicFormGroup: [], handleOnSaveUpdateElement: [], handleOnSave: [] } });
|
|
1157
|
+
|
|
1158
|
+
var DocumentAadhaarNumberConfigEditor = /** @class */ (function () {
|
|
1159
|
+
function DocumentAadhaarNumberConfigEditor() {
|
|
1160
|
+
this.saveDocumentClickCounter = 0;
|
|
1161
|
+
this.elementConfig = {
|
|
1162
|
+
properties: {
|
|
1163
|
+
mask: "####-####-####"
|
|
1164
|
+
}
|
|
1165
|
+
};
|
|
1166
|
+
this.updateElement = new i0.EventEmitter();
|
|
1167
|
+
this.documentAadhaarNumberFormGroup = undefined;
|
|
1168
|
+
}
|
|
1169
|
+
DocumentAadhaarNumberConfigEditor.prototype.ngOnInit = function () {
|
|
1170
|
+
this.createDocumentAadhaarNumberFormGroup();
|
|
1171
|
+
};
|
|
1172
|
+
DocumentAadhaarNumberConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
1173
|
+
var _a;
|
|
1174
|
+
var verifyChange = function (key) {
|
|
1175
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1176
|
+
};
|
|
1177
|
+
if (verifyChange("elementConfig")) {
|
|
1178
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1179
|
+
(_a = this.documentAadhaarNumberFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1180
|
+
}
|
|
1181
|
+
if (verifyChange("saveDocumentClickCounter")) {
|
|
1182
|
+
if (changes.saveDocumentClickCounter.previousValue !==
|
|
1183
|
+
changes.saveDocumentClickCounter.currentValue) {
|
|
1184
|
+
this.saveDocumentClickCounter = changes.saveDocumentClickCounter.currentValue;
|
|
1185
|
+
this.handleOnSave();
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
DocumentAadhaarNumberConfigEditor.prototype.createDocumentAadhaarNumberFormGroup = function () {
|
|
1190
|
+
this.documentAadhaarNumberFormGroup = new i2.FormGroup({
|
|
1191
|
+
properties: new i2.FormGroup({
|
|
1192
|
+
mask: new i2.FormControl(this.elementConfig.properties.mask, {
|
|
1193
|
+
updateOn: "change"
|
|
1194
|
+
})
|
|
1195
|
+
})
|
|
1196
|
+
});
|
|
1197
|
+
this.documentAadhaarNumberFormGroup.updateValueAndValidity();
|
|
1198
|
+
};
|
|
1199
|
+
DocumentAadhaarNumberConfigEditor.prototype.handleOnSave = function () {
|
|
1200
|
+
var documentElementConfig = this.documentAadhaarNumberFormGroup.getRawValue();
|
|
1201
|
+
this.updateElement.emit({
|
|
1202
|
+
documentElementConfig: documentElementConfig
|
|
1203
|
+
});
|
|
1204
|
+
};
|
|
1205
|
+
return DocumentAadhaarNumberConfigEditor;
|
|
1206
|
+
}());
|
|
1207
|
+
/** @nocollapse */ DocumentAadhaarNumberConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentAadhaarNumberConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1208
|
+
/** @nocollapse */ DocumentAadhaarNumberConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DocumentAadhaarNumberConfigEditor, selector: "document-aadhaar-number-config-editor", inputs: { saveDocumentClickCounter: "saveDocumentClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"documentAadhaarNumberFormGroup\">\n <div formGroupName=\"properties\">\n <div class=\"form-group-title\">Properties</div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Mask'\"\n [id]=\"'basic-phone-config-mask'\"\n [type]=\"'text'\"\n [formControlName]=\"'mask'\"\n [formControl]=\"\n documentAadhaarNumberFormGroup.controls.properties['controls'].mask\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your mask'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n </div>\n </form>\n ", isInline: true, styles: [""], components: [{ type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1209
|
+
__decorate([
|
|
1210
|
+
kwikidToolkit.logMethod
|
|
1211
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "ngOnInit", null);
|
|
1212
|
+
__decorate([
|
|
1213
|
+
kwikidToolkit.logMethod
|
|
1214
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "ngOnChanges", null);
|
|
1215
|
+
__decorate([
|
|
1216
|
+
kwikidToolkit.logMethod
|
|
1217
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "createDocumentAadhaarNumberFormGroup", null);
|
|
1218
|
+
__decorate([
|
|
1219
|
+
kwikidToolkit.logMethod
|
|
1220
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "handleOnSave", null);
|
|
1221
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentAadhaarNumberConfigEditor, decorators: [{
|
|
1222
|
+
type: i0.Component,
|
|
1223
|
+
args: [{
|
|
1224
|
+
selector: "document-aadhaar-number-config-editor",
|
|
1225
|
+
template: "\n <form [formGroup]=\"documentAadhaarNumberFormGroup\">\n <div formGroupName=\"properties\">\n <div class=\"form-group-title\">Properties</div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Mask'\"\n [id]=\"'basic-phone-config-mask'\"\n [type]=\"'text'\"\n [formControlName]=\"'mask'\"\n [formControl]=\"\n documentAadhaarNumberFormGroup.controls.properties['controls'].mask\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your mask'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n </div>\n </form>\n ",
|
|
1226
|
+
styles: [""]
|
|
1227
|
+
}]
|
|
1228
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveDocumentClickCounter: [{
|
|
1229
|
+
type: i0.Input
|
|
1230
|
+
}], elementConfig: [{
|
|
1231
|
+
type: i0.Input
|
|
1232
|
+
}], updateElement: [{
|
|
1233
|
+
type: i0.Output
|
|
1234
|
+
}], ngOnInit: [], ngOnChanges: [], createDocumentAadhaarNumberFormGroup: [], handleOnSave: [] } });
|
|
1235
|
+
|
|
1236
|
+
var DocumentPanNumberConfigEditor = /** @class */ (function () {
|
|
1237
|
+
function DocumentPanNumberConfigEditor() {
|
|
1238
|
+
this.saveDocumentClickCounter = 0;
|
|
1239
|
+
this.elementConfig = {
|
|
1240
|
+
properties: {
|
|
1241
|
+
case: "upper"
|
|
1242
|
+
}
|
|
1243
|
+
};
|
|
1244
|
+
this.updateElement = new i0.EventEmitter();
|
|
1245
|
+
this.documentPanNumberFormGroup = undefined;
|
|
1246
|
+
}
|
|
1247
|
+
DocumentPanNumberConfigEditor.prototype.ngOnInit = function () {
|
|
1248
|
+
this.createDocumentPanNumberFormGroup();
|
|
1249
|
+
};
|
|
1250
|
+
DocumentPanNumberConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
1251
|
+
var _a;
|
|
1252
|
+
var verifyChange = function (key) {
|
|
1253
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1254
|
+
};
|
|
1255
|
+
if (verifyChange("elementConfig")) {
|
|
1256
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1257
|
+
(_a = this.documentPanNumberFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1258
|
+
}
|
|
1259
|
+
if (verifyChange("saveDocumentClickCounter")) {
|
|
1260
|
+
if (changes.saveDocumentClickCounter.previousValue !==
|
|
1261
|
+
changes.saveDocumentClickCounter.currentValue) {
|
|
1262
|
+
this.saveDocumentClickCounter =
|
|
1263
|
+
changes.saveDocumentClickCounter.currentValue;
|
|
1264
|
+
this.handleOnSave();
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
};
|
|
1268
|
+
DocumentPanNumberConfigEditor.prototype.createDocumentPanNumberFormGroup = function () {
|
|
1269
|
+
this.documentPanNumberFormGroup = new i2.FormGroup({
|
|
1270
|
+
properties: new i2.FormGroup({
|
|
1271
|
+
case: new i2.FormControl(this.elementConfig.properties.case, {
|
|
1272
|
+
updateOn: "change"
|
|
1273
|
+
})
|
|
1274
|
+
})
|
|
1275
|
+
});
|
|
1276
|
+
this.documentPanNumberFormGroup.updateValueAndValidity();
|
|
1277
|
+
};
|
|
1278
|
+
DocumentPanNumberConfigEditor.prototype.handleOnSave = function () {
|
|
1279
|
+
var documentElementConfig = this.documentPanNumberFormGroup.getRawValue();
|
|
1280
|
+
this.updateElement.emit({
|
|
1281
|
+
documentElementConfig: documentElementConfig
|
|
1282
|
+
});
|
|
1283
|
+
};
|
|
1284
|
+
return DocumentPanNumberConfigEditor;
|
|
1285
|
+
}());
|
|
1286
|
+
/** @nocollapse */ DocumentPanNumberConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentPanNumberConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1287
|
+
/** @nocollapse */ DocumentPanNumberConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DocumentPanNumberConfigEditor, selector: "document-pan-number-config-editor", inputs: { saveDocumentClickCounter: "saveDocumentClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"documentPanNumberFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"['default', 'upper', 'lower']\"\n [label]=\"'case'\"\n [id]=\"'document-pan-number-config-case'\"\n size=\"m\"\n [formControlName]=\"'case'\"\n [formControl]=\"\n documentPanNumberFormGroup['controls'].properties['controls']\n .case\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n </form>\n ", isInline: true, styles: [""], components: [{ type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1288
|
+
__decorate([
|
|
1289
|
+
kwikidToolkit.logMethod
|
|
1290
|
+
], DocumentPanNumberConfigEditor.prototype, "ngOnInit", null);
|
|
1291
|
+
__decorate([
|
|
1292
|
+
kwikidToolkit.logMethod
|
|
1293
|
+
], DocumentPanNumberConfigEditor.prototype, "ngOnChanges", null);
|
|
1294
|
+
__decorate([
|
|
1295
|
+
kwikidToolkit.logMethod
|
|
1296
|
+
], DocumentPanNumberConfigEditor.prototype, "createDocumentPanNumberFormGroup", null);
|
|
1297
|
+
__decorate([
|
|
1298
|
+
kwikidToolkit.logMethod
|
|
1299
|
+
], DocumentPanNumberConfigEditor.prototype, "handleOnSave", null);
|
|
1300
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentPanNumberConfigEditor, decorators: [{
|
|
1301
|
+
type: i0.Component,
|
|
1302
|
+
args: [{
|
|
1303
|
+
selector: "document-pan-number-config-editor",
|
|
1304
|
+
template: "\n <form [formGroup]=\"documentPanNumberFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"['default', 'upper', 'lower']\"\n [label]=\"'case'\"\n [id]=\"'document-pan-number-config-case'\"\n size=\"m\"\n [formControlName]=\"'case'\"\n [formControl]=\"\n documentPanNumberFormGroup['controls'].properties['controls']\n .case\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n </form>\n ",
|
|
1305
|
+
styles: [""]
|
|
1306
|
+
}]
|
|
1307
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveDocumentClickCounter: [{
|
|
1308
|
+
type: i0.Input
|
|
1309
|
+
}], elementConfig: [{
|
|
1310
|
+
type: i0.Input
|
|
1311
|
+
}], updateElement: [{
|
|
1312
|
+
type: i0.Output
|
|
1313
|
+
}], ngOnInit: [], ngOnChanges: [], createDocumentPanNumberFormGroup: [], handleOnSave: [] } });
|
|
1314
|
+
|
|
1315
|
+
var DocumentElementConfigEditor = /** @class */ (function () {
|
|
1316
|
+
function DocumentElementConfigEditor() {
|
|
1317
|
+
this.saveClickCounter = 0;
|
|
1318
|
+
this.elementConfig = {
|
|
1319
|
+
label: "",
|
|
1320
|
+
key: "",
|
|
1321
|
+
disabled: false,
|
|
1322
|
+
default: {
|
|
1323
|
+
value: true
|
|
1324
|
+
},
|
|
1325
|
+
validators: {
|
|
1326
|
+
min: null,
|
|
1327
|
+
max: null,
|
|
1328
|
+
minLength: null,
|
|
1329
|
+
maxLength: null,
|
|
1330
|
+
required: true
|
|
1331
|
+
},
|
|
1332
|
+
properties: {
|
|
1333
|
+
placeholder: "",
|
|
1334
|
+
readOnly: false
|
|
1335
|
+
}
|
|
1336
|
+
};
|
|
1337
|
+
this.updateElement = new i0.EventEmitter();
|
|
1338
|
+
this.elementType = "";
|
|
1339
|
+
this.saveDocumentClickCounter = 0;
|
|
1340
|
+
this.documentFormGroup = undefined;
|
|
1341
|
+
}
|
|
1342
|
+
DocumentElementConfigEditor.prototype.ngOnInit = function () {
|
|
1343
|
+
this.assignVariables();
|
|
1344
|
+
this.createDocumentFormGroup();
|
|
1345
|
+
};
|
|
1346
|
+
DocumentElementConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
1347
|
+
var _a;
|
|
1348
|
+
var verifyChange = function (key) {
|
|
1349
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1350
|
+
};
|
|
1351
|
+
if (verifyChange("elementConfig")) {
|
|
1352
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1353
|
+
this.assignVariables();
|
|
1354
|
+
(_a = this.documentFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1355
|
+
}
|
|
1356
|
+
if (verifyChange("saveClickCounter")) {
|
|
1357
|
+
if (changes.saveClickCounter.previousValue !==
|
|
1358
|
+
changes.saveClickCounter.currentValue) {
|
|
1359
|
+
this.saveClickCounter = changes.saveClickCounter.currentValue;
|
|
1360
|
+
this.handleOnSave();
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
};
|
|
1364
|
+
DocumentElementConfigEditor.prototype.assignVariables = function () {
|
|
1365
|
+
this.elementType = this.elementConfig.elementType;
|
|
1366
|
+
};
|
|
1367
|
+
DocumentElementConfigEditor.prototype.createDocumentFormGroup = function () {
|
|
1368
|
+
this.documentFormGroup = new i2.FormGroup({
|
|
1369
|
+
label: new i2.FormControl(this.elementConfig.label),
|
|
1370
|
+
key: new i2.FormControl(this.elementConfig.key),
|
|
1371
|
+
disabled: new i2.FormControl(this.elementConfig.disabled),
|
|
1372
|
+
default: new i2.FormGroup({
|
|
1373
|
+
value: new i2.FormControl(this.elementConfig.default.value, {
|
|
1374
|
+
updateOn: "change"
|
|
1375
|
+
})
|
|
1376
|
+
}),
|
|
1377
|
+
validators: new i2.FormGroup({
|
|
1378
|
+
min: new i2.FormControl(this.elementConfig.validators.min, {
|
|
1379
|
+
updateOn: "change"
|
|
1380
|
+
}),
|
|
1381
|
+
minLength: new i2.FormControl(this.elementConfig.validators.minLength, {
|
|
1382
|
+
updateOn: "change"
|
|
1383
|
+
}),
|
|
1384
|
+
max: new i2.FormControl(this.elementConfig.validators.max, {
|
|
1385
|
+
updateOn: "change"
|
|
1386
|
+
}),
|
|
1387
|
+
maxLength: new i2.FormControl(this.elementConfig.validators.maxLength, {
|
|
1388
|
+
updateOn: "change"
|
|
1389
|
+
}),
|
|
1390
|
+
required: new i2.FormControl(this.elementConfig.validators.required, {
|
|
1391
|
+
updateOn: "change"
|
|
1392
|
+
})
|
|
1393
|
+
}),
|
|
1394
|
+
properties: new i2.FormGroup({
|
|
1395
|
+
placeholder: new i2.FormControl(this.elementConfig.properties.placeholder, {
|
|
1396
|
+
updateOn: "change"
|
|
1397
|
+
}),
|
|
1398
|
+
readOnly: new i2.FormControl(this.elementConfig.properties.readOnly, {
|
|
1399
|
+
updateOn: "change"
|
|
1400
|
+
})
|
|
1401
|
+
})
|
|
1402
|
+
});
|
|
1403
|
+
this.documentFormGroup.updateValueAndValidity();
|
|
1404
|
+
};
|
|
1405
|
+
DocumentElementConfigEditor.prototype.handleOnSaveUpdateElement = function (event) {
|
|
1406
|
+
// Get Common Config
|
|
1407
|
+
var documentElementCommonConfig = this.documentFormGroup.getRawValue();
|
|
1408
|
+
documentElementCommonConfig.key = documentElementCommonConfig.key.replace(/\s/g, "_");
|
|
1409
|
+
// Get Document Element Config
|
|
1410
|
+
var documentElementConfig = event.documentElementConfig;
|
|
1411
|
+
this.elementConfig = ___default["default"].merge(this.elementConfig, documentElementCommonConfig, documentElementConfig);
|
|
1412
|
+
this.updateElement.emit({ elementConfig: this.elementConfig });
|
|
1413
|
+
};
|
|
1414
|
+
DocumentElementConfigEditor.prototype.handleOnSave = function () {
|
|
1415
|
+
this.saveDocumentClickCounter++;
|
|
1416
|
+
};
|
|
1417
|
+
return DocumentElementConfigEditor;
|
|
1418
|
+
}());
|
|
1419
|
+
/** @nocollapse */ DocumentElementConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentElementConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1420
|
+
/** @nocollapse */ DocumentElementConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DocumentElementConfigEditor, selector: "document-element-config-editor", inputs: { saveClickCounter: "saveClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <kwikui-table\n style=\"width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;\"\n [columns]=\"['id', 'type', 'category']\"\n [headers]=\"{ id: 'ID', type: 'Type', category: 'Category' }\"\n [data]=\"[\n {\n id: elementConfig.elementId,\n type: elementConfig.elementType,\n category: elementConfig.elementCategory\n }\n ]\"\n (onClick)=\"(undefined)\"\n ></kwikui-table>\n </ng-container>\n <form [formGroup]=\"documentFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Standard</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'document-field-label'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"documentFormGroup.controls['label']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Key'\"\n [id]=\"'document-field-key'\"\n [type]=\"'text'\"\n [formControlName]=\"'key'\"\n [formControl]=\"documentFormGroup.controls['key']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'Disabled'\"\n [id]=\"'document-input-property-disabled'\"\n size=\"m\"\n [formControlName]=\"'disabled'\"\n [formControl]=\"documentFormGroup.controls['disabled']\"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n\n <div formGroupName=\"default\">\n <fieldset>\n <legend class=\"form-group-title\">Default</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n size=\"m\"\n [options]=\"[true, false]\"\n [label]=\"'value'\"\n [id]=\"'document-input-property-value'\"\n [formControlName]=\"'value'\"\n [formControl]=\"\n documentFormGroup['controls'].default['controls'].value\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"validators\">\n <fieldset>\n <legend class=\"form-group-title\">Validators</legend>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'min'\"\n [id]=\"'document-input-validators-min'\"\n [formControlName]=\"'min'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].min\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'max'\"\n [id]=\"'document-input-validators-max'\"\n [formControlName]=\"'max'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].max\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'minLength'\"\n [id]=\"'document-input-validators-minLength'\"\n [formControlName]=\"'minLength'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].minLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'maxLength'\"\n [id]=\"'document-input-validators-maxLength'\"\n [formControlName]=\"'maxLength'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].maxLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n size=\"m\"\n [options]=\"[true, false]\"\n [label]=\"'required'\"\n [id]=\"'document-input-property-required'\"\n [formControlName]=\"'required'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].required\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Properties</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Placeholder'\"\n [id]=\"'document-field-placeholder'\"\n [type]=\"'text'\"\n [formControlName]=\"'placeholder'\"\n [formControl]=\"\n documentFormGroup.controls.properties['controls'].placeholder\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your placeholder'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'readOnly'\"\n [id]=\"'document-input-property-readOnly'\"\n [formControlName]=\"'readOnly'\"\n [formControl]=\"\n documentFormGroup['controls'].properties['controls'].readOnly\n \"\n size=\"m\"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <document-aadhaar-number-config-editor\n [saveDocumentClickCounter]=\"saveDocumentClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></document-aadhaar-number-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'pan-number'\">\n <document-pan-number-config-editor\n [saveDocumentClickCounter]=\"saveDocumentClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></document-pan-number-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ", isInline: true, styles: ["\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "], components: [{ type: i1__namespace.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: DocumentAadhaarNumberConfigEditor, selector: "document-aadhaar-number-config-editor", inputs: ["saveDocumentClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: DocumentPanNumberConfigEditor, selector: "document-pan-number-config-editor", inputs: ["saveDocumentClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
1421
|
+
__decorate([
|
|
1422
|
+
kwikidToolkit.logMethod
|
|
1423
|
+
], DocumentElementConfigEditor.prototype, "ngOnInit", null);
|
|
1424
|
+
__decorate([
|
|
1425
|
+
kwikidToolkit.logMethod
|
|
1426
|
+
], DocumentElementConfigEditor.prototype, "ngOnChanges", null);
|
|
1427
|
+
__decorate([
|
|
1428
|
+
kwikidToolkit.logMethod
|
|
1429
|
+
], DocumentElementConfigEditor.prototype, "assignVariables", null);
|
|
1430
|
+
__decorate([
|
|
1431
|
+
kwikidToolkit.logMethod
|
|
1432
|
+
], DocumentElementConfigEditor.prototype, "createDocumentFormGroup", null);
|
|
1433
|
+
__decorate([
|
|
1434
|
+
kwikidToolkit.logMethod
|
|
1435
|
+
], DocumentElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
|
|
1436
|
+
__decorate([
|
|
1437
|
+
kwikidToolkit.logMethod
|
|
1438
|
+
], DocumentElementConfigEditor.prototype, "handleOnSave", null);
|
|
1439
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentElementConfigEditor, decorators: [{
|
|
1440
|
+
type: i0.Component,
|
|
1441
|
+
args: [{
|
|
1442
|
+
selector: "document-element-config-editor",
|
|
1443
|
+
template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <kwikui-table\n style=\"width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;\"\n [columns]=\"['id', 'type', 'category']\"\n [headers]=\"{ id: 'ID', type: 'Type', category: 'Category' }\"\n [data]=\"[\n {\n id: elementConfig.elementId,\n type: elementConfig.elementType,\n category: elementConfig.elementCategory\n }\n ]\"\n (onClick)=\"(undefined)\"\n ></kwikui-table>\n </ng-container>\n <form [formGroup]=\"documentFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Standard</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'document-field-label'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"documentFormGroup.controls['label']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Key'\"\n [id]=\"'document-field-key'\"\n [type]=\"'text'\"\n [formControlName]=\"'key'\"\n [formControl]=\"documentFormGroup.controls['key']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'Disabled'\"\n [id]=\"'document-input-property-disabled'\"\n size=\"m\"\n [formControlName]=\"'disabled'\"\n [formControl]=\"documentFormGroup.controls['disabled']\"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n\n <div formGroupName=\"default\">\n <fieldset>\n <legend class=\"form-group-title\">Default</legend>\n <div class=\"form-group\">\n <kwikui-select-combobox\n size=\"m\"\n [options]=\"[true, false]\"\n [label]=\"'value'\"\n [id]=\"'document-input-property-value'\"\n [formControlName]=\"'value'\"\n [formControl]=\"\n documentFormGroup['controls'].default['controls'].value\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"validators\">\n <fieldset>\n <legend class=\"form-group-title\">Validators</legend>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'min'\"\n [id]=\"'document-input-validators-min'\"\n [formControlName]=\"'min'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].min\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'max'\"\n [id]=\"'document-input-validators-max'\"\n [formControlName]=\"'max'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].max\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'minLength'\"\n [id]=\"'document-input-validators-minLength'\"\n [formControlName]=\"'minLength'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].minLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your minimum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-input-number\n [label]=\"'maxLength'\"\n [id]=\"'document-input-validators-maxLength'\"\n [formControlName]=\"'maxLength'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].maxLength\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your maximum length value'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-input-number>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n size=\"m\"\n [options]=\"[true, false]\"\n [label]=\"'required'\"\n [id]=\"'document-input-property-required'\"\n [formControlName]=\"'required'\"\n [formControl]=\"\n documentFormGroup['controls'].validators['controls'].required\n \"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Properties</legend>\n <div class=\"form-group\">\n <kwikui-input\n [label]=\"'Placeholder'\"\n [id]=\"'document-field-placeholder'\"\n [type]=\"'text'\"\n [formControlName]=\"'placeholder'\"\n [formControl]=\"\n documentFormGroup.controls.properties['controls'].placeholder\n \"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your placeholder'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </div>\n <div class=\"form-group\">\n <kwikui-select-combobox\n [options]=\"[true, false]\"\n [label]=\"'readOnly'\"\n [id]=\"'document-input-property-readOnly'\"\n [formControlName]=\"'readOnly'\"\n [formControl]=\"\n documentFormGroup['controls'].properties['controls'].readOnly\n \"\n size=\"m\"\n [focus]=\"false\"\n [disabled]=\"false\"\n [invalid]=\"false\"\n [placeholder]=\"'Please select either true or false'\"\n ></kwikui-select-combobox>\n </div>\n </fieldset>\n </div>\n\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <document-aadhaar-number-config-editor\n [saveDocumentClickCounter]=\"saveDocumentClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></document-aadhaar-number-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'pan-number'\">\n <document-pan-number-config-editor\n [saveDocumentClickCounter]=\"saveDocumentClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></document-pan-number-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ",
|
|
1444
|
+
styles: [
|
|
1445
|
+
"\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "
|
|
1446
|
+
]
|
|
1447
|
+
}]
|
|
1448
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveClickCounter: [{
|
|
1449
|
+
type: i0.Input
|
|
1450
|
+
}], elementConfig: [{
|
|
1451
|
+
type: i0.Input
|
|
1452
|
+
}], updateElement: [{
|
|
1453
|
+
type: i0.Output
|
|
1454
|
+
}], ngOnInit: [], ngOnChanges: [], assignVariables: [], createDocumentFormGroup: [], handleOnSaveUpdateElement: [], handleOnSave: [] } });
|
|
1455
|
+
|
|
1456
|
+
var OtherHTMLConfigEditor = /** @class */ (function () {
|
|
1457
|
+
function OtherHTMLConfigEditor() {
|
|
1458
|
+
this.saveOtherClickCounter = 0;
|
|
1459
|
+
this.elementConfig = {
|
|
1460
|
+
html: ""
|
|
1461
|
+
};
|
|
1462
|
+
this.updateElement = new i0.EventEmitter();
|
|
1463
|
+
this.otherHTMLFormGroup = undefined;
|
|
1464
|
+
}
|
|
1465
|
+
OtherHTMLConfigEditor.prototype.ngOnInit = function () {
|
|
1466
|
+
this.createOtherHTMLFormGroup();
|
|
1467
|
+
};
|
|
1468
|
+
OtherHTMLConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
1469
|
+
var _a;
|
|
1470
|
+
var verifyChange = function (key) {
|
|
1471
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1472
|
+
};
|
|
1473
|
+
if (verifyChange("elementConfig")) {
|
|
1474
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1475
|
+
(_a = this.otherHTMLFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1476
|
+
}
|
|
1477
|
+
if (verifyChange("saveOtherClickCounter")) {
|
|
1478
|
+
if (changes.saveOtherClickCounter.previousValue !==
|
|
1479
|
+
changes.saveOtherClickCounter.currentValue) {
|
|
1480
|
+
this.saveOtherClickCounter = changes.saveOtherClickCounter.currentValue;
|
|
1481
|
+
this.handleOnSave();
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
};
|
|
1485
|
+
OtherHTMLConfigEditor.prototype.createOtherHTMLFormGroup = function () {
|
|
1486
|
+
this.otherHTMLFormGroup = new i2.FormGroup({
|
|
1487
|
+
html: new i2.FormControl(this.elementConfig.html, {
|
|
1488
|
+
updateOn: "change"
|
|
1489
|
+
})
|
|
1490
|
+
});
|
|
1491
|
+
this.otherHTMLFormGroup.updateValueAndValidity();
|
|
1492
|
+
};
|
|
1493
|
+
OtherHTMLConfigEditor.prototype.handleOnSave = function () {
|
|
1494
|
+
var otherElementConfig = this.otherHTMLFormGroup.getRawValue();
|
|
1495
|
+
this.updateElement.emit({
|
|
1496
|
+
otherElementConfig: otherElementConfig
|
|
1497
|
+
});
|
|
1498
|
+
};
|
|
1499
|
+
return OtherHTMLConfigEditor;
|
|
1500
|
+
}());
|
|
1501
|
+
/** @nocollapse */ OtherHTMLConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OtherHTMLConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1502
|
+
/** @nocollapse */ OtherHTMLConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: OtherHTMLConfigEditor, selector: "other-html-config-editor", inputs: { saveOtherClickCounter: "saveOtherClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"otherHTMLFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-textarea\n [label]=\"'HTML'\"\n [id]=\"'form_key'\"\n [formControlName]=\"'html'\"\n [formControl]=\"otherHTMLFormGroup.controls['html']\"\n [disabled]=\"false\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-textarea>\n </div>\n </fieldset>\n </div>\n </form>\n ", isInline: true, styles: [""], components: [{ type: i1__namespace.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "expandable", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1503
|
+
__decorate([
|
|
1504
|
+
kwikidToolkit.logMethod
|
|
1505
|
+
], OtherHTMLConfigEditor.prototype, "ngOnInit", null);
|
|
1506
|
+
__decorate([
|
|
1507
|
+
kwikidToolkit.logMethod
|
|
1508
|
+
], OtherHTMLConfigEditor.prototype, "ngOnChanges", null);
|
|
1509
|
+
__decorate([
|
|
1510
|
+
kwikidToolkit.logMethod
|
|
1511
|
+
], OtherHTMLConfigEditor.prototype, "createOtherHTMLFormGroup", null);
|
|
1512
|
+
__decorate([
|
|
1513
|
+
kwikidToolkit.logMethod
|
|
1514
|
+
], OtherHTMLConfigEditor.prototype, "handleOnSave", null);
|
|
1515
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OtherHTMLConfigEditor, decorators: [{
|
|
1516
|
+
type: i0.Component,
|
|
1517
|
+
args: [{
|
|
1518
|
+
selector: "other-html-config-editor",
|
|
1519
|
+
template: "\n <form [formGroup]=\"otherHTMLFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <div class=\"form-group\">\n <kwikui-textarea\n [label]=\"'HTML'\"\n [id]=\"'form_key'\"\n [formControlName]=\"'html'\"\n [formControl]=\"otherHTMLFormGroup.controls['html']\"\n [disabled]=\"false\"\n [focus]=\"false\"\n [invalid]=\"false\"\n size=\"m\"\n ></kwikui-textarea>\n </div>\n </fieldset>\n </div>\n </form>\n ",
|
|
1520
|
+
styles: [""]
|
|
1521
|
+
}]
|
|
1522
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveOtherClickCounter: [{
|
|
1523
|
+
type: i0.Input
|
|
1524
|
+
}], elementConfig: [{
|
|
1525
|
+
type: i0.Input
|
|
1526
|
+
}], updateElement: [{
|
|
1527
|
+
type: i0.Output
|
|
1528
|
+
}], ngOnInit: [], ngOnChanges: [], createOtherHTMLFormGroup: [], handleOnSave: [] } });
|
|
1529
|
+
|
|
1530
|
+
var OtherTitleConfigEditor = /** @class */ (function () {
|
|
1531
|
+
function OtherTitleConfigEditor() {
|
|
1532
|
+
this.saveOtherClickCounter = 0;
|
|
1533
|
+
this.elementConfig = {
|
|
1534
|
+
label: ""
|
|
1535
|
+
};
|
|
1536
|
+
this.updateElement = new i0.EventEmitter();
|
|
1537
|
+
this.otherTitleFormGroup = undefined;
|
|
1538
|
+
}
|
|
1539
|
+
OtherTitleConfigEditor.prototype.ngOnInit = function () {
|
|
1540
|
+
this.createOtherTitleFormGroup();
|
|
1541
|
+
};
|
|
1542
|
+
OtherTitleConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
1543
|
+
var verifyChange = function (key) {
|
|
1544
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1545
|
+
};
|
|
1546
|
+
if (verifyChange("elementConfig")) {
|
|
1547
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1548
|
+
this.otherTitleFormGroup.reset(this.elementConfig);
|
|
1549
|
+
}
|
|
1550
|
+
if (verifyChange("saveOtherClickCounter")) {
|
|
1551
|
+
if (changes.saveOtherClickCounter.previousValue !==
|
|
1552
|
+
changes.saveOtherClickCounter.currentValue) {
|
|
1553
|
+
this.saveOtherClickCounter = changes.saveOtherClickCounter.currentValue;
|
|
1554
|
+
this.handleOnSave();
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
OtherTitleConfigEditor.prototype.createOtherTitleFormGroup = function () {
|
|
1559
|
+
this.otherTitleFormGroup = new i2.FormGroup({
|
|
1560
|
+
label: new i2.FormControl(this.elementConfig.label, {
|
|
634
1561
|
updateOn: "change"
|
|
635
1562
|
})
|
|
636
1563
|
});
|
|
637
|
-
|
|
638
|
-
};
|
|
639
|
-
BasicRadioConfigEditor.prototype.addOption = function () {
|
|
640
|
-
var options = this.basicRadioFormGroup.get("options");
|
|
641
|
-
options.push(this.createOptionConfigFormGroup(this.optionType));
|
|
1564
|
+
this.otherTitleFormGroup.updateValueAndValidity();
|
|
642
1565
|
};
|
|
643
|
-
|
|
644
|
-
var
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}
|
|
648
|
-
else {
|
|
649
|
-
this.addOption();
|
|
650
|
-
// options.reset();
|
|
651
|
-
}
|
|
1566
|
+
OtherTitleConfigEditor.prototype.handleOnSave = function () {
|
|
1567
|
+
var otherElementConfig = this.otherTitleFormGroup.getRawValue();
|
|
1568
|
+
this.updateElement.emit({
|
|
1569
|
+
otherElementConfig: otherElementConfig
|
|
1570
|
+
});
|
|
652
1571
|
};
|
|
653
|
-
return
|
|
1572
|
+
return OtherTitleConfigEditor;
|
|
654
1573
|
}());
|
|
655
|
-
/** @nocollapse */
|
|
656
|
-
/** @nocollapse */
|
|
657
|
-
__decorate([
|
|
658
|
-
kwikidToolkit.logMethod
|
|
659
|
-
], BasicRadioConfigEditor.prototype, "ngOnInit", null);
|
|
660
|
-
__decorate([
|
|
661
|
-
kwikidToolkit.logMethod
|
|
662
|
-
], BasicRadioConfigEditor.prototype, "ngOnChanges", null);
|
|
663
|
-
__decorate([
|
|
664
|
-
kwikidToolkit.logMethod
|
|
665
|
-
], BasicRadioConfigEditor.prototype, "createBasicRadioFormGroup", null);
|
|
1574
|
+
/** @nocollapse */ OtherTitleConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OtherTitleConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1575
|
+
/** @nocollapse */ OtherTitleConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: OtherTitleConfigEditor, selector: "other-title-config-editor", inputs: { saveOtherClickCounter: "saveOtherClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <form [formGroup]=\"otherTitleFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'form_key'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"otherTitleFormGroup.controls['label']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </fieldset>\n </div>\n </form>\n ", isInline: true, styles: [""], components: [{ type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
666
1576
|
__decorate([
|
|
667
1577
|
kwikidToolkit.logMethod
|
|
668
|
-
],
|
|
1578
|
+
], OtherTitleConfigEditor.prototype, "ngOnInit", null);
|
|
669
1579
|
__decorate([
|
|
670
1580
|
kwikidToolkit.logMethod
|
|
671
|
-
],
|
|
1581
|
+
], OtherTitleConfigEditor.prototype, "ngOnChanges", null);
|
|
672
1582
|
__decorate([
|
|
673
1583
|
kwikidToolkit.logMethod
|
|
674
|
-
],
|
|
1584
|
+
], OtherTitleConfigEditor.prototype, "createOtherTitleFormGroup", null);
|
|
675
1585
|
__decorate([
|
|
676
1586
|
kwikidToolkit.logMethod
|
|
677
|
-
],
|
|
678
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type:
|
|
1587
|
+
], OtherTitleConfigEditor.prototype, "handleOnSave", null);
|
|
1588
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OtherTitleConfigEditor, decorators: [{
|
|
679
1589
|
type: i0.Component,
|
|
680
1590
|
args: [{
|
|
681
|
-
selector: "
|
|
682
|
-
template: "\n <form [formGroup]=\"
|
|
683
|
-
styles: [
|
|
684
|
-
"\n .form-array-actions {\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n }\n "
|
|
685
|
-
]
|
|
1591
|
+
selector: "other-title-config-editor",
|
|
1592
|
+
template: "\n <form [formGroup]=\"otherTitleFormGroup\">\n <div formGroupName=\"properties\">\n <fieldset>\n <legend class=\"form-group-title\">Miscellaneous</legend>\n <kwikui-input\n [label]=\"'Label'\"\n [id]=\"'form_key'\"\n [type]=\"'text'\"\n [formControlName]=\"'label'\"\n [formControl]=\"otherTitleFormGroup.controls['label']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Label'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </fieldset>\n </div>\n </form>\n ",
|
|
1593
|
+
styles: [""]
|
|
686
1594
|
}]
|
|
687
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
1595
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveOtherClickCounter: [{
|
|
688
1596
|
type: i0.Input
|
|
689
1597
|
}], elementConfig: [{
|
|
690
1598
|
type: i0.Input
|
|
691
1599
|
}], updateElement: [{
|
|
692
1600
|
type: i0.Output
|
|
693
|
-
}], ngOnInit: [], ngOnChanges: [],
|
|
1601
|
+
}], ngOnInit: [], ngOnChanges: [], createOtherTitleFormGroup: [], handleOnSave: [] } });
|
|
694
1602
|
|
|
695
|
-
var
|
|
696
|
-
function
|
|
1603
|
+
var OtherElementConfigEditor = /** @class */ (function () {
|
|
1604
|
+
function OtherElementConfigEditor() {
|
|
697
1605
|
this.saveClickCounter = 0;
|
|
698
1606
|
this.elementConfig = {
|
|
699
|
-
|
|
700
|
-
key: "",
|
|
701
|
-
disabled: false,
|
|
702
|
-
default: {
|
|
703
|
-
value: true
|
|
704
|
-
},
|
|
705
|
-
validators: {
|
|
706
|
-
min: null,
|
|
707
|
-
max: null,
|
|
708
|
-
minLength: null,
|
|
709
|
-
maxLength: null,
|
|
710
|
-
required: true
|
|
711
|
-
},
|
|
712
|
-
properties: {
|
|
713
|
-
placeholder: "",
|
|
714
|
-
readOnly: false
|
|
715
|
-
}
|
|
1607
|
+
key: ""
|
|
716
1608
|
};
|
|
717
1609
|
this.updateElement = new i0.EventEmitter();
|
|
718
1610
|
this.elementType = "";
|
|
719
|
-
this.
|
|
720
|
-
this.
|
|
1611
|
+
this.saveOtherClickCounter = 0;
|
|
1612
|
+
this.otherFormGroup = undefined;
|
|
721
1613
|
}
|
|
722
|
-
|
|
1614
|
+
OtherElementConfigEditor.prototype.ngOnInit = function () {
|
|
723
1615
|
this.assignVariables();
|
|
724
|
-
this.
|
|
1616
|
+
this.createOtherFormGroup();
|
|
725
1617
|
};
|
|
726
|
-
|
|
1618
|
+
OtherElementConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
1619
|
+
var _a;
|
|
727
1620
|
var verifyChange = function (key) {
|
|
728
1621
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
729
1622
|
};
|
|
730
1623
|
if (verifyChange("elementConfig")) {
|
|
731
1624
|
this.elementConfig = changes.elementConfig.currentValue;
|
|
732
1625
|
this.assignVariables();
|
|
733
|
-
this.
|
|
1626
|
+
(_a = this.otherFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
734
1627
|
}
|
|
735
1628
|
if (verifyChange("saveClickCounter")) {
|
|
736
1629
|
if (changes.saveClickCounter.previousValue !==
|
|
@@ -740,86 +1633,54 @@
|
|
|
740
1633
|
}
|
|
741
1634
|
}
|
|
742
1635
|
};
|
|
743
|
-
|
|
1636
|
+
OtherElementConfigEditor.prototype.assignVariables = function () {
|
|
744
1637
|
this.elementType = this.elementConfig.elementType;
|
|
745
1638
|
};
|
|
746
|
-
|
|
747
|
-
this.
|
|
748
|
-
|
|
749
|
-
key: new i1.FormControl(this.elementConfig.key),
|
|
750
|
-
disabled: new i1.FormControl(this.elementConfig.disabled),
|
|
751
|
-
default: new i1.FormGroup({
|
|
752
|
-
value: new i1.FormControl(this.elementConfig.default.value, {
|
|
753
|
-
updateOn: "change"
|
|
754
|
-
})
|
|
755
|
-
}),
|
|
756
|
-
validators: new i1.FormGroup({
|
|
757
|
-
min: new i1.FormControl(this.elementConfig.validators.min, {
|
|
758
|
-
updateOn: "change"
|
|
759
|
-
}),
|
|
760
|
-
minLength: new i1.FormControl(this.elementConfig.validators.minLength, {
|
|
761
|
-
updateOn: "change"
|
|
762
|
-
}),
|
|
763
|
-
max: new i1.FormControl(this.elementConfig.validators.max, {
|
|
764
|
-
updateOn: "change"
|
|
765
|
-
}),
|
|
766
|
-
maxLength: new i1.FormControl(this.elementConfig.validators.maxLength, {
|
|
767
|
-
updateOn: "change"
|
|
768
|
-
}),
|
|
769
|
-
required: new i1.FormControl(this.elementConfig.validators.required, {
|
|
770
|
-
updateOn: "change"
|
|
771
|
-
})
|
|
772
|
-
}),
|
|
773
|
-
properties: new i1.FormGroup({
|
|
774
|
-
placeholder: new i1.FormControl(this.elementConfig.properties.placeholder, {
|
|
775
|
-
updateOn: "change"
|
|
776
|
-
}),
|
|
777
|
-
readOnly: new i1.FormControl(this.elementConfig.properties.readOnly, {
|
|
778
|
-
updateOn: "change"
|
|
779
|
-
})
|
|
780
|
-
})
|
|
1639
|
+
OtherElementConfigEditor.prototype.createOtherFormGroup = function () {
|
|
1640
|
+
this.otherFormGroup = new i2.FormGroup({
|
|
1641
|
+
key: new i2.FormControl(this.elementConfig.key)
|
|
781
1642
|
});
|
|
782
|
-
this.
|
|
1643
|
+
this.otherFormGroup.updateValueAndValidity();
|
|
783
1644
|
};
|
|
784
|
-
|
|
1645
|
+
OtherElementConfigEditor.prototype.handleOnSaveUpdateElement = function (event) {
|
|
785
1646
|
// Get Common Config
|
|
786
|
-
var
|
|
787
|
-
|
|
788
|
-
// Get
|
|
789
|
-
var
|
|
790
|
-
this.elementConfig =
|
|
1647
|
+
var otherElementCommonConfig = this.otherFormGroup.getRawValue();
|
|
1648
|
+
otherElementCommonConfig.key = otherElementCommonConfig.key.replace(/\s/g, "_");
|
|
1649
|
+
// Get Other Element Config
|
|
1650
|
+
var otherElementConfig = event.otherElementConfig;
|
|
1651
|
+
this.elementConfig = ___default["default"].merge(this.elementConfig, otherElementCommonConfig, otherElementConfig);
|
|
791
1652
|
this.updateElement.emit({ elementConfig: this.elementConfig });
|
|
792
1653
|
};
|
|
793
|
-
|
|
794
|
-
this.
|
|
1654
|
+
OtherElementConfigEditor.prototype.handleOnSave = function () {
|
|
1655
|
+
this.saveOtherClickCounter++;
|
|
795
1656
|
};
|
|
796
|
-
return
|
|
1657
|
+
return OtherElementConfigEditor;
|
|
797
1658
|
}());
|
|
798
|
-
/** @nocollapse */
|
|
799
|
-
/** @nocollapse */
|
|
1659
|
+
/** @nocollapse */ OtherElementConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OtherElementConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1660
|
+
/** @nocollapse */ OtherElementConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: OtherElementConfigEditor, selector: "other-element-config-editor", inputs: { saveClickCounter: "saveClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <kwikui-table\n style=\"width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;\"\n [columns]=\"['id', 'type', 'category']\"\n [headers]=\"{ id: 'ID', type: 'Type', category: 'Category' }\"\n [data]=\"[\n {\n id: elementConfig.elementId,\n type: elementConfig.elementType,\n category: elementConfig.elementCategory\n }\n ]\"\n (onClick)=\"(undefined)\"\n ></kwikui-table>\n </ng-container>\n <form [formGroup]=\"otherFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Standard</legend>\n <kwikui-input\n [label]=\"'Key'\"\n [id]=\"'basic-field-key'\"\n [type]=\"'text'\"\n [formControlName]=\"'key'\"\n [formControl]=\"otherFormGroup.controls['key']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Field Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </fieldset>\n\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'html'\">\n <other-html-config-editor\n [saveOtherClickCounter]=\"saveOtherClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></other-html-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'title'\">\n <other-title-config-editor\n [saveOtherClickCounter]=\"saveOtherClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></other-title-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ", isInline: true, styles: ["\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "], components: [{ type: i1__namespace.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: OtherHTMLConfigEditor, selector: "other-html-config-editor", inputs: ["saveOtherClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: OtherTitleConfigEditor, selector: "other-title-config-editor", inputs: ["saveOtherClickCounter", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
800
1661
|
__decorate([
|
|
801
1662
|
kwikidToolkit.logMethod
|
|
802
|
-
],
|
|
1663
|
+
], OtherElementConfigEditor.prototype, "ngOnInit", null);
|
|
803
1664
|
__decorate([
|
|
804
1665
|
kwikidToolkit.logMethod
|
|
805
|
-
],
|
|
1666
|
+
], OtherElementConfigEditor.prototype, "ngOnChanges", null);
|
|
806
1667
|
__decorate([
|
|
807
1668
|
kwikidToolkit.logMethod
|
|
808
|
-
],
|
|
1669
|
+
], OtherElementConfigEditor.prototype, "assignVariables", null);
|
|
809
1670
|
__decorate([
|
|
810
1671
|
kwikidToolkit.logMethod
|
|
811
|
-
],
|
|
1672
|
+
], OtherElementConfigEditor.prototype, "createOtherFormGroup", null);
|
|
812
1673
|
__decorate([
|
|
813
1674
|
kwikidToolkit.logMethod
|
|
814
|
-
],
|
|
1675
|
+
], OtherElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
|
|
815
1676
|
__decorate([
|
|
816
1677
|
kwikidToolkit.logMethod
|
|
817
|
-
],
|
|
818
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type:
|
|
1678
|
+
], OtherElementConfigEditor.prototype, "handleOnSave", null);
|
|
1679
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OtherElementConfigEditor, decorators: [{
|
|
819
1680
|
type: i0.Component,
|
|
820
1681
|
args: [{
|
|
821
|
-
selector: "
|
|
822
|
-
template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <table
|
|
1682
|
+
selector: "other-element-config-editor",
|
|
1683
|
+
template: "\n <ng-container *ngIf=\"elementConfig !== undefined\">\n <kwikui-table\n style=\"width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;\"\n [columns]=\"['id', 'type', 'category']\"\n [headers]=\"{ id: 'ID', type: 'Type', category: 'Category' }\"\n [data]=\"[\n {\n id: elementConfig.elementId,\n type: elementConfig.elementType,\n category: elementConfig.elementCategory\n }\n ]\"\n (onClick)=\"(undefined)\"\n ></kwikui-table>\n </ng-container>\n <form [formGroup]=\"otherFormGroup\">\n <fieldset>\n <legend class=\"form-group-title\">Standard</legend>\n <kwikui-input\n [label]=\"'Key'\"\n [id]=\"'basic-field-key'\"\n [type]=\"'text'\"\n [formControlName]=\"'key'\"\n [formControl]=\"otherFormGroup.controls['key']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter your Field Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n ></kwikui-input>\n </fieldset>\n\n <ng-container [ngSwitch]=\"elementType\">\n <ng-container *ngSwitchCase=\"'html'\">\n <other-html-config-editor\n [saveOtherClickCounter]=\"saveOtherClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></other-html-config-editor>\n </ng-container>\n <ng-container *ngSwitchCase=\"'title'\">\n <other-title-config-editor\n [saveOtherClickCounter]=\"saveOtherClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></other-title-config-editor>\n </ng-container>\n </ng-container>\n </form>\n ",
|
|
823
1684
|
styles: [
|
|
824
1685
|
"\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: flex-start;\n align-items: stretch;\n gap: 1rem;\n }\n "
|
|
825
1686
|
]
|
|
@@ -830,7 +1691,7 @@
|
|
|
830
1691
|
type: i0.Input
|
|
831
1692
|
}], updateElement: [{
|
|
832
1693
|
type: i0.Output
|
|
833
|
-
}], ngOnInit: [], ngOnChanges: [], assignVariables: [],
|
|
1694
|
+
}], ngOnInit: [], ngOnChanges: [], assignVariables: [], createOtherFormGroup: [], handleOnSaveUpdateElement: [], handleOnSave: [] } });
|
|
834
1695
|
|
|
835
1696
|
var ElementConfigEditor = /** @class */ (function () {
|
|
836
1697
|
function ElementConfigEditor() {
|
|
@@ -862,9 +1723,9 @@
|
|
|
862
1723
|
}
|
|
863
1724
|
};
|
|
864
1725
|
ElementConfigEditor.prototype.updateFormGroup = function () {
|
|
865
|
-
this.elementEditorFormGroup = new
|
|
866
|
-
properties: new
|
|
867
|
-
orientation: new
|
|
1726
|
+
this.elementEditorFormGroup = new i2.FormGroup({
|
|
1727
|
+
properties: new i2.FormGroup({
|
|
1728
|
+
orientation: new i2.FormControl(this.elementConfig.properties.orientation, {
|
|
868
1729
|
updateOn: "change"
|
|
869
1730
|
})
|
|
870
1731
|
})
|
|
@@ -880,7 +1741,7 @@
|
|
|
880
1741
|
return ElementConfigEditor;
|
|
881
1742
|
}());
|
|
882
1743
|
/** @nocollapse */ ElementConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ElementConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
883
|
-
/** @nocollapse */ ElementConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ElementConfigEditor, selector: "element-config-editor", inputs: { formKey: "formKey", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div
|
|
1744
|
+
/** @nocollapse */ ElementConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ElementConfigEditor, selector: "element-config-editor", inputs: { formKey: "formKey", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"container\"\n *ngIf=\"elementConfig\"\n>\n <div class=\"element-config-editor-header\">\n '{{ elementConfig.elementType }}' Element Config Editor\n </div>\n <div class=\"element-config-editor-body\"\n ><ng-container [ngSwitch]=\"elementCategory\">\n <!-- Basic -->\n <ng-container *ngSwitchCase=\"'basic'\">\n <basic-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></basic-element-config-editor>\n </ng-container>\n <!-- Document -->\n <ng-container *ngSwitchCase=\"'document'\">\n <document-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></document-element-config-editor>\n </ng-container>\n <!-- Other -->\n <ng-container *ngSwitchCase=\"'other'\">\n <other-element-config-editor\n [saveClickCounter]=\"saveClickCounter\"\n [elementConfig]=\"elementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></other-element-config-editor>\n </ng-container>\n </ng-container>\n </div>\n <div class=\"element-config-editor-footer\">\n <!-- <button\n class=\"save-button\"\n type=\"submit\"\n (click)=\"handleOnClickSave()\"\n >\n Save\n </button> -->\n <kwikui-button\n [disabled]=\"false\"\n label=\"Save\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"save-button\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n size=\"m\"\n (onClick)=\"handleOnClickSave()\"\n ></kwikui-button>\n </div>\n</div>\n", styles: ["form{display:flex;align-content:center;justify-content:flex-start;flex:1;flex-direction:column;align-items:stretch;grid-gap:1rem;gap:1rem}.form-group{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;padding:.5rem 0}.form-group-title{margin-top:1rem}.container{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem}.container .element-config-editor-footer{display:flex;flex-direction:row;align-items:center;justify-content:center;align-content:center;grid-gap:1rem;gap:1rem}\n", "kwikid-forms-builder fieldset{display:flex;flex-direction:column;justify-content:center;align-items:stretch;align-content:center;grid-gap:.5rem;gap:.5rem;padding:.5rem 1rem 1rem;box-shadow:0 0 10px -6px #000;border:0px solid gray;border-radius:1rem}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}kwikui-table table{width:100%;box-shadow:0 0 10px -6px #000;border:0px solid gray;padding:0}\n"], components: [{ type: BasicElementConfigEditor, selector: "basic-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: DocumentElementConfigEditor, selector: "document-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: OtherElementConfigEditor, selector: "other-element-config-editor", inputs: ["saveClickCounter", "elementConfig"], outputs: ["updateElement"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
884
1745
|
__decorate([
|
|
885
1746
|
kwikidToolkit.logMethod
|
|
886
1747
|
], ElementConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -929,9 +1790,11 @@
|
|
|
929
1790
|
this.formElementsDragList = [];
|
|
930
1791
|
this.formElementsDropList = [];
|
|
931
1792
|
this.elementEditorElementConfig = undefined;
|
|
932
|
-
this.
|
|
933
|
-
|
|
934
|
-
|
|
1793
|
+
this.finalJSONConfig = undefined;
|
|
1794
|
+
this.JSON = JSON;
|
|
1795
|
+
this.builderFormGroup = new i2.FormGroup({
|
|
1796
|
+
formKey: new i2.FormControl("", [i2.Validators.required]),
|
|
1797
|
+
formTitle: new i2.FormControl("", [i2.Validators.required])
|
|
935
1798
|
});
|
|
936
1799
|
var formDropConfig = kwikidToolkit.getObjectFromLocalStorage("formDropConfig");
|
|
937
1800
|
if (kwikidToolkit.isNotEmptyValue(formDropConfig)) {
|
|
@@ -1034,19 +1897,24 @@
|
|
|
1034
1897
|
KwikIDFormsBuilderComponent.prototype.handleOnSaveUpdateElement = function (event) { };
|
|
1035
1898
|
KwikIDFormsBuilderComponent.prototype.handleOnClickSaveForms = function (event) {
|
|
1036
1899
|
var _this = this;
|
|
1037
|
-
if (kwikidToolkit.isEmptyValue(this.formKey)) {
|
|
1900
|
+
if (kwikidToolkit.isEmptyValue(this.builderFormGroup.controls.formKey.value)) {
|
|
1038
1901
|
window.alert("Please provide Form Key");
|
|
1039
1902
|
return;
|
|
1040
1903
|
}
|
|
1041
1904
|
else {
|
|
1905
|
+
this.formKey = this.builderFormGroup.controls.formKey.value;
|
|
1042
1906
|
this.formKey = this.formKey.replace(/\s/g, "_").toLocaleUpperCase();
|
|
1043
1907
|
}
|
|
1044
|
-
if (kwikidToolkit.isEmptyValue(this.formTitle)) {
|
|
1908
|
+
if (kwikidToolkit.isEmptyValue(this.builderFormGroup.controls.formTitle.value)) {
|
|
1045
1909
|
window.alert("Please provide Form Title");
|
|
1046
1910
|
return;
|
|
1047
1911
|
}
|
|
1912
|
+
else {
|
|
1913
|
+
this.formTitle = this.builderFormGroup.controls.formTitle.value;
|
|
1914
|
+
}
|
|
1048
1915
|
var finalFields = JSON.parse(JSON.stringify(this.formElementsDropList));
|
|
1049
1916
|
finalFields = finalFields.map(function (item) {
|
|
1917
|
+
item = kwikidToolkit.setMissingKeyValue(item, "type", item.elementType);
|
|
1050
1918
|
if (item.elementType.startsWith("NA<>", 0)) {
|
|
1051
1919
|
delete item.elementId;
|
|
1052
1920
|
delete item.elementType;
|
|
@@ -1060,79 +1928,83 @@
|
|
|
1060
1928
|
delete item.elementTitle;
|
|
1061
1929
|
delete item.elementCategory;
|
|
1062
1930
|
delete item.isElement;
|
|
1063
|
-
if (item
|
|
1064
|
-
item.default
|
|
1065
|
-
value
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
{
|
|
1070
|
-
key: "OBJECT",
|
|
1071
|
-
props: {
|
|
1072
|
-
object: {
|
|
1073
|
-
key: "ALL_FORMS_DATA",
|
|
1074
|
-
path: String("$." + _this.formKey + "." + item.key)
|
|
1075
|
-
}
|
|
1076
|
-
},
|
|
1931
|
+
if (kwikidToolkit.checkObjectKeyExists(item, "default")) {
|
|
1932
|
+
if (kwikidToolkit.checkObjectKeyExists(item.default, "value")) {
|
|
1933
|
+
if (item.default.value) {
|
|
1934
|
+
item.default = {
|
|
1935
|
+
value: {
|
|
1936
|
+
is_found: false,
|
|
1077
1937
|
value: "",
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1938
|
+
sources: [
|
|
1939
|
+
{
|
|
1940
|
+
key: "OBJECT",
|
|
1941
|
+
props: {
|
|
1942
|
+
object: {
|
|
1943
|
+
key: "ALL_FORMS_DATA",
|
|
1944
|
+
path: String("$." + _this.formKey + "." + item.key)
|
|
1945
|
+
}
|
|
1946
|
+
},
|
|
1947
|
+
value: "",
|
|
1948
|
+
validation: {
|
|
1949
|
+
is_valid: false,
|
|
1950
|
+
triggers: ["ON_INIT"],
|
|
1951
|
+
rules: [
|
|
1952
|
+
{
|
|
1953
|
+
id: "1",
|
|
1954
|
+
key: "VALUE_CHECK",
|
|
1955
|
+
props: {
|
|
1956
|
+
value: {
|
|
1957
|
+
source: {
|
|
1958
|
+
key: "OBJECT",
|
|
1959
|
+
props: {
|
|
1960
|
+
object: {
|
|
1961
|
+
key: "ALL_FORMS_DATA",
|
|
1962
|
+
path: String("$." + _this.formKey + "." + item.key)
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1093
1965
|
}
|
|
1094
|
-
}
|
|
1966
|
+
},
|
|
1967
|
+
pattern: { key: "IS_NOT_EMPTY" }
|
|
1095
1968
|
}
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
path: String("$." + _this.formKey + "." + item.key)
|
|
1969
|
+
}
|
|
1970
|
+
],
|
|
1971
|
+
actions: [
|
|
1972
|
+
{
|
|
1973
|
+
id: "1",
|
|
1974
|
+
key: "SET_FIELD_DEFAULT_VALUE",
|
|
1975
|
+
condition: "1",
|
|
1976
|
+
props: {
|
|
1977
|
+
fieldKey: String("" + item.key),
|
|
1978
|
+
value: {
|
|
1979
|
+
source: {
|
|
1980
|
+
key: "OBJECT",
|
|
1981
|
+
props: {
|
|
1982
|
+
object: {
|
|
1983
|
+
key: "ALL_FORMS_DATA",
|
|
1984
|
+
path: String("$." + _this.formKey + "." + item.key)
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1115
1987
|
}
|
|
1116
1988
|
}
|
|
1117
1989
|
}
|
|
1118
1990
|
}
|
|
1119
|
-
|
|
1991
|
+
]
|
|
1120
1992
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1993
|
+
}
|
|
1994
|
+
]
|
|
1123
1995
|
}
|
|
1124
|
-
|
|
1996
|
+
};
|
|
1125
1997
|
}
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1998
|
+
else {
|
|
1999
|
+
item.default = {
|
|
2000
|
+
value: {
|
|
2001
|
+
is_found: false,
|
|
2002
|
+
value: "",
|
|
2003
|
+
sources: []
|
|
2004
|
+
}
|
|
2005
|
+
};
|
|
1134
2006
|
}
|
|
1135
|
-
}
|
|
2007
|
+
}
|
|
1136
2008
|
}
|
|
1137
2009
|
return item;
|
|
1138
2010
|
});
|
|
@@ -1147,13 +2019,21 @@
|
|
|
1147
2019
|
title: this.formTitle,
|
|
1148
2020
|
fields: this.formElementsDropList
|
|
1149
2021
|
}));
|
|
2022
|
+
this.finalJSONConfig = finalFormConfig;
|
|
1150
2023
|
console.log(finalFormConfig);
|
|
1151
2024
|
console.log(this.formElementsDropList);
|
|
1152
2025
|
};
|
|
2026
|
+
KwikIDFormsBuilderComponent.prototype.copyToClipboard = function () {
|
|
2027
|
+
navigator.clipboard.writeText(JSON.stringify(this.finalJSONConfig));
|
|
2028
|
+
alert("JSON Config is copied");
|
|
2029
|
+
};
|
|
2030
|
+
KwikIDFormsBuilderComponent.prototype.closeJSONPopup = function () {
|
|
2031
|
+
this.finalJSONConfig = undefined;
|
|
2032
|
+
};
|
|
1153
2033
|
return KwikIDFormsBuilderComponent;
|
|
1154
2034
|
}());
|
|
1155
2035
|
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsBuilderComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1156
|
-
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0__namespace, template: "<div class=\"container\">\n <div class=\"wrapper\">\n <div class=\"builder-header\">\n <div class=\"builder-title\">KwikID Form Builder</div>\n <form\n [formGroup]=\"builderFormGroup\"\n class=\"builder-form\"\n >\n <kwikui-input\n [label]=\"'Form Key'\"\n [id]=\"'form_key'\"\n [type]=\"'text'\"\n [formControlName]=\"'formKey'\"\n [formControl]=\"builderFormGroup.controls['formKey']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter a Form Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'upper'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-input\n [label]=\"'Form Title'\"\n [id]=\"'form_title'\"\n [type]=\"'text'\"\n [formControlName]=\"'formTitle'\"\n [formControl]=\"builderFormGroup.controls['formTitle']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter a Form Title'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-button\n [disabled]=\"builderFormGroup.valid\"\n id=\"save_form_btn\"\n label=\"Save Form\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"'rounded'\"\n size=\"m\"\n (onClick)=\"handleOnClickSaveForms($event)\"\n ></kwikui-button>\n </form>\n </div>\n <div class=\"builder-body\">\n <div class=\"form-elements-drag-wrapper\">\n <div\n class=\"form-elements-drag\"\n cdkDropList\n [cdkDropListData]=\"formElementsDragList\"\n cdkDropListSortingDisabled\n [cdkDropListConnectedTo]=\"[formElementsList]\"\n (cdkDropListExited)=\"exit($event, 'other')\"\n (cdkDropListEntered)=\"enter($event, 'other')\"\n >\n <ng-container\n *ngFor=\"let formElementDragItem of formElementsDragList\"\n >\n <ng-container *ngIf=\"formElementDragItem.isElement\">\n <div\n class=\"form-element-drag\"\n cdkDrag\n [cdkDragData]=\"formElementDragItem\"\n >\n ⋮⋮ {{ formElementDragItem.elementTitle }}\n <!-- <ng-container *ngComponentOutlet=\"formElementDragItem.component\"></ng-container> -->\n </div>\n <div\n class=\"form-element-drag\"\n *cdkDragPlaceholder\n >\n {{ formElementDragItem.elementTitle }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"!formElementDragItem.isElement\">\n <div class=\"form-element-category\">\n {{ formElementDragItem.elementTitle }}\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div\n class=\"form-elements-drop-wrapper\"\n cdkDropList\n #formElementsList=\"cdkDropList\"\n [cdkDropListData]=\"formElementsDropList\"\n (cdkDropListDropped)=\"drop($event, '')\"\n [cdkDropListEnterPredicate]=\"isElementPredicate\"\n >\n <ng-container\n *ngFor=\"\n let formElementDropItem of formElementsDropList;\n let idx = index\n \"\n >\n <div\n class=\"form-drop-element\"\n cdkDrag\n >\n <div class=\"form-drop-element-grab-symbol\">⋮⋮</div>\n <div class=\"form-drop-element-main\">\n <div class=\"form-drop-element-header\">\n <div class=\"form-drop-element-title\">\n {{ formElementDropItem.elementTitle }}\n </div>\n <div class=\"form-drop-element-actions\">\n <kwikui-button-icon\n [disabled]=\"false\"\n [id]=\"'edit-element'\"\n [showLoader]=\"false\"\n [styles]=\"\"\n [class]=\"\"\n [type]=\"'button'\"\n [appearance]=\"'secondary'\"\n [icon]=\"'tuiIconEdit'\"\n [shape]=\"'rounded'\"\n [size]=\"'s'\"\n (onClick)=\"editElement(idx, formElementDropItem)\"\n ></kwikui-button-icon>\n <kwikui-button-icon\n [disabled]=\"false\"\n [id]=\"'remove-element'\"\n [showLoader]=\"false\"\n [styles]=\"\"\n [class]=\"\"\n [type]=\"'button'\"\n [appearance]=\"'accent'\"\n [icon]=\"'tuiIconCloseLarge'\"\n [shape]=\"'rounded'\"\n [size]=\"'s'\"\n (onClick)=\"removeElement(idx, formElementDropItem)\"\n ></kwikui-button-icon>\n <!-- <button\n (click)=\"editElement(idx, formElementDropItem)\"\n title=\"edit element properties\"\n >\n ✎\n </button>\n <button\n (click)=\"removeElement(idx, formElementDropItem)\"\n title=\"delete element\"\n >\n ✖\n </button> -->\n </div>\n </div>\n <div class=\"form-drop-element-body\"> </div>\n <div class=\"form-drop-element-footer\">\n <div class=\"form-drop-element-id\">\n {{ formElementDropItem.elementId }}\n </div>\n <div class=\"form-drop-element-category\">\n {{ formElementDropItem.elementCategory }}\n </div>\n <div class=\"form-drop-element-type\">\n {{ formElementDropItem.elementType }}\n </div>\n </div>\n <div\n class=\"example-custom-placeholder\"\n *cdkDragPlaceholder\n ></div>\n <!-- <ng-container *ngComponentOutlet=\"formElementDropItem.component\"> </ng-container> -->\n <!-- <ng-container *ngTemplateOutlet=\"formModal; context: formElementDropItem\"></ng-container> -->\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"element-property-editor-wrapper\">\n <element-config-editor\n [elementConfig]=\"elementEditorElementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></element-config-editor>\n </div>\n </div>\n <div class=\"builder-footer\"> © Baiju Dodhia, KwikID </div>\n </div>\n</div>\n", styles: ["kwikid-forms-builder button{align-content:center;align-items:center;background:black;border-color:transparent;box-shadow:0 2px 10px -6px #000;border-radius:1rem;color:#fff;cursor:pointer;display:flex;flex-direction:row;justify-content:center;padding:.5rem;transform:scale(1);transition:.05s ease-in}kwikid-forms-builder button:hover{box-shadow:0 2px 10px -5px #000}kwikid-forms-builder button:active{transform:scale(.98);transition:.05s ease-out}kwikid-forms-builder fieldset{display:flex;flex-direction:column;justify-content:center;align-items:stretch;align-content:center;grid-gap:.5rem;gap:.5rem;padding:.5rem 1rem 1rem;box-shadow:0 2px 10px -6px #000;border:1px solid gray}kwikid-forms-builder input,kwikid-forms-builder select{flex:1;width:100%;border:1px solid black;outline:none;padding:.25rem;overflow-x:auto}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}\n", ":host{all:unset;position:relative;width:100%;height:100%}.container{width:100%;height:100%;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.container .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.container .wrapper .builder-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:max-content;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.container .wrapper .builder-header .builder-title{font-weight:bold;display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center}.container .wrapper .builder-header .builder-form{display:flex;align-content:center;justify-content:flex-end;flex:1;flex-direction:row;align-items:center;grid-gap:1rem;gap:1rem;width:100%}.container .wrapper .builder-header .builder-form kwikui-input{width:16rem}.container .wrapper .builder-body{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:stretch;grid-gap:1rem;gap:1rem;flex:1;padding:1rem;overflow:auto}.container .wrapper .builder-body>*{width:100%;border:1px solid lightgray;overflow:auto;box-shadow:0 2px 10px -6px #000}.container .wrapper .builder-body .form-elements-drag-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;padding:1rem;min-width:16rem;max-width:16rem}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;border-bottom:none}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag .form-element-drag{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:1rem;gap:1rem;border:1px solid lightgray;padding:1rem;cursor:grab;box-shadow:0 2px 10px -6px #000;text-transform:capitalize}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag .form-element-category{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:1rem;gap:1rem;border-left:.25rem solid blue;padding:.5rem;background:lightblue}.container .wrapper .builder-body .form-elements-drop-wrapper{padding:1rem;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;min-width:20rem;max-width:28rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder{display:flex;justify-content:flex-start;justify-items:start;align-items:center;padding:1rem;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000;cursor:grab;flex-direction:row;position:relative;grid-gap:1rem;gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main{flex:1;display:flex;justify-content:space-between;justify-items:start;align-items:stretch;flex-direction:column;width:100%;grid-gap:.5rem;gap:.5rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button{width:1.6rem;height:1.6rem;transform:rotate(90deg)!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:first-child,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:first-child{background-color:#dc143c!important;color:#fff!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:last-child,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:last-child{background-color:gray!important;color:#fff!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-body,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-body{border-top:1px dashed lightgray;border-bottom:1px dashed lightgray}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:.5rem;gap:.5rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-id,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-id{background:orange;padding:0 5px;border-radius:1rem;color:#fff}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-category,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-category{background:blue;padding:0 5px;border-radius:1rem;color:#fff}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-type,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-type{background:green;padding:0 5px;border-radius:1rem;color:#fff}.container .wrapper .builder-body .element-property-editor-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;padding:1rem;min-width:20rem;grid-gap:1rem;gap:1rem}.container .wrapper .builder-footer{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:30px;border:1px solid lightgray;box-shadow:0 -2px 10px -6px #000;font-weight:bold}.cdk-drag-preview{width:-moz-fit-content;width:fit-content;height:auto;box-sizing:border-box;background-color:transparent;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;cursor:grabbing}.cdk-drag-placeholder{opacity:1}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], components: [{ type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: ElementConfigEditor, selector: "element-config-editor", inputs: ["formKey", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i4__namespace.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
2036
|
+
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0__namespace, template: "<div class=\"container\">\n <div class=\"wrapper\">\n <div class=\"builder-header\">\n <div class=\"builder-title\">KwikID Form Builder</div>\n <form\n [formGroup]=\"builderFormGroup\"\n class=\"builder-form\"\n >\n <kwikui-input\n [label]=\"'Form Key'\"\n [id]=\"'form_key'\"\n [type]=\"'text'\"\n [formControlName]=\"'formKey'\"\n [formControl]=\"builderFormGroup.controls['formKey']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter a Form Key'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'upper'\"\n size=\"m\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-input\n [label]=\"'Form Title'\"\n [id]=\"'form_title'\"\n [type]=\"'text'\"\n [formControlName]=\"'formTitle'\"\n [formControl]=\"builderFormGroup.controls['formTitle']\"\n [disabled]=\"false\"\n [placeholder]=\"'Please enter a Form Title'\"\n [focus]=\"false\"\n [invalid]=\"false\"\n [case]=\"'default'\"\n size=\"m\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-button\n [disabled]=\"!builderFormGroup.valid\"\n id=\"save_form_btn\"\n label=\"Save Form\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n size=\"m\"\n (onClick)=\"handleOnClickSaveForms($event)\"\n ></kwikui-button>\n </form>\n </div>\n <div class=\"builder-body\">\n <div class=\"form-elements-drag-wrapper\">\n <div\n class=\"form-elements-drag\"\n cdkDropList\n [cdkDropListData]=\"formElementsDragList\"\n cdkDropListSortingDisabled\n [cdkDropListConnectedTo]=\"[formElementsList]\"\n (cdkDropListExited)=\"exit($event, 'other')\"\n (cdkDropListEntered)=\"enter($event, 'other')\"\n >\n <ng-container\n *ngFor=\"let formElementDragItem of formElementsDragList\"\n >\n <ng-container *ngIf=\"formElementDragItem.isElement\">\n <div\n class=\"form-element-drag\"\n cdkDrag\n [cdkDragData]=\"formElementDragItem\"\n >\n ⋮⋮ {{ formElementDragItem.elementTitle }}\n <!-- <ng-container *ngComponentOutlet=\"formElementDragItem.component\"></ng-container> -->\n </div>\n <div\n class=\"form-element-drag\"\n *cdkDragPlaceholder\n >\n {{ formElementDragItem.elementTitle }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"!formElementDragItem.isElement\">\n <div class=\"form-element-category\">\n {{ formElementDragItem.elementTitle }}\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div\n class=\"form-elements-drop-wrapper\"\n cdkDropList\n #formElementsList=\"cdkDropList\"\n [cdkDropListData]=\"formElementsDropList\"\n (cdkDropListDropped)=\"drop($event, '')\"\n [cdkDropListEnterPredicate]=\"isElementPredicate\"\n >\n <ng-container\n *ngFor=\"\n let formElementDropItem of formElementsDropList;\n let idx = index\n \"\n >\n <div\n class=\"form-drop-element\"\n cdkDrag\n >\n <div class=\"form-drop-element-grab-symbol\">⋮⋮</div>\n <div class=\"form-drop-element-main\">\n <div class=\"form-drop-element-header\">\n <div class=\"form-drop-element-title\">\n {{ formElementDropItem.elementTitle }}\n </div>\n <div class=\"form-drop-element-actions\">\n <kwikui-button-icon\n [disabled]=\"false\"\n [id]=\"'edit-element'\"\n [showLoader]=\"false\"\n [styles]=\"\"\n [class]=\"\"\n [type]=\"'button'\"\n [appearance]=\"'secondary'\"\n [icon]=\"'tuiIconEdit'\"\n [shape]=\"'rounded'\"\n [size]=\"'s'\"\n (onClick)=\"editElement(idx, formElementDropItem)\"\n ></kwikui-button-icon>\n <kwikui-button-icon\n [disabled]=\"false\"\n [id]=\"'remove-element'\"\n [showLoader]=\"false\"\n [styles]=\"\"\n [class]=\"\"\n [type]=\"'button'\"\n [appearance]=\"'accent'\"\n [icon]=\"'tuiIconCloseLarge'\"\n [shape]=\"'rounded'\"\n [size]=\"'s'\"\n (onClick)=\"removeElement(idx, formElementDropItem)\"\n ></kwikui-button-icon>\n <!-- <button\n (click)=\"editElement(idx, formElementDropItem)\"\n title=\"edit element properties\"\n >\n ✎\n </button>\n <button\n (click)=\"removeElement(idx, formElementDropItem)\"\n title=\"delete element\"\n >\n ✖\n </button> -->\n </div>\n </div>\n <div class=\"form-drop-element-body\"> </div>\n <div class=\"form-drop-element-footer\">\n <div class=\"form-drop-element-id\">\n {{ formElementDropItem.elementId }}\n </div>\n <div class=\"form-drop-element-category\">\n {{ formElementDropItem.elementCategory }}\n </div>\n <div class=\"form-drop-element-type\">\n {{ formElementDropItem.elementType }}\n </div>\n </div>\n <div\n class=\"example-custom-placeholder\"\n *cdkDragPlaceholder\n ></div>\n <!-- <ng-container *ngComponentOutlet=\"formElementDropItem.component\"> </ng-container> -->\n <!-- <ng-container *ngTemplateOutlet=\"formModal; context: formElementDropItem\"></ng-container> -->\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"element-property-editor-wrapper\">\n <element-config-editor\n [elementConfig]=\"elementEditorElementConfig\"\n (updateElement)=\"handleOnSaveUpdateElement($event)\"\n ></element-config-editor>\n </div>\n </div>\n <div class=\"builder-footer\"> © Baiju Dodhia, KwikID </div>\n </div>\n <div\n class=\"modal\"\n *ngIf=\"finalJSONConfig\"\n >\n <div class=\"modal-box\">\n <div class=\"modal-content\">\n <div class=\"modal-heading\">\n <div class=\"modal-title\">{{ formTitle }}</div>\n <div class=\"modal-actions\">\n <div\n class=\"modal-code-copy\"\n (click)=\"copyToClipboard()\"\n >Copy to Clipboard</div\n >\n <div\n class=\"modal-close\"\n (click)=\"closeJSONPopup()\"\n >\n Close\n </div>\n </div>\n </div>\n <pre>\n <code>{{JSON.stringify(finalJSONConfig, undefined, 2)}}</code>\n </pre>\n </div>\n </div>\n </div>\n</div>\n", styles: ["kwikid-forms-builder fieldset{display:flex;flex-direction:column;justify-content:center;align-items:stretch;align-content:center;grid-gap:.5rem;gap:.5rem;padding:.5rem 1rem 1rem;box-shadow:0 0 10px -6px #000;border:0px solid gray;border-radius:1rem}kwikid-forms-builder table,kwikid-forms-builder tr,kwikid-forms-builder td{border:1px solid black;padding:.5rem 1rem}kwikui-table table{width:100%;box-shadow:0 0 10px -6px #000;border:0px solid gray;padding:0}\n", ":host{all:unset;position:relative;width:100%;height:100%}.container{width:100%;height:100%;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.container .wrapper{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:space-between;align-items:stretch}.container .wrapper .builder-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:max-content;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.container .wrapper .builder-header .builder-title{font-weight:bold;display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;font-size:1rem}.container .wrapper .builder-header .builder-form{display:flex;align-content:center;justify-content:flex-end;flex:1;flex-direction:row;align-items:center;grid-gap:1rem;gap:1rem;width:100%}.container .wrapper .builder-header .builder-form kwikui-input{width:16rem}.container .wrapper .builder-body{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:stretch;grid-gap:1rem;gap:1rem;flex:1;padding:1rem;overflow:auto}.container .wrapper .builder-body>*{width:100%;border:1px solid lightgray;overflow:auto;box-shadow:0 2px 10px -6px #000}.container .wrapper .builder-body .form-elements-drag-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;padding:1rem;min-width:16rem;max-width:16rem}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;border-bottom:none}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag .form-element-drag{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:1rem;gap:1rem;border-radius:.5rem;padding:1rem;cursor:grab;box-shadow:0 2px 10px -6px #000;text-transform:capitalize}.container .wrapper .builder-body .form-elements-drag-wrapper .form-elements-drag .form-element-category{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:1rem;gap:1rem;border-left:.25rem solid var(--tui-primary);padding:1rem;background:var(--tui-secondary)}.container .wrapper .builder-body .form-elements-drop-wrapper{padding:1rem;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-gap:1rem;gap:1rem;min-width:20rem;max-width:28rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder{display:flex;justify-content:flex-start;justify-items:start;align-items:center;padding:1rem;border-radius:1rem;box-shadow:0 2px 10px -6px #000;cursor:grab;flex-direction:row;position:relative;grid-gap:1rem;gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main{flex:1;display:flex;justify-content:space-between;justify-items:start;align-items:stretch;flex-direction:column;width:100%;grid-gap:.5rem;gap:.5rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:1rem;column-gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;gap:1rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button{width:1.6rem;height:1.6rem;transform:rotate(90deg)!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:first-child,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:first-child{background-color:#dc143c!important;color:#fff!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:last-child,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-header .form-drop-element-actions button:last-child{background-color:gray!important;color:#fff!important}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-body,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-body{border-top:1px dashed lightgray;border-bottom:1px dashed lightgray}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center;grid-gap:.5rem;gap:.5rem}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-id,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-id{background:var(--tui-secondary);padding:0 .3rem;border-radius:1rem;color:var(--tui-primary)}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-category,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-category{background:var(--tui-primary);padding:0 .3rem;border-radius:1rem;color:#fff}.container .wrapper .builder-body .form-elements-drop-wrapper .form-drop-element .form-drop-element-main .form-drop-element-footer .form-drop-element-type,.container .wrapper .builder-body .form-elements-drop-wrapper .cdk-drag-placeholder .form-drop-element-main .form-drop-element-footer .form-drop-element-type{background:var(--tui-positive);padding:0 .3rem;border-radius:1rem;color:#fff}.container .wrapper .builder-body .element-property-editor-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;padding:1rem;min-width:20rem;grid-gap:1rem;gap:1rem}.container .wrapper .builder-footer{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:1rem;column-gap:1rem;padding:1rem;max-height:30px;border:1px solid lightgray;box-shadow:0 -2px 10px -6px #000;font-weight:bold}.cdk-drag-preview{width:-moz-fit-content;width:fit-content;height:auto;box-sizing:border-box;background-color:transparent;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;cursor:grabbing}.cdk-drag-placeholder{opacity:1}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}.modal{position:absolute;background-color:#0000004d;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-box{width:75%;height:75%;margin:auto;background-color:#fff;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.modal-content{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:center;width:100%;height:100%}.modal-heading{padding:1rem;width:100%;display:flex;flex-direction:row;justify-content:space-between;border:1px solid lightgray;box-shadow:0 2px 10px -6px #000}.modal-title{font-weight:bold;font-size:1rem}.modal-actions{display:flex;flex-direction:row;grid-gap:1rem;gap:1rem;cursor:pointer}pre{float:left;justify-content:center;width:100%;height:100%;box-sizing:border-box;overflow:auto}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIButtonIconComponent, selector: "kwikui-button-icon", inputs: ["disabled", "id", "showLoader", "styles", "class", "type", "appearance", "icon", "shape", "size"], outputs: ["onClick"] }, { type: ElementConfigEditor, selector: "element-config-editor", inputs: ["formKey", "elementConfig"], outputs: ["updateElement"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i4__namespace.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
1157
2037
|
__decorate([
|
|
1158
2038
|
kwikidToolkit.logMethod
|
|
1159
2039
|
], KwikIDFormsBuilderComponent.prototype, "handleGetKeyValue", null);
|
|
@@ -1731,6 +2611,7 @@
|
|
|
1731
2611
|
return object;
|
|
1732
2612
|
};
|
|
1733
2613
|
var formatFieldKeys = function (field) {
|
|
2614
|
+
field = kwikidToolkit.setMissingKeyValue(field, "disabled", false);
|
|
1734
2615
|
if (kwikidToolkit.checkObjectKeyExists(field, "connectedTo")) {
|
|
1735
2616
|
if (typeof field["connectedTo"] === "string") {
|
|
1736
2617
|
field["connectedElements"] = [
|
|
@@ -2073,7 +2954,6 @@
|
|
|
2073
2954
|
for (var fields_1 = __values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
|
|
2074
2955
|
var field = fields_1_1.value;
|
|
2075
2956
|
field = updateOnFieldType(field);
|
|
2076
|
-
console.log("FIELD", field);
|
|
2077
2957
|
field = formatFieldKeys(field);
|
|
2078
2958
|
fieldGroups = updateFormFieldGroups(fieldGroups, field);
|
|
2079
2959
|
field = updateFieldDefaultValueConfig(field);
|
|
@@ -2340,38 +3220,38 @@
|
|
|
2340
3220
|
if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
|
|
2341
3221
|
kwikidToolkit.checkObjectKeyExists(field.validators, "min") &&
|
|
2342
3222
|
kwikidToolkit.isNotEmptyValue(field.validators.min)) {
|
|
2343
|
-
validators.push(
|
|
3223
|
+
validators.push(i2.Validators.min(field.validators.min));
|
|
2344
3224
|
}
|
|
2345
3225
|
if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
|
|
2346
3226
|
kwikidToolkit.checkObjectKeyExists(field.validators, "max") &&
|
|
2347
3227
|
kwikidToolkit.isNotEmptyValue(field.validators.max)) {
|
|
2348
|
-
validators.push(
|
|
3228
|
+
validators.push(i2.Validators.max(field.validators.max));
|
|
2349
3229
|
}
|
|
2350
3230
|
if ((kwikidToolkit.checkObjectKeyExists(field, "required") && field.required) ||
|
|
2351
3231
|
(kwikidToolkit.checkObjectKeyExists(field, "validators") &&
|
|
2352
3232
|
kwikidToolkit.checkObjectKeyExists(field.validators, "required") &&
|
|
2353
3233
|
field.validators.required)) {
|
|
2354
|
-
validators.push(
|
|
3234
|
+
validators.push(i2.Validators.required);
|
|
2355
3235
|
}
|
|
2356
3236
|
if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
|
|
2357
3237
|
kwikidToolkit.checkObjectKeyExists(field.validators, "minLength") &&
|
|
2358
3238
|
kwikidToolkit.isNotEmptyValue(field.validators.minLength)) {
|
|
2359
|
-
validators.push(
|
|
3239
|
+
validators.push(i2.Validators.minLength(field.validators.minLength));
|
|
2360
3240
|
}
|
|
2361
3241
|
if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
|
|
2362
3242
|
kwikidToolkit.checkObjectKeyExists(field.validators, "maxLength") &&
|
|
2363
3243
|
kwikidToolkit.isNotEmptyValue(field.validators.maxLength)) {
|
|
2364
|
-
validators.push(
|
|
3244
|
+
validators.push(i2.Validators.maxLength(field.validators.maxLength));
|
|
2365
3245
|
}
|
|
2366
3246
|
if (kwikidToolkit.checkObjectKeyExists(field, "validators") &&
|
|
2367
3247
|
kwikidToolkit.checkObjectKeyExists(field.validators, "pattern") &&
|
|
2368
3248
|
kwikidToolkit.isNotEmptyValue(field.validators.pattern)) {
|
|
2369
3249
|
if (kwikidToolkit.checkObjectKeyExists(field.validators.pattern, "key")) {
|
|
2370
3250
|
if (field.validators.pattern.key === "CUSTOM") {
|
|
2371
|
-
validators.push(
|
|
3251
|
+
validators.push(i2.Validators.pattern(field.validators.pattern.pattern));
|
|
2372
3252
|
}
|
|
2373
3253
|
else {
|
|
2374
|
-
validators.push(
|
|
3254
|
+
validators.push(i2.Validators.pattern(kwikidToolkit.PATTERNS[field.validators.pattern.key]));
|
|
2375
3255
|
}
|
|
2376
3256
|
}
|
|
2377
3257
|
}
|
|
@@ -2412,10 +3292,10 @@
|
|
|
2412
3292
|
invalid: false
|
|
2413
3293
|
});
|
|
2414
3294
|
}
|
|
2415
|
-
if (control instanceof
|
|
3295
|
+
if (control instanceof i2.FormGroup) {
|
|
2416
3296
|
recursiveFunc(control);
|
|
2417
3297
|
}
|
|
2418
|
-
else if (control instanceof
|
|
3298
|
+
else if (control instanceof i2.FormArray) {
|
|
2419
3299
|
recursiveFunc(control);
|
|
2420
3300
|
}
|
|
2421
3301
|
});
|
|
@@ -2446,7 +3326,7 @@
|
|
|
2446
3326
|
return __generator(this, function (_b) {
|
|
2447
3327
|
switch (_b.label) {
|
|
2448
3328
|
case 0:
|
|
2449
|
-
formGroup = new
|
|
3329
|
+
formGroup = new i2.FormGroup({});
|
|
2450
3330
|
_b.label = 1;
|
|
2451
3331
|
case 1:
|
|
2452
3332
|
_b.trys.push([1, 8, 9, 10]);
|
|
@@ -2470,7 +3350,7 @@
|
|
|
2470
3350
|
case 5:
|
|
2471
3351
|
value = convertFormFieldValueToKwikUIFormat(field, value);
|
|
2472
3352
|
validators = new FormValidation().getFormFieldValidators(field);
|
|
2473
|
-
formGroup.addControl(field.key, new
|
|
3353
|
+
formGroup.addControl(field.key, new i2.FormControl({ value: value, disabled: field.disabled }, { validators: validators }));
|
|
2474
3354
|
_b.label = 6;
|
|
2475
3355
|
case 6:
|
|
2476
3356
|
fields_1_1 = fields_1.next();
|
|
@@ -2650,7 +3530,7 @@
|
|
|
2650
3530
|
});
|
|
2651
3531
|
};
|
|
2652
3532
|
Apis.prototype.validateRequestBody = function () {
|
|
2653
|
-
var _a;
|
|
3533
|
+
var _a, _b, _c, _d;
|
|
2654
3534
|
return __awaiter(this, void 0, void 0, function () {
|
|
2655
3535
|
var body, validation, triggers, rules, actions, rulesMapping, actions_3, actions_3_1, action, conditionSuccess, actions_4, e_4_1;
|
|
2656
3536
|
var e_4, _e;
|
|
@@ -2661,9 +3541,9 @@
|
|
|
2661
3541
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.body, "validation")) return [3 /*break*/, 9];
|
|
2662
3542
|
body = this._request.body;
|
|
2663
3543
|
validation = body.validation;
|
|
2664
|
-
triggers = validation.triggers;
|
|
2665
|
-
rules = validation.rules;
|
|
2666
|
-
actions = (
|
|
3544
|
+
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3545
|
+
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3546
|
+
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2667
3547
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
2668
3548
|
_f.label = 1;
|
|
2669
3549
|
case 1:
|
|
@@ -2815,7 +3695,7 @@
|
|
|
2815
3695
|
});
|
|
2816
3696
|
};
|
|
2817
3697
|
Apis.prototype.validateRequestHeaders = function () {
|
|
2818
|
-
var _a;
|
|
3698
|
+
var _a, _b, _c, _d;
|
|
2819
3699
|
return __awaiter(this, void 0, void 0, function () {
|
|
2820
3700
|
var headers, validation, triggers, rules, actions, rulesMapping, actions_7, actions_7_1, action, conditionSuccess, actions_8, e_8_1;
|
|
2821
3701
|
var e_8, _e;
|
|
@@ -2826,9 +3706,9 @@
|
|
|
2826
3706
|
if (!kwikidToolkit.checkObjectKeyExists(this._request, "headers")) return [3 /*break*/, 11];
|
|
2827
3707
|
if (!kwikidToolkit.checkObjectKeyExists(this._request.headers, "validation")) return [3 /*break*/, 9];
|
|
2828
3708
|
validation = headers.validation;
|
|
2829
|
-
triggers = validation.triggers;
|
|
2830
|
-
rules = validation.rules;
|
|
2831
|
-
actions = (
|
|
3709
|
+
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3710
|
+
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3711
|
+
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2832
3712
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
2833
3713
|
_f.label = 1;
|
|
2834
3714
|
case 1:
|
|
@@ -2869,6 +3749,7 @@
|
|
|
2869
3749
|
});
|
|
2870
3750
|
};
|
|
2871
3751
|
Apis.prototype.validateResponse = function () {
|
|
3752
|
+
var _a, _b, _c, _d;
|
|
2872
3753
|
return __awaiter(this, void 0, void 0, function () {
|
|
2873
3754
|
var validation, triggers, rules, actions, rulesMapping, actions_9, actions_9_1, action, conditionSuccess, actions_10, e_9_1;
|
|
2874
3755
|
var e_9, _e;
|
|
@@ -2877,9 +3758,9 @@
|
|
|
2877
3758
|
case 0:
|
|
2878
3759
|
if (!kwikidToolkit.checkObjectKeyExists(this._response, "validation")) return [3 /*break*/, 8];
|
|
2879
3760
|
validation = this._response.validation;
|
|
2880
|
-
triggers = validation.triggers;
|
|
2881
|
-
rules = validation.rules;
|
|
2882
|
-
actions = validation.actions;
|
|
3761
|
+
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3762
|
+
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3763
|
+
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2883
3764
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
2884
3765
|
_f.label = 1;
|
|
2885
3766
|
case 1:
|
|
@@ -2916,15 +3797,16 @@
|
|
|
2916
3797
|
});
|
|
2917
3798
|
};
|
|
2918
3799
|
Apis.prototype.callNextApi = function (validation) {
|
|
2919
|
-
var _a;
|
|
3800
|
+
var _a, _b, _c, _d;
|
|
2920
3801
|
return __awaiter(this, void 0, void 0, function () {
|
|
2921
|
-
var rules, actions, rulesMapping, actions_11, actions_11_1, action, conditionSuccess, actions_12, e_10_1;
|
|
3802
|
+
var triggers, rules, actions, rulesMapping, actions_11, actions_11_1, action, conditionSuccess, actions_12, e_10_1;
|
|
2922
3803
|
var e_10, _e;
|
|
2923
3804
|
return __generator(this, function (_f) {
|
|
2924
3805
|
switch (_f.label) {
|
|
2925
3806
|
case 0:
|
|
2926
|
-
|
|
2927
|
-
|
|
3807
|
+
triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
3808
|
+
rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
3809
|
+
actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2928
3810
|
rulesMapping = new kwikidToolkit.Rule(rules, this._object).mapping();
|
|
2929
3811
|
_f.label = 1;
|
|
2930
3812
|
case 1:
|
|
@@ -3028,7 +3910,7 @@
|
|
|
3028
3910
|
disabled: false,
|
|
3029
3911
|
showLoader: false
|
|
3030
3912
|
};
|
|
3031
|
-
this.formGroup = new
|
|
3913
|
+
this.formGroup = new i2.FormGroup({});
|
|
3032
3914
|
this.showErrorNotification = false;
|
|
3033
3915
|
}
|
|
3034
3916
|
KwikIDFormViewComponent.prototype.ngOnInit = function () {
|
|
@@ -3450,68 +4332,86 @@
|
|
|
3450
4332
|
}
|
|
3451
4333
|
};
|
|
3452
4334
|
KwikIDFormViewComponent.prototype.handleOnClickResetFormFields = function (e, field) {
|
|
4335
|
+
var _a;
|
|
3453
4336
|
return __awaiter(this, void 0, void 0, function () {
|
|
3454
|
-
var
|
|
3455
|
-
var
|
|
3456
|
-
return __generator(this, function (
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
_p.label
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
4337
|
+
var resetFormFields, BYPASS_RESET_CONFIRM, CONFIRM_RESET;
|
|
4338
|
+
var _this = this;
|
|
4339
|
+
return __generator(this, function (_h) {
|
|
4340
|
+
resetFormFields = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4341
|
+
var _h, _j, f, _k, _l, action, resetField, actions, e_7_1, e_8_1;
|
|
4342
|
+
var e_8, _m, e_7, _o;
|
|
4343
|
+
return __generator(this, function (_p) {
|
|
4344
|
+
switch (_p.label) {
|
|
4345
|
+
case 0:
|
|
4346
|
+
_p.trys.push([0, 11, 12, 13]);
|
|
4347
|
+
_h = __values(field.reset.fields), _j = _h.next();
|
|
4348
|
+
_p.label = 1;
|
|
4349
|
+
case 1:
|
|
4350
|
+
if (!!_j.done) return [3 /*break*/, 10];
|
|
4351
|
+
f = _j.value;
|
|
4352
|
+
_p.label = 2;
|
|
4353
|
+
case 2:
|
|
4354
|
+
_p.trys.push([2, 7, 8, 9]);
|
|
4355
|
+
_k = (e_7 = void 0, __values(f.actions)), _l = _k.next();
|
|
4356
|
+
_p.label = 3;
|
|
4357
|
+
case 3:
|
|
4358
|
+
if (!!_l.done) return [3 /*break*/, 6];
|
|
4359
|
+
action = _l.value;
|
|
4360
|
+
resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
4361
|
+
actions = new kwikidToolkit.Action(action, {}, {
|
|
4362
|
+
FIELD_CONFIG: resetField,
|
|
4363
|
+
FORM_FIELDS: this.formFields,
|
|
4364
|
+
FORM_DATA: this.formData,
|
|
4365
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4366
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
4367
|
+
}, this.takeAction.bind(this));
|
|
4368
|
+
return [4 /*yield*/, actions.execute()];
|
|
4369
|
+
case 4:
|
|
4370
|
+
_p.sent();
|
|
4371
|
+
_p.label = 5;
|
|
4372
|
+
case 5:
|
|
4373
|
+
_l = _k.next();
|
|
4374
|
+
return [3 /*break*/, 3];
|
|
4375
|
+
case 6: return [3 /*break*/, 9];
|
|
4376
|
+
case 7:
|
|
4377
|
+
e_7_1 = _p.sent();
|
|
4378
|
+
e_7 = { error: e_7_1 };
|
|
4379
|
+
return [3 /*break*/, 9];
|
|
4380
|
+
case 8:
|
|
4381
|
+
try {
|
|
4382
|
+
if (_l && !_l.done && (_o = _k.return)) _o.call(_k);
|
|
4383
|
+
}
|
|
4384
|
+
finally { if (e_7) throw e_7.error; }
|
|
4385
|
+
return [7 /*endfinally*/];
|
|
4386
|
+
case 9:
|
|
4387
|
+
_j = _h.next();
|
|
4388
|
+
return [3 /*break*/, 1];
|
|
4389
|
+
case 10: return [3 /*break*/, 13];
|
|
4390
|
+
case 11:
|
|
4391
|
+
e_8_1 = _p.sent();
|
|
4392
|
+
e_8 = { error: e_8_1 };
|
|
4393
|
+
return [3 /*break*/, 13];
|
|
4394
|
+
case 12:
|
|
4395
|
+
try {
|
|
4396
|
+
if (_j && !_j.done && (_m = _h.return)) _m.call(_h);
|
|
4397
|
+
}
|
|
4398
|
+
finally { if (e_8) throw e_8.error; }
|
|
4399
|
+
return [7 /*endfinally*/];
|
|
4400
|
+
case 13: return [2 /*return*/];
|
|
3510
4401
|
}
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
4402
|
+
});
|
|
4403
|
+
}); };
|
|
4404
|
+
BYPASS_RESET_CONFIRM = (_a = field === null || field === void 0 ? void 0 : field.properties) === null || _a === void 0 ? void 0 : _a.bypassResetConfirmation;
|
|
4405
|
+
if (!BYPASS_RESET_CONFIRM) {
|
|
4406
|
+
CONFIRM_RESET = window.confirm("This action will reset all the fields. Do you still want to continue?");
|
|
4407
|
+
if (CONFIRM_RESET) {
|
|
4408
|
+
resetFormFields();
|
|
4409
|
+
}
|
|
4410
|
+
}
|
|
4411
|
+
else {
|
|
4412
|
+
resetFormFields();
|
|
3514
4413
|
}
|
|
4414
|
+
return [2 /*return*/];
|
|
3515
4415
|
});
|
|
3516
4416
|
});
|
|
3517
4417
|
};
|
|
@@ -3551,7 +4451,7 @@
|
|
|
3551
4451
|
if (!api.request.body.validation.is_valid) return [3 /*break*/, 10];
|
|
3552
4452
|
if (!(api.request.url.hasOwnProperty("type") &&
|
|
3553
4453
|
api.request.url.type === EApiRequestUrlType.MOCK)) return [3 /*break*/, 6];
|
|
3554
|
-
apiCallResponse = api.request.url.props.mockedData
|
|
4454
|
+
apiCallResponse = api.request.url.props.mockedData;
|
|
3555
4455
|
return [3 /*break*/, 9];
|
|
3556
4456
|
case 6:
|
|
3557
4457
|
url = api.request.url.value;
|
|
@@ -3580,6 +4480,8 @@
|
|
|
3580
4480
|
_j[field.key] = apiCallResponse,
|
|
3581
4481
|
_j), { emitEvent: false });
|
|
3582
4482
|
}
|
|
4483
|
+
console.log(api.response);
|
|
4484
|
+
console.log(apiCallResponse);
|
|
3583
4485
|
api.response = kwikidToolkit.setMissingKeyValue(api.response, "value", apiCallResponse);
|
|
3584
4486
|
apis_1 = new Apis({
|
|
3585
4487
|
FIELD_CONFIG: field,
|
|
@@ -4191,8 +5093,8 @@
|
|
|
4191
5093
|
};
|
|
4192
5094
|
return KwikIDFormViewComponent;
|
|
4193
5095
|
}());
|
|
4194
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i4$1.TuiPushService }, { token: i3
|
|
4195
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties.header.title.hidden ||\n !formConfig.properties.header.steps.hidden\n \"\n >\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties.header.title.hidden\"\n >{{ formConfig.properties.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of {{ formConfig.formsListLength }}</div\n >\n <hr\n *ngIf=\"\n !formConfig.properties.header.title.hidden &&\n !formConfig.properties.header.steps.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | safeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox-block\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox-block>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-radio-list\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-radio-list>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\"></span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'dropdown-with-search'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-select-combobox\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-select-combobox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api-call'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n shape=\"null\"\n size=\"m\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.viewFormsButton.label }}\"\n [showLoader]=\"viewFormsButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.saveButton.label }}\"\n [showLoader]=\"saveFormButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n</div>\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-row-gap:1rem;row-gap:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:10px;column-gap:10px}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;grid-row-gap:.5rem;row-gap:.5rem;padding:1rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1em}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-gap:.5rem;gap:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;grid-row-gap:1rem;row-gap:1rem;padding:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}\n"], components: [{ type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i2__namespace.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minCalculatedFromToday", "max", "maxCalculatedFromToday", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2__namespace.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "size", "min", "max", "steps", "quantum", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i2__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }], pipes: { "safeHtml": SafeHtmlPipe$1 } });
|
|
5096
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i4$1.TuiPushService }, { token: i3.TuiAlertService }, { token: KwikIDFormViewService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5097
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties.header.title.hidden ||\n !formConfig.properties.header.steps.hidden\n \"\n >\n <div\n id=\"uf-form-fields-title\"\n *ngIf=\"!formConfig.properties.header.title.hidden\"\n >{{ formConfig.properties.header.title.label }}</div\n >\n <div\n id=\"uf-form-fields-steps\"\n *ngIf=\"!formConfig.properties.header.steps.hidden\"\n >Step {{ formConfig.sequenceNo }} of {{ formConfig.formsListLength }}</div\n >\n <hr\n *ngIf=\"\n !formConfig.properties.header.title.hidden &&\n !formConfig.properties.header.steps.hidden\n \"\n />\n </div>\n <form\n class=\"kwikid-form show\"\n [formGroup]=\"formGroup\"\n >\n <ng-container\n *ngFor=\"\n let field of formFields;\n let i = index;\n trackBy: getUniqueIdentifier\n \"\n >\n <ng-container [ngSwitch]=\"field.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div [innerHtml]=\"field.html | safeHtml\"></div>\n </div>\n </ng-container>\n <!-- Form Title -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div\n class=\"title\"\n [class.hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <div>\n {{ field.label }}\n </div>\n <kwikui-button\n *ngIf=\"field?.reset\"\n appearance=\"whiteblock\"\n size=\"s\"\n label=\"Reset\"\n (onClick)=\"handleOnClickResetFormFields($event, field)\"\n ></kwikui-button>\n </div>\n </ng-container>\n <!-- Input Text -->\n <ng-container *ngSwitchCase=\"'text'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input\n [case]=\"field?.properties?.case\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [type]=\"'text'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Checkbox -->\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-checkbox-block\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.properties?.placeholder\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size ?? 'l'\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-checkbox-block>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-number\n [decimal]=\"field?.properties?.decimal\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [postfix]=\"field?.properties?.postfix ?? ''\"\n [precision]=\"field?.properties?.precision\"\n [prefix]=\"field?.properties?.prefix ?? ''\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-number>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-date\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [min]=\"field?.properties?.min\"\n [minCalculatedFromToday]=\"\n field?.properties?.minCalculatedFromToday\n \"\n [max]=\"field?.properties?.max\"\n [maxCalculatedFromToday]=\"\n field?.properties?.maxCalculatedFromToday\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-date>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Phone -->\n <ng-container *ngSwitchCase=\"'phone'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-phone\n [countryCode]=\"field?.properties?.countryCode\"\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [phoneMaskAfterCountryCode]=\"\n field?.properties?.phoneMaskAfterCountryCode\n \"\n [removeCountryCodeFromValue]=\"\n field?.properties?.removeCountryCodeFromValue\n \"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-phone>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Radio -->\n <ng-container *ngSwitchCase=\"'radio'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <label\n [tuiLabel]=\"labelTemplate\"\n style=\"min-height: auto; padding: 0px 0.5rem\"\n >\n <kwikui-radio-list\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [items]=\"field?.options\"\n [label]=\"field?.label\"\n [orientation]=\"field?.properties?.orientation\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [size]=\"field?.properties?.size\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-radio-list>\n </label>\n <ng-template #labelTemplate>\n <p\n class=\"tui-space_bottom-2\"\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <b>\n {{ field.label }}\n <span *ngIf=\"field.validators?.required\"></span>\n </b>\n </p>\n </ng-template>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Dropdown -->\n <ng-container *ngSwitchCase=\"'dropdown-with-search'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-select-combobox\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [options]=\"field.options\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-select-combobox>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Input Slider -->\n <ng-container *ngSwitchCase=\"'slider'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-slider\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field.label\"\n [max]=\"field?.properties?.max\"\n [min]=\"field?.properties?.min\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [quantum]=\"field?.properties?.quantum\"\n [size]=\"field?.properties?.size\"\n [steps]=\"field?.properties?.steps\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-slider>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- API Call -->\n <ng-container *ngSwitchCase=\"'api-call'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-button-api-call\n [apiStatus]=\"field?.api?.status?.value\"\n [class]=\"field?.class\"\n [disabled]=\"field?.disabled\"\n [id]=\"field.key\"\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\n [showLoader]=\"field?.disabled === 'loading'\"\n shape=\"null\"\n size=\"m\"\n styles=\"width: fit-content\"\n (onClick)=\"handleOnClickApiCall($event)\"\n ></kwikui-button-api-call>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Mobile OTP -->\n <ng-container *ngSwitchCase=\"'otp'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-otp\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [mask]=\"field?.properties?.mask\"\n [placeholder]=\"field?.properties?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-otp>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n <!-- Aadhaar Number -->\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\n <div\n [hidden]=\"field?.hidden\"\n id=\"field_{{ field.key }}\"\n >\n <kwikui-input-aadhaar\n [disabled]=\"field?.disabled\"\n [focus]=\"field?.focus\"\n [formControl]=\"formGroup.controls[field.key]\"\n [formControlName]=\"field.key\"\n [id]=\"field.key\"\n [invalid]=\"field?.invalid\"\n [label]=\"field?.label\"\n [placeholder]=\"field?.placeholder\"\n [properties]=\"field?.properties\"\n [validators]=\"field?.validators\"\n (getKeyValue)=\"handleGetKeyValue($event)\"\n ></kwikui-input-aadhaar>\n <kwikui-messages\n [messages]=\"field.messages\"\n [id]=\"field.key\"\n ></kwikui-messages>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </form>\n <div class=\"kwikid-form-buttons\">\n <kwikui-button\n *ngIf=\"\n !formConfig.properties.footer.viewFormsButton.hidden && isMobileView\n \"\n [disabled]=\"viewFormsButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.viewFormsButton.label }}\"\n [showLoader]=\"viewFormsButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"secondary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickViewForms($event)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"!formConfig.properties.footer.saveButton.hidden\"\n [disabled]=\"saveFormButton.disabled\"\n id=\"\"\n label=\"{{ formConfig.properties.footer.saveButton.label }}\"\n [showLoader]=\"saveFormButton.showLoader\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnClickSaveForm($event)\"\n ></kwikui-button>\n </div>\n</div>\n<div\n class=\"kwikid-form-container-loading\"\n *ngIf=\"loading\"\n>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n <div\n class=\"large-wrapper\"\n [class.tui-skeleton]=\"loading\"\n [class.tui-skeleton_rounded]=\"loading\"\n ></div>\n</div>\n<tui-push\n id=\"field-error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Missing/Incorrect Fields!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}.kwikid-form-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}.kwikid-form.show{width:100%;height:100%;padding:1rem;overflow-y:auto;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch;grid-row-gap:1rem;row-gap:1rem}.kwikid-form-buttons{width:100%;bottom:0px;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-column-gap:10px;column-gap:10px}.kwikid-form-buttons *{flex-grow:1}#uf-form-fields-header-container{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:flex-start;grid-row-gap:.5rem;row-gap:.5rem;padding:1rem}#uf-form-fields-header-container hr{width:100%}#uf-form-fields-title{color:#000;font-size:1.75em;font-weight:bold}#uf-form-fields-steps{color:var(--color-on-secondary-container);font-size:1em}.title{border-left:.25rem solid var(--tui-primary);padding:.75rem;font-size:1.4em;font-weight:bold;background-color:var(--tui-secondary);display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-gap:.5rem;gap:.5rem}.title:not(:first-child){margin-top:.5rem}.title.hidden{display:none}.large-wrapper{width:100%;height:60px}.large-wrapper:first-child{margin-bottom:auto}.large-wrapper:last-child{margin-top:auto}.kwikid-form-container-loading{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;grid-row-gap:1rem;row-gap:1rem;padding:1rem}#field-error-notification{background-color:var(--tui-error-fill);color:#fff!important}#field-error-notification .t-top{color:#fff!important}#field-error-notification .t-close{color:#fff!important}\n"], components: [{ type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1__namespace.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputNumberComponent, selector: "kwikui-input-number", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "prefix", "postfix", "precision", "decimal", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "minCalculatedFromToday", "max", "maxCalculatedFromToday", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1__namespace.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputSliderComponent, selector: "kwikui-input-slider", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "size", "min", "max", "steps", "quantum", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1__namespace.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1__namespace.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }], pipes: { "safeHtml": SafeHtmlPipe$1 } });
|
|
4196
5098
|
__decorate([
|
|
4197
5099
|
kwikidToolkit.logMethod
|
|
4198
5100
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -4322,9 +5224,9 @@
|
|
|
4322
5224
|
return [{ type: i4__namespace$1.TuiPushService, decorators: [{
|
|
4323
5225
|
type: i0.Inject,
|
|
4324
5226
|
args: [i4$1.TuiPushService]
|
|
4325
|
-
}] }, { type: i3__namespace
|
|
5227
|
+
}] }, { type: i3__namespace.TuiAlertService, decorators: [{
|
|
4326
5228
|
type: i0.Inject,
|
|
4327
|
-
args: [i3
|
|
5229
|
+
args: [i3.TuiAlertService]
|
|
4328
5230
|
}] }, { type: KwikIDFormViewService }];
|
|
4329
5231
|
}, propDecorators: { formConfig: [{
|
|
4330
5232
|
type: i0.Input
|
|
@@ -4514,7 +5416,7 @@
|
|
|
4514
5416
|
return KwikIDFormsListComponent;
|
|
4515
5417
|
}());
|
|
4516
5418
|
/** @nocollapse */ KwikIDFormsListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4517
|
-
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", stepConfig: "stepConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n id=\"sidebar-container\"\n *ngIf=\"!loading\"\n>\n <div id=\"sidebar\">\n <div ngClass=\"kwikid-form-header\">\n <div id=\"uf-header\">\n <div id=\"uf-header-logo-container\">\n <img\n id=\"uf-header-logo\"\n src=\"{{ this.userConfig.theme.clientLogo }}\"\n [ngClass]=\"'large-icon'\"\n />\n </div>\n </div>\n <hr />\n </div>\n <div id=\"uf-progress\">\n <div id=\"uf-progress-steps\">\n {{ this.formsListCompleted.length }} / {{ this.formsListLength }} Steps\n Completed\n </div>\n <kwikui-progress-segmented\n [max]=\"this.formsListLength\"\n size=\"m\"\n [value]=\"this.formsListCompleted.length\"\n ></kwikui-progress-segmented>\n </div>\n <div id=\"uf-sections-container\">\n <ng-container *ngFor=\"let form of formsList; let i = index\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div [innerHtml]=\"form.props.htmlContent | safeHtml\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form'\">\n <div\n [class]=\"'uf-section-item'\"\n [class.completed]=\"form.status === 'completed' && !form.disabled\"\n [class.edit]=\"form.status === 'editable' && !form.disabled\"\n [class.locked]=\"form.status === 'locked' && form.disabled\"\n [class.active]=\"\n activeFormConfig !== undefined &&\n form.key === activeFormConfig.key\n \"\n (click)=\"\n form.status === 'locked' && form.disabled\n ? undefined\n : handleOnClickSetActiveForm(form.key)\n \"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }} <span *ngIf=\"form?.required\"\n >*</span\n >\n </div>\n <div class=\"uf-form-section-card-status\">\n <div\n *ngIf=\"form.status === 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img completed\"\n >\n <tui-svg src=\"tuiIconCheckLarge\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img edit\"\n >\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && form.disabled\"\n class=\"uf-form-section-card-status-img locked\"\n >\n <tui-svg src=\"tuiIconLock\"></tui-svg>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div id=\"submit-sidebar-btn-container\">\n <kwikui-button\n *ngIf=\"\n !stepConfig.props.formListProperties.footer.submitFormButton.hidden\n \"\n [disabled]=\"false\"\n id=\"\"\n label=\"{{\n stepConfig.props.formListProperties.footer.submitFormButton.label\n }}\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnSubmitForms($event)\"\n ></kwikui-button>\n </div>\n </div>\n</div>\n", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}#sidebar-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}#sidebar{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.uf-section-item{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;padding:1rem;grid-gap:1rem;gap:1rem;cursor:pointer;box-shadow:0 1px 3px -1px var(--tui-base-05);border-radius:.5rem;background-color:var(--tui-base-02);position:relative}.uf-section-item:hover{box-shadow:0 1px 3px -1px var(--tui-base-08)}#submit-sidebar-btn-container{width:100%;bottom:0px;z-index:1;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;gap:1rem}#submit-sidebar-btn-container *{flex-grow:1}#uf-sections-container{display:flex;flex-direction:column;height:100%;grid-row-gap:20px;row-gap:20px;padding:1rem;overflow-y:auto}.uf-form-section-card{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:10px;column-gap:10px;border:none;border-radius:8px;background-color:#e9e9e9;height:-moz-fit-content;height:fit-content;min-height:60px;padding:10px 15px;width:100%;max-width:350px;margin:0 auto}.uf-section-item.locked{-webkit-user-select:none;user-select:none;cursor:not-allowed}.uf-form-section-card .uf-form-section-card-title{font-size:1.2em;text-align:left;line-height:1.25em}.uf-form-section-card .uf-form-section-card-status{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.uf-form-section-card .uf-form-section-card-status .uf-form-section-card-status-img{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;border-radius:100%;color:#fff;font-weight:bold}.uf-form-section-card-status-img.completed{background-color:var(--tui-success-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.edit{background-color:var(--tui-error-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.locked{background-color:var(--tui-neutral-fill);padding:.25rem;border-radius:50%;color:#fff}#uf-progress{display:flex;padding:1rem;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;grid-gap:.5rem;gap:.5rem}#uf-progress-steps{font-size:1em;text-align:right;color:#3d3d3d}.uf-form-section-card-title{font-size:1em;font-weight:bold;color:#000}@media screen and (max-width: 600px){#sidebar-container{max-width:unset}}.kwikid-form-header{height:70px;z-index:6}.kwikid-form-header hr{width:calc(100% - 1rem);margin-left:auto;margin-right:auto}#uf-header{display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:flex-start;grid-column-gap:10px;column-gap:10px;padding:10px 20px;width:100%;max-width:calc(400px + 50vw + 2rem);margin:0 auto;height:70px;z-index:1}#uf-header #uf-header-goback-container{display:none}#uf-header #uf-header-goback-container:hover{border-radius:50%;background-color:#d3d3d3}#uf-header #uf-header-goback-container #uf-header-goback{width:100%;height:auto}#uf-header #uf-header-logo-container{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#uf-header #uf-header-logo-container #uf-header-logo.small-icon{width:100%;height:50px}#uf-header #uf-header-logo-container #uf-header-logo.large-icon{width:100%;height:50px}#uf-header #uf-header-title-container{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;grid-row-gap:4px;row-gap:4px}#uf-header #uf-header-title-container #uf-header-title{font-size:1.4em;color:#121212}#uf-header #uf-header-title-container #uf-header-subtitle{font-size:1.2em;color:#121212}\n"], components: [{ type:
|
|
5419
|
+
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", stepConfig: "stepConfig", activeFormConfig: "activeFormConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n id=\"sidebar-container\"\n *ngIf=\"!loading\"\n>\n <div id=\"sidebar\">\n <div ngClass=\"kwikid-form-header\">\n <div id=\"uf-header\">\n <div id=\"uf-header-logo-container\">\n <img\n id=\"uf-header-logo\"\n src=\"{{ this.userConfig.theme.clientLogo }}\"\n [ngClass]=\"'large-icon'\"\n />\n </div>\n </div>\n <hr />\n </div>\n <div id=\"uf-progress\">\n <div id=\"uf-progress-steps\">\n {{ this.formsListCompleted.length }} / {{ this.formsListLength }} Steps\n Completed\n </div>\n <kwikui-progress-segmented\n [max]=\"this.formsListLength\"\n size=\"m\"\n [value]=\"this.formsListCompleted.length\"\n ></kwikui-progress-segmented>\n </div>\n <div id=\"uf-sections-container\">\n <ng-container *ngFor=\"let form of formsList; let i = index\">\n <ng-container [ngSwitch]=\"form.type\">\n <!-- HTML Content -->\n <ng-container *ngSwitchCase=\"'html'\">\n <div [innerHtml]=\"form.props.htmlContent | safeHtml\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form'\">\n <div\n [class]=\"'uf-section-item'\"\n [class.completed]=\"form.status === 'completed' && !form.disabled\"\n [class.edit]=\"form.status === 'editable' && !form.disabled\"\n [class.locked]=\"form.status === 'locked' && form.disabled\"\n [class.active]=\"\n activeFormConfig !== undefined &&\n form.key === activeFormConfig.key\n \"\n (click)=\"\n form.status === 'locked' && form.disabled\n ? undefined\n : handleOnClickSetActiveForm(form.key)\n \"\n >\n <div class=\"uf-form-section-card-title\">\n {{ form.props.title }} <span *ngIf=\"form?.required\"\n >*</span\n >\n </div>\n <div class=\"uf-form-section-card-status\">\n <div\n *ngIf=\"form.status === 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img completed\"\n >\n <tui-svg src=\"tuiIconCheckLarge\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && !form.disabled\"\n class=\"uf-form-section-card-status-img edit\"\n >\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\n </div>\n <div\n *ngIf=\"form.status !== 'completed' && form.disabled\"\n class=\"uf-form-section-card-status-img locked\"\n >\n <tui-svg src=\"tuiIconLock\"></tui-svg>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div id=\"submit-sidebar-btn-container\">\n <kwikui-button\n *ngIf=\"\n !stepConfig.props.formListProperties.footer.submitFormButton.hidden\n \"\n [disabled]=\"false\"\n id=\"\"\n label=\"{{\n stepConfig.props.formListProperties.footer.submitFormButton.label\n }}\"\n [showLoader]=\"false\"\n styles=\"\"\n class=\"\"\n type=\"button\"\n appearance=\"primary\"\n icon=\"\"\n iconRight=\"\"\n [shape]=\"null\"\n size=\"m\"\n styles=\"width: 100%\"\n (onClick)=\"handleOnSubmitForms($event)\"\n ></kwikui-button>\n </div>\n </div>\n</div>\n", styles: ["::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}#sidebar-container{width:100%;height:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center}#sidebar{width:100%;height:100%;display:flex;flex-direction:column;align-content:center;justify-content:flex-start;align-items:stretch}.uf-section-item{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;align-content:center;padding:1rem;grid-gap:1rem;gap:1rem;cursor:pointer;box-shadow:0 1px 3px -1px var(--tui-base-05);border-radius:.5rem;background-color:var(--tui-base-02);position:relative}.uf-section-item:hover{box-shadow:0 1px 3px -1px var(--tui-base-08)}#submit-sidebar-btn-container{width:100%;bottom:0px;z-index:1;padding:1rem;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;grid-gap:1rem;gap:1rem}#submit-sidebar-btn-container *{flex-grow:1}#uf-sections-container{display:flex;flex-direction:column;height:100%;grid-row-gap:20px;row-gap:20px;padding:1rem;overflow-y:auto}.uf-form-section-card{display:flex;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;grid-column-gap:10px;column-gap:10px;border:none;border-radius:8px;background-color:#e9e9e9;height:-moz-fit-content;height:fit-content;min-height:60px;padding:10px 15px;width:100%;max-width:350px;margin:0 auto}.uf-section-item.locked{-webkit-user-select:none;user-select:none;cursor:not-allowed}.uf-form-section-card .uf-form-section-card-title{font-size:1.2em;text-align:left;line-height:1.25em}.uf-form-section-card .uf-form-section-card-status{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}.uf-form-section-card .uf-form-section-card-status .uf-form-section-card-status-img{width:30px;height:30px;display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;border-radius:100%;color:#fff;font-weight:bold}.uf-form-section-card-status-img.completed{background-color:var(--tui-success-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.edit{background-color:var(--tui-error-fill);padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-status-img.locked{background-color:var(--tui-neutral-fill);padding:.25rem;border-radius:50%;color:#fff}#uf-progress{display:flex;padding:1rem;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;grid-gap:.5rem;gap:.5rem}#uf-progress-steps{font-size:1em;text-align:right;color:#3d3d3d}.uf-form-section-card-title{font-size:1em;font-weight:bold;color:#000}@media screen and (max-width: 600px){#sidebar-container{max-width:unset}}.kwikid-form-header{height:70px;z-index:6}.kwikid-form-header hr{width:calc(100% - 1rem);margin-left:auto;margin-right:auto}#uf-header{display:flex;flex-direction:row;align-content:center;align-items:center;justify-content:flex-start;grid-column-gap:10px;column-gap:10px;padding:10px 20px;width:100%;max-width:calc(400px + 50vw + 2rem);margin:0 auto;height:70px;z-index:1}#uf-header #uf-header-goback-container{display:none}#uf-header #uf-header-goback-container:hover{border-radius:50%;background-color:#d3d3d3}#uf-header #uf-header-goback-container #uf-header-goback{width:100%;height:auto}#uf-header #uf-header-logo-container{display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center}#uf-header #uf-header-logo-container #uf-header-logo.small-icon{width:100%;height:50px}#uf-header #uf-header-logo-container #uf-header-logo.large-icon{width:100%;height:50px}#uf-header #uf-header-title-container{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;grid-row-gap:4px;row-gap:4px}#uf-header #uf-header-title-container #uf-header-title{font-size:1.4em;color:#121212}#uf-header #uf-header-title-container #uf-header-subtitle{font-size:1.2em;color:#121212}\n"], components: [{ type: i1__namespace.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["id", "value", "max", "size", "colors"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "safeHtml": SafeHtmlPipe } });
|
|
4518
5420
|
__decorate([
|
|
4519
5421
|
kwikidToolkit.logMethod
|
|
4520
5422
|
], KwikIDFormsListComponent.prototype, "ngOnChanges", null);
|
|
@@ -5123,7 +6025,6 @@
|
|
|
5123
6025
|
}
|
|
5124
6026
|
_d.label = 7;
|
|
5125
6027
|
case 7:
|
|
5126
|
-
console.log(JSON.parse(JSON.stringify(formConfig)));
|
|
5127
6028
|
formConfig = new Converter().updateFormConfigMiscellaneous(formConfig, {
|
|
5128
6029
|
formsListLength: this.findFormsListLength(this.formsList)
|
|
5129
6030
|
});
|
|
@@ -5236,7 +6137,7 @@
|
|
|
5236
6137
|
return KwikIDFormsRendererComponent;
|
|
5237
6138
|
}());
|
|
5238
6139
|
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5239
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n<div\n ngClass=\"kwikid-forms-renderer-loader\"\n *ngIf=\"loader\"\n>\n <span class=\"loader\"></span>\n</div>\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", styles: [":host{position:relative}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:50%;margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}.kwikid-forms-renderer-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-forms-renderer-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-forms-renderer-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-forms-renderer-loader .t-loader{display:none!important}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}\n"], components: [{ type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData"], outputs: ["onClickViewForms", "onClickSaveForm", "onClickApiCall"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace
|
|
6140
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsRendererComponent, selector: "kwikid-forms-renderer", inputs: { stepConfig: "stepConfig", userConfig: "userConfig", formsData: "formsData", apiCallResponse: "apiCallResponse" }, outputs: { onClickSubmit: "onClickSubmit", getFormData: "getFormData", onClickApiCall: "onClickApiCall" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div ngClass=\"kwikid-renderer\">\n <div\n ngClass=\"kwikid-layout-container\"\n *ngIf=\"!loading\"\n >\n <div\n ngClass=\"kwikid-sections-container\"\n *ngIf=\"showFormSections\"\n class=\"active\"\n [class.active]=\"showFormSections\"\n [class.mobile]=\"isMobileView\"\n >\n <kwikid-forms-list\n [showFormFields]=\"this.showFormFields\"\n [activeFormConfig]=\"this.activeFormConfig\"\n [userConfig]=\"this.userConfig\"\n [formsList]=\"this.formsList\"\n [stepConfig]=\"this.stepConfig\"\n [formsListCompleted]=\"this.formsListCompleted\"\n [isMobileView]=\"this.isMobileView\"\n (onClickSetActiveForm)=\"this.handleOnClickSetActiveForm($event)\"\n (onClickSubmitForms)=\"this.handleOnClickSubmitForms($event)\"\n ></kwikid-forms-list>\n </div>\n <div\n ngClass=\"kwikid-forms-container\"\n *ngIf=\"\n this.showForm &&\n this.showFormFields &&\n this.activeFormConfig !== undefined\n \"\n [class.active]=\"showFormFields\"\n [class.mobile]=\"isMobileView\"\n [@panelInOut]\n >\n <kwikid-form-view\n [formConfig]=\"this.activeFormConfig\"\n [allFormsData]=\"this.allFormsData\"\n [isMobileView]=\"this.isMobileView\"\n (onClickViewForms)=\"this.handleOnClickViewForms($event)\"\n (onClickSaveForm)=\"this.handleOnClickSaveForm($event)\"\n ></kwikid-form-view>\n </div>\n </div>\n</div>\n<div\n ngClass=\"kwikid-forms-renderer-loader\"\n *ngIf=\"loader\"\n>\n <span class=\"loader\"></span>\n</div>\n<tui-push\n id=\"error-notification\"\n *tuiPush=\"showErrorNotification\"\n heading=\"Please complete the required Forms!\"\n type=\"Error\"\n (close)=\"toggleErrorNotification(false)\"\n>\n <tui-svg\n src=\"tuiIconXCircle\"\n style=\"color: #fff !important\"\n >\n </tui-svg>\n</tui-push>\n", styles: [":host{position:relative}.kwikid-root{width:100%;height:100%}.kwikid-renderer{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;align-content:center;width:100%;height:100%}.kwikid-layout-container{display:flex;flex-direction:row;padding:0 1rem;height:100%;justify-content:center;align-items:stretch;background:var(--tui-secondary-active);position:relative}.kwikid-sections-container{display:block;width:100%;max-width:400px;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);margin:auto 1rem auto 0;box-shadow:0 0 12px -8px var(--tui-secondary)}.kwikid-sections-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}.kwikid-forms-container{display:block;width:100%;max-width:50%;margin:auto 0;height:calc(100% - 2rem);padding:.25rem .5rem 0;border-radius:1rem;background-color:var(--tui-base-01);box-shadow:0 0 12px -8px var(--tui-primary)}.kwikid-forms-container.mobile{position:absolute;top:0;left:0;z-index:5;opacity:1;visibility:visible;transition:all 1s;height:100%;border-radius:0;max-width:unset}@media screen and (max-width: 600px){.kwikid-layout-container{padding:0;background:transparent}.kwikid-sections-container{position:absolute;max-width:100%;bottom:-10000px;left:-10000px;opacity:0;padding:0;visibility:hidden}.kwikid-sections-container.active{visibility:visible}.kwikid-sections-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container{display:none;max-width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}.kwikid-forms-container.mobile{height:100%;opacity:1;visibility:visible;transition:all 2s;border-radius:0;box-shadow:none;top:0px;margin:0;position:absolute}.kwikid-forms-container.active{display:block}}.kwikid-forms-renderer-loader{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);display:flex;flex-direction:row;align-content:center;justify-content:center;align-items:center;z-index:100}.kwikid-forms-renderer-loader .loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:3px solid;border-color:#fff #fff transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.kwikid-forms-renderer-loader .loader:after{content:\"\";box-sizing:border-box;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border:3px solid;border-color:transparent var(--tui-primary) var(--tui-primary);width:24px;height:24px;border-radius:50%;animation:rotationBack .5s linear infinite;transform-origin:center center}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotationBack{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.kwikid-forms-renderer-loader .t-loader{display:none!important}#error-notification{background-color:var(--tui-error-fill);color:#fff!important}#error-notification .t-top{color:#fff!important}#error-notification .t-close{color:#fff!important}\n"], components: [{ type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: ["showFormFields", "userConfig", "stepConfig", "activeFormConfig", "formsList", "formsListCompleted", "isMobileView"], outputs: ["onClickSetActiveForm", "onClickHideFormsList", "onClickSubmitForms"] }, { type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: ["formConfig", "formData", "isMobileView", "allFormsData"], outputs: ["onClickViewForms", "onClickSaveForm", "onClickApiCall"] }, { type: i4__namespace$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace$1.TuiPushDirective, selector: "tui-push" }], animations: [
|
|
5240
6141
|
animations.trigger("panelInOut", [
|
|
5241
6142
|
animations.transition(":enter", [
|
|
5242
6143
|
animations.style({ transform: "translateY(100%)" }),
|
|
@@ -5326,6 +6227,74 @@
|
|
|
5326
6227
|
type: i0.Output
|
|
5327
6228
|
}], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleOnClickSubmitForms: [] } });
|
|
5328
6229
|
|
|
6230
|
+
var BasicDateConfigEditor = /** @class */ (function () {
|
|
6231
|
+
function BasicDateConfigEditor() {
|
|
6232
|
+
this.saveBasicClickCounter = 0;
|
|
6233
|
+
this.elementConfig = {};
|
|
6234
|
+
this.updateElement = new i0.EventEmitter();
|
|
6235
|
+
this.basicDateFormGroup = undefined;
|
|
6236
|
+
}
|
|
6237
|
+
BasicDateConfigEditor.prototype.ngOnInit = function () {
|
|
6238
|
+
this.createBasicDateFormGroup();
|
|
6239
|
+
};
|
|
6240
|
+
BasicDateConfigEditor.prototype.ngOnChanges = function (changes) {
|
|
6241
|
+
var _a;
|
|
6242
|
+
var verifyChange = function (key) {
|
|
6243
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
6244
|
+
};
|
|
6245
|
+
if (verifyChange("elementConfig")) {
|
|
6246
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
6247
|
+
(_a = this.basicDateFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
6248
|
+
}
|
|
6249
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
6250
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
6251
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
6252
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
6253
|
+
this.handleOnSave();
|
|
6254
|
+
}
|
|
6255
|
+
}
|
|
6256
|
+
};
|
|
6257
|
+
BasicDateConfigEditor.prototype.createBasicDateFormGroup = function () {
|
|
6258
|
+
this.basicDateFormGroup = new i2.FormGroup({});
|
|
6259
|
+
this.basicDateFormGroup.updateValueAndValidity();
|
|
6260
|
+
};
|
|
6261
|
+
BasicDateConfigEditor.prototype.handleOnSave = function () {
|
|
6262
|
+
var basicElementConfig = this.basicDateFormGroup.getRawValue();
|
|
6263
|
+
this.updateElement.emit({
|
|
6264
|
+
basicElementConfig: basicElementConfig
|
|
6265
|
+
});
|
|
6266
|
+
};
|
|
6267
|
+
return BasicDateConfigEditor;
|
|
6268
|
+
}());
|
|
6269
|
+
/** @nocollapse */ BasicDateConfigEditor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicDateConfigEditor, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6270
|
+
/** @nocollapse */ BasicDateConfigEditor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BasicDateConfigEditor, selector: "basic-date-config-editor", inputs: { saveBasicClickCounter: "saveBasicClickCounter", elementConfig: "elementConfig" }, outputs: { updateElement: "updateElement" }, usesOnChanges: true, ngImport: i0__namespace, template: "", isInline: true, styles: [""] });
|
|
6271
|
+
__decorate([
|
|
6272
|
+
kwikidToolkit.logMethod
|
|
6273
|
+
], BasicDateConfigEditor.prototype, "ngOnInit", null);
|
|
6274
|
+
__decorate([
|
|
6275
|
+
kwikidToolkit.logMethod
|
|
6276
|
+
], BasicDateConfigEditor.prototype, "ngOnChanges", null);
|
|
6277
|
+
__decorate([
|
|
6278
|
+
kwikidToolkit.logMethod
|
|
6279
|
+
], BasicDateConfigEditor.prototype, "createBasicDateFormGroup", null);
|
|
6280
|
+
__decorate([
|
|
6281
|
+
kwikidToolkit.logMethod
|
|
6282
|
+
], BasicDateConfigEditor.prototype, "handleOnSave", null);
|
|
6283
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BasicDateConfigEditor, decorators: [{
|
|
6284
|
+
type: i0.Component,
|
|
6285
|
+
args: [{
|
|
6286
|
+
selector: "basic-date-config-editor",
|
|
6287
|
+
template: "",
|
|
6288
|
+
styles: [""]
|
|
6289
|
+
}]
|
|
6290
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
6291
|
+
type: i0.Input
|
|
6292
|
+
}], elementConfig: [{
|
|
6293
|
+
type: i0.Input
|
|
6294
|
+
}], updateElement: [{
|
|
6295
|
+
type: i0.Output
|
|
6296
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicDateFormGroup: [], handleOnSave: [] } });
|
|
6297
|
+
|
|
5329
6298
|
var KwikIDFormBuilderModule = /** @class */ (function () {
|
|
5330
6299
|
function KwikIDFormBuilderModule() {
|
|
5331
6300
|
}
|
|
@@ -5336,21 +6305,40 @@
|
|
|
5336
6305
|
ElementConfigEditor,
|
|
5337
6306
|
BasicElementConfigEditor,
|
|
5338
6307
|
BasicTextConfigEditor,
|
|
5339
|
-
BasicRadioConfigEditor
|
|
5340
|
-
|
|
5341
|
-
|
|
6308
|
+
BasicRadioConfigEditor,
|
|
6309
|
+
BasicNumberConfigEditor,
|
|
6310
|
+
BasicCheckboxConfigEditor,
|
|
6311
|
+
BasicDateConfigEditor,
|
|
6312
|
+
BasicOtpConfigEditor,
|
|
6313
|
+
BasicPhoneConfigEditor,
|
|
6314
|
+
DocumentElementConfigEditor,
|
|
6315
|
+
DocumentAadhaarNumberConfigEditor,
|
|
6316
|
+
DocumentPanNumberConfigEditor,
|
|
6317
|
+
OtherElementConfigEditor,
|
|
6318
|
+
OtherHTMLConfigEditor,
|
|
6319
|
+
OtherTitleConfigEditor], imports: [i5.CommonModule,
|
|
6320
|
+
i2.FormsModule,
|
|
6321
|
+
i2.ReactiveFormsModule,
|
|
5342
6322
|
i4.DragDropModule,
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
6323
|
+
i1.KwikUIButtonIconModule,
|
|
6324
|
+
i1.KwikUIButtonModule,
|
|
6325
|
+
i1.KwikUIInputModule,
|
|
6326
|
+
i1.KwikUIInputNumberModule,
|
|
6327
|
+
i1.KwikUISelectComboboxModule,
|
|
6328
|
+
i1.KwikUITableModule,
|
|
6329
|
+
i1.KwikUITextareaModule], exports: [KwikIDFormsBuilderComponent] });
|
|
5346
6330
|
/** @nocollapse */ KwikIDFormBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, providers: [], imports: [[
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
6331
|
+
i5.CommonModule,
|
|
6332
|
+
i2.FormsModule,
|
|
6333
|
+
i2.ReactiveFormsModule,
|
|
5350
6334
|
i4.DragDropModule,
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
6335
|
+
i1.KwikUIButtonIconModule,
|
|
6336
|
+
i1.KwikUIButtonModule,
|
|
6337
|
+
i1.KwikUIInputModule,
|
|
6338
|
+
i1.KwikUIInputNumberModule,
|
|
6339
|
+
i1.KwikUISelectComboboxModule,
|
|
6340
|
+
i1.KwikUITableModule,
|
|
6341
|
+
i1.KwikUITextareaModule
|
|
5354
6342
|
]] });
|
|
5355
6343
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormBuilderModule, decorators: [{
|
|
5356
6344
|
type: i0.NgModule,
|
|
@@ -5360,16 +6348,31 @@
|
|
|
5360
6348
|
ElementConfigEditor,
|
|
5361
6349
|
BasicElementConfigEditor,
|
|
5362
6350
|
BasicTextConfigEditor,
|
|
5363
|
-
BasicRadioConfigEditor
|
|
6351
|
+
BasicRadioConfigEditor,
|
|
6352
|
+
BasicNumberConfigEditor,
|
|
6353
|
+
BasicCheckboxConfigEditor,
|
|
6354
|
+
BasicDateConfigEditor,
|
|
6355
|
+
BasicOtpConfigEditor,
|
|
6356
|
+
BasicPhoneConfigEditor,
|
|
6357
|
+
DocumentElementConfigEditor,
|
|
6358
|
+
DocumentAadhaarNumberConfigEditor,
|
|
6359
|
+
DocumentPanNumberConfigEditor,
|
|
6360
|
+
OtherElementConfigEditor,
|
|
6361
|
+
OtherHTMLConfigEditor,
|
|
6362
|
+
OtherTitleConfigEditor
|
|
5364
6363
|
],
|
|
5365
6364
|
imports: [
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
6365
|
+
i5.CommonModule,
|
|
6366
|
+
i2.FormsModule,
|
|
6367
|
+
i2.ReactiveFormsModule,
|
|
5369
6368
|
i4.DragDropModule,
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
6369
|
+
i1.KwikUIButtonIconModule,
|
|
6370
|
+
i1.KwikUIButtonModule,
|
|
6371
|
+
i1.KwikUIInputModule,
|
|
6372
|
+
i1.KwikUIInputNumberModule,
|
|
6373
|
+
i1.KwikUISelectComboboxModule,
|
|
6374
|
+
i1.KwikUITableModule,
|
|
6375
|
+
i1.KwikUITextareaModule
|
|
5373
6376
|
],
|
|
5374
6377
|
providers: [],
|
|
5375
6378
|
exports: [KwikIDFormsBuilderComponent]
|
|
@@ -5382,34 +6385,34 @@
|
|
|
5382
6385
|
return KwikIDFormViewModule;
|
|
5383
6386
|
}());
|
|
5384
6387
|
/** @nocollapse */ KwikIDFormViewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
5385
|
-
/** @nocollapse */ KwikIDFormViewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1], imports: [
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
i3
|
|
6388
|
+
/** @nocollapse */ KwikIDFormViewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1], imports: [i5.CommonModule,
|
|
6389
|
+
i2.FormsModule,
|
|
6390
|
+
i2.ReactiveFormsModule,
|
|
6391
|
+
i3.TuiLabelModule,
|
|
5389
6392
|
i4$1.TuiPushModule,
|
|
5390
|
-
i3
|
|
5391
|
-
|
|
6393
|
+
i3.TuiSvgModule,
|
|
6394
|
+
i1.KwikUIModule], exports: [KwikIDFormViewComponent] });
|
|
5392
6395
|
/** @nocollapse */ KwikIDFormViewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, imports: [[
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
i3
|
|
6396
|
+
i5.CommonModule,
|
|
6397
|
+
i2.FormsModule,
|
|
6398
|
+
i2.ReactiveFormsModule,
|
|
6399
|
+
i3.TuiLabelModule,
|
|
5397
6400
|
i4$1.TuiPushModule,
|
|
5398
|
-
i3
|
|
5399
|
-
|
|
6401
|
+
i3.TuiSvgModule,
|
|
6402
|
+
i1.KwikUIModule
|
|
5400
6403
|
]] });
|
|
5401
6404
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormViewModule, decorators: [{
|
|
5402
6405
|
type: i0.NgModule,
|
|
5403
6406
|
args: [{
|
|
5404
6407
|
declarations: [KwikIDFormViewComponent, SafeHtmlPipe$1],
|
|
5405
6408
|
imports: [
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
i3
|
|
6409
|
+
i5.CommonModule,
|
|
6410
|
+
i2.FormsModule,
|
|
6411
|
+
i2.ReactiveFormsModule,
|
|
6412
|
+
i3.TuiLabelModule,
|
|
5410
6413
|
i4$1.TuiPushModule,
|
|
5411
|
-
i3
|
|
5412
|
-
|
|
6414
|
+
i3.TuiSvgModule,
|
|
6415
|
+
i1.KwikUIModule
|
|
5413
6416
|
],
|
|
5414
6417
|
exports: [KwikIDFormViewComponent]
|
|
5415
6418
|
}]
|
|
@@ -5421,28 +6424,28 @@
|
|
|
5421
6424
|
return KwikIDFormsListModule;
|
|
5422
6425
|
}());
|
|
5423
6426
|
/** @nocollapse */ KwikIDFormsListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
5424
|
-
/** @nocollapse */ KwikIDFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, declarations: [KwikIDFormsListComponent, SafeHtmlPipe], imports: [
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
i3
|
|
6427
|
+
/** @nocollapse */ KwikIDFormsListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, declarations: [KwikIDFormsListComponent, SafeHtmlPipe], imports: [i5.CommonModule,
|
|
6428
|
+
i2.FormsModule,
|
|
6429
|
+
i2.ReactiveFormsModule,
|
|
6430
|
+
i1.KwikUIModule,
|
|
6431
|
+
i3.TuiSvgModule], exports: [KwikIDFormsListComponent] });
|
|
5429
6432
|
/** @nocollapse */ KwikIDFormsListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, imports: [[
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
i3
|
|
6433
|
+
i5.CommonModule,
|
|
6434
|
+
i2.FormsModule,
|
|
6435
|
+
i2.ReactiveFormsModule,
|
|
6436
|
+
i1.KwikUIModule,
|
|
6437
|
+
i3.TuiSvgModule
|
|
5435
6438
|
]] });
|
|
5436
6439
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsListModule, decorators: [{
|
|
5437
6440
|
type: i0.NgModule,
|
|
5438
6441
|
args: [{
|
|
5439
6442
|
declarations: [KwikIDFormsListComponent, SafeHtmlPipe],
|
|
5440
6443
|
imports: [
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
i3
|
|
6444
|
+
i5.CommonModule,
|
|
6445
|
+
i2.FormsModule,
|
|
6446
|
+
i2.ReactiveFormsModule,
|
|
6447
|
+
i1.KwikUIModule,
|
|
6448
|
+
i3.TuiSvgModule
|
|
5446
6449
|
],
|
|
5447
6450
|
exports: [KwikIDFormsListComponent]
|
|
5448
6451
|
}]
|
|
@@ -5454,37 +6457,37 @@
|
|
|
5454
6457
|
return KwikIDFormRendererModule;
|
|
5455
6458
|
}());
|
|
5456
6459
|
/** @nocollapse */ KwikIDFormRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
5457
|
-
/** @nocollapse */ KwikIDFormRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, declarations: [KwikIDFormsRendererComponent], imports: [
|
|
6460
|
+
/** @nocollapse */ KwikIDFormRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, declarations: [KwikIDFormsRendererComponent], imports: [i5.CommonModule,
|
|
5458
6461
|
http.HttpClientModule,
|
|
5459
6462
|
KwikIDFormViewModule,
|
|
5460
6463
|
KwikIDFormsListModule,
|
|
5461
|
-
|
|
5462
|
-
i3
|
|
6464
|
+
i1.KwikUIModule,
|
|
6465
|
+
i3.TuiLoaderModule,
|
|
5463
6466
|
i4$1.TuiPushModule,
|
|
5464
|
-
i3
|
|
6467
|
+
i3.TuiSvgModule], exports: [KwikIDFormsRendererComponent] });
|
|
5465
6468
|
/** @nocollapse */ KwikIDFormRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, providers: [], imports: [[
|
|
5466
|
-
|
|
6469
|
+
i5.CommonModule,
|
|
5467
6470
|
http.HttpClientModule,
|
|
5468
6471
|
KwikIDFormViewModule,
|
|
5469
6472
|
KwikIDFormsListModule,
|
|
5470
|
-
|
|
5471
|
-
i3
|
|
6473
|
+
i1.KwikUIModule,
|
|
6474
|
+
i3.TuiLoaderModule,
|
|
5472
6475
|
i4$1.TuiPushModule,
|
|
5473
|
-
i3
|
|
6476
|
+
i3.TuiSvgModule
|
|
5474
6477
|
]] });
|
|
5475
6478
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormRendererModule, decorators: [{
|
|
5476
6479
|
type: i0.NgModule,
|
|
5477
6480
|
args: [{
|
|
5478
6481
|
declarations: [KwikIDFormsRendererComponent],
|
|
5479
6482
|
imports: [
|
|
5480
|
-
|
|
6483
|
+
i5.CommonModule,
|
|
5481
6484
|
http.HttpClientModule,
|
|
5482
6485
|
KwikIDFormViewModule,
|
|
5483
6486
|
KwikIDFormsListModule,
|
|
5484
|
-
|
|
5485
|
-
i3
|
|
6487
|
+
i1.KwikUIModule,
|
|
6488
|
+
i3.TuiLoaderModule,
|
|
5486
6489
|
i4$1.TuiPushModule,
|
|
5487
|
-
i3
|
|
6490
|
+
i3.TuiSvgModule
|
|
5488
6491
|
],
|
|
5489
6492
|
providers: [],
|
|
5490
6493
|
exports: [KwikIDFormsRendererComponent]
|
|
@@ -5497,15 +6500,15 @@
|
|
|
5497
6500
|
return KwikIDFormsModule;
|
|
5498
6501
|
}());
|
|
5499
6502
|
/** @nocollapse */ KwikIDFormsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
5500
|
-
/** @nocollapse */ KwikIDFormsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [
|
|
5501
|
-
|
|
5502
|
-
|
|
6503
|
+
/** @nocollapse */ KwikIDFormsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [i5.CommonModule,
|
|
6504
|
+
i2.FormsModule,
|
|
6505
|
+
i2.ReactiveFormsModule,
|
|
5503
6506
|
KwikIDFormBuilderModule,
|
|
5504
6507
|
KwikIDFormRendererModule], exports: [KwikIDFormBuilderModule, KwikIDFormRendererModule] });
|
|
5505
6508
|
/** @nocollapse */ KwikIDFormsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: KwikIDFormsModule, imports: [[
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
6509
|
+
i5.CommonModule,
|
|
6510
|
+
i2.FormsModule,
|
|
6511
|
+
i2.ReactiveFormsModule,
|
|
5509
6512
|
KwikIDFormBuilderModule,
|
|
5510
6513
|
KwikIDFormRendererModule
|
|
5511
6514
|
], KwikIDFormBuilderModule, KwikIDFormRendererModule] });
|
|
@@ -5514,9 +6517,9 @@
|
|
|
5514
6517
|
args: [{
|
|
5515
6518
|
declarations: [],
|
|
5516
6519
|
imports: [
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
6520
|
+
i5.CommonModule,
|
|
6521
|
+
i2.FormsModule,
|
|
6522
|
+
i2.ReactiveFormsModule,
|
|
5520
6523
|
KwikIDFormBuilderModule,
|
|
5521
6524
|
KwikIDFormRendererModule
|
|
5522
6525
|
],
|