primereact 10.0.0 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +1 -1
  2. package/accordion/accordion.esm.js +0 -1
  3. package/api/api.esm.js +0 -1
  4. package/autocomplete/autocomplete.esm.js +8 -7
  5. package/autocomplete/autocomplete.esm.min.js +1 -1
  6. package/avatar/avatar.esm.js +0 -1
  7. package/avatargroup/avatargroup.esm.js +0 -1
  8. package/badge/badge.esm.js +0 -1
  9. package/blockui/blockui.esm.js +3 -1
  10. package/blockui/blockui.esm.min.js +1 -1
  11. package/breadcrumb/breadcrumb.esm.js +0 -1
  12. package/button/button.esm.js +0 -1
  13. package/calendar/calendar.esm.js +2 -1
  14. package/calendar/calendar.esm.min.js +1 -1
  15. package/card/card.esm.js +0 -1
  16. package/carousel/carousel.esm.js +7 -8
  17. package/carousel/carousel.esm.min.js +1 -1
  18. package/cascadeselect/cascadeselect.esm.js +0 -1
  19. package/chart/chart.esm.js +0 -1
  20. package/checkbox/checkbox.esm.js +0 -1
  21. package/chip/chip.esm.js +0 -1
  22. package/chips/chips.esm.js +0 -1
  23. package/colorpicker/colorpicker.esm.js +0 -1
  24. package/column/column.esm.js +0 -1
  25. package/columngroup/columngroup.esm.js +0 -1
  26. package/componentbase/componentbase.cjs.js +12 -7
  27. package/componentbase/componentbase.cjs.min.js +1 -1
  28. package/componentbase/componentbase.esm.js +23 -13
  29. package/componentbase/componentbase.esm.min.js +1 -1
  30. package/componentbase/componentbase.js +12 -7
  31. package/componentbase/componentbase.min.js +1 -1
  32. package/confirmdialog/confirmdialog.esm.js +0 -1
  33. package/confirmpopup/confirmpopup.esm.js +0 -1
  34. package/contextmenu/contextmenu.esm.js +0 -1
  35. package/core/core.js +12 -7
  36. package/core/core.min.js +1 -1
  37. package/csstransition/csstransition.esm.js +0 -1
  38. package/datascroller/datascroller.esm.js +0 -1
  39. package/datatable/datatable.esm.js +0 -1
  40. package/dataview/dataview.esm.js +0 -1
  41. package/deferredcontent/deferredcontent.esm.js +0 -1
  42. package/dialog/dialog.esm.js +2 -1
  43. package/dialog/dialog.esm.min.js +1 -1
  44. package/divider/divider.esm.js +0 -1
  45. package/dock/dock.esm.js +0 -1
  46. package/dropdown/dropdown.esm.js +0 -1
  47. package/editor/editor.esm.js +0 -1
  48. package/fieldset/fieldset.esm.js +0 -1
  49. package/fileupload/fileupload.esm.js +0 -1
  50. package/galleria/galleria.esm.js +11 -7
  51. package/galleria/galleria.esm.min.js +1 -1
  52. package/hooks/hooks.esm.js +0 -6
  53. package/iconbase/iconbase.esm.js +0 -1
  54. package/icons/angledoubledown/index.esm.js +0 -1
  55. package/icons/angledoubleleft/index.esm.js +0 -1
  56. package/icons/angledoubleright/index.esm.js +0 -1
  57. package/icons/angledoubleup/index.esm.js +0 -1
  58. package/icons/angledown/index.esm.js +0 -1
  59. package/icons/angleleft/index.esm.js +0 -1
  60. package/icons/angleright/index.esm.js +0 -1
  61. package/icons/angleup/index.esm.js +0 -1
  62. package/icons/arrowdown/index.esm.js +0 -1
  63. package/icons/arrowup/index.esm.js +0 -1
  64. package/icons/ban/index.esm.js +0 -1
  65. package/icons/bars/index.esm.js +0 -1
  66. package/icons/calendar/index.esm.js +0 -1
  67. package/icons/check/index.esm.js +0 -1
  68. package/icons/chevrondown/index.esm.js +0 -1
  69. package/icons/chevronleft/index.esm.js +0 -1
  70. package/icons/chevronright/index.esm.js +0 -1
  71. package/icons/chevronup/index.esm.js +0 -1
  72. package/icons/download/index.esm.js +0 -1
  73. package/icons/exclamationtriangle/index.esm.js +0 -1
  74. package/icons/eye/index.esm.js +0 -1
  75. package/icons/eyeslash/index.esm.js +0 -1
  76. package/icons/filter/index.esm.js +0 -1
  77. package/icons/filterslash/index.esm.js +0 -1
  78. package/icons/infocircle/index.esm.js +0 -1
  79. package/icons/minus/index.esm.js +0 -1
  80. package/icons/pencil/index.esm.js +0 -1
  81. package/icons/plus/index.esm.js +0 -1
  82. package/icons/refresh/index.esm.js +0 -1
  83. package/icons/search/index.esm.js +0 -1
  84. package/icons/searchminus/index.esm.js +0 -1
  85. package/icons/searchplus/index.esm.js +0 -1
  86. package/icons/sortalt/index.esm.js +0 -1
  87. package/icons/sortamountdown/index.esm.js +0 -1
  88. package/icons/sortamountupalt/index.esm.js +0 -1
  89. package/icons/spinner/index.esm.js +0 -1
  90. package/icons/star/index.esm.js +0 -1
  91. package/icons/starfill/index.esm.js +0 -1
  92. package/icons/thlarge/index.esm.js +0 -1
  93. package/icons/times/index.esm.js +0 -1
  94. package/icons/timescircle/index.esm.js +0 -1
  95. package/icons/trash/index.esm.js +0 -1
  96. package/icons/undo/index.esm.js +0 -1
  97. package/icons/upload/index.esm.js +0 -1
  98. package/icons/windowmaximize/index.esm.js +0 -1
  99. package/icons/windowminimize/index.esm.js +0 -1
  100. package/image/image.esm.js +2 -1
  101. package/image/image.esm.min.js +1 -1
  102. package/inplace/inplace.esm.js +0 -1
  103. package/inputmask/inputmask.esm.js +0 -1
  104. package/inputnumber/inputnumber.esm.js +0 -1
  105. package/inputswitch/inputswitch.esm.js +0 -1
  106. package/inputtext/inputtext.esm.js +0 -1
  107. package/inputtextarea/inputtextarea.esm.js +0 -1
  108. package/keyfilter/keyfilter.esm.js +0 -1
  109. package/knob/knob.esm.js +0 -1
  110. package/listbox/listbox.esm.js +0 -1
  111. package/megamenu/megamenu.esm.js +0 -1
  112. package/mention/mention.esm.js +0 -1
  113. package/menu/menu.esm.js +0 -1
  114. package/menubar/menubar.esm.js +0 -1
  115. package/message/message.esm.js +0 -1
  116. package/messages/messages.esm.js +1 -2
  117. package/messages/messages.esm.min.js +1 -1
  118. package/multiselect/multiselect.esm.js +0 -1
  119. package/multistatecheckbox/multistatecheckbox.esm.js +0 -1
  120. package/orderlist/orderlist.esm.js +9 -5
  121. package/orderlist/orderlist.esm.min.js +1 -1
  122. package/organizationchart/organizationchart.esm.js +0 -1
  123. package/overlaypanel/overlaypanel.esm.js +0 -1
  124. package/overlayservice/overlayservice.esm.js +0 -1
  125. package/package.json +2 -2
  126. package/paginator/paginator.esm.js +0 -1
  127. package/panel/panel.esm.js +0 -1
  128. package/panelmenu/panelmenu.esm.js +0 -1
  129. package/passthrough/index.esm.js +0 -1
  130. package/passthrough/tailwind/index.cjs.js +2 -4
  131. package/passthrough/tailwind/index.cjs.min.js +1 -1
  132. package/passthrough/tailwind/index.esm.js +149 -148
  133. package/passthrough/tailwind/index.esm.min.js +1 -1
  134. package/passthrough/tailwind/index.js +2 -4
  135. package/passthrough/tailwind/index.min.js +1 -1
  136. package/password/password.esm.js +0 -1
  137. package/picklist/picklist.esm.js +0 -1
  138. package/portal/portal.esm.js +0 -1
  139. package/primereact.all.cjs.js +12 -7
  140. package/primereact.all.cjs.min.js +1 -1
  141. package/primereact.all.esm.js +70 -42
  142. package/primereact.all.esm.min.js +1 -1
  143. package/primereact.all.js +12 -7
  144. package/primereact.all.min.js +1 -1
  145. package/progressbar/progressbar.esm.js +0 -1
  146. package/progressspinner/progressspinner.esm.js +0 -1
  147. package/radiobutton/radiobutton.esm.js +0 -1
  148. package/rating/rating.esm.js +0 -1
  149. package/ripple/ripple.esm.js +0 -1
  150. package/row/row.esm.js +0 -1
  151. package/scrollpanel/scrollpanel.esm.js +0 -1
  152. package/scrolltop/scrolltop.esm.js +0 -1
  153. package/selectbutton/selectbutton.esm.js +0 -1
  154. package/sidebar/sidebar.esm.js +2 -1
  155. package/sidebar/sidebar.esm.min.js +1 -1
  156. package/skeleton/skeleton.esm.js +0 -1
  157. package/slidemenu/slidemenu.esm.js +0 -1
  158. package/slider/slider.esm.js +0 -1
  159. package/speeddial/speeddial.esm.js +0 -1
  160. package/splitbutton/splitbutton.esm.js +0 -1
  161. package/splitter/splitter.esm.js +0 -1
  162. package/steps/steps.esm.js +0 -1
  163. package/styleclass/styleclass.esm.js +0 -1
  164. package/tabmenu/tabmenu.esm.js +0 -1
  165. package/tabview/tabview.esm.js +0 -1
  166. package/tag/tag.esm.js +0 -1
  167. package/terminal/terminal.esm.js +0 -1
  168. package/terminalservice/terminalservice.esm.js +0 -1
  169. package/tieredmenu/tieredmenu.esm.js +0 -1
  170. package/timeline/timeline.esm.js +0 -1
  171. package/toast/toast.esm.js +0 -1
  172. package/togglebutton/togglebutton.esm.js +0 -1
  173. package/toolbar/toolbar.esm.js +0 -1
  174. package/tooltip/tooltip.esm.js +0 -1
  175. package/tree/tree.esm.js +0 -1
  176. package/treeselect/treeselect.esm.js +0 -1
  177. package/treetable/treetable.esm.js +0 -1
  178. package/tristatecheckbox/tristatecheckbox.esm.js +0 -1
  179. package/utils/utils.esm.js +0 -1
  180. package/virtualscroller/virtualscroller.esm.js +0 -1
  181. package/web-types.json +1 -1
  182. package/accordion/accordion.esm.min.mjs +0 -1
  183. package/accordion/accordion.esm.mjs +0 -420
  184. package/api/api.esm.min.mjs +0 -1
  185. package/api/api.esm.mjs +0 -943
  186. package/autocomplete/autocomplete.esm.min.mjs +0 -1
  187. package/autocomplete/autocomplete.esm.mjs +0 -1128
  188. package/avatar/avatar.esm.min.mjs +0 -1
  189. package/avatar/avatar.esm.mjs +0 -244
  190. package/avatargroup/avatargroup.esm.min.mjs +0 -1
  191. package/avatargroup/avatargroup.esm.mjs +0 -54
  192. package/badge/badge.esm.min.mjs +0 -1
  193. package/badge/badge.esm.mjs +0 -109
  194. package/blockui/blockui.esm.min.mjs +0 -1
  195. package/blockui/blockui.esm.mjs +0 -267
  196. package/breadcrumb/breadcrumb.esm.min.mjs +0 -1
  197. package/breadcrumb/breadcrumb.esm.mjs +0 -350
  198. package/button/button.esm.min.mjs +0 -1
  199. package/button/button.esm.mjs +0 -294
  200. package/calendar/calendar.esm.min.mjs +0 -1
  201. package/calendar/calendar.esm.mjs +0 -3474
  202. package/card/card.esm.min.mjs +0 -1
  203. package/card/card.esm.mjs +0 -97
  204. package/carousel/carousel.esm.min.mjs +0 -1
  205. package/carousel/carousel.esm.mjs +0 -800
  206. package/cascadeselect/cascadeselect.esm.min.mjs +0 -1
  207. package/cascadeselect/cascadeselect.esm.mjs +0 -818
  208. package/chart/chart.esm.min.mjs +0 -1
  209. package/chart/chart.esm.mjs +0 -154
  210. package/checkbox/checkbox.esm.min.mjs +0 -1
  211. package/checkbox/checkbox.esm.mjs +0 -356
  212. package/chip/chip.esm.min.mjs +0 -1
  213. package/chip/chip.esm.mjs +0 -247
  214. package/chips/chips.esm.min.mjs +0 -1
  215. package/chips/chips.esm.mjs +0 -500
  216. package/colorpicker/colorpicker.esm.min.mjs +0 -1
  217. package/colorpicker/colorpicker.esm.mjs +0 -787
  218. package/column/column.esm.min.mjs +0 -1
  219. package/column/column.esm.mjs +0 -7
  220. package/columngroup/columngroup.esm.min.mjs +0 -1
  221. package/columngroup/columngroup.esm.mjs +0 -5
  222. package/componentbase/componentbase.esm.min.mjs +0 -1
  223. package/componentbase/componentbase.esm.mjs +0 -328
  224. package/confirmdialog/confirmdialog.esm.min.mjs +0 -1
  225. package/confirmdialog/confirmdialog.esm.mjs +0 -375
  226. package/confirmpopup/confirmpopup.esm.min.mjs +0 -1
  227. package/confirmpopup/confirmpopup.esm.mjs +0 -609
  228. package/contextmenu/contextmenu.esm.min.mjs +0 -1
  229. package/contextmenu/contextmenu.esm.mjs +0 -663
  230. package/csstransition/csstransition.esm.min.mjs +0 -1
  231. package/csstransition/csstransition.esm.mjs +0 -137
  232. package/datascroller/datascroller.esm.min.mjs +0 -1
  233. package/datascroller/datascroller.esm.mjs +0 -319
  234. package/datatable/datatable.esm.min.mjs +0 -1
  235. package/datatable/datatable.esm.mjs +0 -6635
  236. package/dataview/dataview.esm.min.mjs +0 -1
  237. package/dataview/dataview.esm.mjs +0 -505
  238. package/deferredcontent/deferredcontent.esm.min.mjs +0 -1
  239. package/deferredcontent/deferredcontent.esm.mjs +0 -132
  240. package/dialog/dialog.esm.min.mjs +0 -1
  241. package/dialog/dialog.esm.mjs +0 -984
  242. package/divider/divider.esm.min.mjs +0 -1
  243. package/divider/divider.esm.mjs +0 -78
  244. package/dock/dock.esm.min.mjs +0 -1
  245. package/dock/dock.esm.mjs +0 -347
  246. package/dropdown/dropdown.esm.min.mjs +0 -1
  247. package/dropdown/dropdown.esm.mjs +0 -1379
  248. package/editor/editor.esm.min.mjs +0 -1
  249. package/editor/editor.esm.mjs +0 -337
  250. package/fieldset/fieldset.esm.min.mjs +0 -1
  251. package/fieldset/fieldset.esm.mjs +0 -269
  252. package/fileupload/fileupload.esm.min.mjs +0 -1
  253. package/fileupload/fileupload.esm.mjs +0 -1004
  254. package/galleria/galleria.esm.min.mjs +0 -1
  255. package/galleria/galleria.esm.mjs +0 -1094
  256. package/hooks/hooks.esm.min.mjs +0 -1
  257. package/hooks/hooks.esm.mjs +0 -1036
  258. package/iconbase/iconbase.esm.min.mjs +0 -1
  259. package/iconbase/iconbase.esm.mjs +0 -32
  260. package/icons/angledoubledown/index.esm.min.mjs +0 -1
  261. package/icons/angledoubledown/index.esm.mjs +0 -38
  262. package/icons/angledoubleleft/index.esm.min.mjs +0 -1
  263. package/icons/angledoubleleft/index.esm.mjs +0 -38
  264. package/icons/angledoubleright/index.esm.min.mjs +0 -1
  265. package/icons/angledoubleright/index.esm.mjs +0 -38
  266. package/icons/angledoubleup/index.esm.min.mjs +0 -1
  267. package/icons/angledoubleup/index.esm.mjs +0 -38
  268. package/icons/angledown/index.esm.min.mjs +0 -1
  269. package/icons/angledown/index.esm.mjs +0 -36
  270. package/icons/angleleft/index.esm.min.mjs +0 -1
  271. package/icons/angleleft/index.esm.mjs +0 -36
  272. package/icons/angleright/index.esm.min.mjs +0 -1
  273. package/icons/angleright/index.esm.mjs +0 -36
  274. package/icons/angleup/index.esm.min.mjs +0 -1
  275. package/icons/angleup/index.esm.mjs +0 -36
  276. package/icons/arrowdown/index.esm.min.mjs +0 -1
  277. package/icons/arrowdown/index.esm.mjs +0 -660
  278. package/icons/arrowup/index.esm.min.mjs +0 -1
  279. package/icons/arrowup/index.esm.mjs +0 -660
  280. package/icons/ban/index.esm.min.mjs +0 -1
  281. package/icons/ban/index.esm.mjs +0 -658
  282. package/icons/bars/index.esm.min.mjs +0 -1
  283. package/icons/bars/index.esm.mjs +0 -38
  284. package/icons/calendar/index.esm.min.mjs +0 -1
  285. package/icons/calendar/index.esm.mjs +0 -36
  286. package/icons/check/index.esm.min.mjs +0 -1
  287. package/icons/check/index.esm.mjs +0 -36
  288. package/icons/chevrondown/index.esm.min.mjs +0 -1
  289. package/icons/chevrondown/index.esm.mjs +0 -36
  290. package/icons/chevronleft/index.esm.min.mjs +0 -1
  291. package/icons/chevronleft/index.esm.mjs +0 -36
  292. package/icons/chevronright/index.esm.min.mjs +0 -1
  293. package/icons/chevronright/index.esm.mjs +0 -36
  294. package/icons/chevronup/index.esm.min.mjs +0 -1
  295. package/icons/chevronup/index.esm.mjs +0 -36
  296. package/icons/download/index.esm.min.mjs +0 -1
  297. package/icons/download/index.esm.mjs +0 -660
  298. package/icons/exclamationtriangle/index.esm.min.mjs +0 -1
  299. package/icons/exclamationtriangle/index.esm.mjs +0 -664
  300. package/icons/eye/index.esm.min.mjs +0 -1
  301. package/icons/eye/index.esm.mjs +0 -38
  302. package/icons/eyeslash/index.esm.min.mjs +0 -1
  303. package/icons/eyeslash/index.esm.mjs +0 -660
  304. package/icons/filter/index.esm.min.mjs +0 -1
  305. package/icons/filter/index.esm.mjs +0 -658
  306. package/icons/filterslash/index.esm.min.mjs +0 -1
  307. package/icons/filterslash/index.esm.mjs +0 -660
  308. package/icons/infocircle/index.esm.min.mjs +0 -1
  309. package/icons/infocircle/index.esm.mjs +0 -660
  310. package/icons/minus/index.esm.min.mjs +0 -1
  311. package/icons/minus/index.esm.mjs +0 -36
  312. package/icons/pencil/index.esm.min.mjs +0 -1
  313. package/icons/pencil/index.esm.mjs +0 -658
  314. package/icons/plus/index.esm.min.mjs +0 -1
  315. package/icons/plus/index.esm.mjs +0 -658
  316. package/icons/refresh/index.esm.min.mjs +0 -1
  317. package/icons/refresh/index.esm.mjs +0 -660
  318. package/icons/search/index.esm.min.mjs +0 -1
  319. package/icons/search/index.esm.mjs +0 -660
  320. package/icons/searchminus/index.esm.min.mjs +0 -1
  321. package/icons/searchminus/index.esm.mjs +0 -660
  322. package/icons/searchplus/index.esm.min.mjs +0 -1
  323. package/icons/searchplus/index.esm.mjs +0 -660
  324. package/icons/sortalt/index.esm.min.mjs +0 -1
  325. package/icons/sortalt/index.esm.mjs +0 -667
  326. package/icons/sortamountdown/index.esm.min.mjs +0 -1
  327. package/icons/sortamountdown/index.esm.mjs +0 -673
  328. package/icons/sortamountupalt/index.esm.min.mjs +0 -1
  329. package/icons/sortamountupalt/index.esm.mjs +0 -673
  330. package/icons/spinner/index.esm.min.mjs +0 -1
  331. package/icons/spinner/index.esm.mjs +0 -658
  332. package/icons/star/index.esm.min.mjs +0 -1
  333. package/icons/star/index.esm.mjs +0 -658
  334. package/icons/starfill/index.esm.min.mjs +0 -1
  335. package/icons/starfill/index.esm.mjs +0 -658
  336. package/icons/thlarge/index.esm.min.mjs +0 -1
  337. package/icons/thlarge/index.esm.mjs +0 -660
  338. package/icons/times/index.esm.min.mjs +0 -1
  339. package/icons/times/index.esm.mjs +0 -36
  340. package/icons/timescircle/index.esm.min.mjs +0 -1
  341. package/icons/timescircle/index.esm.mjs +0 -660
  342. package/icons/trash/index.esm.min.mjs +0 -1
  343. package/icons/trash/index.esm.mjs +0 -660
  344. package/icons/undo/index.esm.min.mjs +0 -1
  345. package/icons/undo/index.esm.mjs +0 -660
  346. package/icons/upload/index.esm.min.mjs +0 -1
  347. package/icons/upload/index.esm.mjs +0 -660
  348. package/icons/windowmaximize/index.esm.min.mjs +0 -1
  349. package/icons/windowmaximize/index.esm.mjs +0 -660
  350. package/icons/windowminimize/index.esm.min.mjs +0 -1
  351. package/icons/windowminimize/index.esm.mjs +0 -660
  352. package/image/image.esm.min.mjs +0 -1
  353. package/image/image.esm.mjs +0 -1163
  354. package/inplace/inplace.esm.min.mjs +0 -1
  355. package/inplace/inplace.esm.mjs +0 -242
  356. package/inputmask/inputmask.esm.min.mjs +0 -1
  357. package/inputmask/inputmask.esm.mjs +0 -559
  358. package/inputnumber/inputnumber.esm.min.mjs +0 -1
  359. package/inputnumber/inputnumber.esm.mjs +0 -1208
  360. package/inputswitch/inputswitch.esm.min.mjs +0 -1
  361. package/inputswitch/inputswitch.esm.mjs +0 -290
  362. package/inputtext/inputtext.esm.min.mjs +0 -1
  363. package/inputtext/inputtext.esm.mjs +0 -170
  364. package/inputtextarea/inputtextarea.esm.min.mjs +0 -1
  365. package/inputtextarea/inputtextarea.esm.mjs +0 -219
  366. package/keyfilter/keyfilter.esm.min.mjs +0 -1
  367. package/keyfilter/keyfilter.esm.mjs +0 -107
  368. package/knob/knob.esm.min.mjs +0 -1
  369. package/knob/knob.esm.mjs +0 -317
  370. package/listbox/listbox.esm.min.mjs +0 -1
  371. package/listbox/listbox.esm.mjs +0 -809
  372. package/megamenu/megamenu.esm.min.mjs +0 -1
  373. package/megamenu/megamenu.esm.mjs +0 -715
  374. package/mention/mention.esm.min.mjs +0 -1
  375. package/mention/mention.esm.mjs +0 -770
  376. package/menu/menu.esm.min.mjs +0 -1
  377. package/menu/menu.esm.mjs +0 -484
  378. package/menubar/menubar.esm.min.mjs +0 -1
  379. package/menubar/menubar.esm.mjs +0 -583
  380. package/message/message.esm.min.mjs +0 -1
  381. package/message/message.esm.mjs +0 -168
  382. package/messages/messages.esm.min.mjs +0 -1
  383. package/messages/messages.esm.mjs +0 -438
  384. package/multiselect/multiselect.esm.min.mjs +0 -1
  385. package/multiselect/multiselect.esm.mjs +0 -1723
  386. package/multistatecheckbox/multistatecheckbox.esm.min.mjs +0 -1
  387. package/multistatecheckbox/multistatecheckbox.esm.mjs +0 -351
  388. package/orderlist/orderlist.esm.min.mjs +0 -1
  389. package/orderlist/orderlist.esm.mjs +0 -820
  390. package/organizationchart/organizationchart.esm.min.mjs +0 -1
  391. package/organizationchart/organizationchart.esm.mjs +0 -479
  392. package/overlaypanel/overlaypanel.esm.min.mjs +0 -1
  393. package/overlaypanel/overlaypanel.esm.mjs +0 -515
  394. package/overlayservice/overlayservice.esm.min.mjs +0 -1
  395. package/overlayservice/overlayservice.esm.mjs +0 -6
  396. package/paginator/paginator.esm.min.mjs +0 -1
  397. package/paginator/paginator.esm.mjs +0 -932
  398. package/panel/panel.esm.min.mjs +0 -1
  399. package/panel/panel.esm.mjs +0 -315
  400. package/panelmenu/panelmenu.esm.min.mjs +0 -1
  401. package/panelmenu/panelmenu.esm.mjs +0 -644
  402. package/passthrough/index.esm.min.mjs +0 -1
  403. package/passthrough/index.esm.mjs +0 -70
  404. package/passthrough/tailwind/index.esm.min.mjs +0 -1
  405. package/passthrough/tailwind/index.esm.mjs +0 -3513
  406. package/password/password.esm.min.mjs +0 -1
  407. package/password/password.esm.mjs +0 -566
  408. package/picklist/picklist.esm.min.mjs +0 -1
  409. package/picklist/picklist.esm.mjs +0 -1118
  410. package/portal/portal.esm.min.mjs +0 -1
  411. package/portal/portal.esm.mjs +0 -109
  412. package/primereact.all.esm.min.mjs +0 -1
  413. package/primereact.all.esm.mjs +0 -51669
  414. package/progressbar/progressbar.esm.min.mjs +0 -1
  415. package/progressbar/progressbar.esm.mjs +0 -189
  416. package/progressspinner/progressspinner.esm.min.mjs +0 -1
  417. package/progressspinner/progressspinner.esm.mjs +0 -87
  418. package/radiobutton/radiobutton.esm.min.mjs +0 -1
  419. package/radiobutton/radiobutton.esm.mjs +0 -328
  420. package/rating/rating.esm.min.mjs +0 -1
  421. package/rating/rating.esm.mjs +0 -272
  422. package/ripple/ripple.esm.min.mjs +0 -1
  423. package/ripple/ripple.esm.mjs +0 -99
  424. package/row/row.esm.min.mjs +0 -1
  425. package/row/row.esm.mjs +0 -35
  426. package/scrollpanel/scrollpanel.esm.min.mjs +0 -1
  427. package/scrollpanel/scrollpanel.esm.mjs +0 -209
  428. package/scrolltop/scrolltop.esm.min.mjs +0 -1
  429. package/scrolltop/scrolltop.esm.mjs +0 -268
  430. package/selectbutton/selectbutton.esm.min.mjs +0 -1
  431. package/selectbutton/selectbutton.esm.mjs +0 -326
  432. package/sidebar/sidebar.esm.min.mjs +0 -1
  433. package/sidebar/sidebar.esm.mjs +0 -544
  434. package/skeleton/skeleton.esm.min.mjs +0 -1
  435. package/skeleton/skeleton.esm.mjs +0 -124
  436. package/slidemenu/slidemenu.esm.min.mjs +0 -1
  437. package/slidemenu/slidemenu.esm.mjs +0 -688
  438. package/slider/slider.esm.min.mjs +0 -1
  439. package/slider/slider.esm.mjs +0 -477
  440. package/speeddial/speeddial.esm.min.mjs +0 -1
  441. package/speeddial/speeddial.esm.mjs +0 -520
  442. package/splitbutton/splitbutton.esm.min.mjs +0 -1
  443. package/splitbutton/splitbutton.esm.mjs +0 -544
  444. package/splitter/splitter.esm.min.mjs +0 -1
  445. package/splitter/splitter.esm.mjs +0 -465
  446. package/steps/steps.esm.min.mjs +0 -1
  447. package/steps/steps.esm.mjs +0 -293
  448. package/styleclass/styleclass.esm.min.mjs +0 -1
  449. package/styleclass/styleclass.esm.mjs +0 -268
  450. package/tabmenu/tabmenu.esm.min.mjs +0 -1
  451. package/tabmenu/tabmenu.esm.mjs +0 -331
  452. package/tabview/tabview.esm.min.mjs +0 -1
  453. package/tabview/tabview.esm.mjs +0 -677
  454. package/tag/tag.esm.min.mjs +0 -1
  455. package/tag/tag.esm.mjs +0 -116
  456. package/terminal/terminal.esm.min.mjs +0 -1
  457. package/terminal/terminal.esm.mjs +0 -279
  458. package/terminalservice/terminalservice.esm.min.mjs +0 -1
  459. package/terminalservice/terminalservice.esm.mjs +0 -6
  460. package/tieredmenu/tieredmenu.esm.min.mjs +0 -1
  461. package/tieredmenu/tieredmenu.esm.mjs +0 -698
  462. package/timeline/timeline.esm.min.mjs +0 -1
  463. package/timeline/timeline.esm.mjs +0 -163
  464. package/toast/toast.esm.min.mjs +0 -1
  465. package/toast/toast.esm.mjs +0 -738
  466. package/togglebutton/togglebutton.esm.min.mjs +0 -1
  467. package/togglebutton/togglebutton.esm.mjs +0 -216
  468. package/toolbar/toolbar.esm.min.mjs +0 -1
  469. package/toolbar/toolbar.esm.mjs +0 -78
  470. package/tooltip/tooltip.esm.min.mjs +0 -1
  471. package/tooltip/tooltip.esm.mjs +0 -695
  472. package/tree/tree.esm.min.mjs +0 -1
  473. package/tree/tree.esm.mjs +0 -1402
  474. package/treeselect/treeselect.esm.min.mjs +0 -1
  475. package/treeselect/treeselect.esm.mjs +0 -929
  476. package/treetable/treetable.esm.min.mjs +0 -1
  477. package/treetable/treetable.esm.mjs +0 -3093
  478. package/tristatecheckbox/tristatecheckbox.esm.min.mjs +0 -1
  479. package/tristatecheckbox/tristatecheckbox.esm.mjs +0 -291
  480. package/utils/utils.esm.min.mjs +0 -1
  481. package/utils/utils.esm.mjs +0 -2382
  482. package/virtualscroller/virtualscroller.esm.min.mjs +0 -1
  483. package/virtualscroller/virtualscroller.esm.mjs +0 -971
