@ngbase/adk 0.1.0

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 (355) hide show
  1. package/README.md +57 -0
  2. package/a11y/accessibility-group.d.ts +49 -0
  3. package/a11y/accessibility-item.d.ts +49 -0
  4. package/a11y/accessibility.service.d.ts +17 -0
  5. package/a11y/autofocus.d.ts +12 -0
  6. package/a11y/focus-trap.d.ts +15 -0
  7. package/a11y/index.d.ts +5 -0
  8. package/a11y/public-api.d.ts +4 -0
  9. package/accordion/accordion-content.d.ts +8 -0
  10. package/accordion/accordion-group.d.ts +10 -0
  11. package/accordion/accordion-header.d.ts +7 -0
  12. package/accordion/accordion-item.d.ts +10 -0
  13. package/accordion/index.d.ts +5 -0
  14. package/accordion/public-api.d.ts +4 -0
  15. package/autocomplete/autocomplete-input.d.ts +21 -0
  16. package/autocomplete/autocomplete.d.ts +25 -0
  17. package/autocomplete/index.d.ts +5 -0
  18. package/autocomplete/public-api.d.ts +2 -0
  19. package/avatar/avatar.d.ts +22 -0
  20. package/avatar/index.d.ts +5 -0
  21. package/avatar/public-api.d.ts +1 -0
  22. package/bidi/direction.service.d.ts +14 -0
  23. package/bidi/index.d.ts +5 -0
  24. package/bidi/public-api.d.ts +1 -0
  25. package/breadcrumb/breadcrumb-link.d.ts +7 -0
  26. package/breadcrumb/breadcrumb-separator.d.ts +10 -0
  27. package/breadcrumb/breadcrumb.d.ts +12 -0
  28. package/breadcrumb/breadcrumbs.d.ts +7 -0
  29. package/breadcrumb/index.d.ts +5 -0
  30. package/breadcrumb/public-api.d.ts +4 -0
  31. package/cache/cache-config.d.ts +22 -0
  32. package/cache/cache.d.ts +17 -0
  33. package/cache/cache.interecptor.d.ts +2 -0
  34. package/cache/index.d.ts +5 -0
  35. package/cache/public-api.d.ts +3 -0
  36. package/carousel/carousel-item.d.ts +7 -0
  37. package/carousel/carousel-next.d.ts +8 -0
  38. package/carousel/carousel.d.ts +61 -0
  39. package/carousel/index.d.ts +5 -0
  40. package/carousel/public-api.d.ts +3 -0
  41. package/checkbox/checkbox.d.ts +22 -0
  42. package/checkbox/index.d.ts +5 -0
  43. package/checkbox/public-api.d.ts +1 -0
  44. package/chip/chip-group.d.ts +7 -0
  45. package/chip/chip.d.ts +19 -0
  46. package/chip/index.d.ts +5 -0
  47. package/chip/public-api.d.ts +2 -0
  48. package/clipboard/clipboard.d.ts +7 -0
  49. package/clipboard/index.d.ts +5 -0
  50. package/clipboard/public-api.d.ts +1 -0
  51. package/collections/SelectionModel.d.ts +14 -0
  52. package/collections/index.d.ts +5 -0
  53. package/collections/public-api.d.ts +1 -0
  54. package/color-picker/color-input.d.ts +16 -0
  55. package/color-picker/color-picker-trigger.d.ts +30 -0
  56. package/color-picker/color-picker.d.ts +72 -0
  57. package/color-picker/index.d.ts +5 -0
  58. package/color-picker/public-api.d.ts +3 -0
  59. package/color-picker/utils.d.ts +21 -0
  60. package/cookies/cookie.service.d.ts +32 -0
  61. package/cookies/index.d.ts +5 -0
  62. package/cookies/public-api.d.ts +1 -0
  63. package/datepicker/calendar.d.ts +121 -0
  64. package/datepicker/datepicker-trigger.d.ts +49 -0
  65. package/datepicker/datepicker.d.ts +54 -0
  66. package/datepicker/index.d.ts +5 -0
  67. package/datepicker/native-date-adapter.d.ts +33 -0
  68. package/datepicker/public-api.d.ts +5 -0
  69. package/datepicker/time.d.ts +42 -0
  70. package/dialog/dialog.animation.d.ts +3 -0
  71. package/dialog/dialog.d.ts +49 -0
  72. package/dialog/dialog.service.d.ts +7 -0
  73. package/dialog/index.d.ts +5 -0
  74. package/dialog/public-api.d.ts +3 -0
  75. package/drag/drag-drop.d.ts +37 -0
  76. package/drag/drag-move.d.ts +17 -0
  77. package/drag/drag.d.ts +53 -0
  78. package/drag/index.d.ts +5 -0
  79. package/drag/public-api.d.ts +3 -0
  80. package/fesm2022/ngbase-adk-a11y.mjs +617 -0
  81. package/fesm2022/ngbase-adk-a11y.mjs.map +1 -0
  82. package/fesm2022/ngbase-adk-accordion.mjs +117 -0
  83. package/fesm2022/ngbase-adk-accordion.mjs.map +1 -0
  84. package/fesm2022/ngbase-adk-autocomplete.mjs +150 -0
  85. package/fesm2022/ngbase-adk-autocomplete.mjs.map +1 -0
  86. package/fesm2022/ngbase-adk-avatar.mjs +69 -0
  87. package/fesm2022/ngbase-adk-avatar.mjs.map +1 -0
  88. package/fesm2022/ngbase-adk-bidi.mjs +42 -0
  89. package/fesm2022/ngbase-adk-bidi.mjs.map +1 -0
  90. package/fesm2022/ngbase-adk-breadcrumb.mjs +103 -0
  91. package/fesm2022/ngbase-adk-breadcrumb.mjs.map +1 -0
  92. package/fesm2022/ngbase-adk-cache.mjs +127 -0
  93. package/fesm2022/ngbase-adk-cache.mjs.map +1 -0
  94. package/fesm2022/ngbase-adk-carousel.mjs +337 -0
  95. package/fesm2022/ngbase-adk-carousel.mjs.map +1 -0
  96. package/fesm2022/ngbase-adk-checkbox.mjs +78 -0
  97. package/fesm2022/ngbase-adk-checkbox.mjs.map +1 -0
  98. package/fesm2022/ngbase-adk-chip.mjs +60 -0
  99. package/fesm2022/ngbase-adk-chip.mjs.map +1 -0
  100. package/fesm2022/ngbase-adk-clipboard.mjs +41 -0
  101. package/fesm2022/ngbase-adk-clipboard.mjs.map +1 -0
  102. package/fesm2022/ngbase-adk-collections.mjs +39 -0
  103. package/fesm2022/ngbase-adk-collections.mjs.map +1 -0
  104. package/fesm2022/ngbase-adk-color-picker.mjs +580 -0
  105. package/fesm2022/ngbase-adk-color-picker.mjs.map +1 -0
  106. package/fesm2022/ngbase-adk-cookies.mjs +81 -0
  107. package/fesm2022/ngbase-adk-cookies.mjs.map +1 -0
  108. package/fesm2022/ngbase-adk-datepicker.mjs +1130 -0
  109. package/fesm2022/ngbase-adk-datepicker.mjs.map +1 -0
  110. package/fesm2022/ngbase-adk-dialog.mjs +223 -0
  111. package/fesm2022/ngbase-adk-dialog.mjs.map +1 -0
  112. package/fesm2022/ngbase-adk-drag.mjs +406 -0
  113. package/fesm2022/ngbase-adk-drag.mjs.map +1 -0
  114. package/fesm2022/ngbase-adk-form-field.mjs +364 -0
  115. package/fesm2022/ngbase-adk-form-field.mjs.map +1 -0
  116. package/fesm2022/ngbase-adk-hover-card.mjs +79 -0
  117. package/fesm2022/ngbase-adk-hover-card.mjs.map +1 -0
  118. package/fesm2022/ngbase-adk-icon.mjs +90 -0
  119. package/fesm2022/ngbase-adk-icon.mjs.map +1 -0
  120. package/fesm2022/ngbase-adk-inline-edit.mjs +127 -0
  121. package/fesm2022/ngbase-adk-inline-edit.mjs.map +1 -0
  122. package/fesm2022/ngbase-adk-jwt.mjs +90 -0
  123. package/fesm2022/ngbase-adk-jwt.mjs.map +1 -0
  124. package/fesm2022/ngbase-adk-keys.mjs +219 -0
  125. package/fesm2022/ngbase-adk-keys.mjs.map +1 -0
  126. package/fesm2022/ngbase-adk-layout.mjs +100 -0
  127. package/fesm2022/ngbase-adk-layout.mjs.map +1 -0
  128. package/fesm2022/ngbase-adk-list.mjs +110 -0
  129. package/fesm2022/ngbase-adk-list.mjs.map +1 -0
  130. package/fesm2022/ngbase-adk-mask.mjs +234 -0
  131. package/fesm2022/ngbase-adk-mask.mjs.map +1 -0
  132. package/fesm2022/ngbase-adk-menu.mjs +546 -0
  133. package/fesm2022/ngbase-adk-menu.mjs.map +1 -0
  134. package/fesm2022/ngbase-adk-network.mjs +90 -0
  135. package/fesm2022/ngbase-adk-network.mjs.map +1 -0
  136. package/fesm2022/ngbase-adk-pagination.mjs +187 -0
  137. package/fesm2022/ngbase-adk-pagination.mjs.map +1 -0
  138. package/fesm2022/ngbase-adk-popover.mjs +953 -0
  139. package/fesm2022/ngbase-adk-popover.mjs.map +1 -0
  140. package/fesm2022/ngbase-adk-portal.mjs +279 -0
  141. package/fesm2022/ngbase-adk-portal.mjs.map +1 -0
  142. package/fesm2022/ngbase-adk-progress.mjs +57 -0
  143. package/fesm2022/ngbase-adk-progress.mjs.map +1 -0
  144. package/fesm2022/ngbase-adk-radio.mjs +129 -0
  145. package/fesm2022/ngbase-adk-radio.mjs.map +1 -0
  146. package/fesm2022/ngbase-adk-resizable.mjs +367 -0
  147. package/fesm2022/ngbase-adk-resizable.mjs.map +1 -0
  148. package/fesm2022/ngbase-adk-scroll-area.mjs +232 -0
  149. package/fesm2022/ngbase-adk-scroll-area.mjs.map +1 -0
  150. package/fesm2022/ngbase-adk-select.mjs +599 -0
  151. package/fesm2022/ngbase-adk-select.mjs.map +1 -0
  152. package/fesm2022/ngbase-adk-selectable.mjs +79 -0
  153. package/fesm2022/ngbase-adk-selectable.mjs.map +1 -0
  154. package/fesm2022/ngbase-adk-sidenav.mjs +209 -0
  155. package/fesm2022/ngbase-adk-sidenav.mjs.map +1 -0
  156. package/fesm2022/ngbase-adk-slider.mjs +337 -0
  157. package/fesm2022/ngbase-adk-slider.mjs.map +1 -0
  158. package/fesm2022/ngbase-adk-sonner.mjs +176 -0
  159. package/fesm2022/ngbase-adk-sonner.mjs.map +1 -0
  160. package/fesm2022/ngbase-adk-stepper.mjs +211 -0
  161. package/fesm2022/ngbase-adk-stepper.mjs.map +1 -0
  162. package/fesm2022/ngbase-adk-switch.mjs +115 -0
  163. package/fesm2022/ngbase-adk-switch.mjs.map +1 -0
  164. package/fesm2022/ngbase-adk-table.mjs +348 -0
  165. package/fesm2022/ngbase-adk-table.mjs.map +1 -0
  166. package/fesm2022/ngbase-adk-tabs.mjs +386 -0
  167. package/fesm2022/ngbase-adk-tabs.mjs.map +1 -0
  168. package/fesm2022/ngbase-adk-test.mjs +267 -0
  169. package/fesm2022/ngbase-adk-test.mjs.map +1 -0
  170. package/fesm2022/ngbase-adk-toggle-group.mjs +114 -0
  171. package/fesm2022/ngbase-adk-toggle-group.mjs.map +1 -0
  172. package/fesm2022/ngbase-adk-toggle.mjs +48 -0
  173. package/fesm2022/ngbase-adk-toggle.mjs.map +1 -0
  174. package/fesm2022/ngbase-adk-tooltip.mjs +237 -0
  175. package/fesm2022/ngbase-adk-tooltip.mjs.map +1 -0
  176. package/fesm2022/ngbase-adk-tour.mjs +312 -0
  177. package/fesm2022/ngbase-adk-tour.mjs.map +1 -0
  178. package/fesm2022/ngbase-adk-translate.mjs +162 -0
  179. package/fesm2022/ngbase-adk-translate.mjs.map +1 -0
  180. package/fesm2022/ngbase-adk-tree.mjs +301 -0
  181. package/fesm2022/ngbase-adk-tree.mjs.map +1 -0
  182. package/fesm2022/ngbase-adk-utils.mjs +228 -0
  183. package/fesm2022/ngbase-adk-utils.mjs.map +1 -0
  184. package/fesm2022/ngbase-adk-virtualizer.mjs +198 -0
  185. package/fesm2022/ngbase-adk-virtualizer.mjs.map +1 -0
  186. package/fesm2022/ngbase-adk.mjs +6 -0
  187. package/fesm2022/ngbase-adk.mjs.map +1 -0
  188. package/form-field/auto-height.d.ts +9 -0
  189. package/form-field/error.d.ts +18 -0
  190. package/form-field/form-field.d.ts +14 -0
  191. package/form-field/index.d.ts +5 -0
  192. package/form-field/input.d.ts +16 -0
  193. package/form-field/label.d.ts +7 -0
  194. package/form-field/otp.d.ts +48 -0
  195. package/form-field/public-api.d.ts +6 -0
  196. package/hover-card/hover-card.d.ts +18 -0
  197. package/hover-card/index.d.ts +5 -0
  198. package/hover-card/public-api.d.ts +1 -0
  199. package/icon/icon.d.ts +12 -0
  200. package/icon/icon.service.d.ts +12 -0
  201. package/icon/index.d.ts +5 -0
  202. package/icon/public-api.d.ts +2 -0
  203. package/index.d.ts +5 -0
  204. package/inline-edit/index.d.ts +5 -0
  205. package/inline-edit/inline-edit.d.ts +47 -0
  206. package/inline-edit/public-api.d.ts +1 -0
  207. package/jwt/index.d.ts +5 -0
  208. package/jwt/jwt.service.d.ts +27 -0
  209. package/jwt/public-api.d.ts +1 -0
  210. package/keys/index.d.ts +5 -0
  211. package/keys/keys.service.d.ts +13 -0
  212. package/keys/public-api.d.ts +2 -0
  213. package/keys/shortcuts.service.d.ts +38 -0
  214. package/layout/index.d.ts +5 -0
  215. package/layout/layout.d.ts +16 -0
  216. package/layout/public-api.d.ts +1 -0
  217. package/list/index.d.ts +5 -0
  218. package/list/list.d.ts +20 -0
  219. package/list/list.directive.d.ts +12 -0
  220. package/list/public-api.d.ts +2 -0
  221. package/mask/index.d.ts +5 -0
  222. package/mask/mask-pipe.d.ts +7 -0
  223. package/mask/mask.d.ts +25 -0
  224. package/mask/public-api.d.ts +2 -0
  225. package/menu/context-menu.d.ts +21 -0
  226. package/menu/index.d.ts +5 -0
  227. package/menu/mention.d.ts +18 -0
  228. package/menu/menu-trigger.d.ts +34 -0
  229. package/menu/menu.d.ts +52 -0
  230. package/menu/navigation-menu.d.ts +19 -0
  231. package/menu/public-api.d.ts +5 -0
  232. package/network/index.d.ts +5 -0
  233. package/network/network.interceptor.d.ts +6 -0
  234. package/network/network.service.d.ts +18 -0
  235. package/network/public-api.d.ts +2 -0
  236. package/package.json +247 -0
  237. package/pagination/index.d.ts +5 -0
  238. package/pagination/pagination.d.ts +28 -0
  239. package/pagination/public-api.d.ts +1 -0
  240. package/popover/base-popover.service.d.ts +16 -0
  241. package/popover/index.d.ts +5 -0
  242. package/popover/popover-trigger.d.ts +21 -0
  243. package/popover/popover.d.ts +50 -0
  244. package/popover/popover.service.d.ts +42 -0
  245. package/popover/public-api.d.ts +5 -0
  246. package/popover/utils.d.ts +85 -0
  247. package/portal/dialog-ref.d.ts +71 -0
  248. package/portal/index.d.ts +5 -0
  249. package/portal/portal-base.service.d.ts +19 -0
  250. package/portal/portal-close.directive.d.ts +8 -0
  251. package/portal/portal.component.d.ts +7 -0
  252. package/portal/portal.service.d.ts +16 -0
  253. package/portal/public-api.d.ts +5 -0
  254. package/progress/index.d.ts +5 -0
  255. package/progress/progress.d.ts +13 -0
  256. package/progress/public-api.d.ts +1 -0
  257. package/public-api.d.ts +2 -0
  258. package/radio/index.d.ts +5 -0
  259. package/radio/public-api.d.ts +2 -0
  260. package/radio/radio-group.d.ts +19 -0
  261. package/radio/radio.d.ts +22 -0
  262. package/resizable/index.d.ts +5 -0
  263. package/resizable/public-api.d.ts +2 -0
  264. package/resizable/resizable-group.d.ts +22 -0
  265. package/resizable/resizable.d.ts +50 -0
  266. package/scroll-area/index.d.ts +5 -0
  267. package/scroll-area/public-api.d.ts +1 -0
  268. package/scroll-area/scroll-area.d.ts +56 -0
  269. package/select/index.d.ts +5 -0
  270. package/select/list-selection.d.ts +7 -0
  271. package/select/option-group.d.ts +7 -0
  272. package/select/option.d.ts +25 -0
  273. package/select/public-api.d.ts +6 -0
  274. package/select/select-base.d.ts +64 -0
  275. package/select/select-input.d.ts +23 -0
  276. package/select/select.d.ts +50 -0
  277. package/selectable/index.d.ts +5 -0
  278. package/selectable/public-api.d.ts +2 -0
  279. package/selectable/selectable-item.d.ts +12 -0
  280. package/selectable/selectable.d.ts +19 -0
  281. package/sidenav/index.d.ts +5 -0
  282. package/sidenav/public-api.d.ts +3 -0
  283. package/sidenav/sidenav-header.d.ts +31 -0
  284. package/sidenav/sidenav.d.ts +23 -0
  285. package/sidenav/sidenav.service.d.ts +18 -0
  286. package/slider/index.d.ts +5 -0
  287. package/slider/public-api.d.ts +1 -0
  288. package/slider/slider.d.ts +73 -0
  289. package/sonner/index.d.ts +5 -0
  290. package/sonner/public-api.d.ts +2 -0
  291. package/sonner/sonner.d.ts +24 -0
  292. package/sonner/sonner.service.d.ts +21 -0
  293. package/stepper/animation.d.ts +1 -0
  294. package/stepper/index.d.ts +5 -0
  295. package/stepper/public-api.d.ts +3 -0
  296. package/stepper/step.d.ts +24 -0
  297. package/stepper/stepper.d.ts +26 -0
  298. package/switch/index.d.ts +5 -0
  299. package/switch/public-api.d.ts +1 -0
  300. package/switch/switch.d.ts +44 -0
  301. package/table/body-cell.d.ts +11 -0
  302. package/table/body-row.d.ts +21 -0
  303. package/table/column.d.ts +10 -0
  304. package/table/head-cell.d.ts +12 -0
  305. package/table/head-row.d.ts +21 -0
  306. package/table/index.d.ts +5 -0
  307. package/table/public-api.d.ts +8 -0
  308. package/table/table.d.ts +32 -0
  309. package/tabs/index.d.ts +5 -0
  310. package/tabs/public-api.d.ts +2 -0
  311. package/tabs/tab-group.d.ts +52 -0
  312. package/tabs/tab.d.ts +31 -0
  313. package/test/index.d.ts +5 -0
  314. package/test/public-api.d.ts +1 -0
  315. package/test/utils.d.ts +62 -0
  316. package/toggle/index.d.ts +5 -0
  317. package/toggle/public-api.d.ts +1 -0
  318. package/toggle/toggle.d.ts +13 -0
  319. package/toggle-group/index.d.ts +5 -0
  320. package/toggle-group/public-api.d.ts +2 -0
  321. package/toggle-group/toggle-group.d.ts +25 -0
  322. package/toggle-group/toggle-item.d.ts +14 -0
  323. package/tooltip/index.d.ts +5 -0
  324. package/tooltip/public-api.d.ts +2 -0
  325. package/tooltip/tooltip.d.ts +20 -0
  326. package/tooltip/tooltip.directive.d.ts +34 -0
  327. package/tooltip/tooltip.service.d.ts +26 -0
  328. package/tour/animation.d.ts +2 -0
  329. package/tour/index.d.ts +5 -0
  330. package/tour/public-api.d.ts +5 -0
  331. package/tour/tour-base.d.ts +21 -0
  332. package/tour/tour-step.d.ts +11 -0
  333. package/tour/tour.d.ts +9 -0
  334. package/tour/tour.service.d.ts +30 -0
  335. package/translate/config.d.ts +16 -0
  336. package/translate/index.d.ts +5 -0
  337. package/translate/public-api.d.ts +3 -0
  338. package/translate/translate.d.ts +11 -0
  339. package/translate/translate.service.d.ts +31 -0
  340. package/tree/index.d.ts +5 -0
  341. package/tree/public-api.d.ts +3 -0
  342. package/tree/tree-node.d.ts +28 -0
  343. package/tree/tree-toggle.d.ts +16 -0
  344. package/tree/tree.d.ts +55 -0
  345. package/utils/animation.d.ts +3 -0
  346. package/utils/disposals.d.ts +7 -0
  347. package/utils/index.d.ts +5 -0
  348. package/utils/number-only.d.ts +22 -0
  349. package/utils/public-api.d.ts +6 -0
  350. package/utils/range.pipe.d.ts +7 -0
  351. package/utils/ssr.d.ts +2 -0
  352. package/utils/utils.d.ts +27 -0
  353. package/virtualizer/index.d.ts +5 -0
  354. package/virtualizer/public-api.d.ts +1 -0
  355. package/virtualizer/virtualizer.d.ts +42 -0
