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.
Files changed (185) hide show
  1. package/action-list/action-list.component.d.ts +17 -15
  2. package/async-search-dropdown/async-dropdown.component.d.ts +43 -61
  3. package/button/button.component.d.ts +35 -13
  4. package/button/button.directive.d.ts +10 -8
  5. package/button/button.directive.scss +13 -15
  6. package/checkbox/checkbox.component.d.ts +15 -12
  7. package/chip/chip.component.d.ts +9 -11
  8. package/datepicker_v2/models/dp-config.model.d.ts +1 -0
  9. package/datepicker_v2/tz-datepicker.directive.d.ts +15 -18
  10. package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +42 -21
  11. package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +12 -14
  12. package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +46 -23
  13. package/drawer/drawer-body/drawer-body.component.d.ts +2 -2
  14. package/drawer/drawer.scss +1 -1
  15. package/dropdown/calculate-container-height.directive.d.ts +7 -8
  16. package/dropdown/dropdown.component.d.ts +41 -49
  17. package/dynamic-form/dynamic-form.component.d.ts +20 -16
  18. package/esm2022/action-list/action-list.component.mjs +113 -90
  19. package/esm2022/async-search-dropdown/async-dropdown.component.mjs +257 -327
  20. package/esm2022/button/button.component.mjs +56 -49
  21. package/esm2022/button/button.directive.mjs +36 -40
  22. package/esm2022/checkbox/checkbox.component.mjs +75 -70
  23. package/esm2022/chip/chip.component.mjs +20 -33
  24. package/esm2022/datepicker_v2/models/dp-config.model.mjs +1 -1
  25. package/esm2022/datepicker_v2/tz-datepicker.directive.mjs +42 -71
  26. package/esm2022/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +203 -173
  27. package/esm2022/datepicker_v2/utils/index.mjs +2 -1
  28. package/esm2022/daterangepicker_v2/tz-daterangepicker.directive.mjs +26 -51
  29. package/esm2022/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +283 -236
  30. package/esm2022/drawer/drawer-body/drawer-body.component.mjs +8 -7
  31. package/esm2022/dropdown/calculate-container-height.directive.mjs +25 -22
  32. package/esm2022/dropdown/dropdown.component.mjs +163 -187
  33. package/esm2022/dynamic-form/dynamic-form.component.mjs +119 -73
  34. package/esm2022/fab/fab.component.mjs +30 -34
  35. package/esm2022/filter/filter-panel/filter-panel.component.mjs +61 -59
  36. package/esm2022/input/directives/input/input.directive.mjs +22 -26
  37. package/esm2022/input/mis-input.component.mjs +42 -46
  38. package/esm2022/input-stepper/input-stepper/input-stepper.component.mjs +42 -52
  39. package/esm2022/loader/loader.component.mjs +8 -11
  40. package/esm2022/mobile-filter/mobile-filter.component.mjs +62 -62
  41. package/esm2022/modal/module-wrapper/module-wrapper.component.mjs +11 -9
  42. package/esm2022/multi-select-dropdown/multi-select-dropdown.component.mjs +235 -281
  43. package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.component.mjs +250 -287
  44. package/esm2022/phone-input/phone-input.component.mjs +21 -43
  45. package/esm2022/public-api.mjs +1 -1
  46. package/esm2022/radio-button/radio-button.component.mjs +15 -27
  47. package/esm2022/ske-loader/ske-loader.component.mjs +15 -29
  48. package/esm2022/slider/slider.component.mjs +23 -33
  49. package/esm2022/slider/slider.module.mjs +4 -11
  50. package/esm2022/snackbar/snackbar/snackbar.component.mjs +21 -15
  51. package/esm2022/snackbar/snackbar.service.mjs +3 -2
  52. package/esm2022/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +231 -344
  53. package/esm2022/specificdatepicker/tz-specificdatepicker.directive.mjs +77 -105
  54. package/esm2022/star-rating/star-rating.component.mjs +58 -72
  55. package/esm2022/switch/switch.component.mjs +34 -36
  56. package/esm2022/table/actions-cell/actions-cell.component.mjs +56 -55
  57. package/esm2022/table/custom-table-cell.directive.mjs +22 -18
  58. package/esm2022/table/filter/filter.component.mjs +60 -42
  59. package/esm2022/table/sort-icons.directive.mjs +16 -8
  60. package/esm2022/table/sub-table/sub-table.component.mjs +42 -45
  61. package/esm2022/table/table.component.mjs +182 -166
  62. package/esm2022/timepicker/timepicker.component.mjs +245 -160
  63. package/esm2022/timepicker/timepicker.directive.mjs +3 -2
  64. package/esm2022/timerangepicker/timerangepicker.component.mjs +200 -159
  65. package/esm2022/toast/toast.component.mjs +7 -8
  66. package/esm2022/toast/toast.data.service.mjs +15 -9
  67. package/esm2022/tooltip/tooltip-container/tooltip.component.mjs +12 -12
  68. package/esm2022/tooltip/tooltip.directive.mjs +4 -4
  69. package/esm2022/virtual-scroll/virtual-scroll.component.mjs +57 -59
  70. package/fab/fab.component.d.ts +12 -8
  71. package/fesm2022/mis-crystal-design-system-action-list.mjs +112 -89
  72. package/fesm2022/mis-crystal-design-system-action-list.mjs.map +1 -1
  73. package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs +254 -325
  74. package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs.map +1 -1
  75. package/fesm2022/mis-crystal-design-system-button.mjs +89 -86
  76. package/fesm2022/mis-crystal-design-system-button.mjs.map +1 -1
  77. package/fesm2022/mis-crystal-design-system-checkbox.mjs +74 -69
  78. package/fesm2022/mis-crystal-design-system-checkbox.mjs.map +1 -1
  79. package/fesm2022/mis-crystal-design-system-chip.mjs +19 -32
  80. package/fesm2022/mis-crystal-design-system-chip.mjs.map +1 -1
  81. package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs +243 -241
  82. package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
  83. package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs +306 -284
  84. package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
  85. package/fesm2022/mis-crystal-design-system-drawer.mjs +7 -6
  86. package/fesm2022/mis-crystal-design-system-drawer.mjs.map +1 -1
  87. package/fesm2022/mis-crystal-design-system-dropdown.mjs +184 -205
  88. package/fesm2022/mis-crystal-design-system-dropdown.mjs.map +1 -1
  89. package/fesm2022/mis-crystal-design-system-dynamic-form.mjs +119 -73
  90. package/fesm2022/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
  91. package/fesm2022/mis-crystal-design-system-fab.mjs +29 -33
  92. package/fesm2022/mis-crystal-design-system-fab.mjs.map +1 -1
  93. package/fesm2022/mis-crystal-design-system-filter.mjs +60 -58
  94. package/fesm2022/mis-crystal-design-system-filter.mjs.map +1 -1
  95. package/fesm2022/mis-crystal-design-system-input-stepper.mjs +41 -51
  96. package/fesm2022/mis-crystal-design-system-input-stepper.mjs.map +1 -1
  97. package/fesm2022/mis-crystal-design-system-input.mjs +62 -71
  98. package/fesm2022/mis-crystal-design-system-input.mjs.map +1 -1
  99. package/fesm2022/mis-crystal-design-system-loader.mjs +7 -10
  100. package/fesm2022/mis-crystal-design-system-loader.mjs.map +1 -1
  101. package/fesm2022/mis-crystal-design-system-mobile-filter.mjs +61 -61
  102. package/fesm2022/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
  103. package/fesm2022/mis-crystal-design-system-modal.mjs +10 -8
  104. package/fesm2022/mis-crystal-design-system-modal.mjs.map +1 -1
  105. package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs +233 -279
  106. package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs.map +1 -1
  107. package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs +249 -286
  108. package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs.map +1 -1
  109. package/fesm2022/mis-crystal-design-system-phone-input.mjs +20 -42
  110. package/fesm2022/mis-crystal-design-system-phone-input.mjs.map +1 -1
  111. package/fesm2022/mis-crystal-design-system-radio-button.mjs +14 -26
  112. package/fesm2022/mis-crystal-design-system-radio-button.mjs.map +1 -1
  113. package/fesm2022/mis-crystal-design-system-ske-loader.mjs +14 -28
  114. package/fesm2022/mis-crystal-design-system-ske-loader.mjs.map +1 -1
  115. package/fesm2022/mis-crystal-design-system-slider.mjs +25 -42
  116. package/fesm2022/mis-crystal-design-system-slider.mjs.map +1 -1
  117. package/fesm2022/mis-crystal-design-system-snackbar.mjs +22 -15
  118. package/fesm2022/mis-crystal-design-system-snackbar.mjs.map +1 -1
  119. package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs +305 -446
  120. package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
  121. package/fesm2022/mis-crystal-design-system-star-rating.mjs +57 -71
  122. package/fesm2022/mis-crystal-design-system-star-rating.mjs.map +1 -1
  123. package/fesm2022/mis-crystal-design-system-switch.mjs +33 -35
  124. package/fesm2022/mis-crystal-design-system-switch.mjs.map +1 -1
  125. package/fesm2022/mis-crystal-design-system-table.mjs +368 -324
  126. package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
  127. package/fesm2022/mis-crystal-design-system-timepicker.mjs +246 -160
  128. package/fesm2022/mis-crystal-design-system-timepicker.mjs.map +1 -1
  129. package/fesm2022/mis-crystal-design-system-timerangepicker.mjs +199 -158
  130. package/fesm2022/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
  131. package/fesm2022/mis-crystal-design-system-toast.mjs +19 -14
  132. package/fesm2022/mis-crystal-design-system-toast.mjs.map +1 -1
  133. package/fesm2022/mis-crystal-design-system-tooltip.mjs +14 -14
  134. package/fesm2022/mis-crystal-design-system-tooltip.mjs.map +1 -1
  135. package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs +57 -59
  136. package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs.map +1 -1
  137. package/fesm2022/mis-crystal-design-system.mjs.map +1 -1
  138. package/filter/filter-panel/filter-panel.component.d.ts +14 -14
  139. package/input/directives/input/input.directive.d.ts +6 -10
  140. package/input/mis-input.component.d.ts +12 -13
  141. package/input/mis-input.component.scss +18 -18
  142. package/input-stepper/input-stepper/input-stepper.component.d.ts +8 -7
  143. package/loader/loader.component.d.ts +3 -6
  144. package/mobile-filter/mobile-filter.component.d.ts +15 -15
  145. package/modal/modal.scss +1 -1
  146. package/modal/module-wrapper/module-wrapper.component.d.ts +2 -3
  147. package/multi-select-dropdown/multi-select-dropdown.component.d.ts +89 -51
  148. package/nested-multi-select-dropdown/nested-multi-select-dropdown.component.d.ts +99 -56
  149. package/package.json +17 -23
  150. package/phone-input/phone-input.component.d.ts +16 -18
  151. package/radio-button/radio-button.component.d.ts +9 -11
  152. package/ske-loader/ske-loader.component.d.ts +8 -11
  153. package/slider/slider.component.d.ts +8 -11
  154. package/slider/slider.module.d.ts +1 -2
  155. package/snackbar/snackbar/snackbar.component.d.ts +3 -3
  156. package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +35 -35
  157. package/specificdatepicker/tz-specificdatepicker.directive.d.ts +24 -28
  158. package/star-rating/star-rating.component.d.ts +18 -18
  159. package/styles/mis-color-constants.scss +0 -204
  160. package/styles/mis-icons.scss +56 -56
  161. package/styles/mis-old-icon-styles.scss +21 -21
  162. package/switch/switch.component.d.ts +8 -10
  163. package/table/actions-cell/actions-cell.component.d.ts +14 -14
  164. package/table/custom-table-cell.directive.d.ts +3 -3
  165. package/table/filter/filter.component.d.ts +9 -9
  166. package/table/sub-table/sub-table.component.d.ts +5 -5
  167. package/table/table.component.d.ts +38 -35
  168. package/timepicker/timepicker.component.d.ts +29 -28
  169. package/timerangepicker/timerangepicker.component.d.ts +36 -33
  170. package/toast/toast.data.service.d.ts +1 -1
  171. package/tooltip/tooltip-container/tooltip.component.d.ts +4 -4
  172. package/virtual-scroll/virtual-scroll.component.d.ts +8 -9
  173. package/dynamic-theme/branding.types.d.ts +0 -84
  174. package/dynamic-theme/dynamic-theme.module.d.ts +0 -9
  175. package/dynamic-theme/dynamic-theme.service.d.ts +0 -89
  176. package/dynamic-theme/index.d.ts +0 -1
  177. package/dynamic-theme/public_api.d.ts +0 -3
  178. package/esm2022/dynamic-theme/branding.types.mjs +0 -93
  179. package/esm2022/dynamic-theme/dynamic-theme.module.mjs +0 -25
  180. package/esm2022/dynamic-theme/dynamic-theme.service.mjs +0 -193
  181. package/esm2022/dynamic-theme/index.mjs +0 -2
  182. package/esm2022/dynamic-theme/mis-crystal-design-system-dynamic-theme.mjs +0 -5
  183. package/esm2022/dynamic-theme/public_api.mjs +0 -4
  184. package/fesm2022/mis-crystal-design-system-dynamic-theme.mjs +0 -313
  185. package/fesm2022/mis-crystal-design-system-dynamic-theme.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import * as i1 from '@angular/cdk/overlay';
