primevue 3.27.0 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/README.md +1 -1
  2. package/autocomplete/AutoComplete.d.ts +10 -1
  3. package/autocomplete/AutoComplete.vue +1 -1
  4. package/autocomplete/autocomplete.cjs.js +4 -1
  5. package/autocomplete/autocomplete.cjs.min.js +1 -1
  6. package/autocomplete/autocomplete.esm.js +4 -1
  7. package/autocomplete/autocomplete.esm.min.js +1 -1
  8. package/autocomplete/autocomplete.js +4 -1
  9. package/autocomplete/autocomplete.min.js +1 -1
  10. package/avatar/Avatar.d.ts +44 -0
  11. package/avatar/Avatar.vue +10 -8
  12. package/avatar/avatar.cjs.js +36 -34
  13. package/avatar/avatar.cjs.min.js +1 -1
  14. package/avatar/avatar.esm.js +33 -35
  15. package/avatar/avatar.esm.min.js +1 -1
  16. package/avatar/avatar.js +37 -36
  17. package/avatar/avatar.min.js +1 -1
  18. package/avatargroup/AvatarGroup.d.ts +27 -1
  19. package/avatargroup/AvatarGroup.vue +5 -2
  20. package/avatargroup/avatargroup.cjs.js +9 -5
  21. package/avatargroup/avatargroup.cjs.min.js +1 -1
  22. package/avatargroup/avatargroup.esm.js +6 -6
  23. package/avatargroup/avatargroup.esm.min.js +1 -1
  24. package/avatargroup/avatargroup.js +10 -7
  25. package/avatargroup/avatargroup.min.js +1 -1
  26. package/badge/Badge.d.ts +32 -0
  27. package/badge/Badge.vue +3 -1
  28. package/badge/badge.cjs.js +8 -4
  29. package/badge/badge.cjs.min.js +1 -1
  30. package/badge/badge.esm.js +5 -5
  31. package/badge/badge.esm.min.js +1 -1
  32. package/badge/badge.js +9 -6
  33. package/badge/badge.min.js +1 -1
  34. package/basecomponent/BaseComponent.vue +10 -3
  35. package/basecomponent/basecomponent.cjs.js +10 -3
  36. package/basecomponent/basecomponent.cjs.min.js +1 -1
  37. package/basecomponent/basecomponent.esm.js +10 -3
  38. package/basecomponent/basecomponent.esm.min.js +1 -1
  39. package/basecomponent/basecomponent.js +10 -3
  40. package/basecomponent/basecomponent.min.js +1 -1
  41. package/baseicon/BaseIcon.vue +2 -2
  42. package/baseicon/baseicon.cjs.js +2 -2
  43. package/baseicon/baseicon.cjs.min.js +1 -1
  44. package/baseicon/baseicon.esm.js +2 -2
  45. package/baseicon/baseicon.esm.min.js +1 -1
  46. package/baseicon/baseicon.js +2 -2
  47. package/baseicon/baseicon.min.js +1 -1
  48. package/blockui/BlockUI.d.ts +44 -0
  49. package/blockui/BlockUI.vue +3 -1
  50. package/blockui/blockui.cjs.js +9 -3
  51. package/blockui/blockui.cjs.min.js +1 -1
  52. package/blockui/blockui.esm.js +6 -4
  53. package/blockui/blockui.esm.min.js +1 -1
  54. package/blockui/blockui.js +10 -5
  55. package/blockui/blockui.min.js +1 -1
  56. package/breadcrumb/Breadcrumb.d.ts +60 -0
  57. package/breadcrumb/Breadcrumb.vue +8 -6
  58. package/breadcrumb/BreadcrumbItem.vue +14 -10
  59. package/breadcrumb/breadcrumb.cjs.js +53 -51
  60. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  61. package/breadcrumb/breadcrumb.esm.js +53 -52
  62. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  63. package/breadcrumb/breadcrumb.js +54 -53
  64. package/breadcrumb/breadcrumb.min.js +1 -1
  65. package/button/Button.d.ts +48 -0
  66. package/button/Button.vue +10 -9
  67. package/button/button.cjs.js +43 -44
  68. package/button/button.cjs.min.js +1 -1
  69. package/button/button.esm.js +43 -45
  70. package/button/button.esm.min.js +1 -1
  71. package/button/button.js +44 -46
  72. package/button/button.min.js +1 -1
  73. package/chart/Chart.d.ts +36 -0
  74. package/chart/Chart.vue +5 -2
  75. package/chart/chart.cjs.js +10 -5
  76. package/chart/chart.cjs.min.js +1 -1
  77. package/chart/chart.esm.js +7 -6
  78. package/chart/chart.esm.min.js +1 -1
  79. package/chart/chart.js +11 -7
  80. package/chart/chart.min.js +1 -1
  81. package/chip/Chip.d.ts +60 -0
  82. package/chip/Chip.vue +10 -9
  83. package/chip/chip.cjs.js +35 -36
  84. package/chip/chip.cjs.min.js +1 -1
  85. package/chip/chip.esm.js +35 -37
  86. package/chip/chip.esm.min.js +1 -1
  87. package/chip/chip.js +36 -38
  88. package/chip/chip.min.js +1 -1
  89. package/config/PrimeVue.d.ts +8 -0
  90. package/config/config.cjs.js +3 -1
  91. package/config/config.cjs.min.js +1 -1
  92. package/config/config.esm.js +3 -2
  93. package/config/config.esm.min.js +1 -1
  94. package/config/config.js +3 -1
  95. package/config/config.min.js +1 -1
  96. package/confirmdialog/ConfirmDialog.d.ts +88 -0
  97. package/confirmdialog/ConfirmDialog.vue +9 -6
  98. package/confirmdialog/confirmdialog.cjs.js +22 -18
  99. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  100. package/confirmdialog/confirmdialog.esm.js +22 -19
  101. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  102. package/confirmdialog/confirmdialog.js +23 -20
  103. package/confirmdialog/confirmdialog.min.js +1 -1
  104. package/confirmpopup/ConfirmPopup.d.ts +75 -0
  105. package/confirmpopup/ConfirmPopup.vue +11 -9
  106. package/confirmpopup/confirmpopup.cjs.js +27 -25
  107. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  108. package/confirmpopup/confirmpopup.esm.js +27 -26
  109. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  110. package/confirmpopup/confirmpopup.js +28 -27
  111. package/confirmpopup/confirmpopup.min.js +1 -1
  112. package/contextmenu/ContextMenu.d.ts +135 -0
  113. package/contextmenu/ContextMenu.vue +4 -1
  114. package/contextmenu/ContextMenuSub.vue +46 -10
  115. package/contextmenu/contextmenu.cjs.js +57 -46
  116. package/contextmenu/contextmenu.cjs.min.js +1 -1
  117. package/contextmenu/contextmenu.esm.js +57 -47
  118. package/contextmenu/contextmenu.esm.min.js +1 -1
  119. package/contextmenu/contextmenu.js +58 -48
  120. package/contextmenu/contextmenu.min.js +1 -1
  121. package/core/core.js +278 -246
  122. package/core/core.min.js +11 -11
  123. package/dialog/Dialog.d.ts +87 -0
  124. package/dialog/Dialog.vue +23 -10
  125. package/dialog/dialog.cjs.js +31 -30
  126. package/dialog/dialog.cjs.min.js +1 -1
  127. package/dialog/dialog.esm.js +31 -31
  128. package/dialog/dialog.esm.min.js +1 -1
  129. package/dialog/dialog.js +32 -32
  130. package/dialog/dialog.min.js +1 -1
  131. package/dock/Dock.d.ts +94 -0
  132. package/dock/Dock.vue +4 -2
  133. package/dock/DockSub.vue +30 -6
  134. package/dock/dock.cjs.js +52 -39
  135. package/dock/dock.cjs.min.js +1 -1
  136. package/dock/dock.esm.js +52 -40
  137. package/dock/dock.esm.min.js +1 -1
  138. package/dock/dock.js +53 -41
  139. package/dock/dock.min.js +1 -1
  140. package/dropdown/Dropdown.vue +1 -1
  141. package/dropdown/dropdown.cjs.js +1 -1
  142. package/dropdown/dropdown.cjs.min.js +1 -1
  143. package/dropdown/dropdown.esm.js +1 -1
  144. package/dropdown/dropdown.esm.min.js +1 -1
  145. package/dropdown/dropdown.js +1 -1
  146. package/dropdown/dropdown.min.js +1 -1
  147. package/dynamicdialog/DynamicDialog.vue +3 -1
  148. package/dynamicdialog/dynamicdialog.cjs.js +5 -1
  149. package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
  150. package/dynamicdialog/dynamicdialog.esm.js +4 -1
  151. package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
  152. package/dynamicdialog/dynamicdialog.js +6 -3
  153. package/dynamicdialog/dynamicdialog.min.js +1 -1
  154. package/fileupload/FileContent.vue +11 -9
  155. package/fileupload/FileUpload.d.ts +154 -0
  156. package/fileupload/FileUpload.vue +26 -24
  157. package/fileupload/fileupload.cjs.js +100 -97
  158. package/fileupload/fileupload.cjs.min.js +1 -1
  159. package/fileupload/fileupload.esm.js +100 -98
  160. package/fileupload/fileupload.esm.min.js +1 -1
  161. package/fileupload/fileupload.js +101 -99
  162. package/fileupload/fileupload.min.js +1 -1
  163. package/inlinemessage/InlineMessage.d.ts +52 -0
  164. package/inlinemessage/InlineMessage.vue +7 -3
  165. package/inlinemessage/inlinemessage.cjs.js +12 -11
  166. package/inlinemessage/inlinemessage.cjs.min.js +1 -1
  167. package/inlinemessage/inlinemessage.esm.js +12 -12
  168. package/inlinemessage/inlinemessage.esm.min.js +1 -1
  169. package/inlinemessage/inlinemessage.js +13 -13
  170. package/inlinemessage/inlinemessage.min.js +1 -1
  171. package/inplace/Inplace.d.ts +59 -0
  172. package/inplace/Inplace.vue +7 -5
  173. package/inplace/inplace.cjs.js +17 -16
  174. package/inplace/inplace.cjs.min.js +1 -1
  175. package/inplace/inplace.esm.js +17 -17
  176. package/inplace/inplace.esm.min.js +1 -1
  177. package/inplace/inplace.js +18 -18
  178. package/inplace/inplace.min.js +1 -1
  179. package/listbox/Listbox.d.ts +1 -1
  180. package/megamenu/MegaMenu.d.ts +149 -0
  181. package/megamenu/MegaMenu.vue +6 -3
  182. package/megamenu/MegaMenuSub.vue +43 -15
  183. package/megamenu/megamenu.cjs.js +83 -75
  184. package/megamenu/megamenu.cjs.min.js +1 -1
  185. package/megamenu/megamenu.esm.js +83 -76
  186. package/megamenu/megamenu.esm.min.js +1 -1
  187. package/megamenu/megamenu.js +84 -77
  188. package/megamenu/megamenu.min.js +1 -1
  189. package/menu/Menu.d.ts +113 -0
  190. package/menu/Menu.vue +11 -8
  191. package/menu/Menuitem.vue +20 -8
  192. package/menu/menu.cjs.js +73 -62
  193. package/menu/menu.cjs.min.js +1 -1
  194. package/menu/menu.esm.js +73 -63
  195. package/menu/menu.esm.min.js +1 -1
  196. package/menu/menu.js +74 -64
  197. package/menu/menu.min.js +1 -1
  198. package/menubar/Menubar.d.ts +146 -0
  199. package/menubar/Menubar.vue +8 -5
  200. package/menubar/MenubarSub.vue +38 -10
  201. package/menubar/menubar.cjs.js +70 -60
  202. package/menubar/menubar.cjs.min.js +1 -1
  203. package/menubar/menubar.esm.js +70 -61
  204. package/menubar/menubar.esm.min.js +1 -1
  205. package/menubar/menubar.js +71 -62
  206. package/menubar/menubar.min.js +1 -1
  207. package/message/Message.d.ts +64 -1
  208. package/message/Message.vue +9 -7
  209. package/message/message.cjs.js +22 -21
  210. package/message/message.cjs.min.js +1 -1
  211. package/message/message.esm.js +22 -22
  212. package/message/message.esm.min.js +1 -1
  213. package/message/message.js +23 -23
  214. package/message/message.min.js +1 -1
  215. package/multiselect/MultiSelect.d.ts +1 -1
  216. package/overlaypanel/OverlayPanel.d.ts +56 -0
  217. package/overlaypanel/OverlayPanel.vue +6 -4
  218. package/overlaypanel/overlaypanel.cjs.js +13 -10
  219. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  220. package/overlaypanel/overlaypanel.esm.js +13 -11
  221. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  222. package/overlaypanel/overlaypanel.js +14 -12
  223. package/overlaypanel/overlaypanel.min.js +1 -1
  224. package/package.json +1 -1
  225. package/panel/Panel.d.ts +10 -1
  226. package/panel/Panel.vue +1 -1
  227. package/panel/panel.cjs.js +4 -1
  228. package/panel/panel.cjs.min.js +1 -1
  229. package/panel/panel.esm.js +4 -1
  230. package/panel/panel.esm.min.js +1 -1
  231. package/panel/panel.js +4 -1
  232. package/panel/panel.min.js +1 -1
  233. package/panelmenu/PanelMenu.d.ts +133 -0
  234. package/panelmenu/PanelMenu.vue +36 -13
  235. package/panelmenu/PanelMenuList.vue +3 -0
  236. package/panelmenu/PanelMenuSub.vue +33 -12
  237. package/panelmenu/panelmenu.cjs.js +115 -96
  238. package/panelmenu/panelmenu.cjs.min.js +1 -1
  239. package/panelmenu/panelmenu.esm.js +115 -97
  240. package/panelmenu/panelmenu.esm.min.js +1 -1
  241. package/panelmenu/panelmenu.js +116 -98
  242. package/panelmenu/panelmenu.min.js +1 -1
  243. package/password/Password.vue +2 -2
  244. package/password/password.cjs.js +2 -2
  245. package/password/password.cjs.min.js +1 -1
  246. package/password/password.esm.js +2 -2
  247. package/password/password.esm.min.js +1 -1
  248. package/password/password.js +2 -2
  249. package/password/password.min.js +1 -1
  250. package/progressbar/ProgressBar.d.ts +40 -0
  251. package/progressbar/ProgressBar.vue +8 -5
  252. package/progressbar/progressbar.cjs.js +25 -23
  253. package/progressbar/progressbar.cjs.min.js +1 -1
  254. package/progressbar/progressbar.esm.js +22 -24
  255. package/progressbar/progressbar.esm.min.js +1 -1
  256. package/progressbar/progressbar.js +26 -25
  257. package/progressbar/progressbar.min.js +1 -1
  258. package/progressspinner/ProgressSpinner.d.ts +40 -0
  259. package/progressspinner/ProgressSpinner.vue +6 -3
  260. package/progressspinner/progressspinner.cjs.js +18 -13
  261. package/progressspinner/progressspinner.cjs.min.js +1 -1
  262. package/progressspinner/progressspinner.esm.js +15 -14
  263. package/progressspinner/progressspinner.esm.min.js +1 -1
  264. package/progressspinner/progressspinner.js +19 -15
  265. package/progressspinner/progressspinner.min.js +1 -1
  266. package/resources/themes/arya-blue/theme.css +1 -1
  267. package/resources/themes/arya-green/theme.css +1 -1
  268. package/resources/themes/arya-orange/theme.css +1 -1
  269. package/resources/themes/arya-purple/theme.css +1 -1
  270. package/resources/themes/bootstrap4-dark-blue/theme.css +1 -1
  271. package/resources/themes/bootstrap4-dark-purple/theme.css +1 -1
  272. package/resources/themes/bootstrap4-light-blue/theme.css +1 -1
  273. package/resources/themes/bootstrap4-light-purple/theme.css +1 -1
  274. package/resources/themes/fluent-light/theme.css +1 -1
  275. package/resources/themes/lara-dark-blue/theme.css +1 -1
  276. package/resources/themes/lara-dark-indigo/theme.css +1 -1
  277. package/resources/themes/lara-dark-purple/theme.css +1 -1
  278. package/resources/themes/lara-dark-teal/theme.css +1 -1
  279. package/resources/themes/lara-light-blue/theme.css +1 -1
  280. package/resources/themes/lara-light-indigo/theme.css +1 -1
  281. package/resources/themes/lara-light-purple/theme.css +1 -1
  282. package/resources/themes/lara-light-teal/theme.css +1 -1
  283. package/resources/themes/luna-amber/theme.css +1 -1
  284. package/resources/themes/luna-blue/theme.css +1 -1
  285. package/resources/themes/luna-green/theme.css +1 -1
  286. package/resources/themes/luna-pink/theme.css +1 -1
  287. package/resources/themes/md-dark-deeppurple/theme.css +4 -1
  288. package/resources/themes/md-dark-indigo/theme.css +4 -1
  289. package/resources/themes/md-light-deeppurple/theme.css +4 -1
  290. package/resources/themes/md-light-indigo/theme.css +4 -1
  291. package/resources/themes/mdc-dark-deeppurple/theme.css +4 -1
  292. package/resources/themes/mdc-dark-indigo/theme.css +4 -1
  293. package/resources/themes/mdc-light-deeppurple/theme.css +4 -1
  294. package/resources/themes/mdc-light-indigo/theme.css +4 -1
  295. package/resources/themes/mira/theme.css +1 -1
  296. package/resources/themes/nano/theme.css +1 -1
  297. package/resources/themes/nova/theme.css +1 -1
  298. package/resources/themes/nova-accent/theme.css +1 -1
  299. package/resources/themes/nova-alt/theme.css +1 -1
  300. package/resources/themes/nova-vue/theme.css +1 -1
  301. package/resources/themes/rhea/theme.css +1 -1
  302. package/resources/themes/saga-blue/theme.css +1 -1
  303. package/resources/themes/saga-green/theme.css +1 -1
  304. package/resources/themes/saga-orange/theme.css +1 -1
  305. package/resources/themes/saga-purple/theme.css +1 -1
  306. package/resources/themes/soho-dark/theme.css +1 -1
  307. package/resources/themes/soho-light/theme.css +1 -1
  308. package/resources/themes/tailwind-light/theme.css +1 -1
  309. package/resources/themes/vela-blue/theme.css +1 -1
  310. package/resources/themes/vela-green/theme.css +1 -1
  311. package/resources/themes/vela-orange/theme.css +1 -1
  312. package/resources/themes/vela-purple/theme.css +1 -1
  313. package/resources/themes/viva-dark/theme.css +1 -1
  314. package/resources/themes/viva-light/theme.css +1 -1
  315. package/scrolltop/ScrollTop.d.ts +48 -0
  316. package/scrolltop/ScrollTop.vue +5 -2
  317. package/scrolltop/scrolltop.cjs.js +10 -7
  318. package/scrolltop/scrolltop.cjs.min.js +1 -1
  319. package/scrolltop/scrolltop.esm.js +10 -8
  320. package/scrolltop/scrolltop.esm.min.js +1 -1
  321. package/scrolltop/scrolltop.js +11 -9
  322. package/scrolltop/scrolltop.min.js +1 -1
  323. package/sidebar/Sidebar.d.ts +68 -0
  324. package/sidebar/Sidebar.vue +9 -7
  325. package/sidebar/sidebar.cjs.js +26 -24
  326. package/sidebar/sidebar.cjs.min.js +1 -1
  327. package/sidebar/sidebar.esm.js +26 -25
  328. package/sidebar/sidebar.esm.min.js +1 -1
  329. package/sidebar/sidebar.js +27 -26
  330. package/sidebar/sidebar.min.js +1 -1
  331. package/skeleton/Skeleton.d.ts +32 -0
  332. package/skeleton/Skeleton.vue +4 -1
  333. package/skeleton/skeleton.cjs.js +10 -4
  334. package/skeleton/skeleton.cjs.min.js +1 -1
  335. package/skeleton/skeleton.esm.js +7 -5
  336. package/skeleton/skeleton.esm.min.js +1 -1
  337. package/skeleton/skeleton.js +11 -6
  338. package/skeleton/skeleton.min.js +1 -1
  339. package/speeddial/SpeedDial.d.ts +101 -0
  340. package/speeddial/SpeedDial.vue +31 -8
  341. package/speeddial/speeddial.cjs.js +47 -33
  342. package/speeddial/speeddial.cjs.min.js +1 -1
  343. package/speeddial/speeddial.esm.js +47 -34
  344. package/speeddial/speeddial.esm.min.js +1 -1
  345. package/speeddial/speeddial.js +48 -35
  346. package/speeddial/speeddial.min.js +1 -1
  347. package/splitbutton/SplitButton.d.ts +64 -0
  348. package/splitbutton/SplitButton.vue +8 -5
  349. package/splitbutton/splitbutton.cjs.js +23 -18
  350. package/splitbutton/splitbutton.cjs.min.js +1 -1
  351. package/splitbutton/splitbutton.esm.js +23 -19
  352. package/splitbutton/splitbutton.esm.min.js +1 -1
  353. package/splitbutton/splitbutton.js +24 -20
  354. package/splitbutton/splitbutton.min.js +1 -1
  355. package/steps/Steps.d.ts +52 -0
  356. package/steps/Steps.vue +11 -8
  357. package/steps/steps.cjs.js +34 -33
  358. package/steps/steps.cjs.min.js +1 -1
  359. package/steps/steps.esm.js +31 -34
  360. package/steps/steps.esm.min.js +1 -1
  361. package/steps/steps.js +35 -35
  362. package/steps/steps.min.js +1 -1
  363. package/tabmenu/TabMenu.d.ts +79 -0
  364. package/tabmenu/TabMenu.vue +20 -10
  365. package/tabmenu/tabmenu.cjs.js +47 -41
  366. package/tabmenu/tabmenu.cjs.min.js +1 -1
  367. package/tabmenu/tabmenu.esm.js +47 -42
  368. package/tabmenu/tabmenu.esm.min.js +1 -1
  369. package/tabmenu/tabmenu.js +48 -43
  370. package/tabmenu/tabmenu.min.js +1 -1
  371. package/tag/Tag.d.ts +40 -0
  372. package/tag/Tag.vue +7 -4
  373. package/tag/tag.cjs.js +14 -12
  374. package/tag/tag.cjs.min.js +1 -1
  375. package/tag/tag.esm.js +11 -13
  376. package/tag/tag.esm.min.js +1 -1
  377. package/tag/tag.js +15 -14
  378. package/tag/tag.min.js +1 -1
  379. package/terminal/Terminal.d.ts +79 -0
  380. package/terminal/Terminal.vue +12 -10
  381. package/terminal/terminal.cjs.js +23 -28
  382. package/terminal/terminal.cjs.min.js +1 -1
  383. package/terminal/terminal.esm.js +23 -29
  384. package/terminal/terminal.esm.min.js +1 -1
  385. package/terminal/terminal.js +24 -30
  386. package/terminal/terminal.min.js +1 -1
  387. package/tieredmenu/TieredMenu.d.ts +130 -0
  388. package/tieredmenu/TieredMenu.vue +4 -1
  389. package/tieredmenu/TieredMenuSub.vue +39 -11
  390. package/tieredmenu/tieredmenu.cjs.js +53 -41
  391. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  392. package/tieredmenu/tieredmenu.esm.js +53 -42
  393. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  394. package/tieredmenu/tieredmenu.js +54 -43
  395. package/tieredmenu/tieredmenu.min.js +1 -1
  396. package/toast/Toast.d.ts +79 -0
  397. package/toast/Toast.vue +4 -1
  398. package/toast/ToastMessage.vue +12 -10
  399. package/toast/toast.cjs.js +31 -31
  400. package/toast/toast.cjs.min.js +1 -1
  401. package/toast/toast.esm.js +31 -32
  402. package/toast/toast.esm.min.js +1 -1
  403. package/toast/toast.js +32 -33
  404. package/toast/toast.min.js +1 -1
  405. package/treeselect/TreeSelect.d.ts +1 -2
  406. package/vetur-attributes.json +160 -0
  407. package/vetur-tags.json +79 -34
  408. package/web-types.json +404 -2
