@primereact/headless 11.0.0-alpha.9 → 11.0.0-rc.2

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 (617) hide show
  1. package/LICENSE.md +45 -0
  2. package/README.md +35 -0
  3. package/accordion/index.d.ts +3 -0
  4. package/accordion/index.mjs +1 -2
  5. package/accordion/useAccordion.d.ts +7 -6
  6. package/accordion/useAccordion.props.d.ts +2 -2
  7. package/accordion/useAccordionPanel.d.ts +46 -0
  8. package/accordion/useAccordionPanel.props.d.ts +2 -0
  9. package/animateonscroll/index.d.ts +1 -0
  10. package/animateonscroll/index.mjs +1 -2
  11. package/animateonscroll/useAnimateOnScroll.d.ts +6 -1
  12. package/animateonscroll/useAnimateOnScroll.props.d.ts +2 -2
  13. package/autocomplete/index.d.ts +3 -0
  14. package/autocomplete/index.mjs +1 -0
  15. package/autocomplete/useAutoComplete.d.ts +198 -0
  16. package/autocomplete/useAutoComplete.props.d.ts +2 -0
  17. package/avatar/index.d.ts +1 -0
  18. package/avatar/index.mjs +1 -2
  19. package/avatar/useAvatar.d.ts +5 -1
  20. package/avatar/useAvatar.props.d.ts +2 -2
  21. package/avatargroup/index.d.ts +3 -0
  22. package/avatargroup/index.mjs +1 -0
  23. package/avatargroup/useAvatarGroup.d.ts +6 -0
  24. package/avatargroup/useAvatarGroup.props.d.ts +2 -0
  25. package/badge/index.d.ts +1 -0
  26. package/badge/index.mjs +1 -2
  27. package/badge/useBadge.d.ts +7 -1
  28. package/badge/useBadge.props.d.ts +2 -2
  29. package/breadcrumb/index.d.ts +1 -0
  30. package/breadcrumb/index.mjs +1 -2
  31. package/breadcrumb/useBreadcrumb.d.ts +18 -2
  32. package/breadcrumb/useBreadcrumb.props.d.ts +2 -2
  33. package/button/index.d.ts +1 -0
  34. package/button/index.mjs +1 -2
  35. package/button/useButton.d.ts +6 -1
  36. package/button/useButton.props.d.ts +2 -2
  37. package/card/index.d.ts +1 -0
  38. package/card/index.mjs +1 -2
  39. package/card/useCard.d.ts +6 -1
  40. package/card/useCard.props.d.ts +2 -2
  41. package/carousel/index.d.ts +1 -0
  42. package/carousel/index.mjs +1 -2
  43. package/carousel/useCarousel.d.ts +117 -8
  44. package/carousel/useCarousel.props.d.ts +2 -2
  45. package/checkbox/index.d.ts +1 -0
  46. package/checkbox/index.mjs +1 -2
  47. package/checkbox/useCheckbox.d.ts +44 -3
  48. package/checkbox/useCheckbox.props.d.ts +2 -2
  49. package/checkboxgroup/index.d.ts +3 -0
  50. package/checkboxgroup/index.mjs +1 -0
  51. package/checkboxgroup/useCheckboxGroup.d.ts +11 -0
  52. package/checkboxgroup/useCheckboxGroup.props.d.ts +2 -0
  53. package/chip/index.d.ts +1 -0
  54. package/chip/index.mjs +1 -2
  55. package/chip/useChip.d.ts +9 -3
  56. package/chip/useChip.props.d.ts +2 -2
  57. package/collapsible/index.d.ts +3 -0
  58. package/collapsible/index.mjs +1 -0
  59. package/collapsible/useCollapsible.d.ts +33 -0
  60. package/collapsible/useCollapsible.props.d.ts +2 -0
  61. package/compare/index.d.ts +3 -0
  62. package/compare/index.mjs +1 -0
  63. package/compare/useCompare.d.ts +2 -0
  64. package/compare/useCompare.props.d.ts +2 -0
  65. package/contextmenu/index.d.ts +1 -0
  66. package/contextmenu/index.mjs +1 -2
  67. package/contextmenu/submenu/index.d.ts +2 -0
  68. package/contextmenu/submenu/index.mjs +1 -0
  69. package/contextmenu/submenu/useContextMenuSubmenu.d.ts +121 -0
  70. package/contextmenu/submenu/useContextMenuSubmenu.props.d.ts +2 -0
  71. package/contextmenu/useContextMenu.d.ts +413 -1
  72. package/contextmenu/useContextMenu.props.d.ts +2 -2
  73. package/datatable/features/index.d.ts +28 -0
  74. package/datatable/features/index.mjs +10 -0
  75. package/datatable/features/useDataTableColumnReorder.d.ts +52 -0
  76. package/datatable/features/useDataTableColumnResize.d.ts +20 -0
  77. package/datatable/features/useDataTableEditing.d.ts +69 -0
  78. package/datatable/features/useDataTableExpansion.d.ts +32 -0
  79. package/datatable/features/useDataTableExport.d.ts +43 -0
  80. package/datatable/features/useDataTableFilter.d.ts +95 -0
  81. package/datatable/features/useDataTableGrouping.d.ts +11 -0
  82. package/datatable/features/useDataTableKeyboard.d.ts +23 -0
  83. package/datatable/features/useDataTablePagination.d.ts +32 -0
  84. package/datatable/features/useDataTableRowReorder.d.ts +42 -0
  85. package/datatable/features/useDataTableSelection.d.ts +28 -0
  86. package/datatable/features/useDataTableSort.d.ts +51 -0
  87. package/datatable/features/useDataTableTree.d.ts +31 -0
  88. package/datatable/index.d.ts +7 -0
  89. package/datatable/index.mjs +10 -0
  90. package/datatable/useDataTable.d.ts +237 -0
  91. package/datatable/useDataTable.props.d.ts +2 -0
  92. package/datatable/useDataTableRow.d.ts +30 -0
  93. package/datatable/useDataTableRow.props.d.ts +2 -0
  94. package/datatable/utils/compareValues.d.ts +20 -0
  95. package/datatable/utils/index.d.ts +1 -0
  96. package/datatable/utils/index.mjs +1 -0
  97. package/dataview/index.d.ts +1 -0
  98. package/dataview/index.mjs +1 -2
  99. package/dataview/useDataView.d.ts +25 -1
  100. package/dataview/useDataView.props.d.ts +2 -2
  101. package/datepicker/index.d.ts +1 -0
  102. package/datepicker/index.mjs +1 -2
  103. package/datepicker/useDatePicker.d.ts +2 -114
  104. package/datepicker/useDatePicker.props.d.ts +2 -2
  105. package/dialog/index.d.ts +1 -0
  106. package/dialog/index.mjs +1 -2
  107. package/dialog/useDialog.d.ts +274 -24
  108. package/dialog/useDialog.props.d.ts +2 -2
  109. package/divider/index.d.ts +1 -0
  110. package/divider/index.mjs +1 -2
  111. package/divider/useDivider.d.ts +14 -1
  112. package/divider/useDivider.props.d.ts +2 -2
  113. package/dnd/index.d.ts +11 -0
  114. package/dnd/index.mjs +1 -0
  115. package/dnd/useDnd.d.ts +45 -0
  116. package/dnd/useDnd.props.d.ts +2 -0
  117. package/dnd/useDraggable.d.ts +14 -0
  118. package/dnd/useDraggable.props.d.ts +2 -0
  119. package/dnd/useDroppable.d.ts +11 -0
  120. package/dnd/useDroppable.props.d.ts +2 -0
  121. package/dnd/useSortable.d.ts +11 -0
  122. package/dnd/useSortable.props.d.ts +2 -0
  123. package/dnd/useSortableContainer.d.ts +24 -0
  124. package/dnd/useSortableContainer.props.d.ts +2 -0
  125. package/drawer/index.d.ts +1 -0
  126. package/drawer/index.mjs +1 -2
  127. package/drawer/useDrawer.d.ts +78 -16
  128. package/drawer/useDrawer.props.d.ts +2 -2
  129. package/fieldset/index.d.ts +1 -0
  130. package/fieldset/index.mjs +1 -2
  131. package/fieldset/useFieldset.d.ts +80 -1
  132. package/fieldset/useFieldset.props.d.ts +2 -2
  133. package/fileupload/index.d.ts +1 -0
  134. package/fileupload/index.mjs +1 -2
  135. package/fileupload/useFileUpload.d.ts +76 -4
  136. package/fileupload/useFileUpload.props.d.ts +2 -2
  137. package/floatlabel/index.d.ts +3 -0
  138. package/floatlabel/index.mjs +1 -0
  139. package/floatlabel/useFloatLabel.d.ts +6 -0
  140. package/floatlabel/useFloatLabel.props.d.ts +2 -0
  141. package/fluid/index.d.ts +1 -0
  142. package/fluid/index.mjs +1 -2
  143. package/fluid/useFluid.d.ts +6 -1
  144. package/fluid/useFluid.props.d.ts +2 -2
  145. package/focustrap/index.d.ts +1 -0
  146. package/focustrap/index.mjs +1 -2
  147. package/focustrap/useFocusTrap.d.ts +16 -3
  148. package/focustrap/useFocusTrap.props.d.ts +2 -2
  149. package/gallery/index.d.ts +1 -0
  150. package/gallery/index.mjs +1 -2
  151. package/gallery/item/index.mjs +1 -2
  152. package/gallery/item/useGalleryItem.d.ts +17 -7
  153. package/gallery/item/useGalleryItem.props.d.ts +2 -2
  154. package/gallery/useGallery.d.ts +159 -10
  155. package/gallery/useGallery.props.d.ts +2 -2
  156. package/iconfield/index.d.ts +1 -0
  157. package/iconfield/index.mjs +1 -2
  158. package/iconfield/useIconField.d.ts +6 -1
  159. package/iconfield/useIconField.props.d.ts +2 -2
  160. package/iftalabel/index.d.ts +3 -0
  161. package/iftalabel/index.mjs +1 -0
  162. package/iftalabel/useIftaLabel.d.ts +6 -0
  163. package/iftalabel/useIftaLabel.props.d.ts +2 -0
  164. package/inplace/index.d.ts +1 -0
  165. package/inplace/index.mjs +1 -2
  166. package/inplace/useInplace.d.ts +36 -5
  167. package/inplace/useInplace.props.d.ts +2 -2
  168. package/{colorpicker → inputcolor}/colorManager.d.ts +4 -3
  169. package/inputcolor/index.d.ts +4 -0
  170. package/inputcolor/index.mjs +1 -0
  171. package/inputcolor/useInputColor.d.ts +119 -0
  172. package/inputcolor/useInputColor.props.d.ts +2 -0
  173. package/inputgroup/index.d.ts +1 -0
  174. package/inputgroup/index.mjs +1 -2
  175. package/inputgroup/useInputGroup.d.ts +6 -1
  176. package/inputgroup/useInputGroup.props.d.ts +2 -2
  177. package/inputnumber/index.d.ts +1 -0
  178. package/inputnumber/index.mjs +1 -2
  179. package/inputnumber/useInputNumber.d.ts +55 -17
  180. package/inputnumber/useInputNumber.props.d.ts +2 -2
  181. package/inputotp/index.d.ts +1 -0
  182. package/inputotp/index.mjs +1 -2
  183. package/inputotp/useInputOtp.d.ts +25 -6
  184. package/inputotp/useInputOtp.props.d.ts +2 -2
  185. package/inputpassword/index.d.ts +3 -0
  186. package/inputpassword/index.mjs +1 -0
  187. package/inputpassword/useInputPassword.d.ts +15 -0
  188. package/inputpassword/useInputPassword.props.d.ts +2 -0
  189. package/inputtags/index.d.ts +1 -0
  190. package/inputtags/index.mjs +1 -2
  191. package/inputtags/useInputTags.d.ts +42 -12
  192. package/inputtags/useInputTags.props.d.ts +2 -2
  193. package/inputtext/index.d.ts +1 -0
  194. package/inputtext/index.mjs +1 -2
  195. package/inputtext/useInputText.d.ts +8 -1
  196. package/inputtext/useInputText.props.d.ts +2 -2
  197. package/knob/index.d.ts +1 -0
  198. package/knob/index.mjs +1 -2
  199. package/knob/useKnob.d.ts +51 -10
  200. package/knob/useKnob.props.d.ts +2 -2
  201. package/label/index.d.ts +1 -0
  202. package/label/index.mjs +1 -2
  203. package/label/useLabel.d.ts +6 -1
  204. package/label/useLabel.props.d.ts +2 -2
  205. package/listbox/index.d.ts +3 -0
  206. package/listbox/index.mjs +1 -2
  207. package/listbox/useListbox.d.ts +56 -18
  208. package/listbox/useListbox.props.d.ts +2 -2
  209. package/listbox/useListboxOption.d.ts +21 -0
  210. package/listbox/useListboxOption.props.d.ts +2 -0
  211. package/menu/checkboxitem/index.d.ts +2 -0
  212. package/menu/checkboxitem/index.mjs +1 -0
  213. package/menu/checkboxitem/useMenuCheckboxItem.d.ts +112 -0
  214. package/menu/checkboxitem/useMenuCheckboxItem.props.d.ts +2 -0
  215. package/menu/index.d.ts +1 -0
  216. package/menu/index.mjs +1 -2
  217. package/menu/radioitem/index.d.ts +2 -0
  218. package/menu/radioitem/index.mjs +1 -0
  219. package/menu/radioitem/useMenuRadioItem.d.ts +106 -0
  220. package/menu/radioitem/useMenuRadioItem.props.d.ts +2 -0
  221. package/menu/submenu/index.d.ts +2 -0
  222. package/menu/submenu/index.mjs +1 -0
  223. package/menu/submenu/useMenuSubmenu.d.ts +97 -0
  224. package/menu/submenu/useMenuSubmenu.props.d.ts +2 -0
  225. package/menu/useMenu.d.ts +215 -22
  226. package/menu/useMenu.props.d.ts +2 -2
  227. package/message/index.d.ts +1 -0
  228. package/message/index.mjs +1 -2
  229. package/message/useMessage.d.ts +13 -1
  230. package/message/useMessage.props.d.ts +2 -2
  231. package/metergroup/index.d.ts +1 -0
  232. package/metergroup/index.mjs +1 -2
  233. package/metergroup/useMeterGroup.d.ts +36 -5
  234. package/metergroup/useMeterGroup.props.d.ts +2 -2
  235. package/navigationmenu/index.d.ts +3 -0
  236. package/navigationmenu/index.mjs +1 -0
  237. package/navigationmenu/useNavigationMenu.d.ts +30 -0
  238. package/navigationmenu/useNavigationMenu.props.d.ts +2 -0
  239. package/orderlist/index.d.ts +3 -0
  240. package/orderlist/index.mjs +1 -0
  241. package/orderlist/useOrderList.d.ts +74 -0
  242. package/orderlist/useOrderList.props.d.ts +2 -0
  243. package/organizationchart/index.d.ts +3 -0
  244. package/organizationchart/index.mjs +1 -0
  245. package/organizationchart/useOrganizationChart.d.ts +69 -0
  246. package/organizationchart/useOrganizationChart.props.d.ts +2 -0
  247. package/overlaybadge/index.d.ts +3 -0
  248. package/overlaybadge/index.mjs +1 -0
  249. package/overlaybadge/useOverlayBadge.d.ts +1 -0
  250. package/overlaybadge/useOverlayBadge.props.d.ts +2 -0
  251. package/package.json +14 -15
  252. package/paginator/index.d.ts +1 -0
  253. package/paginator/index.mjs +1 -2
  254. package/paginator/usePaginator.d.ts +47 -1
  255. package/paginator/usePaginator.props.d.ts +2 -2
  256. package/panel/index.d.ts +1 -0
  257. package/panel/index.mjs +1 -2
  258. package/panel/usePanel.d.ts +76 -8
  259. package/panel/usePanel.props.d.ts +2 -2
  260. package/picklist/index.d.ts +3 -0
  261. package/picklist/index.mjs +1 -0
  262. package/picklist/usePickList.d.ts +153 -0
  263. package/picklist/usePickList.props.d.ts +2 -0
  264. package/popover/index.d.ts +1 -0
  265. package/popover/index.mjs +1 -8
  266. package/popover/usePopover.d.ts +65 -12
  267. package/popover/usePopover.props.d.ts +2 -2
  268. package/portal/index.d.ts +1 -0
  269. package/portal/index.mjs +1 -2
  270. package/portal/usePortal.d.ts +4 -2
  271. package/portal/usePortal.props.d.ts +2 -2
  272. package/positioner/index.d.ts +3 -0
  273. package/positioner/index.mjs +1 -0
  274. package/positioner/usePositioner.anchor.d.ts +7 -0
  275. package/positioner/usePositioner.d.ts +11 -0
  276. package/positioner/usePositioner.fallback.d.ts +13 -0
  277. package/positioner/usePositioner.props.d.ts +2 -0
  278. package/positioner/usePositioner.utils.d.ts +21 -0
  279. package/progressbar/index.d.ts +1 -0
  280. package/progressbar/index.mjs +1 -2
  281. package/progressbar/useProgressBar.d.ts +13 -1
  282. package/progressbar/useProgressBar.props.d.ts +2 -2
  283. package/progressspinner/index.d.ts +1 -0
  284. package/progressspinner/index.mjs +1 -2
  285. package/progressspinner/useProgressSpinner.d.ts +50 -1
  286. package/progressspinner/useProgressSpinner.props.d.ts +2 -2
  287. package/radiobutton/index.d.ts +1 -0
  288. package/radiobutton/index.mjs +1 -2
  289. package/radiobutton/useRadioButton.d.ts +41 -3
  290. package/radiobutton/useRadioButton.props.d.ts +2 -2
  291. package/radiobuttongroup/index.d.ts +3 -0
  292. package/radiobuttongroup/index.mjs +1 -0
  293. package/radiobuttongroup/useRadioButtonGroup.d.ts +11 -0
  294. package/radiobuttongroup/useRadioButtonGroup.props.d.ts +2 -0
  295. package/rating/index.d.ts +3 -0
  296. package/rating/index.mjs +1 -2
  297. package/rating/useRating.d.ts +46 -12
  298. package/rating/useRating.props.d.ts +2 -2
  299. package/rating/useRatingOption.d.ts +69 -0
  300. package/rating/useRatingOption.props.d.ts +2 -0
  301. package/scrollarea/index.d.ts +1 -0
  302. package/scrollarea/index.mjs +1 -2
  303. package/scrollarea/useScrollArea.d.ts +120 -15
  304. package/scrollarea/useScrollArea.props.d.ts +2 -2
  305. package/select/index.d.ts +3 -0
  306. package/select/index.mjs +1 -0
  307. package/select/useSelect.d.ts +190 -0
  308. package/select/useSelect.props.d.ts +2 -0
  309. package/sidebar/index.d.ts +7 -0
  310. package/sidebar/index.mjs +1 -0
  311. package/sidebar/useSidebar.d.ts +143 -0
  312. package/sidebar/useSidebar.props.d.ts +2 -0
  313. package/sidebar/useSidebarLayout.d.ts +24 -0
  314. package/sidebar/useSidebarLayout.props.d.ts +2 -0
  315. package/sidebar/useSidebarMenuItem.d.ts +10 -0
  316. package/sidebar/useSidebarMenuItem.props.d.ts +2 -0
  317. package/skeleton/index.d.ts +1 -0
  318. package/skeleton/index.mjs +1 -2
  319. package/skeleton/useSkeleton.d.ts +7 -1
  320. package/skeleton/useSkeleton.props.d.ts +2 -2
  321. package/slider/index.d.ts +1 -0
  322. package/slider/index.mjs +1 -2
  323. package/slider/useSlider.d.ts +81 -48
  324. package/slider/useSlider.props.d.ts +2 -2
  325. package/speeddial/index.d.ts +1 -0
  326. package/speeddial/index.mjs +1 -2
  327. package/speeddial/useSpeedDial.d.ts +89 -32
  328. package/speeddial/useSpeedDial.props.d.ts +2 -2
  329. package/splitter/index.d.ts +1 -0
  330. package/splitter/index.mjs +1 -2
  331. package/splitter/useSplitter.d.ts +57 -14
  332. package/splitter/useSplitter.props.d.ts +2 -2
  333. package/stepper/index.d.ts +1 -0
  334. package/stepper/index.mjs +1 -2
  335. package/stepper/useStepper.d.ts +47 -2
  336. package/stepper/useStepper.props.d.ts +2 -2
  337. package/styleclass/index.d.ts +1 -0
  338. package/styleclass/index.mjs +1 -2
  339. package/styleclass/useStyleClass.d.ts +5 -1
  340. package/styleclass/useStyleClass.props.d.ts +2 -2
  341. package/tabs/index.d.ts +1 -0
  342. package/tabs/index.mjs +1 -2
  343. package/tabs/useTabs.d.ts +42 -3
  344. package/tabs/useTabs.props.d.ts +2 -2
  345. package/tag/index.d.ts +1 -0
  346. package/tag/index.mjs +1 -2
  347. package/tag/useTag.d.ts +6 -1
  348. package/tag/useTag.props.d.ts +2 -2
  349. package/terminal/index.d.ts +1 -0
  350. package/terminal/index.mjs +1 -2
  351. package/terminal/useTerminal.d.ts +23 -2
  352. package/terminal/useTerminal.props.d.ts +2 -2
  353. package/textarea/index.d.ts +1 -0
  354. package/textarea/index.mjs +1 -2
  355. package/textarea/useTextarea.d.ts +9 -2
  356. package/textarea/useTextarea.props.d.ts +2 -2
  357. package/timeline/index.d.ts +1 -0
  358. package/timeline/index.mjs +1 -2
  359. package/timeline/useTimeline.d.ts +41 -1
  360. package/timeline/useTimeline.props.d.ts +2 -2
  361. package/toast/index.d.ts +1 -1
  362. package/toast/index.mjs +1 -2
  363. package/toast/useToast.d.ts +85 -23
  364. package/toast/useToast.props.d.ts +2 -2
  365. package/toaster/ToastManager.d.ts +14 -0
  366. package/toaster/index.d.ts +4 -0
  367. package/toaster/index.mjs +1 -0
  368. package/toaster/useToaster.d.ts +50 -0
  369. package/toaster/useToaster.props.d.ts +2 -0
  370. package/togglebutton/index.d.ts +1 -0
  371. package/togglebutton/index.mjs +1 -2
  372. package/togglebutton/useToggleButton.d.ts +5 -3
  373. package/togglebutton/useToggleButton.props.d.ts +2 -2
  374. package/togglebuttongroup/index.d.ts +3 -0
  375. package/togglebuttongroup/index.mjs +1 -0
  376. package/togglebuttongroup/useToggleButtonGroup.d.ts +17 -0
  377. package/togglebuttongroup/useToggleButtonGroup.props.d.ts +2 -0
  378. package/toggleswitch/index.d.ts +3 -0
  379. package/toggleswitch/index.mjs +1 -0
  380. package/toggleswitch/useToggleSwitch.d.ts +48 -0
  381. package/toggleswitch/useToggleSwitch.props.d.ts +2 -0
  382. package/toolbar/index.d.ts +1 -0
  383. package/toolbar/index.mjs +1 -2
  384. package/toolbar/useToolbar.d.ts +7 -1
  385. package/toolbar/useToolbar.props.d.ts +2 -2
  386. package/tooltip/index.d.ts +1 -0
  387. package/tooltip/index.mjs +1 -2
  388. package/tooltip/useTooltip.d.ts +43 -24
  389. package/tooltip/useTooltip.props.d.ts +2 -2
  390. package/tooltipmanager/index.d.ts +2 -0
  391. package/tooltipmanager/index.mjs +1 -0
  392. package/tooltipmanager/useTooltipManager.d.ts +12 -0
  393. package/tooltipmanager/useTooltipManager.props.d.ts +2 -0
  394. package/tree/TreeDragDropService.d.ts +13 -5
  395. package/tree/index.d.ts +7 -0
  396. package/tree/index.mjs +1 -2
  397. package/tree/useTree.d.ts +97 -17
  398. package/tree/useTree.props.d.ts +2 -2
  399. package/tree/useTreeDragDrop.d.ts +24 -0
  400. package/tree/useTreeFlatten.d.ts +13 -0
  401. package/tree/useTreeKeyboard.d.ts +18 -0
  402. package/tree/useTreeNode.d.ts +45 -0
  403. package/tree/useTreeNode.props.d.ts +2 -0
  404. package/tree/useTreeSelection.d.ts +31 -0
  405. package/utils/itemKey.d.ts +10 -0
  406. package/LICENSE +0 -21
  407. package/accordion/index.mjs.map +0 -1
  408. package/accordion/useAccordion.test.d.ts +0 -0
  409. package/animateonscroll/index.mjs.map +0 -1
  410. package/animateonscroll/useAnimateOnScroll.test.d.ts +0 -0
  411. package/avatar/index.mjs.map +0 -1
  412. package/avatar/useAvatar.test.d.ts +0 -0
  413. package/badge/index.mjs.map +0 -1
  414. package/badge/useBadge.test.d.ts +0 -0
  415. package/breadcrumb/index.mjs.map +0 -1
  416. package/breadcrumb/useBreadcrumb.test.d.ts +0 -0
  417. package/button/index.mjs.map +0 -1
  418. package/button/useButton.test.d.ts +0 -0
  419. package/card/index.mjs.map +0 -1
  420. package/card/useCard.test.d.ts +0 -0
  421. package/carousel/index.mjs.map +0 -1
  422. package/carousel/useCarousel.test.d.ts +0 -0
  423. package/checkbox/index.mjs.map +0 -1
  424. package/checkbox/useCheckbox.test.d.ts +0 -0
  425. package/chip/index.mjs.map +0 -1
  426. package/chip/useChip.test.d.ts +0 -0
  427. package/colorpicker/index.d.ts +0 -3
  428. package/colorpicker/index.mjs +0 -2
  429. package/colorpicker/index.mjs.map +0 -1
  430. package/colorpicker/input/index.d.ts +0 -2
  431. package/colorpicker/input/index.mjs +0 -2
  432. package/colorpicker/input/index.mjs.map +0 -1
  433. package/colorpicker/input/useColorPickerInput.d.ts +0 -11
  434. package/colorpicker/input/useColorPickerInput.props.d.ts +0 -2
  435. package/colorpicker/input/useColorPickerInput.test.d.ts +0 -0
  436. package/colorpicker/slider/index.d.ts +0 -2
  437. package/colorpicker/slider/index.mjs +0 -2
  438. package/colorpicker/slider/index.mjs.map +0 -1
  439. package/colorpicker/slider/useColorPickerSlider.d.ts +0 -13
  440. package/colorpicker/slider/useColorPickerSlider.props.d.ts +0 -2
  441. package/colorpicker/slider/useColorPickerSlider.test.d.ts +0 -0
  442. package/colorpicker/useColorPicker.d.ts +0 -26
  443. package/colorpicker/useColorPicker.props.d.ts +0 -2
  444. package/colorpicker/useColorPicker.test.d.ts +0 -0
  445. package/commandmenu/index.d.ts +0 -2
  446. package/commandmenu/index.mjs +0 -2
  447. package/commandmenu/index.mjs.map +0 -1
  448. package/commandmenu/useCommandMenu.d.ts +0 -11
  449. package/commandmenu/useCommandMenu.props.d.ts +0 -2
  450. package/commandmenu/useCommandMenu.test.d.ts +0 -0
  451. package/confirmdialog/index.d.ts +0 -2
  452. package/confirmdialog/index.mjs +0 -2
  453. package/confirmdialog/index.mjs.map +0 -1
  454. package/confirmdialog/useConfirmDialog.d.ts +0 -1
  455. package/confirmdialog/useConfirmDialog.props.d.ts +0 -2
  456. package/confirmdialog/useConfirmDialog.test.d.ts +0 -0
  457. package/confirmpopup/index.d.ts +0 -2
  458. package/confirmpopup/index.mjs +0 -2
  459. package/confirmpopup/index.mjs.map +0 -1
  460. package/confirmpopup/useConfirmPopup.d.ts +0 -25
  461. package/confirmpopup/useConfirmPopup.props.d.ts +0 -2
  462. package/confirmpopup/useConfirmPopup.test.d.ts +0 -0
  463. package/contextmenu/index.mjs.map +0 -1
  464. package/contextmenu/useContextMenu.test.d.ts +0 -0
  465. package/dataview/index.mjs.map +0 -1
  466. package/dataview/useDataView.test.d.ts +0 -0
  467. package/datepicker/index.mjs.map +0 -1
  468. package/datepicker/useDatePicker.test.d.ts +0 -0
  469. package/dialog/index.mjs.map +0 -1
  470. package/dialog/useDialog.test.d.ts +0 -0
  471. package/divider/index.mjs.map +0 -1
  472. package/divider/useDivider.test.d.ts +0 -0
  473. package/drawer/index.mjs.map +0 -1
  474. package/drawer/useDrawer.test.d.ts +0 -0
  475. package/fieldset/index.mjs.map +0 -1
  476. package/fieldset/useFieldset.test.d.ts +0 -0
  477. package/fileupload/index.mjs.map +0 -1
  478. package/fileupload/useFileUpload.test.d.ts +0 -0
  479. package/fluid/index.mjs.map +0 -1
  480. package/fluid/useFluid.test.d.ts +0 -0
  481. package/focustrap/index.mjs.map +0 -1
  482. package/focustrap/useFocusTrap.test.d.ts +0 -0
  483. package/gallery/index.mjs.map +0 -1
  484. package/gallery/item/index.mjs.map +0 -1
  485. package/gallery/useGallery.test.d.ts +0 -0
  486. package/iconfield/index.mjs.map +0 -1
  487. package/iconfield/useIconField.test.d.ts +0 -0
  488. package/imagecompare/index.d.ts +0 -2
  489. package/imagecompare/index.mjs +0 -2
  490. package/imagecompare/index.mjs.map +0 -1
  491. package/imagecompare/useImageCompare.d.ts +0 -8
  492. package/imagecompare/useImageCompare.props.d.ts +0 -2
  493. package/imagecompare/useImageCompare.test.d.ts +0 -0
  494. package/inplace/index.mjs.map +0 -1
  495. package/inplace/useInplace.test.d.ts +0 -0
  496. package/inputgroup/index.mjs.map +0 -1
  497. package/inputgroup/useInputGroup.test.d.ts +0 -0
  498. package/inputnumber/index.mjs.map +0 -1
  499. package/inputnumber/useInputNumber.test.d.ts +0 -0
  500. package/inputotp/index.mjs.map +0 -1
  501. package/inputotp/useInputOtp.test.d.ts +0 -0
  502. package/inputtags/index.mjs.map +0 -1
  503. package/inputtags/useInputTags.test.d.ts +0 -0
  504. package/inputtext/index.mjs.map +0 -1
  505. package/inputtext/useInputText.test.d.ts +0 -0
  506. package/knob/index.mjs.map +0 -1
  507. package/knob/useKnob.test.d.ts +0 -0
  508. package/label/index.mjs.map +0 -1
  509. package/label/useLabel.test.d.ts +0 -0
  510. package/listbox/index.mjs.map +0 -1
  511. package/listbox/useListbox.test.d.ts +0 -0
  512. package/menu/index.mjs.map +0 -1
  513. package/menu/sub/index.d.ts +0 -2
  514. package/menu/sub/index.mjs +0 -2
  515. package/menu/sub/index.mjs.map +0 -1
  516. package/menu/sub/useMenuSub.d.ts +0 -19
  517. package/menu/sub/useMenuSub.props.d.ts +0 -2
  518. package/menu/useMenu.test.d.ts +0 -0
  519. package/message/index.mjs.map +0 -1
  520. package/message/useMessage.test.d.ts +0 -0
  521. package/metergroup/index.mjs.map +0 -1
  522. package/metergroup/useMeterGroup.test.d.ts +0 -0
  523. package/orgchart/index.d.ts +0 -2
  524. package/orgchart/index.mjs +0 -2
  525. package/orgchart/index.mjs.map +0 -1
  526. package/orgchart/useOrgChart.d.ts +0 -20
  527. package/orgchart/useOrgChart.props.d.ts +0 -2
  528. package/orgchart/useOrgChart.test.d.ts +0 -0
  529. package/overlay/index.d.ts +0 -2
  530. package/overlay/index.mjs +0 -2
  531. package/overlay/index.mjs.map +0 -1
  532. package/overlay/useOverlay.d.ts +0 -16
  533. package/overlay/useOverlay.props.d.ts +0 -2
  534. package/overlay/useOverlay.test.d.ts +0 -0
  535. package/paginator/index.mjs.map +0 -1
  536. package/paginator/usePaginator.test.d.ts +0 -0
  537. package/panel/index.mjs.map +0 -1
  538. package/panel/usePanel.test.d.ts +0 -0
  539. package/password/index.d.ts +0 -2
  540. package/password/index.mjs +0 -2
  541. package/password/index.mjs.map +0 -1
  542. package/password/usePassword.d.ts +0 -35
  543. package/password/usePassword.props.d.ts +0 -2
  544. package/password/usePassword.test.d.ts +0 -0
  545. package/placer/index.d.ts +0 -2
  546. package/placer/index.mjs +0 -2
  547. package/placer/index.mjs.map +0 -1
  548. package/placer/usePlacer.d.ts +0 -12
  549. package/placer/usePlacer.props.d.ts +0 -2
  550. package/placer/usePlacer.test.d.ts +0 -0
  551. package/popover/index.mjs.map +0 -1
  552. package/popover/usePopover.test.d.ts +0 -0
  553. package/portal/index.mjs.map +0 -1
  554. package/portal/usePortal.test.d.ts +0 -0
  555. package/progressbar/index.mjs.map +0 -1
  556. package/progressbar/useProgressBar.test.d.ts +0 -0
  557. package/progressspinner/index.mjs.map +0 -1
  558. package/progressspinner/useProgressSpinner.test.d.ts +0 -0
  559. package/radiobutton/index.mjs.map +0 -1
  560. package/radiobutton/useRadioButton.test.d.ts +0 -0
  561. package/rating/index.mjs.map +0 -1
  562. package/rating/useRating.test.d.ts +0 -0
  563. package/scrollarea/index.mjs.map +0 -1
  564. package/scrollarea/useScrollArea.test.d.ts +0 -0
  565. package/skeleton/index.mjs.map +0 -1
  566. package/skeleton/useSkeleton.test.d.ts +0 -0
  567. package/slider/index.mjs.map +0 -1
  568. package/slider/useSlider.test.d.ts +0 -0
  569. package/speeddial/index.mjs.map +0 -1
  570. package/speeddial/useSpeedDial.test.d.ts +0 -0
  571. package/splitter/index.mjs.map +0 -1
  572. package/splitter/useSplitter.test.d.ts +0 -0
  573. package/stepper/index.mjs.map +0 -1
  574. package/stepper/useStepper.test.d.ts +0 -0
  575. package/styleclass/index.mjs.map +0 -1
  576. package/styleclass/useStyleClass.test.d.ts +0 -0
  577. package/switch/index.d.ts +0 -2
  578. package/switch/index.mjs +0 -2
  579. package/switch/index.mjs.map +0 -1
  580. package/switch/useSwitch.d.ts +0 -7
  581. package/switch/useSwitch.props.d.ts +0 -2
  582. package/switch/useSwitch.test.d.ts +0 -0
  583. package/tabs/index.mjs.map +0 -1
  584. package/tabs/useTabs.test.d.ts +0 -0
  585. package/tag/index.mjs.map +0 -1
  586. package/tag/useTag.test.d.ts +0 -0
  587. package/terminal/index.mjs.map +0 -1
  588. package/terminal/useTerminal.test.d.ts +0 -0
  589. package/textarea/index.mjs.map +0 -1
  590. package/textarea/useTextarea.test.d.ts +0 -0
  591. package/timeline/index.mjs.map +0 -1
  592. package/timeline/useTimeline.test.d.ts +0 -0
  593. package/toast/index.mjs.map +0 -1
  594. package/toast/item/index.css +0 -2
  595. package/toast/item/index.css.map +0 -1
  596. package/toast/item/index.d.ts +0 -2
  597. package/toast/item/index.mjs +0 -2
  598. package/toast/item/index.mjs.map +0 -1
  599. package/toast/item/useToastItem.d.ts +0 -25
  600. package/toast/item/useToastItem.props.d.ts +0 -2
  601. package/toast/item/useToastItem.test.d.ts +0 -0
  602. package/toast/toastStore.d.ts +0 -40
  603. package/toast/useToast.test.d.ts +0 -0
  604. package/togglebutton/index.mjs.map +0 -1
  605. package/togglebutton/useToggle.test.d.ts +0 -0
  606. package/toolbar/index.mjs.map +0 -1
  607. package/toolbar/useToolbar.test.d.ts +0 -0
  608. package/tooltip/group/index.d.ts +0 -2
  609. package/tooltip/group/index.mjs +0 -2
  610. package/tooltip/group/index.mjs.map +0 -1
  611. package/tooltip/group/useTooltipGroup.d.ts +0 -9
  612. package/tooltip/group/useTooltipGroup.props.d.ts +0 -2
  613. package/tooltip/group/useTooltipGroup.test.d.ts +0 -0
  614. package/tooltip/index.mjs.map +0 -1
  615. package/tooltip/useTooltip.test.d.ts +0 -0
  616. package/tree/index.mjs.map +0 -1
  617. package/tree/useTree.test.d.ts +0 -0