2
- import { ConnectionPositionPair, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
3
- import { TemplatePortal } from '@angular/cdk/portal';
4
1
  import * as i0 from '@angular/core';
5
- import { EventEmitter, Component, Input, ViewChild, ContentChild, Output, HostListener, NgModule } from '@angular/core';
2
+ import { input, output, signal, effect, Component, ViewChild, ContentChild, HostListener, NgModule } from '@angular/core';
6
3
  import * as i3 from '@angular/forms';
7
4
  import { UntypedFormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
8
- import { Subject, merge } from 'rxjs';
5
+ import * as i1 from '@angular/cdk/overlay';
6
+ import { ConnectionPositionPair, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
7
+ import { TemplatePortal } from '@angular/cdk/portal';
9
8
  import { tap, debounceTime, distinctUntilChanged } from 'rxjs/operators';
9
+ import { Subject, merge } from 'rxjs';
10
10
  import * as i2 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
12
12
  import * as i4 from 'mis-crystal-design-system/loader';
@@ -20,410 +20,384 @@ const _c2 = ["ddBtn"];
20
20
  const _c3 = ["input"];
21
21
  const _c4 = ["dd"];
22
22
  const _c5 = (a0, a1, a2) => ({ opened: a0, disabled: a1, readonly: a2 });
23
- const _c6 = (a0, a1) => ({ "chip-md": a0, "chip-sm": a1 });
24
- const _c7 = (a0, a1) => ({ "h6": a0, "h8-b": a1 });
25
- const _c8 = () => ({ "margin-right": "4px" });
26
- const _c9 = a0 => ({ "cursor": "pointer", "font-size": a0 });
27
- const _c10 = (a0, a1) => ({ "ip-md": a0, "ip-sm": a1 });
28
- const _c11 = (a0, a1) => ({ "max-height": a0, "width": a1 });
29
- const _c12 = a0 => ({ "dd-list-pd": a0 });
30
- const _c13 = a0 => ({ $implicit: a0 });
23
+ const _c6 = (a0, a1) => ({ "ip-md": a0, "ip-sm": a1 });
24
+ const _c7 = (a0, a1) => ({ "chip-md": a0, "chip-sm": a1 });
25
+ const _c8 = (a0, a1) => ({ "h6": a0, "h8-b": a1 });
26
+ const _c9 = a0 => ({ cursor: "pointer", "font-size": a0 });
27
+ const _c10 = (a0, a1) => ({ "max-height": a0, "width": a1 });
28
+ const _c11 = a0 => ({ "dd-list-pd": a0 });
29
+ const _c12 = a0 => ({ $implicit: a0 });
31
30
  function AsyncDropdownComponent_div_2_div_1_Template(rf, ctx) { if (rf & 1) {
32
- const _r1 = i0.ɵɵgetCurrentView();
33
- i0.ɵɵelementStart(0, "div", 15)(1, "span", 16);
31
+ const _r2 = i0.ɵɵgetCurrentView();
32
+ i0.ɵɵelementStart(0, "div", 14)(1, "span", 15);
34
33
  i0.ɵɵtext(2);
35
34
  i0.ɵɵelementEnd();
36
- i0.ɵɵelementStart(3, "span", 17);
37
- i0.ɵɵlistener("click", function AsyncDropdownComponent_div_2_div_1_Template_span_click_3_listener() { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.removeItem(item_r2)); })("keyup.enter", function AsyncDropdownComponent_div_2_div_1_Template_span_keyup_enter_3_listener() { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.removeItem(item_r2)); });
35
+ i0.ɵɵelementStart(3, "span", 16);
36
+ i0.ɵɵlistener("click", function AsyncDropdownComponent_div_2_div_1_Template_span_click_3_listener() { const item_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.removeItem(item_r3)); })("keyup.enter", function AsyncDropdownComponent_div_2_div_1_Template_span_keyup_enter_3_listener() { const item_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.removeItem(item_r3)); });
38
37
  i0.ɵɵelementEnd()();
39
38
  } if (rf & 2) {
40
- const item_r2 = ctx.$implicit;
41
- const ctx_r2 = i0.ɵɵnextContext(2);
42
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(5, _c6, ctx_r2.size === "md", ctx_r2.size === "sm"));
39
+ const item_r3 = ctx.$implicit;
40
+ const ctx_r3 = i0.ɵɵnextContext(2);
41
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(4, _c7, ctx_r3.size() === "md", ctx_r3.size() === "sm"));
43
42
  i0.ɵɵadvance();
44
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(8, _c7, ctx_r2.size === "md", ctx_r2.size === "sm"))("ngStyle", i0.ɵɵpureFunction0(11, _c8));
43
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(7, _c8, ctx_r3.size() === "md", ctx_r3.size() === "sm"));
45
44
  i0.ɵɵadvance();
46
- i0.ɵɵtextInterpolate(item_r2[ctx_r2.displayKey]);
45
+ i0.ɵɵtextInterpolate1(" ", item_r3[ctx_r3.displayKey()], " ");
47
46
  i0.ɵɵadvance();
48
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(12, _c9, ctx_r2.size === "sm" ? "12px" : "14px"));
47
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(10, _c9, ctx_r3.size() === "sm" ? "12px" : "14px"));
49
48
  } }
50
49
  function AsyncDropdownComponent_div_2_Template(rf, ctx) { if (rf & 1) {
51
- i0.ɵɵelementStart(0, "div", 13);
52
- i0.ɵɵtemplate(1, AsyncDropdownComponent_div_2_div_1_Template, 4, 14, "div", 14);
50
+ i0.ɵɵelementStart(0, "div", 12);
51
+ i0.ɵɵtemplate(1, AsyncDropdownComponent_div_2_div_1_Template, 4, 12, "div", 13);
53
52
  i0.ɵɵelementEnd();
54
53
  } if (rf & 2) {
55
- const ctx_r2 = i0.ɵɵnextContext();
54
+ const ctx_r3 = i0.ɵɵnextContext();
56
55
  i0.ɵɵadvance();
57
- i0.ɵɵproperty("ngForOf", ctx_r2.selectedItems);
56
+ i0.ɵɵproperty("ngForOf", ctx_r3.selectedItems);
58
57
  } }
59
58
  function AsyncDropdownComponent_div_4_Template(rf, ctx) { if (rf & 1) {
60
- i0.ɵɵelementStart(0, "div", 18);
61
- i0.ɵɵelement(1, "img", 19);
59
+ i0.ɵɵelementStart(0, "div", 17);
60
+ i0.ɵɵelement(1, "img", 18);
62
61
  i0.ɵɵelementEnd();
63
62
  } if (rf & 2) {
64
- const ctx_r2 = i0.ɵɵnextContext();
63
+ const ctx_r3 = i0.ɵɵnextContext();
65
64
  i0.ɵɵadvance();
66
- i0.ɵɵproperty("src", ctx_r2.customPlaceholderIcon, i0.ɵɵsanitizeUrl);
65
+ i0.ɵɵproperty("src", ctx_r3.customPlaceholderIcon(), i0.ɵɵsanitizeUrl);
67
66
  } }
68
67
  function AsyncDropdownComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
69
- i0.ɵɵelement(0, "span", 20);
70
- } }
71
- function AsyncDropdownComponent_input_7_Template(rf, ctx) { if (rf & 1) {
72
- const _r4 = i0.ɵɵgetCurrentView();
73
- i0.ɵɵelementStart(0, "input", 21, 4);
74
- i0.ɵɵlistener("focus", function AsyncDropdownComponent_input_7_Template_input_focus_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.defaultCall()); })("keyup.enter", function AsyncDropdownComponent_input_7_Template_input_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.enablePopUpOnTab()); });
75
- i0.ɵɵelementEnd();
76
- } if (rf & 2) {
77
- const ctx_r2 = i0.ɵɵnextContext();
78
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(3, _c10, ctx_r2.size === "md", ctx_r2.size === "sm"))("placeholder", ctx_r2.placeholder)("formControl", ctx_r2.searchInput);
68
+ i0.ɵɵelement(0, "span", 19);
79
69
  } }
