primereact 7.0.1 → 7.2.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 (797) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/accordion/accordion.cjs.js +27 -21
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.d.ts +5 -2
  6. package/accordion/accordion.esm.js +27 -21
  7. package/accordion/accordion.esm.min.js +1 -1
  8. package/accordion/accordion.js +27 -21
  9. package/accordion/accordion.min.js +1 -1
  10. package/api/api.cjs.js +29 -6
  11. package/api/api.cjs.min.js +1 -1
  12. package/api/api.d.ts +31 -30
  13. package/api/api.esm.js +29 -6
  14. package/api/api.esm.min.js +1 -1
  15. package/api/api.js +29 -6
  16. package/api/api.min.js +1 -1
  17. package/autocomplete/autocomplete.cjs.js +22 -22
  18. package/autocomplete/autocomplete.cjs.min.js +1 -1
  19. package/autocomplete/autocomplete.d.ts +9 -4
  20. package/autocomplete/autocomplete.esm.js +22 -22
  21. package/autocomplete/autocomplete.esm.min.js +1 -1
  22. package/autocomplete/autocomplete.js +22 -22
  23. package/autocomplete/autocomplete.min.js +1 -1
  24. package/avatar/avatar.cjs.js +11 -11
  25. package/avatar/avatar.cjs.min.js +1 -1
  26. package/avatar/avatar.d.ts +1 -1
  27. package/avatar/avatar.esm.js +11 -11
  28. package/avatar/avatar.esm.min.js +1 -1
  29. package/avatar/avatar.js +11 -11
  30. package/avatar/avatar.min.js +1 -1
  31. package/avatargroup/avatargroup.cjs.js +11 -11
  32. package/avatargroup/avatargroup.cjs.min.js +1 -1
  33. package/avatargroup/avatargroup.esm.js +11 -11
  34. package/avatargroup/avatargroup.esm.min.js +1 -1
  35. package/avatargroup/avatargroup.js +11 -11
  36. package/avatargroup/avatargroup.min.js +1 -1
  37. package/badge/badge.cjs.js +11 -11
  38. package/badge/badge.cjs.min.js +1 -1
  39. package/badge/badge.esm.js +11 -11
  40. package/badge/badge.esm.min.js +1 -1
  41. package/badge/badge.js +11 -11
  42. package/badge/badge.min.js +1 -1
  43. package/blockui/blockui.cjs.js +23 -16
  44. package/blockui/blockui.cjs.min.js +1 -1
  45. package/blockui/blockui.esm.js +23 -16
  46. package/blockui/blockui.esm.min.js +1 -1
  47. package/blockui/blockui.js +23 -16
  48. package/blockui/blockui.min.js +1 -1
  49. package/breadcrumb/breadcrumb.cjs.js +11 -11
  50. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  51. package/breadcrumb/breadcrumb.esm.js +11 -11
  52. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  53. package/breadcrumb/breadcrumb.js +11 -11
  54. package/breadcrumb/breadcrumb.min.js +1 -1
  55. package/button/button.cjs.js +13 -13
  56. package/button/button.cjs.min.js +1 -1
  57. package/button/button.d.ts +1 -1
  58. package/button/button.esm.js +13 -13
  59. package/button/button.esm.min.js +1 -1
  60. package/button/button.js +13 -13
  61. package/button/button.min.js +1 -1
  62. package/calendar/calendar.cjs.js +39 -20
  63. package/calendar/calendar.cjs.min.js +1 -1
  64. package/calendar/calendar.d.ts +3 -2
  65. package/calendar/calendar.esm.js +39 -20
  66. package/calendar/calendar.esm.min.js +1 -1
  67. package/calendar/calendar.js +39 -20
  68. package/calendar/calendar.min.js +1 -1
  69. package/captcha/captcha.cjs.js +11 -11
  70. package/captcha/captcha.cjs.min.js +1 -1
  71. package/captcha/captcha.esm.js +11 -11
  72. package/captcha/captcha.esm.min.js +1 -1
  73. package/captcha/captcha.js +11 -11
  74. package/captcha/captcha.min.js +1 -1
  75. package/card/card.cjs.js +11 -11
  76. package/card/card.cjs.min.js +1 -1
  77. package/card/card.esm.js +11 -11
  78. package/card/card.esm.min.js +1 -1
  79. package/card/card.js +11 -11
  80. package/card/card.min.js +1 -1
  81. package/carousel/carousel.cjs.js +235 -27
  82. package/carousel/carousel.cjs.min.js +1 -1
  83. package/carousel/carousel.esm.js +234 -27
  84. package/carousel/carousel.esm.min.js +1 -1
  85. package/carousel/carousel.js +236 -29
  86. package/carousel/carousel.min.js +1 -1
  87. package/cascadeselect/cascadeselect.cjs.js +15 -15
  88. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  89. package/cascadeselect/cascadeselect.d.ts +2 -1
  90. package/cascadeselect/cascadeselect.esm.js +15 -15
  91. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  92. package/cascadeselect/cascadeselect.js +15 -15
  93. package/cascadeselect/cascadeselect.min.js +1 -1
  94. package/chart/chart.cjs.js +13 -13
  95. package/chart/chart.cjs.min.js +1 -1
  96. package/chart/chart.esm.js +13 -13
  97. package/chart/chart.esm.min.js +1 -1
  98. package/chart/chart.js +13 -13
  99. package/chart/chart.min.js +1 -1
  100. package/checkbox/checkbox.cjs.js +13 -13
  101. package/checkbox/checkbox.cjs.min.js +1 -1
  102. package/checkbox/checkbox.d.ts +1 -1
  103. package/checkbox/checkbox.esm.js +13 -13
  104. package/checkbox/checkbox.esm.min.js +1 -1
  105. package/checkbox/checkbox.js +13 -13
  106. package/checkbox/checkbox.min.js +1 -1
  107. package/chip/chip.cjs.js +11 -11
  108. package/chip/chip.cjs.min.js +1 -1
  109. package/chip/chip.d.ts +1 -1
  110. package/chip/chip.esm.js +11 -11
  111. package/chip/chip.esm.min.js +1 -1
  112. package/chip/chip.js +11 -11
  113. package/chip/chip.min.js +1 -1
  114. package/chips/chips.cjs.js +13 -13
  115. package/chips/chips.cjs.min.js +1 -1
  116. package/chips/chips.esm.js +13 -13
  117. package/chips/chips.esm.min.js +1 -1
  118. package/chips/chips.js +13 -13
  119. package/chips/chips.min.js +1 -1
  120. package/colorpicker/colorpicker.cjs.js +16 -16
  121. package/colorpicker/colorpicker.cjs.min.js +1 -1
  122. package/colorpicker/colorpicker.d.ts +19 -5
  123. package/colorpicker/colorpicker.esm.js +16 -16
  124. package/colorpicker/colorpicker.esm.min.js +1 -1
  125. package/colorpicker/colorpicker.js +16 -16
  126. package/colorpicker/colorpicker.min.js +1 -1
  127. package/column/column.cjs.js +31 -12
  128. package/column/column.cjs.min.js +1 -1
  129. package/column/column.d.ts +5 -1
  130. package/column/column.esm.js +31 -12
  131. package/column/column.esm.min.js +1 -1
  132. package/column/column.js +31 -12
  133. package/column/column.min.js +1 -1
  134. package/columngroup/columngroup.cjs.js +28 -12
  135. package/columngroup/columngroup.cjs.min.js +1 -1
  136. package/columngroup/columngroup.esm.js +28 -12
  137. package/columngroup/columngroup.esm.min.js +1 -1
  138. package/columngroup/columngroup.js +28 -12
  139. package/columngroup/columngroup.min.js +1 -1
  140. package/confirmdialog/confirmdialog.cjs.js +13 -13
  141. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  142. package/confirmdialog/confirmdialog.d.ts +1 -1
  143. package/confirmdialog/confirmdialog.esm.js +13 -13
  144. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  145. package/confirmdialog/confirmdialog.js +13 -13
  146. package/confirmdialog/confirmdialog.min.js +1 -1
  147. package/confirmpopup/confirmpopup.cjs.js +16 -16
  148. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  149. package/confirmpopup/confirmpopup.d.ts +3 -2
  150. package/confirmpopup/confirmpopup.esm.js +16 -16
  151. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  152. package/confirmpopup/confirmpopup.js +16 -16
  153. package/confirmpopup/confirmpopup.min.js +1 -1
  154. package/contextmenu/contextmenu.cjs.js +14 -14
  155. package/contextmenu/contextmenu.cjs.min.js +1 -1
  156. package/contextmenu/contextmenu.d.ts +2 -1
  157. package/contextmenu/contextmenu.esm.js +14 -14
  158. package/contextmenu/contextmenu.esm.min.js +1 -1
  159. package/contextmenu/contextmenu.js +14 -14
  160. package/contextmenu/contextmenu.min.js +1 -1
  161. package/core/core.js +521 -323
  162. package/core/core.min.js +18 -18
  163. package/csstransition/csstransition.cjs.js +62 -32
  164. package/csstransition/csstransition.cjs.min.js +1 -1
  165. package/csstransition/csstransition.d.ts +8 -0
  166. package/csstransition/csstransition.esm.js +61 -32
  167. package/csstransition/csstransition.esm.min.js +1 -1
  168. package/csstransition/csstransition.js +62 -34
  169. package/csstransition/csstransition.min.js +1 -1
  170. package/csstransition/package.json +2 -1
  171. package/datascroller/datascroller.cjs.js +11 -11
  172. package/datascroller/datascroller.cjs.min.js +1 -1
  173. package/datascroller/datascroller.esm.js +11 -11
  174. package/datascroller/datascroller.esm.min.js +1 -1
  175. package/datascroller/datascroller.js +11 -11
  176. package/datascroller/datascroller.min.js +1 -1
  177. package/datatable/datatable.cjs.js +518 -346
  178. package/datatable/datatable.cjs.min.js +1 -1
  179. package/datatable/datatable.d.ts +34 -11
  180. package/datatable/datatable.esm.js +520 -348
  181. package/datatable/datatable.esm.min.js +1 -1
  182. package/datatable/datatable.js +518 -346
  183. package/datatable/datatable.min.css +1 -1
  184. package/datatable/datatable.min.js +1 -1
  185. package/dataview/dataview.cjs.js +12 -16
  186. package/dataview/dataview.cjs.min.js +1 -1
  187. package/dataview/dataview.esm.js +12 -16
  188. package/dataview/dataview.esm.min.js +1 -1
  189. package/dataview/dataview.js +12 -16
  190. package/dataview/dataview.min.js +1 -1
  191. package/deferredcontent/deferredcontent.cjs.js +11 -11
  192. package/deferredcontent/deferredcontent.cjs.min.js +1 -1
  193. package/deferredcontent/deferredcontent.esm.js +11 -11
  194. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  195. package/deferredcontent/deferredcontent.js +11 -11
  196. package/deferredcontent/deferredcontent.min.js +1 -1
  197. package/dialog/dialog.cjs.js +20 -22
  198. package/dialog/dialog.cjs.min.js +1 -1
  199. package/dialog/dialog.d.ts +2 -1
  200. package/dialog/dialog.esm.js +20 -22
  201. package/dialog/dialog.esm.min.js +1 -1
  202. package/dialog/dialog.js +20 -22
  203. package/dialog/dialog.min.js +1 -1
  204. package/divider/divider.cjs.js +11 -11
  205. package/divider/divider.cjs.min.js +1 -1
  206. package/divider/divider.esm.js +11 -11
  207. package/divider/divider.esm.min.js +1 -1
  208. package/divider/divider.js +11 -11
  209. package/divider/divider.min.js +1 -1
  210. package/dock/dock.cjs.js +11 -11
  211. package/dock/dock.cjs.min.js +1 -1
  212. package/dock/dock.esm.js +11 -11
  213. package/dock/dock.esm.min.js +1 -1
  214. package/dock/dock.js +11 -11
  215. package/dock/dock.min.js +1 -1
  216. package/dropdown/dropdown.cjs.js +36 -26
  217. package/dropdown/dropdown.cjs.min.js +1 -1
  218. package/dropdown/dropdown.d.ts +2 -1
  219. package/dropdown/dropdown.esm.js +36 -26
  220. package/dropdown/dropdown.esm.min.js +1 -1
  221. package/dropdown/dropdown.js +36 -26
  222. package/dropdown/dropdown.min.js +1 -1
  223. package/editor/editor.cjs.js +21 -17
  224. package/editor/editor.cjs.min.js +1 -1
  225. package/editor/editor.d.ts +1 -0
  226. package/editor/editor.esm.js +21 -17
  227. package/editor/editor.esm.min.js +1 -1
  228. package/editor/editor.js +21 -17
  229. package/editor/editor.min.js +1 -1
  230. package/fieldset/fieldset.cjs.js +14 -14
  231. package/fieldset/fieldset.cjs.min.js +1 -1
  232. package/fieldset/fieldset.d.ts +2 -1
  233. package/fieldset/fieldset.esm.js +14 -14
  234. package/fieldset/fieldset.esm.min.js +1 -1
  235. package/fieldset/fieldset.js +14 -14
  236. package/fieldset/fieldset.min.js +1 -1
  237. package/fileupload/fileupload.cjs.js +16 -13
  238. package/fileupload/fileupload.cjs.min.js +1 -1
  239. package/fileupload/fileupload.d.ts +3 -1
  240. package/fileupload/fileupload.esm.js +16 -13
  241. package/fileupload/fileupload.esm.min.js +1 -1
  242. package/fileupload/fileupload.js +16 -13
  243. package/fileupload/fileupload.min.js +1 -1
  244. package/fullcalendar/fullcalendar.cjs.js +11 -11
  245. package/fullcalendar/fullcalendar.cjs.min.js +1 -1
  246. package/fullcalendar/fullcalendar.esm.js +11 -11
  247. package/fullcalendar/fullcalendar.esm.min.js +1 -1
  248. package/fullcalendar/fullcalendar.js +11 -11
  249. package/fullcalendar/fullcalendar.min.js +1 -1
  250. package/galleria/galleria.cjs.js +228 -22
  251. package/galleria/galleria.cjs.min.js +1 -1
  252. package/galleria/galleria.d.ts +2 -1
  253. package/galleria/galleria.esm.js +228 -22
  254. package/galleria/galleria.esm.min.js +1 -1
  255. package/galleria/galleria.js +229 -23
  256. package/galleria/galleria.min.js +1 -1
  257. package/gmap/gmap.cjs.js +12 -12
  258. package/gmap/gmap.cjs.min.js +1 -1
  259. package/gmap/gmap.esm.js +12 -12
  260. package/gmap/gmap.esm.min.js +1 -1
  261. package/gmap/gmap.js +12 -12
  262. package/gmap/gmap.min.js +1 -1
  263. package/image/image.cjs.js +39 -18
  264. package/image/image.cjs.min.js +1 -1
  265. package/image/image.d.ts +1 -0
  266. package/image/image.esm.js +40 -19
  267. package/image/image.esm.min.js +1 -1
  268. package/image/image.js +39 -18
  269. package/image/image.min.js +1 -1
  270. package/inplace/inplace.cjs.js +11 -11
  271. package/inplace/inplace.cjs.min.js +1 -1
  272. package/inplace/inplace.esm.js +11 -11
  273. package/inplace/inplace.esm.min.js +1 -1
  274. package/inplace/inplace.js +11 -11
  275. package/inplace/inplace.min.js +1 -1
  276. package/inputmask/inputmask.cjs.js +15 -15
  277. package/inputmask/inputmask.cjs.min.js +1 -1
  278. package/inputmask/inputmask.d.ts +1 -1
  279. package/inputmask/inputmask.esm.js +15 -15
  280. package/inputmask/inputmask.esm.min.js +1 -1
  281. package/inputmask/inputmask.js +15 -15
  282. package/inputmask/inputmask.min.js +1 -1
  283. package/inputnumber/inputnumber.cjs.js +47 -35
  284. package/inputnumber/inputnumber.cjs.min.js +1 -1
  285. package/inputnumber/inputnumber.d.ts +4 -4
  286. package/inputnumber/inputnumber.esm.js +47 -35
  287. package/inputnumber/inputnumber.esm.min.js +1 -1
  288. package/inputnumber/inputnumber.js +47 -35
  289. package/inputnumber/inputnumber.min.js +1 -1
  290. package/inputswitch/inputswitch.cjs.js +13 -13
  291. package/inputswitch/inputswitch.cjs.min.js +1 -1
  292. package/inputswitch/inputswitch.esm.js +13 -13
  293. package/inputswitch/inputswitch.esm.min.js +1 -1
  294. package/inputswitch/inputswitch.js +13 -13
  295. package/inputswitch/inputswitch.min.js +1 -1
  296. package/inputtext/inputtext.cjs.js +13 -13
  297. package/inputtext/inputtext.cjs.min.js +1 -1
  298. package/inputtext/inputtext.esm.js +13 -13
  299. package/inputtext/inputtext.esm.min.js +1 -1
  300. package/inputtext/inputtext.js +13 -13
  301. package/inputtext/inputtext.min.js +1 -1
  302. package/inputtextarea/inputtextarea.cjs.js +13 -13
  303. package/inputtextarea/inputtextarea.cjs.min.js +1 -1
  304. package/inputtextarea/inputtextarea.esm.js +13 -13
  305. package/inputtextarea/inputtextarea.esm.min.js +1 -1
  306. package/inputtextarea/inputtextarea.js +13 -13
  307. package/inputtextarea/inputtextarea.min.js +1 -1
  308. package/keyfilter/keyfilter.cjs.js +4 -1
  309. package/keyfilter/keyfilter.cjs.min.js +1 -1
  310. package/keyfilter/keyfilter.esm.js +4 -1
  311. package/keyfilter/keyfilter.esm.min.js +1 -1
  312. package/keyfilter/keyfilter.js +4 -1
  313. package/keyfilter/keyfilter.min.js +1 -1
  314. package/knob/knob.cjs.js +12 -12
  315. package/knob/knob.cjs.min.js +1 -1
  316. package/knob/knob.esm.js +12 -12
  317. package/knob/knob.esm.min.js +1 -1
  318. package/knob/knob.js +12 -12
  319. package/knob/knob.min.js +1 -1
  320. package/listbox/listbox.cjs.js +14 -14
  321. package/listbox/listbox.cjs.min.js +1 -1
  322. package/listbox/listbox.esm.js +14 -14
  323. package/listbox/listbox.esm.min.js +1 -1
  324. package/listbox/listbox.js +14 -14
  325. package/listbox/listbox.min.js +1 -1
  326. package/megamenu/megamenu.cjs.js +11 -11
  327. package/megamenu/megamenu.cjs.min.js +1 -1
  328. package/megamenu/megamenu.esm.js +11 -11
  329. package/megamenu/megamenu.esm.min.js +1 -1
  330. package/megamenu/megamenu.js +11 -11
  331. package/megamenu/megamenu.min.js +1 -1
  332. package/mention/mention.cjs.js +17 -17
  333. package/mention/mention.cjs.min.js +1 -1
  334. package/mention/mention.d.ts +2 -1
  335. package/mention/mention.esm.js +17 -17
  336. package/mention/mention.esm.min.js +1 -1
  337. package/mention/mention.js +17 -17
  338. package/mention/mention.min.js +1 -1
  339. package/menu/menu.cjs.js +13 -13
  340. package/menu/menu.cjs.min.js +1 -1
  341. package/menu/menu.d.ts +2 -1
  342. package/menu/menu.esm.js +13 -13
  343. package/menu/menu.esm.min.js +1 -1
  344. package/menu/menu.js +13 -13
  345. package/menu/menu.min.js +1 -1
  346. package/menubar/menubar.cjs.js +11 -11
  347. package/menubar/menubar.cjs.min.js +1 -1
  348. package/menubar/menubar.esm.js +11 -11
  349. package/menubar/menubar.esm.min.js +1 -1
  350. package/menubar/menubar.js +11 -11
  351. package/menubar/menubar.min.css +1 -1
  352. package/menubar/menubar.min.js +1 -1
  353. package/message/message.cjs.js +11 -11
  354. package/message/message.cjs.min.js +1 -1
  355. package/message/message.esm.js +11 -11
  356. package/message/message.esm.min.js +1 -1
  357. package/message/message.js +11 -11
  358. package/message/message.min.js +1 -1
  359. package/messages/messages.cjs.js +11 -11
  360. package/messages/messages.cjs.min.js +1 -1
  361. package/messages/messages.d.ts +2 -1
  362. package/messages/messages.esm.js +11 -11
  363. package/messages/messages.esm.min.js +1 -1
  364. package/messages/messages.js +11 -11
  365. package/messages/messages.min.js +1 -1
  366. package/multiselect/multiselect.cjs.js +23 -23
  367. package/multiselect/multiselect.cjs.min.js +1 -1
  368. package/multiselect/multiselect.d.ts +3 -2
  369. package/multiselect/multiselect.esm.js +23 -23
  370. package/multiselect/multiselect.esm.min.js +1 -1
  371. package/multiselect/multiselect.js +23 -23
  372. package/multiselect/multiselect.min.js +1 -1
  373. package/multistatecheckbox/multistatecheckbox.cjs.js +13 -13
  374. package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
  375. package/multistatecheckbox/multistatecheckbox.d.ts +1 -1
  376. package/multistatecheckbox/multistatecheckbox.esm.js +13 -13
  377. package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
  378. package/multistatecheckbox/multistatecheckbox.js +13 -13
  379. package/multistatecheckbox/multistatecheckbox.min.js +1 -1
  380. package/orderlist/orderlist.cjs.js +11 -11
  381. package/orderlist/orderlist.cjs.min.js +1 -1
  382. package/orderlist/orderlist.esm.js +11 -11
  383. package/orderlist/orderlist.esm.min.js +1 -1
  384. package/orderlist/orderlist.js +11 -11
  385. package/orderlist/orderlist.min.js +1 -1
  386. package/organizationchart/organizationchart.cjs.js +11 -11
  387. package/organizationchart/organizationchart.cjs.min.js +1 -1
  388. package/organizationchart/organizationchart.esm.js +11 -11
  389. package/organizationchart/organizationchart.esm.min.js +1 -1
  390. package/organizationchart/organizationchart.js +11 -11
  391. package/organizationchart/organizationchart.min.css +1 -1
  392. package/organizationchart/organizationchart.min.js +1 -1
  393. package/overlaypanel/overlaypanel.cjs.js +15 -19
  394. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  395. package/overlaypanel/overlaypanel.d.ts +2 -1
  396. package/overlaypanel/overlaypanel.esm.js +15 -19
  397. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  398. package/overlaypanel/overlaypanel.js +15 -19
  399. package/overlaypanel/overlaypanel.min.js +1 -1
  400. package/package.json +3 -2
  401. package/paginator/paginator.cjs.js +13 -13
  402. package/paginator/paginator.cjs.min.js +1 -1
  403. package/paginator/paginator.esm.js +13 -13
  404. package/paginator/paginator.esm.min.js +1 -1
  405. package/paginator/paginator.js +13 -13
  406. package/paginator/paginator.min.js +1 -1
  407. package/panel/panel.cjs.js +17 -16
  408. package/panel/panel.cjs.min.js +1 -1
  409. package/panel/panel.d.ts +5 -3
  410. package/panel/panel.esm.js +18 -17
  411. package/panel/panel.esm.min.js +1 -1
  412. package/panel/panel.js +17 -16
  413. package/panel/panel.min.js +1 -1
  414. package/panelmenu/panelmenu.cjs.js +13 -13
  415. package/panelmenu/panelmenu.cjs.min.js +1 -1
  416. package/panelmenu/panelmenu.d.ts +2 -1
  417. package/panelmenu/panelmenu.esm.js +13 -13
  418. package/panelmenu/panelmenu.esm.min.js +1 -1
  419. package/panelmenu/panelmenu.js +13 -13
  420. package/panelmenu/panelmenu.min.js +1 -1
  421. package/password/password.cjs.js +15 -15
  422. package/password/password.cjs.min.js +1 -1
  423. package/password/password.d.ts +2 -1
  424. package/password/password.esm.js +15 -15
  425. package/password/password.esm.min.js +1 -1
  426. package/password/password.js +15 -15
  427. package/password/password.min.js +1 -1
  428. package/picklist/picklist.cjs.js +11 -11
  429. package/picklist/picklist.cjs.min.js +1 -1
  430. package/picklist/picklist.esm.js +11 -11
  431. package/picklist/picklist.esm.min.js +1 -1
  432. package/picklist/picklist.js +11 -11
  433. package/picklist/picklist.min.js +1 -1
  434. package/portal/portal.cjs.js +15 -18
  435. package/portal/portal.cjs.min.js +1 -1
  436. package/portal/portal.esm.js +15 -18
  437. package/portal/portal.esm.min.js +1 -1
  438. package/portal/portal.js +16 -20
  439. package/portal/portal.min.js +1 -1
  440. package/primereact.all.cjs.js +1531 -1073
  441. package/primereact.all.cjs.min.js +1 -1
  442. package/primereact.all.esm.js +1531 -1073
  443. package/primereact.all.esm.min.js +1 -1
  444. package/primereact.all.js +1531 -1073
  445. package/primereact.all.min.js +1 -1
  446. package/progressbar/progressbar.cjs.js +11 -11
  447. package/progressbar/progressbar.cjs.min.js +1 -1
  448. package/progressbar/progressbar.esm.js +11 -11
  449. package/progressbar/progressbar.esm.min.js +1 -1
  450. package/progressbar/progressbar.js +11 -11
  451. package/progressbar/progressbar.min.js +1 -1
  452. package/progressspinner/progressspinner.cjs.js +11 -11
  453. package/progressspinner/progressspinner.cjs.min.js +1 -1
  454. package/progressspinner/progressspinner.esm.js +11 -11
  455. package/progressspinner/progressspinner.esm.min.js +1 -1
  456. package/progressspinner/progressspinner.js +11 -11
  457. package/progressspinner/progressspinner.min.js +1 -1
  458. package/radiobutton/radiobutton.cjs.js +13 -13
  459. package/radiobutton/radiobutton.cjs.min.js +1 -1
  460. package/radiobutton/radiobutton.esm.js +13 -13
  461. package/radiobutton/radiobutton.esm.min.js +1 -1
  462. package/radiobutton/radiobutton.js +13 -13
  463. package/radiobutton/radiobutton.min.js +1 -1
  464. package/rating/rating.cjs.js +13 -13
  465. package/rating/rating.cjs.min.js +1 -1
  466. package/rating/rating.esm.js +13 -13
  467. package/rating/rating.esm.min.js +1 -1
  468. package/rating/rating.js +13 -13
  469. package/rating/rating.min.js +1 -1
  470. package/resources/primereact.css +129 -99
  471. package/resources/primereact.min.css +1 -1
  472. package/resources/themes/arya-blue/theme.css +314 -26
  473. package/resources/themes/arya-green/theme.css +314 -26
  474. package/resources/themes/arya-orange/theme.css +314 -26
  475. package/resources/themes/arya-purple/theme.css +314 -26
  476. package/resources/themes/bootstrap4-dark-blue/theme.css +291 -10
  477. package/resources/themes/bootstrap4-dark-purple/theme.css +291 -10
  478. package/resources/themes/bootstrap4-light-blue/theme.css +288 -7
  479. package/resources/themes/bootstrap4-light-purple/theme.css +288 -7
  480. package/resources/themes/fluent-light/theme.css +312 -24
  481. package/resources/themes/lara-dark-blue/theme.css +665 -412
  482. package/resources/themes/lara-dark-indigo/theme.css +665 -412
  483. package/resources/themes/lara-dark-purple/theme.css +665 -412
  484. package/resources/themes/lara-dark-teal/theme.css +665 -412
  485. package/resources/themes/lara-light-blue/theme.css +319 -66
  486. package/resources/themes/lara-light-indigo/theme.css +319 -66
  487. package/resources/themes/lara-light-purple/theme.css +319 -66
  488. package/resources/themes/lara-light-teal/theme.css +319 -66
  489. package/resources/themes/luna-amber/theme.css +305 -24
  490. package/resources/themes/luna-blue/theme.css +305 -24
  491. package/resources/themes/luna-green/theme.css +305 -24
  492. package/resources/themes/luna-pink/theme.css +305 -24
  493. package/resources/themes/md-dark-deeppurple/theme.css +370 -8
  494. package/resources/themes/md-dark-indigo/theme.css +370 -8
  495. package/resources/themes/md-light-deeppurple/theme.css +368 -6
  496. package/resources/themes/md-light-indigo/theme.css +368 -6
  497. package/resources/themes/mdc-dark-deeppurple/theme.css +370 -8
  498. package/resources/themes/mdc-dark-indigo/theme.css +370 -8
  499. package/resources/themes/mdc-light-deeppurple/theme.css +368 -6
  500. package/resources/themes/mdc-light-indigo/theme.css +368 -6
  501. package/resources/themes/nova/theme.css +305 -24
  502. package/resources/themes/nova-accent/theme.css +305 -24
  503. package/resources/themes/nova-alt/theme.css +305 -24
  504. package/resources/themes/rhea/theme.css +305 -24
  505. package/resources/themes/saga-blue/theme.css +295 -7
  506. package/resources/themes/saga-green/theme.css +295 -7
  507. package/resources/themes/saga-orange/theme.css +295 -7
  508. package/resources/themes/saga-purple/theme.css +295 -7
  509. package/resources/themes/tailwind-light/theme.css +315 -27
  510. package/resources/themes/vela-blue/theme.css +314 -26
  511. package/resources/themes/vela-green/theme.css +314 -26
  512. package/resources/themes/vela-orange/theme.css +314 -26
  513. package/resources/themes/vela-purple/theme.css +314 -26
  514. package/ripple/ripple.cjs.js +11 -11
  515. package/ripple/ripple.cjs.min.js +1 -1
  516. package/ripple/ripple.esm.js +11 -11
  517. package/ripple/ripple.esm.min.js +1 -1
  518. package/ripple/ripple.js +11 -11
  519. package/ripple/ripple.min.js +1 -1
  520. package/row/row.cjs.js +11 -11
  521. package/row/row.cjs.min.js +1 -1
  522. package/row/row.esm.js +11 -11
  523. package/row/row.esm.min.js +1 -1
  524. package/row/row.js +11 -11
  525. package/row/row.min.js +1 -1
  526. package/scrollpanel/scrollpanel.cjs.js +11 -11
  527. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  528. package/scrollpanel/scrollpanel.esm.js +11 -11
  529. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  530. package/scrollpanel/scrollpanel.js +11 -11
  531. package/scrollpanel/scrollpanel.min.js +1 -1
  532. package/scrolltop/scrolltop.cjs.js +12 -12
  533. package/scrolltop/scrolltop.cjs.min.js +1 -1
  534. package/scrolltop/scrolltop.d.ts +3 -2
  535. package/scrolltop/scrolltop.esm.js +12 -12
  536. package/scrolltop/scrolltop.esm.min.js +1 -1
  537. package/scrolltop/scrolltop.js +12 -12
  538. package/scrolltop/scrolltop.min.js +1 -1
  539. package/selectbutton/selectbutton.cjs.js +14 -14
  540. package/selectbutton/selectbutton.cjs.min.js +1 -1
  541. package/selectbutton/selectbutton.esm.js +14 -14
  542. package/selectbutton/selectbutton.esm.min.js +1 -1
  543. package/selectbutton/selectbutton.js +14 -14
  544. package/selectbutton/selectbutton.min.js +1 -1
  545. package/selectitem/selectitem.d.ts +1 -1
  546. package/sidebar/sidebar.cjs.js +14 -13
  547. package/sidebar/sidebar.cjs.min.js +1 -1
  548. package/sidebar/sidebar.d.ts +2 -1
  549. package/sidebar/sidebar.esm.js +14 -13
  550. package/sidebar/sidebar.esm.min.js +1 -1
  551. package/sidebar/sidebar.js +14 -13
  552. package/sidebar/sidebar.min.js +1 -1
  553. package/skeleton/skeleton.cjs.js +11 -11
  554. package/skeleton/skeleton.cjs.min.js +1 -1
  555. package/skeleton/skeleton.esm.js +11 -11
  556. package/skeleton/skeleton.esm.min.js +1 -1
  557. package/skeleton/skeleton.js +11 -11
  558. package/skeleton/skeleton.min.js +1 -1
  559. package/slidemenu/slidemenu.cjs.js +13 -13
  560. package/slidemenu/slidemenu.cjs.min.js +1 -1
  561. package/slidemenu/slidemenu.d.ts +2 -1
  562. package/slidemenu/slidemenu.esm.js +13 -13
  563. package/slidemenu/slidemenu.esm.min.js +1 -1
  564. package/slidemenu/slidemenu.js +13 -13
  565. package/slidemenu/slidemenu.min.js +1 -1
  566. package/slider/slider.cjs.js +11 -11
  567. package/slider/slider.cjs.min.js +1 -1
  568. package/slider/slider.esm.js +11 -11
  569. package/slider/slider.esm.min.js +1 -1
  570. package/slider/slider.js +11 -11
  571. package/slider/slider.min.js +1 -1
  572. package/speeddial/speeddial.cjs.js +13 -13
  573. package/speeddial/speeddial.cjs.min.js +1 -1
  574. package/speeddial/speeddial.d.ts +1 -1
  575. package/speeddial/speeddial.esm.js +13 -13
  576. package/speeddial/speeddial.esm.min.js +1 -1
  577. package/speeddial/speeddial.js +13 -13
  578. package/speeddial/speeddial.min.js +1 -1
  579. package/splitbutton/splitbutton.cjs.js +22 -18
  580. package/splitbutton/splitbutton.cjs.min.js +1 -1
  581. package/splitbutton/splitbutton.d.ts +9 -3
  582. package/splitbutton/splitbutton.esm.js +22 -18
  583. package/splitbutton/splitbutton.esm.min.js +1 -1
  584. package/splitbutton/splitbutton.js +22 -18
  585. package/splitbutton/splitbutton.min.css +1 -1
  586. package/splitbutton/splitbutton.min.js +1 -1
  587. package/splitter/splitter.cjs.js +12 -12
  588. package/splitter/splitter.cjs.min.js +1 -1
  589. package/splitter/splitter.esm.js +12 -12
  590. package/splitter/splitter.esm.min.js +1 -1
  591. package/splitter/splitter.js +12 -12
  592. package/splitter/splitter.min.js +1 -1
  593. package/steps/steps.cjs.js +11 -11
  594. package/steps/steps.cjs.min.js +1 -1
  595. package/steps/steps.esm.js +11 -11
  596. package/steps/steps.esm.min.js +1 -1
  597. package/steps/steps.js +11 -11
  598. package/steps/steps.min.js +1 -1
  599. package/styleclass/styleclass.cjs.js +11 -11
  600. package/styleclass/styleclass.cjs.min.js +1 -1
  601. package/styleclass/styleclass.esm.js +11 -11
  602. package/styleclass/styleclass.esm.min.js +1 -1
  603. package/styleclass/styleclass.js +11 -11
  604. package/styleclass/styleclass.min.js +1 -1
  605. package/tabmenu/tabmenu.cjs.js +12 -12
  606. package/tabmenu/tabmenu.cjs.min.js +1 -1
  607. package/tabmenu/tabmenu.esm.js +12 -12
  608. package/tabmenu/tabmenu.esm.min.js +1 -1
  609. package/tabmenu/tabmenu.js +12 -12
  610. package/tabmenu/tabmenu.min.js +1 -1
  611. package/tabview/tabview.cjs.js +57 -33
  612. package/tabview/tabview.cjs.min.js +1 -1
  613. package/tabview/tabview.d.ts +8 -0
  614. package/tabview/tabview.esm.js +57 -33
  615. package/tabview/tabview.esm.min.js +1 -1
  616. package/tabview/tabview.js +57 -33
  617. package/tabview/tabview.min.js +1 -1
  618. package/tag/tag.cjs.js +11 -11
  619. package/tag/tag.cjs.min.js +1 -1
  620. package/tag/tag.d.ts +1 -1
  621. package/tag/tag.esm.js +11 -11
  622. package/tag/tag.esm.min.js +1 -1
  623. package/tag/tag.js +11 -11
  624. package/tag/tag.min.js +1 -1
  625. package/terminal/terminal.cjs.js +11 -11
  626. package/terminal/terminal.cjs.min.js +1 -1
  627. package/terminal/terminal.esm.js +11 -11
  628. package/terminal/terminal.esm.min.js +1 -1
  629. package/terminal/terminal.js +11 -11
  630. package/terminal/terminal.min.js +1 -1
  631. package/tieredmenu/tieredmenu.cjs.js +13 -13
  632. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  633. package/tieredmenu/tieredmenu.d.ts +2 -1
  634. package/tieredmenu/tieredmenu.esm.js +13 -13
  635. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  636. package/tieredmenu/tieredmenu.js +13 -13
  637. package/tieredmenu/tieredmenu.min.js +1 -1
  638. package/timeline/timeline.cjs.js +11 -11
  639. package/timeline/timeline.cjs.min.js +1 -1
  640. package/timeline/timeline.esm.js +11 -11
  641. package/timeline/timeline.esm.min.js +1 -1
  642. package/timeline/timeline.js +11 -11
  643. package/timeline/timeline.min.js +1 -1
  644. package/toast/toast.cjs.js +26 -15
  645. package/toast/toast.cjs.min.js +1 -1
  646. package/toast/toast.d.ts +5 -1
  647. package/toast/toast.esm.js +26 -15
  648. package/toast/toast.esm.min.js +1 -1
  649. package/toast/toast.js +27 -17
  650. package/toast/toast.min.js +1 -1
  651. package/togglebutton/togglebutton.cjs.js +13 -13
  652. package/togglebutton/togglebutton.cjs.min.js +1 -1
  653. package/togglebutton/togglebutton.d.ts +1 -1
  654. package/togglebutton/togglebutton.esm.js +13 -13
  655. package/togglebutton/togglebutton.esm.min.js +1 -1
  656. package/togglebutton/togglebutton.js +13 -13
  657. package/togglebutton/togglebutton.min.js +1 -1
  658. package/toolbar/toolbar.cjs.js +11 -11
  659. package/toolbar/toolbar.cjs.min.js +1 -1
  660. package/toolbar/toolbar.esm.js +11 -11
  661. package/toolbar/toolbar.esm.min.js +1 -1
  662. package/toolbar/toolbar.js +11 -11
  663. package/toolbar/toolbar.min.css +1 -1
  664. package/toolbar/toolbar.min.js +1 -1
  665. package/tooltip/tooltip.cjs.js +45 -19
  666. package/tooltip/tooltip.cjs.min.js +1 -1
  667. package/tooltip/tooltip.d.ts +0 -1
  668. package/tooltip/tooltip.esm.js +45 -19
  669. package/tooltip/tooltip.esm.min.js +1 -1
  670. package/tooltip/tooltip.js +45 -19
  671. package/tooltip/tooltip.min.js +1 -1
  672. package/tooltip/tooltipoptions.d.ts +2 -0
  673. package/tree/tree.cjs.js +19 -18
  674. package/tree/tree.cjs.min.js +1 -1
  675. package/tree/tree.d.ts +8 -4
  676. package/tree/tree.esm.js +19 -18
  677. package/tree/tree.esm.min.js +1 -1
  678. package/tree/tree.js +19 -18
  679. package/tree/tree.min.js +1 -1
  680. package/treenode/treenode.d.ts +2 -1
  681. package/treeselect/treeselect.cjs.js +20 -20
  682. package/treeselect/treeselect.cjs.min.js +1 -1
  683. package/treeselect/treeselect.d.ts +2 -1
  684. package/treeselect/treeselect.esm.js +20 -20
  685. package/treeselect/treeselect.esm.min.js +1 -1
  686. package/treeselect/treeselect.js +20 -20
  687. package/treeselect/treeselect.min.js +1 -1
  688. package/treetable/treetable.cjs.js +101 -40
  689. package/treetable/treetable.cjs.min.js +1 -1
  690. package/treetable/treetable.d.ts +2 -1
  691. package/treetable/treetable.esm.js +97 -37
  692. package/treetable/treetable.esm.min.js +1 -1
  693. package/treetable/treetable.js +101 -40
  694. package/treetable/treetable.min.css +1 -1
  695. package/treetable/treetable.min.js +1 -1
  696. package/tristatecheckbox/tristatecheckbox.cjs.js +13 -13
  697. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  698. package/tristatecheckbox/tristatecheckbox.esm.js +13 -13
  699. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  700. package/tristatecheckbox/tristatecheckbox.js +13 -13
  701. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  702. package/utils/utils.cjs.js +98 -23
  703. package/utils/utils.cjs.min.js +1 -1
  704. package/utils/utils.d.ts +3 -0
  705. package/utils/utils.esm.js +98 -23
  706. package/utils/utils.esm.min.js +1 -1
  707. package/utils/utils.js +98 -23
  708. package/utils/utils.min.js +1 -1
  709. package/virtualscroller/virtualscroller.cjs.js +62 -36
  710. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  711. package/virtualscroller/virtualscroller.esm.js +62 -36
  712. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  713. package/virtualscroller/virtualscroller.js +62 -36
  714. package/virtualscroller/virtualscroller.min.css +1 -1
  715. package/virtualscroller/virtualscroller.min.js +1 -1
  716. package/web-types.json +59 -10
  717. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
  718. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
  719. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
  720. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
  721. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
  722. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
  723. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
  724. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
  725. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
  726. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
  727. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
  728. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
  729. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
  730. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
  731. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
  732. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
  733. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
  734. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
  735. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
  736. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  737. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
  738. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
  739. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
  740. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
  741. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
  742. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
  743. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
  744. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
  745. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
  746. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
  747. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
  748. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
  749. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
  750. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
  751. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
  752. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
  753. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
  754. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
  755. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
  756. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
  757. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
  758. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
  759. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
  760. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
  761. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
  762. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
  763. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
  764. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
  765. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
  766. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
  767. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
  768. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
  769. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
  770. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
  771. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
  772. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
  773. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
  774. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
  775. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
  776. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  777. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
  778. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
  779. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
  780. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
  781. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
  782. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
  783. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
  784. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
  785. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
  786. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
  787. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
  788. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
  789. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
  790. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
  791. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
  792. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
  793. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
  794. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
  795. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
  796. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
  797. package/util.d.ts +0 -1
