ng-primitives 0.89.0 → 0.90.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 (382) hide show
  1. package/a11y/index.d.ts +106 -3
  2. package/accordion/index.d.ts +213 -7
  3. package/ai/index.d.ts +238 -16
  4. package/autofill/index.d.ts +22 -1
  5. package/avatar/index.d.ts +120 -5
  6. package/breadcrumbs/index.d.ts +60 -7
  7. package/button/index.d.ts +44 -3
  8. package/checkbox/index.d.ts +58 -2
  9. package/combobox/index.d.ts +414 -8
  10. package/common/index.d.ts +31 -4
  11. package/date-picker/index.d.ts +713 -18
  12. package/date-time/index.d.ts +289 -3
  13. package/date-time-luxon/index.d.ts +31 -1
  14. package/dialog/index.d.ts +253 -9
  15. package/fesm2022/ng-primitives-a11y.mjs +9 -9
  16. package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
  17. package/fesm2022/ng-primitives-accordion.mjs +51 -48
  18. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  19. package/fesm2022/ng-primitives-ai.mjs +57 -54
  20. package/fesm2022/ng-primitives-ai.mjs.map +1 -1
  21. package/fesm2022/ng-primitives-autofill.mjs +5 -5
  22. package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
  23. package/fesm2022/ng-primitives-avatar.mjs +18 -17
  24. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  25. package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
  26. package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
  27. package/fesm2022/ng-primitives-button.mjs +7 -7
  28. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  29. package/fesm2022/ng-primitives-checkbox.mjs +25 -21
  30. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  31. package/fesm2022/ng-primitives-combobox.mjs +76 -72
  32. package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
  33. package/fesm2022/ng-primitives-common.mjs +5 -5
  34. package/fesm2022/ng-primitives-common.mjs.map +1 -1
  35. package/fesm2022/ng-primitives-date-picker.mjs +114 -108
  36. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  37. package/fesm2022/ng-primitives-dialog.mjs +48 -47
  38. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  39. package/fesm2022/ng-primitives-file-upload.mjs +56 -48
  40. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  41. package/fesm2022/ng-primitives-focus-trap.mjs +9 -8
  42. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  43. package/fesm2022/ng-primitives-form-field.mjs +49 -48
  44. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  45. package/fesm2022/ng-primitives-input-otp.mjs +44 -43
  46. package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
  47. package/fesm2022/ng-primitives-input.mjs +8 -8
  48. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  49. package/fesm2022/ng-primitives-interactions.mjs +55 -50
  50. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  51. package/fesm2022/ng-primitives-internal.mjs +14 -14
  52. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  53. package/fesm2022/ng-primitives-listbox.mjs +52 -50
  54. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  55. package/fesm2022/ng-primitives-menu.mjs +75 -68
  56. package/fesm2022/ng-primitives-menu.mjs.map +1 -1
  57. package/fesm2022/ng-primitives-meter.mjs +38 -35
  58. package/fesm2022/ng-primitives-meter.mjs.map +1 -1
  59. package/fesm2022/ng-primitives-pagination.mjs +77 -68
  60. package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
  61. package/fesm2022/ng-primitives-popover.mjs +67 -60
  62. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  63. package/fesm2022/ng-primitives-portal.mjs +11 -12
  64. package/fesm2022/ng-primitives-portal.mjs.map +1 -1
  65. package/fesm2022/ng-primitives-progress.mjs +42 -39
  66. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  67. package/fesm2022/ng-primitives-radio.mjs +32 -30
  68. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  69. package/fesm2022/ng-primitives-resize.mjs +4 -4
  70. package/fesm2022/ng-primitives-resize.mjs.map +1 -1
  71. package/fesm2022/ng-primitives-roving-focus.mjs +34 -30
  72. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  73. package/fesm2022/ng-primitives-search.mjs +9 -9
  74. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  75. package/fesm2022/ng-primitives-select.mjs +66 -62
  76. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  77. package/fesm2022/ng-primitives-separator.mjs +7 -7
  78. package/fesm2022/ng-primitives-separator.mjs.map +1 -1
  79. package/fesm2022/ng-primitives-slider.mjs +99 -88
  80. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  81. package/fesm2022/ng-primitives-state.mjs +1 -1
  82. package/fesm2022/ng-primitives-state.mjs.map +1 -1
  83. package/fesm2022/ng-primitives-switch.mjs +18 -16
  84. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  85. package/fesm2022/ng-primitives-tabs.mjs +44 -42
  86. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  87. package/fesm2022/ng-primitives-textarea.mjs +8 -8
  88. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  89. package/fesm2022/ng-primitives-toast.mjs +19 -19
  90. package/fesm2022/ng-primitives-toast.mjs.map +1 -1
  91. package/fesm2022/ng-primitives-toggle-group.mjs +32 -29
  92. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
  93. package/fesm2022/ng-primitives-toggle.mjs +14 -12
  94. package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
  95. package/fesm2022/ng-primitives-toolbar.mjs +7 -7
  96. package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
  97. package/fesm2022/ng-primitives-tooltip.mjs +68 -60
  98. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  99. package/fesm2022/ng-primitives-utils.mjs +2 -2
  100. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  101. package/file-upload/index.d.ts +148 -4
  102. package/focus-trap/index.d.ts +98 -2
  103. package/form-field/index.d.ts +262 -7
  104. package/index.d.ts +2 -2
  105. package/input/index.d.ts +47 -2
  106. package/input-otp/index.d.ts +247 -4
  107. package/interactions/index.d.ts +295 -16
  108. package/internal/index.d.ts +201 -10
  109. package/listbox/index.d.ts +209 -6
  110. package/menu/index.d.ts +296 -8
  111. package/meter/index.d.ts +67 -6
  112. package/package.json +28 -28
  113. package/pagination/index.d.ts +211 -7
  114. package/popover/index.d.ts +224 -5
  115. package/portal/index.d.ts +389 -6
  116. package/progress/index.d.ts +124 -6
  117. package/radio/index.d.ts +140 -5
  118. package/resize/index.d.ts +29 -1
  119. package/roving-focus/index.d.ts +178 -4
  120. package/schematics/ng-generate/__snapshots__/index.spec.ts.snap +1 -1
  121. package/search/index.d.ts +66 -3
  122. package/select/index.d.ts +341 -8
  123. package/separator/index.d.ts +30 -2
  124. package/slider/index.d.ts +332 -10
  125. package/state/index.d.ts +14 -11
  126. package/switch/index.d.ts +76 -3
  127. package/tabs/index.d.ts +222 -7
  128. package/textarea/index.d.ts +32 -2
  129. package/toast/index.d.ts +219 -4
  130. package/toggle/index.d.ts +57 -2
  131. package/toggle-group/index.d.ts +143 -5
  132. package/toolbar/index.d.ts +33 -2
  133. package/tooltip/index.d.ts +214 -5
  134. package/utils/index.d.ts +169 -9
  135. package/a11y/active-descendant/active-descendant.d.ts +0 -42
  136. package/a11y/visually-hidden/visually-hidden-state.d.ts +0 -17
  137. package/a11y/visually-hidden/visually-hidden.d.ts +0 -50
  138. package/accordion/accordion/accordion-state.d.ts +0 -17
  139. package/accordion/accordion/accordion.d.ts +0 -50
  140. package/accordion/accordion-content/accordion-content.d.ts +0 -40
  141. package/accordion/accordion-item/accordion-item-state.d.ts +0 -17
  142. package/accordion/accordion-item/accordion-item.d.ts +0 -50
  143. package/accordion/accordion-trigger/accordion-trigger.d.ts +0 -31
  144. package/accordion/config/accordion-config.d.ts +0 -32
  145. package/ai/prompt-composer/prompt-composer-state.d.ts +0 -17
  146. package/ai/prompt-composer/prompt-composer.d.ts +0 -23
  147. package/ai/prompt-composer-dictation/prompt-composer-dictation-state.d.ts +0 -17
  148. package/ai/prompt-composer-dictation/prompt-composer-dictation.d.ts +0 -29
  149. package/ai/prompt-composer-input/prompt-composer-input-state.d.ts +0 -17
  150. package/ai/prompt-composer-input/prompt-composer-input.d.ts +0 -16
  151. package/ai/prompt-composer-submit/prompt-composer-submit-state.d.ts +0 -17
  152. package/ai/prompt-composer-submit/prompt-composer-submit.d.ts +0 -15
  153. package/ai/thread/thread-state.d.ts +0 -17
  154. package/ai/thread/thread.d.ts +0 -23
  155. package/ai/thread-message/thread-message-state.d.ts +0 -17
  156. package/ai/thread-message/thread-message.d.ts +0 -11
  157. package/ai/thread-suggestion/thread-suggestion-state.d.ts +0 -17
  158. package/ai/thread-suggestion/thread-suggestion.d.ts +0 -14
  159. package/ai/thread-viewport/thread-viewport-state.d.ts +0 -17
  160. package/ai/thread-viewport/thread-viewport.d.ts +0 -34
  161. package/autofill/autofill/autofill.d.ts +0 -19
  162. package/avatar/avatar/avatar-state.d.ts +0 -17
  163. package/avatar/avatar/avatar.d.ts +0 -29
  164. package/avatar/avatar-fallback/avatar-fallback.d.ts +0 -37
  165. package/avatar/avatar-image/avatar-image.d.ts +0 -27
  166. package/avatar/config/avatar-config.d.ts +0 -21
  167. package/breadcrumbs/breadcrumb-ellipsis/breadcrumb-ellipsis.d.ts +0 -8
  168. package/breadcrumbs/breadcrumb-item/breadcrumb-item.d.ts +0 -8
  169. package/breadcrumbs/breadcrumb-link/breadcrumb-link.d.ts +0 -9
  170. package/breadcrumbs/breadcrumb-list/breadcrumb-list.d.ts +0 -8
  171. package/breadcrumbs/breadcrumb-page/breadcrumb-page.d.ts +0 -8
  172. package/breadcrumbs/breadcrumb-separator/breadcrumb-separator.d.ts +0 -8
  173. package/breadcrumbs/breadcrumbs/breadcrumbs.d.ts +0 -8
  174. package/button/button/button-state.d.ts +0 -17
  175. package/button/button/button.d.ts +0 -15
  176. package/button/button/setup-button.d.ts +0 -15
  177. package/checkbox/checkbox/checkbox-state.d.ts +0 -17
  178. package/checkbox/checkbox/checkbox.d.ts +0 -45
  179. package/combobox/combobox/combobox-state.d.ts +0 -17
  180. package/combobox/combobox/combobox.d.ts +0 -222
  181. package/combobox/combobox-button/combobox-button.d.ts +0 -18
  182. package/combobox/combobox-dropdown/combobox-dropdown.d.ts +0 -21
  183. package/combobox/combobox-input/combobox-input.d.ts +0 -36
  184. package/combobox/combobox-option/combobox-option.d.ts +0 -51
  185. package/combobox/combobox-portal/combobox-portal.d.ts +0 -37
  186. package/combobox/config/combobox-config.d.ts +0 -28
  187. package/combobox/utils.d.ts +0 -9
  188. package/common/header/header-token.d.ts +0 -10
  189. package/common/header/header.d.ts +0 -13
  190. package/common/types/orientation.d.ts +0 -1
  191. package/common/types/selection.d.ts +0 -1
  192. package/date-picker/config/date-picker-config.d.ts +0 -22
  193. package/date-picker/date-picker/date-picker-first-day-of-week.d.ts +0 -29
  194. package/date-picker/date-picker/date-picker-state.d.ts +0 -9
  195. package/date-picker/date-picker/date-picker.d.ts +0 -129
  196. package/date-picker/date-picker-cell/date-picker-cell.d.ts +0 -20
  197. package/date-picker/date-picker-cell-render/date-picker-cell-render-token.d.ts +0 -12
  198. package/date-picker/date-picker-cell-render/date-picker-cell-render.d.ts +0 -39
  199. package/date-picker/date-picker-date-button/date-picker-date-button-token.d.ts +0 -7
  200. package/date-picker/date-picker-date-button/date-picker-date-button.d.ts +0 -114
  201. package/date-picker/date-picker-grid/date-picker-grid.d.ts +0 -16
  202. package/date-picker/date-picker-label/date-picker-label-token.d.ts +0 -7
  203. package/date-picker/date-picker-label/date-picker-label.d.ts +0 -20
  204. package/date-picker/date-picker-next-month/date-picker-next-month.d.ts +0 -34
  205. package/date-picker/date-picker-previous-month/date-picker-previous-month.d.ts +0 -34
  206. package/date-picker/date-picker-row-render/date-picker-row-render-token.d.ts +0 -12
  207. package/date-picker/date-picker-row-render/date-picker-row-render.d.ts +0 -65
  208. package/date-picker/date-range-picker/date-range-picker-state.d.ts +0 -19
  209. package/date-picker/date-range-picker/date-range-picker.d.ts +0 -149
  210. package/date-time/date-adapter/date-adapter-token.d.ts +0 -11
  211. package/date-time/date-adapter/date-adapter.d.ts +0 -169
  212. package/date-time/native-date-adapter/native-date-adapter.d.ts +0 -106
  213. package/date-time-luxon/luxon-date-adapter/luxon-date-adapter.d.ts +0 -28
  214. package/dialog/config/dialog-config.d.ts +0 -41
  215. package/dialog/dialog/dialog-ref.d.ts +0 -45
  216. package/dialog/dialog/dialog-state.d.ts +0 -17
  217. package/dialog/dialog/dialog.d.ts +0 -37
  218. package/dialog/dialog/dialog.service.d.ts +0 -69
  219. package/dialog/dialog-description/dialog-description.d.ts +0 -12
  220. package/dialog/dialog-overlay/dialog-overlay.d.ts +0 -16
  221. package/dialog/dialog-title/dialog-title.d.ts +0 -12
  222. package/dialog/dialog-trigger/dialog-trigger.d.ts +0 -26
  223. package/file-upload/file-dropzone/file-drop-filter.d.ts +0 -2
  224. package/file-upload/file-dropzone/file-dropzone-state.d.ts +0 -17
  225. package/file-upload/file-dropzone/file-dropzone.d.ts +0 -55
  226. package/file-upload/file-upload/file-upload-state.d.ts +0 -17
  227. package/file-upload/file-upload/file-upload.d.ts +0 -72
  228. package/focus-trap/focus-trap/focus-trap-state.d.ts +0 -17
  229. package/focus-trap/focus-trap/focus-trap.d.ts +0 -85
  230. package/form-field/description/description.d.ts +0 -17
  231. package/form-field/error/error.d.ts +0 -32
  232. package/form-field/form-control/form-control-state.d.ts +0 -17
  233. package/form-field/form-control/form-control.d.ts +0 -44
  234. package/form-field/form-field/form-field-state.d.ts +0 -17
  235. package/form-field/form-field/form-field.d.ts +0 -119
  236. package/form-field/label/label.d.ts +0 -30
  237. package/input/input/input-state.d.ts +0 -17
  238. package/input/input/input.d.ts +0 -34
  239. package/input-otp/input-otp/input-otp-state.d.ts +0 -17
  240. package/input-otp/input-otp/input-otp.d.ts +0 -133
  241. package/input-otp/input-otp-input/input-otp-input.d.ts +0 -57
  242. package/input-otp/input-otp-slot/input-otp-slot.d.ts +0 -45
  243. package/interactions/config/interactions-config.d.ts +0 -30
  244. package/interactions/focus/focus-interaction.d.ts +0 -14
  245. package/interactions/focus/focus.d.ts +0 -19
  246. package/interactions/focus-visible/focus-visible-interaction.d.ts +0 -12
  247. package/interactions/focus-visible/focus-visible.d.ts +0 -19
  248. package/interactions/hover/hover-interaction.d.ts +0 -17
  249. package/interactions/hover/hover.d.ts +0 -31
  250. package/interactions/interactions/interactions.d.ts +0 -20
  251. package/interactions/move/move.d.ts +0 -114
  252. package/interactions/press/press-interaction.d.ts +0 -14
  253. package/interactions/press/press.d.ts +0 -26
  254. package/internal/exit-animation/exit-animation-manager.d.ts +0 -17
  255. package/internal/exit-animation/exit-animation.d.ts +0 -26
  256. package/internal/signals/explicit-effect.d.ts +0 -19
  257. package/internal/style-injector/style-injector.d.ts +0 -44
  258. package/internal/utilities/dom-removal.d.ts +0 -6
  259. package/internal/utilities/element-ref.d.ts +0 -6
  260. package/internal/utilities/mutation-observer.d.ts +0 -39
  261. package/internal/utilities/overflow.d.ts +0 -13
  262. package/internal/utilities/resize.d.ts +0 -31
  263. package/internal/utilities/scrolling.d.ts +0 -1
  264. package/listbox/listbox/listbox-state.d.ts +0 -17
  265. package/listbox/listbox/listbox.d.ts +0 -101
  266. package/listbox/listbox-header/listbox-header.d.ts +0 -9
  267. package/listbox/listbox-option/listbox-option.d.ts +0 -68
  268. package/listbox/listbox-section/listbox-section.d.ts +0 -9
  269. package/listbox/listbox-trigger/listbox-trigger.d.ts +0 -13
  270. package/menu/config/menu-config.d.ts +0 -44
  271. package/menu/menu/menu-token.d.ts +0 -11
  272. package/menu/menu/menu.d.ts +0 -22
  273. package/menu/menu-item/menu-item.d.ts +0 -30
  274. package/menu/menu-trigger/menu-trigger-state.d.ts +0 -17
  275. package/menu/menu-trigger/menu-trigger.d.ts +0 -98
  276. package/menu/submenu-trigger/submenu-trigger-state.d.ts +0 -17
  277. package/menu/submenu-trigger/submenu-trigger.d.ts +0 -88
  278. package/meter/meter/meter-state.d.ts +0 -17
  279. package/meter/meter/meter.d.ts +0 -27
  280. package/meter/meter-indicator/meter-indicator.d.ts +0 -7
  281. package/meter/meter-label/meter-label.d.ts +0 -10
  282. package/meter/meter-track/meter-track.d.ts +0 -5
  283. package/meter/meter-value/meter-value.d.ts +0 -5
  284. package/pagination/pagination/pagination-state.d.ts +0 -17
  285. package/pagination/pagination/pagination.d.ts +0 -45
  286. package/pagination/pagination-button/pagination-button.d.ts +0 -39
  287. package/pagination/pagination-first/pagination-first.d.ts +0 -28
  288. package/pagination/pagination-last/pagination-last.d.ts +0 -28
  289. package/pagination/pagination-next/pagination-next.d.ts +0 -31
  290. package/pagination/pagination-previous/pagination-previous.d.ts +0 -31
  291. package/popover/config/popover-config.d.ts +0 -64
  292. package/popover/popover/popover.d.ts +0 -18
  293. package/popover/popover-arrow/popover-arrow.d.ts +0 -6
  294. package/popover/popover-trigger/popover-trigger-state.d.ts +0 -19
  295. package/popover/popover-trigger/popover-trigger.d.ts +0 -128
  296. package/portal/offset.d.ts +0 -39
  297. package/portal/overlay-arrow.d.ts +0 -1
  298. package/portal/overlay-token.d.ts +0 -12
  299. package/portal/overlay.d.ts +0 -214
  300. package/portal/portal.d.ts +0 -94
  301. package/portal/scroll-strategy.d.ts +0 -23
  302. package/progress/progress/progress-state.d.ts +0 -17
  303. package/progress/progress/progress.d.ts +0 -61
  304. package/progress/progress-indicator/progress-indicator.d.ts +0 -17
  305. package/progress/progress-label/progress-label.d.ts +0 -14
  306. package/progress/progress-track/progress-track.d.ts +0 -9
  307. package/progress/progress-value/progress-value.d.ts +0 -9
  308. package/radio/radio-group/radio-group-state.d.ts +0 -18
  309. package/radio/radio-group/radio-group.d.ts +0 -54
  310. package/radio/radio-indicator/radio-indicator.d.ts +0 -21
  311. package/radio/radio-item/radio-item-state.d.ts +0 -18
  312. package/radio/radio-item/radio-item.d.ts +0 -45
  313. package/resize/resize/resize.d.ts +0 -26
  314. package/roving-focus/roving-focus-group/roving-focus-group-state.d.ts +0 -17
  315. package/roving-focus/roving-focus-group/roving-focus-group-token.d.ts +0 -21
  316. package/roving-focus/roving-focus-group/roving-focus-group.d.ts +0 -94
  317. package/roving-focus/roving-focus-item/roving-focus-item.d.ts +0 -53
  318. package/search/search/search-state.d.ts +0 -17
  319. package/search/search/search.d.ts +0 -36
  320. package/search/search-clear/search-clear.d.ts +0 -16
  321. package/select/config/select-config.d.ts +0 -28
  322. package/select/native-select/native-select-state.d.ts +0 -17
  323. package/select/native-select/native-select.d.ts +0 -22
  324. package/select/select/select-state.d.ts +0 -17
  325. package/select/select/select.d.ts +0 -172
  326. package/select/select-dropdown/select-dropdown.d.ts +0 -17
  327. package/select/select-option/select-option.d.ts +0 -51
  328. package/select/select-portal/select-portal.d.ts +0 -37
  329. package/separator/config/separator-config.d.ts +0 -22
  330. package/separator/separator/separator.d.ts +0 -11
  331. package/slider/range-slider/range-slider/range-slider-state.d.ts +0 -17
  332. package/slider/range-slider/range-slider/range-slider.d.ts +0 -115
  333. package/slider/range-slider/range-slider-range/range-slider-range.d.ts +0 -12
  334. package/slider/range-slider/range-slider-thumb/range-slider-thumb.d.ts +0 -44
  335. package/slider/range-slider/range-slider-track/range-slider-track.d.ts +0 -22
  336. package/slider/slider/slider-state.d.ts +0 -17
  337. package/slider/slider/slider.d.ts +0 -58
  338. package/slider/slider-range/slider-range.d.ts +0 -12
  339. package/slider/slider-thumb/slider-thumb.d.ts +0 -29
  340. package/slider/slider-track/slider-track.d.ts +0 -22
  341. package/switch/switch/switch-state.d.ts +0 -17
  342. package/switch/switch/switch.d.ts +0 -49
  343. package/switch/switch-thumb/switch-thumb.d.ts +0 -13
  344. package/tabs/config/tabs-config.d.ts +0 -32
  345. package/tabs/tab-button/tab-button.d.ts +0 -59
  346. package/tabs/tab-list/tab-list.d.ts +0 -12
  347. package/tabs/tab-panel/tab-panel-token.d.ts +0 -8
  348. package/tabs/tab-panel/tab-panel.d.ts +0 -38
  349. package/tabs/tabset/tabset-state.d.ts +0 -17
  350. package/tabs/tabset/tabset.d.ts +0 -71
  351. package/textarea/textarea/textarea-state.d.ts +0 -17
  352. package/textarea/textarea/textarea.d.ts +0 -19
  353. package/toast/config/toast-config.d.ts +0 -70
  354. package/toast/toast/toast-context.d.ts +0 -3
  355. package/toast/toast/toast-manager.d.ts +0 -49
  356. package/toast/toast/toast-options.d.ts +0 -34
  357. package/toast/toast/toast-timer.d.ts +0 -14
  358. package/toast/toast/toast.d.ts +0 -72
  359. package/toggle/toggle/toggle-state.d.ts +0 -17
  360. package/toggle/toggle/toggle.d.ts +0 -44
  361. package/toggle-group/config/toggle-group-config.d.ts +0 -32
  362. package/toggle-group/toggle-group/toggle-group-state.d.ts +0 -17
  363. package/toggle-group/toggle-group/toggle-group.d.ts +0 -64
  364. package/toggle-group/toggle-group-item/toggle-group-item-state.d.ts +0 -17
  365. package/toggle-group/toggle-group-item/toggle-group-item.d.ts +0 -34
  366. package/toolbar/toolbar/toolbar-state.d.ts +0 -17
  367. package/toolbar/toolbar/toolbar.d.ts +0 -20
  368. package/tooltip/config/tooltip-config.d.ts +0 -59
  369. package/tooltip/tooltip/tooltip.d.ts +0 -17
  370. package/tooltip/tooltip-arrow/tooltip-arrow.d.ts +0 -6
  371. package/tooltip/tooltip-text-content/tooltip-text-content.component.d.ts +0 -14
  372. package/tooltip/tooltip-trigger/tooltip-trigger-state.d.ts +0 -17
  373. package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +0 -126
  374. package/utils/forms/providers.d.ts +0 -6
  375. package/utils/forms/status.d.ts +0 -16
  376. package/utils/forms/types.d.ts +0 -8
  377. package/utils/helpers/attributes.d.ts +0 -2
  378. package/utils/helpers/disposables.d.ts +0 -40
  379. package/utils/helpers/unique-id.d.ts +0 -6
  380. package/utils/helpers/validators.d.ts +0 -51
  381. package/utils/observables/take-until-destroyed.d.ts +0 -10
  382. package/utils/signals/index.d.ts +0 -22