package/menu/menu.esm.js CHANGED
@@ -1,11 +1,13 @@
1
+ import BaseComponent from 'primevue/basecomponent';
1
2
  import OverlayEventBus from 'primevue/overlayeventbus';
2
3
  import Portal from 'primevue/portal';
3
4
  import { ObjectUtils, UniqueComponentId, ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler } from 'primevue/utils';
4
5
  import Ripple from 'primevue/ripple';
5
- import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, createBlock, withCtx, withDirectives, resolveDynamicComponent, createCommentVNode, toDisplayString, createVNode, Transition, mergeProps, renderSlot, renderList, createTextVNode } from 'vue';
6
+ import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createElementVNode, Fragment, createBlock, withCtx, withDirectives, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, createVNode, Transition, renderSlot, renderList, createTextVNode } from 'vue';
6
7
 
7
8
  var script$1 = {
8
9
  name: 'Menuitem',
10
+ extends: BaseComponent,
9
11
  inheritAttrs: false,
10
12
  emits: ['item-click'],
11
13
  props: {
@@ -19,6 +21,16 @@ var script$1 = {
19
21
  getItemProp(processedItem, name) {
20
22
  return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name]) : undefined;
21
23
  },
24
+ getPTOptions(key) {
25
+ return this.ptm(key, {
26
+ context: {
27
+ focused: this.isItemFocused()
28
+ }
29
+ });
30
+ },
31
+ isItemFocused() {
32
+ return this.focusedOptionId === this.id;
33
+ },
22
34
  onItemActionClick(event, navigate) {
23
35
  navigate && navigate(event);
24
36
  },
@@ -62,28 +74,26 @@ var script$1 = {
62
74
 
63
75
  const _hoisted_1$1 = ["id", "aria-label", "aria-disabled"];
64
76
  const _hoisted_2$1 = ["href", "onClick"];
65
- const _hoisted_3$1 = { class: "p-menuitem-text" };
66
- const _hoisted_4$1 = ["href", "target"];
67
- const _hoisted_5$1 = { class: "p-menuitem-text" };
77
+ const _hoisted_3$1 = ["href", "target"];
68
78
 
69
79
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
70
80
  const _component_router_link = resolveComponent("router-link");
71
81
  const _directive_ripple = resolveDirective("ripple");
72
82
 
73
83
  return ($options.visible())
74
- ? (openBlock(), createElementBlock("li", {
84
+ ? (openBlock(), createElementBlock("li", mergeProps({
75
85
  key: 0,
76
86
  id: $props.id,
77
- class: normalizeClass($options.containerClass()),
87
+ class: $options.containerClass(),
78
88
  role: "menuitem",
79
- style: normalizeStyle($props.item.style),
89
+ style: $props.item.style,
80
90
  "aria-label": $options.label(),
81
91
  "aria-disabled": $options.disabled()
82
- }, [
83
- createElementVNode("div", {
92
+ }, $options.getPTOptions('menuitem')), [
93
+ createElementVNode("div", mergeProps({
84
94
  class: "p-menuitem-content",
85
95
  onClick: _cache[0] || (_cache[0] = $event => ($options.onItemClick($event)))
86
- }, [
96
+ }, $options.getPTOptions('content')), [
87
97
  (!$props.templates.item)
88
98
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
89
99
  ($props.item.to && !$options.disabled())
@@ -93,13 +103,13 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
93
103
  custom: ""
94
104
  }, {
95
105
  default: withCtx(({ navigate, href, isActive, isExactActive }) => [
96
- withDirectives((openBlock(), createElementBlock("a", {
106
+ withDirectives((openBlock(), createElementBlock("a", mergeProps({
97
107
  href: href,
98
- class: normalizeClass($options.linkClass({ isActive, isExactActive })),
108
+ class: $options.linkClass({ isActive, isExactActive }),
99
109
  tabindex: "-1",
100
110
  "aria-hidden": "true",
101
111
  onClick: $event => ($options.onItemActionClick($event, navigate))
102
- }, [
112
+ }, $options.getPTOptions('action')), [
103
113
  ($props.templates.itemicon)
104
114
  ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), {
105
115
  key: 0,
@@ -107,26 +117,26 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
107
117
  class: normalizeClass($options.iconClass)
108
118
  }, null, 8, ["item", "class"]))
109
119
  : ($props.item.icon)
110
- ? (openBlock(), createElementBlock("span", {
120
+ ? (openBlock(), createElementBlock("span", mergeProps({
111
121
  key: 1,
112
- class: normalizeClass($options.iconClass)
113
- }, null, 2))
122
+ class: $options.iconClass
123
+ }, $options.getPTOptions('icon')), null, 16))
114
124
  : createCommentVNode("", true),
115
- createElementVNode("span", _hoisted_3$1, toDisplayString($options.label()), 1)
116
- ], 10, _hoisted_2$1)), [
125
+ createElementVNode("span", mergeProps({ class: "p-menuitem-text" }, $options.getPTOptions('label')), toDisplayString($options.label()), 17)
126
+ ], 16, _hoisted_2$1)), [
117
127
  [_directive_ripple]
118
128
  ])
119
129
  ]),
120
130
  _: 1
121
131
  }, 8, ["to"]))
122
- : withDirectives((openBlock(), createElementBlock("a", {
132
+ : withDirectives((openBlock(), createElementBlock("a", mergeProps({
123
133
  key: 1,
124
134
  href: $props.item.url,
125
- class: normalizeClass($options.linkClass()),
135
+ class: $options.linkClass(),
126
136
  target: $props.item.target,
127
137
  tabindex: "-1",
128
138
  "aria-hidden": "true"
129
- }, [
139
+ }, $options.getPTOptions('action')), [
130
140
  ($props.templates.itemicon)
131
141
  ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), {
132
142
  key: 0,
@@ -134,13 +144,13 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
134
144
  class: normalizeClass($options.iconClass)
135
145
  }, null, 8, ["item", "class"]))
136
146
  : ($props.item.icon)
137
- ? (openBlock(), createElementBlock("span", {
147
+ ? (openBlock(), createElementBlock("span", mergeProps({
138
148
  key: 1,
139
- class: normalizeClass($options.iconClass)
140
- }, null, 2))
149
+ class: $options.iconClass
150
+ }, $options.getPTOptions('icon')), null, 16))
141
151
  : createCommentVNode("", true),
142
- createElementVNode("span", _hoisted_5$1, toDisplayString($options.label()), 1)
143
- ], 10, _hoisted_4$1)), [
152
+ createElementVNode("span", mergeProps({ class: "p-menuitem-text" }, $options.getPTOptions('label')), toDisplayString($options.label()), 17)
153
+ ], 16, _hoisted_3$1)), [
144
154
  [_directive_ripple]
145
155
  ])
146
156
  ], 64))
@@ -148,8 +158,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
148
158
  key: 1,
149
159
  item: $props.item
150
160
  }, null, 8, ["item"]))
151
- ])
152
- ], 14, _hoisted_1$1))
161
+ ], 16)
162
+ ], 16, _hoisted_1$1))
153
163
  : createCommentVNode("", true)