@@ -1,40 +0,0 @@
1
- import type { ToastId, ToastPromiseType, ToastType } from '@primereact/types/shared/toast';
2
- import type * as React from 'react';
3
- declare class ToastManager {
4
- private toasts;
5
- private listeners;
6
- constructor();
7
- private emit;
8
- snapshot: () => ToastType[];
9
- subscribe: (listener: () => void) => (() => void);
10
- private commit;
11
- private ensureId;
12
- add: (toast: ToastType) => ToastId;
13
- create(toast: ToastType): ToastId;
14
- update: (id: ToastId, updates: Partial<ToastType>) => void;
15
- dismiss: (id?: ToastId) => ToastId | undefined;
16
- remove: (id: ToastId) => ToastId | undefined;
17
- clear: (group?: string) => void;
18
- get: (id: ToastId) => ToastType | undefined;
19
- success: (toast: ToastType) => ToastId;
20
- danger: (toast: ToastType) => ToastId;
21
- warn: (toast: ToastType) => ToastId;
22
- info: (toast: ToastType) => ToastId;
23
- loading: (toast: ToastType) => ToastId;
24
- custom: (jsx: React.ReactElement | ((id: ToastId) => React.ReactElement), options?: Partial<ToastType>) => ToastId;
25
- promise: <T>(promise: Promise<T>, options: ToastPromiseType<T>) => Promise<T>;
26
- }
27
- export declare const ToastStore: ToastManager;
28
- export declare const toast: ((toast: ToastType) => ToastId) & {
29
- success: (toast: ToastType) => ToastId;
30
- danger: (toast: ToastType) => ToastId;
31
- warn: (toast: ToastType) => ToastId;
32
- info: (toast: ToastType) => ToastId;
33
- loading: (toast: ToastType) => ToastId;
34
- dismiss: (id?: ToastId) => ToastId | undefined;
35
- custom: (jsx: React.ReactElement | ((id: ToastId) => React.ReactElement), options?: Partial<ToastType>) => ToastId;
36
- remove: (id: ToastId) => ToastId | undefined;
37
- clear: (group?: string) => void;
38
- promise: <T>(promise: Promise<T>, options: ToastPromiseType<T>) => Promise<T>;
39
- };
40
- export {};
File without changes
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/togglebutton/useToggleButton.ts","../../src/togglebutton/useToggleButton.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { useControlledState } from '@primereact/hooks/use-controlled-state';\nimport type { useToggleButtonChangeEvent } from '@primereact/types/shared/togglebutton';\nimport { defaultProps } from './useToggleButton.props';\n\nexport const useToggleButton = withHeadless({\n name: 'useToggleButton',\n defaultProps,\n setup({ props }) {\n const [pressedState, setPressedState] = useControlledState({\n value: props.pressed,\n defaultValue: props.defaultPressed ?? false,\n onChange: props.onPressedChange\n });\n\n const state = {\n pressed: pressedState\n };\n\n // methods\n const onChange = (event: useToggleButtonChangeEvent) => {\n const computedPressed = !pressedState;\n\n setPressedState([\n computedPressed,\n {\n originalEvent: event,\n pressed: computedPressed\n }\n ]);\n };\n\n return {\n state,\n // methods\n onChange\n };\n }\n});\n","import type { useToggleButtonProps } from '@primereact/types/shared/togglebutton';\n\nexport const defaultProps: useToggleButtonProps = {\n pressed: undefined,\n defaultPressed: undefined,\n onPressedChange: undefined\n};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,sBAAAC,MAA0B,yCCC5B,IAAMC,EAAqC,CAC9C,QAAS,OACT,eAAgB,OAChB,gBAAiB,MACrB,EDDO,IAAMC,EAAkBC,EAAa,CACxC,KAAM,kBACN,aAAAC,EACA,MAAM,CAAE,MAAAC,CAAM,EAAG,CARrB,IAAAC,EASQ,GAAM,CAACC,EAAcC,CAAe,EAAIC,EAAmB,CACvD,MAAOJ,EAAM,QACb,cAAcC,EAAAD,EAAM,iBAAN,KAAAC,EAAwB,GACtC,SAAUD,EAAM,eACpB,CAAC,EAmBD,MAAO,CACH,MAlBU,CACV,QAASE,CACb,EAkBI,SAfcG,GAAsC,CACpD,IAAMC,EAAkB,CAACJ,EAEzBC,EAAgB,CACZG,EACA,CACI,cAAeD,EACf,QAASC,CACb,CACJ,CAAC,CACL,CAMA,CACJ,CACJ,CAAC","names":["withHeadless","useControlledState","defaultProps","useToggleButton","withHeadless","defaultProps","props","_a","pressedState","setPressedState","useControlledState","event","computedPressed"]}
File without changes
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/toolbar/useToolbar.ts","../../src/toolbar/useToolbar.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { defaultProps } from './useToolbar.props';\n\nexport const useToolbar = withHeadless({\n name: 'useToolbar',\n defaultProps\n});\n","import type { useToolbarProps } from '@primereact/types/shared/toolbar';\n\nexport const defaultProps: useToolbarProps = {};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BCEtB,IAAMC,EAAgC,CAAC,EDCvC,IAAMC,EAAaC,EAAa,CACnC,KAAM,aACN,aAAAC,CACJ,CAAC","names":["withHeadless","defaultProps","useToolbar","withHeadless","defaultProps"]}
File without changes
@@ -1,2 +0,0 @@
1
- export * from './useTooltipGroup';
2
- export * from './useTooltipGroup.props';
@@ -1,2 +0,0 @@
1
- import{withHeadless as a}from"@primereact/core/headless";import{useUnmountEffect as T}from"@primereact/hooks/use-unmount-effect";import*as o from"react";var s={timeout:700,skipTimeout:300};var G=a({name:"useTooltipGroup",defaultProps:s,setup:({props:m})=>{let{timeout:c,skipTimeout:p}=m,e=o.useRef(null),u=o.useRef(null),t=o.useRef(null),r=o.useRef("delayed"),n=()=>{u.current&&(clearTimeout(u.current),u.current=null)},f=(i,l)=>{n(),e.current===null?r.current=t.current?"instant":"delayed":e.current===l?r.current="normal":r.current="instant",e.current=l,t.current===null&&(t.current=window.setTimeout(()=>{r.current="normal",t.current=null},p||300)),u.current=window.setTimeout(()=>{u.current=null,e.current=null,r.current="delayed",i==null||i()},c||700)};return T(()=>{n(),e.current&&(e.current=null),t.current&&(clearTimeout(t.current),t.current=null)}),{state:{get timeoutState(){return r.current},get prevTooltip(){return e.current}},scheduleTimeout:f,clearTimers:n}}});export{s as defaultProps,G as useTooltipGroup};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/tooltip/group/useTooltipGroup.ts","../../../src/tooltip/group/useTooltipGroup.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { useUnmountEffect } from '@primereact/hooks/use-unmount-effect';\nimport { TimeoutState } from '@primereact/types/shared/tooltip';\nimport * as React from 'react';\nimport { defaultProps } from './useTooltipGroup.props';\n\nexport const useTooltipGroup = withHeadless({\n name: 'useTooltipGroup',\n defaultProps,\n setup: ({ props }) => {\n const { timeout, skipTimeout } = props;\n const prevTooltip = React.useRef<null | HTMLElement | undefined>(null);\n const timeoutRef = React.useRef<number | null>(null);\n const skipTimeoutRef = React.useRef<number | null>(null);\n const timeoutStateRef = React.useRef<TimeoutState>('delayed');\n\n const clearTimers = () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n };\n\n const scheduleTimeout = (callback?: () => void, currentTooltip?: HTMLElement) => {\n clearTimers();\n\n if (prevTooltip.current === null) {\n timeoutStateRef.current = skipTimeoutRef.current ? 'instant' : 'delayed';\n } else if (prevTooltip.current === currentTooltip) {\n timeoutStateRef.current = 'normal';\n } else {\n timeoutStateRef.current = 'instant';\n }\n\n prevTooltip.current = currentTooltip;\n\n if (skipTimeoutRef.current === null) {\n skipTimeoutRef.current = window.setTimeout(() => {\n timeoutStateRef.current = 'normal';\n skipTimeoutRef.current = null;\n }, skipTimeout || 300);\n }\n\n timeoutRef.current = window.setTimeout(() => {\n timeoutRef.current = null;\n prevTooltip.current = null;\n timeoutStateRef.current = 'delayed';\n callback?.();\n }, timeout || 700);\n };\n\n useUnmountEffect(() => {\n clearTimers();\n\n if (prevTooltip.current) {\n prevTooltip.current = null;\n }\n\n if (skipTimeoutRef.current) {\n clearTimeout(skipTimeoutRef.current);\n skipTimeoutRef.current = null;\n }\n });\n\n const state = {\n get timeoutState() {\n return timeoutStateRef.current;\n },\n get prevTooltip() {\n return prevTooltip.current;\n }\n };\n\n return {\n state,\n scheduleTimeout,\n clearTimers\n };\n }\n});\n","import type { useTooltipGroupProps } from '@primereact/types/shared/tooltip';\n\nexport const defaultProps: useTooltipGroupProps = {\n timeout: 700,\n skipTimeout: 300\n};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,oBAAAC,MAAwB,uCAEjC,UAAYC,MAAW,QCDhB,IAAMC,EAAqC,CAC9C,QAAS,IACT,YAAa,GACjB,EDCO,IAAMC,EAAkBC,EAAa,CACxC,KAAM,kBACN,aAAAC,EACA,MAAO,CAAC,CAAE,MAAAC,CAAM,IAAM,CAClB,GAAM,CAAE,QAAAC,EAAS,YAAAC,CAAY,EAAIF,EAC3BG,EAAoB,SAAuC,IAAI,EAC/DC,EAAmB,SAAsB,IAAI,EAC7CC,EAAuB,SAAsB,IAAI,EACjDC,EAAwB,SAAqB,SAAS,EAEtDC,EAAc,IAAM,CAClBH,EAAW,UACX,aAAaA,EAAW,OAAO,EAC/BA,EAAW,QAAU,KAE7B,EAEMI,EAAkB,CAACC,EAAuBC,IAAiC,CAC7EH,EAAY,EAERJ,EAAY,UAAY,KACxBG,EAAgB,QAAUD,EAAe,QAAU,UAAY,UACxDF,EAAY,UAAYO,EAC/BJ,EAAgB,QAAU,SAE1BA,EAAgB,QAAU,UAG9BH,EAAY,QAAUO,EAElBL,EAAe,UAAY,OAC3BA,EAAe,QAAU,OAAO,WAAW,IAAM,CAC7CC,EAAgB,QAAU,SAC1BD,EAAe,QAAU,IAC7B,EAAGH,GAAe,GAAG,GAGzBE,EAAW,QAAU,OAAO,WAAW,IAAM,CACzCA,EAAW,QAAU,KACrBD,EAAY,QAAU,KACtBG,EAAgB,QAAU,UAC1BG,GAAA,MAAAA,GACJ,EAAGR,GAAW,GAAG,CACrB,EAEA,OAAAU,EAAiB,IAAM,CACnBJ,EAAY,EAERJ,EAAY,UACZA,EAAY,QAAU,MAGtBE,EAAe,UACf,aAAaA,EAAe,OAAO,EACnCA,EAAe,QAAU,KAEjC,CAAC,EAWM,CACH,MAVU,CACV,IAAI,cAAe,CACf,OAAOC,EAAgB,OAC3B,EACA,IAAI,aAAc,CACd,OAAOH,EAAY,OACvB,CACJ,EAII,gBAAAK,EACA,YAAAD,CACJ,CACJ,CACJ,CAAC","names":["withHeadless","useUnmountEffect","React","defaultProps","useTooltipGroup","withHeadless","defaultProps","props","timeout","skipTimeout","prevTooltip","timeoutRef","skipTimeoutRef","timeoutStateRef","clearTimers","scheduleTimeout","callback","currentTooltip","useUnmountEffect"]}
@@ -1,9 +0,0 @@
1
- import { TimeoutState } from '@primereact/types/shared/tooltip';
2
- export declare const useTooltipGroup: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/tooltip").useTooltipGroupProps, unknown, {
3
- state: {
4
- readonly timeoutState: TimeoutState;
5
- readonly prevTooltip: HTMLElement | null | undefined;
6
- };
7
- scheduleTimeout: (callback?: () => void, currentTooltip?: HTMLElement) => void;
8
- clearTimers: () => void;
9
- }>;
@@ -1,2 +0,0 @@
1
- import type { useTooltipGroupProps } from '@primereact/types/shared/tooltip';
2
- export declare const defaultProps: useTooltipGroupProps;
File without changes
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/tooltip/useTooltip.ts","../../../primereact/src/tooltip/group/TooltipGroup.tsx","../../../primereact/src/base/index.ts","../../../primereact/src/tooltip/group/TooltipGroup.context.ts","../../../primereact/src/tooltip/group/TooltipGroup.props.ts","../../src/tooltip/useTooltip.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { usePlacer } from '@primereact/headless/placer';\nimport { useUnmountEffect } from '@primereact/hooks/use-unmount-effect';\nimport { isClient } from '@primeuix/utils/dom';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { useTooltipGroupContext } from 'primereact/tooltip/group';\nimport * as React from 'react';\nimport { defaultProps } from './useTooltip.props';\n\ntype Point = { x: number; y: number };\n\nexport const useTooltip = withHeadless({\n name: 'useTooltip',\n defaultProps,\n setup: ({ props, $primereact }) => {\n const { showDelayDuration, hideDelayDuration, autoHide, autoZIndex, baseZIndex, disabled, defaultOpen, open, onOpenChange, closeOnEscape, side, align, sideOffset, alignOffset } = props;\n const placer = usePlacer({ side, align, sideOffset, alignOffset });\n const tooltipgroup = useTooltipGroupContext();\n const [visibleState, setVisibleState] = React.useState<boolean>(false);\n const [lifeState, setLifeState] = React.useState<boolean>(false);\n const [shouldAnimateOnEnter, setShouldAnimateOnEnter] = React.useState<boolean>(false);\n const [shouldAnimateOnLeave, setShouldAnimateOnLeave] = React.useState<boolean>(false);\n const showTimeout = React.useRef<number | null>(null);\n const hideTimeout = React.useRef<number | null>(null);\n const outsideClickListener = React.useRef<((event: Event) => void) | null>(null);\n const selfClick = React.useRef<boolean>(false);\n const documentKeydownListener = React.useRef<((event: KeyboardEvent) => void) | null>(null);\n const documentScrollListener = React.useRef<((event: Event) => void) | null>(null);\n const documentResizeListener = React.useRef<((event: Event) => void) | null>(null);\n const contentRef = React.useRef<HTMLDivElement | null>(null);\n const safePolygonRef = React.useRef<Point[] | null>(null);\n\n const state = {\n visible: visibleState,\n life: lifeState,\n shouldAnimateOnEnter,\n shouldAnimateOnLeave\n };\n\n const getTrigger = () => {\n if (placer?.anchorRef?.current && placer?.anchorRef?.current instanceof HTMLElement) {\n return placer?.anchorRef?.current;\n }\n\n // @ts-expect-error - Temporary fix for elementRef property access\n return placer?.anchorRef?.current?.elementRef?.current;\n };\n\n const getContainer = () => {\n if (placer?.containerRef?.current && placer?.containerRef?.current instanceof HTMLElement) {\n return placer?.containerRef?.current;\n }\n\n // @ts-expect-error - Temporary fix for elementRef property access\n return placer?.containerRef?.current?.elementRef?.current;\n };\n\n const getArrow = () => {\n if (placer?.arrowRef?.current && placer?.arrowRef?.current instanceof HTMLElement) {\n return placer?.arrowRef?.current;\n }\n\n // @ts-expect-error - Temporary fix for elementRef property access\n return placer?.arrowRef?.current?.elementRef?.current;\n };\n\n const getContent = () => {\n if (contentRef.current && contentRef.current instanceof HTMLElement) {\n return contentRef.current;\n }\n\n // @ts-expect-error - Temporary fix for elementRef property access\n return contentRef.current?.elementRef?.current;\n };\n\n const clearTimers = () => {\n if (showTimeout.current) {\n clearTimeout(showTimeout.current);\n showTimeout.current = null;\n }\n\n if (hideTimeout.current) {\n clearTimeout(hideTimeout.current);\n hideTimeout.current = null;\n }\n };\n\n const show = (forceInstant = false) => {\n if (disabled) return;\n\n clearTimers();\n\n tooltipgroup?.clearTimers?.();\n const timeoutState = tooltipgroup?.state?.timeoutState;\n\n setShouldAnimateOnLeave(false);\n setShouldAnimateOnEnter(!forceInstant && timeoutState !== 'instant');\n\n const showDelay = timeoutState === 'instant' || timeoutState === 'normal' ? 0 : showDelayDuration || 400;\n\n if (forceInstant || showDelay === 0) {\n setVisibleState(true);\n setLifeState(true);\n onOpenChange?.({ value: true });\n } else {\n showTimeout.current = window.setTimeout(() => {\n setVisibleState(true);\n setLifeState(true);\n onOpenChange?.({ value: true });\n }, showDelay);\n }\n };\n\n const hide = (forceInstant = false) => {\n clearTimers();\n const timeoutState = tooltipgroup?.state?.timeoutState;\n\n setShouldAnimateOnEnter(false);\n setShouldAnimateOnLeave(!forceInstant && timeoutState !== 'instant');\n\n tooltipgroup?.scheduleTimeout(() => {}, getTrigger() || undefined);\n\n const hideDelay = timeoutState === 'instant' || timeoutState === 'normal' ? 0 : hideDelayDuration || 0;\n\n if (forceInstant || hideDelay === 0) {\n setVisibleState(false);\n onOpenChange?.({ value: false });\n } else {\n hideTimeout.current = window.setTimeout(() => {\n setVisibleState(false);\n onOpenChange?.({ value: false });\n }, hideDelay);\n }\n };\n\n const onTriggerClick = () => hide(true);\n const onTriggerPointerDown = () => hide(true);\n\n const onTriggerPointerEnter = () => {\n show();\n safePolygonRef.current = null;\n };\n\n const onTriggerFocus = () => show(true);\n const onTriggerBlur = () => hide();\n\n const onTriggerPointerLeave = () => {\n if (autoHide) {\n hide();\n } else {\n onPointerLeave();\n }\n };\n\n const bindTriggerListeners = () => {\n const trigger = getTrigger();\n\n if (!trigger || !isClient()) return;\n\n trigger.addEventListener('click', onTriggerClick);\n trigger.addEventListener('pointerdown', onTriggerPointerDown);\n trigger.addEventListener('pointerenter', onTriggerPointerEnter);\n trigger.addEventListener('focus', onTriggerFocus);\n trigger.addEventListener('blur', onTriggerBlur);\n trigger.addEventListener('pointerleave', onTriggerPointerLeave);\n };\n\n const unbindTriggerListeners = () => {\n const trigger = getTrigger();\n\n if (!trigger || !isClient()) return;\n\n trigger.removeEventListener('click', onTriggerClick);\n trigger.removeEventListener('pointerdown', onTriggerPointerDown);\n trigger.removeEventListener('pointerenter', onTriggerPointerEnter);\n trigger.removeEventListener('focus', onTriggerFocus);\n trigger.removeEventListener('blur', onTriggerBlur);\n trigger.removeEventListener('pointerleave', onTriggerPointerLeave);\n };\n\n const onContainerPointerEnter = () => {\n if (autoHide) return;\n\n show(true);\n safePolygonRef.current = null;\n };\n\n const onContainerFocus = () => show(true);\n const onContainerBlur = () => hide();\n\n const onContainerPointerLeave = () => {\n if (autoHide) return;\n\n onPointerLeave();\n };\n\n const bindContainerListeners = () => {\n const container = getContainer();\n\n if (!container || !isClient()) return;\n\n container.addEventListener('pointerenter', onContainerPointerEnter);\n container.addEventListener('focus', onContainerFocus);\n container.addEventListener('blur', onContainerBlur);\n container.addEventListener('pointerleave', onContainerPointerLeave);\n };\n\n const unbindContainerListeners = () => {\n const container = getContainer();\n\n if (!container || !isClient()) return;\n\n container.removeEventListener('pointerenter', onContainerPointerEnter);\n container.removeEventListener('focus', onContainerFocus);\n container.removeEventListener('blur', onContainerBlur);\n container.removeEventListener('pointerleave', onContainerPointerLeave);\n };\n\n const sortPointsClockwise = (points: Point[]): Point[] => {\n const center = {\n x: points.reduce((sum, p) => sum + p.x, 0) / points.length,\n y: points.reduce((sum, p) => sum + p.y, 0) / points.length\n };\n\n return [...points].sort((a, b) => {\n const angleA = Math.atan2(a.y - center.y, a.x - center.x);\n const angleB = Math.atan2(b.y - center.y, b.x - center.x);\n\n return angleA - angleB;\n });\n };\n\n const createSafePolygon = (): Point[] | undefined => {\n const trigger = getTrigger();\n const container = getContainer();\n\n if (!trigger || !container) return;\n\n const triggerRect = trigger.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n const points = [];\n\n switch (placer?.state?.effectiveSide) {\n case 'top':\n points.push({ x: triggerRect.left, y: triggerRect.top }, { x: triggerRect.right, y: triggerRect.top }, { x: containerRect.left, y: containerRect.bottom }, { x: containerRect.right, y: containerRect.bottom });\n break;\n case 'bottom':\n points.push({ x: triggerRect.left, y: triggerRect.bottom }, { x: triggerRect.right, y: triggerRect.bottom }, { x: containerRect.left, y: containerRect.top }, { x: containerRect.right, y: containerRect.top });\n break;\n case 'left':\n points.push({ x: triggerRect.left, y: triggerRect.top }, { x: triggerRect.left, y: triggerRect.bottom }, { x: containerRect.right, y: containerRect.top }, { x: containerRect.right, y: containerRect.bottom });\n break;\n case 'right':\n points.push({ x: triggerRect.right, y: triggerRect.top }, { x: triggerRect.right, y: triggerRect.bottom }, { x: containerRect.left, y: containerRect.top }, { x: containerRect.left, y: containerRect.bottom });\n break;\n }\n\n return sortPointsClockwise(points);\n };\n\n const isPointInPolygon = (point: Point, polygon: Point[] | null) => {\n if (!polygon) return false;\n\n const { x, y } = point;\n let inside = false;\n\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x,\n yi = polygon[i].y;\n const xj = polygon[j].x,\n yj = polygon[j].y;\n\n const intersect = yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi + 0.0000001) + xi;\n\n if (intersect) inside = !inside;\n }\n\n return inside;\n };\n\n const onPointerLeave = () => {\n const container = getContainer();\n\n if (!container) {\n safePolygonRef.current = null;\n hide(true);\n } else {\n safePolygonRef.current = createSafePolygon() || null;\n }\n };\n\n const onPointerMove = (event: PointerEvent) => {\n if (autoHide) return;\n\n const point = { x: event.clientX, y: event.clientY };\n const currentTarget = event.target as HTMLElement;\n const trigger = getTrigger();\n const container = getContainer();\n const arrow = getArrow();\n\n if (!trigger || !container) return;\n\n if (isPointInPolygon(point, safePolygonRef.current) || trigger.contains(currentTarget) || container.contains(currentTarget) || (arrow && arrow.contains(currentTarget))) return;\n else {\n hide();\n safePolygonRef.current = null;\n }\n };\n\n const bindDocumentListeners = () => {\n document.addEventListener('pointermove', onPointerMove);\n };\n\n const unbindDocumentListeners = () => {\n document.removeEventListener('pointermove', onPointerMove);\n };\n\n const onEnter = () => {\n const container = getContainer();\n\n if (!container) return;\n\n //addStyle(container, { opacity: '' });\n };\n\n const onBeforeEnter = () => {\n const container = getContainer();\n\n if (!container) return;\n\n placer?.applyPlacement();\n bindContainerListeners();\n bindOutsideClickListener();\n bindScrollListener();\n bindResizeListener();\n bindDocumentListeners();\n\n if (autoZIndex) {\n ZIndex.set('tooltip', container, (baseZIndex ?? 0) + ($primereact.config?.zIndex?.tooltip ?? 1100));\n }\n\n if (closeOnEscape) {\n bindDocumentKeyDownListener();\n }\n };\n\n const onLeave = () => {\n unbindContainerListeners();\n unbindOutsideClickListener();\n unbindScrollListener();\n unbindResizeListener();\n unbindDocumentKeyDownListener();\n unbindDocumentListeners();\n //hide(true);\n };\n\n const onContentAfterLeave = () => {\n setLifeState(false);\n };\n\n const onContentEnter = () => {\n const content = getContent();\n\n if (!content) return;\n\n //addStyle(content, { opacity: '1', transform: 'scale(1)' });\n };\n\n const onContentLeave = () => {\n const content = getContent();\n\n if (!content) return;\n\n //addStyle(content, { opacity: '0', transform: 'scale(0.95)' });\n };\n\n const bindOutsideClickListener = () => {\n if (!outsideClickListener.current && isClient()) {\n outsideClickListener.current = (event: Event) => {\n const clickEvent = event as MouseEvent;\n const container = getContainer();\n\n if (visibleState && !(clickEvent.target === container || container?.contains(clickEvent.target as Node))) {\n hide(true);\n }\n\n selfClick.current = false;\n };\n\n document.addEventListener('click', outsideClickListener.current);\n }\n };\n\n const unbindOutsideClickListener = () => {\n if (outsideClickListener.current) {\n document.removeEventListener('click', outsideClickListener.current);\n outsideClickListener.current = null;\n selfClick.current = false;\n }\n };\n\n const bindDocumentKeyDownListener = () => {\n if (!documentKeydownListener.current) {\n documentKeydownListener.current = (event: KeyboardEvent) => {\n if (event.code === 'Escape' && closeOnEscape) {\n hide(true);\n }\n };\n\n window.document.addEventListener('keydown', documentKeydownListener.current);\n }\n };\n\n const unbindDocumentKeyDownListener = () => {\n if (documentKeydownListener.current) {\n window.document.removeEventListener('keydown', documentKeydownListener.current);\n documentKeydownListener.current = null;\n }\n };\n\n const bindScrollListener = () => {\n if (!documentScrollListener.current) {\n documentScrollListener.current = () => {\n if (!visibleState) return;\n\n hide(true);\n };\n\n window.document.addEventListener('scroll', documentScrollListener.current);\n }\n };\n\n const unbindScrollListener = () => {\n if (documentScrollListener.current) {\n window.document.removeEventListener('scroll', documentScrollListener.current);\n documentScrollListener.current = null;\n }\n };\n\n const bindResizeListener = () => {\n if (!documentResizeListener.current) {\n documentResizeListener.current = () => {\n if (!visibleState) return;\n\n hide(true);\n };\n\n window.document.addEventListener('resize', documentResizeListener.current);\n }\n };\n\n const unbindResizeListener = () => {\n if (documentResizeListener.current) {\n window.document.removeEventListener('resize', documentResizeListener.current);\n documentResizeListener.current = null;\n }\n };\n\n // Effects\n React.useEffect(() => {\n if (disabled) return;\n\n if (defaultOpen || open) {\n setTimeout(() => {\n show();\n }, 0);\n }\n }, [defaultOpen, open, disabled]);\n\n React.useEffect(() => {\n if (!disabled) {\n bindTriggerListeners();\n }\n }, [placer?.anchorRef?.current, disabled]);\n\n useUnmountEffect(() => {\n clearTimers();\n unbindTriggerListeners();\n unbindContainerListeners();\n\n const container = getContainer();\n\n if (autoZIndex && container) {\n ZIndex.clear(container);\n }\n });\n\n return {\n state,\n placer,\n show,\n hide,\n onEnter,\n onBeforeEnter,\n onLeave,\n onContentAfterLeave,\n onContentEnter,\n onContentLeave,\n contentRef\n };\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { useTooltipGroup } from '@primereact/headless/tooltip/group';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { TooltipGroupProvider } from './TooltipGroup.context';\nimport { defaultGroupProps } from './TooltipGroup.props';\n\nexport const TooltipGroup = withComponent({\n name: 'TooltipGroup',\n defaultProps: defaultGroupProps,\n setup(instance) {\n const tooltipgroup = useTooltipGroup(instance.inProps);\n\n return tooltipgroup;\n },\n render(instance) {\n const { props, ptmi } = instance;\n\n const rootProps = mergeProps(ptmi('root'));\n\n return (\n <TooltipGroupProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </TooltipGroupProvider>\n );\n }\n});\n","import { withComponent as withComponentInCore } from '@primereact/core/component';\nimport { styles as baseStyles } from '@primereact/styles/base';\nimport type { withComponentOptions } from '@primereact/types/core';\nimport type { StylesOptions } from '@primereact/types/styles';\n\nexport const withComponent = <IProps, DProps, Exposes extends Record<PropertyKey, unknown> = Record<PropertyKey, unknown>, Styles = StylesOptions, CData = Record<string, unknown>>({\n name = 'UnknownComponent',\n defaultProps,\n styles = {\n ...baseStyles,\n name: 'global'\n } as Styles,\n components,\n setup,\n render\n}: withComponentOptions<IProps, DProps, Exposes, Styles, CData>) => {\n return withComponentInCore<IProps, DProps, Exposes, Styles, CData>({\n name,\n defaultProps,\n styles,\n components,\n setup,\n render\n });\n};\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { TooltipGroupInstance } from '@primereact/types/shared/tooltip';\n\nexport const [TooltipGroupProvider, useTooltipGroupContext] = createOptionalContext<TooltipGroupInstance>();\n","import * as HeadlessTooltipGroup from '@primereact/headless/tooltip/group';\nimport type { TooltipGroupProps } from '@primereact/types/shared/tooltip';\nimport * as React from 'react';\n\nexport const defaultGroupProps: TooltipGroupProps = {\n ...HeadlessTooltipGroup.defaultProps,\n as: React.Fragment\n};\n","import type { useTooltipProps } from '@primereact/types/shared/tooltip';\n\nexport const defaultProps: useTooltipProps = {\n showDelayDuration: 700,\n hideDelayDuration: 0,\n autoZIndex: true,\n baseZIndex: 0,\n containerRef: undefined,\n triggerRef: undefined,\n open: false,\n onOpenChange: undefined,\n defaultOpen: false,\n closeOnEscape: true,\n side: 'top',\n sideOffset: 0,\n align: 'center',\n alignOffset: 0,\n autoHide: false,\n disabled: false\n};\n"],"mappings":"6bAAA,OAAS,gBAAAA,OAAoB,4BAC7B,OAAS,aAAAC,OAAiB,8BAC1B,OAAS,oBAAAC,OAAwB,uCACjC,OAAS,YAAAC,MAAgB,sBACzB,OAAS,UAAAC,OAAc,yBCHvB,OAAS,aAAAC,OAAiB,6BAC1B,OAAS,mBAAAC,OAAuB,qCAChC,OAAS,cAAAC,OAAkB,kBCH3B,OAAS,iBAAiBC,OAA2B,6BACrD,OAAS,UAAUC,OAAkB,0BAI9B,IAAMC,GAAgB,CAAuJ,CAChL,KAAAC,EAAO,mBACP,aAAAC,EACA,OAAAC,EAASC,EAAAC,EAAA,GACFC,IADE,CAEL,KAAM,QACV,GACA,WAAAC,EACA,MAAAC,EACA,OAAAC,CACJ,IACWC,GAA4D,CAC/D,KAAAT,EACA,aAAAC,EACA,OAAAC,EACA,WAAAI,EACA,MAAAC,EACA,OAAAC,CACJ,CAAC,EDlBL,UAAYE,MAAW,QELvB,OAAS,yBAAAC,OAA6B,yBAG/B,GAAM,CAACC,GAAsBC,EAAsB,EAAIF,GAA4C,ECH1G,UAAYG,OAA0B,qCAEtC,UAAYC,OAAW,QAEhB,IAAMC,GAAuCC,EAAAC,EAAA,GACxB,iBADwB,CAEhD,GAAU,WACd,GHEO,IAAMC,GAAeC,GAAc,CACtC,KAAM,eACN,aAAcC,GACd,MAAMC,EAAU,CAGZ,OAFqBC,GAAgBD,EAAS,OAAO,CAGzD,EACA,OAAOA,EAAU,CACb,GAAM,CAAE,MAAAE,EAAO,KAAAC,CAAK,EAAIH,EAElBI,EAAYC,GAAWF,EAAK,MAAM,CAAC,EAEzC,OACI,gBAACG,GAAA,CAAqB,MAAON,GACzB,gBAACO,GAAA,CAAU,SAAUP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9Bb,GAELgC,EAAK,EAAI,CACb,EAEA,OAAO,SAAS,iBAAiB,SAAUnB,EAAuB,OAAO,EAEjF,EAEM6E,GAAuB,IAAM,CAC3B7E,EAAuB,UACvB,OAAO,SAAS,oBAAoB,SAAUA,EAAuB,OAAO,EAC5EA,EAAuB,QAAU,KAEzC,EAEMwE,GAAqB,IAAM,CACxBvE,EAAuB,UACxBA,EAAuB,QAAU,IAAM,CAC9Bd,GAELgC,EAAK,EAAI,CACb,EAEA,OAAO,SAAS,iBAAiB,SAAUlB,EAAuB,OAAO,EAEjF,EAEM6E,GAAuB,IAAM,CAC3B7E,EAAuB,UACvB,OAAO,SAAS,oBAAoB,SAAUA,EAAuB,OAAO,EAC5EA,EAAuB,QAAU,KAEzC,EAGA,OAAM,YAAU,IAAM,CACd3B,IAEAC,GAAeC,IACf,WAAW,IAAM,CACbuC,EAAK,CACT,EAAG,CAAC,CAEZ,EAAG,CAACxC,EAAaC,EAAMF,CAAQ,CAAC,EAE1B,YAAU,IAAM,CACbA,GACDsD,GAAqB,CAE7B,EAAG,EAAC5D,GAAAe,GAAA,YAAAA,EAAQ,YAAR,YAAAf,GAAmB,QAASM,CAAQ,CAAC,EAEzC8G,GAAiB,IAAM,CACnBtE,EAAY,EACZiB,GAAuB,EACvBO,GAAyB,EAEzB,IAAMD,EAAY1B,EAAa,EAE3BvC,GAAciE,GACdoC,GAAO,MAAMpC,CAAS,CAE9B,CAAC,EAEM,CACH,MAAAjC,GACA,OAAArB,EACA,KAAAgC,EACA,KAAAI,EACA,QAAAiD,GACA,cAAAC,GACA,QAAAM,GACA,oBAAAK,GACA,eAAAC,GACA,eAAAC,GACA,WAAAhF,CACJ,CACJ,CACJ,CAAC","names":["withHeadless","usePlacer","useUnmountEffect","isClient","ZIndex","Component","useTooltipGroup","mergeProps","withComponentInCore","baseStyles","withComponent","name","defaultProps","styles","__spreadProps","__spreadValues","baseStyles","components","setup","render","withComponentInCore","React","createOptionalContext","TooltipGroupProvider","useTooltipGroupContext","HeadlessTooltipGroup","React","defaultGroupProps","__spreadProps","__spreadValues","TooltipGroup","withComponent","defaultGroupProps","instance","useTooltipGroup","props","ptmi","rootProps","mergeProps","TooltipGroupProvider","Component","React","defaultProps","useTooltip","withHeadless","defaultProps","props","$primereact","_a","showDelayDuration","hideDelayDuration","autoHide","autoZIndex","baseZIndex","disabled","defaultOpen","open","onOpenChange","closeOnEscape","side","align","sideOffset","alignOffset","placer","usePlacer","tooltipgroup","useTooltipGroupContext","visibleState","setVisibleState","lifeState","setLifeState","shouldAnimateOnEnter","setShouldAnimateOnEnter","shouldAnimateOnLeave","setShouldAnimateOnLeave","showTimeout","hideTimeout","outsideClickListener","selfClick","documentKeydownListener","documentScrollListener","documentResizeListener","contentRef","safePolygonRef","state","getTrigger","_b","_c","_d","_e","_f","getContainer","getArrow","getContent","clearTimers","show","forceInstant","timeoutState","showDelay","hide","hideDelay","onTriggerClick","onTriggerPointerDown","onTriggerPointerEnter","onTriggerFocus","onTriggerBlur","onTriggerPointerLeave","onPointerLeave","bindTriggerListeners","trigger","isClient","unbindTriggerListeners","onContainerPointerEnter","onContainerFocus","onContainerBlur","onContainerPointerLeave","bindContainerListeners","container","unbindContainerListeners","sortPointsClockwise","points","center","sum","p","a","b","angleA","angleB","createSafePolygon","triggerRect","containerRect","isPointInPolygon","point","polygon","x","y","inside","j","xi","yi","xj","yj","onPointerMove","event","currentTarget","arrow","bindDocumentListeners","unbindDocumentListeners","onEnter","onBeforeEnter","bindOutsideClickListener","bindScrollListener","bindResizeListener","ZIndex","bindDocumentKeyDownListener","onLeave","unbindOutsideClickListener","unbindScrollListener","unbindResizeListener","unbindDocumentKeyDownListener","onContentAfterLeave","onContentEnter","onContentLeave","clickEvent","useUnmountEffect"]}
File without changes
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/tree/useTree.ts","../../src/tree/TreeDragDropService.ts","../../src/tree/useTree.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { useControlledState } from '@primereact/hooks/use-controlled-state';\nimport type { TreeCheckboxSelectionKeys, TreeExpandedKeys, TreeNode, TreeSelectionKeys } from '@primereact/types/shared/tree';\nimport { find, findSingle, focus, getAttribute, isPrintableCharacter } from '@primeuix/utils';\nimport * as React from 'react';\nimport { TreeDragDropService } from './TreeDragDropService';\nimport { defaultProps } from './useTree.props';\n\nexport const useTree = withHeadless({\n name: 'useTree',\n defaultProps,\n setup({ props, elementRef }) {\n const defaultExpandedKeyRef = React.useRef(props.defaultExpandedKeys ?? {});\n const [expandedKeyState, setExpandedKeyState] = useControlledState({\n value: props.expandedKeys,\n defaultValue: defaultExpandedKeyRef.current,\n onChange: props.onExpandedChange\n });\n\n const defaultSelectedKeyRef = React.useRef(props.defaultSelectionKeys ?? {});\n const [selectedKeyState, setSelectedKeyState] = useControlledState({\n value: props.selectionKeys,\n defaultValue: defaultSelectedKeyRef.current,\n onChange: props.onSelectionChange\n });\n\n const searchTimeout = React.useRef<NodeJS.Timeout | null>(null);\n const searchValue = React.useRef<string>('');\n\n const [dragHoverState, setDragHoverState] = React.useState(false);\n\n React.useEffect(() => {\n if (props.droppableNodes) {\n const dragStopCleanup = TreeDragDropService.onDragStop(() => {\n setDragHoverState(false);\n });\n\n return () => {\n dragStopCleanup();\n };\n }\n }, [props.droppableNodes]);\n\n const state = {\n expandedKey: expandedKeyState,\n selectedKey: selectedKeyState,\n dragHover: dragHoverState\n };\n\n const getNodes = () => {\n return props.value || [];\n };\n\n const onKeyDown = (event: React.KeyboardEvent, node: TreeNode, level: number, expanded: boolean, leaf: boolean) => {\n if (!isSameNode(event)) return;\n\n const metaKey = event.metaKey || event.ctrlKey;\n\n switch (event.code) {\n case 'Tab':\n onTabKey();\n\n break;\n\n case 'ArrowDown':\n onArrowDown(event);\n\n break;\n\n case 'ArrowUp':\n onArrowUp(event);\n\n break;\n\n case 'ArrowRight':\n onArrowRight(event, node, expanded, leaf);\n\n break;\n\n case 'ArrowLeft':\n onArrowLeft(event, node, level, expanded, leaf);\n\n break;\n\n case 'Enter':\n case 'NumpadEnter':\n case 'Space':\n onEnterKey(event, node, expanded);\n\n break;\n\n default:\n if (!metaKey && isPrintableCharacter(event.key)) {\n searchNodes(event.key, node);\n }\n\n break;\n }\n };\n\n const onArrowDown = (event: React.KeyboardEvent) => {\n const target = event.target as HTMLElement;\n const nodeElement = target.getAttribute('data-pc-section') === 'treetoggle' ? target.closest('[role=\"treeitem\"]') : target;\n\n if (!nodeElement) return;\n\n const listElement = nodeElement.children[1];\n\n if (listElement) {\n focusRowChange(nodeElement, listElement.children[0]);\n } else {\n if (nodeElement.nextElementSibling) {\n focusRowChange(nodeElement, nodeElement.nextElementSibling);\n } else {\n const nextSiblingAncestor = findNextSiblingOfAncestor(nodeElement);\n\n if (nextSiblingAncestor) {\n focusRowChange(nodeElement, nextSiblingAncestor);\n }\n }\n }\n\n event.preventDefault();\n };\n\n const onArrowUp = (event: React.KeyboardEvent) => {\n const nodeElement = event.target as HTMLElement;\n\n if (nodeElement.previousElementSibling) {\n focusRowChange(nodeElement, nodeElement.previousElementSibling, findLastVisibleDescendant(nodeElement.previousElementSibling));\n } else {\n const parentNodeElement = getParentNodeElement(nodeElement);\n\n if (parentNodeElement) {\n focusRowChange(nodeElement, parentNodeElement);\n }\n }\n\n event.preventDefault();\n };\n\n const onArrowRight = (event: React.KeyboardEvent, node: TreeNode, expanded: boolean, leaf: boolean) => {\n if (leaf || expanded) return;\n\n (event.currentTarget as HTMLElement).tabIndex = -1;\n\n onNodeToggle(event, node);\n\n setTimeout(() => {\n onArrowDown(event);\n }, 0);\n };\n\n const onArrowLeft = (event: React.KeyboardEvent, node: TreeNode, level: number, expanded: boolean, leaf: boolean) => {\n if (level === 0 && !expanded) {\n return false;\n }\n\n if (expanded && !leaf) {\n onNodeToggle(event, node);\n\n return false;\n }\n\n const target = findBeforeClickableNode(event.currentTarget as HTMLElement);\n\n if (target) {\n focusRowChange(event.currentTarget as HTMLElement, target);\n }\n };\n\n const onEnterKey = (event: React.KeyboardEvent, node: TreeNode, expanded: boolean) => {\n setTabIndexForSelectionMode(event, expanded);\n onClick(event, node, true);\n\n event.preventDefault();\n };\n\n const onTabKey = () => {\n setAllNodesTabIndexes();\n };\n\n const setAllNodesTabIndexes = () => {\n if (!elementRef.current) return;\n\n const nodes = find(elementRef.current as HTMLElement, '[role=\"treeitem\"]');\n\n const hasSelectedNode = [...nodes].some((node) => node.getAttribute('aria-selected') === 'true' || node.getAttribute('aria-checked') === 'true');\n\n [...nodes].forEach((node) => {\n (node as HTMLElement).tabIndex = -1;\n });\n\n if (hasSelectedNode) {\n const selectedNodes = [...nodes].filter((node) => node.getAttribute('aria-selected') === 'true' || node.getAttribute('aria-checked') === 'true');\n\n (selectedNodes[0] as HTMLElement).tabIndex = 0;\n\n return;\n }\n\n ([...nodes][0] as HTMLElement).tabIndex = 0;\n };\n\n const setTabIndexForSelectionMode = (event: React.KeyboardEvent, expanded: boolean) => {\n if (props.selectionMode !== null) {\n const parentElement = (event.currentTarget as HTMLElement).parentElement;\n\n if (!parentElement) return;\n\n const elements = [...find(parentElement, '[role=\"treeitem\"]')];\n\n (event.currentTarget as HTMLElement).tabIndex = expanded ? -1 : 0;\n\n if (elements.every((element) => (element as HTMLElement).tabIndex === -1)) {\n (elements[0] as HTMLElement).tabIndex = 0;\n }\n }\n };\n\n const focusRowChange = (firstFocusableRow: Element, currentFocusedRow: Element, lastVisibleDescendant?: Element) => {\n (firstFocusableRow as HTMLElement).tabIndex = -1;\n (currentFocusedRow as HTMLElement).tabIndex = 0;\n\n focus((lastVisibleDescendant || currentFocusedRow) as HTMLElement);\n };\n\n const findBeforeClickableNode = (node: HTMLElement): Element | null => {\n const ulElement = node.closest('ul');\n\n if (!ulElement) return null;\n\n const parentListElement = ulElement.closest('li');\n\n if (parentListElement) {\n const prevNodeButton = findSingle(parentListElement, 'button');\n\n if (prevNodeButton && (prevNodeButton as HTMLElement).style.visibility !== 'hidden') {\n return parentListElement;\n }\n\n if (node.previousElementSibling) {\n return findBeforeClickableNode(node.previousElementSibling as HTMLElement);\n }\n }\n\n return null;\n };\n\n const findNextSiblingOfAncestor = (nodeElement: Element): Element | null => {\n const parentNodeElement = getParentNodeElement(nodeElement);\n\n if (parentNodeElement) {\n if (parentNodeElement.nextElementSibling) return parentNodeElement.nextElementSibling;\n else return findNextSiblingOfAncestor(parentNodeElement);\n } else {\n return null;\n }\n };\n\n const findLastVisibleDescendant = (nodeElement: Element): Element => {\n const childrenListElement = nodeElement.children[1];\n\n if (childrenListElement) {\n const lastChildElement = childrenListElement.children[childrenListElement.children.length - 1];\n\n return findLastVisibleDescendant(lastChildElement);\n } else {\n return nodeElement;\n }\n };\n\n const getParentNodeElement = (nodeElement: Element): Element | null => {\n const parentElement = nodeElement.parentElement;\n\n if (!parentElement) return null;\n\n const parentNodeElement = parentElement.parentElement;\n\n if (!parentNodeElement) return null;\n\n return getAttribute(parentNodeElement, 'role') === 'treeitem' ? parentNodeElement : null;\n };\n\n const onNodeToggle = (event: React.SyntheticEvent, node: TreeNode) => {\n const currentKeys = (expandedKeyState || {}) as TreeExpandedKeys;\n const nodeKey = node.key;\n let newValue: TreeExpandedKeys;\n\n if (currentKeys[nodeKey]) {\n newValue = { ...currentKeys };\n delete newValue[nodeKey];\n\n if (props.onCollapse) {\n props.onCollapse({\n originalEvent: event,\n node\n });\n }\n\n if (props.onToggle) {\n props.onToggle({\n originalEvent: event,\n node\n });\n }\n } else {\n newValue = { ...currentKeys, [nodeKey]: true };\n\n if (props.onExpand) {\n props.onExpand({\n originalEvent: event,\n node\n });\n }\n\n if (props.onToggle) {\n props.onToggle({\n originalEvent: event,\n node\n });\n }\n }\n\n setExpandedKeyState([\n newValue,\n {\n originalEvent: event,\n value: newValue\n }\n ]);\n };\n\n const onNodeClick = (event: React.MouseEvent | React.KeyboardEvent, node: TreeNode, nodeTouched = false) => {\n if (props.selectionMode != null) {\n const metaSelection = nodeTouched ? false : props.metaKeySelection;\n const newValue = metaSelection ? handleSelectionWithMetaKey(event, node) : handleSelectionWithoutMetaKey(event, node);\n\n setSelectedKeyState([\n newValue,\n {\n originalEvent: event,\n value: newValue\n }\n ]);\n\n if (props.onClick) {\n props.onClick({\n originalEvent: event,\n node\n });\n }\n }\n };\n\n const handleSelectionWithMetaKey = (event: React.MouseEvent | React.KeyboardEvent, node: TreeNode) => {\n const metaKey = (event as React.MouseEvent).metaKey || (event as React.KeyboardEvent).ctrlKey;\n const selected = isNodeSelected(node);\n let _selectionKeys: TreeSelectionKeys = {};\n const currentSelection = (selectedKeyState || {}) as TreeSelectionKeys;\n\n if (selected && metaKey) {\n if (isSingleSelectionMode()) {\n _selectionKeys = {};\n } else {\n _selectionKeys = { ...currentSelection };\n delete _selectionKeys[node.key];\n }\n\n if (props.onUnselect) {\n props.onUnselect({\n originalEvent: event,\n node\n });\n }\n } else {\n if (isSingleSelectionMode()) {\n _selectionKeys = {};\n } else if (isMultipleSelectionMode()) {\n _selectionKeys = !metaKey ? {} : { ...currentSelection };\n }\n\n _selectionKeys[node.key] = true;\n\n if (props.onSelect) {\n props.onSelect({\n originalEvent: event,\n node\n });\n }\n }\n\n return _selectionKeys;\n };\n\n const handleSelectionWithoutMetaKey = (event: React.MouseEvent | React.KeyboardEvent, node: TreeNode) => {\n const selected = isNodeSelected(node);\n let _selectionKeys: TreeSelectionKeys = {};\n const currentSelection = (selectedKeyState || {}) as TreeSelectionKeys;\n const nodeKey = node.key;\n\n if (isSingleSelectionMode()) {\n if (selected) {\n _selectionKeys = {};\n\n if (props.onUnselect) {\n props.onUnselect({\n originalEvent: event,\n node\n });\n }\n } else {\n _selectionKeys = { [nodeKey]: true };\n\n if (props.onSelect) {\n props.onSelect({\n originalEvent: event,\n node\n });\n }\n }\n } else {\n if (selected) {\n _selectionKeys = { ...currentSelection };\n delete _selectionKeys[nodeKey];\n\n if (props.onUnselect) {\n props.onUnselect({\n originalEvent: event,\n node\n });\n }\n } else {\n _selectionKeys = { ...currentSelection, [nodeKey]: true };\n\n if (props.onSelect) {\n props.onSelect({\n originalEvent: event,\n node\n });\n }\n }\n }\n\n return _selectionKeys;\n };\n\n const isSingleSelectionMode = () => {\n return props.selectionMode === 'single';\n };\n\n const isMultipleSelectionMode = () => {\n return props.selectionMode === 'multiple';\n };\n\n const isCheckboxSelectionMode = () => {\n return props.selectionMode === 'checkbox';\n };\n\n const isNodeSelected = (node: TreeNode) => {\n if (!props.selectionMode || !selectedKeyState) return false;\n\n if (isCheckboxSelectionMode()) {\n const checkboxKeys = selectedKeyState as TreeCheckboxSelectionKeys;\n\n return checkboxKeys[node.key]?.checked === true;\n }\n\n const keys = selectedKeyState as TreeSelectionKeys;\n\n return keys[node.key] === true;\n };\n\n const onClick = (event: React.MouseEvent | React.KeyboardEvent, node: TreeNode, nodeTouched = false) => {\n if (isCheckboxSelectionMode()) {\n onCheckboxChange(event, node);\n } else {\n onNodeClick(event, node, nodeTouched);\n }\n };\n\n const onCheckboxChange = (event: React.SyntheticEvent, node: TreeNode) => {\n const currentKeys = (selectedKeyState || {}) as TreeCheckboxSelectionKeys;\n const _selectionKeys = { ...currentKeys };\n const nodeKey = node.key;\n\n if (!node) return;\n\n const isChecked = _selectionKeys[nodeKey]?.checked === true;\n const newCheckState = !isChecked;\n\n if (newCheckState) {\n if (props.onUnselect) {\n props.onUnselect({\n originalEvent: event,\n node\n });\n }\n } else {\n if (props.onSelect) {\n props.onSelect({\n originalEvent: event,\n node\n });\n }\n }\n\n propagateDown(node, newCheckState, _selectionKeys);\n\n let parentNode = findParentNode(getNodes(), nodeKey);\n\n while (parentNode) {\n propagateUp(parentNode, _selectionKeys);\n parentNode = findParentNode(getNodes(), parentNode.key);\n }\n\n setSelectedKeyState([\n _selectionKeys,\n {\n originalEvent: event,\n value: _selectionKeys\n }\n ]);\n };\n\n const propagateDown = (node: TreeNode, check: boolean, selectionKeys: TreeCheckboxSelectionKeys) => {\n if (check && node.selectable !== false) {\n selectionKeys[node.key] = { checked: true, partialChecked: false };\n } else {\n delete selectionKeys[node.key];\n }\n\n if (node.children && node.children.length) {\n for (const child of node.children) {\n propagateDown(child, check, selectionKeys);\n }\n }\n };\n\n const propagateUp = (node: TreeNode, selectionKeys: TreeCheckboxSelectionKeys): TreeCheckboxSelectionKeys => {\n if (!node.children || node.children.length === 0) {\n return selectionKeys;\n }\n\n let checkedChildCount = 0;\n let childPartialSelected = false;\n\n for (const child of node.children) {\n if (selectionKeys[child.key]?.checked) {\n checkedChildCount++;\n } else if (selectionKeys[child.key]?.partialChecked) {\n childPartialSelected = true;\n }\n }\n\n if (checkedChildCount === node.children.length) {\n selectionKeys[node.key] = { checked: true, partialChecked: false };\n } else {\n delete selectionKeys[node.key];\n\n if (childPartialSelected || (checkedChildCount > 0 && checkedChildCount !== node.children.length)) {\n selectionKeys[node.key] = { checked: false, partialChecked: true };\n }\n }\n\n return selectionKeys;\n };\n\n const findParentNode = (nodes: TreeNode[], childKey: string, parent: TreeNode | null = null): TreeNode | null => {\n for (const node of nodes) {\n if (node.key === childKey) {\n return parent;\n }\n\n if (node.children) {\n const found = findParentNode(node.children, childKey, node);\n\n if (found !== null) return found;\n }\n }\n\n return null;\n };\n\n const searchNodes = (char: string, currentNode: TreeNode) => {\n searchValue.current = (searchValue.current || '') + char;\n\n if (searchTimeout.current) {\n clearTimeout(searchTimeout.current);\n }\n\n if (searchValue.current) {\n if (!elementRef.current) return;\n\n const allTreeItems = [...find(elementRef.current as HTMLElement, '[role=\"treeitem\"]')] as HTMLElement[];\n const currentNodeElement = allTreeItems.find((item) => item.getAttribute('data-node-key') === currentNode.key);\n\n if (!currentNodeElement) return;\n\n const currentIndex = allTreeItems.indexOf(currentNodeElement);\n const searchLower = searchValue.current.toLowerCase();\n let matchedElement: HTMLElement | null = null;\n\n for (let i = currentIndex + 1; i < allTreeItems.length; i++) {\n const item = allTreeItems[i];\n const label = item.textContent?.trim().toLowerCase() || '';\n\n if (label.startsWith(searchLower)) {\n matchedElement = item;\n break;\n }\n }\n\n if (!matchedElement) {\n for (let i = 0; i <= currentIndex; i++) {\n const item = allTreeItems[i];\n const label = item.textContent?.trim().toLowerCase() || '';\n\n if (label.startsWith(searchLower)) {\n matchedElement = item;\n break;\n }\n }\n }\n\n if (matchedElement && matchedElement !== currentNodeElement) {\n allTreeItems.forEach((item) => {\n item.tabIndex = -1;\n });\n\n matchedElement.tabIndex = 0;\n focus(matchedElement);\n }\n }\n\n searchTimeout.current = setTimeout(() => {\n searchValue.current = '';\n searchTimeout.current = null;\n }, 500);\n };\n\n const isSameNode = (event: React.KeyboardEvent) => {\n const target = event.target as HTMLElement;\n const currentTarget = event.currentTarget as HTMLElement;\n\n return currentTarget && (currentTarget.isSameNode(target as Node) || currentTarget.isSameNode(target.closest('[role=\"treeitem\"]') as Node));\n };\n\n const onFilterKeyUp = (event: React.KeyboardEvent) => {\n if (event.code === 'Enter' || event.code === 'NumpadEnter') {\n event.preventDefault();\n }\n };\n\n const onDragOver = (event: React.DragEvent) => {\n if (props.droppableNodes && allowDrop()) {\n event.dataTransfer.dropEffect = 'copy';\n } else {\n event.dataTransfer.dropEffect = 'none';\n }\n\n event.preventDefault();\n };\n\n const onDragEnter = (event: React.DragEvent) => {\n const { dragNode, dragScope } = TreeDragDropService.getDragState();\n\n if (props.droppableNodes && allowDrop()) {\n setDragHoverState(true);\n\n if (props.onDragEnter) {\n props.onDragEnter({\n originalEvent: event,\n value: props.value || [],\n dragNode,\n dragNodeScope: dragScope\n });\n }\n }\n };\n\n const onDragLeave = (event: React.DragEvent) => {\n if (props.droppableNodes) {\n const rect = event.currentTarget.getBoundingClientRect();\n\n if (event.clientX >= rect.right || event.clientX <= rect.left || event.clientY >= rect.bottom || event.clientY <= rect.top) {\n setDragHoverState(false);\n\n if (props.onDragLeave) {\n const { dragNode, dragScope } = TreeDragDropService.getDragState();\n\n props.onDragLeave({\n originalEvent: event,\n value: props.value || [],\n dragNode,\n dragNodeScope: dragScope\n });\n }\n }\n }\n };\n\n const processTreeDrop = (dragNode: TreeNode, dragNodeIndex: number) => {\n const { dragNodeSubNodes } = TreeDragDropService.getDragState();\n\n if (dragNodeSubNodes) {\n dragNodeSubNodes.splice(dragNodeIndex, 1);\n }\n\n const newValue = [...(props.value || []), dragNode];\n\n if (props.onValueChange) {\n props.onValueChange({\n value: newValue\n });\n }\n\n TreeDragDropService.stopDrag({\n node: dragNode\n });\n };\n\n const onDrop = (event: React.DragEvent) => {\n if (props.droppableNodes) {\n event.preventDefault();\n const { dragNode, dragScope, dragNodeIndex } = TreeDragDropService.getDragState();\n\n if (dragNode && allowDrop()) {\n if (isSameTreeScope(dragScope as string | string[])) {\n TreeDragDropService.stopDrag({\n node: dragNode\n });\n setDragHoverState(false);\n\n return;\n }\n\n if (dragNodeIndex !== null) {\n if (props.validateDrop) {\n if (props.onNodeDrop) {\n props.onNodeDrop({\n originalEvent: event,\n value: props.value || [],\n dragNode: dragNode,\n dropNode: null,\n index: dragNodeIndex,\n accept: () => {\n processTreeDrop(dragNode, dragNodeIndex);\n }\n });\n }\n } else {\n if (props.onNodeDrop) {\n props.onNodeDrop({\n originalEvent: event,\n value: props.value || [],\n dragNode: dragNode,\n dropNode: null,\n index: dragNodeIndex\n });\n }\n\n processTreeDrop(dragNode, dragNodeIndex);\n }\n }\n }\n }\n\n setDragHoverState(false);\n };\n\n const allowDrop = (dropNode?: TreeNode) => {\n const { dragNode, dragScope } = TreeDragDropService.getDragState();\n\n if (!dragNode) {\n return false;\n } else if (isValidDragScope(dragScope as string | string[])) {\n let allow = true;\n\n if (dropNode && dragNode === dropNode) {\n allow = false;\n }\n\n return allow;\n } else {\n return false;\n }\n };\n\n const hasCommonScope = (dragScope: string | string[] | undefined, dropScope: string | string[] | undefined) => {\n if (dragScope === undefined && dropScope === undefined) {\n return true;\n } else if (dragScope === undefined || dropScope === undefined) {\n return false;\n }\n\n if (typeof dropScope === 'string') {\n if (typeof dragScope === 'string') {\n return dragScope === dropScope;\n } else if (Array.isArray(dragScope)) {\n return dragScope.indexOf(dropScope) !== -1;\n }\n } else if (Array.isArray(dropScope)) {\n if (typeof dragScope === 'string') {\n return dropScope.indexOf(dragScope) !== -1;\n } else if (Array.isArray(dragScope)) {\n for (const ds of dragScope) {\n if (dropScope.indexOf(ds) !== -1) {\n return true;\n }\n }\n\n return false;\n }\n }\n\n return false;\n };\n\n const isValidDragScope = (dragScope: string | string[] | undefined) => {\n if (props.droppableScope === undefined) {\n return true;\n }\n\n return hasCommonScope(dragScope, props.droppableScope);\n };\n\n const isSameTreeScope = (dragScope: string | string[] | undefined) => {\n return hasCommonScope(dragScope, props.draggableScope);\n };\n\n const findNodeInfo = (nodeKey: string) => {\n let level = 1;\n let posInSet = 0;\n let setSize = 0;\n\n const findInNodes = (nodes: unknown[], currentLevel: number): boolean => {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i] as { key: string; children?: unknown[] };\n\n if (node.key === nodeKey) {\n level = currentLevel;\n posInSet = i + 1;\n setSize = nodes.length;\n\n return true;\n }\n\n if (node.children) {\n if (findInNodes(node.children, currentLevel + 1)) {\n return true;\n }\n }\n }\n\n return false;\n };\n\n const nodes = getNodes();\n\n findInNodes(nodes, 1);\n\n return { level, posInSet, setSize };\n };\n\n return {\n state,\n //methods\n getNodes,\n onKeyDown,\n onNodeToggle,\n onNodeClick,\n onClick,\n onCheckboxChange,\n isNodeSelected,\n onFilterKeyUp,\n onDragOver,\n onDragEnter,\n onDragLeave,\n onDrop,\n allowDrop,\n findNodeInfo\n };\n }\n});\n","import type { TreeNode } from '@primereact/types/shared/tree';\n\ntype DragState = {\n isDragging: boolean;\n dragNode: TreeNode | null;\n dragScope: string | string[] | null;\n dragNodeSubNodes: TreeNode[] | null;\n dragNodeIndex: number | null;\n sourceTreeId: string | null;\n};\n\ntype DragEvent = {\n node: TreeNode;\n scope?: string | string[] | null;\n subNodes?: TreeNode[];\n index?: number;\n sourceTreeId?: string;\n};\n\nconst dragState: DragState = {\n isDragging: false,\n dragNode: null,\n dragScope: null,\n dragNodeSubNodes: null,\n dragNodeIndex: null,\n sourceTreeId: null\n};\n\nconst dragStartHandlers = new Set<(event: DragEvent) => void>();\nconst dragStopHandlers = new Set<(event: DragEvent) => void>();\n\nexport const TreeDragDropService = {\n getDragState() {\n return dragState;\n },\n\n startDrag(event: DragEvent) {\n dragState.isDragging = true;\n dragState.dragNode = event.node;\n dragState.dragScope = event.scope ?? null;\n dragState.dragNodeSubNodes = event.subNodes ?? null;\n dragState.dragNodeIndex = event.index ?? null;\n dragState.sourceTreeId = event.sourceTreeId ?? null;\n\n dragStartHandlers.forEach((handler) => handler(event));\n },\n\n stopDrag(event: DragEvent) {\n dragState.isDragging = false;\n dragState.dragNode = null;\n dragState.dragScope = null;\n dragState.dragNodeSubNodes = null;\n dragState.dragNodeIndex = null;\n dragState.sourceTreeId = null;\n\n dragStopHandlers.forEach((handler) => handler(event));\n },\n\n onDragStart(handler: (event: DragEvent) => void) {\n dragStartHandlers.add(handler);\n\n return () => dragStartHandlers.delete(handler);\n },\n\n onDragStop(handler: (event: DragEvent) => void) {\n dragStopHandlers.add(handler);\n\n return () => dragStopHandlers.delete(handler);\n }\n};\n","import type { useTreeProps } from '@primereact/types/shared/tree';\n\nexport const defaultProps: useTreeProps = {\n value: [],\n expandedKeys: undefined,\n defaultExpandedKeys: undefined,\n selectionKeys: undefined,\n defaultSelectionKeys: undefined,\n selectionMode: undefined,\n metaKeySelection: false,\n highlightOnSelect: false,\n scrollHeight: undefined,\n draggableNodes: undefined,\n droppableNodes: undefined,\n draggableScope: undefined,\n droppableScope: undefined,\n validateDrop: false,\n onExpandedChange: undefined,\n onSelectionChange: undefined,\n onToggle: undefined,\n onExpand: undefined,\n onCollapse: undefined,\n onClick: undefined,\n onSelect: undefined,\n onUnselect: undefined,\n onNodeDrop: undefined,\n onDragEnter: undefined,\n onDragLeave: undefined,\n onValueChange: undefined\n};\n"],"mappings":"ubAAA,OAAS,gBAAAA,OAAoB,4BAC7B,OAAS,sBAAAC,OAA0B,yCAEnC,OAAS,QAAAC,EAAM,cAAAC,GAAY,SAAAC,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B,EACA,iBAAAoC,EACA,eAAAN,EACA,cAAA8B,GACA,WAAAC,GACA,YAAAE,GACA,YAAAG,GACA,OAAAK,GACA,UAAAT,EACA,aAlDkBzC,GAAoB,CACtC,IAAI9C,EAAQ,EACRwG,EAAW,EACXC,EAAU,EAERC,EAAc,CAAC/E,EAAkBgF,IAAkC,CACrE,QAASxB,EAAI,EAAGA,EAAIxD,EAAM,OAAQwD,IAAK,CACnC,IAAMpF,EAAO4B,EAAMwD,CAAC,EAEpB,GAAIpF,EAAK,MAAQ+C,EACb,OAAA9C,EAAQ2G,EACRH,EAAWrB,EAAI,EACfsB,EAAU9E,EAAM,OAET,GAGX,GAAI5B,EAAK,UACD2G,EAAY3G,EAAK,SAAU4G,EAAe,CAAC,EAC3C,MAAO,EAGnB,CAEA,MAAO,EACX,EAEMhF,EAAQ/B,EAAS,EAEvB,OAAA8G,EAAY/E,EAAO,CAAC,EAEb,CAAE,MAAA3B,EAAO,SAAAwG,EAAU,QAAAC,CAAQ,CACtC,CAmBA,CACJ,CACJ,CAAC","names":["withHeadless","useControlledState","find","findSingle","focus","getAttribute","isPrintableCharacter","React","dragState","dragStartHandlers","dragStopHandlers","TreeDragDropService","event","_a","_b","_c","_d","handler","defaultProps","useTree","withHeadless","defaultProps","props","elementRef","_a","_b","defaultExpandedKeyRef","expandedKeyState","setExpandedKeyState","useControlledState","defaultSelectedKeyRef","selectedKeyState","setSelectedKeyState","searchTimeout","searchValue","dragHoverState","setDragHoverState","dragStopCleanup","TreeDragDropService","state","getNodes","onKeyDown","event","node","level","expanded","leaf","isSameNode","metaKey","onTabKey","onArrowDown","onArrowUp","onArrowRight","onArrowLeft","onEnterKey","isPrintableCharacter","searchNodes","target","nodeElement","listElement","focusRowChange","nextSiblingAncestor","findNextSiblingOfAncestor","findLastVisibleDescendant","parentNodeElement","getParentNodeElement","onNodeToggle","findBeforeClickableNode","setTabIndexForSelectionMode","onClick","setAllNodesTabIndexes","nodes","find","hasSelectedNode","selectedNodes","parentElement","elements","element","firstFocusableRow","currentFocusedRow","lastVisibleDescendant","focus","ulElement","parentListElement","prevNodeButton","findSingle","childrenListElement","lastChildElement","getAttribute","currentKeys","nodeKey","newValue","__spreadValues","__spreadProps","onNodeClick","nodeTouched","handleSelectionWithMetaKey","handleSelectionWithoutMetaKey","selected","isNodeSelected","_selectionKeys","currentSelection","isSingleSelectionMode","isMultipleSelectionMode","isCheckboxSelectionMode","onCheckboxChange","newCheckState","propagateDown","parentNode","findParentNode","propagateUp","check","selectionKeys","child","checkedChildCount","childPartialSelected","childKey","parent","found","char","currentNode","allTreeItems","currentNodeElement","item","currentIndex","searchLower","matchedElement","i","currentTarget","onFilterKeyUp","onDragOver","allowDrop","onDragEnter","dragNode","dragScope","onDragLeave","rect","processTreeDrop","dragNodeIndex","dragNodeSubNodes","onDrop","isSameTreeScope","dropNode","isValidDragScope","allow","hasCommonScope","dropScope","ds","posInSet","setSize","findInNodes","currentLevel"]}
File without changes