@@ -60,6 +60,9 @@ this.primereact.terminal = (function (exports, React, terminalservice, utils) {
60
60
  function _createClass(Constructor, protoProps, staticProps) {
61
61
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
62
62
  if (staticProps) _defineProperties(Constructor, staticProps);
63
+ Object.defineProperty(Constructor, "prototype", {
64
+ writable: false
65
+ });
63
66
  return Constructor;
64
67
  }
65
68
 
@@ -92,23 +95,20 @@ this.primereact.terminal = (function (exports, React, terminalservice, utils) {
92
95
  configurable: true
93
96
  }
94
97
  });
98
+ Object.defineProperty(subClass, "prototype", {
99
+ writable: false
100
+ });
95
101
  if (superClass) _setPrototypeOf(subClass, superClass);
96
102
  }
97
103
 
98
104
  function _typeof(obj) {
99
105
  "@babel/helpers - typeof";
100
106
 
101
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
102
- _typeof = function _typeof(obj) {
103
- return typeof obj;
104
- };
105
- } else {
106
- _typeof = function _typeof(obj) {
107
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
108
- };
109
- }
110
-
111
- return _typeof(obj);
107
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
108
+ return typeof obj;
109
+ } : function (obj) {
110
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
111
+ }, _typeof(obj);
112
112
  }
