primereact 8.0.1 → 8.2.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 (434) hide show
  1. package/api/api.cjs.js +22 -1
  2. package/api/api.cjs.min.js +1 -1
  3. package/api/api.esm.js +22 -2
  4. package/api/api.esm.min.js +1 -1
  5. package/api/api.js +22 -1
  6. package/api/api.min.js +1 -1
  7. package/autocomplete/autocomplete.cjs.js +42 -24
  8. package/autocomplete/autocomplete.cjs.min.js +1 -1
  9. package/autocomplete/autocomplete.d.ts +0 -1
  10. package/autocomplete/autocomplete.esm.js +43 -25
  11. package/autocomplete/autocomplete.esm.min.js +1 -1
  12. package/autocomplete/autocomplete.js +42 -24
  13. package/autocomplete/autocomplete.min.js +1 -1
  14. package/avatar/avatar.cjs.js +7 -7
  15. package/avatar/avatar.cjs.min.js +1 -1
  16. package/avatar/avatar.d.ts +1 -3
  17. package/avatar/avatar.esm.js +7 -7
  18. package/avatar/avatar.esm.min.js +1 -1
  19. package/avatar/avatar.js +7 -7
  20. package/avatar/avatar.min.js +1 -1
  21. package/badge/badge.cjs.js +2 -2
  22. package/badge/badge.cjs.min.js +1 -1
  23. package/badge/badge.d.ts +2 -4
  24. package/badge/badge.esm.js +2 -2
  25. package/badge/badge.esm.min.js +1 -1
  26. package/badge/badge.js +2 -2
  27. package/badge/badge.min.js +1 -1
  28. package/breadcrumb/breadcrumb.cjs.js +22 -6
  29. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  30. package/breadcrumb/breadcrumb.esm.js +22 -6
  31. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  32. package/breadcrumb/breadcrumb.js +22 -6
  33. package/breadcrumb/breadcrumb.min.js +1 -1
  34. package/button/button.cjs.js +1 -1
  35. package/button/button.cjs.min.js +1 -1
  36. package/button/button.esm.js +1 -1
  37. package/button/button.esm.min.js +1 -1
  38. package/button/button.js +1 -1
  39. package/button/button.min.js +1 -1
  40. package/calendar/calendar.cjs.js +80 -7
  41. package/calendar/calendar.cjs.min.js +1 -1
  42. package/calendar/calendar.d.ts +7 -5
  43. package/calendar/calendar.esm.js +80 -7
  44. package/calendar/calendar.esm.min.js +1 -1
  45. package/calendar/calendar.js +80 -7
  46. package/calendar/calendar.min.js +1 -1
  47. package/captcha/captcha.cjs.js +1 -0
  48. package/captcha/captcha.esm.js +1 -0
  49. package/captcha/captcha.js +1 -0
  50. package/card/card.d.ts +1 -4
  51. package/carousel/carousel.cjs.js +18 -17
  52. package/carousel/carousel.cjs.min.js +1 -1
  53. package/carousel/carousel.esm.js +19 -18
  54. package/carousel/carousel.esm.min.js +1 -1
  55. package/carousel/carousel.js +19 -18
  56. package/carousel/carousel.min.js +1 -1
  57. package/cascadeselect/cascadeselect.cjs.js +5 -4
  58. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  59. package/cascadeselect/cascadeselect.d.ts +1 -1
  60. package/cascadeselect/cascadeselect.esm.js +5 -4
  61. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  62. package/cascadeselect/cascadeselect.js +5 -4
  63. package/cascadeselect/cascadeselect.min.js +1 -1
  64. package/chart/chart.cjs.js +13 -7
  65. package/chart/chart.cjs.min.js +1 -1
  66. package/chart/chart.esm.js +13 -7
  67. package/chart/chart.esm.min.js +1 -1
  68. package/chart/chart.js +13 -7
  69. package/chart/chart.min.js +1 -1
  70. package/checkbox/checkbox.cjs.js +1 -2
  71. package/checkbox/checkbox.cjs.min.js +1 -1
  72. package/checkbox/checkbox.esm.js +2 -3
  73. package/checkbox/checkbox.esm.min.js +1 -1
  74. package/checkbox/checkbox.js +1 -2
  75. package/checkbox/checkbox.min.js +1 -1
  76. package/chip/chip.d.ts +1 -3
  77. package/chips/chips.cjs.js +18 -2
  78. package/chips/chips.cjs.min.js +1 -1
  79. package/chips/chips.d.ts +3 -0
  80. package/chips/chips.esm.js +19 -3
  81. package/chips/chips.esm.min.js +1 -1
  82. package/chips/chips.js +19 -4
  83. package/chips/chips.min.js +1 -1
  84. package/column/column.cjs.js +2 -1
  85. package/column/column.cjs.min.js +1 -1
  86. package/column/column.d.ts +2 -0
  87. package/column/column.esm.js +2 -1
  88. package/column/column.esm.min.js +1 -1
  89. package/column/column.js +2 -1
  90. package/column/column.min.js +1 -1
  91. package/confirmdialog/confirmdialog.d.ts +1 -6
  92. package/contextmenu/contextmenu.cjs.js +1 -0
  93. package/contextmenu/contextmenu.cjs.min.js +1 -1
  94. package/contextmenu/contextmenu.esm.js +1 -0
  95. package/contextmenu/contextmenu.esm.min.js +1 -1
  96. package/contextmenu/contextmenu.js +1 -0
  97. package/contextmenu/contextmenu.min.js +1 -1
  98. package/core/core.js +390 -160
  99. package/core/core.min.js +14 -14
  100. package/datatable/datatable.cjs.js +68 -27
  101. package/datatable/datatable.cjs.min.js +1 -1
  102. package/datatable/datatable.esm.js +69 -28
  103. package/datatable/datatable.esm.min.js +1 -1
  104. package/datatable/datatable.js +68 -27
  105. package/datatable/datatable.min.css +1 -1
  106. package/datatable/datatable.min.js +1 -1
  107. package/dialog/dialog.cjs.js +7 -3
  108. package/dialog/dialog.cjs.min.js +1 -1
  109. package/dialog/dialog.d.ts +2 -0
  110. package/dialog/dialog.esm.js +7 -3
  111. package/dialog/dialog.esm.min.js +1 -1
  112. package/dialog/dialog.js +7 -3
  113. package/dialog/dialog.min.js +1 -1
  114. package/dropdown/dropdown.cjs.js +32 -25
  115. package/dropdown/dropdown.cjs.min.js +1 -1
  116. package/dropdown/dropdown.d.ts +1 -1
  117. package/dropdown/dropdown.esm.js +32 -25
  118. package/dropdown/dropdown.esm.min.js +1 -1
  119. package/dropdown/dropdown.js +32 -25
  120. package/dropdown/dropdown.min.js +1 -1
  121. package/editor/editor.cjs.js +11 -3
  122. package/editor/editor.cjs.min.js +1 -1
  123. package/editor/editor.esm.js +11 -3
  124. package/editor/editor.esm.min.js +1 -1
  125. package/editor/editor.js +11 -3
  126. package/editor/editor.min.js +1 -1
  127. package/fileupload/fileupload.cjs.js +46 -19
  128. package/fileupload/fileupload.cjs.min.js +1 -1
  129. package/fileupload/fileupload.d.ts +1 -0
  130. package/fileupload/fileupload.esm.js +46 -19
  131. package/fileupload/fileupload.esm.min.js +1 -1
  132. package/fileupload/fileupload.js +46 -19
  133. package/fileupload/fileupload.min.js +1 -1
  134. package/fullcalendar/fullcalendar.cjs.js +1 -0
  135. package/fullcalendar/fullcalendar.esm.js +1 -0
  136. package/fullcalendar/fullcalendar.js +1 -0
  137. package/hooks/hooks.cjs.js +48 -2
  138. package/hooks/hooks.cjs.min.js +1 -1
  139. package/hooks/hooks.d.ts +3 -1
  140. package/hooks/hooks.esm.js +47 -3
  141. package/hooks/hooks.esm.min.js +1 -1
  142. package/hooks/hooks.js +48 -2
  143. package/hooks/hooks.min.js +1 -1
  144. package/image/image.cjs.js +5 -5
  145. package/image/image.cjs.min.js +1 -1
  146. package/image/image.d.ts +1 -3
  147. package/image/image.esm.js +5 -5
  148. package/image/image.esm.min.js +1 -1
  149. package/image/image.js +5 -5
  150. package/image/image.min.css +1 -1
  151. package/image/image.min.js +1 -1
  152. package/inplace/inplace.cjs.js +1 -1
  153. package/inplace/inplace.cjs.min.js +1 -1
  154. package/inplace/inplace.esm.js +1 -1
  155. package/inplace/inplace.esm.min.js +1 -1
  156. package/inplace/inplace.js +1 -1
  157. package/inplace/inplace.min.js +1 -1
  158. package/inputmask/inputmask.cjs.js +7 -5
  159. package/inputmask/inputmask.cjs.min.js +1 -1
  160. package/inputmask/inputmask.d.ts +0 -1
  161. package/inputmask/inputmask.esm.js +7 -5
  162. package/inputmask/inputmask.esm.min.js +1 -1
  163. package/inputmask/inputmask.js +7 -5
  164. package/inputmask/inputmask.min.js +1 -1
  165. package/inputnumber/inputnumber.cjs.js +37 -4
  166. package/inputnumber/inputnumber.cjs.min.js +1 -1
  167. package/inputnumber/inputnumber.esm.js +38 -5
  168. package/inputnumber/inputnumber.esm.min.js +1 -1
  169. package/inputnumber/inputnumber.js +37 -4
  170. package/inputnumber/inputnumber.min.js +1 -1
  171. package/inputswitch/inputswitch.cjs.js +1 -1
  172. package/inputswitch/inputswitch.cjs.min.js +1 -1
  173. package/inputswitch/inputswitch.d.ts +1 -1
  174. package/inputswitch/inputswitch.esm.js +2 -2
  175. package/inputswitch/inputswitch.esm.min.js +1 -1
  176. package/inputswitch/inputswitch.js +1 -1
  177. package/inputswitch/inputswitch.min.css +1 -1
  178. package/inputswitch/inputswitch.min.js +1 -1
  179. package/inputtext/inputtext.min.css +1 -1
  180. package/listbox/listbox.cjs.js +84 -15
  181. package/listbox/listbox.cjs.min.js +1 -1
  182. package/listbox/listbox.d.ts +2 -1
  183. package/listbox/listbox.esm.js +84 -15
  184. package/listbox/listbox.esm.min.js +1 -1
  185. package/listbox/listbox.js +85 -17
  186. package/listbox/listbox.min.js +1 -1
  187. package/megamenu/megamenu.cjs.js +32 -12
  188. package/megamenu/megamenu.cjs.min.js +1 -1
  189. package/megamenu/megamenu.d.ts +7 -0
  190. package/megamenu/megamenu.esm.js +32 -12
  191. package/megamenu/megamenu.esm.min.js +1 -1
  192. package/megamenu/megamenu.js +32 -12
  193. package/megamenu/megamenu.min.css +1 -1
  194. package/megamenu/megamenu.min.js +1 -1
  195. package/mention/mention.cjs.js +8 -4
  196. package/mention/mention.cjs.min.js +1 -1
  197. package/mention/mention.esm.js +8 -4
  198. package/mention/mention.esm.min.js +1 -1
  199. package/mention/mention.js +8 -4
  200. package/mention/mention.min.js +1 -1
  201. package/menubar/menubar.cjs.js +1 -0
  202. package/menubar/menubar.cjs.min.js +1 -1
  203. package/menubar/menubar.esm.js +1 -0
  204. package/menubar/menubar.esm.min.js +1 -1
  205. package/menubar/menubar.js +1 -0
  206. package/menubar/menubar.min.js +1 -1
  207. package/menuitem/menuitem.d.ts +2 -0
  208. package/message/message.d.ts +1 -1
  209. package/messages/messages.cjs.js +3 -2
  210. package/messages/messages.cjs.min.js +1 -1
  211. package/messages/messages.d.ts +1 -1
  212. package/messages/messages.esm.js +3 -2
  213. package/messages/messages.esm.min.js +1 -1
  214. package/messages/messages.js +3 -2
  215. package/messages/messages.min.js +1 -1
  216. package/multiselect/multiselect.cjs.js +22 -15
  217. package/multiselect/multiselect.cjs.min.js +1 -1
  218. package/multiselect/multiselect.d.ts +1 -1
  219. package/multiselect/multiselect.esm.js +22 -15
  220. package/multiselect/multiselect.esm.min.js +1 -1
  221. package/multiselect/multiselect.js +22 -15
  222. package/multiselect/multiselect.min.js +1 -1
  223. package/multistatecheckbox/multistatecheckbox.cjs.js +30 -24
  224. package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
  225. package/multistatecheckbox/multistatecheckbox.d.ts +2 -4
  226. package/multistatecheckbox/multistatecheckbox.esm.js +30 -24
  227. package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
  228. package/multistatecheckbox/multistatecheckbox.js +31 -26
  229. package/multistatecheckbox/multistatecheckbox.min.js +1 -1
  230. package/overlaypanel/overlaypanel.cjs.js +2 -2
  231. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  232. package/overlaypanel/overlaypanel.esm.js +2 -2
  233. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  234. package/overlaypanel/overlaypanel.js +2 -2
  235. package/overlaypanel/overlaypanel.min.js +1 -1
  236. package/package.json +4 -2
  237. package/paginator/paginator.cjs.js +26 -24
  238. package/paginator/paginator.cjs.min.js +1 -1
  239. package/paginator/paginator.esm.js +26 -24
  240. package/paginator/paginator.esm.min.js +1 -1
  241. package/paginator/paginator.js +26 -25
  242. package/paginator/paginator.min.js +1 -1
  243. package/panelmenu/panelmenu.cjs.js +16 -0
  244. package/panelmenu/panelmenu.cjs.min.js +1 -1
  245. package/panelmenu/panelmenu.esm.js +17 -1
  246. package/panelmenu/panelmenu.esm.min.js +1 -1
  247. package/panelmenu/panelmenu.js +16 -0
  248. package/panelmenu/panelmenu.min.js +1 -1
  249. package/picklist/picklist.cjs.js +175 -16
  250. package/picklist/picklist.cjs.min.js +1 -1
  251. package/picklist/picklist.d.ts +34 -1
  252. package/picklist/picklist.esm.js +175 -16
  253. package/picklist/picklist.esm.min.js +1 -1
  254. package/picklist/picklist.js +176 -18
  255. package/picklist/picklist.min.css +1 -1
  256. package/picklist/picklist.min.js +1 -1
  257. package/primereact.all.cjs.js +1262 -495
  258. package/primereact.all.cjs.min.js +1 -1
  259. package/primereact.all.esm.js +1260 -496
  260. package/primereact.all.esm.min.js +1 -1
  261. package/primereact.all.js +1262 -495
  262. package/primereact.all.min.js +1 -1
  263. package/progressbar/progressbar.cjs.js +1 -2
  264. package/progressbar/progressbar.cjs.min.js +1 -1
  265. package/progressbar/progressbar.esm.js +1 -2
  266. package/progressbar/progressbar.esm.min.js +1 -1
  267. package/progressbar/progressbar.js +1 -2
  268. package/progressbar/progressbar.min.js +1 -1
  269. package/radiobutton/radiobutton.cjs.js +6 -6
  270. package/radiobutton/radiobutton.cjs.min.js +1 -1
  271. package/radiobutton/radiobutton.d.ts +0 -1
  272. package/radiobutton/radiobutton.esm.js +7 -7
  273. package/radiobutton/radiobutton.esm.min.js +1 -1
  274. package/radiobutton/radiobutton.js +6 -6
  275. package/radiobutton/radiobutton.min.js +1 -1
  276. package/resources/primereact.css +266 -208
  277. package/resources/primereact.min.css +1 -1
  278. package/resources/themes/arya-blue/theme.css +20 -7
  279. package/resources/themes/arya-green/theme.css +20 -7
  280. package/resources/themes/arya-orange/theme.css +20 -7
  281. package/resources/themes/arya-purple/theme.css +20 -7
  282. package/resources/themes/bootstrap4-dark-blue/theme.css +20 -7
  283. package/resources/themes/bootstrap4-dark-purple/theme.css +20 -7
  284. package/resources/themes/bootstrap4-light-blue/theme.css +19 -6
  285. package/resources/themes/bootstrap4-light-purple/theme.css +19 -6
  286. package/resources/themes/fluent-light/theme.css +20 -7
  287. package/resources/themes/lara-dark-blue/theme.css +20 -7
  288. package/resources/themes/lara-dark-indigo/theme.css +20 -7
  289. package/resources/themes/lara-dark-purple/theme.css +20 -7
  290. package/resources/themes/lara-dark-teal/theme.css +20 -7
  291. package/resources/themes/lara-light-blue/theme.css +20 -7
  292. package/resources/themes/lara-light-indigo/theme.css +20 -7
  293. package/resources/themes/lara-light-purple/theme.css +20 -7
  294. package/resources/themes/lara-light-teal/theme.css +20 -7
  295. package/resources/themes/luna-amber/theme.css +20 -7
  296. package/resources/themes/luna-blue/theme.css +20 -7
  297. package/resources/themes/luna-green/theme.css +20 -7
  298. package/resources/themes/luna-pink/theme.css +20 -7
  299. package/resources/themes/md-dark-deeppurple/theme.css +20 -7
  300. package/resources/themes/md-dark-indigo/theme.css +20 -7
  301. package/resources/themes/md-light-deeppurple/theme.css +20 -7
  302. package/resources/themes/md-light-indigo/theme.css +20 -7
  303. package/resources/themes/mdc-dark-deeppurple/theme.css +20 -7
  304. package/resources/themes/mdc-dark-indigo/theme.css +20 -7
  305. package/resources/themes/mdc-light-deeppurple/theme.css +20 -7
  306. package/resources/themes/mdc-light-indigo/theme.css +20 -7
  307. package/resources/themes/nova/theme.css +20 -7
  308. package/resources/themes/nova-accent/theme.css +20 -7
  309. package/resources/themes/nova-alt/theme.css +20 -7
  310. package/resources/themes/rhea/theme.css +20 -7
  311. package/resources/themes/saga-blue/theme.css +20 -7
  312. package/resources/themes/saga-green/theme.css +20 -7
  313. package/resources/themes/saga-orange/theme.css +20 -7
  314. package/resources/themes/saga-purple/theme.css +20 -7
  315. package/resources/themes/tailwind-light/theme.css +20 -7
  316. package/resources/themes/vela-blue/theme.css +20 -7
  317. package/resources/themes/vela-green/theme.css +20 -7
  318. package/resources/themes/vela-orange/theme.css +20 -7
  319. package/resources/themes/vela-purple/theme.css +20 -7
  320. package/selectbutton/selectbutton.cjs.js +2 -6
  321. package/selectbutton/selectbutton.cjs.min.js +1 -1
  322. package/selectbutton/selectbutton.d.ts +1 -1
  323. package/selectbutton/selectbutton.esm.js +2 -6
  324. package/selectbutton/selectbutton.esm.min.js +1 -1
  325. package/selectbutton/selectbutton.js +2 -6
  326. package/selectbutton/selectbutton.min.js +1 -1
  327. package/slidemenu/slidemenu.cjs.js +39 -7
  328. package/slidemenu/slidemenu.cjs.min.js +1 -1
  329. package/slidemenu/slidemenu.esm.js +39 -7
  330. package/slidemenu/slidemenu.esm.min.js +1 -1
  331. package/slidemenu/slidemenu.js +39 -7
  332. package/slidemenu/slidemenu.min.js +1 -1
  333. package/slider/slider.cjs.js +6 -3
  334. package/slider/slider.cjs.min.js +1 -1
  335. package/slider/slider.d.ts +1 -1
  336. package/slider/slider.esm.js +6 -3
  337. package/slider/slider.esm.min.js +1 -1
  338. package/slider/slider.js +6 -3
  339. package/slider/slider.min.js +1 -1
  340. package/splitbutton/splitbutton.cjs.js +16 -9
  341. package/splitbutton/splitbutton.cjs.min.js +1 -1
  342. package/splitbutton/splitbutton.d.ts +4 -0
  343. package/splitbutton/splitbutton.esm.js +16 -9
  344. package/splitbutton/splitbutton.esm.min.js +1 -1
  345. package/splitbutton/splitbutton.js +16 -9
  346. package/splitbutton/splitbutton.min.js +1 -1
  347. package/splitter/splitter.cjs.js +15 -7
  348. package/splitter/splitter.cjs.min.js +1 -1
  349. package/splitter/splitter.esm.js +16 -8
  350. package/splitter/splitter.esm.min.js +1 -1
  351. package/splitter/splitter.js +15 -7
  352. package/splitter/splitter.min.js +1 -1
  353. package/steps/steps.cjs.js +1 -0
  354. package/steps/steps.cjs.min.js +1 -1
  355. package/steps/steps.esm.js +1 -0
  356. package/steps/steps.esm.min.js +1 -1
  357. package/steps/steps.js +1 -0
  358. package/steps/steps.min.js +1 -1
  359. package/styleclass/styleclass.cjs.js +26 -21
  360. package/styleclass/styleclass.cjs.min.js +1 -1
  361. package/styleclass/styleclass.d.ts +1 -1
  362. package/styleclass/styleclass.esm.js +26 -21
  363. package/styleclass/styleclass.esm.min.js +1 -1
  364. package/styleclass/styleclass.js +26 -21
  365. package/styleclass/styleclass.min.js +1 -1
  366. package/tag/tag.d.ts +1 -1
  367. package/terminal/terminal.cjs.js +1 -1
  368. package/terminal/terminal.cjs.min.js +1 -1
  369. package/terminal/terminal.esm.js +2 -2
  370. package/terminal/terminal.esm.min.js +1 -1
  371. package/terminal/terminal.js +1 -1
  372. package/terminal/terminal.min.js +1 -1
  373. package/tieredmenu/tieredmenu.cjs.js +3 -1
  374. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  375. package/tieredmenu/tieredmenu.esm.js +3 -1
  376. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  377. package/tieredmenu/tieredmenu.js +3 -1
  378. package/tieredmenu/tieredmenu.min.js +1 -1
  379. package/toast/toast.cjs.js +30 -35
  380. package/toast/toast.cjs.min.js +1 -1
  381. package/toast/toast.d.ts +2 -1
  382. package/toast/toast.esm.js +30 -35
  383. package/toast/toast.esm.min.js +1 -1
  384. package/toast/toast.js +30 -35
  385. package/toast/toast.min.css +1 -1
  386. package/toast/toast.min.js +1 -1
  387. package/tooltip/tooltip.cjs.js +28 -22
  388. package/tooltip/tooltip.cjs.min.js +1 -1
  389. package/tooltip/tooltip.esm.js +28 -22
  390. package/tooltip/tooltip.esm.min.js +1 -1
  391. package/tooltip/tooltip.js +28 -22
  392. package/tooltip/tooltip.min.js +1 -1
  393. package/tree/tree.cjs.js +9 -1
  394. package/tree/tree.cjs.min.js +1 -1
  395. package/tree/tree.esm.js +9 -1
  396. package/tree/tree.esm.min.js +1 -1
  397. package/tree/tree.js +9 -1
  398. package/tree/tree.min.js +1 -1
  399. package/treeselect/treeselect.cjs.js +2 -2
  400. package/treeselect/treeselect.cjs.min.js +1 -1
  401. package/treeselect/treeselect.esm.js +2 -2
  402. package/treeselect/treeselect.esm.min.js +1 -1
  403. package/treeselect/treeselect.js +2 -2
  404. package/treeselect/treeselect.min.js +1 -1
  405. package/treetable/treetable.cjs.js +11 -1
  406. package/treetable/treetable.cjs.min.js +1 -1
  407. package/treetable/treetable.d.ts +3 -3
  408. package/treetable/treetable.esm.js +11 -1
  409. package/treetable/treetable.esm.min.js +1 -1
  410. package/treetable/treetable.js +11 -1
  411. package/treetable/treetable.min.js +1 -1
  412. package/tristatecheckbox/tristatecheckbox.cjs.js +25 -23
  413. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  414. package/tristatecheckbox/tristatecheckbox.d.ts +2 -4
  415. package/tristatecheckbox/tristatecheckbox.esm.js +25 -23
  416. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  417. package/tristatecheckbox/tristatecheckbox.js +26 -25
  418. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  419. package/utils/utils.cjs.js +21 -5
  420. package/utils/utils.cjs.min.js +1 -1
  421. package/utils/utils.d.ts +1 -0
  422. package/utils/utils.esm.js +21 -5
  423. package/utils/utils.esm.min.js +1 -1
  424. package/utils/utils.js +21 -5
  425. package/utils/utils.min.js +1 -1
  426. package/virtualscroller/virtualscroller.cjs.js +154 -65
  427. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  428. package/virtualscroller/virtualscroller.d.ts +12 -0
  429. package/virtualscroller/virtualscroller.esm.js +156 -67
  430. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  431. package/virtualscroller/virtualscroller.js +154 -65
  432. package/virtualscroller/virtualscroller.min.css +1 -1
  433. package/virtualscroller/virtualscroller.min.js +1 -1
  434. package/web-types.json +252 -66
@@ -259,7 +259,17 @@ var locales = {
259
259
  strong: 'Strong',
260
260
  passwordPrompt: 'Enter a password',
261
261
  emptyFilterMessage: 'No available options',
262
- emptyMessage: 'No results found'
262
+ emptyMessage: 'No results found',
263
+ aria: {
264
+ trueLabel: 'True',
265
+ falseLabel: 'False',
266
+ nullLabel: 'Not Selected',
267
+ pageLabel: 'Page',
268
+ firstPageLabel: 'First Page',
269
+ lastPageLabel: 'Last Page',
270
+ nextPageLabel: 'Next Page',
271
+ previousPageLabel: 'Previous Page'
272
+ }
263
273
  }
264
274
  };
265
275
 
@@ -295,6 +305,16 @@ function localeOption(key, locale) {
295
305
  }
296
306
  }
297
307
 
