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
@@ -100,6 +100,12 @@ var script = {
100
100
  },
101
101
  rejectClass() {
102
102
  return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
103
+ },
104
+ autoFocusAccept() {
105
+ return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
106
+ },
107
+ autoFocusReject() {
108
+ return this.confirmation.defaultFocus === 'reject' ? true : false;
103
109
  }
104
110
  },
105
111
  components: {
@@ -129,15 +135,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
129
135
  label: $options.rejectLabel,
130
136
  icon: $options.rejectIcon,
131
137
  class: $options.rejectClass,
132
- onClick: _cache[1] || (_cache[1] = $event => ($options.reject()))
133
- }, null, 8, ["label", "icon", "class"]),
138
+ onClick: _cache[1] || (_cache[1] = $event => ($options.reject())),
139
+ autofocus: $options.autoFocusReject
140
+ }, null, 8, ["label", "icon", "class", "autofocus"]),
134
141
  vue.createVNode(_component_CDButton, {
135
142
  label: $options.acceptLabel,
136
143
  icon: $options.acceptIcon,
137
144
  class: $options.acceptClass,
138
145
  onClick: _cache[2] || (_cache[2] = $event => ($options.accept())),
139
- autofocus: ""
140
- }, null, 8, ["label", "icon", "class"])
146
+ autofocus: $options.autoFocusAccept
147
+ }, null, 8, ["label", "icon", "class", "autofocus"])
141
148
  ]),
142
149
  default: vue.withCtx(() => [
143
150
  vue.createVNode("i", { class: $options.iconClass }, null, 2),
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/confirmationeventbus"),i=require("primevue/dialog"),t=require("primevue/button"),o=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=n(e),r=n(i),l=n(t),s={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},c.default.on("confirm",this.confirmListener),c.default.on("close",this.closeListener)},beforeUnmount(){c.default.off("confirm",this.confirmListener),c.default.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CDialog:r.default,CDButton:l.default}};const a={class:"p-confirm-dialog-message"};s.render=function(e,i,t,n,c,r){const l=o.resolveComponent("CDButton"),s=o.resolveComponent("CDialog");return o.openBlock(),o.createBlock(s,{visible:c.visible,"onUpdate:visible":i[3]||(i[3]=e=>c.visible=e),modal:!0,header:r.header,blockScroll:r.blockScroll,position:r.position,class:"p-confirm-dialog",breakpoints:t.breakpoints},{footer:o.withCtx((()=>[o.createVNode(l,{label:r.rejectLabel,icon:r.rejectIcon,class:r.rejectClass,onClick:i[1]||(i[1]=e=>r.reject())},null,8,["label","icon","class"]),o.createVNode(l,{label:r.acceptLabel,icon:r.acceptIcon,class:r.acceptClass,onClick:i[2]||(i[2]=e=>r.accept()),autofocus:""},null,8,["label","icon","class"])])),default:o.withCtx((()=>[o.createVNode("i",{class:r.iconClass},null,2),o.createVNode("span",a,o.toDisplayString(r.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])},module.exports=s;
1
+ "use strict";var t=require("primevue/confirmationeventbus"),e=require("primevue/dialog"),i=require("primevue/button"),o=require("vue");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=n(t),r=n(e),s=n(i),a={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=t=>{t&&t.group===this.group&&(this.confirmation=t,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},c.default.on("confirm",this.confirmListener),c.default.on("close",this.closeListener)},beforeUnmount(){c.default.off("confirm",this.confirmListener),c.default.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]},autoFocusAccept(){return void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus},autoFocusReject(){return"reject"===this.confirmation.defaultFocus}},components:{CDialog:r.default,CDButton:s.default}};const l={class:"p-confirm-dialog-message"};a.render=function(t,e,i,n,c,r){const s=o.resolveComponent("CDButton"),a=o.resolveComponent("CDialog");return o.openBlock(),o.createBlock(a,{visible:c.visible,"onUpdate:visible":e[3]||(e[3]=t=>c.visible=t),modal:!0,header:r.header,blockScroll:r.blockScroll,position:r.position,class:"p-confirm-dialog",breakpoints:i.breakpoints},{footer:o.withCtx((()=>[o.createVNode(s,{label:r.rejectLabel,icon:r.rejectIcon,class:r.rejectClass,onClick:e[1]||(e[1]=t=>r.reject()),autofocus:r.autoFocusReject},null,8,["label","icon","class","autofocus"]),o.createVNode(s,{label:r.acceptLabel,icon:r.acceptIcon,class:r.acceptClass,onClick:e[2]||(e[2]=t=>r.accept()),autofocus:r.autoFocusAccept},null,8,["label","icon","class","autofocus"])])),default:o.withCtx((()=>[o.createVNode("i",{class:r.iconClass},null,2),o.createVNode("span",l,o.toDisplayString(r.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])},module.exports=a;
@@ -92,6 +92,12 @@ var script = {
92
92
  },
93
93
  rejectClass() {
94
94
  return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
95
+ },
96
+ autoFocusAccept() {
97
+ return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
98
+ },
99
+ autoFocusReject() {
100
+ return this.confirmation.defaultFocus === 'reject' ? true : false;
95
101
  }
96
102
  },
97
103
  components: {
@@ -121,15 +127,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
121
127
  label: $options.rejectLabel,
122
128
  icon: $options.rejectIcon,
123
129
  class: $options.rejectClass,
124
- onClick: _cache[1] || (_cache[1] = $event => ($options.reject()))
125
- }, null, 8, ["label", "icon", "class"]),
130
+ onClick: _cache[1] || (_cache[1] = $event => ($options.reject())),
131
+ autofocus: $options.autoFocusReject
132
+ }, null, 8, ["label", "icon", "class", "autofocus"]),
126
133
  createVNode(_component_CDButton, {
127
134
  label: $options.acceptLabel,
128
135
  icon: $options.acceptIcon,
129
136
  class: $options.acceptClass,
130
137
  onClick: _cache[2] || (_cache[2] = $event => ($options.accept())),
131
- autofocus: ""
132
- }, null, 8, ["label", "icon", "class"])
138
+ autofocus: $options.autoFocusAccept
139
+ }, null, 8, ["label", "icon", "class", "autofocus"])
133
140
  ]),