80
- function AsyncDropdownComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
70
+ function AsyncDropdownComponent_div_9_Template(rf, ctx) { if (rf & 1) {
81
71
  const _r5 = i0.ɵɵgetCurrentView();
82
- i0.ɵɵelementStart(0, "input", 22, 4);
83
- i0.ɵɵlistener("focus", function AsyncDropdownComponent_ng_template_8_Template_input_focus_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.defaultCall()); })("keyup.enter", function AsyncDropdownComponent_ng_template_8_Template_input_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.enablePopUpOnTab()); });
84
- i0.ɵɵelementEnd();
85
- } if (rf & 2) {
86
- const ctx_r2 = i0.ɵɵnextContext();
87
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(3, _c10, ctx_r2.size === "md", ctx_r2.size === "sm"))("placeholder", ctx_r2.placeholder)("formControl", ctx_r2.searchInput);
88
- } }
89
- function AsyncDropdownComponent_div_10_Template(rf, ctx) { if (rf & 1) {
90
- const _r6 = i0.ɵɵgetCurrentView();
91
- i0.ɵɵelementStart(0, "div", 23);
92
- i0.ɵɵlistener("click", function AsyncDropdownComponent_div_10_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.removeInputValue()); })("keyup.enter", function AsyncDropdownComponent_div_10_Template_div_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.removeInputValue()); });
72
+ i0.ɵɵelementStart(0, "div", 20);
73
+ i0.ɵɵlistener("click", function AsyncDropdownComponent_div_9_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.removeInputValue()); })("keyup.enter", function AsyncDropdownComponent_div_9_Template_div_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.removeInputValue()); });
93
74
  i0.ɵɵelementEnd();
94
75
  } }
95
- function AsyncDropdownComponent_ng_template_11_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
96
- i0.ɵɵelementContainer(0, 27);
76
+ function AsyncDropdownComponent_ng_template_10_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
77
+ i0.ɵɵelementContainer(0, 24);
97
78
  } if (rf & 2) {
98
- const ctx_r2 = i0.ɵɵnextContext(3);
99
- i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.customLoader);
79
+ const ctx_r3 = i0.ɵɵnextContext(3);
80
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r3.customLoader);
100
81
  } }
101
- function AsyncDropdownComponent_ng_template_11_ng_container_1_ng_template_2_div_0_Template(rf, ctx) { if (rf & 1) {
102
- i0.ɵɵelementStart(0, "div", 29);
103
- i0.ɵɵelement(1, "mis-loader", 30);
82
+ function AsyncDropdownComponent_ng_template_10_ng_container_1_ng_template_2_div_0_Template(rf, ctx) { if (rf & 1) {
83
+ i0.ɵɵelementStart(0, "div", 26);
84
+ i0.ɵɵelement(1, "mis-loader", 27);
104
85
  i0.ɵɵelementEnd();
105
86
  } if (rf & 2) {
106
87
  i0.ɵɵadvance();
107
88
  i0.ɵɵproperty("mobileView", true);
108
89
  } }
109
- function AsyncDropdownComponent_ng_template_11_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
110
- i0.ɵɵtemplate(0, AsyncDropdownComponent_ng_template_11_ng_container_1_ng_template_2_div_0_Template, 2, 1, "div", 28);
90
+ function AsyncDropdownComponent_ng_template_10_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
91
+ i0.ɵɵtemplate(0, AsyncDropdownComponent_ng_template_10_ng_container_1_ng_template_2_div_0_Template, 2, 1, "div", 25);
111
92
  } if (rf & 2) {
112
- const ctx_r2 = i0.ɵɵnextContext(3);
113
- i0.ɵɵproperty("ngIf", ctx_r2.loading && !ctx_r2.customLoader);
93
+ const ctx_r3 = i0.ɵɵnextContext(3);
94
+ i0.ɵɵproperty("ngIf", ctx_r3.loading() && !ctx_r3.customLoader);
114
95
  } }
115
- function AsyncDropdownComponent_ng_template_11_ng_container_1_Template(rf, ctx) { if (rf & 1) {
96
+ function AsyncDropdownComponent_ng_template_10_ng_container_1_Template(rf, ctx) { if (rf & 1) {
116
97
  i0.ɵɵelementContainerStart(0);
117
- i0.ɵɵtemplate(1, AsyncDropdownComponent_ng_template_11_ng_container_1_ng_container_1_Template, 1, 1, "ng-container", 26)(2, AsyncDropdownComponent_ng_template_11_ng_container_1_ng_template_2_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
98
+ i0.ɵɵtemplate(1, AsyncDropdownComponent_ng_template_10_ng_container_1_ng_container_1_Template, 1, 1, "ng-container", 23)(2, AsyncDropdownComponent_ng_template_10_ng_container_1_ng_template_2_Template, 1, 1, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
118
99
  i0.ɵɵelementContainerEnd();
119
100
  } if (rf & 2) {
120
- const defaultLoader_r7 = i0.ɵɵreference(3);
121
- const ctx_r2 = i0.ɵɵnextContext(2);
101
+ const defaultLoader_r6 = i0.ɵɵreference(3);
102
+ const ctx_r3 = i0.ɵɵnextContext(2);
122
103
  i0.ɵɵadvance();
123
- i0.ɵɵproperty("ngIf", ctx_r2.customLoader)("ngIfElse", defaultLoader_r7);
104
+ i0.ɵɵproperty("ngIf", ctx_r3.customLoader)("ngIfElse", defaultLoader_r6);
124
105
  } }
125
- function AsyncDropdownComponent_ng_template_11_ng_container_2_Template(rf, ctx) { if (rf & 1) {
106
+ function AsyncDropdownComponent_ng_template_10_ng_container_2_Template(rf, ctx) { if (rf & 1) {
126
107
  i0.ɵɵelementContainerStart(0);
127
- i0.ɵɵelementStart(1, "div", 29)(2, "p");
108
+ i0.ɵɵelementStart(1, "div", 26)(2, "p");
128
109
  i0.ɵɵtext(3, "Unknown error has occurred, ");
129
110
  i0.ɵɵelement(4, "br");
130
111
  i0.ɵɵtext(5, " Please try again later.");
131
112
  i0.ɵɵelementEnd()();
132
113
  i0.ɵɵelementContainerEnd();
133
114
  } }
134
- function AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_div_3_Template(rf, ctx) { if (rf & 1) {
135
- i0.ɵɵelementStart(0, "div", 35);
136
- i0.ɵɵelementContainer(1, 36);
137
- i0.ɵɵelementEnd();
115
+ function AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
116
+ i0.ɵɵelementContainerStart(0);
117
+ i0.ɵɵelementContainer(1, 32);
118
+ i0.ɵɵelementContainerEnd();
138
119
  } if (rf & 2) {
139
- const item_r9 = i0.ɵɵnextContext().$implicit;
140
- const ctx_r2 = i0.ɵɵnextContext(3);
141
- i0.ɵɵproperty("tabindex", ctx_r2.openPopUpOnTab ? 0 : -1);
120
+ const item_r8 = i0.ɵɵnextContext().$implicit;
121
+ const ctx_r3 = i0.ɵɵnextContext(3);
142
122
  i0.ɵɵadvance();
143
- i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.customItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c13, item_r9));
123
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r3.customItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c12, item_r8));
144
124
  } }
145
- function AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_ng_template_4_Template(rf, ctx) { if (rf & 1) {
146
- const _r10 = i0.ɵɵgetCurrentView();
147
- i0.ɵɵelement(0, "div", 33);
148
- i0.ɵɵelementStart(1, "div", 37);
149
- i0.ɵɵlistener("click", function AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_ng_template_4_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r10); const item_r9 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.selectData(item_r9, false)); })("keyup.enter", function AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_ng_template_4_Template_div_keyup_enter_1_listener() { i0.ɵɵrestoreView(_r10); const item_r9 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.selectData(item_r9, false)); });
150
- i0.ɵɵelementStart(2, "div", 38)(3, "div", 39);
125
+ function AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_ng_template_4_Template(rf, ctx) { if (rf & 1) {
126
+ const _r9 = i0.ɵɵgetCurrentView();
127
+ i0.ɵɵelement(0, "div", 30);
128
+ i0.ɵɵelementStart(1, "div", 33);
129
+ i0.ɵɵlistener("click", function AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_ng_template_4_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r9); const item_r8 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r3.selectData(item_r8, false)); })("keyup.enter", function AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_ng_template_4_Template_div_keyup_enter_1_listener() { i0.ɵɵrestoreView(_r9); const item_r8 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r3.selectData(item_r8, false)); });
130
+ i0.ɵɵelementStart(2, "div", 34)(3, "div", 35);
151
131
  i0.ɵɵtext(4);
152
132
  i0.ɵɵelementEnd();
153
- i0.ɵɵelementStart(5, "div", 40);
133
+ i0.ɵɵelementStart(5, "div", 36);
154
134
  i0.ɵɵtext(6);
155
135
  i0.ɵɵelementEnd()()();
156
136
  } if (rf & 2) {
157
- const item_r9 = i0.ɵɵnextContext().$implicit;
158
- const ctx_r2 = i0.ɵɵnextContext(3);
137
+ const item_r8 = i0.ɵɵnextContext().$implicit;
138
+ const ctx_r3 = i0.ɵɵnextContext(3);
159
139
  i0.ɵɵadvance();
160
- i0.ɵɵproperty("tabindex", ctx_r2.openPopUpOnTab ? 0 : -1);
140
+ i0.ɵɵproperty("tabindex", ctx_r3.openPopUpOnTab() ? 0 : -1);
161
141
  i0.ɵɵadvance(3);
162
- i0.ɵɵtextInterpolate1(" ", item_r9[ctx_r2.displayKey], " ");
142
+ i0.ɵɵtextInterpolate(item_r8[ctx_r3.displayKey()]);
163
143
  i0.ɵɵadvance(2);
164
- i0.ɵɵtextInterpolate1(" ", item_r9[ctx_r2.secondaryDisplayKey], " ");
144
+ i0.ɵɵtextInterpolate(item_r8[ctx_r3.secondaryDisplayKey()]);
165
145
  } }
166
- function AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
167
- const _r8 = i0.ɵɵgetCurrentView();
146
+ function AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
147
+ const _r7 = i0.ɵɵgetCurrentView();
168
148
  i0.ɵɵelementContainerStart(0);
169
- i0.ɵɵelementStart(1, "div", 32);
170
- i0.ɵɵlistener("click", function AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_Template_div_click_1_listener() { const item_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.selectData(item_r9, false)); })("keyup.enter", function AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_Template_div_keyup_enter_1_listener() { const item_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.selectData(item_r9, false)); });
171
- i0.ɵɵelement(2, "div", 33);
172
- i0.ɵɵtemplate(3, AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_div_3_Template, 2, 5, "div", 34)(4, AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_ng_template_4_Template, 7, 3, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
149
+ i0.ɵɵelementStart(1, "div", 29);
150
+ i0.ɵɵlistener("click", function AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_Template_div_click_1_listener() { const item_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r3 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r3.selectData(item_r8, false)); })("keyup.enter", function AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_Template_div_keyup_enter_1_listener() { const item_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r3 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r3.selectData(item_r8, false)); });
151
+ i0.ɵɵelement(2, "div", 30);
152
+ i0.ɵɵtemplate(3, AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_ng_container_3_Template, 2, 4, "ng-container", 31)(4, AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_ng_template_4_Template, 7, 3, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
173
153
  i0.ɵɵelementEnd();
174
154
  i0.ɵɵelementContainerEnd();
175
155
  } if (rf & 2) {
176
- const standardItem_r11 = i0.ɵɵreference(5);
177
- const ctx_r2 = i0.ɵɵnextContext(3);
156
+ const standardItem_r10 = i0.ɵɵreference(5);
157
+ const ctx_r3 = i0.ɵɵnextContext(3);
178
158
  i0.ɵɵadvance(3);
179
- i0.ɵɵproperty("ngIf", ctx_r2.customItem)("ngIfElse", standardItem_r11);
159
+ i0.ɵɵproperty("ngIf", ctx_r3.customItem)("ngIfElse", standardItem_r10);
180
160
  } }