308
+ function ariaLabel(key) {
309
+ var _locale = PrimeReact.locale;
310
+
311
+ try {
312
+ return localeOptions(_locale)['aria'][key];
313
+ } catch (error) {
314
+ throw new Error("The ".concat(key, " option is not found in the current locale('").concat(_locale, "')."));
315
+ }
316
+ }
317
+
298
318
  function localeOptions(locale) {
299
319
  var _locale = locale || PrimeReact.locale;
300
320
 
@@ -1444,6 +1464,21 @@ var DomHandler = /*#__PURE__*/function () {
1444
1464
  var focusableElements = DomHandler.getFocusableElements(element, selector);
1445
1465
  return focusableElements.length > 0 ? focusableElements[focusableElements.length - 1] : null;
1446
1466
  }
1467
+ /**
1468
+ * Focus an input element if it does not already have focus.
1469
+ *
1470
+ * @param {HTMLElement} el a HTML element
1471
+ * @param {boolean} scrollTo flag to control whether to scroll to the element, false by default
1472
+ */
1473
+
1474
+ }, {
1475
+ key: "focus",
1476
+ value: function focus(el, scrollTo) {
1477
+ var preventScroll = scrollTo === undefined ? true : !scrollTo;
1478
+ el && document.activeElement !== el && el.focus({
1479
+ preventScroll: preventScroll
1480
+ });
1481
+ }
1447
1482
  }, {
1448
1483
  key: "getCursorOffset",
1449
1484
  value: function getCursorOffset(el, prevText, nextText, currentText) {
@@ -1839,12 +1874,9 @@ function mask(el, options) {
1839
1874
 
1840
1875
  var onBlur = function onBlur(e) {
1841
1876
  checkVal();
1877
+ options.onBlur && options.onBlur(e);
1842
1878
  updateModel(e);
1843
1879
 
1844
- if (options.onBlur) {
1845
- options.onBlur(e);
1846
- }
1847
-
1848
1880
  if (el.value !== focusText) {
1849
1881
  var event = document.createEvent('HTMLEvents');
1850
1882
  event.initEvent('change', true, false);
@@ -2380,7 +2412,11 @@ var ObjectUtils = /*#__PURE__*/function () {
2380
2412
  var order = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
2381
2413
  var locale = arguments.length > 3 ? arguments[3] : undefined;
2382
2414
  var result = null;
2383
- if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, locale, {
2415
+ var emptyValue1 = this.isEmpty(value1);
2416
+ var emptyValue2 = this.isEmpty(value2);
2417
+ if (emptyValue1 && emptyValue2) result = 0;else if (emptyValue1) result = order; // sort nulls at bottom like Excel
2418
+ else if (emptyValue2) result = -order; // sort nulls at bottom like Excel
2419
+ else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, locale, {
2384
2420
  numeric: true
2385
2421
  });else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
2386
2422
  return order * result;
@@ -3032,9 +3068,25 @@ var useInterval = function useInterval(fn) {
3032
3068
 
3033
3069
  var useStorage = function useStorage(initialValue, key) {
3034
3070
  var storage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'local';
3035
- // Since the local storage API isn't available in server-rendering environments,
3071
+ // Since the local storage API isn't available in server-rendering environments,
3036
3072
  // we check that typeof window !== 'undefined' to make SSR and SSG work properly.
3037
- var storageAvailable = typeof window !== 'undefined';
3073
+ var storageAvailable = typeof window !== 'undefined'; // subscribe to window storage event so changes in one tab to a stored value
3074
+ // are properly reflected in all tabs
3075
+
3076
+ var _useEventListener = useEventListener({
3077
+ target: 'window',
3078
+ type: 'storage',
3079
+ listener: function listener(event) {
3080
+ var area = storage === 'local' ? window.localStorage : window.sessionStorage;
3081
+
3082
+ if (event.storageArea === area && event.key === key) {
3083
+ setStoredValue(event.newValue || undefined);
3084
+ }
3085
+ }
3086
+ }),
3087
+ _useEventListener2 = _slicedToArray(_useEventListener, 2),
3088
+ bindWindowStorageListener = _useEventListener2[0],
3089
+ unbindWindowStorageListener = _useEventListener2[1];
3038
3090
 
3039
3091
  var _React$useState = React__namespace.useState(function () {
3040
3092
  if (!storageAvailable) {
@@ -3068,8 +3120,36 @@ var useStorage = function useStorage(initialValue, key) {
3068
3120
  }
3069
3121
  };
3070
3122
 
3123
+ React__namespace.useEffect(function () {
3124
+ bindWindowStorageListener();
3125
+ return function () {
3126
+ return unbindWindowStorageListener();
3127
+ };
3128
+ }, []);
3071
3129
  return [storedValue, setValue];
3072
3130
  };
3131
+ /**
3132
+ * Hook to wrap around useState that stores the value in the browser local storage.
3133
+ *
3134
+ * @param {any} initialValue the initial value to store
3135
+ * @param {string} key the key to store the value in local storage
3136
+ * @returns a stateful value, and a function to update it.
3137
+ */
3138
+
3139
+ var useLocalStorage = function useLocalStorage(initialValue, key) {
3140
+ return useStorage(initialValue, key, 'local');
3141
+ };
3142
+ /**
3143
+ * Hook to wrap around useState that stores the value in the browser session storage.
3144
+ *
3145
+ * @param {any} initialValue the initial value to store
3146
+ * @param {string} key the key to store the value in session storage
3147
+ * @returns a stateful value, and a function to update it.
3148
+ */
3149
+
3150
+ var useSessionStorage = function useSessionStorage(initialValue, key) {
3151
+ return useStorage(initialValue, key, 'session');
3152
+ };
3073
3153
  /* eslint-enable */
3074
3154
 
3075
3155
  /* eslint-disable */
@@ -3508,6 +3588,11 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3508
3588
  positionState = _React$useState4[0],
3509
3589
  setPositionState = _React$useState4[1];
3510
3590
 
3591
+ var _React$useState5 = React__namespace.useState(''),
3592
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
3593
+ classNameState = _React$useState6[0],
3594
+ setClassNameState = _React$useState6[1];
3595
+
3511
3596
  var elementRef = React__namespace.useRef(null);
3512
3597
  var textRef = React__namespace.useRef(null);
3513
3598
  var currentTargetRef = React__namespace.useRef(null);
@@ -3626,7 +3711,7 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3626
3711
  return;
3627
3712
  }
3628
3713
 
3629
- var updateTooltipState = function updateTooltipState() {
3714
+ var updateTooltipState = function updateTooltipState(position) {
3630
3715
  updateText(currentTargetRef.current, function () {
3631
3716
  if (props.autoZIndex && !ZIndexUtils.get(elementRef.current)) {
3632
3717
  ZIndexUtils.set('tooltip', elementRef.current, PrimeReact.autoZIndex, props.baseZIndex || PrimeReact.zIndex['tooltip']);
@@ -3649,7 +3734,7 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3649
3734
  align(currentTargetRef.current, {
3650
3735
  x: e.pageX,
3651
3736
  y: e.pageY
3652
- });
3737
+ }, position);
3653
3738
  });
3654
3739
  };
3655
3740
 
@@ -3664,16 +3749,16 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3664
3749
 
3665
3750
  if (success) {
3666
3751
  applyDelay('showDelay', function () {
3752
+ var position = getPosition(currentTargetRef.current);
3753
+ var classname = getTargetOption(currentTargetRef.current, 'classname');
3667
3754
  setVisibleState(true);
3668
- setPositionState(getPosition(currentTargetRef.current));
3669
- setTimeout(function () {
3670
- return updateTooltipState();
3671
- }, 0);
3755
+ setPositionState(position);
3756
+ setClassNameState(classname);
3757
+ updateTooltipState(position);
3672
3758
  sendCallback(props.onShow, {
3673
3759
  originalEvent: e,
3674
3760
  target: currentTargetRef.current
3675
3761
  });
3676
- DomHandler.addClass(currentTargetRef.current, getTargetOption(currentTargetRef.current, 'classname'));
3677
3762
  });
3678
3763
  }
3679
3764
  }
@@ -3683,7 +3768,6 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3683
3768
  clearTimeouts();
3684
3769
 
3685
3770
  if (visibleState) {
3686
- DomHandler.removeClass(currentTargetRef.current, getTargetOption(currentTargetRef.current, 'classname'));
3687
3771
  var success = sendCallback(props.onBeforeHide, {
3688
3772
  originalEvent: e,
3689
3773
  target: currentTargetRef.current
@@ -3699,6 +3783,7 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3699
3783
  DomHandler.removeClass(elementRef.current, 'p-tooltip-active');
3700
3784
  setVisibleState(false);
3701
3785
  setPositionState(props.position);
3786
+ setClassNameState('');
3702
3787
  currentTargetRef.current = null;
3703
3788
  containerSize.current = null;
3704
3789
  allowHide.current = true;
@@ -3711,9 +3796,10 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3711
3796
  }
3712
3797
  };
3713
3798
 
3714
- var align = function align(target, coordinate) {
3799
+ var align = function align(target, coordinate, position) {
3715
3800
  var left = 0,
3716
- top = 0;
3801
+ top = 0,
3802
+ currentPosition = position || positionState;
3717
3803
 
3718
3804
  if (isMouseTrack(target) && coordinate) {
3719
3805
  var _containerSize = {
@@ -3727,7 +3813,7 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3727
3813
  mouseTrackTop = _getMouseTrackPositio.top,
3728
3814
  mouseTrackLeft = _getMouseTrackPositio.left;
3729
3815
 
3730
- switch (positionState) {
3816
+ switch (currentPosition) {
3731
3817
  case 'left':
3732
3818
  left -= _containerSize.width + mouseTrackLeft;
3733
3819
  top -= _containerSize.height / 2 - mouseTrackTop;
@@ -3760,28 +3846,28 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3760
3846
  elementRef.current.style.top = top + 'px';
3761
3847
  DomHandler.addClass(elementRef.current, 'p-tooltip-active');
3762
3848
  } else {
3763
- var pos = DomHandler.findCollisionPosition(positionState);
3849
+ var pos = DomHandler.findCollisionPosition(currentPosition);
3764
3850
  var my = getTargetOption(target, 'my') || props.my || pos.my;
3765
3851
  var at = getTargetOption(target, 'at') || props.at || pos.at;
3766
3852
  elementRef.current.style.padding = '0px';
3767
- DomHandler.flipfitCollision(elementRef.current, target, my, at, function (currentPosition) {
3768
- var _currentPosition$at = currentPosition.at,
3769
- atX = _currentPosition$at.x,
3770
- atY = _currentPosition$at.y;
3771
- var myX = currentPosition.my.x;
3772
- var newPosition = props.at ? atX !== 'center' && atX !== myX ? atX : atY : currentPosition.at["".concat(pos.axis)];
3853
+ DomHandler.flipfitCollision(elementRef.current, target, my, at, function (calculatedPosition) {
3854
+ var _calculatedPosition$a = calculatedPosition.at,
3855
+ atX = _calculatedPosition$a.x,
3856
+ atY = _calculatedPosition$a.y;
3857
+ var myX = calculatedPosition.my.x;
3858
+ var newPosition = props.at ? atX !== 'center' && atX !== myX ? atX : atY : calculatedPosition.at["".concat(pos.axis)];
3773
3859
  elementRef.current.style.padding = '';
3774
3860
  setPositionState(newPosition);
3775
- updateContainerPosition();
3861
+ updateContainerPosition(newPosition);
3776
3862
  DomHandler.addClass(elementRef.current, 'p-tooltip-active');
3777
3863
  });
3778
3864
  }
3779
3865
  };
3780
3866
 
3781
- var updateContainerPosition = function updateContainerPosition() {
3867
+ var updateContainerPosition = function updateContainerPosition(position) {
3782
3868
  if (elementRef.current) {
3783
3869
  var style = getComputedStyle(elementRef.current);
3784
- if (positionState === 'left') elementRef.current.style.left = parseFloat(style.left) - parseFloat(style.paddingLeft) * 2 + 'px';else if (positionState === 'top') elementRef.current.style.top = parseFloat(style.top) - parseFloat(style.paddingTop) * 2 + 'px';
3870
+ if (position === 'left') elementRef.current.style.left = parseFloat(style.left) - parseFloat(style.paddingLeft) * 2 + 'px';else if (position === 'top') elementRef.current.style.top = parseFloat(style.top) - parseFloat(style.paddingTop) * 2 + 'px';
3785
3871
  }
3786
3872
  };
3787
3873
 
@@ -3967,7 +4053,7 @@ var Tooltip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
3967
4053
 
3968
4054
  var createElement = function createElement() {
3969
4055
  var otherProps = ObjectUtils.findDiffKeys(props, Tooltip.defaultProps);
3970
- var tooltipClassName = classNames('p-tooltip p-component', _defineProperty({}, "p-tooltip-".concat(positionState), true), props.className);
4056
+ var tooltipClassName = classNames('p-tooltip p-component', _defineProperty({}, "p-tooltip-".concat(positionState), true), props.className, classNameState);
3971
4057
  var empty = isTargetContentEmpty(currentTargetRef.current);
3972
4058
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
3973
4059
  id: props.id,
@@ -4087,7 +4173,7 @@ var Button = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
4087
4173
  var icon = createIcon();
4088
4174
  var label = createLabel();
4089
4175
  var badge = createBadge();
4090
- var defaultAriaLabel = props.label ? props.label + (props.badge ? ' ' + props.badge : '') : '';
4176
+ var defaultAriaLabel = props.label ? props.label + (props.badge ? ' ' + props.badge : '') : props['aria-label'];
4091
4177
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("button", _extends({
4092
4178
  ref: elementRef,
4093
4179
  "aria-label": defaultAriaLabel
@@ -4340,7 +4426,7 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4340
4426
  numToleratedItemsState = _React$useState8[0],
4341
4427
  setNumToleratedItemsState = _React$useState8[1];
4342
4428
 
4343
- var _React$useState9 = React__namespace.useState(props.loading),
4429
+ var _React$useState9 = React__namespace.useState(props.loading || false),
4344
4430
  _React$useState10 = _slicedToArray(_React$useState9, 2),
4345
4431
  loadingState = _React$useState10[0],
4346
4432
  setLoadingState = _React$useState10[1];
@@ -4363,10 +4449,39 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4363
4449
  left: 0
4364
4450
  } : 0);
4365
4451
  var scrollTimeout = React__namespace.useRef(null);
4452
+ var resizeTimeout = React__namespace.useRef(null);
4453
+ var defaultWidth = React__namespace.useRef(null);
4454
+ var defaultHeight = React__namespace.useRef(null);
4366
4455
  var prevItems = usePrevious(props.items);
4367
4456
  var prevLoading = usePrevious(props.loading);
4368
4457
 
4458
+ var _useResizeListener = useResizeListener({
4459
+ listener: function listener(event) {
4460
+ return onResize(event);
4461
+ }
4462
+ }),
4463
+ _useResizeListener2 = _slicedToArray(_useResizeListener, 1),
4464
+ bindWindowResizeListener = _useResizeListener2[0];
4465
+
4466
+ var _useEventListener = useEventListener({
4467
+ target: 'window',
4468
+ type: 'orientationchange',
4469
+ listener: function listener(event) {
4470
+ return onResize(event);
4471
+ }
4472
+ }),
4473
+ _useEventListener2 = _slicedToArray(_useEventListener, 1),
4474
+ bindOrientationChangeListener = _useEventListener2[0];
4475
+
4476
+ var getElementRef = function getElementRef() {
4477
+ return elementRef;
4478
+ };
4479
+
4369
4480
  var scrollTo = function scrollTo(options) {
4481
+ lastScrollPos.current = both ? {
4482
+ top: 0,
4483
+ left: 0
4484
+ } : 0;
4370
4485
  elementRef.current && elementRef.current.scrollTo(options);
4371
4486
  };
4372
4487
 
@@ -4376,9 +4491,6 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4376
4491
  var _calculateNumItems = calculateNumItems(),
4377
4492
  numToleratedItems = _calculateNumItems.numToleratedItems;
4378
4493
 
4379
- var itemSize = props.itemSize;
4380
- var contentPos = getContentPosition();
4381
-
4382
4494
  var calculateFirst = function calculateFirst() {
4383
4495
  var _index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
4384
4496
 
@@ -4387,8 +4499,8 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4387
4499
  return _index <= _numT ? 0 : _index;
4388
4500
  };
4389
4501
 
4390
- var calculateCoord = function calculateCoord(_first, _size, _cpos) {
4391
- return _first * _size + _cpos;
4502
+ var calculateCoord = function calculateCoord(_first, _size) {
4503
+ return _first * _size;
4392
4504
  };
4393
4505
 
4394
4506
  var scrollToItem = function scrollToItem() {
@@ -4408,15 +4520,13 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4408
4520
  };
4409
4521
 
4410
4522
  if (newFirst.rows !== firstState.rows || newFirst.cols !== firstState.cols) {
4411
- scrollToItem(calculateCoord(newFirst.cols, itemSize[1], contentPos.left), calculateCoord(newFirst.rows, itemSize[0], contentPos.top));
4412
- setFirstState(newFirst);
4523
+ scrollToItem(calculateCoord(newFirst.cols, props.itemSize[1]), calculateCoord(newFirst.rows, props.itemSize[0]));
4413
4524
  }
4414
4525
  } else {
4415
4526
  var _newFirst = calculateFirst(index, numToleratedItems);
4416
4527
 
4417
4528
  if (_newFirst !== firstState) {
4418
- horizontal ? scrollToItem(calculateCoord(_newFirst, itemSize, contentPos.left), 0) : scrollToItem(0, calculateCoord(_newFirst, itemSize, contentPos.top));
4419
- setFirstState(_newFirst);
4529
+ horizontal ? scrollToItem(calculateCoord(_newFirst, props.itemSize), 0) : scrollToItem(0, calculateCoord(_newFirst, props.itemSize));
4420
4530
  }
4421
4531
  }
4422
4532
  };
@@ -4429,8 +4539,6 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4429
4539
  first = _getRenderedRange.first,
4430
4540
  viewport = _getRenderedRange.viewport;
4431
4541
 
4432
- var itemSize = props.itemSize;
4433
-
4434
4542
  var scrollToItem = function scrollToItem() {
4435
4543
  var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
4436
4544
  var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
@@ -4447,26 +4555,26 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4447
4555
  if (isToStart) {
4448
4556
  if (both) {
4449
4557
  if (viewport.first.rows - first.rows > index[0]) {
4450
- scrollToItem(viewport.first.cols * itemSize, (viewport.first.rows - 1) * itemSize);
4558
+ scrollToItem(viewport.first.cols * props.itemSize[1], (viewport.first.rows - 1) * props.itemSize[0]);
4451
4559
  } else if (viewport.first.cols - first.cols > index[1]) {
4452
- scrollToItem((viewport.first.cols - 1) * itemSize, viewport.first.rows * itemSize);
4560
+ scrollToItem((viewport.first.cols - 1) * props.itemSize[1], viewport.first.rows * props.itemSize[0]);
4453
4561
  }
4454
4562
  } else {
4455
4563
  if (viewport.first - first > index) {
4456
- var pos = (viewport.first - 1) * itemSize;
4564
+ var pos = (viewport.first - 1) * props.itemSize;
4457
4565
  horizontal ? scrollToItem(pos, 0) : scrollToItem(0, pos);
4458
4566
  }
4459
4567
  }
4460
4568
  } else if (isToEnd) {
4461
4569
  if (both) {
4462
4570
  if (viewport.last.rows - first.rows <= index[0] + 1) {
4463
- scrollToItem(viewport.first.cols * itemSize, (viewport.first.rows + 1) * itemSize);
4571
+ scrollToItem(viewport.first.cols * props.itemSize[1], (viewport.first.rows + 1) * props.itemSize[0]);
4464
4572
  } else if (viewport.last.cols - first.cols <= index[1] + 1) {
4465
- scrollToItem((viewport.first.cols + 1) * itemSize, viewport.first.rows * itemSize);
4573
+ scrollToItem((viewport.first.cols + 1) * props.itemSize[1], viewport.first.rows * props.itemSize[0]);
4466
4574
  }
4467
4575
  } else {
4468
4576
  if (viewport.last - first <= index + 1) {
4469
- var _pos2 = (viewport.first + 1) * itemSize;
4577
+ var _pos2 = (viewport.first + 1) * props.itemSize;
4470
4578
 
4471
4579
  horizontal ? scrollToItem(_pos2, 0) : scrollToItem(0, _pos2);
4472
4580
  }
@@ -4482,18 +4590,14 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4482
4590
  };
4483
4591
 
4484
4592
  var getColumns = function getColumns() {
4485
- if (props.columns) {
4486
- if (both || horizontal) {
4487
- return loadingState && props.loaderDisabled ? both ? loaderArrState[0] : loaderArrState : props.columns.slice(both ? firstState.cols : firstState, both ? lastState.cols : lastState);
4488
- }
4593
+ if (props.columns && both || horizontal) {
4594
+ return loadingState && props.loaderDisabled ? both ? loaderArrState[0] : loaderArrState : props.columns.slice(both ? firstState.cols : firstState, both ? lastState.cols : lastState);
4489
4595
  }
4490
4596
 
4491
4597
  return props.columns;
4492
4598
  };
4493
4599
 
4494
4600
  var getRenderedRange = function getRenderedRange() {
4495
- var itemSize = props.itemSize;
4496
-
4497
4601
  var calculateFirstInViewport = function calculateFirstInViewport(_pos, _size) {
4498
4602
  return Math.floor(_pos / (_size || _pos));
4499
4603
  };
@@ -4502,13 +4606,14 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4502
4606
  var lastInViewport = 0;
4503
4607
 
4504
4608
  if (elementRef.current) {
4505
- var scrollTop = elementRef.current.scrollTop;
4506
- var scrollLeft = elementRef.current.scrollLeft;
4609
+ var _elementRef$current = elementRef.current,
4610
+ scrollTop = _elementRef$current.scrollTop,
4611
+ scrollLeft = _elementRef$current.scrollLeft;
4507
4612
 
4508
4613
  if (both) {
4509
4614
  firstInViewport = {
4510
- rows: calculateFirstInViewport(scrollTop, itemSize[0]),
4511
- cols: calculateFirstInViewport(scrollLeft, itemSize[1])
4615
+ rows: calculateFirstInViewport(scrollTop, props.itemSize[0]),
4616
+ cols: calculateFirstInViewport(scrollLeft, props.itemSize[1])
4512
4617
  };
4513
4618
  lastInViewport = {
4514
4619
  rows: firstInViewport.rows + numItemsInViewportState.rows,
@@ -4516,7 +4621,7 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4516
4621
  };
4517
4622
  } else {
4518
4623
  var scrollPos = horizontal ? scrollLeft : scrollTop;
4519
- firstInViewport = calculateFirstInViewport(scrollPos, itemSize);
4624
+ firstInViewport = calculateFirstInViewport(scrollPos, props.itemSize);
4520
4625
  lastInViewport = firstInViewport + numItemsInViewportState;
4521
4626
  }
4522
4627
  }
@@ -4532,7 +4637,6 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4532
4637
  };
4533
4638
 
4534
4639
  var calculateNumItems = function calculateNumItems() {
4535
- var itemSize = props.itemSize;
4536
4640
  var contentPos = getContentPosition();
4537
4641
  var contentWidth = elementRef.current ? elementRef.current.offsetWidth - contentPos.left : 0;
4538
4642
  var contentHeight = elementRef.current ? elementRef.current.offsetHeight - contentPos.top : 0;
@@ -4546,9 +4650,9 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4546
4650
  };
4547
4651
 
4548
4652
  var numItemsInViewport = both ? {
4549
- rows: calculateNumItemsInViewport(contentHeight, itemSize[0]),
4550
- cols: calculateNumItemsInViewport(contentWidth, itemSize[1])
4551
- } : calculateNumItemsInViewport(horizontal ? contentWidth : contentHeight, itemSize);
4653
+ rows: calculateNumItemsInViewport(contentHeight, props.itemSize[0]),
4654
+ cols: calculateNumItemsInViewport(contentWidth, props.itemSize[1])
4655
+ } : calculateNumItemsInViewport(horizontal ? contentWidth : contentHeight, props.itemSize);
4552
4656
  var numToleratedItems = numToleratedItemsState || (both ? [calculateNumToleratedItems(numItemsInViewport.rows), calculateNumToleratedItems(numItemsInViewport.cols)] : calculateNumToleratedItems(numItemsInViewport));
4553
4657
  return {
4554
4658
  numItemsInViewport: numItemsInViewport,
@@ -4593,15 +4697,26 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4593
4697
  }
4594
4698
  };
4595
4699
 
4700
+ var calculateAutoSize = function calculateAutoSize(loading) {
4701
+ if (props.autoSize && !loading) {
4702
+ Promise.resolve().then(function () {
4703
+ if (_contentRef.current) {
4704
+ _contentRef.current.style.minHeight = _contentRef.current.style.minWidth = 'auto';
4705
+ var _contentRef$current = _contentRef.current,
4706
+ offsetWidth = _contentRef$current.offsetWidth,
4707
+ offsetHeight = _contentRef$current.offsetHeight;
4708
+ (both || horizontal) && (elementRef.current.style.width = (offsetWidth < defaultWidth.current ? offsetWidth : defaultWidth.current) + 'px');
4709
+ (both || vertical) && (elementRef.current.style.height = (offsetHeight < defaultHeight.current ? offsetHeight : defaultHeight.current) + 'px');
4710
+ _contentRef.current.style.minHeight = _contentRef.current.style.minWidth = '';
4711
+ }
4712
+ });
4713
+ }
4714
+ };
4715
+
4596
4716
  var getLast = function getLast() {
4597
4717
  var last = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
4598
4718
  var isCols = arguments.length > 1 ? arguments[1] : undefined;
4599
-
4600
- if (props.items) {
4601
- return Math.min(isCols ? (props.columns || props.items[0]).length : props.items.length, last);
4602
- }
4603
-
4604
- return 0;
4719
+ return props.items ? Math.min(isCols ? (props.columns || props.items[0]).length : props.items.length, last) : 0;
4605
4720
  };
4606
4721
 
4607
4722
  var getContentPosition = function getContentPosition() {
@@ -4654,7 +4769,6 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4654
4769
  var items = props.items;
4655
4770
 
4656
4771
  if (_spacerRef.current && items) {
4657
- var itemSize = props.itemSize;
4658
4772
  var contentPos = getContentPosition();
4659
4773
 
4660
4774
  var setProp = function setProp(_name, _value, _size) {
@@ -4664,10 +4778,10 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4664
4778
  };
4665
4779
 
4666
4780
  if (both) {
4667
- setProp('height', items, itemSize[0], contentPos.y);
4668
- setProp('width', props.columns || items[1], itemSize[1], contentPos.x);
4781
+ setProp('height', items, props.itemSize[0], contentPos.y);
4782
+ setProp('width', props.columns || items[1], props.itemSize[1], contentPos.x);
4669
4783
  } else {
4670
- horizontal ? setProp('width', props.columns || items, itemSize, contentPos.x) : setProp('height', items, itemSize, contentPos.y);
4784
+ horizontal ? setProp('width', props.columns || items, props.itemSize, contentPos.x) : setProp('height', items, props.itemSize, contentPos.y);
4671
4785
  }
4672
4786
  }
4673
4787
  };
@@ -4675,7 +4789,6 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4675
4789
  var setContentPosition = function setContentPosition(pos) {
4676
4790
  if (_contentRef.current) {
4677
4791
  var first = pos ? pos.first : firstState;
4678
- var itemSize = props.itemSize;
4679
4792
 
4680
4793
  var calculateTranslateVal = function calculateTranslateVal(_first, _size) {
4681
4794
  return _first * _size;
@@ -4691,9 +4804,9 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4691
4804
  };
4692
4805
 
4693
4806
  if (both) {
4694
- setTransform(calculateTranslateVal(first.cols, itemSize[1]), calculateTranslateVal(first.rows, itemSize[0]));
4807
+ setTransform(calculateTranslateVal(first.cols, props.itemSize[1]), calculateTranslateVal(first.rows, props.itemSize[0]));
4695
4808
  } else {
4696
- var translateVal = calculateTranslateVal(first, itemSize);
4809
+ var translateVal = calculateTranslateVal(first, props.itemSize);
4697
4810
  horizontal ? setTransform(translateVal, 0) : setTransform(0, translateVal);
4698
4811
  }
4699
4812
  }
@@ -4701,7 +4814,6 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4701
4814
 
4702
4815
  var onScrollPositionChange = function onScrollPositionChange(event) {
4703
4816
  var target = event.target;
4704
- var itemSize = props.itemSize;
4705
4817
  var contentPos = getContentPosition();
4706
4818
 
4707
4819
  var calculateScrollPos = function calculateScrollPos(_pos, _cpos) {
@@ -4732,16 +4844,20 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4732
4844
 
4733
4845
  var scrollTop = calculateScrollPos(target.scrollTop, contentPos.top);
4734
4846
  var scrollLeft = calculateScrollPos(target.scrollLeft, contentPos.left);
4735
- var newFirst = 0;
4847
+ var newFirst = both ? {
4848
+ rows: 0,
4849
+ cols: 0
4850
+ } : 0;
4736
4851
  var newLast = lastState;
4737
4852
  var isRangeChanged = false;
4853
+ var newScrollPos = lastScrollPos.current;
4738
4854
 
4739
4855
  if (both) {
4740
4856
  var isScrollDown = lastScrollPos.current.top <= scrollTop;
4741
4857
  var isScrollRight = lastScrollPos.current.left <= scrollLeft;
4742
4858
  var currentIndex = {
4743
- rows: calculateCurrentIndex(scrollTop, itemSize[0]),
4744
- cols: calculateCurrentIndex(scrollLeft, itemSize[1])
4859
+ rows: calculateCurrentIndex(scrollTop, props.itemSize[0]),
4860
+ cols: calculateCurrentIndex(scrollLeft, props.itemSize[1])
4745
4861
  };
4746
4862
  var triggerIndex = {
4747
4863
  rows: calculateTriggerIndex(currentIndex.rows, firstState.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0], isScrollDown),
@@ -4755,8 +4871,8 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4755
4871
  rows: calculateLast(currentIndex.rows, newFirst.rows, lastState.rows, numItemsInViewportState.rows, numToleratedItemsState[0]),
4756
4872
  cols: calculateLast(currentIndex.cols, newFirst.cols, lastState.cols, numItemsInViewportState.cols, numToleratedItemsState[1], true)
4757
4873
  };
4758
- isRangeChanged = newFirst.rows !== firstState.rows && newLast.rows !== lastState.rows || newFirst.cols !== firstState.cols && newLast.cols !== lastState.cols;
4759
- lastScrollPos.current = {
4874
+ isRangeChanged = newFirst.rows !== firstState.rows || newLast.rows !== lastState.rows || newFirst.cols !== firstState.cols || newLast.cols !== lastState.cols;
4875
+ newScrollPos = {
4760
4876
  top: scrollTop,
4761
4877
  left: scrollLeft
4762
4878
  };
@@ -4764,20 +4880,21 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4764
4880
  var scrollPos = horizontal ? scrollLeft : scrollTop;
4765
4881
  var isScrollDownOrRight = lastScrollPos.current <= scrollPos;
4766
4882
 
4767
- var _currentIndex2 = calculateCurrentIndex(scrollPos, itemSize);
4883
+ var _currentIndex2 = calculateCurrentIndex(scrollPos, props.itemSize);
4768
4884
 
4769
4885
  var _triggerIndex2 = calculateTriggerIndex(_currentIndex2, firstState, lastState, numItemsInViewportState, numToleratedItemsState, isScrollDownOrRight);
4770
4886
 
4771
4887
  newFirst = calculateFirst(_currentIndex2, _triggerIndex2, firstState, lastState, numItemsInViewportState, numToleratedItemsState, isScrollDownOrRight);
4772
4888
  newLast = calculateLast(_currentIndex2, newFirst, lastState, numItemsInViewportState, numToleratedItemsState);
4773
- isRangeChanged = newFirst !== firstState && newLast !== lastState;
4774
- lastScrollPos.current = scrollPos;
4889
+ isRangeChanged = newFirst !== firstState || newLast !== lastState;
4890
+ newScrollPos = scrollPos;
4775
4891
  }
4776
4892
 
4777
4893
  return {
4778
4894
  first: newFirst,
4779
4895
  last: newLast,
4780
- isRangeChanged: isRangeChanged
4896
+ isRangeChanged: isRangeChanged,
4897
+ scrollPos: newScrollPos
4781
4898
  };
4782
4899
  };
4783
4900
 
@@ -4785,7 +4902,8 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4785
4902
  var _onScrollPositionChan = onScrollPositionChange(event),
4786
4903
  first = _onScrollPositionChan.first,
4787
4904
  last = _onScrollPositionChan.last,
4788
- isRangeChanged = _onScrollPositionChan.isRangeChanged;
4905
+ isRangeChanged = _onScrollPositionChan.isRangeChanged,
4906
+ scrollPos = _onScrollPositionChan.scrollPos;
4789
4907
 
4790
4908
  if (isRangeChanged) {
4791
4909
  var newState = {
@@ -4795,6 +4913,7 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4795
4913
  setContentPosition(newState);
4796
4914
  setFirstState(first);
4797
4915
  setLastState(last);
4916
+ lastScrollPos.current = scrollPos;
4798
4917
  props.onScrollIndexChange && props.onScrollIndexChange(newState);
4799
4918
 
4800
4919
  if (props.lazy) {
@@ -4821,7 +4940,7 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4821
4940
  scrollTimeout.current = setTimeout(function () {
4822
4941
  onScrollChange(event);
4823
4942
 
4824
- if (loadingState && props.showLoader && !props.lazy) {
4943
+ if (loadingState && props.showLoader && (!props.lazy || props.loading === undefined)) {
4825
4944
  setLoadingState(false);
4826
4945
  }
4827
4946
  }, props.delay);
@@ -4830,10 +4949,32 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4830
4949
  }
4831
4950
  };
4832
4951
 
4952
+ var onResize = function onResize() {
4953
+ if (resizeTimeout.current) {
4954
+ clearTimeout(resizeTimeout.current);
4955
+ }
4956
+
4957
+ resizeTimeout.current = setTimeout(function () {
4958
+ if (elementRef.current) {
4959
+ var _ref = [DomHandler.getWidth(elementRef.current), DomHandler.getHeight(elementRef.current)],
4960
+ width = _ref[0],
4961
+ height = _ref[1];
4962
+ var isDiffWidth = width !== defaultWidth.current,
4963
+ isDiffHeight = height !== defaultHeight.current;
4964
+ var reinit = both ? isDiffWidth || isDiffHeight : horizontal ? isDiffWidth : vertical ? isDiffHeight : false;
4965
+
4966
+ if (reinit) {
4967
+ setNumToleratedItemsState(props.numToleratedItems);
4968
+ defaultWidth.current = width;
4969
+ defaultHeight.current = height;
4970
+ }
4971
+ }
4972
+ }, props.resizeDelay);
4973
+ };
4974
+
4833
4975
  var getOptions = function getOptions(renderedIndex) {
4834
- var first = firstState;
4835
4976
  var count = (props.items || []).length;
4836
- var index = both ? first.rows + renderedIndex : first + renderedIndex;
4977
+ var index = both ? firstState.rows + renderedIndex : firstState + renderedIndex;
4837
4978
  return {
4838
4979
  index: index,
4839
4980
  count: count,
@@ -4871,25 +5012,48 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4871
5012
  };
4872
5013
 
4873
5014
  var init = function init() {
4874
- setSize();
4875
- calculateOptions();
4876
- setSpacerSize();
5015
+ if (!props.disabled) {
5016
+ setSize();
5017
+ calculateOptions();
5018
+ setSpacerSize();
5019
+ }
4877
5020
  };
4878
5021
 
4879
5022
  useMountEffect(function () {
4880
- init();
5023
+ if (!props.disabled) {
5024
+ init();
5025
+ bindWindowResizeListener();
5026
+ bindOrientationChangeListener();
5027
+ defaultWidth.current = DomHandler.getWidth(elementRef.current);
5028
+ defaultHeight.current = DomHandler.getHeight(elementRef.current);
5029
+ }
4881
5030
  });
4882
5031
  useUpdateEffect(function () {
4883
5032
  init();
4884
5033
  }, [props.itemSize, props.scrollHeight]);
5034
+ useUpdateEffect(function () {
5035
+ if (props.numToleratedItems !== numToleratedItemsState) {
5036
+ setNumToleratedItemsState(props.numToleratedItems);
5037
+ }
5038
+ }, [props.numToleratedItems]);
5039
+ useUpdateEffect(function () {
5040
+ if (props.numToleratedItems === numToleratedItemsState) {
5041
+ init(); // reinit after resizing
5042
+ }
5043
+ }, [numToleratedItemsState]);
4885
5044
  useUpdateEffect(function () {
4886
5045
  if (!prevItems || prevItems.length !== (props.items || []).length) {
4887
5046
  init();
4888
5047
  }
4889
5048
 
5049
+ var loading = loadingState;
5050
+
4890
5051
  if (props.lazy && prevLoading !== props.loading && props.loading !== loadingState) {
4891
5052
  setLoadingState(props.loading);
5053
+ loading = props.loading;
4892
5054
  }
5055
+
5056
+ calculateAutoSize(loading);
4893
5057
  });
4894
5058
  useUpdateEffect(function () {
4895
5059
  lastScrollPos.current = both ? {
@@ -4899,6 +5063,7 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4899
5063
  }, [props.orientation]);
4900
5064
  React__namespace.useImperativeHandle(ref, function () {
4901
5065
  return {
5066
+ getElementRef: getElementRef,
4902
5067
  scrollTo: scrollTo,
4903
5068
  scrollToIndex: scrollToIndex,
4904
5069
  scrollInView: scrollInView,
@@ -4930,6 +5095,13 @@ var VirtualScroller = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
4930
5095
  numCols: numItemsInViewportState.cols
4931
5096
  });
4932
5097
  });
5098
+ } else if (props.loaderIconTemplate) {
5099
+ var defaultContentOptions = {
5100
+ className: 'p-virtualscroller-loading-icon',
5101
+ element: content,
5102
+ props: props
5103
+ };
5104
+ content = ObjectUtils.getJSXElement(props.loaderIconTemplate, defaultContentOptions);
4933
5105
  }
4934
5106
 
4935
5107
  return /*#__PURE__*/React__namespace.createElement("div", {
@@ -5052,14 +5224,17 @@ VirtualScroller.defaultProps = {
5052
5224
  orientation: 'vertical',
5053
5225
  numToleratedItems: null,
5054
5226
  delay: 0,
5227
+ resizeDelay: 10,
5055
5228
  lazy: false,
5056
5229
  disabled: false,
5057
5230
  loaderDisabled: false,
5058
5231
  columns: null,
5059
- loading: false,
5232
+ loading: undefined,
5233
+ autoSize: false,
5060
5234
  showSpacer: true,
5061
5235
  showLoader: false,
5062
5236
  loadingTemplate: null,
5237
+ loaderIconTemplate: null,
5063
5238
  itemTemplate: null,
5064
5239
  contentTemplate: null,
5065
5240
  onScroll: null,
@@ -5075,7 +5250,7 @@ var AutoCompletePanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__
5075
5250
  return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
5076
5251
  };
5077
5252
 
5078
- var createGroupChildren = function createGroupChildren(optionGroup, i) {
5253
+ var createGroupChildren = function createGroupChildren(optionGroup, i, style) {
5079
5254
  var groupChildren = props.getOptionGroupChildren(optionGroup);
5080
5255
  return groupChildren.map(function (item, j) {
5081
5256
  var key = i + '_' + j;
@@ -5086,6 +5261,7 @@ var AutoCompletePanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__
5086
5261
  role: "option",
5087
5262
  "aria-selected": selected,
5088
5263
  className: "p-autocomplete-item",
5264
+ style: style,
5089
5265
  onClick: function onClick(e) {
5090
5266
  return props.onItemClick(e, item);
5091
5267
  },
@@ -5096,14 +5272,20 @@ var AutoCompletePanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__
5096
5272
  };
5097
5273
 
5098
5274
  var createItem = function createItem(suggestion, index) {
5275
+ var scrollerOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
5276
+ var style = {
5277
+ height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
5278
+ };
5279
+
5099
5280
  if (props.optionGroupLabel) {
5100
5281
  var content = props.optionGroupTemplate ? ObjectUtils.getJSXElement(props.optionGroupTemplate, suggestion, index) : props.getOptionGroupLabel(suggestion);
5101
- var childrenContent = createGroupChildren(suggestion, index);
5282
+ var childrenContent = createGroupChildren(suggestion, index, style);
5102
5283
  var key = index + '_' + getOptionGroupRenderKey(suggestion);
5103
5284
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
5104
5285
  key: key
5105
5286
  }, /*#__PURE__*/React__namespace.createElement("li", {
5106
- className: "p-autocomplete-item-group"
5287
+ className: "p-autocomplete-item-group",
5288
+ style: style
5107
5289
  }, content), childrenContent);
5108
5290
  } else {
5109
5291
  var _content = props.itemTemplate ? ObjectUtils.getJSXElement(props.itemTemplate, suggestion, index) : props.field ? ObjectUtils.resolveFieldData(suggestion, props.field) : suggestion;
@@ -5113,6 +5295,7 @@ var AutoCompletePanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__
5113
5295
  role: "option",
5114
5296
  "aria-selected": props.selectedItem === suggestion,
5115
5297
  className: "p-autocomplete-item",
5298
+ style: style,
5116
5299
  onClick: function onClick(e) {
5117
5300
  return props.onItemClick(e, suggestion);
5118
5301
  }
@@ -5130,9 +5313,10 @@ var AutoCompletePanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__
5130
5313
  style: _objectSpread$t(_objectSpread$t({}, props.virtualScrollerOptions.style), {
5131
5314
  height: props.scrollHeight
5132
5315
  }),
5316
+ autoSize: true,
5133
5317
  items: props.suggestions,
5134
5318
  itemTemplate: function itemTemplate(item, options) {
5135
- return item && createItem(item, options.index);
5319
+ return item && createItem(item, options.index, options);
5136
5320
  },
5137
5321
  contentTemplate: function contentTemplate(options) {
5138
5322
  var className = classNames('p-autocomplete-items', options.className);
@@ -5314,7 +5498,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5314
5498
  }
5315
5499
 
5316
5500
  if (!preventInputFocus) {
5317
- inputRef.current.focus();
5501
+ DomHandler.focus(inputRef.current);
5318
5502
  hide();
5319
5503
  }
5320
5504
  };
@@ -5379,7 +5563,8 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5379
5563
 
5380
5564
  var onOverlayEntering = function onOverlayEntering() {
5381
5565
  if (props.autoHighlight && props.suggestions && props.suggestions.length) {
5382
- DomHandler.addClass(overlayRef.current.firstChild.firstChild, 'p-highlight');
5566
+ var element = getScrollableElement().firstChild.firstChild;
5567
+ DomHandler.addClass(element, 'p-highlight');
5383
5568
  }
5384
5569
  };
5385
5570
 
@@ -5411,7 +5596,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5411
5596
 
5412
5597
  var onDropdownClick = function onDropdownClick(event) {
5413
5598
  if (props.dropdownAutoFocus) {
5414
- inputRef.current.focus();
5599
+ DomHandler.focus(inputRef.current, props.dropdownAutoFocus);
5415
5600
  }
5416
5601
 
5417
5602
  if (props.dropdownMode === 'blank') search(event, '', 'dropdown');else if (props.dropdownMode === 'current') search(event, inputRef.current.value, 'dropdown');
@@ -5452,7 +5637,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5452
5637
  if (nextElement) {
5453
5638
  DomHandler.addClass(nextElement, 'p-highlight');
5454
5639
  DomHandler.removeClass(highlightItem, 'p-highlight');
5455
- DomHandler.scrollInView(overlayRef.current, nextElement);
5640
+ DomHandler.scrollInView(getScrollableElement(), nextElement);
5456
5641
  }
5457
5642
  } else {
5458
5643
  highlightItem = DomHandler.findSingle(overlayRef.current, 'li');
@@ -5477,7 +5662,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5477
5662
  if (previousElement) {
5478
5663
  DomHandler.addClass(previousElement, 'p-highlight');
5479
5664
  DomHandler.removeClass(highlightItem, 'p-highlight');
5480
- DomHandler.scrollInView(overlayRef.current, previousElement);
5665
+ DomHandler.scrollInView(getScrollableElement(), previousElement);
5481
5666
  }
5482
5667
  }
5483
5668
 
@@ -5489,9 +5674,9 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5489
5674
  if (highlightItem) {
5490
5675
  selectHighlightItem(event, highlightItem);
5491
5676
  hide();
5677
+ event.preventDefault();
5492
5678
  }
5493
5679
 
5494
- event.preventDefault();
5495
5680
  break;
5496
5681
  //escape
5497
5682
 
@@ -5584,7 +5769,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5584
5769
  };
5585
5770
 
5586
5771
  var onMultiContainerClick = function onMultiContainerClick(event) {
5587
- inputRef.current.focus();
5772
+ DomHandler.focus(inputRef.current);
5588
5773
  props.onClick && props.onClick(event);
5589
5774
  };
5590
5775
 
@@ -5610,6 +5795,10 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5610
5795
  }) : -1;
5611
5796
  };
5612
5797
 
5798
+ var getScrollableElement = function getScrollableElement() {
5799
+ return virtualScrollerRef.current ? overlayRef.current.firstChild : overlayRef.current;
5800
+ };
5801
+
5613
5802
  var getOptionGroupLabel = function getOptionGroupLabel(optionGroup) {
5614
5803
  return props.optionGroupLabel ? ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel) : optionGroup;
5615
5804
  };
@@ -5626,8 +5815,8 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5626
5815
  setIdState(UniqueComponentId());
5627
5816
  }
5628
5817
 
5629
- if (props.autoFocus && inputRef.current) {
5630
- inputRef.current.focus();
5818
+ if (props.autoFocus) {
5819
+ DomHandler.focus(inputRef.current, props.autoFocus);
5631
5820
  }
5632
5821
  });
5633
5822
  useUpdateEffect(function () {
@@ -5656,7 +5845,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5656
5845
 
5657
5846
  var createSimpleAutoComplete = function createSimpleAutoComplete() {
5658
5847
  var value = formatValue(props.value);
5659
- var ariaControls = idState + '_list';
5848
+ var ariaControls = overlayVisibleState ? idState + '_list' : null;
5660
5849
  var className = classNames('p-autocomplete-input', props.inputClassName, {
5661
5850
  'p-autocomplete-dd-input': props.dropdown
5662
5851
  });
@@ -5666,10 +5855,13 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5666
5855
  type: props.type,
5667
5856
  name: props.name,
5668
5857
  defaultValue: value,
5669
- role: "searchbox",
5858
+ role: "combobox",
5670
5859
  "aria-autocomplete": "list",
5671
5860
  "aria-controls": ariaControls,
5672
- "aria-labelledby": props.ariaLabelledBy,
5861
+ "aria-haspopup": "listbox",
5862
+ "aria-expanded": overlayVisibleState,
5863
+ "aria-labelledby": props['aria-labelledby'],
5864
+ "aria-label": props['aria-label'],
5673
5865
  className: className,
5674
5866
  style: props.inputStyle,
5675
5867
  autoComplete: "off",
@@ -5716,7 +5908,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5716
5908
  };
5717
5909
 
5718
5910
  var createMultiInput = function createMultiInput() {
5719
- var ariaControls = idState + '_list';
5911
+ var ariaControls = overlayVisibleState ? idState + '_list' : null;
5720
5912
  return /*#__PURE__*/React__namespace.createElement("li", {
5721
5913
  className: "p-autocomplete-input-token"
5722
5914
  }, /*#__PURE__*/React__namespace.createElement("input", {
@@ -5724,10 +5916,13 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5724
5916
  type: props.type,
5725
5917
  disabled: props.disabled,
5726
5918
  placeholder: props.placeholder,
5727
- role: "searchbox",
5919
+ role: "combobox",
5728
5920
  "aria-autocomplete": "list",
5729
5921
  "aria-controls": ariaControls,
5730
- "aria-labelledby": props.ariaLabelledBy,
5922
+ "aria-haspopup": "listbox",
5923
+ "aria-expanded": overlayVisibleState,
5924
+ "aria-labelledby": props['aria-labelledby'],
5925
+ "aria-label": props['aria-label'],
5731
5926
  autoComplete: "off",
5732
5927
  tabIndex: props.tabIndex,
5733
5928
  onChange: onInputChange,
@@ -5804,10 +5999,7 @@ var AutoComplete = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
5804
5999
  ref: elementRef,
5805
6000
  id: idState,
5806
6001
  style: props.style,
5807
- className: className,
5808
- "aria-haspopup": "listbox",
5809
- "aria-expanded": overlayVisibleState,
5810
- "aria-owns": listId
6002
+ className: className
5811
6003
  }, otherProps), input, loader, dropdown, /*#__PURE__*/React__namespace.createElement(AutoCompletePanel, _extends({
5812
6004
  ref: overlayRef,
5813
6005
  virtualScrollerRef: virtualScrollerRef
@@ -5869,13 +6061,14 @@ AutoComplete.defaultProps = {
5869
6061
  autoFocus: false,
5870
6062
  tooltip: null,
5871
6063
  tooltipOptions: null,
5872
- ariaLabelledBy: null,
5873
6064
  completeMethod: null,
5874
6065
  itemTemplate: null,
5875
6066
  selectedItemTemplate: null,
5876
6067
  transitionOptions: null,
5877
6068
  dropdownIcon: 'pi pi-chevron-down',
5878
6069
  removeIcon: 'pi pi-times-circle',
6070
+ 'aria-label': null,
6071
+ 'aria-labelledby': null,
5879
6072
  onChange: null,
5880
6073
  onFocus: null,
5881
6074
  onBlur: null,
@@ -5895,7 +6088,13 @@ AutoComplete.defaultProps = {
5895
6088
 
5896
6089
  var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
5897
6090
  var createContent = function createContent() {
5898
- if (props.label) {
6091
+ if (props.image) {
6092
+ return /*#__PURE__*/React__namespace.createElement("img", {
6093
+ src: props.image,
6094
+ alt: props.imageAlt,
6095
+ onError: props.onImageError
6096
+ });
6097
+ } else if (props.label) {
5899
6098
  return /*#__PURE__*/React__namespace.createElement("span", {
5900
6099
  className: "p-avatar-text"
5901
6100
  }, props.label);
@@ -5905,12 +6104,6 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
5905
6104
  }, {
5906
6105
  props: props
5907
6106
  });
5908
- } else if (props.image) {
5909
- return /*#__PURE__*/React__namespace.createElement("img", {
5910
- src: props.image,
5911
- alt: props.imageAlt,
5912
- onError: props.onImageError
5913
- });
5914
6107
  }
5915
6108
 
5916
6109
  return null;
@@ -5963,8 +6156,8 @@ AvatarGroup.defaultProps = {
5963
6156
  var Badge = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
5964
6157
  var otherProps = ObjectUtils.findDiffKeys(props, Badge.defaultProps);
5965
6158
  var className = classNames('p-badge p-component', _defineProperty({
5966
- 'p-badge-no-gutter': props.value && String(props.value).length === 1,
5967
- 'p-badge-dot': !props.value,
6159
+ 'p-badge-no-gutter': ObjectUtils.isNotEmpty(props.value) && String(props.value).length === 1,
6160
+ 'p-badge-dot': ObjectUtils.isEmpty(props.value),
5968
6161
  'p-badge-lg': props.size === 'large',
5969
6162
  'p-badge-xl': props.size === 'xlarge'
5970
6163
  }, "p-badge-".concat(props.severity), props.severity !== null), props.className);
@@ -6121,7 +6314,8 @@ var BreadCrumb = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
6121
6314
  url = home.url,
6122
6315
  disabled = home.disabled,
6123
6316
  style = home.style,
6124
- _className = home.className;
6317
+ _className = home.className,
6318
+ template = home.template;
6125
6319
 
6126
6320
  var _className2 = classNames('p-breadcrumb-home', {
6127
6321
  'p-disabled': disabled
@@ -6132,10 +6326,7 @@ var BreadCrumb = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
6132
6326
  }, {
6133
6327
  props: props
6134
6328
  });
6135
- return /*#__PURE__*/React__namespace.createElement("li", {
6136
- className: _className2,
6137
- style: style
6138
- }, /*#__PURE__*/React__namespace.createElement("a", {
6329
+ var content = /*#__PURE__*/React__namespace.createElement("a", {
6139
6330
  href: url || '#',
6140
6331
  className: "p-menuitem-link",
6141
6332
  "aria-disabled": disabled,
@@ -6143,7 +6334,25 @@ var BreadCrumb = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
6143
6334
  onClick: function onClick(event) {
6144
6335
  return itemClick(event, home);
6145
6336
  }
6146
- }, icon));
6337
+ }, icon);
6338
+
6339
+ if (template) {
6340
+ var defaultContentOptions = {
6341
+ onClick: function onClick(event) {
6342
+ return itemClick(event, home);
6343
+ },
6344
+ className: 'p-menuitem-link',
6345
+ labelClassName: 'p-menuitem-text',
6346
+ element: content,
6347
+ props: props
6348
+ };
6349
+ content = ObjectUtils.getJSXElement(template, home, defaultContentOptions);
6350
+ }
6351
+
6352
+ return /*#__PURE__*/React__namespace.createElement("li", {
6353
+ className: _className2,
6354
+ style: style
6355
+ }, content);
6147
6356
  }
6148
6357
 
6149
6358
  return null;
@@ -6298,6 +6507,7 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
6298
6507
  var overlayEventListener = React__namespace.useRef(null);
6299
6508
  var touchUIMaskClickListener = React__namespace.useRef(null);
6300
6509
  var isOverlayClicked = React__namespace.useRef(false);
6510
+ var ignoreMaskChange = React__namespace.useRef(false);
6301
6511
 
6302
6512
  var _React$useState7 = React__namespace.useState('date'),
6303
6513
  _React$useState8 = _slicedToArray(_React$useState7, 2),
@@ -6417,7 +6627,7 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
6417
6627
  var reFocusInputField = function reFocusInputField() {
6418
6628
  if (!props.inline && inputRef.current) {
6419
6629
  ignoreFocusFunctionality.current = true;
6420
- inputRef.current.focus();
6630
+ DomHandler.focus(inputRef.current);
6421
6631
  }
6422
6632
  };
6423
6633
 
@@ -6990,7 +7200,11 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
6990
7200
  var currentTime = getCurrentDateTime();
6991
7201
  var currentHour = currentTime.getHours();
6992
7202
  var newHour = currentHour >= 12 ? currentHour - 12 : currentHour + 12;
6993
- updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());
7203
+
7204
+ if (validateHour(convertTo24Hour(newHour, !(currentHour > 11)), currentTime)) {
7205
+ updateTime(event, newHour, currentTime.getMinutes(), currentTime.getSeconds(), currentTime.getMilliseconds());
7206
+ }
7207
+
6994
7208
  event.preventDefault();
6995
7209
  };
6996
7210
 
@@ -7027,6 +7241,14 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
7027
7241
  return date instanceof Date && !isNaN(date);
7028
7242
  };
7029
7243
 
7244
+ var convertTo24Hour = function convertTo24Hour(hour, pm) {
7245
+ if (props.hourFormat == '12') {
7246
+ return hour === 12 ? pm ? 12 : 0 : pm ? hour + 12 : hour;
7247
+ }
7248
+
7249
+ return hour;
7250
+ };
7251
+
7030
7252
  var validateHour = function validateHour(hour, value) {
7031
7253
  var valid = true;
7032
7254
  var valueDateString = value ? value.toDateString() : null;
@@ -7191,6 +7413,56 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
7191
7413
  viewStateChanged.current = true;
7192
7414
  setViewDateState(value);
7193
7415
  }
7416
+
7417
+ setCurrentMonth(value.getMonth());
7418
+ setCurrentYear(value.getFullYear());
7419
+ };
7420
+
7421
+ var setNavigationState = function setNavigationState(newViewDate) {
7422
+ if (!props.showMinMaxRange || props.view !== 'date' || !overlayRef.current) {
7423
+ return;
7424
+ }
7425
+
7426
+ var navPrev = DomHandler.findSingle(overlayRef.current, '.p-datepicker-prev');
7427
+ var navNext = DomHandler.findSingle(overlayRef.current, '.p-datepicker-next');
7428
+
7429
+ if (props.disabled) {
7430
+ DomHandler.addClass(navPrev, 'p-disabled');
7431
+ DomHandler.addClass(navNext, 'p-disabled');
7432
+ return;
7433
+ } // previous (check first day of month at 00:00:00)
7434
+
7435
+
7436
+ if (props.minDate) {
7437
+ var firstDayOfMonth = new Date(newViewDate.getTime());
7438
+ firstDayOfMonth.setDate(1);
7439
+ firstDayOfMonth.setHours(0);
7440
+ firstDayOfMonth.setMinutes(0);
7441
+ firstDayOfMonth.setSeconds(0);
7442
+
7443
+ if (props.minDate > firstDayOfMonth) {
7444
+ DomHandler.addClass(navPrev, 'p-disabled');
7445
+ } else {
7446
+ DomHandler.removeClass(navPrev, 'p-disabled');
7447
+ }
7448
+ } // next (check last day of month at 11:59:59)
7449
+
7450
+
7451
+ if (props.maxDate) {
7452
+ var lastDayOfMonth = new Date(newViewDate.getTime());
7453
+ lastDayOfMonth.setMonth(lastDayOfMonth.getMonth() + 1);
7454
+ lastDayOfMonth.setDate(1);
7455
+ lastDayOfMonth.setHours(0);
7456
+ lastDayOfMonth.setMinutes(0);
7457
+ lastDayOfMonth.setSeconds(0);
7458
+ lastDayOfMonth.setSeconds(-1);
7459
+
7460
+ if (props.maxDate < lastDayOfMonth) {
7461
+ DomHandler.addClass(navNext, 'p-disabled');
7462
+ } else {
7463
+ DomHandler.removeClass(navNext, 'p-disabled');
7464
+ }
7465
+ }
7194
7466
  };
7195
7467
 
7196
7468
  var onDateCellKeydown = function onDateCellKeydown(event, date, groupIndex) {
@@ -7518,6 +7790,8 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
7518
7790
  setCurrentMonth(month);
7519
7791
  createMonthsMeta(month, currentYear);
7520
7792
  var currentDate = new Date(getCurrentDateTime().getTime());
7793
+ currentDate.setDate(1); // #2948 always set to 1st of month
7794
+
7521
7795
  currentDate.setMonth(month);
7522
7796
  currentDate.setYear(currentYear);
7523
7797
  setViewDateState(currentDate);
@@ -8628,7 +8902,11 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
8628
8902
  mask: props.mask,
8629
8903
  readOnly: props.readOnlyInput || props.disabled,
8630
8904
  onChange: function onChange(e) {
8631
- return updateValueOnInput(e.originalEvent, e.value);
8905
+ !ignoreMaskChange.current && updateValueOnInput(e.originalEvent, e.value);
8906
+ ignoreMaskChange.current = false;
8907
+ },
8908
+ onBlur: function onBlur() {
8909
+ ignoreMaskChange.current = true;
8632
8910
  }
8633
8911
  });
8634
8912
  }
@@ -8668,7 +8946,10 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
8668
8946
  updateInputfield(props.value);
8669
8947
  }, [props.dateFormat, props.hourFormat, props.timeOnly, props.showSeconds, props.showMillisec]);
8670
8948
  useUpdateEffect(function () {
8671
- overlayRef.current && updateFocus();
8949
+ if (overlayRef.current) {
8950
+ setNavigationState(viewDateState);
8951
+ updateFocus();
8952
+ }
8672
8953
  });
8673
8954
  useUnmountEffect(function () {
8674
8955
  if (touchUIMask.current) {
@@ -8726,7 +9007,7 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
8726
9007
  }), /*#__PURE__*/React__namespace.createElement(Ripple, null));
8727
9008
  };
8728
9009
 
8729
- var createTitleMonthElement = function createTitleMonthElement() {
9010
+ var createTitleMonthElement = function createTitleMonthElement(month) {
8730
9011
  var monthNames = localeOption('monthNames', props.locale);
8731
9012
 
8732
9013
  if (props.monthNavigator && props.view !== 'month') {
@@ -8778,7 +9059,7 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
8778
9059
  className: "p-datepicker-month p-link",
8779
9060
  onClick: switchToMonthView,
8780
9061
  disabled: switchViewButtonDisabled()
8781
- }, monthNames[currentMonth]);
9062
+ }, monthNames[month]);
8782
9063
  };
8783
9064
 
8784
9065
  var createTitleYearElement = function createTitleYearElement() {
@@ -9394,7 +9675,7 @@ var Calendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
9394
9675
  onExit: onOverlayExit,
9395
9676
  onExited: onOverlayExited,
9396
9677
  transitionOptions: props.transitionOptions
9397
- }, datePicker, timePicker, buttonBar, footer, monthPicker, yearPicker));
9678
+ }, datePicker, timePicker, monthPicker, yearPicker, buttonBar, footer));
9398
9679
  }));
9399
9680
  Calendar.displayName = 'Calendar';
9400
9681
  Calendar.defaultProps = {
@@ -9451,6 +9732,7 @@ Calendar.defaultProps = {
9451
9732
  minDate: null,
9452
9733
  maxDate: null,
9453
9734
  maxDateCount: null,
9735
+ showMinMaxRange: false,
9454
9736
  showOtherMonths: true,
9455
9737
  selectOtherMonths: false,
9456
9738
  showButtonBar: false,
@@ -9532,6 +9814,7 @@ var Captcha = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
9532
9814
 
9533
9815
  script.onload = function () {
9534
9816
  if (!window.grecaptcha) {
9817
+ // eslint-disable-next-line no-console
9535
9818
  console.warn('Recaptcha is not loaded');
9536
9819
  return;
9537
9820
  }
@@ -9694,10 +9977,10 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
9694
9977
  var prevPage = usePrevious(props.page);
9695
9978
  var isVertical = props.orientation === 'vertical';
9696
9979
  var circular = props.circular || !!props.autoplayInterval;
9697
- var isCircular = circular && props.value.length >= numVisibleState;
9698
- var isAutoplay = props.autoplayInterval && allowAutoplay.current;
9980
+ var isCircular = circular && props.value && props.value.length >= numVisibleState;
9699
9981
  var currentPage = props.onPageChange ? props.page : pageState;
9700
- var totalIndicators = props.value ? Math.ceil((props.value.length - numVisibleState) / numScrollState) + 1 : 0;
9982
+ var totalIndicators = props.value ? Math.max(Math.ceil((props.value.length - numVisibleState) / numScrollState) + 1, 0) : 0;
9983
+ var isAutoplay = totalIndicators && props.autoplayInterval && allowAutoplay.current;
9701
9984
 
9702
9985
  var _useResizeListener = useResizeListener({
9703
9986
  listener: function listener() {
@@ -10131,14 +10414,14 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
10131
10414
  'pi-chevron-left': !isVertical,
10132
10415
  'pi-chevron-up': isVertical
10133
10416
  });
10134
- return /*#__PURE__*/React__namespace.createElement("button", {
10417
+ return /*#__PURE__*/React__namespace.createElement(Button, {
10135
10418
  type: "button",
10136
10419
  className: className,
10420
+ icon: iconClassName,
10137
10421
  onClick: navBackward,
10138
- disabled: isDisabled
10139
- }, /*#__PURE__*/React__namespace.createElement("span", {
10140
- className: iconClassName
10141
- }), /*#__PURE__*/React__namespace.createElement(Ripple, null));
10422
+ disabled: isDisabled,
10423
+ "aria-label": ariaLabel('previousPageLabel')
10424
+ });
10142
10425
  };
10143
10426
 
10144
10427
  var createForwardNavigator = function createForwardNavigator() {
@@ -10150,14 +10433,14 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
10150
10433
  'pi-chevron-right': !isVertical,
10151
10434
  'pi-chevron-down': isVertical
10152
10435
  });
10153
- return /*#__PURE__*/React__namespace.createElement("button", {
10436
+ return /*#__PURE__*/React__namespace.createElement(Button, {
10154
10437
  type: "button",
10155
10438
  className: className,
10439
+ icon: iconClassName,
10156
10440
  onClick: navForward,
10157
- disabled: isDisabled
10158
- }, /*#__PURE__*/React__namespace.createElement("span", {
10159
- className: iconClassName
10160
- }), /*#__PURE__*/React__namespace.createElement(Ripple, null));
10441
+ disabled: isDisabled,
10442
+ "aria-label": ariaLabel('nextPageLabel')
10443
+ });
10161
10444
  };
10162
10445
 
10163
10446
  var createIndicator = function createIndicator(index) {
@@ -10169,13 +10452,14 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
10169
10452
  return /*#__PURE__*/React__namespace.createElement("li", {
10170
10453
  key: key,
10171
10454
  className: className
10172
- }, /*#__PURE__*/React__namespace.createElement("button", {
10455
+ }, /*#__PURE__*/React__namespace.createElement(Button, {
10173
10456
  type: "button",
10174
10457
  className: "p-link",
10175
10458
  onClick: function onClick(e) {
10176
10459
  return onDotClick(e, index);
10177
- }
10178
- }, /*#__PURE__*/React__namespace.createElement(Ripple, null)));
10460
+ },
10461
+ "aria-label": "".concat(ariaLabel('pageLabel'), " ").concat(index + 1)
10462
+ }));
10179
10463
  };
10180
10464
 
10181
10465
  var createIndicators = function createIndicators() {
@@ -10515,7 +10799,7 @@ var CascadeSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
10515
10799
 
10516
10800
  updateSelectionPath();
10517
10801
  hide();
10518
- inputRef.current.focus();
10802
+ DomHandler.focus(inputRef.current);
10519
10803
  };
10520
10804
 
10521
10805
  var onOptionGroupSelect = function onOptionGroupSelect(event) {
@@ -10524,7 +10808,8 @@ var CascadeSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
10524
10808
  };
10525
10809
 
10526
10810
  var getOptionLabel = function getOptionLabel(option) {
10527
- return props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option;
10811
+ var label = props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option;
10812
+ return label || option;
10528
10813
  };
10529
10814
 
10530
10815
  var getOptionValue = function getOptionValue(option) {
@@ -10600,7 +10885,7 @@ var CascadeSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
10600
10885
  }
10601
10886
 
10602
10887
  if (!overlayRef.current || !overlayRef.current.contains(event.target)) {
10603
- inputRef.current.focus();
10888
+ DomHandler.focus(inputRef.current);
10604
10889
  overlayVisibleState ? hide() : show();
10605
10890
  }
10606
10891
  };
@@ -10654,7 +10939,7 @@ var CascadeSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
10654
10939
  var hide = function hide() {
10655
10940
  props.onBeforeHide && props.onBeforeHide();
10656
10941
  setOverlayVisibleState(false);
10657
- inputRef.current.focus();
10942
+ DomHandler.focus(inputRef.current);
10658
10943
  };
10659
10944
 
10660
10945
  var onOverlayEnter = function onOverlayEnter() {
@@ -10846,13 +11131,19 @@ var Chart = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
10846
11131
  chartRef.current = null;
10847
11132
  }
10848
11133
 
10849
- if (module && module["default"]) {
10850
- chartRef.current = new module["default"](canvasRef.current, {
10851
- type: props.type,
10852
- data: props.data,
10853
- options: props.options,
10854
- plugins: props.plugins
10855
- });
11134
+ var configuration = {
11135
+ type: props.type,
11136
+ data: props.data,
11137
+ options: props.options,
11138
+ plugins: props.plugins
11139
+ };
11140
+
11141
+ if (module) {
11142
+ if (module["default"]) {
11143
+ chartRef.current = new module["default"](canvasRef.current, configuration);
11144
+ } else {
11145
+ chartRef.current = new module(canvasRef.current, configuration);
11146
+ }
10856
11147
  }
10857
11148
  });
10858
11149
  };
@@ -10946,8 +11237,7 @@ var Checkbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
10946
11237
  }
10947
11238
  });
