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
@@ -84,6 +84,8 @@ function _typeof(obj) {
84
84
  function _possibleConstructorReturn(self, call) {
85
85
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
86
86
  return call;
87
+ } else if (call !== void 0) {
88
+ throw new TypeError("Derived constructors may only return object or undefined");
87
89
  }
88
90
 
89
91
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/core"),n=require("primereact/api");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=o(t),r=o(n);function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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&&c(t,e)}function f(t){return(f="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 p(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?s(t):e}function h(t){return(h=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}}exports.Ripple=function(n){l(g,t.Component);var o,c,f,y,m,v=(o=g,c=d(),function(){var t,e=h(o);if(c){var n=h(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return p(this,t)});function g(t){var e;return u(this,g),(e=v.call(this,t)).onMouseDown=e.onMouseDown.bind(s(e)),e}return f=g,(y=[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(t){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(e.DomHandler.removeClass(this.ink,"p-ink-active"),!e.DomHandler.getHeight(this.ink)&&!e.DomHandler.getWidth(this.ink)){var n=Math.max(e.DomHandler.getOuterWidth(this.target),e.DomHandler.getOuterHeight(this.target));this.ink.style.height=n+"px",this.ink.style.width=n+"px"}var o=e.DomHandler.getOffset(this.target),i=t.pageX-o.left+document.body.scrollTop-e.DomHandler.getWidth(this.ink)/2,r=t.pageY-o.top+document.body.scrollLeft-e.DomHandler.getHeight(this.ink)/2;this.ink.style.top=r+"px",this.ink.style.left=i+"px",e.DomHandler.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(t){e.DomHandler.removeClass(t.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var t=this;return r.default.ripple&&i.default.createElement("span",{ref:function(e){return t.ink=e},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}])&&a(f.prototype,y),m&&a(f,m),g}();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/core"),n=require("primereact/api");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=o(t),i=o(n);function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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&&c(t,e)}function f(t){return(f="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 p(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function h(t){return(h=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}}exports.Ripple=function(n){l(g,t.Component);var o,c,f,y,m,v=(o=g,c=d(),function(){var t,e=h(o);if(c){var n=h(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return p(this,t)});function g(t){var e;return u(this,g),(e=v.call(this,t)).onMouseDown=e.onMouseDown.bind(s(e)),e}return f=g,(y=[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(t){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(e.DomHandler.removeClass(this.ink,"p-ink-active"),!e.DomHandler.getHeight(this.ink)&&!e.DomHandler.getWidth(this.ink)){var n=Math.max(e.DomHandler.getOuterWidth(this.target),e.DomHandler.getOuterHeight(this.target));this.ink.style.height=n+"px",this.ink.style.width=n+"px"}var o=e.DomHandler.getOffset(this.target),r=t.pageX-o.left+document.body.scrollTop-e.DomHandler.getWidth(this.ink)/2,i=t.pageY-o.top+document.body.scrollLeft-e.DomHandler.getHeight(this.ink)/2;this.ink.style.top=i+"px",this.ink.style.left=r+"px",e.DomHandler.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(t){e.DomHandler.removeClass(t.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var t=this;return i.default.ripple&&r.default.createElement("span",{ref:function(e){return t.ink=e},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}])&&a(f.prototype,y),m&&a(f,m),g}();
@@ -75,6 +75,8 @@ function _typeof(obj) {
75
75
  function _possibleConstructorReturn(self, call) {
76
76
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
77
77
  return call;
78
+ } else if (call !== void 0) {
79
+ throw new TypeError("Derived constructors may only return object or undefined");
78
80
  }
79
81
 
80
82
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- import t,{Component as e}from"react";import{DomHandler as n}from"primereact/core";import i from"primereact/api";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 i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function u(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(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(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&&s(t,e)}function c(t){return(c="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 f(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?u(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(){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 h=function(s){a(d,e);var c,h,y,m,g,v=(c=d,h=p(),function(){var t,e=l(c);if(h){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return f(this,t)});function d(t){var e;return o(this,d),(e=v.call(this,t)).onMouseDown=e.onMouseDown.bind(u(e)),e}return y=d,(m=[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(t){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(n.removeClass(this.ink,"p-ink-active"),!n.getHeight(this.ink)&&!n.getWidth(this.ink)){var e=Math.max(n.getOuterWidth(this.target),n.getOuterHeight(this.target));this.ink.style.height=e+"px",this.ink.style.width=e+"px"}var i=n.getOffset(this.target),o=t.pageX-i.left+document.body.scrollTop-n.getWidth(this.ink)/2,r=t.pageY-i.top+document.body.scrollLeft-n.getHeight(this.ink)/2;this.ink.style.top=r+"px",this.ink.style.left=o+"px",n.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(t){n.removeClass(t.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var e=this;return i.ripple&&t.createElement("span",{ref:function(t){return e.ink=t},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}])&&r(y.prototype,m),g&&r(y,g),d}();export{h as Ripple};
1
+ import t,{Component as e}from"react";import{DomHandler as n}from"primereact/core";import o from"primereact/api";function i(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 u(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(s=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&&s(t,e)}function a(t){return(a="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 f(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return u(t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(){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 h=function(s){c(g,e);var a,h,y,d,m,v=(a=g,h=p(),function(){var t,e=l(a);if(h){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return f(this,t)});function g(t){var e;return i(this,g),(e=v.call(this,t)).onMouseDown=e.onMouseDown.bind(u(e)),e}return y=g,(d=[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(t){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(n.removeClass(this.ink,"p-ink-active"),!n.getHeight(this.ink)&&!n.getWidth(this.ink)){var e=Math.max(n.getOuterWidth(this.target),n.getOuterHeight(this.target));this.ink.style.height=e+"px",this.ink.style.width=e+"px"}var o=n.getOffset(this.target),i=t.pageX-o.left+document.body.scrollTop-n.getWidth(this.ink)/2,r=t.pageY-o.top+document.body.scrollLeft-n.getHeight(this.ink)/2;this.ink.style.top=r+"px",this.ink.style.left=i+"px",n.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(t){n.removeClass(t.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var e=this;return o.ripple&&t.createElement("span",{ref:function(t){return e.ink=t},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}])&&r(y.prototype,d),m&&r(y,m),g}();export{h as Ripple};
package/ripple/ripple.js CHANGED
@@ -80,6 +80,8 @@ this.primereact.ripple = (function (exports, React, core, PrimeReact) {
80
80
  function _possibleConstructorReturn(self, call) {
81
81
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
82
82
  return call;
83
+ } else if (call !== void 0) {
84
+ throw new TypeError("Derived constructors may only return object or undefined");
83
85
  }
84
86
 
85
87
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.ripple=function(t,e,n,i){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=o(e),u=o(i);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}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(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(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&&l(t,e)}function p(t){return(p="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 h(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?c(t):e}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(){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}}return t.Ripple=function(t){f(g,t);var e,i,o,l,p,m=(e=g,i=y(),function(){var t,n=d(e);if(i){var o=d(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return h(this,t)});function g(t){var e;return a(this,g),(e=m.call(this,t)).onMouseDown=e.onMouseDown.bind(c(e)),e}return o=g,(l=[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(t){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(n.DomHandler.removeClass(this.ink,"p-ink-active"),!n.DomHandler.getHeight(this.ink)&&!n.DomHandler.getWidth(this.ink)){var e=Math.max(n.DomHandler.getOuterWidth(this.target),n.DomHandler.getOuterHeight(this.target));this.ink.style.height=e+"px",this.ink.style.width=e+"px"}var i=n.DomHandler.getOffset(this.target),o=t.pageX-i.left+document.body.scrollTop-n.DomHandler.getWidth(this.ink)/2,r=t.pageY-i.top+document.body.scrollLeft-n.DomHandler.getHeight(this.ink)/2;this.ink.style.top=r+"px",this.ink.style.left=o+"px",n.DomHandler.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(t){n.DomHandler.removeClass(t.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var t=this;return u.default.ripple&&r.default.createElement("span",{ref:function(e){return t.ink=e},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}])&&s(o.prototype,l),p&&s(o,p),g}(e.Component),Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.core,primereact.api);
1
+ this.primereact=this.primereact||{},this.primereact.ripple=function(t,e,n,o){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=r(e),u=r(o);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 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(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(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&&l(t,e)}function p(t){return(p="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 h(t,e){if(e&&("object"===p(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 d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(){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}}return t.Ripple=function(t){f(v,t);var e,o,r,l,p,m=(e=v,o=y(),function(){var t,n=d(e);if(o){var r=d(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return h(this,t)});function v(t){var e;return a(this,v),(e=m.call(this,t)).onMouseDown=e.onMouseDown.bind(c(e)),e}return r=v,(l=[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(t){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(n.DomHandler.removeClass(this.ink,"p-ink-active"),!n.DomHandler.getHeight(this.ink)&&!n.DomHandler.getWidth(this.ink)){var e=Math.max(n.DomHandler.getOuterWidth(this.target),n.DomHandler.getOuterHeight(this.target));this.ink.style.height=e+"px",this.ink.style.width=e+"px"}var o=n.DomHandler.getOffset(this.target),r=t.pageX-o.left+document.body.scrollTop-n.DomHandler.getWidth(this.ink)/2,i=t.pageY-o.top+document.body.scrollLeft-n.DomHandler.getHeight(this.ink)/2;this.ink.style.top=i+"px",this.ink.style.left=r+"px",n.DomHandler.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(t){n.DomHandler.removeClass(t.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var t=this;return u.default.ripple&&i.default.createElement("span",{ref:function(e){return t.ink=e},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}])&&s(r.prototype,l),p&&s(r,p),v}(e.Component),Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.core,primereact.api);
package/row/row.cjs.js CHANGED
@@ -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 r(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 r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}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 f(t){return(f="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 i(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"!==f(e)&&"function"!=typeof e?i(t):e}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(){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 s,y,b,h=function(e){c(h,t.Component);var u,f,i,s,y,b=(u=h,f=p(),function(){var t,e=a(u);if(f){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function h(){return r(this,h),b.apply(this,arguments)}return i=h,(s=[{key:"render",value:function(){return n.default.createElement("tr",null,this.props.children)}}])&&o(i.prototype,s),y&&o(i,y),h}();b={style:null,className:null},(y="defaultProps")in(s=h)?Object.defineProperty(s,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):s[y]=b,exports.Row=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 r=t(e);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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 f(e){return(f="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 i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(){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 s,y,b,d=function(t){c(d,e.Component);var u,f,i,s,y,b=(u=d,f=p(),function(){var e,t=a(u);if(f){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return l(this,e)});function d(){return n(this,d),b.apply(this,arguments)}return i=d,(s=[{key:"render",value:function(){return r.default.createElement("tr",null,this.props.children)}}])&&o(i.prototype,s),y&&o(i,y),d}();b={style:null,className:null},(y="defaultProps")in(s=d)?Object.defineProperty(s,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):s[y]=b,exports.Row=d;
package/row/row.esm.js CHANGED
@@ -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 r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return(o=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&&o(t,e)}function c(t){return(c="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 f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?f(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(){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,s,y,b=function(o){u(h,e);var c,f,p,s,y,b=(c=h,f=a(),function(){var t,e=l(c);if(f){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return i(this,t)});function h(){return n(this,h),b.apply(this,arguments)}return p=h,(s=[{key:"render",value:function(){return t.createElement("tr",null,this.props.children)}}])&&r(p.prototype,s),y&&r(p,y),h}();y={style:null,className:null},(s="defaultProps")in(p=b)?Object.defineProperty(p,s,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[s]=y;export{b as Row};
1
+ import t,{Component as e}from"react";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(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 o(t,e){return(o=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&&o(t,e)}function c(t){return(c="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 i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(){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,y,s,b=function(o){u(h,e);var c,i,p,y,s,b=(c=h,i=a(),function(){var t,e=l(c);if(i){var r=l(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return f(this,t)});function h(){return r(this,h),b.apply(this,arguments)}return p=h,(y=[{key:"render",value:function(){return t.createElement("tr",null,this.props.children)}}])&&n(p.prototype,y),s&&n(p,s),h}();s={style:null,className:null},(y="defaultProps")in(p=b)?Object.defineProperty(p,y,{value:s,enumerable:!0,configurable:!0,writable:!0}):p[y]=s;export{b as Row};
package/row/row.js CHANGED
@@ -79,6 +79,8 @@ this.primereact.row = (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);
package/row/row.min.js CHANGED
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.row=function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=n(e);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=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&&c(t,e)}function f(t){return(f="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 l(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"!==f(e)&&"function"!=typeof e?l(t):e}function p(t){return(p=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 y,b,h,m=function(t){i(b,t);var e,n,c,f,l,y=(e=b,n=s(),function(){var t,r=p(e);if(n){var o=p(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return a(this,t)});function b(){return o(this,b),y.apply(this,arguments)}return c=b,(f=[{key:"render",value:function(){return r.default.createElement("tr",null,this.props.children)}}])&&u(c.prototype,f),l&&u(c,l),b}(e.Component);return h={style:null,className:null},(b="defaultProps")in(y=m)?Object.defineProperty(y,b,{value:h,enumerable:!0,configurable:!0,writable:!0}):y[b]=h,t.Row=m,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React);
1
+ this.primereact=this.primereact||{},this.primereact.row=function(t,e){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=r(e);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 c(t,e){return(c=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&&c(t,e)}function f(t){return(f="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 l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function p(t){return(p=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 y,b,h,d=function(t){i(b,t);var e,r,c,f,l,y=(e=b,r=s(),function(){var t,n=p(e);if(r){var o=p(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return a(this,t)});function b(){return o(this,b),y.apply(this,arguments)}return c=b,(f=[{key:"render",value:function(){return n.default.createElement("tr",null,this.props.children)}}])&&u(c.prototype,f),l&&u(c,l),b}(e.Component);return h={style:null,className:null},(b="defaultProps")in(y=d)?Object.defineProperty(y,b,{value:h,enumerable:!0,configurable:!0,writable:!0}):y[b]=h,t.Row=d,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React);
@@ -82,6 +82,8 @@ function _typeof(obj) {
82
82
  function _possibleConstructorReturn(self, call) {
83
83
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
84
84
  return call;
85
+ } else if (call !== void 0) {
86
+ throw new TypeError("Derived constructors may only return object or undefined");
85
87
  }
86
88
 
87
89
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(e);function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(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&&s(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 u(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?i(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){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,m,f,v=function(o){l(y,e.Component);var s,c,d,m,f,v=(s=y,c=h(),function(){var e,t=p(s);if(c){var o=p(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return u(this,e)});function y(e){var t;return r(this,y),(t=v.call(this,e)).moveBar=t.moveBar.bind(i(t)),t.onXBarMouseDown=t.onXBarMouseDown.bind(i(t)),t.onYBarMouseDown=t.onYBarMouseDown.bind(i(t)),t.onDocumentMouseMove=t.onDocumentMouseMove.bind(i(t)),t.onDocumentMouseUp=t.onDocumentMouseUp.bind(i(t)),t}return d=y,(m=[{key:"calculateContainerHeight",value:function(){var e=getComputedStyle(this.container),o=getComputedStyle(this.xBar),n=t.DomHandler.getHeight(this.container)-parseInt(o.height,10);"none"!==e["max-height"]&&0===n&&(this.container.style.height=this.content.offsetHeight+parseInt(o.height,10)>parseInt(e["max-height"],10)?e["max-height"]:this.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")}},{key:"moveBar",value:function(){var e=this,o=this.content.scrollWidth,n=-1*(this.container.clientHeight-this.xBar.clientHeight);this.scrollXRatio=this.content.clientWidth/o;var r=this.content.scrollHeight,a=-1*(this.container.clientWidth-this.yBar.clientWidth);this.scrollYRatio=this.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){e.scrollXRatio>=1?t.DomHandler.addClass(e.xBar,"p-scrollpanel-hidden"):(t.DomHandler.removeClass(e.xBar,"p-scrollpanel-hidden"),e.xBar.style.cssText="width:"+Math.max(100*e.scrollXRatio,10)+"%; left:"+e.content.scrollLeft/o*100+"%;bottom:"+n+"px;"),e.scrollYRatio>=1?t.DomHandler.addClass(e.yBar,"p-scrollpanel-hidden"):(t.DomHandler.removeClass(e.yBar,"p-scrollpanel-hidden"),e.yBar.style.cssText="height:"+Math.max(100*e.scrollYRatio,10)+"%; top: calc("+e.content.scrollTop/r*100+"% - "+e.xBar.clientHeight+"px);right:"+a+"px;")}))}},{key:"onYBarMouseDown",value:function(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,t.DomHandler.addClass(this.yBar,"p-scrollpanel-grabbed"),t.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onXBarMouseDown",value:function(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,t.DomHandler.addClass(this.xBar,"p-scrollpanel-grabbed"),t.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onDocumentMouseMove",value:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}},{key:"onMouseMoveForXBar",value:function(e){var t=this,o=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.content.scrollLeft+=o/t.scrollXRatio}))}},{key:"onMouseMoveForYBar",value:function(e){var t=this,o=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.content.scrollTop+=o/t.scrollYRatio}))}},{key:"onDocumentMouseUp",value:function(e){t.DomHandler.removeClass(this.yBar,"p-scrollpanel-grabbed"),t.DomHandler.removeClass(this.xBar,"p-scrollpanel-grabbed"),t.DomHandler.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)}},{key:"refresh",value:function(){this.moveBar()}},{key:"componentDidMount",value:function(){this.moveBar(),this.moveBar=this.moveBar.bind(this),window.addEventListener("resize",this.moveBar),this.calculateContainerHeight(),this.initialized=!0}},{key:"componentWillUnmount",value:function(){this.initialized&&window.removeEventListener("resize",this.moveBar),this.frame&&window.cancelAnimationFrame(this.frame)}},{key:"render",value:function(){var e=this,o=t.classNames("p-scrollpanel p-component",this.props.className);return n.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:o,style:this.props.style},n.default.createElement("div",{className:"p-scrollpanel-wrapper"},n.default.createElement("div",{ref:function(t){return e.content=t},className:"p-scrollpanel-content",onScroll:this.moveBar,onMouseEnter:this.moveBar},this.props.children)),n.default.createElement("div",{ref:function(t){return e.xBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-x",onMouseDown:this.onXBarMouseDown}),n.default.createElement("div",{ref:function(t){return e.yBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-y",onMouseDown:this.onYBarMouseDown}))}}])&&a(d.prototype,m),f&&a(d,f),y}();f={id:null,style:null,className:null},(m="defaultProps")in(d=v)?Object.defineProperty(d,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):d[m]=f,exports.ScrollPanel=v;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(e);function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(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&&s(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 u(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 i(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){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,m,f,v=function(o){l(y,e.Component);var s,c,d,m,f,v=(s=y,c=h(),function(){var e,t=p(s);if(c){var o=p(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return u(this,e)});function y(e){var t;return r(this,y),(t=v.call(this,e)).moveBar=t.moveBar.bind(i(t)),t.onXBarMouseDown=t.onXBarMouseDown.bind(i(t)),t.onYBarMouseDown=t.onYBarMouseDown.bind(i(t)),t.onDocumentMouseMove=t.onDocumentMouseMove.bind(i(t)),t.onDocumentMouseUp=t.onDocumentMouseUp.bind(i(t)),t}return d=y,(m=[{key:"calculateContainerHeight",value:function(){var e=getComputedStyle(this.container),o=getComputedStyle(this.xBar),n=t.DomHandler.getHeight(this.container)-parseInt(o.height,10);"none"!==e["max-height"]&&0===n&&(this.container.style.height=this.content.offsetHeight+parseInt(o.height,10)>parseInt(e["max-height"],10)?e["max-height"]:this.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")}},{key:"moveBar",value:function(){var e=this,o=this.content.scrollWidth,n=-1*(this.container.clientHeight-this.xBar.clientHeight);this.scrollXRatio=this.content.clientWidth/o;var r=this.content.scrollHeight,a=-1*(this.container.clientWidth-this.yBar.clientWidth);this.scrollYRatio=this.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){e.scrollXRatio>=1?t.DomHandler.addClass(e.xBar,"p-scrollpanel-hidden"):(t.DomHandler.removeClass(e.xBar,"p-scrollpanel-hidden"),e.xBar.style.cssText="width:"+Math.max(100*e.scrollXRatio,10)+"%; left:"+e.content.scrollLeft/o*100+"%;bottom:"+n+"px;"),e.scrollYRatio>=1?t.DomHandler.addClass(e.yBar,"p-scrollpanel-hidden"):(t.DomHandler.removeClass(e.yBar,"p-scrollpanel-hidden"),e.yBar.style.cssText="height:"+Math.max(100*e.scrollYRatio,10)+"%; top: calc("+e.content.scrollTop/r*100+"% - "+e.xBar.clientHeight+"px);right:"+a+"px;")}))}},{key:"onYBarMouseDown",value:function(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,t.DomHandler.addClass(this.yBar,"p-scrollpanel-grabbed"),t.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onXBarMouseDown",value:function(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,t.DomHandler.addClass(this.xBar,"p-scrollpanel-grabbed"),t.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onDocumentMouseMove",value:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}},{key:"onMouseMoveForXBar",value:function(e){var t=this,o=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.content.scrollLeft+=o/t.scrollXRatio}))}},{key:"onMouseMoveForYBar",value:function(e){var t=this,o=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.content.scrollTop+=o/t.scrollYRatio}))}},{key:"onDocumentMouseUp",value:function(e){t.DomHandler.removeClass(this.yBar,"p-scrollpanel-grabbed"),t.DomHandler.removeClass(this.xBar,"p-scrollpanel-grabbed"),t.DomHandler.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)}},{key:"refresh",value:function(){this.moveBar()}},{key:"componentDidMount",value:function(){this.moveBar(),this.moveBar=this.moveBar.bind(this),window.addEventListener("resize",this.moveBar),this.calculateContainerHeight(),this.initialized=!0}},{key:"componentWillUnmount",value:function(){this.initialized&&window.removeEventListener("resize",this.moveBar),this.frame&&window.cancelAnimationFrame(this.frame)}},{key:"render",value:function(){var e=this,o=t.classNames("p-scrollpanel p-component",this.props.className);return n.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:o,style:this.props.style},n.default.createElement("div",{className:"p-scrollpanel-wrapper"},n.default.createElement("div",{ref:function(t){return e.content=t},className:"p-scrollpanel-content",onScroll:this.moveBar,onMouseEnter:this.moveBar},this.props.children)),n.default.createElement("div",{ref:function(t){return e.xBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-x",onMouseDown:this.onXBarMouseDown}),n.default.createElement("div",{ref:function(t){return e.yBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-y",onMouseDown:this.onYBarMouseDown}))}}])&&a(d.prototype,m),f&&a(d,f),y}();f={id:null,style:null,className:null},(m="defaultProps")in(d=v)?Object.defineProperty(d,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):d[m]=f,exports.ScrollPanel=v;
@@ -74,6 +74,8 @@ function _typeof(obj) {
74
74
  function _possibleConstructorReturn(self, call) {
75
75
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
76
76
  return call;
77
+ } else if (call !== void 0) {
78
+ throw new TypeError("Derived constructors may only return object or undefined");
77
79
  }
78
80
 
79
81
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- import e,{Component as t}from"react";import{DomHandler as o,classNames as n}from"primereact/core";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(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&&s(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 u(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?a(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(){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 m,d,f,v=function(s){l(b,t);var c,m,d,f,v,y=(c=b,m=p(),function(){var e,t=h(c);if(m){var o=h(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return u(this,e)});function b(e){var t;return r(this,b),(t=y.call(this,e)).moveBar=t.moveBar.bind(a(t)),t.onXBarMouseDown=t.onXBarMouseDown.bind(a(t)),t.onYBarMouseDown=t.onYBarMouseDown.bind(a(t)),t.onDocumentMouseMove=t.onDocumentMouseMove.bind(a(t)),t.onDocumentMouseUp=t.onDocumentMouseUp.bind(a(t)),t}return d=b,(f=[{key:"calculateContainerHeight",value:function(){var e=getComputedStyle(this.container),t=getComputedStyle(this.xBar),n=o.getHeight(this.container)-parseInt(t.height,10);"none"!==e["max-height"]&&0===n&&(this.container.style.height=this.content.offsetHeight+parseInt(t.height,10)>parseInt(e["max-height"],10)?e["max-height"]:this.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")}},{key:"moveBar",value:function(){var e=this,t=this.content.scrollWidth,n=-1*(this.container.clientHeight-this.xBar.clientHeight);this.scrollXRatio=this.content.clientWidth/t;var r=this.content.scrollHeight,i=-1*(this.container.clientWidth-this.yBar.clientWidth);this.scrollYRatio=this.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){e.scrollXRatio>=1?o.addClass(e.xBar,"p-scrollpanel-hidden"):(o.removeClass(e.xBar,"p-scrollpanel-hidden"),e.xBar.style.cssText="width:"+Math.max(100*e.scrollXRatio,10)+"%; left:"+e.content.scrollLeft/t*100+"%;bottom:"+n+"px;"),e.scrollYRatio>=1?o.addClass(e.yBar,"p-scrollpanel-hidden"):(o.removeClass(e.yBar,"p-scrollpanel-hidden"),e.yBar.style.cssText="height:"+Math.max(100*e.scrollYRatio,10)+"%; top: calc("+e.content.scrollTop/r*100+"% - "+e.xBar.clientHeight+"px);right:"+i+"px;")}))}},{key:"onYBarMouseDown",value:function(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,o.addClass(this.yBar,"p-scrollpanel-grabbed"),o.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onXBarMouseDown",value:function(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,o.addClass(this.xBar,"p-scrollpanel-grabbed"),o.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onDocumentMouseMove",value:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}},{key:"onMouseMoveForXBar",value:function(e){var t=this,o=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.content.scrollLeft+=o/t.scrollXRatio}))}},{key:"onMouseMoveForYBar",value:function(e){var t=this,o=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.content.scrollTop+=o/t.scrollYRatio}))}},{key:"onDocumentMouseUp",value:function(e){o.removeClass(this.yBar,"p-scrollpanel-grabbed"),o.removeClass(this.xBar,"p-scrollpanel-grabbed"),o.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)}},{key:"refresh",value:function(){this.moveBar()}},{key:"componentDidMount",value:function(){this.moveBar(),this.moveBar=this.moveBar.bind(this),window.addEventListener("resize",this.moveBar),this.calculateContainerHeight(),this.initialized=!0}},{key:"componentWillUnmount",value:function(){this.initialized&&window.removeEventListener("resize",this.moveBar),this.frame&&window.cancelAnimationFrame(this.frame)}},{key:"render",value:function(){var t=this,o=n("p-scrollpanel p-component",this.props.className);return e.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,className:o,style:this.props.style},e.createElement("div",{className:"p-scrollpanel-wrapper"},e.createElement("div",{ref:function(e){return t.content=e},className:"p-scrollpanel-content",onScroll:this.moveBar,onMouseEnter:this.moveBar},this.props.children)),e.createElement("div",{ref:function(e){return t.xBar=e},className:"p-scrollpanel-bar p-scrollpanel-bar-x",onMouseDown:this.onXBarMouseDown}),e.createElement("div",{ref:function(e){return t.yBar=e},className:"p-scrollpanel-bar p-scrollpanel-bar-y",onMouseDown:this.onYBarMouseDown}))}}])&&i(d.prototype,f),v&&i(d,v),b}();f={id:null,style:null,className:null},(d="defaultProps")in(m=v)?Object.defineProperty(m,d,{value:f,enumerable:!0,configurable:!0,writable:!0}):m[d]=f;export{v as ScrollPanel};
1
+ import e,{Component as t}from"react";import{DomHandler as o,classNames as n}from"primereact/core";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(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&&s(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 u(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 a(e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(){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 m,d,f,v=function(s){l(b,t);var c,m,d,f,v,y=(c=b,m=p(),function(){var e,t=h(c);if(m){var o=h(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return u(this,e)});function b(e){var t;return r(this,b),(t=y.call(this,e)).moveBar=t.moveBar.bind(a(t)),t.onXBarMouseDown=t.onXBarMouseDown.bind(a(t)),t.onYBarMouseDown=t.onYBarMouseDown.bind(a(t)),t.onDocumentMouseMove=t.onDocumentMouseMove.bind(a(t)),t.onDocumentMouseUp=t.onDocumentMouseUp.bind(a(t)),t}return d=b,(f=[{key:"calculateContainerHeight",value:function(){var e=getComputedStyle(this.container),t=getComputedStyle(this.xBar),n=o.getHeight(this.container)-parseInt(t.height,10);"none"!==e["max-height"]&&0===n&&(this.container.style.height=this.content.offsetHeight+parseInt(t.height,10)>parseInt(e["max-height"],10)?e["max-height"]:this.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")}},{key:"moveBar",value:function(){var e=this,t=this.content.scrollWidth,n=-1*(this.container.clientHeight-this.xBar.clientHeight);this.scrollXRatio=this.content.clientWidth/t;var r=this.content.scrollHeight,i=-1*(this.container.clientWidth-this.yBar.clientWidth);this.scrollYRatio=this.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){e.scrollXRatio>=1?o.addClass(e.xBar,"p-scrollpanel-hidden"):(o.removeClass(e.xBar,"p-scrollpanel-hidden"),e.xBar.style.cssText="width:"+Math.max(100*e.scrollXRatio,10)+"%; left:"+e.content.scrollLeft/t*100+"%;bottom:"+n+"px;"),e.scrollYRatio>=1?o.addClass(e.yBar,"p-scrollpanel-hidden"):(o.removeClass(e.yBar,"p-scrollpanel-hidden"),e.yBar.style.cssText="height:"+Math.max(100*e.scrollYRatio,10)+"%; top: calc("+e.content.scrollTop/r*100+"% - "+e.xBar.clientHeight+"px);right:"+i+"px;")}))}},{key:"onYBarMouseDown",value:function(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,o.addClass(this.yBar,"p-scrollpanel-grabbed"),o.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onXBarMouseDown",value:function(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,o.addClass(this.xBar,"p-scrollpanel-grabbed"),o.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onDocumentMouseMove",value:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}},{key:"onMouseMoveForXBar",value:function(e){var t=this,o=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.content.scrollLeft+=o/t.scrollXRatio}))}},{key:"onMouseMoveForYBar",value:function(e){var t=this,o=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.content.scrollTop+=o/t.scrollYRatio}))}},{key:"onDocumentMouseUp",value:function(e){o.removeClass(this.yBar,"p-scrollpanel-grabbed"),o.removeClass(this.xBar,"p-scrollpanel-grabbed"),o.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)}},{key:"refresh",value:function(){this.moveBar()}},{key:"componentDidMount",value:function(){this.moveBar(),this.moveBar=this.moveBar.bind(this),window.addEventListener("resize",this.moveBar),this.calculateContainerHeight(),this.initialized=!0}},{key:"componentWillUnmount",value:function(){this.initialized&&window.removeEventListener("resize",this.moveBar),this.frame&&window.cancelAnimationFrame(this.frame)}},{key:"render",value:function(){var t=this,o=n("p-scrollpanel p-component",this.props.className);return e.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,className:o,style:this.props.style},e.createElement("div",{className:"p-scrollpanel-wrapper"},e.createElement("div",{ref:function(e){return t.content=e},className:"p-scrollpanel-content",onScroll:this.moveBar,onMouseEnter:this.moveBar},this.props.children)),e.createElement("div",{ref:function(e){return t.xBar=e},className:"p-scrollpanel-bar p-scrollpanel-bar-x",onMouseDown:this.onXBarMouseDown}),e.createElement("div",{ref:function(e){return t.yBar=e},className:"p-scrollpanel-bar p-scrollpanel-bar-y",onMouseDown:this.onYBarMouseDown}))}}])&&i(d.prototype,f),v&&i(d,v),b}();f={id:null,style:null,className:null},(d="defaultProps")in(m=v)?Object.defineProperty(m,d,{value:f,enumerable:!0,configurable:!0,writable:!0}):m[d]=f;export{v as ScrollPanel};
@@ -79,6 +79,8 @@ this.primereact.scrollpanel = (function (exports, React, core) {
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.scrollpanel=function(e,t,o){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return(l=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&&l(e,t)}function u(e){return(u="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 h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?s(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(){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,f,v,y=function(e){c(v,e);var t,n,l,u,d,f=(t=v,n=m(),function(){var e,o=p(t);if(n){var r=p(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return h(this,e)});function v(e){var t;return a(this,v),(t=f.call(this,e)).moveBar=t.moveBar.bind(s(t)),t.onXBarMouseDown=t.onXBarMouseDown.bind(s(t)),t.onYBarMouseDown=t.onYBarMouseDown.bind(s(t)),t.onDocumentMouseMove=t.onDocumentMouseMove.bind(s(t)),t.onDocumentMouseUp=t.onDocumentMouseUp.bind(s(t)),t}return l=v,(u=[{key:"calculateContainerHeight",value:function(){var e=getComputedStyle(this.container),t=getComputedStyle(this.xBar),n=o.DomHandler.getHeight(this.container)-parseInt(t.height,10);"none"!==e["max-height"]&&0===n&&(this.container.style.height=this.content.offsetHeight+parseInt(t.height,10)>parseInt(e["max-height"],10)?e["max-height"]:this.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")}},{key:"moveBar",value:function(){var e=this,t=this.content.scrollWidth,n=-1*(this.container.clientHeight-this.xBar.clientHeight);this.scrollXRatio=this.content.clientWidth/t;var r=this.content.scrollHeight,a=-1*(this.container.clientWidth-this.yBar.clientWidth);this.scrollYRatio=this.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){e.scrollXRatio>=1?o.DomHandler.addClass(e.xBar,"p-scrollpanel-hidden"):(o.DomHandler.removeClass(e.xBar,"p-scrollpanel-hidden"),e.xBar.style.cssText="width:"+Math.max(100*e.scrollXRatio,10)+"%; left:"+e.content.scrollLeft/t*100+"%;bottom:"+n+"px;"),e.scrollYRatio>=1?o.DomHandler.addClass(e.yBar,"p-scrollpanel-hidden"):(o.DomHandler.removeClass(e.yBar,"p-scrollpanel-hidden"),e.yBar.style.cssText="height:"+Math.max(100*e.scrollYRatio,10)+"%; top: calc("+e.content.scrollTop/r*100+"% - "+e.xBar.clientHeight+"px);right:"+a+"px;")}))}},{key:"onYBarMouseDown",value:function(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,o.DomHandler.addClass(this.yBar,"p-scrollpanel-grabbed"),o.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onXBarMouseDown",value:function(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,o.DomHandler.addClass(this.xBar,"p-scrollpanel-grabbed"),o.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onDocumentMouseMove",value:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}},{key:"onMouseMoveForXBar",value:function(e){var t=this,o=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.content.scrollLeft+=o/t.scrollXRatio}))}},{key:"onMouseMoveForYBar",value:function(e){var t=this,o=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.content.scrollTop+=o/t.scrollYRatio}))}},{key:"onDocumentMouseUp",value:function(e){o.DomHandler.removeClass(this.yBar,"p-scrollpanel-grabbed"),o.DomHandler.removeClass(this.xBar,"p-scrollpanel-grabbed"),o.DomHandler.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)}},{key:"refresh",value:function(){this.moveBar()}},{key:"componentDidMount",value:function(){this.moveBar(),this.moveBar=this.moveBar.bind(this),window.addEventListener("resize",this.moveBar),this.calculateContainerHeight(),this.initialized=!0}},{key:"componentWillUnmount",value:function(){this.initialized&&window.removeEventListener("resize",this.moveBar),this.frame&&window.cancelAnimationFrame(this.frame)}},{key:"render",value:function(){var e=this,t=o.classNames("p-scrollpanel p-component",this.props.className);return r.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:t,style:this.props.style},r.default.createElement("div",{className:"p-scrollpanel-wrapper"},r.default.createElement("div",{ref:function(t){return e.content=t},className:"p-scrollpanel-content",onScroll:this.moveBar,onMouseEnter:this.moveBar},this.props.children)),r.default.createElement("div",{ref:function(t){return e.xBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-x",onMouseDown:this.onXBarMouseDown}),r.default.createElement("div",{ref:function(t){return e.yBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-y",onMouseDown:this.onYBarMouseDown}))}}])&&i(l.prototype,u),d&&i(l,d),v}(t.Component);return v={id:null,style:null,className:null},(f="defaultProps")in(d=y)?Object.defineProperty(d,f,{value:v,enumerable:!0,configurable:!0,writable:!0}):d[f]=v,e.ScrollPanel=y,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.core);
1
+ this.primereact=this.primereact||{},this.primereact.scrollpanel=function(e,t,o){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return(l=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&&l(e,t)}function u(e){return(u="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 h(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function p(e){return(p=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 m,f,v,y=function(e){c(v,e);var t,n,l,u,m,f=(t=v,n=d(),function(){var e,o=p(t);if(n){var r=p(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return h(this,e)});function v(e){var t;return a(this,v),(t=f.call(this,e)).moveBar=t.moveBar.bind(s(t)),t.onXBarMouseDown=t.onXBarMouseDown.bind(s(t)),t.onYBarMouseDown=t.onYBarMouseDown.bind(s(t)),t.onDocumentMouseMove=t.onDocumentMouseMove.bind(s(t)),t.onDocumentMouseUp=t.onDocumentMouseUp.bind(s(t)),t}return l=v,(u=[{key:"calculateContainerHeight",value:function(){var e=getComputedStyle(this.container),t=getComputedStyle(this.xBar),n=o.DomHandler.getHeight(this.container)-parseInt(t.height,10);"none"!==e["max-height"]&&0===n&&(this.container.style.height=this.content.offsetHeight+parseInt(t.height,10)>parseInt(e["max-height"],10)?e["max-height"]:this.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")}},{key:"moveBar",value:function(){var e=this,t=this.content.scrollWidth,n=-1*(this.container.clientHeight-this.xBar.clientHeight);this.scrollXRatio=this.content.clientWidth/t;var r=this.content.scrollHeight,a=-1*(this.container.clientWidth-this.yBar.clientWidth);this.scrollYRatio=this.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){e.scrollXRatio>=1?o.DomHandler.addClass(e.xBar,"p-scrollpanel-hidden"):(o.DomHandler.removeClass(e.xBar,"p-scrollpanel-hidden"),e.xBar.style.cssText="width:"+Math.max(100*e.scrollXRatio,10)+"%; left:"+e.content.scrollLeft/t*100+"%;bottom:"+n+"px;"),e.scrollYRatio>=1?o.DomHandler.addClass(e.yBar,"p-scrollpanel-hidden"):(o.DomHandler.removeClass(e.yBar,"p-scrollpanel-hidden"),e.yBar.style.cssText="height:"+Math.max(100*e.scrollYRatio,10)+"%; top: calc("+e.content.scrollTop/r*100+"% - "+e.xBar.clientHeight+"px);right:"+a+"px;")}))}},{key:"onYBarMouseDown",value:function(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,o.DomHandler.addClass(this.yBar,"p-scrollpanel-grabbed"),o.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onXBarMouseDown",value:function(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,o.DomHandler.addClass(this.xBar,"p-scrollpanel-grabbed"),o.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}},{key:"onDocumentMouseMove",value:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}},{key:"onMouseMoveForXBar",value:function(e){var t=this,o=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.content.scrollLeft+=o/t.scrollXRatio}))}},{key:"onMouseMoveForYBar",value:function(e){var t=this,o=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.content.scrollTop+=o/t.scrollYRatio}))}},{key:"onDocumentMouseUp",value:function(e){o.DomHandler.removeClass(this.yBar,"p-scrollpanel-grabbed"),o.DomHandler.removeClass(this.xBar,"p-scrollpanel-grabbed"),o.DomHandler.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)}},{key:"refresh",value:function(){this.moveBar()}},{key:"componentDidMount",value:function(){this.moveBar(),this.moveBar=this.moveBar.bind(this),window.addEventListener("resize",this.moveBar),this.calculateContainerHeight(),this.initialized=!0}},{key:"componentWillUnmount",value:function(){this.initialized&&window.removeEventListener("resize",this.moveBar),this.frame&&window.cancelAnimationFrame(this.frame)}},{key:"render",value:function(){var e=this,t=o.classNames("p-scrollpanel p-component",this.props.className);return r.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:t,style:this.props.style},r.default.createElement("div",{className:"p-scrollpanel-wrapper"},r.default.createElement("div",{ref:function(t){return e.content=t},className:"p-scrollpanel-content",onScroll:this.moveBar,onMouseEnter:this.moveBar},this.props.children)),r.default.createElement("div",{ref:function(t){return e.xBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-x",onMouseDown:this.onXBarMouseDown}),r.default.createElement("div",{ref:function(t){return e.yBar=t},className:"p-scrollpanel-bar p-scrollpanel-bar-y",onMouseDown:this.onYBarMouseDown}))}}])&&i(l.prototype,u),m&&i(l,m),v}(t.Component);return v={id:null,style:null,className:null},(f="defaultProps")in(m=y)?Object.defineProperty(m,f,{value:v,enumerable:!0,configurable:!0,writable:!0}):m[f]=v,e.ScrollPanel=y,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.core);
@@ -82,6 +82,8 @@ function _typeof(obj) {
82
82
  function _possibleConstructorReturn(self, call) {
83
83
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
84
84
  return call;
85
+ } else if (call !== void 0) {
86
+ throw new TypeError("Derived constructors may only return object or undefined");
85
87
  }
86
88
 
87
89
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e);function o(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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return(s=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&&s(e,t)}function u(e){return(u="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,t){return!t||"object"!==u(t)&&"function"!=typeof t?l(e):t}function p(e){return(p=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 h,d,y,m=function(n){c(b,e.Component);var s,u,h,d,y,m=(s=b,u=f(),function(){var e,t=p(s);if(u){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function b(e){var t;return o(this,b),(t=m.call(this,e)).state={visible:!1},t.onClick=t.onClick.bind(l(t)),t.onEnter=t.onEnter.bind(l(t)),t.onEntered=t.onEntered.bind(l(t)),t.onExited=t.onExited.bind(l(t)),t.scrollElementRef=r.default.createRef(),t}return h=b,(d=[{key:"onClick",value:function(){("window"===this.props.target?window:this.helper.parentElement).scroll({top:0,behavior:this.props.behavior})}},{key:"checkVisibility",value:function(e){this.setState({visible:e>this.props.threshold})}},{key:"bindParentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(e.helper.parentElement.scrollTop)},this.helper.parentElement.addEventListener("scroll",this.scrollListener)}},{key:"bindDocumentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(t.DomHandler.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)}},{key:"unbindParentScrollListener",value:function(){this.scrollListener&&(this.helper.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"unbindDocumentScrollListener",value:function(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"onEnter",value:function(){t.ZIndexUtils.set("overlay",this.scrollElementRef.current)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExited",value:function(){t.ZIndexUtils.clear(this.scrollElementRef.current),this.props.onHide&&this.props.onHide()}},{key:"componentDidMount",value:function(){"window"===this.props.target?this.bindDocumentScrollListener():"parent"===this.props.target&&this.bindParentScrollListener()}},{key:"componentWillUnmount",value:function(){"window"===this.props.target?this.unbindDocumentScrollListener():"parent"===this.props.target&&this.unbindParentScrollListener(),t.ZIndexUtils.clear(this.scrollElementRef.current)}},{key:"render",value:function(){var e=this,n=t.classNames("p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.props.target},this.props.className),o=t.classNames("p-scrolltop-icon",this.props.icon),i="parent"===this.props.target;return r.default.createElement(r.default.Fragment,null,r.default.createElement(t.CSSTransition,{nodeRef:this.scrollElementRef,classNames:"p-scrolltop",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},r.default.createElement("button",{ref:this.scrollElementRef,type:"button",className:n,style:this.props.style,onClick:this.onClick},r.default.createElement("span",{className:o}),r.default.createElement(t.Ripple,null))),i&&r.default.createElement("span",{ref:function(t){return e.helper=t},className:"p-scrolltop-helper"}))}}])&&i(h.prototype,d),y&&i(h,y),b}();y={target:"window",threshold:400,icon:"pi pi-chevron-up",behavior:"smooth",className:null,style:null,transitionOptions:null,onShow:null,onHide:null},(d="defaultProps")in(h=m)?Object.defineProperty(h,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):h[d]=y,exports.ScrollTop=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e);function o(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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return(s=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&&s(e,t)}function u(e){return(u="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,t){if(t&&("object"===u(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 p(e){return(p=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 h,d,y,m=function(n){c(b,e.Component);var s,u,h,d,y,m=(s=b,u=f(),function(){var e,t=p(s);if(u){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function b(e){var t;return o(this,b),(t=m.call(this,e)).state={visible:!1},t.onClick=t.onClick.bind(l(t)),t.onEnter=t.onEnter.bind(l(t)),t.onEntered=t.onEntered.bind(l(t)),t.onExited=t.onExited.bind(l(t)),t.scrollElementRef=r.default.createRef(),t}return h=b,(d=[{key:"onClick",value:function(){("window"===this.props.target?window:this.helper.parentElement).scroll({top:0,behavior:this.props.behavior})}},{key:"checkVisibility",value:function(e){this.setState({visible:e>this.props.threshold})}},{key:"bindParentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(e.helper.parentElement.scrollTop)},this.helper.parentElement.addEventListener("scroll",this.scrollListener)}},{key:"bindDocumentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(t.DomHandler.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)}},{key:"unbindParentScrollListener",value:function(){this.scrollListener&&(this.helper.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"unbindDocumentScrollListener",value:function(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"onEnter",value:function(){t.ZIndexUtils.set("overlay",this.scrollElementRef.current)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExited",value:function(){t.ZIndexUtils.clear(this.scrollElementRef.current),this.props.onHide&&this.props.onHide()}},{key:"componentDidMount",value:function(){"window"===this.props.target?this.bindDocumentScrollListener():"parent"===this.props.target&&this.bindParentScrollListener()}},{key:"componentWillUnmount",value:function(){"window"===this.props.target?this.unbindDocumentScrollListener():"parent"===this.props.target&&this.unbindParentScrollListener(),t.ZIndexUtils.clear(this.scrollElementRef.current)}},{key:"render",value:function(){var e=this,n=t.classNames("p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.props.target},this.props.className),o=t.classNames("p-scrolltop-icon",this.props.icon),i="parent"===this.props.target;return r.default.createElement(r.default.Fragment,null,r.default.createElement(t.CSSTransition,{nodeRef:this.scrollElementRef,classNames:"p-scrolltop",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},r.default.createElement("button",{ref:this.scrollElementRef,type:"button",className:n,style:this.props.style,onClick:this.onClick},r.default.createElement("span",{className:o}),r.default.createElement(t.Ripple,null))),i&&r.default.createElement("span",{ref:function(t){return e.helper=t},className:"p-scrolltop-helper"}))}}])&&i(h.prototype,d),y&&i(h,y),b}();y={target:"window",threshold:400,icon:"pi pi-chevron-up",behavior:"smooth",className:null,style:null,transitionOptions:null,onShow:null,onHide:null},(d="defaultProps")in(h=m)?Object.defineProperty(h,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):h[d]=y,exports.ScrollTop=m;
@@ -74,6 +74,8 @@ function _typeof(obj) {
74
74
  function _possibleConstructorReturn(self, call) {
75
75
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
76
76
  return call;
77
+ } else if (call !== void 0) {
78
+ throw new TypeError("Derived constructors may only return object or undefined");
77
79
  }
78
80
 
79
81
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- import e,{Component as t}from"react";import{DomHandler as n,ZIndexUtils as r,classNames as o,CSSTransition as i,Ripple as l}from"primereact/core";function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(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&&a(e,t)}function f(e){return(f="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 h(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?u(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(){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,b,v,E=function(a){p(k,t);var f,d,b,v,E,w=(f=k,d=m(),function(){var e,t=y(f);if(d){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function k(t){var n;return s(this,k),(n=w.call(this,t)).state={visible:!1},n.onClick=n.onClick.bind(u(n)),n.onEnter=n.onEnter.bind(u(n)),n.onEntered=n.onEntered.bind(u(n)),n.onExited=n.onExited.bind(u(n)),n.scrollElementRef=e.createRef(),n}return b=k,(v=[{key:"onClick",value:function(){("window"===this.props.target?window:this.helper.parentElement).scroll({top:0,behavior:this.props.behavior})}},{key:"checkVisibility",value:function(e){this.setState({visible:e>this.props.threshold})}},{key:"bindParentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(e.helper.parentElement.scrollTop)},this.helper.parentElement.addEventListener("scroll",this.scrollListener)}},{key:"bindDocumentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(n.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)}},{key:"unbindParentScrollListener",value:function(){this.scrollListener&&(this.helper.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"unbindDocumentScrollListener",value:function(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"onEnter",value:function(){r.set("overlay",this.scrollElementRef.current)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExited",value:function(){r.clear(this.scrollElementRef.current),this.props.onHide&&this.props.onHide()}},{key:"componentDidMount",value:function(){"window"===this.props.target?this.bindDocumentScrollListener():"parent"===this.props.target&&this.bindParentScrollListener()}},{key:"componentWillUnmount",value:function(){"window"===this.props.target?this.unbindDocumentScrollListener():"parent"===this.props.target&&this.unbindParentScrollListener(),r.clear(this.scrollElementRef.current)}},{key:"render",value:function(){var t=this,n=o("p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.props.target},this.props.className),r=o("p-scrolltop-icon",this.props.icon),s="parent"===this.props.target;return e.createElement(e.Fragment,null,e.createElement(i,{nodeRef:this.scrollElementRef,classNames:"p-scrolltop",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},e.createElement("button",{ref:this.scrollElementRef,type:"button",className:n,style:this.props.style,onClick:this.onClick},e.createElement("span",{className:r}),e.createElement(l,null))),s&&e.createElement("span",{ref:function(e){return t.helper=e},className:"p-scrolltop-helper"}))}}])&&c(b.prototype,v),E&&c(b,E),k}();v={target:"window",threshold:400,icon:"pi pi-chevron-up",behavior:"smooth",className:null,style:null,transitionOptions:null,onShow:null,onHide:null},(b="defaultProps")in(d=E)?Object.defineProperty(d,b,{value:v,enumerable:!0,configurable:!0,writable:!0}):d[b]=v;export{E as ScrollTop};
1
+ import e,{Component as t}from"react";import{DomHandler as n,ZIndexUtils as r,classNames as o,CSSTransition as i,Ripple as l}from"primereact/core";function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(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&&a(e,t)}function f(e){return(f="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 h(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function y(e){return(y=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 m,b,v,E=function(a){p(k,t);var f,m,b,v,E,w=(f=k,m=d(),function(){var e,t=y(f);if(m){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function k(t){var n;return s(this,k),(n=w.call(this,t)).state={visible:!1},n.onClick=n.onClick.bind(u(n)),n.onEnter=n.onEnter.bind(u(n)),n.onEntered=n.onEntered.bind(u(n)),n.onExited=n.onExited.bind(u(n)),n.scrollElementRef=e.createRef(),n}return b=k,(v=[{key:"onClick",value:function(){("window"===this.props.target?window:this.helper.parentElement).scroll({top:0,behavior:this.props.behavior})}},{key:"checkVisibility",value:function(e){this.setState({visible:e>this.props.threshold})}},{key:"bindParentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(e.helper.parentElement.scrollTop)},this.helper.parentElement.addEventListener("scroll",this.scrollListener)}},{key:"bindDocumentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(n.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)}},{key:"unbindParentScrollListener",value:function(){this.scrollListener&&(this.helper.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"unbindDocumentScrollListener",value:function(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"onEnter",value:function(){r.set("overlay",this.scrollElementRef.current)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExited",value:function(){r.clear(this.scrollElementRef.current),this.props.onHide&&this.props.onHide()}},{key:"componentDidMount",value:function(){"window"===this.props.target?this.bindDocumentScrollListener():"parent"===this.props.target&&this.bindParentScrollListener()}},{key:"componentWillUnmount",value:function(){"window"===this.props.target?this.unbindDocumentScrollListener():"parent"===this.props.target&&this.unbindParentScrollListener(),r.clear(this.scrollElementRef.current)}},{key:"render",value:function(){var t=this,n=o("p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.props.target},this.props.className),r=o("p-scrolltop-icon",this.props.icon),s="parent"===this.props.target;return e.createElement(e.Fragment,null,e.createElement(i,{nodeRef:this.scrollElementRef,classNames:"p-scrolltop",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},e.createElement("button",{ref:this.scrollElementRef,type:"button",className:n,style:this.props.style,onClick:this.onClick},e.createElement("span",{className:r}),e.createElement(l,null))),s&&e.createElement("span",{ref:function(e){return t.helper=e},className:"p-scrolltop-helper"}))}}])&&c(b.prototype,v),E&&c(b,E),k}();v={target:"window",threshold:400,icon:"pi pi-chevron-up",behavior:"smooth",className:null,style:null,transitionOptions:null,onShow:null,onHide:null},(b="defaultProps")in(m=E)?Object.defineProperty(m,b,{value:v,enumerable:!0,configurable:!0,writable:!0}):m[b]=v;export{E as ScrollTop};
@@ -79,6 +79,8 @@ this.primereact.scrolltop = (function (exports, React, core) {
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.scrolltop=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(t);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return(c=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&&c(e,t)}function a(e){return(a="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 p(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?s(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){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,m,y,b=function(e){u(y,e);var t,r,c,a,d,m=(t=y,r=h(),function(){var e,n=f(t);if(r){var o=f(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return p(this,e)});function y(e){var t;return i(this,y),(t=m.call(this,e)).state={visible:!1},t.onClick=t.onClick.bind(s(t)),t.onEnter=t.onEnter.bind(s(t)),t.onEntered=t.onEntered.bind(s(t)),t.onExited=t.onExited.bind(s(t)),t.scrollElementRef=o.default.createRef(),t}return c=y,(a=[{key:"onClick",value:function(){("window"===this.props.target?window:this.helper.parentElement).scroll({top:0,behavior:this.props.behavior})}},{key:"checkVisibility",value:function(e){this.setState({visible:e>this.props.threshold})}},{key:"bindParentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(e.helper.parentElement.scrollTop)},this.helper.parentElement.addEventListener("scroll",this.scrollListener)}},{key:"bindDocumentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(n.DomHandler.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)}},{key:"unbindParentScrollListener",value:function(){this.scrollListener&&(this.helper.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"unbindDocumentScrollListener",value:function(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"onEnter",value:function(){n.ZIndexUtils.set("overlay",this.scrollElementRef.current)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExited",value:function(){n.ZIndexUtils.clear(this.scrollElementRef.current),this.props.onHide&&this.props.onHide()}},{key:"componentDidMount",value:function(){"window"===this.props.target?this.bindDocumentScrollListener():"parent"===this.props.target&&this.bindParentScrollListener()}},{key:"componentWillUnmount",value:function(){"window"===this.props.target?this.unbindDocumentScrollListener():"parent"===this.props.target&&this.unbindParentScrollListener(),n.ZIndexUtils.clear(this.scrollElementRef.current)}},{key:"render",value:function(){var e=this,t=n.classNames("p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.props.target},this.props.className),r=n.classNames("p-scrolltop-icon",this.props.icon),i="parent"===this.props.target;return o.default.createElement(o.default.Fragment,null,o.default.createElement(n.CSSTransition,{nodeRef:this.scrollElementRef,classNames:"p-scrolltop",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},o.default.createElement("button",{ref:this.scrollElementRef,type:"button",className:t,style:this.props.style,onClick:this.onClick},o.default.createElement("span",{className:r}),o.default.createElement(n.Ripple,null))),i&&o.default.createElement("span",{ref:function(t){return e.helper=t},className:"p-scrolltop-helper"}))}}])&&l(c.prototype,a),d&&l(c,d),y}(t.Component);return y={target:"window",threshold:400,icon:"pi pi-chevron-up",behavior:"smooth",className:null,style:null,transitionOptions:null,onShow:null,onHide:null},(m="defaultProps")in(d=b)?Object.defineProperty(d,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[m]=y,e.ScrollTop=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.core);
1
+ this.primereact=this.primereact||{},this.primereact.scrolltop=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(t);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return(c=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&&c(e,t)}function a(e){return(a="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 p(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){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,y,m,b=function(e){u(m,e);var t,r,c,a,d,y=(t=m,r=h(),function(){var e,n=f(t);if(r){var o=f(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return p(this,e)});function m(e){var t;return i(this,m),(t=y.call(this,e)).state={visible:!1},t.onClick=t.onClick.bind(s(t)),t.onEnter=t.onEnter.bind(s(t)),t.onEntered=t.onEntered.bind(s(t)),t.onExited=t.onExited.bind(s(t)),t.scrollElementRef=o.default.createRef(),t}return c=m,(a=[{key:"onClick",value:function(){("window"===this.props.target?window:this.helper.parentElement).scroll({top:0,behavior:this.props.behavior})}},{key:"checkVisibility",value:function(e){this.setState({visible:e>this.props.threshold})}},{key:"bindParentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(e.helper.parentElement.scrollTop)},this.helper.parentElement.addEventListener("scroll",this.scrollListener)}},{key:"bindDocumentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(n.DomHandler.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)}},{key:"unbindParentScrollListener",value:function(){this.scrollListener&&(this.helper.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"unbindDocumentScrollListener",value:function(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"onEnter",value:function(){n.ZIndexUtils.set("overlay",this.scrollElementRef.current)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExited",value:function(){n.ZIndexUtils.clear(this.scrollElementRef.current),this.props.onHide&&this.props.onHide()}},{key:"componentDidMount",value:function(){"window"===this.props.target?this.bindDocumentScrollListener():"parent"===this.props.target&&this.bindParentScrollListener()}},{key:"componentWillUnmount",value:function(){"window"===this.props.target?this.unbindDocumentScrollListener():"parent"===this.props.target&&this.unbindParentScrollListener(),n.ZIndexUtils.clear(this.scrollElementRef.current)}},{key:"render",value:function(){var e=this,t=n.classNames("p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.props.target},this.props.className),r=n.classNames("p-scrolltop-icon",this.props.icon),i="parent"===this.props.target;return o.default.createElement(o.default.Fragment,null,o.default.createElement(n.CSSTransition,{nodeRef:this.scrollElementRef,classNames:"p-scrolltop",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},o.default.createElement("button",{ref:this.scrollElementRef,type:"button",className:t,style:this.props.style,onClick:this.onClick},o.default.createElement("span",{className:r}),o.default.createElement(n.Ripple,null))),i&&o.default.createElement("span",{ref:function(t){return e.helper=t},className:"p-scrolltop-helper"}))}}])&&l(c.prototype,a),d&&l(c,d),m}(t.Component);return m={target:"window",threshold:400,icon:"pi pi-chevron-up",behavior:"smooth",className:null,style:null,transitionOptions:null,onShow:null,onHide:null},(y="defaultProps")in(d=b)?Object.defineProperty(d,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):d[y]=m,e.ScrollTop=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.core);
@@ -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);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/core");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t);function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function i(t){if(Array.isArray(t))return r(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function s(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function a(){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){return i(t)||l(t)||s(t)||a()}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),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 b(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 v(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?h(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(){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(n){b(s,t.Component);var r,i,l=(r=s,i=g(),function(){var t,e=m(r);if(i){var n=m(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return v(this,t)});function s(t){var e;return p(this,s),(e=l.call(this,t)).state={focused:!1},e.onClick=e.onClick.bind(h(e)),e.onFocus=e.onFocus.bind(h(e)),e.onBlur=e.onBlur.bind(h(e)),e.onKeyDown=e.onKeyDown.bind(h(e)),e}return f(s,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"onKeyDown",value:function(t){var e=t.which;32!==e&&13!==e||(this.onClick(t),t.preventDefault())}},{key:"renderContent",value:function(){return this.props.template?this.props.template(this.props.option):o.default.createElement("span",{className:"p-button-label p-c"},this.props.label)}},{key:"render",value:function(){var t=e.classNames("p-button p-component",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled,"p-focus":this.state.focused},this.props.className),n=this.renderContent();return o.default.createElement("div",{className:t,role:"button","aria-label":this.props.label,"aria-pressed":this.props.selected,"aria-labelledby":this.props.ariaLabelledBy,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,onFocus:this.onFocus,onBlur:this.onBlur},n,!this.props.disabled&&o.default.createElement(e.Ripple,null))}}]),s}();function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=D(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function D(t,e){if(t){if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function P(){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}}O(k,"defaultProps",{option:null,label:null,className:null,selected:null,tabIndex:null,ariaLabelledBy:null,template:null,onClick:null});var B=function(n){b(s,t.Component);var r,i,l=(r=s,i=P(),function(){var t,e=m(r);if(i){var n=m(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return v(this,t)});function s(t){var e;return p(this,s),(e=l.call(this,t)).onOptionClick=e.onOptionClick.bind(h(e)),e}return f(s,[{key:"onOptionClick",value:function(t){var n=this;if(!this.props.disabled&&!this.isOptionDisabled(t.option)){var o=this.isSelected(t.option);if(!o||this.props.unselectable){var r,i=this.getOptionValue(t.option);if(this.props.multiple){var l=this.props.value?u(this.props.value):[];r=o?l.filter((function(t){return!e.ObjectUtils.equals(t,i,n.props.dataKey)})):[].concat(u(l),[i])}else r=o?null:i;this.props.onChange&&this.props.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}}}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?e.ObjectUtils.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?e.ObjectUtils.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?e.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):e.ObjectUtils.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"isSelected",value:function(t){var n=!1,o=this.getOptionValue(t);if(this.props.multiple){if(this.props.value&&this.props.value.length){var r,i=C(this.props.value);try{for(i.s();!(r=i.n()).done;){if(e.ObjectUtils.equals(r.value,o,this.props.dataKey)){n=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else n=e.ObjectUtils.equals(this.props.value,o,this.props.dataKey);return n}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(w({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=e.tip({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderItems",value:function(){var t=this;return this.props.options&&this.props.options.length?this.props.options.map((function(e,n){var r=t.props.disabled||t.isOptionDisabled(e),i=t.getOptionLabel(e),l=r?null:0;return o.default.createElement(k,{key:"".concat(i,"_").concat(n),label:i,className:e.className,option:e,onClick:t.onOptionClick,template:t.props.itemTemplate,selected:t.isSelected(e),tabIndex:l,disabled:r,ariaLabelledBy:t.props.ariaLabelledBy})})):null}},{key:"render",value:function(){var t=this,n=e.classNames("p-selectbutton p-buttonset p-component",this.props.className),r=this.renderItems();return o.default.createElement("div",{id:this.props.id,ref:function(e){return t.element=e},className:n,style:this.props.style,role:"group"},r)}}]),s}();O(B,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,itemTemplate:null,onChange:null}),exports.SelectButton=B;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/core");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t);function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function i(t){if(Array.isArray(t))return r(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function s(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function a(){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){return i(t)||l(t)||s(t)||a()}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(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&&h(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 v(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 d(t)}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(){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 j=function(n){b(s,t.Component);var r,i,l=(r=s,i=g(),function(){var t,e=m(r);if(i){var n=m(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return v(this,t)});function s(t){var e;return p(this,s),(e=l.call(this,t)).state={focused:!1},e.onClick=e.onClick.bind(d(e)),e.onFocus=e.onFocus.bind(d(e)),e.onBlur=e.onBlur.bind(d(e)),e.onKeyDown=e.onKeyDown.bind(d(e)),e}return f(s,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"onKeyDown",value:function(t){var e=t.which;32!==e&&13!==e||(this.onClick(t),t.preventDefault())}},{key:"renderContent",value:function(){return this.props.template?this.props.template(this.props.option):o.default.createElement("span",{className:"p-button-label p-c"},this.props.label)}},{key:"render",value:function(){var t=e.classNames("p-button p-component",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled,"p-focus":this.state.focused},this.props.className),n=this.renderContent();return o.default.createElement("div",{className:t,role:"button","aria-label":this.props.label,"aria-pressed":this.props.selected,"aria-labelledby":this.props.ariaLabelledBy,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,onFocus:this.onFocus,onBlur:this.onBlur},n,!this.props.disabled&&o.default.createElement(e.Ripple,null))}}]),s}();function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function D(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=C(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function C(t,e){if(t){if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function P(){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}}O(j,"defaultProps",{option:null,label:null,className:null,selected:null,tabIndex:null,ariaLabelledBy:null,template:null,onClick:null});var E=function(n){b(s,t.Component);var r,i,l=(r=s,i=P(),function(){var t,e=m(r);if(i){var n=m(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return v(this,t)});function s(t){var e;return p(this,s),(e=l.call(this,t)).onOptionClick=e.onOptionClick.bind(d(e)),e}return f(s,[{key:"onOptionClick",value:function(t){var n=this;if(!this.props.disabled&&!this.isOptionDisabled(t.option)){var o=this.isSelected(t.option);if(!o||this.props.unselectable){var r,i=this.getOptionValue(t.option);if(this.props.multiple){var l=this.props.value?u(this.props.value):[];r=o?l.filter((function(t){return!e.ObjectUtils.equals(t,i,n.props.dataKey)})):[].concat(u(l),[i])}else r=o?null:i;this.props.onChange&&this.props.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}}}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?e.ObjectUtils.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?e.ObjectUtils.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?e.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):e.ObjectUtils.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"isSelected",value:function(t){var n=!1,o=this.getOptionValue(t);if(this.props.multiple){if(this.props.value&&this.props.value.length){var r,i=D(this.props.value);try{for(i.s();!(r=i.n()).done;){if(e.ObjectUtils.equals(r.value,o,this.props.dataKey)){n=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else n=e.ObjectUtils.equals(this.props.value,o,this.props.dataKey);return n}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(w({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=e.tip({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderItems",value:function(){var t=this;return this.props.options&&this.props.options.length?this.props.options.map((function(e,n){var r=t.props.disabled||t.isOptionDisabled(e),i=t.getOptionLabel(e),l=r?null:0;return o.default.createElement(j,{key:"".concat(i,"_").concat(n),label:i,className:e.className,option:e,onClick:t.onOptionClick,template:t.props.itemTemplate,selected:t.isSelected(e),tabIndex:l,disabled:r,ariaLabelledBy:t.props.ariaLabelledBy})})):null}},{key:"render",value:function(){var t=this,n=e.classNames("p-selectbutton p-buttonset p-component",this.props.className),r=this.renderItems();return o.default.createElement("div",{id:this.props.id,ref:function(e){return t.element=e},className:n,style:this.props.style,role:"group"},r)}}]),s}();O(E,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,itemTemplate:null,onChange:null}),exports.SelectButton=E;
@@ -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);
@@ -1 +1 @@
1
- import t,{Component as e}from"react";import{classNames as n,Ripple as o,ObjectUtils as r,tip as i}from"primereact/core";function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function s(t){if(Array.isArray(t))return l(t)}function a(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 l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(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){return s(t)||a(t)||p(t)||u()}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 y(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(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&&b(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 O(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?d(t):e}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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 j=function(r){v(a,e);var i,l,s=(i=a,l=w(),function(){var t,e=g(i);if(l){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function a(t){var e;return f(this,a),(e=s.call(this,t)).state={focused:!1},e.onClick=e.onClick.bind(d(e)),e.onFocus=e.onFocus.bind(d(e)),e.onBlur=e.onBlur.bind(d(e)),e.onKeyDown=e.onKeyDown.bind(d(e)),e}return y(a,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"onKeyDown",value:function(t){var e=t.which;32!==e&&13!==e||(this.onClick(t),t.preventDefault())}},{key:"renderContent",value:function(){return this.props.template?this.props.template(this.props.option):t.createElement("span",{className:"p-button-label p-c"},this.props.label)}},{key:"render",value:function(){var e=n("p-button p-component",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled,"p-focus":this.state.focused},this.props.className),r=this.renderContent();return t.createElement("div",{className:e,role:"button","aria-label":this.props.label,"aria-pressed":this.props.selected,"aria-labelledby":this.props.ariaLabelledBy,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,onFocus:this.onFocus,onBlur:this.onBlur},r,!this.props.disabled&&t.createElement(o,null))}}]),a}();function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function P(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}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(t){return!1}}k(j,"defaultProps",{option:null,label:null,className:null,selected:null,tabIndex:null,ariaLabelledBy:null,template:null,onClick:null});var A=function(o){v(p,e);var l,s,a=(l=p,s=B(),function(){var t,e=g(l);if(s){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function p(t){var e;return f(this,p),(e=a.call(this,t)).onOptionClick=e.onOptionClick.bind(d(e)),e}return y(p,[{key:"onOptionClick",value:function(t){var e=this;if(!this.props.disabled&&!this.isOptionDisabled(t.option)){var n=this.isSelected(t.option);if(!n||this.props.unselectable){var o,i=this.getOptionValue(t.option);if(this.props.multiple){var l=this.props.value?c(this.props.value):[];o=n?l.filter((function(t){return!r.equals(t,i,e.props.dataKey)})):[].concat(c(l),[i])}else o=n?null:i;this.props.onChange&&this.props.onChange({originalEvent:t.originalEvent,value:o,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:o}})}}}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?r.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?r.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?r.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):r.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"isSelected",value:function(t){var e=!1,n=this.getOptionValue(t);if(this.props.multiple){if(this.props.value&&this.props.value.length){var o,i=C(this.props.value);try{for(i.s();!(o=i.n()).done;){if(r.equals(o.value,n,this.props.dataKey)){e=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else e=r.equals(this.props.value,n,this.props.dataKey);return e}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(S({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=i({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderItems",value:function(){var e=this;return this.props.options&&this.props.options.length?this.props.options.map((function(n,o){var r=e.props.disabled||e.isOptionDisabled(n),i=e.getOptionLabel(n),l=r?null:0;return t.createElement(j,{key:"".concat(i,"_").concat(o),label:i,className:n.className,option:n,onClick:e.onOptionClick,template:e.props.itemTemplate,selected:e.isSelected(n),tabIndex:l,disabled:r,ariaLabelledBy:e.props.ariaLabelledBy})})):null}},{key:"render",value:function(){var e=this,o=n("p-selectbutton p-buttonset p-component",this.props.className),r=this.renderItems();return t.createElement("div",{id:this.props.id,ref:function(t){return e.element=t},className:o,style:this.props.style,role:"group"},r)}}]),p}();k(A,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,itemTemplate:null,onChange:null});export{A as SelectButton};
1
+ import t,{Component as e}from"react";import{classNames as n,Ripple as o,ObjectUtils as r,tip as i}from"primereact/core";function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function s(t){if(Array.isArray(t))return l(t)}function a(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 l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(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){return s(t)||a(t)||p(t)||u()}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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 y(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(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&&b(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 O(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 g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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 j=function(r){v(a,e);var i,l,s=(i=a,l=w(),function(){var t,e=g(i);if(l){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function a(t){var e;return f(this,a),(e=s.call(this,t)).state={focused:!1},e.onClick=e.onClick.bind(d(e)),e.onFocus=e.onFocus.bind(d(e)),e.onBlur=e.onBlur.bind(d(e)),e.onKeyDown=e.onKeyDown.bind(d(e)),e}return y(a,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"onKeyDown",value:function(t){var e=t.which;32!==e&&13!==e||(this.onClick(t),t.preventDefault())}},{key:"renderContent",value:function(){return this.props.template?this.props.template(this.props.option):t.createElement("span",{className:"p-button-label p-c"},this.props.label)}},{key:"render",value:function(){var e=n("p-button p-component",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled,"p-focus":this.state.focused},this.props.className),r=this.renderContent();return t.createElement("div",{className:e,role:"button","aria-label":this.props.label,"aria-pressed":this.props.selected,"aria-labelledby":this.props.ariaLabelledBy,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,onFocus:this.onFocus,onBlur:this.onBlur},r,!this.props.disabled&&t.createElement(o,null))}}]),a}();function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function P(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}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(t){return!1}}k(j,"defaultProps",{option:null,label:null,className:null,selected:null,tabIndex:null,ariaLabelledBy:null,template:null,onClick:null});var A=function(o){v(p,e);var l,s,a=(l=p,s=B(),function(){var t,e=g(l);if(s){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function p(t){var e;return f(this,p),(e=a.call(this,t)).onOptionClick=e.onOptionClick.bind(d(e)),e}return y(p,[{key:"onOptionClick",value:function(t){var e=this;if(!this.props.disabled&&!this.isOptionDisabled(t.option)){var n=this.isSelected(t.option);if(!n||this.props.unselectable){var o,i=this.getOptionValue(t.option);if(this.props.multiple){var l=this.props.value?c(this.props.value):[];o=n?l.filter((function(t){return!r.equals(t,i,e.props.dataKey)})):[].concat(c(l),[i])}else o=n?null:i;this.props.onChange&&this.props.onChange({originalEvent:t.originalEvent,value:o,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:o}})}}}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?r.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?r.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?r.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):r.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"isSelected",value:function(t){var e=!1,n=this.getOptionValue(t);if(this.props.multiple){if(this.props.value&&this.props.value.length){var o,i=C(this.props.value);try{for(i.s();!(o=i.n()).done;){if(r.equals(o.value,n,this.props.dataKey)){e=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else e=r.equals(this.props.value,n,this.props.dataKey);return e}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(S({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=i({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderItems",value:function(){var e=this;return this.props.options&&this.props.options.length?this.props.options.map((function(n,o){var r=e.props.disabled||e.isOptionDisabled(n),i=e.getOptionLabel(n),l=r?null:0;return t.createElement(j,{key:"".concat(i,"_").concat(o),label:i,className:n.className,option:n,onClick:e.onOptionClick,template:e.props.itemTemplate,selected:e.isSelected(n),tabIndex:l,disabled:r,ariaLabelledBy:e.props.ariaLabelledBy})})):null}},{key:"render",value:function(){var e=this,o=n("p-selectbutton p-buttonset p-component",this.props.className),r=this.renderItems();return t.createElement("div",{id:this.props.id,ref:function(t){return e.element=t},className:o,style:this.props.style,role:"group"},r)}}]),p}();k(A,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,itemTemplate:null,onChange:null});export{A as SelectButton};
@@ -114,6 +114,8 @@ this.primereact.selectbutton = (function (exports, React, 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);