154
164
  }
155
165
 
@@ -157,6 +167,7 @@ script$1.render = render$1;
157
167
 
158
168
  var script = {
159
169
  name: 'Menu',
170
+ extends: BaseComponent,
160
171
  inheritAttrs: false,
161
172
  emits: ['show', 'hide', 'focus', 'blur'],
162
173
  props: {
@@ -520,16 +531,8 @@ var script = {
520
531
  };
521
532
 
522
533
  const _hoisted_1 = ["id"];
523
- const _hoisted_2 = {
524
- key: 0,
525
- class: "p-menu-start"
526
- };
527
- const _hoisted_3 = ["id", "tabindex", "aria-activedescendant", "aria-label", "aria-labelledby"];
528
- const _hoisted_4 = ["id"];
529
- const _hoisted_5 = {
530
- key: 1,
531
- class: "p-menu-end"
532
- };
534
+ const _hoisted_2 = ["id", "tabindex", "aria-activedescendant", "aria-label", "aria-labelledby"];
535
+ const _hoisted_3 = ["id"];
533
536
 
534
537
  function render(_ctx, _cache, $props, $setup, $data, $options) {
535
538
  const _component_PVMenuitem = resolveComponent("PVMenuitem");
@@ -552,16 +555,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
552
555
  key: 0,
553
556
  ref: $options.containerRef,
554
557
  id: $data.id,
555
- class: $options.containerClass
556
- }, _ctx.$attrs, {
558
+ class: $options.containerClass,
557
559
  onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
558
- }), [
560
+ }, { ..._ctx.$attrs, ..._ctx.ptm('root') }), [
559
561
  (_ctx.$slots.start)
560
- ? (openBlock(), createElementBlock("div", _hoisted_2, [
562
+ ? (openBlock(), createElementBlock("div", mergeProps({
563
+ key: 0,
564
+ class: "p-menu-start"
565
+ }, _ctx.ptm('start')), [
561
566
  renderSlot(_ctx.$slots, "start")
562
- ]))
567
+ ], 16))
563
568
  : createCommentVNode("", true),
564
- createElementVNode("ul", {
569
+ createElementVNode("ul", mergeProps({
565
570
  ref: $options.listRef,
566
571
  id: $data.id + '_list',
567
572
  class: "p-menu-list p-reset",
@@ -573,7 +578,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
573
578
  onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onListFocus && $options.onListFocus(...args))),
574
579
  onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onListBlur && $options.onListBlur(...args))),
575
580
  onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onListKeyDown && $options.onListKeyDown(...args)))
