kwikid-forms 0.1.1 → 0.1.3
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 +176 -179
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +42 -42
- package/esm2015/lib/renderer/form-view/form-view.service.js +3 -3
- package/esm2015/lib/renderer/form-view/helpers/form-view.actions.helper.js +3 -3
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +5 -5
- package/esm2015/lib/renderer/form-view/helpers/form-view.condition.helper.js +3 -3
- package/esm2015/lib/renderer/form-view/helpers/form-view.defaults.helper.js +3 -3
- package/esm2015/lib/renderer/form-view/helpers/form-view.rules.helper.js +4 -4
- package/esm2015/lib/renderer/form-view/helpers/form-view.sources.helper.js +4 -4
- package/esm2015/lib/renderer/form-view/helpers/form-view.validations.helper.js +6 -6
- package/esm2015/lib/renderer/forms-list/forms-list.component.js +7 -2
- package/esm2015/lib/renderer/helpers/renderer.actions.helper.js +4 -3
- package/esm2015/lib/renderer/helpers/renderer.rules.helper.js +4 -3
- package/esm2015/lib/renderer/helpers/renderer.sources.helper.js +28 -2
- package/esm2015/lib/renderer/helpers/renderer.validations.helper.js +11 -4
- package/esm2015/lib/renderer/renderer.component.js +12 -6
- package/esm2015/lib/renderer/renderer.config-converter.helper.js +4 -3
- package/esm2015/lib/renderer/renderer.service.js +45 -3
- package/fesm2015/kwikid-forms.js +156 -163
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/helpers/renderer.actions.helper.d.ts +2 -1
- package/lib/renderer/helpers/renderer.rules.helper.d.ts +2 -1
- package/lib/renderer/helpers/renderer.sources.helper.d.ts +6 -1
- package/lib/renderer/helpers/renderer.validations.helper.d.ts +4 -1
- package/lib/renderer/renderer.component.d.ts +1 -1
- package/package.json +2 -1
- package/esm2015/lib/renderer/form-view/form-view.decorators.js +0 -93
- package/lib/renderer/form-view/form-view.decorators.d.ts +0 -7
|
@@ -1,8 +1,8 @@
|
|
|
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('kwikui'), require('lodash'), require('@taiga-ui/core'), require('@taiga-ui/kit'), require('rxjs/operators'), require('jsonpath'), require('@taiga-ui/cdk'), require('@angular/common'), 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', 'kwikui', 'lodash', '@taiga-ui/core', '@taiga-ui/kit', 'rxjs/operators', 'jsonpath', '@taiga-ui/cdk', '@angular/common', '@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.
|
|
5
|
-
})(this, (function (exports, dragDrop, i0, i6, i2, _, i3, i4, operators, jp, cdk, i5, animations, http) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/drag-drop'), require('@angular/core'), require('@angular/forms'), require('kwikui'), require('lodash'), require('kwikid-toolkit'), require('@taiga-ui/core'), require('@taiga-ui/kit'), require('rxjs/operators'), require('jsonpath'), require('@taiga-ui/cdk'), require('@angular/common'), 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', 'kwikui', 'lodash', 'kwikid-toolkit', '@taiga-ui/core', '@taiga-ui/kit', 'rxjs/operators', 'jsonpath', '@taiga-ui/cdk', '@angular/common', '@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.kwikui, global.lodash, global["kwikid-toolkit"], global["@taiga-ui/core"], global["@taiga-ui/kit"], global.rxjs.operators, global.jsonpath, global["@taiga-ui/cdk"], global.ng.common, global.ng.animations, global.ng.common.http));
|
|
5
|
+
})(this, (function (exports, dragDrop, i0, i6, i2, _, kwikidToolkit, i3, i4, operators, jp, cdk, i5, animations, http) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -659,103 +659,6 @@
|
|
|
659
659
|
EFieldType["AADHAAR_NUMBER"] = "aadhaar-number";
|
|
660
660
|
})(EFieldType || (EFieldType = {}));
|
|
661
661
|
|
|
662
|
-
/**
|
|
663
|
-
* A function that logs the execution of a method.
|
|
664
|
-
* @param {any} target - The object the method belongs to.
|
|
665
|
-
* @param {string} propertyKey - The name of the method.
|
|
666
|
-
* @param {PropertyDescriptor} descriptor - The property descriptor for the method.
|
|
667
|
-
*/
|
|
668
|
-
function log(target, propertyKey, descriptor) {
|
|
669
|
-
// save a reference to the original method
|
|
670
|
-
var originalMethod = descriptor.value;
|
|
671
|
-
// update the descriptor value with a new function that will log and execute the original method
|
|
672
|
-
descriptor.value = function () {
|
|
673
|
-
var args = [];
|
|
674
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
675
|
-
args[_i] = arguments[_i];
|
|
676
|
-
}
|
|
677
|
-
console.group("Logging Method"); // start a new logging group
|
|
678
|
-
console.time("Execution Time:"); // start a timer
|
|
679
|
-
var result; // declare result variable
|
|
680
|
-
try {
|
|
681
|
-
// execute the original method and save the result
|
|
682
|
-
result = originalMethod.apply(this, args);
|
|
683
|
-
}
|
|
684
|
-
catch (error) {
|
|
685
|
-
// if an error is thrown, log the error and throw it again
|
|
686
|
-
logSyncMethodError(target.constructor.name, propertyKey, args, error);
|
|
687
|
-
console.timeEnd("Execution Time:"); // stop the timer
|
|
688
|
-
console.groupEnd(); // end the logging group
|
|
689
|
-
throw error;
|
|
690
|
-
}
|
|
691
|
-
// if the result is a Promise, handle it as an async method
|
|
692
|
-
if (result instanceof Promise) {
|
|
693
|
-
result = result
|
|
694
|
-
.then(function (resolvedValue) {
|
|
695
|
-
// on success, log the resolved value and return it
|
|
696
|
-
logAsyncMethod(target.constructor.name, propertyKey, args, resolvedValue);
|
|
697
|
-
console.timeEnd("Execution Time:"); // stop the timer
|
|
698
|
-
console.groupEnd(); // end the logging group
|
|
699
|
-
return resolvedValue;
|
|
700
|
-
})
|
|
701
|
-
.catch(function (error) {
|
|
702
|
-
// on error, log the error and throw it again
|
|
703
|
-
logAsyncMethodError(target.constructor.name, propertyKey, args, error);
|
|
704
|
-
console.timeEnd("Execution Time:"); // stop the timer
|
|
705
|
-
console.groupEnd(); // end the logging group
|
|
706
|
-
throw error;
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
else {
|
|
710
|
-
// if the result is not a Promise, handle it as a sync method
|
|
711
|
-
logSyncMethod(target.constructor.name, propertyKey, args, result);
|
|
712
|
-
console.timeEnd("Execution Time:");
|
|
713
|
-
console.groupEnd();
|
|
714
|
-
}
|
|
715
|
-
return result;
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* This function logs a sync method's information to the console.
|
|
720
|
-
* @param {string} className - The name of the class where the method belongs.
|
|
721
|
-
* @param {string} methodName - The name of the method being called.
|
|
722
|
-
* @param {any[]} args - An array of arguments passed to the method.
|
|
723
|
-
* @param {any} result - The result of the method.
|
|
724
|
-
*/
|
|
725
|
-
function logSyncMethod(className, methodName, args, result) {
|
|
726
|
-
console.log("%cType: Sync Method -", "color: #0d47a1; font-weight: bold;", "\nClass:", className, "\nMethod:", methodName, "\nArgs:", args, "\nReturn:", result);
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* Logs an error that occurred during the execution of a synchronous method.
|
|
730
|
-
* @param {string} className - The name of the class the method belongs to.
|
|
731
|
-
* @param {string} methodName - The name of the method.
|
|
732
|
-
* @param {any[]} args - The arguments passed to the method.
|
|
733
|
-
* @param {Error} error - The error that occurred.
|
|
734
|
-
*/
|
|
735
|
-
function logSyncMethodError(className, methodName, args, error) {
|
|
736
|
-
console.log("%cType: Sync Method -", "color: #0d47a1; font-weight: bold;", "\nClass:", className, "\nMethod:", methodName, "\nArgs:", args, "\nError:", error);
|
|
737
|
-
}
|
|
738
|
-
/**
|
|
739
|
-
* Logs the result of the execution of an asynchronous method.
|
|
740
|
-
* @param {string} className - The name of the class the method belongs to.
|
|
741
|
-
* @param {string} methodName - The name of the method.
|
|
742
|
-
* @param {any[]} args - The arguments passed to the method.
|
|
743
|
-
* @param {any} result - The result of the method execution.
|
|
744
|
-
*/
|
|
745
|
-
function logAsyncMethod(className, methodName, args, result) {
|
|
746
|
-
console.log("%cType: Async Method -", "color: #1565c0; font-weight: bold;", "\nClass:", className, "\nMethod:", methodName, "\nArgs:", args, "\nReturn:", result);
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* Logs an error that occurred during the execution of an asynchronous method.
|
|
750
|
-
* @param {string} className - The name of the class the method belongs to.
|
|
751
|
-
* @param {string} methodName - The name of the method.
|
|
752
|
-
* @param {any[]} args - The arguments passed to the method.
|
|
753
|
-
* @param {Error} error - The error that occurred.
|
|
754
|
-
*/
|
|
755
|
-
function logAsyncMethodError(className, methodName, args, error) {
|
|
756
|
-
console.log("%cType: Async Method -", "color: #1565c0; font-weight: bold;", "\nClass:", className, "\nMethod:", methodName, "\nArgs:", args, "\nError:", error);
|
|
757
|
-
}
|
|
758
|
-
|
|
759
662
|
var hasKey$2 = function (object, key) {
|
|
760
663
|
return object.hasOwnProperty(key);
|
|
761
664
|
};
|
|
@@ -978,7 +881,7 @@
|
|
|
978
881
|
return Condition;
|
|
979
882
|
}());
|
|
980
883
|
__decorate([
|
|
981
|
-
|
|
884
|
+
kwikidToolkit.logMethod
|
|
982
885
|
], Condition$1.prototype, "evaluate", null);
|
|
983
886
|
|
|
984
887
|
var Actions$1 = /** @class */ (function () {
|
|
@@ -1007,7 +910,7 @@
|
|
|
1007
910
|
return Actions;
|
|
1008
911
|
}());
|
|
1009
912
|
__decorate([
|
|
1010
|
-
|
|
913
|
+
kwikidToolkit.logMethod
|
|
1011
914
|
], Actions$1.prototype, "execute", null);
|
|
1012
915
|
|
|
1013
916
|
var ERuleKey;
|
|
@@ -1216,10 +1119,10 @@
|
|
|
1216
1119
|
return Sources;
|
|
1217
1120
|
}());
|
|
1218
1121
|
__decorate([
|
|
1219
|
-
|
|
1122
|
+
kwikidToolkit.logMethod
|
|
1220
1123
|
], Sources$1.prototype, "getValueFromSource", null);
|
|
1221
1124
|
__decorate([
|
|
1222
|
-
|
|
1125
|
+
kwikidToolkit.logMethod
|
|
1223
1126
|
], Sources$1.prototype, "setValueToSource", null);
|
|
1224
1127
|
|
|
1225
1128
|
var Rules$1 = /** @class */ (function () {
|
|
@@ -1304,10 +1207,10 @@
|
|
|
1304
1207
|
return Rules;
|
|
1305
1208
|
}());
|
|
1306
1209
|
__decorate([
|
|
1307
|
-
|
|
1210
|
+
kwikidToolkit.logMethod
|
|
1308
1211
|
], Rules$1.prototype, "evaluate", null);
|
|
1309
1212
|
__decorate([
|
|
1310
|
-
|
|
1213
|
+
kwikidToolkit.logMethod
|
|
1311
1214
|
], Rules$1.prototype, "mapping", null);
|
|
1312
1215
|
|
|
1313
1216
|
var Defaults = /** @class */ (function () {
|
|
@@ -1403,7 +1306,7 @@
|
|
|
1403
1306
|
return Defaults;
|
|
1404
1307
|
}());
|
|
1405
1308
|
__decorate([
|
|
1406
|
-
|
|
1309
|
+
kwikidToolkit.logMethod
|
|
1407
1310
|
], Defaults.prototype, "getDefaultValue", null);
|
|
1408
1311
|
|
|
1409
1312
|
var findFieldFromKey = function (fields, key) {
|
|
@@ -1800,16 +1703,16 @@
|
|
|
1800
1703
|
return Validations;
|
|
1801
1704
|
}());
|
|
1802
1705
|
__decorate([
|
|
1803
|
-
|
|
1706
|
+
kwikidToolkit.logMethod
|
|
1804
1707
|
], Validations$1.prototype, "getFieldValidators", null);
|
|
1805
1708
|
__decorate([
|
|
1806
|
-
|
|
1709
|
+
kwikidToolkit.logMethod
|
|
1807
1710
|
], Validations$1.prototype, "getFormValidationErrors", null);
|
|
1808
1711
|
__decorate([
|
|
1809
|
-
|
|
1712
|
+
kwikidToolkit.logMethod
|
|
1810
1713
|
], Validations$1.prototype, "findInvalidControlsRecursive", null);
|
|
1811
1714
|
__decorate([
|
|
1812
|
-
|
|
1715
|
+
kwikidToolkit.logMethod
|
|
1813
1716
|
], Validations$1.prototype, "validateField", null);
|
|
1814
1717
|
|
|
1815
1718
|
var KwikIDFormViewService = /** @class */ (function () {
|
|
@@ -1863,7 +1766,7 @@
|
|
|
1863
1766
|
return KwikIDFormViewService;
|
|
1864
1767
|
}());
|
|
1865
1768
|
__decorate([
|
|
1866
|
-
|
|
1769
|
+
kwikidToolkit.logMethod
|
|
1867
1770
|
], KwikIDFormViewService.prototype, "createFormGroup", null);
|
|
1868
1771
|
|
|
1869
1772
|
var Apis = /** @class */ (function () {
|
|
@@ -2087,13 +1990,13 @@
|
|
|
2087
1990
|
return Apis;
|
|
2088
1991
|
}());
|
|
2089
1992
|
__decorate([
|
|
2090
|
-
|
|
1993
|
+
kwikidToolkit.logMethod
|
|
2091
1994
|
], Apis.prototype, "setRequestBodyParams", null);
|
|
2092
1995
|
__decorate([
|
|
2093
|
-
|
|
1996
|
+
kwikidToolkit.logMethod
|
|
2094
1997
|
], Apis.prototype, "validateRequestBody", null);
|
|
2095
1998
|
__decorate([
|
|
2096
|
-
|
|
1999
|
+
kwikidToolkit.logMethod
|
|
2097
2000
|
], Apis.prototype, "validateApiCallResponse", null);
|
|
2098
2001
|
|
|
2099
2002
|
var KwikIDFormViewComponent = /** @class */ (function () {
|
|
@@ -3131,123 +3034,123 @@
|
|
|
3131
3034
|
return KwikIDFormViewComponent;
|
|
3132
3035
|
}());
|
|
3133
3036
|
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDFormViewComponent, deps: [{ token: i4.TuiPushService }, { token: i3.TuiAlertService }, { token: KwikIDFormViewService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3134
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", apiCallResponse: "apiCallResponse", isMobileView: "isMobileView", allFormsData: "allFormsData", formsList: "formsList" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", getActiveFormData: "getActiveFormData" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0__namespace, template: "<div\r\n class=\"kwikid-form-container\"\r\n *ngIf=\"!this.loading\"\r\n>\r\n <div id=\"uf-form-fields-header-container\">\r\n <div id=\"uf-form-fields-title\">\r\n {{ this.formConfig.title }}\r\n </div>\r\n <div id=\"uf-form-fields-steps\">\r\n Step {{ this.formConfig.sequenceNo }} of {{ this.formsList.length }}\r\n </div>\r\n <hr />\r\n </div>\r\n <form\r\n class=\"kwikid-form show\"\r\n [formGroup]=\"this.formGroup\"\r\n >\r\n <ng-container *ngFor=\"let field of this.formFields; let i = index\">\r\n <ng-container [ngSwitch]=\"field.type\">\r\n <!-- Form Title -->\r\n <ng-container *ngSwitchCase=\"'title'\">\r\n <div\r\n class=\"title\"\r\n [class.hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <div>\r\n {{ field.label }}\r\n </div>\r\n <kwikui-button\r\n *ngIf=\"field?.reset\"\r\n appearance=\"whiteblock\"\r\n size=\"s\"\r\n label=\"Reset\"\r\n (onClick)=\"this.handleOnClickResetFormFields($event, field)\"\r\n ></kwikui-button>\r\n </div>\r\n </ng-container>\r\n <!-- Input Text -->\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input\r\n [case]=\"field?.properties?.case\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field.label\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [type]=\"'text'\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Checkbox -->\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-checkbox-block\r\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.properties?.placeholder\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [size]=\"field?.properties?.size ?? 'l'\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-checkbox-block\r\n ><kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-number\r\n [decimal]=\"field?.properties?.decimal\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [max]=\"field?.properties?.max\"\r\n [min]=\"field?.properties?.min\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [postfix]=\"field?.properties?.postfix ?? ''\"\r\n [precision]=\"field?.properties?.precision\"\r\n [prefix]=\"field?.properties?.prefix ?? ''\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-number\r\n ><kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-date\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field.label\"\r\n [max]=\"field?.properties?.max\"\r\n [min]=\"field?.properties?.min\"\r\n [placeholder]=\"field?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-date>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Phone -->\r\n <ng-container *ngSwitchCase=\"'phone'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-phone\r\n [countryCode]=\"field?.properties?.countryCode\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [phoneMaskAfterCountryCode]=\"\r\n field?.properties?.phoneMaskAfterCountryCode\r\n \"\r\n [placeholder]=\"field?.placeholder\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-phone>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Radio -->\r\n <ng-container *ngSwitchCase=\"'radio'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <label\r\n [tuiLabel]=\"labelTemplate\"\r\n style=\"min-height: auto\"\r\n >\r\n <kwikui-radio-list\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [items]=\"field?.options\"\r\n [label]=\"field?.label\"\r\n [orientation]=\"field?.properties?.orientation\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [size]=\"field?.properties?.size\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-radio-list>\r\n </label>\r\n <ng-template #labelTemplate>\r\n <p\r\n class=\"tui-space_bottom-2\"\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <b>\r\n {{ field.label }}\r\n <span *ngIf=\"field.validators?.required\"></span>\r\n </b>\r\n </p>\r\n </ng-template>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Dropdown -->\r\n <ng-container *ngSwitchCase=\"'dropdown-with-search'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-select-combobox\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field.label\"\r\n [options]=\"field.options\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-select-combobox>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- API Call -->\r\n <ng-container *ngSwitchCase=\"'api-call'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-button-api-call\r\n [apiStatus]=\"field?.api?.status?.value\"\r\n [class]=\"field?.class\"\r\n [disabled]=\"field?.disabled\"\r\n [id]=\"field.key\"\r\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\r\n [showLoader]=\"field?.disabled === 'loading'\"\r\n shape=\"null\"\r\n size=\"m\"\r\n styles=\"width: fit-content\"\r\n (onClick)=\"this.handleOnClickApiCall($event)\"\r\n ></kwikui-button-api-call>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Mobile OTP -->\r\n <ng-container *ngSwitchCase=\"'otp'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-otp\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [mask]=\"field?.properties?.mask\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-otp>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Aadhaar Number -->\r\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-aadhaar\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [placeholder]=\"field?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-aadhaar>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </form>\r\n <div class=\"kwikid-form-buttons\">\r\n <kwikui-button\r\n *ngIf=\"this.isMobileView\"\r\n [disabled]=\"viewFormsButton.disabled\"\r\n id=\"\"\r\n label=\"View Forms\"\r\n [showLoader]=\"viewFormsButton.showLoader\"\r\n styles=\"\"\r\n class=\"\"\r\n type=\"button\"\r\n appearance=\"secondary\"\r\n icon=\"\"\r\n iconRight=\"\"\r\n [shape]=\"null\"\r\n size=\"m\"\r\n styles=\"width: 100%\"\r\n (onClick)=\"this.handleOnClickViewForms($event)\"\r\n ></kwikui-button>\r\n <kwikui-button\r\n [disabled]=\"saveFormButton.disabled\"\r\n id=\"\"\r\n label=\"Save\"\r\n [showLoader]=\"saveFormButton.showLoader\"\r\n styles=\"\"\r\n class=\"\"\r\n type=\"button\"\r\n appearance=\"primary\"\r\n icon=\"\"\r\n iconRight=\"\"\r\n [shape]=\"null\"\r\n size=\"m\"\r\n styles=\"width: 100%\"\r\n (onClick)=\"this.handleOnClickSaveForm($event)\"\r\n ></kwikui-button>\r\n </div>\r\n</div>\r\n<div\r\n class=\"kwikid-form-container-loading\"\r\n *ngIf=\"this.loading\"\r\n>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n</div>\r\n<tui-push\r\n id=\"field-error-notification\"\r\n *tuiPush=\"showErrorNotification\"\r\n heading=\"Missing/Incorrect Fields!\"\r\n type=\"Error\"\r\n (close)=\"toggleErrorNotification(false)\"\r\n>\r\n <tui-svg\r\n src=\"tuiIconCancel\"\r\n style=\"color: #fff !important\"\r\n >\r\n </tui-svg>\r\n</tui-push>\r\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", "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", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace.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", "validators", "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.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: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__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: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace.TuiPushDirective, selector: "tui-push" }] });
|
|
3037
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", apiCallResponse: "apiCallResponse", isMobileView: "isMobileView", allFormsData: "allFormsData", formsList: "formsList" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall", getActiveFormData: "getActiveFormData" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0__namespace, template: "<div\r\n class=\"kwikid-form-container\"\r\n *ngIf=\"!this.loading\"\r\n>\r\n <div id=\"uf-form-fields-header-container\">\r\n <div id=\"uf-form-fields-title\">\r\n {{ this.formConfig.title }}\r\n </div>\r\n <div id=\"uf-form-fields-steps\">\r\n Step {{ this.formConfig.sequenceNo }} of {{ this.formsList.length }}\r\n </div>\r\n <hr />\r\n </div>\r\n <form\r\n class=\"kwikid-form show\"\r\n [formGroup]=\"this.formGroup\"\r\n >\r\n <ng-container *ngFor=\"let field of this.formFields; let i = index\">\r\n <ng-container [ngSwitch]=\"field.type\">\r\n <!-- Form Title -->\r\n <ng-container *ngSwitchCase=\"'title'\">\r\n <div\r\n class=\"title\"\r\n [class.hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <div>\r\n {{ field.label }}\r\n </div>\r\n <kwikui-button\r\n *ngIf=\"field?.reset\"\r\n appearance=\"whiteblock\"\r\n size=\"s\"\r\n label=\"Reset\"\r\n (onClick)=\"this.handleOnClickResetFormFields($event, field)\"\r\n ></kwikui-button>\r\n </div>\r\n </ng-container>\r\n <!-- Input Text -->\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input\r\n [case]=\"field?.properties?.case\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field.label\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [type]=\"'text'\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Checkbox -->\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-checkbox-block\r\n [contentAlign]=\"field?.properties?.contentAlign ?? 'left'\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.properties?.placeholder\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [size]=\"field?.properties?.size ?? 'l'\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-checkbox-block\r\n ><kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Number -->\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-number\r\n [decimal]=\"field?.properties?.decimal\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [max]=\"field?.properties?.max\"\r\n [min]=\"field?.properties?.min\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [postfix]=\"field?.properties?.postfix ?? ''\"\r\n [precision]=\"field?.properties?.precision\"\r\n [prefix]=\"field?.properties?.prefix ?? ''\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-number\r\n ><kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-date\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field.label\"\r\n [max]=\"field?.properties?.max\"\r\n [min]=\"field?.properties?.min\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-date>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Phone -->\r\n <ng-container *ngSwitchCase=\"'phone'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-phone\r\n [countryCode]=\"field?.properties?.countryCode\"\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [phoneMaskAfterCountryCode]=\"\r\n field?.properties?.phoneMaskAfterCountryCode\r\n \"\r\n [placeholder]=\"field?.placeholder\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-phone>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Input Radio -->\r\n <ng-container *ngSwitchCase=\"'radio'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <label\r\n [tuiLabel]=\"labelTemplate\"\r\n style=\"min-height: auto\"\r\n >\r\n <kwikui-radio-list\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [items]=\"field?.options\"\r\n [label]=\"field?.label\"\r\n [orientation]=\"field?.properties?.orientation\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [size]=\"field?.properties?.size\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-radio-list>\r\n </label>\r\n <ng-template #labelTemplate>\r\n <p\r\n class=\"tui-space_bottom-2\"\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <b>\r\n {{ field.label }}\r\n <span *ngIf=\"field.validators?.required\"></span>\r\n </b>\r\n </p>\r\n </ng-template>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Dropdown -->\r\n <ng-container *ngSwitchCase=\"'dropdown-with-search'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-select-combobox\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field.label\"\r\n [options]=\"field.options\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-select-combobox>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- API Call -->\r\n <ng-container *ngSwitchCase=\"'api-call'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-button-api-call\r\n [apiStatus]=\"field?.api?.status?.value\"\r\n [class]=\"field?.class\"\r\n [disabled]=\"field?.disabled\"\r\n [id]=\"field.key\"\r\n [label]=\"field?.api?.status?.labels[field?.api?.status?.value]\"\r\n [showLoader]=\"field?.disabled === 'loading'\"\r\n shape=\"null\"\r\n size=\"m\"\r\n styles=\"width: fit-content\"\r\n (onClick)=\"this.handleOnClickApiCall($event)\"\r\n ></kwikui-button-api-call>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Mobile OTP -->\r\n <ng-container *ngSwitchCase=\"'otp'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-otp\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [mask]=\"field?.properties?.mask\"\r\n [placeholder]=\"field?.properties?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-otp>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n <!-- Aadhaar Number -->\r\n <ng-container *ngSwitchCase=\"'aadhaar-number'\">\r\n <div\r\n [hidden]=\"field?.hidden\"\r\n id=\"field_{{ field.key }}\"\r\n >\r\n <kwikui-input-aadhaar\r\n [disabled]=\"field?.disabled\"\r\n [focus]=\"field?.focus\"\r\n [formControl]=\"formGroup.controls[field.key]\"\r\n [formControlName]=\"field.key\"\r\n [id]=\"field.key\"\r\n [invalid]=\"field?.invalid\"\r\n [label]=\"field?.label\"\r\n [placeholder]=\"field?.placeholder\"\r\n [properties]=\"field?.properties\"\r\n [validators]=\"field?.validators\"\r\n (getKeyValue)=\"handleGetKeyValue($event)\"\r\n ></kwikui-input-aadhaar>\r\n <kwikui-messages\r\n [messages]=\"field.messages\"\r\n [id]=\"field.key\"\r\n ></kwikui-messages>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </form>\r\n <div class=\"kwikid-form-buttons\">\r\n <kwikui-button\r\n *ngIf=\"this.isMobileView\"\r\n [disabled]=\"viewFormsButton.disabled\"\r\n id=\"\"\r\n label=\"View Forms\"\r\n [showLoader]=\"viewFormsButton.showLoader\"\r\n styles=\"\"\r\n class=\"\"\r\n type=\"button\"\r\n appearance=\"secondary\"\r\n icon=\"\"\r\n iconRight=\"\"\r\n [shape]=\"null\"\r\n size=\"m\"\r\n styles=\"width: 100%\"\r\n (onClick)=\"this.handleOnClickViewForms($event)\"\r\n ></kwikui-button>\r\n <kwikui-button\r\n [disabled]=\"saveFormButton.disabled\"\r\n id=\"\"\r\n label=\"Save\"\r\n [showLoader]=\"saveFormButton.showLoader\"\r\n styles=\"\"\r\n class=\"\"\r\n type=\"button\"\r\n appearance=\"primary\"\r\n icon=\"\"\r\n iconRight=\"\"\r\n [shape]=\"null\"\r\n size=\"m\"\r\n styles=\"width: 100%\"\r\n (onClick)=\"this.handleOnClickSaveForm($event)\"\r\n ></kwikui-button>\r\n </div>\r\n</div>\r\n<div\r\n class=\"kwikid-form-container-loading\"\r\n *ngIf=\"this.loading\"\r\n>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n <div\r\n class=\"large-wrapper\"\r\n [class.tui-skeleton]=\"this.loading\"\r\n [class.tui-skeleton_rounded]=\"this.loading\"\r\n ></div>\r\n</div>\r\n<tui-push\r\n id=\"field-error-notification\"\r\n *tuiPush=\"showErrorNotification\"\r\n heading=\"Missing/Incorrect Fields!\"\r\n type=\"Error\"\r\n (close)=\"toggleErrorNotification(false)\"\r\n>\r\n <tui-svg\r\n src=\"tuiIconCancel\"\r\n style=\"color: #fff !important\"\r\n >\r\n </tui-svg>\r\n</tui-push>\r\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", "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", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputDateComponent, selector: "kwikui-input-date", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "min", "max", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2__namespace.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3__namespace.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", "validators", "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.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: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__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: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4__namespace.TuiPushDirective, selector: "tui-push" }] });
|
|
3135
3038
|
__decorate([
|
|
3136
|
-
|
|
3039
|
+
kwikidToolkit.logMethod
|
|
3137
3040
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
3138
3041
|
__decorate([
|
|
3139
|
-
|
|
3042
|
+
kwikidToolkit.logMethod
|
|
3140
3043
|
], KwikIDFormViewComponent.prototype, "ngAfterViewInit", null);
|
|
3141
3044
|
__decorate([
|
|
3142
|
-
|
|
3045
|
+
kwikidToolkit.logMethod
|
|
3143
3046
|
], KwikIDFormViewComponent.prototype, "ngOnChanges", null);
|
|
3144
3047
|
__decorate([
|
|
3145
|
-
|
|
3048
|
+
kwikidToolkit.logMethod
|
|
3146
3049
|
], KwikIDFormViewComponent.prototype, "initFormConfig", null);
|
|
3147
3050
|
__decorate([
|
|
3148
|
-
|
|
3051
|
+
kwikidToolkit.logMethod
|
|
3149
3052
|
], KwikIDFormViewComponent.prototype, "setFormFieldsFromFormConfig", null);
|
|
3150
3053
|
__decorate([
|
|
3151
|
-
|
|
3054
|
+
kwikidToolkit.logMethod
|
|
3152
3055
|
], KwikIDFormViewComponent.prototype, "setFormFieldGroupsFromFormConfig", null);
|
|
3153
3056
|
__decorate([
|
|
3154
|
-
|
|
3057
|
+
kwikidToolkit.logMethod
|
|
3155
3058
|
], KwikIDFormViewComponent.prototype, "setFormDataFromAllFormsData", null);
|
|
3156
3059
|
__decorate([
|
|
3157
|
-
|
|
3060
|
+
kwikidToolkit.logMethod
|
|
3158
3061
|
], KwikIDFormViewComponent.prototype, "handleConnectedElementFieldGroupActions", null);
|
|
3159
3062
|
__decorate([
|
|
3160
|
-
|
|
3063
|
+
kwikidToolkit.logMethod
|
|
3161
3064
|
], KwikIDFormViewComponent.prototype, "handleConnectedElementFieldGroup", null);
|
|
3162
3065
|
__decorate([
|
|
3163
|
-
|
|
3066
|
+
kwikidToolkit.logMethod
|
|
3164
3067
|
], KwikIDFormViewComponent.prototype, "handleConnectedElementFieldActions", null);
|
|
3165
3068
|
__decorate([
|
|
3166
|
-
|
|
3069
|
+
kwikidToolkit.logMethod
|
|
3167
3070
|
], KwikIDFormViewComponent.prototype, "handleConnectedElementFields", null);
|
|
3168
3071
|
__decorate([
|
|
3169
|
-
|
|
3072
|
+
kwikidToolkit.logMethod
|
|
3170
3073
|
], KwikIDFormViewComponent.prototype, "handleConnectedElements", null);
|
|
3171
3074
|
__decorate([
|
|
3172
|
-
|
|
3075
|
+
kwikidToolkit.logMethod
|
|
3173
3076
|
], KwikIDFormViewComponent.prototype, "handleGetKeyValue", null);
|
|
3174
3077
|
__decorate([
|
|
3175
|
-
|
|
3078
|
+
kwikidToolkit.logMethod
|
|
3176
3079
|
], KwikIDFormViewComponent.prototype, "handleOnClickResetFormFields", null);
|
|
3177
3080
|
__decorate([
|
|
3178
|
-
|
|
3081
|
+
kwikidToolkit.logMethod
|
|
3179
3082
|
], KwikIDFormViewComponent.prototype, "handleOnClickApiCall", null);
|
|
3180
3083
|
__decorate([
|
|
3181
|
-
|
|
3084
|
+
kwikidToolkit.logMethod
|
|
3182
3085
|
], KwikIDFormViewComponent.prototype, "handleOnClickViewForms", null);
|
|
3183
3086
|
__decorate([
|
|
3184
|
-
|
|
3087
|
+
kwikidToolkit.logMethod
|
|
3185
3088
|
], KwikIDFormViewComponent.prototype, "handleOnClickSaveForm", null);
|
|
3186
3089
|
__decorate([
|
|
3187
|
-
|
|
3090
|
+
kwikidToolkit.logMethod
|
|
3188
3091
|
], KwikIDFormViewComponent.prototype, "toggleErrorNotification", null);
|
|
3189
3092
|
__decorate([
|
|
3190
|
-
|
|
3093
|
+
kwikidToolkit.logMethod
|
|
3191
3094
|
], KwikIDFormViewComponent.prototype, "fieldHide", null);
|
|
3192
3095
|
__decorate([
|
|
3193
|
-
|
|
3096
|
+
kwikidToolkit.logMethod
|
|
3194
3097
|
], KwikIDFormViewComponent.prototype, "fieldGroupHide", null);
|
|
3195
3098
|
__decorate([
|
|
3196
|
-
|
|
3099
|
+
kwikidToolkit.logMethod
|
|
3197
3100
|
], KwikIDFormViewComponent.prototype, "fieldShow", null);
|
|
3198
3101
|
__decorate([
|
|
3199
|
-
|
|
3102
|
+
kwikidToolkit.logMethod
|
|
3200
3103
|
], KwikIDFormViewComponent.prototype, "fieldGroupShow", null);
|
|
3201
3104
|
__decorate([
|
|
3202
|
-
|
|
3105
|
+
kwikidToolkit.logMethod
|
|
3203
3106
|
], KwikIDFormViewComponent.prototype, "fieldDisable", null);
|
|
3204
3107
|
__decorate([
|
|
3205
|
-
|
|
3108
|
+
kwikidToolkit.logMethod
|
|
3206
3109
|
], KwikIDFormViewComponent.prototype, "fieldGroupDisable", null);
|
|
3207
3110
|
__decorate([
|
|
3208
|
-
|
|
3111
|
+
kwikidToolkit.logMethod
|
|
3209
3112
|
], KwikIDFormViewComponent.prototype, "fieldEnable", null);
|
|
3210
3113
|
__decorate([
|
|
3211
|
-
|
|
3114
|
+
kwikidToolkit.logMethod
|
|
3212
3115
|
], KwikIDFormViewComponent.prototype, "fieldGroupEnable", null);
|
|
3213
3116
|
__decorate([
|
|
3214
|
-
|
|
3117
|
+
kwikidToolkit.logMethod
|
|
3215
3118
|
], KwikIDFormViewComponent.prototype, "fieldReset", null);
|
|
3216
3119
|
__decorate([
|
|
3217
|
-
|
|
3120
|
+
kwikidToolkit.logMethod
|
|
3218
3121
|
], KwikIDFormViewComponent.prototype, "fieldErrorShow", null);
|
|
3219
3122
|
__decorate([
|
|
3220
|
-
|
|
3123
|
+
kwikidToolkit.logMethod
|
|
3221
3124
|
], KwikIDFormViewComponent.prototype, "fieldErrorHide", null);
|
|
3222
3125
|
__decorate([
|
|
3223
|
-
|
|
3126
|
+
kwikidToolkit.logMethod
|
|
3224
3127
|
], KwikIDFormViewComponent.prototype, "fieldMessageShow", null);
|
|
3225
3128
|
__decorate([
|
|
3226
|
-
|
|
3129
|
+
kwikidToolkit.logMethod
|
|
3227
3130
|
], KwikIDFormViewComponent.prototype, "fieldMessageHide", null);
|
|
3228
3131
|
__decorate([
|
|
3229
|
-
|
|
3132
|
+
kwikidToolkit.logMethod
|
|
3230
3133
|
], KwikIDFormViewComponent.prototype, "setObjectValue", null);
|
|
3231
3134
|
__decorate([
|
|
3232
|
-
|
|
3135
|
+
kwikidToolkit.logMethod
|
|
3233
3136
|
], KwikIDFormViewComponent.prototype, "patchFieldControlValue", null);
|
|
3234
3137
|
__decorate([
|
|
3235
|
-
|
|
3138
|
+
kwikidToolkit.logMethod
|
|
3236
3139
|
], KwikIDFormViewComponent.prototype, "isFieldValid", null);
|
|
3237
3140
|
__decorate([
|
|
3238
|
-
|
|
3141
|
+
kwikidToolkit.logMethod
|
|
3239
3142
|
], KwikIDFormViewComponent.prototype, "isFieldEnabled", null);
|
|
3240
3143
|
__decorate([
|
|
3241
|
-
|
|
3144
|
+
kwikidToolkit.logMethod
|
|
3242
3145
|
], KwikIDFormViewComponent.prototype, "getFormGroupRawValues", null);
|
|
3243
3146
|
__decorate([
|
|
3244
|
-
|
|
3147
|
+
kwikidToolkit.logMethod
|
|
3245
3148
|
], KwikIDFormViewComponent.prototype, "handleFieldTypeSearchText", null);
|
|
3246
3149
|
__decorate([
|
|
3247
|
-
|
|
3150
|
+
kwikidToolkit.logMethod
|
|
3248
3151
|
], KwikIDFormViewComponent.prototype, "takeActionOnFieldGroup", null);
|
|
3249
3152
|
__decorate([
|
|
3250
|
-
|
|
3153
|
+
kwikidToolkit.logMethod
|
|
3251
3154
|
], KwikIDFormViewComponent.prototype, "takeAction", null);
|
|
3252
3155
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDFormViewComponent, decorators: [{
|
|
3253
3156
|
type: i0.Component,
|
|
@@ -3357,6 +3260,9 @@
|
|
|
3357
3260
|
}());
|
|
3358
3261
|
/** @nocollapse */ KwikIDFormsListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDFormsListComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3359
3262
|
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: KwikIDFormsListComponent, selector: "kwikid-forms-list", inputs: { showFormFields: "showFormFields", userConfig: "userConfig", formsList: "formsList", formsListCompleted: "formsListCompleted", isMobileView: "isMobileView" }, outputs: { onClickSetActiveForm: "onClickSetActiveForm", onClickHideFormsList: "onClickHideFormsList", onClickSubmitForms: "onClickSubmitForms" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div id=\"sidebar-container\">\r\n <div id=\"sidebar\">\r\n <div ngClass=\"kwikid-form-header\">\r\n <div id=\"uf-header\">\r\n <div id=\"uf-header-logo-container\">\r\n <img\r\n id=\"uf-header-logo\"\r\n src=\"{{ this.userConfig.theme.clientLogo }}\"\r\n [ngClass]=\"'large-icon'\"\r\n />\r\n </div>\r\n </div>\r\n <hr />\r\n </div>\r\n <div id=\"uf-progress\">\r\n <div id=\"uf-progress-steps\">\r\n {{ this.formsListCompleted.length }} / {{ this.formsList.length }} Steps\r\n Completed\r\n </div>\r\n <kwikui-progress-segmented\r\n [max]=\"this.formsList.length\"\r\n size=\"m\"\r\n [value]=\"this.formsListCompleted.length\"\r\n ></kwikui-progress-segmented>\r\n </div>\r\n <div id=\"uf-sections-container\">\r\n <div\r\n *ngFor=\"let form of formsList; let i = index\"\r\n [class]=\"'uf-section-item'\"\r\n [class.completed]=\"form.status === 'completed' && !form.disabled\"\r\n [class.edit]=\"form.status === 'editable' && !form.disabled\"\r\n [class.locked]=\"form.status === 'locked' && form.disabled\"\r\n (click)=\"\r\n form.status === 'locked' && form.disabled\r\n ? undefined\r\n : handleOnClickSetActiveForm(form.key)\r\n \"\r\n >\r\n <div class=\"uf-form-section-card-title\">\r\n {{ form.title }}\r\n </div>\r\n <div class=\"uf-form-section-card-action\">\r\n <div\r\n *ngIf=\"form.status === 'completed' && !form.disabled\"\r\n class=\"uf-form-section-card-action-img completed\"\r\n >\r\n <tui-svg src=\"tuiIconCheckLarge\"></tui-svg>\r\n </div>\r\n <div\r\n *ngIf=\"form.status !== 'completed' && !form.disabled\"\r\n class=\"uf-form-section-card-action-img edit\"\r\n >\r\n <tui-svg src=\"tuiIconEdit\"></tui-svg>\r\n </div>\r\n <div\r\n *ngIf=\"form.status !== 'completed' && form.disabled\"\r\n class=\"uf-form-section-card-action-img locked\"\r\n >\r\n <tui-svg src=\"tuiIconLock\"></tui-svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div id=\"submit-sidebar-btn-container\">\r\n <kwikui-button\r\n [disabled]=\"false\"\r\n id=\"\"\r\n label=\"Submit\"\r\n [showLoader]=\"false\"\r\n styles=\"\"\r\n class=\"\"\r\n type=\"button\"\r\n appearance=\"primary\"\r\n icon=\"\"\r\n iconRight=\"\"\r\n [shape]=\"null\"\r\n size=\"m\"\r\n styles=\"width: 100%\"\r\n (onClick)=\"handleOnSubmitForms($event)\"\r\n ></kwikui-button>\r\n </div>\r\n </div>\r\n</div>\r\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 .1rem .5rem -.25rem gray;border-radius:.5rem;background-color:var(--tui-base-02)}.uf-section-item:hover{box-shadow:0 .2rem .75rem -.5rem #656565}#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-action{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-action .uf-form-section-card-action-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-action-img.completed{background-color:#228b22;padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-action-img.edit{background-color:#dc143c;padding:.25rem;border-radius:50%;color:#fff}.uf-form-section-card-action-img.locked{background-color:gray;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:#121212}@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: i2__namespace.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["value", "max", "size", "colors"] }, { type: i3__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3263
|
+
__decorate([
|
|
3264
|
+
kwikidToolkit.logMethod
|
|
3265
|
+
], KwikIDFormsListComponent.prototype, "ngOnChanges", null);
|
|
3360
3266
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDFormsListComponent, decorators: [{
|
|
3361
3267
|
type: i0.Component,
|
|
3362
3268
|
args: [{
|
|
@@ -3380,11 +3286,12 @@
|
|
|
3380
3286
|
type: i0.Output
|
|
3381
3287
|
}], onClickSubmitForms: [{
|
|
3382
3288
|
type: i0.Output
|
|
3383
|
-
}] } });
|
|
3289
|
+
}], ngOnChanges: [] } });
|
|
3384
3290
|
|
|
3385
3291
|
var Sources = /** @class */ (function () {
|
|
3386
|
-
function Sources(userConfig) {
|
|
3292
|
+
function Sources(userConfig, formsData) {
|
|
3387
3293
|
this._userConfig = userConfig;
|
|
3294
|
+
this._formsData = formsData;
|
|
3388
3295
|
}
|
|
3389
3296
|
Object.defineProperty(Sources.prototype, "userConfig", {
|
|
3390
3297
|
get: function () {
|
|
@@ -3396,6 +3303,16 @@
|
|
|
3396
3303
|
enumerable: false,
|
|
3397
3304
|
configurable: true
|
|
3398
3305
|
});
|
|
3306
|
+
Object.defineProperty(Sources.prototype, "formsData", {
|
|
3307
|
+
get: function () {
|
|
3308
|
+
return this._formsData;
|
|
3309
|
+
},
|
|
3310
|
+
set: function (value) {
|
|
3311
|
+
this._formsData = value;
|
|
3312
|
+
},
|
|
3313
|
+
enumerable: false,
|
|
3314
|
+
configurable: true
|
|
3315
|
+
});
|
|
3399
3316
|
Sources.prototype.getValueFromUserConfig = function (path) {
|
|
3400
3317
|
var value = "";
|
|
3401
3318
|
if (isNotEmpty(path)) {
|
|
@@ -3406,6 +3323,16 @@
|
|
|
3406
3323
|
}
|
|
3407
3324
|
return value;
|
|
3408
3325
|
};
|
|
3326
|
+
Sources.prototype.getValueFromFormsData = function (path) {
|
|
3327
|
+
var value = "";
|
|
3328
|
+
if (isNotEmpty(path)) {
|
|
3329
|
+
value = jpQueryWrapper(this._formsData, path);
|
|
3330
|
+
}
|
|
3331
|
+
else {
|
|
3332
|
+
value = setEmptyValue(this._formsData);
|
|
3333
|
+
}
|
|
3334
|
+
return value;
|
|
3335
|
+
};
|
|
3409
3336
|
Sources.prototype.getValueFromBrowserStorage = function (type, key) {
|
|
3410
3337
|
var value = "";
|
|
3411
3338
|
switch (type) {
|
|
@@ -3431,6 +3358,9 @@
|
|
|
3431
3358
|
case ESourceKey.USER_CONFIG:
|
|
3432
3359
|
value = this.getValueFromUserConfig(source.props.path);
|
|
3433
3360
|
break;
|
|
3361
|
+
case ESourceKey.ALL_FORMS_DATA:
|
|
3362
|
+
value = this.getValueFromFormsData(source.props.path);
|
|
3363
|
+
break;
|
|
3434
3364
|
case ESourceKey.BROWSER_STORAGE:
|
|
3435
3365
|
value = this.getValueFromBrowserStorage(source.props.browserStorage.type, source.props.browserStorage.key);
|
|
3436
3366
|
break;
|
|
@@ -3446,6 +3376,9 @@
|
|
|
3446
3376
|
Sources.prototype.setValueToUserConfig = function (path, value) {
|
|
3447
3377
|
this._userConfig = setValueToObject(this._userConfig, path, value);
|
|
3448
3378
|
};
|
|
3379
|
+
Sources.prototype.setValueToAllFormsData = function (path, value) {
|
|
3380
|
+
this._formsData = setValueToObject(this._formsData, path, value);
|
|
3381
|
+
};
|
|
3449
3382
|
Sources.prototype.setValueToBrowserStorage = function (type, key, value) {
|
|
3450
3383
|
switch (type) {
|
|
3451
3384
|
case EBrowserStorageType.LOCAL_STORAGE:
|
|
@@ -3467,18 +3400,22 @@
|
|
|
3467
3400
|
_a = source.key;
|
|
3468
3401
|
switch (_a) {
|
|
3469
3402
|
case ESourceKey.USER_CONFIG: return [3 /*break*/, 1];
|
|
3470
|
-
case ESourceKey.
|
|
3403
|
+
case ESourceKey.ALL_FORMS_DATA: return [3 /*break*/, 2];
|
|
3404
|
+
case ESourceKey.BROWSER_STORAGE: return [3 /*break*/, 3];
|
|
3471
3405
|
}
|
|
3472
|
-
return [3 /*break*/,
|
|
3406
|
+
return [3 /*break*/, 5];
|
|
3473
3407
|
case 1:
|
|
3474
3408
|
this.setValueToUserConfig(source.props.path, value);
|
|
3475
|
-
return [3 /*break*/,
|
|
3476
|
-
case 2:
|
|
3477
|
-
|
|
3409
|
+
return [3 /*break*/, 6];
|
|
3410
|
+
case 2:
|
|
3411
|
+
this.setValueToAllFormsData(source.props.path, value);
|
|
3412
|
+
return [3 /*break*/, 6];
|
|
3413
|
+
case 3: return [4 /*yield*/, this.setValueToBrowserStorage(source.props.browserStorage.type, source.props.browserStorage.key, value)];
|
|
3414
|
+
case 4:
|
|
3478
3415
|
_b.sent();
|
|
3479
|
-
return [3 /*break*/,
|
|
3480
|
-
case
|
|
3481
|
-
case
|
|
3416
|
+
return [3 /*break*/, 6];
|
|
3417
|
+
case 5: return [3 /*break*/, 6];
|
|
3418
|
+
case 6: return [2 /*return*/];
|
|
3482
3419
|
}
|
|
3483
3420
|
});
|
|
3484
3421
|
});
|
|
@@ -3528,9 +3465,10 @@
|
|
|
3528
3465
|
}());
|
|
3529
3466
|
|
|
3530
3467
|
var Actions = /** @class */ (function () {
|
|
3531
|
-
function Actions(action, ruleMapping, userConfig, takeAction) {
|
|
3468
|
+
function Actions(action, ruleMapping, userConfig, formsData, takeAction) {
|
|
3532
3469
|
this._action = action;
|
|
3533
3470
|
this._userConfig = userConfig;
|
|
3471
|
+
this._formsData = formsData;
|
|
3534
3472
|
this._ruleMapping = ruleMapping;
|
|
3535
3473
|
this._takeAction = takeAction;
|
|
3536
3474
|
}
|
|
@@ -3541,7 +3479,7 @@
|
|
|
3541
3479
|
condition = new Condition(this._action.condition, this._ruleMapping);
|
|
3542
3480
|
actionSuccess = condition.evaluate();
|
|
3543
3481
|
if (actionSuccess) {
|
|
3544
|
-
return [2 /*return*/, this._takeAction(this._action, this._userConfig)];
|
|
3482
|
+
return [2 /*return*/, this._takeAction(this._action, this._userConfig, this._formsData)];
|
|
3545
3483
|
}
|
|
3546
3484
|
return [2 /*return*/];
|
|
3547
3485
|
});
|
|
@@ -3551,14 +3489,15 @@
|
|
|
3551
3489
|
}());
|
|
3552
3490
|
|
|
3553
3491
|
var Rules = /** @class */ (function () {
|
|
3554
|
-
function Rules(
|
|
3492
|
+
function Rules(userConfig, formsData, rules) {
|
|
3555
3493
|
this._userConfig = userConfig;
|
|
3494
|
+
this._formsData = formsData;
|
|
3556
3495
|
this._rules = rules;
|
|
3557
3496
|
}
|
|
3558
3497
|
Rules.prototype.evaluate = function (rule) {
|
|
3559
3498
|
var ruleType = rule.key;
|
|
3560
3499
|
var ruleEvaluationStatus = false;
|
|
3561
|
-
var source = new Sources(this._userConfig);
|
|
3500
|
+
var source = new Sources(this._userConfig, this._formsData);
|
|
3562
3501
|
switch (ruleType) {
|
|
3563
3502
|
case ERuleKey.OBJECT_PATH_EXISTS:
|
|
3564
3503
|
var ruleObjectPathExists = rule;
|
|
@@ -3621,8 +3560,9 @@
|
|
|
3621
3560
|
}());
|
|
3622
3561
|
|
|
3623
3562
|
var Validations = /** @class */ (function () {
|
|
3624
|
-
function Validations(userConfig, takeAction) {
|
|
3563
|
+
function Validations(userConfig, formsData, takeAction) {
|
|
3625
3564
|
this._userConfig = userConfig;
|
|
3565
|
+
this._formsData = formsData;
|
|
3626
3566
|
this._takeAction = takeAction;
|
|
3627
3567
|
}
|
|
3628
3568
|
Object.defineProperty(Validations.prototype, "userConfig", {
|
|
@@ -3635,6 +3575,16 @@
|
|
|
3635
3575
|
enumerable: false,
|
|
3636
3576
|
configurable: true
|
|
3637
3577
|
});
|
|
3578
|
+
Object.defineProperty(Validations.prototype, "formsData", {
|
|
3579
|
+
get: function () {
|
|
3580
|
+
return this._formsData;
|
|
3581
|
+
},
|
|
3582
|
+
set: function (value) {
|
|
3583
|
+
this._formsData = value;
|
|
3584
|
+
},
|
|
3585
|
+
enumerable: false,
|
|
3586
|
+
configurable: true
|
|
3587
|
+
});
|
|
3638
3588
|
Validations.prototype.validateField = function () {
|
|
3639
3589
|
return __awaiter(this, void 0, void 0, function () {
|
|
3640
3590
|
var validations, triggers, rules, actions, rulesMapping, actions_1, actions_1_1, action, conditionEvaluation, actions_2, e_1_1;
|
|
@@ -3646,7 +3596,7 @@
|
|
|
3646
3596
|
triggers = validations === null || validations === void 0 ? void 0 : validations.triggers;
|
|
3647
3597
|
rules = validations.rules;
|
|
3648
3598
|
actions = validations.actions;
|
|
3649
|
-
rulesMapping = new Rules(
|
|
3599
|
+
rulesMapping = new Rules(this._userConfig, this._formsData, rules).mapping();
|
|
3650
3600
|
_b.label = 1;
|
|
3651
3601
|
case 1:
|
|
3652
3602
|
_b.trys.push([1, 6, 7, 8]);
|
|
@@ -3657,7 +3607,7 @@
|
|
|
3657
3607
|
action = actions_1_1.value;
|
|
3658
3608
|
conditionEvaluation = new Condition(action.condition, rulesMapping).evaluate();
|
|
3659
3609
|
if (!conditionEvaluation) return [3 /*break*/, 4];
|
|
3660
|
-
actions_2 = new Actions(action, rulesMapping, this._userConfig, this._takeAction);
|
|
3610
|
+
actions_2 = new Actions(action, rulesMapping, this._userConfig, this._formsData, this._takeAction);
|
|
3661
3611
|
return [4 /*yield*/, actions_2.execute()];
|
|
3662
3612
|
case 3:
|
|
3663
3613
|
_b.sent();
|
|
@@ -3760,6 +3710,7 @@
|
|
|
3760
3710
|
new Date().getDate() // Day - 31
|
|
3761
3711
|
));
|
|
3762
3712
|
}
|
|
3713
|
+
field.properties = _this.setMissingFieldKeyValue(field.properties, "placeholder", "");
|
|
3763
3714
|
field = _this.setFieldKeyValue(field, "hidden", false);
|
|
3764
3715
|
return field;
|
|
3765
3716
|
};
|
|
@@ -4283,7 +4234,7 @@
|
|
|
4283
4234
|
return Converter;
|
|
4284
4235
|
}());
|
|
4285
4236
|
__decorate([
|
|
4286
|
-
|
|
4237
|
+
kwikidToolkit.logMethod
|
|
4287
4238
|
], Converter.prototype, "convertFormConfig", null);
|
|
4288
4239
|
|
|
4289
4240
|
var KwikIDRendererService = /** @class */ (function () {
|
|
@@ -4347,6 +4298,7 @@
|
|
|
4347
4298
|
for (var formsList_1 = __values(formsList), formsList_1_1 = formsList_1.next(); !formsList_1_1.done; formsList_1_1 = formsList_1.next()) {
|
|
4348
4299
|
var form = formsList_1_1.value;
|
|
4349
4300
|
if (formsListCompleted.includes(form.key)) {
|
|
4301
|
+
console.log(formsListCompleted.includes(form.key));
|
|
4350
4302
|
form = setValueToObject(form, "status", "completed");
|
|
4351
4303
|
form = setValueToObject(form, "disabled", false);
|
|
4352
4304
|
}
|
|
@@ -4445,6 +4397,7 @@
|
|
|
4445
4397
|
* this particular User Form only has to LOCAL METHOD Variable.
|
|
4446
4398
|
*/
|
|
4447
4399
|
var currentUserFormAllFormsData = this.filterAllFormsData(this.allFormsData, formsList);
|
|
4400
|
+
console.log(JSON.parse(JSON.stringify(formsList)));
|
|
4448
4401
|
formsListCompleted = this.findCompletedFormsList(currentUserFormAllFormsData);
|
|
4449
4402
|
formsList = this.markFormInFormsListAsCompleted(formsList, formsListCompleted);
|
|
4450
4403
|
formsList = this.markFormInFormsListAsDisabled(formsList, formsListCompleted);
|
|
@@ -4459,12 +4412,51 @@
|
|
|
4459
4412
|
}());
|
|
4460
4413
|
/** @nocollapse */ KwikIDRendererService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDRendererService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
4461
4414
|
/** @nocollapse */ KwikIDRendererService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDRendererService, providedIn: "root" });
|
|
4415
|
+
__decorate([
|
|
4416
|
+
kwikidToolkit.logMethod
|
|
4417
|
+
], KwikIDRendererService.prototype, "setFormsList", null);
|
|
4418
|
+
__decorate([
|
|
4419
|
+
kwikidToolkit.logMethod
|
|
4420
|
+
], KwikIDRendererService.prototype, "setFormsListCompleted", null);
|
|
4421
|
+
__decorate([
|
|
4422
|
+
kwikidToolkit.logMethod
|
|
4423
|
+
], KwikIDRendererService.prototype, "setAllFormsData", null);
|
|
4424
|
+
__decorate([
|
|
4425
|
+
kwikidToolkit.logMethod
|
|
4426
|
+
], KwikIDRendererService.prototype, "setActiveFormConfig", null);
|
|
4427
|
+
__decorate([
|
|
4428
|
+
kwikidToolkit.logMethod
|
|
4429
|
+
], KwikIDRendererService.prototype, "setActiveFormFields", null);
|
|
4430
|
+
__decorate([
|
|
4431
|
+
kwikidToolkit.logMethod
|
|
4432
|
+
], KwikIDRendererService.prototype, "setActiveFormData", null);
|
|
4433
|
+
__decorate([
|
|
4434
|
+
kwikidToolkit.logMethod
|
|
4435
|
+
], KwikIDRendererService.prototype, "findActiveFormConfig", null);
|
|
4436
|
+
__decorate([
|
|
4437
|
+
kwikidToolkit.logMethod
|
|
4438
|
+
], KwikIDRendererService.prototype, "findCompletedFormsList", null);
|
|
4439
|
+
__decorate([
|
|
4440
|
+
kwikidToolkit.logMethod
|
|
4441
|
+
], KwikIDRendererService.prototype, "markFormInFormsListAsCompleted", null);
|
|
4442
|
+
__decorate([
|
|
4443
|
+
kwikidToolkit.logMethod
|
|
4444
|
+
], KwikIDRendererService.prototype, "markFormInFormsListAsDisabled", null);
|
|
4445
|
+
__decorate([
|
|
4446
|
+
kwikidToolkit.logMethod
|
|
4447
|
+
], KwikIDRendererService.prototype, "assignSequenceNoToForm", null);
|
|
4448
|
+
__decorate([
|
|
4449
|
+
kwikidToolkit.logMethod
|
|
4450
|
+
], KwikIDRendererService.prototype, "filterAllFormsData", null);
|
|
4451
|
+
__decorate([
|
|
4452
|
+
kwikidToolkit.logMethod
|
|
4453
|
+
], KwikIDRendererService.prototype, "updateFormsList", null);
|
|
4462
4454
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDRendererService, decorators: [{
|
|
4463
4455
|
type: i0.Injectable,
|
|
4464
4456
|
args: [{
|
|
4465
4457
|
providedIn: "root"
|
|
4466
4458
|
}]
|
|
4467
|
-
}], ctorParameters: function () { return []; } });
|
|
4459
|
+
}], ctorParameters: function () { return []; }, propDecorators: { setFormsList: [], setFormsListCompleted: [], setAllFormsData: [], setActiveFormConfig: [], setActiveFormFields: [], setActiveFormData: [], findActiveFormConfig: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], assignSequenceNoToForm: [], filterAllFormsData: [], updateFormsList: [] } });
|
|
4468
4460
|
|
|
4469
4461
|
var KwikIDFormsRendererComponent = /** @class */ (function () {
|
|
4470
4462
|
function KwikIDFormsRendererComponent(rendererService, hostElement) {
|
|
@@ -4539,6 +4531,7 @@
|
|
|
4539
4531
|
case 0:
|
|
4540
4532
|
this.loader = true;
|
|
4541
4533
|
this.rendererService.setAllFormsData(this.formsData);
|
|
4534
|
+
console.log(JSON.parse(JSON.stringify(this.rendererService.formsList)));
|
|
4542
4535
|
this.rendererService.updateFormsList();
|
|
4543
4536
|
this.handleResize(this.rendererService.formsList);
|
|
4544
4537
|
if (!(this.rendererService.formsList.length !==
|
|
@@ -4619,7 +4612,7 @@
|
|
|
4619
4612
|
var _this = this;
|
|
4620
4613
|
console.log(e);
|
|
4621
4614
|
if (this.userConfig.userFormFieldsConfig.validation) {
|
|
4622
|
-
var validations_1 = new Validations(this.userConfig, this.takeAction.bind(this));
|
|
4615
|
+
var validations_1 = new Validations(this.userConfig, this.formsData, this.takeAction.bind(this));
|
|
4623
4616
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
4624
4617
|
var _this = this;
|
|
4625
4618
|
return __generator(this, function (_b) {
|
|
@@ -4673,7 +4666,7 @@
|
|
|
4673
4666
|
KwikIDFormsRendererComponent.prototype.toggleErrorNotification = function (show) {
|
|
4674
4667
|
this.showErrorNotification = show;
|
|
4675
4668
|
};
|
|
4676
|
-
KwikIDFormsRendererComponent.prototype.takeAction = function (action, userConfig) {
|
|
4669
|
+
KwikIDFormsRendererComponent.prototype.takeAction = function (action, userConfig, formsData) {
|
|
4677
4670
|
return __awaiter(this, void 0, void 0, function () {
|
|
4678
4671
|
var _b, sources, sourceValue;
|
|
4679
4672
|
return __generator(this, function (_c) {
|
|
@@ -4685,12 +4678,13 @@
|
|
|
4685
4678
|
}
|
|
4686
4679
|
return [3 /*break*/, 3];
|
|
4687
4680
|
case 1:
|
|
4688
|
-
sources = new Sources(userConfig);
|
|
4681
|
+
sources = new Sources(userConfig, formsData);
|
|
4689
4682
|
return [4 /*yield*/, sources.getValueFromSource(action.props.value.source)];
|
|
4690
4683
|
case 2:
|
|
4691
4684
|
sourceValue = _c.sent();
|
|
4692
4685
|
sources.setValueToSource(action.props.value.destination, sourceValue);
|
|
4693
4686
|
this.userConfig = sources.userConfig;
|
|
4687
|
+
this.formsData = sources.formsData;
|
|
4694
4688
|
return [3 /*break*/, 4];
|
|
4695
4689
|
case 3: return [3 /*break*/, 4];
|
|
4696
4690
|
case 4: return [2 /*return*/];
|
|
@@ -4712,6 +4706,9 @@
|
|
|
4712
4706
|
])
|
|
4713
4707
|
])
|
|
4714
4708
|
] });
|
|
4709
|
+
__decorate([
|
|
4710
|
+
kwikidToolkit.logMethod
|
|
4711
|
+
], KwikIDFormsRendererComponent.prototype, "handleOnClickSetActiveForm", null);
|
|
4715
4712
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KwikIDFormsRendererComponent, decorators: [{
|
|
4716
4713
|
type: i0.Component,
|
|
4717
4714
|
args: [{
|
|
@@ -4746,7 +4743,7 @@
|
|
|
4746
4743
|
type: i0.Output
|
|
4747
4744
|
}], onClickApiCall: [{
|
|
4748
4745
|
type: i0.Output
|
|
4749
|
-
}] } });
|
|
4746
|
+
}], handleOnClickSetActiveForm: [] } });
|
|
4750
4747
|
|
|
4751
4748
|
var KwikIDFormBuilderModule = /** @class */ (function () {
|
|
4752
4749
|
function KwikIDFormBuilderModule() {
|