primereact 7.1.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (667) hide show
  1. package/LICENSE.md +1 -1
  2. package/accordion/accordion.cjs.js +15 -15
  3. package/accordion/accordion.cjs.min.js +1 -1
  4. package/accordion/accordion.esm.js +15 -15
  5. package/accordion/accordion.esm.min.js +1 -1
  6. package/accordion/accordion.js +15 -15
  7. package/accordion/accordion.min.js +1 -1
  8. package/api/api.cjs.js +27 -6
  9. package/api/api.cjs.min.js +1 -1
  10. package/api/api.d.ts +1 -0
  11. package/api/api.esm.js +27 -6
  12. package/api/api.esm.min.js +1 -1
  13. package/api/api.js +27 -6
  14. package/api/api.min.js +1 -1
  15. package/autocomplete/autocomplete.cjs.js +18 -18
  16. package/autocomplete/autocomplete.cjs.min.js +1 -1
  17. package/autocomplete/autocomplete.esm.js +18 -18
  18. package/autocomplete/autocomplete.esm.min.js +1 -1
  19. package/autocomplete/autocomplete.js +18 -18
  20. package/autocomplete/autocomplete.min.js +1 -1
  21. package/avatar/avatar.cjs.js +11 -11
  22. package/avatar/avatar.cjs.min.js +1 -1
  23. package/avatar/avatar.esm.js +11 -11
  24. package/avatar/avatar.esm.min.js +1 -1
  25. package/avatar/avatar.js +11 -11
  26. package/avatar/avatar.min.js +1 -1
  27. package/avatargroup/avatargroup.cjs.js +11 -11
  28. package/avatargroup/avatargroup.cjs.min.js +1 -1
  29. package/avatargroup/avatargroup.esm.js +11 -11
  30. package/avatargroup/avatargroup.esm.min.js +1 -1
  31. package/avatargroup/avatargroup.js +11 -11
  32. package/avatargroup/avatargroup.min.js +1 -1
  33. package/badge/badge.cjs.js +11 -11
  34. package/badge/badge.cjs.min.js +1 -1
  35. package/badge/badge.esm.js +11 -11
  36. package/badge/badge.esm.min.js +1 -1
  37. package/badge/badge.js +11 -11
  38. package/badge/badge.min.js +1 -1
  39. package/blockui/blockui.cjs.js +11 -11
  40. package/blockui/blockui.cjs.min.js +1 -1
  41. package/blockui/blockui.esm.js +11 -11
  42. package/blockui/blockui.esm.min.js +1 -1
  43. package/blockui/blockui.js +11 -11
  44. package/blockui/blockui.min.js +1 -1
  45. package/breadcrumb/breadcrumb.cjs.js +11 -11
  46. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  47. package/breadcrumb/breadcrumb.esm.js +11 -11
  48. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  49. package/breadcrumb/breadcrumb.js +11 -11
  50. package/breadcrumb/breadcrumb.min.js +1 -1
  51. package/button/button.cjs.js +13 -13
  52. package/button/button.cjs.min.js +1 -1
  53. package/button/button.esm.js +13 -13
  54. package/button/button.esm.min.js +1 -1
  55. package/button/button.js +13 -13
  56. package/button/button.min.js +1 -1
  57. package/calendar/calendar.cjs.js +17 -17
  58. package/calendar/calendar.cjs.min.js +1 -1
  59. package/calendar/calendar.esm.js +17 -17
  60. package/calendar/calendar.esm.min.js +1 -1
  61. package/calendar/calendar.js +17 -17
  62. package/calendar/calendar.min.js +1 -1
  63. package/captcha/captcha.cjs.js +11 -11
  64. package/captcha/captcha.cjs.min.js +1 -1
  65. package/captcha/captcha.esm.js +11 -11
  66. package/captcha/captcha.esm.min.js +1 -1
  67. package/captcha/captcha.js +11 -11
  68. package/captcha/captcha.min.js +1 -1
  69. package/card/card.cjs.js +11 -11
  70. package/card/card.cjs.min.js +1 -1
  71. package/card/card.esm.js +11 -11
  72. package/card/card.esm.min.js +1 -1
  73. package/card/card.js +11 -11
  74. package/card/card.min.js +1 -1
  75. package/carousel/carousel.cjs.js +16 -14
  76. package/carousel/carousel.cjs.min.js +1 -1
  77. package/carousel/carousel.esm.js +15 -14
  78. package/carousel/carousel.esm.min.js +1 -1
  79. package/carousel/carousel.js +17 -16
  80. package/carousel/carousel.min.js +1 -1
  81. package/cascadeselect/cascadeselect.cjs.js +14 -14
  82. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  83. package/cascadeselect/cascadeselect.esm.js +14 -14
  84. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  85. package/cascadeselect/cascadeselect.js +14 -14
  86. package/cascadeselect/cascadeselect.min.js +1 -1
  87. package/chart/chart.cjs.js +13 -13
  88. package/chart/chart.cjs.min.js +1 -1
  89. package/chart/chart.esm.js +13 -13
  90. package/chart/chart.esm.min.js +1 -1
  91. package/chart/chart.js +13 -13
  92. package/chart/chart.min.js +1 -1
  93. package/checkbox/checkbox.cjs.js +13 -13
  94. package/checkbox/checkbox.cjs.min.js +1 -1
  95. package/checkbox/checkbox.esm.js +13 -13
  96. package/checkbox/checkbox.esm.min.js +1 -1
  97. package/checkbox/checkbox.js +13 -13
  98. package/checkbox/checkbox.min.js +1 -1
  99. package/chip/chip.cjs.js +11 -11
  100. package/chip/chip.cjs.min.js +1 -1
  101. package/chip/chip.esm.js +11 -11
  102. package/chip/chip.esm.min.js +1 -1
  103. package/chip/chip.js +11 -11
  104. package/chip/chip.min.js +1 -1
  105. package/chips/chips.cjs.js +13 -13
  106. package/chips/chips.cjs.min.js +1 -1
  107. package/chips/chips.esm.js +13 -13
  108. package/chips/chips.esm.min.js +1 -1
  109. package/chips/chips.js +13 -13
  110. package/chips/chips.min.js +1 -1
  111. package/colorpicker/colorpicker.cjs.js +15 -15
  112. package/colorpicker/colorpicker.cjs.min.js +1 -1
  113. package/colorpicker/colorpicker.esm.js +15 -15
  114. package/colorpicker/colorpicker.esm.min.js +1 -1
  115. package/colorpicker/colorpicker.js +15 -15
  116. package/colorpicker/colorpicker.min.js +1 -1
  117. package/column/column.cjs.js +31 -12
  118. package/column/column.cjs.min.js +1 -1
  119. package/column/column.d.ts +4 -0
  120. package/column/column.esm.js +31 -12
  121. package/column/column.esm.min.js +1 -1
  122. package/column/column.js +31 -12
  123. package/column/column.min.js +1 -1
  124. package/columngroup/columngroup.cjs.js +28 -12
  125. package/columngroup/columngroup.cjs.min.js +1 -1
  126. package/columngroup/columngroup.esm.js +28 -12
  127. package/columngroup/columngroup.esm.min.js +1 -1
  128. package/columngroup/columngroup.js +28 -12
  129. package/columngroup/columngroup.min.js +1 -1
  130. package/confirmdialog/confirmdialog.cjs.js +13 -13
  131. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  132. package/confirmdialog/confirmdialog.esm.js +13 -13
  133. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  134. package/confirmdialog/confirmdialog.js +13 -13
  135. package/confirmdialog/confirmdialog.min.js +1 -1
  136. package/confirmpopup/confirmpopup.cjs.js +14 -14
  137. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  138. package/confirmpopup/confirmpopup.esm.js +14 -14
  139. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  140. package/confirmpopup/confirmpopup.js +14 -14
  141. package/confirmpopup/confirmpopup.min.js +1 -1
  142. package/contextmenu/contextmenu.cjs.js +13 -13
  143. package/contextmenu/contextmenu.cjs.min.js +1 -1
  144. package/contextmenu/contextmenu.esm.js +13 -13
  145. package/contextmenu/contextmenu.esm.min.js +1 -1
  146. package/contextmenu/contextmenu.js +13 -13
  147. package/contextmenu/contextmenu.min.js +1 -1
  148. package/core/core.js +326 -276
  149. package/core/core.min.js +18 -18
  150. package/csstransition/csstransition.cjs.js +17 -17
  151. package/csstransition/csstransition.cjs.min.js +1 -1
  152. package/csstransition/csstransition.esm.js +17 -17
  153. package/csstransition/csstransition.esm.min.js +1 -1
  154. package/csstransition/csstransition.js +17 -17
  155. package/csstransition/csstransition.min.js +1 -1
  156. package/datascroller/datascroller.cjs.js +11 -11
  157. package/datascroller/datascroller.cjs.min.js +1 -1
  158. package/datascroller/datascroller.esm.js +11 -11
  159. package/datascroller/datascroller.esm.min.js +1 -1
  160. package/datascroller/datascroller.js +11 -11
  161. package/datascroller/datascroller.min.js +1 -1
  162. package/datatable/datatable.cjs.js +315 -200
  163. package/datatable/datatable.cjs.min.js +1 -1
  164. package/datatable/datatable.d.ts +8 -0
  165. package/datatable/datatable.esm.js +318 -203
  166. package/datatable/datatable.esm.min.js +1 -1
  167. package/datatable/datatable.js +315 -200
  168. package/datatable/datatable.min.css +1 -1
  169. package/datatable/datatable.min.js +1 -1
  170. package/dataview/dataview.cjs.js +11 -11
  171. package/dataview/dataview.cjs.min.js +1 -1
  172. package/dataview/dataview.esm.js +11 -11
  173. package/dataview/dataview.esm.min.js +1 -1
  174. package/dataview/dataview.js +11 -11
  175. package/dataview/dataview.min.js +1 -1
  176. package/deferredcontent/deferredcontent.cjs.js +11 -11
  177. package/deferredcontent/deferredcontent.cjs.min.js +1 -1
  178. package/deferredcontent/deferredcontent.esm.js +11 -11
  179. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  180. package/deferredcontent/deferredcontent.js +11 -11
  181. package/deferredcontent/deferredcontent.min.js +1 -1
  182. package/dialog/dialog.cjs.js +19 -15
  183. package/dialog/dialog.cjs.min.js +1 -1
  184. package/dialog/dialog.esm.js +19 -15
  185. package/dialog/dialog.esm.min.js +1 -1
  186. package/dialog/dialog.js +19 -15
  187. package/dialog/dialog.min.js +1 -1
  188. package/divider/divider.cjs.js +11 -11
  189. package/divider/divider.cjs.min.js +1 -1
  190. package/divider/divider.esm.js +11 -11
  191. package/divider/divider.esm.min.js +1 -1
  192. package/divider/divider.js +11 -11
  193. package/divider/divider.min.js +1 -1
  194. package/dock/dock.cjs.js +11 -11
  195. package/dock/dock.cjs.min.js +1 -1
  196. package/dock/dock.esm.js +11 -11
  197. package/dock/dock.esm.min.js +1 -1
  198. package/dock/dock.js +11 -11
  199. package/dock/dock.min.js +1 -1
  200. package/dropdown/dropdown.cjs.js +21 -21
  201. package/dropdown/dropdown.cjs.min.js +1 -1
  202. package/dropdown/dropdown.esm.js +21 -21
  203. package/dropdown/dropdown.esm.min.js +1 -1
  204. package/dropdown/dropdown.js +21 -21
  205. package/dropdown/dropdown.min.js +1 -1
  206. package/editor/editor.cjs.js +15 -15
  207. package/editor/editor.cjs.min.js +1 -1
  208. package/editor/editor.esm.js +15 -15
  209. package/editor/editor.esm.min.js +1 -1
  210. package/editor/editor.js +15 -15
  211. package/editor/editor.min.js +1 -1
  212. package/fieldset/fieldset.cjs.js +14 -14
  213. package/fieldset/fieldset.cjs.min.js +1 -1
  214. package/fieldset/fieldset.esm.js +14 -14
  215. package/fieldset/fieldset.esm.min.js +1 -1
  216. package/fieldset/fieldset.js +14 -14
  217. package/fieldset/fieldset.min.js +1 -1
  218. package/fileupload/fileupload.cjs.js +16 -13
  219. package/fileupload/fileupload.cjs.min.js +1 -1
  220. package/fileupload/fileupload.d.ts +2 -0
  221. package/fileupload/fileupload.esm.js +16 -13
  222. package/fileupload/fileupload.esm.min.js +1 -1
  223. package/fileupload/fileupload.js +16 -13
  224. package/fileupload/fileupload.min.js +1 -1
  225. package/fullcalendar/fullcalendar.cjs.js +11 -11
  226. package/fullcalendar/fullcalendar.cjs.min.js +1 -1
  227. package/fullcalendar/fullcalendar.esm.js +11 -11
  228. package/fullcalendar/fullcalendar.esm.min.js +1 -1
  229. package/fullcalendar/fullcalendar.js +11 -11
  230. package/fullcalendar/fullcalendar.min.js +1 -1
  231. package/galleria/galleria.cjs.js +16 -16
  232. package/galleria/galleria.cjs.min.js +1 -1
  233. package/galleria/galleria.esm.js +16 -16
  234. package/galleria/galleria.esm.min.js +1 -1
  235. package/galleria/galleria.js +17 -17
  236. package/galleria/galleria.min.js +1 -1
  237. package/gmap/gmap.cjs.js +12 -12
  238. package/gmap/gmap.cjs.min.js +1 -1
  239. package/gmap/gmap.esm.js +12 -12
  240. package/gmap/gmap.esm.min.js +1 -1
  241. package/gmap/gmap.js +12 -12
  242. package/gmap/gmap.min.js +1 -1
  243. package/image/image.cjs.js +39 -18
  244. package/image/image.cjs.min.js +1 -1
  245. package/image/image.d.ts +1 -0
  246. package/image/image.esm.js +40 -19
  247. package/image/image.esm.min.js +1 -1
  248. package/image/image.js +39 -18
  249. package/image/image.min.js +1 -1
  250. package/inplace/inplace.cjs.js +11 -11
  251. package/inplace/inplace.cjs.min.js +1 -1
  252. package/inplace/inplace.esm.js +11 -11
  253. package/inplace/inplace.esm.min.js +1 -1
  254. package/inplace/inplace.js +11 -11
  255. package/inplace/inplace.min.js +1 -1
  256. package/inputmask/inputmask.cjs.js +13 -13
  257. package/inputmask/inputmask.cjs.min.js +1 -1
  258. package/inputmask/inputmask.esm.js +13 -13
  259. package/inputmask/inputmask.esm.min.js +1 -1
  260. package/inputmask/inputmask.js +13 -13
  261. package/inputmask/inputmask.min.js +1 -1
  262. package/inputnumber/inputnumber.cjs.js +32 -29
  263. package/inputnumber/inputnumber.cjs.min.js +1 -1
  264. package/inputnumber/inputnumber.esm.js +32 -29
  265. package/inputnumber/inputnumber.esm.min.js +1 -1
  266. package/inputnumber/inputnumber.js +32 -29
  267. package/inputnumber/inputnumber.min.js +1 -1
  268. package/inputswitch/inputswitch.cjs.js +13 -13
  269. package/inputswitch/inputswitch.cjs.min.js +1 -1
  270. package/inputswitch/inputswitch.esm.js +13 -13
  271. package/inputswitch/inputswitch.esm.min.js +1 -1
  272. package/inputswitch/inputswitch.js +13 -13
  273. package/inputswitch/inputswitch.min.js +1 -1
  274. package/inputtext/inputtext.cjs.js +13 -13
  275. package/inputtext/inputtext.cjs.min.js +1 -1
  276. package/inputtext/inputtext.esm.js +13 -13
  277. package/inputtext/inputtext.esm.min.js +1 -1
  278. package/inputtext/inputtext.js +13 -13
  279. package/inputtext/inputtext.min.js +1 -1
  280. package/inputtextarea/inputtextarea.cjs.js +13 -13
  281. package/inputtextarea/inputtextarea.cjs.min.js +1 -1
  282. package/inputtextarea/inputtextarea.esm.js +13 -13
  283. package/inputtextarea/inputtextarea.esm.min.js +1 -1
  284. package/inputtextarea/inputtextarea.js +13 -13
  285. package/inputtextarea/inputtextarea.min.js +1 -1
  286. package/keyfilter/keyfilter.cjs.js +4 -1
  287. package/keyfilter/keyfilter.cjs.min.js +1 -1
  288. package/keyfilter/keyfilter.esm.js +4 -1
  289. package/keyfilter/keyfilter.esm.min.js +1 -1
  290. package/keyfilter/keyfilter.js +4 -1
  291. package/keyfilter/keyfilter.min.js +1 -1
  292. package/knob/knob.cjs.js +11 -11
  293. package/knob/knob.cjs.min.js +1 -1
  294. package/knob/knob.esm.js +11 -11
  295. package/knob/knob.esm.min.js +1 -1
  296. package/knob/knob.js +11 -11
  297. package/knob/knob.min.js +1 -1
  298. package/listbox/listbox.cjs.js +14 -14
  299. package/listbox/listbox.cjs.min.js +1 -1
  300. package/listbox/listbox.esm.js +14 -14
  301. package/listbox/listbox.esm.min.js +1 -1
  302. package/listbox/listbox.js +14 -14
  303. package/listbox/listbox.min.js +1 -1
  304. package/megamenu/megamenu.cjs.js +11 -11
  305. package/megamenu/megamenu.cjs.min.js +1 -1
  306. package/megamenu/megamenu.esm.js +11 -11
  307. package/megamenu/megamenu.esm.min.js +1 -1
  308. package/megamenu/megamenu.js +11 -11
  309. package/megamenu/megamenu.min.js +1 -1
  310. package/mention/mention.cjs.js +16 -16
  311. package/mention/mention.cjs.min.js +1 -1
  312. package/mention/mention.esm.js +16 -16
  313. package/mention/mention.esm.min.js +1 -1
  314. package/mention/mention.js +16 -16
  315. package/mention/mention.min.js +1 -1
  316. package/menu/menu.cjs.js +12 -12
  317. package/menu/menu.cjs.min.js +1 -1
  318. package/menu/menu.esm.js +12 -12
  319. package/menu/menu.esm.min.js +1 -1
  320. package/menu/menu.js +12 -12
  321. package/menu/menu.min.js +1 -1
  322. package/menubar/menubar.cjs.js +11 -11
  323. package/menubar/menubar.cjs.min.js +1 -1
  324. package/menubar/menubar.esm.js +11 -11
  325. package/menubar/menubar.esm.min.js +1 -1
  326. package/menubar/menubar.js +11 -11
  327. package/menubar/menubar.min.js +1 -1
  328. package/message/message.cjs.js +11 -11
  329. package/message/message.cjs.min.js +1 -1
  330. package/message/message.esm.js +11 -11
  331. package/message/message.esm.min.js +1 -1
  332. package/message/message.js +11 -11
  333. package/message/message.min.js +1 -1
  334. package/messages/messages.cjs.js +11 -11
  335. package/messages/messages.cjs.min.js +1 -1
  336. package/messages/messages.esm.js +11 -11
  337. package/messages/messages.esm.min.js +1 -1
  338. package/messages/messages.js +11 -11
  339. package/messages/messages.min.js +1 -1
  340. package/multiselect/multiselect.cjs.js +20 -20
  341. package/multiselect/multiselect.cjs.min.js +1 -1
  342. package/multiselect/multiselect.esm.js +20 -20
  343. package/multiselect/multiselect.esm.min.js +1 -1
  344. package/multiselect/multiselect.js +20 -20
  345. package/multiselect/multiselect.min.js +1 -1
  346. package/multistatecheckbox/multistatecheckbox.cjs.js +13 -13
  347. package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
  348. package/multistatecheckbox/multistatecheckbox.esm.js +13 -13
  349. package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
  350. package/multistatecheckbox/multistatecheckbox.js +13 -13
  351. package/multistatecheckbox/multistatecheckbox.min.js +1 -1
  352. package/orderlist/orderlist.cjs.js +11 -11
  353. package/orderlist/orderlist.cjs.min.js +1 -1
  354. package/orderlist/orderlist.esm.js +11 -11
  355. package/orderlist/orderlist.esm.min.js +1 -1
  356. package/orderlist/orderlist.js +11 -11
  357. package/orderlist/orderlist.min.js +1 -1
  358. package/organizationchart/organizationchart.cjs.js +11 -11
  359. package/organizationchart/organizationchart.cjs.min.js +1 -1
  360. package/organizationchart/organizationchart.esm.js +11 -11
  361. package/organizationchart/organizationchart.esm.min.js +1 -1
  362. package/organizationchart/organizationchart.js +11 -11
  363. package/organizationchart/organizationchart.min.js +1 -1
  364. package/overlaypanel/overlaypanel.cjs.js +13 -13
  365. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  366. package/overlaypanel/overlaypanel.esm.js +13 -13
  367. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  368. package/overlaypanel/overlaypanel.js +13 -13
  369. package/overlaypanel/overlaypanel.min.js +1 -1
  370. package/package.json +1 -1
  371. package/paginator/paginator.cjs.js +13 -13
  372. package/paginator/paginator.cjs.min.js +1 -1
  373. package/paginator/paginator.esm.js +13 -13
  374. package/paginator/paginator.esm.min.js +1 -1
  375. package/paginator/paginator.js +13 -13
  376. package/paginator/paginator.min.js +1 -1
  377. package/panel/panel.cjs.js +14 -14
  378. package/panel/panel.cjs.min.js +1 -1
  379. package/panel/panel.esm.js +14 -14
  380. package/panel/panel.esm.min.js +1 -1
  381. package/panel/panel.js +14 -14
  382. package/panel/panel.min.js +1 -1
  383. package/panelmenu/panelmenu.cjs.js +13 -13
  384. package/panelmenu/panelmenu.cjs.min.js +1 -1
  385. package/panelmenu/panelmenu.esm.js +13 -13
  386. package/panelmenu/panelmenu.esm.min.js +1 -1
  387. package/panelmenu/panelmenu.js +13 -13
  388. package/panelmenu/panelmenu.min.js +1 -1
  389. package/password/password.cjs.js +14 -14
  390. package/password/password.cjs.min.js +1 -1
  391. package/password/password.esm.js +14 -14
  392. package/password/password.esm.min.js +1 -1
  393. package/password/password.js +14 -14
  394. package/password/password.min.js +1 -1
  395. package/picklist/picklist.cjs.js +11 -11
  396. package/picklist/picklist.cjs.min.js +1 -1
  397. package/picklist/picklist.esm.js +11 -11
  398. package/picklist/picklist.esm.min.js +1 -1
  399. package/picklist/picklist.js +11 -11
  400. package/picklist/picklist.min.js +1 -1
  401. package/portal/portal.cjs.js +13 -12
  402. package/portal/portal.cjs.min.js +1 -1
  403. package/portal/portal.esm.js +13 -12
  404. package/portal/portal.esm.min.js +1 -1
  405. package/portal/portal.js +13 -12
  406. package/portal/portal.min.js +1 -1
  407. package/primereact.all.cjs.js +642 -424
  408. package/primereact.all.cjs.min.js +1 -1
  409. package/primereact.all.esm.js +642 -424
  410. package/primereact.all.esm.min.js +1 -1
  411. package/primereact.all.js +642 -424
  412. package/primereact.all.min.js +1 -1
  413. package/progressbar/progressbar.cjs.js +11 -11
  414. package/progressbar/progressbar.cjs.min.js +1 -1
  415. package/progressbar/progressbar.esm.js +11 -11
  416. package/progressbar/progressbar.esm.min.js +1 -1
  417. package/progressbar/progressbar.js +11 -11
  418. package/progressbar/progressbar.min.js +1 -1
  419. package/progressspinner/progressspinner.cjs.js +11 -11
  420. package/progressspinner/progressspinner.cjs.min.js +1 -1
  421. package/progressspinner/progressspinner.esm.js +11 -11
  422. package/progressspinner/progressspinner.esm.min.js +1 -1
  423. package/progressspinner/progressspinner.js +11 -11
  424. package/progressspinner/progressspinner.min.js +1 -1
  425. package/radiobutton/radiobutton.cjs.js +13 -13
  426. package/radiobutton/radiobutton.cjs.min.js +1 -1
  427. package/radiobutton/radiobutton.esm.js +13 -13
  428. package/radiobutton/radiobutton.esm.min.js +1 -1
  429. package/radiobutton/radiobutton.js +13 -13
  430. package/radiobutton/radiobutton.min.js +1 -1
  431. package/rating/rating.cjs.js +13 -13
  432. package/rating/rating.cjs.min.js +1 -1
  433. package/rating/rating.esm.js +13 -13
  434. package/rating/rating.esm.min.js +1 -1
  435. package/rating/rating.js +13 -13
  436. package/rating/rating.min.js +1 -1
  437. package/resources/primereact.css +328 -305
  438. package/resources/primereact.min.css +1 -1
  439. package/resources/themes/arya-blue/theme.css +56 -24
  440. package/resources/themes/arya-green/theme.css +56 -24
  441. package/resources/themes/arya-orange/theme.css +56 -24
  442. package/resources/themes/arya-purple/theme.css +56 -24
  443. package/resources/themes/bootstrap4-dark-blue/theme.css +33 -8
  444. package/resources/themes/bootstrap4-dark-purple/theme.css +33 -8
  445. package/resources/themes/bootstrap4-light-blue/theme.css +32 -7
  446. package/resources/themes/bootstrap4-light-purple/theme.css +32 -7
  447. package/resources/themes/fluent-light/theme.css +56 -24
  448. package/resources/themes/lara-dark-blue/theme.css +400 -368
  449. package/resources/themes/lara-dark-indigo/theme.css +400 -368
  450. package/resources/themes/lara-dark-purple/theme.css +400 -368
  451. package/resources/themes/lara-dark-teal/theme.css +400 -368
  452. package/resources/themes/lara-light-blue/theme.css +56 -24
  453. package/resources/themes/lara-light-indigo/theme.css +56 -24
  454. package/resources/themes/lara-light-purple/theme.css +56 -24
  455. package/resources/themes/lara-light-teal/theme.css +56 -24
  456. package/resources/themes/luna-amber/theme.css +49 -24
  457. package/resources/themes/luna-blue/theme.css +49 -24
  458. package/resources/themes/luna-green/theme.css +49 -24
  459. package/resources/themes/luna-pink/theme.css +49 -24
  460. package/resources/themes/md-dark-deeppurple/theme.css +38 -6
  461. package/resources/themes/md-dark-indigo/theme.css +38 -6
  462. package/resources/themes/md-light-deeppurple/theme.css +38 -6
  463. package/resources/themes/md-light-indigo/theme.css +38 -6
  464. package/resources/themes/mdc-dark-deeppurple/theme.css +38 -6
  465. package/resources/themes/mdc-dark-indigo/theme.css +38 -6
  466. package/resources/themes/mdc-light-deeppurple/theme.css +38 -6
  467. package/resources/themes/mdc-light-indigo/theme.css +38 -6
  468. package/resources/themes/nova/theme.css +49 -24
  469. package/resources/themes/nova-accent/theme.css +49 -24
  470. package/resources/themes/nova-alt/theme.css +49 -24
  471. package/resources/themes/rhea/theme.css +49 -24
  472. package/resources/themes/saga-blue/theme.css +39 -7
  473. package/resources/themes/saga-green/theme.css +39 -7
  474. package/resources/themes/saga-orange/theme.css +39 -7
  475. package/resources/themes/saga-purple/theme.css +39 -7
  476. package/resources/themes/tailwind-light/theme.css +59 -27
  477. package/resources/themes/vela-blue/theme.css +56 -24
  478. package/resources/themes/vela-green/theme.css +56 -24
  479. package/resources/themes/vela-orange/theme.css +56 -24
  480. package/resources/themes/vela-purple/theme.css +56 -24
  481. package/ripple/ripple.cjs.js +11 -11
  482. package/ripple/ripple.cjs.min.js +1 -1
  483. package/ripple/ripple.esm.js +11 -11
  484. package/ripple/ripple.esm.min.js +1 -1
  485. package/ripple/ripple.js +11 -11
  486. package/ripple/ripple.min.js +1 -1
  487. package/row/row.cjs.js +11 -11
  488. package/row/row.cjs.min.js +1 -1
  489. package/row/row.esm.js +11 -11
  490. package/row/row.esm.min.js +1 -1
  491. package/row/row.js +11 -11
  492. package/row/row.min.js +1 -1
  493. package/scrollpanel/scrollpanel.cjs.js +11 -11
  494. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  495. package/scrollpanel/scrollpanel.esm.js +11 -11
  496. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  497. package/scrollpanel/scrollpanel.js +11 -11
  498. package/scrollpanel/scrollpanel.min.js +1 -1
  499. package/scrolltop/scrolltop.cjs.js +12 -12
  500. package/scrolltop/scrolltop.cjs.min.js +1 -1
  501. package/scrolltop/scrolltop.esm.js +12 -12
  502. package/scrolltop/scrolltop.esm.min.js +1 -1
  503. package/scrolltop/scrolltop.js +12 -12
  504. package/scrolltop/scrolltop.min.js +1 -1
  505. package/selectbutton/selectbutton.cjs.js +14 -14
  506. package/selectbutton/selectbutton.cjs.min.js +1 -1
  507. package/selectbutton/selectbutton.esm.js +14 -14
  508. package/selectbutton/selectbutton.esm.min.js +1 -1
  509. package/selectbutton/selectbutton.js +14 -14
  510. package/selectbutton/selectbutton.min.js +1 -1
  511. package/sidebar/sidebar.cjs.js +14 -13
  512. package/sidebar/sidebar.cjs.min.js +1 -1
  513. package/sidebar/sidebar.esm.js +14 -13
  514. package/sidebar/sidebar.esm.min.js +1 -1
  515. package/sidebar/sidebar.js +14 -13
  516. package/sidebar/sidebar.min.js +1 -1
  517. package/skeleton/skeleton.cjs.js +11 -11
  518. package/skeleton/skeleton.cjs.min.js +1 -1
  519. package/skeleton/skeleton.esm.js +11 -11
  520. package/skeleton/skeleton.esm.min.js +1 -1
  521. package/skeleton/skeleton.js +11 -11
  522. package/skeleton/skeleton.min.js +1 -1
  523. package/slidemenu/slidemenu.cjs.js +12 -12
  524. package/slidemenu/slidemenu.cjs.min.js +1 -1
  525. package/slidemenu/slidemenu.esm.js +12 -12
  526. package/slidemenu/slidemenu.esm.min.js +1 -1
  527. package/slidemenu/slidemenu.js +12 -12
  528. package/slidemenu/slidemenu.min.js +1 -1
  529. package/slider/slider.cjs.js +11 -11
  530. package/slider/slider.cjs.min.js +1 -1
  531. package/slider/slider.esm.js +11 -11
  532. package/slider/slider.esm.min.js +1 -1
  533. package/slider/slider.js +11 -11
  534. package/slider/slider.min.js +1 -1
  535. package/speeddial/speeddial.cjs.js +13 -13
  536. package/speeddial/speeddial.cjs.min.js +1 -1
  537. package/speeddial/speeddial.esm.js +13 -13
  538. package/speeddial/speeddial.esm.min.js +1 -1
  539. package/speeddial/speeddial.js +13 -13
  540. package/speeddial/speeddial.min.js +1 -1
  541. package/splitbutton/splitbutton.cjs.js +15 -15
  542. package/splitbutton/splitbutton.cjs.min.js +1 -1
  543. package/splitbutton/splitbutton.esm.js +15 -15
  544. package/splitbutton/splitbutton.esm.min.js +1 -1
  545. package/splitbutton/splitbutton.js +15 -15
  546. package/splitbutton/splitbutton.min.js +1 -1
  547. package/splitter/splitter.cjs.js +12 -12
  548. package/splitter/splitter.cjs.min.js +1 -1
  549. package/splitter/splitter.esm.js +12 -12
  550. package/splitter/splitter.esm.min.js +1 -1
  551. package/splitter/splitter.js +12 -12
  552. package/splitter/splitter.min.js +1 -1
  553. package/steps/steps.cjs.js +11 -11
  554. package/steps/steps.cjs.min.js +1 -1
  555. package/steps/steps.esm.js +11 -11
  556. package/steps/steps.esm.min.js +1 -1
  557. package/steps/steps.js +11 -11
  558. package/steps/steps.min.js +1 -1
  559. package/styleclass/styleclass.cjs.js +11 -11
  560. package/styleclass/styleclass.cjs.min.js +1 -1
  561. package/styleclass/styleclass.esm.js +11 -11
  562. package/styleclass/styleclass.esm.min.js +1 -1
  563. package/styleclass/styleclass.js +11 -11
  564. package/styleclass/styleclass.min.js +1 -1
  565. package/tabmenu/tabmenu.cjs.js +11 -11
  566. package/tabmenu/tabmenu.cjs.min.js +1 -1
  567. package/tabmenu/tabmenu.esm.js +11 -11
  568. package/tabmenu/tabmenu.esm.min.js +1 -1
  569. package/tabmenu/tabmenu.js +11 -11
  570. package/tabmenu/tabmenu.min.js +1 -1
  571. package/tabview/tabview.cjs.js +35 -28
  572. package/tabview/tabview.cjs.min.js +1 -1
  573. package/tabview/tabview.esm.js +35 -28
  574. package/tabview/tabview.esm.min.js +1 -1
  575. package/tabview/tabview.js +35 -28
  576. package/tabview/tabview.min.js +1 -1
  577. package/tag/tag.cjs.js +11 -11
  578. package/tag/tag.cjs.min.js +1 -1
  579. package/tag/tag.esm.js +11 -11
  580. package/tag/tag.esm.min.js +1 -1
  581. package/tag/tag.js +11 -11
  582. package/tag/tag.min.js +1 -1
  583. package/terminal/terminal.cjs.js +11 -11
  584. package/terminal/terminal.cjs.min.js +1 -1
  585. package/terminal/terminal.esm.js +11 -11
  586. package/terminal/terminal.esm.min.js +1 -1
  587. package/terminal/terminal.js +11 -11
  588. package/terminal/terminal.min.js +1 -1
  589. package/tieredmenu/tieredmenu.cjs.js +12 -12
  590. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  591. package/tieredmenu/tieredmenu.esm.js +12 -12
  592. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  593. package/tieredmenu/tieredmenu.js +12 -12
  594. package/tieredmenu/tieredmenu.min.js +1 -1
  595. package/timeline/timeline.cjs.js +11 -11
  596. package/timeline/timeline.cjs.min.js +1 -1
  597. package/timeline/timeline.esm.js +11 -11
  598. package/timeline/timeline.esm.min.js +1 -1
  599. package/timeline/timeline.js +11 -11
  600. package/timeline/timeline.min.js +1 -1
  601. package/toast/toast.cjs.js +26 -15
  602. package/toast/toast.cjs.min.js +1 -1
  603. package/toast/toast.d.ts +3 -0
  604. package/toast/toast.esm.js +26 -15
  605. package/toast/toast.esm.min.js +1 -1
  606. package/toast/toast.js +27 -17
  607. package/toast/toast.min.js +1 -1
  608. package/togglebutton/togglebutton.cjs.js +13 -13
  609. package/togglebutton/togglebutton.cjs.min.js +1 -1
  610. package/togglebutton/togglebutton.esm.js +13 -13
  611. package/togglebutton/togglebutton.esm.min.js +1 -1
  612. package/togglebutton/togglebutton.js +13 -13
  613. package/togglebutton/togglebutton.min.js +1 -1
  614. package/toolbar/toolbar.cjs.js +11 -11
  615. package/toolbar/toolbar.cjs.min.js +1 -1
  616. package/toolbar/toolbar.esm.js +11 -11
  617. package/toolbar/toolbar.esm.min.js +1 -1
  618. package/toolbar/toolbar.js +11 -11
  619. package/toolbar/toolbar.min.js +1 -1
  620. package/tooltip/tooltip.cjs.js +13 -13
  621. package/tooltip/tooltip.cjs.min.js +1 -1
  622. package/tooltip/tooltip.esm.js +13 -13
  623. package/tooltip/tooltip.esm.min.js +1 -1
  624. package/tooltip/tooltip.js +13 -13
  625. package/tooltip/tooltip.min.js +1 -1
  626. package/tree/tree.cjs.js +17 -17
  627. package/tree/tree.cjs.min.js +1 -1
  628. package/tree/tree.esm.js +17 -17
  629. package/tree/tree.esm.min.js +1 -1
  630. package/tree/tree.js +17 -17
  631. package/tree/tree.min.js +1 -1
  632. package/treenode/treenode.d.ts +1 -0
  633. package/treeselect/treeselect.cjs.js +16 -16
  634. package/treeselect/treeselect.cjs.min.js +1 -1
  635. package/treeselect/treeselect.esm.js +16 -16
  636. package/treeselect/treeselect.esm.min.js +1 -1
  637. package/treeselect/treeselect.js +16 -16
  638. package/treeselect/treeselect.min.js +1 -1
  639. package/treetable/treetable.cjs.js +60 -48
  640. package/treetable/treetable.cjs.min.js +1 -1
  641. package/treetable/treetable.d.ts +1 -0
  642. package/treetable/treetable.esm.js +60 -48
  643. package/treetable/treetable.esm.min.js +1 -1
  644. package/treetable/treetable.js +60 -48
  645. package/treetable/treetable.min.css +1 -1
  646. package/treetable/treetable.min.js +1 -1
  647. package/tristatecheckbox/tristatecheckbox.cjs.js +13 -13
  648. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  649. package/tristatecheckbox/tristatecheckbox.esm.js +13 -13
  650. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  651. package/tristatecheckbox/tristatecheckbox.js +13 -13
  652. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  653. package/utils/utils.cjs.js +43 -41
  654. package/utils/utils.cjs.min.js +1 -1
  655. package/utils/utils.d.ts +1 -0
  656. package/utils/utils.esm.js +43 -41
  657. package/utils/utils.esm.min.js +1 -1
  658. package/utils/utils.js +43 -41
  659. package/utils/utils.min.js +1 -1
  660. package/virtualscroller/virtualscroller.cjs.js +35 -19
  661. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  662. package/virtualscroller/virtualscroller.esm.js +35 -19
  663. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  664. package/virtualscroller/virtualscroller.js +35 -19
  665. package/virtualscroller/virtualscroller.min.css +1 -1
  666. package/virtualscroller/virtualscroller.min.js +1 -1
  667. package/web-types.json +44 -7