@@ -0,0 +1,599 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, ElementRef, input, booleanAttribute, output, signal, linkedSignal, Directive, contentChildren, viewChild, TemplateRef, model, computed, effect, untracked, contentChild, Component, ChangeDetectionStrategy, forwardRef } from '@angular/core';
4
+ import { FormsModule } from '@angular/forms';
5
+ import * as i1 from '@ngbase/adk/a11y';
6
+ import { AccessibleItem, Autofocus, AccessibleGroup } from '@ngbase/adk/a11y';
7
+ import { uniqueId, filterFunction, provideValueAccessor } from '@ngbase/adk/utils';
8
+ import { Directionality } from '@ngbase/adk/bidi';
9
+ import { ngbPopoverPortal } from '@ngbase/adk/popover';
10
+ import { Subject } from 'rxjs';
11
+ import * as i2 from '@ngbase/adk/form-field';
12
+ import { InputBase } from '@ngbase/adk/form-field';
13
+
14
+ class NgbOption {
15
+ constructor() {
16
+ this.allyItem = inject(AccessibleItem);
17
+ this.el = inject(ElementRef);
18
+ // inputs
19
+ this.value = input();
20
+ this.disabled = input(false, { transform: booleanAttribute });
21
+ this.ayId = input();
22
+ // outputs
23
+ this.onSelectionChange = output();
24
+ this.multiple = signal(false);
25
+ this.checked = signal(false);
26
+ this.active = signal(false);
27
+ this._ayId = linkedSignal({ source: this.ayId, computation: id => id || '' });
28
+ this.allyItem._ayId = this._ayId;
29
+ this.allyItem._disabled = this.disabled;
30
+ }
31
+ selectOption() { }
32
+ setAyId(id) {
33
+ this._ayId.set(id);
34
+ }
35
+ label() {
36
+ return this.el.nativeElement.textContent || '';
37
+ }
38
+ focus() {
39
+ this.el.nativeElement.scrollIntoView({ block: 'nearest' });
40
+ this.el.nativeElement.classList.add('bg-muted-background');
41
+ }
42
+ unselect() {
43
+ this.el.nativeElement.classList.remove('bg-muted-background');
44
+ }
45
+ getValue() {
46
+ return this.value() || this.label();
47
+ }
48
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbOption, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
49
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.0", type: NgbOption, isStandalone: true, selector: "[ngbOption]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ayId: { classPropertyName: "ayId", publicName: "ayId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectionChange: "onSelectionChange" }, host: { attributes: { "role": "option", "tabindex": "-1" }, listeners: { "click": "selectOption()" } }, hostDirectives: [{ directive: i1.AccessibleItem }], ngImport: i0 }); }
50
+ }
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbOption, decorators: [{
52
+ type: Directive,
53
+ args: [{
54
+ selector: '[ngbOption]',
55
+ hostDirectives: [AccessibleItem],
56
+ host: {
57
+ role: 'option',
58
+ tabindex: '-1',
59
+ '(click)': 'selectOption()',
60
+ },
61
+ }]
62
+ }], ctorParameters: () => [] });
63
+
64
+ class NgbSelectTarget {
65
+ constructor() {
66
+ this.target = signal(null);
67
+ }
68
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectTarget, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
69
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: NgbSelectTarget, isStandalone: true, selector: "[ngbSelectTarget]", ngImport: i0 }); }
70
+ }
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectTarget, decorators: [{
72
+ type: Directive,
73
+ args: [{
74
+ selector: '[ngbSelectTarget]',
75
+ }]
76
+ }] });
77
+ class SelectBase {
78
+ constructor(isSelect) {
79
+ this.isSelect = isSelect;
80
+ // Dependencies
81
+ this.el = inject(ElementRef);
82
+ this.dir = inject(Directionality);
83
+ this.target = inject(NgbSelectTarget, { optional: true });
84
+ this.list = contentChildren(NgbOption, { descendants: true });
85
+ this.popover = ngbPopoverPortal();
86
+ this.optionsTemplate = viewChild('optionsTemplate', { read: TemplateRef });
87
+ this.container = viewChild('container', { read: ElementRef });
88
+ this.optionsGroup = viewChild('optionsGroup', { read: ElementRef });
89
+ // inputs
90
+ this.options = input([]);
91
+ this.value = model('');
92
+ this.multiple = input(false, { transform: booleanAttribute });
93
+ this.placeholder = input(' ');
94
+ this.disabled = model(false);
95
+ this.size = input('free');
96
+ this.opened = output();
97
+ this.closed = output();
98
+ // state
99
+ this.sideOffset = 0;
100
+ this.panelOpen = signal(false);
101
+ this.values = signal([]);
102
+ this.status = signal('closed');
103
+ this.previousValue = '';
104
+ this.events = new Subject();
105
+ this.ayId = uniqueId();
106
+ this.cValue = computed(() => {
107
+ if (!this.isSelect && this.status() === 'opened') {
108
+ return this.previousValue;
109
+ }
110
+ const multiple = this.multiple();
111
+ const options = this.list();
112
+ const filtered = this.values(); // .filter(x => x !== undefined && x !== null && x !== '');
113
+ const values = filtered.length
114
+ ? options.reduce((acc, option) => {
115
+ if (filtered.includes(option.getValue())) {
116
+ acc.push(option.label());
117
+ }
118
+ return acc;
119
+ }, [])
120
+ : [];
121
+ // if the value is greater than 1, then take the first value and add a plus sign with the length of the remaining values
122
+ if (multiple && values.length > 1) {
123
+ this.previousValue = `${values[0]} (+${values.length - 1})`;
124
+ }
125
+ else {
126
+ this.previousValue = values[0] || '';
127
+ }
128
+ return this.previousValue;
129
+ });
130
+ // used to determine whether the select is with in a popup
131
+ this.withInPopup = false;
132
+ this.clickHandler = (e) => {
133
+ // if the click is in the options group, then do not close the popover
134
+ if (!this.optionsGroup()?.nativeElement.contains(e.target)) {
135
+ this.close();
136
+ }
137
+ };
138
+ this.focusOut = () => {
139
+ // settimeout is required to wait for withInPopup to be set by the popover
140
+ requestAnimationFrame(() => {
141
+ // if the focus is not in the popup, then close the popover
142
+ if (!this.withInPopup)
143
+ this.close();
144
+ });
145
+ };
146
+ effect(() => {
147
+ const options = this.list();
148
+ options.forEach(option => {
149
+ option.setAyId(this.ayId);
150
+ option.multiple.set(this.multiple());
151
+ option.selectOption = () => {
152
+ untracked(() => {
153
+ this.setValue([option.getValue()]);
154
+ option.checked.set(!option.checked());
155
+ option.onSelectionChange.emit(option.getValue());
156
+ if (!this.multiple()) {
157
+ this.close();
158
+ }
159
+ });
160
+ };
161
+ });
162
+ untracked(() => {
163
+ if (this.status() === 'opening') {
164
+ this.open();
165
+ }
166
+ });
167
+ });
168
+ effect(() => {
169
+ const values = this.values();
170
+ const options = this.list();
171
+ // console.log('values', this.values());
172
+ options.forEach(option => {
173
+ option.checked.set(values.includes(option.getValue()));
174
+ });
175
+ });
176
+ // valueRef is required to destroy the effect when formControl is registered
177
+ // so that it does not override the form value
178
+ this.valueRef = effect(() => this.updateValues(this.value()));
179
+ }
180
+ open() {
181
+ // if the status is opened, return
182
+ if (this.status() === 'opened')
183
+ return;
184
+ // if the options are empty, return
185
+ if (this.list().length === 0 && this.options().length === 0) {
186
+ this.status.set('opening');
187
+ return;
188
+ }
189
+ const el = this.target?.target() || this.container()?.nativeElement || this.el.nativeElement;
190
+ const { diaRef, events } = this.popover.open(this.optionsTemplate(), {
191
+ target: el,
192
+ position: this.dir.isRtl() ? 'br' : 'bl',
193
+ backdrop: this.isSelect,
194
+ width: this.size(),
195
+ maxHeight: '400px',
196
+ ayId: this.ayId,
197
+ focusTrap: false,
198
+ sideOffset: this.sideOffset,
199
+ afterFocusEl: this.container()?.nativeElement || this.el.nativeElement,
200
+ });
201
+ this.withInPopup = false;
202
+ events.subscribe(e => {
203
+ this.withInPopup = e.type !== 'mouseleave';
204
+ });
205
+ if (!this.isSelect) {
206
+ diaRef.events.subscribe(() => {
207
+ document.addEventListener('click', this.clickHandler);
208
+ this.events.next('open');
209
+ });
210
+ }
211
+ else {
212
+ this.events.next('open');
213
+ }
214
+ // listen for close from backdrop click
215
+ diaRef.afterClosed.subscribe(() => {
216
+ this.afterClose();
217
+ });
218
+ this.popClose = () => {
219
+ diaRef.close();
220
+ };
221
+ this.afterOpen();
222
+ }
223
+ popValue() {
224
+ const values = this.values();
225
+ const value = values[values.length - 1];
226
+ if (value) {
227
+ this.setValue([value]);
228
+ }
229
+ }
230
+ close() {
231
+ this.popClose?.();
232
+ this.popClose = undefined;
233
+ }
234
+ afterOpen() {
235
+ this.status.set('opened');
236
+ this.opened.emit(true);
237
+ this.panelOpen.set(true);
238
+ // listen for focus out to close the popover
239
+ // this.el.nativeElement.addEventListener('focusout', this.focusOut);
240
+ }
241
+ afterClose() {
242
+ this.closed.emit(true);
243
+ this.panelOpen.set(false);
244
+ this.status.set('closed');
245
+ this.events.next('close');
246
+ // stop listening for focus out
247
+ // this.el.nativeElement.removeEventListener('focusout', this.focusOut);
248
+ // stop listening for click
249
+ document.removeEventListener('click', this.clickHandler);
250
+ }
251
+ setValue(values, skip = false) {
252
+ let localValue = this.values();
253
+ let setValue;
254
+ if (this.multiple()) {
255
+ values.forEach(v => {
256
+ const index = localValue.indexOf(v);
257
+ if (index > -1) {
258
+ localValue = localValue.filter((_, i) => i !== index);
259
+ }
260
+ else {
261
+ localValue = [...localValue, v];
262
+ }
263
+ });
264
+ setValue = localValue;
265
+ }
266
+ else {
267
+ localValue = values;
268
+ setValue = values[0];
269
+ this.close();
270
+ }
271
+ // console.log('setValue', localValue, this.values());
272
+ this.values.set(localValue);
273
+ if (!skip) {
274
+ this.onChange?.(setValue);
275
+ this.onTouched?.();
276
+ this.value.set(setValue);
277
+ }
278
+ }
279
+ removeValue(value) {
280
+ // let values = this.values();
281
+ // const index = values.indexOf(value);
282
+ // if (index > -1) {
283
+ // values = values.filter((_, i) => i === index);
284
+ this.setValue([value]);
285
+ // }
286
+ }
287
+ writeValue(value) {
288
+ this.updateValues(value);
289
+ }
290
+ updateValues(value) {
291
+ this.values.set(Array.isArray(value) ? value : [value]);
292
+ }
293
+ registerOnChange(fn) {
294
+ this.onChange = fn;
295
+ this.valueRef.destroy();
296
+ }
297
+ registerOnTouched(fn) {
298
+ this.onTouched = fn;
299
+ }
300
+ setDisabledState(isDisabled) {
301
+ this.disabled.set(isDisabled);
302
+ }
303
+ ngOnDestroy() {
304
+ this.close();
305
+ }
306
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SelectBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
307
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.0.0", type: SelectBase, isStandalone: true, inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", opened: "opened", closed: "closed" }, queries: [{ propertyName: "list", predicate: NgbOption, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "optionsTemplate", first: true, predicate: ["optionsTemplate"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "optionsGroup", first: true, predicate: ["optionsGroup"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0 }); }
308
+ }
309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SelectBase, decorators: [{
310
+ type: Directive
311
+ }], ctorParameters: () => [{ type: undefined }] });
312
+
313
+ class NgbSelectInput {
314
+ constructor() {
315
+ // Dependencies
316
+ this.el = inject(ElementRef);
317
+ this.select = inject(NgbSelect, { optional: true });
318
+ this.inputBase = inject(InputBase);
319
+ // Inputs
320
+ this.placeholder = input('Search here');
321
+ this.options = input([]);
322
+ this.filterFn = input();
323
+ // State
324
+ this.filteredOptions = computed(() => {
325
+ const fn = this.filterFn();
326
+ const options = this.options();
327
+ const search = this.inputBase.value();
328
+ const values = search ? options.filter(v => fn(search, v, options)) : options;
329
+ return values;
330
+ });
331
+ this.select?.events.subscribe(event => {
332
+ if (event === 'open') {
333
+ this.inputBase.value.set('');
334
+ this.el.nativeElement.focus();
335
+ }
336
+ });
337
+ }
338
+ updateSearch(value) {
339
+ this.inputBase.value.set(value);
340
+ }
341
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
342
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.0", type: NgbSelectInput, isStandalone: true, selector: "[ngbSelectInput]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, filterFn: { classPropertyName: "filterFn", publicName: "filterFn", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "placeholder": "placeholder()", "tabindex": "0" } }, exportAs: ["ngbSelectInput"], hostDirectives: [{ directive: i1.Autofocus }, { directive: i2.InputBase, inputs: ["value", "value"], outputs: ["valueChange", "valueChange"] }], ngImport: i0 }); }
343
+ }
344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectInput, decorators: [{
345
+ type: Directive,
346
+ args: [{
347
+ selector: '[ngbSelectInput]',
348
+ exportAs: 'ngbSelectInput',
349
+ hostDirectives: [
350
+ Autofocus,
351
+ { directive: InputBase, inputs: ['value'], outputs: ['valueChange'] },
352
+ ],
353
+ host: {
354
+ '[placeholder]': 'placeholder()',
355
+ '[tabindex]': '0',
356
+ },
357
+ }]
358
+ }], ctorParameters: () => [] });
359
+ class NgbSelectTrigger {
360
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
361
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: NgbSelectTrigger, isStandalone: true, selector: "[ngbSelectTrigger]", ngImport: i0 }); }
362
+ }
363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectTrigger, decorators: [{
364
+ type: Directive,
365
+ args: [{
366
+ selector: '[ngbSelectTrigger]',
367
+ }]
368
+ }] });
369
+
370
+ class NgbSelectOption {
371
+ constructor() {
372
+ this.template = inject((TemplateRef));
373
+ }
374
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
375
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: NgbSelectOption, isStandalone: true, selector: "[ngbSelectOption]", ngImport: i0 }); }
376
+ }
377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectOption, decorators: [{
378
+ type: Directive,
379
+ args: [{
380
+ selector: '[ngbSelectOption]',
381
+ }]
382
+ }] });
383
+ class SelectValue {
384
+ constructor() {
385
+ this.select = inject((NgbSelect));
386
+ }
387
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SelectValue, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
388
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: SelectValue, isStandalone: true, selector: "[ngbSelectValue]", host: { attributes: { "type": "button", "role": "combobox", "tabindex": "-1" }, properties: { "disabled": "select.disabled()" } }, ngImport: i0 }); }
389
+ }
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SelectValue, decorators: [{
391
+ type: Directive,
392
+ args: [{
393
+ selector: '[ngbSelectValue]',
394
+ host: {
395
+ type: 'button',
396
+ role: 'combobox',
397
+ tabindex: '-1',
398
+ '[disabled]': 'select.disabled()',
399
+ },
400
+ }]
401
+ }] });
402
+ class NgbSelectOptionGroup {
403
+ constructor() {
404
+ this.group = inject(AccessibleGroup);
405
+ this.select = inject((SelectBase));
406
+ this.group._isPopup.set(true);
407
+ this.group._loop.set(false);
408
+ this.group._ayId.set(this.select.ayId);
409
+ }
410
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectOptionGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
411
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: NgbSelectOptionGroup, isStandalone: true, selector: "[ngbSelectOptionGroup]", hostDirectives: [{ directive: i1.AccessibleGroup }], ngImport: i0 }); }
412
+ }
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelectOptionGroup, decorators: [{
414
+ type: Directive,
415
+ args: [{
416
+ selector: '[ngbSelectOptionGroup]',
417
+ hostDirectives: [AccessibleGroup],
418
+ }]
419
+ }], ctorParameters: () => [] });
420
+ class NgbSelect extends SelectBase {
421
+ constructor() {
422
+ super(true);
423
+ this.search = model('');
424
+ this.optionTemplate = contentChild((NgbSelectOption));
425
+ this.defaultFilter = (option) => option;
426
+ this.optionsFilter = filterFunction(this.options, { filter: this.defaultFilter });
427
+ }
428
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
429
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: NgbSelect, isStandalone: true, selector: "[ngbSelect]", inputs: { search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { search: "searchChange" }, host: { attributes: { "role": "listbox", "type": "button" }, listeners: { "click": "open()", "keydown.arrowdown": "open()", "keydown.arrowup": "open()", "keydown.enter": "open()", "keydown.space": "open()" }, properties: { "tabindex": "disabled() ? -1 : 0" } }, providers: [_provide(NgbSelect)], queries: [{ propertyName: "optionTemplate", first: true, predicate: (NgbSelectOption), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
430
+ <button
431
+ ngbSelectValue
432
+ class="flex min-h-b5 w-full items-center justify-between gap-b whitespace-nowrap outline-none"
433
+ [class.opacity-50]="disabled()"
434
+ >
435
+ <!-- Prefix template -->
436
+ <ng-content select=".select-prefix" />
437
+
438
+ <span class="truncate" [class.text-muted]="!cValue()">
439
+ <ng-content select="[ngbSelectTrigger]">
440
+ {{ cValue() || placeholder() }}
441
+ </ng-content>
442
+ </span>
443
+ </button>
444
+
445
+ <!-- Options template -->
446
+ <ng-template #optionsTemplate>
447
+ <div class="flex flex-col overflow-hidden">
448
+ <ng-content select="[ngbSelectInput]">
449
+ @if (options().length) {
450
+ <input ngbSelectInput placeholder="Search options" [(value)]="optionsFilter.search" />
451
+ }
452
+ </ng-content>
453
+ <div #optionsGroup ngbSelectOptionGroup class="overflow-auto p-b">
454
+ <div class="h-full" role="listbox" aria-label="Suggestions">
455
+ <ng-content>
456
+ @for (option of optionsFilter.filteredList(); track option; let i = $index) {
457
+ <div ngbOption [value]="option" [ayId]="ayId">
458
+ @if (optionTemplate(); as ot) {
459
+ <ng-template
460
+ [ngTemplateOutlet]="ot.template"
461
+ [ngTemplateOutletContext]="{ $implicit: option, index: i }"
462
+ />
463
+ } @else {
464
+ {{ option }}
465
+ }
466
+ </div>
467
+ }
468
+ </ng-content>
469
+ </div>
470
+ </div>
471
+ </div>
472
+ </ng-template>
473
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => FormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgbSelectInput), selector: "[ngbSelectInput]", inputs: ["placeholder", "options", "filterFn"], exportAs: ["ngbSelectInput"] }, { kind: "directive", type: i0.forwardRef(() => NgbOption), selector: "[ngbOption]", inputs: ["value", "disabled", "ayId"], outputs: ["onSelectionChange"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => SelectValue), selector: "[ngbSelectValue]" }, { kind: "directive", type: i0.forwardRef(() => NgbSelectOptionGroup), selector: "[ngbSelectOptionGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
474
+ }
475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSelect, decorators: [{
476
+ type: Component,
477
+ args: [{
478
+ selector: '[ngbSelect]',
479
+ changeDetection: ChangeDetectionStrategy.OnPush,
480
+ providers: [_provide(NgbSelect)],
481
+ imports: [
482
+ AccessibleGroup,
483
+ FormsModule,
484
+ AccessibleItem,
485
+ forwardRef(() => NgbSelectInput),
486
+ NgbOption,
487
+ NgTemplateOutlet,
488
+ SelectValue,
489
+ NgbSelectOptionGroup,
490
+ ],
491
+ host: {
492
+ role: 'listbox',
493
+ type: 'button',
494
+ '(click)': 'open()',
495
+ '(keydown.arrowdown)': 'open()',
496
+ '(keydown.arrowup)': 'open()',
497
+ '(keydown.enter)': 'open()',
498
+ '(keydown.space)': 'open()',
499
+ '[tabindex]': 'disabled() ? -1 : 0',
500
+ },
501
+ template: `
502
+ <button
503
+ ngbSelectValue
504
+ class="flex min-h-b5 w-full items-center justify-between gap-b whitespace-nowrap outline-none"
505
+ [class.opacity-50]="disabled()"
506
+ >
507
+ <!-- Prefix template -->
508
+ <ng-content select=".select-prefix" />
509
+
510
+ <span class="truncate" [class.text-muted]="!cValue()">
511
+ <ng-content select="[ngbSelectTrigger]">
512
+ {{ cValue() || placeholder() }}
513
+ </ng-content>
514
+ </span>
515
+ </button>
516
+
517
+ <!-- Options template -->
518
+ <ng-template #optionsTemplate>
519
+ <div class="flex flex-col overflow-hidden">
520
+ <ng-content select="[ngbSelectInput]">
521
+ @if (options().length) {
522
+ <input ngbSelectInput placeholder="Search options" [(value)]="optionsFilter.search" />
523
+ }
524
+ </ng-content>
525
+ <div #optionsGroup ngbSelectOptionGroup class="overflow-auto p-b">
526
+ <div class="h-full" role="listbox" aria-label="Suggestions">
527
+ <ng-content>
528
+ @for (option of optionsFilter.filteredList(); track option; let i = $index) {
529
+ <div ngbOption [value]="option" [ayId]="ayId">
530
+ @if (optionTemplate(); as ot) {
531
+ <ng-template
532
+ [ngTemplateOutlet]="ot.template"
533
+ [ngTemplateOutletContext]="{ $implicit: option, index: i }"
534
+ />
535
+ } @else {
536
+ {{ option }}
537
+ }
538
+ </div>
539
+ }
540
+ </ng-content>
541
+ </div>
542
+ </div>
543
+ </div>
544
+ </ng-template>
545
+ `,
546
+ }]
547
+ }], ctorParameters: () => [] });
548
+ function _provide(select) {
549
+ return [{ provide: SelectBase, useExisting: select }, provideValueAccessor(select)];
550
+ }
551
+ function provideSelect(select) {
552
+ const deps = [_provide(select), { provide: NgbSelect, useExisting: select }];
553
+ return deps;
554
+ }
555
+
556
+ class NgbOptionGroup {
557
+ constructor() {
558
+ this.label = input.required();
559
+ this.disabled = input(false);
560
+ }
561
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbOptionGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
562
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.0", type: NgbOptionGroup, isStandalone: true, selector: "[ngbOptionGroup]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<div>{{ label() }}</div>
563
+ <ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
564
+ }
565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbOptionGroup, decorators: [{
566
+ type: Component,
567
+ args: [{
568
+ selector: '[ngbOptionGroup]',
569
+ changeDetection: ChangeDetectionStrategy.OnPush,
570
+ template: `<div>{{ label() }}</div>
571
+ <ng-content />`,
572
+ }]
573
+ }] });
574
+
575
+ class ListSelection extends SelectBase {
576
+ constructor() {
577
+ super(true);
578
+ }
579
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ListSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
580
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: ListSelection, isStandalone: true, selector: "[ngbListSelection]", providers: [provideValueAccessor(ListSelection)], usesInheritance: true, ngImport: i0 }); }
581
+ }
582
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ListSelection, decorators: [{
583
+ type: Directive,
584
+ args: [{
585
+ selector: '[ngbListSelection]',
586
+ providers: [provideValueAccessor(ListSelection)],
587
+ }]
588
+ }], ctorParameters: () => [] });
589
+
590
+ /*
591
+ * Public API Surface of select
592
+ */
593
+
594
+ /**
595
+ * Generated bundle index. Do not edit.
596
+ */
597
+
598
+ export { ListSelection, NgbOption, NgbOptionGroup, NgbSelect, NgbSelectInput, NgbSelectOption, NgbSelectOptionGroup, NgbSelectTarget, NgbSelectTrigger, SelectBase, SelectValue, provideSelect };
599
+ //# sourceMappingURL=ngbase-adk-select.mjs.map