@@ -43,10 +43,10 @@ class NgpTooltipArrow {
43
43
  constructor() {
44
44
  setupOverlayArrow();
45
45
  }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltipArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
47
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpTooltipArrow, isStandalone: true, selector: "[ngpTooltipArrow]", exportAs: ["ngpTooltipArrow"], ngImport: i0 }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltipArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
47
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpTooltipArrow, isStandalone: true, selector: "[ngpTooltipArrow]", exportAs: ["ngpTooltipArrow"], ngImport: i0 }); }
48
48
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltipArrow, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltipArrow, decorators: [{
50
50
  type: Directive,
51
51
  args: [{
52
52
  selector: '[ngpTooltipArrow]',
@@ -66,7 +66,7 @@ class NgpTooltip {
66
66
  /**
67
67
  * The unique id of the tooltip.
68
68
  */
69
- this.id = input(this.overlay.id());
69
+ this.id = input(this.overlay.id(), ...(ngDevMode ? [{ debugName: "id" }] : []));
70
70
  explicitEffect([this.id], ([id]) => this.overlay.id.set(id));
71
71
  // if the mouse moves over the tooltip, we want to keep it open
72
72
  ngpHoverInteraction({
@@ -74,10 +74,10 @@ class NgpTooltip {
74
74
  hoverEnd: () => this.overlay.hide(),
75
75
  });
76
76
  }
77
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
78
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpTooltip, isStandalone: true, selector: "[ngpTooltip]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tooltip", "data-overlay": "" }, properties: { "id": "id()", "style.left.px": "overlay.position().x", "style.top.px": "overlay.position().y", "style.--ngp-tooltip-trigger-width.px": "overlay.triggerWidth()", "style.--ngp-tooltip-transform-origin": "overlay.transformOrigin()", "attr.data-placement": "overlay.finalPlacement()" } }, exportAs: ["ngpTooltip"], ngImport: i0 }); }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
78
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpTooltip, isStandalone: true, selector: "[ngpTooltip]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tooltip", "data-overlay": "" }, properties: { "id": "id()", "style.left.px": "overlay.position().x", "style.top.px": "overlay.position().y", "style.--ngp-tooltip-trigger-width.px": "overlay.triggerWidth()", "style.--ngp-tooltip-transform-origin": "overlay.transformOrigin()", "attr.data-placement": "overlay.finalPlacement()" } }, exportAs: ["ngpTooltip"], ngImport: i0 }); }
79
79
  }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltip, decorators: [{
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltip, decorators: [{
81
81
  type: Directive,
82
82
  args: [{
83
83
  selector: '[ngpTooltip]',
@@ -93,7 +93,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
93
93
  'data-overlay': '',
94
94
  },
95
95
  }]
96
- }], ctorParameters: () => [] });
96
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
97
97
 