576
- }, [
581
+ }, _ctx.ptm('menu')), [
577
582
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.model, (item, i) => {
578
583
  return (openBlock(), createElementBlock(Fragment, {
579
584
  key: $options.label(item) + i.toString()
@@ -581,16 +586,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
581
586
  (item.items && $options.visible(item) && !item.separator)
582
587
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
583
588
  (item.items)
584
- ? (openBlock(), createElementBlock("li", {
589
+ ? (openBlock(), createElementBlock("li", mergeProps({
585
590
  key: 0,
586
591
  id: $data.id + '_' + i,
587
592
  class: "p-submenu-header",
588
593
  role: "none"
589
- }, [
594
+ }, _ctx.ptm('submenuHeader')), [
590
595
  renderSlot(_ctx.$slots, "item", { item: item }, () => [
591
596
  createTextVNode(toDisplayString($options.label(item)), 1)
592
597
  ])
593
- ], 8, _hoisted_4))
598
+ ], 16, _hoisted_3))
594
599
  : createCommentVNode("", true),
595
600
  (openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (child, j) => {
596
601
  return (openBlock(), createElementBlock(Fragment, {
@@ -604,26 +609,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
604
609
  templates: _ctx.$slots,
605
610
  exact: $props.exact,
606
611
  focusedOptionId: $options.focusedOptionId,
607
- onItemClick: $options.itemClick
608
- }, null, 8, ["id", "item", "templates", "exact", "focusedOptionId", "onItemClick"]))
612
+ onItemClick: $options.itemClick,
613
+ pt: _ctx.pt
614
+ }, null, 8, ["id", "item", "templates", "exact", "focusedOptionId", "onItemClick", "pt"]))
609
615
  : ($options.visible(child) && child.separator)
610
- ? (openBlock(), createElementBlock("li", {
616
+ ? (openBlock(), createElementBlock("li", mergeProps({
611
617
  key: 'separator' + i + j,
612
- class: normalizeClass($options.separatorClass(item)),
613
- style: normalizeStyle(child.style),
618
+ class: $options.separatorClass(item),
619
+ style: child.style,
614
620
  role: "separator"
615
- }, null, 6))
621
+ }, _ctx.ptm('separator')), null, 16))
616
622
  : createCommentVNode("", true)
617
623
  ], 64))
618
624
  }), 128))