181
- function AsyncDropdownComponent_ng_template_11_div_3_Template(rf, ctx) { if (rf & 1) {
161
+ function AsyncDropdownComponent_ng_template_10_div_3_Template(rf, ctx) { if (rf & 1) {
182
162
  i0.ɵɵelementStart(0, "div");
183
- i0.ɵɵtemplate(1, AsyncDropdownComponent_ng_template_11_div_3_ng_container_1_Template, 6, 2, "ng-container", 31);
163
+ i0.ɵɵtemplate(1, AsyncDropdownComponent_ng_template_10_div_3_ng_container_1_Template, 6, 2, "ng-container", 28);
184
164
  i0.ɵɵelementEnd();
185
165
  } if (rf & 2) {
186
- const ctx_r2 = i0.ɵɵnextContext(2);
166
+ const ctx_r3 = i0.ɵɵnextContext(2);
187
167
  i0.ɵɵadvance();
188
- i0.ɵɵproperty("ngForOf", ctx_r2.data);
168
+ i0.ɵɵproperty("ngForOf", ctx_r3.data());
189
169
  } }
190
- function AsyncDropdownComponent_ng_template_11_div_4_Template(rf, ctx) { if (rf & 1) {
191
- i0.ɵɵelementStart(0, "div")(1, "div", 41);
170
+ function AsyncDropdownComponent_ng_template_10_div_4_Template(rf, ctx) { if (rf & 1) {
171
+ i0.ɵɵelementStart(0, "div")(1, "div", 37);
192
172
  i0.ɵɵtext(2, "No Data Available");
193
173
  i0.ɵɵelementEnd()();
194
174
  } }
195
- function AsyncDropdownComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) {
196
- i0.ɵɵelementStart(0, "div", 24);
197
- i0.ɵɵtemplate(1, AsyncDropdownComponent_ng_template_11_ng_container_1_Template, 4, 2, "ng-container", 25)(2, AsyncDropdownComponent_ng_template_11_ng_container_2_Template, 6, 0, "ng-container", 25)(3, AsyncDropdownComponent_ng_template_11_div_3_Template, 2, 1, "div", 25)(4, AsyncDropdownComponent_ng_template_11_div_4_Template, 3, 0, "div", 25);
175
+ function AsyncDropdownComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
176
+ i0.ɵɵelementStart(0, "div", 21);
177
+ i0.ɵɵtemplate(1, AsyncDropdownComponent_ng_template_10_ng_container_1_Template, 4, 2, "ng-container", 22)(2, AsyncDropdownComponent_ng_template_10_ng_container_2_Template, 6, 0, "ng-container", 22)(3, AsyncDropdownComponent_ng_template_10_div_3_Template, 2, 1, "div", 22)(4, AsyncDropdownComponent_ng_template_10_div_4_Template, 3, 0, "div", 22);
198
178
  i0.ɵɵelementEnd();
199
179
  } if (rf & 2) {
200
- const ctx_r2 = i0.ɵɵnextContext();
201
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(7, _c11, ctx_r2.height, ctx_r2.dropdownListWidth))("ngClass", i0.ɵɵpureFunction1(10, _c12, ctx_r2.data.length === 0))("cdkTrapFocusAutoCapture", ctx_r2.openPopUpOnTab);
180
+ const ctx_r3 = i0.ɵɵnextContext();
181
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(7, _c10, ctx_r3.height(), ctx_r3.dropdownListWidth()))("ngClass", i0.ɵɵpureFunction1(10, _c11, ctx_r3.data().length === 0))("cdkTrapFocusAutoCapture", ctx_r3.openPopUpOnTab());
202
182
  i0.ɵɵadvance();
203
- i0.ɵɵproperty("ngIf", ctx_r2.loading);
183
+ i0.ɵɵproperty("ngIf", ctx_r3.loading());
204
184
  i0.ɵɵadvance();
205
- i0.ɵɵproperty("ngIf", ctx_r2.error);
185
+ i0.ɵɵproperty("ngIf", ctx_r3.error());
206
186
  i0.ɵɵadvance();
207
- i0.ɵɵproperty("ngIf", !ctx_r2.loading && !ctx_r2.error && ctx_r2.data.length > 0);
187
+ i0.ɵɵproperty("ngIf", !ctx_r3.loading() && !ctx_r3.error() && ctx_r3.data().length > 0);
208
188
  i0.ɵɵadvance();
209
- i0.ɵɵproperty("ngIf", !ctx_r2.loading && !ctx_r2.error && ctx_r2.data.length === 0 && ctx_r2.searchInput.value);
189
+ i0.ɵɵproperty("ngIf", !ctx_r3.loading() && !ctx_r3.error() && ctx_r3.data().length === 0 && ctx_r3.searchInput.value);
210
190
  } }
211
191
  class AsyncDropdownComponent {
212
- constructor(overlay, viewContainerRef, _ngZone) {
192
+ constructor(overlay, viewContainerRef, _ngZone, injector) {
213
193
  this.overlay = overlay;
214
194
  this.viewContainerRef = viewContainerRef;
215
195
  this._ngZone = _ngZone;
216
- this.size = 'md';
217
- this.placeholder = "Select"; // placeholder for input
218
- this.debounceTime = 400; // wait time till which API call is paused
219
- this.minInputLength = 2; // min length after which API call is made
220
- this.multi = false; // maintain a list or emit value
221
- this.disableCopyPaste = false;
222
- this.dropdownListPosition = "Left"; //dropdown position
223
- this.customPlaceholderIcon = ""; // custom icon for placeholder instead of default search icon
224
- // tslint:disable-next-line
225
- this.onSelect = new EventEmitter(true); // emit selected values
196
+ this.injector = injector;
197
+ // === Inputs ===
198
+ this.height = input();
199
+ this.width = input();
200
+ this.size = input('md');
201
+ this.httpStream = input.required();
202
+ this.displayKey = input.required();
203
+ this.secondaryDisplayKey = input('');
204
+ this.placeholder = input('Select');
205
+ this.debounceTime = input(400);
206
+ this.minInputLength = input(2);
207
+ this.multi = input(false);
208
+ this.uniqueKey = input();
209
+ this.control = input(null);
210
+ this.disabled = input(false);
211
+ this.readonly = input(false);
212
+ this.disableCopyPaste = input(false);
213
+ this.dropdownListWidth = input();
214
+ this.dropdownListPosition = input('Left');
215
+ this.customPlaceholderIcon = input('');
216
+ this.selections = input(new Map());
217
+ this.searchValue = input();
218
+ // === Outputs ===
219
+ this.onSelect = output();
220
+ this.searchQueryChange = output();
221
+ this.clear = output();
222
+ this.itemSelected = output();
223
+ this.itemRemoved = output();
224
+ // === Internal state ===
226
225
  this.searchInput = new UntypedFormControl();
227
- this.data = [];
228
- this.opened = false;
229
- this.loading = false;
230
- this.error = false;
231
- this.openPopUpOnTab = false;
232
- // tslint:disable-next-line
233
- this.selections = new Map();
234
226
  this.httpStreamTrigger = new Subject();
235
- this.searchQueryChange = new EventEmitter();
236
- this.clear = new EventEmitter(false);
237
- this.itemSelected = new EventEmitter();
238
- this.itemRemoved = new EventEmitter();
239
- this.handleControlChanges = (values) => {
240
- values.forEach(el => {
241
- this.selectData(el, true);
242
- });
243
- // tslint:disable-next-line
244
- };
245
- }
246
- ngOnInit() {
247
- if (this.multi && !this.uniqueKey) {
248
- throw new Error("[uniqueKey] required in multi mode.");
249
- }
250
- if (this.disabled) {
251
- this.searchInput.disable();
252
- }
253
- const searchObservable = this.searchInput.valueChanges.pipe(tap((val) => this.searchQueryChange.emit(val)), debounceTime(this.debounceTime), distinctUntilChanged());
254
- this.searchSubscription = merge(searchObservable, this.httpStreamTrigger)
255
- .subscribe(res => {
256
- this._ngZone.run(() => {
257
- res = res?.trim() ?? '';
258
- if (res?.length < this.minInputLength || !res?.length) {
227
+ // === Signals ===
228
+ this.opened = signal(false);
229
+ this.loading = signal(false);
230
+ this.error = signal(false);
231
+ this.openPopUpOnTab = signal(false);
232
+ this.data = signal([]);
233
+ // === Effect to handle search ===
234
+ this.searchEffect = effect(() => {
235
+ // Merge form control changes and manual triggers
236
+ merge(this.searchInput.valueChanges.pipe(tap((val) => this.searchQueryChange.emit(val)), debounceTime(this.debounceTime()), distinctUntilChanged()), this.httpStreamTrigger).subscribe((query) => {
237
+ const q = query?.trim() ?? '';
238
+ if (!q || q.length < this.minInputLength()) {
259
239
  this.closeDropdown();
260
240
  return;
261
241
  }
262
- else if (res?.length > this.minInputLength && this.httpStream) {
263
- this.loading = true;
264
- this.error = false;
265
- if (!this.overlayRef?.hasAttached())
266
- this.openDropdown(this.dd, this.origin.nativeElement);
267
- this.httpStream(res).subscribe(list => {
268
- this.loading = false;
269
- this.data = list;
270
- if (!this.overlayRef?.hasAttached() && list.length > 0) {
271
- this.openDropdown(this.dd, this.origin.nativeElement);
272
- }
273
- }, error => {
274
- this.loading = false;
275
- this.error = true;
276
- });
242
+ this.loading.set(true);
243
+ this.error.set(false);
244
+ // Open overlay if not yet open
245
+ if (!this.overlayRef?.hasAttached()) {
246
+ this.openDropdown(this.dd, this.origin.nativeElement);
277
247
  }
248
+ // Call HTTP stream
249
+ this.httpStream()(q).subscribe({
250
+ next: (list) => {
251
+ this.loading.set(false);
252
+ this.data.set(list);
253
+ },
254
+ error: () => {
255
+ this.loading.set(false);
256
+ this.error.set(true);
257
+ },
258
+ });
278
259
  });
279
260
  });
280
- if (this.control?.value) {
281
- this.handleControlChanges(this.control.value);
282
- }
283
- this.controlSubscription = this.control?.valueChanges.subscribe(this.handleControlChanges);
261
+ this.handleControlChanges = (values) => {
262
+ values.forEach((el) => this.selectData(el, true));
263
+ };
284
264
  }
285
- refreshHttpStream(query) {
286
- this.loading = true;
287
- this.httpStreamTrigger.next(query);
265
+ // === Lifecycle ===
266
+ ngOnInit() {
267
+ if (this.multi() && !this.uniqueKey()) {
268
+ throw new Error('[uniqueKey] required in multi mode.');
269
+ }
270
+ if (this.disabled())
271
+ this.searchInput.disable();
272
+ if (this.control()?.value) {
273
+ this.handleControlChanges(this.control().value);
274
+ }
275
+ this.control()?.valueChanges.subscribe(this.handleControlChanges);
288
276
  }
289
- ngOnChanges(changes) {
290
- if (changes && changes?.searchValue?.currentValue) {
291
- this.searchInput.patchValue(changes.searchValue.currentValue);
277
+ ngOnChanges() {
278
+ if (this.searchValue()) {
279
+ this.searchInput.patchValue(this.searchValue());
292
280
  }
293
- if (changes && changes.disabled) {
281
+ if (this.disabled()) {
282
+ this.searchInput.disable();
283
+ }
284
+ else {
294
285
  this.searchInput.enable();
295
- if (this.disabled) {
296
- this.searchInput.disable();
297
- }
298
286
  }
299
287
  }
300
288
  ngOnDestroy() {
301
- this.searchSubscription?.unsubscribe();
302
- this.defaultCallSubscription?.unsubscribe();
289
+ this.overlayRef?.dispose();
290
+ }
291
+ // === Methods ===
292
+ refreshHttpStream(query) {
293
+ this.httpStreamTrigger.next(query);
303
294
  }
304
295
  openDropdown(template, origin) {
305
296
  const positionsBottom = [
306
- new ConnectionPositionPair({ originX: "start", originY: "bottom" }, { overlayX: "start", overlayY: "top" }, 0, 4),
307
- new ConnectionPositionPair({ originX: "end", originY: "bottom" }, { overlayX: "end", overlayY: "top" }, 0, 4)
297
+ new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }, 0, 4),
298
+ new ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'end', overlayY: 'top' }, 0, 4),
308
299
  ];
309
300
  const positionsTop = [
310
- new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "start", overlayY: "bottom" }, 0, -4),
311
- new ConnectionPositionPair({ originX: "end", originY: "top" }, { overlayX: "end", overlayY: "bottom" }, 0, -4)
301
+ new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }, 0, -4),
302
+ new ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'end', overlayY: 'bottom' }, 0, -4),
312
303
  ];
313
304
  const positionStrategy = this.overlay
314
305
  .position()
315
306
  .flexibleConnectedTo(origin)
316
307
  .withPositions([
317
- ...(this.dropdownListPosition === "Right" ? positionsBottom.reverse() : positionsBottom),
318
- ...(this.dropdownListPosition === "Right" ? positionsTop.reverse() : positionsTop)
308
+ ...(this.dropdownListPosition() === 'Right' ? positionsBottom.reverse() : positionsBottom),
309
+ ...(this.dropdownListPosition() === 'Right' ? positionsTop.reverse() : positionsTop),
319
310
  ])
320
311
  .withPush(true);
321
312
  const configs = new OverlayConfig({
322
313
  hasBackdrop: true,
323
- backdropClass: "cdk-overlay-transparent-backdrop",
314
+ backdropClass: 'cdk-overlay-transparent-backdrop',
324
315
  scrollStrategy: this.overlay.scrollStrategies.reposition(),
325
316
  positionStrategy,
326
- width: origin.clientWidth
317
+ width: origin.clientWidth,
327
318
  });
328
319
  this.overlayRef = this.overlay.create(configs);
329
- if (this.dropdownListWidth)
330
- this.overlayRef.updateSize({ width: this.dropdownListWidth });
320
+ if (this.dropdownListWidth())
321
+ this.overlayRef.updateSize({ width: this.dropdownListWidth() });
331
322
  this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));
332
- this.overlayRef.backdropClick().subscribe(res => {
333
- this.closeDropdown();
334
- });
323
+ this.overlayRef.backdropClick().subscribe(() => this.closeDropdown());
335
324
  }