package/card/card.esm.js CHANGED
@@ -20,6 +20,9 @@ function _defineProperties(target, props) {
20
20
  function _createClass(Constructor, protoProps, staticProps) {
21
21
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
22
22
  if (staticProps) _defineProperties(Constructor, staticProps);
23
+ Object.defineProperty(Constructor, "prototype", {
24
+ writable: false
25
+ });
23
26
  return Constructor;
24
27
  }
25
28
 
@@ -44,23 +47,20 @@ function _inherits(subClass, superClass) {
44
47
  configurable: true
45
48
  }
46
49
  });
50
+ Object.defineProperty(subClass, "prototype", {
51
+ writable: false
52
+ });
47
53
  if (superClass) _setPrototypeOf(subClass, superClass);
48
54
  }
49
55
 
50
56
  function _typeof(obj) {
51
57
  "@babel/helpers - typeof";
52
58
 
53
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
54
- _typeof = function _typeof(obj) {
55
- return typeof obj;
56
- };
57
- } else {
58
- _typeof = function _typeof(obj) {
59
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
60
- };
61
- }
62
-
63
- return _typeof(obj);
59
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
60
+ return typeof obj;
61
+ } : function (obj) {
62
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
63
+ }, _typeof(obj);
64
64
  }
65
65
 
