primevue 3.8.2 → 3.9.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 (373) hide show
  1. package/README.md +2 -2
  2. package/api/Api.d.ts +70 -36
  3. package/api/api.cjs.js +66 -32
  4. package/api/api.cjs.min.js +1 -1
  5. package/api/api.esm.js +66 -32
  6. package/api/api.esm.min.js +1 -1
  7. package/api/api.js +66 -32
  8. package/api/api.min.js +1 -1
  9. package/autocomplete/AutoComplete.vue +16 -9
  10. package/autocomplete/autocomplete.cjs.js +19 -11
  11. package/autocomplete/autocomplete.cjs.min.js +1 -1
  12. package/autocomplete/autocomplete.esm.js +19 -11
  13. package/autocomplete/autocomplete.esm.min.js +1 -1
  14. package/autocomplete/autocomplete.js +19 -11
  15. package/autocomplete/autocomplete.min.js +1 -1
  16. package/breadcrumb/BreadcrumbItem.vue +5 -2
  17. package/breadcrumb/breadcrumb.cjs.js +5 -2
  18. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  19. package/breadcrumb/breadcrumb.esm.js +5 -2
  20. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  21. package/breadcrumb/breadcrumb.js +5 -2
  22. package/breadcrumb/breadcrumb.min.js +1 -1
  23. package/calendar/Calendar.d.ts +6 -0
  24. package/calendar/Calendar.vue +362 -67
  25. package/calendar/calendar.cjs.js +459 -168
  26. package/calendar/calendar.cjs.min.js +1 -1
  27. package/calendar/calendar.esm.js +461 -170
  28. package/calendar/calendar.esm.min.js +1 -1
  29. package/calendar/calendar.js +459 -168
  30. package/calendar/calendar.min.js +1 -1
  31. package/carousel/Carousel.vue +2 -2
  32. package/carousel/carousel.cjs.js +6 -6
  33. package/carousel/carousel.cjs.min.js +1 -1
  34. package/carousel/carousel.esm.js +6 -6
  35. package/carousel/carousel.esm.min.js +1 -1
  36. package/carousel/carousel.js +6 -6
  37. package/carousel/carousel.min.js +1 -1
  38. package/cascadeselect/CascadeSelect.d.ts +8 -4
  39. package/chart/Chart.vue +9 -2
  40. package/chart/chart.cjs.js +9 -2
  41. package/chart/chart.cjs.min.js +1 -1
  42. package/chart/chart.esm.js +9 -2
  43. package/chart/chart.esm.min.js +1 -1
  44. package/chart/chart.js +9 -2
  45. package/chart/chart.min.js +1 -1
  46. package/colorpicker/ColorPicker.d.ts +3 -0
  47. package/colorpicker/ColorPicker.vue +6 -1
  48. package/colorpicker/colorpicker.cjs.js +6 -1
  49. package/colorpicker/colorpicker.cjs.min.js +1 -1
  50. package/colorpicker/colorpicker.esm.js +6 -1
  51. package/colorpicker/colorpicker.esm.min.js +1 -1
  52. package/colorpicker/colorpicker.js +6 -1
  53. package/colorpicker/colorpicker.min.js +1 -1
  54. package/confirmdialog/ConfirmDialog.vue +8 -2
  55. package/confirmdialog/confirmdialog.cjs.js +11 -4
  56. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  57. package/confirmdialog/confirmdialog.esm.js +11 -4
  58. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  59. package/confirmdialog/confirmdialog.js +11 -4
  60. package/confirmdialog/confirmdialog.min.js +1 -1
  61. package/confirmpopup/ConfirmPopup.d.ts +7 -0
  62. package/confirmpopup/ConfirmPopup.vue +7 -4
  63. package/confirmpopup/confirmpopup.cjs.js +13 -5
  64. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  65. package/confirmpopup/confirmpopup.esm.js +14 -6
  66. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  67. package/confirmpopup/confirmpopup.js +13 -5
  68. package/confirmpopup/confirmpopup.min.js +1 -1
  69. package/contextmenu/ContextMenuSub.vue +7 -4
  70. package/contextmenu/contextmenu.cjs.js +7 -4
  71. package/contextmenu/contextmenu.cjs.min.js +1 -1
  72. package/contextmenu/contextmenu.esm.js +7 -4
  73. package/contextmenu/contextmenu.esm.min.js +1 -1
  74. package/contextmenu/contextmenu.js +7 -4
  75. package/contextmenu/contextmenu.min.js +1 -1
  76. package/core/core.js +132 -65
  77. package/core/core.min.js +14 -11
  78. package/datatable/BodyCell.vue +1 -0
  79. package/datatable/ColumnFilter.vue +17 -6
  80. package/datatable/DataTable.d.ts +5 -4
  81. package/datatable/DataTable.vue +34 -21
  82. package/datatable/TableBody.vue +5 -1
  83. package/datatable/TableFooter.vue +15 -1
  84. package/datatable/TableHeader.vue +15 -1
  85. package/datatable/datatable.cjs.js +175 -106
  86. package/datatable/datatable.cjs.min.js +1 -1
  87. package/datatable/datatable.esm.js +175 -106
  88. package/datatable/datatable.esm.min.js +1 -1
  89. package/datatable/datatable.js +175 -106
  90. package/datatable/datatable.min.js +1 -1
  91. package/dataview/DataView.d.ts +2 -2
  92. package/dataview/DataView.vue +8 -8
  93. package/dataview/dataview.cjs.js +12 -12
  94. package/dataview/dataview.cjs.min.js +1 -1
  95. package/dataview/dataview.esm.js +12 -12
  96. package/dataview/dataview.esm.min.js +1 -1
  97. package/dataview/dataview.js +12 -12
  98. package/dataview/dataview.min.js +1 -1
  99. package/dropdown/Dropdown.d.ts +10 -5
  100. package/inputnumber/InputNumber.vue +19 -3
  101. package/inputnumber/inputnumber.cjs.js +19 -3
  102. package/inputnumber/inputnumber.cjs.min.js +1 -1
  103. package/inputnumber/inputnumber.esm.js +19 -3
  104. package/inputnumber/inputnumber.esm.min.js +1 -1
  105. package/inputnumber/inputnumber.js +19 -3
  106. package/inputnumber/inputnumber.min.js +1 -1
  107. package/inputtext/InputText.vue +1 -1
  108. package/inputtext/inputtext.cjs.js +2 -2
  109. package/inputtext/inputtext.cjs.min.js +1 -1
  110. package/inputtext/inputtext.esm.js +3 -3
  111. package/inputtext/inputtext.esm.min.js +1 -1
  112. package/inputtext/inputtext.js +2 -2
  113. package/inputtext/inputtext.min.js +1 -1
  114. package/listbox/Listbox.d.ts +10 -5
  115. package/megamenu/MegaMenu.vue +10 -7
  116. package/megamenu/megamenu.cjs.js +10 -7
  117. package/megamenu/megamenu.cjs.min.js +1 -1
  118. package/megamenu/megamenu.esm.js +10 -7
  119. package/megamenu/megamenu.esm.min.js +1 -1
  120. package/megamenu/megamenu.js +10 -7
  121. package/megamenu/megamenu.min.js +1 -1
  122. package/menu/Menu.vue +6 -3
  123. package/menu/Menuitem.vue +5 -2
  124. package/menu/menu.cjs.js +11 -5
  125. package/menu/menu.cjs.min.js +1 -1
  126. package/menu/menu.esm.js +11 -5
  127. package/menu/menu.esm.min.js +1 -1
  128. package/menu/menu.js +11 -5
  129. package/menu/menu.min.js +1 -1
  130. package/menubar/MenubarSub.vue +7 -4
  131. package/menubar/menubar.cjs.js +7 -4
  132. package/menubar/menubar.cjs.min.js +1 -1
  133. package/menubar/menubar.esm.js +7 -4
  134. package/menubar/menubar.esm.min.js +1 -1
  135. package/menubar/menubar.js +7 -4
  136. package/menubar/menubar.min.js +1 -1
  137. package/message/Message.d.ts +1 -0
  138. package/message/Message.vue +6 -2
  139. package/message/message.cjs.js +6 -2
  140. package/message/message.cjs.min.js +1 -1
  141. package/message/message.esm.js +6 -2
  142. package/message/message.esm.min.js +1 -1
  143. package/message/message.js +6 -2
  144. package/message/message.min.js +1 -1
  145. package/multiselect/MultiSelect.d.ts +10 -5
  146. package/orderlist/OrderList.d.ts +2 -0
  147. package/orderlist/OrderList.vue +2 -0
  148. package/orderlist/orderlist.cjs.js +3 -1
  149. package/orderlist/orderlist.cjs.min.js +1 -1
  150. package/orderlist/orderlist.esm.js +3 -1
  151. package/orderlist/orderlist.esm.min.js +1 -1
  152. package/orderlist/orderlist.js +3 -1
  153. package/orderlist/orderlist.min.js +1 -1
  154. package/package.json +5 -1
  155. package/paginator/Paginator.vue +4 -4
  156. package/paginator/paginator.cjs.js +4 -4
  157. package/paginator/paginator.cjs.min.js +1 -1
  158. package/paginator/paginator.esm.js +4 -4
  159. package/paginator/paginator.esm.min.js +1 -1
  160. package/paginator/paginator.js +4 -4
  161. package/paginator/paginator.min.js +1 -1
  162. package/panel/Panel.d.ts +1 -0
  163. package/panel/Panel.vue +1 -1
  164. package/panelmenu/PanelMenu.vue +6 -3
  165. package/panelmenu/PanelMenuSub.vue +8 -5
  166. package/panelmenu/panelmenu.cjs.js +14 -8
  167. package/panelmenu/panelmenu.cjs.min.js +1 -1
  168. package/panelmenu/panelmenu.esm.js +14 -8
  169. package/panelmenu/panelmenu.esm.min.js +1 -1
  170. package/panelmenu/panelmenu.js +14 -8
  171. package/panelmenu/panelmenu.min.js +1 -1
  172. package/picklist/PickList.d.ts +8 -2
  173. package/picklist/PickList.vue +10 -4
  174. package/picklist/picklist.cjs.js +13 -7
  175. package/picklist/picklist.cjs.min.js +1 -1
  176. package/picklist/picklist.esm.js +13 -7
  177. package/picklist/picklist.esm.min.js +1 -1
  178. package/picklist/picklist.js +13 -7
  179. package/picklist/picklist.min.js +1 -1
  180. package/progressbar/ProgressBar.vue +13 -12
  181. package/progressbar/progressbar.cjs.js +13 -12
  182. package/progressbar/progressbar.cjs.min.js +1 -1
  183. package/progressbar/progressbar.esm.js +14 -13
  184. package/progressbar/progressbar.esm.min.js +1 -1
  185. package/progressbar/progressbar.js +13 -12
  186. package/progressbar/progressbar.min.js +1 -1
  187. package/rating/Rating.vue +1 -1
  188. package/rating/rating.cjs.js +1 -1
  189. package/rating/rating.cjs.min.js +1 -1
  190. package/rating/rating.esm.js +1 -1
  191. package/rating/rating.esm.min.js +1 -1
  192. package/rating/rating.js +1 -1
  193. package/rating/rating.min.js +1 -1
  194. package/resources/primevue.css +5 -0
  195. package/resources/primevue.min.css +1 -1
  196. package/resources/themes/arya-blue/theme.css +56 -15
  197. package/resources/themes/arya-green/theme.css +56 -15
  198. package/resources/themes/arya-orange/theme.css +56 -15
  199. package/resources/themes/arya-purple/theme.css +56 -15
  200. package/resources/themes/bootstrap4-dark-blue/theme.css +53 -19
  201. package/resources/themes/bootstrap4-dark-purple/theme.css +53 -19
  202. package/resources/themes/bootstrap4-light-blue/theme.css +53 -19
  203. package/resources/themes/bootstrap4-light-purple/theme.css +53 -19
  204. package/resources/themes/fluent-light/theme.css +56 -15
  205. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
  206. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
  207. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
  208. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
  209. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
  210. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
  211. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
  212. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
  213. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
  214. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
  215. package/resources/themes/lara-dark-blue/theme.css +5414 -0
  216. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
  217. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
  218. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
  219. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
  220. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
  221. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
  222. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
  223. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
  224. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
  225. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  226. package/resources/themes/lara-dark-indigo/theme.css +5414 -0
  227. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
  228. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
  229. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
  230. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
  231. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
  232. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
  233. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
  234. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
  235. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
  236. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
  237. package/resources/themes/lara-dark-purple/theme.css +5414 -0
  238. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
  239. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
  240. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
  241. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
  242. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
  243. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
  244. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
  245. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
  246. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
  247. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
  248. package/resources/themes/lara-dark-teal/theme.css +5414 -0
  249. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
  250. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
  251. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
  252. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
  253. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
  254. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
  255. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
  256. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
  257. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
  258. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
  259. package/resources/themes/lara-light-blue/theme.css +5414 -0
  260. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
  261. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
  262. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
  263. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
  264. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
  265. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
  266. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
  267. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
  268. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
  269. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  270. package/resources/themes/lara-light-indigo/theme.css +5414 -0
  271. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
  272. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
  273. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
  274. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
  275. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
  276. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
  277. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
  278. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
  279. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
  280. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
  281. package/resources/themes/lara-light-purple/theme.css +5414 -0
  282. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
  283. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
  284. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
  285. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
  286. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
  287. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
  288. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
  289. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
  290. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
  291. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
  292. package/resources/themes/lara-light-teal/theme.css +5414 -0
  293. package/resources/themes/luna-amber/theme.css +53 -19
  294. package/resources/themes/luna-blue/theme.css +53 -19
  295. package/resources/themes/luna-green/theme.css +53 -19
  296. package/resources/themes/luna-pink/theme.css +53 -19
  297. package/resources/themes/md-dark-deeppurple/theme.css +244 -47
  298. package/resources/themes/md-dark-indigo/theme.css +244 -47
  299. package/resources/themes/md-light-deeppurple/theme.css +244 -47
  300. package/resources/themes/md-light-indigo/theme.css +244 -47
  301. package/resources/themes/mdc-dark-deeppurple/theme.css +244 -47
  302. package/resources/themes/mdc-dark-indigo/theme.css +244 -47
  303. package/resources/themes/mdc-light-deeppurple/theme.css +244 -47
  304. package/resources/themes/mdc-light-indigo/theme.css +244 -47
  305. package/resources/themes/nova/theme.css +53 -19
  306. package/resources/themes/nova-accent/theme.css +53 -19
  307. package/resources/themes/nova-alt/theme.css +53 -19
  308. package/resources/themes/nova-vue/theme.css +53 -19
  309. package/resources/themes/rhea/theme.css +53 -19
  310. package/resources/themes/saga-blue/theme.css +56 -15
  311. package/resources/themes/saga-green/theme.css +56 -15
  312. package/resources/themes/saga-orange/theme.css +56 -15
  313. package/resources/themes/saga-purple/theme.css +56 -15
  314. package/resources/themes/tailwind-light/theme.css +67 -18
  315. package/resources/themes/vela-blue/theme.css +56 -15
  316. package/resources/themes/vela-green/theme.css +56 -15
  317. package/resources/themes/vela-orange/theme.css +56 -15
  318. package/resources/themes/vela-purple/theme.css +56 -15
  319. package/selectbutton/SelectButton.d.ts +8 -3
  320. package/selectbutton/SelectButton.vue +8 -2
  321. package/selectbutton/selectbutton.cjs.js +14 -9
  322. package/selectbutton/selectbutton.cjs.min.js +1 -1
  323. package/selectbutton/selectbutton.esm.js +14 -9
  324. package/selectbutton/selectbutton.esm.min.js +1 -1
  325. package/selectbutton/selectbutton.js +14 -9
  326. package/selectbutton/selectbutton.min.js +1 -1
  327. package/steps/Steps.vue +5 -2
  328. package/steps/steps.cjs.js +5 -2
  329. package/steps/steps.cjs.min.js +1 -1
  330. package/steps/steps.esm.js +5 -2
  331. package/steps/steps.esm.min.js +1 -1
  332. package/steps/steps.js +5 -2
  333. package/steps/steps.min.js +1 -1
  334. package/tabmenu/TabMenu.vue +6 -3
  335. package/tabmenu/tabmenu.cjs.js +6 -3
  336. package/tabmenu/tabmenu.cjs.min.js +1 -1
  337. package/tabmenu/tabmenu.esm.js +6 -3
  338. package/tabmenu/tabmenu.esm.min.js +1 -1
  339. package/tabmenu/tabmenu.js +6 -3
  340. package/tabmenu/tabmenu.min.js +1 -1
  341. package/terminalservice/TerminalService.d.ts +9 -6
  342. package/tieredmenu/TieredMenuSub.vue +7 -4
  343. package/tieredmenu/tieredmenu.cjs.js +7 -4
  344. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  345. package/tieredmenu/tieredmenu.esm.js +7 -4
  346. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  347. package/tieredmenu/tieredmenu.js +7 -4
  348. package/tieredmenu/tieredmenu.min.js +1 -1
  349. package/tree/TreeNode.vue +4 -1
  350. package/tree/tree.cjs.js +4 -1
  351. package/tree/tree.cjs.min.js +1 -1
  352. package/tree/tree.esm.js +4 -1
  353. package/tree/tree.esm.min.js +1 -1
  354. package/tree/tree.js +4 -1
  355. package/tree/tree.min.js +1 -1
  356. package/treeselect/TreeSelect.vue +9 -0
  357. package/treeselect/treeselect.cjs.js +9 -0
  358. package/treeselect/treeselect.cjs.min.js +1 -1
  359. package/treeselect/treeselect.esm.js +9 -0
  360. package/treeselect/treeselect.esm.min.js +1 -1
  361. package/treeselect/treeselect.js +9 -0
  362. package/treeselect/treeselect.min.js +1 -1
  363. package/treetable/TreeTable.d.ts +2 -2
  364. package/treetable/TreeTable.vue +8 -8
  365. package/treetable/treetable.cjs.js +12 -12
  366. package/treetable/treetable.cjs.min.js +1 -1
  367. package/treetable/treetable.esm.js +12 -12
  368. package/treetable/treetable.esm.min.js +1 -1
  369. package/treetable/treetable.js +12 -12
  370. package/treetable/treetable.min.js +1 -1
  371. package/vetur-attributes.json +8 -0
  372. package/vetur-tags.json +3 -1
  373. package/web-types.json +143 -9