336
- /**
337
- * closes the dropdown
338
- */
339
325
  closeDropdown() {
340
- this.opened = false;
341
- this.openPopUpOnTab = false;
326
+ this.opened.set(false);
327
+ this.openPopUpOnTab.set(false);
342
328
  this.overlayRef?.detach();
343
- this.data = [];
329
+ this.data.set([]);
344
330
  }
345
331
  enablePopUpOnTab() {
346
- this.openPopUpOnTab = true;
332
+ this.openPopUpOnTab.set(true);
347
333
  }
348
334
  handleKeyDown(event) {
349
335
  if (event.key === 'Escape') {
350
- this.searchInput.patchValue("");
336
+ this.searchInput.reset();
351
337
  this.closeDropdown();
352
338
  }
353
339
  }
354
- /**
355
- *
356
- * @param item item to select
357
- * if item property disabled is set to true, selection will be disabled
358
- * @param effectedFromOutside set to true if calling from parent component, if true will focus on search input
359
- */
360
340
  selectData(item, effectedFromOutside = true) {
361
- if (item.disabled) {
341
+ if (item.disabled)
362
342
  return;
363
- }
364
343
  this.itemSelected.emit(item);
365
- if (!this.multi) {
366
- this.searchInput.patchValue(item[this.displayKey], { emitEvent: false });
344
+ if (!this.multi()) {
345
+ this.searchInput.patchValue(item[this.displayKey()], { emitEvent: false });
367
346
  this.setControlValue(item);
368
347
  }
369
348
  else {
370
- if (!this.selections.has(item[this.uniqueKey])) {
371
- this.selections.set(item[this.uniqueKey], item);
349
+ if (!this.selections().has(item[this.uniqueKey()])) {
350
+ this.selections().set(item[this.uniqueKey()], item);
372
351
  }
373
352
  this.setControlValue(this.selectedItems);
374
353
  if (!effectedFromOutside) {
375
354
  setTimeout(() => {
376
- this.input.nativeElement.focus();
377
- this.input.nativeElement.scrollIntoView();
355
+ this.inputRef.nativeElement.focus();
356
+ this.inputRef.nativeElement.scrollIntoView();
378
357
  }, 10);
379
358
  }
380
- this.searchInput.patchValue("");
381
- this.data = [];
359
+ this.searchInput.patchValue('');
360
+ this.data.set([]);
382
361
  }
383
362
  this.closeDropdown();
384
363
  }
385
- /**
386
- *
387
- * @param item remove item from selected list
388
- */
389
364
  removeItem(item) {
390
365
  this.itemRemoved.emit(item);
391
- this.selections.delete(item[this.uniqueKey]);
366
+ this.selections().delete(item[this.uniqueKey()]);
392
367
  this.setControlValue(this.selectedItems);
393
- // tslint:disable-next-line
394
- this.input["nativeElement"].focus();
368
+ this.inputRef.nativeElement.focus();
395
369
  }
396
370
  setControlValue(value) {
397
371
  this.onSelect.emit(value);
398
- this.control?.patchValue(value, { emitEvent: false });
372
+ this.control()?.patchValue(value, { emitEvent: false });
399
373
  }
400
- /**
401
- * @returns list of selected items
402
- */
403
374
  get selectedItems() {
404
- return Array.from(this.selections.values());
375
+ return Array.from(this.selections().values());
405
376
  }
406
377
  removeInputValue() {
407
378
  this.searchInput.reset();
408
- this.data = [];
379
+ this.data.set([]);
409
380
  this.clear.emit(true);
410
381
  }
411
382
  defaultCall() {
412
- if (this.minInputLength === -1) {
413
- this.loading = true;
414
- this.defaultCallSubscription = this.httpStream(this.searchInput.value || '').subscribe(list => {
415
- this.loading = false;
416
- this.data = list;
417
- if (!this.overlayRef?.hasAttached() && this.data?.length > 0) {
418
- this.openDropdown(this.dd, this.origin.nativeElement);
419
- }
420
- }, error => {
421
- this.loading = false;
422
- this.error = true;
383
+ if (this.minInputLength() === -1) {
384
+ this.loading.set(true);
385
+ this.httpStream()(this.searchInput.value || '').subscribe({
386
+ next: (list) => {
387
+ this.loading.set(false);
388
+ this.data.set(list);
389
+ if (!this.overlayRef?.hasAttached() && list.length > 0) {
390
+ this.openDropdown(this.dd, this.origin.nativeElement);
391
+ }
392
+ },
393
+ error: () => {
394
+ this.loading.set(false);
395
+ this.error.set(true);
396
+ },
423
397
  });
424
398
  }
425
399
  }
426
- static { this.ɵfac = function AsyncDropdownComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AsyncDropdownComponent)(i0.ɵɵdirectiveInject(i1.Overlay), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.NgZone)); }; }
400
+ static { this.ɵfac = function AsyncDropdownComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AsyncDropdownComponent)(i0.ɵɵdirectiveInject(i1.Overlay), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.Injector)); }; }
427
401
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AsyncDropdownComponent, selectors: [["mis-async-search-dropdown"]], contentQueries: function AsyncDropdownComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
428
402
  i0.ɵɵcontentQuery(dirIndex, _c0, 5);
429
403
  i0.ɵɵcontentQuery(dirIndex, _c1, 5);
