mis-crystal-design-system 18.1.5 → 18.1.6-test-1
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/dynamic-form/dynamic-form.component.d.ts +15 -0
- package/esm2022/dynamic-form/dynamic-form.component.mjs +193 -78
- package/esm2022/slider/slider.component.mjs +2 -2
- package/esm2022/table/table.component.mjs +2 -2
- package/esm2022/timepicker/timepicker.component.mjs +16 -10
- package/esm2022/timerangepicker/timerangepicker.component.mjs +8 -6
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs +192 -77
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-slider.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-slider.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-table.mjs +2 -2
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timepicker.mjs +15 -9
- package/fesm2022/mis-crystal-design-system-timepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs +7 -5
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
- package/package.json +17 -17
- package/timepicker/timepicker.component.d.ts +3 -1
- package/timerangepicker/timerangepicker.component.d.ts +3 -1
- package/button/button.directive.scss +0 -71
- package/drawer/drawer.scss +0 -20
- package/input/mis-input.component.scss +0 -187
- package/modal/modal.scss +0 -9
- package/styles/fonts/icomoon.eot +0 -0
- package/styles/fonts/icomoon.svg +0 -315
- package/styles/fonts/icomoon.ttf +0 -0
- package/styles/fonts/icomoon.woff +0 -0
- package/styles/mis-borders-backgrounds.scss +0 -764
- package/styles/mis-color-constants.scss +0 -353
- package/styles/mis-flex.scss +0 -321
- package/styles/mis-fonts.scss +0 -124
- package/styles/mis-icons.scss +0 -1054
- package/styles/mis-mixins.scss +0 -46
- package/styles/mis-old-icon-styles.scss +0 -498
- package/styles/mis-spacing-sizing.scss +0 -2590
- package/styles/mis-typography.scss +0 -462
|
@@ -99,19 +99,15 @@ function DynamicFormComponent_ng_template_3_ng_container_0_ng_template_2_ng_cont
|
|
|
99
99
|
} if (rf & 2) {
|
|
100
100
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
101
101
|
i0.ɵɵnextContext();
|
|
102
|
-
const
|
|
103
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
102
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
103
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
104
104
|
} }
|
|
105
105
|
function DynamicFormComponent_ng_template_3_ng_container_0_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
-
const _r12 = i0.ɵɵgetCurrentView();
|
|
107
106
|
i0.ɵɵelementStart(0, "div", 21)(1, "p", 22);
|
|
108
107
|
i0.ɵɵtext(2);
|
|
109
108
|
i0.ɵɵtemplate(3, DynamicFormComponent_ng_template_3_ng_container_0_ng_template_2_span_3_Template, 2, 0, "span", 19);
|
|
110
109
|
i0.ɵɵelementEnd();
|
|
111
|
-
i0.ɵɵelement(4, "div", 23);
|
|
112
|
-
i0.ɵɵelementStart(5, "input", 24);
|
|
113
|
-
i0.ɵɵlistener("ngModelChange", function DynamicFormComponent_ng_template_3_ng_container_0_ng_template_2_Template_input_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r7 = i0.ɵɵnextContext(2); const field_r9 = ctx_r7.$implicit; const formgroup_r11 = ctx_r7.formGroup; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.updateSubDynamicFields(field_r9, formgroup_r11, $event)); });
|
|
114
|
-
i0.ɵɵelementEnd();
|
|
110
|
+
i0.ɵɵelement(4, "div", 23)(5, "input", 24);
|
|
115
111
|
i0.ɵɵtemplate(6, DynamicFormComponent_ng_template_3_ng_container_0_ng_template_2_ng_container_6_Template, 1, 4, "ng-container", 25);
|
|
116
112
|
i0.ɵɵelementEnd();
|
|
117
113
|
} if (rf & 2) {
|
|
@@ -135,10 +131,10 @@ function DynamicFormComponent_ng_template_3_ng_container_0_Template(rf, ctx) { i
|
|
|
135
131
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_0_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_0_ng_template_2_Template, 7, 13, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
|
|
136
132
|
i0.ɵɵelementContainerEnd();
|
|
137
133
|
} if (rf & 2) {
|
|
138
|
-
const
|
|
134
|
+
const defaultInputTextNumber_r13 = i0.ɵɵreference(3);
|
|
139
135
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
140
136
|
i0.ɵɵadvance();
|
|
141
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customInputTextNumber)("ngIfElse",
|
|
137
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customInputTextNumber)("ngIfElse", defaultInputTextNumber_r13);
|
|
142
138
|
} }
|
|
143
139
|
function DynamicFormComponent_ng_template_3_ng_container_1_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
144
140
|
function DynamicFormComponent_ng_template_3_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -164,19 +160,15 @@ function DynamicFormComponent_ng_template_3_ng_container_1_ng_template_2_ng_cont
|
|
|
164
160
|
} if (rf & 2) {
|
|
165
161
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
166
162
|
i0.ɵɵnextContext();
|
|
167
|
-
const
|
|
168
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
163
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
164
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
169
165
|
} }
|
|
170
166
|
function DynamicFormComponent_ng_template_3_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
171
|
-
const _r15 = i0.ɵɵgetCurrentView();
|
|
172
167
|
i0.ɵɵelementStart(0, "div", 21)(1, "p", 22);
|
|
173
168
|
i0.ɵɵtext(2);
|
|
174
169
|
i0.ɵɵtemplate(3, DynamicFormComponent_ng_template_3_ng_container_1_ng_template_2_span_3_Template, 2, 0, "span", 19);
|
|
175
170
|
i0.ɵɵelementEnd();
|
|
176
|
-
i0.ɵɵelement(4, "div", 23);
|
|
177
|
-
i0.ɵɵelementStart(5, "textarea", 26);
|
|
178
|
-
i0.ɵɵlistener("ngModelChange", function DynamicFormComponent_ng_template_3_ng_container_1_ng_template_2_Template_textarea_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r7 = i0.ɵɵnextContext(2); const field_r9 = ctx_r7.$implicit; const formgroup_r11 = ctx_r7.formGroup; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.updateSubDynamicFields(field_r9, formgroup_r11, $event)); });
|
|
179
|
-
i0.ɵɵelementEnd();
|
|
171
|
+
i0.ɵɵelement(4, "div", 23)(5, "textarea", 26);
|
|
180
172
|
i0.ɵɵtemplate(6, DynamicFormComponent_ng_template_3_ng_container_1_ng_template_2_ng_container_6_Template, 1, 4, "ng-container", 25);
|
|
181
173
|
i0.ɵɵelementEnd();
|
|
182
174
|
} if (rf & 2) {
|
|
@@ -200,10 +192,10 @@ function DynamicFormComponent_ng_template_3_ng_container_1_Template(rf, ctx) { i
|
|
|
200
192
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_1_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_1_ng_template_2_Template, 7, 11, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
|
|
201
193
|
i0.ɵɵelementContainerEnd();
|
|
202
194
|
} if (rf & 2) {
|
|
203
|
-
const
|
|
195
|
+
const defaultInputTextarea_r14 = i0.ɵɵreference(3);
|
|
204
196
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
205
197
|
i0.ɵɵadvance();
|
|
206
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customInputTextarea)("ngIfElse",
|
|
198
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customInputTextarea)("ngIfElse", defaultInputTextarea_r14);
|
|
207
199
|
} }
|
|
208
200
|
function DynamicFormComponent_ng_template_3_ng_container_2_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
209
201
|
function DynamicFormComponent_ng_template_3_ng_container_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -225,9 +217,9 @@ function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_s
|
|
|
225
217
|
i0.ɵɵelementEnd();
|
|
226
218
|
} }
|
|
227
219
|
function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_img_7_Template(rf, ctx) { if (rf & 1) {
|
|
228
|
-
const
|
|
220
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
229
221
|
i0.ɵɵelementStart(0, "img", 33);
|
|
230
|
-
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_img_7_Template_img_click_0_listener() { i0.ɵɵrestoreView(
|
|
222
|
+
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_img_7_Template_img_click_0_listener() { i0.ɵɵrestoreView(_r16); i0.ɵɵnextContext(); const dp_r17 = i0.ɵɵreference(6); return i0.ɵɵresetView(dp_r17.click()); });
|
|
231
223
|
i0.ɵɵelementEnd();
|
|
232
224
|
} if (rf & 2) {
|
|
233
225
|
const ctx_r5 = i0.ɵɵnextContext(5);
|
|
@@ -238,17 +230,17 @@ function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_n
|
|
|
238
230
|
} if (rf & 2) {
|
|
239
231
|
const control_r10 = i0.ɵɵnextContext(4).control;
|
|
240
232
|
i0.ɵɵnextContext();
|
|
241
|
-
const
|
|
242
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
233
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
234
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
243
235
|
} }
|
|
244
236
|
function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
245
|
-
const
|
|
237
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
246
238
|
i0.ɵɵelementStart(0, "div", 28)(1, "p", 29);
|
|
247
239
|
i0.ɵɵtext(2);
|
|
248
240
|
i0.ɵɵtemplate(3, DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_span_3_Template, 2, 0, "span", 19);
|
|
249
241
|
i0.ɵɵelementEnd();
|
|
250
242
|
i0.ɵɵelementStart(4, "div", 30)(5, "input", 31, 5);
|
|
251
|
-
i0.ɵɵlistener("dateChange", function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_Template_input_dateChange_5_listener($event) { i0.ɵɵrestoreView(
|
|
243
|
+
i0.ɵɵlistener("dateChange", function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_Template_input_dateChange_5_listener($event) { i0.ɵɵrestoreView(_r15); const control_r10 = i0.ɵɵnextContext(3).control; return i0.ɵɵresetView(control_r10.setValue($event)); });
|
|
252
244
|
i0.ɵɵelementEnd();
|
|
253
245
|
i0.ɵɵtemplate(7, DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_img_7_Template, 1, 1, "img", 32);
|
|
254
246
|
i0.ɵɵelementEnd();
|
|
@@ -283,10 +275,10 @@ function DynamicFormComponent_ng_template_3_ng_container_2_Template(rf, ctx) { i
|
|
|
283
275
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_2_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_Template, 1, 1, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
|
|
284
276
|
i0.ɵɵelementContainerEnd();
|
|
285
277
|
} if (rf & 2) {
|
|
286
|
-
const
|
|
278
|
+
const defaultInputDate_r18 = i0.ɵɵreference(3);
|
|
287
279
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
288
280
|
i0.ɵɵadvance();
|
|
289
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customInputDate)("ngIfElse",
|
|
281
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customInputDate)("ngIfElse", defaultInputDate_r18);
|
|
290
282
|
} }
|
|
291
283
|
function DynamicFormComponent_ng_template_3_ng_container_3_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
292
284
|
function DynamicFormComponent_ng_template_3_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -312,17 +304,17 @@ function DynamicFormComponent_ng_template_3_ng_container_3_ng_template_2_ng_cont
|
|
|
312
304
|
} if (rf & 2) {
|
|
313
305
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
314
306
|
i0.ɵɵnextContext();
|
|
315
|
-
const
|
|
316
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
307
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
308
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
317
309
|
} }
|
|
318
310
|
function DynamicFormComponent_ng_template_3_ng_container_3_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
319
|
-
const
|
|
311
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
320
312
|
i0.ɵɵelementStart(0, "div", 28)(1, "p", 29);
|
|
321
313
|
i0.ɵɵtext(2);
|
|
322
314
|
i0.ɵɵtemplate(3, DynamicFormComponent_ng_template_3_ng_container_3_ng_template_2_span_3_Template, 2, 0, "span", 19);
|
|
323
315
|
i0.ɵɵelementEnd();
|
|
324
316
|
i0.ɵɵelementStart(4, "mis-switch", 34);
|
|
325
|
-
i0.ɵɵlistener("valueChanged", function DynamicFormComponent_ng_template_3_ng_container_3_ng_template_2_Template_mis_switch_valueChanged_4_listener($event) { i0.ɵɵrestoreView(
|
|
317
|
+
i0.ɵɵlistener("valueChanged", function DynamicFormComponent_ng_template_3_ng_container_3_ng_template_2_Template_mis_switch_valueChanged_4_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r7 = i0.ɵɵnextContext(2); const field_r9 = ctx_r7.$implicit; const formgroup_r11 = ctx_r7.formGroup; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.updateSubDynamicFields(field_r9, formgroup_r11, $event)); });
|
|
326
318
|
i0.ɵɵelementEnd();
|
|
327
319
|
i0.ɵɵtemplate(5, DynamicFormComponent_ng_template_3_ng_container_3_ng_template_2_ng_container_5_Template, 1, 4, "ng-container", 25);
|
|
328
320
|
i0.ɵɵelementEnd();
|
|
@@ -347,10 +339,10 @@ function DynamicFormComponent_ng_template_3_ng_container_3_Template(rf, ctx) { i
|
|
|
347
339
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_3_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_3_ng_template_2_Template, 6, 7, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
|
|
348
340
|
i0.ɵɵelementContainerEnd();
|
|
349
341
|
} if (rf & 2) {
|
|
350
|
-
const
|
|
342
|
+
const defaultBooleanToggle_r20 = i0.ɵɵreference(3);
|
|
351
343
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
352
344
|
i0.ɵɵadvance();
|
|
353
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customBooleanToggle)("ngIfElse",
|
|
345
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customBooleanToggle)("ngIfElse", defaultBooleanToggle_r20);
|
|
354
346
|
} }
|
|
355
347
|
function DynamicFormComponent_ng_template_3_ng_container_4_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
356
348
|
function DynamicFormComponent_ng_template_3_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -372,9 +364,9 @@ function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_span_3_
|
|
|
372
364
|
i0.ɵɵelementEnd();
|
|
373
365
|
} }
|
|
374
366
|
function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_img_6_Template(rf, ctx) { if (rf & 1) {
|
|
375
|
-
const
|
|
367
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
376
368
|
i0.ɵɵelementStart(0, "img", 38);
|
|
377
|
-
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_img_6_Template_img_click_0_listener() { i0.ɵɵrestoreView(
|
|
369
|
+
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_img_6_Template_img_click_0_listener() { i0.ɵɵrestoreView(_r22); const field_r9 = i0.ɵɵnextContext(3).$implicit; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.fieldRemoved.emit(field_r9)); });
|
|
378
370
|
i0.ɵɵelementEnd();
|
|
379
371
|
} if (rf & 2) {
|
|
380
372
|
const ctx_r5 = i0.ɵɵnextContext(4);
|
|
@@ -385,17 +377,17 @@ function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_ng_cont
|
|
|
385
377
|
} if (rf & 2) {
|
|
386
378
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
387
379
|
i0.ɵɵnextContext();
|
|
388
|
-
const
|
|
389
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
380
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
381
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
390
382
|
} }
|
|
391
383
|
function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
392
|
-
const
|
|
384
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
393
385
|
i0.ɵɵelementStart(0, "div", 28)(1, "p", 29);
|
|
394
386
|
i0.ɵɵtext(2);
|
|
395
387
|
i0.ɵɵtemplate(3, DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_span_3_Template, 2, 0, "span", 19);
|
|
396
388
|
i0.ɵɵelementEnd();
|
|
397
389
|
i0.ɵɵelementStart(4, "div", 35)(5, "mis-dropdown", 36);
|
|
398
|
-
i0.ɵɵlistener("onChange", function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_Template_mis_dropdown_onChange_5_listener($event) { i0.ɵɵrestoreView(
|
|
390
|
+
i0.ɵɵlistener("onChange", function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_Template_mis_dropdown_onChange_5_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r7 = i0.ɵɵnextContext(2); const field_r9 = ctx_r7.$implicit; const control_r10 = ctx_r7.control; const formgroup_r11 = ctx_r7.formGroup; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.updateSelectedValueForSingleSelect(field_r9, control_r10, formgroup_r11, $event)); });
|
|
399
391
|
i0.ɵɵelementEnd();
|
|
400
392
|
i0.ɵɵtemplate(6, DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_img_6_Template, 1, 1, "img", 37);
|
|
401
393
|
i0.ɵɵelementEnd();
|
|
@@ -426,10 +418,10 @@ function DynamicFormComponent_ng_template_3_ng_container_4_Template(rf, ctx) { i
|
|
|
426
418
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_4_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_Template, 8, 14, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
|
|
427
419
|
i0.ɵɵelementContainerEnd();
|
|
428
420
|
} if (rf & 2) {
|
|
429
|
-
const
|
|
421
|
+
const defaultSingleSelectDropdown_r23 = i0.ɵɵreference(3);
|
|
430
422
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
431
423
|
i0.ɵɵadvance();
|
|
432
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customSingleSelectDropdown)("ngIfElse",
|
|
424
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customSingleSelectDropdown)("ngIfElse", defaultSingleSelectDropdown_r23);
|
|
433
425
|
} }
|
|
434
426
|
function DynamicFormComponent_ng_template_3_ng_container_5_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
435
427
|
function DynamicFormComponent_ng_template_3_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -457,30 +449,30 @@ function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_i
|
|
|
457
449
|
i0.ɵɵproperty("src", ctx_r5.activeBtnIconUrl(), i0.ɵɵsanitizeUrl);
|
|
458
450
|
} }
|
|
459
451
|
function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
460
|
-
const
|
|
452
|
+
const _r24 = i0.ɵɵgetCurrentView();
|
|
461
453
|
i0.ɵɵelementStart(0, "div", 41);
|
|
462
|
-
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_Template_div_click_0_listener() { const
|
|
454
|
+
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_Template_div_click_0_listener() { const item_r25 = i0.ɵɵrestoreView(_r24).$implicit; const ctx_r7 = i0.ɵɵnextContext(3); const field_r9 = ctx_r7.$implicit; const control_r10 = ctx_r7.control; const formgroup_r11 = ctx_r7.formGroup; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.updateSelectedValueForSingleSelect(field_r9, control_r10, formgroup_r11, item_r25)); });
|
|
463
455
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_img_1_Template, 1, 1, "img", 42);
|
|
464
456
|
i0.ɵɵelementStart(2, "p", 29);
|
|
465
457
|
i0.ɵɵtext(3);
|
|
466
458
|
i0.ɵɵelementEnd()();
|
|
467
459
|
} if (rf & 2) {
|
|
468
|
-
const
|
|
460
|
+
const item_r25 = ctx.$implicit;
|
|
469
461
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
470
462
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
471
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c15,
|
|
463
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c15, item_r25.label === (control_r10.value == null ? null : control_r10.value.label)));
|
|
472
464
|
i0.ɵɵadvance();
|
|
473
|
-
i0.ɵɵproperty("ngIf",
|
|
465
|
+
i0.ɵɵproperty("ngIf", item_r25.label === (control_r10.value == null ? null : control_r10.value.label) && ctx_r5.activeBtnIconUrl());
|
|
474
466
|
i0.ɵɵadvance(2);
|
|
475
|
-
i0.ɵɵtextInterpolate(
|
|
467
|
+
i0.ɵɵtextInterpolate(item_r25.label);
|
|
476
468
|
} }
|
|
477
469
|
function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_ng_container_7_Template(rf, ctx) { if (rf & 1) {
|
|
478
470
|
i0.ɵɵelementContainer(0, 15);
|
|
479
471
|
} if (rf & 2) {
|
|
480
472
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
481
473
|
i0.ɵɵnextContext();
|
|
482
|
-
const
|
|
483
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
474
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
475
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
484
476
|
} }
|
|
485
477
|
function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
486
478
|
i0.ɵɵelementStart(0, "div", 21)(1, "p", 22);
|
|
@@ -514,10 +506,10 @@ function DynamicFormComponent_ng_template_3_ng_container_5_Template(rf, ctx) { i
|
|
|
514
506
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_5_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_Template, 8, 7, "ng-template", null, 8, i0.ɵɵtemplateRefExtractor);
|
|
515
507
|
i0.ɵɵelementContainerEnd();
|
|
516
508
|
} if (rf & 2) {
|
|
517
|
-
const
|
|
509
|
+
const defaultSingleSelectRadio_r26 = i0.ɵɵreference(3);
|
|
518
510
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
519
511
|
i0.ɵɵadvance();
|
|
520
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customSingleSelectRadio)("ngIfElse",
|
|
512
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customSingleSelectRadio)("ngIfElse", defaultSingleSelectRadio_r26);
|
|
521
513
|
} }
|
|
522
514
|
function DynamicFormComponent_ng_template_3_ng_container_6_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
523
515
|
function DynamicFormComponent_ng_template_3_ng_container_6_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -545,30 +537,30 @@ function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_i
|
|
|
545
537
|
i0.ɵɵproperty("src", ctx_r5.activeBtnIconUrl(), i0.ɵɵsanitizeUrl);
|
|
546
538
|
} }
|
|
547
539
|
function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
548
|
-
const
|
|
540
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
549
541
|
i0.ɵɵelementStart(0, "div", 41);
|
|
550
|
-
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_Template_div_click_0_listener() { const
|
|
542
|
+
i0.ɵɵlistener("click", function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_Template_div_click_0_listener() { const item_r28 = i0.ɵɵrestoreView(_r27).$implicit; const ctx_r7 = i0.ɵɵnextContext(3); const field_r9 = ctx_r7.$implicit; const control_r10 = ctx_r7.control; const formgroup_r11 = ctx_r7.formGroup; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.updateSelectedValueForMultiSelect(field_r9, control_r10, formgroup_r11, [item_r28])); });
|
|
551
543
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_img_1_Template, 1, 1, "img", 42);
|
|
552
544
|
i0.ɵɵelementStart(2, "p", 29);
|
|
553
545
|
i0.ɵɵtext(3);
|
|
554
546
|
i0.ɵɵelementEnd()();
|
|
555
547
|
} if (rf & 2) {
|
|
556
|
-
const
|
|
548
|
+
const item_r28 = ctx.$implicit;
|
|
557
549
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
558
550
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
559
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c15, ctx_r5.isCheckBoxSelected(
|
|
551
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c15, ctx_r5.isCheckBoxSelected(item_r28.label, control_r10.value)));
|
|
560
552
|
i0.ɵɵadvance();
|
|
561
|
-
i0.ɵɵproperty("ngIf", ctx_r5.isCheckBoxSelected(
|
|
553
|
+
i0.ɵɵproperty("ngIf", ctx_r5.isCheckBoxSelected(item_r28.label, control_r10.value) && ctx_r5.activeBtnIconUrl());
|
|
562
554
|
i0.ɵɵadvance(2);
|
|
563
|
-
i0.ɵɵtextInterpolate(
|
|
555
|
+
i0.ɵɵtextInterpolate(item_r28.label);
|
|
564
556
|
} }
|
|
565
557
|
function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_ng_container_7_Template(rf, ctx) { if (rf & 1) {
|
|
566
558
|
i0.ɵɵelementContainer(0, 15);
|
|
567
559
|
} if (rf & 2) {
|
|
568
560
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
569
561
|
i0.ɵɵnextContext();
|
|
570
|
-
const
|
|
571
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
562
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
563
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
572
564
|
} }
|
|
573
565
|
function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
574
566
|
i0.ɵɵelementStart(0, "div", 21)(1, "p", 22);
|
|
@@ -602,10 +594,10 @@ function DynamicFormComponent_ng_template_3_ng_container_6_Template(rf, ctx) { i
|
|
|
602
594
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_6_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_Template, 8, 7, "ng-template", null, 9, i0.ɵɵtemplateRefExtractor);
|
|
603
595
|
i0.ɵɵelementContainerEnd();
|
|
604
596
|
} if (rf & 2) {
|
|
605
|
-
const
|
|
597
|
+
const defaultMultiSelectCheckbox_r29 = i0.ɵɵreference(3);
|
|
606
598
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
607
599
|
i0.ɵɵadvance();
|
|
608
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customMultiSelectCheckbox)("ngIfElse",
|
|
600
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customMultiSelectCheckbox)("ngIfElse", defaultMultiSelectCheckbox_r29);
|
|
609
601
|
} }
|
|
610
602
|
function DynamicFormComponent_ng_template_3_ng_container_7_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
611
603
|
function DynamicFormComponent_ng_template_3_ng_container_7_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -631,17 +623,17 @@ function DynamicFormComponent_ng_template_3_ng_container_7_ng_template_2_ng_cont
|
|
|
631
623
|
} if (rf & 2) {
|
|
632
624
|
const control_r10 = i0.ɵɵnextContext(3).control;
|
|
633
625
|
i0.ɵɵnextContext();
|
|
634
|
-
const
|
|
635
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
626
|
+
const dynamicFieldErrors_r12 = i0.ɵɵreference(6);
|
|
627
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicFieldErrors_r12)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c13, control_r10.errors));
|
|
636
628
|
} }
|
|
637
629
|
function DynamicFormComponent_ng_template_3_ng_container_7_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
638
|
-
const
|
|
630
|
+
const _r30 = i0.ɵɵgetCurrentView();
|
|
639
631
|
i0.ɵɵelementStart(0, "div", 28)(1, "p", 29);
|
|
640
632
|
i0.ɵɵtext(2);
|
|
641
633
|
i0.ɵɵtemplate(3, DynamicFormComponent_ng_template_3_ng_container_7_ng_template_2_span_3_Template, 2, 0, "span", 19);
|
|
642
634
|
i0.ɵɵelementEnd();
|
|
643
635
|
i0.ɵɵelementStart(4, "mis-multi-select-dropdown", 44);
|
|
644
|
-
i0.ɵɵlistener("onChange", function DynamicFormComponent_ng_template_3_ng_container_7_ng_template_2_Template_mis_multi_select_dropdown_onChange_4_listener($event) { i0.ɵɵrestoreView(
|
|
636
|
+
i0.ɵɵlistener("onChange", function DynamicFormComponent_ng_template_3_ng_container_7_ng_template_2_Template_mis_multi_select_dropdown_onChange_4_listener($event) { i0.ɵɵrestoreView(_r30); const ctx_r7 = i0.ɵɵnextContext(2); const field_r9 = ctx_r7.$implicit; const control_r10 = ctx_r7.control; const formgroup_r11 = ctx_r7.formGroup; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.updateSelectedValueForMultiSelect(field_r9, control_r10, formgroup_r11, $event)); });
|
|
645
637
|
i0.ɵɵelementEnd();
|
|
646
638
|
i0.ɵɵtemplate(5, DynamicFormComponent_ng_template_3_ng_container_7_ng_template_2_ng_container_5_Template, 1, 4, "ng-container", 25);
|
|
647
639
|
i0.ɵɵelementEnd();
|
|
@@ -666,10 +658,10 @@ function DynamicFormComponent_ng_template_3_ng_container_7_Template(rf, ctx) { i
|
|
|
666
658
|
i0.ɵɵtemplate(1, DynamicFormComponent_ng_template_3_ng_container_7_ng_container_1_Template, 2, 6, "ng-container", 20)(2, DynamicFormComponent_ng_template_3_ng_container_7_ng_template_2_Template, 6, 13, "ng-template", null, 10, i0.ɵɵtemplateRefExtractor);
|
|
667
659
|
i0.ɵɵelementContainerEnd();
|
|
668
660
|
} if (rf & 2) {
|
|
669
|
-
const
|
|
661
|
+
const defaultMultiSelectDropdown_r31 = i0.ɵɵreference(3);
|
|
670
662
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
671
663
|
i0.ɵɵadvance();
|
|
672
|
-
i0.ɵɵproperty("ngIf", ctx_r5.customMultiSelectDropdown)("ngIfElse",
|
|
664
|
+
i0.ɵɵproperty("ngIf", ctx_r5.customMultiSelectDropdown)("ngIfElse", defaultMultiSelectDropdown_r31);
|
|
673
665
|
} }
|
|
674
666
|
function DynamicFormComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
675
667
|
i0.ɵɵtemplate(0, DynamicFormComponent_ng_template_3_ng_container_0_Template, 4, 2, "ng-container", 19)(1, DynamicFormComponent_ng_template_3_ng_container_1_Template, 4, 2, "ng-container", 19)(2, DynamicFormComponent_ng_template_3_ng_container_2_Template, 4, 2, "ng-container", 19)(3, DynamicFormComponent_ng_template_3_ng_container_3_Template, 4, 2, "ng-container", 19)(4, DynamicFormComponent_ng_template_3_ng_container_4_Template, 4, 2, "ng-container", 19)(5, DynamicFormComponent_ng_template_3_ng_container_5_Template, 4, 2, "ng-container", 19)(6, DynamicFormComponent_ng_template_3_ng_container_6_Template, 4, 2, "ng-container", 19)(7, DynamicFormComponent_ng_template_3_ng_container_7_Template, 4, 2, "ng-container", 19);
|
|
@@ -699,9 +691,9 @@ function DynamicFormComponent_ng_template_5_ng_container_1_Template(rf, ctx) { i
|
|
|
699
691
|
i0.ɵɵelement(3, "div", 47);
|
|
700
692
|
i0.ɵɵelementContainerEnd();
|
|
701
693
|
} if (rf & 2) {
|
|
702
|
-
const
|
|
694
|
+
const error_r32 = ctx.$implicit;
|
|
703
695
|
i0.ɵɵadvance(2);
|
|
704
|
-
i0.ɵɵtextInterpolate1(" ", " \u2022 \u00A0" +
|
|
696
|
+
i0.ɵɵtextInterpolate1(" ", " \u2022 \u00A0" + error_r32.value, " ");
|
|
705
697
|
i0.ɵɵadvance();
|
|
706
698
|
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(2, _c16));
|
|
707
699
|
} }
|
|
@@ -711,9 +703,9 @@ function DynamicFormComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
711
703
|
i0.ɵɵpipe(2, "keyvalue");
|
|
712
704
|
i0.ɵɵelementEnd();
|
|
713
705
|
} if (rf & 2) {
|
|
714
|
-
const
|
|
706
|
+
const errors_r33 = ctx.$implicit;
|
|
715
707
|
i0.ɵɵadvance();
|
|
716
|
-
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(2, 1,
|
|
708
|
+
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(2, 1, errors_r33));
|
|
717
709
|
} }
|
|
718
710
|
dayjs.extend(timezone);
|
|
719
711
|
dayjs.extend(customParseFormat);
|
|
@@ -755,24 +747,50 @@ class DynamicFormComponent {
|
|
|
755
747
|
this.dynamicFormSignal = signal(null);
|
|
756
748
|
this.dynamicFormAPISignal = signal(null);
|
|
757
749
|
this.valueChangesSubscriptionSignal = signal(null);
|
|
750
|
+
this.previousFormFields = null;
|
|
751
|
+
this.isInternalUpdate = false; // Flag to prevent regeneration during internal updates
|
|
758
752
|
// Computed properties for template access
|
|
759
753
|
this.dynamicForm = computed(() => this.dynamicFormSignal());
|
|
760
754
|
this.dynamicFormAPI = computed(() => this.dynamicFormAPISignal());
|
|
761
755
|
this.valueChangesSubscription$ = computed(() => this.valueChangesSubscriptionSignal());
|
|
762
|
-
|
|
756
|
+
/**
|
|
757
|
+
* Handles subfield updates when parent field values change
|
|
758
|
+
* This is called from the form valueChanges subscription
|
|
759
|
+
* Uses a debounce mechanism to prevent excessive updates
|
|
760
|
+
*/
|
|
761
|
+
this.subFieldUpdateTimeout = null;
|
|
762
|
+
this.previousFieldValues = new Map();
|
|
763
|
+
// Watch for changes in formFields (structure changes) - regenerate form
|
|
763
764
|
effect(() => {
|
|
764
765
|
const formFields = this.formFields();
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
766
|
+
// Check if formFields structure actually changed
|
|
767
|
+
const fieldsChanged = !this.previousFormFields ||
|
|
768
|
+
this.previousFormFields.length !== formFields.length ||
|
|
769
|
+
JSON.stringify(this.previousFormFields) !== JSON.stringify(formFields);
|
|
770
|
+
if (formFields && fieldsChanged) {
|
|
771
|
+
this.previousFormFields = JSON.parse(JSON.stringify(formFields)); // Deep copy
|
|
772
|
+
const formValues = this.formValues();
|
|
768
773
|
// Use untracked to prevent infinite loops when setting signals
|
|
769
774
|
untracked(() => {
|
|
770
775
|
const form = this.generateDynamicForm(formFields, formValues);
|
|
771
776
|
this.dynamicFormSignal.set(form);
|
|
777
|
+
// Initialize previous field values map
|
|
778
|
+
this.previousFieldValues.clear();
|
|
779
|
+
const formArray = form.get('dynamicFields');
|
|
780
|
+
if (formArray) {
|
|
781
|
+
formArray.controls.forEach((fieldGroup, index) => {
|
|
782
|
+
const control = fieldGroup.get('value');
|
|
783
|
+
if (control) {
|
|
784
|
+
this.previousFieldValues.set(index, JSON.parse(JSON.stringify(control.value)));
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
}
|
|
772
788
|
// Re-subscribe to form changes
|
|
773
789
|
this.valueChangesSubscriptionSignal()?.unsubscribe();
|
|
774
790
|
this.valueChangesSubscriptionSignal.set(form.valueChanges.subscribe(formValue => {
|
|
775
791
|
this.onFormValueChanges();
|
|
792
|
+
// Handle subfield updates when parent field values change
|
|
793
|
+
this.handleSubFieldUpdates(form);
|
|
776
794
|
}));
|
|
777
795
|
// Emit form validity status
|
|
778
796
|
this.formValid.emit(form.valid);
|
|
@@ -785,6 +803,47 @@ class DynamicFormComponent {
|
|
|
785
803
|
});
|
|
786
804
|
}
|
|
787
805
|
});
|
|
806
|
+
// Watch for changes in formValues (data changes) - patch existing form values
|
|
807
|
+
effect(() => {
|
|
808
|
+
const formValues = this.formValues();
|
|
809
|
+
const currentForm = this.dynamicFormSignal();
|
|
810
|
+
// Only patch if form exists and this is not an internal update
|
|
811
|
+
if (currentForm && !this.isInternalUpdate && formValues) {
|
|
812
|
+
untracked(() => {
|
|
813
|
+
this.patchFormValues(currentForm, formValues);
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Patches form values without regenerating the form structure
|
|
820
|
+
* This prevents focus loss when only values change
|
|
821
|
+
*/
|
|
822
|
+
patchFormValues(form, formValues) {
|
|
823
|
+
const formArray = form.get('dynamicFields');
|
|
824
|
+
if (!formArray)
|
|
825
|
+
return;
|
|
826
|
+
const fields = this.formFields();
|
|
827
|
+
formArray.controls.forEach((fieldGroup, index) => {
|
|
828
|
+
const field = fields[index];
|
|
829
|
+
if (!field)
|
|
830
|
+
return;
|
|
831
|
+
const fieldValue = formValues[field.configName];
|
|
832
|
+
if (fieldValue !== undefined) {
|
|
833
|
+
const control = fieldGroup.get('value');
|
|
834
|
+
if (control) {
|
|
835
|
+
const mappedValue = this.mapFormValueToFormField(field, fieldValue).value;
|
|
836
|
+
// Only update if value actually changed to prevent unnecessary updates
|
|
837
|
+
if (JSON.stringify(control.value) !== JSON.stringify(mappedValue)) {
|
|
838
|
+
control.setValue(mappedValue, { emitEvent: false });
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
// Handle subFields if they exist
|
|
842
|
+
if (fieldValue?.subFields && field.subFields?.length > 0) {
|
|
843
|
+
this.updateSubDynamicFields(field, fieldGroup, control?.value);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
});
|
|
788
847
|
}
|
|
789
848
|
ngOnInit() {
|
|
790
849
|
// Building the form with proper null checks
|
|
@@ -805,8 +864,21 @@ class DynamicFormComponent {
|
|
|
805
864
|
// Subscribing to form changes and emiting values.
|
|
806
865
|
const currentForm = this.dynamicFormSignal();
|
|
807
866
|
if (currentForm) {
|
|
867
|
+
// Initialize previous field values map
|
|
868
|
+
this.previousFieldValues.clear();
|
|
869
|
+
const formArray = currentForm.get('dynamicFields');
|
|
870
|
+
if (formArray) {
|
|
871
|
+
formArray.controls.forEach((fieldGroup, index) => {
|
|
872
|
+
const control = fieldGroup.get('value');
|
|
873
|
+
if (control) {
|
|
874
|
+
this.previousFieldValues.set(index, JSON.parse(JSON.stringify(control.value)));
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
}
|
|
808
878
|
this.valueChangesSubscriptionSignal.set(currentForm.valueChanges.subscribe(formValue => {
|
|
809
879
|
this.onFormValueChanges();
|
|
880
|
+
// Handle subfield updates when parent field values change
|
|
881
|
+
this.handleSubFieldUpdates(currentForm);
|
|
810
882
|
}));
|
|
811
883
|
}
|
|
812
884
|
//api to expose functions
|
|
@@ -820,12 +892,21 @@ class DynamicFormComponent {
|
|
|
820
892
|
}
|
|
821
893
|
ngOnDestroy() {
|
|
822
894
|
this.valueChangesSubscription$()?.unsubscribe();
|
|
895
|
+
if (this.subFieldUpdateTimeout) {
|
|
896
|
+
clearTimeout(this.subFieldUpdateTimeout);
|
|
897
|
+
}
|
|
823
898
|
}
|
|
824
899
|
onFormValueChanges() {
|
|
900
|
+
// Set flag to prevent formValues effect from triggering during internal updates
|
|
901
|
+
this.isInternalUpdate = true;
|
|
825
902
|
let formValues = this.generateDynamicFieldsValueObject(this.dynamicForm().value.dynamicFields);
|
|
826
903
|
this.formValid.emit(this.dynamicForm().valid);
|
|
827
904
|
this.formUpdated.emit(formValues);
|
|
828
905
|
console.log(formValues);
|
|
906
|
+
// Reset flag after a microtask to allow external updates
|
|
907
|
+
Promise.resolve().then(() => {
|
|
908
|
+
this.isInternalUpdate = false;
|
|
909
|
+
});
|
|
829
910
|
}
|
|
830
911
|
generateDynamicFieldsValueObject(formValues) {
|
|
831
912
|
let dynamicFieldsValue = {};
|
|
@@ -874,11 +955,45 @@ class DynamicFormComponent {
|
|
|
874
955
|
getDynamicFieldsControls() {
|
|
875
956
|
return this.dynamicForm().get("dynamicFields");
|
|
876
957
|
}
|
|
958
|
+
handleSubFieldUpdates(form) {
|
|
959
|
+
// Clear any pending updates
|
|
960
|
+
if (this.subFieldUpdateTimeout) {
|
|
961
|
+
clearTimeout(this.subFieldUpdateTimeout);
|
|
962
|
+
}
|
|
963
|
+
// Debounce subfield updates to prevent excessive calls
|
|
964
|
+
this.subFieldUpdateTimeout = setTimeout(() => {
|
|
965
|
+
const formArray = form.get('dynamicFields');
|
|
966
|
+
if (!formArray)
|
|
967
|
+
return;
|
|
968
|
+
const fields = this.formFields();
|
|
969
|
+
formArray.controls.forEach((fieldGroup, index) => {
|
|
970
|
+
const field = fields[index];
|
|
971
|
+
if (!field || !field.subFields?.length)
|
|
972
|
+
return;
|
|
973
|
+
const control = fieldGroup.get('value');
|
|
974
|
+
if (control) {
|
|
975
|
+
const currentValue = control.value;
|
|
976
|
+
const previousValue = this.previousFieldValues.get(index);
|
|
977
|
+
// Only update subfields if parent field value actually changed
|
|
978
|
+
if (JSON.stringify(currentValue) !== JSON.stringify(previousValue)) {
|
|
979
|
+
this.previousFieldValues.set(index, JSON.parse(JSON.stringify(currentValue)));
|
|
980
|
+
this.updateSubDynamicFields(field, fieldGroup, currentValue);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
}, 100); // Small debounce to batch updates
|
|
985
|
+
}
|
|
877
986
|
updateSubDynamicFields(field, formGroup, value) {
|
|
878
987
|
if (field.subFields?.length > 0) {
|
|
879
|
-
|
|
988
|
+
// Set flag to prevent form regeneration during subfield updates
|
|
989
|
+
this.isInternalUpdate = true;
|
|
990
|
+
let subFieldsControls = this.generateSubDynamicFields(this.formValues(), field, value);
|
|
880
991
|
formGroup.removeControl('subFields');
|
|
881
992
|
formGroup.addControl('subFields', subFieldsControls);
|
|
993
|
+
// Reset flag after update
|
|
994
|
+
Promise.resolve().then(() => {
|
|
995
|
+
this.isInternalUpdate = false;
|
|
996
|
+
});
|
|
882
997
|
}
|
|
883
998
|
}
|
|
884
999
|
updateSelectedValueForSingleSelect(field, control, formGroup, value) {
|
|
@@ -1049,7 +1164,7 @@ class DynamicFormComponent {
|
|
|
1049
1164
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customSingleSelectRadio = _t.first);
|
|
1050
1165
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customMultiSelectCheckbox = _t.first);
|
|
1051
1166
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customMultiSelectDropdown = _t.first);
|
|
1052
|
-
} }, inputs: { formFields: [1, "formFields"], formValues: [1, "formValues"], activeBtnIconUrl: [1, "activeBtnIconUrl"], calendarIconUrl: [1, "calendarIconUrl"], removeIconUrl: [1, "removeIconUrl"], removeSepratorForSubFields: [1, "removeSepratorForSubFields"] }, outputs: { formUpdated: "formUpdated", formValid: "formValid", formInitialized: "formInitialized", fieldRemoved: "fieldRemoved" }, decls: 7, vars: 2, consts: [["dynamicField", ""], ["dynamicFieldErrors", ""], ["defaultInputTextNumber", ""], ["defaultInputTextarea", ""], ["defaultInputDate", ""], ["dp", ""], ["defaultBooleanToggle", ""], ["defaultSingleSelectDropdown", ""], ["defaultSingleSelectRadio", ""], ["defaultMultiSelectCheckbox", ""], ["defaultMultiSelectDropdown", ""], [3, "formGroup"], ["formArrayName", "dynamicFields"], [3, "formGroupName", 4, "ngFor", "ngForOf"], [3, "formGroupName"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["class", "sub-dynamic-form", 4, "ngIf"], [1, "sub-dynamic-form"], [4, "ngFor", "ngForOf"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], [1, "dynamic-field", "multi-line-field-container", 3, "ngStyle"], [1, "h7", "field-title-sm"], [2, "flex-basis", "100%"], [1, "input-field", "ip-text", 3, "
|
|
1167
|
+
} }, inputs: { formFields: [1, "formFields"], formValues: [1, "formValues"], activeBtnIconUrl: [1, "activeBtnIconUrl"], calendarIconUrl: [1, "calendarIconUrl"], removeIconUrl: [1, "removeIconUrl"], removeSepratorForSubFields: [1, "removeSepratorForSubFields"] }, outputs: { formUpdated: "formUpdated", formValid: "formValid", formInitialized: "formInitialized", fieldRemoved: "fieldRemoved" }, decls: 7, vars: 2, consts: [["dynamicField", ""], ["dynamicFieldErrors", ""], ["defaultInputTextNumber", ""], ["defaultInputTextarea", ""], ["defaultInputDate", ""], ["dp", ""], ["defaultBooleanToggle", ""], ["defaultSingleSelectDropdown", ""], ["defaultSingleSelectRadio", ""], ["defaultMultiSelectCheckbox", ""], ["defaultMultiSelectDropdown", ""], [3, "formGroup"], ["formArrayName", "dynamicFields"], [3, "formGroupName", 4, "ngFor", "ngForOf"], [3, "formGroupName"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["class", "sub-dynamic-form", 4, "ngIf"], [1, "sub-dynamic-form"], [4, "ngFor", "ngForOf"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], [1, "dynamic-field", "multi-line-field-container", 3, "ngStyle"], [1, "h7", "field-title-sm"], [2, "flex-basis", "100%"], [1, "input-field", "ip-text", 3, "type", "formControl", "ngStyle", "placeholder", "min"], [3, "ngTemplateOutlet", "ngTemplateOutletContext", 4, "ngIf"], ["type", "text", 1, "input-field", "ip-textarea", 3, "ngStyle", "placeholder", "formControl"], ["class", "dynamic-field single-line-field-container", 3, "ngStyle", 4, "ngIf"], [1, "dynamic-field", "single-line-field-container", 3, "ngStyle"], [1, "h6"], [1, "date-picker-container"], ["readonly", "", "misTzDp", "", 1, "date-picker", 3, "dateChange", "dpConfig", "selectedDate", "offsetY", "value"], ["alt", "data-picker", "class", "date-picker-icon", 3, "src", "click", 4, "ngIf"], ["alt", "data-picker", 1, "date-picker-icon", 3, "click", "src"], [3, "valueChanged", "control"], [3, "ngClass"], [3, "onChange", "searchEnabled", "width", "data", "selectedItem"], ["class", "remove-icon", 3, "src", "click", 4, "ngIf"], [1, "remove-icon", 3, "click", "src"], ["id", "checkboxes-container"], ["class", "radio-checkbox-common", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "radio-checkbox-common", 3, "click", "ngClass"], ["alt", "", 3, "src", 4, "ngIf"], ["alt", "", 3, "src"], [3, "onChange", "width", "showSelectedCount", "dropdownListWidth", "searchEnabled", "hideApplyButton", "data", "selectedItems"], ["id", "error-messages-container"], [1, "h8"], [3, "ngStyle"]], template: function DynamicFormComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1053
1168
|
i0.ɵɵelementStart(0, "form", 11);
|
|
1054
1169
|
i0.ɵɵelementContainerStart(1, 12);
|
|
1055
1170
|
i0.ɵɵtemplate(2, DynamicFormComponent_ng_container_2_Template, 3, 8, "ng-container", 13);
|
|
@@ -1064,7 +1179,7 @@ class DynamicFormComponent {
|
|
|
1064
1179
|
}
|
|
1065
1180
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DynamicFormComponent, [{
|
|
1066
1181
|
type: Component,
|
|
1067
|
-
args: [{ selector: "mis-dynamic-form", template: "<form [formGroup]=\"dynamicForm()\">\n <ng-container formArrayName=\"dynamicFields\">\n <ng-container [formGroupName]=\"i\" *ngFor=\"let fieldControl of getDynamicFieldsControls().controls; let i = index\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: formFieldsArray?.[i],\n formGroup: fieldControl,\n control: fieldControl.controls.value\n }\"\n >\n </ng-container>\n <div class=\"sub-dynamic-form\" *ngIf=\"fieldControl?.value && (!!formFieldsArray?.[i]?.subFields && formFieldsArray?.[i]?.subFields?.length > 0 && matchParentConfig(formFieldsArray?.[i]?.subFields, fieldControl?.controls?.value?.value?.value))\">\n <ng-container *ngFor=\"let subFieldControl of fieldControl.controls.subFields.controls; let j = index\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: findSelectedSubFieldConfig(formFieldsArray?.[i]?.subFields, fieldControl.controls.value.value.value,j),\n control: subFieldControl\n }\">\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n</form>\n\n\n<ng-template #dynamicField let-field let-control=\"control\" let-formgroup=\"formGroup\">\n\n <!-- fieldType: 'input' fieldInputType: 'text' | 'number' -->\n <ng-container *ngIf=\"field.fieldType === 'input' && (field.fieldInputType === 'text' || field.fieldInputType === 'number')\">\n <ng-container *ngIf=\"customInputTextNumber; else defaultInputTextNumber\">\n <ng-template\n [ngTemplateOutlet]=\"customInputTextNumber\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultInputTextNumber>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field?.title }} <span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <input class=\"input-field ip-text\" [type]=\"field.fieldInputType\" [formControl]=\"control\"\n (ngModelChange)=\"updateSubDynamicFields(field, formgroup, $event)\" \n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" \n [min]=\"field.fieldInputType === 'number' ? 0 : '' \"/>\n <ng-container *ngIf=\"control.touched && control.errors\"\n [ngTemplateOutlet]=\"dynamicFieldErrors\" \n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\"\n >\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n \n <!-- fieldType: 'input' fieldInputType: 'textarea' -->\n <ng-container *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'textarea'\">\n <ng-container *ngIf=\"customInputTextarea; else defaultInputTextarea\">\n <ng-template\n [ngTemplateOutlet]=\"customInputTextarea\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultInputTextarea>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <textarea class=\"input-field ip-textarea\" type=\"text\"\n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" [formControl]=\"control\" (ngModelChange)=\"updateSubDynamicFields(field, formgroup, $event)\"></textarea>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n \n <!-- fieldType: 'input' fieldInputType: 'date' -->\n <ng-container *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'date'\">\n <ng-container *ngIf=\"customInputDate; else defaultInputDate\">\n <ng-template\n [ngTemplateOutlet]=\"customInputDate\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultInputDate>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\"\n *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'date'\">\n <p class=\"h6\">\n {{ field.title }} <span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div class=\"date-picker-container\">\n <input class=\"date-picker\" readonly misTzDp [dpConfig]=\"field.fieldConfig\"\n (dateChange)=\"control.setValue($event)\" [selectedDate]=\"control.value\" [offsetY]=\"0\"\n [value]=\"control.value\" #dp />\n <img alt=\"data-picker\" *ngIf=\"calendarIconUrl()\" class=\"date-picker-icon\" [src]=\"calendarIconUrl()\"\n (click)=\"dp.click()\" />\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- fieldType: 'boolean' fieldInputType: 'toggle' -->\n <ng-container *ngIf=\"field.fieldType === 'boolean' && field.fieldInputType === 'toggle'\">\n <ng-container *ngIf=\"customBooleanToggle; else defaultBooleanToggle\">\n <ng-template\n [ngTemplateOutlet]=\"customBooleanToggle\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultBooleanToggle>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h6\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <mis-switch [control]=\"control\" (valueChanged)=\"updateSubDynamicFields(field, formgroup, $event)\"></mis-switch>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div> \n </ng-template>\n </ng-container>\n\n <!-- fieldType: 'singleSelect' fieldInputType: 'dropdown' -->\n <ng-container *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'dropdown'\">\n <ng-container *ngIf=\"customSingleSelectDropdown; else defaultSingleSelectDropdown\">\n <ng-template\n [ngTemplateOutlet]=\"customSingleSelectDropdown\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultSingleSelectDropdown>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h6\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div [ngClass]=\"{'removeable-container' : field?.isRemoveable}\">\n <mis-dropdown [searchEnabled]=\"false\" [width]=\"'140px'\" [data]=\"field.itemsList\" [selectedItem]=\"control.value\"\n (onChange)=\"updateSelectedValueForSingleSelect(field, control, formgroup, $event);\">\n </mis-dropdown>\n <img *ngIf=\"field.isRemoveable && removeIconUrl()\" class=\"remove-icon\" [src]=\"removeIconUrl()\" (click)=\"fieldRemoved.emit(field)\">\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container >\n \n\n <!-- fieldType: 'singleSelect' fieldInputType: 'radio' -->\n <ng-container *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'radio'\">\n <ng-container *ngIf=\"customSingleSelectRadio; else defaultSingleSelectRadio\">\n <ng-template\n [ngTemplateOutlet]=\"customSingleSelectRadio\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultSingleSelectRadio>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': item.label === control.value?.label }\"\n (click)=\"updateSelectedValueForSingleSelect(field, control, formgroup, item);\">\n <img *ngIf=\"(item.label === control.value?.label) && activeBtnIconUrl()\" [src]=\"activeBtnIconUrl()\" alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n \n\n <!-- fieldType: 'multiSelect' fieldInputType: 'checkbox' -->\n <ng-container *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'checkbox'\">\n <ng-container *ngIf=\"customMultiSelectCheckbox; else defaultMultiSelectCheckbox\">\n <ng-template\n [ngTemplateOutlet]=\"customMultiSelectCheckbox\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultMultiSelectCheckbox>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': isCheckBoxSelected(item.label, control.value) }\"\n (click)=\"updateSelectedValueForMultiSelect(field, control, formgroup, [item])\">\n <img *ngIf=\"isCheckBoxSelected(item.label, control.value) && activeBtnIconUrl()\" [src]=\"activeBtnIconUrl()\"\n alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n\n <!-- fieldType: 'multiSelect' fieldInputType: 'dropdown' -->\n <ng-container *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'dropdown'\">\n <ng-container *ngIf=\"customMultiSelectDropdown; else defaultMultiSelectDropdown\">\n <ng-template\n [ngTemplateOutlet]=\"customMultiSelectDropdown\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultMultiSelectDropdown>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h6\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <mis-multi-select-dropdown [width]=\"'140px'\" [showSelectedCount]=\"true\" [dropdownListWidth]=\"'256px'\"\n [searchEnabled]=\"false\" [hideApplyButton]=\"true\" [data]=\"field.itemsList\"\n [selectedItems]=\"control.value\" (onChange)=\"updateSelectedValueForMultiSelect(field, control, formgroup, $event);\"></mis-multi-select-dropdown>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n</ng-template>\n\n<ng-template #dynamicFieldErrors let-errors>\n <div id=\"error-messages-container\">\n <ng-container *ngFor=\"let error of errors | keyvalue\">\n <p class=\"h8\">\n {{\" \u2022 \" + error.value}}\n </p>\n <div [ngStyle]=\"{ 'flex-basis': '100%', 'height': '0' }\"></div>\n </ng-container>\n </div>\n</ng-template>", styles: [":root{--pmry-200: #99BAF7;--pmry-100: #CBDDFB;--pmry-500: #0937B2;--pmry-400: #3C68D0;--pmry-600: #062A99;--pmry-700: #041F80;--pmry-300: #638FE7;--pmry-800: #021567;--pmry-900: #010F55;--sec-d-purple: #40447F;--sec-maroon: #6B034E;--sec-mud-red: #B23600;--sec-orange: #ED711C;--sec-purple: #815FD5;--sec-teal: #10ADAE;--sec-yellow: #D4900C;--sec-green: #547F40;--sec-bright-green: #27D22E;--sec-dark-teal: #035F6B;--sec-chocolate: #7C2F33;--sec-rube-pink: #C13D6D;--sec-cerulean: #0087B2;--sem-error: #B00020;--sem-info: #0091FF;--sem-warning: #FF9D00;--sem-success: #38AF49;--grey-bg-1: #FAFAFA;--grey-bg: #F5F5F5;--grey-seperators: #E0E0E0;--grey-disabled: #C8CDD3;--grey-hover: #F5F7FC;--grey-pressed: #E6EBF7;--grey-row: #F5F7FC;--dec-light-yellow: #F4E7C3;--dec-light-purple: #DACFF9;--dec-light-green: #E4F5E9;--dec-light-green2: #F1FFF3;--dec-light-pink: #FAE1EA;--dec-: #F4CBC1;--dec-lt-orange: #FAEFED;--dec-light-blue: #CFECF9;--dec-row-selection: #F1FDF8;--dec-row-selection2: #F2FBFF;--dec-row-lines: #D3E1E9;--text-white: #FFFFFF;--text-muted: #6A737D;--text-black: #181F33;--MR-solid-blue2:#C8D5F6;--MR-solid-purple:#C9C3FB;--MR-solid-orange:#EEAC9F;--MR-solid-green:#ACDADA;--MR-solid-brown:#E8C8AF;--MR-solid-yellow:#FFEFC7;--MR-solid-blue:#BBE6FF;--MR-solid-pink:#FFC6F2;--tr-hover:#F0F3FA;--tr-pressed:#DAE1F3;--brand-primary: #0937B2;--brand-primary-light: #3C68D0;--brand-primary-dark: #062A99;--brand-primary-darker: #041F80;--brand-primary-lighter: #638FE7;--brand-primary-lightest: #CBDDFB;--brand-primary-hover: #F0F3FA;--brand-primary-active: #DAE1F3;--brand-secondary: #ED711C;--brand-secondary-light: #F09E65;--brand-secondary-dark: #B23600;--brand-secondary-lighter: #FFC6F2;--brand-accent: #10ADAE;--brand-accent-light: #16CBBC;--brand-accent-dark: #035F6B;--brand-accent-lighter: #ACDADA;--brand-success: #38AF49;--brand-success-light: #4CAF50;--brand-success-dark: #216531;--brand-success-lighter: #E4F5E9;--brand-success-lightest: #F1FFF3;--brand-error: #B00020;--brand-error-light: #F04E4E;--brand-error-dark: #A60060;--brand-error-lighter: #FAE1EA;--brand-error-lightest: #FDF2F2;--brand-warning: #FF9D00;--brand-warning-light: #D4900C;--brand-warning-dark: #624000;--brand-warning-lighter: #F4E7C3;--brand-warning-lightest: #FAEFED;--brand-info: #0091FF;--brand-info-light: #35A1FF;--brand-info-dark: #0087B2;--brand-info-lighter: #CFECF9;--text-primary: #181F33;--text-secondary: #6A737D;--text-tertiary: #929DAB;--text-disabled: #929DAB;--text-primary-87: rgba(24, 31, 51, .87);--text-primary-60: rgba(24, 31, 51, .6);--text-primary-38: rgba(24, 31, 51, .38);--text-primary-12: rgba(24, 31, 51, .12);--bg-primary: #FFFFFF;--bg-secondary: #FAFAFA;--bg-tertiary: #F5F5F5;--bg-overlay: rgba(0, 0, 0, .32);--bg-overlay-light: rgba(0, 0, 0, .12);--bg-overlay-lighter: rgba(0, 0, 0, .08);--bg-overlay-lightest: rgba(0, 0, 0, .04);--border-primary: #E0E0E0;--border-secondary: #D6DCE2;--border-tertiary: #C8CDD3;--border-light: #F1F4F8;--border-primary-12: rgba(0, 0, 0, .12);--border-primary-08: rgba(0, 0, 0, .08);--border-primary-06: rgba(0, 0, 0, .06);--shadow-primary: rgba(0, 0, 0, .12);--shadow-secondary: rgba(0, 0, 0, .08);--shadow-tertiary: rgba(0, 0, 0, .04);--shadow-light: rgba(0, 0, 0, .06);--status-available: #929DAB;--status-unavailable: #CCD3DA;--status-hotseat: #857BFF;--status-multiteam: #10ADAE;--status-selected: #10ADAE;--status-upcoming: #D4900C;--status-room: #38AF49;--status-room-booked: #B23600;--status-room-unavailable: #181F33;--team-color-1: #F8C52E;--team-color-2: #FA8E20;--team-color-3: #987CDD;--team-color-4: #16CBBC;--team-color-5: #E65010;--team-color-6: #A60060;--team-color-7: #ED323B;--team-color-8: #35A1FF;--team-color-9: #80D348}p{margin:0;cursor:default}::ng-deep .main-container{margin:0;max-width:100%}.sub-dynamic-form{padding-left:24px;border-bottom:1px solid var(--border-primary, #E0E0E0)}.dynamic-field ::ng-deep .container{height:32px!important}.single-line-field-container{display:flex;justify-content:space-between;align-items:center;padding:28px 16px;border-bottom:1px solid var(--border-primary, #E0E0E0)}.multi-line-field-container{display:flex;justify-content:flex-start;align-items:flex-start;padding:28px 16px;flex-wrap:wrap;border-bottom:1px solid var(--border-primary, #E0E0E0)}.field-title-sm{margin-bottom:8px;cursor:default}.input-field{width:100%;background-color:var(--bg-secondary, #FAFAFA);border:1px solid var(--border-primary, #E0E0E0);border-radius:6px}.ip-text{height:44px;padding:8px 12px}.ip-textarea{max-height:94px;padding:8px}input:focus{outline:none}input::placeholder{color:var(--border-primary, #E0E0E0)}textarea:focus{outline:none}.date-picker-container{position:relative;width:140px}.date-picker-container .date-picker{cursor:pointer;height:32px;width:100%;font-size:14px;border-radius:6px;padding:0 12px;border:1px solid var(--border-primary, #E0E0E0);inset:10px auto auto 80px;background-color:var(--bg-primary, #FFFFFF)}.date-picker-container .date-picker:hover{background-color:var(--brand-primary-hover, #F0F3FA)}.date-picker-container .date-picker-icon{position:absolute;top:50%;right:12px;transform:translateY(-50%);cursor:pointer}form .dynamic-field:last-child{border-bottom:none!important}#checkboxes-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.radio-checkbox-common{display:flex;justify-content:center;align-items:center;cursor:pointer;margin-right:8px;margin-bottom:8px;background-color:var(--bg-primary, #FFFFFF);padding:12px 16px;border:1px solid var(--text-secondary, #6A737D);border-radius:8px}.radio-checkbox-common p{color:var(--text-secondary, #6A737D);cursor:pointer}.radio-checkbox-common img{margin-right:8px}.checkbox-active{background-color:var(--brand-primary, #0937B2)}.checkbox-active p{color:var(--bg-primary, #FFFFFF)}#error-messages-container{margin-top:4px;width:100%;display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}#error-messages-container p{color:var(--brand-error, #B00020)}.removeable-container{display:flex;justify-content:center;align-items:center}.removeable-container .remove-icon{cursor:pointer;margin-left:8px;max-width:24px}span{color:var(--brand-error, #B00020)}\n"] }]
|
|
1182
|
+
args: [{ selector: "mis-dynamic-form", template: "<form [formGroup]=\"dynamicForm()\">\n <ng-container formArrayName=\"dynamicFields\">\n <ng-container [formGroupName]=\"i\" *ngFor=\"let fieldControl of getDynamicFieldsControls().controls; let i = index\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: formFieldsArray?.[i],\n formGroup: fieldControl,\n control: fieldControl.controls.value\n }\"\n >\n </ng-container>\n <div class=\"sub-dynamic-form\" *ngIf=\"fieldControl?.value && (!!formFieldsArray?.[i]?.subFields && formFieldsArray?.[i]?.subFields?.length > 0 && matchParentConfig(formFieldsArray?.[i]?.subFields, fieldControl?.controls?.value?.value?.value))\">\n <ng-container *ngFor=\"let subFieldControl of fieldControl.controls.subFields.controls; let j = index\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: findSelectedSubFieldConfig(formFieldsArray?.[i]?.subFields, fieldControl.controls.value.value.value,j),\n control: subFieldControl\n }\">\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n</form>\n\n\n<ng-template #dynamicField let-field let-control=\"control\" let-formgroup=\"formGroup\">\n\n <!-- fieldType: 'input' fieldInputType: 'text' | 'number' -->\n <ng-container *ngIf=\"field.fieldType === 'input' && (field.fieldInputType === 'text' || field.fieldInputType === 'number')\">\n <ng-container *ngIf=\"customInputTextNumber; else defaultInputTextNumber\">\n <ng-template\n [ngTemplateOutlet]=\"customInputTextNumber\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultInputTextNumber>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field?.title }} <span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <input class=\"input-field ip-text\" [type]=\"field.fieldInputType\" [formControl]=\"control\"\n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" \n [min]=\"field.fieldInputType === 'number' ? 0 : '' \"/>\n <ng-container *ngIf=\"control.touched && control.errors\"\n [ngTemplateOutlet]=\"dynamicFieldErrors\" \n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\"\n >\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n \n <!-- fieldType: 'input' fieldInputType: 'textarea' -->\n <ng-container *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'textarea'\">\n <ng-container *ngIf=\"customInputTextarea; else defaultInputTextarea\">\n <ng-template\n [ngTemplateOutlet]=\"customInputTextarea\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultInputTextarea>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <textarea class=\"input-field ip-textarea\" type=\"text\"\n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" [formControl]=\"control\"></textarea>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n \n <!-- fieldType: 'input' fieldInputType: 'date' -->\n <ng-container *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'date'\">\n <ng-container *ngIf=\"customInputDate; else defaultInputDate\">\n <ng-template\n [ngTemplateOutlet]=\"customInputDate\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultInputDate>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\"\n *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'date'\">\n <p class=\"h6\">\n {{ field.title }} <span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div class=\"date-picker-container\">\n <input class=\"date-picker\" readonly misTzDp [dpConfig]=\"field.fieldConfig\"\n (dateChange)=\"control.setValue($event)\" [selectedDate]=\"control.value\" [offsetY]=\"0\"\n [value]=\"control.value\" #dp />\n <img alt=\"data-picker\" *ngIf=\"calendarIconUrl()\" class=\"date-picker-icon\" [src]=\"calendarIconUrl()\"\n (click)=\"dp.click()\" />\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- fieldType: 'boolean' fieldInputType: 'toggle' -->\n <ng-container *ngIf=\"field.fieldType === 'boolean' && field.fieldInputType === 'toggle'\">\n <ng-container *ngIf=\"customBooleanToggle; else defaultBooleanToggle\">\n <ng-template\n [ngTemplateOutlet]=\"customBooleanToggle\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultBooleanToggle>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h6\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <mis-switch [control]=\"control\" (valueChanged)=\"updateSubDynamicFields(field, formgroup, $event)\"></mis-switch>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div> \n </ng-template>\n </ng-container>\n\n <!-- fieldType: 'singleSelect' fieldInputType: 'dropdown' -->\n <ng-container *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'dropdown'\">\n <ng-container *ngIf=\"customSingleSelectDropdown; else defaultSingleSelectDropdown\">\n <ng-template\n [ngTemplateOutlet]=\"customSingleSelectDropdown\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultSingleSelectDropdown>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h6\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div [ngClass]=\"{'removeable-container' : field?.isRemoveable}\">\n <mis-dropdown [searchEnabled]=\"false\" [width]=\"'140px'\" [data]=\"field.itemsList\" [selectedItem]=\"control.value\"\n (onChange)=\"updateSelectedValueForSingleSelect(field, control, formgroup, $event);\">\n </mis-dropdown>\n <img *ngIf=\"field.isRemoveable && removeIconUrl()\" class=\"remove-icon\" [src]=\"removeIconUrl()\" (click)=\"fieldRemoved.emit(field)\">\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container >\n \n\n <!-- fieldType: 'singleSelect' fieldInputType: 'radio' -->\n <ng-container *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'radio'\">\n <ng-container *ngIf=\"customSingleSelectRadio; else defaultSingleSelectRadio\">\n <ng-template\n [ngTemplateOutlet]=\"customSingleSelectRadio\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultSingleSelectRadio>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': item.label === control.value?.label }\"\n (click)=\"updateSelectedValueForSingleSelect(field, control, formgroup, item);\">\n <img *ngIf=\"(item.label === control.value?.label) && activeBtnIconUrl()\" [src]=\"activeBtnIconUrl()\" alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n \n\n <!-- fieldType: 'multiSelect' fieldInputType: 'checkbox' -->\n <ng-container *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'checkbox'\">\n <ng-container *ngIf=\"customMultiSelectCheckbox; else defaultMultiSelectCheckbox\">\n <ng-template\n [ngTemplateOutlet]=\"customMultiSelectCheckbox\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultMultiSelectCheckbox>\n <div class=\"dynamic-field multi-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': isCheckBoxSelected(item.label, control.value) }\"\n (click)=\"updateSelectedValueForMultiSelect(field, control, formgroup, [item])\">\n <img *ngIf=\"isCheckBoxSelected(item.label, control.value) && activeBtnIconUrl()\" [src]=\"activeBtnIconUrl()\"\n alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n\n <!-- fieldType: 'multiSelect' fieldInputType: 'dropdown' -->\n <ng-container *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'dropdown'\">\n <ng-container *ngIf=\"customMultiSelectDropdown; else defaultMultiSelectDropdown\">\n <ng-template\n [ngTemplateOutlet]=\"customMultiSelectDropdown\"\n [ngTemplateOutletContext]=\"{ field: field, control: control, formgroup: formgroup }\"\n ></ng-template>\n </ng-container>\n <ng-template #defaultMultiSelectDropdown>\n <div class=\"dynamic-field single-line-field-container\"\n [ngStyle]=\"{'border-bottom': (formgroup?.controls?.subFields?.controls?.length && removeSepratorForSubFields) ? 'none':''}\">\n <p class=\"h6\">\n {{ field.title }}<span *ngIf=\"field.validators && field.validators.length > 0\"> *</span>\n </p>\n <mis-multi-select-dropdown [width]=\"'140px'\" [showSelectedCount]=\"true\" [dropdownListWidth]=\"'256px'\"\n [searchEnabled]=\"false\" [hideApplyButton]=\"true\" [data]=\"field.itemsList\"\n [selectedItems]=\"control.value\" (onChange)=\"updateSelectedValueForMultiSelect(field, control, formgroup, $event);\"></mis-multi-select-dropdown>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n\n</ng-template>\n\n<ng-template #dynamicFieldErrors let-errors>\n <div id=\"error-messages-container\">\n <ng-container *ngFor=\"let error of errors | keyvalue\">\n <p class=\"h8\">\n {{\" \u2022 \" + error.value}}\n </p>\n <div [ngStyle]=\"{ 'flex-basis': '100%', 'height': '0' }\"></div>\n </ng-container>\n </div>\n</ng-template>", styles: [":root{--pmry-200: #99BAF7;--pmry-100: #CBDDFB;--pmry-500: #0937B2;--pmry-400: #3C68D0;--pmry-600: #062A99;--pmry-700: #041F80;--pmry-300: #638FE7;--pmry-800: #021567;--pmry-900: #010F55;--sec-d-purple: #40447F;--sec-maroon: #6B034E;--sec-mud-red: #B23600;--sec-orange: #ED711C;--sec-purple: #815FD5;--sec-teal: #10ADAE;--sec-yellow: #D4900C;--sec-green: #547F40;--sec-bright-green: #27D22E;--sec-dark-teal: #035F6B;--sec-chocolate: #7C2F33;--sec-rube-pink: #C13D6D;--sec-cerulean: #0087B2;--sem-error: #B00020;--sem-info: #0091FF;--sem-warning: #FF9D00;--sem-success: #38AF49;--grey-bg-1: #FAFAFA;--grey-bg: #F5F5F5;--grey-seperators: #E0E0E0;--grey-disabled: #C8CDD3;--grey-hover: #F5F7FC;--grey-pressed: #E6EBF7;--grey-row: #F5F7FC;--dec-light-yellow: #F4E7C3;--dec-light-purple: #DACFF9;--dec-light-green: #E4F5E9;--dec-light-green2: #F1FFF3;--dec-light-pink: #FAE1EA;--dec-: #F4CBC1;--dec-lt-orange: #FAEFED;--dec-light-blue: #CFECF9;--dec-row-selection: #F1FDF8;--dec-row-selection2: #F2FBFF;--dec-row-lines: #D3E1E9;--text-white: #FFFFFF;--text-muted: #6A737D;--text-black: #181F33;--MR-solid-blue2:#C8D5F6;--MR-solid-purple:#C9C3FB;--MR-solid-orange:#EEAC9F;--MR-solid-green:#ACDADA;--MR-solid-brown:#E8C8AF;--MR-solid-yellow:#FFEFC7;--MR-solid-blue:#BBE6FF;--MR-solid-pink:#FFC6F2;--tr-hover:#F0F3FA;--tr-pressed:#DAE1F3;--brand-primary: #0937B2;--brand-primary-light: #3C68D0;--brand-primary-dark: #062A99;--brand-primary-darker: #041F80;--brand-primary-lighter: #638FE7;--brand-primary-lightest: #CBDDFB;--brand-primary-hover: #F0F3FA;--brand-primary-active: #DAE1F3;--brand-secondary: #ED711C;--brand-secondary-light: #F09E65;--brand-secondary-dark: #B23600;--brand-secondary-lighter: #FFC6F2;--brand-accent: #10ADAE;--brand-accent-light: #16CBBC;--brand-accent-dark: #035F6B;--brand-accent-lighter: #ACDADA;--brand-success: #38AF49;--brand-success-light: #4CAF50;--brand-success-dark: #216531;--brand-success-lighter: #E4F5E9;--brand-success-lightest: #F1FFF3;--brand-error: #B00020;--brand-error-light: #F04E4E;--brand-error-dark: #A60060;--brand-error-lighter: #FAE1EA;--brand-error-lightest: #FDF2F2;--brand-warning: #FF9D00;--brand-warning-light: #D4900C;--brand-warning-dark: #624000;--brand-warning-lighter: #F4E7C3;--brand-warning-lightest: #FAEFED;--brand-info: #0091FF;--brand-info-light: #35A1FF;--brand-info-dark: #0087B2;--brand-info-lighter: #CFECF9;--text-primary: #181F33;--text-secondary: #6A737D;--text-tertiary: #929DAB;--text-disabled: #929DAB;--text-primary-87: rgba(24, 31, 51, .87);--text-primary-60: rgba(24, 31, 51, .6);--text-primary-38: rgba(24, 31, 51, .38);--text-primary-12: rgba(24, 31, 51, .12);--bg-primary: #FFFFFF;--bg-secondary: #FAFAFA;--bg-tertiary: #F5F5F5;--bg-overlay: rgba(0, 0, 0, .32);--bg-overlay-light: rgba(0, 0, 0, .12);--bg-overlay-lighter: rgba(0, 0, 0, .08);--bg-overlay-lightest: rgba(0, 0, 0, .04);--border-primary: #E0E0E0;--border-secondary: #D6DCE2;--border-tertiary: #C8CDD3;--border-light: #F1F4F8;--border-primary-12: rgba(0, 0, 0, .12);--border-primary-08: rgba(0, 0, 0, .08);--border-primary-06: rgba(0, 0, 0, .06);--shadow-primary: rgba(0, 0, 0, .12);--shadow-secondary: rgba(0, 0, 0, .08);--shadow-tertiary: rgba(0, 0, 0, .04);--shadow-light: rgba(0, 0, 0, .06);--status-available: #929DAB;--status-unavailable: #CCD3DA;--status-hotseat: #857BFF;--status-multiteam: #10ADAE;--status-selected: #10ADAE;--status-upcoming: #D4900C;--status-room: #38AF49;--status-room-booked: #B23600;--status-room-unavailable: #181F33;--team-color-1: #F8C52E;--team-color-2: #FA8E20;--team-color-3: #987CDD;--team-color-4: #16CBBC;--team-color-5: #E65010;--team-color-6: #A60060;--team-color-7: #ED323B;--team-color-8: #35A1FF;--team-color-9: #80D348}p{margin:0;cursor:default}::ng-deep .main-container{margin:0;max-width:100%}.sub-dynamic-form{padding-left:24px;border-bottom:1px solid var(--border-primary, #E0E0E0)}.dynamic-field ::ng-deep .container{height:32px!important}.single-line-field-container{display:flex;justify-content:space-between;align-items:center;padding:28px 16px;border-bottom:1px solid var(--border-primary, #E0E0E0)}.multi-line-field-container{display:flex;justify-content:flex-start;align-items:flex-start;padding:28px 16px;flex-wrap:wrap;border-bottom:1px solid var(--border-primary, #E0E0E0)}.field-title-sm{margin-bottom:8px;cursor:default}.input-field{width:100%;background-color:var(--bg-secondary, #FAFAFA);border:1px solid var(--border-primary, #E0E0E0);border-radius:6px}.ip-text{height:44px;padding:8px 12px}.ip-textarea{max-height:94px;padding:8px}input:focus{outline:none}input::placeholder{color:var(--border-primary, #E0E0E0)}textarea:focus{outline:none}.date-picker-container{position:relative;width:140px}.date-picker-container .date-picker{cursor:pointer;height:32px;width:100%;font-size:14px;border-radius:6px;padding:0 12px;border:1px solid var(--border-primary, #E0E0E0);inset:10px auto auto 80px;background-color:var(--bg-primary, #FFFFFF)}.date-picker-container .date-picker:hover{background-color:var(--brand-primary-hover, #F0F3FA)}.date-picker-container .date-picker-icon{position:absolute;top:50%;right:12px;transform:translateY(-50%);cursor:pointer}form .dynamic-field:last-child{border-bottom:none!important}#checkboxes-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.radio-checkbox-common{display:flex;justify-content:center;align-items:center;cursor:pointer;margin-right:8px;margin-bottom:8px;background-color:var(--bg-primary, #FFFFFF);padding:12px 16px;border:1px solid var(--text-secondary, #6A737D);border-radius:8px}.radio-checkbox-common p{color:var(--text-secondary, #6A737D);cursor:pointer}.radio-checkbox-common img{margin-right:8px}.checkbox-active{background-color:var(--brand-primary, #0937B2)}.checkbox-active p{color:var(--bg-primary, #FFFFFF)}#error-messages-container{margin-top:4px;width:100%;display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}#error-messages-container p{color:var(--brand-error, #B00020)}.removeable-container{display:flex;justify-content:center;align-items:center}.removeable-container .remove-icon{cursor:pointer;margin-left:8px;max-width:24px}span{color:var(--brand-error, #B00020)}\n"] }]
|
|
1068
1183
|
}], () => [], { customInputTextNumber: [{
|
|
1069
1184
|
type: ContentChild,
|
|
1070
1185
|
args: ["customInputTextNumber", { static: false }]
|