primereact 6.5.0 → 7.0.0-rc.1

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 (686) hide show
  1. package/accordion/accordion.cjs.js +2 -0
  2. package/accordion/accordion.cjs.min.js +1 -1
  3. package/accordion/accordion.esm.js +2 -0
  4. package/accordion/accordion.esm.min.js +1 -1
  5. package/accordion/accordion.js +2 -0
  6. package/accordion/accordion.min.js +1 -1
  7. package/api/api.cjs.js +308 -10
  8. package/api/api.cjs.min.js +1 -1
  9. package/api/api.d.ts +61 -1
  10. package/api/api.esm.js +305 -11
  11. package/api/api.esm.min.js +1 -1
  12. package/api/api.js +308 -12
  13. package/api/api.min.js +1 -1
  14. package/autocomplete/autocomplete.cjs.js +3 -1
  15. package/autocomplete/autocomplete.cjs.min.js +1 -1
  16. package/autocomplete/autocomplete.esm.js +3 -1
  17. package/autocomplete/autocomplete.esm.min.js +1 -1
  18. package/autocomplete/autocomplete.js +3 -1
  19. package/autocomplete/autocomplete.min.js +1 -1
  20. package/avatar/avatar.cjs.js +2 -0
  21. package/avatar/avatar.cjs.min.js +1 -1
  22. package/avatar/avatar.esm.js +2 -0
  23. package/avatar/avatar.esm.min.js +1 -1
  24. package/avatar/avatar.js +2 -0
  25. package/avatar/avatar.min.js +1 -1
  26. package/avatargroup/avatargroup.cjs.js +2 -0
  27. package/avatargroup/avatargroup.cjs.min.js +1 -1
  28. package/avatargroup/avatargroup.esm.js +2 -0
  29. package/avatargroup/avatargroup.esm.min.js +1 -1
  30. package/avatargroup/avatargroup.js +2 -0
  31. package/avatargroup/avatargroup.min.js +1 -1
  32. package/badge/badge.cjs.js +2 -0
  33. package/badge/badge.cjs.min.js +1 -1
  34. package/badge/badge.esm.js +2 -0
  35. package/badge/badge.esm.min.js +1 -1
  36. package/badge/badge.js +2 -0
  37. package/badge/badge.min.js +1 -1
  38. package/blockui/blockui.cjs.js +9 -15
  39. package/blockui/blockui.cjs.min.js +1 -1
  40. package/blockui/blockui.esm.js +9 -15
  41. package/blockui/blockui.esm.min.js +1 -1
  42. package/blockui/blockui.js +9 -15
  43. package/blockui/blockui.min.css +1 -1
  44. package/blockui/blockui.min.js +1 -1
  45. package/breadcrumb/breadcrumb.cjs.js +2 -0
  46. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  47. package/breadcrumb/breadcrumb.esm.js +2 -0
  48. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  49. package/breadcrumb/breadcrumb.js +2 -0
  50. package/breadcrumb/breadcrumb.min.css +1 -1
  51. package/breadcrumb/breadcrumb.min.js +1 -1
  52. package/button/button.cjs.js +2 -0
  53. package/button/button.cjs.min.js +1 -1
  54. package/button/button.esm.js +2 -0
  55. package/button/button.esm.min.js +1 -1
  56. package/button/button.js +2 -0
  57. package/button/button.min.js +1 -1
  58. package/calendar/calendar.cjs.js +85 -67
  59. package/calendar/calendar.cjs.min.js +1 -1
  60. package/calendar/calendar.esm.js +85 -67
  61. package/calendar/calendar.esm.min.js +1 -1
  62. package/calendar/calendar.js +85 -67
  63. package/calendar/calendar.min.js +1 -1
  64. package/captcha/captcha.cjs.js +2 -0
  65. package/captcha/captcha.cjs.min.js +1 -1
  66. package/captcha/captcha.esm.js +2 -0
  67. package/captcha/captcha.esm.min.js +1 -1
  68. package/captcha/captcha.js +2 -0
  69. package/captcha/captcha.min.js +1 -1
  70. package/card/card.cjs.js +2 -0
  71. package/card/card.cjs.min.js +1 -1
  72. package/card/card.esm.js +2 -0
  73. package/card/card.esm.min.js +1 -1
  74. package/card/card.js +2 -0
  75. package/card/card.min.js +1 -1
  76. package/carousel/carousel.cjs.js +2 -0
  77. package/carousel/carousel.cjs.min.js +1 -1
  78. package/carousel/carousel.esm.js +3 -1
  79. package/carousel/carousel.esm.min.js +1 -1
  80. package/carousel/carousel.js +2 -0
  81. package/carousel/carousel.min.js +1 -1
  82. package/cascadeselect/cascadeselect.cjs.js +2 -0
  83. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  84. package/cascadeselect/cascadeselect.esm.js +2 -0
  85. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  86. package/cascadeselect/cascadeselect.js +2 -0
  87. package/cascadeselect/cascadeselect.min.js +1 -1
  88. package/chart/chart.cjs.js +2 -0
  89. package/chart/chart.cjs.min.js +1 -1
  90. package/chart/chart.esm.js +2 -0
  91. package/chart/chart.esm.min.js +1 -1
  92. package/chart/chart.js +2 -0
  93. package/chart/chart.min.js +1 -1
  94. package/checkbox/checkbox.cjs.js +19 -9
  95. package/checkbox/checkbox.cjs.min.js +1 -1
  96. package/checkbox/checkbox.d.ts +3 -1
  97. package/checkbox/checkbox.esm.js +19 -9
  98. package/checkbox/checkbox.esm.min.js +1 -1
  99. package/checkbox/checkbox.js +19 -9
  100. package/checkbox/checkbox.min.css +1 -1
  101. package/checkbox/checkbox.min.js +1 -1
  102. package/chip/chip.cjs.js +2 -0
  103. package/chip/chip.cjs.min.js +1 -1
  104. package/chip/chip.esm.js +2 -0
  105. package/chip/chip.esm.min.js +1 -1
  106. package/chip/chip.js +2 -0
  107. package/chip/chip.min.js +1 -1
  108. package/chips/chips.cjs.js +2 -0
  109. package/chips/chips.cjs.min.js +1 -1
  110. package/chips/chips.esm.js +2 -0
  111. package/chips/chips.esm.min.js +1 -1
  112. package/chips/chips.js +2 -0
  113. package/chips/chips.min.js +1 -1
  114. package/colorpicker/colorpicker.cjs.js +2 -0
  115. package/colorpicker/colorpicker.cjs.min.js +1 -1
  116. package/colorpicker/colorpicker.esm.js +2 -0
  117. package/colorpicker/colorpicker.esm.min.js +1 -1
  118. package/colorpicker/colorpicker.js +2 -0
  119. package/colorpicker/colorpicker.min.js +1 -1
  120. package/column/column.cjs.js +34 -9
  121. package/column/column.cjs.min.js +1 -1
  122. package/column/column.d.ts +146 -13
  123. package/column/column.esm.js +34 -9
  124. package/column/column.esm.min.js +1 -1
  125. package/column/column.js +34 -9
  126. package/column/column.min.js +1 -1
  127. package/columngroup/columngroup.cjs.js +2 -0
  128. package/columngroup/columngroup.cjs.min.js +1 -1
  129. package/columngroup/columngroup.esm.js +2 -0
  130. package/columngroup/columngroup.esm.min.js +1 -1
  131. package/columngroup/columngroup.js +2 -0
  132. package/columngroup/columngroup.min.js +1 -1
  133. package/common/common.min.css +1 -1
  134. package/confirmdialog/confirmdialog.cjs.js +2 -0
  135. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  136. package/confirmdialog/confirmdialog.esm.js +2 -0
  137. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  138. package/confirmdialog/confirmdialog.js +2 -0
  139. package/confirmdialog/confirmdialog.min.js +1 -1
  140. package/confirmpopup/confirmpopup.cjs.js +2 -0
  141. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  142. package/confirmpopup/confirmpopup.esm.js +2 -0
  143. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  144. package/confirmpopup/confirmpopup.js +2 -0
  145. package/confirmpopup/confirmpopup.min.js +1 -1
  146. package/contextmenu/contextmenu.cjs.js +2 -0
  147. package/contextmenu/contextmenu.cjs.min.js +1 -1
  148. package/contextmenu/contextmenu.esm.js +3 -1
  149. package/contextmenu/contextmenu.esm.min.js +1 -1
  150. package/contextmenu/contextmenu.js +2 -0
  151. package/contextmenu/contextmenu.min.js +1 -1
  152. package/core/core.cjs.js +351 -669
  153. package/core/core.cjs.min.js +1 -1
  154. package/core/core.esm.js +347 -665
  155. package/core/core.esm.min.js +1 -1
  156. package/core/core.js +352 -671
  157. package/core/core.min.js +1 -1
  158. package/csstransition/csstransition.cjs.js +2 -0
  159. package/csstransition/csstransition.cjs.min.js +1 -1
  160. package/csstransition/csstransition.esm.js +2 -0
  161. package/csstransition/csstransition.esm.min.js +1 -1
  162. package/csstransition/csstransition.js +2 -0
  163. package/csstransition/csstransition.min.js +1 -1
  164. package/datascroller/datascroller.cjs.js +8 -1
  165. package/datascroller/datascroller.cjs.min.js +1 -1
  166. package/datascroller/datascroller.esm.js +8 -1
  167. package/datascroller/datascroller.esm.min.js +1 -1
  168. package/datascroller/datascroller.js +8 -1
  169. package/datascroller/datascroller.min.js +1 -1
  170. package/datatable/datatable.cjs.js +4803 -3320
  171. package/datatable/datatable.cjs.min.js +1 -1
  172. package/datatable/datatable.d.ts +97 -28
  173. package/datatable/datatable.esm.js +4803 -3321
  174. package/datatable/datatable.esm.min.js +1 -1
  175. package/datatable/datatable.js +4801 -3322
  176. package/datatable/datatable.min.css +1 -1
  177. package/datatable/datatable.min.js +1 -1
  178. package/dataview/dataview.cjs.js +4 -2
  179. package/dataview/dataview.cjs.min.js +1 -1
  180. package/dataview/dataview.esm.js +4 -2
  181. package/dataview/dataview.esm.min.js +1 -1
  182. package/dataview/dataview.js +4 -2
  183. package/dataview/dataview.min.js +1 -1
  184. package/deferredcontent/deferredcontent.cjs.js +2 -0
  185. package/deferredcontent/deferredcontent.cjs.min.js +1 -1
  186. package/deferredcontent/deferredcontent.esm.js +2 -0
  187. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  188. package/deferredcontent/deferredcontent.js +2 -0
  189. package/deferredcontent/deferredcontent.min.js +1 -1
  190. package/dialog/dialog.cjs.js +12 -1
  191. package/dialog/dialog.cjs.min.js +1 -1
  192. package/dialog/dialog.esm.js +12 -1
  193. package/dialog/dialog.esm.min.js +1 -1
  194. package/dialog/dialog.js +12 -1
  195. package/dialog/dialog.min.js +1 -1
  196. package/divider/divider.cjs.js +2 -0
  197. package/divider/divider.cjs.min.js +1 -1
  198. package/divider/divider.esm.js +2 -0
  199. package/divider/divider.esm.min.js +1 -1
  200. package/divider/divider.js +2 -0
  201. package/divider/divider.min.js +1 -1
  202. package/dock/dock.cjs.js +5 -1
  203. package/dock/dock.cjs.min.js +1 -1
  204. package/dock/dock.esm.js +5 -1
  205. package/dock/dock.esm.min.js +1 -1
  206. package/dock/dock.js +5 -1
  207. package/dock/dock.min.css +1 -1
  208. package/dock/dock.min.js +1 -1
  209. package/dropdown/dropdown.cjs.js +15 -11
  210. package/dropdown/dropdown.cjs.min.js +1 -1
  211. package/dropdown/dropdown.esm.js +17 -13
  212. package/dropdown/dropdown.esm.min.js +1 -1
  213. package/dropdown/dropdown.js +15 -11
  214. package/dropdown/dropdown.min.js +1 -1
  215. package/editor/editor.cjs.js +2 -0
  216. package/editor/editor.cjs.min.js +1 -1
  217. package/editor/editor.esm.js +2 -0
  218. package/editor/editor.esm.min.js +1 -1
  219. package/editor/editor.js +2 -0
  220. package/editor/editor.min.js +1 -1
  221. package/fieldset/fieldset.cjs.js +2 -0
  222. package/fieldset/fieldset.cjs.min.js +1 -1
  223. package/fieldset/fieldset.esm.js +2 -0
  224. package/fieldset/fieldset.esm.min.js +1 -1
  225. package/fieldset/fieldset.js +2 -0
  226. package/fieldset/fieldset.min.js +1 -1
  227. package/fileupload/fileupload.cjs.js +2 -0
  228. package/fileupload/fileupload.cjs.min.js +1 -1
  229. package/fileupload/fileupload.esm.js +2 -0
  230. package/fileupload/fileupload.esm.min.js +1 -1
  231. package/fileupload/fileupload.js +2 -0
  232. package/fileupload/fileupload.min.js +1 -1
  233. package/fullcalendar/fullcalendar.cjs.js +2 -0
  234. package/fullcalendar/fullcalendar.cjs.min.js +1 -1
  235. package/fullcalendar/fullcalendar.esm.js +2 -0
  236. package/fullcalendar/fullcalendar.esm.min.js +1 -1
  237. package/fullcalendar/fullcalendar.js +2 -0
  238. package/fullcalendar/fullcalendar.min.js +1 -1
  239. package/galleria/galleria.cjs.js +25 -5
  240. package/galleria/galleria.cjs.min.js +1 -1
  241. package/galleria/galleria.esm.js +25 -5
  242. package/galleria/galleria.esm.min.js +1 -1
  243. package/galleria/galleria.js +25 -5
  244. package/galleria/galleria.min.css +1 -1
  245. package/galleria/galleria.min.js +1 -1
  246. package/gmap/gmap.cjs.js +2 -0
  247. package/gmap/gmap.cjs.min.js +1 -1
  248. package/gmap/gmap.esm.js +2 -0
  249. package/gmap/gmap.esm.min.js +1 -1
  250. package/gmap/gmap.js +2 -0
  251. package/gmap/gmap.min.js +1 -1
  252. package/image/image.cjs.js +397 -0
  253. package/image/image.cjs.min.js +1 -0
  254. package/image/image.d.ts +18 -0
  255. package/image/image.esm.js +389 -0
  256. package/image/image.esm.min.js +1 -0
  257. package/image/image.js +400 -0
  258. package/image/image.min.css +1 -0
  259. package/image/image.min.js +1 -0
  260. package/image/package.json +6 -0
  261. package/inplace/inplace.cjs.js +2 -0
  262. package/inplace/inplace.cjs.min.js +1 -1
  263. package/inplace/inplace.esm.js +2 -0
  264. package/inplace/inplace.esm.min.js +1 -1
  265. package/inplace/inplace.js +2 -0
  266. package/inplace/inplace.min.js +1 -1
  267. package/inputmask/inputmask.cjs.js +2 -0
  268. package/inputmask/inputmask.cjs.min.js +1 -1
  269. package/inputmask/inputmask.esm.js +2 -0
  270. package/inputmask/inputmask.esm.min.js +1 -1
  271. package/inputmask/inputmask.js +2 -0
  272. package/inputmask/inputmask.min.js +1 -1
  273. package/inputnumber/inputnumber.cjs.js +177 -62
  274. package/inputnumber/inputnumber.cjs.min.js +1 -1
  275. package/inputnumber/inputnumber.d.ts +1 -0
  276. package/inputnumber/inputnumber.esm.js +177 -62
  277. package/inputnumber/inputnumber.esm.min.js +1 -1
  278. package/inputnumber/inputnumber.js +177 -62
  279. package/inputnumber/inputnumber.min.js +1 -1
  280. package/inputswitch/inputswitch.cjs.js +16 -6
  281. package/inputswitch/inputswitch.cjs.min.js +1 -1
  282. package/inputswitch/inputswitch.d.ts +3 -1
  283. package/inputswitch/inputswitch.esm.js +16 -6
  284. package/inputswitch/inputswitch.esm.min.js +1 -1
  285. package/inputswitch/inputswitch.js +16 -6
  286. package/inputswitch/inputswitch.min.js +1 -1
  287. package/inputtext/inputtext.cjs.js +2 -0
  288. package/inputtext/inputtext.cjs.min.js +1 -1
  289. package/inputtext/inputtext.esm.js +2 -0
  290. package/inputtext/inputtext.esm.min.js +1 -1
  291. package/inputtext/inputtext.js +2 -0
  292. package/inputtext/inputtext.min.js +1 -1
  293. package/inputtextarea/inputtextarea.cjs.js +2 -0
  294. package/inputtextarea/inputtextarea.cjs.min.js +1 -1
  295. package/inputtextarea/inputtextarea.esm.js +2 -0
  296. package/inputtextarea/inputtextarea.esm.min.js +1 -1
  297. package/inputtextarea/inputtextarea.js +2 -0
  298. package/inputtextarea/inputtextarea.min.js +1 -1
  299. package/knob/knob.cjs.js +2 -0
  300. package/knob/knob.cjs.min.js +1 -1
  301. package/knob/knob.esm.js +2 -0
  302. package/knob/knob.esm.min.js +1 -1
  303. package/knob/knob.js +2 -0
  304. package/knob/knob.min.js +1 -1
  305. package/listbox/listbox.cjs.js +6 -3
  306. package/listbox/listbox.cjs.min.js +1 -1
  307. package/listbox/listbox.esm.js +7 -4
  308. package/listbox/listbox.esm.min.js +1 -1
  309. package/listbox/listbox.js +7 -5
  310. package/listbox/listbox.min.js +1 -1
  311. package/megamenu/megamenu.cjs.js +2 -0
  312. package/megamenu/megamenu.cjs.min.js +1 -1
  313. package/megamenu/megamenu.esm.js +2 -0
  314. package/megamenu/megamenu.esm.min.js +1 -1
  315. package/megamenu/megamenu.js +2 -0
  316. package/megamenu/megamenu.min.js +1 -1
  317. package/mention/mention.cjs.js +2 -0
  318. package/mention/mention.cjs.min.js +1 -1
  319. package/mention/mention.esm.js +2 -0
  320. package/mention/mention.esm.min.js +1 -1
  321. package/mention/mention.js +2 -0
  322. package/mention/mention.min.js +1 -1
  323. package/menu/menu.cjs.js +2 -0
  324. package/menu/menu.cjs.min.js +1 -1
  325. package/menu/menu.d.ts +1 -1
  326. package/menu/menu.esm.js +2 -0
  327. package/menu/menu.esm.min.js +1 -1
  328. package/menu/menu.js +2 -0
  329. package/menu/menu.min.js +1 -1
  330. package/menubar/menubar.cjs.js +2 -0
  331. package/menubar/menubar.cjs.min.js +1 -1
  332. package/menubar/menubar.esm.js +2 -0
  333. package/menubar/menubar.esm.min.js +1 -1
  334. package/menubar/menubar.js +2 -0
  335. package/menubar/menubar.min.js +1 -1
  336. package/message/message.cjs.js +2 -0
  337. package/message/message.cjs.min.js +1 -1
  338. package/message/message.esm.js +2 -0
  339. package/message/message.esm.min.js +1 -1
  340. package/message/message.js +2 -0
  341. package/message/message.min.js +1 -1
  342. package/messages/messages.cjs.js +2 -0
  343. package/messages/messages.cjs.min.js +1 -1
  344. package/messages/messages.esm.js +2 -0
  345. package/messages/messages.esm.min.js +1 -1
  346. package/messages/messages.js +2 -0
  347. package/messages/messages.min.js +1 -1
  348. package/multiselect/multiselect.cjs.js +22 -12
  349. package/multiselect/multiselect.cjs.min.js +1 -1
  350. package/multiselect/multiselect.d.ts +3 -1
  351. package/multiselect/multiselect.esm.js +24 -14
  352. package/multiselect/multiselect.esm.min.js +1 -1
  353. package/multiselect/multiselect.js +22 -12
  354. package/multiselect/multiselect.min.js +1 -1
  355. package/multistatecheckbox/multistatecheckbox.cjs.js +2 -0
  356. package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
  357. package/multistatecheckbox/multistatecheckbox.esm.js +2 -0
  358. package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
  359. package/multistatecheckbox/multistatecheckbox.js +2 -0
  360. package/multistatecheckbox/multistatecheckbox.min.js +1 -1
  361. package/orderlist/orderlist.cjs.js +2 -0
  362. package/orderlist/orderlist.cjs.min.js +1 -1
  363. package/orderlist/orderlist.esm.js +2 -0
  364. package/orderlist/orderlist.esm.min.js +1 -1
  365. package/orderlist/orderlist.js +2 -0
  366. package/orderlist/orderlist.min.js +1 -1
  367. package/organizationchart/organizationchart.cjs.js +2 -0
  368. package/organizationchart/organizationchart.cjs.min.js +1 -1
  369. package/organizationchart/organizationchart.esm.js +2 -0
  370. package/organizationchart/organizationchart.esm.min.js +1 -1
  371. package/organizationchart/organizationchart.js +2 -0
  372. package/organizationchart/organizationchart.min.js +1 -1
  373. package/overlaypanel/overlaypanel.cjs.js +10 -1
  374. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  375. package/overlaypanel/overlaypanel.esm.js +10 -1
  376. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  377. package/overlaypanel/overlaypanel.js +10 -1
  378. package/overlaypanel/overlaypanel.min.js +1 -1
  379. package/package.json +1 -1
  380. package/paginator/paginator.cjs.js +120 -30
  381. package/paginator/paginator.cjs.min.js +1 -1
  382. package/paginator/paginator.d.ts +13 -0
  383. package/paginator/paginator.esm.js +120 -30
  384. package/paginator/paginator.esm.min.js +1 -1
  385. package/paginator/paginator.js +121 -32
  386. package/paginator/paginator.min.js +1 -1
  387. package/panel/panel.cjs.js +2 -0
  388. package/panel/panel.cjs.min.js +1 -1
  389. package/panel/panel.esm.js +2 -0
  390. package/panel/panel.esm.min.js +1 -1
  391. package/panel/panel.js +2 -0
  392. package/panel/panel.min.js +1 -1
  393. package/panelmenu/panelmenu.cjs.js +2 -0
  394. package/panelmenu/panelmenu.cjs.min.js +1 -1
  395. package/panelmenu/panelmenu.esm.js +3 -1
  396. package/panelmenu/panelmenu.esm.min.js +1 -1
  397. package/panelmenu/panelmenu.js +2 -0
  398. package/panelmenu/panelmenu.min.js +1 -1
  399. package/password/password.cjs.js +2 -0
  400. package/password/password.cjs.min.js +1 -1
  401. package/password/password.esm.js +2 -0
  402. package/password/password.esm.min.js +1 -1
  403. package/password/password.js +2 -0
  404. package/password/password.min.js +1 -1
  405. package/picklist/picklist.cjs.js +2 -0
  406. package/picklist/picklist.cjs.min.js +1 -1
  407. package/picklist/picklist.esm.js +2 -0
  408. package/picklist/picklist.esm.min.js +1 -1
  409. package/picklist/picklist.js +2 -0
  410. package/picklist/picklist.min.js +1 -1
  411. package/portal/portal.cjs.js +6 -2
  412. package/portal/portal.cjs.min.js +1 -1
  413. package/portal/portal.esm.js +6 -2
  414. package/portal/portal.esm.min.js +1 -1
  415. package/portal/portal.js +6 -2
  416. package/portal/portal.min.js +1 -1
  417. package/primereact.all.cjs.js +12344 -9903
  418. package/primereact.all.cjs.min.js +1 -1
  419. package/primereact.all.esm.js +12340 -9903
  420. package/primereact.all.esm.min.js +1 -1
  421. package/primereact.all.js +12344 -9903
  422. package/primereact.all.min.js +1 -1
  423. package/progressbar/progressbar.cjs.js +2 -0
  424. package/progressbar/progressbar.cjs.min.js +1 -1
  425. package/progressbar/progressbar.esm.js +2 -0
  426. package/progressbar/progressbar.esm.min.js +1 -1
  427. package/progressbar/progressbar.js +2 -0
  428. package/progressbar/progressbar.min.js +1 -1
  429. package/progressspinner/progressspinner.cjs.js +2 -0
  430. package/progressspinner/progressspinner.cjs.min.js +1 -1
  431. package/progressspinner/progressspinner.esm.js +2 -0
  432. package/progressspinner/progressspinner.esm.min.js +1 -1
  433. package/progressspinner/progressspinner.js +2 -0
  434. package/progressspinner/progressspinner.min.js +1 -1
  435. package/radiobutton/radiobutton.cjs.js +2 -0
  436. package/radiobutton/radiobutton.cjs.min.js +1 -1
  437. package/radiobutton/radiobutton.esm.js +2 -0
  438. package/radiobutton/radiobutton.esm.min.js +1 -1
  439. package/radiobutton/radiobutton.js +2 -0
  440. package/radiobutton/radiobutton.min.js +1 -1
  441. package/rating/rating.cjs.js +2 -0
  442. package/rating/rating.cjs.min.js +1 -1
  443. package/rating/rating.esm.js +2 -0
  444. package/rating/rating.esm.min.js +1 -1
  445. package/rating/rating.js +2 -0
  446. package/rating/rating.min.js +1 -1
  447. package/resources/primereact.css +340 -84
  448. package/resources/primereact.min.css +1 -1
  449. package/resources/themes/arya-blue/theme.css +4600 -3838
  450. package/resources/themes/arya-green/theme.css +4600 -3838
  451. package/resources/themes/arya-orange/theme.css +4600 -3838
  452. package/resources/themes/arya-purple/theme.css +4600 -3838
  453. package/resources/themes/bootstrap4-dark-blue/theme.css +4601 -3837
  454. package/resources/themes/bootstrap4-dark-purple/theme.css +4601 -3837
  455. package/resources/themes/bootstrap4-light-blue/theme.css +4579 -3815
  456. package/resources/themes/bootstrap4-light-purple/theme.css +4579 -3815
  457. package/resources/themes/fluent-light/theme.css +4690 -3897
  458. package/resources/themes/luna-amber/theme.css +4555 -3807
  459. package/resources/themes/luna-blue/theme.css +4551 -3803
  460. package/resources/themes/luna-green/theme.css +4551 -3803
  461. package/resources/themes/luna-pink/theme.css +4555 -3807
  462. package/resources/themes/md-dark-deeppurple/theme.css +5580 -4689
  463. package/resources/themes/md-dark-indigo/theme.css +5578 -4687
  464. package/resources/themes/md-light-deeppurple/theme.css +5569 -4678
  465. package/resources/themes/md-light-indigo/theme.css +5569 -4678
  466. package/resources/themes/mdc-dark-deeppurple/theme.css +5575 -4684
  467. package/resources/themes/mdc-dark-indigo/theme.css +5583 -4692
  468. package/resources/themes/mdc-light-deeppurple/theme.css +5579 -4688
  469. package/resources/themes/mdc-light-indigo/theme.css +5579 -4688
  470. package/resources/themes/nova/theme.css +4554 -3802
  471. package/resources/themes/nova-accent/theme.css +4571 -3818
  472. package/resources/themes/nova-alt/theme.css +4560 -3806
  473. package/resources/themes/rhea/theme.css +4562 -3813
  474. package/resources/themes/saga-blue/theme.css +4608 -3847
  475. package/resources/themes/saga-green/theme.css +4608 -3847
  476. package/resources/themes/saga-orange/theme.css +4608 -3847
  477. package/resources/themes/saga-purple/theme.css +4607 -3846
  478. package/resources/themes/tailwind-light/fonts/Inter-Bold.woff +0 -0
  479. package/resources/themes/tailwind-light/fonts/Inter-Bold.woff2 +0 -0
  480. package/resources/themes/tailwind-light/fonts/Inter-Light.woff +0 -0
  481. package/resources/themes/tailwind-light/fonts/Inter-Light.woff2 +0 -0
  482. package/resources/themes/tailwind-light/fonts/Inter-Medium.woff +0 -0
  483. package/resources/themes/tailwind-light/fonts/Inter-Medium.woff2 +0 -0
  484. package/resources/themes/tailwind-light/fonts/Inter-Regular.woff +0 -0
  485. package/resources/themes/tailwind-light/fonts/Inter-Regular.woff2 +0 -0
  486. package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff +0 -0
  487. package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff2 +0 -0
  488. package/resources/themes/tailwind-light/theme.css +5722 -0
  489. package/resources/themes/vela-blue/theme.css +4602 -3840
  490. package/resources/themes/vela-green/theme.css +4602 -3840
  491. package/resources/themes/vela-orange/theme.css +4602 -3840
  492. package/resources/themes/vela-purple/theme.css +4602 -3840
  493. package/ripple/ripple.cjs.js +2 -0
  494. package/ripple/ripple.cjs.min.js +1 -1
  495. package/ripple/ripple.esm.js +2 -0
  496. package/ripple/ripple.esm.min.js +1 -1
  497. package/ripple/ripple.js +2 -0
  498. package/ripple/ripple.min.js +1 -1
  499. package/row/row.cjs.js +2 -0
  500. package/row/row.cjs.min.js +1 -1
  501. package/row/row.esm.js +2 -0
  502. package/row/row.esm.min.js +1 -1
  503. package/row/row.js +2 -0
  504. package/row/row.min.js +1 -1
  505. package/scrollpanel/scrollpanel.cjs.js +2 -0
  506. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  507. package/scrollpanel/scrollpanel.esm.js +2 -0
  508. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  509. package/scrollpanel/scrollpanel.js +2 -0
  510. package/scrollpanel/scrollpanel.min.js +1 -1
  511. package/scrolltop/scrolltop.cjs.js +2 -0
  512. package/scrolltop/scrolltop.cjs.min.js +1 -1
  513. package/scrolltop/scrolltop.esm.js +2 -0
  514. package/scrolltop/scrolltop.esm.min.js +1 -1
  515. package/scrolltop/scrolltop.js +2 -0
  516. package/scrolltop/scrolltop.min.js +1 -1
  517. package/selectbutton/selectbutton.cjs.js +2 -0
  518. package/selectbutton/selectbutton.cjs.min.js +1 -1
  519. package/selectbutton/selectbutton.esm.js +2 -0
  520. package/selectbutton/selectbutton.esm.min.js +1 -1
  521. package/selectbutton/selectbutton.js +2 -0
  522. package/selectbutton/selectbutton.min.js +1 -1
  523. package/sidebar/sidebar.cjs.js +23 -27
  524. package/sidebar/sidebar.cjs.min.js +1 -1
  525. package/sidebar/sidebar.esm.js +23 -27
  526. package/sidebar/sidebar.esm.min.js +1 -1
  527. package/sidebar/sidebar.js +23 -27
  528. package/sidebar/sidebar.min.css +1 -1
  529. package/sidebar/sidebar.min.js +1 -1
  530. package/skeleton/skeleton.cjs.js +2 -0
  531. package/skeleton/skeleton.cjs.min.js +1 -1
  532. package/skeleton/skeleton.esm.js +2 -0
  533. package/skeleton/skeleton.esm.min.js +1 -1
  534. package/skeleton/skeleton.js +2 -0
  535. package/skeleton/skeleton.min.js +1 -1
  536. package/slidemenu/slidemenu.cjs.js +2 -0
  537. package/slidemenu/slidemenu.cjs.min.js +1 -1
  538. package/slidemenu/slidemenu.esm.js +2 -0
  539. package/slidemenu/slidemenu.esm.min.js +1 -1
  540. package/slidemenu/slidemenu.js +2 -0
  541. package/slidemenu/slidemenu.min.js +1 -1
  542. package/slider/slider.cjs.js +14 -7
  543. package/slider/slider.cjs.min.js +1 -1
  544. package/slider/slider.esm.js +14 -7
  545. package/slider/slider.esm.min.js +1 -1
  546. package/slider/slider.js +14 -7
  547. package/slider/slider.min.js +1 -1
  548. package/speeddial/speeddial.cjs.js +2 -0
  549. package/speeddial/speeddial.cjs.min.js +1 -1
  550. package/speeddial/speeddial.esm.js +2 -0
  551. package/speeddial/speeddial.esm.min.js +1 -1
  552. package/speeddial/speeddial.js +2 -0
  553. package/speeddial/speeddial.min.css +1 -1
  554. package/speeddial/speeddial.min.js +1 -1
  555. package/splitbutton/splitbutton.cjs.js +2 -0
  556. package/splitbutton/splitbutton.cjs.min.js +1 -1
  557. package/splitbutton/splitbutton.esm.js +2 -0
  558. package/splitbutton/splitbutton.esm.min.js +1 -1
  559. package/splitbutton/splitbutton.js +2 -0
  560. package/splitbutton/splitbutton.min.js +1 -1
  561. package/splitter/splitter.cjs.js +2 -0
  562. package/splitter/splitter.cjs.min.js +1 -1
  563. package/splitter/splitter.esm.js +2 -0
  564. package/splitter/splitter.esm.min.js +1 -1
  565. package/splitter/splitter.js +2 -0
  566. package/splitter/splitter.min.js +1 -1
  567. package/steps/steps.cjs.js +2 -0
  568. package/steps/steps.cjs.min.js +1 -1
  569. package/steps/steps.esm.js +2 -0
  570. package/steps/steps.esm.min.js +1 -1
  571. package/steps/steps.js +2 -0
  572. package/steps/steps.min.js +1 -1
  573. package/styleclass/package.json +6 -0
  574. package/styleclass/styleclass.cjs.js +355 -0
  575. package/styleclass/styleclass.cjs.min.js +1 -0
  576. package/styleclass/styleclass.d.ts +18 -0
  577. package/styleclass/styleclass.esm.js +351 -0
  578. package/styleclass/styleclass.esm.min.js +1 -0
  579. package/styleclass/styleclass.js +358 -0
  580. package/styleclass/styleclass.min.js +1 -0
  581. package/tabmenu/tabmenu.cjs.js +2 -0
  582. package/tabmenu/tabmenu.cjs.min.js +1 -1
  583. package/tabmenu/tabmenu.esm.js +2 -0
  584. package/tabmenu/tabmenu.esm.min.js +1 -1
  585. package/tabmenu/tabmenu.js +2 -0
  586. package/tabmenu/tabmenu.min.css +1 -1
  587. package/tabmenu/tabmenu.min.js +1 -1
  588. package/tabview/tabview.cjs.js +135 -18
  589. package/tabview/tabview.cjs.min.js +1 -1
  590. package/tabview/tabview.d.ts +1 -0
  591. package/tabview/tabview.esm.js +135 -18
  592. package/tabview/tabview.esm.min.js +1 -1
  593. package/tabview/tabview.js +135 -18
  594. package/tabview/tabview.min.css +1 -1
  595. package/tabview/tabview.min.js +1 -1
  596. package/tag/tag.cjs.js +2 -0
  597. package/tag/tag.cjs.min.js +1 -1
  598. package/tag/tag.esm.js +2 -0
  599. package/tag/tag.esm.min.js +1 -1
  600. package/tag/tag.js +2 -0
  601. package/tag/tag.min.js +1 -1
  602. package/terminal/terminal.cjs.js +2 -0
  603. package/terminal/terminal.cjs.min.js +1 -1
  604. package/terminal/terminal.esm.js +2 -0
  605. package/terminal/terminal.esm.min.js +1 -1
  606. package/terminal/terminal.js +2 -0
  607. package/terminal/terminal.min.js +1 -1
  608. package/tieredmenu/tieredmenu.cjs.js +2 -0
  609. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  610. package/tieredmenu/tieredmenu.d.ts +1 -1
  611. package/tieredmenu/tieredmenu.esm.js +2 -0
  612. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  613. package/tieredmenu/tieredmenu.js +2 -0
  614. package/tieredmenu/tieredmenu.min.js +1 -1
  615. package/timeline/timeline.cjs.js +2 -0
  616. package/timeline/timeline.cjs.min.js +1 -1
  617. package/timeline/timeline.esm.js +2 -0
  618. package/timeline/timeline.esm.min.js +1 -1
  619. package/timeline/timeline.js +2 -0
  620. package/timeline/timeline.min.js +1 -1
  621. package/toast/toast.cjs.js +9 -2
  622. package/toast/toast.cjs.min.js +1 -1
  623. package/toast/toast.d.ts +4 -0
  624. package/toast/toast.esm.js +9 -2
  625. package/toast/toast.esm.min.js +1 -1
  626. package/toast/toast.js +9 -2
  627. package/toast/toast.min.js +1 -1
  628. package/togglebutton/togglebutton.cjs.js +2 -0
  629. package/togglebutton/togglebutton.cjs.min.js +1 -1
  630. package/togglebutton/togglebutton.esm.js +2 -0
  631. package/togglebutton/togglebutton.esm.min.js +1 -1
  632. package/togglebutton/togglebutton.js +2 -0
  633. package/togglebutton/togglebutton.min.js +1 -1
  634. package/toolbar/toolbar.cjs.js +2 -0
  635. package/toolbar/toolbar.cjs.min.js +1 -1
  636. package/toolbar/toolbar.esm.js +2 -0
  637. package/toolbar/toolbar.esm.min.js +1 -1
  638. package/toolbar/toolbar.js +2 -0
  639. package/toolbar/toolbar.min.js +1 -1
  640. package/tooltip/tooltip.cjs.js +2 -0
  641. package/tooltip/tooltip.cjs.min.js +1 -1
  642. package/tooltip/tooltip.esm.js +2 -0
  643. package/tooltip/tooltip.esm.min.js +1 -1
  644. package/tooltip/tooltip.js +2 -0
  645. package/tooltip/tooltip.min.css +1 -1
  646. package/tooltip/tooltip.min.js +1 -1
  647. package/tree/tree.cjs.js +2 -0
  648. package/tree/tree.cjs.min.js +1 -1
  649. package/tree/tree.esm.js +2 -0
  650. package/tree/tree.esm.min.js +1 -1
  651. package/tree/tree.js +2 -0
  652. package/tree/tree.min.js +1 -1
  653. package/treenode/treenode.d.ts +1 -1
  654. package/treeselect/treeselect.cjs.js +2 -0
  655. package/treeselect/treeselect.cjs.min.js +1 -1
  656. package/treeselect/treeselect.esm.js +2 -0
  657. package/treeselect/treeselect.esm.min.js +1 -1
  658. package/treeselect/treeselect.js +2 -0
  659. package/treeselect/treeselect.min.js +1 -1
  660. package/treetable/treetable.cjs.js +22 -8
  661. package/treetable/treetable.cjs.min.js +1 -1
  662. package/treetable/treetable.esm.js +23 -9
  663. package/treetable/treetable.esm.min.js +1 -1
  664. package/treetable/treetable.js +23 -10
  665. package/treetable/treetable.min.js +1 -1
  666. package/tristatecheckbox/tristatecheckbox.cjs.js +2 -0
  667. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  668. package/tristatecheckbox/tristatecheckbox.esm.js +2 -0
  669. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  670. package/tristatecheckbox/tristatecheckbox.js +2 -0
  671. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  672. package/utils/utils.cjs.js +404 -496
  673. package/utils/utils.cjs.min.js +1 -1
  674. package/utils/utils.d.ts +20 -26
  675. package/utils/utils.esm.js +405 -496
  676. package/utils/utils.esm.min.js +1 -1
  677. package/utils/utils.js +404 -496
  678. package/utils/utils.min.js +1 -1
  679. package/virtualscroller/virtualscroller.cjs.js +277 -160
  680. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  681. package/virtualscroller/virtualscroller.d.ts +21 -9
  682. package/virtualscroller/virtualscroller.esm.js +277 -160
  683. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  684. package/virtualscroller/virtualscroller.js +277 -160
  685. package/virtualscroller/virtualscroller.min.js +1 -1
  686. package/web-types.json +168 -29