@@ -438,100 +412,55 @@ class AsyncDropdownComponent {
438
412
  } if (rf & 2) {
439
413
  let _t;
440
414
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.origin = _t.first);
441
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.input = _t.first);
415
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputRef = _t.first);
442
416
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dd = _t.first);
443
417
  } }, hostBindings: function AsyncDropdownComponent_HostBindings(rf, ctx) { if (rf & 1) {
444
418
  i0.ɵɵlistener("keydown", function AsyncDropdownComponent_keydown_HostBindingHandler($event) { return ctx.handleKeyDown($event); }, false, i0.ɵɵresolveDocument);
445
- } }, inputs: { height: "height", width: "width", size: "size", httpStream: "httpStream", displayKey: "displayKey", secondaryDisplayKey: "secondaryDisplayKey", placeholder: "placeholder", debounceTime: "debounceTime", minInputLength: "minInputLength", multi: "multi", uniqueKey: "uniqueKey", control: "control", disabled: "disabled", readonly: "readonly", disableCopyPaste: "disableCopyPaste", dropdownListWidth: "dropdownListWidth", dropdownListPosition: "dropdownListPosition", customPlaceholderIcon: "customPlaceholderIcon", selections: "selections", searchValue: "searchValue" }, outputs: { onSelect: "onSelect", searchQueryChange: "searchQueryChange", clear: "clear", itemSelected: "itemSelected", itemRemoved: "itemRemoved" }, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 13, consts: [["ddBtn", ""], ["defaultSearchIcon", ""], ["enableCopyPaste", ""], ["dd", ""], ["input", ""], ["defaultLoader", ""], ["standardItem", ""], [1, "dd-wrapper", 3, "ngClass"], ["class", "selected-list", 4, "ngIf"], [1, "search-input"], ["class", "custom-icon", 4, "ngIf", "ngIfElse"], ["oncopy", "return false;", "onpaste", "return false", "oncut", "return false", "tabindex", "0", "type", "text", "class", "black-text h6", 3, "ngClass", "placeholder", "formControl", "focus", "keyup.enter", 4, "ngIf", "ngIfElse"], ["class", "icon-ic-navigation-cancel-24 croos-icon", "tabindex", "0", 3, "click", "keyup.enter", 4, "ngIf"], [1, "selected-list"], ["class", "chip", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "chip", 3, "ngClass"], [3, "ngClass", "ngStyle"], ["tabindex", "0", 1, "icon-ic-navigation-cancel-24", 2, "cursor", "pointer", 3, "click", "keyup.enter", "ngStyle"], [1, "custom-icon"], ["alt", "customIcon", 3, "src"], [1, "icon-ic-action-search-24"], ["oncopy", "return false;", "onpaste", "return false", "oncut", "return false", "tabindex", "0", "type", "text", 1, "black-text", "h6", 3, "focus", "keyup.enter", "ngClass", "placeholder", "formControl"], ["tabindex", "0", "type", "text", 1, "black-text", "h6", 3, "focus", "keyup.enter", "ngClass", "placeholder", "formControl"], ["tabindex", "0", 1, "icon-ic-navigation-cancel-24", "croos-icon", 3, "click", "keyup.enter"], ["tabindex", "0", "cdkTrapFocus", "", 1, "dd-list", 3, "ngStyle", "ngClass", "cdkTrapFocusAutoCapture"], [4, "ngIf"], [3, "ngTemplateOutlet", 4, "ngIf", "ngIfElse"], [3, "ngTemplateOutlet"], ["class", "status-container", 4, "ngIf"], [1, "status-container"], [3, "mobileView"], [4, "ngFor", "ngForOf"], [3, "click", "keyup.enter"], ["tabindex", "-1", "cdkFocusInitial", ""], [3, "tabindex", 4, "ngIf", "ngIfElse"], [3, "tabindex"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "item", 3, "click", "keyup.enter", "tabindex"], [1, "value"], [1, "primary"], [1, "secondary"], [1, "data-not-found"]], template: function AsyncDropdownComponent_Template(rf, ctx) { if (rf & 1) {
446
- i0.ɵɵelementStart(0, "div", 7, 0);
447
- i0.ɵɵtemplate(2, AsyncDropdownComponent_div_2_Template, 2, 1, "div", 8);
448
- i0.ɵɵelementStart(3, "div", 9);
449
- i0.ɵɵtemplate(4, AsyncDropdownComponent_div_4_Template, 2, 1, "div", 10)(5, AsyncDropdownComponent_ng_template_5_Template, 1, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(7, AsyncDropdownComponent_input_7_Template, 2, 6, "input", 11)(8, AsyncDropdownComponent_ng_template_8_Template, 2, 6, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(10, AsyncDropdownComponent_div_10_Template, 1, 0, "div", 12);
419
+ } }, inputs: { height: [1, "height"], width: [1, "width"], size: [1, "size"], httpStream: [1, "httpStream"], displayKey: [1, "displayKey"], secondaryDisplayKey: [1, "secondaryDisplayKey"], placeholder: [1, "placeholder"], debounceTime: [1, "debounceTime"], minInputLength: [1, "minInputLength"], multi: [1, "multi"], uniqueKey: [1, "uniqueKey"], control: [1, "control"], disabled: [1, "disabled"], readonly: [1, "readonly"], disableCopyPaste: [1, "disableCopyPaste"], dropdownListWidth: [1, "dropdownListWidth"], dropdownListPosition: [1, "dropdownListPosition"], customPlaceholderIcon: [1, "customPlaceholderIcon"], selections: [1, "selections"], searchValue: [1, "searchValue"] }, outputs: { onSelect: "onSelect", searchQueryChange: "searchQueryChange", clear: "clear", itemSelected: "itemSelected", itemRemoved: "itemRemoved" }, features: [i0.ɵɵNgOnChangesFeature], decls: 12, vars: 21, consts: [["ddBtn", ""], ["defaultSearchIcon", ""], ["input", ""], ["dd", ""], ["defaultLoader", ""], ["standardItem", ""], [1, "dd-wrapper", 3, "ngClass"], ["class", "selected-list", 4, "ngIf"], [1, "search-input"], ["class", "custom-icon", 4, "ngIf", "ngIfElse"], ["type", "text", 1, "black-text", "h6", 3, "focus", "keyup.enter", "ngClass", "placeholder", "formControl"], ["class", "icon-ic-navigation-cancel-24 croos-icon", "tabindex", "0", 3, "click", "keyup.enter", 4, "ngIf"], [1, "selected-list"], ["class", "chip", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "chip", 3, "ngClass"], [2, "margin-right", "4px", 3, "ngClass"], ["tabindex", "0", 1, "icon-ic-navigation-cancel-24", 3, "click", "keyup.enter", "ngStyle"], [1, "custom-icon"], ["alt", "customIcon", 3, "src"], [1, "icon-ic-action-search-24"], ["tabindex", "0", 1, "icon-ic-navigation-cancel-24", "croos-icon", 3, "click", "keyup.enter"], ["tabindex", "0", "cdkTrapFocus", "", 1, "dd-list", 3, "ngStyle", "ngClass", "cdkTrapFocusAutoCapture"], [4, "ngIf"], [3, "ngTemplateOutlet", 4, "ngIf", "ngIfElse"], [3, "ngTemplateOutlet"], ["class", "status-container", 4, "ngIf"], [1, "status-container"], [3, "mobileView"], [4, "ngFor", "ngForOf"], [3, "click", "keyup.enter"], ["tabindex", "-1", "cdkFocusInitial", ""], [4, "ngIf", "ngIfElse"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "item", 3, "click", "keyup.enter", "tabindex"], [1, "value"], [1, "primary"], [1, "secondary"], [1, "data-not-found"]], template: function AsyncDropdownComponent_Template(rf, ctx) { if (rf & 1) {
420
+ const _r1 = i0.ɵɵgetCurrentView();
421
+ i0.ɵɵelementStart(0, "div", 6, 0);
422
+ i0.ɵɵtemplate(2, AsyncDropdownComponent_div_2_Template, 2, 1, "div", 7);
423
+ i0.ɵɵelementStart(3, "div", 8);
424
+ i0.ɵɵtemplate(4, AsyncDropdownComponent_div_4_Template, 2, 1, "div", 9)(5, AsyncDropdownComponent_ng_template_5_Template, 1, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
425
+ i0.ɵɵelementStart(7, "input", 10, 2);
426
+ i0.ɵɵlistener("focus", function AsyncDropdownComponent_Template_input_focus_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.defaultCall()); })("keyup.enter", function AsyncDropdownComponent_Template_input_keyup_enter_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.enablePopUpOnTab()); });
427
+ i0.ɵɵelementEnd();
428
+ i0.ɵɵtemplate(9, AsyncDropdownComponent_div_9_Template, 1, 0, "div", 11);
450
429
  i0.ɵɵelementEnd()();
451
- i0.ɵɵtemplate(11, AsyncDropdownComponent_ng_template_11_Template, 5, 12, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
430
+ i0.ɵɵtemplate(10, AsyncDropdownComponent_ng_template_10_Template, 5, 12, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
452
431
  } if (rf & 2) {
453
- const defaultSearchIcon_r12 = i0.ɵɵreference(6);
454
- const enableCopyPaste_r13 = i0.ɵɵreference(9);
455
- i0.ɵɵstyleProp("width", ctx.width);
456
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(9, _c5, ctx.opened, ctx.disabled, ctx.readonly));
432
+ const defaultSearchIcon_r11 = i0.ɵɵreference(6);
433
+ i0.ɵɵstyleProp("width", ctx.width());
434
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(14, _c5, ctx.opened(), ctx.disabled(), ctx.readonly()));
457
435
  i0.ɵɵadvance(2);
458
- i0.ɵɵproperty("ngIf", ctx.multi && ctx.selections.size > 0);
436
+ i0.ɵɵproperty("ngIf", ctx.multi() && ctx.selectedItems.length > 0);
459
437
  i0.ɵɵadvance(2);
460
- i0.ɵɵproperty("ngIf", ctx.customPlaceholderIcon)("ngIfElse", defaultSearchIcon_r12);
461
- i0.ɵɵadvance(3);
462
- i0.ɵɵproperty("ngIf", ctx.disableCopyPaste)("ngIfElse", enableCopyPaste_r13);
438
+ i0.ɵɵproperty("ngIf", ctx.customPlaceholderIcon())("ngIfElse", defaultSearchIcon_r11);
463
439
  i0.ɵɵadvance(3);
464
- i0.ɵɵproperty("ngIf", ctx.searchInput == null ? null : ctx.searchInput.value == null ? null : ctx.searchInput.value.length);
465
- } }, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i2.NgTemplateOutlet, i2.NgStyle, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, i4.LoaderComponent, i5.CdkTrapFocus], styles: ["[_ngcontent-%COMP%]: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}.dd-wrapper[_ngcontent-%COMP%]{background:var(--bg-primary, #FFFFFF);border:1px solid var(--border-primary, #E0E0E0);box-sizing:border-box;border-radius:4px;display:block;cursor:pointer;outline:none}.dd-wrapper.opened[_ngcontent-%COMP%], .dd-wrapper[_ngcontent-%COMP%]:hover{background:var(--bg-tertiary, #F5F5F5)}.dd-wrapper[_ngcontent-%COMP%] .selected-list[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:4px;padding:8px 16px}.dd-wrapper[_ngcontent-%COMP%]:focus-within{border-color:var(--brand-primary, #0937B2);background:var(--bg-tertiary, #F5F5F5)}.dd-wrapper.disabled[_ngcontent-%COMP%], .dd-wrapper.readonly[_ngcontent-%COMP%]{pointer-events:none}.search-input[_ngcontent-%COMP%]{position:relative;border-radius:8px}.search-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;outline:none;padding-left:40px;padding-right:24px;background-color:transparent;color:var(--text-primary, #181F33);border-radius:inherit;border:1px solid transparent;width:100%}.search-input[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .search-input[_ngcontent-%COMP%] .custom-icon[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);font-size:24px;line-height:24px;height:24px;left:8px}.search-input[_ngcontent-%COMP%] .croos-icon[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);font-size:16px;width:24px;line-height:16px;height:16px;right:0}.dd-list[_ngcontent-%COMP%]{padding:8px 0;max-height:200px;background:var(--bg-primary, #FFFFFF);box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:8px;min-width:100%;overflow-y:auto}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;border-radius:4px}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--bg-primary, #FFFFFF);border-radius:4px}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--text-tertiary, #929DAB);border-radius:4px}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary, #929DAB)}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{padding:8px 16px;cursor:pointer}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{color:var(--text-secondary, #6A737D)!important;pointer-events:none}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .primary[_ngcontent-%COMP%], .dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .secondary[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:var(--text-primary, #181F33)}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .reason[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:var(--text-secondary, #6A737D)}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover:not(.disabled){background:var(--brand-primary-hover, #F0F3FA)}.dd-list[_ngcontent-%COMP%] .data-not-found[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:16px;padding:8px}.dd-list-pd[_ngcontent-%COMP%]{padding:unset}.chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:var(--border-primary, #E0E0E0);overflow-wrap:anywhere;cursor:default}.chip[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--text-primary, #181F33)}.chip-md[_ngcontent-%COMP%]{border-radius:16px;padding:4px 12px}.chip-sm[_ngcontent-%COMP%]{border-radius:6px;padding:4px 8px;text-transform:uppercase}.ip-md[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.ip-sm[_ngcontent-%COMP%]{padding-top:3px;padding-bottom:3px}.status-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:128px}.status-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:center} #spinner{position:relative!important}"] }); }
440
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(18, _c6, ctx.size() === "md", ctx.size() === "sm"))("placeholder", ctx.placeholder())("formControl", ctx.searchInput);
441
+ i0.ɵɵattribute("tabindex", 0)("oncopy", ctx.disableCopyPaste() ? "return false;" : null)("onpaste", ctx.disableCopyPaste() ? "return false;" : null)("oncut", ctx.disableCopyPaste() ? "return false;" : null);
442
+ i0.ɵɵadvance(2);
443
+ i0.ɵɵproperty("ngIf", ctx.searchInput.value == null ? null : ctx.searchInput.value.length);
444
+ } }, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i2.NgTemplateOutlet, i2.NgStyle, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, i4.LoaderComponent, i5.CdkTrapFocus], styles: [".dd-wrapper[_ngcontent-%COMP%]{background:#fff;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:4px;display:block;cursor:pointer;outline:none}.dd-wrapper.opened[_ngcontent-%COMP%], .dd-wrapper[_ngcontent-%COMP%]:hover{background:#f5f5f5}.dd-wrapper[_ngcontent-%COMP%] .selected-list[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:4px;padding:8px 16px}.dd-wrapper[_ngcontent-%COMP%]:focus-within{border-color:#0937b2;background:#f5f5f5}.dd-wrapper.disabled[_ngcontent-%COMP%], .dd-wrapper.readonly[_ngcontent-%COMP%]{pointer-events:none}.search-input[_ngcontent-%COMP%]{position:relative;border-radius:8px}.search-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;outline:none;padding-left:40px;padding-right:24px;background-color:transparent;color:#181f33;border-radius:inherit;border:1px solid transparent;width:100%}.search-input[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .search-input[_ngcontent-%COMP%] .custom-icon[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);font-size:24px;line-height:24px;height:24px;left:8px}.search-input[_ngcontent-%COMP%] .croos-icon[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);font-size:16px;width:24px;line-height:16px;height:16px;right:0}.dd-list[_ngcontent-%COMP%]{padding:8px 0;max-height:200px;background:#fff;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:8px;min-width:100%;overflow-y:auto}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;border-radius:4px}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#fff;border-radius:4px}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#929dab;border-radius:4px}.dd-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#929dab}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{padding:8px 16px;cursor:pointer}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{color:#6a737d!important;pointer-events:none}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .primary[_ngcontent-%COMP%], .dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .secondary[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .reason[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d}.dd-list[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover:not(.disabled){background:#f5f7fc}.dd-list[_ngcontent-%COMP%] .data-not-found[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:16px;padding:8px}.dd-list-pd[_ngcontent-%COMP%]{padding:unset}.chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:#e0e0e0;overflow-wrap:anywhere;cursor:default}.chip[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#181f33}.chip-md[_ngcontent-%COMP%]{border-radius:16px;padding:4px 12px}.chip-sm[_ngcontent-%COMP%]{border-radius:6px;padding:4px 8px;text-transform:uppercase}.ip-md[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.ip-sm[_ngcontent-%COMP%]{padding-top:3px;padding-bottom:3px}.status-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:128px}.status-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:center} #spinner{position:relative!important}"] }); }
466
445
  }
