mis-crystal-design-system 18.0.25 → 18.1.0-signal-test
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/action-list/action-list.component.d.ts +17 -15
- package/async-search-dropdown/async-dropdown.component.d.ts +43 -61
- package/button/button.component.d.ts +35 -13
- package/button/button.directive.d.ts +10 -8
- package/button/button.directive.scss +13 -15
- package/checkbox/checkbox.component.d.ts +15 -12
- package/chip/chip.component.d.ts +9 -11
- package/datepicker_v2/models/dp-config.model.d.ts +1 -0
- package/datepicker_v2/tz-datepicker.directive.d.ts +15 -18
- package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +42 -21
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +12 -14
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +46 -23
- package/drawer/drawer-body/drawer-body.component.d.ts +2 -2
- package/drawer/drawer.scss +1 -1
- package/dropdown/calculate-container-height.directive.d.ts +7 -8
- package/dropdown/dropdown.component.d.ts +41 -49
- package/dynamic-form/dynamic-form.component.d.ts +20 -16
- package/esm2022/action-list/action-list.component.mjs +113 -90
- package/esm2022/async-search-dropdown/async-dropdown.component.mjs +257 -327
- package/esm2022/button/button.component.mjs +56 -49
- package/esm2022/button/button.directive.mjs +36 -40
- package/esm2022/checkbox/checkbox.component.mjs +75 -70
- package/esm2022/chip/chip.component.mjs +20 -33
- package/esm2022/datepicker_v2/models/dp-config.model.mjs +1 -1
- package/esm2022/datepicker_v2/tz-datepicker.directive.mjs +42 -71
- package/esm2022/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +203 -173
- package/esm2022/datepicker_v2/utils/index.mjs +2 -1
- package/esm2022/daterangepicker_v2/tz-daterangepicker.directive.mjs +26 -51
- package/esm2022/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +283 -236
- package/esm2022/drawer/drawer-body/drawer-body.component.mjs +8 -7
- package/esm2022/dropdown/calculate-container-height.directive.mjs +25 -22
- package/esm2022/dropdown/dropdown.component.mjs +163 -187
- package/esm2022/dynamic-form/dynamic-form.component.mjs +119 -73
- package/esm2022/fab/fab.component.mjs +30 -34
- package/esm2022/filter/filter-panel/filter-panel.component.mjs +61 -59
- package/esm2022/input/directives/input/input.directive.mjs +22 -26
- package/esm2022/input/mis-input.component.mjs +42 -46
- package/esm2022/input-stepper/input-stepper/input-stepper.component.mjs +42 -52
- package/esm2022/loader/loader.component.mjs +8 -11
- package/esm2022/mobile-filter/mobile-filter.component.mjs +62 -62
- package/esm2022/modal/module-wrapper/module-wrapper.component.mjs +11 -9
- package/esm2022/multi-select-dropdown/multi-select-dropdown.component.mjs +235 -281
- package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.component.mjs +250 -287
- package/esm2022/phone-input/phone-input.component.mjs +21 -43
- package/esm2022/public-api.mjs +1 -1
- package/esm2022/radio-button/radio-button.component.mjs +15 -27
- package/esm2022/ske-loader/ske-loader.component.mjs +15 -29
- package/esm2022/slider/slider.component.mjs +23 -33
- package/esm2022/slider/slider.module.mjs +4 -11
- package/esm2022/snackbar/snackbar/snackbar.component.mjs +21 -15
- package/esm2022/snackbar/snackbar.service.mjs +3 -2
- package/esm2022/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +231 -344
- package/esm2022/specificdatepicker/tz-specificdatepicker.directive.mjs +77 -105
- package/esm2022/star-rating/star-rating.component.mjs +58 -72
- package/esm2022/switch/switch.component.mjs +34 -36
- package/esm2022/table/actions-cell/actions-cell.component.mjs +56 -55
- package/esm2022/table/custom-table-cell.directive.mjs +22 -18
- package/esm2022/table/filter/filter.component.mjs +60 -42
- package/esm2022/table/sort-icons.directive.mjs +16 -8
- package/esm2022/table/sub-table/sub-table.component.mjs +42 -45
- package/esm2022/table/table.component.mjs +182 -166
- package/esm2022/timepicker/timepicker.component.mjs +245 -160
- package/esm2022/timepicker/timepicker.directive.mjs +3 -2
- package/esm2022/timerangepicker/timerangepicker.component.mjs +200 -159
- package/esm2022/toast/toast.component.mjs +7 -8
- package/esm2022/toast/toast.data.service.mjs +15 -9
- package/esm2022/tooltip/tooltip-container/tooltip.component.mjs +12 -12
- package/esm2022/tooltip/tooltip.directive.mjs +4 -4
- package/esm2022/virtual-scroll/virtual-scroll.component.mjs +57 -59
- package/fab/fab.component.d.ts +12 -8
- package/fesm2022/mis-crystal-design-system-action-list.mjs +112 -89
- package/fesm2022/mis-crystal-design-system-action-list.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs +254 -325
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-button.mjs +89 -86
- package/fesm2022/mis-crystal-design-system-button.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-checkbox.mjs +74 -69
- package/fesm2022/mis-crystal-design-system-checkbox.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-chip.mjs +19 -32
- package/fesm2022/mis-crystal-design-system-chip.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs +243 -241
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs +306 -284
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-drawer.mjs +7 -6
- package/fesm2022/mis-crystal-design-system-drawer.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-dropdown.mjs +184 -205
- package/fesm2022/mis-crystal-design-system-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs +119 -73
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-fab.mjs +29 -33
- package/fesm2022/mis-crystal-design-system-fab.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-filter.mjs +60 -58
- package/fesm2022/mis-crystal-design-system-filter.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs +41 -51
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-input.mjs +62 -71
- package/fesm2022/mis-crystal-design-system-input.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-loader.mjs +7 -10
- package/fesm2022/mis-crystal-design-system-loader.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs +61 -61
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-modal.mjs +10 -8
- package/fesm2022/mis-crystal-design-system-modal.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs +233 -279
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs +249 -286
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-phone-input.mjs +20 -42
- package/fesm2022/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-radio-button.mjs +14 -26
- package/fesm2022/mis-crystal-design-system-radio-button.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs +14 -28
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-slider.mjs +25 -42
- package/fesm2022/mis-crystal-design-system-slider.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-snackbar.mjs +22 -15
- package/fesm2022/mis-crystal-design-system-snackbar.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs +305 -446
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-star-rating.mjs +57 -71
- package/fesm2022/mis-crystal-design-system-star-rating.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-switch.mjs +33 -35
- package/fesm2022/mis-crystal-design-system-switch.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-table.mjs +368 -324
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timepicker.mjs +246 -160
- package/fesm2022/mis-crystal-design-system-timepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs +199 -158
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-toast.mjs +19 -14
- package/fesm2022/mis-crystal-design-system-toast.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-tooltip.mjs +14 -14
- package/fesm2022/mis-crystal-design-system-tooltip.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs +57 -59
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system.mjs.map +1 -1
- package/filter/filter-panel/filter-panel.component.d.ts +14 -14
- package/input/directives/input/input.directive.d.ts +6 -10
- package/input/mis-input.component.d.ts +12 -13
- package/input/mis-input.component.scss +18 -18
- package/input-stepper/input-stepper/input-stepper.component.d.ts +8 -7
- package/loader/loader.component.d.ts +3 -6
- package/mobile-filter/mobile-filter.component.d.ts +15 -15
- package/modal/modal.scss +1 -1
- package/modal/module-wrapper/module-wrapper.component.d.ts +2 -3
- package/multi-select-dropdown/multi-select-dropdown.component.d.ts +89 -51
- package/nested-multi-select-dropdown/nested-multi-select-dropdown.component.d.ts +99 -56
- package/package.json +17 -23
- package/phone-input/phone-input.component.d.ts +16 -18
- package/radio-button/radio-button.component.d.ts +9 -11
- package/ske-loader/ske-loader.component.d.ts +8 -11
- package/slider/slider.component.d.ts +8 -11
- package/slider/slider.module.d.ts +1 -2
- package/snackbar/snackbar/snackbar.component.d.ts +3 -3
- package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +35 -35
- package/specificdatepicker/tz-specificdatepicker.directive.d.ts +24 -28
- package/star-rating/star-rating.component.d.ts +18 -18
- package/styles/mis-color-constants.scss +0 -204
- package/styles/mis-icons.scss +56 -56
- package/styles/mis-old-icon-styles.scss +21 -21
- package/switch/switch.component.d.ts +8 -10
- package/table/actions-cell/actions-cell.component.d.ts +14 -14
- package/table/custom-table-cell.directive.d.ts +3 -3
- package/table/filter/filter.component.d.ts +9 -9
- package/table/sub-table/sub-table.component.d.ts +5 -5
- package/table/table.component.d.ts +38 -35
- package/timepicker/timepicker.component.d.ts +29 -28
- package/timerangepicker/timerangepicker.component.d.ts +36 -33
- package/toast/toast.data.service.d.ts +1 -1
- package/tooltip/tooltip-container/tooltip.component.d.ts +4 -4
- package/virtual-scroll/virtual-scroll.component.d.ts +8 -9
- package/dynamic-theme/branding.types.d.ts +0 -84
- package/dynamic-theme/dynamic-theme.module.d.ts +0 -9
- package/dynamic-theme/dynamic-theme.service.d.ts +0 -89
- package/dynamic-theme/index.d.ts +0 -1
- package/dynamic-theme/public_api.d.ts +0 -3
- package/esm2022/dynamic-theme/branding.types.mjs +0 -93
- package/esm2022/dynamic-theme/dynamic-theme.module.mjs +0 -25
- package/esm2022/dynamic-theme/dynamic-theme.service.mjs +0 -193
- package/esm2022/dynamic-theme/index.mjs +0 -2
- package/esm2022/dynamic-theme/mis-crystal-design-system-dynamic-theme.mjs +0 -5
- package/esm2022/dynamic-theme/public_api.mjs +0 -4
- package/fesm2022/mis-crystal-design-system-dynamic-theme.mjs +0 -313
- package/fesm2022/mis-crystal-design-system-dynamic-theme.mjs.map +0 -1
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
|
-
import {
|
|
4
|
+
import { UntypedFormGroup, UntypedFormArray, UntypedFormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import {
|
|
6
|
+
import { input, output, signal, computed, effect, untracked, Component, ContentChild, NgModule } from '@angular/core';
|
|
7
7
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
8
8
|
import { ScrollingModule } from '@angular/cdk-experimental/scrolling';
|
|
9
9
|
import * as i3 from 'mis-crystal-design-system/dropdown';
|
|
10
10
|
import { DropdownModule } from 'mis-crystal-design-system/dropdown';
|
|
11
11
|
import dayjs from 'dayjs';
|
|
12
12
|
import timezone from 'dayjs/plugin/timezone';
|
|
13
|
-
import utc from 'dayjs/plugin/utc';
|
|
14
13
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
15
14
|
import * as i4 from 'mis-crystal-design-system/switch';
|
|
16
15
|
import { SwitchModule } from 'mis-crystal-design-system/switch';
|
|
@@ -49,7 +48,7 @@ function DynamicFormComponent_ng_container_2_div_2_ng_container_1_Template(rf, c
|
|
|
49
48
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
50
49
|
const dynamicField_r7 = i0.ɵɵreference(4);
|
|
51
50
|
i0.ɵɵadvance();
|
|
52
|
-
i0.ɵɵproperty("ngTemplateOutlet", dynamicField_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c9, ctx_r5.findSelectedSubFieldConfig(ctx_r5.
|
|
51
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicField_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c9, ctx_r5.findSelectedSubFieldConfig(ctx_r5.formFieldsArray == null ? null : ctx_r5.formFieldsArray[i_r5] == null ? null : ctx_r5.formFieldsArray[i_r5].subFields, fieldControl_r4.controls.value.value.value, j_r2), subFieldControl_r1));
|
|
53
52
|
} }
|
|
54
53
|
function DynamicFormComponent_ng_container_2_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
55
54
|
i0.ɵɵelementStart(0, "div", 17);
|
|
@@ -72,9 +71,9 @@ function DynamicFormComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
72
71
|
const dynamicField_r7 = i0.ɵɵreference(4);
|
|
73
72
|
i0.ɵɵproperty("formGroupName", i_r5);
|
|
74
73
|
i0.ɵɵadvance();
|
|
75
|
-
i0.ɵɵproperty("ngTemplateOutlet", dynamicField_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction3(4, _c8, ctx_r5.
|
|
74
|
+
i0.ɵɵproperty("ngTemplateOutlet", dynamicField_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction3(4, _c8, ctx_r5.formFieldsArray == null ? null : ctx_r5.formFieldsArray[i_r5], fieldControl_r4, fieldControl_r4.controls.value));
|
|
76
75
|
i0.ɵɵadvance();
|
|
77
|
-
i0.ɵɵproperty("ngIf", (fieldControl_r4 == null ? null : fieldControl_r4.value) && (!!(ctx_r5.
|
|
76
|
+
i0.ɵɵproperty("ngIf", (fieldControl_r4 == null ? null : fieldControl_r4.value) && (!!(ctx_r5.formFieldsArray == null ? null : ctx_r5.formFieldsArray[i_r5] == null ? null : ctx_r5.formFieldsArray[i_r5].subFields) && (ctx_r5.formFieldsArray == null ? null : ctx_r5.formFieldsArray[i_r5] == null ? null : ctx_r5.formFieldsArray[i_r5].subFields == null ? null : ctx_r5.formFieldsArray[i_r5].subFields.length) > 0 && ctx_r5.matchParentConfig(ctx_r5.formFieldsArray == null ? null : ctx_r5.formFieldsArray[i_r5] == null ? null : ctx_r5.formFieldsArray[i_r5].subFields, fieldControl_r4 == null ? null : fieldControl_r4.controls == null ? null : fieldControl_r4.controls.value == null ? null : fieldControl_r4.controls.value.value == null ? null : fieldControl_r4.controls.value.value.value)));
|
|
78
77
|
} }
|
|
79
78
|
function DynamicFormComponent_ng_template_3_ng_container_0_ng_container_1_ng_template_1_Template(rf, ctx) { }
|
|
80
79
|
function DynamicFormComponent_ng_template_3_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -232,7 +231,7 @@ function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_i
|
|
|
232
231
|
i0.ɵɵelementEnd();
|
|
233
232
|
} if (rf & 2) {
|
|
234
233
|
const ctx_r5 = i0.ɵɵnextContext(5);
|
|
235
|
-
i0.ɵɵproperty("src", ctx_r5.calendarIconUrl, i0.ɵɵsanitizeUrl);
|
|
234
|
+
i0.ɵɵproperty("src", ctx_r5.calendarIconUrl(), i0.ɵɵsanitizeUrl);
|
|
236
235
|
} }
|
|
237
236
|
function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_ng_container_8_Template(rf, ctx) { if (rf & 1) {
|
|
238
237
|
i0.ɵɵelementContainer(0, 15);
|
|
@@ -269,7 +268,7 @@ function DynamicFormComponent_ng_template_3_ng_container_2_ng_template_2_div_0_T
|
|
|
269
268
|
i0.ɵɵadvance(2);
|
|
270
269
|
i0.ɵɵproperty("dpConfig", field_r9.fieldConfig)("selectedDate", control_r10.value)("offsetY", 0)("value", control_r10.value);
|
|
271
270
|
i0.ɵɵadvance(2);
|
|
272
|
-
i0.ɵɵproperty("ngIf", ctx_r5.calendarIconUrl);
|
|
271
|
+
i0.ɵɵproperty("ngIf", ctx_r5.calendarIconUrl());
|
|
273
272
|
i0.ɵɵadvance();
|
|
274
273
|
i0.ɵɵproperty("ngIf", control_r10.touched && control_r10.errors);
|
|
275
274
|
} }
|
|
@@ -379,7 +378,7 @@ function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_img_6_T
|
|
|
379
378
|
i0.ɵɵelementEnd();
|
|
380
379
|
} if (rf & 2) {
|
|
381
380
|
const ctx_r5 = i0.ɵɵnextContext(4);
|
|
382
|
-
i0.ɵɵproperty("src", ctx_r5.removeIconUrl, i0.ɵɵsanitizeUrl);
|
|
381
|
+
i0.ɵɵproperty("src", ctx_r5.removeIconUrl(), i0.ɵɵsanitizeUrl);
|
|
383
382
|
} }
|
|
384
383
|
function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_ng_container_7_Template(rf, ctx) { if (rf & 1) {
|
|
385
384
|
i0.ɵɵelementContainer(0, 15);
|
|
@@ -418,7 +417,7 @@ function DynamicFormComponent_ng_template_3_ng_container_4_ng_template_2_Templat
|
|
|
418
417
|
i0.ɵɵadvance();
|
|
419
418
|
i0.ɵɵproperty("searchEnabled", false)("width", "140px")("data", field_r9.itemsList)("selectedItem", control_r10.value);
|
|
420
419
|
i0.ɵɵadvance();
|
|
421
|
-
i0.ɵɵproperty("ngIf", field_r9.isRemoveable && ctx_r5.removeIconUrl);
|
|
420
|
+
i0.ɵɵproperty("ngIf", field_r9.isRemoveable && ctx_r5.removeIconUrl());
|
|
422
421
|
i0.ɵɵadvance();
|
|
423
422
|
i0.ɵɵproperty("ngIf", control_r10.touched && control_r10.errors);
|
|
424
423
|
} }
|
|
@@ -455,7 +454,7 @@ function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_i
|
|
|
455
454
|
i0.ɵɵelement(0, "img", 43);
|
|
456
455
|
} if (rf & 2) {
|
|
457
456
|
const ctx_r5 = i0.ɵɵnextContext(5);
|
|
458
|
-
i0.ɵɵproperty("src", ctx_r5.activeBtnIconUrl, i0.ɵɵsanitizeUrl);
|
|
457
|
+
i0.ɵɵproperty("src", ctx_r5.activeBtnIconUrl(), i0.ɵɵsanitizeUrl);
|
|
459
458
|
} }
|
|
460
459
|
function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
461
460
|
const _r26 = i0.ɵɵgetCurrentView();
|
|
@@ -471,7 +470,7 @@ function DynamicFormComponent_ng_template_3_ng_container_5_ng_template_2_div_6_T
|
|
|
471
470
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
472
471
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c15, item_r27.label === (control_r10.value == null ? null : control_r10.value.label)));
|
|
473
472
|
i0.ɵɵadvance();
|
|
474
|
-
i0.ɵɵproperty("ngIf", item_r27.label === (control_r10.value == null ? null : control_r10.value.label) && ctx_r5.activeBtnIconUrl);
|
|
473
|
+
i0.ɵɵproperty("ngIf", item_r27.label === (control_r10.value == null ? null : control_r10.value.label) && ctx_r5.activeBtnIconUrl());
|
|
475
474
|
i0.ɵɵadvance(2);
|
|
476
475
|
i0.ɵɵtextInterpolate(item_r27.label);
|
|
477
476
|
} }
|
|
@@ -543,7 +542,7 @@ function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_i
|
|
|
543
542
|
i0.ɵɵelement(0, "img", 43);
|
|
544
543
|
} if (rf & 2) {
|
|
545
544
|
const ctx_r5 = i0.ɵɵnextContext(5);
|
|
546
|
-
i0.ɵɵproperty("src", ctx_r5.activeBtnIconUrl, i0.ɵɵsanitizeUrl);
|
|
545
|
+
i0.ɵɵproperty("src", ctx_r5.activeBtnIconUrl(), i0.ɵɵsanitizeUrl);
|
|
547
546
|
} }
|
|
548
547
|
function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
549
548
|
const _r29 = i0.ɵɵgetCurrentView();
|
|
@@ -559,7 +558,7 @@ function DynamicFormComponent_ng_template_3_ng_container_6_ng_template_2_div_6_T
|
|
|
559
558
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
560
559
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c15, ctx_r5.isCheckBoxSelected(item_r30.label, control_r10.value)));
|
|
561
560
|
i0.ɵɵadvance();
|
|
562
|
-
i0.ɵɵproperty("ngIf", ctx_r5.isCheckBoxSelected(item_r30.label, control_r10.value) && ctx_r5.activeBtnIconUrl);
|
|
561
|
+
i0.ɵɵproperty("ngIf", ctx_r5.isCheckBoxSelected(item_r30.label, control_r10.value) && ctx_r5.activeBtnIconUrl());
|
|
563
562
|
i0.ɵɵadvance(2);
|
|
564
563
|
i0.ɵɵtextInterpolate(item_r30.label);
|
|
565
564
|
} }
|
|
@@ -716,59 +715,115 @@ function DynamicFormComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
716
715
|
i0.ɵɵadvance();
|
|
717
716
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(2, 1, errors_r35));
|
|
718
717
|
} }
|
|
719
|
-
dayjs.extend(utc);
|
|
720
718
|
dayjs.extend(timezone);
|
|
721
719
|
dayjs.extend(customParseFormat);
|
|
722
720
|
class DynamicFormComponent {
|
|
721
|
+
// Backward compatibility: handle both signal and property access
|
|
722
|
+
get formFieldsArray() {
|
|
723
|
+
return this.formFields();
|
|
724
|
+
}
|
|
723
725
|
constructor() {
|
|
724
726
|
/**
|
|
725
727
|
* formFields: Dynamic fields recieved from the API metadata to build a dynamic form
|
|
726
728
|
* formValues: Holds the value of the dynamic form with "key" being dynamic field "title"
|
|
727
729
|
* and value being the user input.
|
|
728
730
|
*/
|
|
729
|
-
this.formFields = [];
|
|
730
|
-
this.formValues = {};
|
|
731
|
+
this.formFields = input([]);
|
|
732
|
+
this.formValues = input({});
|
|
731
733
|
// Need to deprecate these inputs and use constants.
|
|
732
|
-
this.activeBtnIconUrl = "";
|
|
733
|
-
this.calendarIconUrl = "";
|
|
734
|
-
this.removeIconUrl = "";
|
|
735
|
-
this.removeSepratorForSubFields = false;
|
|
734
|
+
this.activeBtnIconUrl = input("");
|
|
735
|
+
this.calendarIconUrl = input("");
|
|
736
|
+
this.removeIconUrl = input("");
|
|
737
|
+
this.removeSepratorForSubFields = input(false);
|
|
738
|
+
/**
|
|
739
|
+
* dynamicForm: Constructed using formFields and formValues(in case of edit)
|
|
740
|
+
*/
|
|
736
741
|
/**
|
|
737
742
|
* formUpdated: Emits formValues Object whenever there is a change in the dynamic form.
|
|
738
743
|
*/
|
|
739
|
-
this.formUpdated =
|
|
744
|
+
this.formUpdated = output();
|
|
740
745
|
/**
|
|
741
746
|
* formValid: Emits boolean depending on validity of the form
|
|
742
747
|
*/
|
|
743
|
-
this.formValid =
|
|
748
|
+
this.formValid = output();
|
|
744
749
|
/**
|
|
745
750
|
* formInitialized: Emits dynamic form API on form initilization
|
|
746
751
|
*/
|
|
747
|
-
this.formInitialized =
|
|
748
|
-
this.fieldRemoved =
|
|
752
|
+
this.formInitialized = output();
|
|
753
|
+
this.fieldRemoved = output();
|
|
754
|
+
// Signal-based state management
|
|
755
|
+
this.dynamicFormSignal = signal(null);
|
|
756
|
+
this.dynamicFormAPISignal = signal(null);
|
|
757
|
+
this.valueChangesSubscriptionSignal = signal(null);
|
|
758
|
+
// Computed properties for template access
|
|
759
|
+
this.dynamicForm = computed(() => this.dynamicFormSignal());
|
|
760
|
+
this.dynamicFormAPI = computed(() => this.dynamicFormAPISignal());
|
|
761
|
+
this.valueChangesSubscription$ = computed(() => this.valueChangesSubscriptionSignal());
|
|
762
|
+
// Watch for changes in input signals and update the form accordingly
|
|
763
|
+
effect(() => {
|
|
764
|
+
const formFields = this.formFields();
|
|
765
|
+
const formValues = this.formValues();
|
|
766
|
+
// Only update if we have form fields (formValues can be empty)
|
|
767
|
+
if (formFields) {
|
|
768
|
+
// Use untracked to prevent infinite loops when setting signals
|
|
769
|
+
untracked(() => {
|
|
770
|
+
const form = this.generateDynamicForm(formFields, formValues);
|
|
771
|
+
this.dynamicFormSignal.set(form);
|
|
772
|
+
// Re-subscribe to form changes
|
|
773
|
+
this.valueChangesSubscriptionSignal()?.unsubscribe();
|
|
774
|
+
this.valueChangesSubscriptionSignal.set(form.valueChanges.subscribe(formValue => {
|
|
775
|
+
this.onFormValueChanges();
|
|
776
|
+
}));
|
|
777
|
+
// Emit form validity status
|
|
778
|
+
this.formValid.emit(form.valid);
|
|
779
|
+
// Update the API with the new form
|
|
780
|
+
this.dynamicFormAPISignal.set({
|
|
781
|
+
defaultFormValues: () => {
|
|
782
|
+
return this.generateDynamicFieldsValueObject(form.value.dynamicFields);
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
});
|
|
749
788
|
}
|
|
750
789
|
ngOnInit() {
|
|
751
|
-
// Building the form
|
|
752
|
-
|
|
790
|
+
// Building the form with proper null checks
|
|
791
|
+
const formFields = this.formFields() || [];
|
|
792
|
+
const formValues = this.formValues() || {};
|
|
793
|
+
// Only create form if we have form fields
|
|
794
|
+
if (formFields.length > 0) {
|
|
795
|
+
const form = this.generateDynamicForm(formFields, formValues);
|
|
796
|
+
this.dynamicFormSignal.set(form);
|
|
797
|
+
}
|
|
798
|
+
else {
|
|
799
|
+
// Create an empty form as fallback
|
|
800
|
+
const emptyForm = new UntypedFormGroup({
|
|
801
|
+
dynamicFields: new UntypedFormArray([])
|
|
802
|
+
});
|
|
803
|
+
this.dynamicFormSignal.set(emptyForm);
|
|
804
|
+
}
|
|
753
805
|
// Subscribing to form changes and emiting values.
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
806
|
+
const currentForm = this.dynamicFormSignal();
|
|
807
|
+
if (currentForm) {
|
|
808
|
+
this.valueChangesSubscriptionSignal.set(currentForm.valueChanges.subscribe(formValue => {
|
|
809
|
+
this.onFormValueChanges();
|
|
810
|
+
}));
|
|
811
|
+
}
|
|
757
812
|
//api to expose functions
|
|
758
|
-
this.
|
|
813
|
+
this.dynamicFormAPISignal.set({
|
|
759
814
|
defaultFormValues: () => {
|
|
760
|
-
return this.generateDynamicFieldsValueObject(this.dynamicForm.value.dynamicFields);
|
|
815
|
+
return this.generateDynamicFieldsValueObject(this.dynamicForm().value.dynamicFields);
|
|
761
816
|
}
|
|
762
|
-
};
|
|
763
|
-
this.formInitialized.emit(this.dynamicFormAPI);
|
|
764
|
-
this.formValid.emit(this.dynamicForm.valid);
|
|
817
|
+
});
|
|
818
|
+
this.formInitialized.emit(this.dynamicFormAPI());
|
|
819
|
+
this.formValid.emit(this.dynamicForm().valid);
|
|
765
820
|
}
|
|
766
821
|
ngOnDestroy() {
|
|
767
|
-
this.valueChangesSubscription
|
|
822
|
+
this.valueChangesSubscription$()?.unsubscribe();
|
|
768
823
|
}
|
|
769
824
|
onFormValueChanges() {
|
|
770
|
-
let formValues = this.generateDynamicFieldsValueObject(this.dynamicForm.value.dynamicFields);
|
|
771
|
-
this.formValid.emit(this.dynamicForm.valid);
|
|
825
|
+
let formValues = this.generateDynamicFieldsValueObject(this.dynamicForm().value.dynamicFields);
|
|
826
|
+
this.formValid.emit(this.dynamicForm().valid);
|
|
772
827
|
this.formUpdated.emit(formValues);
|
|
773
828
|
console.log(formValues);
|
|
774
829
|
}
|
|
@@ -777,11 +832,11 @@ class DynamicFormComponent {
|
|
|
777
832
|
formValues.forEach((fieldValue, index) => {
|
|
778
833
|
if (typeof fieldValue?.value === 'string')
|
|
779
834
|
fieldValue.value = fieldValue?.value?.trim();
|
|
780
|
-
let formattedValue = this.mapFormFieldToFormValue(this.formFields[index], fieldValue.value);
|
|
835
|
+
let formattedValue = this.mapFormFieldToFormValue(this.formFields()[index], fieldValue.value);
|
|
781
836
|
if (fieldValue.subFields?.length > 0) {
|
|
782
837
|
let formattedSubFieldsValues = {};
|
|
783
|
-
let subField = this.formFields[index].subFields;
|
|
784
|
-
if (this.formFields[index].fieldType === 'singleSelect' || this.formFields[index].fieldType === 'multiSelect') {
|
|
838
|
+
let subField = this.formFields()[index].subFields;
|
|
839
|
+
if (this.formFields()[index].fieldType === 'singleSelect' || this.formFields()[index].fieldType === 'multiSelect') {
|
|
785
840
|
subField = subField.filter((subField) => subField.parentConfigValue === fieldValue.value.value);
|
|
786
841
|
}
|
|
787
842
|
fieldValue.subFields.forEach((subFieldValue, subIndex) => {
|
|
@@ -790,13 +845,13 @@ class DynamicFormComponent {
|
|
|
790
845
|
subFieldValue.value = subFieldValue?.value?.trim();
|
|
791
846
|
formattedSubFieldsValues[subFormField.configName] = this.mapFormFieldToFormValue(subFormField, subFieldValue);
|
|
792
847
|
});
|
|
793
|
-
dynamicFieldsValue[this.formFields[index].configName] = {
|
|
848
|
+
dynamicFieldsValue[this.formFields()[index].configName] = {
|
|
794
849
|
value: formattedValue,
|
|
795
850
|
subFields: formattedSubFieldsValues
|
|
796
851
|
};
|
|
797
852
|
}
|
|
798
853
|
else {
|
|
799
|
-
dynamicFieldsValue[this.formFields[index].configName] = formattedValue;
|
|
854
|
+
dynamicFieldsValue[this.formFields()[index].configName] = formattedValue;
|
|
800
855
|
}
|
|
801
856
|
});
|
|
802
857
|
return dynamicFieldsValue;
|
|
@@ -804,7 +859,7 @@ class DynamicFormComponent {
|
|
|
804
859
|
generateDynamicForm(formFields, formValues) {
|
|
805
860
|
let formArray = new UntypedFormArray([]);
|
|
806
861
|
for (let field of formFields) {
|
|
807
|
-
let fieldValue = formValues[field.configName]
|
|
862
|
+
let fieldValue = formValues[field.configName];
|
|
808
863
|
let fieldControl = this.mapFormValueToFormField(field, fieldValue);
|
|
809
864
|
let subFieldsControls = this.generateSubDynamicFields(formValues, field, fieldControl.value);
|
|
810
865
|
formArray.push(new UntypedFormGroup({
|
|
@@ -817,7 +872,7 @@ class DynamicFormComponent {
|
|
|
817
872
|
});
|
|
818
873
|
}
|
|
819
874
|
getDynamicFieldsControls() {
|
|
820
|
-
return this.dynamicForm.get("dynamicFields");
|
|
875
|
+
return this.dynamicForm().get("dynamicFields");
|
|
821
876
|
}
|
|
822
877
|
updateSubDynamicFields(field, formGroup, value) {
|
|
823
878
|
if (field.subFields?.length > 0) {
|
|
@@ -898,10 +953,19 @@ class DynamicFormComponent {
|
|
|
898
953
|
control.setValue(formValue ? formValue : 0);
|
|
899
954
|
else if (formField.fieldInputType === "date") {
|
|
900
955
|
if (formValue && typeof formValue === "number") {
|
|
901
|
-
|
|
956
|
+
const timezone = (formField.fieldConfig && formField.fieldConfig.timezone) || 'Asia/Kolkata';
|
|
957
|
+
const format = (formField.fieldConfig && formField.fieldConfig.format) || 'DD/MM/YYYY';
|
|
958
|
+
control.setValue(dayjs(formValue).tz(timezone).format(format));
|
|
959
|
+
}
|
|
960
|
+
else if (formValue && typeof formValue === "string") {
|
|
961
|
+
const timezone = (formField.fieldConfig && formField.fieldConfig.timezone) || 'Asia/Kolkata';
|
|
962
|
+
const format = (formField.fieldConfig && formField.fieldConfig.format) || 'DD/MM/YYYY';
|
|
963
|
+
control.setValue(dayjs.tz(formValue, format, timezone).format(format));
|
|
902
964
|
}
|
|
903
965
|
else {
|
|
904
|
-
|
|
966
|
+
const timezone = (formField.fieldConfig && formField.fieldConfig.timezone) || 'Asia/Kolkata';
|
|
967
|
+
const format = (formField.fieldConfig && formField.fieldConfig.format) || 'DD/MM/YYYY';
|
|
968
|
+
control.setValue(dayjs().tz(timezone).format(format));
|
|
905
969
|
}
|
|
906
970
|
}
|
|
907
971
|
}
|
|
@@ -948,7 +1012,9 @@ class DynamicFormComponent {
|
|
|
948
1012
|
else if (formField.fieldInputType === "number")
|
|
949
1013
|
return +formValue;
|
|
950
1014
|
else if (formField.fieldInputType === "date") {
|
|
951
|
-
|
|
1015
|
+
const format = (formField.fieldConfig && formField.fieldConfig.format) || 'DD/MM/YYYY';
|
|
1016
|
+
const timezone = (formField.fieldConfig && formField.fieldConfig.timezone) || 'Asia/Kolkata';
|
|
1017
|
+
return dayjs.tz(formValue, format, timezone).valueOf();
|
|
952
1018
|
}
|
|
953
1019
|
}
|
|
954
1020
|
else if (formField.fieldType === "singleSelect") {
|
|
@@ -983,7 +1049,7 @@ class DynamicFormComponent {
|
|
|
983
1049
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customSingleSelectRadio = _t.first);
|
|
984
1050
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customMultiSelectCheckbox = _t.first);
|
|
985
1051
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customMultiSelectDropdown = _t.first);
|
|
986
|
-
} }, inputs: { formFields: "formFields", formValues: "formValues", activeBtnIconUrl: "activeBtnIconUrl", calendarIconUrl: "calendarIconUrl", removeIconUrl: "removeIconUrl", removeSepratorForSubFields: "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, "ngModelChange", "type", "formControl", "ngStyle", "placeholder", "min"], [3, "ngTemplateOutlet", "ngTemplateOutletContext", 4, "ngIf"], ["type", "text", 1, "input-field", "ip-textarea", 3, "ngModelChange", "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) {
|
|
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, "ngModelChange", "type", "formControl", "ngStyle", "placeholder", "min"], [3, "ngTemplateOutlet", "ngTemplateOutletContext", 4, "ngIf"], ["type", "text", 1, "input-field", "ip-textarea", 3, "ngModelChange", "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) {
|
|
987
1053
|
i0.ɵɵelementStart(0, "form", 11);
|
|
988
1054
|
i0.ɵɵelementContainerStart(1, 12);
|
|
989
1055
|
i0.ɵɵtemplate(2, DynamicFormComponent_ng_container_2_Template, 3, 8, "ng-container", 13);
|
|
@@ -991,35 +1057,15 @@ class DynamicFormComponent {
|
|
|
991
1057
|
i0.ɵɵelementEnd();
|
|
992
1058
|
i0.ɵɵtemplate(3, DynamicFormComponent_ng_template_3_Template, 8, 8, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(5, DynamicFormComponent_ng_template_5_Template, 3, 3, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
993
1059
|
} if (rf & 2) {
|
|
994
|
-
i0.ɵɵproperty("formGroup", ctx.dynamicForm);
|
|
1060
|
+
i0.ɵɵproperty("formGroup", ctx.dynamicForm());
|
|
995
1061
|
i0.ɵɵadvance(2);
|
|
996
1062
|
i0.ɵɵproperty("ngForOf", ctx.getDynamicFieldsControls().controls);
|
|
997
|
-
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i2.ɵNgNoValidate, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormControlDirective, i2.FormGroupDirective, i2.FormGroupName, i2.FormArrayName, i3.DropdownComponent, i4.SwitchComponent, i5.MultiSelectDropdownComponent, i6.TzDatepickerDirective, i1.KeyValuePipe], styles: ["
|
|
1063
|
+
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i2.ɵNgNoValidate, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormControlDirective, i2.FormGroupDirective, i2.FormGroupName, i2.FormArrayName, i3.DropdownComponent, i4.SwitchComponent, i5.MultiSelectDropdownComponent, i6.TzDatepickerDirective, i1.KeyValuePipe], styles: ["p[_ngcontent-%COMP%]{margin:0;cursor:default} .main-container{margin:0;max-width:100%}.sub-dynamic-form[_ngcontent-%COMP%]{padding-left:24px;border-bottom:1px solid var(--grey-seperators)}.dynamic-field[_ngcontent-%COMP%] .container{height:32px!important}.single-line-field-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:28px 16px;border-bottom:1px solid var(--grey-seperators)}.multi-line-field-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:flex-start;padding:28px 16px;flex-wrap:wrap;border-bottom:1px solid var(--grey-seperators)}.field-title-sm[_ngcontent-%COMP%]{margin-bottom:8px;cursor:default}.input-field[_ngcontent-%COMP%]{width:100%;background-color:var(--grey-bg-1);border:1px solid var(--grey-seperators);border-radius:6px}.ip-text[_ngcontent-%COMP%]{height:44px;padding:8px 12px}.ip-textarea[_ngcontent-%COMP%]{max-height:94px;padding:8px}input[_ngcontent-%COMP%]:focus{outline:none}input[_ngcontent-%COMP%]::placeholder{color:var(--grey-seperators)}textarea[_ngcontent-%COMP%]:focus{outline:none}.date-picker-container[_ngcontent-%COMP%]{position:relative;width:140px}.date-picker-container[_ngcontent-%COMP%] .date-picker[_ngcontent-%COMP%]{cursor:pointer;height:32px;width:100%;font-size:14px;border-radius:6px;padding:0 12px;border:1px solid var(--grey-seperators);inset:10px auto auto 80px;background-color:var(--text-white)}.date-picker-container[_ngcontent-%COMP%] .date-picker[_ngcontent-%COMP%]:hover{background-color:var(--grey-hover)}.date-picker-container[_ngcontent-%COMP%] .date-picker-icon[_ngcontent-%COMP%]{position:absolute;top:50%;right:12px;transform:translateY(-50%);cursor:pointer}form[_ngcontent-%COMP%] .dynamic-field[_ngcontent-%COMP%]:last-child{border-bottom:none!important}#checkboxes-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.radio-checkbox-common[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;cursor:pointer;margin-right:8px;margin-bottom:8px;background-color:var(--text-white);padding:12px 16px;border:1px solid var(--text-muted);border-radius:8px}.radio-checkbox-common[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--text-muted);cursor:pointer}.radio-checkbox-common[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:8px}.checkbox-active[_ngcontent-%COMP%]{background-color:var(--pmry-500)}.checkbox-active[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--text-white)}#error-messages-container[_ngcontent-%COMP%]{margin-top:4px;width:100%;display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}#error-messages-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--sem-error)}.removeable-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.removeable-container[_ngcontent-%COMP%] .remove-icon[_ngcontent-%COMP%]{cursor:pointer;margin-left:8px;max-width:24px}span[_ngcontent-%COMP%]{color:var(--sem-error)}"] }); }
|
|
998
1064
|
}
|
|
999
1065
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DynamicFormComponent, [{
|
|
1000
1066
|
type: Component,
|
|
1001
|
-
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: formFields[i],\n formGroup: fieldControl,\n control: fieldControl.controls.value\n }\"\n >\n </ng-container>\n <div class=\"sub-dynamic-form\" *ngIf=\"fieldControl?.value && (!!formFields[i]?.subFields && formFields[i]?.subFields?.length > 0 && matchParentConfig(formFields[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(formFields[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"] }]
|
|
1002
|
-
}], () => [], {
|
|
1003
|
-
type: Input
|
|
1004
|
-
}], formValues: [{
|
|
1005
|
-
type: Input
|
|
1006
|
-
}], activeBtnIconUrl: [{
|
|
1007
|
-
type: Input
|
|
1008
|
-
}], calendarIconUrl: [{
|
|
1009
|
-
type: Input
|
|
1010
|
-
}], removeIconUrl: [{
|
|
1011
|
-
type: Input
|
|
1012
|
-
}], removeSepratorForSubFields: [{
|
|
1013
|
-
type: Input
|
|
1014
|
-
}], formUpdated: [{
|
|
1015
|
-
type: Output
|
|
1016
|
-
}], formValid: [{
|
|
1017
|
-
type: Output
|
|
1018
|
-
}], formInitialized: [{
|
|
1019
|
-
type: Output
|
|
1020
|
-
}], fieldRemoved: [{
|
|
1021
|
-
type: Output
|
|
1022
|
-
}], customInputTextNumber: [{
|
|
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: ["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(--grey-seperators)}.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(--grey-seperators)}.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(--grey-seperators)}.field-title-sm{margin-bottom:8px;cursor:default}.input-field{width:100%;background-color:var(--grey-bg-1);border:1px solid var(--grey-seperators);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(--grey-seperators)}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(--grey-seperators);inset:10px auto auto 80px;background-color:var(--text-white)}.date-picker-container .date-picker:hover{background-color:var(--grey-hover)}.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(--text-white);padding:12px 16px;border:1px solid var(--text-muted);border-radius:8px}.radio-checkbox-common p{color:var(--text-muted);cursor:pointer}.radio-checkbox-common img{margin-right:8px}.checkbox-active{background-color:var(--pmry-500)}.checkbox-active p{color:var(--text-white)}#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(--sem-error)}.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(--sem-error)}\n"] }]
|
|
1068
|
+
}], () => [], { customInputTextNumber: [{
|
|
1023
1069
|
type: ContentChild,
|
|
1024
1070
|
args: ["customInputTextNumber", { static: false }]
|
|
1025
1071
|
}], customInputTextarea: [{
|