619
625
  ], 64))
620
626
  : ($options.visible(item) && item.separator)
621
- ? (openBlock(), createElementBlock("li", {
627
+ ? (openBlock(), createElementBlock("li", mergeProps({
622
628
  key: 'separator' + i.toString(),
623
- class: normalizeClass($options.separatorClass(item)),
624
- style: normalizeStyle(item.style),
629
+ class: $options.separatorClass(item),
630
+ style: item.style,
625
631
  role: "separator"
626
- }, null, 6))
632
+ }, _ctx.ptm('separator')), null, 16))
627
633
  : (openBlock(), createBlock(_component_PVMenuitem, {
628
634
  key: $options.label(item) + i.toString(),
629
635
  id: $data.id + '_' + i,
@@ -631,15 +637,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
631
637
  templates: _ctx.$slots,
632
638
  exact: $props.exact,
633
639
  focusedOptionId: $options.focusedOptionId,
634
- onItemClick: $options.itemClick
635
- }, null, 8, ["id", "item", "templates", "exact", "focusedOptionId", "onItemClick"]))
640
+ onItemClick: $options.itemClick,
641
+ pt: _ctx.pt
642
+ }, null, 8, ["id", "item", "templates", "exact", "focusedOptionId", "onItemClick", "pt"]))
636
643
  ], 64))
