@sebgroup/green-angular 0.0.0-v-angular-20250113082841

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 (838) hide show
  1. package/README.md +68 -0
  2. package/esm2022/index.mjs +18 -0
  3. package/esm2022/lib/accordion/accordion-list-item.component.mjs +50 -0
  4. package/esm2022/lib/accordion/accordion.component.mjs +72 -0
  5. package/esm2022/lib/accordion/accordion.module.mjs +19 -0
  6. package/esm2022/lib/accordion/index.mjs +4 -0
  7. package/esm2022/lib/badge/badge.component.mjs +80 -0
  8. package/esm2022/lib/badge/badge.module.mjs +18 -0
  9. package/esm2022/lib/badge/index.mjs +3 -0
  10. package/esm2022/lib/button/button.component.mjs +28 -0
  11. package/esm2022/lib/button/button.module.mjs +18 -0
  12. package/esm2022/lib/button/index.mjs +3 -0
  13. package/esm2022/lib/cell-table/cell-table-item.component.mjs +91 -0
  14. package/esm2022/lib/cell-table/cell-table.component.mjs +97 -0
  15. package/esm2022/lib/cell-table/cell-table.module.mjs +26 -0
  16. package/esm2022/lib/cell-table/cell-table.types.mjs +7 -0
  17. package/esm2022/lib/cell-table/cell-underline.directive.mjs +55 -0
  18. package/esm2022/lib/cell-table/index.mjs +4 -0
  19. package/esm2022/lib/context-menu/context-menu.component.mjs +73 -0
  20. package/esm2022/lib/context-menu/context-menu.module.mjs +20 -0
  21. package/esm2022/lib/context-menu/index.mjs +3 -0
  22. package/esm2022/lib/datepicker/datepicker.component.mjs +138 -0
  23. package/esm2022/lib/datepicker/datepicker.module.mjs +20 -0
  24. package/esm2022/lib/datepicker/index.mjs +3 -0
  25. package/esm2022/lib/dropdown/dropdown-button.directive.mjs +16 -0
  26. package/esm2022/lib/dropdown/dropdown-option.directive.mjs +16 -0
  27. package/esm2022/lib/dropdown/dropdown.component.mjs +222 -0
  28. package/esm2022/lib/dropdown/dropdown.module.mjs +34 -0
  29. package/esm2022/lib/dropdown/index.mjs +5 -0
  30. package/esm2022/lib/green-angular.module.mjs +72 -0
  31. package/esm2022/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +61 -0
  32. package/esm2022/lib/in-page-wizard/in-page-wizard.module.mjs +18 -0
  33. package/esm2022/lib/in-page-wizard/index.mjs +3 -0
  34. package/esm2022/lib/modal/index.mjs +5 -0
  35. package/esm2022/lib/modal/modal-footer.directive.mjs +16 -0
  36. package/esm2022/lib/modal/modal-header.directive.mjs +16 -0
  37. package/esm2022/lib/modal/modal.component.mjs +309 -0
  38. package/esm2022/lib/modal/modal.module.mjs +41 -0
  39. package/esm2022/lib/pagination/index.mjs +3 -0
  40. package/esm2022/lib/pagination/pagination.component.mjs +175 -0
  41. package/esm2022/lib/pagination/pagination.module.mjs +18 -0
  42. package/esm2022/lib/progress-circle/index.mjs +3 -0
  43. package/esm2022/lib/progress-circle/progress-circle.component.mjs +41 -0
  44. package/esm2022/lib/progress-circle/progress-circle.module.mjs +18 -0
  45. package/esm2022/lib/segmented-control/index.mjs +3 -0
  46. package/esm2022/lib/segmented-control/segmented-control.component.mjs +35 -0
  47. package/esm2022/lib/segmented-control/segmented-control.module.mjs +19 -0
  48. package/esm2022/lib/shared/core-element/core-element.directive.mjs +33 -0
  49. package/esm2022/lib/shared/core-element/core-element.module.mjs +18 -0
  50. package/esm2022/lib/shared/core-element/index.mjs +3 -0
  51. package/esm2022/lib/shared/index.mjs +4 -0
  52. package/esm2022/lib/shared/on-scroll.directive.mjs +47 -0
  53. package/esm2022/lib/shared/shared.module.mjs +18 -0
  54. package/esm2022/lib/slider/index.mjs +3 -0
  55. package/esm2022/lib/slider/slider.component.mjs +113 -0
  56. package/esm2022/lib/slider/slider.module.mjs +19 -0
  57. package/esm2022/lib/sortable-list/index.mjs +3 -0
  58. package/esm2022/lib/sortable-list/sortable-list.component.mjs +181 -0
  59. package/esm2022/lib/sortable-list/sortable-list.module.mjs +20 -0
  60. package/esm2022/sebgroup-green-angular.mjs +5 -0
  61. package/esm2022/src/lib/accordion/accordion-list-item.component.mjs +50 -0
  62. package/esm2022/src/lib/accordion/accordion.component.mjs +72 -0
  63. package/esm2022/src/lib/accordion/accordion.module.mjs +19 -0
  64. package/esm2022/src/lib/accordion/index.mjs +4 -0
  65. package/esm2022/src/lib/accordion/sebgroup-green-angular-src-lib-accordion.mjs +5 -0
  66. package/esm2022/src/lib/badge/badge.component.mjs +80 -0
  67. package/esm2022/src/lib/badge/badge.module.mjs +18 -0
  68. package/esm2022/src/lib/badge/index.mjs +3 -0
  69. package/esm2022/src/lib/badge/sebgroup-green-angular-src-lib-badge.mjs +5 -0
  70. package/esm2022/src/lib/button/button.component.mjs +28 -0
  71. package/esm2022/src/lib/button/button.module.mjs +18 -0
  72. package/esm2022/src/lib/button/index.mjs +3 -0
  73. package/esm2022/src/lib/button/sebgroup-green-angular-src-lib-button.mjs +5 -0
  74. package/esm2022/src/lib/cell-table/cell-table-item.component.mjs +91 -0
  75. package/esm2022/src/lib/cell-table/cell-table.component.mjs +97 -0
  76. package/esm2022/src/lib/cell-table/cell-table.module.mjs +26 -0
  77. package/esm2022/src/lib/cell-table/cell-table.types.mjs +7 -0
  78. package/esm2022/src/lib/cell-table/cell-underline.directive.mjs +55 -0
  79. package/esm2022/src/lib/cell-table/index.mjs +4 -0
  80. package/esm2022/src/lib/cell-table/sebgroup-green-angular-src-lib-cell-table.mjs +5 -0
  81. package/esm2022/src/lib/context-menu/context-menu.component.mjs +73 -0
  82. package/esm2022/src/lib/context-menu/context-menu.module.mjs +20 -0
  83. package/esm2022/src/lib/context-menu/index.mjs +3 -0
  84. package/esm2022/src/lib/context-menu/sebgroup-green-angular-src-lib-context-menu.mjs +5 -0
  85. package/esm2022/src/lib/datepicker/datepicker.component.mjs +138 -0
  86. package/esm2022/src/lib/datepicker/datepicker.module.mjs +20 -0
  87. package/esm2022/src/lib/datepicker/index.mjs +3 -0
  88. package/esm2022/src/lib/datepicker/sebgroup-green-angular-src-lib-datepicker.mjs +5 -0
  89. package/esm2022/src/lib/dropdown/dropdown-button.directive.mjs +16 -0
  90. package/esm2022/src/lib/dropdown/dropdown-option.directive.mjs +16 -0
  91. package/esm2022/src/lib/dropdown/dropdown.component.mjs +222 -0
  92. package/esm2022/src/lib/dropdown/dropdown.module.mjs +34 -0
  93. package/esm2022/src/lib/dropdown/index.mjs +5 -0
  94. package/esm2022/src/lib/dropdown/sebgroup-green-angular-src-lib-dropdown.mjs +5 -0
  95. package/esm2022/src/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +61 -0
  96. package/esm2022/src/lib/in-page-wizard/in-page-wizard.module.mjs +18 -0
  97. package/esm2022/src/lib/in-page-wizard/index.mjs +3 -0
  98. package/esm2022/src/lib/in-page-wizard/sebgroup-green-angular-src-lib-in-page-wizard.mjs +5 -0
  99. package/esm2022/src/lib/modal/index.mjs +5 -0
  100. package/esm2022/src/lib/modal/modal-footer.directive.mjs +16 -0
  101. package/esm2022/src/lib/modal/modal-header.directive.mjs +16 -0
  102. package/esm2022/src/lib/modal/modal.component.mjs +309 -0
  103. package/esm2022/src/lib/modal/modal.module.mjs +41 -0
  104. package/esm2022/src/lib/modal/sebgroup-green-angular-src-lib-modal.mjs +5 -0
  105. package/esm2022/src/lib/pagination/index.mjs +3 -0
  106. package/esm2022/src/lib/pagination/pagination.component.mjs +175 -0
  107. package/esm2022/src/lib/pagination/pagination.module.mjs +18 -0
  108. package/esm2022/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs +5 -0
  109. package/esm2022/src/lib/progress-circle/index.mjs +3 -0
  110. package/esm2022/src/lib/progress-circle/progress-circle.component.mjs +41 -0
  111. package/esm2022/src/lib/progress-circle/progress-circle.module.mjs +18 -0
  112. package/esm2022/src/lib/progress-circle/sebgroup-green-angular-src-lib-progress-circle.mjs +5 -0
  113. package/esm2022/src/lib/segmented-control/index.mjs +3 -0
  114. package/esm2022/src/lib/segmented-control/sebgroup-green-angular-src-lib-segmented-control.mjs +5 -0
  115. package/esm2022/src/lib/segmented-control/segmented-control.component.mjs +35 -0
  116. package/esm2022/src/lib/segmented-control/segmented-control.module.mjs +19 -0
  117. package/esm2022/src/lib/shared/core-element/core-element.directive.mjs +33 -0
  118. package/esm2022/src/lib/shared/core-element/core-element.module.mjs +18 -0
  119. package/esm2022/src/lib/shared/core-element/index.mjs +3 -0
  120. package/esm2022/src/lib/shared/index.mjs +4 -0
  121. package/esm2022/src/lib/shared/on-scroll.directive.mjs +47 -0
  122. package/esm2022/src/lib/shared/sebgroup-green-angular-src-lib-shared.mjs +5 -0
  123. package/esm2022/src/lib/shared/shared.module.mjs +18 -0
  124. package/esm2022/src/lib/slider/index.mjs +3 -0
  125. package/esm2022/src/lib/slider/sebgroup-green-angular-src-lib-slider.mjs +5 -0
  126. package/esm2022/src/lib/slider/slider.component.mjs +113 -0
  127. package/esm2022/src/lib/slider/slider.module.mjs +19 -0
  128. package/esm2022/src/lib/sortable-list/index.mjs +3 -0
  129. package/esm2022/src/lib/sortable-list/sebgroup-green-angular-src-lib-sortable-list.mjs +5 -0
  130. package/esm2022/src/lib/sortable-list/sortable-list.component.mjs +181 -0
  131. package/esm2022/src/lib/sortable-list/sortable-list.module.mjs +20 -0
  132. package/esm2022/src/v-angular/account-number/account-number.module.mjs +18 -0
  133. package/esm2022/src/v-angular/account-number/account-number.pipe.mjs +54 -0
  134. package/esm2022/src/v-angular/account-number/index.mjs +3 -0
  135. package/esm2022/src/v-angular/account-number/sebgroup-green-angular-src-v-angular-account-number.mjs +5 -0
  136. package/esm2022/src/v-angular/alert/alert.component.mjs +47 -0
  137. package/esm2022/src/v-angular/alert/alert.models.mjs +8 -0
  138. package/esm2022/src/v-angular/alert/alert.module.mjs +18 -0
  139. package/esm2022/src/v-angular/alert/index.mjs +4 -0
  140. package/esm2022/src/v-angular/alert/sebgroup-green-angular-src-v-angular-alert.mjs +5 -0
  141. package/esm2022/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.mjs +297 -0
  142. package/esm2022/src/v-angular/base-control-value-accessor/base-control-value-accessor.module.mjs +17 -0
  143. package/esm2022/src/v-angular/base-control-value-accessor/index.mjs +3 -0
  144. package/esm2022/src/v-angular/base-control-value-accessor/sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs +5 -0
  145. package/esm2022/src/v-angular/breadcrumbs/breadcrumbs.component.mjs +25 -0
  146. package/esm2022/src/v-angular/breadcrumbs/breadcrumbs.module.mjs +20 -0
  147. package/esm2022/src/v-angular/breadcrumbs/index.mjs +3 -0
  148. package/esm2022/src/v-angular/breadcrumbs/sebgroup-green-angular-src-v-angular-breadcrumbs.mjs +5 -0
  149. package/esm2022/src/v-angular/button/button.component.mjs +108 -0
  150. package/esm2022/src/v-angular/button/button.module.mjs +20 -0
  151. package/esm2022/src/v-angular/button/index.mjs +3 -0
  152. package/esm2022/src/v-angular/button/sebgroup-green-angular-src-v-angular-button.mjs +5 -0
  153. package/esm2022/src/v-angular/card/card.component.mjs +11 -0
  154. package/esm2022/src/v-angular/card/card.module.mjs +18 -0
  155. package/esm2022/src/v-angular/card/index.mjs +3 -0
  156. package/esm2022/src/v-angular/card/sebgroup-green-angular-src-v-angular-card.mjs +5 -0
  157. package/esm2022/src/v-angular/character-countdown/character-countdown.directive.mjs +51 -0
  158. package/esm2022/src/v-angular/character-countdown/character-countdown.module.mjs +18 -0
  159. package/esm2022/src/v-angular/character-countdown/index.mjs +3 -0
  160. package/esm2022/src/v-angular/character-countdown/sebgroup-green-angular-src-v-angular-character-countdown.mjs +5 -0
  161. package/esm2022/src/v-angular/checkbox/checkbox.component.mjs +74 -0
  162. package/esm2022/src/v-angular/checkbox/checkbox.module.mjs +21 -0
  163. package/esm2022/src/v-angular/checkbox/index.mjs +3 -0
  164. package/esm2022/src/v-angular/checkbox/sebgroup-green-angular-src-v-angular-checkbox.mjs +5 -0
  165. package/esm2022/src/v-angular/core/core.globals.mjs +20 -0
  166. package/esm2022/src/v-angular/core/core.utils.mjs +62 -0
  167. package/esm2022/src/v-angular/core/index.mjs +3 -0
  168. package/esm2022/src/v-angular/core/sebgroup-green-angular-src-v-angular-core.mjs +5 -0
  169. package/esm2022/src/v-angular/datepicker/components/calendar/calendar.component.mjs +200 -0
  170. package/esm2022/src/v-angular/datepicker/components/calendar-control/calendar-control.component.mjs +115 -0
  171. package/esm2022/src/v-angular/datepicker/components/date-input/date-input.component.mjs +203 -0
  172. package/esm2022/src/v-angular/datepicker/components/datepicker/datepicker.component.mjs +135 -0
  173. package/esm2022/src/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.mjs +408 -0
  174. package/esm2022/src/v-angular/datepicker/datepicker.globals.mjs +20 -0
  175. package/esm2022/src/v-angular/datepicker/datepicker.models.mjs +56 -0
  176. package/esm2022/src/v-angular/datepicker/datepicker.module.mjs +63 -0
  177. package/esm2022/src/v-angular/datepicker/datepicker.utils.mjs +196 -0
  178. package/esm2022/src/v-angular/datepicker/directives/calendar-date.directive.mjs +47 -0
  179. package/esm2022/src/v-angular/datepicker/index.mjs +17 -0
  180. package/esm2022/src/v-angular/datepicker/models/dates.mjs +291 -0
  181. package/esm2022/src/v-angular/datepicker/pipes/date-thook.pipe.mjs +30 -0
  182. package/esm2022/src/v-angular/datepicker/pipes/is-disabled.pipe.mjs +37 -0
  183. package/esm2022/src/v-angular/datepicker/pipes/matches.pipe.mjs +17 -0
  184. package/esm2022/src/v-angular/datepicker/sebgroup-green-angular-src-v-angular-datepicker.mjs +5 -0
  185. package/esm2022/src/v-angular/drag-drop/drag-drop.component.mjs +496 -0
  186. package/esm2022/src/v-angular/drag-drop/drag-drop.models.mjs +2 -0
  187. package/esm2022/src/v-angular/drag-drop/drag-drop.module.mjs +49 -0
  188. package/esm2022/src/v-angular/drag-drop/drag-drop.pipes.mjs +70 -0
  189. package/esm2022/src/v-angular/drag-drop/drag-drop.utils.mjs +75 -0
  190. package/esm2022/src/v-angular/drag-drop/index.mjs +5 -0
  191. package/esm2022/src/v-angular/drag-drop/sebgroup-green-angular-src-v-angular-drag-drop.mjs +5 -0
  192. package/esm2022/src/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +271 -0
  193. package/esm2022/src/v-angular/dropdown/dropdown-list/index.mjs +2 -0
  194. package/esm2022/src/v-angular/dropdown/dropdown.component.mjs +246 -0
  195. package/esm2022/src/v-angular/dropdown/dropdown.module.mjs +38 -0
  196. package/esm2022/src/v-angular/dropdown/index.mjs +6 -0
  197. package/esm2022/src/v-angular/dropdown/sebgroup-green-angular-src-v-angular-dropdown.mjs +5 -0
  198. package/esm2022/src/v-angular/dropdown/typeahead/index.mjs +6 -0
  199. package/esm2022/src/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +98 -0
  200. package/esm2022/src/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.mjs +85 -0
  201. package/esm2022/src/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.mjs +132 -0
  202. package/esm2022/src/v-angular/dropdown/typeahead/typeahead.directive.mjs +177 -0
  203. package/esm2022/src/v-angular/dropdown/typeahead/typeahead.module.mjs +33 -0
  204. package/esm2022/src/v-angular/external-link/external-link.directive.mjs +37 -0
  205. package/esm2022/src/v-angular/external-link/external-link.module.mjs +18 -0
  206. package/esm2022/src/v-angular/external-link/index.mjs +3 -0
  207. package/esm2022/src/v-angular/external-link/sebgroup-green-angular-src-v-angular-external-link.mjs +5 -0
  208. package/esm2022/src/v-angular/i18n/i18n.json +12 -0
  209. package/esm2022/src/v-angular/i18n/i18n.module.mjs +89 -0
  210. package/esm2022/src/v-angular/i18n/i18n.test.module.mjs +89 -0
  211. package/esm2022/src/v-angular/i18n/index.mjs +3 -0
  212. package/esm2022/src/v-angular/i18n/sebgroup-green-angular-src-v-angular-i18n.mjs +5 -0
  213. package/esm2022/src/v-angular/info-circle/index.mjs +3 -0
  214. package/esm2022/src/v-angular/info-circle/info-circle.component.mjs +28 -0
  215. package/esm2022/src/v-angular/info-circle/info-circle.module.mjs +21 -0
  216. package/esm2022/src/v-angular/info-circle/sebgroup-green-angular-src-v-angular-info-circle.mjs +5 -0
  217. package/esm2022/src/v-angular/input/index.mjs +3 -0
  218. package/esm2022/src/v-angular/input/input.component.mjs +218 -0
  219. package/esm2022/src/v-angular/input/input.module.mjs +41 -0
  220. package/esm2022/src/v-angular/input/sebgroup-green-angular-src-v-angular-input.mjs +5 -0
  221. package/esm2022/src/v-angular/input-mask/config.mjs +9 -0
  222. package/esm2022/src/v-angular/input-mask/constants.mjs +2 -0
  223. package/esm2022/src/v-angular/input-mask/index.mjs +6 -0
  224. package/esm2022/src/v-angular/input-mask/input-mask-format.pipe.mjs +21 -0
  225. package/esm2022/src/v-angular/input-mask/input-mask.directive.mjs +165 -0
  226. package/esm2022/src/v-angular/input-mask/input-mask.module.mjs +35 -0
  227. package/esm2022/src/v-angular/input-mask/input-mask.types.mjs +2 -0
  228. package/esm2022/src/v-angular/input-mask/sebgroup-green-angular-src-v-angular-input-mask.mjs +5 -0
  229. package/esm2022/src/v-angular/modal/dialog/dialog.component.mjs +217 -0
  230. package/esm2022/src/v-angular/modal/fold-out/fold-out.component.mjs +157 -0
  231. package/esm2022/src/v-angular/modal/fold-out/fold-out.directive.mjs +19 -0
  232. package/esm2022/src/v-angular/modal/fold-out/keyboard-key.enum.mjs +9 -0
  233. package/esm2022/src/v-angular/modal/index.mjs +6 -0
  234. package/esm2022/src/v-angular/modal/modal.globals.mjs +20 -0
  235. package/esm2022/src/v-angular/modal/modal.module.mjs +53 -0
  236. package/esm2022/src/v-angular/modal/modal.types.mjs +2 -0
  237. package/esm2022/src/v-angular/modal/sebgroup-green-angular-src-v-angular-modal.mjs +5 -0
  238. package/esm2022/src/v-angular/modal/slide-out/slide-out.component.mjs +253 -0
  239. package/esm2022/src/v-angular/pagination/index.mjs +3 -0
  240. package/esm2022/src/v-angular/pagination/pagination.component.mjs +144 -0
  241. package/esm2022/src/v-angular/pagination/pagination.module.mjs +37 -0
  242. package/esm2022/src/v-angular/pagination/sebgroup-green-angular-src-v-angular-pagination.mjs +5 -0
  243. package/esm2022/src/v-angular/radio/index.mjs +3 -0
  244. package/esm2022/src/v-angular/radio/radio.component.mjs +132 -0
  245. package/esm2022/src/v-angular/radio/radio.module.mjs +21 -0
  246. package/esm2022/src/v-angular/radio/sebgroup-green-angular-src-v-angular-radio.mjs +5 -0
  247. package/esm2022/src/v-angular/slug/index.mjs +3 -0
  248. package/esm2022/src/v-angular/slug/sebgroup-green-angular-src-v-angular-slug.mjs +5 -0
  249. package/esm2022/src/v-angular/slug/slug.module.mjs +18 -0
  250. package/esm2022/src/v-angular/slug/slug.pipe.mjs +27 -0
  251. package/esm2022/src/v-angular/table/index.mjs +9 -0
  252. package/esm2022/src/v-angular/table/sebgroup-green-angular-src-v-angular-table.mjs +5 -0
  253. package/esm2022/src/v-angular/table/table.component.mjs +387 -0
  254. package/esm2022/src/v-angular/table/table.directive.mjs +110 -0
  255. package/esm2022/src/v-angular/table/table.models.mjs +2 -0
  256. package/esm2022/src/v-angular/table/table.module.mjs +40 -0
  257. package/esm2022/src/v-angular/table/table.tools.mjs +29 -0
  258. package/esm2022/src/v-angular/table/tr-thook.pipe.mjs +22 -0
  259. package/esm2022/src/v-angular/tabs/index.mjs +8 -0
  260. package/esm2022/src/v-angular/tabs/sebgroup-green-angular-src-v-angular-tabs.mjs +5 -0
  261. package/esm2022/src/v-angular/tabs/tab.directive.mjs +81 -0
  262. package/esm2022/src/v-angular/tabs/tabs.component.mjs +260 -0
  263. package/esm2022/src/v-angular/tabs/tabs.models.mjs +2 -0
  264. package/esm2022/src/v-angular/tabs/tabs.module.mjs +21 -0
  265. package/esm2022/src/v-angular/textarea/index.mjs +3 -0
  266. package/esm2022/src/v-angular/textarea/sebgroup-green-angular-src-v-angular-textarea.mjs +5 -0
  267. package/esm2022/src/v-angular/textarea/textarea.component.mjs +105 -0
  268. package/esm2022/src/v-angular/textarea/textarea.module.mjs +34 -0
  269. package/esm2022/src/v-angular/toast/index.mjs +8 -0
  270. package/esm2022/src/v-angular/toast/sebgroup-green-angular-src-v-angular-toast.mjs +5 -0
  271. package/esm2022/src/v-angular/toast/toast-message.service.mjs +63 -0
  272. package/esm2022/src/v-angular/toast/toast.component.mjs +70 -0
  273. package/esm2022/src/v-angular/toast/toast.models.mjs +8 -0
  274. package/esm2022/src/v-angular/toast/toast.module.mjs +21 -0
  275. package/esm2022/src/v-angular/tooltip/index.mjs +3 -0
  276. package/esm2022/src/v-angular/tooltip/sebgroup-green-angular-src-v-angular-tooltip.mjs +5 -0
  277. package/esm2022/src/v-angular/tooltip/tooltip.directive.mjs +293 -0
  278. package/esm2022/src/v-angular/tooltip/tooltip.module.mjs +18 -0
  279. package/esm2022/src/v-angular/tooltip/tooltip.styles.mjs +60 -0
  280. package/esm2022/v-angular/alert/alert.component.mjs +47 -0
  281. package/esm2022/v-angular/alert/alert.models.mjs +8 -0
  282. package/esm2022/v-angular/alert/alert.module.mjs +18 -0
  283. package/esm2022/v-angular/alert/index.mjs +4 -0
  284. package/esm2022/v-angular/base-control-value-accessor/base-control-value-accessor.component.mjs +297 -0
  285. package/esm2022/v-angular/base-control-value-accessor/base-control-value-accessor.module.mjs +17 -0
  286. package/esm2022/v-angular/base-control-value-accessor/index.mjs +3 -0
  287. package/esm2022/v-angular/breadcrumbs/breadcrumbs.component.mjs +25 -0
  288. package/esm2022/v-angular/breadcrumbs/breadcrumbs.module.mjs +20 -0
  289. package/esm2022/v-angular/breadcrumbs/index.mjs +3 -0
  290. package/esm2022/v-angular/button/button.component.mjs +108 -0
  291. package/esm2022/v-angular/button/button.module.mjs +20 -0
  292. package/esm2022/v-angular/button/index.mjs +3 -0
  293. package/esm2022/v-angular/card/card.component.mjs +11 -0
  294. package/esm2022/v-angular/card/card.module.mjs +18 -0
  295. package/esm2022/v-angular/card/index.mjs +3 -0
  296. package/esm2022/v-angular/character-countdown/character-countdown.directive.mjs +51 -0
  297. package/esm2022/v-angular/character-countdown/character-countdown.module.mjs +18 -0
  298. package/esm2022/v-angular/character-countdown/index.mjs +3 -0
  299. package/esm2022/v-angular/checkbox/checkbox.component.mjs +74 -0
  300. package/esm2022/v-angular/checkbox/checkbox.module.mjs +21 -0
  301. package/esm2022/v-angular/checkbox/index.mjs +3 -0
  302. package/esm2022/v-angular/datepicker/components/calendar/calendar.component.mjs +200 -0
  303. package/esm2022/v-angular/datepicker/components/calendar-control/calendar-control.component.mjs +115 -0
  304. package/esm2022/v-angular/datepicker/components/date-input/date-input.component.mjs +203 -0
  305. package/esm2022/v-angular/datepicker/components/datepicker/datepicker.component.mjs +135 -0
  306. package/esm2022/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.mjs +408 -0
  307. package/esm2022/v-angular/datepicker/datepicker.globals.mjs +20 -0
  308. package/esm2022/v-angular/datepicker/datepicker.models.mjs +56 -0
  309. package/esm2022/v-angular/datepicker/datepicker.module.mjs +63 -0
  310. package/esm2022/v-angular/datepicker/datepicker.utils.mjs +196 -0
  311. package/esm2022/v-angular/datepicker/directives/calendar-date.directive.mjs +47 -0
  312. package/esm2022/v-angular/datepicker/index.mjs +17 -0
  313. package/esm2022/v-angular/datepicker/models/dates.mjs +291 -0
  314. package/esm2022/v-angular/datepicker/pipes/date-thook.pipe.mjs +30 -0
  315. package/esm2022/v-angular/datepicker/pipes/is-disabled.pipe.mjs +37 -0
  316. package/esm2022/v-angular/datepicker/pipes/matches.pipe.mjs +17 -0
  317. package/esm2022/v-angular/drag-drop/drag-drop.component.mjs +496 -0
  318. package/esm2022/v-angular/drag-drop/drag-drop.models.mjs +2 -0
  319. package/esm2022/v-angular/drag-drop/drag-drop.module.mjs +49 -0
  320. package/esm2022/v-angular/drag-drop/drag-drop.pipes.mjs +70 -0
  321. package/esm2022/v-angular/drag-drop/drag-drop.utils.mjs +75 -0
  322. package/esm2022/v-angular/drag-drop/index.mjs +5 -0
  323. package/esm2022/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +271 -0
  324. package/esm2022/v-angular/dropdown/dropdown-list/index.mjs +2 -0
  325. package/esm2022/v-angular/dropdown/dropdown.component.mjs +246 -0
  326. package/esm2022/v-angular/dropdown/dropdown.module.mjs +38 -0
  327. package/esm2022/v-angular/dropdown/index.mjs +6 -0
  328. package/esm2022/v-angular/dropdown/typeahead/index.mjs +6 -0
  329. package/esm2022/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +98 -0
  330. package/esm2022/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.mjs +85 -0
  331. package/esm2022/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.mjs +132 -0
  332. package/esm2022/v-angular/dropdown/typeahead/typeahead.directive.mjs +177 -0
  333. package/esm2022/v-angular/dropdown/typeahead/typeahead.module.mjs +33 -0
  334. package/esm2022/v-angular/external-link/external-link.directive.mjs +37 -0
  335. package/esm2022/v-angular/external-link/external-link.module.mjs +18 -0
  336. package/esm2022/v-angular/external-link/index.mjs +3 -0
  337. package/esm2022/v-angular/i18n/i18n.json +12 -0
  338. package/esm2022/v-angular/i18n/i18n.module.mjs +89 -0
  339. package/esm2022/v-angular/i18n/i18n.test.module.mjs +89 -0
  340. package/esm2022/v-angular/i18n/index.mjs +3 -0
  341. package/esm2022/v-angular/index.mjs +27 -0
  342. package/esm2022/v-angular/info-circle/index.mjs +3 -0
  343. package/esm2022/v-angular/info-circle/info-circle.component.mjs +28 -0
  344. package/esm2022/v-angular/info-circle/info-circle.module.mjs +21 -0
  345. package/esm2022/v-angular/input/index.mjs +3 -0
  346. package/esm2022/v-angular/input/input.component.mjs +218 -0
  347. package/esm2022/v-angular/input/input.module.mjs +41 -0
  348. package/esm2022/v-angular/input-mask/config.mjs +9 -0
  349. package/esm2022/v-angular/input-mask/constants.mjs +2 -0
  350. package/esm2022/v-angular/input-mask/index.mjs +6 -0
  351. package/esm2022/v-angular/input-mask/input-mask-format.pipe.mjs +21 -0
  352. package/esm2022/v-angular/input-mask/input-mask.directive.mjs +165 -0
  353. package/esm2022/v-angular/input-mask/input-mask.module.mjs +35 -0
  354. package/esm2022/v-angular/input-mask/input-mask.types.mjs +2 -0
  355. package/esm2022/v-angular/modal/dialog/dialog.component.mjs +217 -0
  356. package/esm2022/v-angular/modal/fold-out/fold-out.component.mjs +157 -0
  357. package/esm2022/v-angular/modal/fold-out/fold-out.directive.mjs +19 -0
  358. package/esm2022/v-angular/modal/fold-out/keyboard-key.enum.mjs +9 -0
  359. package/esm2022/v-angular/modal/index.mjs +6 -0
  360. package/esm2022/v-angular/modal/modal.globals.mjs +20 -0
  361. package/esm2022/v-angular/modal/modal.module.mjs +53 -0
  362. package/esm2022/v-angular/modal/modal.types.mjs +2 -0
  363. package/esm2022/v-angular/modal/slide-out/slide-out.component.mjs +253 -0
  364. package/esm2022/v-angular/pagination/index.mjs +3 -0
  365. package/esm2022/v-angular/pagination/pagination.component.mjs +144 -0
  366. package/esm2022/v-angular/pagination/pagination.module.mjs +37 -0
  367. package/esm2022/v-angular/radio/index.mjs +3 -0
  368. package/esm2022/v-angular/radio/radio.component.mjs +132 -0
  369. package/esm2022/v-angular/radio/radio.module.mjs +21 -0
  370. package/esm2022/v-angular/sebgroup-green-angular-v-angular.mjs +5 -0
  371. package/esm2022/v-angular/slug/index.mjs +3 -0
  372. package/esm2022/v-angular/slug/slug.module.mjs +18 -0
  373. package/esm2022/v-angular/slug/slug.pipe.mjs +27 -0
  374. package/esm2022/v-angular/table/index.mjs +9 -0
  375. package/esm2022/v-angular/table/table.component.mjs +387 -0
  376. package/esm2022/v-angular/table/table.directive.mjs +110 -0
  377. package/esm2022/v-angular/table/table.models.mjs +2 -0
  378. package/esm2022/v-angular/table/table.module.mjs +40 -0
  379. package/esm2022/v-angular/table/table.tools.mjs +29 -0
  380. package/esm2022/v-angular/table/tr-thook.pipe.mjs +22 -0
  381. package/esm2022/v-angular/tabs/index.mjs +8 -0
  382. package/esm2022/v-angular/tabs/tab.directive.mjs +81 -0
  383. package/esm2022/v-angular/tabs/tabs.component.mjs +260 -0
  384. package/esm2022/v-angular/tabs/tabs.models.mjs +2 -0
  385. package/esm2022/v-angular/tabs/tabs.module.mjs +21 -0
  386. package/esm2022/v-angular/textarea/index.mjs +3 -0
  387. package/esm2022/v-angular/textarea/textarea.component.mjs +105 -0
  388. package/esm2022/v-angular/textarea/textarea.module.mjs +34 -0
  389. package/esm2022/v-angular/toast/index.mjs +8 -0
  390. package/esm2022/v-angular/toast/toast-message.service.mjs +63 -0
  391. package/esm2022/v-angular/toast/toast.component.mjs +70 -0
  392. package/esm2022/v-angular/toast/toast.models.mjs +8 -0
  393. package/esm2022/v-angular/toast/toast.module.mjs +21 -0
  394. package/esm2022/v-angular/tooltip/index.mjs +3 -0
  395. package/esm2022/v-angular/tooltip/tooltip.directive.mjs +293 -0
  396. package/esm2022/v-angular/tooltip/tooltip.module.mjs +18 -0
  397. package/esm2022/v-angular/tooltip/tooltip.styles.mjs +60 -0
  398. package/esm2022/v-angular/v-angular.module.mjs +120 -0
  399. package/fesm2022/sebgroup-green-angular-src-lib-accordion.mjs +141 -0
  400. package/fesm2022/sebgroup-green-angular-src-lib-accordion.mjs.map +1 -0
  401. package/fesm2022/sebgroup-green-angular-src-lib-badge.mjs +102 -0
  402. package/fesm2022/sebgroup-green-angular-src-lib-badge.mjs.map +1 -0
  403. package/fesm2022/sebgroup-green-angular-src-lib-button.mjs +50 -0
  404. package/fesm2022/sebgroup-green-angular-src-lib-button.mjs.map +1 -0
  405. package/fesm2022/sebgroup-green-angular-src-lib-cell-table.mjs +270 -0
  406. package/fesm2022/sebgroup-green-angular-src-lib-cell-table.mjs.map +1 -0
  407. package/fesm2022/sebgroup-green-angular-src-lib-context-menu.mjs +97 -0
  408. package/fesm2022/sebgroup-green-angular-src-lib-context-menu.mjs.map +1 -0
  409. package/fesm2022/sebgroup-green-angular-src-lib-datepicker.mjs +162 -0
  410. package/fesm2022/sebgroup-green-angular-src-lib-datepicker.mjs.map +1 -0
  411. package/fesm2022/sebgroup-green-angular-src-lib-dropdown.mjs +284 -0
  412. package/fesm2022/sebgroup-green-angular-src-lib-dropdown.mjs.map +1 -0
  413. package/fesm2022/sebgroup-green-angular-src-lib-in-page-wizard.mjs +83 -0
  414. package/fesm2022/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +1 -0
  415. package/fesm2022/sebgroup-green-angular-src-lib-modal.mjs +377 -0
  416. package/fesm2022/sebgroup-green-angular-src-lib-modal.mjs.map +1 -0
  417. package/fesm2022/sebgroup-green-angular-src-lib-pagination.mjs +197 -0
  418. package/fesm2022/sebgroup-green-angular-src-lib-pagination.mjs.map +1 -0
  419. package/fesm2022/sebgroup-green-angular-src-lib-progress-circle.mjs +63 -0
  420. package/fesm2022/sebgroup-green-angular-src-lib-progress-circle.mjs.map +1 -0
  421. package/fesm2022/sebgroup-green-angular-src-lib-segmented-control.mjs +58 -0
  422. package/fesm2022/sebgroup-green-angular-src-lib-segmented-control.mjs.map +1 -0
  423. package/fesm2022/sebgroup-green-angular-src-lib-shared.mjs +113 -0
  424. package/fesm2022/sebgroup-green-angular-src-lib-shared.mjs.map +1 -0
  425. package/fesm2022/sebgroup-green-angular-src-lib-slider.mjs +135 -0
  426. package/fesm2022/sebgroup-green-angular-src-lib-slider.mjs.map +1 -0
  427. package/fesm2022/sebgroup-green-angular-src-lib-sortable-list.mjs +204 -0
  428. package/fesm2022/sebgroup-green-angular-src-lib-sortable-list.mjs.map +1 -0
  429. package/fesm2022/sebgroup-green-angular-src-v-angular-account-number.mjs +76 -0
  430. package/fesm2022/sebgroup-green-angular-src-v-angular-account-number.mjs.map +1 -0
  431. package/fesm2022/sebgroup-green-angular-src-v-angular-alert.mjs +76 -0
  432. package/fesm2022/sebgroup-green-angular-src-v-angular-alert.mjs.map +1 -0
  433. package/fesm2022/sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs +318 -0
  434. package/fesm2022/sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs.map +1 -0
  435. package/fesm2022/sebgroup-green-angular-src-v-angular-breadcrumbs.mjs +49 -0
  436. package/fesm2022/sebgroup-green-angular-src-v-angular-breadcrumbs.mjs.map +1 -0
  437. package/fesm2022/sebgroup-green-angular-src-v-angular-button.mjs +131 -0
  438. package/fesm2022/sebgroup-green-angular-src-v-angular-button.mjs.map +1 -0
  439. package/fesm2022/sebgroup-green-angular-src-v-angular-card.mjs +33 -0
  440. package/fesm2022/sebgroup-green-angular-src-v-angular-card.mjs.map +1 -0
  441. package/fesm2022/sebgroup-green-angular-src-v-angular-character-countdown.mjs +73 -0
  442. package/fesm2022/sebgroup-green-angular-src-v-angular-character-countdown.mjs.map +1 -0
  443. package/fesm2022/sebgroup-green-angular-src-v-angular-checkbox.mjs +98 -0
  444. package/fesm2022/sebgroup-green-angular-src-v-angular-checkbox.mjs.map +1 -0
  445. package/fesm2022/sebgroup-green-angular-src-v-angular-core.mjs +88 -0
  446. package/fesm2022/sebgroup-green-angular-src-v-angular-core.mjs.map +1 -0
  447. package/fesm2022/sebgroup-green-angular-src-v-angular-datepicker.mjs +1759 -0
  448. package/fesm2022/sebgroup-green-angular-src-v-angular-datepicker.mjs.map +1 -0
  449. package/fesm2022/sebgroup-green-angular-src-v-angular-drag-drop.mjs +685 -0
  450. package/fesm2022/sebgroup-green-angular-src-v-angular-drag-drop.mjs.map +1 -0
  451. package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs +1037 -0
  452. package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs.map +1 -0
  453. package/fesm2022/sebgroup-green-angular-src-v-angular-external-link.mjs +58 -0
  454. package/fesm2022/sebgroup-green-angular-src-v-angular-external-link.mjs.map +1 -0
  455. package/fesm2022/sebgroup-green-angular-src-v-angular-i18n.mjs +198 -0
  456. package/fesm2022/sebgroup-green-angular-src-v-angular-i18n.mjs.map +1 -0
  457. package/fesm2022/sebgroup-green-angular-src-v-angular-info-circle.mjs +53 -0
  458. package/fesm2022/sebgroup-green-angular-src-v-angular-info-circle.mjs.map +1 -0
  459. package/fesm2022/sebgroup-green-angular-src-v-angular-input-mask.mjs +227 -0
  460. package/fesm2022/sebgroup-green-angular-src-v-angular-input-mask.mjs.map +1 -0
  461. package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs +262 -0
  462. package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs.map +1 -0
  463. package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs +717 -0
  464. package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs.map +1 -0
  465. package/fesm2022/sebgroup-green-angular-src-v-angular-pagination.mjs +185 -0
  466. package/fesm2022/sebgroup-green-angular-src-v-angular-pagination.mjs.map +1 -0
  467. package/fesm2022/sebgroup-green-angular-src-v-angular-radio.mjs +156 -0
  468. package/fesm2022/sebgroup-green-angular-src-v-angular-radio.mjs.map +1 -0
  469. package/fesm2022/sebgroup-green-angular-src-v-angular-slug.mjs +49 -0
  470. package/fesm2022/sebgroup-green-angular-src-v-angular-slug.mjs.map +1 -0
  471. package/fesm2022/sebgroup-green-angular-src-v-angular-table.mjs +585 -0
  472. package/fesm2022/sebgroup-green-angular-src-v-angular-table.mjs.map +1 -0
  473. package/fesm2022/sebgroup-green-angular-src-v-angular-tabs.mjs +365 -0
  474. package/fesm2022/sebgroup-green-angular-src-v-angular-tabs.mjs.map +1 -0
  475. package/fesm2022/sebgroup-green-angular-src-v-angular-textarea.mjs +141 -0
  476. package/fesm2022/sebgroup-green-angular-src-v-angular-textarea.mjs.map +1 -0
  477. package/fesm2022/sebgroup-green-angular-src-v-angular-toast.mjs +166 -0
  478. package/fesm2022/sebgroup-green-angular-src-v-angular-toast.mjs.map +1 -0
  479. package/fesm2022/sebgroup-green-angular-src-v-angular-tooltip.mjs +374 -0
  480. package/fesm2022/sebgroup-green-angular-src-v-angular-tooltip.mjs.map +1 -0
  481. package/fesm2022/sebgroup-green-angular-v-angular.mjs +7538 -0
  482. package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -0
  483. package/fesm2022/sebgroup-green-angular.mjs +2229 -0
  484. package/fesm2022/sebgroup-green-angular.mjs.map +1 -0
  485. package/index.d.ts +17 -0
  486. package/lib/accordion/accordion-list-item.component.d.ts +16 -0
  487. package/lib/accordion/accordion.component.d.ts +16 -0
  488. package/lib/accordion/accordion.module.d.ts +9 -0
  489. package/lib/accordion/index.d.ts +3 -0
  490. package/lib/badge/badge.component.d.ts +25 -0
  491. package/lib/badge/badge.module.d.ts +8 -0
  492. package/lib/badge/index.d.ts +2 -0
  493. package/lib/button/button.component.d.ts +9 -0
  494. package/lib/button/button.module.d.ts +8 -0
  495. package/lib/button/index.d.ts +2 -0
  496. package/lib/cell-table/cell-table-item.component.d.ts +14 -0
  497. package/lib/cell-table/cell-table.component.d.ts +44 -0
  498. package/lib/cell-table/cell-table.module.d.ts +10 -0
  499. package/lib/cell-table/cell-table.types.d.ts +34 -0
  500. package/lib/cell-table/cell-underline.directive.d.ts +14 -0
  501. package/lib/cell-table/index.d.ts +3 -0
  502. package/lib/context-menu/context-menu.component.d.ts +44 -0
  503. package/lib/context-menu/context-menu.module.d.ts +9 -0
  504. package/lib/context-menu/index.d.ts +2 -0
  505. package/lib/datepicker/datepicker.component.d.ts +59 -0
  506. package/lib/datepicker/datepicker.module.d.ts +9 -0
  507. package/lib/datepicker/index.d.ts +2 -0
  508. package/lib/dropdown/dropdown-button.directive.d.ts +8 -0
  509. package/lib/dropdown/dropdown-option.directive.d.ts +8 -0
  510. package/lib/dropdown/dropdown.component.d.ts +78 -0
  511. package/lib/dropdown/dropdown.module.d.ts +11 -0
  512. package/lib/dropdown/index.d.ts +4 -0
  513. package/lib/green-angular.module.d.ts +21 -0
  514. package/lib/in-page-wizard/in-page-wizard-step-card.component.d.ts +19 -0
  515. package/lib/in-page-wizard/in-page-wizard.module.d.ts +8 -0
  516. package/lib/in-page-wizard/index.d.ts +2 -0
  517. package/lib/modal/index.d.ts +4 -0
  518. package/lib/modal/modal-footer.directive.d.ts +8 -0
  519. package/lib/modal/modal-header.directive.d.ts +8 -0
  520. package/lib/modal/modal.component.d.ts +67 -0
  521. package/lib/modal/modal.module.d.ts +11 -0
  522. package/lib/pagination/index.d.ts +2 -0
  523. package/lib/pagination/pagination.component.d.ts +42 -0
  524. package/lib/pagination/pagination.module.d.ts +8 -0
  525. package/lib/progress-circle/index.d.ts +2 -0
  526. package/lib/progress-circle/progress-circle.component.d.ts +14 -0
  527. package/lib/progress-circle/progress-circle.module.d.ts +8 -0
  528. package/lib/segmented-control/index.d.ts +2 -0
  529. package/lib/segmented-control/segmented-control.component.d.ts +11 -0
  530. package/lib/segmented-control/segmented-control.module.d.ts +9 -0
  531. package/lib/shared/core-element/core-element.directive.d.ts +13 -0
  532. package/lib/shared/core-element/core-element.module.d.ts +8 -0
  533. package/lib/shared/core-element/index.d.ts +2 -0
  534. package/lib/shared/index.d.ts +3 -0
  535. package/lib/shared/on-scroll.directive.d.ts +14 -0
  536. package/lib/shared/shared.module.d.ts +8 -0
  537. package/lib/slider/index.d.ts +2 -0
  538. package/lib/slider/slider.component.d.ts +38 -0
  539. package/lib/slider/slider.module.d.ts +9 -0
  540. package/lib/sortable-list/index.d.ts +2 -0
  541. package/lib/sortable-list/sortable-list.component.d.ts +91 -0
  542. package/lib/sortable-list/sortable-list.module.d.ts +10 -0
  543. package/package.json +308 -0
  544. package/src/lib/accordion/accordion-list-item.component.d.ts +16 -0
  545. package/src/lib/accordion/accordion.component.d.ts +16 -0
  546. package/src/lib/accordion/accordion.module.d.ts +9 -0
  547. package/src/lib/accordion/index.d.ts +3 -0
  548. package/src/lib/badge/badge.component.d.ts +25 -0
  549. package/src/lib/badge/badge.module.d.ts +8 -0
  550. package/src/lib/badge/index.d.ts +2 -0
  551. package/src/lib/button/button.component.d.ts +9 -0
  552. package/src/lib/button/button.module.d.ts +8 -0
  553. package/src/lib/button/index.d.ts +2 -0
  554. package/src/lib/cell-table/cell-table-item.component.d.ts +14 -0
  555. package/src/lib/cell-table/cell-table.component.d.ts +44 -0
  556. package/src/lib/cell-table/cell-table.module.d.ts +10 -0
  557. package/src/lib/cell-table/cell-table.types.d.ts +34 -0
  558. package/src/lib/cell-table/cell-underline.directive.d.ts +14 -0
  559. package/src/lib/cell-table/index.d.ts +3 -0
  560. package/src/lib/context-menu/context-menu.component.d.ts +44 -0
  561. package/src/lib/context-menu/context-menu.module.d.ts +9 -0
  562. package/src/lib/context-menu/index.d.ts +2 -0
  563. package/src/lib/datepicker/datepicker.component.d.ts +59 -0
  564. package/src/lib/datepicker/datepicker.module.d.ts +9 -0
  565. package/src/lib/datepicker/index.d.ts +2 -0
  566. package/src/lib/dropdown/dropdown-button.directive.d.ts +8 -0
  567. package/src/lib/dropdown/dropdown-option.directive.d.ts +8 -0
  568. package/src/lib/dropdown/dropdown.component.d.ts +78 -0
  569. package/src/lib/dropdown/dropdown.module.d.ts +11 -0
  570. package/src/lib/dropdown/index.d.ts +4 -0
  571. package/src/lib/in-page-wizard/in-page-wizard-step-card.component.d.ts +19 -0
  572. package/src/lib/in-page-wizard/in-page-wizard.module.d.ts +8 -0
  573. package/src/lib/in-page-wizard/index.d.ts +2 -0
  574. package/src/lib/modal/index.d.ts +4 -0
  575. package/src/lib/modal/modal-footer.directive.d.ts +8 -0
  576. package/src/lib/modal/modal-header.directive.d.ts +8 -0
  577. package/src/lib/modal/modal.component.d.ts +67 -0
  578. package/src/lib/modal/modal.module.d.ts +11 -0
  579. package/src/lib/pagination/index.d.ts +2 -0
  580. package/src/lib/pagination/pagination.component.d.ts +42 -0
  581. package/src/lib/pagination/pagination.module.d.ts +8 -0
  582. package/src/lib/progress-circle/index.d.ts +2 -0
  583. package/src/lib/progress-circle/progress-circle.component.d.ts +14 -0
  584. package/src/lib/progress-circle/progress-circle.module.d.ts +8 -0
  585. package/src/lib/segmented-control/index.d.ts +2 -0
  586. package/src/lib/segmented-control/segmented-control.component.d.ts +11 -0
  587. package/src/lib/segmented-control/segmented-control.module.d.ts +9 -0
  588. package/src/lib/shared/core-element/core-element.directive.d.ts +13 -0
  589. package/src/lib/shared/core-element/core-element.module.d.ts +8 -0
  590. package/src/lib/shared/core-element/index.d.ts +2 -0
  591. package/src/lib/shared/index.d.ts +3 -0
  592. package/src/lib/shared/on-scroll.directive.d.ts +14 -0
  593. package/src/lib/shared/shared.module.d.ts +8 -0
  594. package/src/lib/slider/index.d.ts +2 -0
  595. package/src/lib/slider/slider.component.d.ts +38 -0
  596. package/src/lib/slider/slider.module.d.ts +9 -0
  597. package/src/lib/sortable-list/index.d.ts +2 -0
  598. package/src/lib/sortable-list/sortable-list.component.d.ts +91 -0
  599. package/src/lib/sortable-list/sortable-list.module.d.ts +10 -0
  600. package/src/v-angular/account-number/README.md +70 -0
  601. package/src/v-angular/account-number/account-number.module.d.ts +8 -0
  602. package/src/v-angular/account-number/account-number.pipe.d.ts +32 -0
  603. package/src/v-angular/account-number/index.d.ts +2 -0
  604. package/src/v-angular/alert/alert.component.d.ts +19 -0
  605. package/src/v-angular/alert/alert.models.d.ts +13 -0
  606. package/src/v-angular/alert/alert.module.d.ts +8 -0
  607. package/src/v-angular/alert/index.d.ts +3 -0
  608. package/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.d.ts +130 -0
  609. package/src/v-angular/base-control-value-accessor/base-control-value-accessor.module.d.ts +7 -0
  610. package/src/v-angular/base-control-value-accessor/index.d.ts +2 -0
  611. package/src/v-angular/breadcrumbs/breadcrumbs.component.d.ts +18 -0
  612. package/src/v-angular/breadcrumbs/breadcrumbs.module.d.ts +10 -0
  613. package/src/v-angular/breadcrumbs/index.d.ts +2 -0
  614. package/src/v-angular/button/button.component.d.ts +62 -0
  615. package/src/v-angular/button/button.module.d.ts +10 -0
  616. package/src/v-angular/button/index.d.ts +2 -0
  617. package/src/v-angular/card/card.component.d.ts +5 -0
  618. package/src/v-angular/card/card.module.d.ts +8 -0
  619. package/src/v-angular/card/index.d.ts +2 -0
  620. package/src/v-angular/character-countdown/character-countdown.directive.d.ts +17 -0
  621. package/src/v-angular/character-countdown/character-countdown.module.d.ts +8 -0
  622. package/src/v-angular/character-countdown/index.d.ts +2 -0
  623. package/src/v-angular/checkbox/checkbox.component.d.ts +28 -0
  624. package/src/v-angular/checkbox/checkbox.module.d.ts +10 -0
  625. package/src/v-angular/checkbox/index.d.ts +2 -0
  626. package/src/v-angular/core/core.globals.d.ts +13 -0
  627. package/src/v-angular/core/core.utils.d.ts +23 -0
  628. package/src/v-angular/core/index.d.ts +2 -0
  629. package/src/v-angular/datepicker/components/calendar/calendar.component.d.ts +36 -0
  630. package/src/v-angular/datepicker/components/calendar-control/calendar-control.component.d.ts +30 -0
  631. package/src/v-angular/datepicker/components/date-input/date-input.component.d.ts +102 -0
  632. package/src/v-angular/datepicker/components/datepicker/datepicker.component.d.ts +62 -0
  633. package/src/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.d.ts +165 -0
  634. package/src/v-angular/datepicker/datepicker.globals.d.ts +13 -0
  635. package/src/v-angular/datepicker/datepicker.models.d.ts +50 -0
  636. package/src/v-angular/datepicker/datepicker.module.d.ts +19 -0
  637. package/src/v-angular/datepicker/datepicker.utils.d.ts +39 -0
  638. package/src/v-angular/datepicker/directives/calendar-date.directive.d.ts +21 -0
  639. package/src/v-angular/datepicker/index.d.ts +13 -0
  640. package/src/v-angular/datepicker/models/dates.d.ts +15 -0
  641. package/src/v-angular/datepicker/pipes/date-thook.pipe.d.ts +8 -0
  642. package/src/v-angular/datepicker/pipes/is-disabled.pipe.d.ts +8 -0
  643. package/src/v-angular/datepicker/pipes/matches.pipe.d.ts +7 -0
  644. package/src/v-angular/drag-drop/drag-drop.component.d.ts +131 -0
  645. package/src/v-angular/drag-drop/drag-drop.models.d.ts +49 -0
  646. package/src/v-angular/drag-drop/drag-drop.module.d.ts +13 -0
  647. package/src/v-angular/drag-drop/drag-drop.pipes.d.ts +40 -0
  648. package/src/v-angular/drag-drop/drag-drop.utils.d.ts +33 -0
  649. package/src/v-angular/drag-drop/index.d.ts +4 -0
  650. package/src/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +96 -0
  651. package/src/v-angular/dropdown/dropdown-list/index.d.ts +1 -0
  652. package/src/v-angular/dropdown/dropdown.component.d.ts +103 -0
  653. package/src/v-angular/dropdown/dropdown.module.d.ts +13 -0
  654. package/src/v-angular/dropdown/index.d.ts +5 -0
  655. package/src/v-angular/dropdown/typeahead/index.d.ts +5 -0
  656. package/src/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.d.ts +34 -0
  657. package/src/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.d.ts +34 -0
  658. package/src/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.d.ts +59 -0
  659. package/src/v-angular/dropdown/typeahead/typeahead.directive.d.ts +76 -0
  660. package/src/v-angular/dropdown/typeahead/typeahead.module.d.ts +11 -0
  661. package/src/v-angular/external-link/external-link.directive.d.ts +17 -0
  662. package/src/v-angular/external-link/external-link.module.d.ts +8 -0
  663. package/src/v-angular/external-link/index.d.ts +2 -0
  664. package/src/v-angular/i18n/i18n.module.d.ts +15 -0
  665. package/src/v-angular/i18n/i18n.test.module.d.ts +27 -0
  666. package/src/v-angular/i18n/index.d.ts +2 -0
  667. package/src/v-angular/info-circle/index.d.ts +2 -0
  668. package/src/v-angular/info-circle/info-circle.component.d.ts +16 -0
  669. package/src/v-angular/info-circle/info-circle.module.d.ts +10 -0
  670. package/src/v-angular/input/index.d.ts +2 -0
  671. package/src/v-angular/input/input.component.d.ts +85 -0
  672. package/src/v-angular/input/input.module.d.ts +13 -0
  673. package/src/v-angular/input-mask/config.d.ts +6 -0
  674. package/src/v-angular/input-mask/constants.d.ts +2 -0
  675. package/src/v-angular/input-mask/index.d.ts +5 -0
  676. package/src/v-angular/input-mask/input-mask-format.pipe.d.ts +8 -0
  677. package/src/v-angular/input-mask/input-mask.directive.d.ts +39 -0
  678. package/src/v-angular/input-mask/input-mask.module.d.ts +11 -0
  679. package/src/v-angular/input-mask/input-mask.types.d.ts +20 -0
  680. package/src/v-angular/modal/dialog/dialog.component.d.ts +64 -0
  681. package/src/v-angular/modal/fold-out/fold-out.component.d.ts +47 -0
  682. package/src/v-angular/modal/fold-out/fold-out.directive.d.ts +6 -0
  683. package/src/v-angular/modal/fold-out/keyboard-key.enum.d.ts +7 -0
  684. package/src/v-angular/modal/index.d.ts +5 -0
  685. package/src/v-angular/modal/modal.globals.d.ts +13 -0
  686. package/src/v-angular/modal/modal.module.d.ts +15 -0
  687. package/src/v-angular/modal/modal.types.d.ts +5 -0
  688. package/src/v-angular/modal/slide-out/slide-out.component.d.ts +83 -0
  689. package/src/v-angular/pagination/index.d.ts +2 -0
  690. package/src/v-angular/pagination/pagination.component.d.ts +64 -0
  691. package/src/v-angular/pagination/pagination.module.d.ts +12 -0
  692. package/src/v-angular/radio/index.d.ts +2 -0
  693. package/src/v-angular/radio/radio.component.d.ts +49 -0
  694. package/src/v-angular/radio/radio.module.d.ts +10 -0
  695. package/src/v-angular/slug/index.d.ts +2 -0
  696. package/src/v-angular/slug/slug.module.d.ts +8 -0
  697. package/src/v-angular/slug/slug.pipe.d.ts +12 -0
  698. package/src/v-angular/table/index.d.ts +5 -0
  699. package/src/v-angular/table/table.component.d.ts +229 -0
  700. package/src/v-angular/table/table.directive.d.ts +36 -0
  701. package/src/v-angular/table/table.models.d.ts +62 -0
  702. package/src/v-angular/table/table.module.d.ts +12 -0
  703. package/src/v-angular/table/table.tools.d.ts +5 -0
  704. package/src/v-angular/table/tr-thook.pipe.d.ts +7 -0
  705. package/src/v-angular/tabs/index.d.ts +4 -0
  706. package/src/v-angular/tabs/tab.directive.d.ts +37 -0
  707. package/src/v-angular/tabs/tabs.component.d.ts +65 -0
  708. package/src/v-angular/tabs/tabs.models.d.ts +25 -0
  709. package/src/v-angular/tabs/tabs.module.d.ts +11 -0
  710. package/src/v-angular/textarea/index.d.ts +2 -0
  711. package/src/v-angular/textarea/textarea.component.d.ts +45 -0
  712. package/src/v-angular/textarea/textarea.module.d.ts +12 -0
  713. package/src/v-angular/toast/index.d.ts +4 -0
  714. package/src/v-angular/toast/toast-message.service.d.ts +17 -0
  715. package/src/v-angular/toast/toast.component.d.ts +22 -0
  716. package/src/v-angular/toast/toast.models.d.ts +15 -0
  717. package/src/v-angular/toast/toast.module.d.ts +10 -0
  718. package/src/v-angular/tooltip/index.d.ts +2 -0
  719. package/src/v-angular/tooltip/tooltip.directive.d.ts +108 -0
  720. package/src/v-angular/tooltip/tooltip.module.d.ts +8 -0
  721. package/src/v-angular/tooltip/tooltip.styles.d.ts +11 -0
  722. package/v-angular/alert/alert.component.d.ts +19 -0
  723. package/v-angular/alert/alert.models.d.ts +13 -0
  724. package/v-angular/alert/alert.module.d.ts +8 -0
  725. package/v-angular/alert/index.d.ts +3 -0
  726. package/v-angular/base-control-value-accessor/base-control-value-accessor.component.d.ts +130 -0
  727. package/v-angular/base-control-value-accessor/base-control-value-accessor.module.d.ts +7 -0
  728. package/v-angular/base-control-value-accessor/index.d.ts +2 -0
  729. package/v-angular/breadcrumbs/breadcrumbs.component.d.ts +18 -0
  730. package/v-angular/breadcrumbs/breadcrumbs.module.d.ts +10 -0
  731. package/v-angular/breadcrumbs/index.d.ts +2 -0
  732. package/v-angular/button/button.component.d.ts +62 -0
  733. package/v-angular/button/button.module.d.ts +10 -0
  734. package/v-angular/button/index.d.ts +2 -0
  735. package/v-angular/card/card.component.d.ts +5 -0
  736. package/v-angular/card/card.module.d.ts +8 -0
  737. package/v-angular/card/index.d.ts +2 -0
  738. package/v-angular/character-countdown/character-countdown.directive.d.ts +17 -0
  739. package/v-angular/character-countdown/character-countdown.module.d.ts +8 -0
  740. package/v-angular/character-countdown/index.d.ts +2 -0
  741. package/v-angular/checkbox/checkbox.component.d.ts +28 -0
  742. package/v-angular/checkbox/checkbox.module.d.ts +10 -0
  743. package/v-angular/checkbox/index.d.ts +2 -0
  744. package/v-angular/datepicker/components/calendar/calendar.component.d.ts +36 -0
  745. package/v-angular/datepicker/components/calendar-control/calendar-control.component.d.ts +30 -0
  746. package/v-angular/datepicker/components/date-input/date-input.component.d.ts +102 -0
  747. package/v-angular/datepicker/components/datepicker/datepicker.component.d.ts +62 -0
  748. package/v-angular/datepicker/date-control-value-accessor/date-control-value-accessor.component.d.ts +165 -0
  749. package/v-angular/datepicker/datepicker.globals.d.ts +13 -0
  750. package/v-angular/datepicker/datepicker.models.d.ts +50 -0
  751. package/v-angular/datepicker/datepicker.module.d.ts +19 -0
  752. package/v-angular/datepicker/datepicker.utils.d.ts +39 -0
  753. package/v-angular/datepicker/directives/calendar-date.directive.d.ts +21 -0
  754. package/v-angular/datepicker/index.d.ts +13 -0
  755. package/v-angular/datepicker/models/dates.d.ts +15 -0
  756. package/v-angular/datepicker/pipes/date-thook.pipe.d.ts +8 -0
  757. package/v-angular/datepicker/pipes/is-disabled.pipe.d.ts +8 -0
  758. package/v-angular/datepicker/pipes/matches.pipe.d.ts +7 -0
  759. package/v-angular/drag-drop/drag-drop.component.d.ts +131 -0
  760. package/v-angular/drag-drop/drag-drop.models.d.ts +49 -0
  761. package/v-angular/drag-drop/drag-drop.module.d.ts +13 -0
  762. package/v-angular/drag-drop/drag-drop.pipes.d.ts +40 -0
  763. package/v-angular/drag-drop/drag-drop.utils.d.ts +33 -0
  764. package/v-angular/drag-drop/index.d.ts +4 -0
  765. package/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +96 -0
  766. package/v-angular/dropdown/dropdown-list/index.d.ts +1 -0
  767. package/v-angular/dropdown/dropdown.component.d.ts +103 -0
  768. package/v-angular/dropdown/dropdown.module.d.ts +13 -0
  769. package/v-angular/dropdown/index.d.ts +5 -0
  770. package/v-angular/dropdown/typeahead/index.d.ts +5 -0
  771. package/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.d.ts +34 -0
  772. package/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.d.ts +34 -0
  773. package/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.d.ts +59 -0
  774. package/v-angular/dropdown/typeahead/typeahead.directive.d.ts +76 -0
  775. package/v-angular/dropdown/typeahead/typeahead.module.d.ts +11 -0
  776. package/v-angular/external-link/external-link.directive.d.ts +17 -0
  777. package/v-angular/external-link/external-link.module.d.ts +8 -0
  778. package/v-angular/external-link/index.d.ts +2 -0
  779. package/v-angular/i18n/i18n.module.d.ts +15 -0
  780. package/v-angular/i18n/i18n.test.module.d.ts +27 -0
  781. package/v-angular/i18n/index.d.ts +2 -0
  782. package/v-angular/index.d.ts +26 -0
  783. package/v-angular/info-circle/index.d.ts +2 -0
  784. package/v-angular/info-circle/info-circle.component.d.ts +16 -0
  785. package/v-angular/info-circle/info-circle.module.d.ts +10 -0
  786. package/v-angular/input/index.d.ts +2 -0
  787. package/v-angular/input/input.component.d.ts +85 -0
  788. package/v-angular/input/input.module.d.ts +13 -0
  789. package/v-angular/input-mask/config.d.ts +6 -0
  790. package/v-angular/input-mask/constants.d.ts +2 -0
  791. package/v-angular/input-mask/index.d.ts +5 -0
  792. package/v-angular/input-mask/input-mask-format.pipe.d.ts +8 -0
  793. package/v-angular/input-mask/input-mask.directive.d.ts +39 -0
  794. package/v-angular/input-mask/input-mask.module.d.ts +11 -0
  795. package/v-angular/input-mask/input-mask.types.d.ts +20 -0
  796. package/v-angular/modal/dialog/dialog.component.d.ts +64 -0
  797. package/v-angular/modal/fold-out/fold-out.component.d.ts +47 -0
  798. package/v-angular/modal/fold-out/fold-out.directive.d.ts +6 -0
  799. package/v-angular/modal/fold-out/keyboard-key.enum.d.ts +7 -0
  800. package/v-angular/modal/index.d.ts +5 -0
  801. package/v-angular/modal/modal.globals.d.ts +13 -0
  802. package/v-angular/modal/modal.module.d.ts +15 -0
  803. package/v-angular/modal/modal.types.d.ts +5 -0
  804. package/v-angular/modal/slide-out/slide-out.component.d.ts +83 -0
  805. package/v-angular/pagination/index.d.ts +2 -0
  806. package/v-angular/pagination/pagination.component.d.ts +64 -0
  807. package/v-angular/pagination/pagination.module.d.ts +12 -0
  808. package/v-angular/radio/index.d.ts +2 -0
  809. package/v-angular/radio/radio.component.d.ts +49 -0
  810. package/v-angular/radio/radio.module.d.ts +10 -0
  811. package/v-angular/slug/index.d.ts +2 -0
  812. package/v-angular/slug/slug.module.d.ts +8 -0
  813. package/v-angular/slug/slug.pipe.d.ts +12 -0
  814. package/v-angular/table/index.d.ts +5 -0
  815. package/v-angular/table/table.component.d.ts +229 -0
  816. package/v-angular/table/table.directive.d.ts +36 -0
  817. package/v-angular/table/table.models.d.ts +62 -0
  818. package/v-angular/table/table.module.d.ts +12 -0
  819. package/v-angular/table/table.tools.d.ts +5 -0
  820. package/v-angular/table/tr-thook.pipe.d.ts +7 -0
  821. package/v-angular/tabs/index.d.ts +4 -0
  822. package/v-angular/tabs/tab.directive.d.ts +37 -0
  823. package/v-angular/tabs/tabs.component.d.ts +65 -0
  824. package/v-angular/tabs/tabs.models.d.ts +25 -0
  825. package/v-angular/tabs/tabs.module.d.ts +11 -0
  826. package/v-angular/textarea/index.d.ts +2 -0
  827. package/v-angular/textarea/textarea.component.d.ts +45 -0
  828. package/v-angular/textarea/textarea.module.d.ts +12 -0
  829. package/v-angular/toast/index.d.ts +4 -0
  830. package/v-angular/toast/toast-message.service.d.ts +17 -0
  831. package/v-angular/toast/toast.component.d.ts +22 -0
  832. package/v-angular/toast/toast.models.d.ts +15 -0
  833. package/v-angular/toast/toast.module.d.ts +10 -0
  834. package/v-angular/tooltip/index.d.ts +2 -0
  835. package/v-angular/tooltip/tooltip.directive.d.ts +108 -0
  836. package/v-angular/tooltip/tooltip.module.d.ts +8 -0
  837. package/v-angular/tooltip/tooltip.styles.d.ts +11 -0
  838. package/v-angular/v-angular.module.d.ts +33 -0