@@ -1,809 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import { PrimeReactContext, FilterService, localeOption } from 'primereact/api';
4
- import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
5
- import { useMountEffect } from 'primereact/hooks';
6
- import { Tooltip } from 'primereact/tooltip';
7
- import { classNames, mergeProps, IconUtils, ObjectUtils, DomHandler } from 'primereact/utils';
8
- import { VirtualScroller } from 'primereact/virtualscroller';
9
- import { SearchIcon } from 'primereact/icons/search';
10
- import { InputText } from 'primereact/inputtext';
11
- import { Ripple } from 'primereact/ripple';
12
-
13
- function _extends() {
14
- _extends = Object.assign ? Object.assign.bind() : function (target) {
15
- for (var i = 1; i < arguments.length; i++) {
16
- var source = arguments[i];
17
- for (var key in source) {
18
- if (Object.prototype.hasOwnProperty.call(source, key)) {
19
- target[key] = source[key];
20
- }
21
- }
22
- }
23
- return target;
24
- };
25
- return _extends.apply(this, arguments);
26
- }
27
-
28
- function _typeof(o) {
29
- "@babel/helpers - typeof";
30
-
31
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
32
- return typeof o;
33
- } : function (o) {
34
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
35
- }, _typeof(o);
36
- }
37
-
38
- function _toPrimitive(input, hint) {
39
- if (_typeof(input) !== "object" || input === null) return input;
40
- var prim = input[Symbol.toPrimitive];
41
- if (prim !== undefined) {
42
- var res = prim.call(input, hint || "default");
43
- if (_typeof(res) !== "object") return res;
44
- throw new TypeError("@@toPrimitive must return a primitive value.");
45
- }
46
- return (hint === "string" ? String : Number)(input);
47
- }
48
-
49
- function _toPropertyKey(arg) {
50
- var key = _toPrimitive(arg, "string");
51
- return _typeof(key) === "symbol" ? key : String(key);
52
- }
53
-
54
- function _defineProperty(obj, key, value) {
55
- key = _toPropertyKey(key);
56
- if (key in obj) {
57
- Object.defineProperty(obj, key, {
58
- value: value,
59
- enumerable: true,
60
- configurable: true,
61
- writable: true
62
- });
63
- } else {
64
- obj[key] = value;
65
- }
66
- return obj;
67
- }
68
-
69
- function _arrayLikeToArray$1(arr, len) {
70
- if (len == null || len > arr.length) len = arr.length;
71
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
72
- return arr2;
73
- }
74
-
75
- function _arrayWithoutHoles(arr) {
76
- if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
77
- }
78
-
79
- function _iterableToArray(iter) {
80
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
81
- }
82
-
83
- function _unsupportedIterableToArray$1(o, minLen) {
84
- if (!o) return;
85
- if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
86
- var n = Object.prototype.toString.call(o).slice(8, -1);
87
- if (n === "Object" && o.constructor) n = o.constructor.name;
88
- if (n === "Map" || n === "Set") return Array.from(o);
89
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
90
- }
91
-
92
- function _nonIterableSpread() {
93
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
94
- }
95
-
96
- function _toConsumableArray(arr) {
97
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
98
- }
99
-
100
- function _arrayWithHoles(arr) {
101
- if (Array.isArray(arr)) return arr;
102
- }
103
-
104
- function _iterableToArrayLimit(r, l) {
105
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
106
- if (null != t) {
107
- var e,
108
- n,
109
- i,
110
- u,
111
- a = [],
112
- f = !0,
113
- o = !1;
114
- try {
115
- if (i = (t = t.call(r)).next, 0 === l) {
116
- if (Object(t) !== t) return;
117
- f = !1;
118
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
119
- } catch (r) {
120
- o = !0, n = r;
121
- } finally {
122
- try {
123
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
124
- } finally {
125
- if (o) throw n;
126
- }
127
- }
128
- return a;
129
- }
130
- }
131
-
132
- function _nonIterableRest() {
133
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
134
- }
135
-
136
- function _slicedToArray(arr, i) {
137
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
138
- }
139
-
140
- var classes = {
141
- itemGroup: 'p-listbox-item-group',
142
- emptyMessage: 'p-listbox-empty-message',
143
- list: function list(_ref) {
144
- var props = _ref.props,
145
- options = _ref.options;
146
- return props.virtualScrollerOptions ? classNames('p-listbox-list', options.className) : 'p-listbox-list';
147
- },
148
- wrapper: function wrapper(_ref2) {
149
- var props = _ref2.props;
150
- return classNames('p-listbox-list-wrapper', props.listClassName);
151
- },
152
- root: function root(_ref3) {
153
- var props = _ref3.props;
154
- return classNames('p-listbox p-component', {
155
- 'p-disabled': props.disabled
156
- }, props.className);
157
- },
158
- item: function item(_ref4) {
159
- var props = _ref4.props;
160
- return classNames('p-listbox-item', {
161
- 'p-highlight': props.selected,
162
- 'p-disabled': props.disabled
163
- }, props.option.className);
164
- },
165
- filterContainer: 'p-listbox-filter-container',
166
- filterIcon: 'p-listbox-filter-icon',
167
- filterInput: 'p-listbox-filter',
168
- header: 'p-listbox-header'
169
- };
170
- var styles = "\n@layer primereact {\n .p-listbox-list-wrapper {\n overflow: auto;\n }\n \n .p-listbox-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n \n .p-listbox-item {\n cursor: pointer;\n position: relative;\n overflow: hidden;\n }\n \n .p-listbox-filter-container {\n position: relative;\n }\n \n .p-listbox-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-listbox-filter {\n width: 100%;\n }\n}\n";
171
- var inlineStyles = {
172
- itemGroup: function itemGroup(_ref5) {
173
- var scrollerOptions = _ref5.scrollerOptions;
174
- return {
175
- height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
176
- };
177
- },
178
- list: function list(_ref6) {
179
- var options = _ref6.options,
180
- props = _ref6.props;
181
- return props.virtualScrollerOptions ? options.style : undefined;
182
- }
183
- };
184
- var ListBoxBase = ComponentBase.extend({
185
- defaultProps: {
186
- __TYPE: 'ListBox',
187
- className: null,
188
- dataKey: null,
189
- disabled: null,
190
- emptyFilterMessage: null,
191
- emptyMessage: null,
192
- filter: false,
193
- filterIcon: null,
194
- filterBy: null,
195
- filterInputProps: null,
196
- filterLocale: undefined,
197
- filterMatchMode: 'contains',
198
- filterPlaceholder: null,
199
- filterTemplate: null,
200
- filterValue: null,
201
- id: null,
202
- itemTemplate: null,
203
- listClassName: null,
204
- listStyle: null,
205
- metaKeySelection: false,
206
- multiple: false,
207
- onChange: null,
208
- onFilterValueChange: null,
209
- optionDisabled: null,
210
- optionGroupChildren: null,
211
- optionGroupLabel: null,
212
- optionGroupTemplate: null,
213
- optionLabel: null,
214
- optionValue: null,
215
- options: null,
216
- style: null,
217
- tabIndex: 0,
218
- tooltip: null,
219
- tooltipOptions: null,
220
- value: null,
221
- virtualScrollerOptions: null,
222
- children: undefined
223
- },
224
- css: {
225
- classes: classes,
226
- styles: styles,
227
- inlineStyles: inlineStyles
228
- }
229
- });
230
-
231
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
232
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
233
- var ListBoxHeader = /*#__PURE__*/React.memo(function (props) {
234
- var _props$ptCallbacks = props.ptCallbacks,
235
- ptm = _props$ptCallbacks.ptm,
236
- cx = _props$ptCallbacks.cx;
237
- var getPTOptions = function getPTOptions(key, options) {
238
- return ptm(key, _objectSpread$1({
239
- hostName: props.hostName
240
- }, options));
241
- };
242
- var filterOptions = {
243
- filter: function filter(e) {
244
- return onFilter(e);
245
- },
246
- reset: function reset() {
247
- return props.resetFilter();
248
- }
249
- };
250
- var onFilter = function onFilter(event) {
251
- if (props.onFilter) {
252
- props.onFilter({
253
- originalEvent: event,
254
- value: event.target.value
255
- });
256
- }
257
- };
258
- var createHeader = function createHeader() {
259
- var filterIconProps = mergeProps({
260
- className: cx('filterIcon')
261
- }, getPTOptions('filterIcon'));
262
- var icon = props.filterIcon || /*#__PURE__*/React.createElement(SearchIcon, filterIconProps);
263
- var filterIcon = IconUtils.getJSXIcon(icon, _objectSpread$1({}, filterIconProps), {
264
- props: props
265
- });
266
- var headerProps = mergeProps({
267
- className: cx('header')
268
- }, getPTOptions('header'));
269
- var filterContainerProps = mergeProps({
270
- className: cx('filterContainer')
271
- }, getPTOptions('filterContainer'));
272
- var content = /*#__PURE__*/React.createElement("div", filterContainerProps, /*#__PURE__*/React.createElement(InputText, _extends({
273
- type: "text",
274
- value: props.filter,
275
- onChange: onFilter,
276
- className: cx('filterInput'),
277
- disabled: props.disabled,
278
- placeholder: props.filterPlaceholder
279
- }, props.filterInputProps, {
280
- pt: ptm('filterInput'),
281
- unstyled: props.unstyled,
282
- __parentMetadata: {
283
- parent: props.metaData
284
- }
285
- })), filterIcon);
286
- if (props.filterTemplate) {
287
- var defaultContentOptions = {
288
- className: 'p-listbox-filter-container',
289
- element: content,
290
- filterOptions: filterOptions,
291
- filterInputChange: onFilter,
292
- filterIconClassName: 'p-dropdown-filter-icon',
293
- props: props
294
- };
295
- content = ObjectUtils.getJSXElement(props.filterTemplate, defaultContentOptions);
296
- }
297
- return /*#__PURE__*/React.createElement("div", headerProps, content);
298
- };
299
- var content = createHeader();
300
- return /*#__PURE__*/React.createElement(React.Fragment, null, content);
301
- });
302
- ListBoxHeader.displayName = 'ListBoxHeader';
303
-
304
- var ListBoxItem = /*#__PURE__*/React.memo(function (props) {
305
- var _props$ptCallbacks = props.ptCallbacks,
306
- ptm = _props$ptCallbacks.ptm,
307
- cx = _props$ptCallbacks.cx;
308
- var getPTOptions = function getPTOptions(key) {
309
- return ptm(key, {
310
- hostName: props.hostName,
311
- context: {
312
- selected: props.selected,
313
- disabled: props.disabled
314
- }
315
- });
316
- };
317
- var onClick = function onClick(event) {
318
- if (props.onClick) {
319
- props.onClick({
320
- originalEvent: event,
321
- option: props.option
322
- });
323
- }
324
- event.preventDefault();
325
- };
326
- var onTouchEnd = function onTouchEnd(event) {
327
- if (props.onTouchEnd) {
328
- props.onTouchEnd({
329
- originalEvent: event,
330
- option: props.option
331
- });
332
- }
333
- };
334
- var onKeyDown = function onKeyDown(event) {
335
- var item = event.currentTarget;
336
- switch (event.which) {
337
- //down
338
- case 40:
339
- var nextItem = findNextItem(item);
340
- nextItem && nextItem.focus();
341
- event.preventDefault();
342
- break;
343
-
344
- //up
345
- case 38:
346
- var prevItem = findPrevItem(item);
347
- prevItem && prevItem.focus();
348
- event.preventDefault();
349
- break;
350
-
351
- //enter
352
- case 13:
353
- onClick(event);
354
- event.preventDefault();
355
- break;
356
- }
357
- };
358
- var findNextItem = function findNextItem(item) {
359
- var nextItem = item.nextElementSibling;
360
- return nextItem ? DomHandler.hasClass(nextItem, 'p-disabled') || DomHandler.hasClass(nextItem, 'p-listbox-item-group') ? findNextItem(nextItem) : nextItem : null;
361
- };
362
- var findPrevItem = function findPrevItem(item) {
363
- var prevItem = item.previousElementSibling;
364
- return prevItem ? DomHandler.hasClass(prevItem, 'p-disabled') || DomHandler.hasClass(prevItem, 'p-listbox-item-group') ? findPrevItem(prevItem) : prevItem : null;
365
- };
366
- var content = props.template ? ObjectUtils.getJSXElement(props.template, props.option) : props.label;
367
- var itemProps = mergeProps({
368
- className: cx('item', {
369
- props: props
370
- }),
371
- style: props.style,
372
- onClick: onClick,
373
- onTouchEnd: onTouchEnd,
374
- onKeyDown: onKeyDown,
375
- tabIndex: '-1',
376
- 'aria-label': props.label,
377
- key: props.label,
378
- role: 'option',
379
- 'aria-selected': props.selected,
380
- 'aria-disabled': props.disabled
381
- }, getPTOptions('item'));
382
- return /*#__PURE__*/React.createElement("li", itemProps, content, /*#__PURE__*/React.createElement(Ripple, null));
383
- });
384
- ListBoxItem.displayName = 'ListBoxItem';
385
-
386
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
387
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
388
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
389
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
390
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
391
- var ListBox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
392
- var context = React.useContext(PrimeReactContext);
393
- var props = ListBoxBase.getProps(inProps, context);
394
- var _React$useState = React.useState(''),
395
- _React$useState2 = _slicedToArray(_React$useState, 2),
396
- filterValueState = _React$useState2[0],
397
- setFilterValueState = _React$useState2[1];
398
- var elementRef = React.useRef(null);
399
- var virtualScrollerRef = React.useRef(null);
400
- var optionTouched = React.useRef(false);
401
- var filteredValue = (props.onFilterValueChange ? props.filterValue : filterValueState) || '';
402
- var hasFilter = filteredValue && filteredValue.trim().length > 0;
403
- var metaData = {
404
- props: props,
405
- state: {
406
- filterValue: filteredValue
407
- }
408
- };
409
- var ptCallbacks = ListBoxBase.setMetaData(metaData);
410
- useHandleStyle(ListBoxBase.css.styles, ptCallbacks.isUnstyled, {
411
- name: 'listbox'
412
- });
413
- var onOptionSelect = function onOptionSelect(event) {
414
- var option = event.option;
415
- if (props.disabled || isOptionDisabled(option)) {
416
- return;
417
- }
418
- props.multiple ? onOptionSelectMultiple(event.originalEvent, option) : onOptionSelectSingle(event.originalEvent, option);
419
- optionTouched.current = false;
420
- };
421
- var onOptionTouchEnd = function onOptionTouchEnd() {
422
- if (props.disabled) {
423
- return;
424
- }
425
- optionTouched.current = true;
426
- };
427
- var onOptionSelectSingle = function onOptionSelectSingle(event, option) {
428
- var selected = isSelected(option);
429
- var valueChanged = false;
430
- var value = null;
431
- var metaSelection = optionTouched.current ? false : props.metaKeySelection;
432
- if (metaSelection) {
433
- var metaKey = event.metaKey || event.ctrlKey;
434
- if (selected) {
435
- if (metaKey) {
436
- value = null;
437
- valueChanged = true;
438
- }
439
- } else {
440
- value = getOptionValue(option);
441
- valueChanged = true;
442
- }
443
- } else {
444
- value = selected ? null : getOptionValue(option);
445
- valueChanged = true;
446
- }
447
- if (valueChanged) {
448
- updateModel(event, value);
449
- }
450
- };
451
- var onOptionSelectMultiple = function onOptionSelectMultiple(event, option) {
452
- var selected = isSelected(option);
453
- var valueChanged = false;
454
- var value = null;
455
- var metaSelection = optionTouched ? false : props.metaKeySelection;
456
- if (metaSelection) {
457
- var metaKey = event.metaKey || event.ctrlKey;
458
- if (selected) {
459
- if (metaKey) value = removeOption(option);else value = [getOptionValue(option)];
460
- valueChanged = true;
461
- } else {
462
- value = metaKey ? props.value || [] : [];
463
- value = [].concat(_toConsumableArray(value), [getOptionValue(option)]);
464
- valueChanged = true;
465
- }
466
- } else {
467
- if (selected) value = removeOption(option);else value = [].concat(_toConsumableArray(props.value || []), [getOptionValue(option)]);
468
- valueChanged = true;
469
- }
470
- if (valueChanged) {
471
- props.onChange({
472
- originalEvent: event,
473
- value: value,
474
- stopPropagation: function stopPropagation() {
475
- event.stopPropagation();
476
- },
477
- preventDefault: function preventDefault() {
478
- event.preventDefault();
479
- },
480
- target: {
481
- name: props.name,
482
- id: props.id,
483
- value: value
484
- }
485
- });
486
- }
487
- };
488
- var onFilter = function onFilter(event) {
489
- virtualScrollerRef.current && virtualScrollerRef.current.scrollToIndex(0);
490
- var originalEvent = event.originalEvent,
491
- value = event.value;
492
- if (props.onFilterValueChange) {
493
- props.onFilterValueChange({
494
- originalEvent: originalEvent,
495
- value: value
496
- });
497
- } else {
498
- setFilterValueState(value);
499
- }
500
- };
501
- var resetFilter = function resetFilter() {
502
- setFilterValueState('');
503
- props.onFilter && props.onFilter({
504
- filter: ''
505
- });
506
- };
507
- var updateModel = function updateModel(event, value) {
508
- if (props.onChange) {
509
- props.onChange({
510
- originalEvent: event,
511
- value: value,
512
- stopPropagation: function stopPropagation() {
513
- event.stopPropagation();
514
- },
515
- preventDefault: function preventDefault() {
516
- event.preventDefault();
517
- },
518
- target: {
519
- name: props.name,
520
- id: props.id,
521
- value: value
522
- }
523
- });
524
- }
525
- };
526
- var removeOption = function removeOption(option) {
527
- return props.value.filter(function (val) {
528
- return !ObjectUtils.equals(val, getOptionValue(option), props.dataKey);
529
- });
530
- };
531
- var getSelectedOptionIndex = function getSelectedOptionIndex() {
532
- if (props.value != null && visibleOptions) {
533
- if (props.optionGroupLabel) {
534
- for (var i = 0; i < visibleOptions.length; i++) {
535
- var selectedOptionIndex = findOptionIndexInList(props.value, getOptionGroupChildren(visibleOptions[i]));
536
- if (selectedOptionIndex !== -1) {
537
- return {
538
- group: i,
539
- option: selectedOptionIndex
540
- };
541
- }
542
- }
543
- } else {
544
- return findOptionIndexInList(props.value, visibleOptions);
545
- }
546
- }
547
- return -1;
548
- };
549
- var equalityKey = function equalityKey() {
550
- return props.optionValue ? null : props.dataKey;
551
- };
552
- var findOptionIndexInList = function findOptionIndexInList(value, list) {
553
- var key = equalityKey();
554
- return list.findIndex(function (item) {
555
- return ObjectUtils.equals(value, getOptionValue(item), key);
556
- });
557
- };
558
- var isSelected = function isSelected(option) {
559
- var optionValue = getOptionValue(option);
560
- var key = equalityKey();
561
- return props.multiple && props.value ? props.value.some(function (val) {
562
- return ObjectUtils.equals(val, optionValue, key);
563
- }) : ObjectUtils.equals(props.value, optionValue, key);
564
- };
565
- var getOptionLabel = function getOptionLabel(option) {
566
- return props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
567
- };
568
- var getOptionValue = function getOptionValue(option) {
569
- return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option && option['value'] !== undefined ? option['value'] : option;
570
- };
571
- var getOptionRenderKey = function getOptionRenderKey(option) {
572
- return props.dataKey ? ObjectUtils.resolveFieldData(option, props.dataKey) : getOptionLabel(option);
573
- };
574
- var isOptionDisabled = function isOptionDisabled(option) {
575
- if (props.optionDisabled) {
576
- return ObjectUtils.isFunction(props.optionDisabled) ? props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, props.optionDisabled);
577
- }
578
- return option && option['disabled'] !== undefined ? option['disabled'] : false;
579
- };
580
- var getOptionGroupRenderKey = function getOptionGroupRenderKey(optionGroup) {
581
- return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
582
- };
583
- var getOptionGroupLabel = function getOptionGroupLabel(optionGroup) {
584
- return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
585
- };
586
- var getOptionGroupChildren = function getOptionGroupChildren(optionGroup) {
587
- return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupChildren);
588
- };
589
- var getVisibleOptions = function getVisibleOptions() {
590
- if (hasFilter) {
591
- var filterValue = filteredValue.trim().toLocaleLowerCase(props.filterLocale);
592
- var searchFields = props.filterBy ? props.filterBy.split(',') : [props.optionLabel || 'label'];
593
- if (props.optionGroupLabel) {
594
- var filteredGroups = [];
595
- var _iterator = _createForOfIteratorHelper(props.options),
596
- _step;
597
- try {
598
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
599
- var optgroup = _step.value;
600
- var filteredSubOptions = FilterService.filter(getOptionGroupChildren(optgroup), searchFields, filterValue, props.filterMatchMode, props.filterLocale);
601
- if (filteredSubOptions && filteredSubOptions.length) {
602
- filteredGroups.push(_objectSpread(_objectSpread({}, optgroup), {
603
- items: filteredSubOptions
604
- }));
605
- }
606
- }
607
- } catch (err) {
608
- _iterator.e(err);
609
- } finally {
610
- _iterator.f();
611
- }
612
- return filteredGroups;
613
- } else {
614
- return FilterService.filter(props.options, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
615
- }
616
- } else {
617
- return props.options;
618
- }
619
- };
620
- var scrollToSelectedIndex = function scrollToSelectedIndex() {
621
- if (virtualScrollerRef.current) {
622
- var selectedIndex = getSelectedOptionIndex();
623
- if (selectedIndex !== -1) {
624
- setTimeout(function () {
625
- return virtualScrollerRef.current.scrollToIndex(selectedIndex);
626
- }, 0);
627
- }
628
- }
629
- };
630
- React.useImperativeHandle(ref, function () {
631
- return {
632
- props: props,
633
- focus: function focus() {
634
- return DomHandler.focusFirstElement(elementRef.current);
635
- },
636
- getElement: function getElement() {
637
- return elementRef.current;
638
- },
639
- getVirtualScroller: function getVirtualScroller() {
640
- return virtualScrollerRef.current;
641
- }
642
- };
643
- });
644
- useMountEffect(function () {
645
- scrollToSelectedIndex();
646
- });
647
- var createHeader = function createHeader() {
648
- return props.filter ? /*#__PURE__*/React.createElement(ListBoxHeader, {
649
- hostName: "ListBox",
650
- filter: filteredValue,
651
- filterIcon: props.filterIcon,
652
- onFilter: onFilter,
653
- resetFilter: resetFilter,
654
- filterTemplate: props.filterTemplate,
655
- disabled: props.disabled,
656
- filterPlaceholder: props.filterPlaceholder,
657
- filterInputProps: props.filterInputProps,
658
- ptCallbacks: ptCallbacks,
659
- metaData: metaData
660
- }) : null;
661
- };
662
- var createGroupChildren = function createGroupChildren(optionGroup, style) {
663
- var groupChildren = getOptionGroupChildren(optionGroup);
664
- return groupChildren.map(function (option, j) {
665
- var optionLabel = getOptionLabel(option);
666
- var optionKey = j + '_' + getOptionRenderKey(option);
667
- var disabled = isOptionDisabled(option);
668
- var tabIndex = disabled ? null : props.tabIndex || 0;
669
- return /*#__PURE__*/React.createElement(ListBoxItem, {
670
- hostName: "ListBox",
671
- key: optionKey,
672
- label: optionLabel,
673
- option: option,
674
- style: style,
675
- template: props.itemTemplate,
676
- selected: isSelected(option),
677
- onClick: onOptionSelect,
678
- onTouchEnd: onOptionTouchEnd,
679
- tabIndex: tabIndex,
680
- disabled: disabled,
681
- ptCallbacks: ptCallbacks,
682
- metaData: metaData
683
- });
684
- });
685
- };
686
- var createItem = function createItem(option, index) {
687
- var scrollerOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
688
- var style = {
689
- height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
690
- };
691
- if (props.optionGroupLabel) {
692
- var groupContent = props.optionGroupTemplate ? ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : getOptionGroupLabel(option);
693
- var groupChildrenContent = createGroupChildren(option, style);
694
- var key = index + '_' + getOptionGroupRenderKey(option);
695
- var itemGroupProps = mergeProps({
696
- className: ptCallbacks.cx('itemGroup'),
697
- style: ptCallbacks.sx('itemGroup', {
698
- scrollerOptions: scrollerOptions
699
- }),
700
- role: 'group'
701
- }, ptCallbacks.ptm('itemGroup'));
702
- return /*#__PURE__*/React.createElement(React.Fragment, {
703
- key: key
704
- }, /*#__PURE__*/React.createElement("li", itemGroupProps, groupContent), groupChildrenContent);
705
- } else {
706
- var optionLabel = getOptionLabel(option);
707
- var optionKey = index + '_' + getOptionRenderKey(option);
708
- var disabled = isOptionDisabled(option);
709
- var tabIndex = disabled ? null : props.tabIndex || 0;
710
- return /*#__PURE__*/React.createElement(ListBoxItem, {
711
- hostName: "ListBox",
712
- key: optionKey,
713
- label: optionLabel,
714
- option: option,
715
- style: style,
716
- template: props.itemTemplate,
717
- selected: isSelected(option),
718
- onClick: onOptionSelect,
719
- onTouchEnd: onOptionTouchEnd,
720
- tabIndex: tabIndex,
721
- disabled: disabled,
722
- ptCallbacks: ptCallbacks,
723
- metaData: metaData
724
- });
725
- }
726
- };
727
- var createItems = function createItems() {
728
- if (ObjectUtils.isNotEmpty(visibleOptions)) {
729
- return visibleOptions.map(createItem);
730
- } else if (hasFilter) {
731
- return createEmptyMessage(props.emptyFilterMessage, true);
732
- }
733
- return createEmptyMessage(props.emptyMessage);
734
- };
735
- var createEmptyMessage = function createEmptyMessage(emptyMessage, isFilter) {
736
- var emptyMessageProps = mergeProps({
737
- className: ptCallbacks.cx('emptyMessage')
738
- }, ptCallbacks.ptm('emptyMessage'));
739
- var message = ObjectUtils.getJSXElement(emptyMessage, props) || localeOption(isFilter ? 'emptyFilterMessage' : 'emptyMessage');
740
- return /*#__PURE__*/React.createElement("li", emptyMessageProps, message);
741
- };
742
- var createList = function createList() {
743
- if (props.virtualScrollerOptions) {
744
- var virtualScrollerProps = _objectSpread(_objectSpread({}, props.virtualScrollerOptions), {
745
- items: visibleOptions,
746
- onLazyLoad: function onLazyLoad(event) {
747
- return props.virtualScrollerOptions.onLazyLoad(_objectSpread(_objectSpread({}, event), {
748
- filter: visibleOptions
749
- }));
750
- },
751
- itemTemplate: function itemTemplate(item, options) {
752
- return item && createItem(item, options.index, options);
753
- },
754
- contentTemplate: function contentTemplate(options) {
755
- var listProps = mergeProps(_objectSpread({
756
- ref: options.contentRef,
757
- style: ptCallbacks.sx('list', {
758
- options: options
759
- }),
760
- className: ptCallbacks.cx('list', {
761
- options: options
762
- }),
763
- role: 'listbox',
764
- 'aria-multiselectable': props.multiple
765
- }, ariaProps), ptCallbacks.ptm('list'));
766
- return /*#__PURE__*/React.createElement("ul", listProps, options.children);
767
- }
768
- });
769
- return /*#__PURE__*/React.createElement(VirtualScroller, _extends({
770
- ref: virtualScrollerRef
771
- }, virtualScrollerProps, {
772
- pt: ptCallbacks.ptm('virtualScroller')
773
- }));
774
- } else {
775
- var items = createItems();
776
- var listProps = mergeProps(_objectSpread({
777
- className: ptCallbacks.cx('list'),
778
- role: 'listbox',
779
- 'aria-multiselectable': props.multiple
780
- }, ariaProps), ptCallbacks.ptm('list'));
781
- return /*#__PURE__*/React.createElement("ul", listProps, items);
782
- }
783
- };
784
- var visibleOptions = getVisibleOptions();
785
- var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
786
- var otherProps = ListBoxBase.getOtherProps(props);
787
- var ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
788
- var list = createList();
789
- var header = createHeader();
790
- var wrapperProps = mergeProps({
791
- className: ptCallbacks.cx('wrapper'),
792
- style: props.listStyle
793
- }, ptCallbacks.ptm('wrapper'));
794
- var rootProps = mergeProps({
795
- ref: elementRef,
796
- id: props.id,
797
- className: ptCallbacks.cx('root'),
798
- style: props.style
799
- }, ListBoxBase.getOtherProps(props), ptCallbacks.ptm('root'));
800
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, header, /*#__PURE__*/React.createElement("div", wrapperProps, list)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
801
- target: elementRef,
802
- content: props.tooltip
803
- }, props.tooltipOptions, {
804
- pt: ptCallbacks.ptm('tooltip')
805
- })));
806
- }));
807
- ListBox.displayName = 'ListBox';
808
-
809
- export { ListBox };