primereact 6.6.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (800) hide show
  1. package/README.md +34 -9
  2. package/accordion/accordion.cjs.js +32 -23
  3. package/accordion/accordion.cjs.min.js +1 -1
  4. package/accordion/accordion.d.ts +3 -2
  5. package/accordion/accordion.esm.js +17 -8
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +32 -24
  8. package/accordion/accordion.min.js +1 -1
  9. package/api/api.cjs.js +374 -42
  10. package/api/api.cjs.min.js +1 -1
  11. package/api/api.d.ts +126 -32
  12. package/api/api.esm.js +371 -43
  13. package/api/api.esm.min.js +1 -1
  14. package/api/api.js +374 -44
  15. package/api/api.min.js +1 -1
  16. package/autocomplete/autocomplete.cjs.js +79 -69
  17. package/autocomplete/autocomplete.cjs.min.js +1 -1
  18. package/autocomplete/autocomplete.d.ts +3 -1
  19. package/autocomplete/autocomplete.esm.js +15 -5
  20. package/autocomplete/autocomplete.esm.min.js +1 -1
  21. package/autocomplete/autocomplete.js +75 -70
  22. package/autocomplete/autocomplete.min.js +1 -1
  23. package/avatar/avatar.cjs.js +12 -9
  24. package/avatar/avatar.cjs.min.js +1 -1
  25. package/avatar/avatar.d.ts +2 -1
  26. package/avatar/avatar.esm.js +7 -4
  27. package/avatar/avatar.esm.min.js +1 -1
  28. package/avatar/avatar.js +13 -10
  29. package/avatar/avatar.min.js +1 -1
  30. package/avatargroup/avatargroup.cjs.js +5 -3
  31. package/avatargroup/avatargroup.cjs.min.js +1 -1
  32. package/avatargroup/avatargroup.esm.js +3 -1
  33. package/avatargroup/avatargroup.esm.min.js +1 -1
  34. package/avatargroup/avatargroup.js +6 -4
  35. package/avatargroup/avatargroup.min.js +1 -1
  36. package/badge/badge.cjs.js +5 -3
  37. package/badge/badge.cjs.min.js +1 -1
  38. package/badge/badge.esm.js +3 -1
  39. package/badge/badge.esm.min.js +1 -1
  40. package/badge/badge.js +6 -4
  41. package/badge/badge.min.js +1 -1
  42. package/blockui/blockui.cjs.js +19 -13
  43. package/blockui/blockui.cjs.min.js +1 -1
  44. package/blockui/blockui.esm.js +7 -2
  45. package/blockui/blockui.esm.min.js +1 -1
  46. package/blockui/blockui.js +18 -14
  47. package/blockui/blockui.min.js +1 -1
  48. package/breadcrumb/breadcrumb.cjs.js +18 -16
  49. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  50. package/breadcrumb/breadcrumb.esm.js +3 -1
  51. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  52. package/breadcrumb/breadcrumb.js +19 -17
  53. package/breadcrumb/breadcrumb.min.js +1 -1
  54. package/button/button.cjs.js +44 -53
  55. package/button/button.cjs.min.js +1 -1
  56. package/button/button.d.ts +4 -11
  57. package/button/button.esm.js +33 -42
  58. package/button/button.esm.min.js +1 -1
  59. package/button/button.js +43 -54
  60. package/button/button.min.js +1 -1
  61. package/calendar/calendar.cjs.js +183 -153
  62. package/calendar/calendar.cjs.min.js +1 -1
  63. package/calendar/calendar.d.ts +5 -1
  64. package/calendar/calendar.esm.js +57 -27
  65. package/calendar/calendar.esm.min.js +1 -1
  66. package/calendar/calendar.js +179 -154
  67. package/calendar/calendar.min.css +1 -1
  68. package/calendar/calendar.min.js +1 -1
  69. package/captcha/captcha.cjs.js +3 -1
  70. package/captcha/captcha.cjs.min.js +1 -1
  71. package/captcha/captcha.esm.js +2 -0
  72. package/captcha/captcha.esm.min.js +1 -1
  73. package/captcha/captcha.js +4 -2
  74. package/captcha/captcha.min.js +1 -1
  75. package/card/card.cjs.js +15 -13
  76. package/card/card.cjs.min.js +1 -1
  77. package/card/card.esm.js +3 -1
  78. package/card/card.esm.min.js +1 -1
  79. package/card/card.js +16 -14
  80. package/card/card.min.js +1 -1
  81. package/carousel/carousel.cjs.js +39 -36
  82. package/carousel/carousel.cjs.min.js +1 -1
  83. package/carousel/carousel.esm.js +4 -1
  84. package/carousel/carousel.esm.min.js +1 -1
  85. package/carousel/carousel.js +39 -37
  86. package/carousel/carousel.min.js +1 -1
  87. package/cascadeselect/cascadeselect.cjs.js +53 -47
  88. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  89. package/cascadeselect/cascadeselect.esm.js +8 -2
  90. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  91. package/cascadeselect/cascadeselect.js +50 -48
  92. package/cascadeselect/cascadeselect.min.js +1 -1
  93. package/chart/chart.cjs.js +8 -8
  94. package/chart/chart.cjs.min.js +1 -1
  95. package/chart/chart.esm.js +3 -1
  96. package/chart/chart.esm.min.js +1 -1
  97. package/chart/chart.js +7 -5
  98. package/chart/chart.min.js +1 -1
  99. package/checkbox/checkbox.cjs.js +22 -15
  100. package/checkbox/checkbox.cjs.min.js +1 -1
  101. package/checkbox/checkbox.d.ts +2 -1
  102. package/checkbox/checkbox.esm.js +15 -8
  103. package/checkbox/checkbox.esm.min.js +1 -1
  104. package/checkbox/checkbox.js +22 -16
  105. package/checkbox/checkbox.min.js +1 -1
  106. package/chip/chip.cjs.js +18 -14
  107. package/chip/chip.cjs.min.js +1 -1
  108. package/chip/chip.d.ts +3 -4
  109. package/chip/chip.esm.js +13 -9
  110. package/chip/chip.esm.min.js +1 -1
  111. package/chip/chip.js +19 -15
  112. package/chip/chip.min.js +1 -1
  113. package/chips/chips.cjs.js +48 -20
  114. package/chips/chips.cjs.min.js +1 -1
  115. package/chips/chips.d.ts +10 -0
  116. package/chips/chips.esm.js +39 -11
  117. package/chips/chips.esm.min.js +1 -1
  118. package/chips/chips.js +48 -21
  119. package/chips/chips.min.js +1 -1
  120. package/colorpicker/colorpicker.cjs.js +37 -31
  121. package/colorpicker/colorpicker.cjs.min.js +1 -1
  122. package/colorpicker/colorpicker.d.ts +1 -1
  123. package/colorpicker/colorpicker.esm.js +8 -2
  124. package/colorpicker/colorpicker.esm.min.js +1 -1
  125. package/colorpicker/colorpicker.js +34 -32
  126. package/colorpicker/colorpicker.min.js +1 -1
  127. package/column/column.cjs.js +34 -9
  128. package/column/column.cjs.min.js +1 -1
  129. package/column/column.d.ts +168 -13
  130. package/column/column.esm.js +34 -9
  131. package/column/column.esm.min.js +1 -1
  132. package/column/column.js +35 -10
  133. package/column/column.min.js +1 -1
  134. package/columngroup/columngroup.cjs.js +2 -0
  135. package/columngroup/columngroup.cjs.min.js +1 -1
  136. package/columngroup/columngroup.esm.js +2 -0
  137. package/columngroup/columngroup.esm.min.js +1 -1
  138. package/columngroup/columngroup.js +3 -1
  139. package/columngroup/columngroup.min.js +1 -1
  140. package/common/common.min.css +1 -1
  141. package/confirmdialog/confirmdialog.cjs.js +24 -20
  142. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  143. package/confirmdialog/confirmdialog.d.ts +4 -3
  144. package/confirmdialog/confirmdialog.esm.js +8 -4
  145. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  146. package/confirmdialog/confirmdialog.js +24 -21
  147. package/confirmdialog/confirmdialog.min.js +1 -1
  148. package/confirmpopup/confirmpopup.cjs.js +47 -40
  149. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  150. package/confirmpopup/confirmpopup.d.ts +4 -3
  151. package/confirmpopup/confirmpopup.esm.js +12 -6
  152. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  153. package/confirmpopup/confirmpopup.js +44 -40
  154. package/confirmpopup/confirmpopup.min.js +1 -1
  155. package/contextmenu/contextmenu.cjs.js +70 -63
  156. package/contextmenu/contextmenu.cjs.min.js +1 -1
  157. package/contextmenu/contextmenu.esm.js +37 -31
  158. package/contextmenu/contextmenu.esm.min.js +1 -1
  159. package/contextmenu/contextmenu.js +67 -64
  160. package/contextmenu/contextmenu.min.js +1 -1
  161. package/core/core.js +11745 -1573
  162. package/core/core.min.js +40 -1
  163. package/csstransition/csstransition.cjs.js +3 -1
  164. package/csstransition/csstransition.cjs.min.js +1 -1
  165. package/csstransition/csstransition.esm.js +2 -0
  166. package/csstransition/csstransition.esm.min.js +1 -1
  167. package/csstransition/csstransition.js +4 -2
  168. package/csstransition/csstransition.min.js +1 -1
  169. package/datascroller/datascroller.cjs.js +14 -11
  170. package/datascroller/datascroller.cjs.min.js +1 -1
  171. package/datascroller/datascroller.esm.js +6 -3
  172. package/datascroller/datascroller.esm.min.js +1 -1
  173. package/datascroller/datascroller.js +14 -12
  174. package/datascroller/datascroller.min.js +1 -1
  175. package/datatable/datatable.cjs.js +4784 -3277
  176. package/datatable/datatable.cjs.min.js +1 -1
  177. package/datatable/datatable.d.ts +100 -29
  178. package/datatable/datatable.esm.js +4859 -3353
  179. package/datatable/datatable.esm.min.js +1 -1
  180. package/datatable/datatable.js +4777 -3278
  181. package/datatable/datatable.min.css +1 -1
  182. package/datatable/datatable.min.js +1 -1
  183. package/dataview/dataview.cjs.js +34 -29
  184. package/dataview/dataview.cjs.min.js +1 -1
  185. package/dataview/dataview.esm.js +8 -3
  186. package/dataview/dataview.esm.min.js +1 -1
  187. package/dataview/dataview.js +33 -30
  188. package/dataview/dataview.min.js +1 -1
  189. package/deferredcontent/deferredcontent.cjs.js +3 -1
  190. package/deferredcontent/deferredcontent.cjs.min.js +1 -1
  191. package/deferredcontent/deferredcontent.esm.js +2 -0
  192. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  193. package/deferredcontent/deferredcontent.js +4 -2
  194. package/deferredcontent/deferredcontent.min.js +1 -1
  195. package/dialog/dialog.cjs.js +68 -51
  196. package/dialog/dialog.cjs.min.js +1 -1
  197. package/dialog/dialog.d.ts +1 -0
  198. package/dialog/dialog.esm.js +22 -6
  199. package/dialog/dialog.esm.min.js +1 -1
  200. package/dialog/dialog.js +65 -52
  201. package/dialog/dialog.min.js +1 -1
  202. package/divider/divider.cjs.js +6 -4
  203. package/divider/divider.cjs.min.js +1 -1
  204. package/divider/divider.esm.js +3 -1
  205. package/divider/divider.esm.min.js +1 -1
  206. package/divider/divider.js +7 -5
  207. package/divider/divider.min.js +1 -1
  208. package/dock/dock.cjs.js +53 -17
  209. package/dock/dock.cjs.min.js +1 -1
  210. package/dock/dock.d.ts +13 -0
  211. package/dock/dock.esm.js +41 -5
  212. package/dock/dock.esm.min.js +1 -1
  213. package/dock/dock.js +53 -18
  214. package/dock/dock.min.css +1 -1
  215. package/dock/dock.min.js +1 -1
  216. package/dropdown/dropdown.cjs.js +90 -76
  217. package/dropdown/dropdown.cjs.min.js +1 -1
  218. package/dropdown/dropdown.esm.js +28 -14
  219. package/dropdown/dropdown.esm.min.js +1 -1
  220. package/dropdown/dropdown.js +86 -77
  221. package/dropdown/dropdown.min.js +1 -1
  222. package/editor/editor.cjs.js +40 -40
  223. package/editor/editor.cjs.min.js +1 -1
  224. package/editor/editor.esm.js +4 -2
  225. package/editor/editor.esm.min.js +1 -1
  226. package/editor/editor.js +39 -37
  227. package/editor/editor.min.js +1 -1
  228. package/fieldset/fieldset.cjs.js +19 -15
  229. package/fieldset/fieldset.cjs.min.js +1 -1
  230. package/fieldset/fieldset.esm.js +5 -1
  231. package/fieldset/fieldset.esm.min.js +1 -1
  232. package/fieldset/fieldset.js +18 -16
  233. package/fieldset/fieldset.min.js +1 -1
  234. package/fileupload/fileupload.cjs.js +65 -56
  235. package/fileupload/fileupload.cjs.min.js +1 -1
  236. package/fileupload/fileupload.d.ts +2 -1
  237. package/fileupload/fileupload.esm.js +26 -17
  238. package/fileupload/fileupload.esm.min.js +1 -1
  239. package/fileupload/fileupload.js +65 -57
  240. package/fileupload/fileupload.min.js +1 -1
  241. package/fullcalendar/fullcalendar.cjs.js +8 -8
  242. package/fullcalendar/fullcalendar.cjs.min.js +1 -1
  243. package/fullcalendar/fullcalendar.esm.js +3 -1
  244. package/fullcalendar/fullcalendar.esm.min.js +1 -1
  245. package/fullcalendar/fullcalendar.js +7 -5
  246. package/fullcalendar/fullcalendar.min.js +1 -1
  247. package/galleria/galleria.cjs.js +72 -65
  248. package/galleria/galleria.cjs.min.js +1 -1
  249. package/galleria/galleria.esm.js +8 -2
  250. package/galleria/galleria.esm.min.js +1 -1
  251. package/galleria/galleria.js +69 -66
  252. package/galleria/galleria.min.js +1 -1
  253. package/gmap/gmap.cjs.js +3 -1
  254. package/gmap/gmap.cjs.min.js +1 -1
  255. package/gmap/gmap.esm.js +2 -0
  256. package/gmap/gmap.esm.min.js +1 -1
  257. package/gmap/gmap.js +4 -2
  258. package/gmap/gmap.min.js +1 -1
  259. package/image/image.cjs.js +33 -27
  260. package/image/image.cjs.min.js +1 -1
  261. package/image/image.d.ts +5 -5
  262. package/image/image.esm.js +7 -2
  263. package/image/image.esm.min.js +1 -1
  264. package/image/image.js +31 -28
  265. package/image/image.min.js +1 -1
  266. package/inplace/inplace.cjs.js +10 -8
  267. package/inplace/inplace.cjs.min.js +1 -1
  268. package/inplace/inplace.esm.js +3 -1
  269. package/inplace/inplace.esm.min.js +1 -1
  270. package/inplace/inplace.js +11 -9
  271. package/inplace/inplace.min.js +1 -1
  272. package/inputmask/inputmask.cjs.js +11 -8
  273. package/inputmask/inputmask.cjs.min.js +1 -1
  274. package/inputmask/inputmask.esm.js +4 -1
  275. package/inputmask/inputmask.esm.min.js +1 -1
  276. package/inputmask/inputmask.js +11 -9
  277. package/inputmask/inputmask.min.js +1 -1
  278. package/inputnumber/inputnumber.cjs.js +50 -29
  279. package/inputnumber/inputnumber.cjs.min.js +1 -1
  280. package/inputnumber/inputnumber.esm.js +33 -12
  281. package/inputnumber/inputnumber.esm.min.js +1 -1
  282. package/inputnumber/inputnumber.js +49 -30
  283. package/inputnumber/inputnumber.min.js +1 -1
  284. package/inputswitch/inputswitch.cjs.js +17 -12
  285. package/inputswitch/inputswitch.cjs.min.js +1 -1
  286. package/inputswitch/inputswitch.esm.js +10 -5
  287. package/inputswitch/inputswitch.esm.min.js +1 -1
  288. package/inputswitch/inputswitch.js +17 -13
  289. package/inputswitch/inputswitch.min.js +1 -1
  290. package/inputtext/inputtext.cjs.js +14 -10
  291. package/inputtext/inputtext.cjs.min.js +1 -1
  292. package/inputtext/inputtext.d.ts +1 -1
  293. package/inputtext/inputtext.esm.js +5 -1
  294. package/inputtext/inputtext.esm.min.js +1 -1
  295. package/inputtext/inputtext.js +13 -11
  296. package/inputtext/inputtext.min.css +1 -1
  297. package/inputtext/inputtext.min.js +1 -1
  298. package/inputtextarea/inputtextarea.cjs.js +12 -9
  299. package/inputtextarea/inputtextarea.cjs.min.js +1 -1
  300. package/inputtextarea/inputtextarea.d.ts +1 -1
  301. package/inputtextarea/inputtextarea.esm.js +4 -1
  302. package/inputtextarea/inputtextarea.esm.min.js +1 -1
  303. package/inputtextarea/inputtextarea.js +12 -10
  304. package/inputtextarea/inputtextarea.min.js +1 -1
  305. package/keyfilter/keyfilter.cjs.js +5 -5
  306. package/keyfilter/keyfilter.cjs.min.js +1 -1
  307. package/keyfilter/keyfilter.esm.js +1 -1
  308. package/keyfilter/keyfilter.esm.min.js +1 -1
  309. package/keyfilter/keyfilter.js +6 -6
  310. package/keyfilter/keyfilter.min.js +1 -1
  311. package/knob/knob.cjs.js +9 -7
  312. package/knob/knob.cjs.min.js +1 -1
  313. package/knob/knob.esm.js +3 -1
  314. package/knob/knob.esm.min.js +1 -1
  315. package/knob/knob.js +10 -8
  316. package/knob/knob.min.js +1 -1
  317. package/listbox/listbox.cjs.js +44 -39
  318. package/listbox/listbox.cjs.min.js +1 -1
  319. package/listbox/listbox.esm.js +9 -4
  320. package/listbox/listbox.esm.min.js +1 -1
  321. package/listbox/listbox.js +42 -40
  322. package/listbox/listbox.min.js +1 -1
  323. package/megamenu/megamenu.cjs.js +38 -35
  324. package/megamenu/megamenu.cjs.min.js +1 -1
  325. package/megamenu/megamenu.esm.js +4 -1
  326. package/megamenu/megamenu.esm.min.js +1 -1
  327. package/megamenu/megamenu.js +38 -36
  328. package/megamenu/megamenu.min.js +1 -1
  329. package/mention/mention.cjs.js +55 -46
  330. package/mention/mention.cjs.min.js +1 -1
  331. package/mention/mention.esm.js +10 -2
  332. package/mention/mention.esm.min.js +1 -1
  333. package/mention/mention.js +50 -47
  334. package/mention/mention.min.js +1 -1
  335. package/menu/menu.cjs.js +35 -28
  336. package/menu/menu.cjs.min.js +1 -1
  337. package/menu/menu.d.ts +2 -0
  338. package/menu/menu.esm.js +8 -2
  339. package/menu/menu.esm.min.js +1 -1
  340. package/menu/menu.js +32 -29
  341. package/menu/menu.min.js +1 -1
  342. package/menubar/menubar.cjs.js +40 -35
  343. package/menubar/menubar.cjs.min.js +1 -1
  344. package/menubar/menubar.esm.js +6 -2
  345. package/menubar/menubar.esm.min.js +1 -1
  346. package/menubar/menubar.js +39 -36
  347. package/menubar/menubar.min.js +1 -1
  348. package/message/message.cjs.js +11 -8
  349. package/message/message.cjs.min.js +1 -1
  350. package/message/message.d.ts +3 -1
  351. package/message/message.esm.js +5 -2
  352. package/message/message.esm.min.js +1 -1
  353. package/message/message.js +12 -9
  354. package/message/message.min.js +1 -1
  355. package/messages/messages.cjs.js +21 -17
  356. package/messages/messages.cjs.min.js +1 -1
  357. package/messages/messages.esm.js +5 -1
  358. package/messages/messages.esm.min.js +1 -1
  359. package/messages/messages.js +20 -18
  360. package/messages/messages.min.js +1 -1
  361. package/multiselect/multiselect.cjs.js +132 -118
  362. package/multiselect/multiselect.cjs.min.js +1 -1
  363. package/multiselect/multiselect.d.ts +6 -2
  364. package/multiselect/multiselect.esm.js +47 -33
  365. package/multiselect/multiselect.esm.min.js +1 -1
  366. package/multiselect/multiselect.js +128 -119
  367. package/multiselect/multiselect.min.js +1 -1
  368. package/multistatecheckbox/multistatecheckbox.cjs.js +16 -13
  369. package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
  370. package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
  371. package/multistatecheckbox/multistatecheckbox.esm.js +4 -1
  372. package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
  373. package/multistatecheckbox/multistatecheckbox.js +16 -14
  374. package/multistatecheckbox/multistatecheckbox.min.js +1 -1
  375. package/orderlist/orderlist.cjs.js +37 -34
  376. package/orderlist/orderlist.cjs.min.js +1 -1
  377. package/orderlist/orderlist.esm.js +4 -1
  378. package/orderlist/orderlist.esm.min.js +1 -1
  379. package/orderlist/orderlist.js +37 -35
  380. package/orderlist/orderlist.min.js +1 -1
  381. package/organizationchart/organizationchart.cjs.js +28 -26
  382. package/organizationchart/organizationchart.cjs.min.js +1 -1
  383. package/organizationchart/organizationchart.esm.js +3 -1
  384. package/organizationchart/organizationchart.esm.min.js +1 -1
  385. package/organizationchart/organizationchart.js +29 -27
  386. package/organizationchart/organizationchart.min.js +1 -1
  387. package/overlaypanel/overlaypanel.cjs.js +33 -24
  388. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  389. package/overlaypanel/overlaypanel.d.ts +1 -1
  390. package/overlaypanel/overlaypanel.esm.js +10 -2
  391. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  392. package/overlaypanel/overlaypanel.js +29 -25
  393. package/overlaypanel/overlaypanel.min.js +1 -1
  394. package/overlayservice/overlayservice.cjs.js +2 -2
  395. package/overlayservice/overlayservice.cjs.min.js +1 -1
  396. package/overlayservice/overlayservice.esm.js +1 -1
  397. package/overlayservice/overlayservice.esm.min.js +1 -1
  398. package/overlayservice/overlayservice.js +3 -3
  399. package/overlayservice/overlayservice.min.js +1 -1
  400. package/package.json +10 -4
  401. package/paginator/paginator.cjs.js +51 -48
  402. package/paginator/paginator.cjs.min.js +1 -1
  403. package/paginator/paginator.esm.js +5 -2
  404. package/paginator/paginator.esm.min.js +1 -1
  405. package/paginator/paginator.js +51 -49
  406. package/paginator/paginator.min.js +1 -1
  407. package/panel/panel.cjs.js +21 -17
  408. package/panel/panel.cjs.min.js +1 -1
  409. package/panel/panel.esm.js +5 -1
  410. package/panel/panel.esm.min.js +1 -1
  411. package/panel/panel.js +20 -18
  412. package/panel/panel.min.js +1 -1
  413. package/panelmenu/panelmenu.cjs.js +42 -39
  414. package/panelmenu/panelmenu.cjs.min.js +1 -1
  415. package/panelmenu/panelmenu.esm.js +4 -1
  416. package/panelmenu/panelmenu.esm.min.js +1 -1
  417. package/panelmenu/panelmenu.js +42 -40
  418. package/panelmenu/panelmenu.min.js +1 -1
  419. package/password/password.cjs.js +35 -29
  420. package/password/password.cjs.min.js +1 -1
  421. package/password/password.d.ts +1 -1
  422. package/password/password.esm.js +8 -2
  423. package/password/password.esm.min.js +1 -1
  424. package/password/password.js +32 -30
  425. package/password/password.min.js +1 -1
  426. package/picklist/picklist.cjs.js +60 -54
  427. package/picklist/picklist.cjs.min.js +1 -1
  428. package/picklist/picklist.esm.js +16 -10
  429. package/picklist/picklist.esm.min.js +1 -1
  430. package/picklist/picklist.js +60 -55
  431. package/picklist/picklist.min.js +1 -1
  432. package/portal/portal.cjs.js +7 -3
  433. package/portal/portal.cjs.min.js +1 -1
  434. package/portal/portal.esm.js +6 -2
  435. package/portal/portal.esm.min.js +1 -1
  436. package/portal/portal.js +8 -4
  437. package/portal/portal.min.js +1 -1
  438. package/primereact.all.cjs.js +8041 -5835
  439. package/primereact.all.cjs.min.js +1 -1
  440. package/primereact.all.esm.js +6905 -4701
  441. package/primereact.all.esm.min.js +1 -1
  442. package/primereact.all.js +8040 -5832
  443. package/primereact.all.min.js +1 -1
  444. package/progressbar/progressbar.cjs.js +11 -9
  445. package/progressbar/progressbar.cjs.min.js +1 -1
  446. package/progressbar/progressbar.esm.js +3 -1
  447. package/progressbar/progressbar.esm.min.js +1 -1
  448. package/progressbar/progressbar.js +12 -10
  449. package/progressbar/progressbar.min.js +1 -1
  450. package/progressspinner/progressspinner.cjs.js +7 -5
  451. package/progressspinner/progressspinner.cjs.min.js +1 -1
  452. package/progressspinner/progressspinner.esm.js +3 -1
  453. package/progressspinner/progressspinner.esm.min.js +1 -1
  454. package/progressspinner/progressspinner.js +8 -6
  455. package/progressspinner/progressspinner.min.js +1 -1
  456. package/radiobutton/radiobutton.cjs.js +12 -9
  457. package/radiobutton/radiobutton.cjs.min.js +1 -1
  458. package/radiobutton/radiobutton.esm.js +4 -1
  459. package/radiobutton/radiobutton.esm.min.js +1 -1
  460. package/radiobutton/radiobutton.js +12 -10
  461. package/radiobutton/radiobutton.min.js +1 -1
  462. package/rating/rating.cjs.js +12 -9
  463. package/rating/rating.cjs.min.js +1 -1
  464. package/rating/rating.esm.js +6 -3
  465. package/rating/rating.esm.min.js +1 -1
  466. package/rating/rating.js +12 -10
  467. package/rating/rating.min.js +1 -1
  468. package/resources/primereact.css +430 -238
  469. package/resources/primereact.min.css +1 -1
  470. package/resources/themes/arya-blue/theme.css +158 -27
  471. package/resources/themes/arya-green/theme.css +158 -27
  472. package/resources/themes/arya-orange/theme.css +158 -27
  473. package/resources/themes/arya-purple/theme.css +158 -27
  474. package/resources/themes/bootstrap4-dark-blue/theme.css +162 -31
  475. package/resources/themes/bootstrap4-dark-purple/theme.css +162 -31
  476. package/resources/themes/bootstrap4-light-blue/theme.css +162 -31
  477. package/resources/themes/bootstrap4-light-purple/theme.css +162 -31
  478. package/resources/themes/fluent-light/theme.css +158 -27
  479. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
  480. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
  481. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
  482. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
  483. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
  484. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
  485. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
  486. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
  487. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
  488. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
  489. package/resources/themes/lara-dark-blue/theme.css +5671 -0
  490. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
  491. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
  492. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
  493. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
  494. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
  495. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
  496. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
  497. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
  498. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
  499. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  500. package/resources/themes/lara-dark-indigo/theme.css +5671 -0
  501. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
  502. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
  503. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
  504. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
  505. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
  506. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
  507. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
  508. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
  509. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
  510. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
  511. package/resources/themes/lara-dark-purple/theme.css +5671 -0
  512. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
  513. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
  514. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
  515. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
  516. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
  517. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
  518. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
  519. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
  520. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
  521. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
  522. package/resources/themes/lara-dark-teal/theme.css +5671 -0
  523. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
  524. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
  525. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
  526. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
  527. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
  528. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
  529. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
  530. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
  531. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
  532. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
  533. package/resources/themes/lara-light-blue/theme.css +5671 -0
  534. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
  535. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
  536. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
  537. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
  538. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
  539. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
  540. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
  541. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
  542. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
  543. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  544. package/resources/themes/lara-light-indigo/theme.css +5671 -0
  545. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
  546. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
  547. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
  548. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
  549. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
  550. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
  551. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
  552. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
  553. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
  554. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
  555. package/resources/themes/lara-light-purple/theme.css +5671 -0
  556. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
  557. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
  558. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
  559. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
  560. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
  561. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
  562. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
  563. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
  564. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
  565. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
  566. package/resources/themes/lara-light-teal/theme.css +5671 -0
  567. package/resources/themes/luna-amber/theme.css +162 -31
  568. package/resources/themes/luna-blue/theme.css +162 -31
  569. package/resources/themes/luna-green/theme.css +162 -31
  570. package/resources/themes/luna-pink/theme.css +162 -31
  571. package/resources/themes/md-dark-deeppurple/theme.css +347 -56
  572. package/resources/themes/md-dark-indigo/theme.css +347 -56
  573. package/resources/themes/md-light-deeppurple/theme.css +347 -56
  574. package/resources/themes/md-light-indigo/theme.css +347 -56
  575. package/resources/themes/mdc-dark-deeppurple/theme.css +347 -56
  576. package/resources/themes/mdc-dark-indigo/theme.css +347 -56
  577. package/resources/themes/mdc-light-deeppurple/theme.css +347 -56
  578. package/resources/themes/mdc-light-indigo/theme.css +347 -56
  579. package/resources/themes/nova/theme.css +162 -31
  580. package/resources/themes/nova-accent/theme.css +162 -31
  581. package/resources/themes/nova-alt/theme.css +162 -31
  582. package/resources/themes/rhea/theme.css +162 -31
  583. package/resources/themes/saga-blue/theme.css +158 -27
  584. package/resources/themes/saga-green/theme.css +158 -27
  585. package/resources/themes/saga-orange/theme.css +158 -27
  586. package/resources/themes/saga-purple/theme.css +158 -27
  587. package/resources/themes/tailwind-light/theme.css +162 -31
  588. package/resources/themes/vela-blue/theme.css +158 -27
  589. package/resources/themes/vela-green/theme.css +158 -27
  590. package/resources/themes/vela-orange/theme.css +158 -27
  591. package/resources/themes/vela-purple/theme.css +158 -27
  592. package/ripple/ripple.cjs.js +13 -11
  593. package/ripple/ripple.cjs.min.js +1 -1
  594. package/ripple/ripple.esm.js +5 -3
  595. package/ripple/ripple.esm.min.js +1 -1
  596. package/ripple/ripple.js +14 -12
  597. package/ripple/ripple.min.js +1 -1
  598. package/row/row.cjs.js +3 -1
  599. package/row/row.cjs.min.js +1 -1
  600. package/row/row.esm.js +2 -0
  601. package/row/row.esm.min.js +1 -1
  602. package/row/row.js +4 -2
  603. package/row/row.min.js +1 -1
  604. package/scrollpanel/scrollpanel.cjs.js +21 -19
  605. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  606. package/scrollpanel/scrollpanel.esm.js +3 -1
  607. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  608. package/scrollpanel/scrollpanel.js +22 -20
  609. package/scrollpanel/scrollpanel.min.js +1 -1
  610. package/scrolltop/scrolltop.cjs.js +20 -13
  611. package/scrolltop/scrolltop.cjs.min.js +1 -1
  612. package/scrolltop/scrolltop.d.ts +2 -1
  613. package/scrolltop/scrolltop.esm.js +11 -5
  614. package/scrolltop/scrolltop.esm.min.js +1 -1
  615. package/scrolltop/scrolltop.js +18 -14
  616. package/scrolltop/scrolltop.min.js +1 -1
  617. package/selectbutton/selectbutton.cjs.js +19 -15
  618. package/selectbutton/selectbutton.cjs.min.js +1 -1
  619. package/selectbutton/selectbutton.esm.js +5 -1
  620. package/selectbutton/selectbutton.esm.min.js +1 -1
  621. package/selectbutton/selectbutton.js +18 -16
  622. package/selectbutton/selectbutton.min.js +1 -1
  623. package/selectitem/selectitem.d.ts +3 -1
  624. package/sidebar/sidebar.cjs.js +144 -116
  625. package/sidebar/sidebar.cjs.min.js +1 -1
  626. package/sidebar/sidebar.d.ts +2 -0
  627. package/sidebar/sidebar.esm.js +135 -108
  628. package/sidebar/sidebar.esm.min.js +1 -1
  629. package/sidebar/sidebar.js +141 -117
  630. package/sidebar/sidebar.min.css +1 -1
  631. package/sidebar/sidebar.min.js +1 -1
  632. package/skeleton/skeleton.cjs.js +5 -3
  633. package/skeleton/skeleton.cjs.min.js +1 -1
  634. package/skeleton/skeleton.esm.js +3 -1
  635. package/skeleton/skeleton.esm.min.js +1 -1
  636. package/skeleton/skeleton.js +6 -4
  637. package/skeleton/skeleton.min.js +1 -1
  638. package/slidemenu/slidemenu.cjs.js +39 -32
  639. package/slidemenu/slidemenu.cjs.min.js +1 -1
  640. package/slidemenu/slidemenu.esm.js +8 -2
  641. package/slidemenu/slidemenu.esm.min.js +1 -1
  642. package/slidemenu/slidemenu.js +36 -33
  643. package/slidemenu/slidemenu.min.js +1 -1
  644. package/slider/slider.cjs.js +40 -23
  645. package/slider/slider.cjs.min.js +1 -1
  646. package/slider/slider.esm.js +32 -15
  647. package/slider/slider.esm.min.js +1 -1
  648. package/slider/slider.js +41 -24
  649. package/slider/slider.min.js +1 -1
  650. package/speeddial/speeddial.cjs.js +22 -19
  651. package/speeddial/speeddial.cjs.min.js +1 -1
  652. package/speeddial/speeddial.d.ts +3 -2
  653. package/speeddial/speeddial.esm.js +4 -1
  654. package/speeddial/speeddial.esm.min.js +1 -1
  655. package/speeddial/speeddial.js +22 -20
  656. package/speeddial/speeddial.min.js +1 -1
  657. package/splitbutton/splitbutton.cjs.js +39 -33
  658. package/splitbutton/splitbutton.cjs.min.js +1 -1
  659. package/splitbutton/splitbutton.d.ts +4 -5
  660. package/splitbutton/splitbutton.esm.js +8 -2
  661. package/splitbutton/splitbutton.esm.min.js +1 -1
  662. package/splitbutton/splitbutton.js +36 -34
  663. package/splitbutton/splitbutton.min.js +1 -1
  664. package/splitter/splitter.cjs.js +21 -19
  665. package/splitter/splitter.cjs.min.js +1 -1
  666. package/splitter/splitter.esm.js +4 -2
  667. package/splitter/splitter.esm.min.js +1 -1
  668. package/splitter/splitter.js +22 -20
  669. package/splitter/splitter.min.js +1 -1
  670. package/steps/steps.cjs.js +12 -10
  671. package/steps/steps.cjs.min.js +1 -1
  672. package/steps/steps.esm.js +3 -1
  673. package/steps/steps.esm.min.js +1 -1
  674. package/steps/steps.js +13 -11
  675. package/steps/steps.min.js +1 -1
  676. package/styleclass/styleclass.cjs.js +35 -39
  677. package/styleclass/styleclass.cjs.min.js +1 -1
  678. package/styleclass/styleclass.esm.js +20 -24
  679. package/styleclass/styleclass.esm.min.js +1 -1
  680. package/styleclass/styleclass.js +36 -40
  681. package/styleclass/styleclass.min.js +1 -1
  682. package/tabmenu/tabmenu.cjs.js +18 -15
  683. package/tabmenu/tabmenu.cjs.min.js +1 -1
  684. package/tabmenu/tabmenu.esm.js +4 -1
  685. package/tabmenu/tabmenu.esm.min.js +1 -1
  686. package/tabmenu/tabmenu.js +18 -16
  687. package/tabmenu/tabmenu.min.js +1 -1
  688. package/tabview/tabview.cjs.js +177 -54
  689. package/tabview/tabview.cjs.min.js +1 -1
  690. package/tabview/tabview.d.ts +4 -1
  691. package/tabview/tabview.esm.js +146 -23
  692. package/tabview/tabview.esm.min.js +1 -1
  693. package/tabview/tabview.js +177 -55
  694. package/tabview/tabview.min.css +1 -1
  695. package/tabview/tabview.min.js +1 -1
  696. package/tag/tag.cjs.js +11 -8
  697. package/tag/tag.cjs.min.js +1 -1
  698. package/tag/tag.d.ts +2 -1
  699. package/tag/tag.esm.js +7 -4
  700. package/tag/tag.esm.min.js +1 -1
  701. package/tag/tag.js +12 -9
  702. package/tag/tag.min.js +1 -1
  703. package/terminal/terminal.cjs.js +14 -12
  704. package/terminal/terminal.cjs.min.js +1 -1
  705. package/terminal/terminal.esm.js +3 -1
  706. package/terminal/terminal.esm.min.js +1 -1
  707. package/terminal/terminal.js +15 -13
  708. package/terminal/terminal.min.js +1 -1
  709. package/terminalservice/terminalservice.cjs.js +2 -2
  710. package/terminalservice/terminalservice.cjs.min.js +1 -1
  711. package/terminalservice/terminalservice.esm.js +1 -1
  712. package/terminalservice/terminalservice.esm.min.js +1 -1
  713. package/terminalservice/terminalservice.js +3 -3
  714. package/terminalservice/terminalservice.min.js +1 -1
  715. package/tieredmenu/tieredmenu.cjs.js +44 -36
  716. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  717. package/tieredmenu/tieredmenu.esm.js +9 -2
  718. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  719. package/tieredmenu/tieredmenu.js +40 -37
  720. package/tieredmenu/tieredmenu.min.js +1 -1
  721. package/timeline/timeline.cjs.js +14 -12
  722. package/timeline/timeline.cjs.min.js +1 -1
  723. package/timeline/timeline.esm.js +3 -1
  724. package/timeline/timeline.esm.min.js +1 -1
  725. package/timeline/timeline.js +15 -13
  726. package/timeline/timeline.min.js +1 -1
  727. package/toast/toast.cjs.js +48 -40
  728. package/toast/toast.cjs.min.js +1 -1
  729. package/toast/toast.esm.js +22 -15
  730. package/toast/toast.esm.min.js +1 -1
  731. package/toast/toast.js +46 -41
  732. package/toast/toast.min.js +1 -1
  733. package/togglebutton/togglebutton.cjs.js +16 -9
  734. package/togglebutton/togglebutton.cjs.min.js +1 -1
  735. package/togglebutton/togglebutton.d.ts +3 -2
  736. package/togglebutton/togglebutton.esm.js +10 -3
  737. package/togglebutton/togglebutton.esm.min.js +1 -1
  738. package/togglebutton/togglebutton.js +15 -10
  739. package/togglebutton/togglebutton.min.js +1 -1
  740. package/toolbar/toolbar.cjs.js +9 -7
  741. package/toolbar/toolbar.cjs.min.js +1 -1
  742. package/toolbar/toolbar.esm.js +3 -1
  743. package/toolbar/toolbar.esm.min.js +1 -1
  744. package/toolbar/toolbar.js +10 -8
  745. package/toolbar/toolbar.min.js +1 -1
  746. package/tooltip/tooltip.cjs.js +36 -31
  747. package/tooltip/tooltip.cjs.min.js +1 -1
  748. package/tooltip/tooltip.esm.js +6 -2
  749. package/tooltip/tooltip.esm.min.js +1 -1
  750. package/tooltip/tooltip.js +35 -32
  751. package/tooltip/tooltip.min.css +1 -1
  752. package/tooltip/tooltip.min.js +1 -1
  753. package/tree/tree.cjs.js +54 -51
  754. package/tree/tree.cjs.min.js +1 -1
  755. package/tree/tree.d.ts +9 -2
  756. package/tree/tree.esm.js +4 -1
  757. package/tree/tree.esm.min.js +1 -1
  758. package/tree/tree.js +54 -52
  759. package/tree/tree.min.js +1 -1
  760. package/treenode/treenode.d.ts +3 -1
  761. package/treeselect/treeselect.cjs.js +52 -46
  762. package/treeselect/treeselect.cjs.min.js +1 -1
  763. package/treeselect/treeselect.d.ts +9 -2
  764. package/treeselect/treeselect.esm.js +11 -5
  765. package/treeselect/treeselect.esm.min.js +1 -1
  766. package/treeselect/treeselect.js +49 -47
  767. package/treeselect/treeselect.min.js +1 -1
  768. package/treetable/treetable.cjs.js +1290 -272
  769. package/treetable/treetable.cjs.min.js +1 -1
  770. package/treetable/treetable.d.ts +9 -2
  771. package/treetable/treetable.esm.js +1213 -195
  772. package/treetable/treetable.esm.min.js +1 -1
  773. package/treetable/treetable.js +1288 -273
  774. package/treetable/treetable.min.js +1 -1
  775. package/tristatecheckbox/tristatecheckbox.cjs.js +13 -10
  776. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  777. package/tristatecheckbox/tristatecheckbox.esm.js +4 -1
  778. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  779. package/tristatecheckbox/tristatecheckbox.js +13 -11
  780. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  781. package/utils/utils.cjs.js +502 -525
  782. package/utils/utils.cjs.min.js +1 -1
  783. package/utils/utils.d.ts +29 -20
  784. package/utils/utils.esm.js +501 -524
  785. package/utils/utils.esm.min.js +1 -1
  786. package/utils/utils.js +503 -526
  787. package/utils/utils.min.js +1 -1
  788. package/virtualscroller/virtualscroller.cjs.js +285 -168
  789. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  790. package/virtualscroller/virtualscroller.d.ts +21 -9
  791. package/virtualscroller/virtualscroller.esm.js +278 -161
  792. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  793. package/virtualscroller/virtualscroller.js +286 -169
  794. package/virtualscroller/virtualscroller.min.js +1 -1
  795. package/web-types.json +17 -27
  796. package/core/core.cjs.js +0 -3080
  797. package/core/core.cjs.min.js +0 -1
  798. package/core/core.esm.js +0 -3055
  799. package/core/core.esm.min.js +0 -1
  800. package/core/package.json +0 -5