98
98
  /**
99
99
  * Internal component for wrapping string content in tooltip portals
@@ -106,10 +106,10 @@ class NgpTooltipTextContentComponent {
106
106
  */
107
107
  this.content = injectOverlayContext();
108
108
  }
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltipTextContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
110
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: NgpTooltipTextContentComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "ngpTooltip": "" } }, hostDirectives: [{ directive: NgpTooltip }], ngImport: i0, template: '{{ content() }}', isInline: true }); }
109
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltipTextContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
110
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: NgpTooltipTextContentComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "ngpTooltip": "" } }, hostDirectives: [{ directive: NgpTooltip }], ngImport: i0, template: '{{ content() }}', isInline: true }); }
111
111
  }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltipTextContentComponent, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltipTextContentComponent, decorators: [{
113
113
  type: Component,
114
114
  args: [{
115
115
  template: '{{ content() }}',
@@ -163,102 +163,110 @@ class NgpTooltipTrigger {
163
163
  /**
164
164
  * Access the tooltip template ref.
165
165
  */
166
- this.tooltip = input(null, {
167
- alias: 'ngpTooltipTrigger',
168
- transform: (value) => (value && !isString(value) ? value : null),
169
- });
166
+ this.tooltip = input(null, ...(ngDevMode ? [{ debugName: "tooltip", alias: 'ngpTooltipTrigger',
167
+ transform: (value) => (value && !isString(value) ? value : null) }] : [{
168
+ alias: 'ngpTooltipTrigger',
169
+ transform: (value) => (value && !isString(value) ? value : null),
170
+ }]));
170
171
  /**
171
172
  * Define if the trigger should be disabled.
172
173
  * @default false
173
174
  */
174
- this.disabled = input(false, {
175
- alias: 'ngpTooltipTriggerDisabled',
176
- transform: booleanAttribute,
177
- });
175
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpTooltipTriggerDisabled',
176
+ transform: booleanAttribute }] : [{
177
+ alias: 'ngpTooltipTriggerDisabled',
178
+ transform: booleanAttribute,
179
+ }]));
178
180
  /**
179
181
  * Define the placement of the tooltip relative to the trigger.
180
182
  * @default 'top'
181
183
  */
182
- this.placement = input(this.config.placement, {
183
- alias: 'ngpTooltipTriggerPlacement',
184
- });
184
+ this.placement = input(this.config.placement, ...(ngDevMode ? [{ debugName: "placement", alias: 'ngpTooltipTriggerPlacement' }] : [{
185
+ alias: 'ngpTooltipTriggerPlacement',
186
+ }]));
185
187
  /**
186
188
  * Define the offset of the tooltip relative to the trigger.
187
189
  * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
188
190
  * @default 0
189
191
  */
190
- this.offset = input(this.config.offset, {
191
- alias: 'ngpTooltipTriggerOffset',
192
- transform: coerceOffset,
193
- });
192
+ this.offset = input(this.config.offset, ...(ngDevMode ? [{ debugName: "offset", alias: 'ngpTooltipTriggerOffset',
193
+ transform: coerceOffset }] : [{
194
+ alias: 'ngpTooltipTriggerOffset',
195
+ transform: coerceOffset,
196
+ }]));
194
197
  /**
195
198
  * Define the delay before the tooltip is displayed.
196
199
  * @default 500
197
200
  */
198
- this.showDelay = input(this.config.showDelay, {
199
- alias: 'ngpTooltipTriggerShowDelay',
200
- transform: numberAttribute,
201
- });
201
+ this.showDelay = input(this.config.showDelay, ...(ngDevMode ? [{ debugName: "showDelay", alias: 'ngpTooltipTriggerShowDelay',
202
+ transform: numberAttribute }] : [{
203
+ alias: 'ngpTooltipTriggerShowDelay',
204
+ transform: numberAttribute,
205
+ }]));
202
206
  /**
203
207
  * Define the delay before the tooltip is hidden.
204
208
  * @default 0
205
209
  */
206
- this.hideDelay = input(this.config.hideDelay, {
207
- alias: 'ngpTooltipTriggerHideDelay',
208
- transform: numberAttribute,
209
- });
210
+ this.hideDelay = input(this.config.hideDelay, ...(ngDevMode ? [{ debugName: "hideDelay", alias: 'ngpTooltipTriggerHideDelay',
211
+ transform: numberAttribute }] : [{
212
+ alias: 'ngpTooltipTriggerHideDelay',
213
+ transform: numberAttribute,
214
+ }]));
210
215
  /**
211
216
  * Define whether the tooltip should flip when there is not enough space for the tooltip.
212
217
  * @default true
213
218
  */
214
- this.flip = input(this.config.flip, {
215
- alias: 'ngpTooltipTriggerFlip',
216
- transform: booleanAttribute,
217
- });
219
+ this.flip = input(this.config.flip, ...(ngDevMode ? [{ debugName: "flip", alias: 'ngpTooltipTriggerFlip',
220
+ transform: booleanAttribute }] : [{
221
+ alias: 'ngpTooltipTriggerFlip',
222
+ transform: booleanAttribute,
223
+ }]));
218
224
  /**
219
225
  * Define the container in which the tooltip should be attached.
220
226
  * @default document.body
221
227
  */
222
- this.container = input(this.config.container, {
223
- alias: 'ngpTooltipTriggerContainer',
224
- });
228
+ this.container = input(this.config.container, ...(ngDevMode ? [{ debugName: "container", alias: 'ngpTooltipTriggerContainer' }] : [{
229
+ alias: 'ngpTooltipTriggerContainer',
230
+ }]));
225
231
  /**
226
232
  * Define whether the tooltip should only show when the trigger element overflows.
227
233
  * @default false
228
234
  */
229
- this.showOnOverflow = input(this.config.showOnOverflow, {
230
- alias: 'ngpTooltipTriggerShowOnOverflow',
231
- transform: booleanAttribute,
232
- });
235
+ this.showOnOverflow = input(this.config.showOnOverflow, ...(ngDevMode ? [{ debugName: "showOnOverflow", alias: 'ngpTooltipTriggerShowOnOverflow',
236
+ transform: booleanAttribute }] : [{
237
+ alias: 'ngpTooltipTriggerShowOnOverflow',
238
+ transform: booleanAttribute,
239
+ }]));
233
240
  /**
234
241
  * Provide context to the tooltip. This can be used to pass data to the tooltip content.
235
242
  */
236
- this.context = input(undefined, {
237
- alias: 'ngpTooltipTriggerContext',
238
- });
243
+ this.context = input(undefined, ...(ngDevMode ? [{ debugName: "context", alias: 'ngpTooltipTriggerContext' }] : [{
244
+ alias: 'ngpTooltipTriggerContext',
245
+ }]));
239
246
  /**
240
247
  * Define whether to use the text content of the trigger element as the tooltip content.
241
248
  * When enabled, the tooltip will display the text content of the trigger element.
242
249
  * @default true
243
250
  */
244
- this.useTextContent = input(this.config.useTextContent, {
245
- alias: 'ngpTooltipTriggerUseTextContent',
246
- transform: booleanAttribute,
247
- });
251
+ this.useTextContent = input(this.config.useTextContent, ...(ngDevMode ? [{ debugName: "useTextContent", alias: 'ngpTooltipTriggerUseTextContent',
252
+ transform: booleanAttribute }] : [{
253
+ alias: 'ngpTooltipTriggerUseTextContent',
254
+ transform: booleanAttribute,
255
+ }]));
248
256
  /**
249
257
  * The overlay that manages the tooltip
250
258
  * @internal
251
259
  */
252
- this.overlay = signal(null);
260
+ this.overlay = signal(null, ...(ngDevMode ? [{ debugName: "overlay" }] : []));
253
261
  /**
254
262
  * The unique id of the tooltip.
255
263
  */
256
- this.tooltipId = signal(undefined);
264
+ this.tooltipId = signal(undefined, ...(ngDevMode ? [{ debugName: "tooltipId" }] : []));
257
265
  /**
258
266
  * The open state of the tooltip.
259
267
  * @internal
260
268
  */
261
- this.open = computed(() => this.overlay()?.isOpen() ?? false);
269
+ this.open = computed(() => this.overlay()?.isOpen() ?? false, ...(ngDevMode ? [{ debugName: "open" }] : []));
262
270
  /**
263
271
  * Store the state of the tooltip.
264
272
  * @internal
@@ -313,7 +321,7 @@ class NgpTooltipTrigger {
313
321
  if (!content) {
314
322
  if (!shouldUseTextContent) {
315
323
  if (ngDevMode) {
316
- throw new Error('[ngpTooltipTrigger]: Tooltip must be a string, TemplateRef, or ComponentType. Alternatively, set useTextContent to true if none is provided.');
324
+ console.error('[ngpTooltipTrigger]: Tooltip must be a string, TemplateRef, or ComponentType. Alternatively, set useTextContent to true if none is provided.');
317
325
  }
318
326
  return;
319
327
  }
@@ -354,10 +362,10 @@ class NgpTooltipTrigger {
354
362
  setTooltipId(id) {
355
363
  this.tooltipId.set(id);
356
364
  }
357
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltipTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
358
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpTooltipTrigger, isStandalone: true, selector: "[ngpTooltipTrigger]", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "ngpTooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpTooltipTriggerDisabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpTooltipTriggerPlacement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngpTooltipTriggerOffset", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "ngpTooltipTriggerShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "ngpTooltipTriggerHideDelay", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "ngpTooltipTriggerFlip", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpTooltipTriggerContainer", isSignal: true, isRequired: false, transformFunction: null }, showOnOverflow: { classPropertyName: "showOnOverflow", publicName: "ngpTooltipTriggerShowOnOverflow", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "ngpTooltipTriggerContext", isSignal: true, isRequired: false, transformFunction: null }, useTextContent: { classPropertyName: "useTextContent", publicName: "ngpTooltipTriggerUseTextContent", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "show()", "mouseleave": "hide()", "focus": "show()", "blur": "hide()" }, properties: { "attr.data-open": "open() ? \"\" : null", "attr.data-disabled": "state.disabled() ? \"\" : null", "attr.aria-describedby": "overlay()?.ariaDescribedBy()" } }, providers: [provideTooltipTriggerState()], exportAs: ["ngpTooltipTrigger"], ngImport: i0 }); }
365
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltipTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
366
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpTooltipTrigger, isStandalone: true, selector: "[ngpTooltipTrigger]", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "ngpTooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpTooltipTriggerDisabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpTooltipTriggerPlacement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngpTooltipTriggerOffset", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "ngpTooltipTriggerShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "ngpTooltipTriggerHideDelay", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "ngpTooltipTriggerFlip", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpTooltipTriggerContainer", isSignal: true, isRequired: false, transformFunction: null }, showOnOverflow: { classPropertyName: "showOnOverflow", publicName: "ngpTooltipTriggerShowOnOverflow", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "ngpTooltipTriggerContext", isSignal: true, isRequired: false, transformFunction: null }, useTextContent: { classPropertyName: "useTextContent", publicName: "ngpTooltipTriggerUseTextContent", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "show()", "mouseleave": "hide()", "focus": "show()", "blur": "hide()" }, properties: { "attr.data-open": "open() ? \"\" : null", "attr.data-disabled": "state.disabled() ? \"\" : null", "attr.aria-describedby": "overlay()?.ariaDescribedBy()" } }, providers: [provideTooltipTriggerState()], exportAs: ["ngpTooltipTrigger"], ngImport: i0 }); }
359
367
  }
360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpTooltipTrigger, decorators: [{
368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpTooltipTrigger, decorators: [{
361
369
  type: Directive,
362
370
  args: [{
363
371
  selector: '[ngpTooltipTrigger]',
@@ -373,7 +381,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
373
381
  '(blur)': 'hide()',
374
382
  },
375
383
  }]
376
- }], ctorParameters: () => [] });
384
+ }], ctorParameters: () => [], propDecorators: { tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTrigger", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerDisabled", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerPlacement", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerOffset", required: false }] }], showDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerShowDelay", required: false }] }], hideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerHideDelay", required: false }] }], flip: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerFlip", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerContainer", required: false }] }], showOnOverflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerShowOnOverflow", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerContext", required: false }] }], useTextContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpTooltipTriggerUseTextContent", required: false }] }] } });
377
385
 
378
386
  /**
379
387
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-tooltip.mjs","sources":["../../../../packages/ng-primitives/tooltip/src/config/tooltip-config.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-arrow/tooltip-arrow.ts","../../../../packages/ng-primitives/tooltip/src/tooltip/tooltip.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-text-content/tooltip-text-content.component.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger-state.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger.ts","../../../../packages/ng-primitives/tooltip/src/ng-primitives-tooltip.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\nimport { NgpOffset } from 'ng-primitives/portal';\n\nexport interface NgpTooltipConfig {\n /**\n * Define the offset of the tooltip relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 4\n */\n offset: NgpOffset;\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n placement: Placement;\n\n /**\n * Define the delay before the tooltip is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 500\n */\n hideDelay: number;\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container element or selector in to which the tooltip should be attached.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n\n /**\n * Whether the tooltip should only show when the trigger element overflows.\n * @default false\n */\n showOnOverflow: boolean;\n\n /**\n * Whether to use the text content of the trigger element as the tooltip content.\n * @default true\n */\n useTextContent: boolean;\n}\n\nexport const defaultTooltipConfig: NgpTooltipConfig = {\n offset: 4,\n placement: 'top',\n showDelay: 0,\n hideDelay: 500,\n flip: true,\n container: 'body',\n showOnOverflow: false,\n useTextContent: true,\n};\n\nexport const NgpTooltipConfigToken = new InjectionToken<NgpTooltipConfig>('NgpTooltipConfigToken');\n\n/**\n * Provide the default Tooltip configuration\n * @param config The Tooltip configuration\n * @returns The provider\n */\nexport function provideTooltipConfig(config: Partial<NgpTooltipConfig>): Provider[] {\n return [\n {\n provide: NgpTooltipConfigToken,\n useValue: { ...defaultTooltipConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Tooltip configuration\n * @returns The global Tooltip configuration\n */\nexport function injectTooltipConfig(): NgpTooltipConfig {\n return inject(NgpTooltipConfigToken, { optional: true }) ?? defaultTooltipConfig;\n}\n","import { Directive } from '@angular/core';\nimport { setupOverlayArrow } from 'ng-primitives/portal';\n\n@Directive({\n selector: '[ngpTooltipArrow]',\n exportAs: 'ngpTooltipArrow',\n})\nexport class NgpTooltipArrow {\n constructor() {\n setupOverlayArrow();\n }\n}\n","import { Directive, input } from '@angular/core';\nimport { ngpHoverInteraction } from 'ng-primitives/interactions';\nimport { explicitEffect } from 'ng-primitives/internal';\nimport { injectOverlay } from 'ng-primitives/portal';\n\n/**\n * Apply the `ngpTooltip` directive to an element that represents the tooltip. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpTooltip]',\n exportAs: 'ngpTooltip',\n host: {\n role: 'tooltip',\n '[id]': 'id()',\n '[style.left.px]': 'overlay.position().x',\n '[style.top.px]': 'overlay.position().y',\n '[style.--ngp-tooltip-trigger-width.px]': 'overlay.triggerWidth()',\n '[style.--ngp-tooltip-transform-origin]': 'overlay.transformOrigin()',\n '[attr.data-placement]': 'overlay.finalPlacement()',\n 'data-overlay': '',\n },\n})\nexport class NgpTooltip {\n /**\n * Access the overlay.\n */\n protected readonly overlay = injectOverlay();\n\n /**\n * The unique id of the tooltip.\n */\n readonly id = input(this.overlay.id());\n\n constructor() {\n explicitEffect([this.id], ([id]) => this.overlay.id.set(id));\n\n // if the mouse moves over the tooltip, we want to keep it open\n ngpHoverInteraction({\n hoverStart: () => this.overlay.cancelPendingClose(),\n hoverEnd: () => this.overlay.hide(),\n });\n }\n}\n","import { Component } from '@angular/core';\nimport { injectOverlayContext } from 'ng-primitives/portal';\nimport { NgpTooltip } from '../tooltip/tooltip';\n\n/**\n * Internal component for wrapping string content in tooltip portals\n * @internal\n */\n@Component({\n template: '{{ content() }}',\n hostDirectives: [NgpTooltip],\n host: {\n // Used only for styling, since the host directive isn’t added to the DOM.\n // This acts as the styling entry point.\n ngpTooltip: '',\n },\n})\nexport class NgpTooltipTextContentComponent {\n /**\n * The string content to display\n */\n readonly content = injectOverlayContext();\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpTooltipTrigger } from './tooltip-trigger';\n\n/**\n * The state token for the TooltipTrigger primitive.\n */\nexport const NgpTooltipTriggerStateToken =\n createStateToken<NgpTooltipTrigger<unknown>>('TooltipTrigger');\n\n/**\n * Provides the TooltipTrigger state.\n */\nexport const provideTooltipTriggerState = createStateProvider(NgpTooltipTriggerStateToken);\n\n/**\n * Injects the TooltipTrigger state.\n */\nexport const injectTooltipTriggerState = createStateInjector<NgpTooltipTrigger<unknown>>(\n NgpTooltipTriggerStateToken,\n);\n\n/**\n * The TooltipTrigger state registration function.\n */\nexport const tooltipTriggerState = createState(NgpTooltipTriggerStateToken);\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n Signal,\n signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { setupOverflowListener } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n coerceOffset,\n NgpOffset,\n NgpOffsetInput,\n} from 'ng-primitives/portal';\nimport { isString } from 'ng-primitives/utils';\nimport { injectTooltipConfig } from '../config/tooltip-config';\nimport { NgpTooltipTextContentComponent } from '../tooltip-text-content/tooltip-text-content.component';\nimport { provideTooltipTriggerState, tooltipTriggerState } from './tooltip-trigger-state';\n\ntype TooltipInput<T> = NgpOverlayContent<T> | string | null | undefined;\n\n/**\n * Apply the `ngpTooltipTrigger` directive to an element that triggers the tooltip to show.\n */\n@Directive({\n selector: '[ngpTooltipTrigger]',\n exportAs: 'ngpTooltipTrigger',\n providers: [provideTooltipTriggerState()],\n host: {\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '[attr.aria-describedby]': 'overlay()?.ariaDescribedBy()',\n '(mouseenter)': 'show()',\n '(mouseleave)': 'hide()',\n '(focus)': 'show()',\n '(blur)': 'hide()',\n },\n})\nexport class NgpTooltipTrigger<T = null> implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the view container reference.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the global tooltip configuration.\n */\n private readonly config = injectTooltipConfig();\n\n /**\n * Access the tooltip template ref.\n */\n readonly tooltip = input<NgpOverlayContent<T> | string | null, TooltipInput<T>>(null, {\n alias: 'ngpTooltipTrigger',\n transform: (value: TooltipInput<T>) => (value && !isString(value) ? value : null),\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpTooltipTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<NgpTooltipPlacement>(this.config.placement, {\n alias: 'ngpTooltipTriggerPlacement',\n });\n\n /**\n * Define the offset of the tooltip relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n alias: 'ngpTooltipTriggerOffset',\n transform: coerceOffset,\n });\n\n /**\n * Define the delay before the tooltip is displayed.\n * @default 500\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpTooltipTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpTooltipTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpTooltipTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the tooltip should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpTooltipTriggerContainer',\n });\n\n /**\n * Define whether the tooltip should only show when the trigger element overflows.\n * @default false\n */\n readonly showOnOverflow = input<boolean, BooleanInput>(this.config.showOnOverflow, {\n alias: 'ngpTooltipTriggerShowOnOverflow',\n transform: booleanAttribute,\n });\n\n /**\n * Provide context to the tooltip. This can be used to pass data to the tooltip content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpTooltipTriggerContext',\n });\n\n /**\n * Define whether to use the text content of the trigger element as the tooltip content.\n * When enabled, the tooltip will display the text content of the trigger element.\n * @default true\n */\n readonly useTextContent = input<boolean, BooleanInput>(this.config.useTextContent, {\n alias: 'ngpTooltipTriggerUseTextContent',\n transform: booleanAttribute,\n });\n\n /**\n * The overlay that manages the tooltip\n * @internal\n */\n readonly overlay = signal<NgpOverlay<T | string> | null>(null);\n\n /**\n * The unique id of the tooltip.\n */\n readonly tooltipId = signal<string | undefined>(undefined);\n\n /**\n * The open state of the tooltip.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * Determine if the trigger element has overflow.\n */\n private readonly hasOverflow: Signal<boolean>;\n\n /**\n * Store the state of the tooltip.\n * @internal\n */\n readonly state = tooltipTriggerState<NgpTooltipTrigger<T>>(this);\n\n constructor() {\n this.hasOverflow = setupOverflowListener(this.trigger.nativeElement, {\n disabled: computed(() => !this.state.showOnOverflow()),\n });\n }\n\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Show the tooltip.\n */\n show(): void {\n // If the trigger is disabled, do not show the tooltip\n if (this.state.disabled() || this.open()) {\n // we mark this as show again to stop it dismissing\n this.overlay()?.cancelPendingClose();\n return;\n }\n\n // if we should only show when there is overflow, check if the trigger has overflow\n if (this.state.showOnOverflow() && !this.hasOverflow()) {\n // If the trigger does not have overflow, do not show the tooltip\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n this.overlay()?.show();\n }\n\n /**\n * Hide the tooltip.\n */\n hide(): void {\n // If the trigger is disabled, do nothing\n if (this.state.disabled()) {\n return;\n }\n\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the tooltip\n */\n private createOverlay(): void {\n // Determine the content and context based on useTextContent setting\n const shouldUseTextContent = this.state.useTextContent();\n let content = this.state.tooltip();\n let context: Signal<T | string | undefined> = this.state.context;\n\n if (!content) {\n if (!shouldUseTextContent) {\n if (ngDevMode) {\n throw new Error(\n '[ngpTooltipTrigger]: Tooltip must be a string, TemplateRef, or ComponentType. Alternatively, set useTextContent to true if none is provided.',\n );\n }\n\n return;\n }\n\n const textContent = this.trigger.nativeElement.textContent?.trim() || '';\n if (ngDevMode && !textContent) {\n console.warn(\n '[ngpTooltipTrigger]: useTextContent is enabled but trigger element has no text content',\n );\n return;\n }\n content = NgpTooltipTextContentComponent;\n context = signal(textContent);\n } else if (isString(content)) {\n context = signal(content);\n content = NgpTooltipTextContentComponent;\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T | string> = {\n content,\n triggerElement: this.trigger.nativeElement,\n injector: this.injector,\n context,\n container: this.state.container(),\n placement: this.state.placement,\n offset: this.state.offset(),\n flip: this.state.flip(),\n showDelay: this.state.showDelay(),\n hideDelay: this.state.hideDelay(),\n closeOnEscape: true,\n closeOnOutsideClick: true,\n viewContainerRef: this.viewContainerRef,\n };\n\n // Create the overlay instance\n this.overlay.set(createOverlay(config));\n }\n\n /**\n * Set the tooltip id.\n */\n setTooltipId(id: string): void {\n this.tooltipId.set(id);\n }\n}\n\nexport type NgpTooltipPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAuDO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,cAAc,EAAE,IAAI;CACrB;AAEM,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC;AAElG;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAAiC,EAAA;IACpE,OAAO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AsB,EAAE,8BAA8B;AACtD,wBAAA,yBAAyB,EAAE,8BAA8B;AACzD,wBAAA,cAAc,EAAE,QAAQ;AACxB,wBAAA,cAAc,EAAE,QAAQ;AACxB,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,QAAQ,EAAE,QAAQ;AACnB,qBAAA;AACF,iBAAA;;;AChDD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-tooltip.mjs","sources":["../../../../packages/ng-primitives/tooltip/src/config/tooltip-config.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-arrow/tooltip-arrow.ts","../../../../packages/ng-primitives/tooltip/src/tooltip/tooltip.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-text-content/tooltip-text-content.component.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger-state.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger.ts","../../../../packages/ng-primitives/tooltip/src/ng-primitives-tooltip.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\nimport { NgpOffset } from 'ng-primitives/portal';\n\nexport interface NgpTooltipConfig {\n /**\n * Define the offset of the tooltip relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 4\n */\n offset: NgpOffset;\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n placement: Placement;\n\n /**\n * Define the delay before the tooltip is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 500\n */\n hideDelay: number;\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container element or selector in to which the tooltip should be attached.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n\n /**\n * Whether the tooltip should only show when the trigger element overflows.\n * @default false\n */\n showOnOverflow: boolean;\n\n /**\n * Whether to use the text content of the trigger element as the tooltip content.\n * @default true\n */\n useTextContent: boolean;\n}\n\nexport const defaultTooltipConfig: NgpTooltipConfig = {\n offset: 4,\n placement: 'top',\n showDelay: 0,\n hideDelay: 500,\n flip: true,\n container: 'body',\n showOnOverflow: false,\n useTextContent: true,\n};\n\nexport const NgpTooltipConfigToken = new InjectionToken<NgpTooltipConfig>('NgpTooltipConfigToken');\n\n/**\n * Provide the default Tooltip configuration\n * @param config The Tooltip configuration\n * @returns The provider\n */\nexport function provideTooltipConfig(config: Partial<NgpTooltipConfig>): Provider[] {\n return [\n {\n provide: NgpTooltipConfigToken,\n useValue: { ...defaultTooltipConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Tooltip configuration\n * @returns The global Tooltip configuration\n */\nexport function injectTooltipConfig(): NgpTooltipConfig {\n return inject(NgpTooltipConfigToken, { optional: true }) ?? defaultTooltipConfig;\n}\n","import { Directive } from '@angular/core';\nimport { setupOverlayArrow } from 'ng-primitives/portal';\n\n@Directive({\n selector: '[ngpTooltipArrow]',\n exportAs: 'ngpTooltipArrow',\n})\nexport class NgpTooltipArrow {\n constructor() {\n setupOverlayArrow();\n }\n}\n","import { Directive, input } from '@angular/core';\nimport { ngpHoverInteraction } from 'ng-primitives/interactions';\nimport { explicitEffect } from 'ng-primitives/internal';\nimport { injectOverlay } from 'ng-primitives/portal';\n\n/**\n * Apply the `ngpTooltip` directive to an element that represents the tooltip. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpTooltip]',\n exportAs: 'ngpTooltip',\n host: {\n role: 'tooltip',\n '[id]': 'id()',\n '[style.left.px]': 'overlay.position().x',\n '[style.top.px]': 'overlay.position().y',\n '[style.--ngp-tooltip-trigger-width.px]': 'overlay.triggerWidth()',\n '[style.--ngp-tooltip-transform-origin]': 'overlay.transformOrigin()',\n '[attr.data-placement]': 'overlay.finalPlacement()',\n 'data-overlay': '',\n },\n})\nexport class NgpTooltip {\n /**\n * Access the overlay.\n */\n protected readonly overlay = injectOverlay();\n\n /**\n * The unique id of the tooltip.\n */\n readonly id = input(this.overlay.id());\n\n constructor() {\n explicitEffect([this.id], ([id]) => this.overlay.id.set(id));\n\n // if the mouse moves over the tooltip, we want to keep it open\n ngpHoverInteraction({\n hoverStart: () => this.overlay.cancelPendingClose(),\n hoverEnd: () => this.overlay.hide(),\n });\n }\n}\n","import { Component } from '@angular/core';\nimport { injectOverlayContext } from 'ng-primitives/portal';\nimport { NgpTooltip } from '../tooltip/tooltip';\n\n/**\n * Internal component for wrapping string content in tooltip portals\n * @internal\n */\n@Component({\n template: '{{ content() }}',\n hostDirectives: [NgpTooltip],\n host: {\n // Used only for styling, since the host directive isn’t added to the DOM.\n // This acts as the styling entry point.\n ngpTooltip: '',\n },\n})\nexport class NgpTooltipTextContentComponent {\n /**\n * The string content to display\n */\n readonly content = injectOverlayContext();\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpTooltipTrigger } from './tooltip-trigger';\n\n/**\n * The state token for the TooltipTrigger primitive.\n */\nexport const NgpTooltipTriggerStateToken =\n createStateToken<NgpTooltipTrigger<unknown>>('TooltipTrigger');\n\n/**\n * Provides the TooltipTrigger state.\n */\nexport const provideTooltipTriggerState = createStateProvider(NgpTooltipTriggerStateToken);\n\n/**\n * Injects the TooltipTrigger state.\n */\nexport const injectTooltipTriggerState = createStateInjector<NgpTooltipTrigger<unknown>>(\n NgpTooltipTriggerStateToken,\n);\n\n/**\n * The TooltipTrigger state registration function.\n */\nexport const tooltipTriggerState = createState(NgpTooltipTriggerStateToken);\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n Signal,\n signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { setupOverflowListener } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n coerceOffset,\n NgpOffset,\n NgpOffsetInput,\n} from 'ng-primitives/portal';\nimport { isString } from 'ng-primitives/utils';\nimport { injectTooltipConfig } from '../config/tooltip-config';\nimport { NgpTooltipTextContentComponent } from '../tooltip-text-content/tooltip-text-content.component';\nimport { provideTooltipTriggerState, tooltipTriggerState } from './tooltip-trigger-state';\n\ntype TooltipInput<T> = NgpOverlayContent<T> | string | null | undefined;\n\n/**\n * Apply the `ngpTooltipTrigger` directive to an element that triggers the tooltip to show.\n */\n@Directive({\n selector: '[ngpTooltipTrigger]',\n exportAs: 'ngpTooltipTrigger',\n providers: [provideTooltipTriggerState()],\n host: {\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '[attr.aria-describedby]': 'overlay()?.ariaDescribedBy()',\n '(mouseenter)': 'show()',\n '(mouseleave)': 'hide()',\n '(focus)': 'show()',\n '(blur)': 'hide()',\n },\n})\nexport class NgpTooltipTrigger<T = null> implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the view container reference.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the global tooltip configuration.\n */\n private readonly config = injectTooltipConfig();\n\n /**\n * Access the tooltip template ref.\n */\n readonly tooltip = input<NgpOverlayContent<T> | string | null, TooltipInput<T>>(null, {\n alias: 'ngpTooltipTrigger',\n transform: (value: TooltipInput<T>) => (value && !isString(value) ? value : null),\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpTooltipTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<NgpTooltipPlacement>(this.config.placement, {\n alias: 'ngpTooltipTriggerPlacement',\n });\n\n /**\n * Define the offset of the tooltip relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n alias: 'ngpTooltipTriggerOffset',\n transform: coerceOffset,\n });\n\n /**\n * Define the delay before the tooltip is displayed.\n * @default 500\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpTooltipTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpTooltipTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpTooltipTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the tooltip should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpTooltipTriggerContainer',\n });\n\n /**\n * Define whether the tooltip should only show when the trigger element overflows.\n * @default false\n */\n readonly showOnOverflow = input<boolean, BooleanInput>(this.config.showOnOverflow, {\n alias: 'ngpTooltipTriggerShowOnOverflow',\n transform: booleanAttribute,\n });\n\n /**\n * Provide context to the tooltip. This can be used to pass data to the tooltip content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpTooltipTriggerContext',\n });\n\n /**\n * Define whether to use the text content of the trigger element as the tooltip content.\n * When enabled, the tooltip will display the text content of the trigger element.\n * @default true\n */\n readonly useTextContent = input<boolean, BooleanInput>(this.config.useTextContent, {\n alias: 'ngpTooltipTriggerUseTextContent',\n transform: booleanAttribute,\n });\n\n /**\n * The overlay that manages the tooltip\n * @internal\n */\n readonly overlay = signal<NgpOverlay<T | string> | null>(null);\n\n /**\n * The unique id of the tooltip.\n */\n readonly tooltipId = signal<string | undefined>(undefined);\n\n /**\n * The open state of the tooltip.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * Determine if the trigger element has overflow.\n */\n private readonly hasOverflow: Signal<boolean>;\n\n /**\n * Store the state of the tooltip.\n * @internal\n */\n readonly state = tooltipTriggerState<NgpTooltipTrigger<T>>(this);\n\n constructor() {\n this.hasOverflow = setupOverflowListener(this.trigger.nativeElement, {\n disabled: computed(() => !this.state.showOnOverflow()),\n });\n }\n\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Show the tooltip.\n */\n show(): void {\n // If the trigger is disabled, do not show the tooltip\n if (this.state.disabled() || this.open()) {\n // we mark this as show again to stop it dismissing\n this.overlay()?.cancelPendingClose();\n return;\n }\n\n // if we should only show when there is overflow, check if the trigger has overflow\n if (this.state.showOnOverflow() && !this.hasOverflow()) {\n // If the trigger does not have overflow, do not show the tooltip\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n this.overlay()?.show();\n }\n\n /**\n * Hide the tooltip.\n */\n hide(): void {\n // If the trigger is disabled, do nothing\n if (this.state.disabled()) {\n return;\n }\n\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the tooltip\n */\n private createOverlay(): void {\n // Determine the content and context based on useTextContent setting\n const shouldUseTextContent = this.state.useTextContent();\n let content = this.state.tooltip();\n let context: Signal<T | string | undefined> = this.state.context;\n\n if (!content) {\n if (!shouldUseTextContent) {\n if (ngDevMode) {\n console.error(\n '[ngpTooltipTrigger]: Tooltip must be a string, TemplateRef, or ComponentType. Alternatively, set useTextContent to true if none is provided.',\n );\n }\n\n return;\n }\n\n const textContent = this.trigger.nativeElement.textContent?.trim() || '';\n if (ngDevMode && !textContent) {\n console.warn(\n '[ngpTooltipTrigger]: useTextContent is enabled but trigger element has no text content',\n );\n return;\n }\n content = NgpTooltipTextContentComponent;\n context = signal(textContent);\n } else if (isString(content)) {\n context = signal(content);\n content = NgpTooltipTextContentComponent;\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T | string> = {\n content,\n triggerElement: this.trigger.nativeElement,\n injector: this.injector,\n context,\n container: this.state.container(),\n placement: this.state.placement,\n offset: this.state.offset(),\n flip: this.state.flip(),\n showDelay: this.state.showDelay(),\n hideDelay: this.state.hideDelay(),\n closeOnEscape: true,\n closeOnOutsideClick: true,\n viewContainerRef: this.viewContainerRef,\n };\n\n // Create the overlay instance\n this.overlay.set(createOverlay(config));\n }\n\n /**\n * Set the tooltip id.\n */\n setTooltipId(id: string): void {\n this.tooltipId.set(id);\n }\n}\n\nexport type NgpTooltipPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAuDO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,cAAc,EAAE,IAAI;CACrB;AAEM,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC;AAElG;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAAiC,EAAA;IACpE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,QAAQ,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,EAAE;AACjD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,oBAAoB;AAClF;;MCjFa,eAA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AC;AACzC,oBAAA,IAAI,EAAE;AACJ,wBAAA,kBAAkB,EAAE,oBAAoB;AACxC,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,yBAAyB,EAAE,8BAA8B;AACzD,wBAAA,cAAc,EAAE,QAAQ;AACxB,wBAAA,cAAc,EAAE,QAAQ;AACxB,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,QAAQ,EAAE,QAAQ;AACnB,qBAAA;AACF,iBAAA;;;AChDD;;AAEG;;;;"}
@@ -61,7 +61,7 @@ function controlStatus() {
61
61
  touched: null,
62
62
  pending: null,
63
63
  disabled: null,
64
- });
64
+ }, ...(ngDevMode ? [{ debugName: "status" }] : []));
65
65
  // Fallback if control is not yet available
66
66
  if (!control?.control) {
67
67
  // There is still a chance that the control will be available i.e. after executing OnInit lifecycle hook
@@ -267,7 +267,7 @@ function notNil(value) {
267
267
  * @internal
268
268
  */
269
269
  function onChange(source, fn, options) {
270
- const previousValue = signal(source());
270
+ const previousValue = signal(source(), ...(ngDevMode ? [{ debugName: "previousValue" }] : []));
271
271
  effect(() => {
272
272
  const value = source();
273
273
  if (value !== previousValue()) {
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-utils.mjs","sources":["../../../../packages/ng-primitives/utils/src/forms/providers.ts","../../../../packages/ng-primitives/utils/src/observables/take-until-destroyed.ts","../../../../packages/ng-primitives/utils/src/forms/status.ts","../../../../packages/ng-primitives/utils/src/helpers/attributes.ts","../../../../packages/ng-primitives/utils/src/helpers/disposables.ts","../../../../packages/ng-primitives/utils/src/helpers/unique-id.ts","../../../../packages/ng-primitives/utils/src/helpers/validators.ts","../../../../packages/ng-primitives/utils/src/signals/index.ts","../../../../packages/ng-primitives/utils/src/ng-primitives-utils.ts"],"sourcesContent":["import { ExistingProvider, Type } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * A simple helper function to provide a value accessor for a given type.\n * @param type The type to provide the value accessor for\n */\nexport function provideValueAccessor<T>(type: Type<T>): ExistingProvider {\n return { provide: NG_VALUE_ACCESSOR, useExisting: type, multi: true };\n}\n","/* eslint-disable @nx/workspace-take-until-destroyed */\nimport { DestroyRef } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { EMPTY, MonoTypeOperatorFunction, NEVER, pipe } from 'rxjs';\nimport { catchError, defaultIfEmpty, takeUntil } from 'rxjs/operators';\n\n/**\n * The built-in `takeUntilDestroyed` operator does not handle the case when the component is destroyed before the source observable emits.\n * This operator ensures that the source observable completes gracefully without throwing an error.\n * https://github.com/angular/angular/issues/54527#issuecomment-2098254508\n *\n * @internal\n */\nexport function safeTakeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOperatorFunction<T> {\n return pipe(\n takeUntil(\n NEVER.pipe(\n takeUntilDestroyed(destroyRef),\n catchError(() => EMPTY),\n defaultIfEmpty(null),\n ),\n ),\n );\n}\n","import { DestroyRef, Signal, WritableSignal, afterNextRender, inject, signal } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { safeTakeUntilDestroyed } from '../observables/take-until-destroyed';\n\nexport interface NgpControlStatus {\n valid: boolean | null;\n invalid: boolean | null;\n pristine: boolean | null;\n dirty: boolean | null;\n touched: boolean | null;\n pending: boolean | null;\n disabled: boolean | null;\n}\n\nfunction setStatusSignal(\n control: NgControl | null,\n status: WritableSignal<NgpControlStatus>,\n): void {\n if (!control?.control) {\n return;\n }\n\n status.set({\n valid: control?.control?.valid ?? null,\n invalid: control?.control?.invalid ?? null,\n pristine: control?.control?.pristine ?? null,\n dirty: control?.control?.dirty ?? null,\n touched: control?.control?.touched ?? null,\n pending: control?.control?.pending ?? null,\n disabled: control?.control?.disabled ?? null,\n });\n}\n\nfunction subscribeToControlStatus(\n control: NgControl | null,\n status: WritableSignal<NgpControlStatus>,\n destroyRef?: DestroyRef,\n): void {\n if (!control?.control) {\n return;\n }\n\n control.control.events\n .pipe(safeTakeUntilDestroyed(destroyRef))\n .subscribe(() => setStatusSignal(control, status));\n}\n\n/**\n * A utility function to get the status of an Angular form control as a reactive signal.\n * This function injects the NgControl and returns a signal that reflects the control's status.\n * @internal\n */\nexport function controlStatus(): Signal<NgpControlStatus> {\n const control = inject(NgControl, { optional: true });\n const destroyRef = inject(DestroyRef);\n\n const status = signal<NgpControlStatus>({\n valid: null,\n invalid: null,\n pristine: null,\n dirty: null,\n touched: null,\n pending: null,\n disabled: null,\n });\n\n // Fallback if control is not yet available\n if (!control?.control) {\n // There is still a chance that the control will be available i.e. after executing OnInit lifecycle hook\n // in `formControlName` directive, so we set up an effect to subscribe to the control status\n afterNextRender({\n write: () => {\n // If control is still not available, we do nothing, otherwise we subscribe to the control status\n if (control?.control) {\n subscribeToControlStatus(control, status, destroyRef);\n // We re-set the status to ensure it reflects the current state on initialization\n setStatusSignal(control, status);\n }\n },\n });\n return status;\n }\n\n subscribeToControlStatus(control, status);\n\n return status;\n}\n","import { afterRenderEffect, Signal } from '@angular/core';\n\nexport function booleanAttributeBinding(\n element: HTMLElement,\n attribute: string,\n value: Signal<boolean> | undefined,\n): void {\n if (!value) {\n return;\n }\n\n afterRenderEffect({\n write: () =>\n value() ? element.setAttribute(attribute, '') : element.removeAttribute(attribute),\n });\n}\n","import { DestroyRef, inject } from '@angular/core';\n\n/**\n * Disposable functions are a way to manage timers, intervals, and event listeners\n * that should be cleared when a component is destroyed.\n *\n * This is heavily inspired by Headless UI disposables:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/utils/disposables.ts\n */\nexport function injectDisposables() {\n const destroyRef = inject(DestroyRef);\n let isDestroyed = false;\n\n destroyRef.onDestroy(() => (isDestroyed = true));\n\n return {\n /**\n * Set a timeout that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the timeout\n */\n setTimeout: (callback: () => void, delay: number) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n const id = setTimeout(callback, delay);\n const cleanup = () => clearTimeout(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @param target\n * @param type\n * @param listener\n * @param options\n * @returns A function to clear the interval\n */\n addEventListener: <K extends keyof HTMLElementEventMap>(\n target: EventTarget,\n type: K,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions,\n ) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n target.addEventListener(type, listener as EventListenerOrEventListenerObject, options);\n const cleanup = () =>\n target.removeEventListener(type, listener as EventListenerOrEventListenerObject, options);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the interval\n */\n setInterval: (callback: () => void, delay: number) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n const id = setInterval(callback, delay);\n const cleanup = () => clearInterval(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set a requestAnimationFrame that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @returns A function to clear the requestAnimationFrame\n */\n requestAnimationFrame: (callback: FrameRequestCallback) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n const id = requestAnimationFrame(callback);\n const cleanup = () => cancelAnimationFrame(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n };\n}\n","/**\n * Store a map of unique ids for elements so that there are no collisions.\n */\nconst uniqueIdMap = new Map<string, number>();\n\n/**\n * Generate a unique id for an element\n * @param prefix - The prefix to use for the id\n * @returns The generated id\n */\nexport function uniqueId(prefix: string): string {\n const id = uniqueIdMap.get(prefix) ?? 0;\n uniqueIdMap.set(prefix, id + 1);\n return `${prefix}-${id}`;\n}\n","/**\n * Type validation utilities\n */\n\n/**\n * Checks if a value is a string\n * @param value - The value to check\n * @returns true if the value is a string, false otherwise\n */\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\n/**\n * Checks if a value is a number\n * @param value - The value to check\n * @returns true if the value is a number, false otherwise\n */\nexport function isNumber(value: unknown): value is number {\n return typeof value === 'number';\n}\n\n/**\n * Checks if a value is a boolean\n * @param value - The value to check\n * @returns true if the value is a boolean, false otherwise\n */\nexport function isBoolean(value: unknown): value is boolean {\n return typeof value === 'boolean';\n}\n\n/**\n * Checks if a value is a function\n * @param value - The value to check\n * @returns true if the value is a function, false otherwise\n */\nexport function isFunction(value: unknown): value is CallableFunction {\n return typeof value === 'function';\n}\n\n/**\n * Checks if a value is a plain object (but not null or array)\n * @param value - The value to check\n * @returns true if the value is a plain object, false otherwise\n */\nexport function isObject(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === 'object' && !Array.isArray(value);\n}\n\n/**\n * Checks if a value is undefined\n * @param value - The value to check\n * @returns true if the value is undefined, false otherwise\n */\nexport function isUndefined(value: unknown): value is undefined {\n return typeof value === 'undefined';\n}\n\n/**\n * Checks if a value is null or undefined\n * @param value - The value to check\n * @returns true if the value is null or undefined, false otherwise\n */\nexport function isNil(value: unknown): value is null | undefined {\n return isUndefined(value) || value === null;\n}\n\n/**\n * Checks if a value is not null and not undefined\n * @param value - The value to check\n * @returns true if the value is not null and not undefined, false otherwise\n */\nexport function notNil<T>(value: T | null | undefined): value is T {\n return !isNil(value);\n}\n","import { effect, Injector, Signal, signal, untracked } from '@angular/core';\n\n/**\n * Listen for changes to a signal and call a function when the signal changes.\n * @param source\n * @param fn\n * @param options\n * @param options.injector\n * @internal\n */\nexport function onChange<T>(\n source: Signal<T | null | undefined>,\n fn: (value: T | null | undefined, previousValue: T | null | undefined) => void,\n options?: { injector: Injector },\n): void {\n const previousValue = signal(source());\n\n effect(\n () => {\n const value = source();\n if (value !== previousValue()) {\n untracked(() => fn(value, previousValue()));\n previousValue.set(value);\n }\n },\n { injector: options?.injector },\n );\n\n // call the fn with the initial value\n fn(source(), null);\n}\n\n/**\n * Listen for changes to a boolean signal and call one of two functions when the signal changes.\n * @param source\n * @param onTrue\n * @param onFalse\n * @param options\n */\nexport function onBooleanChange(\n source: Signal<boolean>,\n onTrue?: () => void,\n onFalse?: () => void,\n options?: { injector: Injector },\n): void {\n onChange(source, value => (value ? onTrue?.() : onFalse?.()), options);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;AAGG;AACG,SAAU,oBAAoB,CAAI,IAAa,EAAA;AACnD,IAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;AACvE;;ACHA;;;;;;AAMG;AACG,SAAU,sBAAsB,CAAI,UAAuB,EAAA;AAC/D,IAAA,OAAO,IAAI,CACT,SAAS,CACP,KAAK,CAAC,IAAI,CACR,kBAAkB,CAAC,UAAU,CAAC,EAC9B,UAAU,CAAC,MAAM,KAAK,CAAC,EACvB,cAAc,CAAC,IAAI,CAAC,CACrB,CACF,CACF;AACH;;ACTA,SAAS,eAAe,CACtB,OAAyB,EACzB,MAAwC,EAAA;AAExC,IAAA,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE;QACrB;IACF;IAEA,MAAM,CAAC,GAAG,CAAC;AACT,QAAA,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI;AACtC,QAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,IAAI;AAC1C,QAAA,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;AAC5C,QAAA,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI;AACtC,QAAA,OAA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AAE,OAAO,EAAE,QAAQ,EAAE,CAChC;;AAGD,IAAA,EAAE,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC;AACpB;AAEA;;;;;;AAMG;AACG,SAAU,eAAe,CAC7B,MAAuB,EACvB,MAAmB,EACnB,OAAoB,EACpB,OAAgC,EAAA;IAEhC,QAAQ,CAAC,MAAM,EAAE,KAAK,KAAK,KAAK,GAAG,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC,EAAE,OAAO,CAAC;AACxE;;AC9CA;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-utils.mjs","sources":["../../../../packages/ng-primitives/utils/src/forms/providers.ts","../../../../packages/ng-primitives/utils/src/observables/take-until-destroyed.ts","../../../../packages/ng-primitives/utils/src/forms/status.ts","../../../../packages/ng-primitives/utils/src/helpers/attributes.ts","../../../../packages/ng-primitives/utils/src/helpers/disposables.ts","../../../../packages/ng-primitives/utils/src/helpers/unique-id.ts","../../../../packages/ng-primitives/utils/src/helpers/validators.ts","../../../../packages/ng-primitives/utils/src/signals/index.ts","../../../../packages/ng-primitives/utils/src/ng-primitives-utils.ts"],"sourcesContent":["import { ExistingProvider, Type } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * A simple helper function to provide a value accessor for a given type.\n * @param type The type to provide the value accessor for\n */\nexport function provideValueAccessor<T>(type: Type<T>): ExistingProvider {\n return { provide: NG_VALUE_ACCESSOR, useExisting: type, multi: true };\n}\n","/* eslint-disable @nx/workspace-take-until-destroyed */\nimport { DestroyRef } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { EMPTY, MonoTypeOperatorFunction, NEVER, pipe } from 'rxjs';\nimport { catchError, defaultIfEmpty, takeUntil } from 'rxjs/operators';\n\n/**\n * The built-in `takeUntilDestroyed` operator does not handle the case when the component is destroyed before the source observable emits.\n * This operator ensures that the source observable completes gracefully without throwing an error.\n * https://github.com/angular/angular/issues/54527#issuecomment-2098254508\n *\n * @internal\n */\nexport function safeTakeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOperatorFunction<T> {\n return pipe(\n takeUntil(\n NEVER.pipe(\n takeUntilDestroyed(destroyRef),\n catchError(() => EMPTY),\n defaultIfEmpty(null),\n ),\n ),\n );\n}\n","import { DestroyRef, Signal, WritableSignal, afterNextRender, inject, signal } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { safeTakeUntilDestroyed } from '../observables/take-until-destroyed';\n\nexport interface NgpControlStatus {\n valid: boolean | null;\n invalid: boolean | null;\n pristine: boolean | null;\n dirty: boolean | null;\n touched: boolean | null;\n pending: boolean | null;\n disabled: boolean | null;\n}\n\nfunction setStatusSignal(\n control: NgControl | null,\n status: WritableSignal<NgpControlStatus>,\n): void {\n if (!control?.control) {\n return;\n }\n\n status.set({\n valid: control?.control?.valid ?? null,\n invalid: control?.control?.invalid ?? null,\n pristine: control?.control?.pristine ?? null,\n dirty: control?.control?.dirty ?? null,\n touched: control?.control?.touched ?? null,\n pending: control?.control?.pending ?? null,\n disabled: control?.control?.disabled ?? null,\n });\n}\n\nfunction subscribeToControlStatus(\n control: NgControl | null,\n status: WritableSignal<NgpControlStatus>,\n destroyRef?: DestroyRef,\n): void {\n if (!control?.control) {\n return;\n }\n\n control.control.events\n .pipe(safeTakeUntilDestroyed(destroyRef))\n .subscribe(() => setStatusSignal(control, status));\n}\n\n/**\n * A utility function to get the status of an Angular form control as a reactive signal.\n * This function injects the NgControl and returns a signal that reflects the control's status.\n * @internal\n */\nexport function controlStatus(): Signal<NgpControlStatus> {\n const control = inject(NgControl, { optional: true });\n const destroyRef = inject(DestroyRef);\n\n const status = signal<NgpControlStatus>({\n valid: null,\n invalid: null,\n pristine: null,\n dirty: null,\n touched: null,\n pending: null,\n disabled: null,\n });\n\n // Fallback if control is not yet available\n if (!control?.control) {\n // There is still a chance that the control will be available i.e. after executing OnInit lifecycle hook\n // in `formControlName` directive, so we set up an effect to subscribe to the control status\n afterNextRender({\n write: () => {\n // If control is still not available, we do nothing, otherwise we subscribe to the control status\n if (control?.control) {\n subscribeToControlStatus(control, status, destroyRef);\n // We re-set the status to ensure it reflects the current state on initialization\n setStatusSignal(control, status);\n }\n },\n });\n return status;\n }\n\n subscribeToControlStatus(control, status);\n\n return status;\n}\n","import { afterRenderEffect, Signal } from '@angular/core';\n\nexport function booleanAttributeBinding(\n element: HTMLElement,\n attribute: string,\n value: Signal<boolean> | undefined,\n): void {\n if (!value) {\n return;\n }\n\n afterRenderEffect({\n write: () =>\n value() ? element.setAttribute(attribute, '') : element.removeAttribute(attribute),\n });\n}\n","import { DestroyRef, inject } from '@angular/core';\n\n/**\n * Disposable functions are a way to manage timers, intervals, and event listeners\n * that should be cleared when a component is destroyed.\n *\n * This is heavily inspired by Headless UI disposables:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/utils/disposables.ts\n */\nexport function injectDisposables() {\n const destroyRef = inject(DestroyRef);\n let isDestroyed = false;\n\n destroyRef.onDestroy(() => (isDestroyed = true));\n\n return {\n /**\n * Set a timeout that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the timeout\n */\n setTimeout: (callback: () => void, delay: number) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n const id = setTimeout(callback, delay);\n const cleanup = () => clearTimeout(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @param target\n * @param type\n * @param listener\n * @param options\n * @returns A function to clear the interval\n */\n addEventListener: <K extends keyof HTMLElementEventMap>(\n target: EventTarget,\n type: K,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions,\n ) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n target.addEventListener(type, listener as EventListenerOrEventListenerObject, options);\n const cleanup = () =>\n target.removeEventListener(type, listener as EventListenerOrEventListenerObject, options);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the interval\n */\n setInterval: (callback: () => void, delay: number) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n const id = setInterval(callback, delay);\n const cleanup = () => clearInterval(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set a requestAnimationFrame that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @returns A function to clear the requestAnimationFrame\n */\n requestAnimationFrame: (callback: FrameRequestCallback) => {\n if (isDestroyed) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return () => {};\n }\n\n const id = requestAnimationFrame(callback);\n const cleanup = () => cancelAnimationFrame(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n };\n}\n","/**\n * Store a map of unique ids for elements so that there are no collisions.\n */\nconst uniqueIdMap = new Map<string, number>();\n\n/**\n * Generate a unique id for an element\n * @param prefix - The prefix to use for the id\n * @returns The generated id\n */\nexport function uniqueId(prefix: string): string {\n const id = uniqueIdMap.get(prefix) ?? 0;\n uniqueIdMap.set(prefix, id + 1);\n return `${prefix}-${id}`;\n}\n","/**\n * Type validation utilities\n */\n\n/**\n * Checks if a value is a string\n * @param value - The value to check\n * @returns true if the value is a string, false otherwise\n */\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\n/**\n * Checks if a value is a number\n * @param value - The value to check\n * @returns true if the value is a number, false otherwise\n */\nexport function isNumber(value: unknown): value is number {\n return typeof value === 'number';\n}\n\n/**\n * Checks if a value is a boolean\n * @param value - The value to check\n * @returns true if the value is a boolean, false otherwise\n */\nexport function isBoolean(value: unknown): value is boolean {\n return typeof value === 'boolean';\n}\n\n/**\n * Checks if a value is a function\n * @param value - The value to check\n * @returns true if the value is a function, false otherwise\n */\nexport function isFunction(value: unknown): value is CallableFunction {\n return typeof value === 'function';\n}\n\n/**\n * Checks if a value is a plain object (but not null or array)\n * @param value - The value to check\n * @returns true if the value is a plain object, false otherwise\n */\nexport function isObject(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === 'object' && !Array.isArray(value);\n}\n\n/**\n * Checks if a value is undefined\n * @param value - The value to check\n * @returns true if the value is undefined, false otherwise\n */\nexport function isUndefined(value: unknown): value is undefined {\n return typeof value === 'undefined';\n}\n\n/**\n * Checks if a value is null or undefined\n * @param value - The value to check\n * @returns true if the value is null or undefined, false otherwise\n */\nexport function isNil(value: unknown): value is null | undefined {\n return isUndefined(value) || value === null;\n}\n\n/**\n * Checks if a value is not null and not undefined\n * @param value - The value to check\n * @returns true if the value is not null and not undefined, false otherwise\n */\nexport function notNil<T>(value: T | null | undefined): value is T {\n return !isNil(value);\n}\n","import { effect, Injector, Signal, signal, untracked } from '@angular/core';\n\n/**\n * Listen for changes to a signal and call a function when the signal changes.\n * @param source\n * @param fn\n * @param options\n * @param options.injector\n * @internal\n */\nexport function onChange<T>(\n source: Signal<T | null | undefined>,\n fn: (value: T | null | undefined, previousValue: T | null | undefined) => void,\n options?: { injector: Injector },\n): void {\n const previousValue = signal(source());\n\n effect(\n () => {\n const value = source();\n if (value !== previousValue()) {\n untracked(() => fn(value, previousValue()));\n previousValue.set(value);\n }\n },\n { injector: options?.injector },\n );\n\n // call the fn with the initial value\n fn(source(), null);\n}\n\n/**\n * Listen for changes to a boolean signal and call one of two functions when the signal changes.\n * @param source\n * @param onTrue\n * @param onFalse\n * @param options\n */\nexport function onBooleanChange(\n source: Signal<boolean>,\n onTrue?: () => void,\n onFalse?: () => void,\n options?: { injector: Injector },\n): void {\n onChange(source, value => (value ? onTrue?.() : onFalse?.()), options);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"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