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,1163 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import PrimeReact, { PrimeReactContext, localeOption } from 'primereact/api';
4
- import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
5
- import { CSSTransition } from 'primereact/csstransition';
6
- import { useUnmountEffect as useUnmountEffect$1 } from 'primereact/hooks';
7
- import { IconBase } from 'primereact/iconbase';
8
- import { EyeIcon } from 'primereact/icons/eye';
9
- import { RefreshIcon } from 'primereact/icons/refresh';
10
- import { SearchMinusIcon } from 'primereact/icons/searchminus';
11
- import { SearchPlusIcon } from 'primereact/icons/searchplus';
12
- import { TimesIcon } from 'primereact/icons/times';
13
- import { UndoIcon } from 'primereact/icons/undo';
14
- import { Portal } from 'primereact/portal';
15
- import { classNames, DomHandler, ObjectUtils as ObjectUtils$1, ZIndexUtils, mergeProps, IconUtils } from 'primereact/utils';
16
-
17
- function _extends() {
18
- _extends = Object.assign ? Object.assign.bind() : function (target) {
19
- for (var i = 1; i < arguments.length; i++) {
20
- var source = arguments[i];
21
- for (var key in source) {
22
- if (Object.prototype.hasOwnProperty.call(source, key)) {
23
- target[key] = source[key];
24
- }
25
- }
26
- }
27
- return target;
28
- };
29
- return _extends.apply(this, arguments);
30
- }
31
-
32
- function _typeof(o) {
33
- "@babel/helpers - typeof";
34
-
35
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
36
- return typeof o;
37
- } : function (o) {
38
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
39
- }, _typeof(o);
40
- }
41
-
42
- function _toPrimitive(input, hint) {
43
- if (_typeof(input) !== "object" || input === null) return input;
44
- var prim = input[Symbol.toPrimitive];
45
- if (prim !== undefined) {
46
- var res = prim.call(input, hint || "default");
47
- if (_typeof(res) !== "object") return res;
48
- throw new TypeError("@@toPrimitive must return a primitive value.");
49
- }
50
- return (hint === "string" ? String : Number)(input);
51
- }
52
-
53
- function _toPropertyKey(arg) {
54
- var key = _toPrimitive(arg, "string");
55
- return _typeof(key) === "symbol" ? key : String(key);
56
- }
57
-
58
- function _defineProperty(obj, key, value) {
59
- key = _toPropertyKey(key);
60
- if (key in obj) {
61
- Object.defineProperty(obj, key, {
62
- value: value,
63
- enumerable: true,
64
- configurable: true,
65
- writable: true
66
- });
67
- } else {
68
- obj[key] = value;
69
- }
70
- return obj;
71
- }
72
-
73
- function _arrayWithHoles(arr) {
74
- if (Array.isArray(arr)) return arr;
75
- }
76
-
77
- function _iterableToArrayLimit(r, l) {
78
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
79
- if (null != t) {
80
- var e,
81
- n,
82
- i,
83
- u,
84
- a = [],
85
- f = !0,
86
- o = !1;
87
- try {
88
- if (i = (t = t.call(r)).next, 0 === l) {
89
- if (Object(t) !== t) return;
90
- f = !1;
91
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
92
- } catch (r) {
93
- o = !0, n = r;
94
- } finally {
95
- try {
96
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
97
- } finally {
98
- if (o) throw n;
99
- }
100
- }
101
- return a;
102
- }
103
- }
104
-
105
- function _arrayLikeToArray$1(arr, len) {
106
- if (len == null || len > arr.length) len = arr.length;
107
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
108
- return arr2;
109
- }
110
-
111
- function _unsupportedIterableToArray$1(o, minLen) {
112
- if (!o) return;
113
- if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
114
- var n = Object.prototype.toString.call(o).slice(8, -1);
115
- if (n === "Object" && o.constructor) n = o.constructor.name;
116
- if (n === "Map" || n === "Set") return Array.from(o);
117
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
118
- }
119
-
120
- function _nonIterableRest() {
121
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
122
- }
123
-
124
- function _slicedToArray(arr, i) {
125
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
126
- }
127
-
128
- function _arrayWithoutHoles(arr) {
129
- if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
130
- }
131
-
132
- function _iterableToArray(iter) {
133
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
134
- }
135
-
136
- function _nonIterableSpread() {
137
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
138
- }
139
-
140
- function _toConsumableArray(arr) {
141
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
142
- }
143
-
144
- function _classCallCheck(instance, Constructor) {
145
- if (!(instance instanceof Constructor)) {
146
- throw new TypeError("Cannot call a class as a function");
147
- }
148
- }
149
-
150
- function _defineProperties(target, props) {
151
- for (var i = 0; i < props.length; i++) {
152
- var descriptor = props[i];
153
- descriptor.enumerable = descriptor.enumerable || false;
154
- descriptor.configurable = true;
155
- if ("value" in descriptor) descriptor.writable = true;
156
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
157
- }
158
- }
159
- function _createClass(Constructor, protoProps, staticProps) {
160
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
161
- if (staticProps) _defineProperties(Constructor, staticProps);
162
- Object.defineProperty(Constructor, "prototype", {
163
- writable: false
164
- });
165
- return Constructor;
166
- }
167
-
168
- 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; } } }; }
169
- 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); }
170
- 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; }
171
- var ObjectUtils = /*#__PURE__*/function () {
172
- function ObjectUtils() {
173
- _classCallCheck(this, ObjectUtils);
174
- }
175
- _createClass(ObjectUtils, null, [{
176
- key: "equals",
177
- value: function equals(obj1, obj2, field) {
178
- if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
179
- }
180
- }, {
181
- key: "deepEquals",
182
- value: function deepEquals(a, b) {
183
- if (a === b) return true;
184
- if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
185
- var arrA = Array.isArray(a),
186
- arrB = Array.isArray(b),
187
- i,
188
- length,
189
- key;
190
- if (arrA && arrB) {
191
- length = a.length;
192
- if (length !== b.length) return false;
193
- for (i = length; i-- !== 0;) if (!this.deepEquals(a[i], b[i])) return false;
194
- return true;
195
- }
196
- if (arrA !== arrB) return false;
197
- var dateA = a instanceof Date,
198
- dateB = b instanceof Date;
199
- if (dateA !== dateB) return false;
200
- if (dateA && dateB) return a.getTime() === b.getTime();
201
- var regexpA = a instanceof RegExp,
202
- regexpB = b instanceof RegExp;
203
- if (regexpA !== regexpB) return false;
204
- if (regexpA && regexpB) return a.toString() === b.toString();
205
- var keys = Object.keys(a);
206
- length = keys.length;
207
- if (length !== Object.keys(b).length) return false;
208
- for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
209
- for (i = length; i-- !== 0;) {
210
- key = keys[i];
211
- if (!this.deepEquals(a[key], b[key])) return false;
212
- }
213
- return true;
214
- }
215
-
216
- /*eslint no-self-compare: "off"*/
217
- return a !== a && b !== b;
218
- }
219
- }, {
220
- key: "resolveFieldData",
221
- value: function resolveFieldData(data, field) {
222
- if (!data || !field) {
223
- // short circuit if there is nothing to resolve
224
- return null;
225
- }
226
- try {
227
- var value = data[field];
228
- if (this.isNotEmpty(value)) return value;
229
- } catch (_unused) {
230
- // Performance optimization: https://github.com/primefaces/primereact/issues/4797
231
- // do nothing and continue to other methods to resolve field data
232
- }
233
- if (Object.keys(data).length) {
234
- if (this.isFunction(field)) {
235
- return field(data);
236
- } else if (this.isNotEmpty(data[field])) {
237
- return data[field];
238
- } else if (field.indexOf('.') === -1) {
239
- return data[field];
240
- } else {
241
- var fields = field.split('.');
242
- var _value = data;
243
- for (var i = 0, len = fields.length; i < len; ++i) {
244
- if (_value == null) {
245
- return null;
246
- }
247
- _value = _value[fields[i]];
248
- }
249
- return _value;
250
- }
251
- }
252
- return null;
253
- }
254
- }, {
255
- key: "findDiffKeys",
256
- value: function findDiffKeys(obj1, obj2) {
257
- if (!obj1 || !obj2) {
258
- return {};
259
- }
260
- return Object.keys(obj1).filter(function (key) {
261
- return !obj2.hasOwnProperty(key);
262
- }).reduce(function (result, current) {
263
- result[current] = obj1[current];
264
- return result;
265
- }, {});
266
- }
267
-
268
- /**
269
- * Removes keys from a JSON object that start with a string such as "data" to get all "data-id" type properties.
270
- *
271
- * @param {any} obj the JSON object to reduce
272
- * @param {string[]} startsWiths the string(s) to check if the property starts with this key
273
- * @returns the JSON object containing only the key/values that match the startsWith string
274
- */
275
- }, {
276
- key: "reduceKeys",
277
- value: function reduceKeys(obj, startsWiths) {
278
- var result = {};
279
- if (!obj || !startsWiths || startsWiths.length === 0) {
280
- return result;
281
- }
282
- Object.keys(obj).filter(function (key) {
283
- return startsWiths.some(function (value) {
284
- return key.startsWith(value);
285
- });
286
- }).forEach(function (key) {
287
- result[key] = obj[key];
288
- delete obj[key];
289
- });
290
- return result;
291
- }
292
- }, {
293
- key: "reorderArray",
294
- value: function reorderArray(value, from, to) {
295
- if (value && from !== to) {
296
- if (to >= value.length) {
297
- to %= value.length;
298
- from %= value.length;
299
- }
300
- value.splice(to, 0, value.splice(from, 1)[0]);
301
- }
302
- }
303
- }, {
304
- key: "findIndexInList",
305
- value: function findIndexInList(value, list, dataKey) {
306
- var _this = this;
307
- if (list) {
308
- return dataKey ? list.findIndex(function (item) {
309
- return _this.equals(item, value, dataKey);
310
- }) : list.findIndex(function (item) {
311
- return item === value;
312
- });
313
- }
314
- return -1;
315
- }
316
- }, {
317
- key: "getJSXElement",
318
- value: function getJSXElement(obj) {
319
- for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
320
- params[_key - 1] = arguments[_key];
321
- }
322
- return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
323
- }
324
- }, {
325
- key: "getItemValue",
326
- value: function getItemValue(obj) {
327
- for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
328
- params[_key2 - 1] = arguments[_key2];
329
- }
330
- return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
331
- }
332
- }, {
333
- key: "getProp",
334
- value: function getProp(props) {
335
- var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
336
- var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
337
- var value = props ? props[prop] : undefined;
338
- return value === undefined ? defaultProps[prop] : value;
339
- }
340
- }, {
341
- key: "getPropCaseInsensitive",
342
- value: function getPropCaseInsensitive(props, prop) {
343
- var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
344
- var fkey = this.toFlatCase(prop);
345
- for (var key in props) {
346
- if (props.hasOwnProperty(key) && this.toFlatCase(key) === fkey) {
347
- return props[key];
348
- }
349
- }
350
- for (var _key3 in defaultProps) {
351
- if (defaultProps.hasOwnProperty(_key3) && this.toFlatCase(_key3) === fkey) {
352
- return defaultProps[_key3];
353
- }
354
- }
355
- return undefined; // Property not found
356
- }
357
- }, {
358
- key: "getMergedProps",
359
- value: function getMergedProps(props, defaultProps) {
360
- return Object.assign({}, defaultProps, props);
361
- }
362
- }, {
363
- key: "getDiffProps",
364
- value: function getDiffProps(props, defaultProps) {
365
- return this.findDiffKeys(props, defaultProps);
366
- }
367
- }, {
368
- key: "getPropValue",
369
- value: function getPropValue(obj) {
370
- for (var _len3 = arguments.length, params = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
371
- params[_key4 - 1] = arguments[_key4];
372
- }
373
- return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
374
- }
375
- }, {
376
- key: "getComponentProp",
377
- value: function getComponentProp(component) {
378
- var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
379
- var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
380
- return this.isNotEmpty(component) ? this.getProp(component.props, prop, defaultProps) : undefined;
381
- }
382
- }, {
383
- key: "getComponentProps",
384
- value: function getComponentProps(component, defaultProps) {
385
- return this.isNotEmpty(component) ? this.getMergedProps(component.props, defaultProps) : undefined;
386
- }
387
- }, {
388
- key: "getComponentDiffProps",
389
- value: function getComponentDiffProps(component, defaultProps) {
390
- return this.isNotEmpty(component) ? this.getDiffProps(component.props, defaultProps) : undefined;
391
- }
392
- }, {
393
- key: "isValidChild",
394
- value: function isValidChild(child, type, validTypes) {
395
- /* eslint-disable */
396
- if (child) {
397
- var childType = this.getComponentProp(child, '__TYPE') || (child.type ? child.type.displayName : undefined);
398
- var isValid = childType === type;
399
- try {
400
- var messageTypes; if ("production" !== 'production' && !isValid) ;
401
- } catch (error) {
402
- // NOOP
403
- }
404
- return isValid;
405
- }
406
- return false;
407
- /* eslint-enable */
408
- }
409
- }, {
410
- key: "getRefElement",
411
- value: function getRefElement(ref) {
412
- if (ref) {
413
- return _typeof(ref) === 'object' && ref.hasOwnProperty('current') ? ref.current : ref;
414
- }
415
- return null;
416
- }
417
- }, {
418
- key: "combinedRefs",
419
- value: function combinedRefs(innerRef, forwardRef) {
420
- if (innerRef && forwardRef) {
421
- if (typeof forwardRef === 'function') {
422
- forwardRef(innerRef.current);
423
- } else {
424
- forwardRef.current = innerRef.current;
425
- }
426
- }
427
- }
428
- }, {
429
- key: "removeAccents",
430
- value: function removeAccents(str) {
431
- if (str && str.search(/[\xC0-\xFF]/g) > -1) {
432
- str = str.replace(/[\xC0-\xC5]/g, 'A').replace(/[\xC6]/g, 'AE').replace(/[\xC7]/g, 'C').replace(/[\xC8-\xCB]/g, 'E').replace(/[\xCC-\xCF]/g, 'I').replace(/[\xD0]/g, 'D').replace(/[\xD1]/g, 'N').replace(/[\xD2-\xD6\xD8]/g, 'O').replace(/[\xD9-\xDC]/g, 'U').replace(/[\xDD]/g, 'Y').replace(/[\xDE]/g, 'P').replace(/[\xE0-\xE5]/g, 'a').replace(/[\xE6]/g, 'ae').replace(/[\xE7]/g, 'c').replace(/[\xE8-\xEB]/g, 'e').replace(/[\xEC-\xEF]/g, 'i').replace(/[\xF1]/g, 'n').replace(/[\xF2-\xF6\xF8]/g, 'o').replace(/[\xF9-\xFC]/g, 'u').replace(/[\xFE]/g, 'p').replace(/[\xFD\xFF]/g, 'y');
433
- }
434
- return str;
435
- }
436
- }, {
437
- key: "toFlatCase",
438
- value: function toFlatCase(str) {
439
- // convert snake, kebab, camel and pascal cases to flat case
440
- return this.isNotEmpty(str) && this.isString(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str;
441
- }
442
- }, {
443
- key: "toCapitalCase",
444
- value: function toCapitalCase(str) {
445
- return this.isNotEmpty(str) && this.isString(str) ? str[0].toUpperCase() + str.slice(1) : str;
446
- }
447
- }, {
448
- key: "trim",
449
- value: function trim(value) {
450
- // trim only if the value is actually a string
451
- return this.isNotEmpty(value) && this.isString(value) ? value.trim() : value;
452
- }
453
- }, {
454
- key: "isEmpty",
455
- value: function isEmpty(value) {
456
- return value === null || value === undefined || value === '' || Array.isArray(value) && value.length === 0 || !(value instanceof Date) && _typeof(value) === 'object' && Object.keys(value).length === 0;
457
- }
458
- }, {
459
- key: "isNotEmpty",
460
- value: function isNotEmpty(value) {
461
- return !this.isEmpty(value);
462
- }
463
- }, {
464
- key: "isFunction",
465
- value: function isFunction(value) {
466
- return !!(value && value.constructor && value.call && value.apply);
467
- }
468
- }, {
469
- key: "isObject",
470
- value: function isObject(value) {
471
- return value !== null && value instanceof Object && value.constructor === Object;
472
- }
473
- }, {
474
- key: "isDate",
475
- value: function isDate(value) {
476
- return value !== null && value instanceof Date && value.constructor === Date;
477
- }
478
- }, {
479
- key: "isArray",
480
- value: function isArray(value) {
481
- return value !== null && Array.isArray(value);
482
- }
483
- }, {
484
- key: "isString",
485
- value: function isString(value) {
486
- return value !== null && typeof value === 'string';
487
- }
488
- }, {
489
- key: "isPrintableCharacter",
490
- value: function isPrintableCharacter() {
491
- var _char = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
492
- return this.isNotEmpty(_char) && _char.length === 1 && _char.match(/\S| /);
493
- }
494
- }, {
495
- key: "isLetter",
496
- value: function isLetter(_char2) {
497
- return _char2 && (_char2.toUpperCase() != _char2.toLowerCase() || _char2.codePointAt(0) > 127);
498
- }
499
-
500
- /**
501
- * Firefox-v103 does not currently support the "findLast" method. It is stated that this method will be supported with Firefox-v104.
502
- * https://caniuse.com/mdn-javascript_builtins_array_findlast
503
- */
504
- }, {
505
- key: "findLast",
506
- value: function findLast(arr, callback) {
507
- var item;
508
- if (this.isNotEmpty(arr)) {
509
- try {
510
- item = arr.findLast(callback);
511
- } catch (_unused2) {
512
- item = _toConsumableArray(arr).reverse().find(callback);
513
- }
514
- }
515
- return item;
516
- }
517
-
518
- /**
519
- * Firefox-v103 does not currently support the "findLastIndex" method. It is stated that this method will be supported with Firefox-v104.
520
- * https://caniuse.com/mdn-javascript_builtins_array_findlastindex
521
- */
522
- }, {
523
- key: "findLastIndex",
524
- value: function findLastIndex(arr, callback) {
525
- var index = -1;
526
- if (this.isNotEmpty(arr)) {
527
- try {
528
- index = arr.findLastIndex(callback);
529
- } catch (_unused3) {
530
- index = arr.lastIndexOf(_toConsumableArray(arr).reverse().find(callback));
531
- }
532
- }
533
- return index;
534
- }
535
- }, {
536
- key: "sort",
537
- value: function sort(value1, value2) {
538
- var order = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
539
- var comparator = arguments.length > 3 ? arguments[3] : undefined;
540
- var nullSortOrder = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
541
- var result = this.compare(value1, value2, comparator, order);
542
- var finalSortOrder = order;
543
-
544
- // nullSortOrder == 1 means Excel like sort nulls at bottom
545
- if (this.isEmpty(value1) || this.isEmpty(value2)) {
546
- finalSortOrder = nullSortOrder === 1 ? order : nullSortOrder;
547
- }
548
- return finalSortOrder * result;
549
- }
550
- }, {
551
- key: "compare",
552
- value: function compare(value1, value2, comparator) {
553
- var order = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
554
- var result = -1;
555
- var emptyValue1 = this.isEmpty(value1);
556
- var emptyValue2 = this.isEmpty(value2);
557
- if (emptyValue1 && emptyValue2) result = 0;else if (emptyValue1) result = order;else if (emptyValue2) result = -order;else if (typeof value1 === 'string' && typeof value2 === 'string') result = comparator(value1, value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
558
- return result;
559
- }
560
- }, {
561
- key: "localeComparator",
562
- value: function localeComparator(locale) {
563
- //performance gain using Int.Collator. It is not recommended to use localeCompare against large arrays.
564
- return new Intl.Collator(locale, {
565
- numeric: true
566
- }).compare;
567
- }
568
- }, {
569
- key: "findChildrenByKey",
570
- value: function findChildrenByKey(data, key) {
571
- var _iterator = _createForOfIteratorHelper(data),
572
- _step;
573
- try {
574
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
575
- var item = _step.value;
576
- if (item.key === key) {
577
- return item.children || [];
578
- } else if (item.children) {
579
- var result = this.findChildrenByKey(item.children, key);
580
- if (result.length > 0) {
581
- return result;
582
- }
583
- }
584
- }
585
- } catch (err) {
586
- _iterator.e(err);
587
- } finally {
588
- _iterator.f();
589
- }
590
- return [];
591
- }
592
-
593
- /**
594
- * This function takes mutates and object with a new value given
595
- * a specific field. This will handle deeply nested fields that
596
- * need to be modified or created.
597
- *
598
- * e.g:
599
- * data = {
600
- * nested: {
601
- * foo: "bar"
602
- * }
603
- * }
604
- *
605
- * field = "nested.foo"
606
- * value = "baz"
607
- *
608
- * The function will mutate data to be
609
- * e.g:
610
- * data = {
611
- * nested: {
612
- * foo: "baz"
613
- * }
614
- * }
615
- *
616
- * @param {object} data the object to be modified
617
- * @param {string} field the field in the object to replace
618
- * @param {any} value the value to have replaced in the field
619
- */
620
- }, {
621
- key: "mutateFieldData",
622
- value: function mutateFieldData(data, field, value) {
623
- if (_typeof(data) !== 'object' || typeof field !== 'string') {
624
- // short circuit if there is nothing to resolve
625
- return;
626
- }
627
- var fields = field.split('.');
628
- var obj = data;
629
- for (var i = 0, len = fields.length; i < len; ++i) {
630
- // Check if we are on the last field
631
- if (i + 1 - len === 0) {
632
- obj[fields[i]] = value;
633
- break;
634
- }
635
- if (!obj[fields[i]]) {
636
- obj[fields[i]] = {};
637
- }
638
- obj = obj[fields[i]];
639
- }
640
- }
641
- }]);
642
- return ObjectUtils;
643
- }();
644
-
645
- var lastId = 0;
646
- function UniqueComponentId() {
647
- var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pr_id_';
648
- lastId++;
649
- return "".concat(prefix).concat(lastId);
650
- }
651
-
652
- var DownloadIcon = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
653
- var pti = IconBase.getPTI(inProps);
654
- var _React$useState = React.useState(inProps.id),
655
- _React$useState2 = _slicedToArray(_React$useState, 2),
656
- pathId = _React$useState2[0],
657
- setPathId = _React$useState2[1];
658
- React.useEffect(function () {
659
- if (ObjectUtils.isEmpty(pathId)) {
660
- setPathId(UniqueComponentId('pr_icon_clip_'));
661
- }
662
- }, [pathId]);
663
- return /*#__PURE__*/React.createElement("svg", _extends({
664
- ref: ref,
665
- width: "14",
666
- height: "14",
667
- viewBox: "0 0 14 14",
668
- fill: "none",
669
- xmlns: "http://www.w3.org/2000/svg"
670
- }, pti), /*#__PURE__*/React.createElement("g", {
671
- clipPath: "url(#".concat(pathId, ")")
672
- }, /*#__PURE__*/React.createElement("path", {
673
- fillRule: "evenodd",
674
- clipRule: "evenodd",
675
- d: "M7.0118 10C6.93296 10.0003 6.85484 9.98495 6.78202 9.95477C6.7091 9.92454 6.64297 9.88008 6.58749 9.82399L3.38288 6.62399C3.27675 6.51025 3.21897 6.35982 3.22171 6.20438C3.22446 6.04893 3.28752 5.90063 3.39761 5.7907C3.5077 5.68077 3.65622 5.6178 3.81188 5.61505C3.96755 5.61231 4.1182 5.67001 4.23211 5.77599L6.41125 7.95201V0.6C6.41125 0.44087 6.47456 0.288258 6.58724 0.175736C6.69993 0.063214 6.85276 0 7.01212 0C7.17148 0 7.32431 0.063214 7.43699 0.175736C7.54968 0.288258 7.61298 0.44087 7.61298 0.6V7.95198L9.7921 5.77599C9.90601 5.67001 10.0567 5.61231 10.2123 5.61505C10.368 5.6178 10.5165 5.68077 10.6266 5.7907C10.7367 5.90063 10.7997 6.04893 10.8025 6.20438C10.8052 6.35982 10.7475 6.51025 10.6413 6.62399L7.43671 9.82399C7.38124 9.88008 7.3151 9.92454 7.24219 9.95477C7.16938 9.98495 7.09127 10.0003 7.01244 10C7.01233 10 7.01223 10 7.01212 10C7.01201 10 7.0119 10 7.0118 10ZM13.45 13.3115C13.0749 13.7235 12.5521 13.971 11.9952 14H2.02889C1.75106 13.9887 1.47819 13.9228 1.2259 13.806C0.973606 13.6893 0.74684 13.524 0.558578 13.3197C0.370316 13.1153 0.224251 12.8759 0.128742 12.6152C0.0332333 12.3544 -0.00984502 12.0774 0.00197194 11.8V9.39999C0.00197194 9.24086 0.065277 9.08825 0.177961 8.97572C0.290645 8.8632 0.443477 8.79999 0.602836 8.79999C0.762195 8.79999 0.915027 8.8632 1.02771 8.97572C1.1404 9.08825 1.2037 9.24086 1.2037 9.39999V11.8C1.18301 12.0375 1.25469 12.2739 1.40385 12.4601C1.55302 12.6463 1.76823 12.768 2.00485 12.8H11.9952C12.2318 12.768 12.4471 12.6463 12.5962 12.4601C12.7454 12.2739 12.8171 12.0375 12.7964 11.8V9.39999C12.7964 9.24086 12.8597 9.08825 12.9724 8.97572C13.085 8.8632 13.2379 8.79999 13.3972 8.79999C13.5566 8.79999 13.7094 8.8632 13.8221 8.97572C13.9348 9.08825 13.9981 9.24086 13.9981 9.39999V11.8C14.0221 12.3563 13.8251 12.8995 13.45 13.3115Z",
676
- fill: "currentColor"
677
- })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
678
- id: pathId
679
- }, /*#__PURE__*/React.createElement("rect", {
680
- width: "14",
681
- height: "14",
682
- fill: "white"
683
- }))));
684
- }));
685
- DownloadIcon.displayName = 'DownloadIcon';
686
-
687
- var classes = {
688
- button: 'p-image-preview-indicator',
689
- mask: 'p-image-mask p-component-overlay p-component-overlay-enter',
690
- toolbar: 'p-image-toolbar',
691
- downloadButton: 'p-image-action p-link',
692
- rotateRightButton: 'p-image-action p-link',
693
- rotateLeftButton: 'p-image-action p-link',
694
- zoomOutButton: 'p-image-action p-link',
695
- zoomInButton: 'p-image-action p-link',
696
- closeButton: 'p-image-action p-link',
697
- preview: 'p-image-preview',
698
- icon: 'p-image-preview-icon',
699
- root: function root(_ref) {
700
- var props = _ref.props;
701
- return classNames('p-image p-component', props.className, {
702
- 'p-image-preview-container': props.preview
703
- });
704
- },
705
- transition: 'p-image-preview'
706
- };
707
- var styles = "\n@layer primereact {\n .p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-image-preview-container {\n position: relative;\n display: inline-block;\n }\n \n .p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity .3s;\n }\n \n .p-image-preview-icon {\n font-size: 1.5rem;\n }\n \n .p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n }\n \n .p-image-preview-container > img {\n cursor: pointer;\n }\n \n .p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n z-index: 1;\n }\n \n .p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n \n .p-image-preview {\n transition: transform .15s;\n max-width: 100vw;\n max-height: 100vh;\n width: 100%;\n height: 100%;\n }\n \n .p-image-preview-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-image-preview-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-image-preview-enter-done {\n transform: none;\n }\n \n .p-image-preview-exit {\n opacity: 1;\n }\n \n .p-image-preview-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0.0, 0.2, 1);\n }\n}\n";
708
- var inlineStyles = {
709
- preview: function preview(_ref2) {
710
- var rotateState = _ref2.rotateState,
711
- scaleState = _ref2.scaleState;
712
- return {
713
- transform: 'rotate(' + rotateState + 'deg) scale(' + scaleState + ')'
714
- };
715
- }
716
- };
717
- var ImageBase = ComponentBase.extend({
718
- defaultProps: {
719
- __TYPE: 'Image',
720
- alt: null,
721
- className: null,
722
- closeIcon: null,
723
- crossOrigin: null,
724
- decoding: null,
725
- downloadIcon: null,
726
- downloadable: false,
727
- height: null,
728
- imageClassName: null,
729
- imageStyle: null,
730
- indicatorIcon: null,
731
- loading: null,
732
- onError: null,
733
- onHide: null,
734
- onShow: null,
735
- preview: false,
736
- referrerPolicy: null,
737
- rotateLeftIcon: null,
738
- rotateRightIcon: null,
739
- src: null,
740
- template: null,
741
- useMap: null,
742
- width: null,
743
- zoomInIcon: null,
744
- zoomOutIcon: null,
745
- zoomSrc: null,
746
- children: undefined,
747
- closeOnEscape: true
748
- },
749
- css: {
750
- classes: classes,
751
- styles: styles,
752
- inlineStyles: inlineStyles
753
- }
754
- });
755
-
756
- var usePrevious = function usePrevious(newValue) {
757
- var ref = React.useRef(undefined);
758
- React.useEffect(function () {
759
- ref.current = newValue;
760
- });
761
- return ref.current;
762
- };
763
-
764
- /* eslint-disable */
765
- var useUnmountEffect = function useUnmountEffect(fn) {
766
- return React.useEffect(function () {
767
- return fn;
768
- }, []);
769
- };
770
- /* eslint-enable */
771
-
772
- /* eslint-disable */
773
- var useEventListener = function useEventListener(_ref) {
774
- var _ref$target = _ref.target,
775
- target = _ref$target === void 0 ? 'document' : _ref$target,
776
- type = _ref.type,
777
- listener = _ref.listener,
778
- options = _ref.options,
779
- _ref$when = _ref.when,
780
- when = _ref$when === void 0 ? true : _ref$when;
781
- var targetRef = React.useRef(null);
782
- var listenerRef = React.useRef(null);
783
- var prevListener = usePrevious(listener);
784
- var prevOptions = usePrevious(options);
785
- var bind = function bind() {
786
- var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
787
- if (ObjectUtils$1.isNotEmpty(bindOptions.target)) {
788
- unbind();
789
- (bindOptions.when || when) && (targetRef.current = DomHandler.getTargetElement(bindOptions.target));
790
- }
791
- if (!listenerRef.current && targetRef.current) {
792
- listenerRef.current = function (event) {
793
- return listener && listener(event);
794
- };
795
- targetRef.current.addEventListener(type, listenerRef.current, options);
796
- }
797
- };
798
- var unbind = function unbind() {
799
- if (listenerRef.current) {
800
- targetRef.current.removeEventListener(type, listenerRef.current, options);
801
- listenerRef.current = null;
802
- }
803
- };
804
- React.useEffect(function () {
805
- if (when) {
806
- targetRef.current = DomHandler.getTargetElement(target);
807
- } else {
808
- unbind();
809
- targetRef.current = null;
810
- }
811
- }, [target, when]);
812
- React.useEffect(function () {
813
- // to properly compare functions we can implicitly converting the function to it's body's text as a String
814
- if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
815
- unbind();
816
- when && bind();
817
- }
818
- }, [listener, options, when]);
819
- useUnmountEffect(function () {
820
- unbind();
821
- });
822
- return [bind, unbind];
823
- };
824
- /* eslint-enable */
825
-
826
- var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
827
- var handleEsc = function handleEsc(event) {
828
- if (event.key === 'Esc' || event.key === 'Escape') {
829
- event.stopImmediatePropagation();
830
- callback(event);
831
- }
832
- return;
833
- };
834
- var _useEventListener = useEventListener({
835
- type: 'keydown',
836
- listener: handleEsc
837
- }),
838
- _useEventListener2 = _slicedToArray(_useEventListener, 2),
839
- bindKeyDownListener = _useEventListener2[0],
840
- unbindKeyDownListener = _useEventListener2[1];
841
- React.useEffect(function () {
842
- if (!condition) {
843
- return;
844
- }
845
- if (!ref.current) {
846
- return;
847
- }
848
- bindKeyDownListener();
849
- return function () {
850
- unbindKeyDownListener();
851
- };
852
- });
853
- return [ref, callback];
854
- };
855
-
856
- 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; }
857
- 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; }
858
- var Image = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
859
- var context = React.useContext(PrimeReactContext);
860
- var props = ImageBase.getProps(inProps, context);
861
- var _React$useState = React.useState(false),
862
- _React$useState2 = _slicedToArray(_React$useState, 2),
863
- maskVisibleState = _React$useState2[0],
864
- setMaskVisibleState = _React$useState2[1];
865
- var _React$useState3 = React.useState(false),
866
- _React$useState4 = _slicedToArray(_React$useState3, 2),
867
- previewVisibleState = _React$useState4[0],
868
- setPreviewVisibleState = _React$useState4[1];
869
- var _React$useState5 = React.useState(0),
870
- _React$useState6 = _slicedToArray(_React$useState5, 2),
871
- rotateState = _React$useState6[0],
872
- setRotateState = _React$useState6[1];
873
- var _React$useState7 = React.useState(1),
874
- _React$useState8 = _slicedToArray(_React$useState7, 2),
875
- scaleState = _React$useState8[0],
876
- setScaleState = _React$useState8[1];
877
- var elementRef = React.useRef(null);
878
- var imageRef = React.useRef(null);
879
- var maskRef = React.useRef(null);
880
- var previewRef = React.useRef(null);
881
- var previewClick = React.useRef(false);
882
- useOnEscapeKey(maskRef, props.closeOnEscape, function () {
883
- hide();
884
- });
885
- var _ImageBase$setMetaDat = ImageBase.setMetaData({
886
- props: props,
887
- state: {
888
- maskVisible: maskVisibleState,
889
- previewVisible: previewVisibleState,
890
- rotate: rotateState,
891
- scale: scaleState
892
- }
893
- }),
894
- ptm = _ImageBase$setMetaDat.ptm,
895
- cx = _ImageBase$setMetaDat.cx,
896
- sx = _ImageBase$setMetaDat.sx,
897
- isUnstyled = _ImageBase$setMetaDat.isUnstyled;
898
- useHandleStyle(ImageBase.css.styles, isUnstyled, {
899
- name: 'image'
900
- });
901
- var show = function show() {
902
- if (props.preview) {
903
- setMaskVisibleState(true);
904
- DomHandler.addClass(document.body, 'p-overflow-hidden');
905
- document.body.style.setProperty('--scrollbar-width', DomHandler.calculateScrollbarWidth() + 'px');
906
- setTimeout(function () {
907
- setPreviewVisibleState(true);
908
- }, 25);
909
- }
910
- };
911
- var hide = function hide() {
912
- if (!previewClick.current) {
913
- setPreviewVisibleState(false);
914
- DomHandler.removeClass(document.body, 'p-overflow-hidden');
915
- document.body.style.removeProperty('--scrollbar-width');
916
- setRotateState(0);
917
- setScaleState(1);
918
- }
919
- previewClick.current = false;
920
- };
921
- var onPreviewImageClick = function onPreviewImageClick() {
922
- previewClick.current = true;
923
- };
924
- var onDownload = function onDownload() {
925
- var name = props.alt,
926
- src = props.src;
927
- DomHandler.saveAs({
928
- name: name,
929
- src: src
930
- });
931
- previewClick.current = true;
932
- };
933
- var rotateRight = function rotateRight() {
934
- setRotateState(function (prevRotate) {
935
- return prevRotate + 90;
936
- });
937
- previewClick.current = true;
938
- };
939
- var rotateLeft = function rotateLeft() {
940
- setRotateState(function (prevRotate) {
941
- return prevRotate - 90;
942
- });
943
- previewClick.current = true;
944
- };
945
- var zoomIn = function zoomIn() {
946
- setScaleState(function (prevScale) {
947
- return prevScale + 0.1;
948
- });
949
- previewClick.current = true;
950
- };
951
- var zoomOut = function zoomOut() {
952
- setScaleState(function (prevScale) {
953
- return prevScale - 0.1;
954
- });
955
- previewClick.current = true;
956
- };
957
- var onEntering = function onEntering() {
958
- ZIndexUtils.set('modal', maskRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['modal'] || PrimeReact.zIndex['modal']);
959
- };
960
- var onEntered = function onEntered() {
961
- props.onShow && props.onShow();
962
- };
963
- var onExit = function onExit() {
964
- DomHandler.addClass(maskRef.current, 'p-component-overlay-leave');
965
- };
966
- var onExiting = function onExiting() {
967
- props.onHide && props.onHide();
968
- };
969
- var onExited = function onExited() {
970
- ZIndexUtils.clear(maskRef.current);
971
- setMaskVisibleState(false);
972
- };
973
- useUnmountEffect$1(function () {
974
- maskRef.current && ZIndexUtils.clear(maskRef.current);
975
- });
976
- var createPreview = function createPreview() {
977
- var buttonProps = mergeProps({
978
- className: cx('button'),
979
- onClick: show
980
- }, ptm('button'));
981
- if (props.preview) {
982
- return /*#__PURE__*/React.createElement("div", buttonProps, content);
983
- }
984
- return null;
985
- };
986
- var createElement = function createElement() {
987
- var downloadable = props.downloadable,
988
- alt = props.alt,
989
- crossOrigin = props.crossOrigin,
990
- referrerPolicy = props.referrerPolicy,
991
- useMap = props.useMap,
992
- loading = props.loading;
993
- var zoomOutDisabled = scaleState <= 0.5;
994
- var zoomInDisabled = scaleState >= 1.5;
995
- var downloadIconProps = mergeProps(ptm('downloadIcon'));
996
- var rotateRightIconProps = mergeProps(ptm('rotateRightIcon'));
997
- var rotateLeftIconProps = mergeProps(ptm('rotateLeftIcon'));
998
- var zoomOutIconProps = mergeProps(ptm('zoomOutIcon'));
999
- var zoomInIconProps = mergeProps(ptm('zoomInIcon'));
1000
- var closeIconProps = mergeProps(ptm('closeIcon'));
1001
- var downloadIcon = IconUtils.getJSXIcon(props.downloadIcon || /*#__PURE__*/React.createElement(DownloadIcon, null), _objectSpread({}, downloadIconProps), {
1002
- props: props
1003
- });
1004
- var rotateRightIcon = IconUtils.getJSXIcon(props.rotateRightIcon || /*#__PURE__*/React.createElement(RefreshIcon, null), _objectSpread({}, rotateRightIconProps), {
1005
- props: props
1006
- });
1007
- var rotateLeftIcon = IconUtils.getJSXIcon(props.rotateLeftIcon || /*#__PURE__*/React.createElement(UndoIcon, null), _objectSpread({}, rotateLeftIconProps), {
1008
- props: props
1009
- });
1010
- var zoomOutIcon = IconUtils.getJSXIcon(props.zoomOutIcon || /*#__PURE__*/React.createElement(SearchMinusIcon, null), _objectSpread({}, zoomOutIconProps), {
1011
- props: props
1012
- });
1013
- var zoomInIcon = IconUtils.getJSXIcon(props.zoomInIcon || /*#__PURE__*/React.createElement(SearchPlusIcon, null), _objectSpread({}, zoomInIconProps), {
1014
- props: props
1015
- });
1016
- var closeIcon = IconUtils.getJSXIcon(props.closeIcon || /*#__PURE__*/React.createElement(TimesIcon, null), _objectSpread({}, closeIconProps), {
1017
- props: props
1018
- });
1019
- var maskProps = mergeProps({
1020
- ref: maskRef,
1021
- className: cx('mask'),
1022
- onPointerUp: hide
1023
- }, ptm('mask'));
1024
- var toolbarProps = mergeProps({
1025
- className: cx('toolbar')
1026
- }, ptm('toolbar'));
1027
- var downloadButtonProps = mergeProps({
1028
- className: cx('downloadButton'),
1029
- onPointerUp: onDownload,
1030
- type: 'button'
1031
- }, ptm('downloadButton'));
1032
- var rotateRightButtonProps = mergeProps({
1033
- className: cx('rotateRightButton'),
1034
- onPointerUp: rotateRight,
1035
- type: 'button'
1036
- }, ptm('rotateRightButton'));
1037
- var rotateLeftButtonProps = mergeProps({
1038
- className: cx('rotateLeftButton'),
1039
- onPointerUp: rotateLeft,
1040
- type: 'button'
1041
- }, ptm('rotateLeftButton'));
1042
- var zoomOutButtonProps = mergeProps({
1043
- className: classNames(cx('zoomOutButton'), {
1044
- 'p-disabled': zoomOutDisabled
1045
- }),
1046
- style: {
1047
- pointerEvents: 'auto'
1048
- },
1049
- onPointerUp: zoomOut,
1050
- type: 'button',
1051
- disabled: zoomOutDisabled
1052
- }, ptm('zoomOutButton'));
1053
- var zoomInButtonProps = mergeProps({
1054
- className: classNames(cx('zoomInButton'), {
1055
- 'p-disabled': zoomInDisabled
1056
- }),
1057
- style: {
1058
- pointerEvents: 'auto'
1059
- },
1060
- onPointerUp: zoomIn,
1061
- type: 'button',
1062
- disabled: zoomInDisabled
1063
- }, ptm('zoomInButton'));
1064
- var closeButtonProps = mergeProps({
1065
- className: cx('closeButton'),
1066
- type: 'button',
1067
- 'aria-label': localeOption('close')
1068
- }, ptm('closeButton'));
1069
- var previewProps = mergeProps({
1070
- src: props.zoomSrc || props.src,
1071
- className: cx('preview'),
1072
- style: sx('preview', {
1073
- rotateState: rotateState,
1074
- scaleState: scaleState
1075
- }),
1076
- onPointerUp: onPreviewImageClick,
1077
- crossOrigin: crossOrigin,
1078
- referrerPolicy: referrerPolicy,
1079
- useMap: useMap,
1080
- loading: loading
1081
- }, ptm('preview'));
1082
- var previewContainerProps = mergeProps({
1083
- ref: previewRef
1084
- }, ptm('previewContainer'));
1085
- var transitionProps = mergeProps({
1086
- classNames: cx('transition'),
1087
- "in": previewVisibleState,
1088
- timeout: {
1089
- enter: 150,
1090
- exit: 150
1091
- },
1092
- unmountOnExit: true,
1093
- onEntering: onEntering,
1094
- onEntered: onEntered,
1095
- onExit: onExit,
1096
- onExiting: onExiting,
1097
- onExited: onExited
1098
- }, ptm('transition'));
1099
- return /*#__PURE__*/React.createElement("div", maskProps, /*#__PURE__*/React.createElement("div", toolbarProps, downloadable && /*#__PURE__*/React.createElement("button", downloadButtonProps, downloadIcon), /*#__PURE__*/React.createElement("button", rotateRightButtonProps, rotateRightIcon), /*#__PURE__*/React.createElement("button", rotateLeftButtonProps, rotateLeftIcon), /*#__PURE__*/React.createElement("button", zoomOutButtonProps, zoomOutIcon), /*#__PURE__*/React.createElement("button", zoomInButtonProps, zoomInIcon), /*#__PURE__*/React.createElement("button", closeButtonProps, closeIcon)), /*#__PURE__*/React.createElement(CSSTransition, _extends({
1100
- nodeRef: previewRef
1101
- }, transitionProps), /*#__PURE__*/React.createElement("div", previewContainerProps, /*#__PURE__*/React.createElement("img", _extends({
1102
- alt: alt
1103
- }, previewProps)))));
1104
- };
1105
- React.useImperativeHandle(ref, function () {
1106
- return {
1107
- props: props,
1108
- show: show,
1109
- hide: hide,
1110
- getElement: function getElement() {
1111
- return elementRef.current;
1112
- },
1113
- getImage: function getImage() {
1114
- return imageRef.current;
1115
- }
1116
- };
1117
- });
1118
- var src = props.src,
1119
- alt = props.alt,
1120
- width = props.width,
1121
- height = props.height,
1122
- crossOrigin = props.crossOrigin,
1123
- referrerPolicy = props.referrerPolicy,
1124
- useMap = props.useMap,
1125
- loading = props.loading;
1126
- var element = createElement();
1127
- var iconProp = mergeProps({
1128
- className: cx('icon')
1129
- }, ptm('icon'));
1130
- var icon = props.indicatorIcon || /*#__PURE__*/React.createElement(EyeIcon, iconProp);
1131
- var indicatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, iconProp), {
1132
- props: props
1133
- });
1134
- var content = props.template ? ObjectUtils$1.getJSXElement(props.template, props) : indicatorIcon;
1135
- var preview = createPreview();
1136
- var imageProp = mergeProps({
1137
- ref: imageRef,
1138
- src: src,
1139
- className: props.imageClassName,
1140
- width: width,
1141
- height: height,
1142
- crossOrigin: crossOrigin,
1143
- referrerPolicy: referrerPolicy,
1144
- useMap: useMap,
1145
- loading: loading,
1146
- style: props.imageStyle,
1147
- onError: props.onError
1148
- }, ptm('image'));
1149
- var image = props.src && /*#__PURE__*/React.createElement("img", _extends({}, imageProp, {
1150
- alt: alt
1151
- }));
1152
- var rootProps = mergeProps({
1153
- ref: elementRef,
1154
- className: cx('root')
1155
- }, ImageBase.getOtherProps(props), ptm('root'));
1156
- return /*#__PURE__*/React.createElement("span", rootProps, image, preview, maskVisibleState && /*#__PURE__*/React.createElement(Portal, {
1157
- element: element,
1158
- appendTo: document.body
1159
- }));
1160
- }));
1161
- Image.displayName = 'Image';
1162
-
1163
- export { Image };