637
644
  }), 128))
638
- ], 40, _hoisted_3),
645
+ ], 16, _hoisted_2),
639
646
  (_ctx.$slots.end)
640
- ? (openBlock(), createElementBlock("div", _hoisted_5, [
647
+ ? (openBlock(), createElementBlock("div", mergeProps({
648
+ key: 1,
649
+ class: "p-menu-end"
650
+ }, _ctx.ptm('end')), [
641
651
  renderSlot(_ctx.$slots, "end")
642
- ]))
652
+ ], 16))
643
653
  : createCommentVNode("", true)
644
654
  ], 16, _hoisted_1))
645
655
  : createCommentVNode("", true)
@@ -1 +1 @@
1
- import e from"primevue/overlayeventbus";import t from"primevue/portal";import{ObjectUtils as i,UniqueComponentId as n,ZIndexUtils as s,DomHandler as l,ConnectedOverlayScrollHandler as o}from"primevue/utils";import a from"primevue/ripple";import{resolveComponent as r,resolveDirective as d,openBlock as c,createElementBlock as u,normalizeClass as p,normalizeStyle as h,createElementVNode as m,Fragment as b,createBlock as f,withCtx as v,withDirectives as y,resolveDynamicComponent as k,createCommentVNode as x,toDisplayString as g,createVNode as I,Transition as L,mergeProps as C,renderSlot as O,renderList as w,createTextVNode as E}from"vue";var A={name:"Menuitem",inheritAttrs:!1,emits:["item-click"],props:{item:null,templates:null,exact:null,id:null,focusedOptionId:null},methods:{getItemProp:(e,t)=>e&&e.item?i.getItemValue(e.item[t]):void 0,onItemActionClick(e,t){t&&t(e)},onItemClick(e){const t=this.getItemProp(this.item,"command");t&&t({originalEvent:e,item:this.item.item}),this.$emit("item-click",{originalEvent:e,item:this.item,id:this.id})},containerClass(){return["p-menuitem",this.item.class,{"p-focus":this.id===this.focusedOptionId,"p-disabled":this.disabled()}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},visible(){return"function"==typeof this.item.visible?this.item.visible():!1!==this.item.visible},disabled(){return"function"==typeof this.item.disabled?this.item.disabled():this.item.disabled},label(){return"function"==typeof this.item.label?this.item.label():this.item.label}},computed:{iconClass(){return["p-menuitem-icon",this.item.icon]}},directives:{ripple:a}};const S=["id","aria-label","aria-disabled"],$=["href","onClick"],K={class:"p-menuitem-text"},z=["href","target"],D={class:"p-menuitem-text"};A.render=function(e,t,i,n,s,l){const o=r("router-link"),a=d("ripple");return l.visible()?(c(),u("li",{key:0,id:i.id,class:p(l.containerClass()),role:"menuitem",style:h(i.item.style),"aria-label":l.label(),"aria-disabled":l.disabled()},[m("div",{class:"p-menuitem-content",onClick:t[0]||(t[0]=e=>l.onItemClick(e))},[i.templates.item?(c(),f(k(i.templates.item),{key:1,item:i.item},null,8,["item"])):(c(),u(b,{key:0},[i.item.to&&!l.disabled()?(c(),f(o,{key:0,to:i.item.to,custom:""},{default:v((({navigate:e,href:t,isActive:n,isExactActive:s})=>[y((c(),u("a",{href:t,class:p(l.linkClass({isActive:n,isExactActive:s})),tabindex:"-1","aria-hidden":"true",onClick:t=>l.onItemActionClick(t,e)},[i.templates.itemicon?(c(),f(k(i.templates.itemicon),{key:0,item:i.item,class:p(l.iconClass)},null,8,["item","class"])):i.item.icon?(c(),u("span",{key:1,class:p(l.iconClass)},null,2)):x("",!0),m("span",K,g(l.label()),1)],10,$)),[[a]])])),_:1},8,["to"])):y((c(),u("a",{key:1,href:i.item.url,class:p(l.linkClass()),target:i.item.target,tabindex:"-1","aria-hidden":"true"},[i.templates.itemicon?(c(),f(k(i.templates.itemicon),{key:0,item:i.item,class:p(l.iconClass)},null,8,["item","class"])):i.item.icon?(c(),u("span",{key:1,class:p(l.iconClass)},null,2)):x("",!0),m("span",D,g(l.label()),1)],10,z)),[[a]])],64))])],14,S)):x("",!0)};var V={name:"Menu",inheritAttrs:!1,emits:["show","hide","focus","blur"],props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data(){return{id:this.$attrs.id,overlayVisible:!1,focused:!1,focusedOptionIndex:-1,selectedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n()}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,list:null,mounted(){this.id=this.id||n(),this.popup||(this.bindResizeListener(),this.bindOutsideClickListener())},beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&s.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;this.disabled(t)||(t.command&&t.command(e),t.to&&e.navigate&&e.navigate(e.originalEvent),this.overlayVisible&&this.hide(),this.popup||this.focusedOptionIndex===e.id||(this.focusedOptionIndex=e.id))},onListFocus(e){this.focused=!0,this.popup||(-1!==this.selectedOptionIndex?(this.changeFocusedOptionIndex(this.selectedOptionIndex),this.selectedOptionIndex=-1):this.changeFocusedOptionIndex(0)),this.$emit("focus",e)},onListBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":this.popup&&(l.focus(this.target),this.hide());case"Tab":this.overlayVisible&&this.hide()}},onArrowDownKey(e){const t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},onArrowUpKey(e){if(e.altKey&&this.popup)l.focus(this.target),this.hide(),e.preventDefault();else{const t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()}},onHomeKey(e){this.changeFocusedOptionIndex(0),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(l.find(this.container,"li.p-menuitem:not(.p-disabled)").length-1),e.preventDefault()},onEnterKey(e){const t=l.findSingle(this.list,`li[id="${this.focusedOptionIndex}"]`),i=t&&l.findSingle(t,".p-menuitem-link");this.popup&&l.focus(this.target),i?i.click():t&&t.click(),e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},findNextOptionIndex(e){const t=[...l.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t+1:0},findPrevOptionIndex(e){const t=[...l.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t-1:0},changeFocusedOptionIndex(e){const t=l.find(this.container,"li.p-menuitem:not(.p-disabled)");let i=e>=t.length?t.length-1:e<0?0:e;i>-1&&(this.focusedOptionIndex=t[i].getAttribute("id"))},toggle(e){this.overlayVisible?this.hide():this.show(e)},show(e){this.overlayVisible=!0,this.target=e.currentTarget},hide(){this.overlayVisible=!1,this.target=null},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&s.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.popup&&(l.focus(this.list),this.changeFocusedOptionIndex(0)),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave(e){this.autoZIndex&&s.clear(e)},alignOverlay(){l.absolutePosition(this.container,this.target),this.container.style.minWidth=l.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.container&&!this.container.contains(e.target),i=!(this.target&&(this.target===e.target||this.target.contains(e.target)));this.overlayVisible&&t&&i?this.hide():!this.popup&&t&&i&&(this.focusedOptionIndex=-1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o(this.target,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!l.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label,separatorClass:e=>["p-menuitem-separator",e.class],onOverlayClick(t){e.emit("overlay-click",{originalEvent:t,target:this.target})},containerRef(e){this.container=e},listRef(e){this.list=e}},computed:{containerClass(){return["p-menu p-component",{"p-menu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},focusedOptionId(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{PVMenuitem:A,Portal:t}};const F=["id"],H={key:0,class:"p-menu-start"},R=["id","tabindex","aria-activedescendant","aria-label","aria-labelledby"],T=["id"],B={key:1,class:"p-menu-end"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-menu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menu .p-menuitem-text {\n line-height: 1;\n}\n"),V.render=function(e,t,i,n,s,l){const o=r("PVMenuitem"),a=r("Portal");return c(),f(a,{appendTo:i.appendTo,disabled:!i.popup},{default:v((()=>[I(L,{name:"p-connected-overlay",onEnter:l.onEnter,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave},{default:v((()=>[!i.popup||s.overlayVisible?(c(),u("div",C({key:0,ref:l.containerRef,id:s.id,class:l.containerClass},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>l.onOverlayClick&&l.onOverlayClick(...e))}),[e.$slots.start?(c(),u("div",H,[O(e.$slots,"start")])):x("",!0),m("ul",{ref:l.listRef,id:s.id+"_list",class:"p-menu-list p-reset",role:"menu",tabindex:i.tabindex,"aria-activedescendant":s.focused?l.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=(...e)=>l.onListFocus&&l.onListFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>l.onListBlur&&l.onListBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>l.onListKeyDown&&l.onListKeyDown(...e))},[(c(!0),u(b,null,w(i.model,((t,n)=>(c(),u(b,{key:l.label(t)+n.toString()},[t.items&&l.visible(t)&&!t.separator?(c(),u(b,{key:0},[t.items?(c(),u("li",{key:0,id:s.id+"_"+n,class:"p-submenu-header",role:"none"},[O(e.$slots,"item",{item:t},(()=>[E(g(l.label(t)),1)]))],8,T)):x("",!0),(c(!0),u(b,null,w(t.items,((a,r)=>(c(),u(b,{key:a.label+n+"_"+r},[l.visible(a)&&!a.separator?(c(),f(o,{key:0,id:s.id+"_"+n+"_"+r,item:a,templates:e.$slots,exact:i.exact,focusedOptionId:l.focusedOptionId,onItemClick:l.itemClick},null,8,["id","item","templates","exact","focusedOptionId","onItemClick"])):l.visible(a)&&a.separator?(c(),u("li",{key:"separator"+n+r,class:p(l.separatorClass(t)),style:h(a.style),role:"separator"},null,6)):x("",!0)],64)))),128))],64)):l.visible(t)&&t.separator?(c(),u("li",{key:"separator"+n.toString(),class:p(l.separatorClass(t)),style:h(t.style),role:"separator"},null,6)):(c(),f(o,{key:l.label(t)+n.toString(),id:s.id+"_"+n,item:t,templates:e.$slots,exact:i.exact,focusedOptionId:l.focusedOptionId,onItemClick:l.itemClick},null,8,["id","item","templates","exact","focusedOptionId","onItemClick"]))],64)))),128))],40,R),e.$slots.end?(c(),u("div",B,[O(e.$slots,"end")])):x("",!0)],16,F)):x("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo","disabled"])};export{V as default};
1
+ import e from"primevue/basecomponent";import t from"primevue/overlayeventbus";import i from"primevue/portal";import{ObjectUtils as n,UniqueComponentId as s,ZIndexUtils as l,DomHandler as o,ConnectedOverlayScrollHandler as a}from"primevue/utils";import r from"primevue/ripple";import{resolveComponent as d,resolveDirective as c,openBlock as p,createElementBlock as u,mergeProps as h,createElementVNode as m,Fragment as b,createBlock as f,withCtx as v,withDirectives as y,resolveDynamicComponent as g,normalizeClass as k,createCommentVNode as x,toDisplayString as I,createVNode as O,Transition as L,renderSlot as C,renderList as w,createTextVNode as E}from"vue";var A={name:"Menuitem",extends:e,inheritAttrs:!1,emits:["item-click"],props:{item:null,templates:null,exact:null,id:null,focusedOptionId:null},methods:{getItemProp:(e,t)=>e&&e.item?n.getItemValue(e.item[t]):void 0,getPTOptions(e){return this.ptm(e,{context:{focused:this.isItemFocused()}})},isItemFocused(){return this.focusedOptionId===this.id},onItemActionClick(e,t){t&&t(e)},onItemClick(e){const t=this.getItemProp(this.item,"command");t&&t({originalEvent:e,item:this.item.item}),this.$emit("item-click",{originalEvent:e,item:this.item,id:this.id})},containerClass(){return["p-menuitem",this.item.class,{"p-focus":this.id===this.focusedOptionId,"p-disabled":this.disabled()}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},visible(){return"function"==typeof this.item.visible?this.item.visible():!1!==this.item.visible},disabled(){return"function"==typeof this.item.disabled?this.item.disabled():this.item.disabled},label(){return"function"==typeof this.item.label?this.item.label():this.item.label}},computed:{iconClass(){return["p-menuitem-icon",this.item.icon]}},directives:{ripple:r}};const S=["id","aria-label","aria-disabled"],T=["href","onClick"],$=["href","target"];A.render=function(e,t,i,n,s,l){const o=d("router-link"),a=c("ripple");return l.visible()?(p(),u("li",h({key:0,id:i.id,class:l.containerClass(),role:"menuitem",style:i.item.style,"aria-label":l.label(),"aria-disabled":l.disabled()},l.getPTOptions("menuitem")),[m("div",h({class:"p-menuitem-content",onClick:t[0]||(t[0]=e=>l.onItemClick(e))},l.getPTOptions("content")),[i.templates.item?(p(),f(g(i.templates.item),{key:1,item:i.item},null,8,["item"])):(p(),u(b,{key:0},[i.item.to&&!l.disabled()?(p(),f(o,{key:0,to:i.item.to,custom:""},{default:v((({navigate:e,href:t,isActive:n,isExactActive:s})=>[y((p(),u("a",h({href:t,class:l.linkClass({isActive:n,isExactActive:s}),tabindex:"-1","aria-hidden":"true",onClick:t=>l.onItemActionClick(t,e)},l.getPTOptions("action")),[i.templates.itemicon?(p(),f(g(i.templates.itemicon),{key:0,item:i.item,class:k(l.iconClass)},null,8,["item","class"])):i.item.icon?(p(),u("span",h({key:1,class:l.iconClass},l.getPTOptions("icon")),null,16)):x("",!0),m("span",h({class:"p-menuitem-text"},l.getPTOptions("label")),I(l.label()),17)],16,T)),[[a]])])),_:1},8,["to"])):y((p(),u("a",h({key:1,href:i.item.url,class:l.linkClass(),target:i.item.target,tabindex:"-1","aria-hidden":"true"},l.getPTOptions("action")),[i.templates.itemicon?(p(),f(g(i.templates.itemicon),{key:0,item:i.item,class:k(l.iconClass)},null,8,["item","class"])):i.item.icon?(p(),u("span",h({key:1,class:l.iconClass},l.getPTOptions("icon")),null,16)):x("",!0),m("span",h({class:"p-menuitem-text"},l.getPTOptions("label")),I(l.label()),17)],16,$)),[[a]])],64))],16)],16,S)):x("",!0)};var K={name:"Menu",extends:e,inheritAttrs:!1,emits:["show","hide","focus","blur"],props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data(){return{id:this.$attrs.id,overlayVisible:!1,focused:!1,focusedOptionIndex:-1,selectedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||s()}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,list:null,mounted(){this.id=this.id||s(),this.popup||(this.bindResizeListener(),this.bindOutsideClickListener())},beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&l.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;this.disabled(t)||(t.command&&t.command(e),t.to&&e.navigate&&e.navigate(e.originalEvent),this.overlayVisible&&this.hide(),this.popup||this.focusedOptionIndex===e.id||(this.focusedOptionIndex=e.id))},onListFocus(e){this.focused=!0,this.popup||(-1!==this.selectedOptionIndex?(this.changeFocusedOptionIndex(this.selectedOptionIndex),this.selectedOptionIndex=-1):this.changeFocusedOptionIndex(0)),this.$emit("focus",e)},onListBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":this.popup&&(o.focus(this.target),this.hide());case"Tab":this.overlayVisible&&this.hide()}},onArrowDownKey(e){const t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},onArrowUpKey(e){if(e.altKey&&this.popup)o.focus(this.target),this.hide(),e.preventDefault();else{const t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()}},onHomeKey(e){this.changeFocusedOptionIndex(0),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(o.find(this.container,"li.p-menuitem:not(.p-disabled)").length-1),e.preventDefault()},onEnterKey(e){const t=o.findSingle(this.list,`li[id="${this.focusedOptionIndex}"]`),i=t&&o.findSingle(t,".p-menuitem-link");this.popup&&o.focus(this.target),i?i.click():t&&t.click(),e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},findNextOptionIndex(e){const t=[...o.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t+1:0},findPrevOptionIndex(e){const t=[...o.find(this.container,"li.p-menuitem:not(.p-disabled)")].findIndex((t=>t.id===e));return t>-1?t-1:0},changeFocusedOptionIndex(e){const t=o.find(this.container,"li.p-menuitem:not(.p-disabled)");let i=e>=t.length?t.length-1:e<0?0:e;i>-1&&(this.focusedOptionIndex=t[i].getAttribute("id"))},toggle(e){this.overlayVisible?this.hide():this.show(e)},show(e){this.overlayVisible=!0,this.target=e.currentTarget},hide(){this.overlayVisible=!1,this.target=null},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&l.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.popup&&(o.focus(this.list),this.changeFocusedOptionIndex(0)),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave(e){this.autoZIndex&&l.clear(e)},alignOverlay(){o.absolutePosition(this.container,this.target),this.container.style.minWidth=o.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.container&&!this.container.contains(e.target),i=!(this.target&&(this.target===e.target||this.target.contains(e.target)));this.overlayVisible&&t&&i?this.hide():!this.popup&&t&&i&&(this.focusedOptionIndex=-1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new a(this.target,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!o.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label,separatorClass:e=>["p-menuitem-separator",e.class],onOverlayClick(e){t.emit("overlay-click",{originalEvent:e,target:this.target})},containerRef(e){this.container=e},listRef(e){this.list=e}},computed:{containerClass(){return["p-menu p-component",{"p-menu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},focusedOptionId(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{PVMenuitem:A,Portal:i}};const P=["id"],z=["id","tabindex","aria-activedescendant","aria-label","aria-labelledby"],F=["id"];!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-menu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menu .p-menuitem-text {\n line-height: 1;\n}\n"),K.render=function(e,t,i,n,s,l){const o=d("PVMenuitem"),a=d("Portal");return p(),f(a,{appendTo:i.appendTo,disabled:!i.popup},{default:v((()=>[O(L,{name:"p-connected-overlay",onEnter:l.onEnter,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave},{default:v((()=>[!i.popup||s.overlayVisible?(p(),u("div",h({key:0,ref:l.containerRef,id:s.id,class:l.containerClass,onClick:t[3]||(t[3]=(...e)=>l.onOverlayClick&&l.onOverlayClick(...e))},{...e.$attrs,...e.ptm("root")}),[e.$slots.start?(p(),u("div",h({key:0,class:"p-menu-start"},e.ptm("start")),[C(e.$slots,"start")],16)):x("",!0),m("ul",h({ref:l.listRef,id:s.id+"_list",class:"p-menu-list p-reset",role:"menu",tabindex:i.tabindex,"aria-activedescendant":s.focused?l.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=(...e)=>l.onListFocus&&l.onListFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>l.onListBlur&&l.onListBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>l.onListKeyDown&&l.onListKeyDown(...e))},e.ptm("menu")),[(p(!0),u(b,null,w(i.model,((t,n)=>(p(),u(b,{key:l.label(t)+n.toString()},[t.items&&l.visible(t)&&!t.separator?(p(),u(b,{key:0},[t.items?(p(),u("li",h({key:0,id:s.id+"_"+n,class:"p-submenu-header",role:"none"},e.ptm("submenuHeader")),[C(e.$slots,"item",{item:t},(()=>[E(I(l.label(t)),1)]))],16,F)):x("",!0),(p(!0),u(b,null,w(t.items,((a,r)=>(p(),u(b,{key:a.label+n+"_"+r},[l.visible(a)&&!a.separator?(p(),f(o,{key:0,id:s.id+"_"+n+"_"+r,item:a,templates:e.$slots,exact:i.exact,focusedOptionId:l.focusedOptionId,onItemClick:l.itemClick,pt:e.pt},null,8,["id","item","templates","exact","focusedOptionId","onItemClick","pt"])):l.visible(a)&&a.separator?(p(),u("li",h({key:"separator"+n+r,class:l.separatorClass(t),style:a.style,role:"separator"},e.ptm("separator")),null,16)):x("",!0)],64)))),128))],64)):l.visible(t)&&t.separator?(p(),u("li",h({key:"separator"+n.toString(),class:l.separatorClass(t),style:t.style,role:"separator"},e.ptm("separator")),null,16)):(p(),f(o,{key:l.label(t)+n.toString(),id:s.id+"_"+n,item:t,templates:e.$slots,exact:i.exact,focusedOptionId:l.focusedOptionId,onItemClick:l.itemClick,pt:e.pt},null,8,["id","item","templates","exact","focusedOptionId","onItemClick","pt"]))],64)))),128))],16,z),e.$slots.end?(p(),u("div",h({key:1,class:"p-menu-end"},e.ptm("end")),[C(e.$slots,"end")],16)):x("",!0)],16,P)):x("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo","disabled"])};export{K as default};