package/steps/Steps.vue CHANGED
@@ -7,12 +7,12 @@
7
7
  <router-link :to="item.to" v-if="!isItemDisabled(item)" custom v-slot="{navigate, href, isActive, isExactActive}">
8
8
  <a :href="href" :class="linkClass({isActive, isExactActive})" @click="onItemClick($event, item, navigate)" role="presentation">
9
9
  <span class="p-steps-number">{{index + 1}}</span>
10
- <span class="p-steps-title">{{item.label}}</span>
10
+ <span class="p-steps-title">{{label(item)}}</span>
11
11
  </a>
12
12
  </router-link>
13
13
  <span v-else :class="linkClass()" role="presentation">
14
14
  <span class="p-steps-number">{{index + 1}}</span>
15
- <span class="p-steps-title">{{item.label}}</span>
15
+ <span class="p-steps-title">{{label(item)}}</span>
16
16
  </span>
17
17
  </template>
18
18
  <component v-else :is="$slots.item" :item="item"></component>
@@ -86,6 +86,9 @@ export default {
86
86
  },
87
87
  disabled(item) {
88
88
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
89
+ },
90
+ label(item) {
91
+ return (typeof item.label === 'function' ? item.label() : item.label);
89
92
  }
90
93
  },
91
94
  computed: {
@@ -64,6 +64,9 @@ var script = {
64
64
  },
65
65
  disabled(item) {
66
66
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
67
+ },
68
+ label(item) {
69
+ return (typeof item.label === 'function' ? item.label() : item.label);
67
70
  }
68
71
  },
69
72
  computed: {
@@ -119,7 +122,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
119
122
  role: "presentation"
120
123
  }, [
121
124
  vue.createVNode("span", _hoisted_2, vue.toDisplayString(index + 1), 1),
122
- vue.createVNode("span", _hoisted_3, vue.toDisplayString(item.label), 1)
125
+ vue.createVNode("span", _hoisted_3, vue.toDisplayString($options.label(item)), 1)
123
126
  ], 10, ["href", "onClick"])