66
66
  function _assertThisInitialized(self) {
@@ -1 +1 @@
1
- import e,{Component as t}from"react";import{ObjectUtils as r,classNames as n}from"primereact/utils";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(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&&c(e,t)}function s(e){return s="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},s(e)}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){if(t&&("object"===s(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 p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(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 y,d,h,m=function(c){l(b,t);var s,u,y,d,h,m=(s=b,u=f(),function(){var e,t=p(s);if(u){var r=p(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function b(){return o(this,b),m.apply(this,arguments)}return y=b,(d=[{key:"renderHeader",value:function(){return this.props.header?e.createElement("div",{className:"p-card-header"},r.getJSXElement(this.props.header,this.props)):null}},{key:"renderBody",value:function(){var t=this.props.title&&e.createElement("div",{className:"p-card-title"},r.getJSXElement(this.props.title,this.props)),n=this.props.subTitle&&e.createElement("div",{className:"p-card-subtitle"},r.getJSXElement(this.props.subTitle,this.props)),o=this.props.children&&e.createElement("div",{className:"p-card-content"},this.props.children),i=this.props.footer&&e.createElement("div",{className:"p-card-footer"},r.getJSXElement(this.props.footer,this.props));return e.createElement("div",{className:"p-card-body"},t,n,o,i)}},{key:"render",value:function(){var t=this.renderHeader(),r=this.renderBody(),o=n("p-card p-component",this.props.className);return e.createElement("div",{className:o,style:this.props.style,id:this.props.id},t,r)}}])&&i(y.prototype,d),h&&i(y,h),b}();h={id:null,header:null,footer:null,title:null,subTitle:null,style:null,className:null},(d="defaultProps")in(y=m)?Object.defineProperty(y,d,{value:h,enumerable:!0,configurable:!0,writable:!0}):y[d]=h;export{m as Card};
1
+ import e,{Component as t}from"react";import{ObjectUtils as r,classNames as n}from"primereact/utils";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function s(e){return s="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},s(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(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 y,d,h,m=function(c){l(b,t);var s,p,y,d,h,m=(s=b,p=f(),function(){var e,t=a(s);if(p){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return u(this,e)});function b(){return o(this,b),m.apply(this,arguments)}return y=b,(d=[{key:"renderHeader",value:function(){return this.props.header?e.createElement("div",{className:"p-card-header"},r.getJSXElement(this.props.header,this.props)):null}},{key:"renderBody",value:function(){var t=this.props.title&&e.createElement("div",{className:"p-card-title"},r.getJSXElement(this.props.title,this.props)),n=this.props.subTitle&&e.createElement("div",{className:"p-card-subtitle"},r.getJSXElement(this.props.subTitle,this.props)),o=this.props.children&&e.createElement("div",{className:"p-card-content"},this.props.children),i=this.props.footer&&e.createElement("div",{className:"p-card-footer"},r.getJSXElement(this.props.footer,this.props));return e.createElement("div",{className:"p-card-body"},t,n,o,i)}},{key:"render",value:function(){var t=this.renderHeader(),r=this.renderBody(),o=n("p-card p-component",this.props.className);return e.createElement("div",{className:o,style:this.props.style,id:this.props.id},t,r)}}])&&i(y.prototype,d),h&&i(y,h),Object.defineProperty(y,"prototype",{writable:!1}),b}();h={id:null,header:null,footer:null,title:null,subTitle:null,style:null,className:null},(d="defaultProps")in(y=m)?Object.defineProperty(y,d,{value:h,enumerable:!0,configurable:!0,writable:!0}):y[d]=h;export{m as Card};
package/card/card.js CHANGED
@@ -25,6 +25,9 @@ this.primereact.card = (function (exports, React, utils) {
25
25
  function _createClass(Constructor, protoProps, staticProps) {
26
26
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
27
  if (staticProps) _defineProperties(Constructor, staticProps);
28
+ Object.defineProperty(Constructor, "prototype", {
29
+ writable: false
30
+ });
28
31
  return Constructor;
29
32
  }
30
33
 
@@ -49,23 +52,20 @@ this.primereact.card = (function (exports, React, utils) {
49
52
  configurable: true
50
53
  }
51
54
  });
55
+ Object.defineProperty(subClass, "prototype", {
56
+ writable: false
57
+ });
52
58
  if (superClass) _setPrototypeOf(subClass, superClass);
53
59
  }
54
60
 
55
61
  function _typeof(obj) {
56
62
  "@babel/helpers - typeof";
57
63
 
58
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
59
- _typeof = function _typeof(obj) {
60
- return typeof obj;
61
- };
62
- } else {
63
- _typeof = function _typeof(obj) {
64
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
65
- };
66
- }
67
-
68
- return _typeof(obj);
64
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
65
+ return typeof obj;
66
+ } : function (obj) {
67
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
68
+ }, _typeof(obj);
69
69
  }
70
70
 
71
71
  function _assertThisInitialized(self) {
package/card/card.min.js CHANGED
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.card=function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(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 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 c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function s(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 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},u(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(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 a(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(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 y,h,m,b=function(e){s(h,e);var t,n,c,u,a,y=(t=h,n=d(),function(){var e,r=f(t);if(n){var o=f(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function h(){return i(this,h),y.apply(this,arguments)}return c=h,(u=[{key:"renderHeader",value:function(){return this.props.header?o.default.createElement("div",{className:"p-card-header"},r.ObjectUtils.getJSXElement(this.props.header,this.props)):null}},{key:"renderBody",value:function(){var e=this.props.title&&o.default.createElement("div",{className:"p-card-title"},r.ObjectUtils.getJSXElement(this.props.title,this.props)),t=this.props.subTitle&&o.default.createElement("div",{className:"p-card-subtitle"},r.ObjectUtils.getJSXElement(this.props.subTitle,this.props)),n=this.props.children&&o.default.createElement("div",{className:"p-card-content"},this.props.children),i=this.props.footer&&o.default.createElement("div",{className:"p-card-footer"},r.ObjectUtils.getJSXElement(this.props.footer,this.props));return o.default.createElement("div",{className:"p-card-body"},e,t,n,i)}},{key:"render",value:function(){var e=this.renderHeader(),t=this.renderBody(),n=r.classNames("p-card p-component",this.props.className);return o.default.createElement("div",{className:n,style:this.props.style,id:this.props.id},e,t)}}])&&l(c.prototype,u),a&&l(c,a),h}(t.Component);return m={id:null,header:null,footer:null,title:null,subTitle:null,style:null,className:null},(h="defaultProps")in(y=b)?Object.defineProperty(y,h,{value:m,enumerable:!0,configurable:!0,writable:!0}):y[h]=m,e.Card=b,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
1
+ this.primereact=this.primereact||{},this.primereact.card=function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(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 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 c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function s(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}}),Object.defineProperty(e,"prototype",{writable:!1}),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},a(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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 u(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(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 y,h,b,m=function(e){s(h,e);var t,n,c,a,u,y=(t=h,n=d(),function(){var e,r=f(t);if(n){var o=f(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function h(){return i(this,h),y.apply(this,arguments)}return c=h,(a=[{key:"renderHeader",value:function(){return this.props.header?o.default.createElement("div",{className:"p-card-header"},r.ObjectUtils.getJSXElement(this.props.header,this.props)):null}},{key:"renderBody",value:function(){var e=this.props.title&&o.default.createElement("div",{className:"p-card-title"},r.ObjectUtils.getJSXElement(this.props.title,this.props)),t=this.props.subTitle&&o.default.createElement("div",{className:"p-card-subtitle"},r.ObjectUtils.getJSXElement(this.props.subTitle,this.props)),n=this.props.children&&o.default.createElement("div",{className:"p-card-content"},this.props.children),i=this.props.footer&&o.default.createElement("div",{className:"p-card-footer"},r.ObjectUtils.getJSXElement(this.props.footer,this.props));return o.default.createElement("div",{className:"p-card-body"},e,t,n,i)}},{key:"render",value:function(){var e=this.renderHeader(),t=this.renderBody(),n=r.classNames("p-card p-component",this.props.className);return o.default.createElement("div",{className:n,style:this.props.style,id:this.props.id},e,t)}}])&&l(c.prototype,a),u&&l(c,u),Object.defineProperty(c,"prototype",{writable:!1}),h}(t.Component);return b={id:null,header:null,footer:null,title:null,subTitle:null,style:null,className:null},(h="defaultProps")in(y=m)?Object.defineProperty(y,h,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[h]=b,e.Card=m,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
@@ -5,10 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var utils = require('primereact/utils');
7
7
  var ripple = require('primereact/ripple');
8
+ var PrimeReact = require('primereact/api');
8
9
 
9
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
11
 
11
12
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
+ var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
12
14
 
13
15
  function _arrayLikeToArray(arr, len) {
14
16
  if (len == null || len > arr.length) len = arr.length;
@@ -72,6 +74,9 @@ function _defineProperties(target, props) {
72
74
  function _createClass(Constructor, protoProps, staticProps) {
73
75
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
74
76
  if (staticProps) _defineProperties(Constructor, staticProps);
77
+ Object.defineProperty(Constructor, "prototype", {
78
+ writable: false
79
+ });
75
80
  return Constructor;
76
81
  }
77
82
 
@@ -96,23 +101,20 @@ function _inherits(subClass, superClass) {
96
101
  configurable: true
97
102
  }
98
103
  });
104
+ Object.defineProperty(subClass, "prototype", {
105
+ writable: false
106
+ });
99
107
  if (superClass) _setPrototypeOf(subClass, superClass);
100
108
  }
101
109
 
102
110
  function _typeof(obj) {
103
111
  "@babel/helpers - typeof";
104
112
 
105
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
106
- _typeof = function _typeof(obj) {
107
- return typeof obj;
108
- };
109
- } else {
110
- _typeof = function _typeof(obj) {
111
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
112
- };
113
- }
114
-
115
- return _typeof(obj);
113
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
114
+ return typeof obj;
115
+ } : function (obj) {
116
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
117
+ }, _typeof(obj);
116
118
  }
117
119
 
118
120
  function _possibleConstructorReturn(self, call) {
@@ -147,9 +149,9 @@ function _defineProperty(obj, key, value) {
147
149
  return obj;
148
150
  }
149
151
 
150
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
152
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
151
153
 
152
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
154
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
153
155
 
154
156
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
155
157
 
@@ -503,7 +505,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
503
505
  key: "createStyle",
504
506
  value: function createStyle() {
505
507
  if (!this.carouselStyle) {
506
- this.carouselStyle = utils.DomHandler.createInlineStyle();
508
+ this.carouselStyle = utils.DomHandler.createInlineStyle(PrimeReact__default["default"].nonce);
507
509
  }
508
510
 
509
511
  var innerHTML = "\n .p-carousel[".concat(this.attributeSelector, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / this.state.numVisible, "%\n }\n ");
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils"),i=require("primereact/ripple");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=n(t);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function r(t){if(Array.isArray(t))return a(t)}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(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){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e,i){return e&&h(t.prototype,e),i&&h(t,i),t}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(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&&d(t,e)}function v(t){return v="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},v(t)}function g(t,e){if(e&&("object"===v(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 y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function b(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function S(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function I(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?S(Object(i),!0).forEach((function(e){b(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function k(t){var e=w();return function(){var i,n=y(t);if(e){var s=y(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return g(this,i)}}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 P=function(i){f(a,t.Component);var n=k(a);function a(){return p(this,a),n.apply(this,arguments)}return m(a,[{key:"render",value:function(){var t=this.props.template(this.props.item),i=e.classNames(this.props.className,"p-carousel-item",{"p-carousel-item-active":this.props.active,"p-carousel-item-start":this.props.start,"p-carousel-item-end":this.props.end});return s.default.createElement("div",{className:i},t)}}]),a}();b(P,"defaultProps",{template:null,item:null,active:!1,start:!1,end:!1,className:null});var C=function(n){f(h,t.Component);var a=k(h);function h(t){var i;return p(this,h),(i=a.call(this,t)).state={numVisible:t.numVisible,numScroll:t.numScroll,totalShiftedItems:t.page*t.numScroll*-1},i.props.onPageChange||(i.state=I(I({},i.state),{},{page:t.page})),i.navBackward=i.navBackward.bind(c(i)),i.navForward=i.navForward.bind(c(i)),i.onTransitionEnd=i.onTransitionEnd.bind(c(i)),i.onTouchStart=i.onTouchStart.bind(c(i)),i.onTouchMove=i.onTouchMove.bind(c(i)),i.onTouchEnd=i.onTouchEnd.bind(c(i)),i.totalIndicators=0,i.remainingItems=0,i.allowAutoplay=!!i.props.autoplayInterval,i.circular=i.props.circular||i.allowAutoplay,i.attributeSelector=e.UniqueComponentId(),i.swipeThreshold=20,i}return m(h,[{key:"step",value:function(t,i){var n=this.state.totalShiftedItems,s=this.isCircular();null!=i?(n=this.state.numScroll*i*-1,s&&(n-=this.state.numVisible),this.isRemainingItemsAdded=!1):(n+=this.state.numScroll*t,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!1),i=Math.abs(Math.floor((s?n+this.state.numVisible:n)/this.state.numScroll)));s&&this.state.page===this.totalIndicators-1&&-1===t?(n=-1*(this.props.value.length+this.state.numVisible),i=0):s&&0===this.state.page&&1===t?(n=0,i=this.totalIndicators-1):i===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!0),this.itemsContainer&&(e.DomHandler.removeClass(this.itemsContainer,"p-items-hidden"),this.changePosition(n),this.itemsContainer.style.transition="transform 500ms ease 0s"),this.props.onPageChange?(this.setState({totalShiftedItems:n}),this.props.onPageChange({page:i})):this.setState({page:i,totalShiftedItems:n})}},{key:"calculatePosition",value:function(){if(this.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.props.numVisible,numScroll:this.props.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}var s={};if(this.state.numScroll!==e.numScroll){var a=this.getPage();a=Math.floor(a*this.state.numScroll/e.numScroll);var r=e.numScroll*a*-1;this.isCircular()&&(r-=e.numVisible),s={totalShiftedItems:r,numScroll:e.numScroll},this.props.onPageChange?this.props.onPageChange({page:a}):s=I(I({},s),{},{page:a})}this.state.numVisible!==e.numVisible&&(s=I(I({},s),{},{numVisible:e.numVisible})),Object.keys(s).length&&this.setState(s)}}},{key:"navBackward",value:function(t,e){(this.circular||0!==this.getPage())&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"navForward",value:function(t,e){(this.circular||this.getPage()<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"onDotClick",value:function(t,e){var i=this.getPage();e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)}},{key:"onTransitionEnd",value:function(t){this.itemsContainer&&"transform"===t.propertyName&&(e.DomHandler.addClass(this.itemsContainer,"p-items-hidden"),this.itemsContainer.style.transition="",0!==this.state.page&&this.state.page!==this.totalIndicators-1||!this.isCircular()||this.changePosition(this.state.totalShiftedItems))}},{key:"onTouchStart",value:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}}},{key:"onTouchMove",value:function(t){t.cancelable&&t.preventDefault()}},{key:"onTouchEnd",value:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)}},{key:"changePageOnTouch",value:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))}},{key:"bindDocumentListeners",value:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(){t.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentListeners",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"isVertical",value:function(){return"vertical"===this.props.orientation}},{key:"isCircular",value:function(){return this.circular&&this.props.value.length>=this.state.numVisible}},{key:"getPage",value:function(){return this.props.onPageChange?this.props.page:this.state.page}},{key:"getTotalIndicators",value:function(){return this.props.value?Math.ceil((this.props.value.length-this.state.numVisible)/this.state.numScroll)+1:0}},{key:"isAutoplay",value:function(){return this.props.autoplayInterval&&this.allowAutoplay}},{key:"startAutoplay",value:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.state.page===t.totalIndicators-1?0:t.state.page+1)}),this.props.autoplayInterval)}},{key:"stopAutoplay",value:function(){this.interval&&clearInterval(this.interval)}},{key:"createStyle",value:function(){this.carouselStyle||(this.carouselStyle=e.DomHandler.createInlineStyle());var t,i="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.state.numVisible,"%\n }\n ");if(this.props.responsiveOptions){this.responsiveOptions=r(t=this.props.responsiveOptions)||o(t)||l(t)||u(),this.responsiveOptions.sort((function(t,e){var i=t.breakpoint,n=e.breakpoint;return-1*(null==i&&null!=n?-1:null!=i&&null==n?1:null==i&&null==n?0:"string"==typeof i&&"string"==typeof n?i.localeCompare(n,void 0,{numeric:!0}):i<n?-1:i>n?1:0)}));for(var n=0;n<this.responsiveOptions.length;n++){var s=this.responsiveOptions[n];i+="\n @media screen and (max-width: ".concat(s.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/s.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=i}},{key:"changePosition",value:function(t){this.itemsContainer&&(this.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(t*(100/this.state.numVisible),"%, 0)"):"translate3d(".concat(t*(100/this.state.numVisible),"%, 0, 0)"))}},{key:"componentDidMount",value:function(){this.container&&this.container.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.changePosition(this.state.totalShiftedItems),this.props.responsiveOptions&&this.bindDocumentListeners()}},{key:"componentDidUpdate",value:function(t,e){var i=this.isCircular(),n=!1,s=this.state.totalShiftedItems;if(this.props.autoplayInterval&&this.stopAutoplay(),e.numScroll!==this.state.numScroll||e.numVisible!==this.state.numVisible||this.props.value&&t.value&&t.value.length!==this.props.value.length){this.remainingItems=(this.props.value.length-this.state.numVisible)%this.state.numScroll;var a=this.getPage();0!==this.totalIndicators&&a>=this.totalIndicators&&(a=this.totalIndicators-1,this.props.onPageChange?this.props.onPageChange({page:a}):this.setState({page:a}),n=!0),s=a*this.state.numScroll*-1,i&&(s-=this.state.numVisible),a===this.totalIndicators-1&&this.remainingItems>0?(s+=-1*this.remainingItems+this.state.numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0),this.changePosition(s)}i&&(0===this.state.page?s=-1*this.state.numVisible:0===s&&(s=-1*this.props.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0)),t.page!==this.props.page&&(this.props.page>t.page&&this.props.page<=this.totalIndicators-1?this.step(-1,this.props.page):this.props.page<t.page&&this.step(1,this.props.page)),!n&&this.isAutoplay()&&this.startAutoplay()}},{key:"componentWillUnmount",value:function(){this.props.responsiveOptions&&this.unbindDocumentListeners(),this.props.autoplayInterval&&this.stopAutoplay()}},{key:"renderItems",value:function(){var t=this;if(this.props.value&&this.props.value.length){var e=this.isCircular(),i=null,n=null;if(e){var a=null;i=(a=this.props.value.slice(-1*this.state.numVisible)).map((function(e,i){return s.default.createElement(P,{key:i+"_scloned",className:"p-carousel-item-cloned",template:t.props.itemTemplate,item:e,active:-1*t.state.totalShiftedItems===t.props.value.length+t.state.numVisible,start:0===i,end:i===a.length-1})})),n=(a=this.props.value.slice(0,this.state.numVisible)).map((function(e,i){return s.default.createElement(P,{key:i+"_fcloned",className:"p-carousel-item-cloned",template:t.props.itemTemplate,item:e,active:0===t.state.totalShiftedItems,start:0===i,end:i===a.length-1})}))}var r=this.props.value.map((function(i,n){var a=e?-1*(t.state.totalShiftedItems+t.state.numVisible):-1*t.state.totalShiftedItems,r=a+t.state.numVisible-1;return s.default.createElement(P,{key:n,template:t.props.itemTemplate,item:i,active:a<=n&&r>=n,start:a===n,end:r===n})}));return s.default.createElement(s.default.Fragment,null,i,r,n)}}},{key:"renderHeader",value:function(){return this.props.header?s.default.createElement("div",{className:"p-carousel-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?s.default.createElement("div",{className:"p-carousel-footer"},this.props.footer):null}},{key:"renderContent",value:function(){var t=this,i=this.renderItems(),n=this.isVertical()?this.props.verticalViewPortHeight:"auto",a=this.renderBackwardNavigator(),r=this.renderForwardNavigator(),o=e.classNames("p-carousel-container",this.props.containerClassName);return s.default.createElement("div",{className:o},a,s.default.createElement("div",{className:"p-carousel-items-content",style:{height:n},onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},s.default.createElement("div",{ref:function(e){return t.itemsContainer=e},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd},i)),r)}},{key:"renderBackwardNavigator",value:function(){var t=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&0===this.getPage(),n=e.classNames("p-carousel-prev p-link",{"p-disabled":t}),a=e.classNames("p-carousel-prev-icon pi",{"pi-chevron-left":!this.isVertical(),"pi-chevron-up":this.isVertical()});return s.default.createElement("button",{type:"button",className:n,onClick:this.navBackward,disabled:t},s.default.createElement("span",{className:a}),s.default.createElement(i.Ripple,null))}},{key:"renderForwardNavigator",value:function(){var t=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&(this.getPage()===this.totalIndicators-1||0===this.totalIndicators),n=e.classNames("p-carousel-next p-link",{"p-disabled":t}),a=e.classNames("p-carousel-next-icon pi",{"pi-chevron-right":!this.isVertical(),"pi-chevron-down":this.isVertical()});return s.default.createElement("button",{type:"button",className:n,onClick:this.navForward,disabled:t},s.default.createElement("span",{className:a}),s.default.createElement(i.Ripple,null))}},{key:"renderIndicator",value:function(t){var n=this,a=this.getPage()===t,r=e.classNames("p-carousel-indicator",{"p-highlight":a});return s.default.createElement("li",{className:r,key:"p-carousel-indicator-"+t},s.default.createElement("button",{type:"button",className:"p-link",onClick:function(e){return n.onDotClick(e,t)}},s.default.createElement(i.Ripple,null)))}},{key:"renderIndicators",value:function(){for(var t=e.classNames("p-carousel-indicators p-reset",this.props.indicatorsContentClassName),i=[],n=0;n<this.totalIndicators;n++)i.push(this.renderIndicator(n));return s.default.createElement("ul",{className:t},i)}},{key:"render",value:function(){var t=this,i=e.classNames("p-carousel p-component",{"p-carousel-vertical":this.isVertical(),"p-carousel-horizontal":!this.isVertical()},this.props.className),n=e.classNames("p-carousel-content",this.props.contentClassName);this.totalIndicators=this.getTotalIndicators();var a=this.renderContent(),r=this.renderIndicators(),o=this.renderHeader(),l=this.renderFooter();return s.default.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,className:i,style:this.props.style},o,s.default.createElement("div",{className:n},a,r),l)}}]),h}();b(C,"defaultProps",{id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,autoplayInterval:0,numVisible:1,numScroll:1,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null}),exports.Carousel=C;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils"),i=require("primereact/ripple"),n=require("primereact/api");function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=s(t),r=s(n);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function l(t){if(Array.isArray(t))return o(t)}function u(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function c(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,i){return e&&d(t.prototype,e),i&&d(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function g(t){return g="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},g(t)}function b(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function I(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function w(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?k(Object(i),!0).forEach((function(e){I(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function P(t){var e=O();return function(){var i,n=S(t);if(e){var s=S(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return b(this,i)}}function O(){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 C=function(i){y(s,t.Component);var n=P(s);function s(){return m(this,s),n.apply(this,arguments)}return f(s,[{key:"render",value:function(){var t=this.props.template(this.props.item),i=e.classNames(this.props.className,"p-carousel-item",{"p-carousel-item-active":this.props.active,"p-carousel-item-start":this.props.start,"p-carousel-item-end":this.props.end});return a.default.createElement("div",{className:i},t)}}]),s}();I(C,"defaultProps",{template:null,item:null,active:!1,start:!1,end:!1,className:null});var V=function(n){y(o,t.Component);var s=P(o);function o(t){var i;return m(this,o),(i=s.call(this,t)).state={numVisible:t.numVisible,numScroll:t.numScroll,totalShiftedItems:t.page*t.numScroll*-1},i.props.onPageChange||(i.state=w(w({},i.state),{},{page:t.page})),i.navBackward=i.navBackward.bind(h(i)),i.navForward=i.navForward.bind(h(i)),i.onTransitionEnd=i.onTransitionEnd.bind(h(i)),i.onTouchStart=i.onTouchStart.bind(h(i)),i.onTouchMove=i.onTouchMove.bind(h(i)),i.onTouchEnd=i.onTouchEnd.bind(h(i)),i.totalIndicators=0,i.remainingItems=0,i.allowAutoplay=!!i.props.autoplayInterval,i.circular=i.props.circular||i.allowAutoplay,i.attributeSelector=e.UniqueComponentId(),i.swipeThreshold=20,i}return f(o,[{key:"step",value:function(t,i){var n=this.state.totalShiftedItems,s=this.isCircular();null!=i?(n=this.state.numScroll*i*-1,s&&(n-=this.state.numVisible),this.isRemainingItemsAdded=!1):(n+=this.state.numScroll*t,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!1),i=Math.abs(Math.floor((s?n+this.state.numVisible:n)/this.state.numScroll)));s&&this.state.page===this.totalIndicators-1&&-1===t?(n=-1*(this.props.value.length+this.state.numVisible),i=0):s&&0===this.state.page&&1===t?(n=0,i=this.totalIndicators-1):i===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!0),this.itemsContainer&&(e.DomHandler.removeClass(this.itemsContainer,"p-items-hidden"),this.changePosition(n),this.itemsContainer.style.transition="transform 500ms ease 0s"),this.props.onPageChange?(this.setState({totalShiftedItems:n}),this.props.onPageChange({page:i})):this.setState({page:i,totalShiftedItems:n})}},{key:"calculatePosition",value:function(){if(this.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.props.numVisible,numScroll:this.props.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}var s={};if(this.state.numScroll!==e.numScroll){var a=this.getPage();a=Math.floor(a*this.state.numScroll/e.numScroll);var r=e.numScroll*a*-1;this.isCircular()&&(r-=e.numVisible),s={totalShiftedItems:r,numScroll:e.numScroll},this.props.onPageChange?this.props.onPageChange({page:a}):s=w(w({},s),{},{page:a})}this.state.numVisible!==e.numVisible&&(s=w(w({},s),{},{numVisible:e.numVisible})),Object.keys(s).length&&this.setState(s)}}},{key:"navBackward",value:function(t,e){(this.circular||0!==this.getPage())&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"navForward",value:function(t,e){(this.circular||this.getPage()<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"onDotClick",value:function(t,e){var i=this.getPage();e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)}},{key:"onTransitionEnd",value:function(t){this.itemsContainer&&"transform"===t.propertyName&&(e.DomHandler.addClass(this.itemsContainer,"p-items-hidden"),this.itemsContainer.style.transition="",0!==this.state.page&&this.state.page!==this.totalIndicators-1||!this.isCircular()||this.changePosition(this.state.totalShiftedItems))}},{key:"onTouchStart",value:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}}},{key:"onTouchMove",value:function(t){t.cancelable&&t.preventDefault()}},{key:"onTouchEnd",value:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)}},{key:"changePageOnTouch",value:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))}},{key:"bindDocumentListeners",value:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(){t.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentListeners",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"isVertical",value:function(){return"vertical"===this.props.orientation}},{key:"isCircular",value:function(){return this.circular&&this.props.value.length>=this.state.numVisible}},{key:"getPage",value:function(){return this.props.onPageChange?this.props.page:this.state.page}},{key:"getTotalIndicators",value:function(){return this.props.value?Math.ceil((this.props.value.length-this.state.numVisible)/this.state.numScroll)+1:0}},{key:"isAutoplay",value:function(){return this.props.autoplayInterval&&this.allowAutoplay}},{key:"startAutoplay",value:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.state.page===t.totalIndicators-1?0:t.state.page+1)}),this.props.autoplayInterval)}},{key:"stopAutoplay",value:function(){this.interval&&clearInterval(this.interval)}},{key:"createStyle",value:function(){this.carouselStyle||(this.carouselStyle=e.DomHandler.createInlineStyle(r.default.nonce));var t,i="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.state.numVisible,"%\n }\n ");if(this.props.responsiveOptions){this.responsiveOptions=l(t=this.props.responsiveOptions)||u(t)||c(t)||p(),this.responsiveOptions.sort((function(t,e){var i=t.breakpoint,n=e.breakpoint;return-1*(null==i&&null!=n?-1:null!=i&&null==n?1:null==i&&null==n?0:"string"==typeof i&&"string"==typeof n?i.localeCompare(n,void 0,{numeric:!0}):i<n?-1:i>n?1:0)}));for(var n=0;n<this.responsiveOptions.length;n++){var s=this.responsiveOptions[n];i+="\n @media screen and (max-width: ".concat(s.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/s.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=i}},{key:"changePosition",value:function(t){this.itemsContainer&&(this.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(t*(100/this.state.numVisible),"%, 0)"):"translate3d(".concat(t*(100/this.state.numVisible),"%, 0, 0)"))}},{key:"componentDidMount",value:function(){this.container&&this.container.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.changePosition(this.state.totalShiftedItems),this.props.responsiveOptions&&this.bindDocumentListeners()}},{key:"componentDidUpdate",value:function(t,e){var i=this.isCircular(),n=!1,s=this.state.totalShiftedItems;if(this.props.autoplayInterval&&this.stopAutoplay(),e.numScroll!==this.state.numScroll||e.numVisible!==this.state.numVisible||this.props.value&&t.value&&t.value.length!==this.props.value.length){this.remainingItems=(this.props.value.length-this.state.numVisible)%this.state.numScroll;var a=this.getPage();0!==this.totalIndicators&&a>=this.totalIndicators&&(a=this.totalIndicators-1,this.props.onPageChange?this.props.onPageChange({page:a}):this.setState({page:a}),n=!0),s=a*this.state.numScroll*-1,i&&(s-=this.state.numVisible),a===this.totalIndicators-1&&this.remainingItems>0?(s+=-1*this.remainingItems+this.state.numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0),this.changePosition(s)}i&&(0===this.state.page?s=-1*this.state.numVisible:0===s&&(s=-1*this.props.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0)),t.page!==this.props.page&&(this.props.page>t.page&&this.props.page<=this.totalIndicators-1?this.step(-1,this.props.page):this.props.page<t.page&&this.step(1,this.props.page)),!n&&this.isAutoplay()&&this.startAutoplay()}},{key:"componentWillUnmount",value:function(){this.props.responsiveOptions&&this.unbindDocumentListeners(),this.props.autoplayInterval&&this.stopAutoplay()}},{key:"renderItems",value:function(){var t=this;if(this.props.value&&this.props.value.length){var e=this.isCircular(),i=null,n=null;if(e){var s=null;i=(s=this.props.value.slice(-1*this.state.numVisible)).map((function(e,i){return a.default.createElement(C,{key:i+"_scloned",className:"p-carousel-item-cloned",template:t.props.itemTemplate,item:e,active:-1*t.state.totalShiftedItems===t.props.value.length+t.state.numVisible,start:0===i,end:i===s.length-1})})),n=(s=this.props.value.slice(0,this.state.numVisible)).map((function(e,i){return a.default.createElement(C,{key:i+"_fcloned",className:"p-carousel-item-cloned",template:t.props.itemTemplate,item:e,active:0===t.state.totalShiftedItems,start:0===i,end:i===s.length-1})}))}var r=this.props.value.map((function(i,n){var s=e?-1*(t.state.totalShiftedItems+t.state.numVisible):-1*t.state.totalShiftedItems,r=s+t.state.numVisible-1;return a.default.createElement(C,{key:n,template:t.props.itemTemplate,item:i,active:s<=n&&r>=n,start:s===n,end:r===n})}));return a.default.createElement(a.default.Fragment,null,i,r,n)}}},{key:"renderHeader",value:function(){return this.props.header?a.default.createElement("div",{className:"p-carousel-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?a.default.createElement("div",{className:"p-carousel-footer"},this.props.footer):null}},{key:"renderContent",value:function(){var t=this,i=this.renderItems(),n=this.isVertical()?this.props.verticalViewPortHeight:"auto",s=this.renderBackwardNavigator(),r=this.renderForwardNavigator(),o=e.classNames("p-carousel-container",this.props.containerClassName);return a.default.createElement("div",{className:o},s,a.default.createElement("div",{className:"p-carousel-items-content",style:{height:n},onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},a.default.createElement("div",{ref:function(e){return t.itemsContainer=e},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd},i)),r)}},{key:"renderBackwardNavigator",value:function(){var t=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&0===this.getPage(),n=e.classNames("p-carousel-prev p-link",{"p-disabled":t}),s=e.classNames("p-carousel-prev-icon pi",{"pi-chevron-left":!this.isVertical(),"pi-chevron-up":this.isVertical()});return a.default.createElement("button",{type:"button",className:n,onClick:this.navBackward,disabled:t},a.default.createElement("span",{className:s}),a.default.createElement(i.Ripple,null))}},{key:"renderForwardNavigator",value:function(){var t=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&(this.getPage()===this.totalIndicators-1||0===this.totalIndicators),n=e.classNames("p-carousel-next p-link",{"p-disabled":t}),s=e.classNames("p-carousel-next-icon pi",{"pi-chevron-right":!this.isVertical(),"pi-chevron-down":this.isVertical()});return a.default.createElement("button",{type:"button",className:n,onClick:this.navForward,disabled:t},a.default.createElement("span",{className:s}),a.default.createElement(i.Ripple,null))}},{key:"renderIndicator",value:function(t){var n=this,s=this.getPage()===t,r=e.classNames("p-carousel-indicator",{"p-highlight":s});return a.default.createElement("li",{className:r,key:"p-carousel-indicator-"+t},a.default.createElement("button",{type:"button",className:"p-link",onClick:function(e){return n.onDotClick(e,t)}},a.default.createElement(i.Ripple,null)))}},{key:"renderIndicators",value:function(){for(var t=e.classNames("p-carousel-indicators p-reset",this.props.indicatorsContentClassName),i=[],n=0;n<this.totalIndicators;n++)i.push(this.renderIndicator(n));return a.default.createElement("ul",{className:t},i)}},{key:"render",value:function(){var t=this,i=e.classNames("p-carousel p-component",{"p-carousel-vertical":this.isVertical(),"p-carousel-horizontal":!this.isVertical()},this.props.className),n=e.classNames("p-carousel-content",this.props.contentClassName);this.totalIndicators=this.getTotalIndicators();var s=this.renderContent(),r=this.renderIndicators(),o=this.renderHeader(),l=this.renderFooter();return a.default.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,className:i,style:this.props.style},o,a.default.createElement("div",{className:n},s,r),l)}}]),o}();I(V,"defaultProps",{id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,autoplayInterval:0,numVisible:1,numScroll:1,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null}),exports.Carousel=V;
@@ -1,6 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import { classNames, UniqueComponentId, DomHandler } from 'primereact/utils';
3
3
  import { Ripple } from 'primereact/ripple';
4
+ import PrimeReact from 'primereact/api';
4
5
 
5
6
  function _arrayLikeToArray(arr, len) {
6
7
  if (len == null || len > arr.length) len = arr.length;
@@ -64,6 +65,9 @@ function _defineProperties(target, props) {
64
65
  function _createClass(Constructor, protoProps, staticProps) {
65
66
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
66
67
  if (staticProps) _defineProperties(Constructor, staticProps);
68
+ Object.defineProperty(Constructor, "prototype", {
69
+ writable: false
70
+ });
67
71
  return Constructor;
68
72
  }
69
73
 
@@ -88,23 +92,20 @@ function _inherits(subClass, superClass) {
88
92
  configurable: true
89
93
  }
90
94
  });
95
+ Object.defineProperty(subClass, "prototype", {
96
+ writable: false
97
+ });
91
98
  if (superClass) _setPrototypeOf(subClass, superClass);
92
99
  }
93
100
 
94
101
  function _typeof(obj) {
95
102
  "@babel/helpers - typeof";
96
103
 
97
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
98
- _typeof = function _typeof(obj) {
99
- return typeof obj;
100
- };
101
- } else {
102
- _typeof = function _typeof(obj) {
103
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
104
- };
105
- }
106
-
107
- return _typeof(obj);
104
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
105
+ return typeof obj;
106
+ } : function (obj) {
107
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
108
+ }, _typeof(obj);
108
109
  }
109
110
 
110
111
  function _possibleConstructorReturn(self, call) {
@@ -139,9 +140,9 @@ function _defineProperty(obj, key, value) {
139
140
  return obj;
140
141
  }
141
142
 
142
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
143
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
143
144
 
144
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
145
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
145
146
 
146
147
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
147
148
 
@@ -495,7 +496,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
495
496
  key: "createStyle",
496
497
  value: function createStyle() {
497
498
  if (!this.carouselStyle) {
498
- this.carouselStyle = DomHandler.createInlineStyle();
499
+ this.carouselStyle = DomHandler.createInlineStyle(PrimeReact.nonce);
499
500
  }
500
501
 
501
502
  var innerHTML = "\n .p-carousel[".concat(this.attributeSelector, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / this.state.numVisible, "%\n }\n ");
@@ -1 +1 @@
1
- import t,{Component as e}from"react";import{classNames as i,UniqueComponentId as n,DomHandler as s}from"primereact/utils";import{Ripple as r}from"primereact/ripple";function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function o(t){if(Array.isArray(t))return a(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function c(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(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 h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e,i){return e&&m(t.prototype,e),i&&m(t,i),t}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(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&&f(t,e)}function g(t){return g="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},g(t)}function y(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function S(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function I(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function k(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?I(Object(i),!0).forEach((function(e){S(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function w(t){var e=P();return function(){var i,n=b(t);if(e){var s=b(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return y(this,i)}}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 O=function(n){v(r,e);var s=w(r);function r(){return p(this,r),s.apply(this,arguments)}return d(r,[{key:"render",value:function(){var e=this.props.template(this.props.item),n=i(this.props.className,"p-carousel-item",{"p-carousel-item-active":this.props.active,"p-carousel-item-start":this.props.start,"p-carousel-item-end":this.props.end});return t.createElement("div",{className:n},e)}}]),r}();S(O,"defaultProps",{template:null,item:null,active:!1,start:!1,end:!1,className:null});var C=function(a){v(f,e);var m=w(f);function f(t){var e;return p(this,f),(e=m.call(this,t)).state={numVisible:t.numVisible,numScroll:t.numScroll,totalShiftedItems:t.page*t.numScroll*-1},e.props.onPageChange||(e.state=k(k({},e.state),{},{page:t.page})),e.navBackward=e.navBackward.bind(h(e)),e.navForward=e.navForward.bind(h(e)),e.onTransitionEnd=e.onTransitionEnd.bind(h(e)),e.onTouchStart=e.onTouchStart.bind(h(e)),e.onTouchMove=e.onTouchMove.bind(h(e)),e.onTouchEnd=e.onTouchEnd.bind(h(e)),e.totalIndicators=0,e.remainingItems=0,e.allowAutoplay=!!e.props.autoplayInterval,e.circular=e.props.circular||e.allowAutoplay,e.attributeSelector=n(),e.swipeThreshold=20,e}return d(f,[{key:"step",value:function(t,e){var i=this.state.totalShiftedItems,n=this.isCircular();null!=e?(i=this.state.numScroll*e*-1,n&&(i-=this.state.numVisible),this.isRemainingItemsAdded=!1):(i+=this.state.numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.state.numVisible:i)/this.state.numScroll)));n&&this.state.page===this.totalIndicators-1&&-1===t?(i=-1*(this.props.value.length+this.state.numVisible),e=0):n&&0===this.state.page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!0),this.itemsContainer&&(s.removeClass(this.itemsContainer,"p-items-hidden"),this.changePosition(i),this.itemsContainer.style.transition="transform 500ms ease 0s"),this.props.onPageChange?(this.setState({totalShiftedItems:i}),this.props.onPageChange({page:e})):this.setState({page:e,totalShiftedItems:i})}},{key:"calculatePosition",value:function(){if(this.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.props.numVisible,numScroll:this.props.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}var s={};if(this.state.numScroll!==e.numScroll){var r=this.getPage();r=Math.floor(r*this.state.numScroll/e.numScroll);var a=e.numScroll*r*-1;this.isCircular()&&(a-=e.numVisible),s={totalShiftedItems:a,numScroll:e.numScroll},this.props.onPageChange?this.props.onPageChange({page:r}):s=k(k({},s),{},{page:r})}this.state.numVisible!==e.numVisible&&(s=k(k({},s),{},{numVisible:e.numVisible})),Object.keys(s).length&&this.setState(s)}}},{key:"navBackward",value:function(t,e){(this.circular||0!==this.getPage())&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"navForward",value:function(t,e){(this.circular||this.getPage()<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"onDotClick",value:function(t,e){var i=this.getPage();e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)}},{key:"onTransitionEnd",value:function(t){this.itemsContainer&&"transform"===t.propertyName&&(s.addClass(this.itemsContainer,"p-items-hidden"),this.itemsContainer.style.transition="",0!==this.state.page&&this.state.page!==this.totalIndicators-1||!this.isCircular()||this.changePosition(this.state.totalShiftedItems))}},{key:"onTouchStart",value:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}}},{key:"onTouchMove",value:function(t){t.cancelable&&t.preventDefault()}},{key:"onTouchEnd",value:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)}},{key:"changePageOnTouch",value:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))}},{key:"bindDocumentListeners",value:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(){t.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentListeners",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"isVertical",value:function(){return"vertical"===this.props.orientation}},{key:"isCircular",value:function(){return this.circular&&this.props.value.length>=this.state.numVisible}},{key:"getPage",value:function(){return this.props.onPageChange?this.props.page:this.state.page}},{key:"getTotalIndicators",value:function(){return this.props.value?Math.ceil((this.props.value.length-this.state.numVisible)/this.state.numScroll)+1:0}},{key:"isAutoplay",value:function(){return this.props.autoplayInterval&&this.allowAutoplay}},{key:"startAutoplay",value:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.state.page===t.totalIndicators-1?0:t.state.page+1)}),this.props.autoplayInterval)}},{key:"stopAutoplay",value:function(){this.interval&&clearInterval(this.interval)}},{key:"createStyle",value:function(){this.carouselStyle||(this.carouselStyle=s.createInlineStyle());var t,e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.state.numVisible,"%\n }\n ");if(this.props.responsiveOptions){this.responsiveOptions=o(t=this.props.responsiveOptions)||l(t)||c(t)||u(),this.responsiveOptions.sort((function(t,e){var i=t.breakpoint,n=e.breakpoint;return-1*(null==i&&null!=n?-1:null!=i&&null==n?1:null==i&&null==n?0:"string"==typeof i&&"string"==typeof n?i.localeCompare(n,void 0,{numeric:!0}):i<n?-1:i>n?1:0)}));for(var i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];e+="\n @media screen and (max-width: ".concat(n.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/n.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e}},{key:"changePosition",value:function(t){this.itemsContainer&&(this.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(t*(100/this.state.numVisible),"%, 0)"):"translate3d(".concat(t*(100/this.state.numVisible),"%, 0, 0)"))}},{key:"componentDidMount",value:function(){this.container&&this.container.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.changePosition(this.state.totalShiftedItems),this.props.responsiveOptions&&this.bindDocumentListeners()}},{key:"componentDidUpdate",value:function(t,e){var i=this.isCircular(),n=!1,s=this.state.totalShiftedItems;if(this.props.autoplayInterval&&this.stopAutoplay(),e.numScroll!==this.state.numScroll||e.numVisible!==this.state.numVisible||this.props.value&&t.value&&t.value.length!==this.props.value.length){this.remainingItems=(this.props.value.length-this.state.numVisible)%this.state.numScroll;var r=this.getPage();0!==this.totalIndicators&&r>=this.totalIndicators&&(r=this.totalIndicators-1,this.props.onPageChange?this.props.onPageChange({page:r}):this.setState({page:r}),n=!0),s=r*this.state.numScroll*-1,i&&(s-=this.state.numVisible),r===this.totalIndicators-1&&this.remainingItems>0?(s+=-1*this.remainingItems+this.state.numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0),this.changePosition(s)}i&&(0===this.state.page?s=-1*this.state.numVisible:0===s&&(s=-1*this.props.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0)),t.page!==this.props.page&&(this.props.page>t.page&&this.props.page<=this.totalIndicators-1?this.step(-1,this.props.page):this.props.page<t.page&&this.step(1,this.props.page)),!n&&this.isAutoplay()&&this.startAutoplay()}},{key:"componentWillUnmount",value:function(){this.props.responsiveOptions&&this.unbindDocumentListeners(),this.props.autoplayInterval&&this.stopAutoplay()}},{key:"renderItems",value:function(){var e=this;if(this.props.value&&this.props.value.length){var i=this.isCircular(),n=null,s=null;if(i){var r=null;n=(r=this.props.value.slice(-1*this.state.numVisible)).map((function(i,n){return t.createElement(O,{key:n+"_scloned",className:"p-carousel-item-cloned",template:e.props.itemTemplate,item:i,active:-1*e.state.totalShiftedItems===e.props.value.length+e.state.numVisible,start:0===n,end:n===r.length-1})})),s=(r=this.props.value.slice(0,this.state.numVisible)).map((function(i,n){return t.createElement(O,{key:n+"_fcloned",className:"p-carousel-item-cloned",template:e.props.itemTemplate,item:i,active:0===e.state.totalShiftedItems,start:0===n,end:n===r.length-1})}))}var a=this.props.value.map((function(n,s){var r=i?-1*(e.state.totalShiftedItems+e.state.numVisible):-1*e.state.totalShiftedItems,a=r+e.state.numVisible-1;return t.createElement(O,{key:s,template:e.props.itemTemplate,item:n,active:r<=s&&a>=s,start:r===s,end:a===s})}));return t.createElement(t.Fragment,null,n,a,s)}}},{key:"renderHeader",value:function(){return this.props.header?t.createElement("div",{className:"p-carousel-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?t.createElement("div",{className:"p-carousel-footer"},this.props.footer):null}},{key:"renderContent",value:function(){var e=this,n=this.renderItems(),s=this.isVertical()?this.props.verticalViewPortHeight:"auto",r=this.renderBackwardNavigator(),a=this.renderForwardNavigator(),o=i("p-carousel-container",this.props.containerClassName);return t.createElement("div",{className:o},r,t.createElement("div",{className:"p-carousel-items-content",style:{height:s},onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},t.createElement("div",{ref:function(t){return e.itemsContainer=t},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd},n)),a)}},{key:"renderBackwardNavigator",value:function(){var e=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&0===this.getPage(),n=i("p-carousel-prev p-link",{"p-disabled":e}),s=i("p-carousel-prev-icon pi",{"pi-chevron-left":!this.isVertical(),"pi-chevron-up":this.isVertical()});return t.createElement("button",{type:"button",className:n,onClick:this.navBackward,disabled:e},t.createElement("span",{className:s}),t.createElement(r,null))}},{key:"renderForwardNavigator",value:function(){var e=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&(this.getPage()===this.totalIndicators-1||0===this.totalIndicators),n=i("p-carousel-next p-link",{"p-disabled":e}),s=i("p-carousel-next-icon pi",{"pi-chevron-right":!this.isVertical(),"pi-chevron-down":this.isVertical()});return t.createElement("button",{type:"button",className:n,onClick:this.navForward,disabled:e},t.createElement("span",{className:s}),t.createElement(r,null))}},{key:"renderIndicator",value:function(e){var n=this,s=this.getPage()===e,a=i("p-carousel-indicator",{"p-highlight":s});return t.createElement("li",{className:a,key:"p-carousel-indicator-"+e},t.createElement("button",{type:"button",className:"p-link",onClick:function(t){return n.onDotClick(t,e)}},t.createElement(r,null)))}},{key:"renderIndicators",value:function(){for(var e=i("p-carousel-indicators p-reset",this.props.indicatorsContentClassName),n=[],s=0;s<this.totalIndicators;s++)n.push(this.renderIndicator(s));return t.createElement("ul",{className:e},n)}},{key:"render",value:function(){var e=this,n=i("p-carousel p-component",{"p-carousel-vertical":this.isVertical(),"p-carousel-horizontal":!this.isVertical()},this.props.className),s=i("p-carousel-content",this.props.contentClassName);this.totalIndicators=this.getTotalIndicators();var r=this.renderContent(),a=this.renderIndicators(),o=this.renderHeader(),l=this.renderFooter();return t.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:n,style:this.props.style},o,t.createElement("div",{className:s},r,a),l)}}]),f}();S(C,"defaultProps",{id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,autoplayInterval:0,numVisible:1,numScroll:1,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null});export{C as Carousel};
1
+ import t,{Component as e}from"react";import{classNames as i,UniqueComponentId as n,DomHandler as s}from"primereact/utils";import{Ripple as r}from"primereact/ripple";import a from"primereact/api";function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function l(t){if(Array.isArray(t))return o(t)}function c(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,i){return e&&d(t.prototype,e),i&&d(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(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},y(t)}function b(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function I(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function w(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?k(Object(i),!0).forEach((function(e){I(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function P(t){var e=O();return function(){var i,n=S(t);if(e){var s=S(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return b(this,i)}}function O(){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 C=function(n){g(r,e);var s=P(r);function r(){return m(this,r),s.apply(this,arguments)}return f(r,[{key:"render",value:function(){var e=this.props.template(this.props.item),n=i(this.props.className,"p-carousel-item",{"p-carousel-item-active":this.props.active,"p-carousel-item-start":this.props.start,"p-carousel-item-end":this.props.end});return t.createElement("div",{className:n},e)}}]),r}();I(C,"defaultProps",{template:null,item:null,active:!1,start:!1,end:!1,className:null});var V=function(o){g(v,e);var d=P(v);function v(t){var e;return m(this,v),(e=d.call(this,t)).state={numVisible:t.numVisible,numScroll:t.numScroll,totalShiftedItems:t.page*t.numScroll*-1},e.props.onPageChange||(e.state=w(w({},e.state),{},{page:t.page})),e.navBackward=e.navBackward.bind(h(e)),e.navForward=e.navForward.bind(h(e)),e.onTransitionEnd=e.onTransitionEnd.bind(h(e)),e.onTouchStart=e.onTouchStart.bind(h(e)),e.onTouchMove=e.onTouchMove.bind(h(e)),e.onTouchEnd=e.onTouchEnd.bind(h(e)),e.totalIndicators=0,e.remainingItems=0,e.allowAutoplay=!!e.props.autoplayInterval,e.circular=e.props.circular||e.allowAutoplay,e.attributeSelector=n(),e.swipeThreshold=20,e}return f(v,[{key:"step",value:function(t,e){var i=this.state.totalShiftedItems,n=this.isCircular();null!=e?(i=this.state.numScroll*e*-1,n&&(i-=this.state.numVisible),this.isRemainingItemsAdded=!1):(i+=this.state.numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.state.numVisible:i)/this.state.numScroll)));n&&this.state.page===this.totalIndicators-1&&-1===t?(i=-1*(this.props.value.length+this.state.numVisible),e=0):n&&0===this.state.page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!0),this.itemsContainer&&(s.removeClass(this.itemsContainer,"p-items-hidden"),this.changePosition(i),this.itemsContainer.style.transition="transform 500ms ease 0s"),this.props.onPageChange?(this.setState({totalShiftedItems:i}),this.props.onPageChange({page:e})):this.setState({page:e,totalShiftedItems:i})}},{key:"calculatePosition",value:function(){if(this.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.props.numVisible,numScroll:this.props.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}var s={};if(this.state.numScroll!==e.numScroll){var r=this.getPage();r=Math.floor(r*this.state.numScroll/e.numScroll);var a=e.numScroll*r*-1;this.isCircular()&&(a-=e.numVisible),s={totalShiftedItems:a,numScroll:e.numScroll},this.props.onPageChange?this.props.onPageChange({page:r}):s=w(w({},s),{},{page:r})}this.state.numVisible!==e.numVisible&&(s=w(w({},s),{},{numVisible:e.numVisible})),Object.keys(s).length&&this.setState(s)}}},{key:"navBackward",value:function(t,e){(this.circular||0!==this.getPage())&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"navForward",value:function(t,e){(this.circular||this.getPage()<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()}},{key:"onDotClick",value:function(t,e){var i=this.getPage();e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)}},{key:"onTransitionEnd",value:function(t){this.itemsContainer&&"transform"===t.propertyName&&(s.addClass(this.itemsContainer,"p-items-hidden"),this.itemsContainer.style.transition="",0!==this.state.page&&this.state.page!==this.totalIndicators-1||!this.isCircular()||this.changePosition(this.state.totalShiftedItems))}},{key:"onTouchStart",value:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}}},{key:"onTouchMove",value:function(t){t.cancelable&&t.preventDefault()}},{key:"onTouchEnd",value:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)}},{key:"changePageOnTouch",value:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))}},{key:"bindDocumentListeners",value:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(){t.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentListeners",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"isVertical",value:function(){return"vertical"===this.props.orientation}},{key:"isCircular",value:function(){return this.circular&&this.props.value.length>=this.state.numVisible}},{key:"getPage",value:function(){return this.props.onPageChange?this.props.page:this.state.page}},{key:"getTotalIndicators",value:function(){return this.props.value?Math.ceil((this.props.value.length-this.state.numVisible)/this.state.numScroll)+1:0}},{key:"isAutoplay",value:function(){return this.props.autoplayInterval&&this.allowAutoplay}},{key:"startAutoplay",value:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.state.page===t.totalIndicators-1?0:t.state.page+1)}),this.props.autoplayInterval)}},{key:"stopAutoplay",value:function(){this.interval&&clearInterval(this.interval)}},{key:"createStyle",value:function(){this.carouselStyle||(this.carouselStyle=s.createInlineStyle(a.nonce));var t,e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.state.numVisible,"%\n }\n ");if(this.props.responsiveOptions){this.responsiveOptions=l(t=this.props.responsiveOptions)||c(t)||u(t)||p(),this.responsiveOptions.sort((function(t,e){var i=t.breakpoint,n=e.breakpoint;return-1*(null==i&&null!=n?-1:null!=i&&null==n?1:null==i&&null==n?0:"string"==typeof i&&"string"==typeof n?i.localeCompare(n,void 0,{numeric:!0}):i<n?-1:i>n?1:0)}));for(var i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];e+="\n @media screen and (max-width: ".concat(n.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/n.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e}},{key:"changePosition",value:function(t){this.itemsContainer&&(this.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(t*(100/this.state.numVisible),"%, 0)"):"translate3d(".concat(t*(100/this.state.numVisible),"%, 0, 0)"))}},{key:"componentDidMount",value:function(){this.container&&this.container.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.changePosition(this.state.totalShiftedItems),this.props.responsiveOptions&&this.bindDocumentListeners()}},{key:"componentDidUpdate",value:function(t,e){var i=this.isCircular(),n=!1,s=this.state.totalShiftedItems;if(this.props.autoplayInterval&&this.stopAutoplay(),e.numScroll!==this.state.numScroll||e.numVisible!==this.state.numVisible||this.props.value&&t.value&&t.value.length!==this.props.value.length){this.remainingItems=(this.props.value.length-this.state.numVisible)%this.state.numScroll;var r=this.getPage();0!==this.totalIndicators&&r>=this.totalIndicators&&(r=this.totalIndicators-1,this.props.onPageChange?this.props.onPageChange({page:r}):this.setState({page:r}),n=!0),s=r*this.state.numScroll*-1,i&&(s-=this.state.numVisible),r===this.totalIndicators-1&&this.remainingItems>0?(s+=-1*this.remainingItems+this.state.numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0),this.changePosition(s)}i&&(0===this.state.page?s=-1*this.state.numVisible:0===s&&(s=-1*this.props.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),s!==this.state.totalShiftedItems&&(this.setState({totalShiftedItems:s}),n=!0)),t.page!==this.props.page&&(this.props.page>t.page&&this.props.page<=this.totalIndicators-1?this.step(-1,this.props.page):this.props.page<t.page&&this.step(1,this.props.page)),!n&&this.isAutoplay()&&this.startAutoplay()}},{key:"componentWillUnmount",value:function(){this.props.responsiveOptions&&this.unbindDocumentListeners(),this.props.autoplayInterval&&this.stopAutoplay()}},{key:"renderItems",value:function(){var e=this;if(this.props.value&&this.props.value.length){var i=this.isCircular(),n=null,s=null;if(i){var r=null;n=(r=this.props.value.slice(-1*this.state.numVisible)).map((function(i,n){return t.createElement(C,{key:n+"_scloned",className:"p-carousel-item-cloned",template:e.props.itemTemplate,item:i,active:-1*e.state.totalShiftedItems===e.props.value.length+e.state.numVisible,start:0===n,end:n===r.length-1})})),s=(r=this.props.value.slice(0,this.state.numVisible)).map((function(i,n){return t.createElement(C,{key:n+"_fcloned",className:"p-carousel-item-cloned",template:e.props.itemTemplate,item:i,active:0===e.state.totalShiftedItems,start:0===n,end:n===r.length-1})}))}var a=this.props.value.map((function(n,s){var r=i?-1*(e.state.totalShiftedItems+e.state.numVisible):-1*e.state.totalShiftedItems,a=r+e.state.numVisible-1;return t.createElement(C,{key:s,template:e.props.itemTemplate,item:n,active:r<=s&&a>=s,start:r===s,end:a===s})}));return t.createElement(t.Fragment,null,n,a,s)}}},{key:"renderHeader",value:function(){return this.props.header?t.createElement("div",{className:"p-carousel-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?t.createElement("div",{className:"p-carousel-footer"},this.props.footer):null}},{key:"renderContent",value:function(){var e=this,n=this.renderItems(),s=this.isVertical()?this.props.verticalViewPortHeight:"auto",r=this.renderBackwardNavigator(),a=this.renderForwardNavigator(),o=i("p-carousel-container",this.props.containerClassName);return t.createElement("div",{className:o},r,t.createElement("div",{className:"p-carousel-items-content",style:{height:s},onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},t.createElement("div",{ref:function(t){return e.itemsContainer=t},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd},n)),a)}},{key:"renderBackwardNavigator",value:function(){var e=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&0===this.getPage(),n=i("p-carousel-prev p-link",{"p-disabled":e}),s=i("p-carousel-prev-icon pi",{"pi-chevron-left":!this.isVertical(),"pi-chevron-up":this.isVertical()});return t.createElement("button",{type:"button",className:n,onClick:this.navBackward,disabled:e},t.createElement("span",{className:s}),t.createElement(r,null))}},{key:"renderForwardNavigator",value:function(){var e=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&(this.getPage()===this.totalIndicators-1||0===this.totalIndicators),n=i("p-carousel-next p-link",{"p-disabled":e}),s=i("p-carousel-next-icon pi",{"pi-chevron-right":!this.isVertical(),"pi-chevron-down":this.isVertical()});return t.createElement("button",{type:"button",className:n,onClick:this.navForward,disabled:e},t.createElement("span",{className:s}),t.createElement(r,null))}},{key:"renderIndicator",value:function(e){var n=this,s=this.getPage()===e,a=i("p-carousel-indicator",{"p-highlight":s});return t.createElement("li",{className:a,key:"p-carousel-indicator-"+e},t.createElement("button",{type:"button",className:"p-link",onClick:function(t){return n.onDotClick(t,e)}},t.createElement(r,null)))}},{key:"renderIndicators",value:function(){for(var e=i("p-carousel-indicators p-reset",this.props.indicatorsContentClassName),n=[],s=0;s<this.totalIndicators;s++)n.push(this.renderIndicator(s));return t.createElement("ul",{className:e},n)}},{key:"render",value:function(){var e=this,n=i("p-carousel p-component",{"p-carousel-vertical":this.isVertical(),"p-carousel-horizontal":!this.isVertical()},this.props.className),s=i("p-carousel-content",this.props.contentClassName);this.totalIndicators=this.getTotalIndicators();var r=this.renderContent(),a=this.renderIndicators(),o=this.renderHeader(),l=this.renderFooter();return t.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:n,style:this.props.style},o,t.createElement("div",{className:s},r,a),l)}}]),v}();I(V,"defaultProps",{id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,autoplayInterval:0,numVisible:1,numScroll:1,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null});export{V as Carousel};
@@ -1,10 +1,11 @@
1
1
  this.primereact = this.primereact || {};
2
- this.primereact.carousel = (function (exports, React, utils, ripple) {
2
+ this.primereact.carousel = (function (exports, React, utils, ripple, PrimeReact) {
3
3
  'use strict';
4
4
 
5
5
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
6
 
7
7
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
8
+ var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
8
9
 
9
10
  function _arrayLikeToArray(arr, len) {
10
11
  if (len == null || len > arr.length) len = arr.length;
@@ -68,6 +69,9 @@ this.primereact.carousel = (function (exports, React, utils, ripple) {
68
69
  function _createClass(Constructor, protoProps, staticProps) {
69
70
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
70
71
  if (staticProps) _defineProperties(Constructor, staticProps);
72
+ Object.defineProperty(Constructor, "prototype", {
73
+ writable: false
74
+ });
71
75
  return Constructor;
72
76
  }
73
77
 
@@ -92,23 +96,20 @@ this.primereact.carousel = (function (exports, React, utils, ripple) {
92
96
  configurable: true
93
97
  }
94
98
  });
99
+ Object.defineProperty(subClass, "prototype", {
100
+ writable: false
101
+ });
95
102
  if (superClass) _setPrototypeOf(subClass, superClass);
96
103
  }
97
104
 
98
105
  function _typeof(obj) {
99
106
  "@babel/helpers - typeof";
100
107
 
101
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
102
- _typeof = function _typeof(obj) {
103
- return typeof obj;
104
- };
105
- } else {
106
- _typeof = function _typeof(obj) {
107
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
108
- };
109
- }
110
-
111
- return _typeof(obj);
108
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
109
+ return typeof obj;
110
+ } : function (obj) {
111
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
112
+ }, _typeof(obj);
112
113
  }
113
114
 
114
115
  function _possibleConstructorReturn(self, call) {
@@ -143,9 +144,9 @@ this.primereact.carousel = (function (exports, React, utils, ripple) {
143
144
  return obj;
144
145
  }
145
146
 
146
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
147
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
147
148
 
148
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
149
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
149
150
 
150
151
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
151
152
 
@@ -499,7 +500,7 @@ this.primereact.carousel = (function (exports, React, utils, ripple) {
499
500
  key: "createStyle",
500
501
  value: function createStyle() {
501
502
  if (!this.carouselStyle) {
502
- this.carouselStyle = utils.DomHandler.createInlineStyle();
503
+ this.carouselStyle = utils.DomHandler.createInlineStyle(PrimeReact__default["default"].nonce);
503
504
  }
504
505
 
505
506
  var innerHTML = "\n .p-carousel[".concat(this.attributeSelector, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / this.state.numVisible, "%\n }\n ");
@@ -887,4 +888,4 @@ this.primereact.carousel = (function (exports, React, utils, ripple) {
887
888
 
888
889
  return exports;
889
890
 
890
- })({}, React, primereact.utils, primereact.ripple);
891
+ })({}, React, primereact.utils, primereact.ripple, primereact.api);