10948
11239
  inputRef.current.checked = !_checked;
10949
- inputRef.current.focus();
10950
- event.preventDefault();
11240
+ DomHandler.focus(inputRef.current);
10951
11241
  }
10952
11242
  };
10953
11243
 
@@ -11208,12 +11498,17 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
11208
11498
  };
11209
11499
 
11210
11500
  var onWrapperClick = function onWrapperClick() {
11211
- inputRef.current.focus();
11501
+ DomHandler.focus(inputRef.current);
11212
11502
  };
11213
11503
 
11214
11504
  var onKeyDown = function onKeyDown(event) {
11215
11505
  var inputValue = event.target.value;
11216
11506
  var values = props.value || [];
11507
+ props.onKeyDown && props.onKeyDown(event); // do not continue if the user defined keydown wants to prevent
11508
+
11509
+ if (event.defaultPrevented) {
11510
+ return;
11511
+ }
11217
11512
 
11218
11513
  switch (event.which) {
11219
11514
  //backspace
@@ -11233,6 +11528,10 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
11233
11528
  break;
11234
11529
 
11235
11530
  default:
11531
+ if (props.keyfilter) {
11532
+ KeyFilter.onKeyPress(event, props.keyfilter);
11533
+ }
11534
+
11236
11535
  if (isMaxedOut()) {
11237
11536
  event.preventDefault();
11238
11537
  } else if (props.separator === ',' && event.which === 188) {
@@ -11266,6 +11565,10 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
11266
11565
  if (props.separator) {
11267
11566
  var pastedData = (event.clipboardData || window['clipboardData']).getData('Text');
11268
11567
 
11568
+ if (props.keyfilter) {
11569
+ KeyFilter.onPaste(event, props.keyfilter);
11570
+ }
11571
+
11269
11572
  if (pastedData) {
11270
11573
  var values = props.value || [];
11271
11574
  var pastedValues = pastedData.split(props.separator);
@@ -11408,11 +11711,13 @@ Chips.defaultProps = {
11408
11711
  separator: null,
11409
11712
  allowDuplicate: true,
11410
11713
  itemTemplate: null,
11714
+ keyfilter: null,
11411
11715
  onAdd: null,
11412
11716
  onRemove: null,
11413
11717
  onChange: null,
11414
11718
  onFocus: null,
11415
- onBlur: null
11719
+ onBlur: null,
11720
+ onKeyDown: null
11416
11721
  };
11417
11722
 
11418
11723
  var ColorPickerPanel = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
@@ -12101,7 +12406,8 @@ Column.defaultProps = {
12101
12406
  rowReorderIcon: 'pi pi-bars',
12102
12407
  rowEditor: false,
12103
12408
  exportable: true,
12104
- reorderable: true
12409
+ reorderable: true,
12410
+ resizeable: true
12105
12411
  };
12106
12412
 
12107
12413
  var ColumnGroup = function ColumnGroup() {};
@@ -12457,7 +12763,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
12457
12763
  return param.hasBlockScroll;
12458
12764
  });
12459
12765
 
12460
- if (!hasBlockScroll) {
12766
+ if (hasBlockScroll) {
12461
12767
  DomHandler.removeClass(document.body, 'p-overflow-hidden');
12462
12768
  }
12463
12769
  } else if (props.blockScroll || props.maximizable && maximized) {
@@ -12603,9 +12909,11 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
12603
12909
  var icons = ObjectUtils.getJSXElement(props.icons, props);
12604
12910
  var header = ObjectUtils.getJSXElement(props.header, props);
12605
12911
  var headerId = idState + '_header';
12912
+ var headerClassName = classNames('p-dialog-header', props.headerClassName);
12606
12913
  return /*#__PURE__*/React__namespace.createElement("div", {
12607
12914
  ref: headerRef,
12608
- className: "p-dialog-header",
12915
+ style: props.headerStyle,
12916
+ className: headerClassName,
12609
12917
  onMouseDown: onDragStart
12610
12918
  }, /*#__PURE__*/React__namespace.createElement("div", {
12611
12919
  id: headerId,
@@ -12639,7 +12947,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
12639
12947
 
12640
12948
  var createResizer = function createResizer() {
12641
12949
  if (props.resizable) {
12642
- return /*#__PURE__*/React__namespace.createElement("div", {
12950
+ return /*#__PURE__*/React__namespace.createElement("span", {
12643
12951
  className: "p-resizable-handle",
12644
12952
  style: {
12645
12953
  zIndex: 90
@@ -12727,6 +13035,8 @@ Dialog.defaultProps = {
12727
13035
  modal: true,
12728
13036
  onHide: null,
12729
13037
  onShow: null,
13038
+ headerStyle: null,
13039
+ headerClassName: null,
12730
13040
  contentStyle: null,
12731
13041
  contentClassName: null,
12732
13042
  closeOnEscape: true,
@@ -13430,6 +13740,7 @@ var ContextMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
13430
13740
  return /*#__PURE__*/React__namespace.createElement("li", {
13431
13741
  key: key,
13432
13742
  role: "none",
13743
+ id: item.id,
13433
13744
  className: className,
13434
13745
  style: item.style,
13435
13746
  onMouseEnter: function onMouseEnter(event) {
@@ -13958,14 +14269,14 @@ var FirstPageLink = /*#__PURE__*/React__namespace.memo(function (props) {
13958
14269
  'p-disabled': props.disabled
13959
14270
  });
13960
14271
  var iconClassName = 'p-paginator-icon pi pi-angle-double-left';
13961
- var element = /*#__PURE__*/React__namespace.createElement("button", {
14272
+ var element = /*#__PURE__*/React__namespace.createElement(Button, {
13962
14273
  type: "button",
13963
14274
  className: className,
14275
+ icon: iconClassName,
13964
14276
  onClick: props.onClick,
13965
- disabled: props.disabled
13966
- }, /*#__PURE__*/React__namespace.createElement("span", {
13967
- className: iconClassName
13968
- }), /*#__PURE__*/React__namespace.createElement(Ripple, null));
14277
+ disabled: props.disabled,
14278
+ "aria-label": ariaLabel('firstPageLabel')
14279
+ });
13969
14280
 
13970
14281
  if (props.template) {
13971
14282
  var defaultOptions = {
@@ -14192,21 +14503,36 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
14192
14503
  if (inputRef.current) {
14193
14504
  var step = props.step * dir;
14194
14505
  var currentValue = parseValue(inputRef.current.value) || 0;
14195
- var newValue = validateValue(currentValue + step);
14196
- updateInput(newValue, null, 'spin');
14506
+ var newValue = validateValue(currentValue + step); // touch devices trigger the keyboard to display because of setSelectionRange
14507
+
14508
+ !DomHandler.isTouchDevice() && updateInput(newValue, null, 'spin');
14197
14509
  updateModel(event, newValue);
14198
14510
  handleOnChange(event, currentValue, newValue);
14199
14511
  }
14200
14512
  };
14201
14513
 
14514
+ var onUpButtonTouchStart = function onUpButtonTouchStart(event) {
14515
+ if (!props.disabled && !props.readOnly) {
14516
+ repeat(event, null, 1);
14517
+ event.preventDefault();
14518
+ }
14519
+ };
14520
+
14202
14521
  var onUpButtonMouseDown = function onUpButtonMouseDown(event) {
14203
14522
  if (!props.disabled && !props.readOnly) {
14204
- inputRef.current.focus();
14523
+ props.autoFocus && DomHandler.focus(inputRef.current, props.autoFocus);
14205
14524
  repeat(event, null, 1);
14206
14525
  event.preventDefault();
14207
14526
  }
14208
14527
  };
14209
14528
 
14529
+ var onUpButtonTouchEnd = function onUpButtonTouchEnd() {
14530
+ if (!props.disabled && !props.readOnly) {
14531
+ clearTimer();
14532
+ event.preventDefault();
14533
+ }
14534
+ };
14535
+
14210
14536
  var onUpButtonMouseUp = function onUpButtonMouseUp() {
14211
14537
  if (!props.disabled && !props.readOnly) {
14212
14538
  clearTimer();
@@ -14231,9 +14557,23 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
14231
14557
  }
14232
14558
  };
14233
14559
 
14560
+ var onDownButtonTouchStart = function onDownButtonTouchStart(event) {
14561
+ if (!props.disabled && !props.readOnly) {
14562
+ repeat(event, null, -1);
14563
+ event.preventDefault();
14564
+ }
14565
+ };
14566
+
14567
+ var onDownButtonTouchEnd = function onDownButtonTouchEnd() {
14568
+ if (!props.disabled && !props.readOnly) {
14569
+ clearTimer();
14570
+ event.preventDefault();
14571
+ }
14572
+ };
14573
+
14234
14574
  var onDownButtonMouseDown = function onDownButtonMouseDown(event) {
14235
14575
  if (!props.disabled && !props.readOnly) {
14236
- inputRef.current.focus();
14576
+ props.autoFocus && DomHandler.focus(inputRef.current, props.autoFocus);
14237
14577
  repeat(event, null, -1);
14238
14578
  event.preventDefault();
14239
14579
  }
@@ -14977,6 +15317,8 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
14977
15317
  onMouseUp: onUpButtonMouseUp,
14978
15318
  onKeyDown: onUpButtonKeyDown,
14979
15319
  onKeyUp: onUpButtonKeyUp,
15320
+ onTouchStart: onUpButtonTouchStart,
15321
+ onTouchEnd: onUpButtonTouchEnd,
14980
15322
  disabled: props.disabled,
14981
15323
  tabIndex: -1
14982
15324
  }, /*#__PURE__*/React__namespace.createElement("span", {
@@ -14997,6 +15339,8 @@ var InputNumber = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
14997
15339
  onMouseUp: onDownButtonMouseUp,
14998
15340
  onKeyDown: onDownButtonKeyDown,
14999
15341
  onKeyUp: onDownButtonKeyUp,
15342
+ onTouchStart: onDownButtonTouchStart,
15343
+ onTouchEnd: onDownButtonTouchEnd,
15000
15344
  disabled: props.disabled,
15001
15345
  tabIndex: -1
15002
15346
  }, /*#__PURE__*/React__namespace.createElement("span", {
@@ -15136,14 +15480,14 @@ var LastPageLink = /*#__PURE__*/React__namespace.memo(function (props) {
15136
15480
  'p-disabled': props.disabled
15137
15481
  });
15138
15482
  var iconClassName = 'p-paginator-icon pi pi-angle-double-right';
15139
- var element = /*#__PURE__*/React__namespace.createElement("button", {
15483
+ var element = /*#__PURE__*/React__namespace.createElement(Button, {
15140
15484
  type: "button",
15141
15485
  className: className,
15486
+ icon: iconClassName,
15142
15487
  onClick: props.onClick,
15143
- disabled: props.disabled
15144
- }, /*#__PURE__*/React__namespace.createElement("span", {
15145
- className: iconClassName
15146
- }), /*#__PURE__*/React__namespace.createElement(Ripple, null));
15488
+ disabled: props.disabled,
15489
+ "aria-label": ariaLabel('lastPageLabel')
15490
+ });
15147
15491
 
15148
15492
  if (props.template) {
15149
15493
  var defaultOptions = {
@@ -15172,14 +15516,14 @@ var NextPageLink = /*#__PURE__*/React__namespace.memo(function (props) {
15172
15516
  'p-disabled': props.disabled
15173
15517
  });
15174
15518
  var iconClassName = 'p-paginator-icon pi pi-angle-right';
15175
- var element = /*#__PURE__*/React__namespace.createElement("button", {
15519
+ var element = /*#__PURE__*/React__namespace.createElement(Button, {
15176
15520
  type: "button",
15177
15521
  className: className,
15522
+ icon: iconClassName,
15178
15523
  onClick: props.onClick,
15179
- disabled: props.disabled
15180
- }, /*#__PURE__*/React__namespace.createElement("span", {
15181
- className: iconClassName
15182
- }), /*#__PURE__*/React__namespace.createElement(Ripple, null));
15524
+ disabled: props.disabled,
15525
+ "aria-label": ariaLabel('nextPageLabel')
15526
+ });
15183
15527
 
15184
15528
  if (props.template) {
15185
15529
  var defaultOptions = {
@@ -15226,13 +15570,14 @@ var PageLinks = /*#__PURE__*/React__namespace.memo(function (props) {
15226
15570
  'p-paginator-page-end': pageLink === endPageInView,
15227
15571
  'p-highlight': pageLink - 1 === props.page
15228
15572
  });
15229
- var element = /*#__PURE__*/React__namespace.createElement("button", {
15573
+ var element = /*#__PURE__*/React__namespace.createElement(Button, {
15230
15574
  type: "button",
15231
15575
  className: className,
15232
15576
  onClick: function onClick(e) {
15233
15577
  return onPageLinkClick(e, pageLink);
15234
- }
15235
- }, pageLink, /*#__PURE__*/React__namespace.createElement(Ripple, null));
15578
+ },
15579
+ "aria-label": "".concat(ariaLabel('pageLabel'), " ").concat(pageLink + 1)
15580
+ }, pageLink);
15236
15581
 
15237
15582
  if (props.template) {
15238
15583
  var defaultOptions = {
@@ -15279,14 +15624,14 @@ var PrevPageLink = /*#__PURE__*/React__namespace.memo(function (props) {
15279
15624
  'p-disabled': props.disabled
15280
15625
  });
15281
15626
  var iconClassName = 'p-paginator-icon pi pi-angle-left';
15282
- var element = /*#__PURE__*/React__namespace.createElement("button", {
15627
+ var element = /*#__PURE__*/React__namespace.createElement(Button, {
15283
15628
  type: "button",
15284
15629
  className: className,
15630
+ icon: iconClassName,
15285
15631
  onClick: props.onClick,
15286
- disabled: props.disabled
15287
- }, /*#__PURE__*/React__namespace.createElement("span", {
15288
- className: iconClassName
15289
- }), /*#__PURE__*/React__namespace.createElement(Ripple, null));
15632
+ disabled: props.disabled,
15633
+ "aria-label": ariaLabel('previousPageLabel')
15634
+ });
15290
15635
 
15291
15636
  if (props.template) {
15292
15637
  var defaultOptions = {
@@ -15328,6 +15673,7 @@ var DropdownItem = /*#__PURE__*/React__namespace.memo(function (props) {
15328
15673
  var content = props.template ? ObjectUtils.getJSXElement(props.template, props.option) : props.label;
15329
15674
  return /*#__PURE__*/React__namespace.createElement("li", {
15330
15675
  className: className,
15676
+ style: props.style,
15331
15677
  onClick: onClick,
15332
15678
  "aria-label": props.label,
15333
15679
  key: props.label,
@@ -15362,7 +15708,7 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
15362
15708
  var onEntered = function onEntered() {
15363
15709
  props.onEntered(function () {
15364
15710
  if (props.filter && props.filterInputAutoFocus) {
15365
- filterInputRef.current.focus();
15711
+ DomHandler.focus(filterInputRef.current, false);
15366
15712
  }
15367
15713
  });
15368
15714
  };
@@ -15372,7 +15718,7 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
15372
15718
  props.onFilterInputChange && props.onFilterInputChange(event);
15373
15719
  };
15374
15720
 
15375
- var createGroupChildren = function createGroupChildren(optionGroup) {
15721
+ var createGroupChildren = function createGroupChildren(optionGroup, style) {
15376
15722
  var groupChildren = props.getOptionGroupChildren(optionGroup);
15377
15723
  return groupChildren.map(function (option, j) {
15378
15724
  var optionLabel = props.getOptionLabel(option);
@@ -15382,6 +15728,7 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
15382
15728
  key: optionKey,
15383
15729
  label: optionLabel,
15384
15730
  option: option,
15731
+ style: style,
15385
15732
  template: props.itemTemplate,
15386
15733
  selected: props.isSelected(option),
15387
15734
  disabled: disabled,
@@ -15398,14 +15745,20 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
15398
15745
  };
15399
15746
 
15400
15747
  var createItem = function createItem(option, index) {
15748
+ var scrollerOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
15749
+ var style = {
15750
+ height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
15751
+ };
15752
+
15401
15753
  if (props.optionGroupLabel) {
15402
15754
  var groupContent = props.optionGroupTemplate ? ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : props.getOptionGroupLabel(option);
15403
- var groupChildrenContent = createGroupChildren(option);
15755
+ var groupChildrenContent = createGroupChildren(option, style);
15404
15756
  var key = index + '_' + props.getOptionGroupRenderKey(option);
15405
15757
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
15406
15758
  key: key
15407
15759
  }, /*#__PURE__*/React__namespace.createElement("li", {
15408
- className: "p-dropdown-item-group"
15760
+ className: "p-dropdown-item-group",
15761
+ style: style
15409
15762
  }, groupContent), groupChildrenContent);
15410
15763
  } else {
15411
15764
  var optionLabel = props.getOptionLabel(option);
@@ -15415,6 +15768,7 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
15415
15768
  key: optionKey,
15416
15769
  label: optionLabel,
15417
15770
  option: option,
15771
+ style: style,
15418
15772
  template: props.itemTemplate,
15419
15773
  selected: props.isSelected(option),
15420
15774
  disabled: disabled,
@@ -15439,7 +15793,7 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
15439
15793
  className: "p-dropdown-filter-clear-icon pi pi-times",
15440
15794
  onClick: function onClick() {
15441
15795
  return props.onFilterClearIconClick(function () {
15442
- return filterInputRef.current.focus();
15796
+ return DomHandler.focus(filterInputRef.current);
15443
15797
  });
15444
15798
  }
15445
15799
  });
@@ -15483,13 +15837,14 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
15483
15837
  }),
15484
15838
  className: classNames('p-dropdown-items-wrapper', props.virtualScrollerOptions.className),
15485
15839
  items: props.visibleOptions,
15840
+ autoSize: true,
15486
15841
  onLazyLoad: function onLazyLoad(event) {
15487
15842
  return props.virtualScrollerOptions.onLazyLoad(_objectSpread$o(_objectSpread$o({}, event), {
15488
15843
  filter: props.filterValue
15489
15844
  }));
15490
15845
  },
15491
15846
  itemTemplate: function itemTemplate(item, options) {
15492
- return item && createItem(item, options.index);
15847
+ return item && createItem(item, options.index, options);
15493
15848
  },
15494
15849
  contentTemplate: function contentTemplate(options) {
15495
15850
  var className = classNames('p-dropdown-items', options.className);
@@ -15656,7 +16011,7 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
15656
16011
  if (DomHandler.hasClass(event.target, 'p-dropdown-clear-icon') || event.target.tagName === 'INPUT') {
15657
16012
  return;
15658
16013
  } else if (!overlayRef.current || !(overlayRef.current && overlayRef.current.contains(event.target))) {
15659
- focusInputRef.current.focus();
16014
+ DomHandler.focus(focusInputRef.current);
15660
16015
  overlayVisibleState ? hide() : show();
15661
16016
  }
15662
16017
  };
@@ -15693,16 +16048,11 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
15693
16048
  case 38:
15694
16049
  onUpKey(event);
15695
16050
  break;
15696
- //space
16051
+ //space and enter
15697
16052
 
15698
16053
  case 32:
15699
- overlayVisibleState ? hide() : show();
15700
- event.preventDefault();
15701
- break;
15702
- //enter
15703
-
15704
16054
  case 13:
15705
- hide();
16055
+ overlayVisibleState ? hide() : show();
15706
16056
  event.preventDefault();
15707
16057
  break;
15708
16058
  //escape and tab
@@ -15934,7 +16284,7 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
15934
16284
 
15935
16285
  if (!option.disabled) {
15936
16286
  selectItem(event);
15937
- focusInputRef.current.focus();
16287
+ DomHandler.focus(focusInputRef.current);
15938
16288
  }
15939
16289
 
15940
16290
  hide();
@@ -16003,11 +16353,13 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
16003
16353
  }
16004
16354
  };
16005
16355
 
16006
- var getSelectedOptionIndex = function getSelectedOptionIndex() {
16007
- if (props.value != null && visibleOptions) {
16356
+ var getSelectedOptionIndex = function getSelectedOptionIndex(options) {
16357
+ options = options || visibleOptions;
16358
+
16359
+ if (props.value != null && options) {
16008
16360
  if (props.optionGroupLabel) {
16009
- for (var i = 0; i < visibleOptions.length; i++) {
16010
- var selectedOptionIndex = findOptionIndexInList(props.value, getOptionGroupChildren(visibleOptions[i]));
16361
+ for (var i = 0; i < options.length; i++) {
16362
+ var selectedOptionIndex = findOptionIndexInList(props.value, getOptionGroupChildren(options[i]));
16011
16363
 
16012
16364
  if (selectedOptionIndex !== -1) {
16013
16365
  return {
@@ -16017,7 +16369,7 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
16017
16369
  }
16018
16370
  }
16019
16371
  } else {
16020
- return findOptionIndexInList(props.value, visibleOptions);
16372
+ return findOptionIndexInList(props.value, options);
16021
16373
  }
16022
16374
  }
16023
16375
 
@@ -16082,7 +16434,7 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
16082
16434
  if (highlightItem && highlightItem.scrollIntoView) {
16083
16435
  highlightItem.scrollIntoView({
16084
16436
  block: 'nearest',
16085
- inline: 'start'
16437
+ inline: 'nearest'
16086
16438
  });
16087
16439
  }
16088
16440
  };
@@ -16134,16 +16486,16 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
16134
16486
  };
16135
16487
 
16136
16488
  var getSelectedOption = function getSelectedOption() {
16137
- var index = getSelectedOptionIndex();
16138
- return index !== -1 ? props.optionGroupLabel ? getOptionGroupChildren(visibleOptions[index.group])[index.option] : visibleOptions[index] : null;
16489
+ var index = getSelectedOptionIndex(props.options);
16490
+ return index !== -1 ? props.optionGroupLabel ? getOptionGroupChildren(props.options[index.group])[index.option] : props.options[index] : null;
16139
16491
  };
16140
16492
 
16141
16493
  React__namespace.useEffect(function () {
16142
16494
  ObjectUtils.combinedRefs(inputRef, props.inputRef);
16143
16495
  }, [inputRef, props.inputRef]);
16144
16496
  useMountEffect(function () {
16145
- if (props.autoFocus && focusInputRef.current) {
16146
- focusInputRef.current.focus();
16497
+ if (props.autoFocus) {
16498
+ DomHandler.focus(focusInputRef.current, props.autoFocus);
16147
16499
  }
16148
16500
  });
16149
16501
  useUpdateEffect(function () {
@@ -16796,7 +17148,7 @@ var RowRadioButton = /*#__PURE__*/React__namespace.memo(function (props) {
16796
17148
  var onClick = function onClick(event) {
16797
17149
  if (!props.disabled) {
16798
17150
  props.onChange(event);
16799
- inputRef.current.focus();
17151
+ DomHandler.focus(inputRef.current);
16800
17152
  }
16801
17153
  };
16802
17154
 
@@ -17466,6 +17818,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
17466
17818
  };
17467
17819
  content = /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("button", {
17468
17820
  type: "button",
17821
+ name: "row-save",
17469
17822
  onClick: rowEditorProps.onSaveClick,
17470
17823
  className: rowEditorProps.saveClassName,
17471
17824
  tabIndex: props.tabIndex
@@ -17473,6 +17826,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
17473
17826
  className: rowEditorProps.saveIconClassName
17474
17827
  }), /*#__PURE__*/React__namespace.createElement(Ripple, null)), /*#__PURE__*/React__namespace.createElement("button", {
17475
17828
  type: "button",
17829
+ name: "row-cancel",
17476
17830
  onClick: rowEditorProps.onCancelClick,
17477
17831
  className: rowEditorProps.cancelClassName,
17478
17832
  tabIndex: props.tabIndex
@@ -17488,6 +17842,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
17488
17842
  };
17489
17843
  content = /*#__PURE__*/React__namespace.createElement("button", {
17490
17844
  type: "button",
17845
+ name: "row-edit",
17491
17846
  onClick: rowEditorProps.onInitClick,
17492
17847
  className: rowEditorProps.initClassName,
17493
17848
  tabIndex: props.tabIndex
@@ -17953,12 +18308,16 @@ var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
17953
18308
  }),
17954
18309
  'p-row-odd': props.index % 2 !== 0
17955
18310
  });
18311
+ var style = {
18312
+ height: props.virtualScrollerOptions ? props.virtualScrollerOptions.itemSize : undefined
18313
+ };
17956
18314
  var content = createContent();
17957
18315
  var tabIndex = getTabIndex();
17958
18316
  return /*#__PURE__*/React__namespace.createElement("tr", {
17959
18317
  role: "row",
17960
18318
  tabIndex: tabIndex,
17961
18319
  className: className,
18320
+ style: style,
17962
18321
  onMouseDown: onMouseDown,
17963
18322
  onMouseUp: onMouseUp,
17964
18323
  onClick: onClick,
@@ -18000,14 +18359,14 @@ var _excluded = ["originalEvent"];
18000
18359
  function ownKeys$k(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18001
18360
 
18002
18361
  function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18003
- var TableBody = /*#__PURE__*/React__namespace.memo(function (props) {
18362
+ var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
18004
18363
  var _React$useState = React__namespace.useState({}),
18005
18364
  _React$useState2 = _slicedToArray(_React$useState, 2),
18006
18365
  rowGroupHeaderStyleObjectState = _React$useState2[0],
18007
18366
  setRowGroupHeaderStyleObjectState = _React$useState2[1];
18008
18367
 
18009
18368
  var elementRef = React__namespace.useRef(null);
18010
- var ref = React__namespace.useCallback(function (el) {
18369
+ var refCallback = React__namespace.useCallback(function (el) {
18011
18370
  elementRef.current = el;
18012
18371
  props.virtualScrollerContentRef && props.virtualScrollerContentRef(el);
18013
18372
  }, [props]);
@@ -18661,9 +19020,12 @@ var TableBody = /*#__PURE__*/React__namespace.memo(function (props) {
18661
19020
  var onRowDragStart = function onRowDragStart(e) {
18662
19021
  var event = e.originalEvent,
18663
19022
  index = e.index;
18664
- rowDragging.current = true;
18665
- draggedRowIndex.current = index;
18666
- event.dataTransfer.setData('text', 'b'); // For firefox
19023
+
19024
+ if (allowRowDrag(event)) {
19025
+ rowDragging.current = true;
19026
+ draggedRowIndex.current = index;
19027
+ event.dataTransfer.setData('text', 'b'); // For firefox
19028
+ }
18667
19029
  };
18668
19030
 
18669
19031
  var onRowDragOver = function onRowDragOver(e) {
@@ -19059,10 +19421,10 @@ var TableBody = /*#__PURE__*/React__namespace.memo(function (props) {
19059
19421
  var className = classNames('p-datatable-tbody', props.className);
19060
19422
  var content = props.empty ? createEmptyContent() : createContent();
19061
19423
  return /*#__PURE__*/React__namespace.createElement("tbody", {
19062
- ref: ref,
19424
+ ref: refCallback,
19063
19425
  className: className
19064
19426
  }, content);
19065
- });
19427
+ }));
19066
19428
  TableBody.displayName = 'TableBody';
19067
19429
 
19068
19430
  function ownKeys$j(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -19112,7 +19474,8 @@ var FooterCell = /*#__PURE__*/React__namespace.memo(function (props) {
19112
19474
  styleObject['left'] = left + 'px';
19113
19475
  }
19114
19476
 
19115
- setStyleObjectState(styleObject);
19477
+ var isSameStyle = styleObjectState['left'] === styleObject['left'] && styleObjectState['right'] === styleObject['right'];
19478
+ !isSameStyle && setStyleObjectState(styleObject);
19116
19479
  }
19117
19480
  };
19118
19481
 
@@ -20349,14 +20712,15 @@ var HeaderCell = /*#__PURE__*/React__namespace.memo(function (props) {
20349
20712
  var sortMeta = getSortMeta();
20350
20713
  var style = getStyle();
20351
20714
  var align = getColumnProp('alignHeader') || getColumnProp('align');
20715
+ var frozen = getColumnProp('frozen');
20352
20716
  var className = classNames(getColumnProp('headerClassName'), getColumnProp('className'), _defineProperty({
20353
20717
  'p-sortable-column': getColumnProp('sortable'),
20354
- 'p-resizable-column': props.resizableColumns,
20718
+ 'p-resizable-column': props.resizableColumns && getColumnProp('resizeable'),
20355
20719
  'p-highlight': sortMeta.sorted,
20356
- 'p-frozen-column': getColumnProp('frozen'),
20720
+ 'p-frozen-column': frozen,
20357
20721
  'p-selection-column': getColumnProp('selectionMode'),
20358
20722
  'p-sortable-disabled': getColumnProp('sortable') && _isSortableDisabled,
20359
- 'p-reorderable-column': props.reorderableColumns && getColumnProp('reorderable')
20723
+ 'p-reorderable-column': props.reorderableColumns && getColumnProp('reorderable') && !frozen
20360
20724
  }, "p-align-".concat(align), !!align));
20361
20725
  var tabIndex = getColumnProp('sortable') && !_isSortableDisabled ? props.tabIndex : null;
20362
20726
  var colSpan = getColumnProp('colSpan');
@@ -20645,6 +21009,9 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
20645
21009
  var elementRef = React__namespace.useRef(null);
20646
21010
  var tableRef = React__namespace.useRef(null);
20647
21011
  var wrapperRef = React__namespace.useRef(null);
21012
+ var bodyRef = React__namespace.useRef(null);
21013
+ var frozenBodyRef = React__namespace.useRef(null);
21014
+ var virtualScrollerRef = React__namespace.useRef(null);
20648
21015
  var reorderIndicatorUpRef = React__namespace.useRef(null);
20649
21016
  var reorderIndicatorDownRef = React__namespace.useRef(null);
20650
21017
  var colReorderIconWidth = React__namespace.useRef(null);
@@ -21140,8 +21507,22 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21140
21507
  }
21141
21508
  } else if (props.columnResizeMode === 'expand') {
21142
21509
  var tableWidth = tableRef.current.offsetWidth + delta + 'px';
21143
- tableRef.current.style.width = tableWidth;
21144
- tableRef.current.style.minWidth = tableWidth;
21510
+
21511
+ var updateTableWidth = function updateTableWidth(el) {
21512
+ !!el && (el.style.width = el.style.minWidth = tableWidth);
21513
+ };
21514
+
21515
+ updateTableWidth(tableRef.current);
21516
+
21517
+ if (!isVirtualScrollerDisabled()) {
21518
+ updateTableWidth(bodyRef.current);
21519
+ updateTableWidth(frozenBodyRef.current);
21520
+
21521
+ if (wrapperRef.current) {
21522
+ updateTableWidth(DomHandler.findSingle(wrapperRef.current, '.p-virtualscroller-content'));
21523
+ }
21524
+ }
21525
+
21145
21526
  resizeTableCells(newColumnWidth);
21146
21527
  }
21147
21528
 
@@ -21198,7 +21579,7 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21198
21579
  var event = e.originalEvent,
21199
21580
  column = e.column;
21200
21581
 
21201
- if (props.reorderableColumns && getColumnProp(column, 'reorderable') !== false) {
21582
+ if (props.reorderableColumns && getColumnProp(column, 'reorderable') !== false && !getColumnProp(column, 'frozen')) {
21202
21583
  if (event.target.nodeName === 'INPUT' || event.target.nodeName === 'TEXTAREA' || DomHandler.hasClass(event.target, 'p-column-resizer')) event.currentTarget.draggable = false;else event.currentTarget.draggable = true;
21203
21584
  }
21204
21585
  };
@@ -21261,10 +21642,11 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21261
21642
  };
21262
21643
 
21263
21644
  var onColumnHeaderDragOver = function onColumnHeaderDragOver(e) {
21264
- var event = e.originalEvent;
21645
+ var event = e.originalEvent,
21646
+ column = e.column;
21265
21647
  var dropHeader = findParentHeader(event.currentTarget);
21266
21648
 
21267
- if (props.reorderableColumns && draggedColumnElement.current && dropHeader) {
21649
+ if (props.reorderableColumns && draggedColumnElement.current && dropHeader && !getColumnProp(column, 'frozen')) {
21268
21650
  event.preventDefault();
21269
21651
 
21270
21652
  if (draggedColumnElement.current !== dropHeader) {
@@ -21475,8 +21857,8 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21475
21857
  return props.removableSort ? props.defaultSortOrder === currentOrder ? currentOrder * -1 : 0 : currentOrder * -1;
21476
21858
  };
21477
21859
 
21478
- var compareValuesOnSort = function compareValuesOnSort(value1, value2) {
21479
- return ObjectUtils.sort(value1, value2, 1, PrimeReact.locale);
21860
+ var compareValuesOnSort = function compareValuesOnSort(value1, value2, order) {
21861
+ return ObjectUtils.sort(value1, value2, order, PrimeReact.locale);
21480
21862
  };
21481
21863
 
21482
21864
  var addSortMeta = function addSortMeta(meta, multiSortMeta) {
@@ -21514,7 +21896,8 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21514
21896
  var value = _toConsumableArray(data);
21515
21897
 
21516
21898
  if (columnSortable.current && columnSortFunction.current) {
21517
- value = columnSortFunction({
21899
+ value = columnSortFunction.current({
21900
+ rowData: value,
21518
21901
  field: field,
21519
21902
  order: order
21520
21903
  });
@@ -21522,8 +21905,7 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21522
21905
  value.sort(function (data1, data2) {
21523
21906
  var value1 = ObjectUtils.resolveFieldData(data1, field);
21524
21907
  var value2 = ObjectUtils.resolveFieldData(data2, field);
21525
- var result = compareValuesOnSort(value1, value2);
21526
- return order * result;
21908
+ return compareValuesOnSort(value1, value2, order);
21527
21909
  });
21528
21910
  }
21529
21911
 
@@ -21556,6 +21938,7 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21556
21938
  var field = columnField.current;
21557
21939
  var order = meta ? meta.order : defaultSortOrder;
21558
21940
  value = columnSortFunction.current({
21941
+ rowData: value,
21559
21942
  field: field,
21560
21943
  order: order
21561
21944
  });
@@ -21576,8 +21959,7 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21576
21959
  return multiSortMeta.length - 1 > index ? multisortField(data1, data2, multiSortMeta, index + 1) : 0;
21577
21960
  }
21578
21961
 
21579
- var result = compareValuesOnSort(value1, value2);
21580
- return multiSortMeta[index].order * result;
21962
+ return compareValuesOnSort(value1, value2, multiSortMeta[index].order);
21581
21963
  };
21582
21964
 
21583
21965
  var onFilterChange = function onFilterChange(filters) {
@@ -21956,7 +22338,9 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21956
22338
  }
21957
22339
  }, [props.responsiveLayout]);
21958
22340
  useUpdateEffect(function () {
21959
- filter(props.globalFilter, 'global', 'contains');
22341
+ if (props.globalFilter) {
22342
+ filter(props.globalFilter, 'global', 'contains');
22343
+ }
21960
22344
  }, [props.globalFilter]);
21961
22345
  useUnmountEffect(function () {
21962
22346
  unbindColumnResizeEvents();
@@ -22056,7 +22440,9 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
22056
22440
  columns = options.columns,
22057
22441
  contentRef = options.contentRef,
22058
22442
  className = options.className;
22443
+ options.itemSize;
22059
22444
  var frozenBody = props.frozenValue && /*#__PURE__*/React__namespace.createElement(TableBody, {
22445
+ ref: frozenBodyRef,
22060
22446
  value: props.frozenValue,
22061
22447
  className: "p-datatable-frozen-tbody",
22062
22448
  frozenRow: true,
@@ -22120,9 +22506,11 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
22120
22506
  expandedRowIcon: props.expandedRowIcon,
22121
22507
  collapsedRowIcon: props.collapsedRowIcon,
22122
22508
  rowClassName: props.rowClassName,
22509
+ virtualScrollerOptions: options,
22123
22510
  isVirtualScrollerDisabled: true
22124
22511
  });
22125
22512
  var body = /*#__PURE__*/React__namespace.createElement(TableBody, {
22513
+ ref: bodyRef,
22126
22514
  value: dataToRender(rows),
22127
22515
  className: className,
22128
22516
  empty: empty,
@@ -22215,10 +22603,15 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
22215
22603
  style: {
22216
22604
  maxHeight: _isVirtualScrollerDisabled ? props.scrollHeight : null
22217
22605
  }
22218
- }, /*#__PURE__*/React__namespace.createElement(VirtualScroller, _extends({}, virtualScrollerOptions, {
22606
+ }, /*#__PURE__*/React__namespace.createElement(VirtualScroller, _extends({
22607
+ ref: virtualScrollerRef
22608
+ }, virtualScrollerOptions, {
22219
22609
  items: processedData,
22220
22610
  columns: columns,
22221
- scrollHeight: props.scrollHeight,
22611
+ style: _objectSpread$f(_objectSpread$f({}, virtualScrollerOptions.style), {
22612
+ height: props.scrollHeight !== 'flex' ? props.scrollHeight : undefined
22613
+ }),
22614
+ scrollHeight: props.scrollHeight !== 'flex' ? undefined : '100%',
22222
22615
  disabled: _isVirtualScrollerDisabled,
22223
22616
  loaderDisabled: true,
22224
22617
  showSpacer: false,
@@ -23039,8 +23432,8 @@ var Editor = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
23039
23432
  useMountEffect(function () {
23040
23433
  if (!isQuillLoaded.current) {
23041
23434
  Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('quill')); }).then(function (module) {
23042
- if (module && module["default"] && DomHandler.isExist(contentRef.current)) {
23043
- quill.current = new module["default"](contentRef.current, {
23435
+ if (module && DomHandler.isExist(contentRef.current)) {
23436
+ var configuration = {
23044
23437
  modules: _objectSpread$e({
23045
23438
  toolbar: props.showHeader ? toolbarRef.current : false
23046
23439
  }, props.modules),
@@ -23048,7 +23441,15 @@ var Editor = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
23048
23441
  readOnly: props.readOnly,
23049
23442
  theme: props.theme,
23050
23443
  formats: props.formats
23051
- });
23444
+ };
23445
+
23446
+ if (module["default"]) {
23447
+ // webpack
23448
+ quill.current = new module["default"](contentRef.current, configuration);
23449
+ } else {
23450
+ // parceljs
23451
+ quill.current = new module(contentRef.current, configuration);
23452
+ }
23052
23453
 
23053
23454
  if (props.value) {
23054
23455
  quill.current.setContents(quill.current.clipboard.convert(props.value));
@@ -23469,7 +23870,7 @@ var Messages = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
23469
23870
 
23470
23871
  var show = function show(value) {
23471
23872
  if (value) {
23472
- var messages = [];
23873
+ var messages;
23473
23874
 
23474
23875
  if (Array.isArray(value)) {
23475
23876
  for (var i = 0; i < value.length; i++) {
@@ -23490,7 +23891,8 @@ var Messages = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
23490
23891
  };
23491
23892
 
23492
23893
  var replace = function replace(value) {
23493
- setMessagesState(value);
23894
+ var replaced = Array.isArray(value) ? value : [value];
23895
+ setMessagesState(replaced);
23494
23896
  };
23495
23897
 
23496
23898
  var onClose = function onClose(message) {
@@ -23566,8 +23968,7 @@ var ProgressBar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
23566
23968
  style: props.style,
23567
23969
  "aria-valuemin": "0",
23568
23970
  "aria-valuenow": props.value,
23569
- "aria-valuemax": "100",
23570
- "aria-label": props.value
23971
+ "aria-valuemax": "100"
23571
23972
  }, otherProps), /*#__PURE__*/React__namespace.createElement("div", {
23572
23973
  className: "p-progressbar-value p-progressbar-value-animate",
23573
23974
  style: {
@@ -23633,18 +24034,24 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23633
24034
  focusedState = _React$useState6[0],
23634
24035
  setFocusedState = _React$useState6[1];
23635
24036
 
24037
+ var _React$useState7 = React__namespace.useState(false),
24038
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
24039
+ uploadingState = _React$useState8[0],
24040
+ setUploadingState = _React$useState8[1];
24041
+
23636
24042
  var fileInputRef = React__namespace.useRef(null);
23637
24043
  var messagesRef = React__namespace.useRef(null);
23638
24044
  var contentRef = React__namespace.useRef(null);
23639
24045
  var duplicateIEEvent = React__namespace.useRef(false);
23640
24046
  var uploadedFileCount = React__namespace.useRef(0);
23641
24047
  var hasFiles = ObjectUtils.isNotEmpty(filesState);
24048
+ var disabled = props.disabled || uploadingState;
23642
24049
  var chooseButtonLabel = props.chooseLabel || props.chooseOptions.label || localeOption('choose');
23643
24050
  var uploadButtonLabel = props.uploadLabel || props.uploadOptions.label || localeOption('upload');
23644
24051
  var cancelButtonLabel = props.cancelLabel || props.cancelOptions.label || localeOption('cancel');
23645
- var chooseDisabled = props.disabled || props.fileLimit && props.fileLimit <= filesState.length + uploadedFileCount;
23646
- var uploadDisabled = props.disabled || !hasFiles;
23647
- var cancelDisabled = props.disabled || !hasFiles;
24052
+ var chooseDisabled = disabled || props.fileLimit && props.fileLimit <= filesState.length + uploadedFileCount;
24053
+ var uploadDisabled = disabled || !hasFiles;
24054
+ var cancelDisabled = disabled || !hasFiles;
23648
24055
 
23649
24056
  var isImage = function isImage(file) {
23650
24057
  return /^image\//.test(file.type);
@@ -23699,7 +24106,12 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23699
24106
  return;
23700
24107
  }
23701
24108
 
23702
- var currentFiles = filesState ? _toConsumableArray(filesState) : [];
24109
+ var currentFiles = [];
24110
+
24111
+ if (props.multiple) {
24112
+ currentFiles = filesState ? _toConsumableArray(filesState) : [];
24113
+ }
24114
+
23703
24115
  var selectedFiles = event.dataTransfer ? event.dataTransfer.files : event.target.files;
23704
24116
 
23705
24117
  for (var i = 0; i < selectedFiles.length; i++) {
@@ -23771,6 +24183,10 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23771
24183
  var upload = function upload(files) {
23772
24184
  files = files || filesState;
23773
24185
 
24186
+ if (files && files.nativeEvent) {
24187
+ files = filesState;
24188
+ }
24189
+
23774
24190
  if (props.customUpload) {
23775
24191
  if (props.fileLimit) {
23776
24192
  uploadedFileCount + files.length, _readOnlyError("uploadedFileCount");
@@ -23786,6 +24202,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23786
24202
  });
23787
24203
  }
23788
24204
  } else {
24205
+ setUploadingState(true);
23789
24206
  var xhr = new XMLHttpRequest();
23790
24207
  var formData = new FormData();
23791
24208
 
@@ -23827,6 +24244,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23827
24244
  xhr.onreadystatechange = function () {
23828
24245
  if (xhr.readyState === 4) {
23829
24246
  setProgressState(0);
24247
+ setUploadingState(false);
23830
24248
 
23831
24249
  if (xhr.status >= 200 && xhr.status < 300) {
23832
24250
  if (props.fileLimit) {
@@ -23868,6 +24286,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23868
24286
 
23869
24287
  var clear = function clear() {
23870
24288
  setFilesState([]);
24289
+ setUploadingState(false);
23871
24290
  props.onClear && props.onClear();
23872
24291
  clearInput();
23873
24292
  };
@@ -23892,7 +24311,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23892
24311
  };
23893
24312
 
23894
24313
  var onDragEnter = function onDragEnter(event) {
23895
- if (!props.disabled) {
24314
+ if (!disabled) {
23896
24315
  event.dataTransfer.dropEffect = 'copy';
23897
24316
  event.stopPropagation();
23898
24317
  event.preventDefault();
@@ -23900,7 +24319,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23900
24319
  };
23901
24320
 
23902
24321
  var onDragOver = function onDragOver(event) {
23903
- if (!props.disabled) {
24322
+ if (!disabled) {
23904
24323
  event.dataTransfer.dropEffect = 'copy';
23905
24324
  DomHandler.addClass(contentRef.current, 'p-fileupload-highlight');
23906
24325
  event.stopPropagation();
@@ -23909,25 +24328,32 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23909
24328
  };
23910
24329
 
23911
24330
  var onDragLeave = function onDragLeave(event) {
23912
- if (!props.disabled) {
24331
+ if (!disabled) {
23913
24332
  event.dataTransfer.dropEffect = 'copy';
23914
24333
  DomHandler.removeClass(contentRef.current, 'p-fileupload-highlight');
23915
24334
  }
23916
24335
  };
23917
24336
 
23918
24337
  var onDrop = function onDrop(event) {
23919
- if (!props.disabled) {
23920
- DomHandler.removeClass(contentRef.current, 'p-fileupload-highlight');
23921
- event.stopPropagation();
23922
- event.preventDefault();
23923
- var files = event.dataTransfer ? event.dataTransfer.files : event.target.files;
23924
- var allowDrop = props.multiple || files && files.length === 0;
23925
- allowDrop && onFileSelect(event);
24338
+ if (props.disabled) {
24339
+ return;
24340
+ }
24341
+
24342
+ DomHandler.removeClass(contentRef.current, 'p-fileupload-highlight');
24343
+ event.stopPropagation();
24344
+ event.preventDefault(); // give caller a chance to stop the drop
24345
+
24346
+ if (props.onBeforeDrop && props.onBeforeDrop(event) === false) {
24347
+ return;
23926
24348
  }
24349
+
24350
+ var files = event.dataTransfer ? event.dataTransfer.files : event.target.files;
24351
+ var allowDrop = props.multiple || ObjectUtils.isEmpty(filesState) && files && files.length === 1;
24352
+ allowDrop && onFileSelect(event);
23927
24353
  };
23928
24354
 
23929
24355
  var onSimpleUploaderClick = function onSimpleUploaderClick() {
23930
- hasFiles ? upload() : fileInputRef.current.click();
24356
+ !disabled && hasFiles ? upload() : fileInputRef.current.click();
23931
24357
  };
23932
24358
 
23933
24359
  React__namespace.useImperativeHandle(ref, function () {
@@ -23945,7 +24371,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23945
24371
  _icon = _props$chooseOptions.icon,
23946
24372
  iconOnly = _props$chooseOptions.iconOnly;
23947
24373
  var chooseClassName = classNames('p-button p-fileupload-choose p-component', {
23948
- 'p-disabled': props.disabled,
24374
+ 'p-disabled': disabled,
23949
24375
  'p-focus': focusedState,
23950
24376
  'p-button-icon-only': iconOnly
23951
24377
  }, className);
@@ -23999,7 +24425,8 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
23999
24425
  icon: "pi pi-times",
24000
24426
  onClick: function onClick(e) {
24001
24427
  return remove(e, index);
24002
- }
24428
+ },
24429
+ disabled: disabled
24003
24430
  }));
24004
24431
  var content = /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, preview, fileName, size, removeButton);
24005
24432
 
@@ -24126,7 +24553,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
24126
24553
  var className = classNames('p-fileupload p-fileupload-basic p-component', props.className);
24127
24554
  var buttonClassName = classNames('p-button p-component p-fileupload-choose', {
24128
24555
  'p-fileupload-choose-selected': hasFiles,
24129
- 'p-disabled': props.disabled,
24556
+ 'p-disabled': disabled,
24130
24557
  'p-focus': focusedState
24131
24558
  }, chooseOptions.className);
24132
24559
  var chooseIcon = chooseOptions.icon || classNames({
@@ -24156,7 +24583,7 @@ var FileUpload = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
24156
24583
  type: "file",
24157
24584
  accept: props.accept,
24158
24585
  multiple: props.multiple,
24159
- disabled: props.disabled,
24586
+ disabled: disabled,
24160
24587
  onChange: onFileSelect
24161
24588
  });
24162
24589
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
@@ -24230,6 +24657,7 @@ FileUpload.defaultProps = {
24230
24657
  progressBarTemplate: null,
24231
24658
  onBeforeUpload: null,
24232
24659
  onBeforeSend: null,
24660
+ onBeforeDrop: null,
24233
24661
  onUpload: null,
24234
24662
  onError: null,
24235
24663
  onClear: null,
@@ -24262,6 +24690,7 @@ var FullCalendar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
24262
24690
  };
24263
24691
 
24264
24692
  useMountEffect(function () {
24693
+ // eslint-disable-next-line no-console
24265
24694
  console.warn("FullCalendar component is deprecated. Use FullCalendar component of '@fullcalendar/react' package.");
24266
24695
  config.current = {
24267
24696
  theme: true
@@ -25526,12 +25955,12 @@ var Image = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
25526
25955
  width: width,
25527
25956
  height: height,
25528
25957
  style: props.imageStyle,
25529
- alt: alt
25958
+ alt: alt,
25959
+ onError: props.onError
25530
25960
  });
25531
25961
  return /*#__PURE__*/React__namespace.createElement("span", _extends({
25532
25962
  ref: elementRef,
25533
- className: containerClassName,
25534
- style: props.style
25963
+ className: containerClassName
25535
25964
  }, otherProps), image, preview, maskVisibleState && /*#__PURE__*/React__namespace.createElement(Portal, {
25536
25965
  element: element,
25537
25966
  appendTo: document.body
@@ -25543,14 +25972,14 @@ Image.defaultProps = {
25543
25972
  preview: false,
25544
25973
  className: null,
25545
25974
  downloadable: false,
25546
- style: null,
25547
25975
  imageStyle: null,
25548
25976
  imageClassName: null,
25549
25977
  template: null,
25550
25978
  src: null,
25551
25979
  alt: null,
25552
25980
  width: null,
25553
- height: null
25981
+ height: null,
25982
+ onError: null
25554
25983
  };
25555
25984
 
25556
25985
  var InplaceDisplay = function InplaceDisplay(props) {
@@ -25560,7 +25989,7 @@ var InplaceContent = function InplaceContent(props) {
25560
25989
  return props.children;
25561
25990
  };
25562
25991
  var Inplace = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
25563
- var _React$useState = React__namespace.useState(false),
25992
+ var _React$useState = React__namespace.useState(props.active),
25564
25993
  _React$useState2 = _slicedToArray(_React$useState, 2),
25565
25994
  activeState = _React$useState2[0],
25566
25995
  setActiveState = _React$useState2[1];
@@ -25691,7 +26120,7 @@ Inplace.defaultProps = {
25691
26120
  };
25692
26121
 
25693
26122
  var InputMask = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
25694
- var elementRef = React__namespace.useRef(null);
26123
+ var elementRef = React__namespace.useRef(ref);
25695
26124
  var firstNonMaskPos = React__namespace.useRef(null);
25696
26125
  var lastRequiredNonMaskPos = React__namespace.useRef(0);
25697
26126
  var tests = React__namespace.useRef([]);
@@ -26212,8 +26641,8 @@ var InputMask = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
26212
26641
  };
26213
26642
 
26214
26643
  React__namespace.useEffect(function () {
26215
- ObjectUtils.combinedRefs(elementRef, props.inputRef);
26216
- }, [elementRef, props.inputRef]);
26644
+ ObjectUtils.combinedRefs(elementRef, ref);
26645
+ }, [elementRef, ref]);
26217
26646
  useMountEffect(function () {
26218
26647
  init();
26219
26648
  updateValue();
@@ -26221,7 +26650,10 @@ var InputMask = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
26221
26650
  useUpdateEffect(function () {
26222
26651
  init();
26223
26652
  caret(updateValue(true));
26224
- updateModel();
26653
+
26654
+ if (props.unmask) {
26655
+ updateModel();
26656
+ }
26225
26657
  }, [props.mask]);
26226
26658
  useUpdateEffect(function () {
26227
26659
  if (isValueUpdated()) {
@@ -26259,7 +26691,6 @@ InputMask.displayName = 'InputMask';
26259
26691
  InputMask.defaultProps = {
26260
26692
  __TYPE: 'InputMask',
26261
26693
  id: null,
26262
- inputRef: null,
26263
26694
  value: null,
26264
26695
  type: 'text',
26265
26696
  mask: null,
@@ -26300,7 +26731,7 @@ var InputSwitch = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
26300
26731
  }
26301
26732
 
26302
26733
  toggle(event);
26303
- inputRef.current.focus();
26734
+ DomHandler.focus(inputRef.current);
26304
26735
  event.preventDefault();
26305
26736
  };
26306
26737
 
@@ -26748,14 +27179,14 @@ var ListBoxHeader = /*#__PURE__*/React__namespace.memo(function (props) {
26748
27179
  className: "p-listbox-header"
26749
27180
  }, /*#__PURE__*/React__namespace.createElement("div", {
26750
27181
  className: "p-listbox-filter-container"
26751
- }, /*#__PURE__*/React__namespace.createElement(InputText, {
27182
+ }, /*#__PURE__*/React__namespace.createElement(InputText, _extends({
26752
27183
  type: "text",
26753
27184
  value: props.filter,
26754
27185
  onChange: onFilter,
26755
27186
  className: "p-listbox-filter",
26756
27187
  disabled: props.disabled,
26757
27188
  placeholder: props.filterPlaceholder
26758
- }), /*#__PURE__*/React__namespace.createElement("span", {
27189
+ }, props.filterInputProps)), /*#__PURE__*/React__namespace.createElement("span", {
26759
27190
  className: "p-listbox-filter-icon pi pi-search"
26760
27191
  })));
26761
27192
  });
@@ -26825,14 +27256,16 @@ var ListBoxItem = /*#__PURE__*/React__namespace.memo(function (props) {
26825
27256
  var content = props.template ? ObjectUtils.getJSXElement(props.template, props.option) : props.label;
26826
27257
  return /*#__PURE__*/React__namespace.createElement("li", {
26827
27258
  className: className,
27259
+ style: props.style,
26828
27260
  onClick: onClick,
26829
27261
  onTouchEnd: onTouchEnd,
26830
27262
  onKeyDown: onKeyDown,
26831
- tabIndex: props.tabIndex,
27263
+ tabIndex: "-1",
26832
27264
  "aria-label": props.label,
26833
27265
  key: props.label,
26834
27266
  role: "option",
26835
- "aria-selected": props.selected
27267
+ "aria-selected": props.selected,
27268
+ "aria-disabled": props.disabled
26836
27269
  }, content, /*#__PURE__*/React__namespace.createElement(Ripple, null));
26837
27270
  });
26838
27271
  ListBoxItem.displayName = 'ListBoxItem';
@@ -26943,6 +27376,7 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
26943
27376
  };
26944
27377
 
26945
27378
  var onFilter = function onFilter(event) {
27379
+ virtualScrollerRef.current && virtualScrollerRef.current.scrollToIndex(0);
26946
27380
  var originalEvent = event.originalEvent,
26947
27381
  value = event.value;
26948
27382
 
@@ -26978,11 +27412,44 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
26978
27412
  });
26979
27413
  };
26980
27414
 
27415
+ var getSelectedOptionIndex = function getSelectedOptionIndex() {
27416
+ if (props.value != null && visibleOptions) {
27417
+ if (props.optionGroupLabel) {
27418
+ for (var i = 0; i < visibleOptions.length; i++) {
27419
+ var selectedOptionIndex = findOptionIndexInList(props.value, getOptionGroupChildren(visibleOptions[i]));
27420
+
27421
+ if (selectedOptionIndex !== -1) {
27422
+ return {
27423
+ group: i,
27424
+ option: selectedOptionIndex
27425
+ };
27426
+ }
27427
+ }
27428
+ } else {
27429
+ return findOptionIndexInList(props.value, visibleOptions);
27430
+ }
27431
+ }
27432
+
27433
+ return -1;
27434
+ };
27435
+
27436
+ var equalityKey = function equalityKey() {
27437
+ return props.optionValue ? null : props.dataKey;
27438
+ };
27439
+
27440
+ var findOptionIndexInList = function findOptionIndexInList(value, list) {
27441
+ var key = equalityKey();
27442
+ return list.findIndex(function (item) {
27443
+ return ObjectUtils.equals(value, getOptionValue(item), key);
27444
+ });
27445
+ };
27446
+
26981
27447
  var isSelected = function isSelected(option) {
26982
27448
  var optionValue = getOptionValue(option);
27449
+ var key = equalityKey();
26983
27450
  return props.multiple && props.value ? props.value.some(function (val) {
26984
- return ObjectUtils.equals(val, optionValue, props.dataKey);
26985
- }) : ObjectUtils.equals(props.value, optionValue, props.dataKey);
27451
+ return ObjectUtils.equals(val, optionValue, key);
27452
+ }) : ObjectUtils.equals(props.value, optionValue, key);
26986
27453
  };
26987
27454
 
26988
27455
  var getOptionLabel = function getOptionLabel(option) {
@@ -27054,16 +27521,33 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27054
27521
  }
27055
27522
  };
27056
27523
 
27524
+ var scrollToSelectedIndex = function scrollToSelectedIndex() {
27525
+ if (virtualScrollerRef.current) {
27526
+ var selectedIndex = getSelectedOptionIndex();
27527
+
27528
+ if (selectedIndex !== -1) {
27529
+ setTimeout(function () {
27530
+ return virtualScrollerRef.current.scrollToIndex(selectedIndex);
27531
+ }, 0);
27532
+ }
27533
+ }
27534
+ };
27535
+
27536
+ useMountEffect(function () {
27537
+ scrollToSelectedIndex();
27538
+ });
27539
+
27057
27540
  var createHeader = function createHeader() {
27058
27541
  return props.filter ? /*#__PURE__*/React__namespace.createElement(ListBoxHeader, {
27059
27542
  filter: filteredValue,
27060
27543
  onFilter: onFilter,
27061
27544
  disabled: props.disabled,
27062
- filterPlaceholder: props.filterPlaceholder
27545
+ filterPlaceholder: props.filterPlaceholder,
27546
+ filterInputProps: props.filterInputProps
27063
27547
  }) : null;
27064
27548
  };
27065
27549
 
27066
- var createGroupChildren = function createGroupChildren(optionGroup) {
27550
+ var createGroupChildren = function createGroupChildren(optionGroup, style) {
27067
27551
  var groupChildren = getOptionGroupChildren(optionGroup);
27068
27552
  return groupChildren.map(function (option, j) {
27069
27553
  var optionLabel = getOptionLabel(option);
@@ -27074,6 +27558,7 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27074
27558
  key: optionKey,
27075
27559
  label: optionLabel,
27076
27560
  option: option,
27561
+ style: style,
27077
27562
  template: props.itemTemplate,
27078
27563
  selected: isSelected(option),
27079
27564
  onClick: onOptionSelect,
@@ -27085,14 +27570,21 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27085
27570
  };
27086
27571
 
27087
27572
  var createItem = function createItem(option, index) {
27573
+ var scrollerOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
27574
+ var style = {
27575
+ height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
27576
+ };
27577
+
27088
27578
  if (props.optionGroupLabel) {
27089
27579
  var groupContent = props.optionGroupTemplate ? ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : getOptionGroupLabel(option);
27090
- var groupChildrenContent = createGroupChildren(option);
27580
+ var groupChildrenContent = createGroupChildren(option, style);
27091
27581
  var key = index + '_' + getOptionGroupRenderKey(option);
27092
27582
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
27093
27583
  key: key
27094
27584
  }, /*#__PURE__*/React__namespace.createElement("li", {
27095
- className: "p-listbox-item-group"
27585
+ className: "p-listbox-item-group",
27586
+ style: style,
27587
+ role: "group"
27096
27588
  }, groupContent), groupChildrenContent);
27097
27589
  } else {
27098
27590
  var optionLabel = getOptionLabel(option);
@@ -27103,6 +27595,7 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27103
27595
  key: optionKey,
27104
27596
  label: optionLabel,
27105
27597
  option: option,
27598
+ style: style,
27106
27599
  template: props.itemTemplate,
27107
27600
  selected: isSelected(option),
27108
27601
  onClick: onOptionSelect,
@@ -27126,8 +27619,8 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27126
27619
  filter: visibleOptions
27127
27620
  }));
27128
27621
  },
27129
- itemTemplate: function itemTemplate(item, option) {
27130
- return item && createItem(item, option.index);
27622
+ itemTemplate: function itemTemplate(item, options) {
27623
+ return item && createItem(item, options.index, options);
27131
27624
  },
27132
27625
  contentTemplate: function contentTemplate(option) {
27133
27626
  var className = classNames('p-listbox-list', option.className);
@@ -27135,7 +27628,9 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27135
27628
  ref: option.contentRef,
27136
27629
  className: className,
27137
27630
  role: "listbox",
27138
- "aria-multiselectable": props.multiple
27631
+ "aria-multiselectable": props.multiple,
27632
+ "aria-labelledby": props['aria-labelledby'],
27633
+ "aria-label": props['aria-label']
27139
27634
  }, option.children);
27140
27635
  }
27141
27636
  });
@@ -27148,7 +27643,9 @@ var ListBox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27148
27643
  return /*#__PURE__*/React__namespace.createElement("ul", {
27149
27644
  className: "p-listbox-list",
27150
27645
  role: "listbox",
27151
- "aria-multiselectable": props.multiple
27646
+ "aria-multiselectable": props.multiple,
27647
+ "aria-labelledby": props['aria-labelledby'],
27648
+ "aria-label": props['aria-label']
27152
27649
  }, items);
27153
27650
  }
27154
27651
  };
@@ -27203,10 +27700,12 @@ ListBox.defaultProps = {
27203
27700
  filterMatchMode: 'contains',
27204
27701
  filterPlaceholder: null,
27205
27702
  filterLocale: undefined,
27703
+ filterInputProps: null,
27206
27704
  tabIndex: 0,
27207
27705
  tooltip: null,
27208
27706
  tooltipOptions: null,
27209
- ariaLabelledBy: null,
27707
+ 'aria-label': null,
27708
+ 'aria-labelledby': null,
27210
27709
  onChange: null,
27211
27710
  onFilterValueChange: null
27212
27711
  };
@@ -27464,6 +27963,7 @@ var MegaMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
27464
27963
 
27465
27964
  return /*#__PURE__*/React__namespace.createElement("li", {
27466
27965
  key: key,
27966
+ id: item.id,
27467
27967
  className: _className2,
27468
27968
  style: item.style,
27469
27969
  role: "none"
@@ -27479,6 +27979,7 @@ var MegaMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
27479
27979
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
27480
27980
  key: submenu.label
27481
27981
  }, /*#__PURE__*/React__namespace.createElement("li", {
27982
+ id: submenu.id,
27482
27983
  className: className,
27483
27984
  style: submenu.style,
27484
27985
  role: "presentation"
@@ -27545,6 +28046,7 @@ var MegaMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
27545
28046
  var panel = createCategoryPanel(category);
27546
28047
  return /*#__PURE__*/React__namespace.createElement("li", {
27547
28048
  key: category.label + '_' + index,
28049
+ id: category.id,
27548
28050
  className: className,
27549
28051
  style: category.style,
27550
28052
  onMouseEnter: function onMouseEnter(e) {
@@ -27568,19 +28070,36 @@ var MegaMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
27568
28070
 
27569
28071
  var createMenu = function createMenu() {
27570
28072
  if (props.model) {
27571
- return props.model.map(function (item, index) {
28073
+ return /*#__PURE__*/React__namespace.createElement("ul", {
28074
+ className: "p-megamenu-root-list",
28075
+ role: "menubar"
28076
+ }, props.model.map(function (item, index) {
27572
28077
  return createCategory(item, index);
27573
- });
28078
+ }));
27574
28079
  }
27575
28080
 
27576
28081
  return null;
27577
28082
  };
27578
28083
 
27579
- var createCustomContent = function createCustomContent() {
27580
- if (props.children) {
28084
+ var createStartContent = function createStartContent() {
28085
+ if (props.start) {
28086
+ var _start = ObjectUtils.getJSXElement(props.start, props);
28087
+
27581
28088
  return /*#__PURE__*/React__namespace.createElement("div", {
27582
- className: "p-megamenu-custom"
27583
- }, props.children);
28089
+ className: "p-megamenu-start"
28090
+ }, _start);
28091
+ }
28092
+
28093
+ return null;
28094
+ };
28095
+
28096
+ var createEndContent = function createEndContent() {
28097
+ if (props.end) {
28098
+ var _end = ObjectUtils.getJSXElement(props.end, props);
28099
+
28100
+ return /*#__PURE__*/React__namespace.createElement("div", {
28101
+ className: "p-megamenu-end"
28102
+ }, _end);
27584
28103
  }
27585
28104
 
27586
28105
  return null;
@@ -27592,16 +28111,14 @@ var MegaMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
27592
28111
  'p-megamenu-vertical': props.orientation === 'vertical'
27593
28112
  }, props.className);
27594
28113
  var menu = createMenu();
27595
- var customContent = createCustomContent();
28114
+ var start = createStartContent();
28115
+ var end = createEndContent();
27596
28116
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
27597
28117
  ref: elementRef,
27598
28118
  id: props.id,
27599
28119
  className: className,
27600
28120
  style: props.style
27601
- }, otherProps), /*#__PURE__*/React__namespace.createElement("ul", {
27602
- className: "p-megamenu-root-list",
27603
- role: "menubar"
27604
- }, menu), customContent);
28121
+ }, otherProps), start, menu, end);
27605
28122
  }));
27606
28123
  MegaMenu.displayName = 'MegaMenu';
27607
28124
  MegaMenu.defaultProps = {
@@ -27610,7 +28127,9 @@ MegaMenu.defaultProps = {
27610
28127
  model: null,
27611
28128
  style: null,
27612
28129
  className: null,
27613
- orientation: 'horizontal'
28130
+ orientation: 'horizontal',
28131
+ start: null,
28132
+ end: null
27614
28133
  };
27615
28134
 
27616
28135
  function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -27835,7 +28354,7 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
27835
28354
  };
27836
28355
 
27837
28356
  var onItemClick = function onItemClick(event, suggestion) {
27838
- inputRef.current.focus();
28357
+ DomHandler.focus(inputRef.current);
27839
28358
  selectItem(event, suggestion);
27840
28359
  };
27841
28360
 
@@ -28037,10 +28556,12 @@ var Mention = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
28037
28556
  style: props.style
28038
28557
  }, /*#__PURE__*/React__namespace.createElement(InputTextarea, _extends({
28039
28558
  ref: inputRef,
28040
- id: props.inputId
28041
- }, inputProps, {
28559
+ id: props.inputId,
28560
+ "aria-labelledby": props['aria-labelledby'],
28561
+ "aria-label": props['aria-label'],
28042
28562
  className: inputClassName,
28043
- style: props.inputStyle,
28563
+ style: props.inputStyle
28564
+ }, inputProps, {
28044
28565
  onFocus: onFocus,
28045
28566
  onBlur: onBlur,
28046
28567
  onKeyDown: onKeyDown,
@@ -28070,6 +28591,8 @@ Mention.defaultProps = {
28070
28591
  headerTemplate: null,
28071
28592
  footerTemplate: null,
28072
28593
  itemTemplate: null,
28594
+ 'aria-label': null,
28595
+ 'aria-labelledby': null,
28073
28596
  transitionOptions: null,
28074
28597
  onChange: null,
28075
28598
  onInput: null,
@@ -28591,6 +29114,7 @@ var MenubarSub = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
28591
29114
  return /*#__PURE__*/React__namespace.createElement("li", {
28592
29115
  key: key,
28593
29116
  role: "none",
29117
+ id: item.id,
28594
29118
  className: className,
28595
29119
  style: item.style,
28596
29120
  onMouseEnter: function onMouseEnter(event) {
@@ -28912,6 +29436,7 @@ var MultiSelectItem = /*#__PURE__*/React__namespace.memo(function (props) {
28912
29436
  var tabIndex = props.disabled ? null : props.tabIndex || 0;
28913
29437
  return /*#__PURE__*/React__namespace.createElement("li", {
28914
29438
  className: className,
29439
+ style: props.style,
28915
29440
  onClick: onClick,
28916
29441
  tabIndex: tabIndex,
28917
29442
  onKeyDown: onKeyDown,
@@ -28984,7 +29509,7 @@ var MultiSelectPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
28984
29509
  return null;
28985
29510
  };
28986
29511
 
28987
- var createGroupChildren = function createGroupChildren(optionGroup) {
29512
+ var createGroupChildren = function createGroupChildren(optionGroup, style) {
28988
29513
  var groupChildren = props.getOptionGroupChildren(optionGroup);
28989
29514
  return groupChildren.map(function (option, j) {
28990
29515
  var optionLabel = props.getOptionLabel(option);
@@ -28996,6 +29521,7 @@ var MultiSelectPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
28996
29521
  key: optionKey,
28997
29522
  label: optionLabel,
28998
29523
  option: option,
29524
+ style: style,
28999
29525
  template: props.itemTemplate,
29000
29526
  selected: selected,
29001
29527
  onClick: props.onOptionSelect,
@@ -29014,14 +29540,20 @@ var MultiSelectPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
29014
29540
  };
29015
29541
 
29016
29542
  var createItem = function createItem(option, index) {
29543
+ var scrollerOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
29544
+ var style = {
29545
+ height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
29546
+ };
29547
+
29017
29548
  if (props.optionGroupLabel) {
29018
29549
  var groupContent = props.optionGroupTemplate ? ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : props.getOptionGroupLabel(option);
29019
- var groupChildrenContent = createGroupChildren(option);
29550
+ var groupChildrenContent = createGroupChildren(option, style);
29020
29551
  var key = index + '_' + props.getOptionGroupRenderKey(option);
29021
29552
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
29022
29553
  key: key
29023
29554
  }, /*#__PURE__*/React__namespace.createElement("li", {
29024
- className: "p-multiselect-item-group"
29555
+ className: "p-multiselect-item-group",
29556
+ style: style
29025
29557
  }, groupContent), groupChildrenContent);
29026
29558
  } else {
29027
29559
  var optionLabel = props.getOptionLabel(option);
@@ -29033,6 +29565,7 @@ var MultiSelectPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
29033
29565
  key: optionKey,
29034
29566
  label: optionLabel,
29035
29567
  option: option,
29568
+ style: style,
29036
29569
  template: props.itemTemplate,
29037
29570
  selected: selected,
29038
29571
  onClick: props.onOptionSelect,
@@ -29061,13 +29594,14 @@ var MultiSelectPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
29061
29594
  }),
29062
29595
  className: classNames('p-multiselect-items-wrapper', props.virtualScrollerOptions.className),
29063
29596
  items: props.visibleOptions,
29597
+ autoSize: true,
29064
29598
  onLazyLoad: function onLazyLoad(event) {
29065
29599
  return props.virtualScrollerOptions.onLazyLoad(_objectSpread$b(_objectSpread$b({}, event), {
29066
29600
  filter: props.filterValue
29067
29601
  }));
29068
29602
  },
29069
29603
  itemTemplate: function itemTemplate(item, options) {
29070
- return item && createItem(item, options.index);
29604
+ return item && createItem(item, options.index, options);
29071
29605
  },
29072
29606
  contentTemplate: function contentTemplate(options) {
29073
29607
  var className = classNames('p-multiselect-items p-component', options.className);
@@ -29244,7 +29778,7 @@ var MultiSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
29244
29778
 
29245
29779
  case 27:
29246
29780
  hide();
29247
- inputRef.current.focus();
29781
+ DomHandler.focus(inputRef.current);
29248
29782
  break;
29249
29783
  }
29250
29784
  };
@@ -29262,7 +29796,7 @@ var MultiSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
29262
29796
  var onClick = function onClick(event) {
29263
29797
  if (!props.disabled && !isPanelClicked(event) && !DomHandler.hasClass(event.target, 'p-multiselect-token-icon') && !isClearClicked(event)) {
29264
29798
  overlayVisibleState ? hide() : show();
29265
- inputRef.current.focus();
29799
+ DomHandler.focus(inputRef.current);
29266
29800
  event.preventDefault();
29267
29801
  }
29268
29802
  };
@@ -29387,7 +29921,7 @@ var MultiSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
29387
29921
  if (highlightItem && highlightItem.scrollIntoView) {
29388
29922
  highlightItem.scrollIntoView({
29389
29923
  block: 'nearest',
29390
- inline: 'start'
29924
+ inline: 'nearest'
29391
29925
  });
29392
29926
  }
29393
29927
  };
@@ -29439,7 +29973,7 @@ var MultiSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
29439
29973
 
29440
29974
  var onCloseClick = function onCloseClick(event) {
29441
29975
  hide();
29442
- inputRef.current.focus();
29976
+ DomHandler.focus(inputRef.current);
29443
29977
  event.preventDefault();
29444
29978
  event.stopPropagation();
29445
29979
  };
@@ -29632,7 +30166,7 @@ var MultiSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
29632
30166
  var label;
29633
30167
 
29634
30168
  if (!empty && !props.fixedPlaceholder) {
29635
- if (props.maxSelectedLabels && props.value.length > props.maxSelectedLabels) {
30169
+ if (ObjectUtils.isNotEmpty(props.maxSelectedLabels) && props.value.length > props.maxSelectedLabels) {
29636
30170
  return getSelectedItemsLabel();
29637
30171
  } else {
29638
30172
  return props.value.reduce(function (acc, value, index) {
@@ -29647,7 +30181,7 @@ var MultiSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
29647
30181
  var getLabelContent = function getLabelContent() {
29648
30182
  if (props.selectedItemTemplate) {
29649
30183
  if (!empty) {
29650
- if (props.maxSelectedLabels && props.value.length > props.maxSelectedLabels) {
30184
+ if (ObjectUtils.isNotEmpty(props.maxSelectedLabels) && props.value.length > props.maxSelectedLabels) {
29651
30185
  return getSelectedItemsLabel();
29652
30186
  } else {
29653
30187
  return props.value.map(function (val, index) {
@@ -29703,9 +30237,7 @@ var MultiSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
29703
30237
  var filteredSubOptions = FilterService.filter(getOptionGroupChildren(optgroup), searchFields, filterValue, props.filterMatchMode, props.filterLocale);
29704
30238
 
29705
30239
  if (filteredSubOptions && filteredSubOptions.length) {
29706
- filteredGroups.push(_objectSpread$a(_objectSpread$a({}, optgroup), {
29707
- items: filteredSubOptions
29708
- }));
30240
+ filteredGroups.push(_objectSpread$a(_objectSpread$a({}, optgroup), _defineProperty({}, props.optionGroupChildren, filteredSubOptions)));
29709
30241
  }
29710
30242
  }
29711
30243
  } catch (err) {
@@ -29905,13 +30437,11 @@ var MultiStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React_
29905
30437
  setFocusedState = _React$useState2[1];
29906
30438
 
29907
30439
  var elementRef = React__namespace.useRef(null);
29908
- var inputRef = React__namespace.useRef(props.inputRef);
29909
30440
  var equalityKey = props.optionValue ? null : props.dataKey;
29910
30441
 
29911
30442
  var onClick = function onClick(event) {
29912
30443
  if (!props.disabled && !props.readOnly) {
29913
30444
  toggle(event);
29914
- inputRef.current.focus();
29915
30445
  }
29916
30446
  };
29917
30447
 
@@ -29919,6 +30449,11 @@ var MultiStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React_
29919
30449
  return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option;
29920
30450
  };
29921
30451
 
30452
+ var getOptionAriaLabel = function getOptionAriaLabel(option) {
30453
+ var ariaField = props.optionLabel || props.optionValue;
30454
+ return ariaField ? ObjectUtils.resolveFieldData(option, ariaField) : option;
30455
+ };
30456
+
29922
30457
  var findNextOption = function findNextOption() {
29923
30458
  if (props.options) {
29924
30459
  return selectedOptionIndex === props.options.length - 1 ? props.empty ? null : props.options[0] : props.options[selectedOptionIndex + 1];
@@ -29952,6 +30487,13 @@ var MultiStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React_
29952
30487
  setFocusedState(false);
29953
30488
  };
29954
30489
 
30490
+ var onKeyDown = function onKeyDown(e) {
30491
+ if (e.keyCode === 32) {
30492
+ toggle(e);
30493
+ e.preventDefault();
30494
+ }
30495
+ };
30496
+
29955
30497
  var getSelectedOptionMap = function getSelectedOptionMap() {
29956
30498
  var option, index;
29957
30499
 
@@ -29968,9 +30510,6 @@ var MultiStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React_
29968
30510
  };
29969
30511
  };
29970
30512
 
29971
- React__namespace.useEffect(function () {
29972
- ObjectUtils.combinedRefs(inputRef, props.inputRef);
29973
- }, [inputRef, props.inputRef]);
29974
30513
  useMountEffect(function () {
29975
30514
  if (!props.empty && props.value === null) {
29976
30515
  toggle();
@@ -30010,6 +30549,8 @@ var MultiStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React_
30010
30549
  'p-focus': focusedState
30011
30550
  }, selectedOption && selectedOption.className);
30012
30551
  var icon = createIcon();
30552
+ var ariaValueLabel = !!selectedOption ? getOptionAriaLabel(selectedOption) : ariaLabel('nullLabel');
30553
+ var ariaChecked = !!selectedOption ? 'true' : 'false';
30013
30554
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
30014
30555
  ref: elementRef,
30015
30556
  id: props.id,
@@ -30018,24 +30559,20 @@ var MultiStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React_
30018
30559
  }, otherProps, {
30019
30560
  onClick: onClick
30020
30561
  }), /*#__PURE__*/React__namespace.createElement("div", {
30021
- className: "p-hidden-accessible"
30022
- }, /*#__PURE__*/React__namespace.createElement("input", {
30023
- ref: inputRef,
30024
- type: "checkbox",
30025
- "aria-labelledby": props.ariaLabelledBy,
30026
- id: props.inputId,
30027
- name: props.name,
30562
+ className: boxClassName,
30563
+ style: selectedOption && selectedOption.style,
30564
+ tabIndex: props.tabIndex,
30028
30565
  onFocus: onFocus,
30029
30566
  onBlur: onBlur,
30030
- disabled: props.disabled,
30031
- readOnly: props.readOnly,
30032
- defaultChecked: !!selectedOption
30033
- })), /*#__PURE__*/React__namespace.createElement("div", {
30034
- className: boxClassName,
30567
+ onKeyDown: onKeyDown,
30035
30568
  role: "checkbox",
30036
- "aria-checked": !!selectedOption,
30037
- style: selectedOption && selectedOption.style
30038
- }, icon)), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
30569
+ "aria-checked": ariaChecked,
30570
+ "aria-labelledby": props['aria-labelledby'],
30571
+ "aria-label": props['aria-label']
30572
+ }, icon), focusedState && /*#__PURE__*/React__namespace.createElement("span", {
30573
+ className: "p-sr-only",
30574
+ "aria-live": "polite"
30575
+ }, ariaValueLabel)), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
30039
30576
  target: elementRef,
30040
30577
  content: props.tooltip
30041
30578
  }, props.tooltipOptions)));
@@ -30044,22 +30581,22 @@ MultiStateCheckbox.displayName = 'MultiStateCheckbox';
30044
30581
  MultiStateCheckbox.defaultProps = {
30045
30582
  __TYPE: 'MultiStateCheckbox',
30046
30583
  id: null,
30047
- inputRef: null,
30048
- inputId: null,
30049
30584
  value: null,
30050
30585
  options: null,
30051
30586
  optionValue: null,
30587
+ optionLabel: null,
30052
30588
  iconTemplate: null,
30053
30589
  dataKey: null,
30054
- name: null,
30055
30590
  style: null,
30056
30591
  className: null,
30057
30592
  disabled: false,
30058
30593
  readOnly: false,
30059
30594
  empty: true,
30595
+ tabIndex: "0",
30596
+ 'aria-label': null,
30597
+ 'aria-labelledby': null,
30060
30598
  tooltip: null,
30061
30599
  tooltipOptions: null,
30062
- ariaLabelledBy: null,
30063
30600
  onChange: null
30064
30601
  };
30065
30602
 
@@ -30867,7 +31404,7 @@ var OverlayPanel = /*#__PURE__*/React__namespace.forwardRef(function (props, ref
30867
31404
  };
30868
31405
 
30869
31406
  var align = function align() {
30870
- if (currentTargetRef.current) {
31407
+ if (currentTargetRef.current && overlayRef.current) {
30871
31408
  DomHandler.absolutePosition(overlayRef.current, currentTargetRef.current);
30872
31409
  var containerOffset = DomHandler.getOffset(overlayRef.current);
30873
31410
  var targetOffset = DomHandler.getOffset(currentTargetRef.current);
@@ -30894,7 +31431,7 @@ var OverlayPanel = /*#__PURE__*/React__namespace.forwardRef(function (props, ref
30894
31431
  innerHTML += "\n @media screen and (max-width: ".concat(breakpoint, ") {\n .p-overlaypanel[").concat(attributeSelector.current, "] {\n width: ").concat(props.breakpoints[breakpoint], " !important;\n }\n }\n ");
30895
31432
  }
30896
31433
 
30897
- styleElement.innerHTML = innerHTML;
31434
+ styleElement.current.innerHTML = innerHTML;
30898
31435
  }
30899
31436
  };
30900
31437
 
@@ -31322,6 +31859,7 @@ var PanelMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
31322
31859
 
31323
31860
  return /*#__PURE__*/React__namespace.createElement("li", {
31324
31861
  key: key,
31862
+ id: item.id,
31325
31863
  className: className,
31326
31864
  style: item.style,
31327
31865
  role: "none"
@@ -31356,6 +31894,11 @@ var PanelMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
31356
31894
  activeItemState = _React$useState4[0],
31357
31895
  setActiveItemState = _React$useState4[1];
31358
31896
 
31897
+ var _React$useState5 = React__namespace.useState(false),
31898
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
31899
+ animationDisabled = _React$useState6[0],
31900
+ setAnimationDisabled = _React$useState6[1];
31901
+
31359
31902
  var headerId = idState + '_header';
31360
31903
  var contentId = idState + '_content';
31361
31904
 
@@ -31425,6 +31968,14 @@ var PanelMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
31425
31968
 
31426
31969
  setActiveItemState(findActiveItem());
31427
31970
  });
31971
+ useUpdateEffect(function () {
31972
+ setAnimationDisabled(true);
31973
+ setActiveItemState(findActiveItem());
31974
+ }, [props.model]);
31975
+
31976
+ var onEnter = function onEnter() {
31977
+ setAnimationDisabled(false);
31978
+ };
31428
31979
 
31429
31980
  var createPanel = function createPanel(item, index) {
31430
31981
  var key = item.label + '_' + index;
@@ -31497,6 +32048,8 @@ var PanelMenu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
31497
32048
  enter: 1000,
31498
32049
  exit: 450
31499
32050
  },
32051
+ onEnter: onEnter,
32052
+ disabled: animationDisabled,
31500
32053
  "in": active,
31501
32054
  unmountOnExit: true,
31502
32055
  options: props.transitionOptions
@@ -32167,6 +32720,23 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
32167
32720
  return ObjectUtils.findIndexInList(item, props.selection, props.dataKey) !== -1;
32168
32721
  };
32169
32722
 
32723
+ var onFilter = function onFilter(event) {
32724
+ if (props.onFilter) {
32725
+ props.onFilter({
32726
+ originalEvent: event,
32727
+ value: event.target.value,
32728
+ type: props.type
32729
+ });
32730
+ }
32731
+ };
32732
+
32733
+ var onFilterInputKeyDown = function onFilterInputKeyDown(event) {
32734
+ //enter
32735
+ if (event.which === 13) {
32736
+ event.preventDefault();
32737
+ }
32738
+ };
32739
+
32170
32740
  React__namespace.useImperativeHandle(ref, function () {
32171
32741
  return {
32172
32742
  listElementRef: listElementRef
@@ -32203,6 +32773,44 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
32203
32773
  return null;
32204
32774
  };
32205
32775
 
32776
+ var createFilter = function createFilter() {
32777
+ if (props.showFilter) {
32778
+ var content = /*#__PURE__*/React__namespace.createElement("div", {
32779
+ className: "p-picklist-filter"
32780
+ }, /*#__PURE__*/React__namespace.createElement("input", {
32781
+ type: "text",
32782
+ value: props.filterValue,
32783
+ onChange: onFilter,
32784
+ onKeyDown: onFilterInputKeyDown,
32785
+ placeholder: props.placeholder,
32786
+ className: "p-picklist-filter-input p-inputtext p-component"
32787
+ }), /*#__PURE__*/React__namespace.createElement("span", {
32788
+ className: "p-picklist-filter-icon pi pi-search"
32789
+ }));
32790
+
32791
+ if (props.filterTemplate) {
32792
+ var defaultContentOptions = {
32793
+ className: 'p-picklist-filter',
32794
+ inputProps: {
32795
+ className: 'p-picklist-filter-input p-inputtext p-component',
32796
+ onChange: onFilter,
32797
+ onKeyDown: onFilterInputKeyDown
32798
+ },
32799
+ iconClassName: 'p-picklist-filter-icon pi pi-search',
32800
+ element: content,
32801
+ props: props
32802
+ };
32803
+ content = ObjectUtils.getJSXElement(props.filterTemplate, defaultContentOptions);
32804
+ }
32805
+
32806
+ return /*#__PURE__*/React__namespace.createElement("div", {
32807
+ className: "p-picklist-filter-container"
32808
+ }, content);
32809
+ }
32810
+
32811
+ return null;
32812
+ };
32813
+
32206
32814
  var createList = function createList() {
32207
32815
  var items = createItems();
32208
32816
  var className = classNames('p-picklist-list', props.listClassName);
@@ -32216,19 +32824,20 @@ var PickListSubList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__na
32216
32824
 
32217
32825
  var className = classNames('p-picklist-list-wrapper', props.className);
32218
32826
  var header = createHeader();
32827
+ var filter = createFilter();
32219
32828
  var list = createList();
32220
32829
  return /*#__PURE__*/React__namespace.createElement("div", {
32221
32830
  ref: listElementRef,
32222
32831
  className: className
32223
- }, header, list);
32832
+ }, header, filter, list);
32224
32833
  }));
32225
32834
  PickListSubList.displayName = 'PickListSubList';
32226
32835
 
32227
32836
  var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (props) {
32228
- var moveRightDisabled = ObjectUtils.isEmpty(props.sourceSelection);
32229
- var moveLeftDisabled = ObjectUtils.isEmpty(props.targetSelection);
32230
- var moveAllRightDisabled = ObjectUtils.isEmpty(props.source);
32231
- var moveAllLeftDisabled = ObjectUtils.isEmpty(props.target);
32837
+ var moveRightDisabled = ObjectUtils.isEmpty(props.sourceSelection) || ObjectUtils.isEmpty(props.visibleSourceList);
32838
+ var moveLeftDisabled = ObjectUtils.isEmpty(props.targetSelection) || ObjectUtils.isEmpty(props.visibleTargetList);
32839
+ var moveAllRightDisabled = ObjectUtils.isEmpty(props.visibleSourceList);
32840
+ var moveAllLeftDisabled = ObjectUtils.isEmpty(props.visibleTargetList);
32232
32841
 
32233
32842
  var moveRight = function moveRight(event) {
32234
32843
  var selection = props.sourceSelection;
@@ -32259,8 +32868,12 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
32259
32868
 
32260
32869
  var moveAllRight = function moveAllRight(event) {
32261
32870
  if (props.source) {
32262
- var targetList = [].concat(_toConsumableArray(props.target), _toConsumableArray(props.source));
32263
- var sourceList = [];
32871
+ var targetList = [].concat(_toConsumableArray(props.target), _toConsumableArray(props.visibleSourceList));
32872
+ var sourceList = props.source.filter(function (s) {
32873
+ return !props.visibleSourceList.some(function (vs) {
32874
+ return vs === s;
32875
+ });
32876
+ });
32264
32877
 
32265
32878
  if (props.onTransfer) {
32266
32879
  props.onTransfer({
@@ -32302,8 +32915,12 @@ var PickListTransferControls = /*#__PURE__*/React__namespace.memo(function (prop
32302
32915
 
32303
32916
  var moveAllLeft = function moveAllLeft(event) {
32304
32917
  if (props.source) {
32305
- var sourceList = [].concat(_toConsumableArray(props.source), _toConsumableArray(props.target));
32306
- var targetList = [];
32918
+ var sourceList = [].concat(_toConsumableArray(props.source), _toConsumableArray(props.visibleTargetList));
32919
+ var targetList = props.target.filter(function (t) {
32920
+ return !props.visibleTargetList.some(function (vt) {
32921
+ return vt === t;
32922
+ });
32923
+ });
32307
32924
 
32308
32925
  if (props.onTransfer) {
32309
32926
  props.onTransfer({
@@ -32354,12 +32971,27 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
32354
32971
  targetSelectionState = _React$useState4[0],
32355
32972
  setTargetSelectionState = _React$useState4[1];
32356
32973
 
32974
+ var _React$useState5 = React__namespace.useState(''),
32975
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
32976
+ sourceFilterValueState = _React$useState6[0],
32977
+ setSourceFilterValueState = _React$useState6[1];
32978
+
32979
+ var _React$useState7 = React__namespace.useState(''),
32980
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
32981
+ targetFilterValueState = _React$useState8[0],
32982
+ setTargetFilterValueState = _React$useState8[1];
32983
+
32357
32984
  var sourceListElementRef = React__namespace.useRef(null);
32358
32985
  var targetListElementRef = React__namespace.useRef(null);
32359
32986
  var reorderedListElementRef = React__namespace.useRef(null);
32360
32987
  var reorderDirection = React__namespace.useRef(null);
32361
32988
  var sourceSelection = props.onSourceSelectionChange ? props.sourceSelection : sourceSelectionState;
32362
32989
  var targetSelection = props.onTargetSelectionChange ? props.targetSelection : targetSelectionState;
32990
+ var sourceFilteredValue = props.onSourceFilterChange ? props.sourceFilterValue : sourceFilterValueState;
32991
+ var targetFilteredValue = props.onTargetFilterChange ? props.targetFilterValue : targetFilterValueState;
32992
+ var hasFilterBy = ObjectUtils.isNotEmpty(props.filterBy);
32993
+ var showSourceFilter = hasFilterBy && props.showSourceFilter;
32994
+ var showTargetFilter = hasFilterBy && props.showTargetFilter;
32363
32995
 
32364
32996
  var onSourceReorder = function onSourceReorder(event) {
32365
32997
  handleChange(event, event.value, props.target);
@@ -32494,6 +33126,52 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
32494
33126
  }
32495
33127
  };
32496
33128
 
33129
+ var onFilter = function onFilter(event) {
33130
+ var originalEvent = event.originalEvent,
33131
+ value = event.value,
33132
+ type = event.type;
33133
+
33134
+ var _ref = type === 'source' ? [setSourceFilterValueState, props.onSourceFilterChange] : [setTargetFilterValueState, props.onTargetFilterChange],
33135
+ _ref2 = _slicedToArray(_ref, 2),
33136
+ setFilterState = _ref2[0],
33137
+ onFilterChange = _ref2[1];
33138
+
33139
+ if (onFilterChange) {
33140
+ onFilterChange({
33141
+ originalEvent: originalEvent,
33142
+ value: value
33143
+ });
33144
+ } else {
33145
+ setFilterState(value);
33146
+ }
33147
+ };
33148
+
33149
+ var getVisibleList = function getVisibleList(list, type) {
33150
+ var _ref3 = type === 'source' ? [sourceFilteredValue, filterSource] : [targetFilteredValue, filterTarget],
33151
+ _ref4 = _slicedToArray(_ref3, 2),
33152
+ filteredValue = _ref4[0],
33153
+ filterCallback = _ref4[1];
33154
+
33155
+ return hasFilterBy && ObjectUtils.isNotEmpty(filteredValue) ? filterCallback(filteredValue) : list;
33156
+ };
33157
+
33158
+ var filterSource = function filterSource() {
33159
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
33160
+ var filteredValue = value.trim().toLocaleLowerCase(props.filterLocale);
33161
+ return filter(props.source, filteredValue);
33162
+ };
33163
+
33164
+ var filterTarget = function filterTarget() {
33165
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
33166
+ var filteredValue = value.trim().toLocaleLowerCase(props.filterLocale);
33167
+ return filter(props.target, filteredValue);
33168
+ };
33169
+
33170
+ var filter = function filter(list, filterValue) {
33171
+ var searchFields = hasFilterBy ? props.filterBy.split(',') : [];
33172
+ return FilterService.filter(list, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
33173
+ };
33174
+
32497
33175
  useUpdateEffect(function () {
32498
33176
  if (reorderedListElementRef.current) {
32499
33177
  handleScrollPosition(reorderedListElementRef.current, reorderDirection.current);
@@ -32503,6 +33181,10 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
32503
33181
  });
32504
33182
  var otherProps = ObjectUtils.findDiffKeys(props, PickList.defaultProps);
32505
33183
  var className = classNames('p-picklist p-component', props.className);
33184
+ var sourceItemTemplate = props.sourceItemTemplate ? props.sourceItemTemplate : props.itemTemplate;
33185
+ var targetItemTemplate = props.targetItemTemplate ? props.targetItemTemplate : props.itemTemplate;
33186
+ var sourceList = getVisibleList(props.source, 'source');
33187
+ var targetList = getVisibleList(props.target, 'target');
32506
33188
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
32507
33189
  id: props.id,
32508
33190
  className: className,
@@ -32515,41 +33197,55 @@ var PickList = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
32515
33197
  dataKey: props.dataKey
32516
33198
  }), /*#__PURE__*/React__namespace.createElement(PickListSubList, {
32517
33199
  ref: sourceListElementRef,
32518
- list: props.source,
33200
+ type: "source",
33201
+ list: sourceList,
32519
33202
  selection: sourceSelection,
32520
33203
  onSelectionChange: function onSelectionChange(e) {
32521
33204
  return _onSelectionChange(e, 'sourceSelection', props.onSourceSelectionChange);
32522
33205
  },
32523
- itemTemplate: props.itemTemplate,
33206
+ itemTemplate: sourceItemTemplate,
32524
33207
  header: props.sourceHeader,
32525
33208
  style: props.sourceStyle,
32526
33209
  className: "p-picklist-source-wrapper",
32527
33210
  listClassName: "p-picklist-source",
32528
33211
  metaKeySelection: props.metaKeySelection,
32529
33212
  tabIndex: props.tabIndex,
32530
- dataKey: props.dataKey
33213
+ dataKey: props.dataKey,
33214
+ filterValue: sourceFilteredValue,
33215
+ onFilter: onFilter,
33216
+ showFilter: showSourceFilter,
33217
+ placeholder: props.sourceFilterPlaceholder,
33218
+ template: props.sourceFilterTemplate
32531
33219
  }), /*#__PURE__*/React__namespace.createElement(PickListTransferControls, {
32532
33220
  onTransfer: onTransfer,
32533
33221
  source: props.source,
33222
+ visibleSourceList: sourceList,
32534
33223
  target: props.target,
33224
+ visibleTargetList: targetList,
32535
33225
  sourceSelection: sourceSelection,
32536
33226
  targetSelection: targetSelection,
32537
33227
  dataKey: props.dataKey
32538
33228
  }), /*#__PURE__*/React__namespace.createElement(PickListSubList, {
32539
33229
  ref: targetListElementRef,
32540
- list: props.target,
33230
+ type: "target",
33231
+ list: targetList,
32541
33232
  selection: targetSelection,
32542
33233
  onSelectionChange: function onSelectionChange(e) {
32543
33234
  return _onSelectionChange(e, 'targetSelection', props.onTargetSelectionChange);
32544
33235
  },
32545
- itemTemplate: props.itemTemplate,
33236
+ itemTemplate: targetItemTemplate,
32546
33237
  header: props.targetHeader,
32547
33238
  style: props.targetStyle,
32548
33239
  className: "p-picklist-target-wrapper",
32549
33240
  listClassName: "p-picklist-target",
32550
33241
  metaKeySelection: props.metaKeySelection,
32551
33242
  tabIndex: props.tabIndex,
32552
- dataKey: props.dataKey
33243
+ dataKey: props.dataKey,
33244
+ filterValue: targetFilteredValue,
33245
+ onFilter: onFilter,
33246
+ showFilter: showTargetFilter,
33247
+ placeholder: props.targetFilterPlaceholder,
33248
+ template: props.targetFilterTemplate
32553
33249
  }), props.showTargetControls && /*#__PURE__*/React__namespace.createElement(PickListControls, {
32554
33250
  list: props.target,
32555
33251
  selection: targetSelection,
@@ -32575,16 +33271,31 @@ PickList.defaultProps = {
32575
33271
  showSourceControls: true,
32576
33272
  showTargetControls: true,
32577
33273
  metaKeySelection: true,
33274
+ filterBy: null,
33275
+ filterMatchMode: 'contains',
33276
+ filterLocale: undefined,
33277
+ sourceFilterValue: null,
33278
+ targetFilterValue: null,
33279
+ showSourceFilter: true,
33280
+ showTargetFilter: true,
33281
+ sourceFilterPlaceholder: null,
33282
+ targetFilterPlaceholder: null,
33283
+ sourceFilterTemplate: null,
33284
+ targetFilterTemplate: null,
32578
33285
  tabIndex: 0,
32579
33286
  dataKey: null,
32580
33287
  itemTemplate: null,
33288
+ sourceItemTemplate: null,
33289
+ targetItemTemplate: null,
32581
33290
  onChange: null,
32582
33291
  onMoveToSource: null,
32583
33292
  onMoveAllToSource: null,
32584
33293
  onMoveToTarget: null,
32585
33294
  onMoveAllToTarget: null,
32586
33295
  onSourceSelectionChange: null,
32587
- onTargetSelectionChange: null
33296
+ onTargetSelectionChange: null,
33297
+ onSourceFilterChange: null,
33298
+ onTargetFilterChange: null
32588
33299
  };
32589
33300
 
32590
33301
  var ProgressSpinner = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
@@ -32653,7 +33364,7 @@ var RadioButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
32653
33364
  }
32654
33365
  });
32655
33366
  inputRef.current.checked = !props.checked;
32656
- inputRef.current.focus();
33367
+ DomHandler.focus(inputRef.current);
32657
33368
  }
32658
33369
  };
32659
33370
 
@@ -32703,18 +33414,17 @@ var RadioButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
32703
33414
  ref: inputRef,
32704
33415
  id: props.inputId,
32705
33416
  type: "radio",
32706
- "aria-labelledby": props.ariaLabelledBy,
32707
33417
  name: props.name,
32708
33418
  defaultChecked: props.checked,
33419
+ "aria-labelledby": props['aria-labelledby'],
33420
+ "aria-label": props['aria-label'],
32709
33421
  onFocus: onFocus,
32710
33422
  onBlur: onBlur,
32711
33423
  disabled: props.disabled,
32712
33424
  required: props.required,
32713
33425
  tabIndex: props.tabIndex
32714
33426
  })), /*#__PURE__*/React__namespace.createElement("div", {
32715
- className: boxClassName,
32716
- role: "radio",
32717
- "aria-checked": props.checked
33427
+ className: boxClassName
32718
33428
  }, /*#__PURE__*/React__namespace.createElement("div", {
32719
33429
  className: "p-radiobutton-icon"
32720
33430
  }))), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
@@ -32738,7 +33448,8 @@ RadioButton.defaultProps = {
32738
33448
  tabIndex: null,
32739
33449
  tooltip: null,
32740
33450
  tooltipOptions: null,
32741
- ariaLabelledBy: null,
33451
+ 'aria-label': null,
33452
+ 'aria-labelledby': null,
32742
33453
  onChange: null
32743
33454
  };
32744
33455
 
@@ -33185,8 +33896,7 @@ var SelectButtonItem = /*#__PURE__*/React__namespace.memo(function (props) {
33185
33896
  var onKeyDown = function onKeyDown(event) {
33186
33897
  var keyCode = event.which;
33187
33898
 
33188
- if (keyCode === 32 || keyCode === 13) {
33189
- //space and enter
33899
+ if (keyCode === 32) {
33190
33900
  onClick(event);
33191
33901
  event.preventDefault();
33192
33902
  }
@@ -33209,7 +33919,6 @@ var SelectButtonItem = /*#__PURE__*/React__namespace.memo(function (props) {
33209
33919
  role: "button",
33210
33920
  "aria-label": props.label,
33211
33921
  "aria-pressed": props.selected,
33212
- "aria-labelledby": props.ariaLabelledBy,
33213
33922
  onClick: onClick,
33214
33923
  onKeyDown: onKeyDown,
33215
33924
  tabIndex: props.tabIndex,
@@ -33309,8 +34018,7 @@ var SelectButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
33309
34018
  template: props.itemTemplate,
33310
34019
  selected: selected,
33311
34020
  tabIndex: tabIndex,
33312
- disabled: isDisabled,
33313
- ariaLabelledBy: props.ariaLabelledBy
34021
+ disabled: isDisabled
33314
34022
  });
33315
34023
  });
33316
34024
  }
@@ -33352,7 +34060,6 @@ SelectButton.defaultProps = {
33352
34060
  dataKey: null,
33353
34061
  tooltip: null,
33354
34062
  tooltipOptions: null,
33355
- ariaLabelledBy: null,
33356
34063
  itemTemplate: null,
33357
34064
  onChange: null
33358
34065
  };
@@ -33608,13 +34315,21 @@ Skeleton.defaultProps = {
33608
34315
  className: null
33609
34316
  };
33610
34317
 
34318
+ function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
34319
+
34320
+ function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
33611
34321
  var SlideMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
33612
34322
  var _React$useState = React__namespace.useState(null),
33613
34323
  _React$useState2 = _slicedToArray(_React$useState, 2),
33614
34324
  activeItemState = _React$useState2[0],
33615
34325
  setActiveItemState = _React$useState2[1];
33616
34326
 
33617
- var onItemClick = function onItemClick(event, item) {
34327
+ var _React$useState3 = React__namespace.useState({}),
34328
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
34329
+ renderSubMenu = _React$useState4[0],
34330
+ setRenderSubMenu = _React$useState4[1];
34331
+
34332
+ var onItemClick = function onItemClick(event, item, index) {
33618
34333
  if (item.disabled) {
33619
34334
  event.preventDefault();
33620
34335
  return;
@@ -33632,6 +34347,8 @@ var SlideMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
33632
34347
  }
33633
34348
 
33634
34349
  if (item.items) {
34350
+ var key = createKey(item, index);
34351
+ setRenderSubMenu(_objectSpread$9(_objectSpread$9({}, renderSubMenu), {}, _defineProperty({}, key, true)));
33635
34352
  setActiveItemState(item);
33636
34353
  props.onForward();
33637
34354
  }
@@ -33645,8 +34362,10 @@ var SlideMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
33645
34362
  });
33646
34363
  };
33647
34364
 
33648
- var createSubmenu = function createSubmenu(item) {
33649
- if (item.items) {
34365
+ var createSubmenu = function createSubmenu(item, index) {
34366
+ var shouldRender = renderSubMenu[createKey(item, index)];
34367
+
34368
+ if (item.items && shouldRender) {
33650
34369
  return /*#__PURE__*/React__namespace.createElement(SlideMenuSub, {
33651
34370
  menuProps: props.menuProps,
33652
34371
  model: item.items,
@@ -33661,8 +34380,12 @@ var SlideMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
33661
34380
  return null;
33662
34381
  };
33663
34382
 
34383
+ var createKey = function createKey(item, index) {
34384
+ return item.label + '_' + index;
34385
+ };
34386
+
33664
34387
  var createMenuitem = function createMenuitem(item, index) {
33665
- var key = item.label + '_' + index;
34388
+ var key = createKey(item, index);
33666
34389
  var active = activeItemState === item;
33667
34390
  var className = classNames('p-menuitem', {
33668
34391
  'p-menuitem-active': active,
@@ -33681,13 +34404,13 @@ var SlideMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
33681
34404
  var submenuIcon = item.items && /*#__PURE__*/React__namespace.createElement("span", {
33682
34405
  className: submenuIconClassName
33683
34406
  });
33684
- var submenu = createSubmenu(item);
34407
+ var submenu = createSubmenu(item, index);
33685
34408
  var content = /*#__PURE__*/React__namespace.createElement("a", {
33686
34409
  href: item.url || '#',
33687
34410
  className: "p-menuitem-link",
33688
34411
  target: item.target,
33689
34412
  onClick: function onClick(event) {
33690
- return onItemClick(event, item);
34413
+ return onItemClick(event, item, index);
33691
34414
  },
33692
34415
  "aria-disabled": item.disabled
33693
34416
  }, icon, label, submenuIcon);
@@ -33695,7 +34418,7 @@ var SlideMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
33695
34418
  if (item.template) {
33696
34419
  var defaultContentOptions = {
33697
34420
  onClick: function onClick(event) {
33698
- return onItemClick(event, item);
34421
+ return onItemClick(event, item, index);
33699
34422
  },
33700
34423
  className: 'p-menuitem-link',
33701
34424
  labelClassName: 'p-menuitem-text',
@@ -33710,6 +34433,7 @@ var SlideMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
33710
34433
 
33711
34434
  return /*#__PURE__*/React__namespace.createElement("li", {
33712
34435
  key: key,
34436
+ id: item.id,
33713
34437
  className: className,
33714
34438
  style: item.style
33715
34439
  }, content, submenu);
@@ -34163,7 +34887,9 @@ var Slider = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
34163
34887
  "aria-valuemin": props.min,
34164
34888
  "aria-valuemax": props.max,
34165
34889
  "aria-valuenow": leftValue || bottomValue,
34166
- "aria-labelledby": props.ariaLabelledBy
34890
+ "aria-labelledby": props['aria-labelledby'],
34891
+ "aria-label": props['aria-label'],
34892
+ "aria-orientation": props.orientation
34167
34893
  });
34168
34894
  };
34169
34895
 
@@ -34230,14 +34956,15 @@ Slider.defaultProps = {
34230
34956
  className: null,
34231
34957
  disabled: false,
34232
34958
  tabIndex: 0,
34233
- ariaLabelledBy: null,
34234
34959
  onChange: null,
34235
- onSlideEnd: null
34960
+ onSlideEnd: null,
34961
+ 'aria-label': null,
34962
+ 'aria-labelledby': null
34236
34963
  };
34237
34964
 
34238
- function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
34965
+ function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
34239
34966
 
34240
- function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
34967
+ function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
34241
34968
  var SpeedDial = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
34242
34969
  var _classNames2;
34243
34970
 
@@ -34382,7 +35109,7 @@ var SpeedDial = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
34382
35109
  var getItemStyle = function getItemStyle(index) {
34383
35110
  var transitionDelay = calculateTransitionDelay(index);
34384
35111
  var pointStyle = calculatePointStyle(index);
34385
- return _objectSpread$9({
35112
+ return _objectSpread$8({
34386
35113
  transitionDelay: "".concat(transitionDelay, "ms")
34387
35114
  }, pointStyle);
34388
35115
  };
@@ -34622,7 +35349,8 @@ var SplitButtonItem = /*#__PURE__*/React__namespace.memo(function (props) {
34622
35349
  role: "menuitem",
34623
35350
  className: className,
34624
35351
  target: target,
34625
- onClick: onClick
35352
+ onClick: onClick,
35353
+ "aria-label": _label
34626
35354
  }, icon, label);
34627
35355
 
34628
35356
  if (template) {
@@ -34673,9 +35401,9 @@ var SplitButtonPanel = /*#__PURE__*/React__namespace.forwardRef(function (props,
34673
35401
  ref: ref,
34674
35402
  className: className,
34675
35403
  style: props.menuStyle,
34676
- id: props.id,
34677
35404
  onClick: props.onClick
34678
35405
  }, /*#__PURE__*/React__namespace.createElement("ul", {
35406
+ id: props.menuId,
34679
35407
  className: "p-menu-list p-reset",
34680
35408
  role: "menu"
34681
35409
  }, props.children)));
@@ -34802,34 +35530,36 @@ var SplitButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
34802
35530
  var menuButtonClassName = classNames('p-splitbutton-menubutton', props.menuButtonClassName);
34803
35531
  var buttonContent = props.buttonTemplate ? ObjectUtils.getJSXElement(props.buttonTemplate, props) : null;
34804
35532
  var items = createItems();
34805
- var panelId = idState + '_overlay';
35533
+ var menuId = idState + '_menu';
34806
35534
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
34807
35535
  ref: elementRef,
34808
35536
  id: idState,
34809
35537
  className: className,
34810
35538
  style: props.style
34811
- }, otherProps), /*#__PURE__*/React__namespace.createElement(Button, {
35539
+ }, otherProps), /*#__PURE__*/React__namespace.createElement(Button, _extends({
34812
35540
  ref: defaultButtonRef,
34813
35541
  type: "button",
34814
35542
  className: buttonClassName,
34815
35543
  icon: props.icon,
35544
+ loading: props.loading,
35545
+ loadingIcon: props.loadingIcon,
34816
35546
  label: props.label,
34817
35547
  onClick: props.onClick,
34818
35548
  disabled: props.disabled,
34819
35549
  tabIndex: props.tabIndex
34820
- }, buttonContent), /*#__PURE__*/React__namespace.createElement(Button, {
35550
+ }, props.buttonProps), buttonContent), /*#__PURE__*/React__namespace.createElement(Button, _extends({
34821
35551
  type: "button",
34822
35552
  className: menuButtonClassName,
34823
35553
  icon: props.dropdownIcon,
34824
35554
  onClick: onDropdownButtonClick,
34825
35555
  disabled: props.disabled,
34826
35556
  "aria-expanded": overlayVisibleState,
34827
- "aria-haspopup": true,
34828
- "aria-owns": panelId
34829
- }), /*#__PURE__*/React__namespace.createElement(SplitButtonPanel, {
35557
+ "aria-haspopup": "true",
35558
+ "aria-controls": overlayVisibleState ? menuId : null
35559
+ }, props.menuButtonProps)), /*#__PURE__*/React__namespace.createElement(SplitButtonPanel, {
34830
35560
  ref: overlayRef,
34831
35561
  appendTo: props.appendTo,
34832
- id: panelId,
35562
+ menuId: menuId,
34833
35563
  menuStyle: props.menuStyle,
34834
35564
  menuClassName: props.menuClassName,
34835
35565
  onClick: onPanelClick,
@@ -34850,6 +35580,8 @@ SplitButton.defaultProps = {
34850
35580
  id: null,
34851
35581
  label: null,
34852
35582
  icon: null,
35583
+ loading: false,
35584
+ loadingIcon: 'pi pi-spinner pi-spin',
34853
35585
  model: null,
34854
35586
  disabled: null,
34855
35587
  style: null,
@@ -34858,6 +35590,8 @@ SplitButton.defaultProps = {
34858
35590
  menuStyle: null,
34859
35591
  menuClassName: null,
34860
35592
  menuButtonClassName: null,
35593
+ buttonProps: null,
35594
+ menuButtonProps: null,
34861
35595
  tabIndex: null,
34862
35596
  appendTo: null,
34863
35597
  tooltip: null,
@@ -34873,7 +35607,8 @@ SplitButton.defaultProps = {
34873
35607
  var SplitterPanel = function SplitterPanel() {};
34874
35608
  var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
34875
35609
  var elementRef = React__namespace.useRef(null);
34876
- var gutterRef = React__namespace.useRef(null);
35610
+ var gutterRef = React__namespace.useRef();
35611
+ var gutterRefs = React__namespace.useRef({});
34877
35612
  var size = React__namespace.useRef(null);
34878
35613
  var dragging = React__namespace.useRef(null);
34879
35614
  var startPos = React__namespace.useRef(null);
@@ -34883,6 +35618,7 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
34883
35618
  var nextPanelSize = React__namespace.useRef(null);
34884
35619
  var prevPanelIndex = React__namespace.useRef(null);
34885
35620
  var panelSizes = React__namespace.useRef(null);
35621
+ var mounted = React__namespace.useRef(false);
34886
35622
  var isStateful = props.stateKey != null;
34887
35623
 
34888
35624
  var _useEventListener = useEventListener({
@@ -34953,7 +35689,7 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
34953
35689
  };
34954
35690
 
34955
35691
  var saveState = function saveState() {
34956
- getStorage().setItem(props.stateKey, JSON.stringify(panelSizes));
35692
+ getStorage().setItem(props.stateKey, JSON.stringify(panelSizes.current));
34957
35693
  };
34958
35694
 
34959
35695
  var restoreState = function restoreState() {
@@ -34968,7 +35704,7 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
34968
35704
  });
34969
35705
 
34970
35706
  children.forEach(function (child, i) {
34971
- child.style.flexBasis = 'calc(' + panelSizes[i] + '% - ' + (props.children.length - 1) * props.gutterSize + 'px)';
35707
+ child.style.flexBasis = 'calc(' + panelSizes.current[i] + '% - ' + (props.children.length - 1) * props.gutterSize + 'px)';
34972
35708
  });
34973
35709
  return true;
34974
35710
  }
@@ -34977,6 +35713,7 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
34977
35713
  };
34978
35714
 
34979
35715
  var onResizeStart = function onResizeStart(event, index) {
35716
+ gutterRef.current = gutterRefs.current[index];
34980
35717
  var pageX = event.type === 'touchstart' ? event.touches[0].pageX : event.pageX;
34981
35718
  var pageY = event.type === 'touchstart' ? event.touches[0].pageY : event.pageY;
34982
35719
  size.current = props.layout === 'horizontal' ? DomHandler.getWidth(elementRef.current) : DomHandler.getHeight(elementRef.current);
@@ -35015,7 +35752,7 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
35015
35752
  if (props.onResizeEnd) {
35016
35753
  props.onResizeEnd({
35017
35754
  originalEvent: event,
35018
- sizes: panelSizes
35755
+ sizes: panelSizes.current
35019
35756
  });
35020
35757
  }
35021
35758
 
@@ -35048,7 +35785,7 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
35048
35785
  window.removeEventListener('touchend', onGutterTouchEnd);
35049
35786
  };
35050
35787
 
35051
- useMountEffect(function () {
35788
+ React__namespace.useEffect(function () {
35052
35789
  var panelElements = _toConsumableArray(elementRef.current.children).filter(function (child) {
35053
35790
  return DomHandler.hasClass(child, 'p-splitter-panel');
35054
35791
  });
@@ -35062,7 +35799,7 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
35062
35799
  if (props.children && props.children.length) {
35063
35800
  var initialized = false;
35064
35801
 
35065
- if (isStateful) {
35802
+ if (isStateful && !mounted.current) {
35066
35803
  initialized = restoreState();
35067
35804
  }
35068
35805
 
@@ -35076,8 +35813,11 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
35076
35813
  return _panelSizes;
35077
35814
  });
35078
35815
  panelSizes.current = _panelSizes;
35816
+ mounted.current && saveState();
35079
35817
  }
35080
35818
  }
35819
+
35820
+ mounted.current = true;
35081
35821
  });
35082
35822
 
35083
35823
  var createPanel = function createPanel(panel, index) {
@@ -35089,7 +35829,9 @@ var Splitter = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
35089
35829
  height: props.gutterSize + 'px'
35090
35830
  };
35091
35831
  var gutter = index !== props.children.length - 1 && /*#__PURE__*/React__namespace.createElement("div", {
35092
- ref: gutterRef,
35832
+ ref: function ref(el) {
35833
+ return gutterRefs.current[index] = el;
35834
+ },
35093
35835
  className: "p-splitter-gutter",
35094
35836
  style: gutterStyle,
35095
35837
  onMouseDown: function onMouseDown(event) {
@@ -35228,6 +35970,7 @@ var Steps = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
35228
35970
 
35229
35971
  return /*#__PURE__*/React__namespace.createElement("li", {
35230
35972
  key: key,
35973
+ id: item.id,
35231
35974
  className: className,
35232
35975
  style: item.style,
35233
35976
  role: "tab",
@@ -35292,8 +36035,7 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35292
36035
  }
35293
36036
 
35294
36037
  animating.current = false;
35295
- },
35296
- when: false
36038
+ }
35297
36039
  }),
35298
36040
  _useEventListener2 = _slicedToArray(_useEventListener, 2),
35299
36041
  bindTargetEnterListener = _useEventListener2[0],
@@ -35310,23 +36052,22 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35310
36052
 
35311
36053
  unbindTargetLeaveListener();
35312
36054
  animating.current = false;
35313
- },
35314
- when: false
36055
+ }
35315
36056
  }),
35316
36057
  _useEventListener4 = _slicedToArray(_useEventListener3, 2),
35317
36058
  bindTargetLeaveListener = _useEventListener4[0],
35318
36059
  unbindTargetLeaveListener = _useEventListener4[1];
35319
36060
 
35320
36061
  var _useEventListener5 = useEventListener({
35321
- type: 'animationend',
36062
+ type: 'click',
35322
36063
  listener: function listener(event) {
35323
- if (getComputedStyle(targetRef.current).getPropertyValue('position') === 'static') {
36064
+ if (!isVisible(targetRef.current) || getComputedStyle(targetRef.current).getPropertyValue('position') === 'static') {
35324
36065
  unbindDocumentClickListener();
35325
- } else if (!elementRef.current.isSameNode(event.target) && !elementRef.current.contains(event.target) && !targetRef.current.contains(event.target)) {
36066
+ } else if (isOutsideClick(event)) {
35326
36067
  leave();
35327
36068
  }
35328
36069
  },
35329
- when: false
36070
+ when: props.hideOnOutsideClick
35330
36071
  }),
35331
36072
  _useEventListener6 = _slicedToArray(_useEventListener5, 2),
35332
36073
  bindDocumentClickListener = _useEventListener6[0],
@@ -35342,8 +36083,7 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35342
36083
  } else {
35343
36084
  if (targetRef.current.offsetParent === null) enter();else leave();
35344
36085
  }
35345
- },
35346
- when: false
36086
+ }
35347
36087
  }),
35348
36088
  _useEventListener8 = _slicedToArray(_useEventListener7, 2),
35349
36089
  bindClickListener = _useEventListener8[0],
@@ -35369,8 +36109,7 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35369
36109
  }
35370
36110
 
35371
36111
  bindTargetEnterListener({
35372
- target: targetRef.current,
35373
- when: true
36112
+ target: targetRef.current
35374
36113
  });
35375
36114
  }
35376
36115
  } else {
@@ -35384,8 +36123,7 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35384
36123
  }
35385
36124
 
35386
36125
  bindDocumentClickListener({
35387
- target: elementRef.current && elementRef.current.ownerDocument,
35388
- when: props.hideOnOutsideClick
36126
+ target: elementRef.current && elementRef.current.ownerDocument
35389
36127
  });
35390
36128
  };
35391
36129
 
@@ -35400,8 +36138,7 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35400
36138
  }
35401
36139
 
35402
36140
  bindTargetLeaveListener({
35403
- target: targetRef.current,
35404
- when: true
36141
+ target: targetRef.current
35405
36142
  });
35406
36143
  }
35407
36144
  } else {
@@ -35414,7 +36151,9 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35414
36151
  }
35415
36152
  }
35416
36153
 
35417
- unbindDocumentClickListener();
36154
+ if (props.hideOnOutsideClick) {
36155
+ unbindDocumentClickListener();
36156
+ }
35418
36157
  };
35419
36158
 
35420
36159
  var resolveTarget = function resolveTarget() {
@@ -35443,8 +36182,7 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35443
36182
  var init = function init() {
35444
36183
  elementRef.current = ObjectUtils.getRefElement(props.nodeRef);
35445
36184
  bindClickListener({
35446
- target: elementRef.current,
35447
- when: true
36185
+ target: elementRef.current
35448
36186
  });
35449
36187
  };
35450
36188
 
@@ -35454,13 +36192,23 @@ var StyleClass = /*#__PURE__*/React__namespace.forwardRef(function (props, ref)
35454
36192
  targetRef.current = null;
35455
36193
  };
35456
36194
 
36195
+ var isVisible = function isVisible(target) {
36196
+ return target.offsetParent !== null;
36197
+ };
36198
+
36199
+ var isOutsideClick = function isOutsideClick(event) {
36200
+ return !elementRef.current.isSameNode(event.target) && !elementRef.current.contains(event.target) && !targetRef.current.contains(event.target);
36201
+ };
36202
+
35457
36203
  useMountEffect(function () {
35458
36204
  init();
35459
36205
  });
35460
36206
  useUpdateEffect(function () {
35461
- destroy();
35462
36207
  init();
35463
- }, [props.nodeRef]);
36208
+ return function () {
36209
+ unbindClickListener();
36210
+ };
36211
+ });
35464
36212
  useUnmountEffect(function () {
35465
36213
  destroy();
35466
36214
  });
@@ -35633,9 +36381,9 @@ TabMenu.defaultProps = {
35633
36381
  onTabChange: null
35634
36382
  };
35635
36383
 
35636
- function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36384
+ function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35637
36385
 
35638
- function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
36386
+ function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
35639
36387
  var TabPanel = function TabPanel() {};
35640
36388
  var TabView = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
35641
36389
  var _React$useState = React__namespace.useState(props.id),
@@ -35830,7 +36578,7 @@ var TabView = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
35830
36578
  headerTemplate = _tab$props.headerTemplate,
35831
36579
  closable = _tab$props.closable;
35832
36580
 
35833
- var style = _objectSpread$8(_objectSpread$8({}, headerStyle || {}), _style || {});
36581
+ var style = _objectSpread$7(_objectSpread$7({}, headerStyle || {}), _style || {});
35834
36582
 
35835
36583
  var className = classNames('p-unselectable-text', {
35836
36584
  'p-tabview-selected p-highlight': selected,
@@ -35937,7 +36685,7 @@ var TabView = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
35937
36685
  if (shouldUseTab(tab, index) && (!props.renderActiveOnly || isSelected(index))) {
35938
36686
  var selected = isSelected(index);
35939
36687
 
35940
- var style = _objectSpread$8(_objectSpread$8({}, tab.props.contentStyle || {}), tab.props.style || {});
36688
+ var style = _objectSpread$7(_objectSpread$7({}, tab.props.contentStyle || {}), tab.props.style || {});
35941
36689
 
35942
36690
  var _className2 = classNames(tab.props.contentClassName, tab.props.className, 'p-tabview-panel', {
35943
36691
  'p-hidden': !selected
@@ -36093,7 +36841,7 @@ var Terminal = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
36093
36841
  var isEmitted = React__namespace.useRef(false);
36094
36842
 
36095
36843
  var onClick = function onClick() {
36096
- inputRef.current.focus();
36844
+ DomHandler.focus(inputRef.current);
36097
36845
  };
36098
36846
 
36099
36847
  var onInputChange = function onInputChange(e) {
@@ -36408,7 +37156,8 @@ var TieredMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
36408
37156
  };
36409
37157
 
36410
37158
  var createMenuItem = function createMenuItem(item, index) {
36411
- var _className = item.className,
37159
+ item.id;
37160
+ var _className = item.className,
36412
37161
  style = item.style,
36413
37162
  disabled = item.disabled,
36414
37163
  _icon = item.icon,
@@ -36477,6 +37226,7 @@ var TieredMenuSub = /*#__PURE__*/React__namespace.memo(function (props) {
36477
37226
 
36478
37227
  return /*#__PURE__*/React__namespace.createElement("li", {
36479
37228
  key: key,
37229
+ id: item,
36480
37230
  className: className,
36481
37231
  style: style,
36482
37232
  onMouseEnter: function onMouseEnter(event) {
@@ -36698,9 +37448,9 @@ Timeline.defaultProps = {
36698
37448
  content: null
36699
37449
  };
36700
37450
 
36701
- function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37451
+ function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36702
37452
 
36703
- function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37453
+ function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
36704
37454
  var ToastMessage = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
36705
37455
  var _props$message = props.message,
36706
37456
  severity = _props$message.severity,
@@ -36748,7 +37498,7 @@ var ToastMessage = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
36748
37498
 
36749
37499
  var createMessage = function createMessage() {
36750
37500
  if (props.message) {
36751
- var contentEl = ObjectUtils.getJSXElement(content, _objectSpread$7(_objectSpread$7({}, props), {}, {
37501
+ var contentEl = ObjectUtils.getJSXElement(content, _objectSpread$6(_objectSpread$6({}, props), {}, {
36752
37502
  onClose: onClose
36753
37503
  }));
36754
37504
  var iconClassName = classNames('p-toast-message-icon pi', {
@@ -36790,9 +37540,6 @@ var ToastMessage = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
36790
37540
  }));
36791
37541
  ToastMessage.displayName = 'ToastMessage';
36792
37542
 
36793
- function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36794
-
36795
- function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
36796
37543
  var messageIdx = 0;
36797
37544
  var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
36798
37545
  var _React$useState = React__namespace.useState([]),
@@ -36807,21 +37554,13 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
36807
37554
  var messages;
36808
37555
 
36809
37556
  if (Array.isArray(value)) {
36810
- var currentMessages = _toConsumableArray(value);
36811
-
36812
- for (var i = 0; i < currentMessages.length; i++) {
36813
- var message = _objectSpread$6({}, currentMessages[i]);
36814
-
36815
- message.id = messageIdx++;
36816
- currentMessages[i] = message;
37557
+ for (var i = 0; i < value.length; i++) {
37558
+ value[i].id = messageIdx++;
37559
+ messages = [].concat(_toConsumableArray(messagesState), _toConsumableArray(value));
36817
37560
  }
36818
-
36819
- messages = [].concat(_toConsumableArray(messagesState), _toConsumableArray(currentMessages));
36820
37561
  } else {
36821
- var currentMessage = _objectSpread$6({}, value);
36822
-
36823
- currentMessage.id = messageIdx++;
36824
- messages = messagesState ? [].concat(_toConsumableArray(messagesState), [currentMessage]) : [currentMessage];
37562
+ value.id = messageIdx++;
37563
+ messages = messagesState ? [].concat(_toConsumableArray(messagesState), [value]) : [value];
36825
37564
  }
36826
37565
 
36827
37566
  messagesState.length === 0 && ZIndexUtils.set('toast', containerRef.current, PrimeReact.autoZIndex, props.baseZIndex || PrimeReact.zIndex['toast']);
@@ -36834,6 +37573,11 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
36834
37573
  setMessagesState([]);
36835
37574
  };
36836
37575
 
37576
+ var replace = function replace(value) {
37577
+ var replaced = Array.isArray(value) ? value : [value];
37578
+ setMessagesState(replaced);
37579
+ };
37580
+
36837
37581
  var onClose = function onClose(message) {
36838
37582
  var messages = messagesState.filter(function (msg) {
36839
37583
  return msg.id !== message.id;
@@ -36847,7 +37591,7 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
36847
37591
  };
36848
37592
 
36849
37593
  var onExited = function onExited() {
36850
- messagesState.length === 0 && ZIndexUtils.clear(containerRef.current);
37594
+ messagesState.length === 1 && ZIndexUtils.clear(containerRef.current);
36851
37595
  props.onHide && props.onHide();
36852
37596
  };
36853
37597
 
@@ -36857,6 +37601,7 @@ var Toast = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
36857
37601
  React__namespace.useImperativeHandle(ref, function () {
36858
37602
  return {
36859
37603
  show: show,
37604
+ replace: replace,
36860
37605
  clear: clear
36861
37606
  };
36862
37607
  });
@@ -37120,6 +37865,14 @@ var UITreeNode = /*#__PURE__*/React__namespace.memo(function (props) {
37120
37865
  } else {
37121
37866
  var nextNodeElement = nodeElement.nextElementSibling;
37122
37867
 
37868
+ while (nextNodeElement) {
37869
+ if (!DomHandler.hasClass(nextNodeElement, 'p-treenode-droppoint')) {
37870
+ break;
37871
+ }
37872
+
37873
+ nextNodeElement = nextNodeElement.nextElementSibling;
37874
+ }
37875
+
37123
37876
  if (nextNodeElement) {
37124
37877
  focusNode(nextNodeElement);
37125
37878
  } else {
@@ -37191,7 +37944,7 @@ var UITreeNode = /*#__PURE__*/React__namespace.memo(function (props) {
37191
37944
  };
37192
37945
 
37193
37946
  var focusNode = function focusNode(element) {
37194
- element.children[0].focus();
37947
+ element && element.children[0] && element.children[0].focus();
37195
37948
  };
37196
37949
 
37197
37950
  var onClick = function onClick(event) {
@@ -38409,7 +39162,7 @@ var TreeSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
38409
39162
 
38410
39163
  var onClick = function onClick(event) {
38411
39164
  if (!props.disabled && (!overlayRef.current || !overlayRef.current.contains(event.target)) && !DomHandler.hasClass(event.target, 'p-treeselect-close')) {
38412
- focusInputRef.current.focus();
39165
+ DomHandler.focus(focusInputRef.current);
38413
39166
  overlayVisibleState ? hide() : show();
38414
39167
  }
38415
39168
  };
@@ -38525,7 +39278,7 @@ var TreeSelect = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
38525
39278
  bindOverlayListener();
38526
39279
 
38527
39280
  if (props.filter && props.filterInputAutoFocus) {
38528
- filterInputRef.current.focus();
39281
+ DomHandler.focus(filterInputRef.current, props.filterInputAutoFocus);
38529
39282
  }
38530
39283
 
38531
39284
  props.onShow && props.onShow();
@@ -39442,6 +40195,7 @@ var TreeTableRow = /*#__PURE__*/React__namespace.memo(function (props) {
39442
40195
  return /*#__PURE__*/React__namespace.createElement(TreeTableBodyCell, _extends({
39443
40196
  key: column.props.columnKey || column.props.field
39444
40197
  }, column.props, {
40198
+ column: column,
39445
40199
  selectOnEdit: props.selectOnEdit,
39446
40200
  selected: isSelected(),
39447
40201
  node: props.node,
@@ -39955,6 +40709,14 @@ var TreeTableHeader = /*#__PURE__*/React__namespace.memo(function (props) {
39955
40709
  }
39956
40710
  };
39957
40711
 
40712
+ var getColumnProp = function getColumnProp(column) {
40713
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
40714
+ args[_key - 1] = arguments[_key];
40715
+ }
40716
+
40717
+ return column ? typeof args[0] === 'string' ? column.props[args[0]] : (args[0] || column).props[args[1]] : null;
40718
+ };
40719
+
39958
40720
  var createSortIcon = function createSortIcon(column, sorted, sortOrder) {
39959
40721
  if (column.props.sortable) {
39960
40722
  var sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-amount-down' : 'pi-sort-amount-up-alt' : 'pi-sort-alt';
@@ -40028,7 +40790,7 @@ var TreeTableHeader = /*#__PURE__*/React__namespace.memo(function (props) {
40028
40790
  var className = classNames(column.props.headerClassName || column.props.className, {
40029
40791
  'p-sortable-column': column.props.sortable,
40030
40792
  'p-highlight': sorted,
40031
- 'p-resizable-column': props.resizableColumns
40793
+ 'p-resizable-column': props.resizableColumns && getColumnProp(column, 'resizeable')
40032
40794
  });
40033
40795
  var resizer = createResizer(column);
40034
40796
  return /*#__PURE__*/React__namespace.createElement("th", {
@@ -40482,6 +41244,7 @@ var TreeTable = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
40482
41244
 
40483
41245
  if (columnSortable.current && columnSortable.current === 'custom' && columnSortFunction.current) {
40484
41246
  value = columnSortFunction.current({
41247
+ rowData: value,
40485
41248
  field: getSortField(),
40486
41249
  order: getSortOrder()
40487
41250
  });
@@ -41472,12 +42235,10 @@ var TriStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
41472
42235
  setFocusedState = _React$useState2[1];
41473
42236
 
41474
42237
  var elementRef = React__namespace.useRef(null);
41475
- var inputRef = React__namespace.useRef(props.inputRef);
41476
42238
 
41477
42239
  var onClick = function onClick(event) {
41478
- if (!props.disabled) {
42240
+ if (!props.disabled && !props.readOnly) {
41479
42241
  toggle(event);
41480
- inputRef.current.focus();
41481
42242
  }
41482
42243
  };
41483
42244
 
@@ -41508,9 +42269,13 @@ var TriStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
41508
42269
  setFocusedState(false);
41509
42270
  };
41510
42271
 
41511
- React__namespace.useEffect(function () {
41512
- ObjectUtils.combinedRefs(inputRef, props.inputRef);
41513
- }, [inputRef, props.inputRef]);
42272
+ var onKeyDown = function onKeyDown(e) {
42273
+ if (e.keyCode === 32) {
42274
+ toggle(e);
42275
+ e.preventDefault();
42276
+ }
42277
+ };
42278
+
41514
42279
  var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
41515
42280
  var otherProps = ObjectUtils.findDiffKeys(props, TriStateCheckbox.defaultProps);
41516
42281
  var className = classNames('p-tristatecheckbox p-checkbox p-component', props.className);
@@ -41523,6 +42288,8 @@ var TriStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
41523
42288
  'pi pi-check': props.value === true,
41524
42289
  'pi pi-times': props.value === false
41525
42290
  });
42291
+ var ariaValueLabel = props.value ? ariaLabel('trueLabel') : props.value === false ? ariaLabel('falseLabel') : ariaLabel('nullLabel');
42292
+ var ariaChecked = props.value ? 'true' : 'false';
41526
42293
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
41527
42294
  ref: elementRef,
41528
42295
  id: props.id,
@@ -41531,24 +42298,21 @@ var TriStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__n
41531
42298
  }, otherProps, {
41532
42299
  onClick: onClick
41533
42300
  }), /*#__PURE__*/React__namespace.createElement("div", {
41534
- className: "p-hidden-accessible"
41535
- }, /*#__PURE__*/React__namespace.createElement("input", {
41536
- ref: inputRef,
41537
- type: "checkbox",
41538
- "aria-labelledby": props.ariaLabelledBy,
41539
- id: props.inputId,
41540
- name: props.name,
42301
+ className: boxClassName,
42302
+ tabIndex: props.tabIndex,
41541
42303
  onFocus: onFocus,
41542
42304
  onBlur: onBlur,
41543
- disabled: props.disabled,
41544
- defaultChecked: props.value
41545
- })), /*#__PURE__*/React__namespace.createElement("div", {
41546
- className: boxClassName,
42305
+ onKeyDown: onKeyDown,
41547
42306
  role: "checkbox",
41548
- "aria-checked": props.value === true
42307
+ "aria-checked": ariaChecked,
42308
+ "aria-labelledby": props['aria-labelledby'],
42309
+ "aria-label": props['aria-label']
41549
42310
  }, /*#__PURE__*/React__namespace.createElement("span", {
41550
42311
  className: iconClassName
41551
- }))), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
42312
+ })), focusedState && /*#__PURE__*/React__namespace.createElement("span", {
42313
+ className: "p-sr-only",
42314
+ "aria-live": "polite"
42315
+ }, ariaValueLabel)), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
41552
42316
  target: elementRef,
41553
42317
  content: props.tooltip
41554
42318
  }, props.tooltipOptions)));
@@ -41557,16 +42321,16 @@ TriStateCheckbox.displayName = 'TriStateCheckbox';
41557
42321
  TriStateCheckbox.defaultProps = {
41558
42322
  __TYPE: 'TriStateCheckbox',
41559
42323
  id: null,
41560
- inputRef: null,
41561
- inputId: null,
41562
42324
  value: null,
41563
- name: null,
41564
42325
  style: null,
41565
42326
  className: null,
41566
42327
  disabled: false,
42328
+ readOnly: false,
42329
+ tabIndex: "0",
42330
+ 'aria-label': null,
42331
+ 'aria-labelledby': null,
41567
42332
  tooltip: null,
41568
42333
  tooltipOptions: null,
41569
- ariaLabelledBy: null,
41570
42334
  onChange: null
41571
42335
  };
41572
42336
 
@@ -41690,6 +42454,7 @@ exports.UniqueComponentId = UniqueComponentId;
41690
42454
  exports.VirtualScroller = VirtualScroller;
41691
42455
  exports.ZIndexUtils = ZIndexUtils;
41692
42456
  exports.addLocale = addLocale;
42457
+ exports.ariaLabel = ariaLabel;
41693
42458
  exports.classNames = classNames;
41694
42459
  exports.confirmDialog = confirmDialog;
41695
42460
  exports.confirmPopup = confirmPopup;
@@ -41702,11 +42467,13 @@ exports.updateLocaleOption = updateLocaleOption;
41702
42467
  exports.updateLocaleOptions = updateLocaleOptions;
41703
42468
  exports.useEventListener = useEventListener;
41704
42469
  exports.useInterval = useInterval;
42470
+ exports.useLocalStorage = useLocalStorage;
41705
42471
  exports.useMountEffect = useMountEffect;
41706
42472
  exports.useOverlayListener = useOverlayListener;
41707
42473
  exports.useOverlayScrollListener = useOverlayScrollListener;
41708
42474
  exports.usePrevious = usePrevious;
41709
42475
  exports.useResizeListener = useResizeListener;
42476
+ exports.useSessionStorage = useSessionStorage;
41710
42477
  exports.useStorage = useStorage;
41711
42478
  exports.useTimeout = useTimeout;
41712
42479
  exports.useUnmountEffect = useUnmountEffect;