124
127
  ]),
125
128
  _: 2
@@ -130,7 +133,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
130
133
  role: "presentation"
131
134
  }, [
132
135
  vue.createVNode("span", _hoisted_4, vue.toDisplayString(index + 1), 1),
133
- vue.createVNode("span", _hoisted_5, vue.toDisplayString(item.label), 1)
136
+ vue.createVNode("span", _hoisted_5, vue.toDisplayString($options.label(item)), 1)
134
137
  ], 2))
135
138
  ], 64))
136
139
  : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.item), {
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/utils"),t=require("vue"),n={name:"Steps",props:{id:{type:String,default:e.UniqueComponentId()},model:{type:Array,default:null},readonly:{type:Boolean,default:!0},exact:{type:Boolean,default:!0}},methods:{onItemClick(e,t,n){this.disabled(t)||this.readonly?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},isActive(e){return this.activeRoute===e.to||this.activeRoute===e.to+"/"},getItemClass(e){return["p-steps-item",e.class,{"p-highlight p-steps-current":this.isActive(e),"p-disabled":this.isItemDisabled(e)}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},isItemDisabled(e){return this.disabled(e)||this.readonly&&!this.isActive(e)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{activeRoute(){return this.$route.path},containerClass(){return["p-steps p-component",{"p-readonly":this.readonly}]}}};const i={role:"tablist"},s={class:"p-steps-number"},l={class:"p-steps-title"},o={class:"p-steps-number"},a={class:"p-steps-title"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-steps {\n position: relative;\n}\n.p-steps ul {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-steps-item {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-steps-item .p-menuitem-link {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n}\n.p-steps.p-steps-readonly .p-steps-item {\n cursor: auto;\n}\n.p-steps-item.p-steps-current .p-menuitem-link {\n cursor: default;\n}\n.p-steps-title {\n white-space: nowrap;\n}\n.p-steps-number {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-steps-title {\n display: block;\n}\n"),n.render=function(e,n,r,c,p,d){const m=t.resolveComponent("router-link");return t.openBlock(),t.createBlock("div",{id:r.id,class:d.containerClass},[t.createVNode("ul",i,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(r.model,((n,i)=>(t.openBlock(),t.createBlock(t.Fragment,{key:n.to},[d.visible(n)?(t.openBlock(),t.createBlock("li",{key:0,class:d.getItemClass(n),style:n.style,role:"tab","aria-selected":d.isActive(n),"aria-expanded":d.isActive(n)},[e.$slots.item?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.item),{key:1,item:n},null,8,["item"])):(t.openBlock(),t.createBlock(t.Fragment,{key:0},[d.isItemDisabled(n)?(t.openBlock(),t.createBlock("span",{key:1,class:d.linkClass(),role:"presentation"},[t.createVNode("span",o,t.toDisplayString(i+1),1),t.createVNode("span",a,t.toDisplayString(n.label),1)],2)):(t.openBlock(),t.createBlock(m,{key:0,to:n.to,custom:""},{default:t.withCtx((({navigate:e,href:o,isActive:a,isExactActive:r})=>[t.createVNode("a",{href:o,class:d.linkClass({isActive:a,isExactActive:r}),onClick:t=>d.onItemClick(t,n,e),role:"presentation"},[t.createVNode("span",s,t.toDisplayString(i+1),1),t.createVNode("span",l,t.toDisplayString(n.label),1)],10,["href","onClick"])])),_:2},1032,["to"]))],64))],14,["aria-selected","aria-expanded"])):t.createCommentVNode("",!0)],64)))),128))])],10,["id"])},module.exports=n;
1
+ "use strict";var e=require("primevue/utils"),t=require("vue"),n={name:"Steps",props:{id:{type:String,default:e.UniqueComponentId()},model:{type:Array,default:null},readonly:{type:Boolean,default:!0},exact:{type:Boolean,default:!0}},methods:{onItemClick(e,t,n){this.disabled(t)||this.readonly?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},isActive(e){return this.activeRoute===e.to||this.activeRoute===e.to+"/"},getItemClass(e){return["p-steps-item",e.class,{"p-highlight p-steps-current":this.isActive(e),"p-disabled":this.isItemDisabled(e)}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},isItemDisabled(e){return this.disabled(e)||this.readonly&&!this.isActive(e)},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},computed:{activeRoute(){return this.$route.path},containerClass(){return["p-steps p-component",{"p-readonly":this.readonly}]}}};const i={role:"tablist"},s={class:"p-steps-number"},l={class:"p-steps-title"},a={class:"p-steps-number"},o={class:"p-steps-title"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-steps {\n position: relative;\n}\n.p-steps ul {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-steps-item {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-steps-item .p-menuitem-link {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n}\n.p-steps.p-steps-readonly .p-steps-item {\n cursor: auto;\n}\n.p-steps-item.p-steps-current .p-menuitem-link {\n cursor: default;\n}\n.p-steps-title {\n white-space: nowrap;\n}\n.p-steps-number {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-steps-title {\n display: block;\n}\n"),n.render=function(e,n,r,c,p,d){const m=t.resolveComponent("router-link");return t.openBlock(),t.createBlock("div",{id:r.id,class:d.containerClass},[t.createVNode("ul",i,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(r.model,((n,i)=>(t.openBlock(),t.createBlock(t.Fragment,{key:n.to},[d.visible(n)?(t.openBlock(),t.createBlock("li",{key:0,class:d.getItemClass(n),style:n.style,role:"tab","aria-selected":d.isActive(n),"aria-expanded":d.isActive(n)},[e.$slots.item?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.item),{key:1,item:n},null,8,["item"])):(t.openBlock(),t.createBlock(t.Fragment,{key:0},[d.isItemDisabled(n)?(t.openBlock(),t.createBlock("span",{key:1,class:d.linkClass(),role:"presentation"},[t.createVNode("span",a,t.toDisplayString(i+1),1),t.createVNode("span",o,t.toDisplayString(d.label(n)),1)],2)):(t.openBlock(),t.createBlock(m,{key:0,to:n.to,custom:""},{default:t.withCtx((({navigate:e,href:a,isActive:o,isExactActive:r})=>[t.createVNode("a",{href:a,class:d.linkClass({isActive:o,isExactActive:r}),onClick:t=>d.onItemClick(t,n,e),role:"presentation"},[t.createVNode("span",s,t.toDisplayString(i+1),1),t.createVNode("span",l,t.toDisplayString(d.label(n)),1)],10,["href","onClick"])])),_:2},1032,["to"]))],64))],14,["aria-selected","aria-expanded"])):t.createCommentVNode("",!0)],64)))),128))])],10,["id"])},module.exports=n;
@@ -62,6 +62,9 @@ var script = {
62
62
  },
63
63
  disabled(item) {
64
64
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
65
+ },
66
+ label(item) {
67
+ return (typeof item.label === 'function' ? item.label() : item.label);
65
68
  }
66
69
  },
67
70
  computed: {
@@ -117,7 +120,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
117
120
  role: "presentation"
118
121
  }, [
119
122
  createVNode("span", _hoisted_2, toDisplayString(index + 1), 1),
120
- createVNode("span", _hoisted_3, toDisplayString(item.label), 1)
123
+ createVNode("span", _hoisted_3, toDisplayString($options.label(item)), 1)
121
124
  ], 10, ["href", "onClick"])
122
125
  ]),
123
126
  _: 2
@@ -128,7 +131,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
128
131
  role: "presentation"
129
132
  }, [
130
133
  createVNode("span", _hoisted_4, toDisplayString(index + 1), 1),
131
- createVNode("span", _hoisted_5, toDisplayString(item.label), 1)
134
+ createVNode("span", _hoisted_5, toDisplayString($options.label(item)), 1)
132
135
  ], 2))
133
136
  ], 64))