@@ -118,6 +118,8 @@ function _typeof(obj) {
118
118
  function _possibleConstructorReturn(self, call) {
119
119
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
120
120
  return call;
121
+ } else if (call !== void 0) {
122
+ throw new TypeError("Derived constructors may only return object or undefined");
121
123
  }
122
124
 
123
125
  return _assertThisInitialized(self);
@@ -379,7 +381,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
379
381
  value: function renderEmptyMessage() {
380
382
  if (!this.props.loading) {
381
383
  return /*#__PURE__*/React__default['default'].createElement("div", {
382
- className: "p-col-12 p-dataview-emptymessage"
384
+ className: "p-col-12 col-12 p-dataview-emptymessage"
383
385
  }, this.props.emptyMessage);
384
386
  }
385
387
 
@@ -452,7 +454,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
452
454
  return /*#__PURE__*/React__default['default'].createElement("div", {
453
455
  className: "p-dataview-content"
454
456
  }, /*#__PURE__*/React__default['default'].createElement("div", {
455
- className: "p-grid p-nogutter"
457
+ className: "p-grid p-nogutter grid grid-nogutter"
456
458
  }, items));
457
459
  }
458
460
  }, {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/paginator"),r=require("primereact/core");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?h(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t){var e=w();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var k=function(e){g(a,t.Component);var n=P(a);function a(t){var e;return u(this,a),(e=n.call(this,t)).changeLayout=e.changeLayout.bind(h(e)),e}return f(a,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var t=this,e=r.classNames("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),n=r.classNames("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),a=r.classNames("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return o.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},o.default.createElement("button",{type:"button",className:n,onClick:function(e){return t.changeLayout(e,"list")}},o.default.createElement("i",{className:"pi pi-bars"}),o.default.createElement(r.Ripple,null)),o.default.createElement("button",{type:"button",className:a,onClick:function(e){return t.changeLayout(e,"grid")}},o.default.createElement("i",{className:"pi pi-th-large"}),o.default.createElement(r.Ripple,null)))}}]),a}();b(k,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var N=function(e){g(n,t.Component);var r=P(n);function n(){return u(this,n),r.apply(this,arguments)}return f(n,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),n}();b(N,"defaultProps",{template:null,item:null,layout:null});var E=function(n){g(c,t.Component);var a=P(c);function c(t){var e;return u(this,c),(e=a.call(this,t)).props.onPage||(e.state={first:e.props.first,rows:e.props.rows}),e.sortChange=!1,e.onPageChange=e.onPageChange.bind(h(e)),e}return f(c,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?r.ObjectUtils.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(t){var n=r.classNames("p-paginator-"+t,this.props.paginatorClassName),a=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return o.default.createElement(e.Paginator,{first:a,rows:i,pageLinkSize:this.props.pageLinkSize,className:n,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var n=i(t=this.props.value)||s(t)||l(t)||p();return n.sort((function(t,n){var o=r.ObjectUtils.resolveFieldData(t,e.props.sortField),a=r.ObjectUtils.resolveFieldData(n,e.props.sortField),i=null;return i=null==o&&null!=a?-1:null!=o&&null==a?1:null==o&&null==a?0:"string"==typeof o&&"string"==typeof a?o.localeCompare(a,void 0,{numeric:!0}):o<a?-1:o>a?1:0,e.props.sortOrder*i})),n}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var t=r.classNames("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return o.default.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},o.default.createElement("i",{className:t}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:o.default.createElement("div",{className:"p-col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?o.default.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?o.default.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(t){var e=this;if(t&&t.length){if(this.props.paginator){for(var r=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,a=this.getTotalRecords(),i=Math.min(r+n,a),s=[],l=n;l<i;l++){var p=t[l];p&&s.push(o.default.createElement(N,{key:this.getItemRenderKey(t)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return t.map((function(t,r){return o.default.createElement(N,{key:e.getItemRenderKey(t)||r,template:e.props.itemTemplate,layout:e.props.layout,item:t})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(t){var e=this.renderItems(t);return o.default.createElement("div",{className:"p-dataview-content"},o.default.createElement("div",{className:"p-grid p-nogutter"},e))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var t=this.processData(),e=r.classNames("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),n=this.renderLoader(),a=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(t);return o.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},n,s,a,p,i,l)}}]),c}();b(E,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null}),exports.DataView=E,exports.DataViewLayoutOptions=k;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/paginator"),r=require("primereact/core");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t){var e=w();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var k=function(e){g(a,t.Component);var n=P(a);function a(t){var e;return u(this,a),(e=n.call(this,t)).changeLayout=e.changeLayout.bind(h(e)),e}return f(a,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var t=this,e=r.classNames("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),n=r.classNames("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),a=r.classNames("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return o.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},o.default.createElement("button",{type:"button",className:n,onClick:function(e){return t.changeLayout(e,"list")}},o.default.createElement("i",{className:"pi pi-bars"}),o.default.createElement(r.Ripple,null)),o.default.createElement("button",{type:"button",className:a,onClick:function(e){return t.changeLayout(e,"grid")}},o.default.createElement("i",{className:"pi pi-th-large"}),o.default.createElement(r.Ripple,null)))}}]),a}();b(k,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var N=function(e){g(n,t.Component);var r=P(n);function n(){return u(this,n),r.apply(this,arguments)}return f(n,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),n}();b(N,"defaultProps",{template:null,item:null,layout:null});var E=function(n){g(c,t.Component);var a=P(c);function c(t){var e;return u(this,c),(e=a.call(this,t)).props.onPage||(e.state={first:e.props.first,rows:e.props.rows}),e.sortChange=!1,e.onPageChange=e.onPageChange.bind(h(e)),e}return f(c,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?r.ObjectUtils.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(t){var n=r.classNames("p-paginator-"+t,this.props.paginatorClassName),a=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return o.default.createElement(e.Paginator,{first:a,rows:i,pageLinkSize:this.props.pageLinkSize,className:n,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var n=i(t=this.props.value)||s(t)||l(t)||p();return n.sort((function(t,n){var o=r.ObjectUtils.resolveFieldData(t,e.props.sortField),a=r.ObjectUtils.resolveFieldData(n,e.props.sortField),i=null;return i=null==o&&null!=a?-1:null!=o&&null==a?1:null==o&&null==a?0:"string"==typeof o&&"string"==typeof a?o.localeCompare(a,void 0,{numeric:!0}):o<a?-1:o>a?1:0,e.props.sortOrder*i})),n}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var t=r.classNames("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return o.default.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},o.default.createElement("i",{className:t}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:o.default.createElement("div",{className:"p-col-12 col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?o.default.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?o.default.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(t){var e=this;if(t&&t.length){if(this.props.paginator){for(var r=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,a=this.getTotalRecords(),i=Math.min(r+n,a),s=[],l=n;l<i;l++){var p=t[l];p&&s.push(o.default.createElement(N,{key:this.getItemRenderKey(t)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return t.map((function(t,r){return o.default.createElement(N,{key:e.getItemRenderKey(t)||r,template:e.props.itemTemplate,layout:e.props.layout,item:t})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(t){var e=this.renderItems(t);return o.default.createElement("div",{className:"p-dataview-content"},o.default.createElement("div",{className:"p-grid p-nogutter grid grid-nogutter"},e))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var t=this.processData(),e=r.classNames("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),n=this.renderLoader(),a=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(t);return o.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},n,s,a,p,i,l)}}]),c}();b(E,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null}),exports.DataView=E,exports.DataViewLayoutOptions=k;
@@ -110,6 +110,8 @@ function _typeof(obj) {
110
110
  function _possibleConstructorReturn(self, call) {
111
111
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
112
112
  return call;
113
+ } else if (call !== void 0) {
114
+ throw new TypeError("Derived constructors may only return object or undefined");
113
115
  }
114
116
 
115
117
  return _assertThisInitialized(self);
@@ -371,7 +373,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
371
373
  value: function renderEmptyMessage() {
372
374
  if (!this.props.loading) {
373
375
  return /*#__PURE__*/React.createElement("div", {
374
- className: "p-col-12 p-dataview-emptymessage"
376
+ className: "p-col-12 col-12 p-dataview-emptymessage"
375
377
  }, this.props.emptyMessage);
376
378
  }
377
379
 
@@ -444,7 +446,7 @@ var DataView = /*#__PURE__*/function (_Component3) {
444
446
  return /*#__PURE__*/React.createElement("div", {
445
447
  className: "p-dataview-content"
446
448
  }, /*#__PURE__*/React.createElement("div", {
447
- className: "p-grid p-nogutter"
449
+ className: "p-grid p-nogutter grid grid-nogutter"
448
450
  }, items));
449
451
  }
450
452
  }, {
@@ -1 +1 @@
1
- import t,{Component as e}from"react";import{Paginator as r}from"primereact/paginator";import{classNames as n,Ripple as o,ObjectUtils as a}from"primereact/core";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){if(Array.isArray(t))return i(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return e&&h(t.prototype,e),r&&h(t,r),t}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?g(t):e}function P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){var e=k();return function(){var r,n=P(t);if(e){var o=P(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var E=function(r){y(i,e);var a=w(i);function i(t){var e;return c(this,i),(e=a.call(this,t)).changeLayout=e.changeLayout.bind(g(e)),e}return f(i,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var e=this,r=n("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),a=n("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),i=n("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return t.createElement("div",{id:this.props.id,style:this.props.style,className:r},t.createElement("button",{type:"button",className:a,onClick:function(t){return e.changeLayout(t,"list")}},t.createElement("i",{className:"pi pi-bars"}),t.createElement(o,null)),t.createElement("button",{type:"button",className:i,onClick:function(t){return e.changeLayout(t,"grid")}},t.createElement("i",{className:"pi pi-th-large"}),t.createElement(o,null)))}}]),i}();b(E,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var N=function(t){y(n,e);var r=w(n);function n(){return c(this,n),r.apply(this,arguments)}return f(n,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),n}();b(N,"defaultProps",{template:null,item:null,layout:null});var R=function(o){y(h,e);var i=w(h);function h(t){var e;return c(this,h),(e=i.call(this,t)).props.onPage||(e.state={first:e.props.first,rows:e.props.rows}),e.sortChange=!1,e.onPageChange=e.onPageChange.bind(g(e)),e}return f(h,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?a.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(e){var o=n("p-paginator-"+e,this.props.paginatorClassName),a=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return t.createElement(r,{first:a,rows:i,pageLinkSize:this.props.pageLinkSize,className:o,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var r=s(t=this.props.value)||l(t)||p(t)||u();return r.sort((function(t,r){var n=a.resolveFieldData(t,e.props.sortField),o=a.resolveFieldData(r,e.props.sortField),i=null;return i=null==n&&null!=o?-1:null!=n&&null==o?1:null==n&&null==o?0:"string"==typeof n&&"string"==typeof o?n.localeCompare(o,void 0,{numeric:!0}):n<o?-1:n>o?1:0,e.props.sortOrder*i})),r}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var e=n("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return t.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},t.createElement("i",{className:e}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:t.createElement("div",{className:"p-col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?t.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?t.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(e){var r=this;if(e&&e.length){if(this.props.paginator){for(var n=this.props.onPage?this.props.rows:this.state.rows,o=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,a=this.getTotalRecords(),i=Math.min(n+o,a),s=[],l=o;l<i;l++){var p=e[l];p&&s.push(t.createElement(N,{key:this.getItemRenderKey(e)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return e.map((function(e,n){return t.createElement(N,{key:r.getItemRenderKey(e)||n,template:r.props.itemTemplate,layout:r.props.layout,item:e})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(e){var r=this.renderItems(e);return t.createElement("div",{className:"p-dataview-content"},t.createElement("div",{className:"p-grid p-nogutter"},r))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var e=this.processData(),r=n("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),o=this.renderLoader(),a=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(e);return t.createElement("div",{id:this.props.id,style:this.props.style,className:r},o,s,a,p,i,l)}}]),h}();b(R,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null});export{R as DataView,E as DataViewLayoutOptions};
1
+ import t,{Component as e}from"react";import{Paginator as r}from"primereact/paginator";import{classNames as o,Ripple as n,ObjectUtils as a}from"primereact/core";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function s(t){if(Array.isArray(t))return i(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function f(t,e,r){return e&&h(t.prototype,e),r&&h(t,r),t}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){var e=k();return function(){var r,o=P(t);if(e){var n=P(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return v(this,r)}}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var E=function(r){y(i,e);var a=w(i);function i(t){var e;return c(this,i),(e=a.call(this,t)).changeLayout=e.changeLayout.bind(g(e)),e}return f(i,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var e=this,r=o("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),a=o("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),i=o("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return t.createElement("div",{id:this.props.id,style:this.props.style,className:r},t.createElement("button",{type:"button",className:a,onClick:function(t){return e.changeLayout(t,"list")}},t.createElement("i",{className:"pi pi-bars"}),t.createElement(n,null)),t.createElement("button",{type:"button",className:i,onClick:function(t){return e.changeLayout(t,"grid")}},t.createElement("i",{className:"pi pi-th-large"}),t.createElement(n,null)))}}]),i}();b(E,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var N=function(t){y(o,e);var r=w(o);function o(){return c(this,o),r.apply(this,arguments)}return f(o,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),o}();b(N,"defaultProps",{template:null,item:null,layout:null});var R=function(n){y(h,e);var i=w(h);function h(t){var e;return c(this,h),(e=i.call(this,t)).props.onPage||(e.state={first:e.props.first,rows:e.props.rows}),e.sortChange=!1,e.onPageChange=e.onPageChange.bind(g(e)),e}return f(h,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?a.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(e){var n=o("p-paginator-"+e,this.props.paginatorClassName),a=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return t.createElement(r,{first:a,rows:i,pageLinkSize:this.props.pageLinkSize,className:n,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var r=s(t=this.props.value)||l(t)||p(t)||u();return r.sort((function(t,r){var o=a.resolveFieldData(t,e.props.sortField),n=a.resolveFieldData(r,e.props.sortField),i=null;return i=null==o&&null!=n?-1:null!=o&&null==n?1:null==o&&null==n?0:"string"==typeof o&&"string"==typeof n?o.localeCompare(n,void 0,{numeric:!0}):o<n?-1:o>n?1:0,e.props.sortOrder*i})),r}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var e=o("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return t.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},t.createElement("i",{className:e}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:t.createElement("div",{className:"p-col-12 col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?t.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?t.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(e){var r=this;if(e&&e.length){if(this.props.paginator){for(var o=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,a=this.getTotalRecords(),i=Math.min(o+n,a),s=[],l=n;l<i;l++){var p=e[l];p&&s.push(t.createElement(N,{key:this.getItemRenderKey(e)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return e.map((function(e,o){return t.createElement(N,{key:r.getItemRenderKey(e)||o,template:r.props.itemTemplate,layout:r.props.layout,item:e})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(e){var r=this.renderItems(e);return t.createElement("div",{className:"p-dataview-content"},t.createElement("div",{className:"p-grid p-nogutter grid grid-nogutter"},r))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var e=this.processData(),r=o("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),n=this.renderLoader(),a=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(e);return t.createElement("div",{id:this.props.id,style:this.props.style,className:r},n,s,a,p,i,l)}}]),h}();b(R,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null});export{R as DataView,E as DataViewLayoutOptions};
@@ -114,6 +114,8 @@ this.primereact.dataview = (function (exports, React, paginator, core) {
114
114
  function _possibleConstructorReturn(self, call) {
115
115
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
116
116
  return call;
117
+ } else if (call !== void 0) {
118
+ throw new TypeError("Derived constructors may only return object or undefined");
117
119
  }
118
120
 
119
121
  return _assertThisInitialized(self);
@@ -375,7 +377,7 @@ this.primereact.dataview = (function (exports, React, paginator, core) {
375
377
  value: function renderEmptyMessage() {
376
378
  if (!this.props.loading) {
377
379
  return /*#__PURE__*/React__default['default'].createElement("div", {
378
- className: "p-col-12 p-dataview-emptymessage"
380
+ className: "p-col-12 col-12 p-dataview-emptymessage"
379
381
  }, this.props.emptyMessage);
380
382
  }
381
383
 
@@ -448,7 +450,7 @@ this.primereact.dataview = (function (exports, React, paginator, core) {
448
450
  return /*#__PURE__*/React__default['default'].createElement("div", {
449
451
  className: "p-dataview-content"
450
452
  }, /*#__PURE__*/React__default['default'].createElement("div", {
451
- className: "p-grid p-nogutter"
453
+ className: "p-grid p-nogutter grid grid-nogutter"
452
454
  }, items));
453
455
  }
454
456
  }, {
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.dataview=function(t,e,r,n){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=o(e);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){if(Array.isArray(t))return i(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?d(t):e}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function P(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){var e=k();return function(){var r,n=b(t);if(e){var o=b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var N=function(t){y(r,t);var e=w(r);function r(t){var n;return c(this,r),(n=e.call(this,t)).changeLayout=n.changeLayout.bind(d(n)),n}return h(r,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var t=this,e=n.classNames("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),r=n.classNames("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),o=n.classNames("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return a.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},a.default.createElement("button",{type:"button",className:r,onClick:function(e){return t.changeLayout(e,"list")}},a.default.createElement("i",{className:"pi pi-bars"}),a.default.createElement(n.Ripple,null)),a.default.createElement("button",{type:"button",className:o,onClick:function(e){return t.changeLayout(e,"grid")}},a.default.createElement("i",{className:"pi pi-th-large"}),a.default.createElement(n.Ripple,null)))}}]),r}(e.Component);P(N,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var E=function(t){y(r,t);var e=w(r);function r(){return c(this,r),e.apply(this,arguments)}return h(r,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),r}(e.Component);P(E,"defaultProps",{template:null,item:null,layout:null});var R=function(t){y(o,t);var e=w(o);function o(t){var r;return c(this,o),(r=e.call(this,t)).props.onPage||(r.state={first:r.props.first,rows:r.props.rows}),r.sortChange=!1,r.onPageChange=r.onPageChange.bind(d(r)),r}return h(o,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?n.ObjectUtils.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(t){var e=n.classNames("p-paginator-"+t,this.props.paginatorClassName),o=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return a.default.createElement(r.Paginator,{first:o,rows:i,pageLinkSize:this.props.pageLinkSize,className:e,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var r=s(t=this.props.value)||l(t)||p(t)||u();return r.sort((function(t,r){var o=n.ObjectUtils.resolveFieldData(t,e.props.sortField),a=n.ObjectUtils.resolveFieldData(r,e.props.sortField),i=null;return i=null==o&&null!=a?-1:null!=o&&null==a?1:null==o&&null==a?0:"string"==typeof o&&"string"==typeof a?o.localeCompare(a,void 0,{numeric:!0}):o<a?-1:o>a?1:0,e.props.sortOrder*i})),r}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var t=n.classNames("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return a.default.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},a.default.createElement("i",{className:t}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:a.default.createElement("div",{className:"p-col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?a.default.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?a.default.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(t){var e=this;if(t&&t.length){if(this.props.paginator){for(var r=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,o=this.getTotalRecords(),i=Math.min(r+n,o),s=[],l=n;l<i;l++){var p=t[l];p&&s.push(a.default.createElement(E,{key:this.getItemRenderKey(t)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return t.map((function(t,r){return a.default.createElement(E,{key:e.getItemRenderKey(t)||r,template:e.props.itemTemplate,layout:e.props.layout,item:t})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(t){var e=this.renderItems(t);return a.default.createElement("div",{className:"p-dataview-content"},a.default.createElement("div",{className:"p-grid p-nogutter"},e))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var t=this.processData(),e=n.classNames("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),r=this.renderLoader(),o=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(t);return a.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},r,s,o,p,i,l)}}]),o}(e.Component);return P(R,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null}),t.DataView=R,t.DataViewLayoutOptions=N,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.paginator,primereact.core);
1
+ this.primereact=this.primereact||{},this.primereact.dataview=function(t,e,r,n){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=o(e);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){if(Array.isArray(t))return i(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function P(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){var e=k();return function(){var r,n=b(t);if(e){var o=b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var N=function(t){y(r,t);var e=w(r);function r(t){var n;return c(this,r),(n=e.call(this,t)).changeLayout=n.changeLayout.bind(d(n)),n}return h(r,[{key:"changeLayout",value:function(t,e){this.props.onChange({originalEvent:t,value:e}),t.preventDefault()}},{key:"render",value:function(){var t=this,e=n.classNames("p-dataview-layout-options p-selectbutton p-buttonset",this.props.className),r=n.classNames("p-button p-button-icon-only",{"p-highlight":"list"===this.props.layout}),o=n.classNames("p-button p-button-icon-only",{"p-highlight":"grid"===this.props.layout});return a.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},a.default.createElement("button",{type:"button",className:r,onClick:function(e){return t.changeLayout(e,"list")}},a.default.createElement("i",{className:"pi pi-bars"}),a.default.createElement(n.Ripple,null)),a.default.createElement("button",{type:"button",className:o,onClick:function(e){return t.changeLayout(e,"grid")}},a.default.createElement("i",{className:"pi pi-th-large"}),a.default.createElement(n.Ripple,null)))}}]),r}(e.Component);P(N,"defaultProps",{id:null,style:null,className:null,layout:null,onChange:null});var E=function(t){y(r,t);var e=w(r);function r(){return c(this,r),e.apply(this,arguments)}return h(r,[{key:"render",value:function(){return this.props.template(this.props.item,this.props.layout)}}]),r}(e.Component);P(E,"defaultProps",{template:null,item:null,layout:null});var R=function(t){y(o,t);var e=w(o);function o(t){var r;return c(this,o),(r=e.call(this,t)).props.onPage||(r.state={first:r.props.first,rows:r.props.rows}),r.sortChange=!1,r.onPageChange=r.onPageChange.bind(d(r)),r}return h(o,[{key:"getItemRenderKey",value:function(t){return this.props.dataKey?n.ObjectUtils.resolveFieldData(t,this.props.dataKey):null}},{key:"getTotalRecords",value:function(){return this.props.totalRecords?this.props.totalRecords:this.props.value?this.props.value.length:0}},{key:"createPaginator",value:function(t){var e=n.classNames("p-paginator-"+t,this.props.paginatorClassName),o=this.props.onPage?this.props.first:this.state.first,i=this.props.onPage?this.props.rows:this.state.rows,s=this.getTotalRecords();return a.default.createElement(r.Paginator,{first:o,rows:i,pageLinkSize:this.props.pageLinkSize,className:e,onPageChange:this.onPageChange,template:this.props.paginatorTemplate,totalRecords:s,rowsPerPageOptions:this.props.rowsPerPageOptions,currentPageReportTemplate:this.props.currentPageReportTemplate,leftContent:this.props.paginatorLeft,rightContent:this.props.paginatorRight,alwaysShow:this.props.alwaysShowPaginator,dropdownAppendTo:this.props.paginatorDropdownAppendTo})}},{key:"onPageChange",value:function(t){this.props.onPage?this.props.onPage(t):this.setState({first:t.first,rows:t.rows})}},{key:"isEmpty",value:function(){return!this.props.value||0===this.props.value.length}},{key:"sort",value:function(){var t,e=this;if(this.props.value){var r=s(t=this.props.value)||l(t)||p(t)||u();return r.sort((function(t,r){var o=n.ObjectUtils.resolveFieldData(t,e.props.sortField),a=n.ObjectUtils.resolveFieldData(r,e.props.sortField),i=null;return i=null==o&&null!=a?-1:null!=o&&null==a?1:null==o&&null==a?0:"string"==typeof o&&"string"==typeof a?o.localeCompare(a,void 0,{numeric:!0}):o<a?-1:o>a?1:0,e.props.sortOrder*i})),r}return null}},{key:"renderLoader",value:function(){if(this.props.loading){var t=n.classNames("p-dataview-loading-icon pi-spin",this.props.loadingIcon);return a.default.createElement("div",{className:"p-dataview-loading-overlay p-component-overlay"},a.default.createElement("i",{className:t}))}return null}},{key:"renderTopPaginator",value:function(){return!this.props.paginator||"bottom"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("top")}},{key:"renderBottomPaginator",value:function(){return!this.props.paginator||"top"===this.props.paginatorPosition&&"both"!==this.props.paginatorPosition?null:this.createPaginator("bottom")}},{key:"renderEmptyMessage",value:function(){return this.props.loading?null:a.default.createElement("div",{className:"p-col-12 col-12 p-dataview-emptymessage"},this.props.emptyMessage)}},{key:"renderHeader",value:function(){return this.props.header?a.default.createElement("div",{className:"p-dataview-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?a.default.createElement("div",{className:"p-dataview-footer"}," ",this.props.footer):null}},{key:"renderItems",value:function(t){var e=this;if(t&&t.length){if(this.props.paginator){for(var r=this.props.onPage?this.props.rows:this.state.rows,n=this.props.lazy?0:this.props.onPage?this.props.first:this.state.first,o=this.getTotalRecords(),i=Math.min(r+n,o),s=[],l=n;l<i;l++){var p=t[l];p&&s.push(a.default.createElement(E,{key:this.getItemRenderKey(t)||l,template:this.props.itemTemplate,layout:this.props.layout,item:p}))}return s}return t.map((function(t,r){return a.default.createElement(E,{key:e.getItemRenderKey(t)||r,template:e.props.itemTemplate,layout:e.props.layout,item:t})}))}return this.renderEmptyMessage()}},{key:"renderContent",value:function(t){var e=this.renderItems(t);return a.default.createElement("div",{className:"p-dataview-content"},a.default.createElement("div",{className:"p-grid p-nogutter grid grid-nogutter"},e))}},{key:"processData",value:function(){var t=this.props.value;return t&&t.length&&this.props.sortField&&(t=this.sort()),t}},{key:"render",value:function(){var t=this.processData(),e=n.classNames("p-dataview p-component",{"p-dataview-list":"list"===this.props.layout,"p-dataview-grid":"grid"===this.props.layout,"p-dataview-loading":this.props.loading},this.props.className),r=this.renderLoader(),o=this.renderTopPaginator(),i=this.renderBottomPaginator(),s=this.renderHeader(),l=this.renderFooter(),p=this.renderContent(t);return a.default.createElement("div",{id:this.props.id,style:this.props.style,className:e},r,s,o,p,i,l)}}]),o}(e.Component);return P(R,"defaultProps",{id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:"No records found",sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:"pi pi-spinner",itemTemplate:null,onPage:null}),t.DataView=R,t.DataViewLayoutOptions=N,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.paginator,primereact.core);
@@ -81,6 +81,8 @@ function _assertThisInitialized(self) {
81
81
  function _possibleConstructorReturn(self, call) {
82
82
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
83
83
  return call;
84
+ } else if (call !== void 0) {
85
+ throw new TypeError("Derived constructors may only return object or undefined");
84
86
  }
85
87
 
86
88
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?c(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var d,p,y,h=function(e){u(h,t.Component);var i,l,c,d,p,y=(i=h,l=f(),function(){var t,e=s(i);if(l){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return a(this,t)});function h(t){var e;return o(this,h),(e=y.call(this,t)).state={loaded:!1},e}return c=h,(d=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var t=this;this.documentScrollListener=function(){t.shouldLoad()&&(t.load(),t.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var t=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=t.top}},{key:"load",value:function(t){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(t)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var t=this;return n.default.createElement("div",{ref:function(e){return t.container=e}},this.state.loaded?this.props.children:null)}}])&&r(c.prototype,d),p&&r(c,p),h}();y={onload:null},(p="defaultProps")in(d=h)?Object.defineProperty(d,p,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[p]=y,exports.DeferredContent=h;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var d,p,y,h=function(t){u(h,e.Component);var i,c,l,d,p,y=(i=h,c=f(),function(){var e,t=s(i);if(c){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function h(e){var t;return o(this,h),(t=y.call(this,e)).state={loaded:!1},t}return l=h,(d=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var e=this;this.documentScrollListener=function(){e.shouldLoad()&&(e.load(),e.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var e=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=e.top}},{key:"load",value:function(e){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(e)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var e=this;return n.default.createElement("div",{ref:function(t){return e.container=t}},this.state.loaded?this.props.children:null)}}])&&r(l.prototype,d),p&&r(l,p),h}();y={onload:null},(p="defaultProps")in(d=h)?Object.defineProperty(d,p,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[p]=y,exports.DeferredContent=h;
@@ -73,6 +73,8 @@ function _assertThisInitialized(self) {
73
73
  function _possibleConstructorReturn(self, call) {
74
74
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
75
75
  return call;
76
+ } else if (call !== void 0) {
77
+ throw new TypeError("Derived constructors may only return object or undefined");
76
78
  }
77
79
 
78
80
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- import t,{Component as e}from"react";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?c(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var f,d,p,y=function(r){i(h,e);var u,c,f,d,p,y=(u=h,c=s(),function(){var t,e=a(u);if(c){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function h(t){var e;return n(this,h),(e=y.call(this,t)).state={loaded:!1},e}return f=h,(d=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var t=this;this.documentScrollListener=function(){t.shouldLoad()&&(t.load(),t.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var t=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=t.top}},{key:"load",value:function(t){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(t)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var e=this;return t.createElement("div",{ref:function(t){return e.container=t}},this.state.loaded?this.props.children:null)}}])&&o(f.prototype,d),p&&o(f,p),h}();p={onload:null},(d="defaultProps")in(f=y)?Object.defineProperty(f,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):f[d]=p;export{y as DeferredContent};
1
+ import t,{Component as e}from"react";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var f,d,p,y=function(r){i(h,e);var u,c,f,d,p,y=(u=h,c=s(),function(){var t,e=a(u);if(c){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function h(t){var e;return n(this,h),(e=y.call(this,t)).state={loaded:!1},e}return f=h,(d=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var t=this;this.documentScrollListener=function(){t.shouldLoad()&&(t.load(),t.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var t=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=t.top}},{key:"load",value:function(t){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(t)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var e=this;return t.createElement("div",{ref:function(t){return e.container=t}},this.state.loaded?this.props.children:null)}}])&&o(f.prototype,d),p&&o(f,p),h}();p={onload:null},(d="defaultProps")in(f=y)?Object.defineProperty(f,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):f[d]=p;export{y as DeferredContent};
@@ -79,6 +79,8 @@ this.primereact.deferredcontent = (function (exports, React) {
79
79
  function _possibleConstructorReturn(self, call) {
80
80
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
81
81
  return call;
82
+ } else if (call !== void 0) {
83
+ throw new TypeError("Derived constructors may only return object or undefined");
82
84
  }
83
85
 
84
86
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.deferredcontent=function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(e);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?a(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var p,h,y,b=function(t){c(h,t);var e,n,u,l,a,p=(e=h,n=d(),function(){var t,o=f(e);if(n){var r=f(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return s(this,t)});function h(t){var e;return r(this,h),(e=p.call(this,t)).state={loaded:!1},e}return u=h,(l=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var t=this;this.documentScrollListener=function(){t.shouldLoad()&&(t.load(),t.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var t=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=t.top}},{key:"load",value:function(t){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(t)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var t=this;return o.default.createElement("div",{ref:function(e){return t.container=e}},this.state.loaded?this.props.children:null)}}])&&i(u.prototype,l),a&&i(u,a),h}(e.Component);return y={onload:null},(h="defaultProps")in(p=b)?Object.defineProperty(p,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[h]=y,t.DeferredContent=b,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React);
1
+ this.primereact=this.primereact||{},this.primereact.deferredcontent=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var p,y,h,b=function(e){c(y,e);var t,n,u,l,a,p=(t=y,n=d(),function(){var e,o=s(t);if(n){var r=s(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return f(this,e)});function y(e){var t;return r(this,y),(t=p.call(this,e)).state={loaded:!1},t}return u=y,(l=[{key:"componentDidMount",value:function(){this.state.loaded||(this.shouldLoad()?this.load():this.bindScrollListener())}},{key:"bindScrollListener",value:function(){var e=this;this.documentScrollListener=function(){e.shouldLoad()&&(e.load(),e.unbindScrollListener())},window.addEventListener("scroll",this.documentScrollListener)}},{key:"unbindScrollListener",value:function(){this.documentScrollListener&&(window.removeEventListener("scroll",this.documentScrollListener),this.documentScrollListener=null)}},{key:"shouldLoad",value:function(){if(this.state.loaded)return!1;var e=this.container.getBoundingClientRect();return document.documentElement.clientHeight>=e.top}},{key:"load",value:function(e){this.setState({loaded:!0}),this.props.onLoad&&this.props.onLoad(e)}},{key:"componentWillUnmount",value:function(){this.unbindScrollListener()}},{key:"render",value:function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.container=t}},this.state.loaded?this.props.children:null)}}])&&i(u.prototype,l),a&&i(u,a),y}(t.Component);return h={onload:null},(y="defaultProps")in(p=b)?Object.defineProperty(p,y,{value:h,enumerable:!0,configurable:!0,writable:!0}):p[y]=h,e.DeferredContent=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React);
@@ -117,6 +117,8 @@ function _typeof(obj) {
117
117
  function _possibleConstructorReturn(self, call) {
118
118
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
119
119
  return call;
120
+ } else if (call !== void 0) {
121
+ throw new TypeError("Derived constructors may only return object or undefined");
120
122
  }
121
123
 
122
124
  return _assertThisInitialized(self);
@@ -175,6 +177,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
175
177
  _this.onMaskClick = _this.onMaskClick.bind(_assertThisInitialized(_this));
176
178
  _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
177
179
  _this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
180
+ _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
178
181
  _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
179
182
  _this.attributeSelector = core.UniqueComponentId();
180
183
  _this.dialogRef = /*#__PURE__*/React__default['default'].createRef();
@@ -413,6 +416,13 @@ var Dialog = /*#__PURE__*/function (_Component) {
413
416
 
414
417
  this.enableDocumentSettings();
415
418
  }
419
+ }, {
420
+ key: "onExiting",
421
+ value: function onExiting() {
422
+ if (this.props.modal) {
423
+ core.DomHandler.addClass(this.mask, 'p-component-overlay-leave');
424
+ }
425
+ }
416
426
  }, {
417
427
  key: "onExited",
418
428
  value: function onExited() {
@@ -771,7 +781,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
771
781
  'p-dialog-maximized': this.maximized
772
782
  });
773
783
  var maskClassName = core.classNames('p-dialog-mask', {
774
- 'p-component-overlay': this.props.modal,
784
+ 'p-component-overlay p-component-overlay-enter': this.props.modal,
775
785
  'p-dialog-visible': this.state.maskVisible,
776
786
  'p-dialog-draggable': this.props.draggable,
777
787
  'p-dialog-resizable': this.props.resizable
@@ -799,6 +809,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
799
809
  unmountOnExit: true,
800
810
  onEnter: this.onEnter,
801
811
  onEntered: this.onEntered,
812
+ onExiting: this.onExiting,
802
813
  onExited: this.onExited
803
814
  }, /*#__PURE__*/React__default['default'].createElement("div", {
804
815
  ref: this.dialogRef,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function o(e){if(Array.isArray(e))return s(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function r(e,t){if(e){if("string"==typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(e,t):void 0}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?c(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var y,v,E,k=function(i){m(k,e.Component);var s,p,h,y,v,E=(s=k,p=b(),function(){var e,t=f(s);if(p){var i=f(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return g(this,e)});function k(e){var i;return d(this,k),(i=E.call(this,e)).state={id:e.id,maskVisible:e.visible,visible:!1},i.props.onMaximize||(i.state.maximized=e.maximized),i.onClose=i.onClose.bind(c(i)),i.toggleMaximize=i.toggleMaximize.bind(c(i)),i.onDragStart=i.onDragStart.bind(c(i)),i.onResizeStart=i.onResizeStart.bind(c(i)),i.onMaskClick=i.onMaskClick.bind(c(i)),i.onEnter=i.onEnter.bind(c(i)),i.onEntered=i.onEntered.bind(c(i)),i.onExited=i.onExited.bind(c(i)),i.attributeSelector=t.UniqueComponentId(),i.dialogRef=n.default.createRef(),i}return h=k,(y=[{key:"onClose",value:function(e){this.props.onHide(),e.preventDefault()}},{key:"focus",value:function(){var e=document.activeElement;!(e&&this.dialogRef&&this.dialogRef.current.contains(e))&&this.props.closable&&this.props.showHeader&&this.closeElement.focus()}},{key:"onMaskClick",value:function(e){this.props.dismissableMask&&this.props.modal&&this.mask===e.target&&this.onClose(e),this.props.onMaskClick&&this.props.onMaskClick(e)}},{key:"toggleMaximize",value:function(e){var t=!this.maximized;this.props.onMaximize?this.props.onMaximize({originalEvent:e,maximized:t}):this.setState({maximized:t},this.changeScrollOnMaximizable),e.preventDefault()}},{key:"onDragStart",value:function(e){t.DomHandler.hasClass(e.target,"p-dialog-header-icon")||t.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.props.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.dialogEl.style.margin="0",t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onDragStart&&this.props.onDragStart(e))}},{key:"onDrag",value:function(e){if(this.dragging){var i=t.DomHandler.getOuterWidth(this.dialogEl),n=t.DomHandler.getOuterHeight(this.dialogEl),s=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,a=this.dialogEl.getBoundingClientRect(),r=a.left+s,l=a.top+o,d=t.DomHandler.getViewport();this.dialogEl.style.position="fixed",this.props.keepInViewport?(r>=this.props.minX&&r+i<d.width&&(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px"),l>=this.props.minY&&l+n<d.height&&(this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px")):(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px",this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px"),this.props.onDrag&&this.props.onDrag(e)}}},{key:"onDragEnd",value:function(e){this.dragging&&(this.dragging=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onDragEnd&&this.props.onDragEnd(e))}},{key:"onResizeStart",value:function(e){this.props.resizable&&(this.resizing=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onResizeStart&&this.props.onResizeStart(e))}},{key:"convertToPx",value:function(e,i,n){!n&&(n=t.DomHandler.getViewport());var s=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?s*(n[i]/100):s}},{key:"onResize",value:function(e){if(this.resizing){var i=e.pageX-this.lastPageX,n=e.pageY-this.lastPageY,s=t.DomHandler.getOuterWidth(this.dialogEl),o=t.DomHandler.getOuterHeight(this.dialogEl),a=this.dialogEl.getBoundingClientRect(),r=t.DomHandler.getViewport(),l=s+i,d=o+n,u=this.convertToPx(this.dialogEl.style.minWidth,"width",r),c=this.convertToPx(this.dialogEl.style.minHeight,"height",r);(!parseInt(this.dialogEl.style.top)||!parseInt(this.dialogEl.style.left))&&(l+=i,d+=n),(!u||l>u)&&a.left+l<r.width&&(this.dialogEl.style.width=l+"px"),(!c||d>c)&&a.top+d<r.height&&(this.dialogEl.style.height=d+"px"),this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.props.onResize&&this.props.onResize(e)}}},{key:"onResizeEnd",value:function(e){this.resizing&&(this.resizing=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onResizeEnd&&this.props.onResizeEnd(e))}},{key:"resetPosition",value:function(){this.dialogEl.style.position="",this.dialogEl.style.left="",this.dialogEl.style.top="",this.dialogEl.style.margin=""}},{key:"getPositionClass",value:function(){var e=this,t=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find((function(t){return t===e.props.position||t.replace("-","")===e.props.position}));return t?"p-dialog-".concat(t):""}},{key:"maximized",get:function(){return this.props.onMaximize?this.props.maximized:this.state.maximized}},{key:"dialogEl",get:function(){return this.dialogRef.current}},{key:"onEnter",value:function(){this.dialogEl.setAttribute(this.attributeSelector,"")}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow(),this.props.focusOnShow&&this.focus(),this.enableDocumentSettings()}},{key:"onExited",value:function(){this.dragging=!1,t.ZIndexUtils.clear(this.mask),this.setState({maskVisible:!1}),this.disableDocumentSettings()}},{key:"enableDocumentSettings",value:function(){this.bindGlobalListeners(),(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.addClass(document.body,"p-overflow-hidden")}},{key:"disableDocumentSettings",value:function(){this.unbindGlobalListeners(),this.props.modal?document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))||t.DomHandler.removeClass(document.body,"p-overflow-hidden"):(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.removeClass(document.body,"p-overflow-hidden")}},{key:"bindGlobalListeners",value:function(){this.props.draggable&&this.bindDocumentDragListener(),this.props.resizable&&this.bindDocumentResizeListeners(),this.props.closeOnEscape&&this.props.closable&&this.bindDocumentKeyDownListener()}},{key:"unbindGlobalListeners",value:function(){this.unbindDocumentDragListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentKeyDownListener()}},{key:"bindDocumentDragListener",value:function(){this.documentDragListener=this.onDrag.bind(this),this.documentDragEndListener=this.onDragEnd.bind(this),window.document.addEventListener("mousemove",this.documentDragListener),window.document.addEventListener("mouseup",this.documentDragEndListener)}},{key:"unbindDocumentDragListener",value:function(){this.documentDragListener&&this.documentDragEndListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragListener=null,this.documentDragEndListener=null)}},{key:"bindDocumentResizeListeners",value:function(){this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.onResizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)}},{key:"unbindDocumentResizeListeners",value:function(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}},{key:"bindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener=function(i){var n=i.currentTarget;if(n&&n.primeDialogParams){var s=n.primeDialogParams,o=s.length,a=s[o-1]?s[o-1].id:void 0;if(a===e.state.id){var r=document.getElementById(a);if(27===i.which)e.onClose(i),i.stopImmediatePropagation(),s.splice(o-1,1);else if(9===i.which){i.preventDefault();var l=t.DomHandler.getFocusableElements(r);if(l&&l.length>0)if(document.activeElement){var d=l.indexOf(document.activeElement);i.shiftKey?-1===d||0===d?l[l.length-1].focus():l[d-1].focus():-1===d||d===l.length-1?l[0].focus():l[d+1].focus()}else l[0].focus()}}}};var i,n={id:this.state.id,hasBlockScroll:this.props.blockScroll};document.primeDialogParams=document.primeDialogParams?[].concat(o(i=document.primeDialogParams)||a(i)||r(i)||l(),[n]):[n],document.addEventListener("keydown",this.documentKeyDownListener)}},{key:"unbindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener&&(document.removeEventListener("keydown",this.documentKeyDownListener),document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(t){return t.id!==e.state.id})),this.documentKeyDownListener=null)}},{key:"createStyle",value:function(){if(!this.styleElement){this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement);var e="";for(var t in this.props.breakpoints)e+="\n @media screen and (max-width: ".concat(t,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.props.breakpoints[t]," !important;\n }\n }\n ");this.styleElement.innerHTML=e}}},{key:"componentDidMount",value:function(){var e=this;this.state.id||this.setState({id:t.UniqueComponentId()}),this.props.visible&&this.setState({visible:!0},(function(){t.ZIndexUtils.set("modal",e.mask,e.props.baseZIndex)})),this.props.breakpoints&&this.createStyle()}},{key:"componentDidUpdate",value:function(e){var i=this;this.props.visible&&!this.state.maskVisible&&this.setState({maskVisible:!0},(function(){t.ZIndexUtils.set("modal",i.mask,i.props.baseZIndex)})),this.props.visible!==this.state.visible&&this.state.maskVisible&&this.setState({visible:this.props.visible}),e.maximized!==this.props.maximized&&this.props.onMaximize&&this.changeScrollOnMaximizable()}},{key:"changeScrollOnMaximizable",value:function(){this.props.blockScroll||t.DomHandler[this.maximized?"addClass":"removeClass"](document.body,"p-overflow-hidden")}},{key:"componentWillUnmount",value:function(){this.disableDocumentSettings(),this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null),t.ZIndexUtils.clear(this.mask)}},{key:"renderCloseIcon",value:function(){var e=this;return this.props.closable?n.default.createElement("button",{ref:function(t){return e.closeElement=t},type:"button",className:"p-dialog-header-icon p-dialog-header-close p-link","aria-label":this.props.ariaCloseIconLabel,onClick:this.onClose},n.default.createElement("span",{className:"p-dialog-header-close-icon pi pi-times"}),n.default.createElement(t.Ripple,null)):null}},{key:"renderMaximizeIcon",value:function(){var e=t.classNames("p-dialog-header-maximize-icon pi",{"pi-window-maximize":!this.maximized,"pi-window-minimize":this.maximized});return this.props.maximizable?n.default.createElement("button",{type:"button",className:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:this.toggleMaximize},n.default.createElement("span",{className:e}),n.default.createElement(t.Ripple,null)):null}},{key:"renderHeader",value:function(){var e=this;if(this.props.showHeader){var i=this.renderCloseIcon(),s=this.renderMaximizeIcon(),o=t.ObjectUtils.getJSXElement(this.props.icons,this.props),a=t.ObjectUtils.getJSXElement(this.props.header,this.props);return n.default.createElement("div",{ref:function(t){return e.headerEl=t},className:"p-dialog-header",onMouseDown:this.onDragStart},n.default.createElement("div",{id:this.state.id+"_header",className:"p-dialog-title"},a),n.default.createElement("div",{className:"p-dialog-header-icons"},o,s,i))}return null}},{key:"renderContent",value:function(){var e=this,i=t.classNames("p-dialog-content",this.props.contentClassName);return n.default.createElement("div",{id:this.state.id+"_content",ref:function(t){return e.contentEl=t},className:i,style:this.props.contentStyle},this.props.children)}},{key:"renderFooter",value:function(){var e=this,i=t.ObjectUtils.getJSXElement(this.props.footer,this.props);return i&&n.default.createElement("div",{ref:function(t){return e.footerElement=t},className:"p-dialog-footer"},i)}},{key:"renderResizer",value:function(){return this.props.resizable?n.default.createElement("div",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:this.onResizeStart}):null}},{key:"renderElement",value:function(){var e=this,i=t.classNames("p-dialog p-component",this.props.className,{"p-dialog-rtl":this.props.rtl,"p-dialog-maximized":this.maximized}),s=t.classNames("p-dialog-mask",{"p-component-overlay":this.props.modal,"p-dialog-visible":this.state.maskVisible,"p-dialog-draggable":this.props.draggable,"p-dialog-resizable":this.props.resizable},this.props.maskClassName,this.getPositionClass()),o=this.renderHeader(),a=this.renderContent(),r=this.renderFooter(),l=this.renderResizer();return n.default.createElement("div",{ref:function(t){return e.mask=t},className:s,onClick:this.onMaskClick},n.default.createElement(t.CSSTransition,{nodeRef:this.dialogRef,classNames:"p-dialog",timeout:{enter:"center"===this.props.position?150:300,exit:"center"===this.props.position?150:300},in:this.state.visible,options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},n.default.createElement("div",{ref:this.dialogRef,id:this.state.id,className:i,style:this.props.style,onClick:this.props.onClick,role:"dialog","aria-labelledby":this.state.id+"_header","aria-describedby":this.state.id+"_content","aria-modal":this.props.modal},o,a,r,l)))}},{key:"render",value:function(){if(this.state.maskVisible){var e=this.renderElement();return n.default.createElement(t.Portal,{element:e,appendTo:this.props.appendTo,visible:!0})}return null}}])&&u(h.prototype,y),v&&u(h,v),k}();E={id:null,header:null,footer:null,visible:!1,position:"center",draggable:!0,resizable:!0,modal:!0,onHide:null,onShow:null,contentStyle:null,contentClassName:null,closeOnEscape:!0,dismissableMask:!1,rtl:!1,closable:!0,style:null,className:null,maskClassName:null,showHeader:!0,appendTo:null,baseZIndex:0,maximizable:!1,blockScroll:!1,icons:null,ariaCloseIconLabel:"Close",focusOnShow:!0,minX:0,minY:0,keepInViewport:!0,maximized:!1,breakpoints:null,transitionOptions:null,onMaximize:null,onDragStart:null,onDrag:null,onDragEnd:null,onResizeStart:null,onResize:null,onResizeEnd:null,onClick:null,onMaskClick:null},(v="defaultProps")in(y=k)?Object.defineProperty(y,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[v]=E,exports.Dialog=k;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function s(e){if(Array.isArray(e))return o(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function r(e,t){if(e){if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(e,t):void 0}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var y,v,E,k=function(i){m(k,e.Component);var o,p,h,y,v,E=(o=k,p=b(),function(){var e,t=f(o);if(p){var i=f(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return g(this,e)});function k(e){var i;return d(this,k),(i=E.call(this,e)).state={id:e.id,maskVisible:e.visible,visible:!1},i.props.onMaximize||(i.state.maximized=e.maximized),i.onClose=i.onClose.bind(c(i)),i.toggleMaximize=i.toggleMaximize.bind(c(i)),i.onDragStart=i.onDragStart.bind(c(i)),i.onResizeStart=i.onResizeStart.bind(c(i)),i.onMaskClick=i.onMaskClick.bind(c(i)),i.onEnter=i.onEnter.bind(c(i)),i.onEntered=i.onEntered.bind(c(i)),i.onExiting=i.onExiting.bind(c(i)),i.onExited=i.onExited.bind(c(i)),i.attributeSelector=t.UniqueComponentId(),i.dialogRef=n.default.createRef(),i}return h=k,(y=[{key:"onClose",value:function(e){this.props.onHide(),e.preventDefault()}},{key:"focus",value:function(){var e=document.activeElement;!(e&&this.dialogRef&&this.dialogRef.current.contains(e))&&this.props.closable&&this.props.showHeader&&this.closeElement.focus()}},{key:"onMaskClick",value:function(e){this.props.dismissableMask&&this.props.modal&&this.mask===e.target&&this.onClose(e),this.props.onMaskClick&&this.props.onMaskClick(e)}},{key:"toggleMaximize",value:function(e){var t=!this.maximized;this.props.onMaximize?this.props.onMaximize({originalEvent:e,maximized:t}):this.setState({maximized:t},this.changeScrollOnMaximizable),e.preventDefault()}},{key:"onDragStart",value:function(e){t.DomHandler.hasClass(e.target,"p-dialog-header-icon")||t.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.props.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.dialogEl.style.margin="0",t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onDragStart&&this.props.onDragStart(e))}},{key:"onDrag",value:function(e){if(this.dragging){var i=t.DomHandler.getOuterWidth(this.dialogEl),n=t.DomHandler.getOuterHeight(this.dialogEl),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.dialogEl.getBoundingClientRect(),r=a.left+o,l=a.top+s,d=t.DomHandler.getViewport();this.dialogEl.style.position="fixed",this.props.keepInViewport?(r>=this.props.minX&&r+i<d.width&&(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px"),l>=this.props.minY&&l+n<d.height&&(this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px")):(this.lastPageX=e.pageX,this.dialogEl.style.left=r+"px",this.lastPageY=e.pageY,this.dialogEl.style.top=l+"px"),this.props.onDrag&&this.props.onDrag(e)}}},{key:"onDragEnd",value:function(e){this.dragging&&(this.dragging=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onDragEnd&&this.props.onDragEnd(e))}},{key:"onResizeStart",value:function(e){this.props.resizable&&(this.resizing=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,t.DomHandler.addClass(document.body,"p-unselectable-text"),this.props.onResizeStart&&this.props.onResizeStart(e))}},{key:"convertToPx",value:function(e,i,n){!n&&(n=t.DomHandler.getViewport());var o=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?o*(n[i]/100):o}},{key:"onResize",value:function(e){if(this.resizing){var i=e.pageX-this.lastPageX,n=e.pageY-this.lastPageY,o=t.DomHandler.getOuterWidth(this.dialogEl),s=t.DomHandler.getOuterHeight(this.dialogEl),a=this.dialogEl.getBoundingClientRect(),r=t.DomHandler.getViewport(),l=o+i,d=s+n,u=this.convertToPx(this.dialogEl.style.minWidth,"width",r),c=this.convertToPx(this.dialogEl.style.minHeight,"height",r);(!parseInt(this.dialogEl.style.top)||!parseInt(this.dialogEl.style.left))&&(l+=i,d+=n),(!u||l>u)&&a.left+l<r.width&&(this.dialogEl.style.width=l+"px"),(!c||d>c)&&a.top+d<r.height&&(this.dialogEl.style.height=d+"px"),this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.props.onResize&&this.props.onResize(e)}}},{key:"onResizeEnd",value:function(e){this.resizing&&(this.resizing=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),this.props.onResizeEnd&&this.props.onResizeEnd(e))}},{key:"resetPosition",value:function(){this.dialogEl.style.position="",this.dialogEl.style.left="",this.dialogEl.style.top="",this.dialogEl.style.margin=""}},{key:"getPositionClass",value:function(){var e=this,t=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find((function(t){return t===e.props.position||t.replace("-","")===e.props.position}));return t?"p-dialog-".concat(t):""}},{key:"maximized",get:function(){return this.props.onMaximize?this.props.maximized:this.state.maximized}},{key:"dialogEl",get:function(){return this.dialogRef.current}},{key:"onEnter",value:function(){this.dialogEl.setAttribute(this.attributeSelector,"")}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow(),this.props.focusOnShow&&this.focus(),this.enableDocumentSettings()}},{key:"onExiting",value:function(){this.props.modal&&t.DomHandler.addClass(this.mask,"p-component-overlay-leave")}},{key:"onExited",value:function(){this.dragging=!1,t.ZIndexUtils.clear(this.mask),this.setState({maskVisible:!1}),this.disableDocumentSettings()}},{key:"enableDocumentSettings",value:function(){this.bindGlobalListeners(),(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.addClass(document.body,"p-overflow-hidden")}},{key:"disableDocumentSettings",value:function(){this.unbindGlobalListeners(),this.props.modal?document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))||t.DomHandler.removeClass(document.body,"p-overflow-hidden"):(this.props.blockScroll||this.props.maximizable&&this.maximized)&&t.DomHandler.removeClass(document.body,"p-overflow-hidden")}},{key:"bindGlobalListeners",value:function(){this.props.draggable&&this.bindDocumentDragListener(),this.props.resizable&&this.bindDocumentResizeListeners(),this.props.closeOnEscape&&this.props.closable&&this.bindDocumentKeyDownListener()}},{key:"unbindGlobalListeners",value:function(){this.unbindDocumentDragListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentKeyDownListener()}},{key:"bindDocumentDragListener",value:function(){this.documentDragListener=this.onDrag.bind(this),this.documentDragEndListener=this.onDragEnd.bind(this),window.document.addEventListener("mousemove",this.documentDragListener),window.document.addEventListener("mouseup",this.documentDragEndListener)}},{key:"unbindDocumentDragListener",value:function(){this.documentDragListener&&this.documentDragEndListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragListener=null,this.documentDragEndListener=null)}},{key:"bindDocumentResizeListeners",value:function(){this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.onResizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)}},{key:"unbindDocumentResizeListeners",value:function(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}},{key:"bindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener=function(i){var n=i.currentTarget;if(n&&n.primeDialogParams){var o=n.primeDialogParams,s=o.length,a=o[s-1]?o[s-1].id:void 0;if(a===e.state.id){var r=document.getElementById(a);if(27===i.which)e.onClose(i),i.stopImmediatePropagation(),o.splice(s-1,1);else if(9===i.which){i.preventDefault();var l=t.DomHandler.getFocusableElements(r);if(l&&l.length>0)if(document.activeElement){var d=l.indexOf(document.activeElement);i.shiftKey?-1===d||0===d?l[l.length-1].focus():l[d-1].focus():-1===d||d===l.length-1?l[0].focus():l[d+1].focus()}else l[0].focus()}}}};var i,n={id:this.state.id,hasBlockScroll:this.props.blockScroll};document.primeDialogParams=document.primeDialogParams?[].concat(s(i=document.primeDialogParams)||a(i)||r(i)||l(),[n]):[n],document.addEventListener("keydown",this.documentKeyDownListener)}},{key:"unbindDocumentKeyDownListener",value:function(){var e=this;this.documentKeyDownListener&&(document.removeEventListener("keydown",this.documentKeyDownListener),document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(t){return t.id!==e.state.id})),this.documentKeyDownListener=null)}},{key:"createStyle",value:function(){if(!this.styleElement){this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement);var e="";for(var t in this.props.breakpoints)e+="\n @media screen and (max-width: ".concat(t,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.props.breakpoints[t]," !important;\n }\n }\n ");this.styleElement.innerHTML=e}}},{key:"componentDidMount",value:function(){var e=this;this.state.id||this.setState({id:t.UniqueComponentId()}),this.props.visible&&this.setState({visible:!0},(function(){t.ZIndexUtils.set("modal",e.mask,e.props.baseZIndex)})),this.props.breakpoints&&this.createStyle()}},{key:"componentDidUpdate",value:function(e){var i=this;this.props.visible&&!this.state.maskVisible&&this.setState({maskVisible:!0},(function(){t.ZIndexUtils.set("modal",i.mask,i.props.baseZIndex)})),this.props.visible!==this.state.visible&&this.state.maskVisible&&this.setState({visible:this.props.visible}),e.maximized!==this.props.maximized&&this.props.onMaximize&&this.changeScrollOnMaximizable()}},{key:"changeScrollOnMaximizable",value:function(){this.props.blockScroll||t.DomHandler[this.maximized?"addClass":"removeClass"](document.body,"p-overflow-hidden")}},{key:"componentWillUnmount",value:function(){this.disableDocumentSettings(),this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null),t.ZIndexUtils.clear(this.mask)}},{key:"renderCloseIcon",value:function(){var e=this;return this.props.closable?n.default.createElement("button",{ref:function(t){return e.closeElement=t},type:"button",className:"p-dialog-header-icon p-dialog-header-close p-link","aria-label":this.props.ariaCloseIconLabel,onClick:this.onClose},n.default.createElement("span",{className:"p-dialog-header-close-icon pi pi-times"}),n.default.createElement(t.Ripple,null)):null}},{key:"renderMaximizeIcon",value:function(){var e=t.classNames("p-dialog-header-maximize-icon pi",{"pi-window-maximize":!this.maximized,"pi-window-minimize":this.maximized});return this.props.maximizable?n.default.createElement("button",{type:"button",className:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:this.toggleMaximize},n.default.createElement("span",{className:e}),n.default.createElement(t.Ripple,null)):null}},{key:"renderHeader",value:function(){var e=this;if(this.props.showHeader){var i=this.renderCloseIcon(),o=this.renderMaximizeIcon(),s=t.ObjectUtils.getJSXElement(this.props.icons,this.props),a=t.ObjectUtils.getJSXElement(this.props.header,this.props);return n.default.createElement("div",{ref:function(t){return e.headerEl=t},className:"p-dialog-header",onMouseDown:this.onDragStart},n.default.createElement("div",{id:this.state.id+"_header",className:"p-dialog-title"},a),n.default.createElement("div",{className:"p-dialog-header-icons"},s,o,i))}return null}},{key:"renderContent",value:function(){var e=this,i=t.classNames("p-dialog-content",this.props.contentClassName);return n.default.createElement("div",{id:this.state.id+"_content",ref:function(t){return e.contentEl=t},className:i,style:this.props.contentStyle},this.props.children)}},{key:"renderFooter",value:function(){var e=this,i=t.ObjectUtils.getJSXElement(this.props.footer,this.props);return i&&n.default.createElement("div",{ref:function(t){return e.footerElement=t},className:"p-dialog-footer"},i)}},{key:"renderResizer",value:function(){return this.props.resizable?n.default.createElement("div",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:this.onResizeStart}):null}},{key:"renderElement",value:function(){var e=this,i=t.classNames("p-dialog p-component",this.props.className,{"p-dialog-rtl":this.props.rtl,"p-dialog-maximized":this.maximized}),o=t.classNames("p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.props.modal,"p-dialog-visible":this.state.maskVisible,"p-dialog-draggable":this.props.draggable,"p-dialog-resizable":this.props.resizable},this.props.maskClassName,this.getPositionClass()),s=this.renderHeader(),a=this.renderContent(),r=this.renderFooter(),l=this.renderResizer();return n.default.createElement("div",{ref:function(t){return e.mask=t},className:o,onClick:this.onMaskClick},n.default.createElement(t.CSSTransition,{nodeRef:this.dialogRef,classNames:"p-dialog",timeout:{enter:"center"===this.props.position?150:300,exit:"center"===this.props.position?150:300},in:this.state.visible,options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExiting:this.onExiting,onExited:this.onExited},n.default.createElement("div",{ref:this.dialogRef,id:this.state.id,className:i,style:this.props.style,onClick:this.props.onClick,role:"dialog","aria-labelledby":this.state.id+"_header","aria-describedby":this.state.id+"_content","aria-modal":this.props.modal},s,a,r,l)))}},{key:"render",value:function(){if(this.state.maskVisible){var e=this.renderElement();return n.default.createElement(t.Portal,{element:e,appendTo:this.props.appendTo,visible:!0})}return null}}])&&u(h.prototype,y),v&&u(h,v),k}();E={id:null,header:null,footer:null,visible:!1,position:"center",draggable:!0,resizable:!0,modal:!0,onHide:null,onShow:null,contentStyle:null,contentClassName:null,closeOnEscape:!0,dismissableMask:!1,rtl:!1,closable:!0,style:null,className:null,maskClassName:null,showHeader:!0,appendTo:null,baseZIndex:0,maximizable:!1,blockScroll:!1,icons:null,ariaCloseIconLabel:"Close",focusOnShow:!0,minX:0,minY:0,keepInViewport:!0,maximized:!1,breakpoints:null,transitionOptions:null,onMaximize:null,onDragStart:null,onDrag:null,onDragEnd:null,onResizeStart:null,onResize:null,onResizeEnd:null,onClick:null,onMaskClick:null},(v="defaultProps")in(y=k)?Object.defineProperty(y,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[v]=E,exports.Dialog=k;
@@ -109,6 +109,8 @@ function _typeof(obj) {
109
109
  function _possibleConstructorReturn(self, call) {
110
110
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
111
111
  return call;
112
+ } else if (call !== void 0) {
113
+ throw new TypeError("Derived constructors may only return object or undefined");
112
114
  }
113
115
 
114
116
  return _assertThisInitialized(self);
@@ -167,6 +169,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
167
169
  _this.onMaskClick = _this.onMaskClick.bind(_assertThisInitialized(_this));
168
170
  _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
169
171
  _this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
172
+ _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
170
173
  _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
171
174
  _this.attributeSelector = UniqueComponentId();
172
175
  _this.dialogRef = /*#__PURE__*/React.createRef();
@@ -405,6 +408,13 @@ var Dialog = /*#__PURE__*/function (_Component) {
405
408
 
406
409
  this.enableDocumentSettings();
407
410
  }
411
+ }, {
412
+ key: "onExiting",
413
+ value: function onExiting() {
414
+ if (this.props.modal) {
415
+ DomHandler.addClass(this.mask, 'p-component-overlay-leave');
416
+ }
417
+ }
408
418
  }, {
409
419
  key: "onExited",
410
420
  value: function onExited() {
@@ -763,7 +773,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
763
773
  'p-dialog-maximized': this.maximized
764
774
  });
765
775
  var maskClassName = classNames('p-dialog-mask', {
766
- 'p-component-overlay': this.props.modal,
776
+ 'p-component-overlay p-component-overlay-enter': this.props.modal,
767
777
  'p-dialog-visible': this.state.maskVisible,
768
778
  'p-dialog-draggable': this.props.draggable,
769
779
  'p-dialog-resizable': this.props.resizable
@@ -791,6 +801,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
791
801
  unmountOnExit: true,
792
802
  onEnter: this.onEnter,
793
803
  onEntered: this.onEntered,
804
+ onExiting: this.onExiting,
794
805
  onExited: this.onExited
795
806
  }, /*#__PURE__*/React.createElement("div", {
796
807
  ref: this.dialogRef,