134
141
  default: withCtx(() => [
135
142
  createVNode("i", { class: $options.iconClass }, null, 2),
@@ -1 +1 @@
1
- import i from"primevue/confirmationeventbus";import o from"primevue/dialog";import t from"primevue/button";import{resolveComponent as n,openBlock as e,createBlock as c,withCtx as r,createVNode as s,toDisplayString as l}from"vue";var a={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=i=>{i&&i.group===this.group&&(this.confirmation=i,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},i.on("confirm",this.confirmListener),i.on("close",this.closeListener)},beforeUnmount(){i.off("confirm",this.confirmListener),i.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CDialog:o,CDButton:t}};const m={class:"p-confirm-dialog-message"};a.render=function(i,o,t,a,f,u){const p=n("CDButton"),h=n("CDialog");return e(),c(h,{visible:f.visible,"onUpdate:visible":o[3]||(o[3]=i=>f.visible=i),modal:!0,header:u.header,blockScroll:u.blockScroll,position:u.position,class:"p-confirm-dialog",breakpoints:t.breakpoints},{footer:r((()=>[s(p,{label:u.rejectLabel,icon:u.rejectIcon,class:u.rejectClass,onClick:o[1]||(o[1]=i=>u.reject())},null,8,["label","icon","class"]),s(p,{label:u.acceptLabel,icon:u.acceptIcon,class:u.acceptClass,onClick:o[2]||(o[2]=i=>u.accept()),autofocus:""},null,8,["label","icon","class"])])),default:r((()=>[s("i",{class:u.iconClass},null,2),s("span",m,l(u.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])};export default a;
1
+ import i from"primevue/confirmationeventbus";import o from"primevue/dialog";import t from"primevue/button";import{resolveComponent as e,openBlock as n,createBlock as c,withCtx as r,createVNode as s,toDisplayString as a}from"vue";var l={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=i=>{i&&i.group===this.group&&(this.confirmation=i,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},i.on("confirm",this.confirmListener),i.on("close",this.closeListener)},beforeUnmount(){i.off("confirm",this.confirmListener),i.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]},autoFocusAccept(){return void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus},autoFocusReject(){return"reject"===this.confirmation.defaultFocus}},components:{CDialog:o,CDButton:t}};const u={class:"p-confirm-dialog-message"};l.render=function(i,o,t,l,m,f){const p=e("CDButton"),h=e("CDialog");return n(),c(h,{visible:m.visible,"onUpdate:visible":o[3]||(o[3]=i=>m.visible=i),modal:!0,header:f.header,blockScroll:f.blockScroll,position:f.position,class:"p-confirm-dialog",breakpoints:t.breakpoints},{footer:r((()=>[s(p,{label:f.rejectLabel,icon:f.rejectIcon,class:f.rejectClass,onClick:o[1]||(o[1]=i=>f.reject()),autofocus:f.autoFocusReject},null,8,["label","icon","class","autofocus"]),s(p,{label:f.acceptLabel,icon:f.acceptIcon,class:f.acceptClass,onClick:o[2]||(o[2]=i=>f.accept()),autofocus:f.autoFocusAccept},null,8,["label","icon","class","autofocus"])])),default:r((()=>[s("i",{class:f.iconClass},null,2),s("span",u,a(f.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])};export default l;
@@ -97,6 +97,12 @@ this.primevue.confirmdialog = (function (ConfirmationEventBus, Dialog, Button, v
97
97
  },
98
98
  rejectClass() {
99
99
  return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
100
+ },
101
+ autoFocusAccept() {
102
+ return (this.confirmation.defaultFocus === undefined || this.confirmation.defaultFocus === 'accept') ? true : false;
103
+ },
104
+ autoFocusReject() {
105
+ return this.confirmation.defaultFocus === 'reject' ? true : false;
100
106
  }
101
107
  },
102
108
  components: {
@@ -126,15 +132,16 @@ this.primevue.confirmdialog = (function (ConfirmationEventBus, Dialog, Button, v
126
132
  label: $options.rejectLabel,
127
133
  icon: $options.rejectIcon,
128
134
  class: $options.rejectClass,
129
- onClick: _cache[1] || (_cache[1] = $event => ($options.reject()))
130
- }, null, 8, ["label", "icon", "class"]),
135
+ onClick: _cache[1] || (_cache[1] = $event => ($options.reject())),
136
+ autofocus: $options.autoFocusReject
137
+ }, null, 8, ["label", "icon", "class", "autofocus"]),
131
138
  vue.createVNode(_component_CDButton, {
132
139
  label: $options.acceptLabel,
133
140
  icon: $options.acceptIcon,
134
141
  class: $options.acceptClass,
135
142
  onClick: _cache[2] || (_cache[2] = $event => ($options.accept())),
136
- autofocus: ""
137
- }, null, 8, ["label", "icon", "class"])
143
+ autofocus: $options.autoFocusAccept
144
+ }, null, 8, ["label", "icon", "class", "autofocus"])
138
145
  ]),
139
146
  default: vue.withCtx(() => [
140
147
  vue.createVNode("i", { class: $options.iconClass }, null, 2),
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.confirmdialog=function(i,e,t,o){"use strict";function n(i){return i&&"object"==typeof i&&"default"in i?i:{default:i}}var c=n(i),r=n(e),l=n(t),s={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=i=>{i&&i.group===this.group&&(this.confirmation=i,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},c.default.on("confirm",this.confirmListener),c.default.on("close",this.closeListener)},beforeUnmount(){c.default.off("confirm",this.confirmListener),c.default.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CDialog:r.default,CDButton:l.default}};const a={class:"p-confirm-dialog-message"};return s.render=function(i,e,t,n,c,r){const l=o.resolveComponent("CDButton"),s=o.resolveComponent("CDialog");return o.openBlock(),o.createBlock(s,{visible:c.visible,"onUpdate:visible":e[3]||(e[3]=i=>c.visible=i),modal:!0,header:r.header,blockScroll:r.blockScroll,position:r.position,class:"p-confirm-dialog",breakpoints:t.breakpoints},{footer:o.withCtx((()=>[o.createVNode(l,{label:r.rejectLabel,icon:r.rejectIcon,class:r.rejectClass,onClick:e[1]||(e[1]=i=>r.reject())},null,8,["label","icon","class"]),o.createVNode(l,{label:r.acceptLabel,icon:r.acceptIcon,class:r.acceptClass,onClick:e[2]||(e[2]=i=>r.accept()),autofocus:""},null,8,["label","icon","class"])])),default:o.withCtx((()=>[o.createVNode("i",{class:r.iconClass},null,2),o.createVNode("span",a,o.toDisplayString(r.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])},s}(primevue.confirmationeventbus,primevue.dialog,primevue.button,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.confirmdialog=function(t,i,e,o){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=n(t),r=n(i),s=n(e),a={name:"ConfirmDialog",props:{group:String,breakpoints:{type:Object,default:null}},confirmListener:null,closeListener:null,data:()=>({visible:!1,confirmation:null}),mounted(){this.confirmListener=t=>{t&&t.group===this.group&&(this.confirmation=t,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},c.default.on("confirm",this.confirmListener),c.default.on("close",this.closeListener)},beforeUnmount(){c.default.off("confirm",this.confirmListener),c.default.off("close",this.closeListener)},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1}},computed:{header(){return this.confirmation?this.confirmation.header:null},message(){return this.confirmation?this.confirmation.message:null},blockScroll(){return!this.confirmation||this.confirmation.blockScroll},position(){return this.confirmation?this.confirmation.position:null},iconClass(){return["p-confirm-dialog-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-dialog-accept",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-dialog-reject",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]},autoFocusAccept(){return void 0===this.confirmation.defaultFocus||"accept"===this.confirmation.defaultFocus},autoFocusReject(){return"reject"===this.confirmation.defaultFocus}},components:{CDialog:r.default,CDButton:s.default}};const l={class:"p-confirm-dialog-message"};return a.render=function(t,i,e,n,c,r){const s=o.resolveComponent("CDButton"),a=o.resolveComponent("CDialog");return o.openBlock(),o.createBlock(a,{visible:c.visible,"onUpdate:visible":i[3]||(i[3]=t=>c.visible=t),modal:!0,header:r.header,blockScroll:r.blockScroll,position:r.position,class:"p-confirm-dialog",breakpoints:e.breakpoints},{footer:o.withCtx((()=>[o.createVNode(s,{label:r.rejectLabel,icon:r.rejectIcon,class:r.rejectClass,onClick:i[1]||(i[1]=t=>r.reject()),autofocus:r.autoFocusReject},null,8,["label","icon","class","autofocus"]),o.createVNode(s,{label:r.acceptLabel,icon:r.acceptIcon,class:r.acceptClass,onClick:i[2]||(i[2]=t=>r.accept()),autofocus:r.autoFocusAccept},null,8,["label","icon","class","autofocus"])])),default:o.withCtx((()=>[o.createVNode("i",{class:r.iconClass},null,2),o.createVNode("span",l,o.toDisplayString(r.message),1)])),_:1},8,["visible","header","blockScroll","position","breakpoints"])},a}(primevue.confirmationeventbus,primevue.dialog,primevue.button,Vue);
@@ -2,8 +2,15 @@ interface ConfirmPopupProps {
2
2
  group?: string;
3
3
  }
4
4
 
5
+ interface ConfirmPopupMessageSlot {
6
+ message: any;
7
+ }
8
+
5
9
  declare class ConfirmPopup {
6
10
  $props: ConfirmPopupProps;
11
+ $slots: {
12
+ message: ConfirmPopupMessageSlot
13
+ }
7
14
  }
8
15
 
9
16
  export default ConfirmPopup;
@@ -2,10 +2,13 @@
2
2
  <Teleport to="body">
3
3
  <transition name="p-confirm-popup" @enter="onEnter" @leave="onLeave" @after-leave="onAfterLeave">
4
4
  <div :class="containerClass" v-if="visible" :ref="containerRef" v-bind="$attrs" @click="onOverlayClick">
5
- <div class="p-confirm-popup-content">
6
- <i :class="iconClass" />
7
- <span class="p-confirm-popup-message">{{confirmation.message}}</span>
8
- </div>
5
+ <template v-if="!$slots.message">
6
+ <div class="p-confirm-popup-content">
7
+ <i :class="iconClass" />
8
+ <span class="p-confirm-popup-message">{{confirmation.message}}</span>
9
+ </div>
10
+ </template>
11
+ <component v-else :is="$slots.message" :message="confirmation"></component>
9
12
  <div class="p-confirm-popup-footer">
10
13
  <CPButton :label="rejectLabel" :icon="rejectIcon" :class="rejectClass" @click="reject()"/>
11
14
  <CPButton :label="acceptLabel" :icon="acceptIcon" :class="acceptClass" @click="accept()" autofocus />
@@ -214,7 +214,10 @@ var script = {
214
214
  }
215
215
  };
216
216
 
217
- const _hoisted_1 = { class: "p-confirm-popup-content" };
217
+ const _hoisted_1 = {
218
+ key: 0,
219
+ class: "p-confirm-popup-content"
220
+ };
218
221
  const _hoisted_2 = { class: "p-confirm-popup-message" };
219
222
  const _hoisted_3 = { class: "p-confirm-popup-footer" };
220
223
 
@@ -237,10 +240,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
237
240
  }, _ctx.$attrs, {
238
241
  onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
239
242
  }), [
240
- vue.createVNode("div", _hoisted_1, [
241
- vue.createVNode("i", { class: $options.iconClass }, null, 2),
242
- vue.createVNode("span", _hoisted_2, vue.toDisplayString($data.confirmation.message), 1)
243
- ]),
243
+ (!_ctx.$slots.message)
244
+ ? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
245
+ vue.createVNode("i", { class: $options.iconClass }, null, 2),
246
+ vue.createVNode("span", _hoisted_2, vue.toDisplayString($data.confirmation.message), 1)
247
+ ]))
248
+ : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.message), {
249
+ key: 1,
250
+ message: $data.confirmation
251
+ }, null, 8, ["message"])),
244
252
  vue.createVNode("div", _hoisted_3, [
245
253
  vue.createVNode(_component_CPButton, {
246
254
  label: $options.rejectLabel,
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/confirmationeventbus"),t=require("primevue/utils"),i=require("primevue/overlayeventbus"),n=require("primevue/button"),r=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),c=o(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},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))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o(n).default}};const a={class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\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}\n'),l.render=function(e,t,i,n,o,s){const c=r.resolveComponent("CPButton");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:r.withCtx((()=>[o.visible?(r.openBlock(),r.createBlock("div",r.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[r.createVNode("div",a,[r.createVNode("i",{class:s.iconClass},null,2),r.createVNode("span",p,r.toDisplayString(o.confirmation.message),1)]),r.createVNode("div",u,[r.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),r.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):r.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},module.exports=l;
1
+ "use strict";var e=require("primevue/confirmationeventbus"),t=require("primevue/utils"),i=require("primevue/overlayeventbus"),n=require("primevue/button"),r=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),c=o(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},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))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\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}\n'),l.render=function(e,t,i,n,o,s){const c=r.resolveComponent("CPButton");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:r.withCtx((()=>[o.visible?(r.openBlock(),r.createBlock("div",r.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.$slots.message),{key:1,message:o.confirmation},null,8,["message"])):(r.openBlock(),r.createBlock("div",a,[r.createVNode("i",{class:s.iconClass},null,2),r.createVNode("span",p,r.toDisplayString(o.confirmation.message),1)])),r.createVNode("div",u,[r.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),r.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):r.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},module.exports=l;
@@ -2,7 +2,7 @@ import ConfirmationEventBus from 'primevue/confirmationeventbus';
2
2
  import { ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler } from 'primevue/utils';
3
3
  import OverlayEventBus from 'primevue/overlayeventbus';
4
4
  import Button from 'primevue/button';
5
- import { resolveComponent, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, mergeProps, toDisplayString, createCommentVNode } from 'vue';
5
+ import { resolveComponent, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, mergeProps, toDisplayString, resolveDynamicComponent, createCommentVNode } from 'vue';
6
6
 
7
7
  var script = {
8
8
  name: 'ConfirmPopup',
@@ -206,7 +206,10 @@ var script = {
206
206
  }
207
207
  };
208
208
 
209
- const _hoisted_1 = { class: "p-confirm-popup-content" };
209
+ const _hoisted_1 = {
210
+ key: 0,
211
+ class: "p-confirm-popup-content"
212
+ };
210
213
  const _hoisted_2 = { class: "p-confirm-popup-message" };
211
214
  const _hoisted_3 = { class: "p-confirm-popup-footer" };
212
215
 
@@ -229,10 +232,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
229
232
  }, _ctx.$attrs, {
230
233
  onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
231
234
  }), [
232
- createVNode("div", _hoisted_1, [
233
- createVNode("i", { class: $options.iconClass }, null, 2),
234
- createVNode("span", _hoisted_2, toDisplayString($data.confirmation.message), 1)
235
- ]),
235
+ (!_ctx.$slots.message)
236
+ ? (openBlock(), createBlock("div", _hoisted_1, [
237
+ createVNode("i", { class: $options.iconClass }, null, 2),
238
+ createVNode("span", _hoisted_2, toDisplayString($data.confirmation.message), 1)
239
+ ]))
240
+ : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.message), {
241
+ key: 1,
242
+ message: $data.confirmation
243
+ }, null, 8, ["message"])),
236
244
  createVNode("div", _hoisted_3, [
237
245
  createVNode(_component_CPButton, {
238
246
  label: $options.rejectLabel,
@@ -1 +1 @@
1
- import e from"primevue/confirmationeventbus";import{ZIndexUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as n}from"primevue/utils";import r from"primevue/overlayeventbus";import o from"primevue/button";import{resolveComponent as s,openBlock as c,createBlock as l,Teleport as a,createVNode as p,Transition as u,withCtx as f,mergeProps as m,toDisplayString as h,createCommentVNode as d}from"vue";var b={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},e.on("confirm",this.confirmListener),e.on("close",this.closeListener)},beforeUnmount(){e.off("confirm",this.confirmListener),e.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.clear(e)},alignOverlay(){i.absolutePosition(this.container,this.target);const e=i.getOffset(this.container),t=i.getOffset(this.target);let n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<t.top&&i.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new n(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},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))},containerRef(e){this.container=e},onOverlayClick(e){r.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o}};const v={class:"p-confirm-popup-content"},L={class:"p-confirm-popup-message"},g={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\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}\n'),b.render=function(e,t,i,n,r,o){const b=s("CPButton");return c(),l(a,{to:"body"},[p(u,{name:"p-confirm-popup",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:f((()=>[r.visible?(c(),l("div",m({key:0,class:o.containerClass,ref:o.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[p("div",v,[p("i",{class:o.iconClass},null,2),p("span",L,h(r.confirmation.message),1)]),p("div",g,[p(b,{label:o.rejectLabel,icon:o.rejectIcon,class:o.rejectClass,onClick:t[1]||(t[1]=e=>o.reject())},null,8,["label","icon","class"]),p(b,{label:o.acceptLabel,icon:o.acceptIcon,class:o.acceptClass,onClick:t[2]||(t[2]=e=>o.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):d("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])};export default b;
1
+ import e from"primevue/confirmationeventbus";import{ZIndexUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as n}from"primevue/utils";import r from"primevue/overlayeventbus";import o from"primevue/button";import{resolveComponent as s,openBlock as c,createBlock as l,Teleport as a,createVNode as p,Transition as u,withCtx as f,mergeProps as m,toDisplayString as h,resolveDynamicComponent as d,createCommentVNode as b}from"vue";var v={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},e.on("confirm",this.confirmListener),e.on("close",this.closeListener)},beforeUnmount(){e.off("confirm",this.confirmListener),e.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.clear(e)},alignOverlay(){i.absolutePosition(this.container,this.target);const e=i.getOffset(this.container),t=i.getOffset(this.target);let n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<t.top&&i.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new n(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},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))},containerRef(e){this.container=e},onOverlayClick(e){r.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o}};const L={key:0,class:"p-confirm-popup-content"},g={class:"p-confirm-popup-message"},C={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\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}\n'),v.render=function(e,t,i,n,r,o){const v=s("CPButton");return c(),l(a,{to:"body"},[p(u,{name:"p-confirm-popup",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:f((()=>[r.visible?(c(),l("div",m({key:0,class:o.containerClass,ref:o.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[e.$slots.message?(c(),l(d(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(c(),l("div",L,[p("i",{class:o.iconClass},null,2),p("span",g,h(r.confirmation.message),1)])),p("div",C,[p(v,{label:o.rejectLabel,icon:o.rejectIcon,class:o.rejectClass,onClick:t[1]||(t[1]=e=>o.reject())},null,8,["label","icon","class"]),p(v,{label:o.acceptLabel,icon:o.acceptIcon,class:o.acceptClass,onClick:t[2]||(t[2]=e=>o.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):b("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])};export default v;
@@ -210,7 +210,10 @@ this.primevue.confirmpopup = (function (ConfirmationEventBus, utils, OverlayEven
210
210
  }
211
211
  };
212
212
 
213
- const _hoisted_1 = { class: "p-confirm-popup-content" };
213
+ const _hoisted_1 = {
214
+ key: 0,
215
+ class: "p-confirm-popup-content"
216
+ };
214
217
  const _hoisted_2 = { class: "p-confirm-popup-message" };
215
218
  const _hoisted_3 = { class: "p-confirm-popup-footer" };
216
219
 
@@ -233,10 +236,15 @@ this.primevue.confirmpopup = (function (ConfirmationEventBus, utils, OverlayEven
233
236
  }, _ctx.$attrs, {
234
237
  onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
235
238
  }), [
236
- vue.createVNode("div", _hoisted_1, [
237
- vue.createVNode("i", { class: $options.iconClass }, null, 2),
238
- vue.createVNode("span", _hoisted_2, vue.toDisplayString($data.confirmation.message), 1)
239
- ]),
239
+ (!_ctx.$slots.message)
240
+ ? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
241
+ vue.createVNode("i", { class: $options.iconClass }, null, 2),
242
+ vue.createVNode("span", _hoisted_2, vue.toDisplayString($data.confirmation.message), 1)
243
+ ]))
244
+ : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.message), {
245
+ key: 1,
246
+ message: $data.confirmation
247
+ }, null, 8, ["message"])),
240
248
  vue.createVNode("div", _hoisted_3, [
241
249
  vue.createVNode(_component_CPButton, {
242
250
  label: $options.rejectLabel,
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,i,n,r){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),c=o(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},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))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o(n).default}};const a={class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\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}\n'),l.render=function(e,t,i,n,o,s){const c=r.resolveComponent("CPButton");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:r.withCtx((()=>[o.visible?(r.openBlock(),r.createBlock("div",r.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[r.createVNode("div",a,[r.createVNode("i",{class:s.iconClass},null,2),r.createVNode("span",p,r.toDisplayString(o.confirmation.message),1)]),r.createVNode("div",u,[r.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),r.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):r.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},l}(primevue.confirmationeventbus,primevue.utils,primevue.overlayeventbus,primevue.button,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,i,n,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(e),c=r(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},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))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:r(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\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}\n'),l.render=function(e,t,i,n,r,s){const c=o.resolveComponent("CPButton");return o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.createVNode(o.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:o.withCtx((()=>[r.visible?(o.openBlock(),o.createBlock("div",o.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(o.openBlock(),o.createBlock("div",a,[o.createVNode("i",{class:s.iconClass},null,2),o.createVNode("span",p,o.toDisplayString(r.confirmation.message),1)])),o.createVNode("div",u,[o.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),o.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):o.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},l}(primevue.confirmationeventbus,primevue.utils,primevue.overlayeventbus,primevue.button,Vue);
@@ -1,25 +1,25 @@
1
1
  <template>
2
2
  <transition name="p-contextmenusub" @enter="onEnter">
3
3
  <ul ref="container" :class="containerClass" role="menu" v-if="root ? true : parentActive">
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
  <li role="none" :class="getItemClass(item)" :style="item.style" v-if="visible(item) && !item.separator"
6
6
  @mouseenter="onItemMouseEnter($event, item)">
7
7
  <template v-if="!template">
8
8
  <router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive, isExactActive}">
9
9
  <a :href="href" @click="onItemClick($event, item, navigate)" :class="linkClass(item, {isActive, isExactActive})" v-ripple role="menuitem">
10
10
  <span :class="['p-menuitem-icon', item.icon]"></span>
11
- <span class="p-menuitem-text">{{item.label}}</span>
11
+ <span class="p-menuitem-text">{{label(item)}}</span>
12
12
  </a>
13
13
  </router-link>
14
14
  <a v-else :href="item.url" :class="linkClass(item)" :target="item.target" @click="onItemClick($event, item)" v-ripple
15
15
  :aria-haspopup="item.items != null" :aria-expanded="item === activeItem" role="menuitem" :tabindex="disabled(item) ? null : '0'">
16
16
  <span :class="['p-menuitem-icon', item.icon]"></span>
17
- <span class="p-menuitem-text">{{item.label}}</span>
17
+ <span class="p-menuitem-text">{{label(item)}}</span>
18
18
  <span class="p-submenu-icon pi pi-angle-right" v-if="item.items"></span>
19
19
  </a>
20
20
  </template>
21
21
  <component v-else :is="template" :item="item"></component>
22
- <ContextMenuSub :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'" :template="template"
22
+ <ContextMenuSub :model="item.items" v-if="visible(item) && item.items" :key="label(item) + '_sub_'" :template="template"
23
23
  @leaf-click="onLeafClick" :parentActive="item === activeItem" :exact="exact" />
24
24
  </li>
25
25
  <li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i.toString()" role="separator"></li>
@@ -148,6 +148,9 @@ export default {
148
148
  },
149
149
  disabled(item) {
150
150
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
151
+ },
152
+ label(item) {
153
+ return (typeof item.label === 'function' ? item.label() : item.label);
151
154
  }
152
155
  },
153
156
  computed: {
@@ -124,6 +124,9 @@ var script$1 = {
124
124
  },
125
125
  disabled(item) {
126
126
  return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
127
+ },
128
+ label(item) {
129
+ return (typeof item.label === 'function' ? item.label() : item.label);
127
130
  }
128
131
  },
129
132
  computed: {
@@ -162,7 +165,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
162
165
  }, [
163
166
  (vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
164
167
  return (vue.openBlock(), vue.createBlock(vue.Fragment, {
165
- key: item.label + i.toString()
168
+ key: $options.label(item) + i.toString()
166
169
  }, [
167
170
  ($options.visible(item) && !item.separator)
168
171
  ? (vue.openBlock(), vue.createBlock("li", {
@@ -190,7 +193,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
190
193
  vue.createVNode("span", {
191
194
  class: ['p-menuitem-icon', item.icon]
192
195
  }, null, 2),
193
- vue.createVNode("span", _hoisted_1, vue.toDisplayString(item.label), 1)
196
+ vue.createVNode("span", _hoisted_1, vue.toDisplayString($options.label(item)), 1)
194
197
  ], 10, ["href", "onClick"]), [
195
198
  [_directive_ripple]
196
199
  ])
@@ -211,7 +214,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
211
214
  vue.createVNode("span", {
212
215
  class: ['p-menuitem-icon', item.icon]
213
216
  }, null, 2),
214
- vue.createVNode("span", _hoisted_2, vue.toDisplayString(item.label), 1),
217
+ vue.createVNode("span", _hoisted_2, vue.toDisplayString($options.label(item)), 1),
215
218
  (item.items)
216
219
  ? (vue.openBlock(), vue.createBlock("span", _hoisted_3))
217
220
  : vue.createCommentVNode("", true)
@@ -226,7 +229,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
226
229
  ($options.visible(item) && item.items)
227
230
  ? (vue.openBlock(), vue.createBlock(_component_ContextMenuSub, {
228
231
  model: item.items,
229
- key: item.label + '_sub_',
232
+ key: $options.label(item) + '_sub_',
230
233
  template: $props.template,
231
234
  onLeafClick: $options.onLeafClick,
232
235
  parentActive: item === $data.activeItem,
@@ -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 o={name:"ContextMenuSub",emits:["leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.activeItem=t},onItemClick(e,t,n){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&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onEnter(){this.position()},position(){const t=this.$refs.container.parentElement,n=e.DomHandler.getOffset(this.$refs.container.parentElement),i=e.DomHandler.getViewport(),o=this.$refs.container.offsetParent?this.$refs.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.$refs.container),s=e.DomHandler.getOuterWidth(t.children[0]);this.$refs.container.style.top="0px",parseInt(n.left,10)+s+o>i.width-e.DomHandler.calculateScrollbarWidth()?this.$refs.container.style.left=-1*o+"px":this.$refs.container.style.left=s+"px"},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}]},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:i(t).default}};const s={class:"p-menuitem-text"},l={class:"p-menuitem-text"},a={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,o,r,c){const u=n.resolveComponent("router-link"),d=n.resolveComponent("ContextMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock(n.Transition,{name:"p-contextmenusub",onEnter:c.onEnter},{default:n.withCtx((()=>[i.root||i.parentActive?(n.openBlock(),n.createBlock("ul",{key:0,ref:"container",class:c.containerClass,role:"menu"},[(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()},[c.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:c.getItemClass(e),style:e.style,onMouseenter:t=>c.onItemMouseEnter(t,e)},[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&&!c.disabled(e)?(n.openBlock(),n.createBlock(u,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:o,isExactActive:l})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>c.onItemClick(n,e,t),class:c.linkClass(e,{isActive:o,isExactActive:l}),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(e.label),1)],10,["href","onClick"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:c.linkClass(e),target:e.target,onClick:t=>c.onItemClick(t,e),"aria-haspopup":null!=e.items,"aria-expanded":e===r.activeItem,role:"menuitem",tabindex:c.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",l,n.toDisplayString(e.label),1),e.items?(n.openBlock(),n.createBlock("span",a)):n.createCommentVNode("",!0)],10,["href","target","onClick","aria-haspopup","aria-expanded","tabindex"])),[[m]])],64)),c.visible(e)&&e.items?(n.openBlock(),n.createBlock(d,{model:e.items,key:e.label+"_sub_",template:i.template,onLeafClick:c.onLeafClick,parentActive:e===r.activeItem,exact:i.exact},null,8,["model","template","onLeafClick","parentActive","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),c.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)):n.createCommentVNode("",!0)])),_:1},8,["onEnter"])};var r={name:"ContextMenu",inheritAttrs:!1,props:{model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},exact:{type:Boolean,default:!0}},target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,pageX:null,pageY:null,container:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},mounted(){this.global&&this.bindDocumentContextMenuListener()},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)},onLeafClick(){this.hide()},show(e){this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide(){this.visible=!1},onEnter(t){this.position(),this.bindOutsideClickListener(),this.bindResizeListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},position(){let t=this.pageX+1,n=this.pageY+1,i=this.container.offsetParent?this.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.container),o=this.container.offsetParent?this.container.offsetHeight:e.DomHandler.getHiddenElementOuterHeight(this.container),s=e.DomHandler.getViewport();t+i-document.body.scrollLeft>s.width&&(t-=i),n+o-document.body.scrollTop>s.height&&(n-=o),t<document.body.scrollLeft&&(t=document.body.scrollLeft),n<document.body.scrollTop&&(n=document.body.scrollTop),this.container.style.left=t+"px",this.container.style.top=n+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!e.ctrlKey&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},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)},bindDocumentContextMenuListener(){this.documentContextMenuListener||(this.documentContextMenuListener=e=>{this.show(e)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},containerRef(e){this.container=e}},computed:{containerClass(){return["p-contextmenu p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{ContextMenuSub:o}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-contextmenu {\n position: absolute;\n}\n.p-contextmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-contextmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n}\n.p-contextmenu .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-contextmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-contextmenu .p-menuitem {\n position: relative;\n}\n.p-contextmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-contextmenu-enter-from {\n opacity: 0;\n}\n.p-contextmenu-enter-active {\n -webkit-transition: opacity 250ms;\n transition: opacity 250ms;\n}\n"),r.render=function(e,t,i,o,s,l){const a=n.resolveComponent("ContextMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo},[n.createVNode(n.Transition,{name:"p-contextmenu",onEnter:l.onEnter,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave},{default:n.withCtx((()=>[s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:l.containerRef,class:l.containerClass},e.$attrs),[n.createVNode(a,{model:i.model,root:!0,onLeafClick:l.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","onLeafClick","template","exact"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to"])},module.exports=r;
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 o={name:"ContextMenuSub",emits:["leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.activeItem=t},onItemClick(e,t,n){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&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onEnter(){this.position()},position(){const t=this.$refs.container.parentElement,n=e.DomHandler.getOffset(this.$refs.container.parentElement),i=e.DomHandler.getViewport(),o=this.$refs.container.offsetParent?this.$refs.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.$refs.container),s=e.DomHandler.getOuterWidth(t.children[0]);this.$refs.container.style.top="0px",parseInt(n.left,10)+s+o>i.width-e.DomHandler.calculateScrollbarWidth()?this.$refs.container.style.left=-1*o+"px":this.$refs.container.style.left=s+"px"},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}]},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:i(t).default}};const s={class:"p-menuitem-text"},l={class:"p-menuitem-text"},a={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,o,r,c){const u=n.resolveComponent("router-link"),d=n.resolveComponent("ContextMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock(n.Transition,{name:"p-contextmenusub",onEnter:c.onEnter},{default:n.withCtx((()=>[i.root||i.parentActive?(n.openBlock(),n.createBlock("ul",{key:0,ref:"container",class:c.containerClass,role:"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:c.label(e)+t.toString()},[c.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:c.getItemClass(e),style:e.style,onMouseenter:t=>c.onItemMouseEnter(t,e)},[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&&!c.disabled(e)?(n.openBlock(),n.createBlock(u,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:o,isExactActive:l})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>c.onItemClick(n,e,t),class:c.linkClass(e,{isActive:o,isExactActive:l}),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(c.label(e)),1)],10,["href","onClick"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:c.linkClass(e),target:e.target,onClick:t=>c.onItemClick(t,e),"aria-haspopup":null!=e.items,"aria-expanded":e===r.activeItem,role:"menuitem",tabindex:c.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",l,n.toDisplayString(c.label(e)),1),e.items?(n.openBlock(),n.createBlock("span",a)):n.createCommentVNode("",!0)],10,["href","target","onClick","aria-haspopup","aria-expanded","tabindex"])),[[m]])],64)),c.visible(e)&&e.items?(n.openBlock(),n.createBlock(d,{model:e.items,key:c.label(e)+"_sub_",template:i.template,onLeafClick:c.onLeafClick,parentActive:e===r.activeItem,exact:i.exact},null,8,["model","template","onLeafClick","parentActive","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),c.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)):n.createCommentVNode("",!0)])),_:1},8,["onEnter"])};var r={name:"ContextMenu",inheritAttrs:!1,props:{model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},exact:{type:Boolean,default:!0}},target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,pageX:null,pageY:null,container:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},mounted(){this.global&&this.bindDocumentContextMenuListener()},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)},onLeafClick(){this.hide()},show(e){this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide(){this.visible=!1},onEnter(t){this.position(),this.bindOutsideClickListener(),this.bindResizeListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},position(){let t=this.pageX+1,n=this.pageY+1,i=this.container.offsetParent?this.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.container),o=this.container.offsetParent?this.container.offsetHeight:e.DomHandler.getHiddenElementOuterHeight(this.container),s=e.DomHandler.getViewport();t+i-document.body.scrollLeft>s.width&&(t-=i),n+o-document.body.scrollTop>s.height&&(n-=o),t<document.body.scrollLeft&&(t=document.body.scrollLeft),n<document.body.scrollTop&&(n=document.body.scrollTop),this.container.style.left=t+"px",this.container.style.top=n+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!e.ctrlKey&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},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)},bindDocumentContextMenuListener(){this.documentContextMenuListener||(this.documentContextMenuListener=e=>{this.show(e)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},containerRef(e){this.container=e}},computed:{containerClass(){return["p-contextmenu p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{ContextMenuSub:o}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-contextmenu {\n position: absolute;\n}\n.p-contextmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-contextmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n}\n.p-contextmenu .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-contextmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-contextmenu .p-menuitem {\n position: relative;\n}\n.p-contextmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-contextmenu-enter-from {\n opacity: 0;\n}\n.p-contextmenu-enter-active {\n -webkit-transition: opacity 250ms;\n transition: opacity 250ms;\n}\n"),r.render=function(e,t,i,o,s,l){const a=n.resolveComponent("ContextMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo},[n.createVNode(n.Transition,{name:"p-contextmenu",onEnter:l.onEnter,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave},{default:n.withCtx((()=>[s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:l.containerRef,class:l.containerClass},e.$attrs),[n.createVNode(a,{model:i.model,root:!0,onLeafClick:l.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","onLeafClick","template","exact"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to"])},module.exports=r;