@@ -1 +1 @@
1
- import e,{Component as t}from"react";import{ObjectUtils as r,classNames as n}from"primereact/core";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})(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})(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?a(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var y,d,h,m=function(c){l(b,t);var s,a,y,d,h,m=(s=b,a=f(),function(){var e,t=p(s);if(a){var r=p(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),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}}),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};
package/card/card.js CHANGED
@@ -1,5 +1,5 @@
1
1
  this.primereact = this.primereact || {};
2
- this.primereact.card = (function (exports, React, core) {
2
+ this.primereact.card = (function (exports, React, utils) {
3
3
  'use strict';
4
4
 
5
5
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -79,6 +79,8 @@ this.primereact.card = (function (exports, React, core) {
79
79
  function _possibleConstructorReturn(self, call) {
80
80
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
81
81
  return call;
82
+ } else if (call !== void 0) {
83
+ throw new TypeError("Derived constructors may only return object or undefined");
82
84
  }
83
85
 
84
86
  return _assertThisInitialized(self);
@@ -124,9 +126,9 @@ this.primereact.card = (function (exports, React, core) {
124
126
  key: "renderHeader",
125
127
  value: function renderHeader() {
126
128
  if (this.props.header) {
127
- return /*#__PURE__*/React__default['default'].createElement("div", {
129
+ return /*#__PURE__*/React__default["default"].createElement("div", {
128
130
  className: "p-card-header"
129
- }, core.ObjectUtils.getJSXElement(this.props.header, this.props));
131
+ }, utils.ObjectUtils.getJSXElement(this.props.header, this.props));
130
132
  }
131
133
 
132
134
  return null;
@@ -134,19 +136,19 @@ this.primereact.card = (function (exports, React, core) {
134
136
  }, {
135
137
  key: "renderBody",
136
138
  value: function renderBody() {
137
- var title = this.props.title && /*#__PURE__*/React__default['default'].createElement("div", {
139
+ var title = this.props.title && /*#__PURE__*/React__default["default"].createElement("div", {
138
140
  className: "p-card-title"
139
- }, core.ObjectUtils.getJSXElement(this.props.title, this.props));
140
- var subTitle = this.props.subTitle && /*#__PURE__*/React__default['default'].createElement("div", {
141
+ }, utils.ObjectUtils.getJSXElement(this.props.title, this.props));
142
+ var subTitle = this.props.subTitle && /*#__PURE__*/React__default["default"].createElement("div", {
141
143
  className: "p-card-subtitle"
142
- }, core.ObjectUtils.getJSXElement(this.props.subTitle, this.props));
143
- var children = this.props.children && /*#__PURE__*/React__default['default'].createElement("div", {
144
+ }, utils.ObjectUtils.getJSXElement(this.props.subTitle, this.props));
145
+ var children = this.props.children && /*#__PURE__*/React__default["default"].createElement("div", {
144
146
  className: "p-card-content"
145
147
  }, this.props.children);
146
- var footer = this.props.footer && /*#__PURE__*/React__default['default'].createElement("div", {
148
+ var footer = this.props.footer && /*#__PURE__*/React__default["default"].createElement("div", {
147
149
  className: "p-card-footer"
148
- }, core.ObjectUtils.getJSXElement(this.props.footer, this.props));
149
- return /*#__PURE__*/React__default['default'].createElement("div", {
150
+ }, utils.ObjectUtils.getJSXElement(this.props.footer, this.props));
151
+ return /*#__PURE__*/React__default["default"].createElement("div", {
150
152
  className: "p-card-body"
151
153
  }, title, subTitle, children, footer);
152
154
  }
@@ -155,8 +157,8 @@ this.primereact.card = (function (exports, React, core) {
155
157
  value: function render() {
156
158
  var header = this.renderHeader();
157
159
  var body = this.renderBody();
158
- var className = core.classNames('p-card p-component', this.props.className);
159
- return /*#__PURE__*/React__default['default'].createElement("div", {
160
+ var className = utils.classNames('p-card p-component', this.props.className);
161
+ return /*#__PURE__*/React__default["default"].createElement("div", {
160
162
  className: className,
161
163
  style: this.props.style,
162
164
  id: this.props.id
@@ -183,4 +185,4 @@ this.primereact.card = (function (exports, React, core) {
183
185
 
184
186
  return exports;
185
187
 
186
- }({}, React, primereact.core));
188
+ })({}, React, primereact.utils);
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})(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 a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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){return!t||"object"!==a(t)&&"function"!=typeof t?u(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var y,h,m,b=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),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.core);
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);
@@ -3,7 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var core = require('primereact/core');
6
+ var utils = require('primereact/utils');
7
+ var ripple = require('primereact/ripple');
7
8
 
8
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
10
 
@@ -117,6 +118,8 @@ function _typeof(obj) {
117
118
  function _possibleConstructorReturn(self, call) {
118
119
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
119
120
  return call;
121
+ } else if (call !== void 0) {
122
+ throw new TypeError("Derived constructors may only return object or undefined");
120
123
  }
121
124
 
122
125
  return _assertThisInitialized(self);
@@ -167,12 +170,12 @@ var CarouselItem = /*#__PURE__*/function (_Component) {
167
170
  key: "render",
168
171
  value: function render() {
169
172
  var content = this.props.template(this.props.item);
170
- var itemClassName = core.classNames(this.props.className, 'p-carousel-item', {
173
+ var itemClassName = utils.classNames(this.props.className, 'p-carousel-item', {
171
174
  'p-carousel-item-active': this.props.active,
172
175
  'p-carousel-item-start': this.props.start,
173
176
  'p-carousel-item-end': this.props.end
174
177
  });
175
- return /*#__PURE__*/React__default['default'].createElement("div", {
178
+ return /*#__PURE__*/React__default["default"].createElement("div", {
176
179
  className: itemClassName
177
180
  }, content);
178
181
  }
@@ -223,7 +226,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
223
226
  _this.remainingItems = 0;
224
227
  _this.allowAutoplay = !!_this.props.autoplayInterval;
225
228
  _this.circular = _this.props.circular || _this.allowAutoplay;
226
- _this.attributeSelector = core.UniqueComponentId();
229
+ _this.attributeSelector = utils.UniqueComponentId();
227
230
  _this.swipeThreshold = 20;
228
231
  return _this;
229
232
  }
@@ -266,7 +269,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
266
269
  }
267
270
 
268
271
  if (this.itemsContainer) {
269
- core.DomHandler.removeClass(this.itemsContainer, 'p-items-hidden');
272
+ utils.DomHandler.removeClass(this.itemsContainer, 'p-items-hidden');
270
273
  this.changePosition(totalShiftedItems);
271
274
  this.itemsContainer.style.transition = 'transform 500ms ease 0s';
272
275
  }
@@ -382,7 +385,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
382
385
  key: "onTransitionEnd",
383
386
  value: function onTransitionEnd() {
384
387
  if (this.itemsContainer) {
385
- core.DomHandler.addClass(this.itemsContainer, 'p-items-hidden');
388
+ utils.DomHandler.addClass(this.itemsContainer, 'p-items-hidden');
386
389
  this.itemsContainer.style.transition = '';
387
390
 
388
391
  if ((this.state.page === 0 || this.state.page === this.totalIndicators - 1) && this.isCircular()) {
@@ -661,7 +664,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
661
664
  var isActive = _this4.state.totalShiftedItems * -1 === _this4.props.value.length + _this4.state.numVisible,
662
665
  start = index === 0,
663
666
  end = index === clonedElements.length - 1;
664
- return /*#__PURE__*/React__default['default'].createElement(CarouselItem, {
667
+ return /*#__PURE__*/React__default["default"].createElement(CarouselItem, {
665
668
  key: index + '_scloned',
666
669
  className: "p-carousel-item-cloned",
667
670
  template: _this4.props.itemTemplate,
@@ -676,7 +679,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
676
679
  var isActive = _this4.state.totalShiftedItems === 0,
677
680
  start = index === 0,
678
681
  end = index === clonedElements.length - 1;
679
- return /*#__PURE__*/React__default['default'].createElement(CarouselItem, {
682
+ return /*#__PURE__*/React__default["default"].createElement(CarouselItem, {
680
683
  key: index + '_fcloned',
681
684
  className: "p-carousel-item-cloned",
682
685
  template: _this4.props.itemTemplate,
@@ -694,7 +697,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
694
697
  isActive = firstIndex <= index && lastIndex >= index,
695
698
  start = firstIndex === index,
696
699
  end = lastIndex === index;
697
- return /*#__PURE__*/React__default['default'].createElement(CarouselItem, {
700
+ return /*#__PURE__*/React__default["default"].createElement(CarouselItem, {
698
701
  key: index,
699
702
  template: _this4.props.itemTemplate,
700
703
  item: item,
@@ -703,14 +706,14 @@ var Carousel = /*#__PURE__*/function (_Component2) {
703
706
  end: end
704
707
  });
705
708
  });
706
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
709
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
707
710
  }
708
711
  }
709
712
  }, {
710
713
  key: "renderHeader",
711
714
  value: function renderHeader() {
712
715
  if (this.props.header) {
713
- return /*#__PURE__*/React__default['default'].createElement("div", {
716
+ return /*#__PURE__*/React__default["default"].createElement("div", {
714
717
  className: "p-carousel-header"
715
718
  }, this.props.header);
716
719
  }
@@ -721,7 +724,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
721
724
  key: "renderFooter",
722
725
  value: function renderFooter() {
723
726
  if (this.props.footer) {
724
- return /*#__PURE__*/React__default['default'].createElement("div", {
727
+ return /*#__PURE__*/React__default["default"].createElement("div", {
725
728
  className: "p-carousel-footer"
726
729
  }, this.props.footer);
727
730
  }
@@ -737,15 +740,15 @@ var Carousel = /*#__PURE__*/function (_Component2) {
737
740
  var height = this.isVertical() ? this.props.verticalViewPortHeight : 'auto';
738
741
  var backwardNavigator = this.renderBackwardNavigator();
739
742
  var forwardNavigator = this.renderForwardNavigator();
740
- var containerClassName = core.classNames('p-carousel-container', this.props.containerClassName);
741
- return /*#__PURE__*/React__default['default'].createElement("div", {
743
+ var containerClassName = utils.classNames('p-carousel-container', this.props.containerClassName);
744
+ return /*#__PURE__*/React__default["default"].createElement("div", {
742
745
  className: containerClassName
743
- }, backwardNavigator, /*#__PURE__*/React__default['default'].createElement("div", {
746
+ }, backwardNavigator, /*#__PURE__*/React__default["default"].createElement("div", {
744
747
  className: "p-carousel-items-content",
745
748
  style: {
746
749
  'height': height
747
750
  }
748
- }, /*#__PURE__*/React__default['default'].createElement("div", {
751
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
749
752
  ref: function ref(el) {
750
753
  return _this5.itemsContainer = el;
751
754
  },
@@ -760,41 +763,41 @@ var Carousel = /*#__PURE__*/function (_Component2) {
760
763
  key: "renderBackwardNavigator",
761
764
  value: function renderBackwardNavigator() {
762
765
  var isDisabled = (!this.circular || this.props.value && this.props.value.length < this.state.numVisible) && this.getPage() === 0;
763
- var buttonClassName = core.classNames('p-carousel-prev p-link', {
766
+ var buttonClassName = utils.classNames('p-carousel-prev p-link', {
764
767
  'p-disabled': isDisabled
765
768
  }),
766
- iconClassName = core.classNames('p-carousel-prev-icon pi', {
769
+ iconClassName = utils.classNames('p-carousel-prev-icon pi', {
767
770
  'pi-chevron-left': !this.isVertical(),
768
771
  'pi-chevron-up': this.isVertical()
769
772
  });
770
- return /*#__PURE__*/React__default['default'].createElement("button", {
773
+ return /*#__PURE__*/React__default["default"].createElement("button", {
771
774
  type: "button",
772
775
  className: buttonClassName,
773
776
  onClick: this.navBackward,
774
777
  disabled: isDisabled
775
- }, /*#__PURE__*/React__default['default'].createElement("span", {
778
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
776
779
  className: iconClassName
777
- }), /*#__PURE__*/React__default['default'].createElement(core.Ripple, null));
780
+ }), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
778
781
  }
779
782
  }, {
780
783
  key: "renderForwardNavigator",
781
784
  value: function renderForwardNavigator() {
782
785
  var isDisabled = (!this.circular || this.props.value && this.props.value.length < this.state.numVisible) && (this.getPage() === this.totalIndicators - 1 || this.totalIndicators === 0);
783
- var buttonClassName = core.classNames('p-carousel-next p-link', {
786
+ var buttonClassName = utils.classNames('p-carousel-next p-link', {
784
787
  'p-disabled': isDisabled
785
788
  }),
786
- iconClassName = core.classNames('p-carousel-next-icon pi', {
789
+ iconClassName = utils.classNames('p-carousel-next-icon pi', {
787
790
  'pi-chevron-right': !this.isVertical(),
788
791
  'pi-chevron-down': this.isVertical()
789
792
  });
790
- return /*#__PURE__*/React__default['default'].createElement("button", {
793
+ return /*#__PURE__*/React__default["default"].createElement("button", {
791
794
  type: "button",
792
795
  className: buttonClassName,
793
796
  onClick: this.navForward,
794
797
  disabled: isDisabled
795
- }, /*#__PURE__*/React__default['default'].createElement("span", {
798
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
796
799
  className: iconClassName
797
- }), /*#__PURE__*/React__default['default'].createElement(core.Ripple, null));
800
+ }), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
798
801
  }
799
802
  }, {
800
803
  key: "renderIndicator",
@@ -802,31 +805,31 @@ var Carousel = /*#__PURE__*/function (_Component2) {
802
805
  var _this6 = this;
803
806
 
804
807
  var isActive = this.getPage() === index,
805
- indicatorItemClassName = core.classNames('p-carousel-indicator', {
808
+ indicatorItemClassName = utils.classNames('p-carousel-indicator', {
806
809
  'p-highlight': isActive
807
810
  });
808
- return /*#__PURE__*/React__default['default'].createElement("li", {
811
+ return /*#__PURE__*/React__default["default"].createElement("li", {
809
812
  className: indicatorItemClassName,
810
813
  key: 'p-carousel-indicator-' + index
811
- }, /*#__PURE__*/React__default['default'].createElement("button", {
814
+ }, /*#__PURE__*/React__default["default"].createElement("button", {
812
815
  type: "button",
813
816
  className: "p-link",
814
817
  onClick: function onClick(e) {
815
818
  return _this6.onDotClick(e, index);
816
819
  }
817
- }, /*#__PURE__*/React__default['default'].createElement(core.Ripple, null)));
820
+ }, /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null)));
818
821
  }
819
822
  }, {
820
823
  key: "renderIndicators",
821
824
  value: function renderIndicators() {
822
- var indicatorsContentClassName = core.classNames('p-carousel-indicators p-reset', this.props.indicatorsContentClassName);
825
+ var indicatorsContentClassName = utils.classNames('p-carousel-indicators p-reset', this.props.indicatorsContentClassName);
823
826
  var indicators = [];
824
827
 
825
828
  for (var i = 0; i < this.totalIndicators; i++) {
826
829
  indicators.push(this.renderIndicator(i));
827
830
  }
828
831
 
829
- return /*#__PURE__*/React__default['default'].createElement("ul", {
832
+ return /*#__PURE__*/React__default["default"].createElement("ul", {
830
833
  className: indicatorsContentClassName
831
834
  }, indicators);
832
835
  }
@@ -835,24 +838,24 @@ var Carousel = /*#__PURE__*/function (_Component2) {
835
838
  value: function render() {
836
839
  var _this7 = this;
837
840
 
838
- var className = core.classNames('p-carousel p-component', {
841
+ var className = utils.classNames('p-carousel p-component', {
839
842
  'p-carousel-vertical': this.isVertical(),
840
843
  'p-carousel-horizontal': !this.isVertical()
841
844
  }, this.props.className);
842
- var contentClassName = core.classNames('p-carousel-content', this.props.contentClassName);
845
+ var contentClassName = utils.classNames('p-carousel-content', this.props.contentClassName);
843
846
  this.totalIndicators = this.getTotalIndicators();
844
847
  var content = this.renderContent();
845
848
  var indicators = this.renderIndicators();
846
849
  var header = this.renderHeader();
847
850
  var footer = this.renderFooter();
848
- return /*#__PURE__*/React__default['default'].createElement("div", {
851
+ return /*#__PURE__*/React__default["default"].createElement("div", {
849
852
  ref: function ref(el) {
850
853
  return _this7.container = el;
851
854
  },
852
855
  id: this.props.id,
853
856
  className: className,
854
857
  style: this.props.style
855
- }, header, /*#__PURE__*/React__default['default'].createElement("div", {
858
+ }, header, /*#__PURE__*/React__default["default"].createElement("div", {
856
859
  className: contentClassName
857
860
  }, content, indicators), footer);
858
861
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/core");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(t);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function a(t){if(Array.isArray(t))return s(t)}function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function p(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(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&&m(t,e)}function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?u(t):e}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function I(t){var e=k();return function(){var n,i=g(t);if(e){var s=g(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return v(this,n)}}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var P=function(n){d(a,t.Component);var s=I(a);function a(){return c(this,a),s.apply(this,arguments)}return p(a,[{key:"render",value:function(){var t=this.props.template(this.props.item),n=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 i.default.createElement("div",{className:n},t)}}]),a}();y(P,"defaultProps",{template:null,item:null,active:!1,start:!1,end:!1,className:null});var w=function(n){d(h,t.Component);var s=I(h);function h(t){var n;return c(this,h),(n=s.call(this,t)).state={numVisible:t.numVisible,numScroll:t.numScroll,totalShiftedItems:t.page*t.numScroll*-1},n.props.onPageChange||(n.state=S(S({},n.state),{},{page:t.page})),n.navBackward=n.navBackward.bind(u(n)),n.navForward=n.navForward.bind(u(n)),n.onTransitionEnd=n.onTransitionEnd.bind(u(n)),n.onTouchStart=n.onTouchStart.bind(u(n)),n.onTouchMove=n.onTouchMove.bind(u(n)),n.onTouchEnd=n.onTouchEnd.bind(u(n)),n.totalIndicators=0,n.remainingItems=0,n.allowAutoplay=!!n.props.autoplayInterval,n.circular=n.props.circular||n.allowAutoplay,n.attributeSelector=e.UniqueComponentId(),n.swipeThreshold=20,n}return p(h,[{key:"step",value:function(t,n){var i=this.state.totalShiftedItems,s=this.isCircular();null!=n?(i=this.state.numScroll*n*-1,s&&(i-=this.state.numVisible),this.isRemainingItemsAdded=!1):(i+=this.state.numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!1),n=Math.abs(Math.floor((s?i+this.state.numVisible:i)/this.state.numScroll)));s&&this.state.page===this.totalIndicators-1&&-1===t?(i=-1*(this.props.value.length+this.state.numVisible),n=0):s&&0===this.state.page&&1===t?(i=0,n=this.totalIndicators-1):n===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.state.numScroll*t,this.isRemainingItemsAdded=!0),this.itemsContainer&&(e.DomHandler.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:n})):this.setState({page:n,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},n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];parseInt(i.breakpoint,10)>=t&&(e=i)}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=S(S({},s),{},{page:a})}this.state.numVisible!==e.numVisible&&(s=S(S({},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 n=this.getPage();e>n?this.navForward(t,e):e<n&&this.navBackward(t,e)}},{key:"onTransitionEnd",value:function(){this.itemsContainer&&(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=document.createElement("style"),document.body.appendChild(this.carouselStyle));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=a(t=this.props.responsiveOptions)||r(t)||o(t)||l(),this.responsiveOptions.sort((function(t,e){var n=t.breakpoint,i=e.breakpoint;return-1*(null==n&&null!=i?-1:null!=n&&null==i?1:null==n&&null==i?0:"string"==typeof n&&"string"==typeof i?n.localeCompare(i,void 0,{numeric:!0}):n<i?-1:n>i?1:0)}));for(var n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];e+="\n @media screen and (max-width: ".concat(i.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/i.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 n=this.isCircular(),i=!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}),i=!0),s=a*this.state.numScroll*-1,n&&(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}),i=!0),this.changePosition(s)}n&&(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}),i=!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)),!i&&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(),n=null,s=null;if(e){var a=null;n=(a=this.props.value.slice(-1*this.state.numVisible)).map((function(e,n){return i.default.createElement(P,{key:n+"_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===n,end:n===a.length-1})})),s=(a=this.props.value.slice(0,this.state.numVisible)).map((function(e,n){return i.default.createElement(P,{key:n+"_fcloned",className:"p-carousel-item-cloned",template:t.props.itemTemplate,item:e,active:0===t.state.totalShiftedItems,start:0===n,end:n===a.length-1})}))}var r=this.props.value.map((function(n,s){var a=e?-1*(t.state.totalShiftedItems+t.state.numVisible):-1*t.state.totalShiftedItems,r=a+t.state.numVisible-1;return i.default.createElement(P,{key:s,template:t.props.itemTemplate,item:n,active:a<=s&&r>=s,start:a===s,end:r===s})}));return i.default.createElement(i.default.Fragment,null,n,r,s)}}},{key:"renderHeader",value:function(){return this.props.header?i.default.createElement("div",{className:"p-carousel-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?i.default.createElement("div",{className:"p-carousel-footer"},this.props.footer):null}},{key:"renderContent",value:function(){var t=this,n=this.renderItems(),s=this.isVertical()?this.props.verticalViewPortHeight:"auto",a=this.renderBackwardNavigator(),r=this.renderForwardNavigator(),o=e.classNames("p-carousel-container",this.props.containerClassName);return i.default.createElement("div",{className:o},a,i.default.createElement("div",{className:"p-carousel-items-content",style:{height:s}},i.default.createElement("div",{ref:function(e){return t.itemsContainer=e},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},n)),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 i.default.createElement("button",{type:"button",className:n,onClick:this.navBackward,disabled:t},i.default.createElement("span",{className:s}),i.default.createElement(e.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 i.default.createElement("button",{type:"button",className:n,onClick:this.navForward,disabled:t},i.default.createElement("span",{className:s}),i.default.createElement(e.Ripple,null))}},{key:"renderIndicator",value:function(t){var n=this,s=this.getPage()===t,a=e.classNames("p-carousel-indicator",{"p-highlight":s});return i.default.createElement("li",{className:a,key:"p-carousel-indicator-"+t},i.default.createElement("button",{type:"button",className:"p-link",onClick:function(e){return n.onDotClick(e,t)}},i.default.createElement(e.Ripple,null)))}},{key:"renderIndicators",value:function(){for(var t=e.classNames("p-carousel-indicators p-reset",this.props.indicatorsContentClassName),n=[],s=0;s<this.totalIndicators;s++)n.push(this.renderIndicator(s));return i.default.createElement("ul",{className:t},n)}},{key:"render",value:function(){var t=this,n=e.classNames("p-carousel p-component",{"p-carousel-vertical":this.isVertical(),"p-carousel-horizontal":!this.isVertical()},this.props.className),s=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 i.default.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,className:n,style:this.props.style},o,i.default.createElement("div",{className:s},a,r),l)}}]),h}();y(w,"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=w;
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(){this.itemsContainer&&(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=document.createElement("style"),document.body.appendChild(this.carouselStyle));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=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 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 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}},s.default.createElement("div",{ref:function(e){return t.itemsContainer=e},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},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,5 +1,6 @@
1
1
  import React, { Component } from 'react';
2
- import { UniqueComponentId, DomHandler, classNames, Ripple } from 'primereact/core';
2
+ import { classNames, UniqueComponentId, DomHandler } from 'primereact/utils';
3
+ import { Ripple } from 'primereact/ripple';
3
4
 
4
5
  function _arrayLikeToArray(arr, len) {
5
6
  if (len == null || len > arr.length) len = arr.length;
@@ -109,6 +110,8 @@ function _typeof(obj) {
109
110
  function _possibleConstructorReturn(self, call) {
110
111
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
111
112
  return call;
113
+ } else if (call !== void 0) {
114
+ throw new TypeError("Derived constructors may only return object or undefined");
112
115
  }
113
116
 
114
117
  return _assertThisInitialized(self);
@@ -1 +1 @@
1
- import t,{Component as e}from"react";import{UniqueComponentId as i,DomHandler as n,classNames as s,Ripple as a}from"primereact/core";function r(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 r(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 r(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)?r(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 v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&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})(t)}function y(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?h(t):e}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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(i){f(a,e);var n=w(a);function a(){return p(this,a),n.apply(this,arguments)}return d(a,[{key:"render",value:function(){var e=this.props.template(this.props.item),i=s(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:i},e)}}]),a}();S(O,"defaultProps",{template:null,item:null,active:!1,start:!1,end:!1,className:null});var C=function(r){f(v,e);var m=w(v);function v(t){var e;return p(this,v),(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=i(),e.swipeThreshold=20,e}return d(v,[{key:"step",value:function(t,e){var i=this.state.totalShiftedItems,s=this.isCircular();null!=e?(i=this.state.numScroll*e*-1,s&&(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((s?i+this.state.numVisible:i)/this.state.numScroll)));s&&this.state.page===this.totalIndicators-1&&-1===t?(i=-1*(this.props.value.length+this.state.numVisible),e=0):s&&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&&(n.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 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=k(k({},s),{},{page:a})}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(){this.itemsContainer&&(n.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=document.createElement("style"),document.body.appendChild(this.carouselStyle));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 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 e=this;if(this.props.value&&this.props.value.length){var i=this.isCircular(),n=null,s=null;if(i){var a=null;n=(a=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===a.length-1})})),s=(a=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===a.length-1})}))}var r=this.props.value.map((function(n,s){var a=i?-1*(e.state.totalShiftedItems+e.state.numVisible):-1*e.state.totalShiftedItems,r=a+e.state.numVisible-1;return t.createElement(O,{key:s,template:e.props.itemTemplate,item:n,active:a<=s&&r>=s,start:a===s,end:r===s})}));return t.createElement(t.Fragment,null,n,r,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,i=this.renderItems(),n=this.isVertical()?this.props.verticalViewPortHeight:"auto",a=this.renderBackwardNavigator(),r=this.renderForwardNavigator(),o=s("p-carousel-container",this.props.containerClassName);return t.createElement("div",{className:o},a,t.createElement("div",{className:"p-carousel-items-content",style:{height:n}},t.createElement("div",{ref:function(t){return e.itemsContainer=t},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},i)),r)}},{key:"renderBackwardNavigator",value:function(){var e=(!this.circular||this.props.value&&this.props.value.length<this.state.numVisible)&&0===this.getPage(),i=s("p-carousel-prev p-link",{"p-disabled":e}),n=s("p-carousel-prev-icon pi",{"pi-chevron-left":!this.isVertical(),"pi-chevron-up":this.isVertical()});return t.createElement("button",{type:"button",className:i,onClick:this.navBackward,disabled:e},t.createElement("span",{className:n}),t.createElement(a,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),i=s("p-carousel-next p-link",{"p-disabled":e}),n=s("p-carousel-next-icon pi",{"pi-chevron-right":!this.isVertical(),"pi-chevron-down":this.isVertical()});return t.createElement("button",{type:"button",className:i,onClick:this.navForward,disabled:e},t.createElement("span",{className:n}),t.createElement(a,null))}},{key:"renderIndicator",value:function(e){var i=this,n=this.getPage()===e,r=s("p-carousel-indicator",{"p-highlight":n});return t.createElement("li",{className:r,key:"p-carousel-indicator-"+e},t.createElement("button",{type:"button",className:"p-link",onClick:function(t){return i.onDotClick(t,e)}},t.createElement(a,null)))}},{key:"renderIndicators",value:function(){for(var e=s("p-carousel-indicators p-reset",this.props.indicatorsContentClassName),i=[],n=0;n<this.totalIndicators;n++)i.push(this.renderIndicator(n));return t.createElement("ul",{className:e},i)}},{key:"render",value:function(){var e=this,i=s("p-carousel p-component",{"p-carousel-vertical":this.isVertical(),"p-carousel-horizontal":!this.isVertical()},this.props.className),n=s("p-carousel-content",this.props.contentClassName);this.totalIndicators=this.getTotalIndicators();var a=this.renderContent(),r=this.renderIndicators(),o=this.renderHeader(),l=this.renderFooter();return t.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:i,style:this.props.style},o,t.createElement("div",{className:n},a,r),l)}}]),v}();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";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 v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(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&&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 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){f(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){f(v,e);var m=w(v);function v(t){var e;return p(this,v),(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(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=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(){this.itemsContainer&&(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=document.createElement("style"),document.body.appendChild(this.carouselStyle));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}},t.createElement("div",{ref:function(t){return e.itemsContainer=t},className:"p-carousel-items-container",onTransitionEnd:this.onTransitionEnd,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},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}();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};