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
package/fesm2015/kwikid-forms.js
CHANGED
|
@@ -3,14 +3,15 @@ import * as i4 from '@angular/cdk/drag-drop';
|
|
|
3
3
|
import { copyArrayItem, moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { EventEmitter, Component, Input, Output, ViewEncapsulation, Pipe, Inject, HostListener, NgModule } from '@angular/core';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i2 from '@angular/forms';
|
|
7
7
|
import { FormGroup, FormControl, FormArray, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import { logMethod, setMissingKeyValue, mergeObjects, getObjectFromLocalStorage, isNotEmptyValue, isEmptyValue, checkObjectKeyExists, setValueToObjectPath, Source, Rule, Condition, Action, PATTERNS, Validation, isUndefined, isNull, replaceString, getObjectValueFromPath, ESourceKey, getObjectDeepCopy } from 'kwikid-toolkit';
|
|
9
|
-
import * as
|
|
10
|
-
import { KwikUIButtonModule, KwikUIInputModule,
|
|
11
|
-
import * as
|
|
9
|
+
import * as i1 from 'kwikui';
|
|
10
|
+
import { KwikUIButtonIconModule, KwikUIButtonModule, KwikUIInputModule, KwikUIInputNumberModule, KwikUISelectComboboxModule, KwikUITableModule, KwikUITextareaModule, KwikUIModule } from 'kwikui';
|
|
11
|
+
import * as i5 from '@angular/common';
|
|
12
12
|
import { CommonModule } from '@angular/common';
|
|
13
|
-
import
|
|
13
|
+
import _ from 'lodash';
|
|
14
|
+
import * as i3 from '@taiga-ui/core';
|
|
14
15
|
import { TuiAlertService, TuiLabelModule, TuiSvgModule, TuiLoaderModule } from '@taiga-ui/core';
|
|
15
16
|
import * as i4$1 from '@taiga-ui/kit';
|
|
16
17
|
import { TuiPushService, TuiPushModule } from '@taiga-ui/kit';
|
|
@@ -44,22 +45,47 @@ class Elements {
|
|
|
44
45
|
};
|
|
45
46
|
this.basic = [
|
|
46
47
|
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" }) }),
|
|
47
|
-
Object.assign(Object.assign({ elementTitle: "
|
|
48
|
+
Object.assign(Object.assign({ elementTitle: "Number", elementType: "number", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
49
|
+
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"] }),
|
|
50
|
+
Object.assign(Object.assign({ elementTitle: "Checkbox", elementType: "checkbox", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
51
|
+
Object.assign(Object.assign({ elementTitle: "Date", elementType: "date", isElement: true, elementCategory: "basic" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) }),
|
|
52
|
+
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: "****" }) }),
|
|
53
|
+
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: "####-######" }) })
|
|
48
54
|
];
|
|
49
55
|
this.documents = [
|
|
50
|
-
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: "####-####-####" }) })
|
|
56
|
+
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: "####-####-####" }) }),
|
|
57
|
+
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" }) })
|
|
51
58
|
];
|
|
52
59
|
this.others = [
|
|
53
|
-
|
|
60
|
+
{
|
|
61
|
+
elementTitle: "HTML",
|
|
62
|
+
elementType: "html",
|
|
63
|
+
isElement: true,
|
|
64
|
+
elementCategory: "other",
|
|
65
|
+
key: "",
|
|
66
|
+
html: "",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
elementTitle: "Title",
|
|
70
|
+
elementType: "title",
|
|
71
|
+
isElement: true,
|
|
72
|
+
elementCategory: "other",
|
|
73
|
+
key: "",
|
|
74
|
+
label: ""
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
this.demographics = [
|
|
78
|
+
Object.assign(Object.assign({ elementTitle: "Gender", elementType: "gender", isElement: true, elementCategory: "demographics" }, this.commonCore), { validators: Object.assign({}, this.commonValidators), properties: Object.assign({}, this.commonProperties) })
|
|
54
79
|
];
|
|
55
80
|
this.templates = [
|
|
56
81
|
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) })
|
|
57
82
|
];
|
|
58
83
|
this.elementMapping = {
|
|
59
|
-
basic: ["text", "radio"],
|
|
60
|
-
documents: ["aadhaar-number"],
|
|
61
|
-
others: [],
|
|
62
|
-
templates: []
|
|
84
|
+
basic: ["text", "number", "radio", "checkbox", "date", "otp", "phone"],
|
|
85
|
+
documents: ["aadhaar-number", "pan-number"],
|
|
86
|
+
others: ["html", "title"],
|
|
87
|
+
templates: [],
|
|
88
|
+
demographics: []
|
|
63
89
|
};
|
|
64
90
|
}
|
|
65
91
|
}
|
|
@@ -85,12 +111,13 @@ class BasicTextConfigEditor {
|
|
|
85
111
|
this.createBasicTextFormGroup();
|
|
86
112
|
}
|
|
87
113
|
ngOnChanges(changes) {
|
|
114
|
+
var _a;
|
|
88
115
|
const verifyChange = (key) => {
|
|
89
116
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
90
117
|
};
|
|
91
118
|
if (verifyChange("elementConfig")) {
|
|
92
119
|
this.elementConfig = changes.elementConfig.currentValue;
|
|
93
|
-
this.
|
|
120
|
+
(_a = this.basicTextFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
94
121
|
}
|
|
95
122
|
if (verifyChange("saveBasicClickCounter")) {
|
|
96
123
|
if (changes.saveBasicClickCounter.previousValue !==
|
|
@@ -120,31 +147,29 @@ class BasicTextConfigEditor {
|
|
|
120
147
|
/** @nocollapse */ BasicTextConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicTextConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
121
148
|
/** @nocollapse */ BasicTextConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
122
149
|
<form [formGroup]="basicTextFormGroup">
|
|
123
|
-
<
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
[
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
[
|
|
140
|
-
>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
</div>
|
|
145
|
-
</fieldset>
|
|
150
|
+
<div formGroupName="properties">
|
|
151
|
+
<fieldset>
|
|
152
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
153
|
+
<div class="form-group">
|
|
154
|
+
<kwikui-select-combobox
|
|
155
|
+
[options]="['default', 'upper', 'lower']"
|
|
156
|
+
[label]="'case'"
|
|
157
|
+
[id]="'basic-text-config-case'"
|
|
158
|
+
size="m"
|
|
159
|
+
[formControlName]="'case'"
|
|
160
|
+
[formControl]="
|
|
161
|
+
basicTextFormGroup['controls'].properties['controls'].case
|
|
162
|
+
"
|
|
163
|
+
[focus]="false"
|
|
164
|
+
[disabled]="false"
|
|
165
|
+
[invalid]="false"
|
|
166
|
+
[placeholder]="'Please select either true or false'"
|
|
167
|
+
></kwikui-select-combobox>
|
|
168
|
+
</div>
|
|
169
|
+
</fieldset>
|
|
170
|
+
</div>
|
|
146
171
|
</form>
|
|
147
|
-
`, isInline: true, styles: [""], directives: [{ type:
|
|
172
|
+
`, isInline: true, styles: [""], components: [{ type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
148
173
|
__decorate([
|
|
149
174
|
logMethod
|
|
150
175
|
], BasicTextConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -163,29 +188,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
163
188
|
selector: "basic-text-config-editor",
|
|
164
189
|
template: `
|
|
165
190
|
<form [formGroup]="basicTextFormGroup">
|
|
166
|
-
<
|
|
167
|
-
<
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
[
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
[
|
|
183
|
-
>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
</div>
|
|
188
|
-
</fieldset>
|
|
191
|
+
<div formGroupName="properties">
|
|
192
|
+
<fieldset>
|
|
193
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
194
|
+
<div class="form-group">
|
|
195
|
+
<kwikui-select-combobox
|
|
196
|
+
[options]="['default', 'upper', 'lower']"
|
|
197
|
+
[label]="'case'"
|
|
198
|
+
[id]="'basic-text-config-case'"
|
|
199
|
+
size="m"
|
|
200
|
+
[formControlName]="'case'"
|
|
201
|
+
[formControl]="
|
|
202
|
+
basicTextFormGroup['controls'].properties['controls'].case
|
|
203
|
+
"
|
|
204
|
+
[focus]="false"
|
|
205
|
+
[disabled]="false"
|
|
206
|
+
[invalid]="false"
|
|
207
|
+
[placeholder]="'Please select either true or false'"
|
|
208
|
+
></kwikui-select-combobox>
|
|
209
|
+
</div>
|
|
210
|
+
</fieldset>
|
|
211
|
+
</div>
|
|
189
212
|
</form>
|
|
190
213
|
`,
|
|
191
214
|
styles: [``]
|
|
@@ -198,6 +221,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
198
221
|
type: Output
|
|
199
222
|
}], ngOnInit: [], ngOnChanges: [], createBasicTextFormGroup: [], handleOnSave: [] } });
|
|
200
223
|
|
|
224
|
+
class BasicNumberConfigEditor {
|
|
225
|
+
constructor() {
|
|
226
|
+
this.saveBasicClickCounter = 0;
|
|
227
|
+
this.elementConfig = {};
|
|
228
|
+
this.updateElement = new EventEmitter();
|
|
229
|
+
this.basicNumberFormGroup = undefined;
|
|
230
|
+
}
|
|
231
|
+
ngOnInit() {
|
|
232
|
+
this.createBasicNumberFormGroup();
|
|
233
|
+
}
|
|
234
|
+
ngOnChanges(changes) {
|
|
235
|
+
var _a;
|
|
236
|
+
const verifyChange = (key) => {
|
|
237
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
238
|
+
};
|
|
239
|
+
if (verifyChange("elementConfig")) {
|
|
240
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
241
|
+
(_a = this.basicNumberFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
242
|
+
}
|
|
243
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
244
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
245
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
246
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
247
|
+
this.handleOnSave();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
createBasicNumberFormGroup() {
|
|
252
|
+
this.basicNumberFormGroup = new FormGroup({});
|
|
253
|
+
this.basicNumberFormGroup.updateValueAndValidity();
|
|
254
|
+
}
|
|
255
|
+
handleOnSave() {
|
|
256
|
+
let basicElementConfig = this.basicNumberFormGroup.getRawValue();
|
|
257
|
+
this.updateElement.emit({
|
|
258
|
+
basicElementConfig: basicElementConfig
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/** @nocollapse */ BasicNumberConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicNumberConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
263
|
+
/** @nocollapse */ BasicNumberConfigEditor.ɵcmp = i0.ɵɵ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, template: ``, isInline: true, styles: [""] });
|
|
264
|
+
__decorate([
|
|
265
|
+
logMethod
|
|
266
|
+
], BasicNumberConfigEditor.prototype, "ngOnInit", null);
|
|
267
|
+
__decorate([
|
|
268
|
+
logMethod
|
|
269
|
+
], BasicNumberConfigEditor.prototype, "ngOnChanges", null);
|
|
270
|
+
__decorate([
|
|
271
|
+
logMethod
|
|
272
|
+
], BasicNumberConfigEditor.prototype, "createBasicNumberFormGroup", null);
|
|
273
|
+
__decorate([
|
|
274
|
+
logMethod
|
|
275
|
+
], BasicNumberConfigEditor.prototype, "handleOnSave", null);
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicNumberConfigEditor, decorators: [{
|
|
277
|
+
type: Component,
|
|
278
|
+
args: [{
|
|
279
|
+
selector: "basic-number-config-editor",
|
|
280
|
+
template: ``,
|
|
281
|
+
styles: [``]
|
|
282
|
+
}]
|
|
283
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
284
|
+
type: Input
|
|
285
|
+
}], elementConfig: [{
|
|
286
|
+
type: Input
|
|
287
|
+
}], updateElement: [{
|
|
288
|
+
type: Output
|
|
289
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicNumberFormGroup: [], handleOnSave: [] } });
|
|
290
|
+
|
|
201
291
|
class BasicRadioConfigEditor {
|
|
202
292
|
constructor() {
|
|
203
293
|
this.optionType = {
|
|
@@ -219,12 +309,13 @@ class BasicRadioConfigEditor {
|
|
|
219
309
|
this.createBasicRadioFormGroup();
|
|
220
310
|
}
|
|
221
311
|
ngOnChanges(changes) {
|
|
312
|
+
var _a;
|
|
222
313
|
const verifyChange = (key) => {
|
|
223
314
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
224
315
|
};
|
|
225
316
|
if (verifyChange("elementConfig")) {
|
|
226
317
|
this.elementConfig = changes.elementConfig.currentValue;
|
|
227
|
-
this.
|
|
318
|
+
(_a = this.basicRadioFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
228
319
|
}
|
|
229
320
|
if (verifyChange("saveBasicClickCounter")) {
|
|
230
321
|
if (changes.saveBasicClickCounter.previousValue !==
|
|
@@ -293,82 +384,128 @@ class BasicRadioConfigEditor {
|
|
|
293
384
|
/** @nocollapse */ BasicRadioConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicRadioConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
294
385
|
/** @nocollapse */ BasicRadioConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
295
386
|
<form [formGroup]="basicRadioFormGroup">
|
|
296
|
-
<fieldset
|
|
297
|
-
<legend>Options</legend>
|
|
298
|
-
<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
<div [formGroupName]="i">
|
|
302
|
-
<div class="form-group">
|
|
303
|
-
<label for="basic-radio-config-placeholder">label</label>
|
|
304
|
-
<input
|
|
305
|
-
class="form-control"
|
|
306
|
-
formControlName="label"
|
|
307
|
-
id="basic-radio-config-placeholder"
|
|
308
|
-
type="text"
|
|
309
|
-
/>
|
|
310
|
-
</div>
|
|
311
|
-
<div class="form-group">
|
|
312
|
-
<label for="basic-radio-config-disabled">disabled</label>
|
|
313
|
-
<select
|
|
314
|
-
class="form-control"
|
|
315
|
-
formControlName="disabled"
|
|
316
|
-
id="basic-radio-config-disabled"
|
|
317
|
-
>
|
|
318
|
-
<option
|
|
319
|
-
[ngValue]="null"
|
|
320
|
-
disabled
|
|
321
|
-
>Select Disability</option
|
|
322
|
-
>
|
|
323
|
-
<option
|
|
324
|
-
*ngFor="let disabled of [true, false]"
|
|
325
|
-
[ngValue]="disabled"
|
|
326
|
-
>
|
|
327
|
-
{{ disabled }}
|
|
328
|
-
</option>
|
|
329
|
-
</select>
|
|
330
|
-
</div>
|
|
331
|
-
<div class="form-group">
|
|
332
|
-
<label for="basic-radio-config-description">description</label>
|
|
333
|
-
<input
|
|
334
|
-
class="form-control"
|
|
335
|
-
formControlName="description"
|
|
336
|
-
id="basic-radio-config-description"
|
|
337
|
-
type="text"
|
|
338
|
-
/>
|
|
339
|
-
</div>
|
|
340
|
-
</div>
|
|
341
|
-
<div class="form-array-actions">
|
|
342
|
-
<button (click)="removeOption(i)">Remove</button>
|
|
343
|
-
<button (click)="addOption()">Add</button>
|
|
344
|
-
</div>
|
|
345
|
-
</ng-container>
|
|
346
|
-
</fieldset>
|
|
347
|
-
<fieldset formGroupName="properties">
|
|
348
|
-
<legend>Miscellaneous</legend>
|
|
349
|
-
<div class="form-group">
|
|
350
|
-
<label for="basic-radio-config-orientation">Orientation</label>
|
|
351
|
-
<select
|
|
352
|
-
class="form-control"
|
|
353
|
-
formControlName="orientation"
|
|
354
|
-
id="basic-radio-config-orientation"
|
|
387
|
+
<fieldset>
|
|
388
|
+
<legend class="form-group-title">Options</legend>
|
|
389
|
+
<div formArrayName="options">
|
|
390
|
+
<ng-container
|
|
391
|
+
*ngFor="let option of optionsArray.controls; let i = index"
|
|
355
392
|
>
|
|
356
|
-
<
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
393
|
+
<div [formGroupName]="i">
|
|
394
|
+
<div class="form-group">
|
|
395
|
+
<kwikui-input
|
|
396
|
+
[label]="'Label'"
|
|
397
|
+
[id]="'basic-radio-config-placeholder'"
|
|
398
|
+
[type]="'text'"
|
|
399
|
+
[formControlName]="'label'"
|
|
400
|
+
[formControl]="
|
|
401
|
+
basicRadioFormGroup['controls'].options['controls'][i][
|
|
402
|
+
'controls'
|
|
403
|
+
].label
|
|
404
|
+
"
|
|
405
|
+
[disabled]="false"
|
|
406
|
+
[placeholder]="'Please enter your label'"
|
|
407
|
+
[focus]="false"
|
|
408
|
+
[invalid]="false"
|
|
409
|
+
[case]="'default'"
|
|
410
|
+
size="m"
|
|
411
|
+
></kwikui-input>
|
|
412
|
+
</div>
|
|
413
|
+
<div class="form-group">
|
|
414
|
+
<kwikui-select-combobox
|
|
415
|
+
[options]="[true, false]"
|
|
416
|
+
[label]="'disabled'"
|
|
417
|
+
[id]="'basic-radio-config-disabled'"
|
|
418
|
+
size="m"
|
|
419
|
+
[formControlName]="'disabled'"
|
|
420
|
+
[formControl]="
|
|
421
|
+
basicRadioFormGroup['controls'].options['controls'][i][
|
|
422
|
+
'controls'
|
|
423
|
+
].disabled
|
|
424
|
+
"
|
|
425
|
+
[focus]="false"
|
|
426
|
+
[disabled]="false"
|
|
427
|
+
[invalid]="false"
|
|
428
|
+
[placeholder]="'Please select either true or false'"
|
|
429
|
+
></kwikui-select-combobox>
|
|
430
|
+
</div>
|
|
431
|
+
<div class="form-group">
|
|
432
|
+
<kwikui-input
|
|
433
|
+
[label]="'Description'"
|
|
434
|
+
[id]="'basic-radio-config-description'"
|
|
435
|
+
[type]="'text'"
|
|
436
|
+
[formControlName]="'description'"
|
|
437
|
+
[formControl]="
|
|
438
|
+
basicRadioFormGroup['controls'].options['controls'][i][
|
|
439
|
+
'controls'
|
|
440
|
+
].description
|
|
441
|
+
"
|
|
442
|
+
[disabled]="false"
|
|
443
|
+
[placeholder]="'Please enter your description'"
|
|
444
|
+
[focus]="false"
|
|
445
|
+
[invalid]="false"
|
|
446
|
+
[case]="'default'"
|
|
447
|
+
size="m"
|
|
448
|
+
></kwikui-input>
|
|
449
|
+
</div>
|
|
450
|
+
<div class="form-array-actions">
|
|
451
|
+
<kwikui-button
|
|
452
|
+
[disabled]="false"
|
|
453
|
+
label="Remove"
|
|
454
|
+
[showLoader]="false"
|
|
455
|
+
styles=""
|
|
456
|
+
class="save-button"
|
|
457
|
+
type="button"
|
|
458
|
+
appearance="secondary"
|
|
459
|
+
icon=""
|
|
460
|
+
iconRight=""
|
|
461
|
+
[shape]="'rounded'"
|
|
462
|
+
size="s"
|
|
463
|
+
(onClick)="removeOption(i)"
|
|
464
|
+
></kwikui-button>
|
|
465
|
+
<kwikui-button
|
|
466
|
+
[disabled]="false"
|
|
467
|
+
label="Add"
|
|
468
|
+
[showLoader]="false"
|
|
469
|
+
styles=""
|
|
470
|
+
class="save-button"
|
|
471
|
+
type="button"
|
|
472
|
+
appearance="secondary"
|
|
473
|
+
icon=""
|
|
474
|
+
iconRight=""
|
|
475
|
+
[shape]="'rounded'"
|
|
476
|
+
size="s"
|
|
477
|
+
(onClick)="addOption()"
|
|
478
|
+
></kwikui-button>
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
</ng-container>
|
|
368
482
|
</div>
|
|
369
483
|
</fieldset>
|
|
484
|
+
|
|
485
|
+
<div formGroupName="properties">
|
|
486
|
+
<fieldset>
|
|
487
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
488
|
+
<div class="form-group">
|
|
489
|
+
<kwikui-select-combobox
|
|
490
|
+
[options]="['horizontal', 'vertical']"
|
|
491
|
+
[label]="'Orientation'"
|
|
492
|
+
[id]="'basic-radio-config-orientation'"
|
|
493
|
+
size="m"
|
|
494
|
+
[formControlName]="'orientation'"
|
|
495
|
+
[formControl]="
|
|
496
|
+
basicRadioFormGroup['controls'].properties['controls']
|
|
497
|
+
.orientation
|
|
498
|
+
"
|
|
499
|
+
[focus]="false"
|
|
500
|
+
[disabled]="false"
|
|
501
|
+
[invalid]="false"
|
|
502
|
+
[placeholder]="'Please select orientation'"
|
|
503
|
+
></kwikui-select-combobox>
|
|
504
|
+
</div>
|
|
505
|
+
</fieldset>
|
|
506
|
+
</div>
|
|
370
507
|
</form>
|
|
371
|
-
`, 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 "], directives: [{ type:
|
|
508
|
+
`, 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.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
372
509
|
__decorate([
|
|
373
510
|
logMethod
|
|
374
511
|
], BasicRadioConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -396,80 +533,126 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
396
533
|
selector: "basic-radio-config-editor",
|
|
397
534
|
template: `
|
|
398
535
|
<form [formGroup]="basicRadioFormGroup">
|
|
399
|
-
<fieldset
|
|
400
|
-
<legend>Options</legend>
|
|
401
|
-
<
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
<div [formGroupName]="i">
|
|
405
|
-
<div class="form-group">
|
|
406
|
-
<label for="basic-radio-config-placeholder">label</label>
|
|
407
|
-
<input
|
|
408
|
-
class="form-control"
|
|
409
|
-
formControlName="label"
|
|
410
|
-
id="basic-radio-config-placeholder"
|
|
411
|
-
type="text"
|
|
412
|
-
/>
|
|
413
|
-
</div>
|
|
414
|
-
<div class="form-group">
|
|
415
|
-
<label for="basic-radio-config-disabled">disabled</label>
|
|
416
|
-
<select
|
|
417
|
-
class="form-control"
|
|
418
|
-
formControlName="disabled"
|
|
419
|
-
id="basic-radio-config-disabled"
|
|
420
|
-
>
|
|
421
|
-
<option
|
|
422
|
-
[ngValue]="null"
|
|
423
|
-
disabled
|
|
424
|
-
>Select Disability</option
|
|
425
|
-
>
|
|
426
|
-
<option
|
|
427
|
-
*ngFor="let disabled of [true, false]"
|
|
428
|
-
[ngValue]="disabled"
|
|
429
|
-
>
|
|
430
|
-
{{ disabled }}
|
|
431
|
-
</option>
|
|
432
|
-
</select>
|
|
433
|
-
</div>
|
|
434
|
-
<div class="form-group">
|
|
435
|
-
<label for="basic-radio-config-description">description</label>
|
|
436
|
-
<input
|
|
437
|
-
class="form-control"
|
|
438
|
-
formControlName="description"
|
|
439
|
-
id="basic-radio-config-description"
|
|
440
|
-
type="text"
|
|
441
|
-
/>
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
444
|
-
<div class="form-array-actions">
|
|
445
|
-
<button (click)="removeOption(i)">Remove</button>
|
|
446
|
-
<button (click)="addOption()">Add</button>
|
|
447
|
-
</div>
|
|
448
|
-
</ng-container>
|
|
449
|
-
</fieldset>
|
|
450
|
-
<fieldset formGroupName="properties">
|
|
451
|
-
<legend>Miscellaneous</legend>
|
|
452
|
-
<div class="form-group">
|
|
453
|
-
<label for="basic-radio-config-orientation">Orientation</label>
|
|
454
|
-
<select
|
|
455
|
-
class="form-control"
|
|
456
|
-
formControlName="orientation"
|
|
457
|
-
id="basic-radio-config-orientation"
|
|
536
|
+
<fieldset>
|
|
537
|
+
<legend class="form-group-title">Options</legend>
|
|
538
|
+
<div formArrayName="options">
|
|
539
|
+
<ng-container
|
|
540
|
+
*ngFor="let option of optionsArray.controls; let i = index"
|
|
458
541
|
>
|
|
459
|
-
<
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
542
|
+
<div [formGroupName]="i">
|
|
543
|
+
<div class="form-group">
|
|
544
|
+
<kwikui-input
|
|
545
|
+
[label]="'Label'"
|
|
546
|
+
[id]="'basic-radio-config-placeholder'"
|
|
547
|
+
[type]="'text'"
|
|
548
|
+
[formControlName]="'label'"
|
|
549
|
+
[formControl]="
|
|
550
|
+
basicRadioFormGroup['controls'].options['controls'][i][
|
|
551
|
+
'controls'
|
|
552
|
+
].label
|
|
553
|
+
"
|
|
554
|
+
[disabled]="false"
|
|
555
|
+
[placeholder]="'Please enter your label'"
|
|
556
|
+
[focus]="false"
|
|
557
|
+
[invalid]="false"
|
|
558
|
+
[case]="'default'"
|
|
559
|
+
size="m"
|
|
560
|
+
></kwikui-input>
|
|
561
|
+
</div>
|
|
562
|
+
<div class="form-group">
|
|
563
|
+
<kwikui-select-combobox
|
|
564
|
+
[options]="[true, false]"
|
|
565
|
+
[label]="'disabled'"
|
|
566
|
+
[id]="'basic-radio-config-disabled'"
|
|
567
|
+
size="m"
|
|
568
|
+
[formControlName]="'disabled'"
|
|
569
|
+
[formControl]="
|
|
570
|
+
basicRadioFormGroup['controls'].options['controls'][i][
|
|
571
|
+
'controls'
|
|
572
|
+
].disabled
|
|
573
|
+
"
|
|
574
|
+
[focus]="false"
|
|
575
|
+
[disabled]="false"
|
|
576
|
+
[invalid]="false"
|
|
577
|
+
[placeholder]="'Please select either true or false'"
|
|
578
|
+
></kwikui-select-combobox>
|
|
579
|
+
</div>
|
|
580
|
+
<div class="form-group">
|
|
581
|
+
<kwikui-input
|
|
582
|
+
[label]="'Description'"
|
|
583
|
+
[id]="'basic-radio-config-description'"
|
|
584
|
+
[type]="'text'"
|
|
585
|
+
[formControlName]="'description'"
|
|
586
|
+
[formControl]="
|
|
587
|
+
basicRadioFormGroup['controls'].options['controls'][i][
|
|
588
|
+
'controls'
|
|
589
|
+
].description
|
|
590
|
+
"
|
|
591
|
+
[disabled]="false"
|
|
592
|
+
[placeholder]="'Please enter your description'"
|
|
593
|
+
[focus]="false"
|
|
594
|
+
[invalid]="false"
|
|
595
|
+
[case]="'default'"
|
|
596
|
+
size="m"
|
|
597
|
+
></kwikui-input>
|
|
598
|
+
</div>
|
|
599
|
+
<div class="form-array-actions">
|
|
600
|
+
<kwikui-button
|
|
601
|
+
[disabled]="false"
|
|
602
|
+
label="Remove"
|
|
603
|
+
[showLoader]="false"
|
|
604
|
+
styles=""
|
|
605
|
+
class="save-button"
|
|
606
|
+
type="button"
|
|
607
|
+
appearance="secondary"
|
|
608
|
+
icon=""
|
|
609
|
+
iconRight=""
|
|
610
|
+
[shape]="'rounded'"
|
|
611
|
+
size="s"
|
|
612
|
+
(onClick)="removeOption(i)"
|
|
613
|
+
></kwikui-button>
|
|
614
|
+
<kwikui-button
|
|
615
|
+
[disabled]="false"
|
|
616
|
+
label="Add"
|
|
617
|
+
[showLoader]="false"
|
|
618
|
+
styles=""
|
|
619
|
+
class="save-button"
|
|
620
|
+
type="button"
|
|
621
|
+
appearance="secondary"
|
|
622
|
+
icon=""
|
|
623
|
+
iconRight=""
|
|
624
|
+
[shape]="'rounded'"
|
|
625
|
+
size="s"
|
|
626
|
+
(onClick)="addOption()"
|
|
627
|
+
></kwikui-button>
|
|
628
|
+
</div>
|
|
629
|
+
</div>
|
|
630
|
+
</ng-container>
|
|
471
631
|
</div>
|
|
472
632
|
</fieldset>
|
|
633
|
+
|
|
634
|
+
<div formGroupName="properties">
|
|
635
|
+
<fieldset>
|
|
636
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
637
|
+
<div class="form-group">
|
|
638
|
+
<kwikui-select-combobox
|
|
639
|
+
[options]="['horizontal', 'vertical']"
|
|
640
|
+
[label]="'Orientation'"
|
|
641
|
+
[id]="'basic-radio-config-orientation'"
|
|
642
|
+
size="m"
|
|
643
|
+
[formControlName]="'orientation'"
|
|
644
|
+
[formControl]="
|
|
645
|
+
basicRadioFormGroup['controls'].properties['controls']
|
|
646
|
+
.orientation
|
|
647
|
+
"
|
|
648
|
+
[focus]="false"
|
|
649
|
+
[disabled]="false"
|
|
650
|
+
[invalid]="false"
|
|
651
|
+
[placeholder]="'Please select orientation'"
|
|
652
|
+
></kwikui-select-combobox>
|
|
653
|
+
</div>
|
|
654
|
+
</fieldset>
|
|
655
|
+
</div>
|
|
473
656
|
</form>
|
|
474
657
|
`,
|
|
475
658
|
styles: [
|
|
@@ -493,45 +676,2089 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
493
676
|
type: Output
|
|
494
677
|
}], ngOnInit: [], ngOnChanges: [], createBasicRadioFormGroup: [], handleOnSave: [], createOptionConfigFormGroup: [], addOption: [], removeOption: [] } });
|
|
495
678
|
|
|
496
|
-
class
|
|
679
|
+
class BasicCheckboxConfigEditor {
|
|
497
680
|
constructor() {
|
|
498
|
-
this.
|
|
681
|
+
this.saveBasicClickCounter = 0;
|
|
682
|
+
this.elementConfig = {};
|
|
683
|
+
this.updateElement = new EventEmitter();
|
|
684
|
+
this.basicCheckboxFormGroup = undefined;
|
|
685
|
+
}
|
|
686
|
+
ngOnInit() {
|
|
687
|
+
this.createBasicCheckboxFormGroup();
|
|
688
|
+
}
|
|
689
|
+
ngOnChanges(changes) {
|
|
690
|
+
var _a;
|
|
691
|
+
const verifyChange = (key) => {
|
|
692
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
693
|
+
};
|
|
694
|
+
if (verifyChange("elementConfig")) {
|
|
695
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
696
|
+
(_a = this.basicCheckboxFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
697
|
+
}
|
|
698
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
699
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
700
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
701
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
702
|
+
this.handleOnSave();
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
createBasicCheckboxFormGroup() {
|
|
707
|
+
this.basicCheckboxFormGroup = new FormGroup({});
|
|
708
|
+
this.basicCheckboxFormGroup.updateValueAndValidity();
|
|
709
|
+
}
|
|
710
|
+
handleOnSave() {
|
|
711
|
+
let basicElementConfig = this.basicCheckboxFormGroup.getRawValue();
|
|
712
|
+
this.updateElement.emit({
|
|
713
|
+
basicElementConfig: basicElementConfig
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
/** @nocollapse */ BasicCheckboxConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicCheckboxConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
718
|
+
/** @nocollapse */ BasicCheckboxConfigEditor.ɵcmp = i0.ɵɵ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, template: ``, isInline: true, styles: [""] });
|
|
719
|
+
__decorate([
|
|
720
|
+
logMethod
|
|
721
|
+
], BasicCheckboxConfigEditor.prototype, "ngOnInit", null);
|
|
722
|
+
__decorate([
|
|
723
|
+
logMethod
|
|
724
|
+
], BasicCheckboxConfigEditor.prototype, "ngOnChanges", null);
|
|
725
|
+
__decorate([
|
|
726
|
+
logMethod
|
|
727
|
+
], BasicCheckboxConfigEditor.prototype, "createBasicCheckboxFormGroup", null);
|
|
728
|
+
__decorate([
|
|
729
|
+
logMethod
|
|
730
|
+
], BasicCheckboxConfigEditor.prototype, "handleOnSave", null);
|
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicCheckboxConfigEditor, decorators: [{
|
|
732
|
+
type: Component,
|
|
733
|
+
args: [{
|
|
734
|
+
selector: "basic-checkbox-config-editor",
|
|
735
|
+
template: ``,
|
|
736
|
+
styles: [``]
|
|
737
|
+
}]
|
|
738
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
739
|
+
type: Input
|
|
740
|
+
}], elementConfig: [{
|
|
741
|
+
type: Input
|
|
742
|
+
}], updateElement: [{
|
|
743
|
+
type: Output
|
|
744
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicCheckboxFormGroup: [], handleOnSave: [] } });
|
|
745
|
+
|
|
746
|
+
class BasicOtpConfigEditor {
|
|
747
|
+
constructor() {
|
|
748
|
+
this.saveBasicClickCounter = 0;
|
|
499
749
|
this.elementConfig = {
|
|
500
|
-
label: "",
|
|
501
|
-
key: "",
|
|
502
|
-
disabled: false,
|
|
503
|
-
default: {
|
|
504
|
-
value: true
|
|
505
|
-
},
|
|
506
|
-
validators: {
|
|
507
|
-
min: null,
|
|
508
|
-
max: null,
|
|
509
|
-
minLength: null,
|
|
510
|
-
maxLength: null,
|
|
511
|
-
required: true
|
|
512
|
-
},
|
|
513
750
|
properties: {
|
|
514
|
-
|
|
515
|
-
|
|
751
|
+
mask: "****"
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
this.updateElement = new EventEmitter();
|
|
755
|
+
this.basicOtpFormGroup = undefined;
|
|
756
|
+
}
|
|
757
|
+
ngOnInit() {
|
|
758
|
+
this.createBasicOtpFormGroup();
|
|
759
|
+
}
|
|
760
|
+
ngOnChanges(changes) {
|
|
761
|
+
var _a;
|
|
762
|
+
const verifyChange = (key) => {
|
|
763
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
764
|
+
};
|
|
765
|
+
if (verifyChange("elementConfig")) {
|
|
766
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
767
|
+
(_a = this.basicOtpFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
768
|
+
}
|
|
769
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
770
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
771
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
772
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
773
|
+
this.handleOnSave();
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
createBasicOtpFormGroup() {
|
|
778
|
+
this.basicOtpFormGroup = new FormGroup({
|
|
779
|
+
properties: new FormGroup({
|
|
780
|
+
mask: new FormControl(this.elementConfig.properties.mask, {
|
|
781
|
+
updateOn: "change"
|
|
782
|
+
})
|
|
783
|
+
})
|
|
784
|
+
});
|
|
785
|
+
this.basicOtpFormGroup.updateValueAndValidity();
|
|
786
|
+
}
|
|
787
|
+
handleOnSave() {
|
|
788
|
+
let basicElementConfig = this.basicOtpFormGroup.getRawValue();
|
|
789
|
+
this.updateElement.emit({
|
|
790
|
+
basicElementConfig: basicElementConfig
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
/** @nocollapse */ BasicOtpConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicOtpConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
795
|
+
/** @nocollapse */ BasicOtpConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
796
|
+
<form [formGroup]="basicOtpFormGroup">
|
|
797
|
+
<div formGroupName="properties">
|
|
798
|
+
<div class="form-group-title">Properties</div>
|
|
799
|
+
<div class="form-group">
|
|
800
|
+
<kwikui-input
|
|
801
|
+
[label]="'Mask'"
|
|
802
|
+
[id]="'basic-otp-config-mask'"
|
|
803
|
+
[type]="'text'"
|
|
804
|
+
[formControlName]="'mask'"
|
|
805
|
+
[formControl]="
|
|
806
|
+
basicOtpFormGroup.controls.properties['controls'].mask
|
|
807
|
+
"
|
|
808
|
+
[disabled]="false"
|
|
809
|
+
[placeholder]="'Please enter your mask'"
|
|
810
|
+
[focus]="false"
|
|
811
|
+
[invalid]="false"
|
|
812
|
+
[case]="'default'"
|
|
813
|
+
size="m"
|
|
814
|
+
></kwikui-input>
|
|
815
|
+
</div>
|
|
816
|
+
</div>
|
|
817
|
+
</form>
|
|
818
|
+
`, isInline: true, styles: [""], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
819
|
+
__decorate([
|
|
820
|
+
logMethod
|
|
821
|
+
], BasicOtpConfigEditor.prototype, "ngOnInit", null);
|
|
822
|
+
__decorate([
|
|
823
|
+
logMethod
|
|
824
|
+
], BasicOtpConfigEditor.prototype, "ngOnChanges", null);
|
|
825
|
+
__decorate([
|
|
826
|
+
logMethod
|
|
827
|
+
], BasicOtpConfigEditor.prototype, "createBasicOtpFormGroup", null);
|
|
828
|
+
__decorate([
|
|
829
|
+
logMethod
|
|
830
|
+
], BasicOtpConfigEditor.prototype, "handleOnSave", null);
|
|
831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicOtpConfigEditor, decorators: [{
|
|
832
|
+
type: Component,
|
|
833
|
+
args: [{
|
|
834
|
+
selector: "basic-otp-config-editor",
|
|
835
|
+
template: `
|
|
836
|
+
<form [formGroup]="basicOtpFormGroup">
|
|
837
|
+
<div formGroupName="properties">
|
|
838
|
+
<div class="form-group-title">Properties</div>
|
|
839
|
+
<div class="form-group">
|
|
840
|
+
<kwikui-input
|
|
841
|
+
[label]="'Mask'"
|
|
842
|
+
[id]="'basic-otp-config-mask'"
|
|
843
|
+
[type]="'text'"
|
|
844
|
+
[formControlName]="'mask'"
|
|
845
|
+
[formControl]="
|
|
846
|
+
basicOtpFormGroup.controls.properties['controls'].mask
|
|
847
|
+
"
|
|
848
|
+
[disabled]="false"
|
|
849
|
+
[placeholder]="'Please enter your mask'"
|
|
850
|
+
[focus]="false"
|
|
851
|
+
[invalid]="false"
|
|
852
|
+
[case]="'default'"
|
|
853
|
+
size="m"
|
|
854
|
+
></kwikui-input>
|
|
855
|
+
</div>
|
|
856
|
+
</div>
|
|
857
|
+
</form>
|
|
858
|
+
`,
|
|
859
|
+
styles: [``]
|
|
860
|
+
}]
|
|
861
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
862
|
+
type: Input
|
|
863
|
+
}], elementConfig: [{
|
|
864
|
+
type: Input
|
|
865
|
+
}], updateElement: [{
|
|
866
|
+
type: Output
|
|
867
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicOtpFormGroup: [], handleOnSave: [] } });
|
|
868
|
+
|
|
869
|
+
class BasicPhoneConfigEditor {
|
|
870
|
+
constructor() {
|
|
871
|
+
this.saveBasicClickCounter = 0;
|
|
872
|
+
this.elementConfig = {
|
|
873
|
+
properties: {
|
|
874
|
+
mask: "####-######"
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
this.updateElement = new EventEmitter();
|
|
878
|
+
this.basicPhoneFormGroup = undefined;
|
|
879
|
+
}
|
|
880
|
+
ngOnInit() {
|
|
881
|
+
this.createBasicPhoneFormGroup();
|
|
882
|
+
}
|
|
883
|
+
ngOnChanges(changes) {
|
|
884
|
+
var _a;
|
|
885
|
+
const verifyChange = (key) => {
|
|
886
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
887
|
+
};
|
|
888
|
+
if (verifyChange("elementConfig")) {
|
|
889
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
890
|
+
(_a = this.basicPhoneFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
891
|
+
}
|
|
892
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
893
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
894
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
895
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
896
|
+
this.handleOnSave();
|
|
516
897
|
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
createBasicPhoneFormGroup() {
|
|
901
|
+
this.basicPhoneFormGroup = new FormGroup({
|
|
902
|
+
properties: new FormGroup({
|
|
903
|
+
mask: new FormControl(this.elementConfig.properties.mask, {
|
|
904
|
+
updateOn: "change"
|
|
905
|
+
})
|
|
906
|
+
})
|
|
907
|
+
});
|
|
908
|
+
this.basicPhoneFormGroup.updateValueAndValidity();
|
|
909
|
+
}
|
|
910
|
+
handleOnSave() {
|
|
911
|
+
let basicElementConfig = this.basicPhoneFormGroup.getRawValue();
|
|
912
|
+
this.updateElement.emit({
|
|
913
|
+
basicElementConfig: basicElementConfig
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
/** @nocollapse */ BasicPhoneConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicPhoneConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
918
|
+
/** @nocollapse */ BasicPhoneConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
919
|
+
<form [formGroup]="basicPhoneFormGroup">
|
|
920
|
+
<div formGroupName="properties">
|
|
921
|
+
<div class="form-group-title">Properties</div>
|
|
922
|
+
<div class="form-group">
|
|
923
|
+
<kwikui-input
|
|
924
|
+
[label]="'Mask'"
|
|
925
|
+
[id]="'basic-phone-config-mask'"
|
|
926
|
+
[type]="'text'"
|
|
927
|
+
[formControlName]="'mask'"
|
|
928
|
+
[formControl]="
|
|
929
|
+
basicPhoneFormGroup.controls.properties['controls'].mask
|
|
930
|
+
"
|
|
931
|
+
[disabled]="false"
|
|
932
|
+
[placeholder]="'Please enter your mask'"
|
|
933
|
+
[focus]="false"
|
|
934
|
+
[invalid]="false"
|
|
935
|
+
[case]="'default'"
|
|
936
|
+
size="m"
|
|
937
|
+
></kwikui-input>
|
|
938
|
+
</div>
|
|
939
|
+
</div>
|
|
940
|
+
</form>
|
|
941
|
+
`, isInline: true, styles: [""], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
942
|
+
__decorate([
|
|
943
|
+
logMethod
|
|
944
|
+
], BasicPhoneConfigEditor.prototype, "ngOnInit", null);
|
|
945
|
+
__decorate([
|
|
946
|
+
logMethod
|
|
947
|
+
], BasicPhoneConfigEditor.prototype, "ngOnChanges", null);
|
|
948
|
+
__decorate([
|
|
949
|
+
logMethod
|
|
950
|
+
], BasicPhoneConfigEditor.prototype, "createBasicPhoneFormGroup", null);
|
|
951
|
+
__decorate([
|
|
952
|
+
logMethod
|
|
953
|
+
], BasicPhoneConfigEditor.prototype, "handleOnSave", null);
|
|
954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicPhoneConfigEditor, decorators: [{
|
|
955
|
+
type: Component,
|
|
956
|
+
args: [{
|
|
957
|
+
selector: "basic-phone-config-editor",
|
|
958
|
+
template: `
|
|
959
|
+
<form [formGroup]="basicPhoneFormGroup">
|
|
960
|
+
<div formGroupName="properties">
|
|
961
|
+
<div class="form-group-title">Properties</div>
|
|
962
|
+
<div class="form-group">
|
|
963
|
+
<kwikui-input
|
|
964
|
+
[label]="'Mask'"
|
|
965
|
+
[id]="'basic-phone-config-mask'"
|
|
966
|
+
[type]="'text'"
|
|
967
|
+
[formControlName]="'mask'"
|
|
968
|
+
[formControl]="
|
|
969
|
+
basicPhoneFormGroup.controls.properties['controls'].mask
|
|
970
|
+
"
|
|
971
|
+
[disabled]="false"
|
|
972
|
+
[placeholder]="'Please enter your mask'"
|
|
973
|
+
[focus]="false"
|
|
974
|
+
[invalid]="false"
|
|
975
|
+
[case]="'default'"
|
|
976
|
+
size="m"
|
|
977
|
+
></kwikui-input>
|
|
978
|
+
</div>
|
|
979
|
+
</div>
|
|
980
|
+
</form>
|
|
981
|
+
`,
|
|
982
|
+
styles: [``]
|
|
983
|
+
}]
|
|
984
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
985
|
+
type: Input
|
|
986
|
+
}], elementConfig: [{
|
|
987
|
+
type: Input
|
|
988
|
+
}], updateElement: [{
|
|
989
|
+
type: Output
|
|
990
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicPhoneFormGroup: [], handleOnSave: [] } });
|
|
991
|
+
|
|
992
|
+
class BasicElementConfigEditor {
|
|
993
|
+
constructor() {
|
|
994
|
+
this.saveClickCounter = 0;
|
|
995
|
+
this.elementConfig = {
|
|
996
|
+
label: "",
|
|
997
|
+
key: "",
|
|
998
|
+
disabled: false,
|
|
999
|
+
default: {
|
|
1000
|
+
value: true
|
|
1001
|
+
},
|
|
1002
|
+
validators: {
|
|
1003
|
+
min: null,
|
|
1004
|
+
max: null,
|
|
1005
|
+
minLength: null,
|
|
1006
|
+
maxLength: null,
|
|
1007
|
+
required: true
|
|
1008
|
+
},
|
|
1009
|
+
properties: {
|
|
1010
|
+
placeholder: "",
|
|
1011
|
+
readOnly: false
|
|
1012
|
+
}
|
|
1013
|
+
};
|
|
1014
|
+
this.updateElement = new EventEmitter();
|
|
1015
|
+
this.elementType = "";
|
|
1016
|
+
this.saveBasicClickCounter = 0;
|
|
1017
|
+
this.basicFormGroup = undefined;
|
|
1018
|
+
}
|
|
1019
|
+
ngOnInit() {
|
|
1020
|
+
this.assignVariables();
|
|
1021
|
+
this.createBasicFormGroup();
|
|
1022
|
+
}
|
|
1023
|
+
ngOnChanges(changes) {
|
|
1024
|
+
var _a;
|
|
1025
|
+
const verifyChange = (key) => {
|
|
1026
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1027
|
+
};
|
|
1028
|
+
if (verifyChange("elementConfig")) {
|
|
1029
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1030
|
+
this.assignVariables();
|
|
1031
|
+
(_a = this.basicFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1032
|
+
}
|
|
1033
|
+
if (verifyChange("saveClickCounter")) {
|
|
1034
|
+
if (changes.saveClickCounter.previousValue !==
|
|
1035
|
+
changes.saveClickCounter.currentValue) {
|
|
1036
|
+
this.saveClickCounter = changes.saveClickCounter.currentValue;
|
|
1037
|
+
this.handleOnSave();
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
assignVariables() {
|
|
1042
|
+
this.elementType = this.elementConfig.elementType;
|
|
1043
|
+
}
|
|
1044
|
+
createBasicFormGroup() {
|
|
1045
|
+
this.basicFormGroup = new FormGroup({
|
|
1046
|
+
label: new FormControl(this.elementConfig.label),
|
|
1047
|
+
key: new FormControl(this.elementConfig.key),
|
|
1048
|
+
disabled: new FormControl(this.elementConfig.disabled),
|
|
1049
|
+
default: new FormGroup({
|
|
1050
|
+
value: new FormControl(this.elementConfig.default.value, {
|
|
1051
|
+
updateOn: "change"
|
|
1052
|
+
})
|
|
1053
|
+
}),
|
|
1054
|
+
validators: new FormGroup({
|
|
1055
|
+
min: new FormControl(this.elementConfig.validators.min, {
|
|
1056
|
+
updateOn: "change"
|
|
1057
|
+
}),
|
|
1058
|
+
minLength: new FormControl(this.elementConfig.validators.minLength, {
|
|
1059
|
+
updateOn: "change"
|
|
1060
|
+
}),
|
|
1061
|
+
max: new FormControl(this.elementConfig.validators.max, {
|
|
1062
|
+
updateOn: "change"
|
|
1063
|
+
}),
|
|
1064
|
+
maxLength: new FormControl(this.elementConfig.validators.maxLength, {
|
|
1065
|
+
updateOn: "change"
|
|
1066
|
+
}),
|
|
1067
|
+
required: new FormControl(this.elementConfig.validators.required, {
|
|
1068
|
+
updateOn: "change"
|
|
1069
|
+
})
|
|
1070
|
+
}),
|
|
1071
|
+
properties: new FormGroup({
|
|
1072
|
+
placeholder: new FormControl(this.elementConfig.properties.placeholder, {
|
|
1073
|
+
updateOn: "change"
|
|
1074
|
+
}),
|
|
1075
|
+
readOnly: new FormControl(this.elementConfig.properties.readOnly, {
|
|
1076
|
+
updateOn: "change"
|
|
1077
|
+
})
|
|
1078
|
+
})
|
|
1079
|
+
});
|
|
1080
|
+
this.basicFormGroup.updateValueAndValidity();
|
|
1081
|
+
}
|
|
1082
|
+
handleOnSaveUpdateElement(event) {
|
|
1083
|
+
// Get Common Config
|
|
1084
|
+
let basicElementCommonConfig = this.basicFormGroup.getRawValue();
|
|
1085
|
+
basicElementCommonConfig.key = basicElementCommonConfig.key.replace(/\s/g, "_");
|
|
1086
|
+
// Get Basic Element Config
|
|
1087
|
+
const basicElementConfig = event.basicElementConfig;
|
|
1088
|
+
this.elementConfig = mergeObjects(this.elementConfig, basicElementCommonConfig, basicElementConfig);
|
|
1089
|
+
this.updateElement.emit({ elementConfig: this.elementConfig });
|
|
1090
|
+
}
|
|
1091
|
+
handleOnSave() {
|
|
1092
|
+
this.saveBasicClickCounter++;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
/** @nocollapse */ BasicElementConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicElementConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1096
|
+
/** @nocollapse */ BasicElementConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
1097
|
+
<ng-container *ngIf="elementConfig !== undefined">
|
|
1098
|
+
<kwikui-table
|
|
1099
|
+
style="width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;"
|
|
1100
|
+
[columns]="['id', 'type', 'category']"
|
|
1101
|
+
[headers]="{ id: 'ID', type: 'Type', category: 'Category' }"
|
|
1102
|
+
[data]="[
|
|
1103
|
+
{
|
|
1104
|
+
id: elementConfig.elementId,
|
|
1105
|
+
type: elementConfig.elementType,
|
|
1106
|
+
category: elementConfig.elementCategory
|
|
1107
|
+
}
|
|
1108
|
+
]"
|
|
1109
|
+
(onClick)="(undefined)"
|
|
1110
|
+
></kwikui-table>
|
|
1111
|
+
</ng-container>
|
|
1112
|
+
<form [formGroup]="basicFormGroup">
|
|
1113
|
+
<fieldset>
|
|
1114
|
+
<legend class="form-group-title">Standard</legend>
|
|
1115
|
+
<div class="form-group">
|
|
1116
|
+
<kwikui-input
|
|
1117
|
+
[label]="'Label'"
|
|
1118
|
+
[id]="'basic-field-label'"
|
|
1119
|
+
[type]="'text'"
|
|
1120
|
+
[formControlName]="'label'"
|
|
1121
|
+
[formControl]="basicFormGroup.controls['label']"
|
|
1122
|
+
[disabled]="false"
|
|
1123
|
+
[placeholder]="'Please enter your Label'"
|
|
1124
|
+
[focus]="false"
|
|
1125
|
+
[invalid]="false"
|
|
1126
|
+
[case]="'default'"
|
|
1127
|
+
size="m"
|
|
1128
|
+
></kwikui-input>
|
|
1129
|
+
</div>
|
|
1130
|
+
<div class="form-group">
|
|
1131
|
+
<kwikui-input
|
|
1132
|
+
[label]="'Key'"
|
|
1133
|
+
[id]="'basic-field-key'"
|
|
1134
|
+
[type]="'text'"
|
|
1135
|
+
[formControlName]="'key'"
|
|
1136
|
+
[formControl]="basicFormGroup.controls['key']"
|
|
1137
|
+
[disabled]="false"
|
|
1138
|
+
[placeholder]="'Please enter your Key'"
|
|
1139
|
+
[focus]="false"
|
|
1140
|
+
[invalid]="false"
|
|
1141
|
+
[case]="'default'"
|
|
1142
|
+
size="m"
|
|
1143
|
+
></kwikui-input>
|
|
1144
|
+
</div>
|
|
1145
|
+
<div class="form-group">
|
|
1146
|
+
<kwikui-select-combobox
|
|
1147
|
+
[options]="[true, false]"
|
|
1148
|
+
[label]="'Disabled'"
|
|
1149
|
+
[id]="'basic-input-property-disabled'"
|
|
1150
|
+
size="m"
|
|
1151
|
+
[formControlName]="'disabled'"
|
|
1152
|
+
[formControl]="basicFormGroup.controls['disabled']"
|
|
1153
|
+
[focus]="false"
|
|
1154
|
+
[disabled]="false"
|
|
1155
|
+
[invalid]="false"
|
|
1156
|
+
[placeholder]="'Please select either true or false'"
|
|
1157
|
+
></kwikui-select-combobox>
|
|
1158
|
+
</div>
|
|
1159
|
+
</fieldset>
|
|
1160
|
+
|
|
1161
|
+
<div formGroupName="default">
|
|
1162
|
+
<fieldset>
|
|
1163
|
+
<legend class="form-group-title">Default</legend>
|
|
1164
|
+
<div class="form-group">
|
|
1165
|
+
<kwikui-select-combobox
|
|
1166
|
+
[options]="[true, false]"
|
|
1167
|
+
[label]="'value'"
|
|
1168
|
+
[id]="'basic-input-property-value'"
|
|
1169
|
+
size="m"
|
|
1170
|
+
[formControlName]="'value'"
|
|
1171
|
+
[formControl]="
|
|
1172
|
+
basicFormGroup['controls'].default['controls'].value
|
|
1173
|
+
"
|
|
1174
|
+
[focus]="false"
|
|
1175
|
+
[disabled]="false"
|
|
1176
|
+
[invalid]="false"
|
|
1177
|
+
[placeholder]="'Please select either true or false'"
|
|
1178
|
+
></kwikui-select-combobox>
|
|
1179
|
+
</div>
|
|
1180
|
+
</fieldset>
|
|
1181
|
+
</div>
|
|
1182
|
+
|
|
1183
|
+
<div formGroupName="validators">
|
|
1184
|
+
<fieldset>
|
|
1185
|
+
<legend class="form-group-title">Validators</legend>
|
|
1186
|
+
<div class="form-group">
|
|
1187
|
+
<kwikui-input-number
|
|
1188
|
+
[label]="'min'"
|
|
1189
|
+
[id]="'basic-input-validators-min'"
|
|
1190
|
+
[formControlName]="'min'"
|
|
1191
|
+
[formControl]="
|
|
1192
|
+
basicFormGroup['controls'].validators['controls'].min
|
|
1193
|
+
"
|
|
1194
|
+
[disabled]="false"
|
|
1195
|
+
[placeholder]="'Please enter your minimum value'"
|
|
1196
|
+
[focus]="false"
|
|
1197
|
+
[invalid]="false"
|
|
1198
|
+
size="m"
|
|
1199
|
+
></kwikui-input-number>
|
|
1200
|
+
</div>
|
|
1201
|
+
<div class="form-group">
|
|
1202
|
+
<kwikui-input-number
|
|
1203
|
+
[label]="'max'"
|
|
1204
|
+
[id]="'basic-input-validators-max'"
|
|
1205
|
+
[formControlName]="'max'"
|
|
1206
|
+
[formControl]="
|
|
1207
|
+
basicFormGroup['controls'].validators['controls'].max
|
|
1208
|
+
"
|
|
1209
|
+
[disabled]="false"
|
|
1210
|
+
[placeholder]="'Please enter your maximum value'"
|
|
1211
|
+
[focus]="false"
|
|
1212
|
+
[invalid]="false"
|
|
1213
|
+
size="m"
|
|
1214
|
+
></kwikui-input-number>
|
|
1215
|
+
</div>
|
|
1216
|
+
<div class="form-group">
|
|
1217
|
+
<kwikui-input-number
|
|
1218
|
+
[label]="'minLength'"
|
|
1219
|
+
[id]="'basic-input-validators-minLength'"
|
|
1220
|
+
[formControlName]="'minLength'"
|
|
1221
|
+
[formControl]="
|
|
1222
|
+
basicFormGroup['controls'].validators['controls'].minLength
|
|
1223
|
+
"
|
|
1224
|
+
[disabled]="false"
|
|
1225
|
+
[placeholder]="'Please enter your minimum length value'"
|
|
1226
|
+
[focus]="false"
|
|
1227
|
+
[invalid]="false"
|
|
1228
|
+
size="m"
|
|
1229
|
+
></kwikui-input-number>
|
|
1230
|
+
</div>
|
|
1231
|
+
<div class="form-group">
|
|
1232
|
+
<kwikui-input-number
|
|
1233
|
+
[label]="'maxLength'"
|
|
1234
|
+
[id]="'basic-input-validators-maxLength'"
|
|
1235
|
+
[formControlName]="'maxLength'"
|
|
1236
|
+
[formControl]="
|
|
1237
|
+
basicFormGroup['controls'].validators['controls'].maxLength
|
|
1238
|
+
"
|
|
1239
|
+
[disabled]="false"
|
|
1240
|
+
[placeholder]="'Please enter your maximum length value'"
|
|
1241
|
+
[focus]="false"
|
|
1242
|
+
[invalid]="false"
|
|
1243
|
+
size="m"
|
|
1244
|
+
></kwikui-input-number>
|
|
1245
|
+
</div>
|
|
1246
|
+
<div class="form-group">
|
|
1247
|
+
<kwikui-select-combobox
|
|
1248
|
+
[options]="[true, false]"
|
|
1249
|
+
[label]="'required'"
|
|
1250
|
+
[id]="'basic-input-property-required'"
|
|
1251
|
+
size="m"
|
|
1252
|
+
[formControlName]="'required'"
|
|
1253
|
+
[formControl]="
|
|
1254
|
+
basicFormGroup['controls'].validators['controls'].required
|
|
1255
|
+
"
|
|
1256
|
+
[focus]="false"
|
|
1257
|
+
[disabled]="false"
|
|
1258
|
+
[invalid]="false"
|
|
1259
|
+
[placeholder]="'Please select either true or false'"
|
|
1260
|
+
></kwikui-select-combobox>
|
|
1261
|
+
</div>
|
|
1262
|
+
</fieldset>
|
|
1263
|
+
</div>
|
|
1264
|
+
|
|
1265
|
+
<div formGroupName="properties">
|
|
1266
|
+
<fieldset>
|
|
1267
|
+
<legend class="form-group-title">Properties</legend>
|
|
1268
|
+
<div class="form-group">
|
|
1269
|
+
<kwikui-input
|
|
1270
|
+
[label]="'Placeholder'"
|
|
1271
|
+
[id]="'basic-field-placeholder'"
|
|
1272
|
+
[type]="'text'"
|
|
1273
|
+
[formControlName]="'placeholder'"
|
|
1274
|
+
[formControl]="
|
|
1275
|
+
basicFormGroup.controls.properties['controls'].placeholder
|
|
1276
|
+
"
|
|
1277
|
+
[disabled]="false"
|
|
1278
|
+
[placeholder]="'Please enter your placeholder'"
|
|
1279
|
+
[focus]="false"
|
|
1280
|
+
[invalid]="false"
|
|
1281
|
+
[case]="'default'"
|
|
1282
|
+
size="m"
|
|
1283
|
+
></kwikui-input>
|
|
1284
|
+
</div>
|
|
1285
|
+
<div class="form-group">
|
|
1286
|
+
<kwikui-select-combobox
|
|
1287
|
+
[options]="[true, false]"
|
|
1288
|
+
[label]="'readOnly'"
|
|
1289
|
+
[id]="'basic-input-property-readOnly'"
|
|
1290
|
+
size="m"
|
|
1291
|
+
[formControlName]="'readOnly'"
|
|
1292
|
+
[formControl]="
|
|
1293
|
+
basicFormGroup['controls'].properties['controls'].readOnly
|
|
1294
|
+
"
|
|
1295
|
+
[focus]="false"
|
|
1296
|
+
[disabled]="false"
|
|
1297
|
+
[invalid]="false"
|
|
1298
|
+
[placeholder]="'Please select either true or false'"
|
|
1299
|
+
></kwikui-select-combobox>
|
|
1300
|
+
</div>
|
|
1301
|
+
</fieldset>
|
|
1302
|
+
</div>
|
|
1303
|
+
|
|
1304
|
+
<ng-container [ngSwitch]="elementType">
|
|
1305
|
+
<ng-container *ngSwitchCase="'text'">
|
|
1306
|
+
<basic-text-config-editor
|
|
1307
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1308
|
+
[elementConfig]="elementConfig"
|
|
1309
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1310
|
+
></basic-text-config-editor>
|
|
1311
|
+
</ng-container>
|
|
1312
|
+
<ng-container *ngSwitchCase="'number'">
|
|
1313
|
+
<basic-number-config-editor
|
|
1314
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1315
|
+
[elementConfig]="elementConfig"
|
|
1316
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1317
|
+
></basic-number-config-editor>
|
|
1318
|
+
</ng-container>
|
|
1319
|
+
<ng-container *ngSwitchCase="'radio'">
|
|
1320
|
+
<basic-radio-config-editor
|
|
1321
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1322
|
+
[elementConfig]="elementConfig"
|
|
1323
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1324
|
+
></basic-radio-config-editor>
|
|
1325
|
+
</ng-container>
|
|
1326
|
+
<ng-container *ngSwitchCase="'checkbox'">
|
|
1327
|
+
<basic-checkbox-config-editor
|
|
1328
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1329
|
+
[elementConfig]="elementConfig"
|
|
1330
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1331
|
+
></basic-checkbox-config-editor>
|
|
1332
|
+
</ng-container>
|
|
1333
|
+
<ng-container *ngSwitchCase="'date'">
|
|
1334
|
+
<basic-checkbox-config-editor
|
|
1335
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1336
|
+
[elementConfig]="elementConfig"
|
|
1337
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1338
|
+
></basic-checkbox-config-editor>
|
|
1339
|
+
</ng-container>
|
|
1340
|
+
<ng-container *ngSwitchCase="'otp'">
|
|
1341
|
+
<basic-otp-config-editor
|
|
1342
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1343
|
+
[elementConfig]="elementConfig"
|
|
1344
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1345
|
+
></basic-otp-config-editor>
|
|
1346
|
+
</ng-container>
|
|
1347
|
+
<ng-container *ngSwitchCase="'phone'">
|
|
1348
|
+
<basic-phone-config-editor
|
|
1349
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1350
|
+
[elementConfig]="elementConfig"
|
|
1351
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1352
|
+
></basic-phone-config-editor>
|
|
1353
|
+
</ng-container>
|
|
1354
|
+
</ng-container>
|
|
1355
|
+
</form>
|
|
1356
|
+
`, 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.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
1357
|
+
__decorate([
|
|
1358
|
+
logMethod
|
|
1359
|
+
], BasicElementConfigEditor.prototype, "ngOnInit", null);
|
|
1360
|
+
__decorate([
|
|
1361
|
+
logMethod
|
|
1362
|
+
], BasicElementConfigEditor.prototype, "ngOnChanges", null);
|
|
1363
|
+
__decorate([
|
|
1364
|
+
logMethod
|
|
1365
|
+
], BasicElementConfigEditor.prototype, "assignVariables", null);
|
|
1366
|
+
__decorate([
|
|
1367
|
+
logMethod
|
|
1368
|
+
], BasicElementConfigEditor.prototype, "createBasicFormGroup", null);
|
|
1369
|
+
__decorate([
|
|
1370
|
+
logMethod
|
|
1371
|
+
], BasicElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
|
|
1372
|
+
__decorate([
|
|
1373
|
+
logMethod
|
|
1374
|
+
], BasicElementConfigEditor.prototype, "handleOnSave", null);
|
|
1375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicElementConfigEditor, decorators: [{
|
|
1376
|
+
type: Component,
|
|
1377
|
+
args: [{
|
|
1378
|
+
selector: "basic-element-config-editor",
|
|
1379
|
+
template: `
|
|
1380
|
+
<ng-container *ngIf="elementConfig !== undefined">
|
|
1381
|
+
<kwikui-table
|
|
1382
|
+
style="width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;"
|
|
1383
|
+
[columns]="['id', 'type', 'category']"
|
|
1384
|
+
[headers]="{ id: 'ID', type: 'Type', category: 'Category' }"
|
|
1385
|
+
[data]="[
|
|
1386
|
+
{
|
|
1387
|
+
id: elementConfig.elementId,
|
|
1388
|
+
type: elementConfig.elementType,
|
|
1389
|
+
category: elementConfig.elementCategory
|
|
1390
|
+
}
|
|
1391
|
+
]"
|
|
1392
|
+
(onClick)="(undefined)"
|
|
1393
|
+
></kwikui-table>
|
|
1394
|
+
</ng-container>
|
|
1395
|
+
<form [formGroup]="basicFormGroup">
|
|
1396
|
+
<fieldset>
|
|
1397
|
+
<legend class="form-group-title">Standard</legend>
|
|
1398
|
+
<div class="form-group">
|
|
1399
|
+
<kwikui-input
|
|
1400
|
+
[label]="'Label'"
|
|
1401
|
+
[id]="'basic-field-label'"
|
|
1402
|
+
[type]="'text'"
|
|
1403
|
+
[formControlName]="'label'"
|
|
1404
|
+
[formControl]="basicFormGroup.controls['label']"
|
|
1405
|
+
[disabled]="false"
|
|
1406
|
+
[placeholder]="'Please enter your Label'"
|
|
1407
|
+
[focus]="false"
|
|
1408
|
+
[invalid]="false"
|
|
1409
|
+
[case]="'default'"
|
|
1410
|
+
size="m"
|
|
1411
|
+
></kwikui-input>
|
|
1412
|
+
</div>
|
|
1413
|
+
<div class="form-group">
|
|
1414
|
+
<kwikui-input
|
|
1415
|
+
[label]="'Key'"
|
|
1416
|
+
[id]="'basic-field-key'"
|
|
1417
|
+
[type]="'text'"
|
|
1418
|
+
[formControlName]="'key'"
|
|
1419
|
+
[formControl]="basicFormGroup.controls['key']"
|
|
1420
|
+
[disabled]="false"
|
|
1421
|
+
[placeholder]="'Please enter your Key'"
|
|
1422
|
+
[focus]="false"
|
|
1423
|
+
[invalid]="false"
|
|
1424
|
+
[case]="'default'"
|
|
1425
|
+
size="m"
|
|
1426
|
+
></kwikui-input>
|
|
1427
|
+
</div>
|
|
1428
|
+
<div class="form-group">
|
|
1429
|
+
<kwikui-select-combobox
|
|
1430
|
+
[options]="[true, false]"
|
|
1431
|
+
[label]="'Disabled'"
|
|
1432
|
+
[id]="'basic-input-property-disabled'"
|
|
1433
|
+
size="m"
|
|
1434
|
+
[formControlName]="'disabled'"
|
|
1435
|
+
[formControl]="basicFormGroup.controls['disabled']"
|
|
1436
|
+
[focus]="false"
|
|
1437
|
+
[disabled]="false"
|
|
1438
|
+
[invalid]="false"
|
|
1439
|
+
[placeholder]="'Please select either true or false'"
|
|
1440
|
+
></kwikui-select-combobox>
|
|
1441
|
+
</div>
|
|
1442
|
+
</fieldset>
|
|
1443
|
+
|
|
1444
|
+
<div formGroupName="default">
|
|
1445
|
+
<fieldset>
|
|
1446
|
+
<legend class="form-group-title">Default</legend>
|
|
1447
|
+
<div class="form-group">
|
|
1448
|
+
<kwikui-select-combobox
|
|
1449
|
+
[options]="[true, false]"
|
|
1450
|
+
[label]="'value'"
|
|
1451
|
+
[id]="'basic-input-property-value'"
|
|
1452
|
+
size="m"
|
|
1453
|
+
[formControlName]="'value'"
|
|
1454
|
+
[formControl]="
|
|
1455
|
+
basicFormGroup['controls'].default['controls'].value
|
|
1456
|
+
"
|
|
1457
|
+
[focus]="false"
|
|
1458
|
+
[disabled]="false"
|
|
1459
|
+
[invalid]="false"
|
|
1460
|
+
[placeholder]="'Please select either true or false'"
|
|
1461
|
+
></kwikui-select-combobox>
|
|
1462
|
+
</div>
|
|
1463
|
+
</fieldset>
|
|
1464
|
+
</div>
|
|
1465
|
+
|
|
1466
|
+
<div formGroupName="validators">
|
|
1467
|
+
<fieldset>
|
|
1468
|
+
<legend class="form-group-title">Validators</legend>
|
|
1469
|
+
<div class="form-group">
|
|
1470
|
+
<kwikui-input-number
|
|
1471
|
+
[label]="'min'"
|
|
1472
|
+
[id]="'basic-input-validators-min'"
|
|
1473
|
+
[formControlName]="'min'"
|
|
1474
|
+
[formControl]="
|
|
1475
|
+
basicFormGroup['controls'].validators['controls'].min
|
|
1476
|
+
"
|
|
1477
|
+
[disabled]="false"
|
|
1478
|
+
[placeholder]="'Please enter your minimum value'"
|
|
1479
|
+
[focus]="false"
|
|
1480
|
+
[invalid]="false"
|
|
1481
|
+
size="m"
|
|
1482
|
+
></kwikui-input-number>
|
|
1483
|
+
</div>
|
|
1484
|
+
<div class="form-group">
|
|
1485
|
+
<kwikui-input-number
|
|
1486
|
+
[label]="'max'"
|
|
1487
|
+
[id]="'basic-input-validators-max'"
|
|
1488
|
+
[formControlName]="'max'"
|
|
1489
|
+
[formControl]="
|
|
1490
|
+
basicFormGroup['controls'].validators['controls'].max
|
|
1491
|
+
"
|
|
1492
|
+
[disabled]="false"
|
|
1493
|
+
[placeholder]="'Please enter your maximum value'"
|
|
1494
|
+
[focus]="false"
|
|
1495
|
+
[invalid]="false"
|
|
1496
|
+
size="m"
|
|
1497
|
+
></kwikui-input-number>
|
|
1498
|
+
</div>
|
|
1499
|
+
<div class="form-group">
|
|
1500
|
+
<kwikui-input-number
|
|
1501
|
+
[label]="'minLength'"
|
|
1502
|
+
[id]="'basic-input-validators-minLength'"
|
|
1503
|
+
[formControlName]="'minLength'"
|
|
1504
|
+
[formControl]="
|
|
1505
|
+
basicFormGroup['controls'].validators['controls'].minLength
|
|
1506
|
+
"
|
|
1507
|
+
[disabled]="false"
|
|
1508
|
+
[placeholder]="'Please enter your minimum length value'"
|
|
1509
|
+
[focus]="false"
|
|
1510
|
+
[invalid]="false"
|
|
1511
|
+
size="m"
|
|
1512
|
+
></kwikui-input-number>
|
|
1513
|
+
</div>
|
|
1514
|
+
<div class="form-group">
|
|
1515
|
+
<kwikui-input-number
|
|
1516
|
+
[label]="'maxLength'"
|
|
1517
|
+
[id]="'basic-input-validators-maxLength'"
|
|
1518
|
+
[formControlName]="'maxLength'"
|
|
1519
|
+
[formControl]="
|
|
1520
|
+
basicFormGroup['controls'].validators['controls'].maxLength
|
|
1521
|
+
"
|
|
1522
|
+
[disabled]="false"
|
|
1523
|
+
[placeholder]="'Please enter your maximum length value'"
|
|
1524
|
+
[focus]="false"
|
|
1525
|
+
[invalid]="false"
|
|
1526
|
+
size="m"
|
|
1527
|
+
></kwikui-input-number>
|
|
1528
|
+
</div>
|
|
1529
|
+
<div class="form-group">
|
|
1530
|
+
<kwikui-select-combobox
|
|
1531
|
+
[options]="[true, false]"
|
|
1532
|
+
[label]="'required'"
|
|
1533
|
+
[id]="'basic-input-property-required'"
|
|
1534
|
+
size="m"
|
|
1535
|
+
[formControlName]="'required'"
|
|
1536
|
+
[formControl]="
|
|
1537
|
+
basicFormGroup['controls'].validators['controls'].required
|
|
1538
|
+
"
|
|
1539
|
+
[focus]="false"
|
|
1540
|
+
[disabled]="false"
|
|
1541
|
+
[invalid]="false"
|
|
1542
|
+
[placeholder]="'Please select either true or false'"
|
|
1543
|
+
></kwikui-select-combobox>
|
|
1544
|
+
</div>
|
|
1545
|
+
</fieldset>
|
|
1546
|
+
</div>
|
|
1547
|
+
|
|
1548
|
+
<div formGroupName="properties">
|
|
1549
|
+
<fieldset>
|
|
1550
|
+
<legend class="form-group-title">Properties</legend>
|
|
1551
|
+
<div class="form-group">
|
|
1552
|
+
<kwikui-input
|
|
1553
|
+
[label]="'Placeholder'"
|
|
1554
|
+
[id]="'basic-field-placeholder'"
|
|
1555
|
+
[type]="'text'"
|
|
1556
|
+
[formControlName]="'placeholder'"
|
|
1557
|
+
[formControl]="
|
|
1558
|
+
basicFormGroup.controls.properties['controls'].placeholder
|
|
1559
|
+
"
|
|
1560
|
+
[disabled]="false"
|
|
1561
|
+
[placeholder]="'Please enter your placeholder'"
|
|
1562
|
+
[focus]="false"
|
|
1563
|
+
[invalid]="false"
|
|
1564
|
+
[case]="'default'"
|
|
1565
|
+
size="m"
|
|
1566
|
+
></kwikui-input>
|
|
1567
|
+
</div>
|
|
1568
|
+
<div class="form-group">
|
|
1569
|
+
<kwikui-select-combobox
|
|
1570
|
+
[options]="[true, false]"
|
|
1571
|
+
[label]="'readOnly'"
|
|
1572
|
+
[id]="'basic-input-property-readOnly'"
|
|
1573
|
+
size="m"
|
|
1574
|
+
[formControlName]="'readOnly'"
|
|
1575
|
+
[formControl]="
|
|
1576
|
+
basicFormGroup['controls'].properties['controls'].readOnly
|
|
1577
|
+
"
|
|
1578
|
+
[focus]="false"
|
|
1579
|
+
[disabled]="false"
|
|
1580
|
+
[invalid]="false"
|
|
1581
|
+
[placeholder]="'Please select either true or false'"
|
|
1582
|
+
></kwikui-select-combobox>
|
|
1583
|
+
</div>
|
|
1584
|
+
</fieldset>
|
|
1585
|
+
</div>
|
|
1586
|
+
|
|
1587
|
+
<ng-container [ngSwitch]="elementType">
|
|
1588
|
+
<ng-container *ngSwitchCase="'text'">
|
|
1589
|
+
<basic-text-config-editor
|
|
1590
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1591
|
+
[elementConfig]="elementConfig"
|
|
1592
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1593
|
+
></basic-text-config-editor>
|
|
1594
|
+
</ng-container>
|
|
1595
|
+
<ng-container *ngSwitchCase="'number'">
|
|
1596
|
+
<basic-number-config-editor
|
|
1597
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1598
|
+
[elementConfig]="elementConfig"
|
|
1599
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1600
|
+
></basic-number-config-editor>
|
|
1601
|
+
</ng-container>
|
|
1602
|
+
<ng-container *ngSwitchCase="'radio'">
|
|
1603
|
+
<basic-radio-config-editor
|
|
1604
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1605
|
+
[elementConfig]="elementConfig"
|
|
1606
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1607
|
+
></basic-radio-config-editor>
|
|
1608
|
+
</ng-container>
|
|
1609
|
+
<ng-container *ngSwitchCase="'checkbox'">
|
|
1610
|
+
<basic-checkbox-config-editor
|
|
1611
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1612
|
+
[elementConfig]="elementConfig"
|
|
1613
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1614
|
+
></basic-checkbox-config-editor>
|
|
1615
|
+
</ng-container>
|
|
1616
|
+
<ng-container *ngSwitchCase="'date'">
|
|
1617
|
+
<basic-checkbox-config-editor
|
|
1618
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1619
|
+
[elementConfig]="elementConfig"
|
|
1620
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1621
|
+
></basic-checkbox-config-editor>
|
|
1622
|
+
</ng-container>
|
|
1623
|
+
<ng-container *ngSwitchCase="'otp'">
|
|
1624
|
+
<basic-otp-config-editor
|
|
1625
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1626
|
+
[elementConfig]="elementConfig"
|
|
1627
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1628
|
+
></basic-otp-config-editor>
|
|
1629
|
+
</ng-container>
|
|
1630
|
+
<ng-container *ngSwitchCase="'phone'">
|
|
1631
|
+
<basic-phone-config-editor
|
|
1632
|
+
[saveBasicClickCounter]="saveBasicClickCounter"
|
|
1633
|
+
[elementConfig]="elementConfig"
|
|
1634
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1635
|
+
></basic-phone-config-editor>
|
|
1636
|
+
</ng-container>
|
|
1637
|
+
</ng-container>
|
|
1638
|
+
</form>
|
|
1639
|
+
`,
|
|
1640
|
+
styles: [
|
|
1641
|
+
`
|
|
1642
|
+
:host {
|
|
1643
|
+
display: flex;
|
|
1644
|
+
flex-direction: column;
|
|
1645
|
+
align-content: center;
|
|
1646
|
+
justify-content: flex-start;
|
|
1647
|
+
align-items: stretch;
|
|
1648
|
+
gap: 1rem;
|
|
1649
|
+
}
|
|
1650
|
+
`
|
|
1651
|
+
]
|
|
1652
|
+
}]
|
|
1653
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveClickCounter: [{
|
|
1654
|
+
type: Input
|
|
1655
|
+
}], elementConfig: [{
|
|
1656
|
+
type: Input
|
|
1657
|
+
}], updateElement: [{
|
|
1658
|
+
type: Output
|
|
1659
|
+
}], ngOnInit: [], ngOnChanges: [], assignVariables: [], createBasicFormGroup: [], handleOnSaveUpdateElement: [], handleOnSave: [] } });
|
|
1660
|
+
|
|
1661
|
+
class DocumentAadhaarNumberConfigEditor {
|
|
1662
|
+
constructor() {
|
|
1663
|
+
this.saveDocumentClickCounter = 0;
|
|
1664
|
+
this.elementConfig = {
|
|
1665
|
+
properties: {
|
|
1666
|
+
mask: "####-####-####"
|
|
1667
|
+
}
|
|
1668
|
+
};
|
|
1669
|
+
this.updateElement = new EventEmitter();
|
|
1670
|
+
this.documentAadhaarNumberFormGroup = undefined;
|
|
1671
|
+
}
|
|
1672
|
+
ngOnInit() {
|
|
1673
|
+
this.createDocumentAadhaarNumberFormGroup();
|
|
1674
|
+
}
|
|
1675
|
+
ngOnChanges(changes) {
|
|
1676
|
+
var _a;
|
|
1677
|
+
const verifyChange = (key) => {
|
|
1678
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1679
|
+
};
|
|
1680
|
+
if (verifyChange("elementConfig")) {
|
|
1681
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1682
|
+
(_a = this.documentAadhaarNumberFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1683
|
+
}
|
|
1684
|
+
if (verifyChange("saveDocumentClickCounter")) {
|
|
1685
|
+
if (changes.saveDocumentClickCounter.previousValue !==
|
|
1686
|
+
changes.saveDocumentClickCounter.currentValue) {
|
|
1687
|
+
this.saveDocumentClickCounter = changes.saveDocumentClickCounter.currentValue;
|
|
1688
|
+
this.handleOnSave();
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
createDocumentAadhaarNumberFormGroup() {
|
|
1693
|
+
this.documentAadhaarNumberFormGroup = new FormGroup({
|
|
1694
|
+
properties: new FormGroup({
|
|
1695
|
+
mask: new FormControl(this.elementConfig.properties.mask, {
|
|
1696
|
+
updateOn: "change"
|
|
1697
|
+
})
|
|
1698
|
+
})
|
|
1699
|
+
});
|
|
1700
|
+
this.documentAadhaarNumberFormGroup.updateValueAndValidity();
|
|
1701
|
+
}
|
|
1702
|
+
handleOnSave() {
|
|
1703
|
+
let documentElementConfig = this.documentAadhaarNumberFormGroup.getRawValue();
|
|
1704
|
+
this.updateElement.emit({
|
|
1705
|
+
documentElementConfig: documentElementConfig
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
/** @nocollapse */ DocumentAadhaarNumberConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DocumentAadhaarNumberConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1710
|
+
/** @nocollapse */ DocumentAadhaarNumberConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
1711
|
+
<form [formGroup]="documentAadhaarNumberFormGroup">
|
|
1712
|
+
<div formGroupName="properties">
|
|
1713
|
+
<div class="form-group-title">Properties</div>
|
|
1714
|
+
<div class="form-group">
|
|
1715
|
+
<kwikui-input
|
|
1716
|
+
[label]="'Mask'"
|
|
1717
|
+
[id]="'basic-phone-config-mask'"
|
|
1718
|
+
[type]="'text'"
|
|
1719
|
+
[formControlName]="'mask'"
|
|
1720
|
+
[formControl]="
|
|
1721
|
+
documentAadhaarNumberFormGroup.controls.properties['controls'].mask
|
|
1722
|
+
"
|
|
1723
|
+
[disabled]="false"
|
|
1724
|
+
[placeholder]="'Please enter your mask'"
|
|
1725
|
+
[focus]="false"
|
|
1726
|
+
[invalid]="false"
|
|
1727
|
+
[case]="'default'"
|
|
1728
|
+
size="m"
|
|
1729
|
+
></kwikui-input>
|
|
1730
|
+
</div>
|
|
1731
|
+
</div>
|
|
1732
|
+
</form>
|
|
1733
|
+
`, isInline: true, styles: [""], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1734
|
+
__decorate([
|
|
1735
|
+
logMethod
|
|
1736
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "ngOnInit", null);
|
|
1737
|
+
__decorate([
|
|
1738
|
+
logMethod
|
|
1739
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "ngOnChanges", null);
|
|
1740
|
+
__decorate([
|
|
1741
|
+
logMethod
|
|
1742
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "createDocumentAadhaarNumberFormGroup", null);
|
|
1743
|
+
__decorate([
|
|
1744
|
+
logMethod
|
|
1745
|
+
], DocumentAadhaarNumberConfigEditor.prototype, "handleOnSave", null);
|
|
1746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DocumentAadhaarNumberConfigEditor, decorators: [{
|
|
1747
|
+
type: Component,
|
|
1748
|
+
args: [{
|
|
1749
|
+
selector: "document-aadhaar-number-config-editor",
|
|
1750
|
+
template: `
|
|
1751
|
+
<form [formGroup]="documentAadhaarNumberFormGroup">
|
|
1752
|
+
<div formGroupName="properties">
|
|
1753
|
+
<div class="form-group-title">Properties</div>
|
|
1754
|
+
<div class="form-group">
|
|
1755
|
+
<kwikui-input
|
|
1756
|
+
[label]="'Mask'"
|
|
1757
|
+
[id]="'basic-phone-config-mask'"
|
|
1758
|
+
[type]="'text'"
|
|
1759
|
+
[formControlName]="'mask'"
|
|
1760
|
+
[formControl]="
|
|
1761
|
+
documentAadhaarNumberFormGroup.controls.properties['controls'].mask
|
|
1762
|
+
"
|
|
1763
|
+
[disabled]="false"
|
|
1764
|
+
[placeholder]="'Please enter your mask'"
|
|
1765
|
+
[focus]="false"
|
|
1766
|
+
[invalid]="false"
|
|
1767
|
+
[case]="'default'"
|
|
1768
|
+
size="m"
|
|
1769
|
+
></kwikui-input>
|
|
1770
|
+
</div>
|
|
1771
|
+
</div>
|
|
1772
|
+
</form>
|
|
1773
|
+
`,
|
|
1774
|
+
styles: [``]
|
|
1775
|
+
}]
|
|
1776
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveDocumentClickCounter: [{
|
|
1777
|
+
type: Input
|
|
1778
|
+
}], elementConfig: [{
|
|
1779
|
+
type: Input
|
|
1780
|
+
}], updateElement: [{
|
|
1781
|
+
type: Output
|
|
1782
|
+
}], ngOnInit: [], ngOnChanges: [], createDocumentAadhaarNumberFormGroup: [], handleOnSave: [] } });
|
|
1783
|
+
|
|
1784
|
+
class DocumentPanNumberConfigEditor {
|
|
1785
|
+
constructor() {
|
|
1786
|
+
this.saveDocumentClickCounter = 0;
|
|
1787
|
+
this.elementConfig = {
|
|
1788
|
+
properties: {
|
|
1789
|
+
case: "upper"
|
|
1790
|
+
}
|
|
1791
|
+
};
|
|
1792
|
+
this.updateElement = new EventEmitter();
|
|
1793
|
+
this.documentPanNumberFormGroup = undefined;
|
|
1794
|
+
}
|
|
1795
|
+
ngOnInit() {
|
|
1796
|
+
this.createDocumentPanNumberFormGroup();
|
|
1797
|
+
}
|
|
1798
|
+
ngOnChanges(changes) {
|
|
1799
|
+
var _a;
|
|
1800
|
+
const verifyChange = (key) => {
|
|
1801
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1802
|
+
};
|
|
1803
|
+
if (verifyChange("elementConfig")) {
|
|
1804
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1805
|
+
(_a = this.documentPanNumberFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1806
|
+
}
|
|
1807
|
+
if (verifyChange("saveDocumentClickCounter")) {
|
|
1808
|
+
if (changes.saveDocumentClickCounter.previousValue !==
|
|
1809
|
+
changes.saveDocumentClickCounter.currentValue) {
|
|
1810
|
+
this.saveDocumentClickCounter =
|
|
1811
|
+
changes.saveDocumentClickCounter.currentValue;
|
|
1812
|
+
this.handleOnSave();
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
createDocumentPanNumberFormGroup() {
|
|
1817
|
+
this.documentPanNumberFormGroup = new FormGroup({
|
|
1818
|
+
properties: new FormGroup({
|
|
1819
|
+
case: new FormControl(this.elementConfig.properties.case, {
|
|
1820
|
+
updateOn: "change"
|
|
1821
|
+
})
|
|
1822
|
+
})
|
|
1823
|
+
});
|
|
1824
|
+
this.documentPanNumberFormGroup.updateValueAndValidity();
|
|
1825
|
+
}
|
|
1826
|
+
handleOnSave() {
|
|
1827
|
+
let documentElementConfig = this.documentPanNumberFormGroup.getRawValue();
|
|
1828
|
+
this.updateElement.emit({
|
|
1829
|
+
documentElementConfig: documentElementConfig
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
/** @nocollapse */ DocumentPanNumberConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DocumentPanNumberConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1834
|
+
/** @nocollapse */ DocumentPanNumberConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
1835
|
+
<form [formGroup]="documentPanNumberFormGroup">
|
|
1836
|
+
<div formGroupName="properties">
|
|
1837
|
+
<fieldset>
|
|
1838
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
1839
|
+
<div class="form-group">
|
|
1840
|
+
<kwikui-select-combobox
|
|
1841
|
+
[options]="['default', 'upper', 'lower']"
|
|
1842
|
+
[label]="'case'"
|
|
1843
|
+
[id]="'document-pan-number-config-case'"
|
|
1844
|
+
size="m"
|
|
1845
|
+
[formControlName]="'case'"
|
|
1846
|
+
[formControl]="
|
|
1847
|
+
documentPanNumberFormGroup['controls'].properties['controls']
|
|
1848
|
+
.case
|
|
1849
|
+
"
|
|
1850
|
+
[focus]="false"
|
|
1851
|
+
[disabled]="false"
|
|
1852
|
+
[invalid]="false"
|
|
1853
|
+
[placeholder]="'Please select either true or false'"
|
|
1854
|
+
></kwikui-select-combobox>
|
|
1855
|
+
</div>
|
|
1856
|
+
</fieldset>
|
|
1857
|
+
</div>
|
|
1858
|
+
</form>
|
|
1859
|
+
`, isInline: true, styles: [""], components: [{ type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1860
|
+
__decorate([
|
|
1861
|
+
logMethod
|
|
1862
|
+
], DocumentPanNumberConfigEditor.prototype, "ngOnInit", null);
|
|
1863
|
+
__decorate([
|
|
1864
|
+
logMethod
|
|
1865
|
+
], DocumentPanNumberConfigEditor.prototype, "ngOnChanges", null);
|
|
1866
|
+
__decorate([
|
|
1867
|
+
logMethod
|
|
1868
|
+
], DocumentPanNumberConfigEditor.prototype, "createDocumentPanNumberFormGroup", null);
|
|
1869
|
+
__decorate([
|
|
1870
|
+
logMethod
|
|
1871
|
+
], DocumentPanNumberConfigEditor.prototype, "handleOnSave", null);
|
|
1872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DocumentPanNumberConfigEditor, decorators: [{
|
|
1873
|
+
type: Component,
|
|
1874
|
+
args: [{
|
|
1875
|
+
selector: "document-pan-number-config-editor",
|
|
1876
|
+
template: `
|
|
1877
|
+
<form [formGroup]="documentPanNumberFormGroup">
|
|
1878
|
+
<div formGroupName="properties">
|
|
1879
|
+
<fieldset>
|
|
1880
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
1881
|
+
<div class="form-group">
|
|
1882
|
+
<kwikui-select-combobox
|
|
1883
|
+
[options]="['default', 'upper', 'lower']"
|
|
1884
|
+
[label]="'case'"
|
|
1885
|
+
[id]="'document-pan-number-config-case'"
|
|
1886
|
+
size="m"
|
|
1887
|
+
[formControlName]="'case'"
|
|
1888
|
+
[formControl]="
|
|
1889
|
+
documentPanNumberFormGroup['controls'].properties['controls']
|
|
1890
|
+
.case
|
|
1891
|
+
"
|
|
1892
|
+
[focus]="false"
|
|
1893
|
+
[disabled]="false"
|
|
1894
|
+
[invalid]="false"
|
|
1895
|
+
[placeholder]="'Please select either true or false'"
|
|
1896
|
+
></kwikui-select-combobox>
|
|
1897
|
+
</div>
|
|
1898
|
+
</fieldset>
|
|
1899
|
+
</div>
|
|
1900
|
+
</form>
|
|
1901
|
+
`,
|
|
1902
|
+
styles: [``]
|
|
1903
|
+
}]
|
|
1904
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveDocumentClickCounter: [{
|
|
1905
|
+
type: Input
|
|
1906
|
+
}], elementConfig: [{
|
|
1907
|
+
type: Input
|
|
1908
|
+
}], updateElement: [{
|
|
1909
|
+
type: Output
|
|
1910
|
+
}], ngOnInit: [], ngOnChanges: [], createDocumentPanNumberFormGroup: [], handleOnSave: [] } });
|
|
1911
|
+
|
|
1912
|
+
class DocumentElementConfigEditor {
|
|
1913
|
+
constructor() {
|
|
1914
|
+
this.saveClickCounter = 0;
|
|
1915
|
+
this.elementConfig = {
|
|
1916
|
+
label: "",
|
|
1917
|
+
key: "",
|
|
1918
|
+
disabled: false,
|
|
1919
|
+
default: {
|
|
1920
|
+
value: true
|
|
1921
|
+
},
|
|
1922
|
+
validators: {
|
|
1923
|
+
min: null,
|
|
1924
|
+
max: null,
|
|
1925
|
+
minLength: null,
|
|
1926
|
+
maxLength: null,
|
|
1927
|
+
required: true
|
|
1928
|
+
},
|
|
1929
|
+
properties: {
|
|
1930
|
+
placeholder: "",
|
|
1931
|
+
readOnly: false
|
|
1932
|
+
}
|
|
1933
|
+
};
|
|
1934
|
+
this.updateElement = new EventEmitter();
|
|
1935
|
+
this.elementType = "";
|
|
1936
|
+
this.saveDocumentClickCounter = 0;
|
|
1937
|
+
this.documentFormGroup = undefined;
|
|
1938
|
+
}
|
|
1939
|
+
ngOnInit() {
|
|
1940
|
+
this.assignVariables();
|
|
1941
|
+
this.createDocumentFormGroup();
|
|
1942
|
+
}
|
|
1943
|
+
ngOnChanges(changes) {
|
|
1944
|
+
var _a;
|
|
1945
|
+
const verifyChange = (key) => {
|
|
1946
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
1947
|
+
};
|
|
1948
|
+
if (verifyChange("elementConfig")) {
|
|
1949
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
1950
|
+
this.assignVariables();
|
|
1951
|
+
(_a = this.documentFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
1952
|
+
}
|
|
1953
|
+
if (verifyChange("saveClickCounter")) {
|
|
1954
|
+
if (changes.saveClickCounter.previousValue !==
|
|
1955
|
+
changes.saveClickCounter.currentValue) {
|
|
1956
|
+
this.saveClickCounter = changes.saveClickCounter.currentValue;
|
|
1957
|
+
this.handleOnSave();
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
assignVariables() {
|
|
1962
|
+
this.elementType = this.elementConfig.elementType;
|
|
1963
|
+
}
|
|
1964
|
+
createDocumentFormGroup() {
|
|
1965
|
+
this.documentFormGroup = new FormGroup({
|
|
1966
|
+
label: new FormControl(this.elementConfig.label),
|
|
1967
|
+
key: new FormControl(this.elementConfig.key),
|
|
1968
|
+
disabled: new FormControl(this.elementConfig.disabled),
|
|
1969
|
+
default: new FormGroup({
|
|
1970
|
+
value: new FormControl(this.elementConfig.default.value, {
|
|
1971
|
+
updateOn: "change"
|
|
1972
|
+
})
|
|
1973
|
+
}),
|
|
1974
|
+
validators: new FormGroup({
|
|
1975
|
+
min: new FormControl(this.elementConfig.validators.min, {
|
|
1976
|
+
updateOn: "change"
|
|
1977
|
+
}),
|
|
1978
|
+
minLength: new FormControl(this.elementConfig.validators.minLength, {
|
|
1979
|
+
updateOn: "change"
|
|
1980
|
+
}),
|
|
1981
|
+
max: new FormControl(this.elementConfig.validators.max, {
|
|
1982
|
+
updateOn: "change"
|
|
1983
|
+
}),
|
|
1984
|
+
maxLength: new FormControl(this.elementConfig.validators.maxLength, {
|
|
1985
|
+
updateOn: "change"
|
|
1986
|
+
}),
|
|
1987
|
+
required: new FormControl(this.elementConfig.validators.required, {
|
|
1988
|
+
updateOn: "change"
|
|
1989
|
+
})
|
|
1990
|
+
}),
|
|
1991
|
+
properties: new FormGroup({
|
|
1992
|
+
placeholder: new FormControl(this.elementConfig.properties.placeholder, {
|
|
1993
|
+
updateOn: "change"
|
|
1994
|
+
}),
|
|
1995
|
+
readOnly: new FormControl(this.elementConfig.properties.readOnly, {
|
|
1996
|
+
updateOn: "change"
|
|
1997
|
+
})
|
|
1998
|
+
})
|
|
1999
|
+
});
|
|
2000
|
+
this.documentFormGroup.updateValueAndValidity();
|
|
2001
|
+
}
|
|
2002
|
+
handleOnSaveUpdateElement(event) {
|
|
2003
|
+
// Get Common Config
|
|
2004
|
+
let documentElementCommonConfig = this.documentFormGroup.getRawValue();
|
|
2005
|
+
documentElementCommonConfig.key = documentElementCommonConfig.key.replace(/\s/g, "_");
|
|
2006
|
+
// Get Document Element Config
|
|
2007
|
+
const documentElementConfig = event.documentElementConfig;
|
|
2008
|
+
this.elementConfig = _.merge(this.elementConfig, documentElementCommonConfig, documentElementConfig);
|
|
2009
|
+
this.updateElement.emit({ elementConfig: this.elementConfig });
|
|
2010
|
+
}
|
|
2011
|
+
handleOnSave() {
|
|
2012
|
+
this.saveDocumentClickCounter++;
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
/** @nocollapse */ DocumentElementConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DocumentElementConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2016
|
+
/** @nocollapse */ DocumentElementConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
2017
|
+
<ng-container *ngIf="elementConfig !== undefined">
|
|
2018
|
+
<kwikui-table
|
|
2019
|
+
style="width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;"
|
|
2020
|
+
[columns]="['id', 'type', 'category']"
|
|
2021
|
+
[headers]="{ id: 'ID', type: 'Type', category: 'Category' }"
|
|
2022
|
+
[data]="[
|
|
2023
|
+
{
|
|
2024
|
+
id: elementConfig.elementId,
|
|
2025
|
+
type: elementConfig.elementType,
|
|
2026
|
+
category: elementConfig.elementCategory
|
|
2027
|
+
}
|
|
2028
|
+
]"
|
|
2029
|
+
(onClick)="(undefined)"
|
|
2030
|
+
></kwikui-table>
|
|
2031
|
+
</ng-container>
|
|
2032
|
+
<form [formGroup]="documentFormGroup">
|
|
2033
|
+
<fieldset>
|
|
2034
|
+
<legend class="form-group-title">Standard</legend>
|
|
2035
|
+
<div class="form-group">
|
|
2036
|
+
<kwikui-input
|
|
2037
|
+
[label]="'Label'"
|
|
2038
|
+
[id]="'document-field-label'"
|
|
2039
|
+
[type]="'text'"
|
|
2040
|
+
[formControlName]="'label'"
|
|
2041
|
+
[formControl]="documentFormGroup.controls['label']"
|
|
2042
|
+
[disabled]="false"
|
|
2043
|
+
[placeholder]="'Please enter your Label'"
|
|
2044
|
+
[focus]="false"
|
|
2045
|
+
[invalid]="false"
|
|
2046
|
+
[case]="'default'"
|
|
2047
|
+
size="m"
|
|
2048
|
+
></kwikui-input>
|
|
2049
|
+
</div>
|
|
2050
|
+
<div class="form-group">
|
|
2051
|
+
<kwikui-input
|
|
2052
|
+
[label]="'Key'"
|
|
2053
|
+
[id]="'document-field-key'"
|
|
2054
|
+
[type]="'text'"
|
|
2055
|
+
[formControlName]="'key'"
|
|
2056
|
+
[formControl]="documentFormGroup.controls['key']"
|
|
2057
|
+
[disabled]="false"
|
|
2058
|
+
[placeholder]="'Please enter your Key'"
|
|
2059
|
+
[focus]="false"
|
|
2060
|
+
[invalid]="false"
|
|
2061
|
+
[case]="'default'"
|
|
2062
|
+
size="m"
|
|
2063
|
+
></kwikui-input>
|
|
2064
|
+
</div>
|
|
2065
|
+
<div class="form-group">
|
|
2066
|
+
<kwikui-select-combobox
|
|
2067
|
+
[options]="[true, false]"
|
|
2068
|
+
[label]="'Disabled'"
|
|
2069
|
+
[id]="'document-input-property-disabled'"
|
|
2070
|
+
size="m"
|
|
2071
|
+
[formControlName]="'disabled'"
|
|
2072
|
+
[formControl]="documentFormGroup.controls['disabled']"
|
|
2073
|
+
[focus]="false"
|
|
2074
|
+
[disabled]="false"
|
|
2075
|
+
[invalid]="false"
|
|
2076
|
+
[placeholder]="'Please select either true or false'"
|
|
2077
|
+
></kwikui-select-combobox>
|
|
2078
|
+
</div>
|
|
2079
|
+
</fieldset>
|
|
2080
|
+
|
|
2081
|
+
<div formGroupName="default">
|
|
2082
|
+
<fieldset>
|
|
2083
|
+
<legend class="form-group-title">Default</legend>
|
|
2084
|
+
<div class="form-group">
|
|
2085
|
+
<kwikui-select-combobox
|
|
2086
|
+
size="m"
|
|
2087
|
+
[options]="[true, false]"
|
|
2088
|
+
[label]="'value'"
|
|
2089
|
+
[id]="'document-input-property-value'"
|
|
2090
|
+
[formControlName]="'value'"
|
|
2091
|
+
[formControl]="
|
|
2092
|
+
documentFormGroup['controls'].default['controls'].value
|
|
2093
|
+
"
|
|
2094
|
+
[focus]="false"
|
|
2095
|
+
[disabled]="false"
|
|
2096
|
+
[invalid]="false"
|
|
2097
|
+
[placeholder]="'Please select either true or false'"
|
|
2098
|
+
></kwikui-select-combobox>
|
|
2099
|
+
</div>
|
|
2100
|
+
</fieldset>
|
|
2101
|
+
</div>
|
|
2102
|
+
|
|
2103
|
+
<div formGroupName="validators">
|
|
2104
|
+
<fieldset>
|
|
2105
|
+
<legend class="form-group-title">Validators</legend>
|
|
2106
|
+
<div class="form-group">
|
|
2107
|
+
<kwikui-input-number
|
|
2108
|
+
[label]="'min'"
|
|
2109
|
+
[id]="'document-input-validators-min'"
|
|
2110
|
+
[formControlName]="'min'"
|
|
2111
|
+
[formControl]="
|
|
2112
|
+
documentFormGroup['controls'].validators['controls'].min
|
|
2113
|
+
"
|
|
2114
|
+
[disabled]="false"
|
|
2115
|
+
[placeholder]="'Please enter your minimum value'"
|
|
2116
|
+
[focus]="false"
|
|
2117
|
+
[invalid]="false"
|
|
2118
|
+
size="m"
|
|
2119
|
+
></kwikui-input-number>
|
|
2120
|
+
</div>
|
|
2121
|
+
<div class="form-group">
|
|
2122
|
+
<kwikui-input-number
|
|
2123
|
+
[label]="'max'"
|
|
2124
|
+
[id]="'document-input-validators-max'"
|
|
2125
|
+
[formControlName]="'max'"
|
|
2126
|
+
[formControl]="
|
|
2127
|
+
documentFormGroup['controls'].validators['controls'].max
|
|
2128
|
+
"
|
|
2129
|
+
[disabled]="false"
|
|
2130
|
+
[placeholder]="'Please enter your maximum value'"
|
|
2131
|
+
[focus]="false"
|
|
2132
|
+
[invalid]="false"
|
|
2133
|
+
size="m"
|
|
2134
|
+
></kwikui-input-number>
|
|
2135
|
+
</div>
|
|
2136
|
+
<div class="form-group">
|
|
2137
|
+
<kwikui-input-number
|
|
2138
|
+
[label]="'minLength'"
|
|
2139
|
+
[id]="'document-input-validators-minLength'"
|
|
2140
|
+
[formControlName]="'minLength'"
|
|
2141
|
+
[formControl]="
|
|
2142
|
+
documentFormGroup['controls'].validators['controls'].minLength
|
|
2143
|
+
"
|
|
2144
|
+
[disabled]="false"
|
|
2145
|
+
[placeholder]="'Please enter your minimum length value'"
|
|
2146
|
+
[focus]="false"
|
|
2147
|
+
[invalid]="false"
|
|
2148
|
+
size="m"
|
|
2149
|
+
></kwikui-input-number>
|
|
2150
|
+
</div>
|
|
2151
|
+
<div class="form-group">
|
|
2152
|
+
<kwikui-input-number
|
|
2153
|
+
[label]="'maxLength'"
|
|
2154
|
+
[id]="'document-input-validators-maxLength'"
|
|
2155
|
+
[formControlName]="'maxLength'"
|
|
2156
|
+
[formControl]="
|
|
2157
|
+
documentFormGroup['controls'].validators['controls'].maxLength
|
|
2158
|
+
"
|
|
2159
|
+
[disabled]="false"
|
|
2160
|
+
[placeholder]="'Please enter your maximum length value'"
|
|
2161
|
+
[focus]="false"
|
|
2162
|
+
[invalid]="false"
|
|
2163
|
+
size="m"
|
|
2164
|
+
></kwikui-input-number>
|
|
2165
|
+
</div>
|
|
2166
|
+
<div class="form-group">
|
|
2167
|
+
<kwikui-select-combobox
|
|
2168
|
+
size="m"
|
|
2169
|
+
[options]="[true, false]"
|
|
2170
|
+
[label]="'required'"
|
|
2171
|
+
[id]="'document-input-property-required'"
|
|
2172
|
+
[formControlName]="'required'"
|
|
2173
|
+
[formControl]="
|
|
2174
|
+
documentFormGroup['controls'].validators['controls'].required
|
|
2175
|
+
"
|
|
2176
|
+
[focus]="false"
|
|
2177
|
+
[disabled]="false"
|
|
2178
|
+
[invalid]="false"
|
|
2179
|
+
[placeholder]="'Please select either true or false'"
|
|
2180
|
+
></kwikui-select-combobox>
|
|
2181
|
+
</div>
|
|
2182
|
+
</fieldset>
|
|
2183
|
+
</div>
|
|
2184
|
+
|
|
2185
|
+
<div formGroupName="properties">
|
|
2186
|
+
<fieldset>
|
|
2187
|
+
<legend class="form-group-title">Properties</legend>
|
|
2188
|
+
<div class="form-group">
|
|
2189
|
+
<kwikui-input
|
|
2190
|
+
[label]="'Placeholder'"
|
|
2191
|
+
[id]="'document-field-placeholder'"
|
|
2192
|
+
[type]="'text'"
|
|
2193
|
+
[formControlName]="'placeholder'"
|
|
2194
|
+
[formControl]="
|
|
2195
|
+
documentFormGroup.controls.properties['controls'].placeholder
|
|
2196
|
+
"
|
|
2197
|
+
[disabled]="false"
|
|
2198
|
+
[placeholder]="'Please enter your placeholder'"
|
|
2199
|
+
[focus]="false"
|
|
2200
|
+
[invalid]="false"
|
|
2201
|
+
[case]="'default'"
|
|
2202
|
+
size="m"
|
|
2203
|
+
></kwikui-input>
|
|
2204
|
+
</div>
|
|
2205
|
+
<div class="form-group">
|
|
2206
|
+
<kwikui-select-combobox
|
|
2207
|
+
[options]="[true, false]"
|
|
2208
|
+
[label]="'readOnly'"
|
|
2209
|
+
[id]="'document-input-property-readOnly'"
|
|
2210
|
+
[formControlName]="'readOnly'"
|
|
2211
|
+
[formControl]="
|
|
2212
|
+
documentFormGroup['controls'].properties['controls'].readOnly
|
|
2213
|
+
"
|
|
2214
|
+
size="m"
|
|
2215
|
+
[focus]="false"
|
|
2216
|
+
[disabled]="false"
|
|
2217
|
+
[invalid]="false"
|
|
2218
|
+
[placeholder]="'Please select either true or false'"
|
|
2219
|
+
></kwikui-select-combobox>
|
|
2220
|
+
</div>
|
|
2221
|
+
</fieldset>
|
|
2222
|
+
</div>
|
|
2223
|
+
|
|
2224
|
+
<ng-container [ngSwitch]="elementType">
|
|
2225
|
+
<ng-container *ngSwitchCase="'aadhaar-number'">
|
|
2226
|
+
<document-aadhaar-number-config-editor
|
|
2227
|
+
[saveDocumentClickCounter]="saveDocumentClickCounter"
|
|
2228
|
+
[elementConfig]="elementConfig"
|
|
2229
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
2230
|
+
></document-aadhaar-number-config-editor>
|
|
2231
|
+
</ng-container>
|
|
2232
|
+
<ng-container *ngSwitchCase="'pan-number'">
|
|
2233
|
+
<document-pan-number-config-editor
|
|
2234
|
+
[saveDocumentClickCounter]="saveDocumentClickCounter"
|
|
2235
|
+
[elementConfig]="elementConfig"
|
|
2236
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
2237
|
+
></document-pan-number-config-editor>
|
|
2238
|
+
</ng-container>
|
|
2239
|
+
</ng-container>
|
|
2240
|
+
</form>
|
|
2241
|
+
`, 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.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
2242
|
+
__decorate([
|
|
2243
|
+
logMethod
|
|
2244
|
+
], DocumentElementConfigEditor.prototype, "ngOnInit", null);
|
|
2245
|
+
__decorate([
|
|
2246
|
+
logMethod
|
|
2247
|
+
], DocumentElementConfigEditor.prototype, "ngOnChanges", null);
|
|
2248
|
+
__decorate([
|
|
2249
|
+
logMethod
|
|
2250
|
+
], DocumentElementConfigEditor.prototype, "assignVariables", null);
|
|
2251
|
+
__decorate([
|
|
2252
|
+
logMethod
|
|
2253
|
+
], DocumentElementConfigEditor.prototype, "createDocumentFormGroup", null);
|
|
2254
|
+
__decorate([
|
|
2255
|
+
logMethod
|
|
2256
|
+
], DocumentElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
|
|
2257
|
+
__decorate([
|
|
2258
|
+
logMethod
|
|
2259
|
+
], DocumentElementConfigEditor.prototype, "handleOnSave", null);
|
|
2260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DocumentElementConfigEditor, decorators: [{
|
|
2261
|
+
type: Component,
|
|
2262
|
+
args: [{
|
|
2263
|
+
selector: "document-element-config-editor",
|
|
2264
|
+
template: `
|
|
2265
|
+
<ng-container *ngIf="elementConfig !== undefined">
|
|
2266
|
+
<kwikui-table
|
|
2267
|
+
style="width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;"
|
|
2268
|
+
[columns]="['id', 'type', 'category']"
|
|
2269
|
+
[headers]="{ id: 'ID', type: 'Type', category: 'Category' }"
|
|
2270
|
+
[data]="[
|
|
2271
|
+
{
|
|
2272
|
+
id: elementConfig.elementId,
|
|
2273
|
+
type: elementConfig.elementType,
|
|
2274
|
+
category: elementConfig.elementCategory
|
|
2275
|
+
}
|
|
2276
|
+
]"
|
|
2277
|
+
(onClick)="(undefined)"
|
|
2278
|
+
></kwikui-table>
|
|
2279
|
+
</ng-container>
|
|
2280
|
+
<form [formGroup]="documentFormGroup">
|
|
2281
|
+
<fieldset>
|
|
2282
|
+
<legend class="form-group-title">Standard</legend>
|
|
2283
|
+
<div class="form-group">
|
|
2284
|
+
<kwikui-input
|
|
2285
|
+
[label]="'Label'"
|
|
2286
|
+
[id]="'document-field-label'"
|
|
2287
|
+
[type]="'text'"
|
|
2288
|
+
[formControlName]="'label'"
|
|
2289
|
+
[formControl]="documentFormGroup.controls['label']"
|
|
2290
|
+
[disabled]="false"
|
|
2291
|
+
[placeholder]="'Please enter your Label'"
|
|
2292
|
+
[focus]="false"
|
|
2293
|
+
[invalid]="false"
|
|
2294
|
+
[case]="'default'"
|
|
2295
|
+
size="m"
|
|
2296
|
+
></kwikui-input>
|
|
2297
|
+
</div>
|
|
2298
|
+
<div class="form-group">
|
|
2299
|
+
<kwikui-input
|
|
2300
|
+
[label]="'Key'"
|
|
2301
|
+
[id]="'document-field-key'"
|
|
2302
|
+
[type]="'text'"
|
|
2303
|
+
[formControlName]="'key'"
|
|
2304
|
+
[formControl]="documentFormGroup.controls['key']"
|
|
2305
|
+
[disabled]="false"
|
|
2306
|
+
[placeholder]="'Please enter your Key'"
|
|
2307
|
+
[focus]="false"
|
|
2308
|
+
[invalid]="false"
|
|
2309
|
+
[case]="'default'"
|
|
2310
|
+
size="m"
|
|
2311
|
+
></kwikui-input>
|
|
2312
|
+
</div>
|
|
2313
|
+
<div class="form-group">
|
|
2314
|
+
<kwikui-select-combobox
|
|
2315
|
+
[options]="[true, false]"
|
|
2316
|
+
[label]="'Disabled'"
|
|
2317
|
+
[id]="'document-input-property-disabled'"
|
|
2318
|
+
size="m"
|
|
2319
|
+
[formControlName]="'disabled'"
|
|
2320
|
+
[formControl]="documentFormGroup.controls['disabled']"
|
|
2321
|
+
[focus]="false"
|
|
2322
|
+
[disabled]="false"
|
|
2323
|
+
[invalid]="false"
|
|
2324
|
+
[placeholder]="'Please select either true or false'"
|
|
2325
|
+
></kwikui-select-combobox>
|
|
2326
|
+
</div>
|
|
2327
|
+
</fieldset>
|
|
2328
|
+
|
|
2329
|
+
<div formGroupName="default">
|
|
2330
|
+
<fieldset>
|
|
2331
|
+
<legend class="form-group-title">Default</legend>
|
|
2332
|
+
<div class="form-group">
|
|
2333
|
+
<kwikui-select-combobox
|
|
2334
|
+
size="m"
|
|
2335
|
+
[options]="[true, false]"
|
|
2336
|
+
[label]="'value'"
|
|
2337
|
+
[id]="'document-input-property-value'"
|
|
2338
|
+
[formControlName]="'value'"
|
|
2339
|
+
[formControl]="
|
|
2340
|
+
documentFormGroup['controls'].default['controls'].value
|
|
2341
|
+
"
|
|
2342
|
+
[focus]="false"
|
|
2343
|
+
[disabled]="false"
|
|
2344
|
+
[invalid]="false"
|
|
2345
|
+
[placeholder]="'Please select either true or false'"
|
|
2346
|
+
></kwikui-select-combobox>
|
|
2347
|
+
</div>
|
|
2348
|
+
</fieldset>
|
|
2349
|
+
</div>
|
|
2350
|
+
|
|
2351
|
+
<div formGroupName="validators">
|
|
2352
|
+
<fieldset>
|
|
2353
|
+
<legend class="form-group-title">Validators</legend>
|
|
2354
|
+
<div class="form-group">
|
|
2355
|
+
<kwikui-input-number
|
|
2356
|
+
[label]="'min'"
|
|
2357
|
+
[id]="'document-input-validators-min'"
|
|
2358
|
+
[formControlName]="'min'"
|
|
2359
|
+
[formControl]="
|
|
2360
|
+
documentFormGroup['controls'].validators['controls'].min
|
|
2361
|
+
"
|
|
2362
|
+
[disabled]="false"
|
|
2363
|
+
[placeholder]="'Please enter your minimum value'"
|
|
2364
|
+
[focus]="false"
|
|
2365
|
+
[invalid]="false"
|
|
2366
|
+
size="m"
|
|
2367
|
+
></kwikui-input-number>
|
|
2368
|
+
</div>
|
|
2369
|
+
<div class="form-group">
|
|
2370
|
+
<kwikui-input-number
|
|
2371
|
+
[label]="'max'"
|
|
2372
|
+
[id]="'document-input-validators-max'"
|
|
2373
|
+
[formControlName]="'max'"
|
|
2374
|
+
[formControl]="
|
|
2375
|
+
documentFormGroup['controls'].validators['controls'].max
|
|
2376
|
+
"
|
|
2377
|
+
[disabled]="false"
|
|
2378
|
+
[placeholder]="'Please enter your maximum value'"
|
|
2379
|
+
[focus]="false"
|
|
2380
|
+
[invalid]="false"
|
|
2381
|
+
size="m"
|
|
2382
|
+
></kwikui-input-number>
|
|
2383
|
+
</div>
|
|
2384
|
+
<div class="form-group">
|
|
2385
|
+
<kwikui-input-number
|
|
2386
|
+
[label]="'minLength'"
|
|
2387
|
+
[id]="'document-input-validators-minLength'"
|
|
2388
|
+
[formControlName]="'minLength'"
|
|
2389
|
+
[formControl]="
|
|
2390
|
+
documentFormGroup['controls'].validators['controls'].minLength
|
|
2391
|
+
"
|
|
2392
|
+
[disabled]="false"
|
|
2393
|
+
[placeholder]="'Please enter your minimum length value'"
|
|
2394
|
+
[focus]="false"
|
|
2395
|
+
[invalid]="false"
|
|
2396
|
+
size="m"
|
|
2397
|
+
></kwikui-input-number>
|
|
2398
|
+
</div>
|
|
2399
|
+
<div class="form-group">
|
|
2400
|
+
<kwikui-input-number
|
|
2401
|
+
[label]="'maxLength'"
|
|
2402
|
+
[id]="'document-input-validators-maxLength'"
|
|
2403
|
+
[formControlName]="'maxLength'"
|
|
2404
|
+
[formControl]="
|
|
2405
|
+
documentFormGroup['controls'].validators['controls'].maxLength
|
|
2406
|
+
"
|
|
2407
|
+
[disabled]="false"
|
|
2408
|
+
[placeholder]="'Please enter your maximum length value'"
|
|
2409
|
+
[focus]="false"
|
|
2410
|
+
[invalid]="false"
|
|
2411
|
+
size="m"
|
|
2412
|
+
></kwikui-input-number>
|
|
2413
|
+
</div>
|
|
2414
|
+
<div class="form-group">
|
|
2415
|
+
<kwikui-select-combobox
|
|
2416
|
+
size="m"
|
|
2417
|
+
[options]="[true, false]"
|
|
2418
|
+
[label]="'required'"
|
|
2419
|
+
[id]="'document-input-property-required'"
|
|
2420
|
+
[formControlName]="'required'"
|
|
2421
|
+
[formControl]="
|
|
2422
|
+
documentFormGroup['controls'].validators['controls'].required
|
|
2423
|
+
"
|
|
2424
|
+
[focus]="false"
|
|
2425
|
+
[disabled]="false"
|
|
2426
|
+
[invalid]="false"
|
|
2427
|
+
[placeholder]="'Please select either true or false'"
|
|
2428
|
+
></kwikui-select-combobox>
|
|
2429
|
+
</div>
|
|
2430
|
+
</fieldset>
|
|
2431
|
+
</div>
|
|
2432
|
+
|
|
2433
|
+
<div formGroupName="properties">
|
|
2434
|
+
<fieldset>
|
|
2435
|
+
<legend class="form-group-title">Properties</legend>
|
|
2436
|
+
<div class="form-group">
|
|
2437
|
+
<kwikui-input
|
|
2438
|
+
[label]="'Placeholder'"
|
|
2439
|
+
[id]="'document-field-placeholder'"
|
|
2440
|
+
[type]="'text'"
|
|
2441
|
+
[formControlName]="'placeholder'"
|
|
2442
|
+
[formControl]="
|
|
2443
|
+
documentFormGroup.controls.properties['controls'].placeholder
|
|
2444
|
+
"
|
|
2445
|
+
[disabled]="false"
|
|
2446
|
+
[placeholder]="'Please enter your placeholder'"
|
|
2447
|
+
[focus]="false"
|
|
2448
|
+
[invalid]="false"
|
|
2449
|
+
[case]="'default'"
|
|
2450
|
+
size="m"
|
|
2451
|
+
></kwikui-input>
|
|
2452
|
+
</div>
|
|
2453
|
+
<div class="form-group">
|
|
2454
|
+
<kwikui-select-combobox
|
|
2455
|
+
[options]="[true, false]"
|
|
2456
|
+
[label]="'readOnly'"
|
|
2457
|
+
[id]="'document-input-property-readOnly'"
|
|
2458
|
+
[formControlName]="'readOnly'"
|
|
2459
|
+
[formControl]="
|
|
2460
|
+
documentFormGroup['controls'].properties['controls'].readOnly
|
|
2461
|
+
"
|
|
2462
|
+
size="m"
|
|
2463
|
+
[focus]="false"
|
|
2464
|
+
[disabled]="false"
|
|
2465
|
+
[invalid]="false"
|
|
2466
|
+
[placeholder]="'Please select either true or false'"
|
|
2467
|
+
></kwikui-select-combobox>
|
|
2468
|
+
</div>
|
|
2469
|
+
</fieldset>
|
|
2470
|
+
</div>
|
|
2471
|
+
|
|
2472
|
+
<ng-container [ngSwitch]="elementType">
|
|
2473
|
+
<ng-container *ngSwitchCase="'aadhaar-number'">
|
|
2474
|
+
<document-aadhaar-number-config-editor
|
|
2475
|
+
[saveDocumentClickCounter]="saveDocumentClickCounter"
|
|
2476
|
+
[elementConfig]="elementConfig"
|
|
2477
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
2478
|
+
></document-aadhaar-number-config-editor>
|
|
2479
|
+
</ng-container>
|
|
2480
|
+
<ng-container *ngSwitchCase="'pan-number'">
|
|
2481
|
+
<document-pan-number-config-editor
|
|
2482
|
+
[saveDocumentClickCounter]="saveDocumentClickCounter"
|
|
2483
|
+
[elementConfig]="elementConfig"
|
|
2484
|
+
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
2485
|
+
></document-pan-number-config-editor>
|
|
2486
|
+
</ng-container>
|
|
2487
|
+
</ng-container>
|
|
2488
|
+
</form>
|
|
2489
|
+
`,
|
|
2490
|
+
styles: [
|
|
2491
|
+
`
|
|
2492
|
+
:host {
|
|
2493
|
+
display: flex;
|
|
2494
|
+
flex-direction: column;
|
|
2495
|
+
align-content: center;
|
|
2496
|
+
justify-content: flex-start;
|
|
2497
|
+
align-items: stretch;
|
|
2498
|
+
gap: 1rem;
|
|
2499
|
+
}
|
|
2500
|
+
`
|
|
2501
|
+
]
|
|
2502
|
+
}]
|
|
2503
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveClickCounter: [{
|
|
2504
|
+
type: Input
|
|
2505
|
+
}], elementConfig: [{
|
|
2506
|
+
type: Input
|
|
2507
|
+
}], updateElement: [{
|
|
2508
|
+
type: Output
|
|
2509
|
+
}], ngOnInit: [], ngOnChanges: [], assignVariables: [], createDocumentFormGroup: [], handleOnSaveUpdateElement: [], handleOnSave: [] } });
|
|
2510
|
+
|
|
2511
|
+
class OtherHTMLConfigEditor {
|
|
2512
|
+
constructor() {
|
|
2513
|
+
this.saveOtherClickCounter = 0;
|
|
2514
|
+
this.elementConfig = {
|
|
2515
|
+
html: ""
|
|
2516
|
+
};
|
|
2517
|
+
this.updateElement = new EventEmitter();
|
|
2518
|
+
this.otherHTMLFormGroup = undefined;
|
|
2519
|
+
}
|
|
2520
|
+
ngOnInit() {
|
|
2521
|
+
this.createOtherHTMLFormGroup();
|
|
2522
|
+
}
|
|
2523
|
+
ngOnChanges(changes) {
|
|
2524
|
+
var _a;
|
|
2525
|
+
const verifyChange = (key) => {
|
|
2526
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
2527
|
+
};
|
|
2528
|
+
if (verifyChange("elementConfig")) {
|
|
2529
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
2530
|
+
(_a = this.otherHTMLFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
2531
|
+
}
|
|
2532
|
+
if (verifyChange("saveOtherClickCounter")) {
|
|
2533
|
+
if (changes.saveOtherClickCounter.previousValue !==
|
|
2534
|
+
changes.saveOtherClickCounter.currentValue) {
|
|
2535
|
+
this.saveOtherClickCounter = changes.saveOtherClickCounter.currentValue;
|
|
2536
|
+
this.handleOnSave();
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2540
|
+
createOtherHTMLFormGroup() {
|
|
2541
|
+
this.otherHTMLFormGroup = new FormGroup({
|
|
2542
|
+
html: new FormControl(this.elementConfig.html, {
|
|
2543
|
+
updateOn: "change"
|
|
2544
|
+
})
|
|
2545
|
+
});
|
|
2546
|
+
this.otherHTMLFormGroup.updateValueAndValidity();
|
|
2547
|
+
}
|
|
2548
|
+
handleOnSave() {
|
|
2549
|
+
let otherElementConfig = this.otherHTMLFormGroup.getRawValue();
|
|
2550
|
+
this.updateElement.emit({
|
|
2551
|
+
otherElementConfig: otherElementConfig
|
|
2552
|
+
});
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
/** @nocollapse */ OtherHTMLConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OtherHTMLConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2556
|
+
/** @nocollapse */ OtherHTMLConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
2557
|
+
<form [formGroup]="otherHTMLFormGroup">
|
|
2558
|
+
<div formGroupName="properties">
|
|
2559
|
+
<fieldset>
|
|
2560
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
2561
|
+
<div class="form-group">
|
|
2562
|
+
<kwikui-textarea
|
|
2563
|
+
[label]="'HTML'"
|
|
2564
|
+
[id]="'form_key'"
|
|
2565
|
+
[formControlName]="'html'"
|
|
2566
|
+
[formControl]="otherHTMLFormGroup.controls['html']"
|
|
2567
|
+
[disabled]="false"
|
|
2568
|
+
[focus]="false"
|
|
2569
|
+
[invalid]="false"
|
|
2570
|
+
size="m"
|
|
2571
|
+
></kwikui-textarea>
|
|
2572
|
+
</div>
|
|
2573
|
+
</fieldset>
|
|
2574
|
+
</div>
|
|
2575
|
+
</form>
|
|
2576
|
+
`, isInline: true, styles: [""], components: [{ type: i1.KwikUITextareaComponent, selector: "kwikui-textarea", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "size", "expandable", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
2577
|
+
__decorate([
|
|
2578
|
+
logMethod
|
|
2579
|
+
], OtherHTMLConfigEditor.prototype, "ngOnInit", null);
|
|
2580
|
+
__decorate([
|
|
2581
|
+
logMethod
|
|
2582
|
+
], OtherHTMLConfigEditor.prototype, "ngOnChanges", null);
|
|
2583
|
+
__decorate([
|
|
2584
|
+
logMethod
|
|
2585
|
+
], OtherHTMLConfigEditor.prototype, "createOtherHTMLFormGroup", null);
|
|
2586
|
+
__decorate([
|
|
2587
|
+
logMethod
|
|
2588
|
+
], OtherHTMLConfigEditor.prototype, "handleOnSave", null);
|
|
2589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OtherHTMLConfigEditor, decorators: [{
|
|
2590
|
+
type: Component,
|
|
2591
|
+
args: [{
|
|
2592
|
+
selector: "other-html-config-editor",
|
|
2593
|
+
template: `
|
|
2594
|
+
<form [formGroup]="otherHTMLFormGroup">
|
|
2595
|
+
<div formGroupName="properties">
|
|
2596
|
+
<fieldset>
|
|
2597
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
2598
|
+
<div class="form-group">
|
|
2599
|
+
<kwikui-textarea
|
|
2600
|
+
[label]="'HTML'"
|
|
2601
|
+
[id]="'form_key'"
|
|
2602
|
+
[formControlName]="'html'"
|
|
2603
|
+
[formControl]="otherHTMLFormGroup.controls['html']"
|
|
2604
|
+
[disabled]="false"
|
|
2605
|
+
[focus]="false"
|
|
2606
|
+
[invalid]="false"
|
|
2607
|
+
size="m"
|
|
2608
|
+
></kwikui-textarea>
|
|
2609
|
+
</div>
|
|
2610
|
+
</fieldset>
|
|
2611
|
+
</div>
|
|
2612
|
+
</form>
|
|
2613
|
+
`,
|
|
2614
|
+
styles: [``]
|
|
2615
|
+
}]
|
|
2616
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveOtherClickCounter: [{
|
|
2617
|
+
type: Input
|
|
2618
|
+
}], elementConfig: [{
|
|
2619
|
+
type: Input
|
|
2620
|
+
}], updateElement: [{
|
|
2621
|
+
type: Output
|
|
2622
|
+
}], ngOnInit: [], ngOnChanges: [], createOtherHTMLFormGroup: [], handleOnSave: [] } });
|
|
2623
|
+
|
|
2624
|
+
class OtherTitleConfigEditor {
|
|
2625
|
+
constructor() {
|
|
2626
|
+
this.saveOtherClickCounter = 0;
|
|
2627
|
+
this.elementConfig = {
|
|
2628
|
+
label: ""
|
|
2629
|
+
};
|
|
2630
|
+
this.updateElement = new EventEmitter();
|
|
2631
|
+
this.otherTitleFormGroup = undefined;
|
|
2632
|
+
}
|
|
2633
|
+
ngOnInit() {
|
|
2634
|
+
this.createOtherTitleFormGroup();
|
|
2635
|
+
}
|
|
2636
|
+
ngOnChanges(changes) {
|
|
2637
|
+
const verifyChange = (key) => {
|
|
2638
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
2639
|
+
};
|
|
2640
|
+
if (verifyChange("elementConfig")) {
|
|
2641
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
2642
|
+
this.otherTitleFormGroup.reset(this.elementConfig);
|
|
2643
|
+
}
|
|
2644
|
+
if (verifyChange("saveOtherClickCounter")) {
|
|
2645
|
+
if (changes.saveOtherClickCounter.previousValue !==
|
|
2646
|
+
changes.saveOtherClickCounter.currentValue) {
|
|
2647
|
+
this.saveOtherClickCounter = changes.saveOtherClickCounter.currentValue;
|
|
2648
|
+
this.handleOnSave();
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
createOtherTitleFormGroup() {
|
|
2653
|
+
this.otherTitleFormGroup = new FormGroup({
|
|
2654
|
+
label: new FormControl(this.elementConfig.label, {
|
|
2655
|
+
updateOn: "change"
|
|
2656
|
+
})
|
|
2657
|
+
});
|
|
2658
|
+
this.otherTitleFormGroup.updateValueAndValidity();
|
|
2659
|
+
}
|
|
2660
|
+
handleOnSave() {
|
|
2661
|
+
let otherElementConfig = this.otherTitleFormGroup.getRawValue();
|
|
2662
|
+
this.updateElement.emit({
|
|
2663
|
+
otherElementConfig: otherElementConfig
|
|
2664
|
+
});
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
/** @nocollapse */ OtherTitleConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OtherTitleConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2668
|
+
/** @nocollapse */ OtherTitleConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
2669
|
+
<form [formGroup]="otherTitleFormGroup">
|
|
2670
|
+
<div formGroupName="properties">
|
|
2671
|
+
<fieldset>
|
|
2672
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
2673
|
+
<kwikui-input
|
|
2674
|
+
[label]="'Label'"
|
|
2675
|
+
[id]="'form_key'"
|
|
2676
|
+
[type]="'text'"
|
|
2677
|
+
[formControlName]="'label'"
|
|
2678
|
+
[formControl]="otherTitleFormGroup.controls['label']"
|
|
2679
|
+
[disabled]="false"
|
|
2680
|
+
[placeholder]="'Please enter your Label'"
|
|
2681
|
+
[focus]="false"
|
|
2682
|
+
[invalid]="false"
|
|
2683
|
+
[case]="'default'"
|
|
2684
|
+
size="m"
|
|
2685
|
+
></kwikui-input>
|
|
2686
|
+
</fieldset>
|
|
2687
|
+
</div>
|
|
2688
|
+
</form>
|
|
2689
|
+
`, isInline: true, styles: [""], components: [{ type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }], directives: [{ type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
2690
|
+
__decorate([
|
|
2691
|
+
logMethod
|
|
2692
|
+
], OtherTitleConfigEditor.prototype, "ngOnInit", null);
|
|
2693
|
+
__decorate([
|
|
2694
|
+
logMethod
|
|
2695
|
+
], OtherTitleConfigEditor.prototype, "ngOnChanges", null);
|
|
2696
|
+
__decorate([
|
|
2697
|
+
logMethod
|
|
2698
|
+
], OtherTitleConfigEditor.prototype, "createOtherTitleFormGroup", null);
|
|
2699
|
+
__decorate([
|
|
2700
|
+
logMethod
|
|
2701
|
+
], OtherTitleConfigEditor.prototype, "handleOnSave", null);
|
|
2702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OtherTitleConfigEditor, decorators: [{
|
|
2703
|
+
type: Component,
|
|
2704
|
+
args: [{
|
|
2705
|
+
selector: "other-title-config-editor",
|
|
2706
|
+
template: `
|
|
2707
|
+
<form [formGroup]="otherTitleFormGroup">
|
|
2708
|
+
<div formGroupName="properties">
|
|
2709
|
+
<fieldset>
|
|
2710
|
+
<legend class="form-group-title">Miscellaneous</legend>
|
|
2711
|
+
<kwikui-input
|
|
2712
|
+
[label]="'Label'"
|
|
2713
|
+
[id]="'form_key'"
|
|
2714
|
+
[type]="'text'"
|
|
2715
|
+
[formControlName]="'label'"
|
|
2716
|
+
[formControl]="otherTitleFormGroup.controls['label']"
|
|
2717
|
+
[disabled]="false"
|
|
2718
|
+
[placeholder]="'Please enter your Label'"
|
|
2719
|
+
[focus]="false"
|
|
2720
|
+
[invalid]="false"
|
|
2721
|
+
[case]="'default'"
|
|
2722
|
+
size="m"
|
|
2723
|
+
></kwikui-input>
|
|
2724
|
+
</fieldset>
|
|
2725
|
+
</div>
|
|
2726
|
+
</form>
|
|
2727
|
+
`,
|
|
2728
|
+
styles: [``]
|
|
2729
|
+
}]
|
|
2730
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveOtherClickCounter: [{
|
|
2731
|
+
type: Input
|
|
2732
|
+
}], elementConfig: [{
|
|
2733
|
+
type: Input
|
|
2734
|
+
}], updateElement: [{
|
|
2735
|
+
type: Output
|
|
2736
|
+
}], ngOnInit: [], ngOnChanges: [], createOtherTitleFormGroup: [], handleOnSave: [] } });
|
|
2737
|
+
|
|
2738
|
+
class OtherElementConfigEditor {
|
|
2739
|
+
constructor() {
|
|
2740
|
+
this.saveClickCounter = 0;
|
|
2741
|
+
this.elementConfig = {
|
|
2742
|
+
key: ""
|
|
517
2743
|
};
|
|
518
2744
|
this.updateElement = new EventEmitter();
|
|
519
2745
|
this.elementType = "";
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
2746
|
+
this.saveOtherClickCounter = 0;
|
|
2747
|
+
this.otherFormGroup = undefined;
|
|
522
2748
|
}
|
|
523
2749
|
ngOnInit() {
|
|
524
2750
|
this.assignVariables();
|
|
525
|
-
this.
|
|
2751
|
+
this.createOtherFormGroup();
|
|
526
2752
|
}
|
|
527
2753
|
ngOnChanges(changes) {
|
|
2754
|
+
var _a;
|
|
528
2755
|
const verifyChange = (key) => {
|
|
529
2756
|
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
530
2757
|
};
|
|
531
2758
|
if (verifyChange("elementConfig")) {
|
|
532
2759
|
this.elementConfig = changes.elementConfig.currentValue;
|
|
533
2760
|
this.assignVariables();
|
|
534
|
-
this.
|
|
2761
|
+
(_a = this.otherFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
535
2762
|
}
|
|
536
2763
|
if (verifyChange("saveClickCounter")) {
|
|
537
2764
|
if (changes.saveClickCounter.previousValue !==
|
|
@@ -544,462 +2771,148 @@ class BasicElementConfigEditor {
|
|
|
544
2771
|
assignVariables() {
|
|
545
2772
|
this.elementType = this.elementConfig.elementType;
|
|
546
2773
|
}
|
|
547
|
-
|
|
548
|
-
this.
|
|
549
|
-
|
|
550
|
-
key: new FormControl(this.elementConfig.key),
|
|
551
|
-
disabled: new FormControl(this.elementConfig.disabled),
|
|
552
|
-
default: new FormGroup({
|
|
553
|
-
value: new FormControl(this.elementConfig.default.value, {
|
|
554
|
-
updateOn: "change"
|
|
555
|
-
})
|
|
556
|
-
}),
|
|
557
|
-
validators: new FormGroup({
|
|
558
|
-
min: new FormControl(this.elementConfig.validators.min, {
|
|
559
|
-
updateOn: "change"
|
|
560
|
-
}),
|
|
561
|
-
minLength: new FormControl(this.elementConfig.validators.minLength, {
|
|
562
|
-
updateOn: "change"
|
|
563
|
-
}),
|
|
564
|
-
max: new FormControl(this.elementConfig.validators.max, {
|
|
565
|
-
updateOn: "change"
|
|
566
|
-
}),
|
|
567
|
-
maxLength: new FormControl(this.elementConfig.validators.maxLength, {
|
|
568
|
-
updateOn: "change"
|
|
569
|
-
}),
|
|
570
|
-
required: new FormControl(this.elementConfig.validators.required, {
|
|
571
|
-
updateOn: "change"
|
|
572
|
-
})
|
|
573
|
-
}),
|
|
574
|
-
properties: new FormGroup({
|
|
575
|
-
placeholder: new FormControl(this.elementConfig.properties.placeholder, {
|
|
576
|
-
updateOn: "change"
|
|
577
|
-
}),
|
|
578
|
-
readOnly: new FormControl(this.elementConfig.properties.readOnly, {
|
|
579
|
-
updateOn: "change"
|
|
580
|
-
})
|
|
581
|
-
})
|
|
2774
|
+
createOtherFormGroup() {
|
|
2775
|
+
this.otherFormGroup = new FormGroup({
|
|
2776
|
+
key: new FormControl(this.elementConfig.key)
|
|
582
2777
|
});
|
|
583
|
-
this.
|
|
2778
|
+
this.otherFormGroup.updateValueAndValidity();
|
|
584
2779
|
}
|
|
585
2780
|
handleOnSaveUpdateElement(event) {
|
|
586
2781
|
// Get Common Config
|
|
587
|
-
let
|
|
588
|
-
|
|
589
|
-
// Get
|
|
590
|
-
const
|
|
591
|
-
this.elementConfig =
|
|
2782
|
+
let otherElementCommonConfig = this.otherFormGroup.getRawValue();
|
|
2783
|
+
otherElementCommonConfig.key = otherElementCommonConfig.key.replace(/\s/g, "_");
|
|
2784
|
+
// Get Other Element Config
|
|
2785
|
+
const otherElementConfig = event.otherElementConfig;
|
|
2786
|
+
this.elementConfig = _.merge(this.elementConfig, otherElementCommonConfig, otherElementConfig);
|
|
592
2787
|
this.updateElement.emit({ elementConfig: this.elementConfig });
|
|
593
2788
|
}
|
|
594
2789
|
handleOnSave() {
|
|
595
|
-
this.
|
|
2790
|
+
this.saveOtherClickCounter++;
|
|
596
2791
|
}
|
|
597
2792
|
}
|
|
598
|
-
/** @nocollapse */
|
|
599
|
-
/** @nocollapse */
|
|
2793
|
+
/** @nocollapse */ OtherElementConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OtherElementConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2794
|
+
/** @nocollapse */ OtherElementConfigEditor.ɵcmp = i0.ɵɵ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, template: `
|
|
600
2795
|
<ng-container *ngIf="elementConfig !== undefined">
|
|
601
|
-
<table
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
</table>
|
|
2796
|
+
<kwikui-table
|
|
2797
|
+
style="width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;"
|
|
2798
|
+
[columns]="['id', 'type', 'category']"
|
|
2799
|
+
[headers]="{ id: 'ID', type: 'Type', category: 'Category' }"
|
|
2800
|
+
[data]="[
|
|
2801
|
+
{
|
|
2802
|
+
id: elementConfig.elementId,
|
|
2803
|
+
type: elementConfig.elementType,
|
|
2804
|
+
category: elementConfig.elementCategory
|
|
2805
|
+
}
|
|
2806
|
+
]"
|
|
2807
|
+
(onClick)="(undefined)"
|
|
2808
|
+
></kwikui-table>
|
|
615
2809
|
</ng-container>
|
|
616
|
-
<form [formGroup]="
|
|
2810
|
+
<form [formGroup]="otherFormGroup">
|
|
617
2811
|
<fieldset>
|
|
618
|
-
<legend>Standard</legend>
|
|
619
|
-
<
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
type="text"
|
|
633
|
-
class="form-control"
|
|
634
|
-
id="basic-field-key"
|
|
635
|
-
formControlName="key"
|
|
636
|
-
required
|
|
637
|
-
/>
|
|
638
|
-
</div>
|
|
639
|
-
<div class="form-group">
|
|
640
|
-
<label for="basic-input-property-disabled">disabled</label>
|
|
641
|
-
<select
|
|
642
|
-
class="form-control"
|
|
643
|
-
formControlName="disabled"
|
|
644
|
-
id="basic-input-property-disabled"
|
|
645
|
-
>
|
|
646
|
-
<option
|
|
647
|
-
[ngValue]="null"
|
|
648
|
-
disabled
|
|
649
|
-
>Select either true or false</option
|
|
650
|
-
>
|
|
651
|
-
<option
|
|
652
|
-
*ngFor="let disabled of [true, false]"
|
|
653
|
-
[ngValue]="disabled"
|
|
654
|
-
>
|
|
655
|
-
{{ disabled }}
|
|
656
|
-
</option>
|
|
657
|
-
</select>
|
|
658
|
-
</div>
|
|
659
|
-
</fieldset>
|
|
660
|
-
<fieldset formGroupName="default">
|
|
661
|
-
<legend>Default</legend>
|
|
662
|
-
<div class="form-group">
|
|
663
|
-
<label for="basic-input-property-value">value</label>
|
|
664
|
-
<select
|
|
665
|
-
class="form-control"
|
|
666
|
-
formControlName="value"
|
|
667
|
-
id="basic-input-property-value"
|
|
668
|
-
>
|
|
669
|
-
<option
|
|
670
|
-
[ngValue]="null"
|
|
671
|
-
value
|
|
672
|
-
>Select either true or false</option
|
|
673
|
-
>
|
|
674
|
-
<option
|
|
675
|
-
*ngFor="let value of [true, false]"
|
|
676
|
-
[ngValue]="value"
|
|
677
|
-
>
|
|
678
|
-
{{ value }}
|
|
679
|
-
</option>
|
|
680
|
-
</select>
|
|
681
|
-
</div>
|
|
682
|
-
</fieldset>
|
|
683
|
-
<fieldset formGroupName="validators">
|
|
684
|
-
<legend>Validators</legend>
|
|
685
|
-
<div class="form-group">
|
|
686
|
-
<label for="basic-input-validators-min">min</label>
|
|
687
|
-
<input
|
|
688
|
-
class="form-control"
|
|
689
|
-
formControlName="min"
|
|
690
|
-
id="basic-input-validators-min"
|
|
691
|
-
type="number"
|
|
692
|
-
/>
|
|
693
|
-
</div>
|
|
694
|
-
<div class="form-group">
|
|
695
|
-
<label for="basic-input-validators-max">max</label>
|
|
696
|
-
<input
|
|
697
|
-
class="form-control"
|
|
698
|
-
formControlName="max"
|
|
699
|
-
id="basic-input-validators-max"
|
|
700
|
-
type="number"
|
|
701
|
-
/>
|
|
702
|
-
</div>
|
|
703
|
-
<div class="form-group">
|
|
704
|
-
<label for="basic-input-validators-minLength">minLength</label>
|
|
705
|
-
<input
|
|
706
|
-
class="form-control"
|
|
707
|
-
formControlName="minLength"
|
|
708
|
-
id="basic-input-validators-minLength"
|
|
709
|
-
type="number"
|
|
710
|
-
/>
|
|
711
|
-
</div>
|
|
712
|
-
<div class="form-group">
|
|
713
|
-
<label for="basic-input-validators-maxLength">maxLength</label>
|
|
714
|
-
<input
|
|
715
|
-
class="form-control"
|
|
716
|
-
formControlName="maxLength"
|
|
717
|
-
id="basic-input-validators-maxLength"
|
|
718
|
-
type="number"
|
|
719
|
-
/>
|
|
720
|
-
</div>
|
|
721
|
-
<div class="form-group">
|
|
722
|
-
<label for="basic-input-property-required">required</label>
|
|
723
|
-
<select
|
|
724
|
-
class="form-control"
|
|
725
|
-
formControlName="required"
|
|
726
|
-
id="basic-input-property-required"
|
|
727
|
-
>
|
|
728
|
-
<option
|
|
729
|
-
[ngValue]="null"
|
|
730
|
-
disabled
|
|
731
|
-
>Select either true or false</option
|
|
732
|
-
>
|
|
733
|
-
<option
|
|
734
|
-
*ngFor="let required of [true, false]"
|
|
735
|
-
[ngValue]="required"
|
|
736
|
-
>
|
|
737
|
-
{{ required }}
|
|
738
|
-
</option>
|
|
739
|
-
</select>
|
|
740
|
-
</div>
|
|
741
|
-
</fieldset>
|
|
742
|
-
<fieldset formGroupName="properties">
|
|
743
|
-
<legend>Properties</legend>
|
|
744
|
-
<div class="form-group">
|
|
745
|
-
<label for="basic-input-property-placeholder">Placeholder</label>
|
|
746
|
-
<input
|
|
747
|
-
class="form-control"
|
|
748
|
-
formControlName="placeholder"
|
|
749
|
-
id="basic-input-property-placeholder"
|
|
750
|
-
type="text"
|
|
751
|
-
/>
|
|
752
|
-
</div>
|
|
753
|
-
<div class="form-group">
|
|
754
|
-
<label for="basic-input-property-readonly">readOnly</label>
|
|
755
|
-
<select
|
|
756
|
-
class="form-control"
|
|
757
|
-
formControlName="readOnly"
|
|
758
|
-
id="basic-input-property-readonly"
|
|
759
|
-
>
|
|
760
|
-
<option
|
|
761
|
-
[ngValue]="null"
|
|
762
|
-
disabled
|
|
763
|
-
>Select either true or false</option
|
|
764
|
-
>
|
|
765
|
-
<option
|
|
766
|
-
*ngFor="let readonly of [true, false]"
|
|
767
|
-
[ngValue]="readonly"
|
|
768
|
-
>
|
|
769
|
-
{{ readonly }}
|
|
770
|
-
</option>
|
|
771
|
-
</select>
|
|
772
|
-
</div>
|
|
2812
|
+
<legend class="form-group-title">Standard</legend>
|
|
2813
|
+
<kwikui-input
|
|
2814
|
+
[label]="'Key'"
|
|
2815
|
+
[id]="'basic-field-key'"
|
|
2816
|
+
[type]="'text'"
|
|
2817
|
+
[formControlName]="'key'"
|
|
2818
|
+
[formControl]="otherFormGroup.controls['key']"
|
|
2819
|
+
[disabled]="false"
|
|
2820
|
+
[placeholder]="'Please enter your Field Key'"
|
|
2821
|
+
[focus]="false"
|
|
2822
|
+
[invalid]="false"
|
|
2823
|
+
[case]="'default'"
|
|
2824
|
+
size="m"
|
|
2825
|
+
></kwikui-input>
|
|
773
2826
|
</fieldset>
|
|
2827
|
+
|
|
774
2828
|
<ng-container [ngSwitch]="elementType">
|
|
775
|
-
<ng-container *ngSwitchCase="'
|
|
776
|
-
<
|
|
777
|
-
[
|
|
2829
|
+
<ng-container *ngSwitchCase="'html'">
|
|
2830
|
+
<other-html-config-editor
|
|
2831
|
+
[saveOtherClickCounter]="saveOtherClickCounter"
|
|
778
2832
|
[elementConfig]="elementConfig"
|
|
779
2833
|
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
780
|
-
></
|
|
2834
|
+
></other-html-config-editor>
|
|
781
2835
|
</ng-container>
|
|
782
|
-
<ng-container *ngSwitchCase="'
|
|
783
|
-
<
|
|
784
|
-
[
|
|
2836
|
+
<ng-container *ngSwitchCase="'title'">
|
|
2837
|
+
<other-title-config-editor
|
|
2838
|
+
[saveOtherClickCounter]="saveOtherClickCounter"
|
|
785
2839
|
[elementConfig]="elementConfig"
|
|
786
2840
|
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
787
|
-
></
|
|
2841
|
+
></other-title-config-editor>
|
|
788
2842
|
</ng-container>
|
|
789
2843
|
</ng-container>
|
|
790
2844
|
</form>
|
|
791
|
-
`, 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:
|
|
2845
|
+
`, 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.KwikUITableComponent, selector: "kwikui-table", inputs: ["id", "columns", "headers", "data"], outputs: ["onClick"] }, { type: i1.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
792
2846
|
__decorate([
|
|
793
2847
|
logMethod
|
|
794
|
-
],
|
|
2848
|
+
], OtherElementConfigEditor.prototype, "ngOnInit", null);
|
|
795
2849
|
__decorate([
|
|
796
2850
|
logMethod
|
|
797
|
-
],
|
|
2851
|
+
], OtherElementConfigEditor.prototype, "ngOnChanges", null);
|
|
798
2852
|
__decorate([
|
|
799
2853
|
logMethod
|
|
800
|
-
],
|
|
2854
|
+
], OtherElementConfigEditor.prototype, "assignVariables", null);
|
|
801
2855
|
__decorate([
|
|
802
2856
|
logMethod
|
|
803
|
-
],
|
|
2857
|
+
], OtherElementConfigEditor.prototype, "createOtherFormGroup", null);
|
|
804
2858
|
__decorate([
|
|
805
2859
|
logMethod
|
|
806
|
-
],
|
|
2860
|
+
], OtherElementConfigEditor.prototype, "handleOnSaveUpdateElement", null);
|
|
807
2861
|
__decorate([
|
|
808
2862
|
logMethod
|
|
809
|
-
],
|
|
810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type:
|
|
2863
|
+
], OtherElementConfigEditor.prototype, "handleOnSave", null);
|
|
2864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OtherElementConfigEditor, decorators: [{
|
|
811
2865
|
type: Component,
|
|
812
2866
|
args: [{
|
|
813
|
-
selector: "
|
|
2867
|
+
selector: "other-element-config-editor",
|
|
814
2868
|
template: `
|
|
815
2869
|
<ng-container *ngIf="elementConfig !== undefined">
|
|
816
|
-
<table
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
</table>
|
|
2870
|
+
<kwikui-table
|
|
2871
|
+
style="width: 100%; height: 100%; overflow: auto; box-shadow: 0px 0px 10px -6px #000; border: 0px solid gray; border-radius: 1rem;"
|
|
2872
|
+
[columns]="['id', 'type', 'category']"
|
|
2873
|
+
[headers]="{ id: 'ID', type: 'Type', category: 'Category' }"
|
|
2874
|
+
[data]="[
|
|
2875
|
+
{
|
|
2876
|
+
id: elementConfig.elementId,
|
|
2877
|
+
type: elementConfig.elementType,
|
|
2878
|
+
category: elementConfig.elementCategory
|
|
2879
|
+
}
|
|
2880
|
+
]"
|
|
2881
|
+
(onClick)="(undefined)"
|
|
2882
|
+
></kwikui-table>
|
|
830
2883
|
</ng-container>
|
|
831
|
-
<form [formGroup]="
|
|
2884
|
+
<form [formGroup]="otherFormGroup">
|
|
832
2885
|
<fieldset>
|
|
833
|
-
<legend>Standard</legend>
|
|
834
|
-
<
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
type="text"
|
|
848
|
-
class="form-control"
|
|
849
|
-
id="basic-field-key"
|
|
850
|
-
formControlName="key"
|
|
851
|
-
required
|
|
852
|
-
/>
|
|
853
|
-
</div>
|
|
854
|
-
<div class="form-group">
|
|
855
|
-
<label for="basic-input-property-disabled">disabled</label>
|
|
856
|
-
<select
|
|
857
|
-
class="form-control"
|
|
858
|
-
formControlName="disabled"
|
|
859
|
-
id="basic-input-property-disabled"
|
|
860
|
-
>
|
|
861
|
-
<option
|
|
862
|
-
[ngValue]="null"
|
|
863
|
-
disabled
|
|
864
|
-
>Select either true or false</option
|
|
865
|
-
>
|
|
866
|
-
<option
|
|
867
|
-
*ngFor="let disabled of [true, false]"
|
|
868
|
-
[ngValue]="disabled"
|
|
869
|
-
>
|
|
870
|
-
{{ disabled }}
|
|
871
|
-
</option>
|
|
872
|
-
</select>
|
|
873
|
-
</div>
|
|
874
|
-
</fieldset>
|
|
875
|
-
<fieldset formGroupName="default">
|
|
876
|
-
<legend>Default</legend>
|
|
877
|
-
<div class="form-group">
|
|
878
|
-
<label for="basic-input-property-value">value</label>
|
|
879
|
-
<select
|
|
880
|
-
class="form-control"
|
|
881
|
-
formControlName="value"
|
|
882
|
-
id="basic-input-property-value"
|
|
883
|
-
>
|
|
884
|
-
<option
|
|
885
|
-
[ngValue]="null"
|
|
886
|
-
value
|
|
887
|
-
>Select either true or false</option
|
|
888
|
-
>
|
|
889
|
-
<option
|
|
890
|
-
*ngFor="let value of [true, false]"
|
|
891
|
-
[ngValue]="value"
|
|
892
|
-
>
|
|
893
|
-
{{ value }}
|
|
894
|
-
</option>
|
|
895
|
-
</select>
|
|
896
|
-
</div>
|
|
897
|
-
</fieldset>
|
|
898
|
-
<fieldset formGroupName="validators">
|
|
899
|
-
<legend>Validators</legend>
|
|
900
|
-
<div class="form-group">
|
|
901
|
-
<label for="basic-input-validators-min">min</label>
|
|
902
|
-
<input
|
|
903
|
-
class="form-control"
|
|
904
|
-
formControlName="min"
|
|
905
|
-
id="basic-input-validators-min"
|
|
906
|
-
type="number"
|
|
907
|
-
/>
|
|
908
|
-
</div>
|
|
909
|
-
<div class="form-group">
|
|
910
|
-
<label for="basic-input-validators-max">max</label>
|
|
911
|
-
<input
|
|
912
|
-
class="form-control"
|
|
913
|
-
formControlName="max"
|
|
914
|
-
id="basic-input-validators-max"
|
|
915
|
-
type="number"
|
|
916
|
-
/>
|
|
917
|
-
</div>
|
|
918
|
-
<div class="form-group">
|
|
919
|
-
<label for="basic-input-validators-minLength">minLength</label>
|
|
920
|
-
<input
|
|
921
|
-
class="form-control"
|
|
922
|
-
formControlName="minLength"
|
|
923
|
-
id="basic-input-validators-minLength"
|
|
924
|
-
type="number"
|
|
925
|
-
/>
|
|
926
|
-
</div>
|
|
927
|
-
<div class="form-group">
|
|
928
|
-
<label for="basic-input-validators-maxLength">maxLength</label>
|
|
929
|
-
<input
|
|
930
|
-
class="form-control"
|
|
931
|
-
formControlName="maxLength"
|
|
932
|
-
id="basic-input-validators-maxLength"
|
|
933
|
-
type="number"
|
|
934
|
-
/>
|
|
935
|
-
</div>
|
|
936
|
-
<div class="form-group">
|
|
937
|
-
<label for="basic-input-property-required">required</label>
|
|
938
|
-
<select
|
|
939
|
-
class="form-control"
|
|
940
|
-
formControlName="required"
|
|
941
|
-
id="basic-input-property-required"
|
|
942
|
-
>
|
|
943
|
-
<option
|
|
944
|
-
[ngValue]="null"
|
|
945
|
-
disabled
|
|
946
|
-
>Select either true or false</option
|
|
947
|
-
>
|
|
948
|
-
<option
|
|
949
|
-
*ngFor="let required of [true, false]"
|
|
950
|
-
[ngValue]="required"
|
|
951
|
-
>
|
|
952
|
-
{{ required }}
|
|
953
|
-
</option>
|
|
954
|
-
</select>
|
|
955
|
-
</div>
|
|
956
|
-
</fieldset>
|
|
957
|
-
<fieldset formGroupName="properties">
|
|
958
|
-
<legend>Properties</legend>
|
|
959
|
-
<div class="form-group">
|
|
960
|
-
<label for="basic-input-property-placeholder">Placeholder</label>
|
|
961
|
-
<input
|
|
962
|
-
class="form-control"
|
|
963
|
-
formControlName="placeholder"
|
|
964
|
-
id="basic-input-property-placeholder"
|
|
965
|
-
type="text"
|
|
966
|
-
/>
|
|
967
|
-
</div>
|
|
968
|
-
<div class="form-group">
|
|
969
|
-
<label for="basic-input-property-readonly">readOnly</label>
|
|
970
|
-
<select
|
|
971
|
-
class="form-control"
|
|
972
|
-
formControlName="readOnly"
|
|
973
|
-
id="basic-input-property-readonly"
|
|
974
|
-
>
|
|
975
|
-
<option
|
|
976
|
-
[ngValue]="null"
|
|
977
|
-
disabled
|
|
978
|
-
>Select either true or false</option
|
|
979
|
-
>
|
|
980
|
-
<option
|
|
981
|
-
*ngFor="let readonly of [true, false]"
|
|
982
|
-
[ngValue]="readonly"
|
|
983
|
-
>
|
|
984
|
-
{{ readonly }}
|
|
985
|
-
</option>
|
|
986
|
-
</select>
|
|
987
|
-
</div>
|
|
2886
|
+
<legend class="form-group-title">Standard</legend>
|
|
2887
|
+
<kwikui-input
|
|
2888
|
+
[label]="'Key'"
|
|
2889
|
+
[id]="'basic-field-key'"
|
|
2890
|
+
[type]="'text'"
|
|
2891
|
+
[formControlName]="'key'"
|
|
2892
|
+
[formControl]="otherFormGroup.controls['key']"
|
|
2893
|
+
[disabled]="false"
|
|
2894
|
+
[placeholder]="'Please enter your Field Key'"
|
|
2895
|
+
[focus]="false"
|
|
2896
|
+
[invalid]="false"
|
|
2897
|
+
[case]="'default'"
|
|
2898
|
+
size="m"
|
|
2899
|
+
></kwikui-input>
|
|
988
2900
|
</fieldset>
|
|
2901
|
+
|
|
989
2902
|
<ng-container [ngSwitch]="elementType">
|
|
990
|
-
<ng-container *ngSwitchCase="'
|
|
991
|
-
<
|
|
992
|
-
[
|
|
2903
|
+
<ng-container *ngSwitchCase="'html'">
|
|
2904
|
+
<other-html-config-editor
|
|
2905
|
+
[saveOtherClickCounter]="saveOtherClickCounter"
|
|
993
2906
|
[elementConfig]="elementConfig"
|
|
994
2907
|
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
995
|
-
></
|
|
2908
|
+
></other-html-config-editor>
|
|
996
2909
|
</ng-container>
|
|
997
|
-
<ng-container *ngSwitchCase="'
|
|
998
|
-
<
|
|
999
|
-
[
|
|
2910
|
+
<ng-container *ngSwitchCase="'title'">
|
|
2911
|
+
<other-title-config-editor
|
|
2912
|
+
[saveOtherClickCounter]="saveOtherClickCounter"
|
|
1000
2913
|
[elementConfig]="elementConfig"
|
|
1001
2914
|
(updateElement)="handleOnSaveUpdateElement($event)"
|
|
1002
|
-
></
|
|
2915
|
+
></other-title-config-editor>
|
|
1003
2916
|
</ng-container>
|
|
1004
2917
|
</ng-container>
|
|
1005
2918
|
</form>
|
|
@@ -1023,7 +2936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1023
2936
|
type: Input
|
|
1024
2937
|
}], updateElement: [{
|
|
1025
2938
|
type: Output
|
|
1026
|
-
}], ngOnInit: [], ngOnChanges: [], assignVariables: [],
|
|
2939
|
+
}], ngOnInit: [], ngOnChanges: [], assignVariables: [], createOtherFormGroup: [], handleOnSaveUpdateElement: [], handleOnSave: [] } });
|
|
1027
2940
|
|
|
1028
2941
|
class ElementConfigEditor {
|
|
1029
2942
|
constructor() {
|
|
@@ -1072,7 +2985,7 @@ class ElementConfigEditor {
|
|
|
1072
2985
|
}
|
|
1073
2986
|
}
|
|
1074
2987
|
/** @nocollapse */ ElementConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1075
|
-
/** @nocollapse */ ElementConfigEditor.ɵcmp = i0.ɵɵ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, template: "<div
|
|
2988
|
+
/** @nocollapse */ ElementConfigEditor.ɵcmp = i0.ɵɵ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, 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.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1076
2989
|
__decorate([
|
|
1077
2990
|
logMethod
|
|
1078
2991
|
], ElementConfigEditor.prototype, "ngOnInit", null);
|
|
@@ -1120,6 +3033,8 @@ class KwikIDFormsBuilderComponent {
|
|
|
1120
3033
|
this.formElementsDragList = [];
|
|
1121
3034
|
this.formElementsDropList = [];
|
|
1122
3035
|
this.elementEditorElementConfig = undefined;
|
|
3036
|
+
this.finalJSONConfig = undefined;
|
|
3037
|
+
this.JSON = JSON;
|
|
1123
3038
|
this.builderFormGroup = new FormGroup({
|
|
1124
3039
|
formKey: new FormControl("", [Validators.required]),
|
|
1125
3040
|
formTitle: new FormControl("", [Validators.required])
|
|
@@ -1213,19 +3128,24 @@ class KwikIDFormsBuilderComponent {
|
|
|
1213
3128
|
}
|
|
1214
3129
|
handleOnSaveUpdateElement(event) { }
|
|
1215
3130
|
handleOnClickSaveForms(event) {
|
|
1216
|
-
if (isEmptyValue(this.formKey)) {
|
|
3131
|
+
if (isEmptyValue(this.builderFormGroup.controls.formKey.value)) {
|
|
1217
3132
|
window.alert("Please provide Form Key");
|
|
1218
3133
|
return;
|
|
1219
3134
|
}
|
|
1220
3135
|
else {
|
|
3136
|
+
this.formKey = this.builderFormGroup.controls.formKey.value;
|
|
1221
3137
|
this.formKey = this.formKey.replace(/\s/g, "_").toLocaleUpperCase();
|
|
1222
3138
|
}
|
|
1223
|
-
if (isEmptyValue(this.formTitle)) {
|
|
3139
|
+
if (isEmptyValue(this.builderFormGroup.controls.formTitle.value)) {
|
|
1224
3140
|
window.alert("Please provide Form Title");
|
|
1225
3141
|
return;
|
|
1226
3142
|
}
|
|
3143
|
+
else {
|
|
3144
|
+
this.formTitle = this.builderFormGroup.controls.formTitle.value;
|
|
3145
|
+
}
|
|
1227
3146
|
let finalFields = JSON.parse(JSON.stringify(this.formElementsDropList));
|
|
1228
3147
|
finalFields = finalFields.map((item) => {
|
|
3148
|
+
item = setMissingKeyValue(item, "type", item.elementType);
|
|
1229
3149
|
if (item.elementType.startsWith("NA<>", 0)) {
|
|
1230
3150
|
delete item.elementId;
|
|
1231
3151
|
delete item.elementType;
|
|
@@ -1239,79 +3159,83 @@ class KwikIDFormsBuilderComponent {
|
|
|
1239
3159
|
delete item.elementTitle;
|
|
1240
3160
|
delete item.elementCategory;
|
|
1241
3161
|
delete item.isElement;
|
|
1242
|
-
if (item
|
|
1243
|
-
item.default
|
|
1244
|
-
value
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
{
|
|
1249
|
-
key: "OBJECT",
|
|
1250
|
-
props: {
|
|
1251
|
-
object: {
|
|
1252
|
-
key: "ALL_FORMS_DATA",
|
|
1253
|
-
path: String(`$.${this.formKey}.${item.key}`)
|
|
1254
|
-
}
|
|
1255
|
-
},
|
|
3162
|
+
if (checkObjectKeyExists(item, "default")) {
|
|
3163
|
+
if (checkObjectKeyExists(item.default, "value")) {
|
|
3164
|
+
if (item.default.value) {
|
|
3165
|
+
item.default = {
|
|
3166
|
+
value: {
|
|
3167
|
+
is_found: false,
|
|
1256
3168
|
value: "",
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
3169
|
+
sources: [
|
|
3170
|
+
{
|
|
3171
|
+
key: "OBJECT",
|
|
3172
|
+
props: {
|
|
3173
|
+
object: {
|
|
3174
|
+
key: "ALL_FORMS_DATA",
|
|
3175
|
+
path: String(`$.${this.formKey}.${item.key}`)
|
|
3176
|
+
}
|
|
3177
|
+
},
|
|
3178
|
+
value: "",
|
|
3179
|
+
validation: {
|
|
3180
|
+
is_valid: false,
|
|
3181
|
+
triggers: ["ON_INIT"],
|
|
3182
|
+
rules: [
|
|
3183
|
+
{
|
|
3184
|
+
id: "1",
|
|
3185
|
+
key: "VALUE_CHECK",
|
|
3186
|
+
props: {
|
|
3187
|
+
value: {
|
|
3188
|
+
source: {
|
|
3189
|
+
key: "OBJECT",
|
|
3190
|
+
props: {
|
|
3191
|
+
object: {
|
|
3192
|
+
key: "ALL_FORMS_DATA",
|
|
3193
|
+
path: String(`$.${this.formKey}.${item.key}`)
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
1272
3196
|
}
|
|
1273
|
-
}
|
|
3197
|
+
},
|
|
3198
|
+
pattern: { key: "IS_NOT_EMPTY" }
|
|
1274
3199
|
}
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
path: String(`$.${this.formKey}.${item.key}`)
|
|
3200
|
+
}
|
|
3201
|
+
],
|
|
3202
|
+
actions: [
|
|
3203
|
+
{
|
|
3204
|
+
id: "1",
|
|
3205
|
+
key: "SET_FIELD_DEFAULT_VALUE",
|
|
3206
|
+
condition: "1",
|
|
3207
|
+
props: {
|
|
3208
|
+
fieldKey: String(`${item.key}`),
|
|
3209
|
+
value: {
|
|
3210
|
+
source: {
|
|
3211
|
+
key: "OBJECT",
|
|
3212
|
+
props: {
|
|
3213
|
+
object: {
|
|
3214
|
+
key: "ALL_FORMS_DATA",
|
|
3215
|
+
path: String(`$.${this.formKey}.${item.key}`)
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
1294
3218
|
}
|
|
1295
3219
|
}
|
|
1296
3220
|
}
|
|
1297
3221
|
}
|
|
1298
|
-
|
|
3222
|
+
]
|
|
1299
3223
|
}
|
|
1300
|
-
|
|
1301
|
-
|
|
3224
|
+
}
|
|
3225
|
+
]
|
|
1302
3226
|
}
|
|
1303
|
-
|
|
3227
|
+
};
|
|
1304
3228
|
}
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
3229
|
+
else {
|
|
3230
|
+
item.default = {
|
|
3231
|
+
value: {
|
|
3232
|
+
is_found: false,
|
|
3233
|
+
value: "",
|
|
3234
|
+
sources: []
|
|
3235
|
+
}
|
|
3236
|
+
};
|
|
1313
3237
|
}
|
|
1314
|
-
}
|
|
3238
|
+
}
|
|
1315
3239
|
}
|
|
1316
3240
|
return item;
|
|
1317
3241
|
});
|
|
@@ -1326,12 +3250,20 @@ class KwikIDFormsBuilderComponent {
|
|
|
1326
3250
|
title: this.formTitle,
|
|
1327
3251
|
fields: this.formElementsDropList
|
|
1328
3252
|
}));
|
|
3253
|
+
this.finalJSONConfig = finalFormConfig;
|
|
1329
3254
|
console.log(finalFormConfig);
|
|
1330
3255
|
console.log(this.formElementsDropList);
|
|
1331
3256
|
}
|
|
3257
|
+
copyToClipboard() {
|
|
3258
|
+
navigator.clipboard.writeText(JSON.stringify(this.finalJSONConfig));
|
|
3259
|
+
alert("JSON Config is copied");
|
|
3260
|
+
}
|
|
3261
|
+
closeJSONPopup() {
|
|
3262
|
+
this.finalJSONConfig = undefined;
|
|
3263
|
+
}
|
|
1332
3264
|
}
|
|
1333
3265
|
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1334
|
-
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0, 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.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i2.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i2.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.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.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
3266
|
+
/** @nocollapse */ KwikIDFormsBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormsBuilderComponent, selector: "kwikid-forms-builder", ngImport: i0, 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.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.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.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
1335
3267
|
__decorate([
|
|
1336
3268
|
logMethod
|
|
1337
3269
|
], KwikIDFormsBuilderComponent.prototype, "handleGetKeyValue", null);
|
|
@@ -1907,6 +3839,7 @@ class Converter {
|
|
|
1907
3839
|
return object;
|
|
1908
3840
|
};
|
|
1909
3841
|
const formatFieldKeys = (field) => {
|
|
3842
|
+
field = setMissingKeyValue(field, "disabled", false);
|
|
1910
3843
|
if (checkObjectKeyExists(field, "connectedTo")) {
|
|
1911
3844
|
if (typeof field["connectedTo"] === "string") {
|
|
1912
3845
|
field["connectedElements"] = [
|
|
@@ -2247,7 +4180,6 @@ class Converter {
|
|
|
2247
4180
|
let fieldGroups = {};
|
|
2248
4181
|
for (let field of fields) {
|
|
2249
4182
|
field = updateOnFieldType(field);
|
|
2250
|
-
console.log("FIELD", field);
|
|
2251
4183
|
field = formatFieldKeys(field);
|
|
2252
4184
|
fieldGroups = updateFormFieldGroups(fieldGroups, field);
|
|
2253
4185
|
field = updateFieldDefaultValueConfig(field);
|
|
@@ -2613,15 +4545,15 @@ class Apis {
|
|
|
2613
4545
|
});
|
|
2614
4546
|
}
|
|
2615
4547
|
validateRequestBody() {
|
|
2616
|
-
var _a;
|
|
4548
|
+
var _a, _b, _c, _d;
|
|
2617
4549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2618
4550
|
if (checkObjectKeyExists(this._request, "body")) {
|
|
2619
4551
|
if (checkObjectKeyExists(this._request.body, "validation")) {
|
|
2620
4552
|
const body = this._request.body;
|
|
2621
4553
|
const validation = body.validation;
|
|
2622
|
-
const triggers = validation.triggers;
|
|
2623
|
-
const rules = validation.rules;
|
|
2624
|
-
const actions = (
|
|
4554
|
+
const triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
4555
|
+
const rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
4556
|
+
const actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2625
4557
|
const rulesMapping = new Rule(rules, this._object).mapping();
|
|
2626
4558
|
for (let action of actions) {
|
|
2627
4559
|
const conditionSuccess = new Condition(action.condition, rulesMapping).evaluate();
|
|
@@ -2684,15 +4616,15 @@ class Apis {
|
|
|
2684
4616
|
});
|
|
2685
4617
|
}
|
|
2686
4618
|
validateRequestHeaders() {
|
|
2687
|
-
var _a;
|
|
4619
|
+
var _a, _b, _c, _d;
|
|
2688
4620
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2689
4621
|
const headers = this._request.headers;
|
|
2690
4622
|
if (checkObjectKeyExists(this._request, "headers")) {
|
|
2691
4623
|
if (checkObjectKeyExists(this._request.headers, "validation")) {
|
|
2692
4624
|
const validation = headers.validation;
|
|
2693
|
-
const triggers = validation.triggers;
|
|
2694
|
-
const rules = validation.rules;
|
|
2695
|
-
const actions = (
|
|
4625
|
+
const triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
4626
|
+
const rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
4627
|
+
const actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2696
4628
|
const rulesMapping = new Rule(rules, this._object).mapping();
|
|
2697
4629
|
for (let action of actions) {
|
|
2698
4630
|
const conditionSuccess = new Condition(action.condition, rulesMapping).evaluate();
|
|
@@ -2713,12 +4645,13 @@ class Apis {
|
|
|
2713
4645
|
});
|
|
2714
4646
|
}
|
|
2715
4647
|
validateResponse() {
|
|
4648
|
+
var _a, _b, _c, _d;
|
|
2716
4649
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2717
4650
|
if (checkObjectKeyExists(this._response, "validation")) {
|
|
2718
4651
|
const validation = this._response.validation;
|
|
2719
|
-
const triggers = validation.triggers;
|
|
2720
|
-
const rules = validation.rules;
|
|
2721
|
-
const actions = validation.actions;
|
|
4652
|
+
const triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
4653
|
+
const rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
4654
|
+
const actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2722
4655
|
const rulesMapping = new Rule(rules, this._object).mapping();
|
|
2723
4656
|
for (let action of actions) {
|
|
2724
4657
|
const conditionSuccess = new Condition(action.condition, rulesMapping).evaluate();
|
|
@@ -2732,10 +4665,11 @@ class Apis {
|
|
|
2732
4665
|
});
|
|
2733
4666
|
}
|
|
2734
4667
|
callNextApi(validation) {
|
|
2735
|
-
var _a;
|
|
4668
|
+
var _a, _b, _c, _d;
|
|
2736
4669
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2737
|
-
const
|
|
2738
|
-
const
|
|
4670
|
+
const triggers = (_a = validation === null || validation === void 0 ? void 0 : validation.triggers) !== null && _a !== void 0 ? _a : [];
|
|
4671
|
+
const rules = (_b = validation === null || validation === void 0 ? void 0 : validation.rules) !== null && _b !== void 0 ? _b : [];
|
|
4672
|
+
const actions = (_d = (_c = validation) === null || _c === void 0 ? void 0 : _c.actions) !== null && _d !== void 0 ? _d : [];
|
|
2739
4673
|
const rulesMapping = new Rule(rules, this._object).mapping();
|
|
2740
4674
|
for (let action of actions) {
|
|
2741
4675
|
const conditionSuccess = new Condition(action.condition, rulesMapping).evaluate();
|
|
@@ -3036,19 +4970,32 @@ class KwikIDFormViewComponent {
|
|
|
3036
4970
|
}
|
|
3037
4971
|
}
|
|
3038
4972
|
handleOnClickResetFormFields(e, field) {
|
|
4973
|
+
var _a;
|
|
3039
4974
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3040
|
-
|
|
3041
|
-
for (let
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
4975
|
+
const resetFormFields = () => __awaiter(this, void 0, void 0, function* () {
|
|
4976
|
+
for (let f of field.reset.fields) {
|
|
4977
|
+
for (let action of f.actions) {
|
|
4978
|
+
const resetField = getFormFieldByKey(this.formFields, action.props.fieldKey);
|
|
4979
|
+
const actions = new Action(action, {}, {
|
|
4980
|
+
FIELD_CONFIG: resetField,
|
|
4981
|
+
FORM_FIELDS: this.formFields,
|
|
4982
|
+
FORM_DATA: this.formData,
|
|
4983
|
+
PREVIOUS_FORM_DATA: this.previousFormData,
|
|
4984
|
+
ALL_FORMS_DATA: this.allFormsData
|
|
4985
|
+
}, this.takeAction.bind(this));
|
|
4986
|
+
yield actions.execute();
|
|
4987
|
+
}
|
|
3051
4988
|
}
|
|
4989
|
+
});
|
|
4990
|
+
const BYPASS_RESET_CONFIRM = (_a = field === null || field === void 0 ? void 0 : field.properties) === null || _a === void 0 ? void 0 : _a.bypassResetConfirmation;
|
|
4991
|
+
if (!BYPASS_RESET_CONFIRM) {
|
|
4992
|
+
const CONFIRM_RESET = window.confirm("This action will reset all the fields. Do you still want to continue?");
|
|
4993
|
+
if (CONFIRM_RESET) {
|
|
4994
|
+
resetFormFields();
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
else {
|
|
4998
|
+
resetFormFields();
|
|
3052
4999
|
}
|
|
3053
5000
|
});
|
|
3054
5001
|
}
|
|
@@ -3072,7 +5019,7 @@ class KwikIDFormViewComponent {
|
|
|
3072
5019
|
if (api.request.body.validation.is_valid) {
|
|
3073
5020
|
if (api.request.url.hasOwnProperty("type") &&
|
|
3074
5021
|
api.request.url.type === EApiRequestUrlType.MOCK) {
|
|
3075
|
-
apiCallResponse = api.request.url.props.mockedData
|
|
5022
|
+
apiCallResponse = api.request.url.props.mockedData;
|
|
3076
5023
|
}
|
|
3077
5024
|
else {
|
|
3078
5025
|
const url = api.request.url.value;
|
|
@@ -3096,6 +5043,8 @@ class KwikIDFormViewComponent {
|
|
|
3096
5043
|
[field.key]: apiCallResponse
|
|
3097
5044
|
}, { emitEvent: false });
|
|
3098
5045
|
}
|
|
5046
|
+
console.log(api.response);
|
|
5047
|
+
console.log(apiCallResponse);
|
|
3099
5048
|
api.response = setMissingKeyValue(api.response, "value", apiCallResponse);
|
|
3100
5049
|
const apis = new Apis({
|
|
3101
5050
|
FIELD_CONFIG: field,
|
|
@@ -3551,7 +5500,7 @@ class KwikIDFormViewComponent {
|
|
|
3551
5500
|
}
|
|
3552
5501
|
}
|
|
3553
5502
|
/** @nocollapse */ KwikIDFormViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormViewComponent, deps: [{ token: TuiPushService }, { token: TuiAlertService }, { token: KwikIDFormViewService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3554
|
-
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties.header.title.hidden ||\n !formConfig.properties.header.steps.hidden\n \"\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.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i2.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i2.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i2.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2.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.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.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3$1.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i2.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2.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.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i2.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i2.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }], pipes: { "safeHtml": SafeHtmlPipe$1 } });
|
|
5503
|
+
/** @nocollapse */ KwikIDFormViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: KwikIDFormViewComponent, selector: "kwikid-form-view", inputs: { formConfig: "formConfig", formData: "formData", isMobileView: "isMobileView", allFormsData: "allFormsData" }, outputs: { onClickViewForms: "onClickViewForms", onClickSaveForm: "onClickSaveForm", onClickApiCall: "onClickApiCall" }, providers: [KwikIDFormViewService], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"kwikid-form-container\"\n *ngIf=\"!loading\"\n>\n <div\n id=\"uf-form-fields-header-container\"\n *ngIf=\"\n !formConfig.properties.header.title.hidden ||\n !formConfig.properties.header.steps.hidden\n \"\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.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }, { type: i1.KwikUIInputComponent, selector: "kwikui-input", inputs: ["label", "id", "type", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "validators", "case", "size", "icon", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIMessagesComponent, selector: "kwikui-messages", inputs: ["messages", "id"] }, { type: i1.KwikUICheckboxBlockComponent, selector: "kwikui-checkbox-block", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "contentAlign", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.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.KwikUIInputPhoneComponent, selector: "kwikui-input-phone", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "countryCode", "phoneMaskAfterCountryCode", "removeCountryCodeFromValue", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i3.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { type: i1.KwikUIRadioListComponent, selector: "kwikui-radio-list", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "size", "orientation", "items", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUISelectComboboxComponent, selector: "kwikui-select-combobox", inputs: ["label", "id", "formControlName", "formControl", "placeholder", "focus", "invalid", "disabled", "options", "size", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.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.KwikUIButtonApiCallComponent, selector: "kwikui-button-api-call", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "shape", "size", "apiStatus"], outputs: ["onClick"] }, { type: i1.KwikUIInputOtpComponent, selector: "kwikui-input-otp", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i1.KwikUIInputAadhaarComponent, selector: "kwikui-input-aadhaar", inputs: ["label", "id", "formControlName", "formControl", "focus", "invalid", "disabled", "placeholder", "mask", "validators", "properties"], outputs: ["getKeyValue"] }, { type: i4$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }], pipes: { "safeHtml": SafeHtmlPipe$1 } });
|
|
3555
5504
|
__decorate([
|
|
3556
5505
|
logMethod
|
|
3557
5506
|
], KwikIDFormViewComponent.prototype, "ngOnInit", null);
|
|
@@ -3680,7 +5629,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
3680
5629
|
}], ctorParameters: function () { return [{ type: i4$1.TuiPushService, decorators: [{
|
|
3681
5630
|
type: Inject,
|
|
3682
5631
|
args: [TuiPushService]
|
|
3683
|
-
}] }, { type: i3
|
|
5632
|
+
}] }, { type: i3.TuiAlertService, decorators: [{
|
|
3684
5633
|
type: Inject,
|
|
3685
5634
|
args: [TuiAlertService]
|
|
3686
5635
|
}] }, { type: KwikIDFormViewService }]; }, propDecorators: { formConfig: [{
|
|
@@ -3858,7 +5807,7 @@ class KwikIDFormsListComponent {
|
|
|
3858
5807
|
}
|
|
3859
5808
|
}
|
|
3860
5809
|
/** @nocollapse */ KwikIDFormsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3861
|
-
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0.ɵɵ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, 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:
|
|
5810
|
+
/** @nocollapse */ KwikIDFormsListComponent.ɵcmp = i0.ɵɵ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, 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.KwikUIProgressSegmentedComponent, selector: "kwikui-progress-segmented", inputs: ["id", "value", "max", "size", "colors"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["disabled", "id", "label", "showLoader", "styles", "class", "type", "appearance", "icon", "iconRight", "shape", "size"], outputs: ["onClick"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "safeHtml": SafeHtmlPipe } });
|
|
3862
5811
|
__decorate([
|
|
3863
5812
|
logMethod
|
|
3864
5813
|
], KwikIDFormsListComponent.prototype, "ngOnChanges", null);
|
|
@@ -4325,7 +6274,6 @@ class KwikIDFormsRendererComponent {
|
|
|
4325
6274
|
}
|
|
4326
6275
|
}
|
|
4327
6276
|
}
|
|
4328
|
-
console.log(JSON.parse(JSON.stringify(formConfig)));
|
|
4329
6277
|
formConfig = new Converter().updateFormConfigMiscellaneous(formConfig, {
|
|
4330
6278
|
formsListLength: this.findFormsListLength(this.formsList)
|
|
4331
6279
|
});
|
|
@@ -4417,7 +6365,7 @@ class KwikIDFormsRendererComponent {
|
|
|
4417
6365
|
}
|
|
4418
6366
|
}
|
|
4419
6367
|
/** @nocollapse */ KwikIDFormsRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormsRendererComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4420
|
-
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0.ɵɵ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, 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$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3
|
|
6368
|
+
/** @nocollapse */ KwikIDFormsRendererComponent.ɵcmp = i0.ɵɵ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, 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$1.TuiPushComponent, selector: "tui-push", inputs: ["heading", "type", "timestamp"], outputs: ["close"] }, { type: i3.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.TuiPushAlertDirective, selector: "[tuiPush]", inputs: ["tuiPush"] }, { type: i4$1.TuiPushDirective, selector: "tui-push" }], animations: [
|
|
4421
6369
|
trigger("panelInOut", [
|
|
4422
6370
|
transition(":enter", [
|
|
4423
6371
|
style({ transform: "translateY(100%)" }),
|
|
@@ -4507,6 +6455,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
4507
6455
|
type: Output
|
|
4508
6456
|
}], convertFormListConfig: [], assignSequenceNoToForm: [], findCompletedFormsList: [], markFormInFormsListAsCompleted: [], markFormInFormsListAsDisabled: [], filterAllFormsData: [], checkIfFormsStatusCompleted: [], findActiveFormConfig: [], updateFormsList: [], formHide: [], formShow: [], findFormsListLength: [], handleOnClickSetActiveForm: [], handleOnClickSubmitForms: [] } });
|
|
4509
6457
|
|
|
6458
|
+
class BasicDateConfigEditor {
|
|
6459
|
+
constructor() {
|
|
6460
|
+
this.saveBasicClickCounter = 0;
|
|
6461
|
+
this.elementConfig = {};
|
|
6462
|
+
this.updateElement = new EventEmitter();
|
|
6463
|
+
this.basicDateFormGroup = undefined;
|
|
6464
|
+
}
|
|
6465
|
+
ngOnInit() {
|
|
6466
|
+
this.createBasicDateFormGroup();
|
|
6467
|
+
}
|
|
6468
|
+
ngOnChanges(changes) {
|
|
6469
|
+
var _a;
|
|
6470
|
+
const verifyChange = (key) => {
|
|
6471
|
+
return changes.hasOwnProperty(key) && !changes[key].firstChange;
|
|
6472
|
+
};
|
|
6473
|
+
if (verifyChange("elementConfig")) {
|
|
6474
|
+
this.elementConfig = changes.elementConfig.currentValue;
|
|
6475
|
+
(_a = this.basicDateFormGroup) === null || _a === void 0 ? void 0 : _a.reset(this.elementConfig);
|
|
6476
|
+
}
|
|
6477
|
+
if (verifyChange("saveBasicClickCounter")) {
|
|
6478
|
+
if (changes.saveBasicClickCounter.previousValue !==
|
|
6479
|
+
changes.saveBasicClickCounter.currentValue) {
|
|
6480
|
+
this.saveBasicClickCounter = changes.saveBasicClickCounter.currentValue;
|
|
6481
|
+
this.handleOnSave();
|
|
6482
|
+
}
|
|
6483
|
+
}
|
|
6484
|
+
}
|
|
6485
|
+
createBasicDateFormGroup() {
|
|
6486
|
+
this.basicDateFormGroup = new FormGroup({});
|
|
6487
|
+
this.basicDateFormGroup.updateValueAndValidity();
|
|
6488
|
+
}
|
|
6489
|
+
handleOnSave() {
|
|
6490
|
+
let basicElementConfig = this.basicDateFormGroup.getRawValue();
|
|
6491
|
+
this.updateElement.emit({
|
|
6492
|
+
basicElementConfig: basicElementConfig
|
|
6493
|
+
});
|
|
6494
|
+
}
|
|
6495
|
+
}
|
|
6496
|
+
/** @nocollapse */ BasicDateConfigEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicDateConfigEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6497
|
+
/** @nocollapse */ BasicDateConfigEditor.ɵcmp = i0.ɵɵ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, template: ``, isInline: true, styles: [""] });
|
|
6498
|
+
__decorate([
|
|
6499
|
+
logMethod
|
|
6500
|
+
], BasicDateConfigEditor.prototype, "ngOnInit", null);
|
|
6501
|
+
__decorate([
|
|
6502
|
+
logMethod
|
|
6503
|
+
], BasicDateConfigEditor.prototype, "ngOnChanges", null);
|
|
6504
|
+
__decorate([
|
|
6505
|
+
logMethod
|
|
6506
|
+
], BasicDateConfigEditor.prototype, "createBasicDateFormGroup", null);
|
|
6507
|
+
__decorate([
|
|
6508
|
+
logMethod
|
|
6509
|
+
], BasicDateConfigEditor.prototype, "handleOnSave", null);
|
|
6510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BasicDateConfigEditor, decorators: [{
|
|
6511
|
+
type: Component,
|
|
6512
|
+
args: [{
|
|
6513
|
+
selector: "basic-date-config-editor",
|
|
6514
|
+
template: ``,
|
|
6515
|
+
styles: [``]
|
|
6516
|
+
}]
|
|
6517
|
+
}], ctorParameters: function () { return []; }, propDecorators: { saveBasicClickCounter: [{
|
|
6518
|
+
type: Input
|
|
6519
|
+
}], elementConfig: [{
|
|
6520
|
+
type: Input
|
|
6521
|
+
}], updateElement: [{
|
|
6522
|
+
type: Output
|
|
6523
|
+
}], ngOnInit: [], ngOnChanges: [], createBasicDateFormGroup: [], handleOnSave: [] } });
|
|
6524
|
+
|
|
4510
6525
|
class KwikIDFormBuilderModule {
|
|
4511
6526
|
}
|
|
4512
6527
|
/** @nocollapse */ KwikIDFormBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -4514,21 +6529,40 @@ class KwikIDFormBuilderModule {
|
|
|
4514
6529
|
ElementConfigEditor,
|
|
4515
6530
|
BasicElementConfigEditor,
|
|
4516
6531
|
BasicTextConfigEditor,
|
|
4517
|
-
BasicRadioConfigEditor
|
|
6532
|
+
BasicRadioConfigEditor,
|
|
6533
|
+
BasicNumberConfigEditor,
|
|
6534
|
+
BasicCheckboxConfigEditor,
|
|
6535
|
+
BasicDateConfigEditor,
|
|
6536
|
+
BasicOtpConfigEditor,
|
|
6537
|
+
BasicPhoneConfigEditor,
|
|
6538
|
+
DocumentElementConfigEditor,
|
|
6539
|
+
DocumentAadhaarNumberConfigEditor,
|
|
6540
|
+
DocumentPanNumberConfigEditor,
|
|
6541
|
+
OtherElementConfigEditor,
|
|
6542
|
+
OtherHTMLConfigEditor,
|
|
6543
|
+
OtherTitleConfigEditor], imports: [CommonModule,
|
|
4518
6544
|
FormsModule,
|
|
4519
6545
|
ReactiveFormsModule,
|
|
4520
6546
|
DragDropModule,
|
|
6547
|
+
KwikUIButtonIconModule,
|
|
4521
6548
|
KwikUIButtonModule,
|
|
4522
6549
|
KwikUIInputModule,
|
|
4523
|
-
|
|
6550
|
+
KwikUIInputNumberModule,
|
|
6551
|
+
KwikUISelectComboboxModule,
|
|
6552
|
+
KwikUITableModule,
|
|
6553
|
+
KwikUITextareaModule], exports: [KwikIDFormsBuilderComponent] });
|
|
4524
6554
|
/** @nocollapse */ KwikIDFormBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormBuilderModule, providers: [], imports: [[
|
|
4525
6555
|
CommonModule,
|
|
4526
6556
|
FormsModule,
|
|
4527
6557
|
ReactiveFormsModule,
|
|
4528
6558
|
DragDropModule,
|
|
6559
|
+
KwikUIButtonIconModule,
|
|
4529
6560
|
KwikUIButtonModule,
|
|
4530
6561
|
KwikUIInputModule,
|
|
4531
|
-
|
|
6562
|
+
KwikUIInputNumberModule,
|
|
6563
|
+
KwikUISelectComboboxModule,
|
|
6564
|
+
KwikUITableModule,
|
|
6565
|
+
KwikUITextareaModule
|
|
4532
6566
|
]] });
|
|
4533
6567
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: KwikIDFormBuilderModule, decorators: [{
|
|
4534
6568
|
type: NgModule,
|
|
@@ -4538,16 +6572,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
4538
6572
|
ElementConfigEditor,
|
|
4539
6573
|
BasicElementConfigEditor,
|
|
4540
6574
|
BasicTextConfigEditor,
|
|
4541
|
-
BasicRadioConfigEditor
|
|
6575
|
+
BasicRadioConfigEditor,
|
|
6576
|
+
BasicNumberConfigEditor,
|
|
6577
|
+
BasicCheckboxConfigEditor,
|
|
6578
|
+
BasicDateConfigEditor,
|
|
6579
|
+
BasicOtpConfigEditor,
|
|
6580
|
+
BasicPhoneConfigEditor,
|
|
6581
|
+
DocumentElementConfigEditor,
|
|
6582
|
+
DocumentAadhaarNumberConfigEditor,
|
|
6583
|
+
DocumentPanNumberConfigEditor,
|
|
6584
|
+
OtherElementConfigEditor,
|
|
6585
|
+
OtherHTMLConfigEditor,
|
|
6586
|
+
OtherTitleConfigEditor
|
|
4542
6587
|
],
|
|
4543
6588
|
imports: [
|
|
4544
6589
|
CommonModule,
|
|
4545
6590
|
FormsModule,
|
|
4546
6591
|
ReactiveFormsModule,
|
|
4547
6592
|
DragDropModule,
|
|
6593
|
+
KwikUIButtonIconModule,
|
|
4548
6594
|
KwikUIButtonModule,
|
|
4549
6595
|
KwikUIInputModule,
|
|
4550
|
-
|
|
6596
|
+
KwikUIInputNumberModule,
|
|
6597
|
+
KwikUISelectComboboxModule,
|
|
6598
|
+
KwikUITableModule,
|
|
6599
|
+
KwikUITextareaModule
|
|
4551
6600
|
],
|
|
4552
6601
|
providers: [],
|
|
4553
6602
|
exports: [KwikIDFormsBuilderComponent]
|