113
113
 
114
114
  function _possibleConstructorReturn(self, call) {
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.terminal=function(e,t,n,r){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if(Array.isArray(e))return i(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):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 f(e){return c(e)||s(e)||l(e)||u()}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function h(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&&y(e,t)}function v(e){return v="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},v(e)}function b(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}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(e){return!1}}var k,C,S,x=function(e){h(u,e);var t,o,i,c,s,l=(t=u,o=w(),function(){var e,n=g(t);if(o){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return b(this,e)});function u(e){var t;return p(this,u),(t=l.call(this,e)).state={commandText:"",commands:[],index:0},t.onClick=t.onClick.bind(d(t)),t.onInputChange=t.onInputChange.bind(d(t)),t.onInputKeyDown=t.onInputKeyDown.bind(d(t)),t.response=t.response.bind(d(t)),t.clear=t.clear.bind(d(t)),t}return i=u,(c=[{key:"onClick",value:function(){this.input.focus()}},{key:"onInputChange",value:function(e){this.setState({commandText:e.target.value})}},{key:"onInputKeyDown",value:function(e){var t=this.state.commands;switch(e.which||e.keyCode){case 38:if(t&&t.length){var r=this.state.index-1<0?t.length-1:this.state.index-1;this.setState({index:r,commandText:t[r].text})}break;case 13:if(this.state.commandText){var o=f(t),a=this.state.commandText;o.push({text:a}),this.setState((function(e){return{index:e.index+1,commandText:"",commands:o}}),(function(){n.TerminalService.emit("command",a)}))}}}},{key:"response",value:function(e){var t=this.state.commands;if(t&&t.length>0){var n=f(t);n[n.length-1].response=e,this.setState({commands:n})}}},{key:"clear",value:function(){this.setState({commands:[],index:0})}},{key:"componentDidMount",value:function(){n.TerminalService.on("response",this.response),n.TerminalService.on("clear",this.clear)}},{key:"componentDidUpdate",value:function(){this.container.scrollTop=this.container.scrollHeight}},{key:"componentWillUnmount",value:function(){n.TerminalService.off("response",this.response),n.TerminalService.off("clear",this.clear)}},{key:"renderWelcomeMessage",value:function(){return this.props.welcomeMessage?a.default.createElement("div",null,this.props.welcomeMessage):null}},{key:"renderCommand",value:function(e,t){var n=e.text,r=e.response;return a.default.createElement("div",{key:"".concat(n).concat(t)},a.default.createElement("span",{className:"p-terminal-prompt"},this.props.prompt," "),a.default.createElement("span",{className:"p-terminal-command"},n),a.default.createElement("div",{className:"p-terminal-response"},r))}},{key:"renderContent",value:function(){var e=this,t=this.state.commands.map((function(t,n){return e.renderCommand(t,n)}));return a.default.createElement("div",{className:"p-terminal-content"},t)}},{key:"renderPromptContainer",value:function(){var e=this;return a.default.createElement("div",{className:"p-terminal-prompt-container"},a.default.createElement("span",{className:"p-terminal-prompt"},this.props.prompt," "),a.default.createElement("input",{ref:function(t){return e.input=t},type:"text",value:this.state.commandText,className:"p-terminal-input",autoComplete:"off",onChange:this.onInputChange,onKeyDown:this.onInputKeyDown}))}},{key:"render",value:function(){var e=this,t=r.classNames("p-terminal p-component",this.props.className),n=this.renderWelcomeMessage(),o=this.renderContent(),i=this.renderPromptContainer();return a.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:t,style:this.props.style,onClick:this.onClick},n,o,i)}}])&&m(i.prototype,c),s&&m(i,s),u}(t.Component);return S={id:null,style:null,className:null,welcomeMessage:null,prompt:null},(C="defaultProps")in(k=x)?Object.defineProperty(k,C,{value:S,enumerable:!0,configurable:!0,writable:!0}):k[C]=S,e.Terminal=x,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.terminalservice,primereact.utils);
1
+ this.primereact=this.primereact||{},this.primereact.terminal=function(e,t,n,r){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if(Array.isArray(e))return i(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):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 p(e){return c(e)||s(e)||l(e)||u()}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function v(e){return v="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},v(e)}function b(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}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(e){return!1}}var k,C,S,x=function(e){h(u,e);var t,o,i,c,s,l=(t=u,o=w(),function(){var e,n=g(t);if(o){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return b(this,e)});function u(e){var t;return f(this,u),(t=l.call(this,e)).state={commandText:"",commands:[],index:0},t.onClick=t.onClick.bind(d(t)),t.onInputChange=t.onInputChange.bind(d(t)),t.onInputKeyDown=t.onInputKeyDown.bind(d(t)),t.response=t.response.bind(d(t)),t.clear=t.clear.bind(d(t)),t}return i=u,(c=[{key:"onClick",value:function(){this.input.focus()}},{key:"onInputChange",value:function(e){this.setState({commandText:e.target.value})}},{key:"onInputKeyDown",value:function(e){var t=this.state.commands;switch(e.which||e.keyCode){case 38:if(t&&t.length){var r=this.state.index-1<0?t.length-1:this.state.index-1;this.setState({index:r,commandText:t[r].text})}break;case 13:if(this.state.commandText){var o=p(t),a=this.state.commandText;o.push({text:a}),this.setState((function(e){return{index:e.index+1,commandText:"",commands:o}}),(function(){n.TerminalService.emit("command",a)}))}}}},{key:"response",value:function(e){var t=this.state.commands;if(t&&t.length>0){var n=p(t);n[n.length-1].response=e,this.setState({commands:n})}}},{key:"clear",value:function(){this.setState({commands:[],index:0})}},{key:"componentDidMount",value:function(){n.TerminalService.on("response",this.response),n.TerminalService.on("clear",this.clear)}},{key:"componentDidUpdate",value:function(){this.container.scrollTop=this.container.scrollHeight}},{key:"componentWillUnmount",value:function(){n.TerminalService.off("response",this.response),n.TerminalService.off("clear",this.clear)}},{key:"renderWelcomeMessage",value:function(){return this.props.welcomeMessage?a.default.createElement("div",null,this.props.welcomeMessage):null}},{key:"renderCommand",value:function(e,t){var n=e.text,r=e.response;return a.default.createElement("div",{key:"".concat(n).concat(t)},a.default.createElement("span",{className:"p-terminal-prompt"},this.props.prompt," "),a.default.createElement("span",{className:"p-terminal-command"},n),a.default.createElement("div",{className:"p-terminal-response"},r))}},{key:"renderContent",value:function(){var e=this,t=this.state.commands.map((function(t,n){return e.renderCommand(t,n)}));return a.default.createElement("div",{className:"p-terminal-content"},t)}},{key:"renderPromptContainer",value:function(){var e=this;return a.default.createElement("div",{className:"p-terminal-prompt-container"},a.default.createElement("span",{className:"p-terminal-prompt"},this.props.prompt," "),a.default.createElement("input",{ref:function(t){return e.input=t},type:"text",value:this.state.commandText,className:"p-terminal-input",autoComplete:"off",onChange:this.onInputChange,onKeyDown:this.onInputKeyDown}))}},{key:"render",value:function(){var e=this,t=r.classNames("p-terminal p-component",this.props.className),n=this.renderWelcomeMessage(),o=this.renderContent(),i=this.renderPromptContainer();return a.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,className:t,style:this.props.style,onClick:this.onClick},n,o,i)}}])&&m(i.prototype,c),s&&m(i,s),Object.defineProperty(i,"prototype",{writable:!1}),u}(t.Component);return S={id:null,style:null,className:null,welcomeMessage:null,prompt:null},(C="defaultProps")in(k=x)?Object.defineProperty(k,C,{value:S,enumerable:!0,configurable:!0,writable:!0}):k[C]=S,e.Terminal=x,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.terminalservice,primereact.utils);
@@ -34,6 +34,9 @@ function _defineProperties(target, props) {
34
34
  function _createClass(Constructor, protoProps, staticProps) {
35
35
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
36
36
  if (staticProps) _defineProperties(Constructor, staticProps);
37
+ Object.defineProperty(Constructor, "prototype", {
38
+ writable: false
39
+ });
37
40
  return Constructor;
38
41
  }
39
42
 
@@ -66,23 +69,20 @@ function _inherits(subClass, superClass) {
66
69
  configurable: true
67
70
  }
68
71
  });
72
+ Object.defineProperty(subClass, "prototype", {
73
+ writable: false
74
+ });
69
75
  if (superClass) _setPrototypeOf(subClass, superClass);
70
76
  }
71
77
 
72
78
  function _typeof(obj) {
73
79
  "@babel/helpers - typeof";
74
80
 
75
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
76
- _typeof = function _typeof(obj) {
77
- return typeof obj;
78
- };
79
- } else {
80
- _typeof = function _typeof(obj) {
81
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
82
- };
83
- }
84
-
85
- return _typeof(obj);
81
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
82
+ return typeof obj;
83
+ } : function (obj) {
84
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
85
+ }, _typeof(obj);
86
86
  }
87
87
 
88
88
  function _possibleConstructorReturn(self, call) {
@@ -614,7 +614,7 @@ var TieredMenu = /*#__PURE__*/function (_Component) {
614
614
 
615
615
  if (!this.documentResizeListener) {
616
616
  this.documentResizeListener = function (event) {
617
- if (_this5.state.visible && !utils.DomHandler.isAndroid()) {
617
+ if (_this5.state.visible && !utils.DomHandler.isTouchDevice()) {
618
618
  _this5.hide(event);
619
619
  }
620
620
  };
@@ -673,7 +673,7 @@ var TieredMenu = /*#__PURE__*/function (_Component) {
673
673
  return /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
674
674
  nodeRef: this.menuRef,
675
675
  classNames: "p-connected-overlay",
676
- in: this.state.visible,
676
+ "in": this.state.visible,
677
677
  timeout: {
678
678
  enter: 120,
679
679
  exit: 100
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/ripple"),i=require("primereact/csstransition"),r=require("primereact/overlayservice"),o=require("primereact/portal"),s=require("primereact/api");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(e),a=l(s);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(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&&f(e,t)}function v(e){return v="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},v(e)}function y(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(){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 C=function(i){h(l,e.Component);var r,o,s=(r=l,o=E(),function(){var e,t=b(r);if(o){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function l(e){var t;return c(this,l),(t=s.call(this,e)).state={activeItem:null},t.onLeafClick=t.onLeafClick.bind(d(t)),t.onChildItemKeyDown=t.onChildItemKeyDown.bind(d(t)),t}return m(l,[{key:"componentDidUpdate",value:function(e){e.parentActive&&!this.props.parentActive&&this.setState({activeItem:null}),this.props.parentActive&&!this.props.root&&this.position()}},{key:"componentDidMount",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.element&&!e.element.contains(t.target)&&e.setState({activeItem:null})},document.addEventListener("click",this.documentClickListener))}},{key:"componentWillUnmount",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"position",value:function(){if(this.element){var e=this.element.parentElement,n=t.DomHandler.getOffset(e),i=t.DomHandler.getViewport(),r=this.element.offsetParent?this.element.offsetWidth:t.DomHandler.getHiddenElementOuterWidth(this.element),o=t.DomHandler.getOuterWidth(e.children[0]);parseInt(n.left,10)+o+r>i.width-t.DomHandler.calculateScrollbarWidth()&&t.DomHandler.addClass(this.element,"p-submenu-list-flipped")}}},{key:"onItemMouseEnter",value:function(e,t){t.disabled?e.preventDefault():this.props.root?(this.state.activeItem||this.props.popup)&&this.setState({activeItem:t}):this.setState({activeItem:t})}},{key:"onItemClick",value:function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.props.root&&t.items&&this.setState(this.state.activeItem&&t===this.state.activeItem?{activeItem:null}:{activeItem:t}),t.items||this.onLeafClick())}},{key:"onItemKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.which){case 40:var i=this.findNextItem(n);i&&i.children[0].focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.setState({activeItem:t}),setTimeout((function(){n.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.props.onKeyDown&&this.props.onKeyDown(e,n)}},{key:"onChildItemKeyDown",value:function(e,t){37===e.which&&(this.setState({activeItem:null}),t.parentElement.previousElementSibling.focus())}},{key:"findNextItem",value:function(e){var n=e.nextElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null}},{key:"findPrevItem",value:function(e){var n=e.previousElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null}},{key:"onLeafClick",value:function(){this.setState({activeItem:null}),this.props.onLeafClick&&this.props.onLeafClick()}},{key:"renderSeparator",value:function(e){return u.default.createElement("li",{key:"separator_"+e,className:"p-menu-separator",role:"separator"})}},{key:"renderSubmenu",value:function(e){return e.items?u.default.createElement(l,{model:e.items,onLeafClick:this.onLeafClick,popup:this.props.popup,onKeyDown:this.onChildItemKeyDown,parentActive:e===this.state.activeItem}):null}},{key:"renderMenuitem",value:function(e,i){var r=this,o=this.state.activeItem===e,s=t.classNames("p-menuitem",{"p-menuitem-active":o},e.className),l=t.classNames("p-menuitem-link",{"p-disabled":e.disabled}),a=t.classNames("p-menuitem-icon",e.icon),c="p-submenu-icon pi pi-angle-right",p=e.icon&&u.default.createElement("span",{className:a}),m=e.label&&u.default.createElement("span",{className:"p-menuitem-text"},e.label),d=e.items&&u.default.createElement("span",{className:c}),f=this.renderSubmenu(e),h=u.default.createElement("a",{href:e.url||"#",className:l,target:e.target,role:"menuitem","aria-haspopup":null!=e.items,onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},"aria-disabled":e.disabled},p,m,d,u.default.createElement(n.Ripple,null));e.template&&(h=t.ObjectUtils.getJSXElement(e.template,e,{onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},className:l,labelClassName:"p-menuitem-text",iconClassName:a,submenuIconClassName:c,element:h,props:this.props,active:o}));return u.default.createElement("li",{key:e.label+"_"+i,className:s,style:e.style,onMouseEnter:function(t){return r.onItemMouseEnter(t,e)},role:"none"},h,f)}},{key:"renderItem",value:function(e,t){return e.separator?this.renderSeparator(t):this.renderMenuitem(e,t)}},{key:"renderMenu",value:function(){var e=this;return this.props.model?this.props.model.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"render",value:function(){var e=this,n=t.classNames({"p-submenu-list":!this.props.root}),i=this.renderMenu();return u.default.createElement("ul",{ref:function(t){return e.element=t},className:n,role:this.props.root?"menubar":"menu","aria-orientation":"horizontal"},i)}}]),l}();function L(){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}}k(C,"defaultProps",{model:null,root:!1,className:null,popup:!1,onLeafClick:null,onKeyDown:null,parentActive:!1});var D=function(n){h(f,e.Component);var s,l,p=(s=f,l=L(),function(){var e,t=b(s);if(l){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function f(e){var t;return c(this,f),(t=p.call(this,e)).state={visible:!e.popup},t.onEnter=t.onEnter.bind(d(t)),t.onEntered=t.onEntered.bind(d(t)),t.onExit=t.onExit.bind(d(t)),t.onExited=t.onExited.bind(d(t)),t.onPanelClick=t.onPanelClick.bind(d(t)),t.menuRef=u.default.createRef(),t}return m(f,[{key:"onPanelClick",value:function(e){this.props.popup&&r.OverlayService.emit("overlay-click",{originalEvent:e,target:this.target})}},{key:"toggle",value:function(e){this.props.popup&&(this.state.visible?this.hide(e):this.show(e))}},{key:"show",value:function(e){var t=this;this.target=e.currentTarget;var n=e;this.setState({visible:!0},(function(){t.props.onShow&&t.props.onShow(n)}))}},{key:"hide",value:function(e){var t=this,n=e;this.setState({visible:!1},(function(){t.props.onHide&&t.props.onHide(n)}))}},{key:"onEnter",value:function(){this.props.autoZIndex&&t.ZIndexUtils.set("menu",this.menuRef.current,a.default.autoZIndex,this.props.baseZIndex||a.default.zIndex.menu),t.DomHandler.absolutePosition(this.menuRef.current,this.target)}},{key:"onEntered",value:function(){this.bindDocumentListeners(),this.bindScrollListener()}},{key:"onExit",value:function(){this.target=null,this.unbindDocumentListeners(),this.unbindScrollListener()}},{key:"onExited",value:function(){t.ZIndexUtils.clear(this.menuRef.current)}},{key:"bindDocumentListeners",value:function(){this.bindDocumentClickListener(),this.bindDocumentResizeListener()}},{key:"unbindDocumentListeners",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener()}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.props.popup&&e.state.visible&&e.menuRef.current&&!e.menuRef.current.contains(t.target)&&e.hide(t)},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(n){e.state.visible&&!t.DomHandler.isAndroid()&&e.hide(n)},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"componentWillUnmount",value:function(){this.unbindDocumentListeners(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),t.ZIndexUtils.clear(this.menuRef.current)}},{key:"renderElement",value:function(){var e=t.classNames("p-tieredmenu p-component",{"p-tieredmenu-overlay":this.props.popup},this.props.className);return u.default.createElement(i.CSSTransition,{nodeRef:this.menuRef,classNames:"p-connected-overlay",in:this.state.visible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited},u.default.createElement("div",{ref:this.menuRef,id:this.props.id,className:e,style:this.props.style,onClick:this.onPanelClick},u.default.createElement(C,{model:this.props.model,root:!0,popup:this.props.popup})))}},{key:"render",value:function(){var e=this.renderElement();return this.props.popup?u.default.createElement(o.Portal,{element:e,appendTo:this.props.appendTo}):e}}]),f}();k(D,"defaultProps",{id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,transitionOptions:null,onShow:null,onHide:null}),exports.TieredMenu=D;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/ripple"),i=require("primereact/csstransition"),r=require("primereact/overlayservice"),o=require("primereact/portal"),s=require("primereact/api");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(e),a=l(s);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function v(e){return v="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},v(e)}function y(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(){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 C=function(i){h(l,e.Component);var r,o,s=(r=l,o=E(),function(){var e,t=b(r);if(o){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function l(e){var t;return c(this,l),(t=s.call(this,e)).state={activeItem:null},t.onLeafClick=t.onLeafClick.bind(d(t)),t.onChildItemKeyDown=t.onChildItemKeyDown.bind(d(t)),t}return m(l,[{key:"componentDidUpdate",value:function(e){e.parentActive&&!this.props.parentActive&&this.setState({activeItem:null}),this.props.parentActive&&!this.props.root&&this.position()}},{key:"componentDidMount",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.element&&!e.element.contains(t.target)&&e.setState({activeItem:null})},document.addEventListener("click",this.documentClickListener))}},{key:"componentWillUnmount",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"position",value:function(){if(this.element){var e=this.element.parentElement,n=t.DomHandler.getOffset(e),i=t.DomHandler.getViewport(),r=this.element.offsetParent?this.element.offsetWidth:t.DomHandler.getHiddenElementOuterWidth(this.element),o=t.DomHandler.getOuterWidth(e.children[0]);parseInt(n.left,10)+o+r>i.width-t.DomHandler.calculateScrollbarWidth()&&t.DomHandler.addClass(this.element,"p-submenu-list-flipped")}}},{key:"onItemMouseEnter",value:function(e,t){t.disabled?e.preventDefault():this.props.root?(this.state.activeItem||this.props.popup)&&this.setState({activeItem:t}):this.setState({activeItem:t})}},{key:"onItemClick",value:function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.props.root&&t.items&&this.setState(this.state.activeItem&&t===this.state.activeItem?{activeItem:null}:{activeItem:t}),t.items||this.onLeafClick())}},{key:"onItemKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.which){case 40:var i=this.findNextItem(n);i&&i.children[0].focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.setState({activeItem:t}),setTimeout((function(){n.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.props.onKeyDown&&this.props.onKeyDown(e,n)}},{key:"onChildItemKeyDown",value:function(e,t){37===e.which&&(this.setState({activeItem:null}),t.parentElement.previousElementSibling.focus())}},{key:"findNextItem",value:function(e){var n=e.nextElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null}},{key:"findPrevItem",value:function(e){var n=e.previousElementSibling;return n?t.DomHandler.hasClass(n,"p-disabled")||!t.DomHandler.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null}},{key:"onLeafClick",value:function(){this.setState({activeItem:null}),this.props.onLeafClick&&this.props.onLeafClick()}},{key:"renderSeparator",value:function(e){return u.default.createElement("li",{key:"separator_"+e,className:"p-menu-separator",role:"separator"})}},{key:"renderSubmenu",value:function(e){return e.items?u.default.createElement(l,{model:e.items,onLeafClick:this.onLeafClick,popup:this.props.popup,onKeyDown:this.onChildItemKeyDown,parentActive:e===this.state.activeItem}):null}},{key:"renderMenuitem",value:function(e,i){var r=this,o=this.state.activeItem===e,s=t.classNames("p-menuitem",{"p-menuitem-active":o},e.className),l=t.classNames("p-menuitem-link",{"p-disabled":e.disabled}),a=t.classNames("p-menuitem-icon",e.icon),c="p-submenu-icon pi pi-angle-right",p=e.icon&&u.default.createElement("span",{className:a}),m=e.label&&u.default.createElement("span",{className:"p-menuitem-text"},e.label),d=e.items&&u.default.createElement("span",{className:c}),f=this.renderSubmenu(e),h=u.default.createElement("a",{href:e.url||"#",className:l,target:e.target,role:"menuitem","aria-haspopup":null!=e.items,onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},"aria-disabled":e.disabled},p,m,d,u.default.createElement(n.Ripple,null));e.template&&(h=t.ObjectUtils.getJSXElement(e.template,e,{onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},className:l,labelClassName:"p-menuitem-text",iconClassName:a,submenuIconClassName:c,element:h,props:this.props,active:o}));return u.default.createElement("li",{key:e.label+"_"+i,className:s,style:e.style,onMouseEnter:function(t){return r.onItemMouseEnter(t,e)},role:"none"},h,f)}},{key:"renderItem",value:function(e,t){return e.separator?this.renderSeparator(t):this.renderMenuitem(e,t)}},{key:"renderMenu",value:function(){var e=this;return this.props.model?this.props.model.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"render",value:function(){var e=this,n=t.classNames({"p-submenu-list":!this.props.root}),i=this.renderMenu();return u.default.createElement("ul",{ref:function(t){return e.element=t},className:n,role:this.props.root?"menubar":"menu","aria-orientation":"horizontal"},i)}}]),l}();function L(){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}}k(C,"defaultProps",{model:null,root:!1,className:null,popup:!1,onLeafClick:null,onKeyDown:null,parentActive:!1});var D=function(n){h(f,e.Component);var s,l,p=(s=f,l=L(),function(){var e,t=b(s);if(l){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function f(e){var t;return c(this,f),(t=p.call(this,e)).state={visible:!e.popup},t.onEnter=t.onEnter.bind(d(t)),t.onEntered=t.onEntered.bind(d(t)),t.onExit=t.onExit.bind(d(t)),t.onExited=t.onExited.bind(d(t)),t.onPanelClick=t.onPanelClick.bind(d(t)),t.menuRef=u.default.createRef(),t}return m(f,[{key:"onPanelClick",value:function(e){this.props.popup&&r.OverlayService.emit("overlay-click",{originalEvent:e,target:this.target})}},{key:"toggle",value:function(e){this.props.popup&&(this.state.visible?this.hide(e):this.show(e))}},{key:"show",value:function(e){var t=this;this.target=e.currentTarget;var n=e;this.setState({visible:!0},(function(){t.props.onShow&&t.props.onShow(n)}))}},{key:"hide",value:function(e){var t=this,n=e;this.setState({visible:!1},(function(){t.props.onHide&&t.props.onHide(n)}))}},{key:"onEnter",value:function(){this.props.autoZIndex&&t.ZIndexUtils.set("menu",this.menuRef.current,a.default.autoZIndex,this.props.baseZIndex||a.default.zIndex.menu),t.DomHandler.absolutePosition(this.menuRef.current,this.target)}},{key:"onEntered",value:function(){this.bindDocumentListeners(),this.bindScrollListener()}},{key:"onExit",value:function(){this.target=null,this.unbindDocumentListeners(),this.unbindScrollListener()}},{key:"onExited",value:function(){t.ZIndexUtils.clear(this.menuRef.current)}},{key:"bindDocumentListeners",value:function(){this.bindDocumentClickListener(),this.bindDocumentResizeListener()}},{key:"unbindDocumentListeners",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener()}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.props.popup&&e.state.visible&&e.menuRef.current&&!e.menuRef.current.contains(t.target)&&e.hide(t)},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(n){e.state.visible&&!t.DomHandler.isTouchDevice()&&e.hide(n)},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"componentWillUnmount",value:function(){this.unbindDocumentListeners(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),t.ZIndexUtils.clear(this.menuRef.current)}},{key:"renderElement",value:function(){var e=t.classNames("p-tieredmenu p-component",{"p-tieredmenu-overlay":this.props.popup},this.props.className);return u.default.createElement(i.CSSTransition,{nodeRef:this.menuRef,classNames:"p-connected-overlay",in:this.state.visible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited},u.default.createElement("div",{ref:this.menuRef,id:this.props.id,className:e,style:this.props.style,onClick:this.onPanelClick},u.default.createElement(C,{model:this.props.model,root:!0,popup:this.props.popup})))}},{key:"render",value:function(){var e=this.renderElement();return this.props.popup?u.default.createElement(o.Portal,{element:e,appendTo:this.props.appendTo}):e}}]),f}();k(D,"defaultProps",{id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,transitionOptions:null,onShow:null,onHide:null}),exports.TieredMenu=D;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MenuItem } from '../menuitem';
3
+ import { CSSTransitionProps } from '../csstransition';
3
4
 
4
5
  type TieredMenuAppendToType = 'self' | HTMLElement | undefined | null;
5
6
 
@@ -12,7 +13,7 @@ export interface TieredMenuProps {
12
13
  autoZIndex?: boolean;
13
14
  baseZIndex?: number;
14
15
  appendTo?: TieredMenuAppendToType;
15
- transitionOptions?: object;
16
+ transitionOptions?: CSSTransitionProps;
16
17
  onShow?(e: React.SyntheticEvent): void;
17
18
  onHide?(e: React.SyntheticEvent): void;
18
19
  }
@@ -25,6 +25,9 @@ function _defineProperties(target, props) {
25
25
  function _createClass(Constructor, protoProps, staticProps) {
26
26
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
27
  if (staticProps) _defineProperties(Constructor, staticProps);
28
+ Object.defineProperty(Constructor, "prototype", {
29
+ writable: false
30
+ });
28
31
  return Constructor;
29
32
  }
30
33
 
@@ -57,23 +60,20 @@ function _inherits(subClass, superClass) {
57
60
  configurable: true
58
61
  }
59
62
  });
63
+ Object.defineProperty(subClass, "prototype", {
64
+ writable: false
65
+ });
60
66
  if (superClass) _setPrototypeOf(subClass, superClass);
61
67
  }
62
68
 
63
69
  function _typeof(obj) {
64
70
  "@babel/helpers - typeof";
65
71
 
66
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
67
- _typeof = function _typeof(obj) {
68
- return typeof obj;
69
- };
70
- } else {
71
- _typeof = function _typeof(obj) {
72
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
73
- };
74
- }
75
-
76
- return _typeof(obj);
72
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
73
+ return typeof obj;
74
+ } : function (obj) {
75
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
76
+ }, _typeof(obj);
77
77
  }
78
78
 
79
79
  function _possibleConstructorReturn(self, call) {
@@ -605,7 +605,7 @@ var TieredMenu = /*#__PURE__*/function (_Component) {
605
605
 
606
606
  if (!this.documentResizeListener) {
607
607
  this.documentResizeListener = function (event) {
608
- if (_this5.state.visible && !DomHandler.isAndroid()) {
608
+ if (_this5.state.visible && !DomHandler.isTouchDevice()) {
609
609
  _this5.hide(event);
610
610
  }
611
611
  };
@@ -664,7 +664,7 @@ var TieredMenu = /*#__PURE__*/function (_Component) {
664
664
  return /*#__PURE__*/React.createElement(CSSTransition, {
665
665
  nodeRef: this.menuRef,
666
666
  classNames: "p-connected-overlay",
667
- in: this.state.visible,
667
+ "in": this.state.visible,
668
668
  timeout: {
669
669
  enter: 120,
670
670
  exit: 100
@@ -1 +1 @@
1
- import e,{Component as t}from"react";import{DomHandler as n,classNames as i,ObjectUtils as r,ZIndexUtils as o,ConnectedOverlayScrollHandler as s}from"primereact/utils";import{Ripple as l}from"primereact/ripple";import{CSSTransition as u}from"primereact/csstransition";import{OverlayService as a}from"primereact/overlayservice";import{Portal as c}from"primereact/portal";import p from"primereact/api";function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function y(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&&v(e,t)}function b(e){return b="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},b(e)}function k(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){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 I=function(o){y(c,t);var s,u,a=(s=c,u=C(),function(){var e,t=E(s);if(u){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function c(e){var t;return m(this,c),(t=a.call(this,e)).state={activeItem:null},t.onLeafClick=t.onLeafClick.bind(d(t)),t.onChildItemKeyDown=t.onChildItemKeyDown.bind(d(t)),t}return h(c,[{key:"componentDidUpdate",value:function(e){e.parentActive&&!this.props.parentActive&&this.setState({activeItem:null}),this.props.parentActive&&!this.props.root&&this.position()}},{key:"componentDidMount",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.element&&!e.element.contains(t.target)&&e.setState({activeItem:null})},document.addEventListener("click",this.documentClickListener))}},{key:"componentWillUnmount",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"position",value:function(){if(this.element){var e=this.element.parentElement,t=n.getOffset(e),i=n.getViewport(),r=this.element.offsetParent?this.element.offsetWidth:n.getHiddenElementOuterWidth(this.element),o=n.getOuterWidth(e.children[0]);parseInt(t.left,10)+o+r>i.width-n.calculateScrollbarWidth()&&n.addClass(this.element,"p-submenu-list-flipped")}}},{key:"onItemMouseEnter",value:function(e,t){t.disabled?e.preventDefault():this.props.root?(this.state.activeItem||this.props.popup)&&this.setState({activeItem:t}):this.setState({activeItem:t})}},{key:"onItemClick",value:function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.props.root&&t.items&&this.setState(this.state.activeItem&&t===this.state.activeItem?{activeItem:null}:{activeItem:t}),t.items||this.onLeafClick())}},{key:"onItemKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.which){case 40:var i=this.findNextItem(n);i&&i.children[0].focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.setState({activeItem:t}),setTimeout((function(){n.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.props.onKeyDown&&this.props.onKeyDown(e,n)}},{key:"onChildItemKeyDown",value:function(e,t){37===e.which&&(this.setState({activeItem:null}),t.parentElement.previousElementSibling.focus())}},{key:"findNextItem",value:function(e){var t=e.nextElementSibling;return t?n.hasClass(t,"p-disabled")||!n.hasClass(t,"p-menuitem")?this.findNextItem(t):t:null}},{key:"findPrevItem",value:function(e){var t=e.previousElementSibling;return t?n.hasClass(t,"p-disabled")||!n.hasClass(t,"p-menuitem")?this.findPrevItem(t):t:null}},{key:"onLeafClick",value:function(){this.setState({activeItem:null}),this.props.onLeafClick&&this.props.onLeafClick()}},{key:"renderSeparator",value:function(t){return e.createElement("li",{key:"separator_"+t,className:"p-menu-separator",role:"separator"})}},{key:"renderSubmenu",value:function(t){return t.items?e.createElement(c,{model:t.items,onLeafClick:this.onLeafClick,popup:this.props.popup,onKeyDown:this.onChildItemKeyDown,parentActive:t===this.state.activeItem}):null}},{key:"renderMenuitem",value:function(t,n){var o=this,s=this.state.activeItem===t,u=i("p-menuitem",{"p-menuitem-active":s},t.className),a=i("p-menuitem-link",{"p-disabled":t.disabled}),c=i("p-menuitem-icon",t.icon),p="p-submenu-icon pi pi-angle-right",m=t.icon&&e.createElement("span",{className:c}),f=t.label&&e.createElement("span",{className:"p-menuitem-text"},t.label),h=t.items&&e.createElement("span",{className:p}),d=this.renderSubmenu(t),v=e.createElement("a",{href:t.url||"#",className:a,target:t.target,role:"menuitem","aria-haspopup":null!=t.items,onClick:function(e){return o.onItemClick(e,t)},onKeyDown:function(e){return o.onItemKeyDown(e,t)},"aria-disabled":t.disabled},m,f,h,e.createElement(l,null));t.template&&(v=r.getJSXElement(t.template,t,{onClick:function(e){return o.onItemClick(e,t)},onKeyDown:function(e){return o.onItemKeyDown(e,t)},className:a,labelClassName:"p-menuitem-text",iconClassName:c,submenuIconClassName:p,element:v,props:this.props,active:s}));return e.createElement("li",{key:t.label+"_"+n,className:u,style:t.style,onMouseEnter:function(e){return o.onItemMouseEnter(e,t)},role:"none"},v,d)}},{key:"renderItem",value:function(e,t){return e.separator?this.renderSeparator(t):this.renderMenuitem(e,t)}},{key:"renderMenu",value:function(){var e=this;return this.props.model?this.props.model.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"render",value:function(){var t=this,n=i({"p-submenu-list":!this.props.root}),r=this.renderMenu();return e.createElement("ul",{ref:function(e){return t.element=e},className:n,role:this.props.root?"menubar":"menu","aria-orientation":"horizontal"},r)}}]),c}();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(e){return!1}}L(I,"defaultProps",{model:null,root:!1,className:null,popup:!1,onLeafClick:null,onKeyDown:null,parentActive:!1});var D=function(r){y(b,t);var l,f,v=(l=b,f=w(),function(){var e,t=E(l);if(f){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function b(t){var n;return m(this,b),(n=v.call(this,t)).state={visible:!t.popup},n.onEnter=n.onEnter.bind(d(n)),n.onEntered=n.onEntered.bind(d(n)),n.onExit=n.onExit.bind(d(n)),n.onExited=n.onExited.bind(d(n)),n.onPanelClick=n.onPanelClick.bind(d(n)),n.menuRef=e.createRef(),n}return h(b,[{key:"onPanelClick",value:function(e){this.props.popup&&a.emit("overlay-click",{originalEvent:e,target:this.target})}},{key:"toggle",value:function(e){this.props.popup&&(this.state.visible?this.hide(e):this.show(e))}},{key:"show",value:function(e){var t=this;this.target=e.currentTarget;var n=e;this.setState({visible:!0},(function(){t.props.onShow&&t.props.onShow(n)}))}},{key:"hide",value:function(e){var t=this,n=e;this.setState({visible:!1},(function(){t.props.onHide&&t.props.onHide(n)}))}},{key:"onEnter",value:function(){this.props.autoZIndex&&o.set("menu",this.menuRef.current,p.autoZIndex,this.props.baseZIndex||p.zIndex.menu),n.absolutePosition(this.menuRef.current,this.target)}},{key:"onEntered",value:function(){this.bindDocumentListeners(),this.bindScrollListener()}},{key:"onExit",value:function(){this.target=null,this.unbindDocumentListeners(),this.unbindScrollListener()}},{key:"onExited",value:function(){o.clear(this.menuRef.current)}},{key:"bindDocumentListeners",value:function(){this.bindDocumentClickListener(),this.bindDocumentResizeListener()}},{key:"unbindDocumentListeners",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener()}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.props.popup&&e.state.visible&&e.menuRef.current&&!e.menuRef.current.contains(t.target)&&e.hide(t)},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(t){e.state.visible&&!n.isAndroid()&&e.hide(t)},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s(this.target,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"componentWillUnmount",value:function(){this.unbindDocumentListeners(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),o.clear(this.menuRef.current)}},{key:"renderElement",value:function(){var t=i("p-tieredmenu p-component",{"p-tieredmenu-overlay":this.props.popup},this.props.className);return e.createElement(u,{nodeRef:this.menuRef,classNames:"p-connected-overlay",in:this.state.visible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited},e.createElement("div",{ref:this.menuRef,id:this.props.id,className:t,style:this.props.style,onClick:this.onPanelClick},e.createElement(I,{model:this.props.model,root:!0,popup:this.props.popup})))}},{key:"render",value:function(){var t=this.renderElement();return this.props.popup?e.createElement(c,{element:t,appendTo:this.props.appendTo}):t}}]),b}();L(D,"defaultProps",{id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,transitionOptions:null,onShow:null,onHide:null});export{D as TieredMenu};
1
+ import e,{Component as t}from"react";import{DomHandler as n,classNames as i,ObjectUtils as r,ZIndexUtils as o,ConnectedOverlayScrollHandler as s}from"primereact/utils";import{Ripple as l}from"primereact/ripple";import{CSSTransition as u}from"primereact/csstransition";import{OverlayService as c}from"primereact/overlayservice";import{Portal as a}from"primereact/portal";import p from"primereact/api";function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function b(e){return b="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},b(e)}function k(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){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 I=function(o){y(a,t);var s,u,c=(s=a,u=C(),function(){var e,t=E(s);if(u){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function a(e){var t;return m(this,a),(t=c.call(this,e)).state={activeItem:null},t.onLeafClick=t.onLeafClick.bind(d(t)),t.onChildItemKeyDown=t.onChildItemKeyDown.bind(d(t)),t}return h(a,[{key:"componentDidUpdate",value:function(e){e.parentActive&&!this.props.parentActive&&this.setState({activeItem:null}),this.props.parentActive&&!this.props.root&&this.position()}},{key:"componentDidMount",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.element&&!e.element.contains(t.target)&&e.setState({activeItem:null})},document.addEventListener("click",this.documentClickListener))}},{key:"componentWillUnmount",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"position",value:function(){if(this.element){var e=this.element.parentElement,t=n.getOffset(e),i=n.getViewport(),r=this.element.offsetParent?this.element.offsetWidth:n.getHiddenElementOuterWidth(this.element),o=n.getOuterWidth(e.children[0]);parseInt(t.left,10)+o+r>i.width-n.calculateScrollbarWidth()&&n.addClass(this.element,"p-submenu-list-flipped")}}},{key:"onItemMouseEnter",value:function(e,t){t.disabled?e.preventDefault():this.props.root?(this.state.activeItem||this.props.popup)&&this.setState({activeItem:t}):this.setState({activeItem:t})}},{key:"onItemClick",value:function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.props.root&&t.items&&this.setState(this.state.activeItem&&t===this.state.activeItem?{activeItem:null}:{activeItem:t}),t.items||this.onLeafClick())}},{key:"onItemKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.which){case 40:var i=this.findNextItem(n);i&&i.children[0].focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.setState({activeItem:t}),setTimeout((function(){n.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.props.onKeyDown&&this.props.onKeyDown(e,n)}},{key:"onChildItemKeyDown",value:function(e,t){37===e.which&&(this.setState({activeItem:null}),t.parentElement.previousElementSibling.focus())}},{key:"findNextItem",value:function(e){var t=e.nextElementSibling;return t?n.hasClass(t,"p-disabled")||!n.hasClass(t,"p-menuitem")?this.findNextItem(t):t:null}},{key:"findPrevItem",value:function(e){var t=e.previousElementSibling;return t?n.hasClass(t,"p-disabled")||!n.hasClass(t,"p-menuitem")?this.findPrevItem(t):t:null}},{key:"onLeafClick",value:function(){this.setState({activeItem:null}),this.props.onLeafClick&&this.props.onLeafClick()}},{key:"renderSeparator",value:function(t){return e.createElement("li",{key:"separator_"+t,className:"p-menu-separator",role:"separator"})}},{key:"renderSubmenu",value:function(t){return t.items?e.createElement(a,{model:t.items,onLeafClick:this.onLeafClick,popup:this.props.popup,onKeyDown:this.onChildItemKeyDown,parentActive:t===this.state.activeItem}):null}},{key:"renderMenuitem",value:function(t,n){var o=this,s=this.state.activeItem===t,u=i("p-menuitem",{"p-menuitem-active":s},t.className),c=i("p-menuitem-link",{"p-disabled":t.disabled}),a=i("p-menuitem-icon",t.icon),p="p-submenu-icon pi pi-angle-right",m=t.icon&&e.createElement("span",{className:a}),f=t.label&&e.createElement("span",{className:"p-menuitem-text"},t.label),h=t.items&&e.createElement("span",{className:p}),d=this.renderSubmenu(t),v=e.createElement("a",{href:t.url||"#",className:c,target:t.target,role:"menuitem","aria-haspopup":null!=t.items,onClick:function(e){return o.onItemClick(e,t)},onKeyDown:function(e){return o.onItemKeyDown(e,t)},"aria-disabled":t.disabled},m,f,h,e.createElement(l,null));t.template&&(v=r.getJSXElement(t.template,t,{onClick:function(e){return o.onItemClick(e,t)},onKeyDown:function(e){return o.onItemKeyDown(e,t)},className:c,labelClassName:"p-menuitem-text",iconClassName:a,submenuIconClassName:p,element:v,props:this.props,active:s}));return e.createElement("li",{key:t.label+"_"+n,className:u,style:t.style,onMouseEnter:function(e){return o.onItemMouseEnter(e,t)},role:"none"},v,d)}},{key:"renderItem",value:function(e,t){return e.separator?this.renderSeparator(t):this.renderMenuitem(e,t)}},{key:"renderMenu",value:function(){var e=this;return this.props.model?this.props.model.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"render",value:function(){var t=this,n=i({"p-submenu-list":!this.props.root}),r=this.renderMenu();return e.createElement("ul",{ref:function(e){return t.element=e},className:n,role:this.props.root?"menubar":"menu","aria-orientation":"horizontal"},r)}}]),a}();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(e){return!1}}L(I,"defaultProps",{model:null,root:!1,className:null,popup:!1,onLeafClick:null,onKeyDown:null,parentActive:!1});var D=function(r){y(b,t);var l,f,v=(l=b,f=w(),function(){var e,t=E(l);if(f){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function b(t){var n;return m(this,b),(n=v.call(this,t)).state={visible:!t.popup},n.onEnter=n.onEnter.bind(d(n)),n.onEntered=n.onEntered.bind(d(n)),n.onExit=n.onExit.bind(d(n)),n.onExited=n.onExited.bind(d(n)),n.onPanelClick=n.onPanelClick.bind(d(n)),n.menuRef=e.createRef(),n}return h(b,[{key:"onPanelClick",value:function(e){this.props.popup&&c.emit("overlay-click",{originalEvent:e,target:this.target})}},{key:"toggle",value:function(e){this.props.popup&&(this.state.visible?this.hide(e):this.show(e))}},{key:"show",value:function(e){var t=this;this.target=e.currentTarget;var n=e;this.setState({visible:!0},(function(){t.props.onShow&&t.props.onShow(n)}))}},{key:"hide",value:function(e){var t=this,n=e;this.setState({visible:!1},(function(){t.props.onHide&&t.props.onHide(n)}))}},{key:"onEnter",value:function(){this.props.autoZIndex&&o.set("menu",this.menuRef.current,p.autoZIndex,this.props.baseZIndex||p.zIndex.menu),n.absolutePosition(this.menuRef.current,this.target)}},{key:"onEntered",value:function(){this.bindDocumentListeners(),this.bindScrollListener()}},{key:"onExit",value:function(){this.target=null,this.unbindDocumentListeners(),this.unbindScrollListener()}},{key:"onExited",value:function(){o.clear(this.menuRef.current)}},{key:"bindDocumentListeners",value:function(){this.bindDocumentClickListener(),this.bindDocumentResizeListener()}},{key:"unbindDocumentListeners",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener()}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.props.popup&&e.state.visible&&e.menuRef.current&&!e.menuRef.current.contains(t.target)&&e.hide(t)},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(t){e.state.visible&&!n.isTouchDevice()&&e.hide(t)},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s(this.target,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"componentWillUnmount",value:function(){this.unbindDocumentListeners(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),o.clear(this.menuRef.current)}},{key:"renderElement",value:function(){var t=i("p-tieredmenu p-component",{"p-tieredmenu-overlay":this.props.popup},this.props.className);return e.createElement(u,{nodeRef:this.menuRef,classNames:"p-connected-overlay",in:this.state.visible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited},e.createElement("div",{ref:this.menuRef,id:this.props.id,className:t,style:this.props.style,onClick:this.onPanelClick},e.createElement(I,{model:this.props.model,root:!0,popup:this.props.popup})))}},{key:"render",value:function(){var t=this.renderElement();return this.props.popup?e.createElement(a,{element:t,appendTo:this.props.appendTo}):t}}]),b}();L(D,"defaultProps",{id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,transitionOptions:null,onShow:null,onHide:null});export{D as TieredMenu};
@@ -26,6 +26,9 @@ this.primereact.tieredmenu = (function (exports, React, utils, ripple, csstransi
26
26
  function _createClass(Constructor, protoProps, staticProps) {
27
27
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
28
28
  if (staticProps) _defineProperties(Constructor, staticProps);
29
+ Object.defineProperty(Constructor, "prototype", {
30
+ writable: false
31
+ });
29
32
  return Constructor;
30
33
  }
31
34
 
@@ -58,23 +61,20 @@ this.primereact.tieredmenu = (function (exports, React, utils, ripple, csstransi
58
61
  configurable: true
59
62
  }
60
63
  });
64
+ Object.defineProperty(subClass, "prototype", {
65
+ writable: false
66
+ });
61
67
  if (superClass) _setPrototypeOf(subClass, superClass);
62
68
  }
63
69
 
64
70
  function _typeof(obj) {
65
71
  "@babel/helpers - typeof";
66
72
 
67
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
68
- _typeof = function _typeof(obj) {
69
- return typeof obj;
70
- };
71
- } else {
72
- _typeof = function _typeof(obj) {
73
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
74
- };
75
- }
76
-
77
- return _typeof(obj);
73
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
74
+ return typeof obj;
75
+ } : function (obj) {
76
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
77
+ }, _typeof(obj);
78
78
  }
79
79
 
80
80
  function _possibleConstructorReturn(self, call) {
@@ -606,7 +606,7 @@ this.primereact.tieredmenu = (function (exports, React, utils, ripple, csstransi
606
606
 
607
607
  if (!this.documentResizeListener) {
608
608
  this.documentResizeListener = function (event) {
609
- if (_this5.state.visible && !utils.DomHandler.isAndroid()) {
609
+ if (_this5.state.visible && !utils.DomHandler.isTouchDevice()) {
610
610
  _this5.hide(event);
611
611
  }
612
612
  };
@@ -665,7 +665,7 @@ this.primereact.tieredmenu = (function (exports, React, utils, ripple, csstransi
665
665
  return /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
666
666
  nodeRef: this.menuRef,
667
667
  classNames: "p-connected-overlay",
668
- in: this.state.visible,
668
+ "in": this.state.visible,
669
669
  timeout: {
670
670
  enter: 120,
671
671
  exit: 100
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.tieredmenu=function(e,t,n,i,r,o,s,l){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(t),c=u(l);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function d(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function v(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&&h(e,t)}function y(e){return y="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},y(e)}function b(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){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 L=function(e){v(s,e);var t,r,o=(t=s,r=C(),function(){var e,n=k(t);if(r){var i=k(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return b(this,e)});function s(e){var t;return p(this,s),(t=o.call(this,e)).state={activeItem:null},t.onLeafClick=t.onLeafClick.bind(f(t)),t.onChildItemKeyDown=t.onChildItemKeyDown.bind(f(t)),t}return d(s,[{key:"componentDidUpdate",value:function(e){e.parentActive&&!this.props.parentActive&&this.setState({activeItem:null}),this.props.parentActive&&!this.props.root&&this.position()}},{key:"componentDidMount",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.element&&!e.element.contains(t.target)&&e.setState({activeItem:null})},document.addEventListener("click",this.documentClickListener))}},{key:"componentWillUnmount",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"position",value:function(){if(this.element){var e=this.element.parentElement,t=n.DomHandler.getOffset(e),i=n.DomHandler.getViewport(),r=this.element.offsetParent?this.element.offsetWidth:n.DomHandler.getHiddenElementOuterWidth(this.element),o=n.DomHandler.getOuterWidth(e.children[0]);parseInt(t.left,10)+o+r>i.width-n.DomHandler.calculateScrollbarWidth()&&n.DomHandler.addClass(this.element,"p-submenu-list-flipped")}}},{key:"onItemMouseEnter",value:function(e,t){t.disabled?e.preventDefault():this.props.root?(this.state.activeItem||this.props.popup)&&this.setState({activeItem:t}):this.setState({activeItem:t})}},{key:"onItemClick",value:function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.props.root&&t.items&&this.setState(this.state.activeItem&&t===this.state.activeItem?{activeItem:null}:{activeItem:t}),t.items||this.onLeafClick())}},{key:"onItemKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.which){case 40:var i=this.findNextItem(n);i&&i.children[0].focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.setState({activeItem:t}),setTimeout((function(){n.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.props.onKeyDown&&this.props.onKeyDown(e,n)}},{key:"onChildItemKeyDown",value:function(e,t){37===e.which&&(this.setState({activeItem:null}),t.parentElement.previousElementSibling.focus())}},{key:"findNextItem",value:function(e){var t=e.nextElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||!n.DomHandler.hasClass(t,"p-menuitem")?this.findNextItem(t):t:null}},{key:"findPrevItem",value:function(e){var t=e.previousElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||!n.DomHandler.hasClass(t,"p-menuitem")?this.findPrevItem(t):t:null}},{key:"onLeafClick",value:function(){this.setState({activeItem:null}),this.props.onLeafClick&&this.props.onLeafClick()}},{key:"renderSeparator",value:function(e){return a.default.createElement("li",{key:"separator_"+e,className:"p-menu-separator",role:"separator"})}},{key:"renderSubmenu",value:function(e){return e.items?a.default.createElement(s,{model:e.items,onLeafClick:this.onLeafClick,popup:this.props.popup,onKeyDown:this.onChildItemKeyDown,parentActive:e===this.state.activeItem}):null}},{key:"renderMenuitem",value:function(e,t){var r=this,o=this.state.activeItem===e,s=n.classNames("p-menuitem",{"p-menuitem-active":o},e.className),l=n.classNames("p-menuitem-link",{"p-disabled":e.disabled}),u=n.classNames("p-menuitem-icon",e.icon),c="p-submenu-icon pi pi-angle-right",p=e.icon&&a.default.createElement("span",{className:u}),m=e.label&&a.default.createElement("span",{className:"p-menuitem-text"},e.label),d=e.items&&a.default.createElement("span",{className:c}),f=this.renderSubmenu(e),h=a.default.createElement("a",{href:e.url||"#",className:l,target:e.target,role:"menuitem","aria-haspopup":null!=e.items,onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},"aria-disabled":e.disabled},p,m,d,a.default.createElement(i.Ripple,null));e.template&&(h=n.ObjectUtils.getJSXElement(e.template,e,{onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},className:l,labelClassName:"p-menuitem-text",iconClassName:u,submenuIconClassName:c,element:h,props:this.props,active:o}));return a.default.createElement("li",{key:e.label+"_"+t,className:s,style:e.style,onMouseEnter:function(t){return r.onItemMouseEnter(t,e)},role:"none"},h,f)}},{key:"renderItem",value:function(e,t){return e.separator?this.renderSeparator(t):this.renderMenuitem(e,t)}},{key:"renderMenu",value:function(){var e=this;return this.props.model?this.props.model.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"render",value:function(){var e=this,t=n.classNames({"p-submenu-list":!this.props.root}),i=this.renderMenu();return a.default.createElement("ul",{ref:function(t){return e.element=t},className:t,role:this.props.root?"menubar":"menu","aria-orientation":"horizontal"},i)}}]),s}(t.Component);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}}E(L,"defaultProps",{model:null,root:!1,className:null,popup:!1,onLeafClick:null,onKeyDown:null,parentActive:!1});var I=function(e){v(u,e);var t,i,l=(t=u,i=D(),function(){var e,n=k(t);if(i){var r=k(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return b(this,e)});function u(e){var t;return p(this,u),(t=l.call(this,e)).state={visible:!e.popup},t.onEnter=t.onEnter.bind(f(t)),t.onEntered=t.onEntered.bind(f(t)),t.onExit=t.onExit.bind(f(t)),t.onExited=t.onExited.bind(f(t)),t.onPanelClick=t.onPanelClick.bind(f(t)),t.menuRef=a.default.createRef(),t}return d(u,[{key:"onPanelClick",value:function(e){this.props.popup&&o.OverlayService.emit("overlay-click",{originalEvent:e,target:this.target})}},{key:"toggle",value:function(e){this.props.popup&&(this.state.visible?this.hide(e):this.show(e))}},{key:"show",value:function(e){var t=this;this.target=e.currentTarget;var n=e;this.setState({visible:!0},(function(){t.props.onShow&&t.props.onShow(n)}))}},{key:"hide",value:function(e){var t=this,n=e;this.setState({visible:!1},(function(){t.props.onHide&&t.props.onHide(n)}))}},{key:"onEnter",value:function(){this.props.autoZIndex&&n.ZIndexUtils.set("menu",this.menuRef.current,c.default.autoZIndex,this.props.baseZIndex||c.default.zIndex.menu),n.DomHandler.absolutePosition(this.menuRef.current,this.target)}},{key:"onEntered",value:function(){this.bindDocumentListeners(),this.bindScrollListener()}},{key:"onExit",value:function(){this.target=null,this.unbindDocumentListeners(),this.unbindScrollListener()}},{key:"onExited",value:function(){n.ZIndexUtils.clear(this.menuRef.current)}},{key:"bindDocumentListeners",value:function(){this.bindDocumentClickListener(),this.bindDocumentResizeListener()}},{key:"unbindDocumentListeners",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener()}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.props.popup&&e.state.visible&&e.menuRef.current&&!e.menuRef.current.contains(t.target)&&e.hide(t)},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(t){e.state.visible&&!n.DomHandler.isAndroid()&&e.hide(t)},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new n.ConnectedOverlayScrollHandler(this.target,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"componentWillUnmount",value:function(){this.unbindDocumentListeners(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),n.ZIndexUtils.clear(this.menuRef.current)}},{key:"renderElement",value:function(){var e=n.classNames("p-tieredmenu p-component",{"p-tieredmenu-overlay":this.props.popup},this.props.className);return a.default.createElement(r.CSSTransition,{nodeRef:this.menuRef,classNames:"p-connected-overlay",in:this.state.visible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited},a.default.createElement("div",{ref:this.menuRef,id:this.props.id,className:e,style:this.props.style,onClick:this.onPanelClick},a.default.createElement(L,{model:this.props.model,root:!0,popup:this.props.popup})))}},{key:"render",value:function(){var e=this.renderElement();return this.props.popup?a.default.createElement(s.Portal,{element:e,appendTo:this.props.appendTo}):e}}]),u}(t.Component);return E(I,"defaultProps",{id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,transitionOptions:null,onShow:null,onHide:null}),e.TieredMenu=I,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.ripple,primereact.csstransition,primereact.overlayservice,primereact.portal,primereact.api);
1
+ this.primereact=this.primereact||{},this.primereact.tieredmenu=function(e,t,n,i,r,o,s,l){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(t),c=a(l);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function d(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function y(e){return y="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},y(e)}function b(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){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 L=function(e){v(s,e);var t,r,o=(t=s,r=C(),function(){var e,n=k(t);if(r){var i=k(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return b(this,e)});function s(e){var t;return p(this,s),(t=o.call(this,e)).state={activeItem:null},t.onLeafClick=t.onLeafClick.bind(f(t)),t.onChildItemKeyDown=t.onChildItemKeyDown.bind(f(t)),t}return d(s,[{key:"componentDidUpdate",value:function(e){e.parentActive&&!this.props.parentActive&&this.setState({activeItem:null}),this.props.parentActive&&!this.props.root&&this.position()}},{key:"componentDidMount",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.element&&!e.element.contains(t.target)&&e.setState({activeItem:null})},document.addEventListener("click",this.documentClickListener))}},{key:"componentWillUnmount",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"position",value:function(){if(this.element){var e=this.element.parentElement,t=n.DomHandler.getOffset(e),i=n.DomHandler.getViewport(),r=this.element.offsetParent?this.element.offsetWidth:n.DomHandler.getHiddenElementOuterWidth(this.element),o=n.DomHandler.getOuterWidth(e.children[0]);parseInt(t.left,10)+o+r>i.width-n.DomHandler.calculateScrollbarWidth()&&n.DomHandler.addClass(this.element,"p-submenu-list-flipped")}}},{key:"onItemMouseEnter",value:function(e,t){t.disabled?e.preventDefault():this.props.root?(this.state.activeItem||this.props.popup)&&this.setState({activeItem:t}):this.setState({activeItem:t})}},{key:"onItemClick",value:function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.props.root&&t.items&&this.setState(this.state.activeItem&&t===this.state.activeItem?{activeItem:null}:{activeItem:t}),t.items||this.onLeafClick())}},{key:"onItemKeyDown",value:function(e,t){var n=e.currentTarget.parentElement;switch(e.which){case 40:var i=this.findNextItem(n);i&&i.children[0].focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.setState({activeItem:t}),setTimeout((function(){n.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.props.onKeyDown&&this.props.onKeyDown(e,n)}},{key:"onChildItemKeyDown",value:function(e,t){37===e.which&&(this.setState({activeItem:null}),t.parentElement.previousElementSibling.focus())}},{key:"findNextItem",value:function(e){var t=e.nextElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||!n.DomHandler.hasClass(t,"p-menuitem")?this.findNextItem(t):t:null}},{key:"findPrevItem",value:function(e){var t=e.previousElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||!n.DomHandler.hasClass(t,"p-menuitem")?this.findPrevItem(t):t:null}},{key:"onLeafClick",value:function(){this.setState({activeItem:null}),this.props.onLeafClick&&this.props.onLeafClick()}},{key:"renderSeparator",value:function(e){return u.default.createElement("li",{key:"separator_"+e,className:"p-menu-separator",role:"separator"})}},{key:"renderSubmenu",value:function(e){return e.items?u.default.createElement(s,{model:e.items,onLeafClick:this.onLeafClick,popup:this.props.popup,onKeyDown:this.onChildItemKeyDown,parentActive:e===this.state.activeItem}):null}},{key:"renderMenuitem",value:function(e,t){var r=this,o=this.state.activeItem===e,s=n.classNames("p-menuitem",{"p-menuitem-active":o},e.className),l=n.classNames("p-menuitem-link",{"p-disabled":e.disabled}),a=n.classNames("p-menuitem-icon",e.icon),c="p-submenu-icon pi pi-angle-right",p=e.icon&&u.default.createElement("span",{className:a}),m=e.label&&u.default.createElement("span",{className:"p-menuitem-text"},e.label),d=e.items&&u.default.createElement("span",{className:c}),f=this.renderSubmenu(e),h=u.default.createElement("a",{href:e.url||"#",className:l,target:e.target,role:"menuitem","aria-haspopup":null!=e.items,onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},"aria-disabled":e.disabled},p,m,d,u.default.createElement(i.Ripple,null));e.template&&(h=n.ObjectUtils.getJSXElement(e.template,e,{onClick:function(t){return r.onItemClick(t,e)},onKeyDown:function(t){return r.onItemKeyDown(t,e)},className:l,labelClassName:"p-menuitem-text",iconClassName:a,submenuIconClassName:c,element:h,props:this.props,active:o}));return u.default.createElement("li",{key:e.label+"_"+t,className:s,style:e.style,onMouseEnter:function(t){return r.onItemMouseEnter(t,e)},role:"none"},h,f)}},{key:"renderItem",value:function(e,t){return e.separator?this.renderSeparator(t):this.renderMenuitem(e,t)}},{key:"renderMenu",value:function(){var e=this;return this.props.model?this.props.model.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"render",value:function(){var e=this,t=n.classNames({"p-submenu-list":!this.props.root}),i=this.renderMenu();return u.default.createElement("ul",{ref:function(t){return e.element=t},className:t,role:this.props.root?"menubar":"menu","aria-orientation":"horizontal"},i)}}]),s}(t.Component);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}}E(L,"defaultProps",{model:null,root:!1,className:null,popup:!1,onLeafClick:null,onKeyDown:null,parentActive:!1});var I=function(e){v(a,e);var t,i,l=(t=a,i=D(),function(){var e,n=k(t);if(i){var r=k(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return b(this,e)});function a(e){var t;return p(this,a),(t=l.call(this,e)).state={visible:!e.popup},t.onEnter=t.onEnter.bind(f(t)),t.onEntered=t.onEntered.bind(f(t)),t.onExit=t.onExit.bind(f(t)),t.onExited=t.onExited.bind(f(t)),t.onPanelClick=t.onPanelClick.bind(f(t)),t.menuRef=u.default.createRef(),t}return d(a,[{key:"onPanelClick",value:function(e){this.props.popup&&o.OverlayService.emit("overlay-click",{originalEvent:e,target:this.target})}},{key:"toggle",value:function(e){this.props.popup&&(this.state.visible?this.hide(e):this.show(e))}},{key:"show",value:function(e){var t=this;this.target=e.currentTarget;var n=e;this.setState({visible:!0},(function(){t.props.onShow&&t.props.onShow(n)}))}},{key:"hide",value:function(e){var t=this,n=e;this.setState({visible:!1},(function(){t.props.onHide&&t.props.onHide(n)}))}},{key:"onEnter",value:function(){this.props.autoZIndex&&n.ZIndexUtils.set("menu",this.menuRef.current,c.default.autoZIndex,this.props.baseZIndex||c.default.zIndex.menu),n.DomHandler.absolutePosition(this.menuRef.current,this.target)}},{key:"onEntered",value:function(){this.bindDocumentListeners(),this.bindScrollListener()}},{key:"onExit",value:function(){this.target=null,this.unbindDocumentListeners(),this.unbindScrollListener()}},{key:"onExited",value:function(){n.ZIndexUtils.clear(this.menuRef.current)}},{key:"bindDocumentListeners",value:function(){this.bindDocumentClickListener(),this.bindDocumentResizeListener()}},{key:"unbindDocumentListeners",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener()}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.props.popup&&e.state.visible&&e.menuRef.current&&!e.menuRef.current.contains(t.target)&&e.hide(t)},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(t){e.state.visible&&!n.DomHandler.isTouchDevice()&&e.hide(t)},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new n.ConnectedOverlayScrollHandler(this.target,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"componentWillUnmount",value:function(){this.unbindDocumentListeners(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),n.ZIndexUtils.clear(this.menuRef.current)}},{key:"renderElement",value:function(){var e=n.classNames("p-tieredmenu p-component",{"p-tieredmenu-overlay":this.props.popup},this.props.className);return u.default.createElement(r.CSSTransition,{nodeRef:this.menuRef,classNames:"p-connected-overlay",in:this.state.visible,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited},u.default.createElement("div",{ref:this.menuRef,id:this.props.id,className:e,style:this.props.style,onClick:this.onPanelClick},u.default.createElement(L,{model:this.props.model,root:!0,popup:this.props.popup})))}},{key:"render",value:function(){var e=this.renderElement();return this.props.popup?u.default.createElement(s.Portal,{element:e,appendTo:this.props.appendTo}):e}}]),a}(t.Component);return E(I,"defaultProps",{id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,transitionOptions:null,onShow:null,onHide:null}),e.TieredMenu=I,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.ripple,primereact.csstransition,primereact.overlayservice,primereact.portal,primereact.api);
@@ -28,6 +28,9 @@ function _defineProperties(target, props) {
28
28
  function _createClass(Constructor, protoProps, staticProps) {
29
29
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
30
30
  if (staticProps) _defineProperties(Constructor, staticProps);
31
+ Object.defineProperty(Constructor, "prototype", {
32
+ writable: false
33
+ });
31
34
  return Constructor;
32
35
  }
33
36
 
@@ -52,23 +55,20 @@ function _inherits(subClass, superClass) {
52
55
  configurable: true
53
56
  }
54
57
  });
58
+ Object.defineProperty(subClass, "prototype", {
59
+ writable: false
60
+ });
55
61
  if (superClass) _setPrototypeOf(subClass, superClass);
56
62
  }
57
63
 
58
64
  function _typeof(obj) {
59
65
  "@babel/helpers - typeof";
60
66
 
61
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
62
- _typeof = function _typeof(obj) {
63
- return typeof obj;
64
- };
65
- } else {
66
- _typeof = function _typeof(obj) {
67
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
68
- };
69
- }
70
-
71
- return _typeof(obj);
67
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
68
+ return typeof obj;
69
+ } : function (obj) {
70
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
71
+ }, _typeof(obj);
72
72
  }
73
73
 
74
74
  function _assertThisInitialized(self) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(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 c(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var m=function(n){a(b,e.Component);var l,u,c,m,v,d=(l=b,u=y(),function(){var e,t=p(l);if(u){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function b(){return o(this,b),d.apply(this,arguments)}return c=b,(m=[{key:"getKey",value:function(e,n){return this.props.dataKey?t.ObjectUtils.resolveFieldData(e,this.props.dataKey):"pr_id__".concat(n)}},{key:"renderEvents",value:function(){var e=this;return this.props.value&&this.props.value.map((function(n,o){var i=t.ObjectUtils.getJSXElement(e.props.opposite,n,o),l=t.ObjectUtils.getJSXElement(e.props.marker,n,o)||r.default.createElement("div",{className:"p-timeline-event-marker"}),a=o!==e.props.value.length-1&&r.default.createElement("div",{className:"p-timeline-event-connector"}),u=t.ObjectUtils.getJSXElement(e.props.content,n,o);return r.default.createElement("div",{key:e.getKey(n,o),className:"p-timeline-event"},r.default.createElement("div",{className:"p-timeline-event-opposite"},i),r.default.createElement("div",{className:"p-timeline-event-separator"},l,a),r.default.createElement("div",{className:"p-timeline-event-content"},u))}))}},{key:"render",value:function(){var e,n=t.classNames("p-timeline p-component",(f(e={},"p-timeline-".concat(this.props.align),!0),f(e,"p-timeline-".concat(this.props.layout),!0),e),this.props.className),o=this.renderEvents();return r.default.createElement("div",{id:this.props.id,className:n,style:this.props.style},o)}}])&&i(c.prototype,m),v&&i(c,v),b}();f(m,"defaultProps",{id:null,value:null,align:"left",layout:"vertical",dataKey:null,className:null,style:null,opposite:null,marker:null,content:null}),exports.Timeline=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var m=function(n){a(b,e.Component);var l,c,u,m,d,v=(l=b,c=y(),function(){var e,t=p(l);if(c){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function b(){return o(this,b),v.apply(this,arguments)}return u=b,(m=[{key:"getKey",value:function(e,n){return this.props.dataKey?t.ObjectUtils.resolveFieldData(e,this.props.dataKey):"pr_id__".concat(n)}},{key:"renderEvents",value:function(){var e=this;return this.props.value&&this.props.value.map((function(n,o){var i=t.ObjectUtils.getJSXElement(e.props.opposite,n,o),l=t.ObjectUtils.getJSXElement(e.props.marker,n,o)||r.default.createElement("div",{className:"p-timeline-event-marker"}),a=o!==e.props.value.length-1&&r.default.createElement("div",{className:"p-timeline-event-connector"}),c=t.ObjectUtils.getJSXElement(e.props.content,n,o);return r.default.createElement("div",{key:e.getKey(n,o),className:"p-timeline-event"},r.default.createElement("div",{className:"p-timeline-event-opposite"},i),r.default.createElement("div",{className:"p-timeline-event-separator"},l,a),r.default.createElement("div",{className:"p-timeline-event-content"},c))}))}},{key:"render",value:function(){var e,n=t.classNames("p-timeline p-component",(f(e={},"p-timeline-".concat(this.props.align),!0),f(e,"p-timeline-".concat(this.props.layout),!0),e),this.props.className),o=this.renderEvents();return r.default.createElement("div",{id:this.props.id,className:n,style:this.props.style},o)}}])&&i(u.prototype,m),d&&i(u,d),Object.defineProperty(u,"prototype",{writable:!1}),b}();f(m,"defaultProps",{id:null,value:null,align:"left",layout:"vertical",dataKey:null,className:null,style:null,opposite:null,marker:null,content:null}),exports.Timeline=m;
@@ -20,6 +20,9 @@ function _defineProperties(target, props) {
20
20
  function _createClass(Constructor, protoProps, staticProps) {
21
21
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
22
22
  if (staticProps) _defineProperties(Constructor, staticProps);
23
+ Object.defineProperty(Constructor, "prototype", {
24
+ writable: false
25
+ });
23
26
  return Constructor;
24
27
  }
25
28
 
@@ -44,23 +47,20 @@ function _inherits(subClass, superClass) {
44
47
  configurable: true
45
48
  }
46
49
  });
50
+ Object.defineProperty(subClass, "prototype", {
51
+ writable: false
52
+ });
47
53
  if (superClass) _setPrototypeOf(subClass, superClass);
48
54
  }
49
55
 
50
56
  function _typeof(obj) {
51
57
  "@babel/helpers - typeof";
52
58
 
53
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
54
- _typeof = function _typeof(obj) {
55
- return typeof obj;
56
- };
57
- } else {
58
- _typeof = function _typeof(obj) {
59
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
60
- };
61
- }
62
-
63
- return _typeof(obj);
59
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
60
+ return typeof obj;
61
+ } : function (obj) {
62
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
63
+ }, _typeof(obj);
64
64
  }
65
65
 
66
66
  function _assertThisInitialized(self) {
@@ -1 +1 @@
1
- import e,{Component as t}from"react";import{ObjectUtils as n,classNames as r}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 n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var y=function(l){c(h,t);var a,u,y,v,d,b=(a=h,u=m(),function(){var e,t=s(a);if(u){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return p(this,e)});function h(){return o(this,h),b.apply(this,arguments)}return y=h,(v=[{key:"getKey",value:function(e,t){return this.props.dataKey?n.resolveFieldData(e,this.props.dataKey):"pr_id__".concat(t)}},{key:"renderEvents",value:function(){var t=this;return this.props.value&&this.props.value.map((function(r,o){var i=n.getJSXElement(t.props.opposite,r,o),l=n.getJSXElement(t.props.marker,r,o)||e.createElement("div",{className:"p-timeline-event-marker"}),c=o!==t.props.value.length-1&&e.createElement("div",{className:"p-timeline-event-connector"}),a=n.getJSXElement(t.props.content,r,o);return e.createElement("div",{key:t.getKey(r,o),className:"p-timeline-event"},e.createElement("div",{className:"p-timeline-event-opposite"},i),e.createElement("div",{className:"p-timeline-event-separator"},l,c),e.createElement("div",{className:"p-timeline-event-content"},a))}))}},{key:"render",value:function(){var t,n=r("p-timeline p-component",(f(t={},"p-timeline-".concat(this.props.align),!0),f(t,"p-timeline-".concat(this.props.layout),!0),t),this.props.className),o=this.renderEvents();return e.createElement("div",{id:this.props.id,className:n,style:this.props.style},o)}}])&&i(y.prototype,v),d&&i(y,d),h}();f(y,"defaultProps",{id:null,value:null,align:"left",layout:"vertical",dataKey:null,className:null,style:null,opposite:null,marker:null,content:null});export{y as Timeline};
1
+ import e,{Component as t}from"react";import{ObjectUtils as n,classNames as r}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 n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var m=function(l){c(h,t);var a,u,m,v,b,d=(a=h,u=y(),function(){var e,t=s(a);if(u){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return p(this,e)});function h(){return o(this,h),d.apply(this,arguments)}return m=h,(v=[{key:"getKey",value:function(e,t){return this.props.dataKey?n.resolveFieldData(e,this.props.dataKey):"pr_id__".concat(t)}},{key:"renderEvents",value:function(){var t=this;return this.props.value&&this.props.value.map((function(r,o){var i=n.getJSXElement(t.props.opposite,r,o),l=n.getJSXElement(t.props.marker,r,o)||e.createElement("div",{className:"p-timeline-event-marker"}),c=o!==t.props.value.length-1&&e.createElement("div",{className:"p-timeline-event-connector"}),a=n.getJSXElement(t.props.content,r,o);return e.createElement("div",{key:t.getKey(r,o),className:"p-timeline-event"},e.createElement("div",{className:"p-timeline-event-opposite"},i),e.createElement("div",{className:"p-timeline-event-separator"},l,c),e.createElement("div",{className:"p-timeline-event-content"},a))}))}},{key:"render",value:function(){var t,n=r("p-timeline p-component",(f(t={},"p-timeline-".concat(this.props.align),!0),f(t,"p-timeline-".concat(this.props.layout),!0),t),this.props.className),o=this.renderEvents();return e.createElement("div",{id:this.props.id,className:n,style:this.props.style},o)}}])&&i(m.prototype,v),b&&i(m,b),Object.defineProperty(m,"prototype",{writable:!1}),h}();f(m,"defaultProps",{id:null,value:null,align:"left",layout:"vertical",dataKey:null,className:null,style:null,opposite:null,marker:null,content:null});export{m as Timeline};