@@ -0,0 +1,1037 @@
1
+ import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js';
2
+ import * as i0 from '@angular/core';
3
+ import { Component, Input, EventEmitter, Optional, Inject, ViewChildren, HostBinding, Output, HostListener, TemplateRef, Self, ContentChild, SkipSelf, NgModule, CUSTOM_ELEMENTS_SCHEMA, Directive, Host } from '@angular/core';
4
+ import * as i1$1 from '@angular/forms';
5
+ import * as i4 from '@jsverse/transloco';
6
+ import { TRANSLOCO_SCOPE } from '@jsverse/transloco';
7
+ import { Subject, fromEvent, takeUntil, distinctUntilChanged, tap, from, withLatestFrom } from 'rxjs';
8
+ import { NggvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor';
9
+ import * as i2 from '@sebgroup/green-angular/src/v-angular/core';
10
+ import { DropdownUtils } from '@sebgroup/green-angular/src/v-angular/core';
11
+ import * as i1 from '@angular/common';
12
+ import { CommonModule } from '@angular/common';
13
+ import * as i4$1 from '@sebgroup/green-angular/src/lib/shared';
14
+ import { NggCoreWrapperModule } from '@sebgroup/green-angular/src/lib/shared';
15
+ import scrollIntoView from 'scroll-into-view-if-needed';
16
+ import * as i3 from '@sebgroup/green-angular/src/v-angular/tooltip';
17
+ import { NggvTooltipModule } from '@sebgroup/green-angular/src/v-angular/tooltip';
18
+ import { NggvI18nModule } from '@sebgroup/green-angular/src/v-angular/i18n';
19
+ import * as i2$1 from '@sebgroup/green-angular/src/v-angular/input';
20
+ import { NggvInputComponent } from '@sebgroup/green-angular/src/v-angular/input';
21
+
22
+ class NggvTypeaheadHighlightComponent {
23
+ constructor() {
24
+ this.text = '';
25
+ this.input = '';
26
+ /**
27
+ * Regexp of characters that are allowed in textContent without being found in textToHighlight
28
+ * Allow whitespaces.
29
+ * */
30
+ this.allowedNonMatchingChars = new RegExp(/\s/);
31
+ }
32
+ ngOnChanges(changes) {
33
+ const { textContent, textToHighlight } = changes;
34
+ if (textContent?.currentValue != null)
35
+ this.text = `${textContent.currentValue}`;
36
+ if (textToHighlight?.currentValue != null)
37
+ this.input = `${textToHighlight.currentValue}`;
38
+ this.updateValues();
39
+ }
40
+ updateValues() {
41
+ const splittedText = this.text.toLocaleLowerCase().split('');
42
+ const splittedInput = this.input.toLocaleLowerCase().split('');
43
+ const { start, end } = this.getHighlightedPart(splittedText, splittedInput);
44
+ // If user input is not found within the textcontent, reset options and return.
45
+ if (start === -1 || end === -1) {
46
+ this.prefix = this.match = this.suffix = '';
47
+ return;
48
+ }
49
+ this.prefix = this.text.substring(0, start);
50
+ this.match = this.text.substring(start, end);
51
+ this.suffix = this.text.substring(end);
52
+ }
53
+ /**
54
+ * Function that finds the start and end index of where the input is located within the text to display.
55
+ * First occurence is returned. Allows for spaces to occur despite input not matching space.
56
+ * Loops through each character in splittedText and when a char in splittedText equlas the first character of
57
+ * splittedInput, evaluate wether it's match on the entire input.
58
+ * - If it's => return indexes.
59
+ * - If it's not => break out and check next char in outer loop.
60
+ * @param splittedText the text content splitted in an array
61
+ * @param splittedInput the input splitted in an array
62
+ * @returns { start: number, end: number } Indexes of where the match starts and ends in the text displatyed
63
+ */
64
+ getHighlightedPart(splittedText, splittedInput) {
65
+ let start = -1;
66
+ let end = -1;
67
+ for (let i = 0; i < splittedText.length; i++) {
68
+ // If start and end have been set, break and return
69
+ if (start > -1 || end > -1)
70
+ break;
71
+ // If current char match first in input, try see if whole input match from that index
72
+ if (splittedText[i] === splittedInput[0]) {
73
+ let matches = 1;
74
+ for (let t = 1; t <= splittedText.length; t++) {
75
+ // If match on last character of input, we're finished.
76
+ if (matches === splittedInput.length) {
77
+ start = i;
78
+ end = start + t;
79
+ break;
80
+ }
81
+ if (splittedText[t + i] === splittedInput[matches])
82
+ matches++;
83
+ else if (this.allowedNonMatchingChars.test(splittedText[t + i]))
84
+ continue; // Ignore whitespace, continue
85
+ else
86
+ break; // No match, break out of inner loop to check next char in text
87
+ }
88
+ }
89
+ }
90
+ return { start, end };
91
+ }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadHighlightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
93
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NggvTypeaheadHighlightComponent, selector: "nggv-typeahead-highlight", inputs: { textContent: "textContent", textToHighlight: "textToHighlight" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!this.match\">{{ textContent }}</ng-container>\n<!-- Note that this is sensitive to line breaks producing extra spacing between the different parts -->\n<ng-container *ngIf=\"!!this.match\">\n {{ prefix || '' }}<span class=\"match\">{{ match }}</span\n >{{ suffix || '' }}\n</ng-container>\n", styles: [":host .match{font-weight:500}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadHighlightComponent, decorators: [{
96
+ type: Component,
97
+ args: [{ selector: 'nggv-typeahead-highlight', template: "<ng-container *ngIf=\"!this.match\">{{ textContent }}</ng-container>\n<!-- Note that this is sensitive to line breaks producing extra spacing between the different parts -->\n<ng-container *ngIf=\"!!this.match\">\n {{ prefix || '' }}<span class=\"match\">{{ match }}</span\n >{{ suffix || '' }}\n</ng-container>\n", styles: [":host .match{font-weight:500}\n"] }]
98
+ }], propDecorators: { textContent: [{
99
+ type: Input
100
+ }], textToHighlight: [{
101
+ type: Input
102
+ }] } });
103
+
104
+ class NggvDropdownListComponent {
105
+ set expanded(state) {
106
+ this.setExpanded(state);
107
+ }
108
+ get expanded() {
109
+ return this._expanded;
110
+ }
111
+ constructor(translocoScope) {
112
+ this.translocoScope = translocoScope;
113
+ /** The additional amount to show when option is scrolled into view. */
114
+ this.scrollOffset = 24;
115
+ /** Id of the host element and is accessible by the children, automatically generated if not provided. */
116
+ this.id = window.nggv?.nextId();
117
+ /** Special property used for selecting DOM elements during automated UI testing. */
118
+ this.thook = 'dropdown';
119
+ /**
120
+ * Used to control if "selectedValueChanged" only should emit distinct changes, or each time a value is selected
121
+ * When true, value is not emitted if there's no distinct change
122
+ * When false, value is emitted every time an option is selected
123
+ * */
124
+ this.onlyEmitDistinctChanges = true;
125
+ this.selectedValueChanged = new EventEmitter();
126
+ this.closed = new EventEmitter();
127
+ /** The current active option based on numeric index. */
128
+ this.activeIndex = -1;
129
+ this.dropdownUtils = new DropdownUtils();
130
+ this._expanded = false;
131
+ this.closed$ = new Subject();
132
+ if (this.translocoScope)
133
+ this.scope = this.translocoScope.toString();
134
+ }
135
+ ngOnInit() {
136
+ if (this.state)
137
+ this.activeIndex = this.options.findIndex((option) => option.key === this.state.key);
138
+ }
139
+ ngOnChanges(changes) {
140
+ if (!!changes.state && !changes.state.firstChange)
141
+ this.selectedValue = changes.state.currentValue;
142
+ if (!!changes.options?.currentValue?.length && this.expanded)
143
+ this.refreshSelectedOption();
144
+ }
145
+ /**
146
+ * Returns true if argument is an {@link OptionGroup}.
147
+ * @param option the object to check.
148
+ */
149
+ isGroup(option) {
150
+ return 'options' in option;
151
+ }
152
+ /** @internal */
153
+ updateState(option, event) {
154
+ if (option.disabled)
155
+ return;
156
+ if (!this.onlyEmitDistinctChanges ||
157
+ !this.dropdownUtils.deepEqual(this.selectedValue, option)) {
158
+ this.selectedValue = option;
159
+ this.state = option;
160
+ this.selectedValueChanged.emit(option);
161
+ }
162
+ this.setExpanded(false);
163
+ event.stopPropagation();
164
+ }
165
+ /**
166
+ * @internal
167
+ */
168
+ setExpanded(expanded = true) {
169
+ // update expanded state
170
+ this._expanded = expanded;
171
+ if (expanded)
172
+ this.refreshSelectedOption();
173
+ else {
174
+ this.closed$.next(true);
175
+ this.onClickSubscription?.unsubscribe();
176
+ }
177
+ }
178
+ /**
179
+ * @internal
180
+ */
181
+ refreshSelectedOption() {
182
+ const options = this.dropdownUtils.flattenOptions(this.options, !this.optionContentTpl);
183
+ this.activeIndex = this.getActiveIndex();
184
+ this.state = options[this.activeIndex];
185
+ this.scrollToResult(this.state);
186
+ }
187
+ /**
188
+ * @internal
189
+ * @returns The active index (number) if option is found, -1 otherwise.
190
+ * - If a selectedValue exists that's not nullish and that options is found, return that index
191
+ * - Else, return first non nullish index
192
+ * - If none of the above criterias are met, -1 are returned
193
+ */
194
+ getActiveIndex() {
195
+ if (!!this.selectedValue && this.selectedValue?.key != null) {
196
+ const selectedIndex = this.dropdownUtils
197
+ .flattenOptions(this.options, !this.optionContentTpl)
198
+ .findIndex((option) => option.key != null && option.key === this.selectedValue?.key);
199
+ if (selectedIndex > -1)
200
+ return selectedIndex;
201
+ }
202
+ return this.dropdownUtils
203
+ .flattenOptions(this.options, !this.optionContentTpl)
204
+ .findIndex((option) => option.key != null);
205
+ }
206
+ /**
207
+ * @internal
208
+ * evaluates wether the HTML element overflows
209
+ * @param elem The HTMLElement to evaluate
210
+ * */
211
+ isOverflow(elem) {
212
+ return elem.offsetWidth < elem.scrollWidth;
213
+ }
214
+ /**
215
+ * Typecast anything to an {@link OptionGroup}.
216
+ * @param group the object to typecast.
217
+ */
218
+ castGroup(group) {
219
+ return group;
220
+ }
221
+ /**
222
+ * @internal
223
+ * Disables default events.
224
+ * @param event fired containing which key was pressed.
225
+ */
226
+ onKeyDown(event) {
227
+ switch (event.key) {
228
+ case 'Enter': // Disable form submission
229
+ case 'ArrowUp': // Disable scrolling up
230
+ case 'ArrowDown': // Disable scrolling down
231
+ event.preventDefault();
232
+ event.stopPropagation();
233
+ return false;
234
+ }
235
+ return true;
236
+ }
237
+ /**
238
+ * @internal
239
+ * Enter toggles the dropdown, home, end, and, arrows change the index.
240
+ * @param event fired containing which key was released.
241
+ */
242
+ onKeyUp(event) {
243
+ if (!this.expanded)
244
+ return;
245
+ const options = this.dropdownUtils.flattenOptions(this.options, !this.optionContentTpl);
246
+ let option;
247
+ switch (event.key) {
248
+ case 'Tab':
249
+ case 'Escape':
250
+ this.setExpanded(false);
251
+ this.closed.emit();
252
+ break;
253
+ case 'Space': // Select the currently chosen value
254
+ case 'Enter': // Select the currently chosen value
255
+ option = options[this.activeIndex];
256
+ this.updateState(option, event);
257
+ break;
258
+ case 'Home': // Move to the first option
259
+ this.activeIndex = 0;
260
+ option = options[this.activeIndex];
261
+ this.state = option;
262
+ this.scrollToResult(option);
263
+ break;
264
+ case 'ArrowUp': // Move up one step to the previous option
265
+ if (this.activeIndex > 0)
266
+ this.activeIndex--;
267
+ else if (this.activeIndex === 0)
268
+ this.activeIndex = options.length - 1;
269
+ option = options[this.activeIndex];
270
+ this.state = option;
271
+ this.scrollToResult(option);
272
+ break;
273
+ case 'ArrowDown': // Move down one step to the next option
274
+ if (options.length > this.activeIndex + 1)
275
+ this.activeIndex++;
276
+ else if (this.activeIndex === options.length - 1)
277
+ this.activeIndex = 0;
278
+ option = options[this.activeIndex];
279
+ this.state = option;
280
+ this.scrollToResult(option);
281
+ break;
282
+ case 'End': // Move to the last options
283
+ this.activeIndex = options.length - 1;
284
+ option = options[this.activeIndex];
285
+ this.state = option;
286
+ this.scrollToResult(option);
287
+ break;
288
+ }
289
+ }
290
+ /**
291
+ * Scrolls focused result into view with a specified offset.
292
+ * @param key the result index which to scroll to.
293
+ */
294
+ scrollToResult(option) {
295
+ if (!this.optionRefs || !option)
296
+ return;
297
+ const optionRef = this.optionRefs.find((li) => li.nativeElement.id === this.id + '-option-' + option.key);
298
+ const offset = this.scrollOffset;
299
+ if (optionRef) {
300
+ let delta = window.scrollY || document.documentElement.scrollTop;
301
+ // The list seems not to be visible at the time of scrolling, but this setTimeout "hack" makes it work...
302
+ setTimeout(() => {
303
+ scrollIntoView(optionRef.nativeElement, {
304
+ scrollMode: 'if-needed',
305
+ block: 'nearest',
306
+ });
307
+ delta -= window.scrollY || document.documentElement.scrollTop;
308
+ if (delta)
309
+ window.scrollBy(0, delta > 0 ? -offset : offset);
310
+ }, 0);
311
+ }
312
+ }
313
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownListComponent, deps: [{ token: TRANSLOCO_SCOPE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
314
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NggvDropdownListComponent, selector: "nggv-dropdown-list", inputs: { expanded: "expanded", state: "state", scrollOffset: "scrollOffset", optionContentTpl: "optionContentTpl", groupLabelTpl: "groupLabelTpl", id: "id", thook: "thook", options: "options", textToHighlight: "textToHighlight", onlyEmitDistinctChanges: "onlyEmitDistinctChanges" }, outputs: { selectedValueChanged: "selectedValueChanged", closed: "closed" }, host: { listeners: { "document:keydown": "onKeyDown($event)", "document:keyup": "onKeyUp($event)" }, properties: { "attr.id": "this.id", "attr.data-thook": "this.thook" } }, viewQueries: [{ propertyName: "optionRefs", predicate: ["optionRefs"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *transloco=\"let t; read: scope\">\n <ul\n class=\"gds-dropdown__options card options gds-reset\"\n [class.gds-dropdown__options-expanded]=\"expanded\"\n role=\"listbox\"\n tabindex=\"-1\"\n [attr.data-thook]=\"thook + '-options'\"\n [attr.aria-labelledby]=\"id + '-label'\"\n [attr.aria-activedescendant]=\"\n state ? id + '-option-' + state?.key : undefined\n \"\n >\n <ng-container *ngFor=\"let item of options\">\n <!-- OPTION -->\n <ng-container *ngIf=\"!isGroup(item)\">\n <ng-template\n *ngTemplateOutlet=\"listItemTemplate; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n\n <!-- OPTION GROUP -->\n <li\n class=\"gds-dropdown__options__label group\"\n [attr.data-thook]=\"thook + '-option-group'\"\n *ngIf=\"isGroup(item)\"\n >\n <!-- group label template (default or custom) -->\n <ng-template\n *ngTemplateOutlet=\"listGroupTemplate; context: { $implicit: item }\"\n ></ng-template>\n\n <ul [attr.aria-disabled]=\"item.disabled\" class=\"gds-reset\">\n <ng-container *ngFor=\"let option of castGroup(item).options\">\n <ng-template\n *ngTemplateOutlet=\"\n listItemTemplate;\n context: { $implicit: option }\n \"\n ></ng-template>\n </ng-container>\n </ul>\n </li>\n </ng-container>\n </ul>\n\n <!-- TEMPLATE -->\n <ng-template #listItemTemplate let-option>\n <li\n #optionRefs\n *ngIf=\"!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n [nggvTooltip]=\"isOverflow(liElem) ? t(option.label) : undefined\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"\n basicOptionContentTpl;\n context: { $implicit: option }\n \"\n >\n </ng-template>\n </li>\n <!-- Checking overflow on custom templates do not work skip adding nggvToolTip if custom template is provided -->\n <li\n #optionRefs\n *ngIf=\"!!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"optionContentTpl; context: { $implicit: option }\"\n >\n </ng-template>\n </li>\n </ng-template>\n\n <ng-template #listGroupTemplate let-item>\n <ng-container *ngIf=\"groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"groupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n <ng-container *ngIf=\"!groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"basicGroupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n </ng-template>\n\n <ng-template #basicOptionContentTpl let-option>\n <nggv-typeahead-highlight\n *ngIf=\"!!textToHighlight\"\n [textToHighlight]=\"textToHighlight\"\n [textContent]=\"t(option.label)\"\n >\n </nggv-typeahead-highlight>\n <ng-container *ngIf=\"!textToHighlight\">\n {{ t(option.label) }}\n </ng-container>\n </ng-template>\n\n <ng-template #basicGroupLabelTpl let-item>\n <div class=\"nggv-group-label\">{{ t(item.label) }}</div>\n </ng-template>\n</ng-container>\n", styles: [":host{--gds-ref-pallet-base400: hsl(0, 0%, 81%);--gds-ref-pallet-base500: hsl(0, 0%, 68%);--sg-z-index-dropdown: ;--sg-z-index-popover: 1060;--sg-z-index-dropdown-backdrop: 990;--sg-z-index-dropdown: 2000;--sg-popover-background: #fff;--sg-popover-box-shadow: 0 .125rem .375rem rgba(0, 0, 0, .15);--text-primary-color: #333;position:absolute;bottom:0;transform:translateY(calc(100% + .5rem));z-index:var(--sg-z-index-dropdown)}:host .hidden{visibility:hidden;display:none}:host ul[role=menu] [role=menuitem]{padding:.75rem;cursor:pointer}:host ul[role=menu] [role=menuitem]:hover,:host ul[role=menu] [role=menuitem]:focus-visible{background-color:var(--gds-ref-pallet-base200)}:host ul[role=menu] [role=menuitem]:active{background-color:var(--gds-ref-pallet-base300)}:host ul[role=menu] [role=menuitem]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox]{--z-index: var(--sg-z-index-popover);background-color:var(--sg-popover-background);flex-direction:column;justify-content:flex-end;inset:auto;z-index:var(--z-index);box-shadow:var(--sg-popover-box-shadow);color:var(--text-primary-color);padding:0;max-height:500px;overflow-y:auto;border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--text-primary-color);--sg-border-color: var(--text-primary-color);border-radius:var(--sg-border-radius)}:host ul[role=listbox] [role=option]{padding:.75rem 1rem;line-height:1.25;cursor:pointer}:host ul[role=listbox] [role=option]:hover,:host ul[role=listbox] [role=option]:focus-visible{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:active{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox] [role=option].active.sg-highlighted,:host ul[role=listbox] [role=option][aria-selected=true]{background:var(--grey-1000);color:#fff}:host ul[role=listbox] .group ul{list-style-type:none;padding:0}:host ul[role=listbox] .group:hover{color:inherit;background-color:inherit}:host .sg-fieldset-container{overflow-y:auto}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option]{display:flex;width:100%}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option].active.sg-highlighted input[type=checkbox]~i{border-color:#007ac7!important;box-shadow:0 0 .25em .0625em #41b0ee;outline-color:transparent;outline-style:solid}:host .gds-dropdown__options{padding-left:0;margin-bottom:0;margin-top:0;display:flex;flex-direction:column;list-style:none;display:none}:host .gds-dropdown__options>li{padding-bottom:.5rem;padding-top:.5rem;border:0;display:block;position:relative}:host .gds-dropdown__options>li:before{font-weight:500;display:inline-block;left:0;position:absolute;text-align:center}:host .gds-dropdown__options-expanded{display:block}:host .gds-dropdown__options__label:hover,:host .gds-dropdown__options__label:focus-visible,:host .gds-dropdown__options__label[aria-focus=true]{background-color:var(--gds-ref-pallet-base400)}:host .gds-dropdown__options__label:active{background-color:var(--gds-ref-pallet-base500)}:host .gds-dropdown__options__label:focus-visible{outline-color:#000;outline-offset:-.25rem}:host .gds-dropdown__options__label[aria-hidden=true]{display:none}:host .gds-dropdown__options__label[highlighted]{color:#fff}:host li+.group{padding-top:0}:host .nggv-group-label{cursor:pointer;background-color:#e7e7e7;padding-inline:1rem;padding-block:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NggvTypeaheadHighlightComponent, selector: "nggv-typeahead-highlight", inputs: ["textContent", "textToHighlight"] }, { kind: "directive", type: i3.NggvTooltipDirective, selector: "[nggvTooltip]", inputs: ["nggvTooltip", "thook", "placement", "shown", "offset", "resizeThrottle", "tooltipId", "maxWidth"], outputs: ["nggvShow", "nggvHide"] }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] }); }
315
+ }
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownListComponent, decorators: [{
317
+ type: Component,
318
+ args: [{ selector: 'nggv-dropdown-list', template: "<ng-container *transloco=\"let t; read: scope\">\n <ul\n class=\"gds-dropdown__options card options gds-reset\"\n [class.gds-dropdown__options-expanded]=\"expanded\"\n role=\"listbox\"\n tabindex=\"-1\"\n [attr.data-thook]=\"thook + '-options'\"\n [attr.aria-labelledby]=\"id + '-label'\"\n [attr.aria-activedescendant]=\"\n state ? id + '-option-' + state?.key : undefined\n \"\n >\n <ng-container *ngFor=\"let item of options\">\n <!-- OPTION -->\n <ng-container *ngIf=\"!isGroup(item)\">\n <ng-template\n *ngTemplateOutlet=\"listItemTemplate; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n\n <!-- OPTION GROUP -->\n <li\n class=\"gds-dropdown__options__label group\"\n [attr.data-thook]=\"thook + '-option-group'\"\n *ngIf=\"isGroup(item)\"\n >\n <!-- group label template (default or custom) -->\n <ng-template\n *ngTemplateOutlet=\"listGroupTemplate; context: { $implicit: item }\"\n ></ng-template>\n\n <ul [attr.aria-disabled]=\"item.disabled\" class=\"gds-reset\">\n <ng-container *ngFor=\"let option of castGroup(item).options\">\n <ng-template\n *ngTemplateOutlet=\"\n listItemTemplate;\n context: { $implicit: option }\n \"\n ></ng-template>\n </ng-container>\n </ul>\n </li>\n </ng-container>\n </ul>\n\n <!-- TEMPLATE -->\n <ng-template #listItemTemplate let-option>\n <li\n #optionRefs\n *ngIf=\"!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n [nggvTooltip]=\"isOverflow(liElem) ? t(option.label) : undefined\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"\n basicOptionContentTpl;\n context: { $implicit: option }\n \"\n >\n </ng-template>\n </li>\n <!-- Checking overflow on custom templates do not work skip adding nggvToolTip if custom template is provided -->\n <li\n #optionRefs\n *ngIf=\"!!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"optionContentTpl; context: { $implicit: option }\"\n >\n </ng-template>\n </li>\n </ng-template>\n\n <ng-template #listGroupTemplate let-item>\n <ng-container *ngIf=\"groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"groupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n <ng-container *ngIf=\"!groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"basicGroupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n </ng-template>\n\n <ng-template #basicOptionContentTpl let-option>\n <nggv-typeahead-highlight\n *ngIf=\"!!textToHighlight\"\n [textToHighlight]=\"textToHighlight\"\n [textContent]=\"t(option.label)\"\n >\n </nggv-typeahead-highlight>\n <ng-container *ngIf=\"!textToHighlight\">\n {{ t(option.label) }}\n </ng-container>\n </ng-template>\n\n <ng-template #basicGroupLabelTpl let-item>\n <div class=\"nggv-group-label\">{{ t(item.label) }}</div>\n </ng-template>\n</ng-container>\n", styles: [":host{--gds-ref-pallet-base400: hsl(0, 0%, 81%);--gds-ref-pallet-base500: hsl(0, 0%, 68%);--sg-z-index-dropdown: ;--sg-z-index-popover: 1060;--sg-z-index-dropdown-backdrop: 990;--sg-z-index-dropdown: 2000;--sg-popover-background: #fff;--sg-popover-box-shadow: 0 .125rem .375rem rgba(0, 0, 0, .15);--text-primary-color: #333;position:absolute;bottom:0;transform:translateY(calc(100% + .5rem));z-index:var(--sg-z-index-dropdown)}:host .hidden{visibility:hidden;display:none}:host ul[role=menu] [role=menuitem]{padding:.75rem;cursor:pointer}:host ul[role=menu] [role=menuitem]:hover,:host ul[role=menu] [role=menuitem]:focus-visible{background-color:var(--gds-ref-pallet-base200)}:host ul[role=menu] [role=menuitem]:active{background-color:var(--gds-ref-pallet-base300)}:host ul[role=menu] [role=menuitem]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox]{--z-index: var(--sg-z-index-popover);background-color:var(--sg-popover-background);flex-direction:column;justify-content:flex-end;inset:auto;z-index:var(--z-index);box-shadow:var(--sg-popover-box-shadow);color:var(--text-primary-color);padding:0;max-height:500px;overflow-y:auto;border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--text-primary-color);--sg-border-color: var(--text-primary-color);border-radius:var(--sg-border-radius)}:host ul[role=listbox] [role=option]{padding:.75rem 1rem;line-height:1.25;cursor:pointer}:host ul[role=listbox] [role=option]:hover,:host ul[role=listbox] [role=option]:focus-visible{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:active{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox] [role=option].active.sg-highlighted,:host ul[role=listbox] [role=option][aria-selected=true]{background:var(--grey-1000);color:#fff}:host ul[role=listbox] .group ul{list-style-type:none;padding:0}:host ul[role=listbox] .group:hover{color:inherit;background-color:inherit}:host .sg-fieldset-container{overflow-y:auto}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option]{display:flex;width:100%}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option].active.sg-highlighted input[type=checkbox]~i{border-color:#007ac7!important;box-shadow:0 0 .25em .0625em #41b0ee;outline-color:transparent;outline-style:solid}:host .gds-dropdown__options{padding-left:0;margin-bottom:0;margin-top:0;display:flex;flex-direction:column;list-style:none;display:none}:host .gds-dropdown__options>li{padding-bottom:.5rem;padding-top:.5rem;border:0;display:block;position:relative}:host .gds-dropdown__options>li:before{font-weight:500;display:inline-block;left:0;position:absolute;text-align:center}:host .gds-dropdown__options-expanded{display:block}:host .gds-dropdown__options__label:hover,:host .gds-dropdown__options__label:focus-visible,:host .gds-dropdown__options__label[aria-focus=true]{background-color:var(--gds-ref-pallet-base400)}:host .gds-dropdown__options__label:active{background-color:var(--gds-ref-pallet-base500)}:host .gds-dropdown__options__label:focus-visible{outline-color:#000;outline-offset:-.25rem}:host .gds-dropdown__options__label[aria-hidden=true]{display:none}:host .gds-dropdown__options__label[highlighted]{color:#fff}:host li+.group{padding-top:0}:host .nggv-group-label{cursor:pointer;background-color:#e7e7e7;padding-inline:1rem;padding-block:.5rem}\n"] }]
319
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
320
+ type: Optional
321
+ }, {
322
+ type: Inject,
323
+ args: [TRANSLOCO_SCOPE]
324
+ }] }], propDecorators: { expanded: [{
325
+ type: Input
326
+ }], state: [{
327
+ type: Input
328
+ }], scrollOffset: [{
329
+ type: Input
330
+ }], optionContentTpl: [{
331
+ type: Input
332
+ }], groupLabelTpl: [{
333
+ type: Input
334
+ }], optionRefs: [{
335
+ type: ViewChildren,
336
+ args: ['optionRefs']
337
+ }], id: [{
338
+ type: HostBinding,
339
+ args: ['attr.id']
340
+ }, {
341
+ type: Input
342
+ }], thook: [{
343
+ type: HostBinding,
344
+ args: ['attr.data-thook']
345
+ }, {
346
+ type: Input
347
+ }], options: [{
348
+ type: Input
349
+ }], textToHighlight: [{
350
+ type: Input
351
+ }], onlyEmitDistinctChanges: [{
352
+ type: Input
353
+ }], selectedValueChanged: [{
354
+ type: Output
355
+ }], closed: [{
356
+ type: Output
357
+ }], onKeyDown: [{
358
+ type: HostListener,
359
+ args: ['document:keydown', ['$event']]
360
+ }], onKeyUp: [{
361
+ type: HostListener,
362
+ args: ['document:keyup', ['$event']]
363
+ }] } });
364
+
365
+ /**
366
+ * A dropdown allows the user to select an option from a list.
367
+ * Dropdowns enables users to make a quick selection of the available options for a specific entry.
368
+ * https://designlibrary.sebgroup.com/components/component-dropdown
369
+ */
370
+ class NggvDropdownComponent extends NggvBaseControlValueAccessorComponent {
371
+ /** List of {@link Option} and {@link OptionGroup} listed when dropdown is expanded. */
372
+ set options(value) {
373
+ // update options
374
+ this._options = value;
375
+ // already has a null/undefined key
376
+ const nullishOption = this.dropdownUtils
377
+ .flattenOptions(value, false)
378
+ .find((option) => option.key == null);
379
+ // if the dropdown is optional, add a null value to deselect option
380
+ if (!this.required && !nullishOption && this.allowControlNullishOption) {
381
+ this._options = [this.defaultNullishOption].concat(this._options);
382
+ }
383
+ // set default value and emit if there is only one option
384
+ if (value.length === 1 && this.required && this.selectOnSingleOption) {
385
+ const onlyOption = this.dropdownUtils.flattenOptions(value, false)[0];
386
+ this.updateModel(onlyOption);
387
+ return;
388
+ }
389
+ // don't update local state if we shouldn't control nullish value and we cant find the selected value amongst the options
390
+ const matchingOption = this.dropdownUtils
391
+ .flattenOptions(value, false)
392
+ .find((option) => option.key == this.ngControl?.value);
393
+ if (!this.allowControlNullishOption && !matchingOption)
394
+ return;
395
+ // Update local state
396
+ this.writeValue(this.ngControl?.value);
397
+ }
398
+ get options() {
399
+ return this._options;
400
+ }
401
+ /** @internal nullish option. */
402
+ get defaultNullishOption() {
403
+ return { key: null, label: this.placeholder ?? '\u00A0' };
404
+ }
405
+ constructor(ngControl, translocoScope, cdr, dropdownUtils) {
406
+ super(ngControl, translocoScope, cdr);
407
+ this.ngControl = ngControl;
408
+ this.translocoScope = translocoScope;
409
+ this.cdr = cdr;
410
+ this.dropdownUtils = dropdownUtils;
411
+ /** Special property used for selecting DOM elements during automated UI testing. */
412
+ this.thook = 'dropdown';
413
+ /** The additional amount to show when option is scrolled into view. */
414
+ this.scrollOffset = 24;
415
+ /**
416
+ * Allow this component to add/ remove nullish options based on wether the control is required or not
417
+ * Defaults to true.
418
+ */
419
+ this.allowControlNullishOption = true;
420
+ /**
421
+ * If only one option exists in options[], default is to select it.
422
+ * This input can be used to alter that behaviour so it doesn't automatically
423
+ * select a value if it's the only one.
424
+ * Defaults to true.
425
+ */
426
+ this.selectOnSingleOption = true;
427
+ /**
428
+ * Emits changes of the expanded state of the dropdown
429
+ */
430
+ this.expandedChange = new EventEmitter();
431
+ /** The current expanded state of the dropdown options. */
432
+ this.expanded = false;
433
+ /** The current option selected based on numeric index. */
434
+ this.activeIndex = -1;
435
+ this.keyEvent = {};
436
+ this._options = [];
437
+ }
438
+ ngOnChanges(changes) {
439
+ if (changes.required?.currentValue !== undefined) {
440
+ const isRequired = changes.required.currentValue;
441
+ // remove nullish option
442
+ const hasNullishOption = this.dropdownUtils.flattenOptions(this._options, false)[0]?.key == null;
443
+ // if required, remove nullish option
444
+ if (isRequired && hasNullishOption && this.allowControlNullishOption) {
445
+ this._options = this._options.slice(1);
446
+ return;
447
+ }
448
+ // if not required, add nullish option
449
+ if (!isRequired && !hasNullishOption && this.allowControlNullishOption) {
450
+ this._options = [this.defaultNullishOption].concat(this._options);
451
+ return;
452
+ }
453
+ }
454
+ }
455
+ ngOnDestroy() {
456
+ this.onClickSubscription?.unsubscribe();
457
+ }
458
+ /** @internal override to correctly set state from form value */
459
+ writeValue(value) {
460
+ const options = this.dropdownUtils.flattenOptions(this._options, false);
461
+ this.state = options.find((option) => option.key === value);
462
+ }
463
+ // ----------------------------------------------------------------------------
464
+ // EVENTS
465
+ // ----------------------------------------------------------------------------
466
+ /** @internal */
467
+ onSelectChange(option) {
468
+ if (option.disabled)
469
+ return;
470
+ this.updateModel(option);
471
+ this.setExpanded(false);
472
+ }
473
+ // /**
474
+ // * @internal
475
+ // * Enter toggles the dropdown, home, end, and, arrows change the index.
476
+ // * @param event fired containing which key was released.
477
+ // */
478
+ onKeyUp(event) {
479
+ this.keyEvent = event;
480
+ }
481
+ /**
482
+ * Closes the dropdown on click outside.
483
+ */
484
+ subscribeToOutsideClickEvent() {
485
+ this.onClickSubscription = fromEvent(document, 'click').subscribe({
486
+ next: (event) => {
487
+ if (this.expanded &&
488
+ !this.inputRef?.nativeElement.contains(event.target)) {
489
+ this.toggleDropdown();
490
+ this.onClickSubscription?.unsubscribe();
491
+ }
492
+ },
493
+ });
494
+ }
495
+ // ----------------------------------------------------------------------------
496
+ // HELPERS
497
+ // ----------------------------------------------------------------------------
498
+ /**
499
+ * Set the dropdown value to given option.
500
+ * @param value the dropdown option to select.
501
+ */
502
+ updateModel(value) {
503
+ this.state = value;
504
+ this.onChange(value.key);
505
+ }
506
+ /** Toggle the expanded state of the dropdown options. */
507
+ toggleDropdown() {
508
+ this.setExpanded(!this.expanded);
509
+ this.cdr.detectChanges();
510
+ }
511
+ /**
512
+ * Set the expanded state of the dropdown options. If true the options are shown below the field.
513
+ * Activate on click event to be able to close dropdown on click outside.
514
+ * @param state the expanded state which to set.
515
+ */
516
+ setExpanded(state = true) {
517
+ this.expanded = state;
518
+ this.expandedChange.emit(this.expanded);
519
+ if (this.expanded)
520
+ this.subscribeToOutsideClickEvent();
521
+ if (!this.expanded)
522
+ this.onTouched();
523
+ }
524
+ /* TYPE CASTS */
525
+ /**
526
+ * Typecast anything to an {@link Option}.
527
+ * @param option the object to typecast.
528
+ */
529
+ castOption(option) {
530
+ return option;
531
+ }
532
+ /**
533
+ * Typecast anything to an {@link OptionGroup}.
534
+ * @param group the object to typecast.
535
+ */
536
+ castGroup(group) {
537
+ return group;
538
+ }
539
+ /* TYPE CHECKS */
540
+ /**
541
+ * Returns true if argument is an {@link Option}.
542
+ * @param option the object to check.
543
+ */
544
+ isOption(option) {
545
+ return !('options' in option);
546
+ }
547
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i0.ChangeDetectorRef }, { token: i2.DropdownUtils }], target: i0.ɵɵFactoryTarget.Component }); }
548
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NggvDropdownComponent, selector: "nggv-dropdown", inputs: { thook: "thook", placeholder: "placeholder", ariaLabel: "ariaLabel", options: "options", scrollOffset: "scrollOffset", allowControlNullishOption: "allowControlNullishOption", textToHighlight: "textToHighlight", selectOnSingleOption: "selectOnSingleOption" }, outputs: { expandedChange: "expandedChange" }, host: { listeners: { "keyup": "onKeyUp($event)" }, properties: { "attr.data-thook": "this.thook" } }, queries: [{ propertyName: "selectedContentTpl", first: true, predicate: ["selectedTpl"], descendants: true, read: TemplateRef }, { propertyName: "optionContentTpl", first: true, predicate: ["optionTpl"], descendants: true, read: TemplateRef }, { propertyName: "groupLabelTpl", first: true, predicate: ["groupLabelTpl"], descendants: true, read: TemplateRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-toggle'\"\n >\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n </label>\n\n <!-- DESCRIPTION -->\n <div class=\"description\">{{ description }}</div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n [attr.aria-labelledby]=\"id + '-label ' + id + '-input'\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-template\n *ngTemplateOutlet=\"\n selectedContentTpl || defaultSelectedContentTpl;\n context: { $implicit: state }\n \"\n >\n </ng-template>\n </ng-container>\n </div>\n </ng-container>\n\n <!-- INPUT -->\n <ng-container *ngIf=\"!locked\">\n <div #input [id]=\"id + '-input'\" class=\"dropdown\">\n <button\n [id]=\"id + '-toggle'\"\n [disabled]=\"disabled\"\n type=\"button\"\n class=\"nggv-field-dropdown__label toggle\"\n [class.nggv-field--error]=\"invalid\"\n aria-haspopup=\"listbox\"\n [attr.data-thook]=\"thook + '-toggle'\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-labelledby]=\"\n ariaLabel ? null : id + '-label ' + id + '-toggle'\n \"\n [attr.aria-label]=\"ariaLabel || null\"\n (click)=\"toggleDropdown()\"\n >\n <ng-template\n *ngTemplateOutlet=\"\n selectedContentTpl || defaultSelectedContentTpl;\n context: { $implicit: state }\n \"\n >\n </ng-template>\n </button>\n\n <nggv-dropdown-list\n #dropDownList\n [options]=\"options\"\n [scrollOffset]=\"scrollOffset\"\n [state]=\"state\"\n [expanded]=\"expanded\"\n [optionContentTpl]=\"optionContentTpl\"\n [groupLabelTpl]=\"groupLabelTpl\"\n [textToHighlight]=\"textToHighlight\"\n (closed)=\"setExpanded(false)\"\n (selectedValueChanged)=\"onSelectChange($event)\"\n >\n </nggv-dropdown-list>\n </div>\n <!-- ERRORS -->\n <div class=\"gds-form-item__footer error-wrapper\">\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n [solid]=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n </ng-container>\n\n <ng-template #defaultSelectedContentTpl let-state>\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\n {{ state?.key != null && state?.label ? t(state.label) : placeholder }}\n </ng-template>\n</ng-container>\n", styles: [":host{--sg-border-radius: .25rem;--sg-border-width: 1px;--sg-border-color: #868686;--grey-000: hsl(0 0% 100%);--grey-100: hsl(0, 0%, 97%);--grey-200: hsl(0, 0%, 91%);--grey-300: hsl(0, 0%, 87%);--grey-400: hsl(0, 0%, 81%);--grey-500: hsl(0, 0%, 68%);--grey-600: hsl(0, 0%, 53%);--grey-700: hsl(0, 0%, 29%);--grey-800: hsl(0, 0%, 20%);--grey-900: hsl(0, 0%, 10%);--grey-1000: hsl(0 0% 0%)}:host label{display:block;font-weight:500;line-height:1.25rem;margin-bottom:.5rem;width:100%}:host .description{margin-bottom:.5rem;line-height:1.25rem;width:100%}:host button{font-weight:500;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;background:transparent;border-color:#007ac7;color:#007ac7;--color: rgb(0, 122, 199);background-color:transparent;border:0;cursor:pointer;font-family:inherit;padding:0;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--grey-800);--sg-border-color: var(--grey-800);background:var(--sg-form-control-bg);color:var(--text-primary-color);min-height:2.75rem;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;max-width:100%;font-size:inherit;font-weight:400;line-height:1.125;margin-bottom:.5rem;margin-top:.5rem;width:100%}@media screen and (-ms-high-contrast: active){:host button{border:2px solid currentcolor}}:host button.small{min-height:2rem;padding:.4375rem .75rem;line-height:1rem}:host button.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host button:focus:not(:focus-visible){box-shadow:none;outline:0}:host button:focus,:host button:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host button:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#199be3;color:#fff;--background: rgb(25.4035777564, 154.8940067842, 227.221994169);--color: rgb(255, 255, 255);border-color:#199be3}:host button[aria-selected=true],:host button:active,:host button.active,:host button.active:hover,:host button:active:hover{background-color:#007ac7;color:#fff;--background: rgb(0, 122, 199);--color: rgb(255, 255, 255);border-color:#007ac7}:host button:disabled,:host button.disabled,:host button[aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host button:disabled::placeholder,:host button.disabled::placeholder,:host button[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host button:focus{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host button{min-width:100%}}:host button:not(:disabled,.disabled,[aria-disabled]):hover{--background: var(--grey-400);--color: var(--grey-1000);background-color:var(--grey-400);color:var(--grey-1000);border-color:var(--grey-1000)}:host button>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host button:after{margin-left:.5rem;margin-right:.5rem;border-bottom:solid 2px var(--text-primary-color);border-left:solid 2px var(--text-primary-color);content:\"\";display:block;height:.5rem;width:.5rem;position:relative;top:-.15rem;transform:translate(75%) rotate3d(0,0,1,-45deg) scaleZ(-1);transition:transform .3s ease-in;flex-shrink:0}:host button[aria-expanded=true]:after{transform:translate(75%,6px) rotate3d(0,0,1,-45deg) scale3d(-1,-1,1)}:host button:hover:after{border-color:currentColor}:host button.small{font-size:.875rem}:host button:hover{background:#e7e7e7}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host .dropdown{width:100%;position:relative}:host .dropdown nggv-dropdown-list{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.NggCoreElementDirective, selector: "[nggCoreElement]" }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: NggvDropdownListComponent, selector: "nggv-dropdown-list", inputs: ["expanded", "state", "scrollOffset", "optionContentTpl", "groupLabelTpl", "id", "thook", "options", "textToHighlight", "onlyEmitDistinctChanges"], outputs: ["selectedValueChanged", "closed"] }] }); }
549
+ }
550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownComponent, decorators: [{
551
+ type: Component,
552
+ args: [{ selector: 'nggv-dropdown', template: "<!-- LABEL -->\n<ng-container *transloco=\"let t; read: scope\">\n <label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-toggle'\"\n >\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n </label>\n\n <!-- DESCRIPTION -->\n <div class=\"description\">{{ description }}</div>\n\n <!-- LOCKED INPUT -->\n <ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n [attr.aria-labelledby]=\"id + '-label ' + id + '-input'\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-template\n *ngTemplateOutlet=\"\n selectedContentTpl || defaultSelectedContentTpl;\n context: { $implicit: state }\n \"\n >\n </ng-template>\n </ng-container>\n </div>\n </ng-container>\n\n <!-- INPUT -->\n <ng-container *ngIf=\"!locked\">\n <div #input [id]=\"id + '-input'\" class=\"dropdown\">\n <button\n [id]=\"id + '-toggle'\"\n [disabled]=\"disabled\"\n type=\"button\"\n class=\"nggv-field-dropdown__label toggle\"\n [class.nggv-field--error]=\"invalid\"\n aria-haspopup=\"listbox\"\n [attr.data-thook]=\"thook + '-toggle'\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-labelledby]=\"\n ariaLabel ? null : id + '-label ' + id + '-toggle'\n \"\n [attr.aria-label]=\"ariaLabel || null\"\n (click)=\"toggleDropdown()\"\n >\n <ng-template\n *ngTemplateOutlet=\"\n selectedContentTpl || defaultSelectedContentTpl;\n context: { $implicit: state }\n \"\n >\n </ng-template>\n </button>\n\n <nggv-dropdown-list\n #dropDownList\n [options]=\"options\"\n [scrollOffset]=\"scrollOffset\"\n [state]=\"state\"\n [expanded]=\"expanded\"\n [optionContentTpl]=\"optionContentTpl\"\n [groupLabelTpl]=\"groupLabelTpl\"\n [textToHighlight]=\"textToHighlight\"\n (closed)=\"setExpanded(false)\"\n (selectedValueChanged)=\"onSelectChange($event)\"\n >\n </nggv-dropdown-list>\n </div>\n <!-- ERRORS -->\n <div class=\"gds-form-item__footer error-wrapper\">\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-input'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n [solid]=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n </span>\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n </ng-container>\n\n <ng-template #defaultSelectedContentTpl let-state>\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\n {{ state?.key != null && state?.label ? t(state.label) : placeholder }}\n </ng-template>\n</ng-container>\n", styles: [":host{--sg-border-radius: .25rem;--sg-border-width: 1px;--sg-border-color: #868686;--grey-000: hsl(0 0% 100%);--grey-100: hsl(0, 0%, 97%);--grey-200: hsl(0, 0%, 91%);--grey-300: hsl(0, 0%, 87%);--grey-400: hsl(0, 0%, 81%);--grey-500: hsl(0, 0%, 68%);--grey-600: hsl(0, 0%, 53%);--grey-700: hsl(0, 0%, 29%);--grey-800: hsl(0, 0%, 20%);--grey-900: hsl(0, 0%, 10%);--grey-1000: hsl(0 0% 0%)}:host label{display:block;font-weight:500;line-height:1.25rem;margin-bottom:.5rem;width:100%}:host .description{margin-bottom:.5rem;line-height:1.25rem;width:100%}:host button{font-weight:500;display:inline-flex;justify-content:center;transition:all .3s cubic-bezier(.23,1,.32,1),outline-offset 0s,outline-width 0s;background:transparent;border-color:#007ac7;color:#007ac7;--color: rgb(0, 122, 199);background-color:transparent;border:0;cursor:pointer;font-family:inherit;padding:0;padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--grey-800);--sg-border-color: var(--grey-800);background:var(--sg-form-control-bg);color:var(--text-primary-color);min-height:2.75rem;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;max-width:100%;font-size:inherit;font-weight:400;line-height:1.125;margin-bottom:.5rem;margin-top:.5rem;width:100%}@media screen and (-ms-high-contrast: active){:host button{border:2px solid currentcolor}}:host button.small{min-height:2rem;padding:.4375rem .75rem;line-height:1rem}:host button.large{min-height:4rem;padding:1rem 1.5rem;font-size:1.5rem;line-height:2rem}:host button:focus:not(:focus-visible){box-shadow:none;outline:0}:host button:focus,:host button:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host button:not(:disabled,.disabled,[aria-disabled]):hover{background-color:#199be3;color:#fff;--background: rgb(25.4035777564, 154.8940067842, 227.221994169);--color: rgb(255, 255, 255);border-color:#199be3}:host button[aria-selected=true],:host button:active,:host button.active,:host button.active:hover,:host button:active:hover{background-color:#007ac7;color:#fff;--background: rgb(0, 122, 199);--color: rgb(255, 255, 255);border-color:#007ac7}:host button:disabled,:host button.disabled,:host button[aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host button:disabled::placeholder,:host button.disabled::placeholder,:host button[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host button:focus{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media (max-width: 35.98em){:host button{min-width:100%}}:host button:not(:disabled,.disabled,[aria-disabled]):hover{--background: var(--grey-400);--color: var(--grey-1000);background-color:var(--grey-400);color:var(--grey-1000);border-color:var(--grey-1000)}:host button>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host button:after{margin-left:.5rem;margin-right:.5rem;border-bottom:solid 2px var(--text-primary-color);border-left:solid 2px var(--text-primary-color);content:\"\";display:block;height:.5rem;width:.5rem;position:relative;top:-.15rem;transform:translate(75%) rotate3d(0,0,1,-45deg) scaleZ(-1);transition:transform .3s ease-in;flex-shrink:0}:host button[aria-expanded=true]:after{transform:translate(75%,6px) rotate3d(0,0,1,-45deg) scale3d(-1,-1,1)}:host button:hover:after{border-color:currentColor}:host button.small{font-size:.875rem}:host button:hover{background:#e7e7e7}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host .dropdown{width:100%;position:relative}:host .dropdown nggv-dropdown-list{width:100%}\n"] }]
553
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
554
+ type: Self
555
+ }, {
556
+ type: Optional
557
+ }] }, { type: undefined, decorators: [{
558
+ type: Optional
559
+ }, {
560
+ type: Inject,
561
+ args: [TRANSLOCO_SCOPE]
562
+ }] }, { type: i0.ChangeDetectorRef }, { type: i2.DropdownUtils }], propDecorators: { selectedContentTpl: [{
563
+ type: ContentChild,
564
+ args: ['selectedTpl', { read: TemplateRef }]
565
+ }], optionContentTpl: [{
566
+ type: ContentChild,
567
+ args: ['optionTpl', { read: TemplateRef }]
568
+ }], groupLabelTpl: [{
569
+ type: ContentChild,
570
+ args: ['groupLabelTpl', { read: TemplateRef }]
571
+ }], thook: [{
572
+ type: HostBinding,
573
+ args: ['attr.data-thook']
574
+ }, {
575
+ type: Input
576
+ }], placeholder: [{
577
+ type: Input
578
+ }], ariaLabel: [{
579
+ type: Input
580
+ }], options: [{
581
+ type: Input
582
+ }], scrollOffset: [{
583
+ type: Input
584
+ }], allowControlNullishOption: [{
585
+ type: Input
586
+ }], textToHighlight: [{
587
+ type: Input
588
+ }], selectOnSingleOption: [{
589
+ type: Input
590
+ }], expandedChange: [{
591
+ type: Output
592
+ }], onKeyUp: [{
593
+ type: HostListener,
594
+ args: ['keyup', ['$event']]
595
+ }] } });
596
+
597
+ // Use dropdownList template and combine stylesheets
598
+ class NggvTypeaheadDropdownListComponent extends NggvDropdownListComponent {
599
+ constructor(translocoScope, element) {
600
+ super(translocoScope);
601
+ this.translocoScope = translocoScope;
602
+ this.element = element;
603
+ this._destroy$ = new Subject();
604
+ }
605
+ ngOnInit() {
606
+ this.handleSelectedValueChanges();
607
+ this.handleFocusChanges();
608
+ }
609
+ ngOnDestroy() {
610
+ this._destroy$.next(true);
611
+ this._destroy$.complete();
612
+ }
613
+ /** @Internal Subscribe to click outside dropdownList and input to close dropdownList */
614
+ subscribeToOutsideClickEvent() {
615
+ this.onClickSubscription = fromEvent(document, 'click')
616
+ .pipe(takeUntil(this._destroy$))
617
+ .subscribe({
618
+ next: (event) => {
619
+ if (this.expanded &&
620
+ !this.element.nativeElement.contains(event.target) &&
621
+ !this.hostComponent.inputRef?.nativeElement.contains(event.target)) {
622
+ this.setExpanded(false);
623
+ this.onClickSubscription?.unsubscribe();
624
+ }
625
+ },
626
+ });
627
+ }
628
+ /** @Internal Update state of the host-input to reflect the selected value */
629
+ handleSelectedValueChanges() {
630
+ this.selectedValueChanged
631
+ .pipe(takeUntil(this._destroy$))
632
+ .subscribe((selected) => {
633
+ if (this.hostComponent.inputRef) {
634
+ this.hostComponent.state = `${this.formatSelected(selected)}`;
635
+ }
636
+ });
637
+ }
638
+ /** @Internal Expand the dropdown when input receives focus. If no state, set empty string in input */
639
+ handleFocusChanges() {
640
+ this.hostComponent.nggvFocus
641
+ .asObservable()
642
+ .pipe(takeUntil(this._destroy$))
643
+ .subscribe(() => {
644
+ if (!this.state)
645
+ this.hostComponent.nggvInput.emit('');
646
+ this.setExpanded(true);
647
+ this.subscribeToOutsideClickEvent();
648
+ });
649
+ }
650
+ /**
651
+ * @internal Formats the selected option to display in the input. Interpolate the returned value
652
+ * since we don't know the return type or label type.
653
+ * @param value The selected value
654
+ * @returns The formatted value
655
+ */
656
+ formatSelected(value) {
657
+ if (value?.key == null)
658
+ return '';
659
+ //If no formatter exists, return the label or empty string
660
+ if (!this.selectedFormatter)
661
+ return value.label ?? '';
662
+ // If a formatter exists, use it
663
+ return this.selectedFormatter(value) ?? '';
664
+ }
665
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadDropdownListComponent, deps: [{ token: TRANSLOCO_SCOPE, optional: true, skipSelf: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
666
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NggvTypeaheadDropdownListComponent, selector: "nggv-typeahead-dropdown-list", inputs: { hostComponent: "hostComponent", resultFormatter: "resultFormatter", selectedFormatter: "selectedFormatter" }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; read: scope\">\n <ul\n class=\"gds-dropdown__options card options gds-reset\"\n [class.gds-dropdown__options-expanded]=\"expanded\"\n role=\"listbox\"\n tabindex=\"-1\"\n [attr.data-thook]=\"thook + '-options'\"\n [attr.aria-labelledby]=\"id + '-label'\"\n [attr.aria-activedescendant]=\"\n state ? id + '-option-' + state?.key : undefined\n \"\n >\n <ng-container *ngFor=\"let item of options\">\n <!-- OPTION -->\n <ng-container *ngIf=\"!isGroup(item)\">\n <ng-template\n *ngTemplateOutlet=\"listItemTemplate; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n\n <!-- OPTION GROUP -->\n <li\n class=\"gds-dropdown__options__label group\"\n [attr.data-thook]=\"thook + '-option-group'\"\n *ngIf=\"isGroup(item)\"\n >\n <!-- group label template (default or custom) -->\n <ng-template\n *ngTemplateOutlet=\"listGroupTemplate; context: { $implicit: item }\"\n ></ng-template>\n\n <ul [attr.aria-disabled]=\"item.disabled\" class=\"gds-reset\">\n <ng-container *ngFor=\"let option of castGroup(item).options\">\n <ng-template\n *ngTemplateOutlet=\"\n listItemTemplate;\n context: { $implicit: option }\n \"\n ></ng-template>\n </ng-container>\n </ul>\n </li>\n </ng-container>\n </ul>\n\n <!-- TEMPLATE -->\n <ng-template #listItemTemplate let-option>\n <li\n #optionRefs\n *ngIf=\"!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n [nggvTooltip]=\"isOverflow(liElem) ? t(option.label) : undefined\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"\n basicOptionContentTpl;\n context: { $implicit: option }\n \"\n >\n </ng-template>\n </li>\n <!-- Checking overflow on custom templates do not work skip adding nggvToolTip if custom template is provided -->\n <li\n #optionRefs\n *ngIf=\"!!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"optionContentTpl; context: { $implicit: option }\"\n >\n </ng-template>\n </li>\n </ng-template>\n\n <ng-template #listGroupTemplate let-item>\n <ng-container *ngIf=\"groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"groupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n <ng-container *ngIf=\"!groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"basicGroupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n </ng-template>\n\n <ng-template #basicOptionContentTpl let-option>\n <nggv-typeahead-highlight\n *ngIf=\"!!textToHighlight\"\n [textToHighlight]=\"textToHighlight\"\n [textContent]=\"t(option.label)\"\n >\n </nggv-typeahead-highlight>\n <ng-container *ngIf=\"!textToHighlight\">\n {{ t(option.label) }}\n </ng-container>\n </ng-template>\n\n <ng-template #basicGroupLabelTpl let-item>\n <div class=\"nggv-group-label\">{{ t(item.label) }}</div>\n </ng-template>\n</ng-container>\n", styles: [":host{display:flex;width:100%;position:relative}\n", ":host{--gds-ref-pallet-base400: hsl(0, 0%, 81%);--gds-ref-pallet-base500: hsl(0, 0%, 68%);--sg-z-index-dropdown: ;--sg-z-index-popover: 1060;--sg-z-index-dropdown-backdrop: 990;--sg-z-index-dropdown: 2000;--sg-popover-background: #fff;--sg-popover-box-shadow: 0 .125rem .375rem rgba(0, 0, 0, .15);--text-primary-color: #333;position:absolute;bottom:0;transform:translateY(calc(100% + .5rem));z-index:var(--sg-z-index-dropdown)}:host .hidden{visibility:hidden;display:none}:host ul[role=menu] [role=menuitem]{padding:.75rem;cursor:pointer}:host ul[role=menu] [role=menuitem]:hover,:host ul[role=menu] [role=menuitem]:focus-visible{background-color:var(--gds-ref-pallet-base200)}:host ul[role=menu] [role=menuitem]:active{background-color:var(--gds-ref-pallet-base300)}:host ul[role=menu] [role=menuitem]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox]{--z-index: var(--sg-z-index-popover);background-color:var(--sg-popover-background);flex-direction:column;justify-content:flex-end;inset:auto;z-index:var(--z-index);box-shadow:var(--sg-popover-box-shadow);color:var(--text-primary-color);padding:0;max-height:500px;overflow-y:auto;border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--text-primary-color);--sg-border-color: var(--text-primary-color);border-radius:var(--sg-border-radius)}:host ul[role=listbox] [role=option]{padding:.75rem 1rem;line-height:1.25;cursor:pointer}:host ul[role=listbox] [role=option]:hover,:host ul[role=listbox] [role=option]:focus-visible{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:active{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox] [role=option].active.sg-highlighted,:host ul[role=listbox] [role=option][aria-selected=true]{background:var(--grey-1000);color:#fff}:host ul[role=listbox] .group ul{list-style-type:none;padding:0}:host ul[role=listbox] .group:hover{color:inherit;background-color:inherit}:host .sg-fieldset-container{overflow-y:auto}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option]{display:flex;width:100%}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option].active.sg-highlighted input[type=checkbox]~i{border-color:#007ac7!important;box-shadow:0 0 .25em .0625em #41b0ee;outline-color:transparent;outline-style:solid}:host .gds-dropdown__options{padding-left:0;margin-bottom:0;margin-top:0;display:flex;flex-direction:column;list-style:none;display:none}:host .gds-dropdown__options>li{padding-bottom:.5rem;padding-top:.5rem;border:0;display:block;position:relative}:host .gds-dropdown__options>li:before{font-weight:500;display:inline-block;left:0;position:absolute;text-align:center}:host .gds-dropdown__options-expanded{display:block}:host .gds-dropdown__options__label:hover,:host .gds-dropdown__options__label:focus-visible,:host .gds-dropdown__options__label[aria-focus=true]{background-color:var(--gds-ref-pallet-base400)}:host .gds-dropdown__options__label:active{background-color:var(--gds-ref-pallet-base500)}:host .gds-dropdown__options__label:focus-visible{outline-color:#000;outline-offset:-.25rem}:host .gds-dropdown__options__label[aria-hidden=true]{display:none}:host .gds-dropdown__options__label[highlighted]{color:#fff}:host li+.group{padding-top:0}:host .nggv-group-label{cursor:pointer;background-color:#e7e7e7;padding-inline:1rem;padding-block:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NggvTooltipDirective, selector: "[nggvTooltip]", inputs: ["nggvTooltip", "thook", "placement", "shown", "offset", "resizeThrottle", "tooltipId", "maxWidth"], outputs: ["nggvShow", "nggvHide"] }, { kind: "component", type: NggvTypeaheadHighlightComponent, selector: "nggv-typeahead-highlight", inputs: ["textContent", "textToHighlight"] }] }); }
667
+ }
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadDropdownListComponent, decorators: [{
669
+ type: Component,
670
+ args: [{ selector: 'nggv-typeahead-dropdown-list', template: "<ng-container *transloco=\"let t; read: scope\">\n <ul\n class=\"gds-dropdown__options card options gds-reset\"\n [class.gds-dropdown__options-expanded]=\"expanded\"\n role=\"listbox\"\n tabindex=\"-1\"\n [attr.data-thook]=\"thook + '-options'\"\n [attr.aria-labelledby]=\"id + '-label'\"\n [attr.aria-activedescendant]=\"\n state ? id + '-option-' + state?.key : undefined\n \"\n >\n <ng-container *ngFor=\"let item of options\">\n <!-- OPTION -->\n <ng-container *ngIf=\"!isGroup(item)\">\n <ng-template\n *ngTemplateOutlet=\"listItemTemplate; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n\n <!-- OPTION GROUP -->\n <li\n class=\"gds-dropdown__options__label group\"\n [attr.data-thook]=\"thook + '-option-group'\"\n *ngIf=\"isGroup(item)\"\n >\n <!-- group label template (default or custom) -->\n <ng-template\n *ngTemplateOutlet=\"listGroupTemplate; context: { $implicit: item }\"\n ></ng-template>\n\n <ul [attr.aria-disabled]=\"item.disabled\" class=\"gds-reset\">\n <ng-container *ngFor=\"let option of castGroup(item).options\">\n <ng-template\n *ngTemplateOutlet=\"\n listItemTemplate;\n context: { $implicit: option }\n \"\n ></ng-template>\n </ng-container>\n </ul>\n </li>\n </ng-container>\n </ul>\n\n <!-- TEMPLATE -->\n <ng-template #listItemTemplate let-option>\n <li\n #optionRefs\n *ngIf=\"!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n [nggvTooltip]=\"isOverflow(liElem) ? t(option.label) : undefined\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"\n basicOptionContentTpl;\n context: { $implicit: option }\n \"\n >\n </ng-template>\n </li>\n <!-- Checking overflow on custom templates do not work skip adding nggvToolTip if custom template is provided -->\n <li\n #optionRefs\n *ngIf=\"!!optionContentTpl\"\n tabindex=\"-1\"\n [id]=\"id + '-option-' + option.key\"\n class=\"gds-dropdown__options__label option\"\n role=\"option\"\n #liElem\n [attr.data-thook]=\"thook + '-option-' + option.key\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.aria-selected]=\"\n option.key === selectedValue?.key && !!selectedValue?.key\n \"\n [attr.aria-focus]=\"option.key === state?.key && !option.disabled\"\n (click)=\"updateState(option, $event)\"\n >\n <ng-template\n *ngTemplateOutlet=\"optionContentTpl; context: { $implicit: option }\"\n >\n </ng-template>\n </li>\n </ng-template>\n\n <ng-template #listGroupTemplate let-item>\n <ng-container *ngIf=\"groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"groupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n <ng-container *ngIf=\"!groupLabelTpl\">\n <ng-template\n *ngTemplateOutlet=\"basicGroupLabelTpl; context: { $implicit: item }\"\n ></ng-template>\n </ng-container>\n </ng-template>\n\n <ng-template #basicOptionContentTpl let-option>\n <nggv-typeahead-highlight\n *ngIf=\"!!textToHighlight\"\n [textToHighlight]=\"textToHighlight\"\n [textContent]=\"t(option.label)\"\n >\n </nggv-typeahead-highlight>\n <ng-container *ngIf=\"!textToHighlight\">\n {{ t(option.label) }}\n </ng-container>\n </ng-template>\n\n <ng-template #basicGroupLabelTpl let-item>\n <div class=\"nggv-group-label\">{{ t(item.label) }}</div>\n </ng-template>\n</ng-container>\n", styles: [":host{display:flex;width:100%;position:relative}\n", ":host{--gds-ref-pallet-base400: hsl(0, 0%, 81%);--gds-ref-pallet-base500: hsl(0, 0%, 68%);--sg-z-index-dropdown: ;--sg-z-index-popover: 1060;--sg-z-index-dropdown-backdrop: 990;--sg-z-index-dropdown: 2000;--sg-popover-background: #fff;--sg-popover-box-shadow: 0 .125rem .375rem rgba(0, 0, 0, .15);--text-primary-color: #333;position:absolute;bottom:0;transform:translateY(calc(100% + .5rem));z-index:var(--sg-z-index-dropdown)}:host .hidden{visibility:hidden;display:none}:host ul[role=menu] [role=menuitem]{padding:.75rem;cursor:pointer}:host ul[role=menu] [role=menuitem]:hover,:host ul[role=menu] [role=menuitem]:focus-visible{background-color:var(--gds-ref-pallet-base200)}:host ul[role=menu] [role=menuitem]:active{background-color:var(--gds-ref-pallet-base300)}:host ul[role=menu] [role=menuitem]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox]{--z-index: var(--sg-z-index-popover);background-color:var(--sg-popover-background);flex-direction:column;justify-content:flex-end;inset:auto;z-index:var(--z-index);box-shadow:var(--sg-popover-box-shadow);color:var(--text-primary-color);padding:0;max-height:500px;overflow-y:auto;border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--text-primary-color);--sg-border-color: var(--text-primary-color);border-radius:var(--sg-border-radius)}:host ul[role=listbox] [role=option]{padding:.75rem 1rem;line-height:1.25;cursor:pointer}:host ul[role=listbox] [role=option]:hover,:host ul[role=listbox] [role=option]:focus-visible{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:active{background-color:var(--grey-400)}:host ul[role=listbox] [role=option]:focus{outline-color:#000;outline-offset:-.25rem}:host ul[role=listbox] [role=option].active.sg-highlighted,:host ul[role=listbox] [role=option][aria-selected=true]{background:var(--grey-1000);color:#fff}:host ul[role=listbox] .group ul{list-style-type:none;padding:0}:host ul[role=listbox] .group:hover{color:inherit;background-color:inherit}:host .sg-fieldset-container{overflow-y:auto}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option]{display:flex;width:100%}:host .sg-fieldset-container fieldset[role=listbox][aria-multiselectable=true] [role=option].active.sg-highlighted input[type=checkbox]~i{border-color:#007ac7!important;box-shadow:0 0 .25em .0625em #41b0ee;outline-color:transparent;outline-style:solid}:host .gds-dropdown__options{padding-left:0;margin-bottom:0;margin-top:0;display:flex;flex-direction:column;list-style:none;display:none}:host .gds-dropdown__options>li{padding-bottom:.5rem;padding-top:.5rem;border:0;display:block;position:relative}:host .gds-dropdown__options>li:before{font-weight:500;display:inline-block;left:0;position:absolute;text-align:center}:host .gds-dropdown__options-expanded{display:block}:host .gds-dropdown__options__label:hover,:host .gds-dropdown__options__label:focus-visible,:host .gds-dropdown__options__label[aria-focus=true]{background-color:var(--gds-ref-pallet-base400)}:host .gds-dropdown__options__label:active{background-color:var(--gds-ref-pallet-base500)}:host .gds-dropdown__options__label:focus-visible{outline-color:#000;outline-offset:-.25rem}:host .gds-dropdown__options__label[aria-hidden=true]{display:none}:host .gds-dropdown__options__label[highlighted]{color:#fff}:host li+.group{padding-top:0}:host .nggv-group-label{cursor:pointer;background-color:#e7e7e7;padding-inline:1rem;padding-block:.5rem}\n"] }]
671
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
672
+ type: SkipSelf
673
+ }, {
674
+ type: Optional
675
+ }, {
676
+ type: Inject,
677
+ args: [TRANSLOCO_SCOPE]
678
+ }] }, { type: i0.ElementRef }], propDecorators: { hostComponent: [{
679
+ type: Input
680
+ }], resultFormatter: [{
681
+ type: Input
682
+ }], selectedFormatter: [{
683
+ type: Input
684
+ }] } });
685
+
686
+ class NggvTypeaheadInputComponent extends NggvInputComponent {
687
+ get dropdownButton() {
688
+ return this.hostComponent.inputRef?.nativeElement;
689
+ }
690
+ constructor(element, renderer2, ngControl, translocoScope, cdr) {
691
+ super(ngControl, translocoScope, cdr);
692
+ this.element = element;
693
+ this.renderer2 = renderer2;
694
+ this.ngControl = ngControl;
695
+ this.translocoScope = translocoScope;
696
+ this.cdr = cdr;
697
+ /** Boolean to indicate wether the dropdown is expanded or not, to apply appropriate styling */
698
+ this.expanded = false;
699
+ super.ngOnInit();
700
+ }
701
+ ngOnInit() {
702
+ this.autocomplete = 'off';
703
+ this.debounceTime = 0;
704
+ this.hostComponent.selectOnSingleOption = false;
705
+ this.moveInput();
706
+ this.handleExpandedChange();
707
+ }
708
+ /**
709
+ * @internal
710
+ * Allow space to be inputted as text
711
+ * @param event fired containing which key was released.
712
+ */
713
+ onKeyUp(event) {
714
+ if (event.code === 'Space') {
715
+ event.preventDefault();
716
+ }
717
+ }
718
+ /**
719
+ * @internal
720
+ * First time the dropdown is expanded, move the input sp it becomes a child of the dropdown button
721
+ * to better reflect semantics and styling.
722
+ */
723
+ moveInput() {
724
+ // Workaround to execute code in setTimeout due to hooks management etc.
725
+ setTimeout(() => {
726
+ // Only move if parent dropdown is found
727
+ if (this.dropdownButton) {
728
+ this.renderer2.appendChild(this.dropdownButton.querySelector('button'), this.element.nativeElement);
729
+ // Get the height of the parent button so the input can be explicitly set to the same height since it's absolutely positioned
730
+ this.buttonHeight =
731
+ this.dropdownButton.getBoundingClientRect().height || 32; // Default to 2em;
732
+ }
733
+ }, 0);
734
+ }
735
+ /**
736
+ * @internal
737
+ * When dropdown is expanded, focus on the input. If a value is selected, set it in the input.
738
+ * When the dropdown is collapsed, empty the input from text.
739
+ */
740
+ handleExpandedChange() {
741
+ this.hostComponent.expandedChange
742
+ .pipe(takeUntil(this._destroy$))
743
+ .subscribe((state) => {
744
+ this.expanded = state;
745
+ if (this.expanded) {
746
+ // Weird workaround for setting focus. Didn't set focus, but wrapping in setTimeout solved it.
747
+ // See suggestion here: https://github.com/ionic-team/stencil/issues/3772#issuecomment-1292599609
748
+ setTimeout(() => this.setFocus());
749
+ // Format and interpolate result since return type can be other than string from the formatter
750
+ const formattedValue = `${this.formatSelected(this.hostComponent.state)}`;
751
+ this.setInput(formattedValue, false);
752
+ }
753
+ else
754
+ this.setInput('', true);
755
+ });
756
+ }
757
+ /**
758
+ * @internal Formats the selected option to display in the input. Interpolate the returned value
759
+ * since we don't know the return type or label type.
760
+ * @param value The selected value
761
+ * @returns The formatted value
762
+ */
763
+ formatSelected(value) {
764
+ if (value?.key == null)
765
+ return '';
766
+ // If no formatter exists, return the label or empty string
767
+ if (!this.selectedFormatter)
768
+ return value.label ?? '';
769
+ // If a formatter exists, use it
770
+ return this.selectedFormatter(value) ?? '';
771
+ }
772
+ /**
773
+ * Sets the input programmatically instead of native HTML input event.
774
+ * @param input
775
+ */
776
+ setInput(input, triggerFilter) {
777
+ this.state = input;
778
+ if (triggerFilter) {
779
+ this.onChange(this.state);
780
+ this.inputChange$.next(this.state);
781
+ }
782
+ }
783
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadInputComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
784
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NggvTypeaheadInputComponent, selector: "nggv-typeahead-input", inputs: { hostComponent: "hostComponent", resultFormatter: "resultFormatter", selectedFormatter: "selectedFormatter" }, host: { listeners: { "document:keyup": "onKeyUp($event)" } }, usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div\n class=\"input-wrapper\"\n [ngClass]=\"{ expanded: expanded, collapsed: !expanded }\"\n [ngStyle]=\"{ 'height.px': buttonHeight }\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- INPUT FIELD -->\n <div class=\"input-group\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;top:0;left:0;width:calc(100% - 2.625em)}:host .input-wrapper{border:none;box-shadow:none}:host .input-wrapper.expanded{display:flex}:host .input-wrapper.expanded .input-group input.gds-field{height:100%;width:100%;min-height:unset;margin-left:1px;border:none;box-shadow:none}:host .input-wrapper.collapsed{display:none}:host .input-wrapper .input-group{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
785
+ }
786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadInputComponent, decorators: [{
787
+ type: Component,
788
+ args: [{ selector: 'nggv-typeahead-input', template: "<ng-container>\n <div\n class=\"input-wrapper\"\n [ngClass]=\"{ expanded: expanded, collapsed: !expanded }\"\n [ngStyle]=\"{ 'height.px': buttonHeight }\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- INPUT FIELD -->\n <div class=\"input-group\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"gds-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;top:0;left:0;width:calc(100% - 2.625em)}:host .input-wrapper{border:none;box-shadow:none}:host .input-wrapper.expanded{display:flex}:host .input-wrapper.expanded .input-group input.gds-field{height:100%;width:100%;min-height:unset;margin-left:1px;border:none;box-shadow:none}:host .input-wrapper.collapsed{display:none}:host .input-wrapper .input-group{width:100%}\n"] }]
789
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.NgControl, decorators: [{
790
+ type: Self
791
+ }, {
792
+ type: Optional
793
+ }] }, { type: undefined, decorators: [{
794
+ type: Optional
795
+ }, {
796
+ type: Inject,
797
+ args: [TRANSLOCO_SCOPE]
798
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { hostComponent: [{
799
+ type: Input
800
+ }], resultFormatter: [{
801
+ type: Input
802
+ }], selectedFormatter: [{
803
+ type: Input
804
+ }], onKeyUp: [{
805
+ type: HostListener,
806
+ args: ['document:keyup', ['$event']]
807
+ }] } });
808
+
809
+ class NggvTypeaheadModule {
810
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
811
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadModule, declarations: [NggvTypeaheadHighlightComponent,
812
+ NggvTypeaheadInputComponent,
813
+ NggvTypeaheadDropdownListComponent], imports: [CommonModule, NggvTooltipModule], exports: [NggvTypeaheadHighlightComponent,
814
+ NggvTypeaheadInputComponent,
815
+ NggvTypeaheadDropdownListComponent] }); }
816
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadModule, imports: [CommonModule, NggvTooltipModule] }); }
817
+ }
818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadModule, decorators: [{
819
+ type: NgModule,
820
+ args: [{
821
+ declarations: [
822
+ NggvTypeaheadHighlightComponent,
823
+ NggvTypeaheadInputComponent,
824
+ NggvTypeaheadDropdownListComponent,
825
+ ],
826
+ imports: [CommonModule, NggvTooltipModule],
827
+ exports: [
828
+ NggvTypeaheadHighlightComponent,
829
+ NggvTypeaheadInputComponent,
830
+ NggvTypeaheadDropdownListComponent,
831
+ ],
832
+ }]
833
+ }] });
834
+
835
+ class NggvDropdownModule {
836
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
837
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownModule, declarations: [NggvDropdownComponent, NggvDropdownListComponent], imports: [CommonModule,
838
+ NggCoreWrapperModule,
839
+ NggvTypeaheadModule,
840
+ NggvTooltipModule,
841
+ NggvI18nModule], exports: [NggvDropdownComponent, NggvDropdownListComponent] }); }
842
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownModule, imports: [CommonModule,
843
+ NggCoreWrapperModule,
844
+ NggvTypeaheadModule,
845
+ NggvTooltipModule,
846
+ NggvI18nModule] }); }
847
+ }
848
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvDropdownModule, decorators: [{
849
+ type: NgModule,
850
+ args: [{
851
+ declarations: [NggvDropdownComponent, NggvDropdownListComponent],
852
+ imports: [
853
+ CommonModule,
854
+ NggCoreWrapperModule,
855
+ NggvTypeaheadModule,
856
+ NggvTooltipModule,
857
+ NggvI18nModule,
858
+ ],
859
+ exports: [NggvDropdownComponent, NggvDropdownListComponent],
860
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
861
+ }]
862
+ }] });
863
+
864
+ class NggvTypeaheadDirective {
865
+ /** Function that filter the inputvalue */
866
+ set nggvTypeahead(value) {
867
+ this.typeaheadFunction = value;
868
+ // If inputsubscription already exists, unsubscribe and subscribe again
869
+ if (this.inputSubscription$) {
870
+ this.inputSubscription$?.unsubscribe();
871
+ this.inputSubscription$ = undefined;
872
+ this.handleInputChanges();
873
+ }
874
+ }
875
+ /** Forward text inputs to apply the filter function*/
876
+ onNggvInput(event) {
877
+ this.inputValue$.next(event);
878
+ }
879
+ /** Helper to the determine if the host is nggv-drodpown or nggv-input*/
880
+ get hostIsDropdown() {
881
+ return !!this.hostDropdown;
882
+ }
883
+ /** Predefined options */
884
+ get defaultNullishOption() {
885
+ return { key: null, label: this.unselectLabel || '\u00A0' };
886
+ }
887
+ get emptyOption() {
888
+ return { key: null, label: 'label.nomatchingoptions', disabled: true };
889
+ }
890
+ /** Name of the component. nggv-dropdown if NggvDropdownComponent or nggv-input if NggvInputComponent */
891
+ get localName() {
892
+ return this.element.nativeElement.localName;
893
+ }
894
+ constructor(viewContainerRef, element, hostDropdown, hostInput) {
895
+ this.viewContainerRef = viewContainerRef;
896
+ this.element = element;
897
+ this.hostDropdown = hostDropdown;
898
+ this.hostInput = hostInput;
899
+ /** Allow option to be unselected in the dropdown even if it is required. Defaults to true */
900
+ this.allowUnselect = true;
901
+ /** Emits the entered string the user has written in the input */
902
+ this.filterPhraseChange = new EventEmitter();
903
+ this.inputValue$ = new Subject();
904
+ this.onDestroy$ = new Subject();
905
+ }
906
+ ngOnInit() {
907
+ this.handleInputChanges();
908
+ this.inputValue$.next('');
909
+ if (this.hostIsDropdown)
910
+ this.createInput();
911
+ else
912
+ this.createDropdownList();
913
+ }
914
+ ngOnDestroy() {
915
+ this.onDestroy$.next(true);
916
+ this.onDestroy$.complete();
917
+ }
918
+ /**
919
+ * @internal
920
+ * Core functionality of typeahead. Emits input, then filters the result based on the supplied function
921
+ * If directive is applied on nggv-input, manually show or hide options in the list.
922
+ * If directive is applied on nggv-dropdown, let the dropdown itself choose when to open or close
923
+ */
924
+ handleInputChanges() {
925
+ this.inputSubscription$ = this.inputValue$
926
+ .pipe(takeUntil(this.onDestroy$), distinctUntilChanged(), tap((inputValue) => this.filterPhraseChange.emit(inputValue)), this.typeaheadFunction ? this.typeaheadFunction : () => from([]), withLatestFrom(this.inputValue$))
927
+ .subscribe(([filteredValues, input]) => this.setOptions(filteredValues, input));
928
+ }
929
+ /**
930
+ * @internal
931
+ * Creates a nggv-input if the host itself is not a text-input
932
+ * Set styles to not display the input when closed
933
+ * Trigger filtering when changes occur in the field
934
+ * */
935
+ createInput() {
936
+ // Create the input component
937
+ this.inputComponent = this.viewContainerRef.createComponent(NggvTypeaheadInputComponent);
938
+ // Forward necessary info to component
939
+ this.inputComponent.setInput('hostComponent', this.hostDropdown);
940
+ this.inputComponent.setInput('selectedFormatter', this.selectedFormatter);
941
+ this.inputComponent.setInput('resultFormatter', this.resultFormatter);
942
+ // Listen to value changes
943
+ this.inputComponent.instance.nggvInput
944
+ .pipe(takeUntil(this.onDestroy$))
945
+ .subscribe((inputValue) => this.inputValue$.next(inputValue));
946
+ }
947
+ /** @internal Creates a nggv-dropdown-list if the host itself is a nggv-input */
948
+ createDropdownList() {
949
+ this.dropdownListComponent = this.viewContainerRef.createComponent(NggvTypeaheadDropdownListComponent);
950
+ this.dropdownListComponent.setInput('hostComponent', this.hostInput);
951
+ }
952
+ /**
953
+ * @internal Sets the options the user can select.
954
+ * If the host is a nggv-dropdown, utilize the dropdown itself to display the options
955
+ * If the host is a nggv-input, use the created nggv-dropdown-list to displaye the options
956
+ * @param filteredValues The options to display in the dropdown
957
+ * @param emptyInput If the input is empty
958
+ */
959
+ setOptions(filteredValues, input) {
960
+ if (!filteredValues)
961
+ return;
962
+ // Conditionally add empty or nullish option if it's allowed, the input is empty and does not already contain nullish
963
+ const allowNullish = this.allowUnselect &&
964
+ !input &&
965
+ !(Object.keys(filteredValues[0]).includes('key') &&
966
+ filteredValues[0].key == null);
967
+ if (filteredValues.length === 0) {
968
+ filteredValues = [this.emptyOption];
969
+ }
970
+ else if (allowNullish) {
971
+ filteredValues = [this.defaultNullishOption].concat(filteredValues);
972
+ }
973
+ if (this.hostIsDropdown) {
974
+ // Add nullish option when no input is written (or when dropdown is epanded and has a selection)
975
+ this.hostDropdown.allowControlNullishOption = false;
976
+ this.hostDropdown.options = this.formatOptions(filteredValues);
977
+ this.hostDropdown.textToHighlight = `${input || ''}`;
978
+ this.hostDropdown.detectChanges();
979
+ return;
980
+ }
981
+ if (!this.hostIsDropdown) {
982
+ this.dropdownListComponent.setInput('options', this.formatOptions(filteredValues));
983
+ this.dropdownListComponent.setInput('textToHighlight', `${input || ''}`);
984
+ }
985
+ }
986
+ /**
987
+ * @internal Formats the available options to display in the dropdown list
988
+ * @param options The selected value
989
+ * @returns The formatted value
990
+ */
991
+ formatOptions(options) {
992
+ if (!options)
993
+ return [];
994
+ if (!this.resultFormatter)
995
+ return options;
996
+ return options.map((value) => value?.label ? this.resultFormatter?.(value) : value);
997
+ }
998
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: NggvDropdownComponent, host: true, optional: true }, { token: i2$1.NggvInputComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
999
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NggvTypeaheadDirective, isStandalone: true, selector: "nggv-input[nggvTypeahead], nggv-dropdown[nggvTypeahead]", inputs: { nggvTypeahead: "nggvTypeahead", resultFormatter: "resultFormatter", selectedFormatter: "selectedFormatter", allowUnselect: "allowUnselect", unselectLabel: "unselectLabel" }, outputs: { filterPhraseChange: "filterPhraseChange" }, host: { listeners: { "nggvInput": "onNggvInput($event)" } }, ngImport: i0 }); }
1000
+ }
1001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NggvTypeaheadDirective, decorators: [{
1002
+ type: Directive,
1003
+ args: [{
1004
+ selector: 'nggv-input[nggvTypeahead], nggv-dropdown[nggvTypeahead]',
1005
+ standalone: true,
1006
+ }]
1007
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: NggvDropdownComponent, decorators: [{
1008
+ type: Optional
1009
+ }, {
1010
+ type: Host
1011
+ }] }, { type: i2$1.NggvInputComponent, decorators: [{
1012
+ type: Optional
1013
+ }, {
1014
+ type: Host
1015
+ }] }], propDecorators: { nggvTypeahead: [{
1016
+ type: Input
1017
+ }], resultFormatter: [{
1018
+ type: Input
1019
+ }], selectedFormatter: [{
1020
+ type: Input
1021
+ }], allowUnselect: [{
1022
+ type: Input
1023
+ }], unselectLabel: [{
1024
+ type: Input
1025
+ }], filterPhraseChange: [{
1026
+ type: Output
1027
+ }], onNggvInput: [{
1028
+ type: HostListener,
1029
+ args: ['nggvInput', ['$event']]
1030
+ }] } });
1031
+
1032
+ /**
1033
+ * Generated bundle index. Do not edit.
1034
+ */
1035
+
1036
+ export { NggvDropdownComponent, NggvDropdownListComponent, NggvDropdownModule, NggvTypeaheadDirective, NggvTypeaheadDropdownListComponent, NggvTypeaheadHighlightComponent, NggvTypeaheadInputComponent, NggvTypeaheadModule };
1037
+ //# sourceMappingURL=sebgroup-green-angular-src-v-angular-dropdown.mjs.map