134
137
  : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.item), {
@@ -1 +1 @@
1
- import{UniqueComponentId as e}from"primevue/utils";import{resolveComponent as t,openBlock as n,createBlock as i,createVNode as s,Fragment as l,renderList as a,withCtx as o,toDisplayString as p,resolveDynamicComponent as r,createCommentVNode as c}from"vue";var d={name:"Steps",props:{id:{type:String,default:e()},model:{type:Array,default:null},readonly:{type:Boolean,default:!0},exact:{type:Boolean,default:!0}},methods:{onItemClick(e,t,n){this.disabled(t)||this.readonly?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},isActive(e){return this.activeRoute===e.to||this.activeRoute===e.to+"/"},getItemClass(e){return["p-steps-item",e.class,{"p-highlight p-steps-current":this.isActive(e),"p-disabled":this.isItemDisabled(e)}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},isItemDisabled(e){return this.disabled(e)||this.readonly&&!this.isActive(e)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{activeRoute(){return this.$route.path},containerClass(){return["p-steps p-component",{"p-readonly":this.readonly}]}}};const m={role:"tablist"},u={class:"p-steps-number"},b={class:"p-steps-title"},f={class:"p-steps-number"},x={class:"p-steps-title"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-steps {\n position: relative;\n}\n.p-steps ul {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-steps-item {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-steps-item .p-menuitem-link {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n}\n.p-steps.p-steps-readonly .p-steps-item {\n cursor: auto;\n}\n.p-steps-item.p-steps-current .p-menuitem-link {\n cursor: default;\n}\n.p-steps-title {\n white-space: nowrap;\n}\n.p-steps-number {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-steps-title {\n display: block;\n}\n"),d.render=function(e,d,y,k,v,h){const g=t("router-link");return n(),i("div",{id:y.id,class:h.containerClass},[s("ul",m,[(n(!0),i(l,null,a(y.model,((t,a)=>(n(),i(l,{key:t.to},[h.visible(t)?(n(),i("li",{key:0,class:h.getItemClass(t),style:t.style,role:"tab","aria-selected":h.isActive(t),"aria-expanded":h.isActive(t)},[e.$slots.item?(n(),i(r(e.$slots.item),{key:1,item:t},null,8,["item"])):(n(),i(l,{key:0},[h.isItemDisabled(t)?(n(),i("span",{key:1,class:h.linkClass(),role:"presentation"},[s("span",f,p(a+1),1),s("span",x,p(t.label),1)],2)):(n(),i(g,{key:0,to:t.to,custom:""},{default:o((({navigate:e,href:n,isActive:i,isExactActive:l})=>[s("a",{href:n,class:h.linkClass({isActive:i,isExactActive:l}),onClick:n=>h.onItemClick(n,t,e),role:"presentation"},[s("span",u,p(a+1),1),s("span",b,p(t.label),1)],10,["href","onClick"])])),_:2},1032,["to"]))],64))],14,["aria-selected","aria-expanded"])):c("",!0)],64)))),128))])],10,["id"])};export default d;
1
+ import{UniqueComponentId as e}from"primevue/utils";import{resolveComponent as t,openBlock as n,createBlock as i,createVNode as s,Fragment as l,renderList as a,withCtx as o,toDisplayString as p,resolveDynamicComponent as r,createCommentVNode as c}from"vue";var d={name:"Steps",props:{id:{type:String,default:e()},model:{type:Array,default:null},readonly:{type:Boolean,default:!0},exact:{type:Boolean,default:!0}},methods:{onItemClick(e,t,n){this.disabled(t)||this.readonly?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},isActive(e){return this.activeRoute===e.to||this.activeRoute===e.to+"/"},getItemClass(e){return["p-steps-item",e.class,{"p-highlight p-steps-current":this.isActive(e),"p-disabled":this.isItemDisabled(e)}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},isItemDisabled(e){return this.disabled(e)||this.readonly&&!this.isActive(e)},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},computed:{activeRoute(){return this.$route.path},containerClass(){return["p-steps p-component",{"p-readonly":this.readonly}]}}};const m={role:"tablist"},u={class:"p-steps-number"},b={class:"p-steps-title"},f={class:"p-steps-number"},x={class:"p-steps-title"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-steps {\n position: relative;\n}\n.p-steps ul {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-steps-item {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-steps-item .p-menuitem-link {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n}\n.p-steps.p-steps-readonly .p-steps-item {\n cursor: auto;\n}\n.p-steps-item.p-steps-current .p-menuitem-link {\n cursor: default;\n}\n.p-steps-title {\n white-space: nowrap;\n}\n.p-steps-number {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-steps-title {\n display: block;\n}\n"),d.render=function(e,d,y,k,v,h){const g=t("router-link");return n(),i("div",{id:y.id,class:h.containerClass},[s("ul",m,[(n(!0),i(l,null,a(y.model,((t,a)=>(n(),i(l,{key:t.to},[h.visible(t)?(n(),i("li",{key:0,class:h.getItemClass(t),style:t.style,role:"tab","aria-selected":h.isActive(t),"aria-expanded":h.isActive(t)},[e.$slots.item?(n(),i(r(e.$slots.item),{key:1,item:t},null,8,["item"])):(n(),i(l,{key:0},[h.isItemDisabled(t)?(n(),i("span",{key:1,class:h.linkClass(),role:"presentation"},[s("span",f,p(a+1),1),s("span",x,p(h.label(t)),1)],2)):(n(),i(g,{key:0,to:t.to,custom:""},{default:o((({navigate:e,href:n,isActive:i,isExactActive:l})=>[s("a",{href:n,class:h.linkClass({isActive:i,isExactActive:l}),onClick:n=>h.onItemClick(n,t,e),role:"presentation"},[s("span",u,p(a+1),1),s("span",b,p(h.label(t)),1)],10,["href","onClick"])])),_:2},1032,["to"]))],64))],14,["aria-selected","aria-expanded"])):c("",!0)],64)))),128))])],10,["id"])};export default d;
package/steps/steps.js CHANGED
@@ -63,6 +63,9 @@ this.primevue.steps = (function (utils, vue) {
63
63
  },
64
64
  disabled(item) {
65
65
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
66
+ },
67
+ label(item) {
68
+ return (typeof item.label === 'function' ? item.label() : item.label);
66
69
  }
67
70
  },
68
71
  computed: {
@@ -118,7 +121,7 @@ this.primevue.steps = (function (utils, vue) {
118
121
  role: "presentation"
119
122
  }, [
120
123
  vue.createVNode("span", _hoisted_2, vue.toDisplayString(index + 1), 1),
121
- vue.createVNode("span", _hoisted_3, vue.toDisplayString(item.label), 1)
124
+ vue.createVNode("span", _hoisted_3, vue.toDisplayString($options.label(item)), 1)
122
125
  ], 10, ["href", "onClick"])
123
126
  ]),
124
127
  _: 2
@@ -129,7 +132,7 @@ this.primevue.steps = (function (utils, vue) {
129
132
  role: "presentation"
130
133
  }, [
131
134
  vue.createVNode("span", _hoisted_4, vue.toDisplayString(index + 1), 1),
132
- vue.createVNode("span", _hoisted_5, vue.toDisplayString(item.label), 1)
135
+ vue.createVNode("span", _hoisted_5, vue.toDisplayString($options.label(item)), 1)
133
136
  ], 2))
134
137
  ], 64))
135
138
  : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.item), {
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.steps=function(e,t){"use strict";var n={name:"Steps",props:{id:{type:String,default:e.UniqueComponentId()},model:{type:Array,default:null},readonly:{type:Boolean,default:!0},exact:{type:Boolean,default:!0}},methods:{onItemClick(e,t,n){this.disabled(t)||this.readonly?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},isActive(e){return this.activeRoute===e.to||this.activeRoute===e.to+"/"},getItemClass(e){return["p-steps-item",e.class,{"p-highlight p-steps-current":this.isActive(e),"p-disabled":this.isItemDisabled(e)}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},isItemDisabled(e){return this.disabled(e)||this.readonly&&!this.isActive(e)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{activeRoute(){return this.$route.path},containerClass(){return["p-steps p-component",{"p-readonly":this.readonly}]}}};const i={role:"tablist"},s={class:"p-steps-number"},l={class:"p-steps-title"},a={class:"p-steps-number"},o={class:"p-steps-title"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-steps {\n position: relative;\n}\n.p-steps ul {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-steps-item {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-steps-item .p-menuitem-link {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n}\n.p-steps.p-steps-readonly .p-steps-item {\n cursor: auto;\n}\n.p-steps-item.p-steps-current .p-menuitem-link {\n cursor: default;\n}\n.p-steps-title {\n white-space: nowrap;\n}\n.p-steps-number {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-steps-title {\n display: block;\n}\n"),n.render=function(e,n,r,c,p,d){const m=t.resolveComponent("router-link");return t.openBlock(),t.createBlock("div",{id:r.id,class:d.containerClass},[t.createVNode("ul",i,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(r.model,((n,i)=>(t.openBlock(),t.createBlock(t.Fragment,{key:n.to},[d.visible(n)?(t.openBlock(),t.createBlock("li",{key:0,class:d.getItemClass(n),style:n.style,role:"tab","aria-selected":d.isActive(n),"aria-expanded":d.isActive(n)},[e.$slots.item?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.item),{key:1,item:n},null,8,["item"])):(t.openBlock(),t.createBlock(t.Fragment,{key:0},[d.isItemDisabled(n)?(t.openBlock(),t.createBlock("span",{key:1,class:d.linkClass(),role:"presentation"},[t.createVNode("span",a,t.toDisplayString(i+1),1),t.createVNode("span",o,t.toDisplayString(n.label),1)],2)):(t.openBlock(),t.createBlock(m,{key:0,to:n.to,custom:""},{default:t.withCtx((({navigate:e,href:a,isActive:o,isExactActive:r})=>[t.createVNode("a",{href:a,class:d.linkClass({isActive:o,isExactActive:r}),onClick:t=>d.onItemClick(t,n,e),role:"presentation"},[t.createVNode("span",s,t.toDisplayString(i+1),1),t.createVNode("span",l,t.toDisplayString(n.label),1)],10,["href","onClick"])])),_:2},1032,["to"]))],64))],14,["aria-selected","aria-expanded"])):t.createCommentVNode("",!0)],64)))),128))])],10,["id"])},n}(primevue.utils,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.steps=function(e,t){"use strict";var n={name:"Steps",props:{id:{type:String,default:e.UniqueComponentId()},model:{type:Array,default:null},readonly:{type:Boolean,default:!0},exact:{type:Boolean,default:!0}},methods:{onItemClick(e,t,n){this.disabled(t)||this.readonly?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},isActive(e){return this.activeRoute===e.to||this.activeRoute===e.to+"/"},getItemClass(e){return["p-steps-item",e.class,{"p-highlight p-steps-current":this.isActive(e),"p-disabled":this.isItemDisabled(e)}]},linkClass(e){return["p-menuitem-link",{"router-link-active":e&&e.isActive,"router-link-active-exact":this.exact&&e&&e.isExactActive}]},isItemDisabled(e){return this.disabled(e)||this.readonly&&!this.isActive(e)},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},computed:{activeRoute(){return this.$route.path},containerClass(){return["p-steps p-component",{"p-readonly":this.readonly}]}}};const i={role:"tablist"},s={class:"p-steps-number"},l={class:"p-steps-title"},a={class:"p-steps-number"},o={class:"p-steps-title"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-steps {\n position: relative;\n}\n.p-steps ul {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-steps-item {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-steps-item .p-menuitem-link {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n}\n.p-steps.p-steps-readonly .p-steps-item {\n cursor: auto;\n}\n.p-steps-item.p-steps-current .p-menuitem-link {\n cursor: default;\n}\n.p-steps-title {\n white-space: nowrap;\n}\n.p-steps-number {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-steps-title {\n display: block;\n}\n"),n.render=function(e,n,r,c,p,d){const m=t.resolveComponent("router-link");return t.openBlock(),t.createBlock("div",{id:r.id,class:d.containerClass},[t.createVNode("ul",i,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(r.model,((n,i)=>(t.openBlock(),t.createBlock(t.Fragment,{key:n.to},[d.visible(n)?(t.openBlock(),t.createBlock("li",{key:0,class:d.getItemClass(n),style:n.style,role:"tab","aria-selected":d.isActive(n),"aria-expanded":d.isActive(n)},[e.$slots.item?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.item),{key:1,item:n},null,8,["item"])):(t.openBlock(),t.createBlock(t.Fragment,{key:0},[d.isItemDisabled(n)?(t.openBlock(),t.createBlock("span",{key:1,class:d.linkClass(),role:"presentation"},[t.createVNode("span",a,t.toDisplayString(i+1),1),t.createVNode("span",o,t.toDisplayString(d.label(n)),1)],2)):(t.openBlock(),t.createBlock(m,{key:0,to:n.to,custom:""},{default:t.withCtx((({navigate:e,href:a,isActive:o,isExactActive:r})=>[t.createVNode("a",{href:a,class:d.linkClass({isActive:o,isExactActive:r}),onClick:t=>d.onItemClick(t,n,e),role:"presentation"},[t.createVNode("span",s,t.toDisplayString(i+1),1),t.createVNode("span",l,t.toDisplayString(d.label(n)),1)],10,["href","onClick"])])),_:2},1032,["to"]))],64))],14,["aria-selected","aria-expanded"])):t.createCommentVNode("",!0)],64)))),128))])],10,["id"])},n}(primevue.utils,Vue);
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div class="p-tabmenu p-component">
3
3
  <ul ref="nav" class="p-tabmenu-nav p-reset" role="tablist">
4
- <template v-for="(item,i) of model" :key="item.label + '_' + i.toString()">
4
+ <template v-for="(item,i) of model" :key="label(item) + '_' + i.toString()">
5
5
  <router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive, isExactActive}">
6
6
  <li :class="getRouteItemClass(item,isActive,isExactActive)" :style="item.style" v-if="visible(item)" role="tab">
7
7
  <template v-if="!$slots.item">
8
8
  <a :href="href" class="p-menuitem-link" @click="onItemClick($event, item, i, navigate)" role="presentation" v-ripple>
9
9
  <span :class="getItemIcon(item)" v-if="item.icon"></span>
10
- <span class="p-menuitem-text">{{item.label}}</span>
10
+ <span class="p-menuitem-text">{{label(item)}}</span>
11
11
  </a>
12
12
  </template>
13
13
  <component v-else :is="$slots.item" :item="item"></component>
@@ -17,7 +17,7 @@
17
17
  <template v-if="!$slots.item">
18
18
  <a :href="item.url" class="p-menuitem-link" :target="item.target" @click="onItemClick($event, item, i)" role="presentation" :tabindex="disabled(item) ? null : '0'" v-ripple>
19
19
  <span :class="getItemIcon(item)" v-if="item.icon"></span>
20
- <span class="p-menuitem-text">{{item.label}}</span>
20
+ <span class="p-menuitem-text">{{label(item)}}</span>
21
21
  </a>
22
22
  </template>
23
23
  <component v-else :is="$slots.item" :item="item"></component>
@@ -121,6 +121,9 @@ export default {
121
121
  disabled(item) {
122
122
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
123
123
  },
124
+ label(item) {
125
+ return (typeof item.label === 'function' ? item.label() : item.label);
126
+ },
124
127
  updateInkBar() {
125
128
  let tabs = this.$refs.nav.children;
126
129
  let inkHighlighted = false;
@@ -97,6 +97,9 @@ var script = {
97
97
  disabled(item) {
98
98
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
99
99
  },
100
+ label(item) {
101
+ return (typeof item.label === 'function' ? item.label() : item.label);
102
+ },
100
103
  updateInkBar() {
101
104
  let tabs = this.$refs.nav.children;
102
105
  let inkHighlighted = false;
@@ -141,7 +144,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
141
144
  vue.createVNode("ul", _hoisted_2, [
142
145
  (vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
143
146
  return (vue.openBlock(), vue.createBlock(vue.Fragment, {
144
- key: item.label + '_' + i.toString()
147
+ key: $options.label(item) + '_' + i.toString()
145
148
  }, [
146
149
  (item.to && !$options.disabled(item))
147
150
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -171,7 +174,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
171
174
  class: $options.getItemIcon(item)
172
175
  }, null, 2))
173
176
  : vue.createCommentVNode("", true),
174
- vue.createVNode("span", _hoisted_3, vue.toDisplayString(item.label), 1)
177
+ vue.createVNode("span", _hoisted_3, vue.toDisplayString($options.label(item)), 1)
175
178
  ], 8, ["href", "onClick"])), [
176
179
  [_directive_ripple]
177
180
  ])
@@ -206,7 +209,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
206
209
  class: $options.getItemIcon(item)
207
210
  }, null, 2))
208
211
  : vue.createCommentVNode("", true),
209
- vue.createVNode("span", _hoisted_4, vue.toDisplayString(item.label), 1)
212
+ vue.createVNode("span", _hoisted_4, vue.toDisplayString($options.label(item)), 1)
210
213
  ], 8, ["href", "target", "onClick", "tabindex"])), [
211
214
  [_directive_ripple]
212
215
  ])
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),n=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"TabMenu",emits:["update:activeIndex","tab-change"],props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0}},timeout:null,data(){return{d_activeIndex:this.activeIndex}},mounted(){this.updateInkBar()},updated(){this.updateInkBar()},beforeUnmount(){clearTimeout(this.timeout)},watch:{$route(){this.timeout=setTimeout((()=>this.updateInkBar()),50)},activeIndex(e){this.d_activeIndex=e}},methods:{onItemClick(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},getItemClass(e,t){return["p-tabmenuitem",e.class,{"p-highlight":this.d_activeIndex===t,"p-disabled":this.disabled(e)}]},getRouteItemClass(e,t,n){return["p-tabmenuitem",e.class,{"p-highlight":this.exact?n:t,"p-disabled":this.disabled(e)}]},getItemIcon:e=>["p-menuitem-icon",e.icon],visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,updateInkBar(){let t=this.$refs.nav.children,n=!1;for(let i=0;i<t.length;i++){let l=t[i];e.DomHandler.hasClass(l,"p-highlight")&&(this.$refs.inkbar.style.width=e.DomHandler.getWidth(l)+"px",this.$refs.inkbar.style.left=e.DomHandler.getOffset(l).left-e.DomHandler.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")}},directives:{ripple:i(t).default}};const a={class:"p-tabmenu p-component"},o={ref:"nav",class:"p-tabmenu-nav p-reset",role:"tablist"},s={class:"p-menuitem-text"},r={class:"p-menuitem-text"},c={ref:"inkbar",class:"p-tabmenu-ink-bar"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tabmenu {\n overflow-x: auto;\n}\n.p-tabmenu-nav {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.p-tabmenu-nav a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n"),l.render=function(e,t,i,l,d,m){const p=n.resolveComponent("router-link"),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("div",a,[n.createVNode("ul",o,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((t,i)=>(n.openBlock(),n.createBlock(n.Fragment,{key:t.label+"_"+i.toString()},[t.to&&!m.disabled(t)?(n.openBlock(),n.createBlock(p,{key:0,to:t.to,custom:""},{default:n.withCtx((({navigate:l,href:a,isActive:o,isExactActive:r})=>[m.visible(t)?(n.openBlock(),n.createBlock("li",{key:0,class:m.getRouteItemClass(t,o,r),style:t.style,role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:a,class:"p-menuitem-link",onClick:e=>m.onItemClick(e,t,i,l),role:"presentation"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",s,n.toDisplayString(t.label),1)],8,["href","onClick"])),[[u]])],6)):n.createCommentVNode("",!0)])),_:2},1032,["to"])):m.visible(t)?(n.openBlock(),n.createBlock("li",{key:1,class:m.getItemClass(t,i),role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:t.url,class:"p-menuitem-link",target:t.target,onClick:e=>m.onItemClick(e,t,i),role:"presentation",tabindex:m.disabled(t)?null:"0"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",r,n.toDisplayString(t.label),1)],8,["href","target","onClick","tabindex"])),[[u]])],2)):n.createCommentVNode("",!0)],64)))),128)),n.createVNode("li",c,null,512)],512)])},module.exports=l;
1
+ "use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),n=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"TabMenu",emits:["update:activeIndex","tab-change"],props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0}},timeout:null,data(){return{d_activeIndex:this.activeIndex}},mounted(){this.updateInkBar()},updated(){this.updateInkBar()},beforeUnmount(){clearTimeout(this.timeout)},watch:{$route(){this.timeout=setTimeout((()=>this.updateInkBar()),50)},activeIndex(e){this.d_activeIndex=e}},methods:{onItemClick(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},getItemClass(e,t){return["p-tabmenuitem",e.class,{"p-highlight":this.d_activeIndex===t,"p-disabled":this.disabled(e)}]},getRouteItemClass(e,t,n){return["p-tabmenuitem",e.class,{"p-highlight":this.exact?n:t,"p-disabled":this.disabled(e)}]},getItemIcon:e=>["p-menuitem-icon",e.icon],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,updateInkBar(){let t=this.$refs.nav.children,n=!1;for(let i=0;i<t.length;i++){let l=t[i];e.DomHandler.hasClass(l,"p-highlight")&&(this.$refs.inkbar.style.width=e.DomHandler.getWidth(l)+"px",this.$refs.inkbar.style.left=e.DomHandler.getOffset(l).left-e.DomHandler.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")}},directives:{ripple:i(t).default}};const a={class:"p-tabmenu p-component"},o={ref:"nav",class:"p-tabmenu-nav p-reset",role:"tablist"},s={class:"p-menuitem-text"},r={class:"p-menuitem-text"},c={ref:"inkbar",class:"p-tabmenu-ink-bar"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tabmenu {\n overflow-x: auto;\n}\n.p-tabmenu-nav {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.p-tabmenu-nav a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n"),l.render=function(e,t,i,l,d,m){const p=n.resolveComponent("router-link"),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("div",a,[n.createVNode("ul",o,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((t,i)=>(n.openBlock(),n.createBlock(n.Fragment,{key:m.label(t)+"_"+i.toString()},[t.to&&!m.disabled(t)?(n.openBlock(),n.createBlock(p,{key:0,to:t.to,custom:""},{default:n.withCtx((({navigate:l,href:a,isActive:o,isExactActive:r})=>[m.visible(t)?(n.openBlock(),n.createBlock("li",{key:0,class:m.getRouteItemClass(t,o,r),style:t.style,role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:a,class:"p-menuitem-link",onClick:e=>m.onItemClick(e,t,i,l),role:"presentation"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",s,n.toDisplayString(m.label(t)),1)],8,["href","onClick"])),[[u]])],6)):n.createCommentVNode("",!0)])),_:2},1032,["to"])):m.visible(t)?(n.openBlock(),n.createBlock("li",{key:1,class:m.getItemClass(t,i),role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:t.url,class:"p-menuitem-link",target:t.target,onClick:e=>m.onItemClick(e,t,i),role:"presentation",tabindex:m.disabled(t)?null:"0"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",r,n.toDisplayString(m.label(t)),1)],8,["href","target","onClick","tabindex"])),[[u]])],2)):n.createCommentVNode("",!0)],64)))),128)),n.createVNode("li",c,null,512)],512)])},module.exports=l;
@@ -91,6 +91,9 @@ var script = {
91
91
  disabled(item) {
92
92
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
93
93
  },
94
+ label(item) {
95
+ return (typeof item.label === 'function' ? item.label() : item.label);
96
+ },
94
97
  updateInkBar() {
95
98
  let tabs = this.$refs.nav.children;
96
99
  let inkHighlighted = false;
@@ -135,7 +138,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
135
138
  createVNode("ul", _hoisted_2, [
136
139
  (openBlock(true), createBlock(Fragment, null, renderList($props.model, (item, i) => {
137
140
  return (openBlock(), createBlock(Fragment, {
138
- key: item.label + '_' + i.toString()
141
+ key: $options.label(item) + '_' + i.toString()
139
142
  }, [
140
143
  (item.to && !$options.disabled(item))
141
144
  ? (openBlock(), createBlock(_component_router_link, {
@@ -165,7 +168,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
165
168
  class: $options.getItemIcon(item)
166
169
  }, null, 2))
167
170
  : createCommentVNode("", true),
168
- createVNode("span", _hoisted_3, toDisplayString(item.label), 1)
171
+ createVNode("span", _hoisted_3, toDisplayString($options.label(item)), 1)
169
172
  ], 8, ["href", "onClick"])), [
170
173
  [_directive_ripple]
171
174
  ])
@@ -200,7 +203,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
200
203
  class: $options.getItemIcon(item)
201
204
  }, null, 2))
202
205
  : createCommentVNode("", true),
203
- createVNode("span", _hoisted_4, toDisplayString(item.label), 1)
206
+ createVNode("span", _hoisted_4, toDisplayString($options.label(item)), 1)
204
207
  ], 8, ["href", "target", "onClick", "tabindex"])), [
205
208
  [_directive_ripple]
206
209
  ])
@@ -1 +1 @@
1
- import{DomHandler as e}from"primevue/utils";import t from"primevue/ripple";import{resolveComponent as n,resolveDirective as i,openBlock as a,createBlock as s,createVNode as l,Fragment as o,renderList as r,withCtx as d,withDirectives as m,createCommentVNode as p,toDisplayString as u,resolveDynamicComponent as c}from"vue";var b={name:"TabMenu",emits:["update:activeIndex","tab-change"],props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0}},timeout:null,data(){return{d_activeIndex:this.activeIndex}},mounted(){this.updateInkBar()},updated(){this.updateInkBar()},beforeUnmount(){clearTimeout(this.timeout)},watch:{$route(){this.timeout=setTimeout((()=>this.updateInkBar()),50)},activeIndex(e){this.d_activeIndex=e}},methods:{onItemClick(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},getItemClass(e,t){return["p-tabmenuitem",e.class,{"p-highlight":this.d_activeIndex===t,"p-disabled":this.disabled(e)}]},getRouteItemClass(e,t,n){return["p-tabmenuitem",e.class,{"p-highlight":this.exact?n:t,"p-disabled":this.disabled(e)}]},getItemIcon:e=>["p-menuitem-icon",e.icon],visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,updateInkBar(){let t=this.$refs.nav.children,n=!1;for(let i=0;i<t.length;i++){let a=t[i];e.hasClass(a,"p-highlight")&&(this.$refs.inkbar.style.width=e.getWidth(a)+"px",this.$refs.inkbar.style.left=e.getOffset(a).left-e.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")}},directives:{ripple:t}};const h={class:"p-tabmenu p-component"},f={ref:"nav",class:"p-tabmenu-nav p-reset",role:"tablist"},x={class:"p-menuitem-text"},v={class:"p-menuitem-text"},y={ref:"inkbar",class:"p-tabmenu-ink-bar"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-tabmenu {\n overflow-x: auto;\n}\n.p-tabmenu-nav {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.p-tabmenu-nav a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n"),b.render=function(e,t,b,k,g,I){const C=n("router-link"),w=i("ripple");return a(),s("div",h,[l("ul",f,[(a(!0),s(o,null,r(b.model,((t,n)=>(a(),s(o,{key:t.label+"_"+n.toString()},[t.to&&!I.disabled(t)?(a(),s(C,{key:0,to:t.to,custom:""},{default:d((({navigate:i,href:o,isActive:r,isExactActive:d})=>[I.visible(t)?(a(),s("li",{key:0,class:I.getRouteItemClass(t,r,d),style:t.style,role:"tab"},[e.$slots.item?(a(),s(c(e.$slots.item),{key:1,item:t},null,8,["item"])):m((a(),s("a",{key:0,href:o,class:"p-menuitem-link",onClick:e=>I.onItemClick(e,t,n,i),role:"presentation"},[t.icon?(a(),s("span",{key:0,class:I.getItemIcon(t)},null,2)):p("",!0),l("span",x,u(t.label),1)],8,["href","onClick"])),[[w]])],6)):p("",!0)])),_:2},1032,["to"])):I.visible(t)?(a(),s("li",{key:1,class:I.getItemClass(t,n),role:"tab"},[e.$slots.item?(a(),s(c(e.$slots.item),{key:1,item:t},null,8,["item"])):m((a(),s("a",{key:0,href:t.url,class:"p-menuitem-link",target:t.target,onClick:e=>I.onItemClick(e,t,n),role:"presentation",tabindex:I.disabled(t)?null:"0"},[t.icon?(a(),s("span",{key:0,class:I.getItemIcon(t)},null,2)):p("",!0),l("span",v,u(t.label),1)],8,["href","target","onClick","tabindex"])),[[w]])],2)):p("",!0)],64)))),128)),l("li",y,null,512)],512)])};export default b;
1
+ import{DomHandler as e}from"primevue/utils";import t from"primevue/ripple";import{resolveComponent as n,resolveDirective as i,openBlock as l,createBlock as a,createVNode as s,Fragment as o,renderList as r,withCtx as d,withDirectives as m,createCommentVNode as p,toDisplayString as u,resolveDynamicComponent as c}from"vue";var b={name:"TabMenu",emits:["update:activeIndex","tab-change"],props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0}},timeout:null,data(){return{d_activeIndex:this.activeIndex}},mounted(){this.updateInkBar()},updated(){this.updateInkBar()},beforeUnmount(){clearTimeout(this.timeout)},watch:{$route(){this.timeout=setTimeout((()=>this.updateInkBar()),50)},activeIndex(e){this.d_activeIndex=e}},methods:{onItemClick(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},getItemClass(e,t){return["p-tabmenuitem",e.class,{"p-highlight":this.d_activeIndex===t,"p-disabled":this.disabled(e)}]},getRouteItemClass(e,t,n){return["p-tabmenuitem",e.class,{"p-highlight":this.exact?n:t,"p-disabled":this.disabled(e)}]},getItemIcon:e=>["p-menuitem-icon",e.icon],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,updateInkBar(){let t=this.$refs.nav.children,n=!1;for(let i=0;i<t.length;i++){let l=t[i];e.hasClass(l,"p-highlight")&&(this.$refs.inkbar.style.width=e.getWidth(l)+"px",this.$refs.inkbar.style.left=e.getOffset(l).left-e.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")}},directives:{ripple:t}};const h={class:"p-tabmenu p-component"},f={ref:"nav",class:"p-tabmenu-nav p-reset",role:"tablist"},x={class:"p-menuitem-text"},v={class:"p-menuitem-text"},y={ref:"inkbar",class:"p-tabmenu-ink-bar"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tabmenu {\n overflow-x: auto;\n}\n.p-tabmenu-nav {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.p-tabmenu-nav a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n"),b.render=function(e,t,b,k,g,I){const C=n("router-link"),w=i("ripple");return l(),a("div",h,[s("ul",f,[(l(!0),a(o,null,r(b.model,((t,n)=>(l(),a(o,{key:I.label(t)+"_"+n.toString()},[t.to&&!I.disabled(t)?(l(),a(C,{key:0,to:t.to,custom:""},{default:d((({navigate:i,href:o,isActive:r,isExactActive:d})=>[I.visible(t)?(l(),a("li",{key:0,class:I.getRouteItemClass(t,r,d),style:t.style,role:"tab"},[e.$slots.item?(l(),a(c(e.$slots.item),{key:1,item:t},null,8,["item"])):m((l(),a("a",{key:0,href:o,class:"p-menuitem-link",onClick:e=>I.onItemClick(e,t,n,i),role:"presentation"},[t.icon?(l(),a("span",{key:0,class:I.getItemIcon(t)},null,2)):p("",!0),s("span",x,u(I.label(t)),1)],8,["href","onClick"])),[[w]])],6)):p("",!0)])),_:2},1032,["to"])):I.visible(t)?(l(),a("li",{key:1,class:I.getItemClass(t,n),role:"tab"},[e.$slots.item?(l(),a(c(e.$slots.item),{key:1,item:t},null,8,["item"])):m((l(),a("a",{key:0,href:t.url,class:"p-menuitem-link",target:t.target,onClick:e=>I.onItemClick(e,t,n),role:"presentation",tabindex:I.disabled(t)?null:"0"},[t.icon?(l(),a("span",{key:0,class:I.getItemIcon(t)},null,2)):p("",!0),s("span",v,u(I.label(t)),1)],8,["href","target","onClick","tabindex"])),[[w]])],2)):p("",!0)],64)))),128)),s("li",y,null,512)],512)])};export default b;
@@ -95,6 +95,9 @@ this.primevue.tabmenu = (function (utils, Ripple, vue) {
95
95
  disabled(item) {
96
96
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
97
97
  },
98
+ label(item) {
99
+ return (typeof item.label === 'function' ? item.label() : item.label);
100
+ },
98
101
  updateInkBar() {
99
102
  let tabs = this.$refs.nav.children;
100
103
  let inkHighlighted = false;
@@ -139,7 +142,7 @@ this.primevue.tabmenu = (function (utils, Ripple, vue) {
139
142
  vue.createVNode("ul", _hoisted_2, [
140
143
  (vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
141
144
  return (vue.openBlock(), vue.createBlock(vue.Fragment, {
142
- key: item.label + '_' + i.toString()
145
+ key: $options.label(item) + '_' + i.toString()
143
146
  }, [
144
147
  (item.to && !$options.disabled(item))
145
148
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -169,7 +172,7 @@ this.primevue.tabmenu = (function (utils, Ripple, vue) {
169
172
  class: $options.getItemIcon(item)
170
173
  }, null, 2))
171
174
  : vue.createCommentVNode("", true),
172
- vue.createVNode("span", _hoisted_3, vue.toDisplayString(item.label), 1)
175
+ vue.createVNode("span", _hoisted_3, vue.toDisplayString($options.label(item)), 1)
173
176
  ], 8, ["href", "onClick"])), [
174
177
  [_directive_ripple]
175
178
  ])
@@ -204,7 +207,7 @@ this.primevue.tabmenu = (function (utils, Ripple, vue) {
204
207
  class: $options.getItemIcon(item)
205
208
  }, null, 2))
206
209
  : vue.createCommentVNode("", true),
207
- vue.createVNode("span", _hoisted_4, vue.toDisplayString(item.label), 1)
210
+ vue.createVNode("span", _hoisted_4, vue.toDisplayString($options.label(item)), 1)
208
211
  ], 8, ["href", "target", "onClick", "tabindex"])), [
209
212
  [_directive_ripple]
210
213
  ])
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.tabmenu=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a={name:"TabMenu",emits:["update:activeIndex","tab-change"],props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0}},timeout:null,data(){return{d_activeIndex:this.activeIndex}},mounted(){this.updateInkBar()},updated(){this.updateInkBar()},beforeUnmount(){clearTimeout(this.timeout)},watch:{$route(){this.timeout=setTimeout((()=>this.updateInkBar()),50)},activeIndex(e){this.d_activeIndex=e}},methods:{onItemClick(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},getItemClass(e,t){return["p-tabmenuitem",e.class,{"p-highlight":this.d_activeIndex===t,"p-disabled":this.disabled(e)}]},getRouteItemClass(e,t,n){return["p-tabmenuitem",e.class,{"p-highlight":this.exact?n:t,"p-disabled":this.disabled(e)}]},getItemIcon:e=>["p-menuitem-icon",e.icon],visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,updateInkBar(){let t=this.$refs.nav.children,n=!1;for(let i=0;i<t.length;i++){let a=t[i];e.DomHandler.hasClass(a,"p-highlight")&&(this.$refs.inkbar.style.width=e.DomHandler.getWidth(a)+"px",this.$refs.inkbar.style.left=e.DomHandler.getOffset(a).left-e.DomHandler.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")}},directives:{ripple:i(t).default}};const l={class:"p-tabmenu p-component"},o={ref:"nav",class:"p-tabmenu-nav p-reset",role:"tablist"},s={class:"p-menuitem-text"},r={class:"p-menuitem-text"},c={ref:"inkbar",class:"p-tabmenu-ink-bar"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-tabmenu {\n overflow-x: auto;\n}\n.p-tabmenu-nav {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.p-tabmenu-nav a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n"),a.render=function(e,t,i,a,d,m){const p=n.resolveComponent("router-link"),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("div",l,[n.createVNode("ul",o,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((t,i)=>(n.openBlock(),n.createBlock(n.Fragment,{key:t.label+"_"+i.toString()},[t.to&&!m.disabled(t)?(n.openBlock(),n.createBlock(p,{key:0,to:t.to,custom:""},{default:n.withCtx((({navigate:a,href:l,isActive:o,isExactActive:r})=>[m.visible(t)?(n.openBlock(),n.createBlock("li",{key:0,class:m.getRouteItemClass(t,o,r),style:t.style,role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:l,class:"p-menuitem-link",onClick:e=>m.onItemClick(e,t,i,a),role:"presentation"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",s,n.toDisplayString(t.label),1)],8,["href","onClick"])),[[u]])],6)):n.createCommentVNode("",!0)])),_:2},1032,["to"])):m.visible(t)?(n.openBlock(),n.createBlock("li",{key:1,class:m.getItemClass(t,i),role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:t.url,class:"p-menuitem-link",target:t.target,onClick:e=>m.onItemClick(e,t,i),role:"presentation",tabindex:m.disabled(t)?null:"0"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",r,n.toDisplayString(t.label),1)],8,["href","target","onClick","tabindex"])),[[u]])],2)):n.createCommentVNode("",!0)],64)))),128)),n.createVNode("li",c,null,512)],512)])},a}(primevue.utils,primevue.ripple,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.tabmenu=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"TabMenu",emits:["update:activeIndex","tab-change"],props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0}},timeout:null,data(){return{d_activeIndex:this.activeIndex}},mounted(){this.updateInkBar()},updated(){this.updateInkBar()},beforeUnmount(){clearTimeout(this.timeout)},watch:{$route(){this.timeout=setTimeout((()=>this.updateInkBar()),50)},activeIndex(e){this.d_activeIndex=e}},methods:{onItemClick(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},getItemClass(e,t){return["p-tabmenuitem",e.class,{"p-highlight":this.d_activeIndex===t,"p-disabled":this.disabled(e)}]},getRouteItemClass(e,t,n){return["p-tabmenuitem",e.class,{"p-highlight":this.exact?n:t,"p-disabled":this.disabled(e)}]},getItemIcon:e=>["p-menuitem-icon",e.icon],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,updateInkBar(){let t=this.$refs.nav.children,n=!1;for(let i=0;i<t.length;i++){let l=t[i];e.DomHandler.hasClass(l,"p-highlight")&&(this.$refs.inkbar.style.width=e.DomHandler.getWidth(l)+"px",this.$refs.inkbar.style.left=e.DomHandler.getOffset(l).left-e.DomHandler.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")}},directives:{ripple:i(t).default}};const a={class:"p-tabmenu p-component"},o={ref:"nav",class:"p-tabmenu-nav p-reset",role:"tablist"},s={class:"p-menuitem-text"},r={class:"p-menuitem-text"},c={ref:"inkbar",class:"p-tabmenu-ink-bar"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tabmenu {\n overflow-x: auto;\n}\n.p-tabmenu-nav {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.p-tabmenu-nav a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n"),l.render=function(e,t,i,l,d,m){const p=n.resolveComponent("router-link"),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("div",a,[n.createVNode("ul",o,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((t,i)=>(n.openBlock(),n.createBlock(n.Fragment,{key:m.label(t)+"_"+i.toString()},[t.to&&!m.disabled(t)?(n.openBlock(),n.createBlock(p,{key:0,to:t.to,custom:""},{default:n.withCtx((({navigate:l,href:a,isActive:o,isExactActive:r})=>[m.visible(t)?(n.openBlock(),n.createBlock("li",{key:0,class:m.getRouteItemClass(t,o,r),style:t.style,role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:a,class:"p-menuitem-link",onClick:e=>m.onItemClick(e,t,i,l),role:"presentation"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",s,n.toDisplayString(m.label(t)),1)],8,["href","onClick"])),[[u]])],6)):n.createCommentVNode("",!0)])),_:2},1032,["to"])):m.visible(t)?(n.openBlock(),n.createBlock("li",{key:1,class:m.getItemClass(t,i),role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:t.url,class:"p-menuitem-link",target:t.target,onClick:e=>m.onItemClick(e,t,i),role:"presentation",tabindex:m.disabled(t)?null:"0"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:m.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",r,n.toDisplayString(m.label(t)),1)],8,["href","target","onClick","tabindex"])),[[u]])],2)):n.createCommentVNode("",!0)],64)))),128)),n.createVNode("li",c,null,512)],512)])},l}(primevue.utils,primevue.ripple,Vue);
@@ -1,8 +1,11 @@
1
- declare class TerminalService {
2
- $on(action: string, fn: any): any;
3
- $emit(action: string, params?: any): any;
4
- $off(action: string, id: number): void;
5
- $subscribed(action: string): boolean;
1
+ type TerminalServiceActionType = 'command' | 'response';
2
+
3
+ export interface TerminalServiceOptions {
4
+ on(action: TerminalServiceActionType, fn: any): void;
5
+ emit(action: TerminalServiceActionType, params?: any): void;
6
+ off(action: TerminalServiceActionType, fn: any): void;
6
7
  }
7
8
 
8
- export default TerminalService;
9
+ declare const TerminalService: TerminalServiceOptions;
10
+
11
+ export default TerminalService;
@@ -1,24 +1,24 @@
1
1
  <template>
2
2
  <ul ref="element" :class="containerClass" role="'menubar' : 'menu'" aria-orientation="horizontal">
3
- <template v-for="(item, i) of model" :key="item.label + i.toString()">
3
+ <template v-for="(item, i) of model" :key="label(item) + i.toString()">
4
4
  <li :class="getItemClass(item)" :style="item.style" v-if="visible(item) && !item.separator"
5
5
  @mouseenter="onItemMouseEnter($event, item)" role="none">
6
6
  <template v-if="!template">
7
7
  <router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive, isExactActive}">
8
8
  <a :href="href" @click="onItemClick($event, item, navigate)" :class="linkClass(item, {isActive, isExactActive})" v-ripple @keydown="onItemKeyDown($event, item)" role="menuitem">
9
9
  <span :class="['p-menuitem-icon', item.icon]"></span>
10
- <span class="p-menuitem-text">{{item.label}}</span>
10
+ <span class="p-menuitem-text">{{label(item)}}</span>
11
11
  </a>
12
12
  </router-link>
13
13
  <a v-else :href="item.url" :class="linkClass(item)" :target="item.target" :aria-haspopup="item.items != null" :aria-expanded="item === activeItem"
14
14
  @click="onItemClick($event, item)" @keydown="onItemKeyDown($event, item)" role="menuitem" :tabindex="disabled(item) ? null : '0'" v-ripple>
15
15
  <span :class="['p-menuitem-icon', item.icon]"></span>
16
- <span class="p-menuitem-text">{{item.label}}</span>
16
+ <span class="p-menuitem-text">{{label(item)}}</span>
17
17
  <span class="p-submenu-icon pi pi-angle-right" v-if="item.items"></span>
18
18
  </a>
19
19
  </template>
20
20
  <component v-else :is="template" :item="item"></component>
21
- <TieredMenuSub :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'" :template="template"
21
+ <TieredMenuSub :model="item.items" v-if="visible(item) && item.items" :key="label(item) + '_sub_'" :template="template"
22
22
  @leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" :exact="exact" />
23
23
  </li>
24
24
  <li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i.toString()" role="separator"></li>
@@ -234,6 +234,9 @@ export default {
234
234
  },
235
235
  disabled(item) {
236
236
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
237
+ },
238
+ label(item) {
239
+ return (typeof item.label === 'function' ? item.label() : item.label);
237
240
  }
238
241
  },
239
242
  computed: {
@@ -211,6 +211,9 @@ var script$1 = {
211
211
  },
212
212
  disabled(item) {
213
213
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
214
+ },
215
+ label(item) {
216
+ return (typeof item.label === 'function' ? item.label() : item.label);
214
217
  }
215
218
  },
216
219
  computed: {
@@ -243,7 +246,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
243
246
  }, [
244
247
  (vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
245
248
  return (vue.openBlock(), vue.createBlock(vue.Fragment, {
246
- key: item.label + i.toString()
249
+ key: $options.label(item) + i.toString()
247
250
  }, [
248
251
  ($options.visible(item) && !item.separator)
249
252
  ? (vue.openBlock(), vue.createBlock("li", {
@@ -272,7 +275,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
272
275
  vue.createVNode("span", {
273
276
  class: ['p-menuitem-icon', item.icon]
274
277
  }, null, 2),
275
- vue.createVNode("span", _hoisted_1, vue.toDisplayString(item.label), 1)
278
+ vue.createVNode("span", _hoisted_1, vue.toDisplayString($options.label(item)), 1)
276
279
  ], 42, ["href", "onClick", "onKeydown"]), [
277
280
  [_directive_ripple]
278
281
  ])
@@ -294,7 +297,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
294
297
  vue.createVNode("span", {
295
298
  class: ['p-menuitem-icon', item.icon]
296
299
  }, null, 2),
297
- vue.createVNode("span", _hoisted_2, vue.toDisplayString(item.label), 1),
300
+ vue.createVNode("span", _hoisted_2, vue.toDisplayString($options.label(item)), 1),
298
301
  (item.items)
299
302
  ? (vue.openBlock(), vue.createBlock("span", _hoisted_3))
300
303
  : vue.createCommentVNode("", true)
@@ -309,7 +312,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
309
312
  ($options.visible(item) && item.items)
310
313
  ? (vue.openBlock(), vue.createBlock(_component_TieredMenuSub, {
311
314
  model: item.items,
312
- key: item.label + '_sub_',
315
+ key: $options.label(item) + '_sub_',
313
316
  template: $props.template,
314
317
  onLeafClick: $options.onLeafClick,
315
318
  onKeydownItem: $options.onChildItemKeyDown,
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/utils"),t=require("primevue/overlayeventbus"),i=require("primevue/ripple"),n=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),o={name:"TieredMenuSub",emits:["leaf-click","keydown-item"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&i&&i(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let i=e.currentTarget.parentElement;switch(e.which){case 40:var n=this.findNextItem(i);n&&n.children[0].focus(),e.preventDefault();break;case 38:var l=this.findPrevItem(i);l&&l.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.activeItem=t,setTimeout((()=>{i.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:i})},onChildItemKeyDown(e){37===e.originalEvent.which&&(this.activeItem=null,e.element.parentElement.previousElementSibling.focus())},findNextItem(t){let i=t.nextElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findNextItem(i):i:null},findPrevItem(t){let i=t.previousElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findPrevItem(i):i:null},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{containerClass(){return{"p-submenu-list":!this.root}}},directives:{ripple:l(i).default}};const r={class:"p-menuitem-text"},a={class:"p-menuitem-text"},c={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,l,s,o){const d=n.resolveComponent("router-link"),u=n.resolveComponent("TieredMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{ref:"element",class:o.containerClass,role:"'menubar' : 'menu'","aria-orientation":"horizontal"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:e.label+t.toString()},[o.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,class:o.getItemClass(e),style:e.style,onMouseenter:t=>o.onItemMouseEnter(t,e),role:"none"},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!o.disabled(e)?(n.openBlock(),n.createBlock(d,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:i=>o.onItemClick(i,e,t),class:o.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",r,n.toDisplayString(e.label),1)],42,["href","onClick","onKeydown"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:o.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===s.activeItem,onClick:t=>o.onItemClick(t,e),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem",tabindex:o.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",a,n.toDisplayString(e.label),1),e.items?(n.openBlock(),n.createBlock("span",c)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[m]])],64)),o.visible(e)&&e.items?(n.openBlock(),n.createBlock(u,{model:e.items,key:e.label+"_sub_",template:i.template,onLeafClick:o.onLeafClick,onKeydownItem:o.onChildItemKeyDown,parentActive:e===s.activeItem,exact:i.exact},null,8,["model","template","onLeafClick","onKeydownItem","parentActive","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),o.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],2)};var d={name:"TieredMenu",inheritAttrs:!1,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}},target:null,container:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;t.command&&(t.command(e),e.originalEvent.preventDefault()),this.hide()},toggle(e){this.visible?this.hide():this.show(e)},show(e){this.visible=!0,this.target=e.currentTarget},hide(){this.visible=!1},onEnter(t){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=e.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===event.target||this.target.contains(event.target))},onLeafClick(){this.popup&&this.hide()},containerRef(e){this.container=e},onOverlayClick(e){s.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-tieredmenu p-component",{"p-tieredmenu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{TieredMenuSub:o}};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===i&&n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tieredmenu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-tieredmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-tieredmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-tieredmenu .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-tieredmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-tieredmenu .p-menuitem {\n position: relative;\n}\n.p-tieredmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-tieredmenu .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n"),d.render=function(e,t,i,l,s,o){const r=n.resolveComponent("TieredMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo,disabled:!i.popup},[n.createVNode(n.Transition,{name:"p-connected-overlay",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:n.withCtx((()=>[!i.popup||s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:o.containerRef,class:o.containerClass},e.$attrs,{onClick:t[1]||(t[1]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[n.createVNode(r,{model:i.model,root:!0,popup:i.popup,onLeafClick:o.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","popup","onLeafClick","template","exact"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"])},module.exports=d;
1
+ "use strict";var e=require("primevue/utils"),t=require("primevue/overlayeventbus"),i=require("primevue/ripple"),n=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),o={name:"TieredMenuSub",emits:["leaf-click","keydown-item"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&i&&i(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let i=e.currentTarget.parentElement;switch(e.which){case 40:var n=this.findNextItem(i);n&&n.children[0].focus(),e.preventDefault();break;case 38:var l=this.findPrevItem(i);l&&l.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.activeItem=t,setTimeout((()=>{i.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:i})},onChildItemKeyDown(e){37===e.originalEvent.which&&(this.activeItem=null,e.element.parentElement.previousElementSibling.focus())},findNextItem(t){let i=t.nextElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findNextItem(i):i:null},findPrevItem(t){let i=t.previousElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findPrevItem(i):i:null},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=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},computed:{containerClass(){return{"p-submenu-list":!this.root}}},directives:{ripple:l(i).default}};const r={class:"p-menuitem-text"},a={class:"p-menuitem-text"},c={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,l,s,o){const d=n.resolveComponent("router-link"),u=n.resolveComponent("TieredMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{ref:"element",class:o.containerClass,role:"'menubar' : 'menu'","aria-orientation":"horizontal"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:o.label(e)+t.toString()},[o.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,class:o.getItemClass(e),style:e.style,onMouseenter:t=>o.onItemMouseEnter(t,e),role:"none"},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!o.disabled(e)?(n.openBlock(),n.createBlock(d,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:i=>o.onItemClick(i,e,t),class:o.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",r,n.toDisplayString(o.label(e)),1)],42,["href","onClick","onKeydown"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:o.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===s.activeItem,onClick:t=>o.onItemClick(t,e),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem",tabindex:o.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",a,n.toDisplayString(o.label(e)),1),e.items?(n.openBlock(),n.createBlock("span",c)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[m]])],64)),o.visible(e)&&e.items?(n.openBlock(),n.createBlock(u,{model:e.items,key:o.label(e)+"_sub_",template:i.template,onLeafClick:o.onLeafClick,onKeydownItem:o.onChildItemKeyDown,parentActive:e===s.activeItem,exact:i.exact},null,8,["model","template","onLeafClick","onKeydownItem","parentActive","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),o.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],2)};var d={name:"TieredMenu",inheritAttrs:!1,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}},target:null,container:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;t.command&&(t.command(e),e.originalEvent.preventDefault()),this.hide()},toggle(e){this.visible?this.hide():this.show(e)},show(e){this.visible=!0,this.target=e.currentTarget},hide(){this.visible=!1},onEnter(t){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=e.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===event.target||this.target.contains(event.target))},onLeafClick(){this.popup&&this.hide()},containerRef(e){this.container=e},onOverlayClick(e){s.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-tieredmenu p-component",{"p-tieredmenu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{TieredMenuSub:o}};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===i&&n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tieredmenu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-tieredmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-tieredmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-tieredmenu .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-tieredmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-tieredmenu .p-menuitem {\n position: relative;\n}\n.p-tieredmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-tieredmenu .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n"),d.render=function(e,t,i,l,s,o){const r=n.resolveComponent("TieredMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo,disabled:!i.popup},[n.createVNode(n.Transition,{name:"p-connected-overlay",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:n.withCtx((()=>[!i.popup||s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:o.containerRef,class:o.containerClass},e.$attrs,{onClick:t[1]||(t[1]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[n.createVNode(r,{model:i.model,root:!0,popup:i.popup,onLeafClick:o.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","popup","onLeafClick","template","exact"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"])},module.exports=d;