467
446
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AsyncDropdownComponent, [{
468
447
  type: Component,
469
- args: [{ selector: "mis-async-search-dropdown", template: "<div class=\"dd-wrapper\" [ngClass]=\"{ opened: opened, disabled: disabled, readonly: readonly }\" [style.width]=\"width\" #ddBtn>\n <div class=\"selected-list\" *ngIf=\"multi && selections.size > 0\">\n <div class=\"chip\" [ngClass]=\"{'chip-md': size === 'md', 'chip-sm': size === 'sm'}\" *ngFor=\"let item of selectedItems\">\n <span [ngClass]=\"{'h6': size === 'md', 'h8-b': size === 'sm'}\" [ngStyle]=\"{ 'margin-right': '4px'}\">{{item[displayKey]}}</span>\n <span style=\"cursor: pointer;\" (click)=\"removeItem(item)\" tabindex=\"0\" (keyup.enter)=\"removeItem(item)\" [ngStyle]=\"{\n 'cursor': 'pointer',\n 'font-size': size === 'sm' ? '12px' : '14px'\n }\" class=\"icon-ic-navigation-cancel-24\"></span>\n </div>\n </div>\n <div class=\"search-input\">\n <div *ngIf=\"customPlaceholderIcon; else defaultSearchIcon\" class=\"custom-icon\">\n <img [src]=\"customPlaceholderIcon\" alt=\"customIcon\" />\n </div>\n <ng-template #defaultSearchIcon>\n <span class=\"icon-ic-action-search-24\"></span>\n </ng-template>\n <input *ngIf=\"disableCopyPaste; else enableCopyPaste\" [ngClass]=\"{'ip-md': size === 'md', 'ip-sm': size === 'sm'}\" oncopy=\"return false;\" onpaste=\"return false\" oncut=\"return false\" tabindex=\"0\" type=\"text\" class=\"black-text h6\" #input [placeholder]=\"placeholder\" [formControl]=\"searchInput\" (focus)=\"defaultCall()\" (keyup.enter)=\"enablePopUpOnTab()\"/>\n <ng-template #enableCopyPaste>\n <input [ngClass]=\"{'ip-md': size === 'md', 'ip-sm': size === 'sm'}\" tabindex=\"0\" type=\"text\" class=\"black-text h6\" #input [placeholder]=\"placeholder\" [formControl]=\"searchInput\" (focus)=\"defaultCall()\" (keyup.enter)=\"enablePopUpOnTab()\" />\n </ng-template>\n <div class=\"icon-ic-navigation-cancel-24 croos-icon\" *ngIf=\"searchInput?.value?.length\" tabindex=\"0\" (click)=\"removeInputValue()\" (keyup.enter)=\"removeInputValue()\"></div>\n </div>\n</div>\n\n<ng-template #dd>\n <div class=\"dd-list\" [ngStyle]=\"{'max-height':height, 'width': dropdownListWidth}\" [ngClass]=\"{'dd-list-pd':data.length === 0}\" tabindex=\"0\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"openPopUpOnTab\">\n <ng-container *ngIf=\"loading\">\n <ng-container\n *ngIf=\"customLoader; else defaultLoader\"\n [ngTemplateOutlet]=\"customLoader\"\n ></ng-container>\n <ng-template #defaultLoader>\n <div class=\"status-container\" *ngIf=\"loading && !customLoader\">\n <mis-loader [mobileView]=\"true\"></mis-loader>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"error\">\n <div class=\"status-container\">\n <p>Unknown error has occurred, <br> Please try again later.</p>\n </div>\n </ng-container>\n <div *ngIf=\"!loading && !error && data.length > 0\">\n <ng-container *ngFor=\"let item of data\">\n <div (click)=\"selectData(item, false)\" (keyup.enter)=\"selectData(item, false)\"> \n <div tabindex=\"-1\" cdkFocusInitial></div> \n <div\n [tabindex]=\"openPopUpOnTab ? 0 : -1\"\n *ngIf=\"customItem; else standardItem\"\n >\n <ng-container\n [ngTemplateOutlet]=\"customItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-container>\n </div>\n <ng-template #standardItem>\n <div tabindex=\"-1\" cdkFocusInitial></div> \n <div class=\"item\" (click)=\"selectData(item, false)\" [tabindex]=\"openPopUpOnTab ? 0 : -1\" (keyup.enter)=\"selectData(item, false)\">\n <div class=\"value\">\n <div class=\"primary\">\n {{ item[displayKey] }}\n </div>\n <div class=\"secondary\">\n {{ item[secondaryDisplayKey] }}\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n <div *ngIf=\"!loading && !error && data.length === 0 && searchInput.value\">\n <div class=\"data-not-found\">No Data Available</div>\n </div>\n </div>\n</ng-template>\n", 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}.dd-wrapper{background:var(--bg-primary, #FFFFFF);border:1px solid var(--border-primary, #E0E0E0);box-sizing:border-box;border-radius:4px;display:block;cursor:pointer;outline:none}.dd-wrapper.opened,.dd-wrapper:hover{background:var(--bg-tertiary, #F5F5F5)}.dd-wrapper .selected-list{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:4px;padding:8px 16px}.dd-wrapper:focus-within{border-color:var(--brand-primary, #0937B2);background:var(--bg-tertiary, #F5F5F5)}.dd-wrapper.disabled,.dd-wrapper.readonly{pointer-events:none}.search-input{position:relative;border-radius:8px}.search-input input{box-sizing:border-box;outline:none;padding-left:40px;padding-right:24px;background-color:transparent;color:var(--text-primary, #181F33);border-radius:inherit;border:1px solid transparent;width:100%}.search-input span,.search-input .custom-icon{position:absolute;top:50%;transform:translateY(-50%);font-size:24px;line-height:24px;height:24px;left:8px}.search-input .croos-icon{position:absolute;top:50%;transform:translateY(-50%);font-size:16px;width:24px;line-height:16px;height:16px;right:0}.dd-list{padding:8px 0;max-height:200px;background:var(--bg-primary, #FFFFFF);box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:8px;min-width:100%;overflow-y:auto}.dd-list::-webkit-scrollbar{width:8px;border-radius:4px}.dd-list::-webkit-scrollbar-track{background:var(--bg-primary, #FFFFFF);border-radius:4px}.dd-list::-webkit-scrollbar-thumb{background:var(--text-tertiary, #929DAB);border-radius:4px}.dd-list::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary, #929DAB)}.dd-list .item{padding:8px 16px;cursor:pointer}.dd-list .item .disabled{color:var(--text-secondary, #6A737D)!important;pointer-events:none}.dd-list .item .value{display:flex;justify-content:space-between;align-items:center}.dd-list .item .value .primary,.dd-list .item .value .secondary{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:var(--text-primary, #181F33)}.dd-list .item .reason{font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:var(--text-secondary, #6A737D)}.dd-list .item:hover:not(.disabled){background:var(--brand-primary-hover, #F0F3FA)}.dd-list .data-not-found{display:flex;justify-content:center;align-items:center;font-size:16px;padding:8px}.dd-list-pd{padding:unset}.chip{display:inline-flex;align-items:center;background:var(--border-primary, #E0E0E0);overflow-wrap:anywhere;cursor:default}.chip span{color:var(--text-primary, #181F33)}.chip-md{border-radius:16px;padding:4px 12px}.chip-sm{border-radius:6px;padding:4px 8px;text-transform:uppercase}.ip-md{padding-top:8px;padding-bottom:8px}.ip-sm{padding-top:3px;padding-bottom:3px}.status-container{display:flex;justify-content:center;align-items:center;height:128px}.status-container p{text-align:center}::ng-deep #spinner{position:relative!important}\n"] }]
470
- }], () => [{ type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.NgZone }], { height: [{
471
- type: Input
472
- }], width: [{
473
- type: Input
474
- }], size: [{
475
- type: Input
476
- }], httpStream: [{
477
- type: Input
478
- }], displayKey: [{
479
- type: Input
480
- }], secondaryDisplayKey: [{
481
- type: Input
482
- }], placeholder: [{
483
- type: Input
484
- }], debounceTime: [{
485
- type: Input
486
- }], minInputLength: [{
487
- type: Input
488
- }], multi: [{
489
- type: Input
490
- }], uniqueKey: [{
491
- type: Input
492
- }], control: [{
493
- type: Input
494
- }], disabled: [{
495
- type: Input
496
- }], readonly: [{
497
- type: Input
498
- }], disableCopyPaste: [{
499
- type: Input
500
- }], dropdownListWidth: [{
501
- type: Input
502
- }], dropdownListPosition: [{
503
- type: Input
504
- }], customPlaceholderIcon: [{
505
- type: Input
506
- }], origin: [{
448
+ args: [{ selector: 'mis-async-search-dropdown', template: "<div class=\"dd-wrapper\"\n [ngClass]=\"{ opened: opened(), disabled: disabled(), readonly: readonly() }\"\n [style.width]=\"width()\"\n #ddBtn>\n \n <!-- Selected chips for multi-select -->\n <div class=\"selected-list\" *ngIf=\"multi() && selectedItems.length > 0\">\n <div class=\"chip\"\n [ngClass]=\"{ 'chip-md': size() === 'md', 'chip-sm': size() === 'sm' }\"\n *ngFor=\"let item of selectedItems\">\n <span [ngClass]=\"{ 'h6': size() === 'md', 'h8-b': size() === 'sm' }\"\n style=\"margin-right: 4px;\">\n {{ item[displayKey()] }}\n </span>\n <span class=\"icon-ic-navigation-cancel-24\"\n [ngStyle]=\"{ cursor: 'pointer', 'font-size': size() === 'sm' ? '12px' : '14px' }\"\n tabindex=\"0\"\n (click)=\"removeItem(item)\"\n (keyup.enter)=\"removeItem(item)\">\n </span>\n </div>\n </div>\n\n <!-- Search input -->\n <div class=\"search-input\">\n <!-- Placeholder icon -->\n <div *ngIf=\"customPlaceholderIcon(); else defaultSearchIcon\" class=\"custom-icon\">\n <img [src]=\"customPlaceholderIcon()\" alt=\"customIcon\" />\n </div>\n <ng-template #defaultSearchIcon>\n <span class=\"icon-ic-action-search-24\"></span>\n </ng-template>\n\n <!-- Input field -->\n <input [ngClass]=\"{ 'ip-md': size() === 'md', 'ip-sm': size() === 'sm' }\"\n [placeholder]=\"placeholder()\"\n [formControl]=\"searchInput\"\n [attr.tabindex]=\"0\"\n type=\"text\"\n class=\"black-text h6\"\n #input\n (focus)=\"defaultCall()\"\n (keyup.enter)=\"enablePopUpOnTab()\"\n [attr.oncopy]=\"disableCopyPaste() ? 'return false;' : null\"\n [attr.onpaste]=\"disableCopyPaste() ? 'return false;' : null\"\n [attr.oncut]=\"disableCopyPaste() ? 'return false;' : null\"/>\n\n <!-- Clear input -->\n <div class=\"icon-ic-navigation-cancel-24 croos-icon\"\n *ngIf=\"searchInput.value?.length\"\n tabindex=\"0\"\n (click)=\"removeInputValue()\"\n (keyup.enter)=\"removeInputValue()\">\n </div>\n </div>\n</div>\n\n<!-- Dropdown template -->\n<ng-template #dd>\n <div class=\"dd-list\"\n [ngStyle]=\"{ 'max-height': height(), 'width': dropdownListWidth() }\"\n [ngClass]=\"{ 'dd-list-pd': data().length === 0 }\"\n tabindex=\"0\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"openPopUpOnTab()\">\n\n <!-- Loader -->\n <ng-container *ngIf=\"loading()\">\n <ng-container *ngIf=\"customLoader; else defaultLoader\" [ngTemplateOutlet]=\"customLoader\"></ng-container>\n <ng-template #defaultLoader>\n <div class=\"status-container\" *ngIf=\"loading() && !customLoader\">\n <mis-loader [mobileView]=\"true\"></mis-loader>\n </div>\n </ng-template>\n </ng-container>\n\n <!-- Error -->\n <ng-container *ngIf=\"error()\">\n <div class=\"status-container\">\n <p>Unknown error has occurred, <br/> Please try again later.</p>\n </div>\n </ng-container>\n\n <!-- Data list -->\n <div *ngIf=\"!loading() && !error() && data().length > 0\">\n <ng-container *ngFor=\"let item of data()\">\n <div (click)=\"selectData(item, false)\" (keyup.enter)=\"selectData(item, false)\">\n <div tabindex=\"-1\" cdkFocusInitial></div>\n\n <!-- Custom item -->\n <ng-container *ngIf=\"customItem; else standardItem\">\n <ng-container [ngTemplateOutlet]=\"customItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-container>\n\n <!-- Standard item -->\n <ng-template #standardItem>\n <div tabindex=\"-1\" cdkFocusInitial></div>\n <div class=\"item\"\n [tabindex]=\"openPopUpOnTab() ? 0 : -1\"\n (click)=\"selectData(item, false)\"\n (keyup.enter)=\"selectData(item, false)\">\n <div class=\"value\">\n <div class=\"primary\">{{ item[displayKey()] }}</div>\n <div class=\"secondary\">{{ item[secondaryDisplayKey()] }}</div>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n\n <!-- No data -->\n <div *ngIf=\"!loading() && !error() && data().length === 0 && searchInput.value\">\n <div class=\"data-not-found\">No Data Available</div>\n </div>\n </div>\n</ng-template>\n", styles: [".dd-wrapper{background:#fff;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:4px;display:block;cursor:pointer;outline:none}.dd-wrapper.opened,.dd-wrapper:hover{background:#f5f5f5}.dd-wrapper .selected-list{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:4px;padding:8px 16px}.dd-wrapper:focus-within{border-color:#0937b2;background:#f5f5f5}.dd-wrapper.disabled,.dd-wrapper.readonly{pointer-events:none}.search-input{position:relative;border-radius:8px}.search-input input{box-sizing:border-box;outline:none;padding-left:40px;padding-right:24px;background-color:transparent;color:#181f33;border-radius:inherit;border:1px solid transparent;width:100%}.search-input span,.search-input .custom-icon{position:absolute;top:50%;transform:translateY(-50%);font-size:24px;line-height:24px;height:24px;left:8px}.search-input .croos-icon{position:absolute;top:50%;transform:translateY(-50%);font-size:16px;width:24px;line-height:16px;height:16px;right:0}.dd-list{padding:8px 0;max-height:200px;background:#fff;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:8px;min-width:100%;overflow-y:auto}.dd-list::-webkit-scrollbar{width:8px;border-radius:4px}.dd-list::-webkit-scrollbar-track{background:#fff;border-radius:4px}.dd-list::-webkit-scrollbar-thumb{background:#929dab;border-radius:4px}.dd-list::-webkit-scrollbar-thumb:hover{background:#929dab}.dd-list .item{padding:8px 16px;cursor:pointer}.dd-list .item .disabled{color:#6a737d!important;pointer-events:none}.dd-list .item .value{display:flex;justify-content:space-between;align-items:center}.dd-list .item .value .primary,.dd-list .item .value .secondary{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.dd-list .item .reason{font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d}.dd-list .item:hover:not(.disabled){background:#f5f7fc}.dd-list .data-not-found{display:flex;justify-content:center;align-items:center;font-size:16px;padding:8px}.dd-list-pd{padding:unset}.chip{display:inline-flex;align-items:center;background:#e0e0e0;overflow-wrap:anywhere;cursor:default}.chip span{color:#181f33}.chip-md{border-radius:16px;padding:4px 12px}.chip-sm{border-radius:6px;padding:4px 8px;text-transform:uppercase}.ip-md{padding-top:8px;padding-bottom:8px}.ip-sm{padding-top:3px;padding-bottom:3px}.status-container{display:flex;justify-content:center;align-items:center;height:128px}.status-container p{text-align:center}::ng-deep #spinner{position:relative!important}\n"] }]
449
+ }], () => [{ type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }], { origin: [{
507
450
  type: ViewChild,
508
- args: ["ddBtn", { static: false }]
509
- }], input: [{
451
+ args: ['ddBtn', { static: false }]
452
+ }], inputRef: [{
510
453
  type: ViewChild,
511
- args: ["input", { static: false }]
454
+ args: ['input', { static: false }]
512
455
  }], dd: [{
513
456
  type: ViewChild,
514
- args: ["dd", { static: false }]
457
+ args: ['dd', { static: false }]
515
458
  }], customItem: [{
516
459
  type: ContentChild,
517
- args: ["misCustomItem", { static: false }]
460
+ args: ['misCustomItem', { static: false }]
518
461
  }], customLoader: [{
519
462
  type: ContentChild,
520
- args: ["asyncCustomLoader", { static: false }]
521
- }], onSelect: [{
522
- type: Output
523
- }], selections: [{
524
- type: Input
525
- }], searchValue: [{
526
- type: Input
527
- }], searchQueryChange: [{
528
- type: Output
529
- }], clear: [{
530
- type: Output
531
- }], itemSelected: [{
532
- type: Output
533
- }], itemRemoved: [{
534
- type: Output
463
+ args: ['asyncCustomLoader', { static: false }]
535
464
  }], handleKeyDown: [{
536
465
  type: HostListener,
537
466
  args: ['document:keydown', ['$event']]