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
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/button"),t=require("primevue/utils"),i=require("primevue/ripple"),l=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),s=n(i),r={name:"PickList",emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source"],props:{modelValue:{type:Array,default:()=>[[],[]]},selection:{type:Array,default:()=>[[],[]]},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},updated(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount(){this.destroyStyle()},mounted(){this.responsive&&this.createStyle()},watch:{selection(e){this.d_selection=e}},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e,i){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection[i])},moveUp(e,i){if(this.d_selection&&this.d_selection[i]){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(0===o)break;{let e=l[o],t=l[o-1];l[o-1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="up",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveTop(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(0===o)break;{let e=l.splice(o,1)[0];l.unshift(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="top",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveDown(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(o===l.length-1)break;{let e=l[o],t=l[o+1];l[o+1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="down",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveBottom(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(o===l.length-1)break;{let e=l.splice(o,1)[0];l.push(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="bottom",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveToTarget(e){let i=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.ObjectUtils.findIndexInList(o,n)&&n.push(l.splice(t.ObjectUtils.findIndexInList(o,l),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-target",{originalEvent:e,items:i}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget(e){if(this.modelValue[0]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[...i,...t],t=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource(e){let i=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.ObjectUtils.findIndexInList(o,l)&&l.push(n.splice(t.ObjectUtils.findIndexInList(o,n),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-source",{originalEvent:e,items:i}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource(e){if(this.modelValue[1]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[...t,...i],i=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick(e,i,l){this.itemTouched=!1;const n=this.d_selection[l],o=t.ObjectUtils.findIndexInList(i,n),s=-1!=o;let r;if(!this.itemTouched&&this.metaKeySelection){let t=e.metaKey||e.ctrlKey;s&&t?r=n.filter(((e,t)=>t!==o)):(r=t&&n?[...n]:[],r.push(i))}else s?r=n.filter(((e,t)=>t!==o)):(r=n?[...n]:[],r.push(i));let c=[...this.d_selection];c[l]=r,this.d_selection=c,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick(e,t,i){0===i?this.moveToTarget(e):1===i&&this.moveToSource(e)},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(l);n&&n.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(l);o&&o.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let i=e.nextElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findPrevItem(i):null},updateListScroll(e){const i=t.DomHandler.find(e,".p-picklist-item.p-highlight");if(i&&i.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(e,i[0]);break;case"top":e.scrollTop=0;break;case"down":t.DomHandler.scrollInView(e,i[i.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-picklist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-right:before {\n content: "\\e930"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-right:before {\n content: "\\e92c"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-left:before {\n content: "\\e933"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-left:before {\n content: "\\e92f"\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{sourceList(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:()=>t.UniqueComponentId()},components:{PLButton:o.default},directives:{ripple:s.default}};const c={class:"p-picklist p-component"},a={class:"p-picklist-buttons p-picklist-source-controls"},d={class:"p-picklist-list-wrapper p-picklist-source-wrapper"},p={key:0,class:"p-picklist-header"},u={class:"p-picklist-buttons p-picklist-transfer-buttons"},m={class:"p-picklist-list-wrapper p-picklist-target-wrapper"},h={key:0,class:"p-picklist-header"},k={class:"p-picklist-buttons p-picklist-target-controls"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&l.firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-picklist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-picklist-buttons {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-picklist-list-wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n}\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n -webkit-transition: none !important;\n transition: none !important;\n}\n"),r.render=function(e,t,i,n,o,s){const r=l.resolveComponent("PLButton"),f=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",c,[l.createVNode("div",a,[l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:t[1]||(t[1]=e=>s.moveUp(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:t[2]||(t[2]=e=>s.moveTop(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:t[3]||(t[3]=e=>s.moveDown(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:t[4]||(t[4]=e=>s.moveBottom(e,0))})]),l.createVNode("div",d,[e.$slots.sourceHeader?(l.openBlock(),l.createBlock("div",p,[l.renderSlot(e.$slots,"sourceHeader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"sourceList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-source",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.sourceList,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,n),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,0)}],onClick:e=>s.onItemClick(e,i,0),onDblclick:e=>s.onItemDblClick(e,i,0),onKeydown:e=>s.onItemKeyDown(e,i,0),onTouchend:t[5]||(t[5]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,0)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",u,[l.createVNode(r,{type:"button",icon:"pi pi-angle-right",onClick:s.moveToTarget},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-right",onClick:s.moveAllToTarget},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-left",onClick:s.moveToSource},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-left",onClick:s.moveAllToSource},null,8,["onClick"])]),l.createVNode("div",m,[e.$slots.targetHeader?(l.openBlock(),l.createBlock("div",h,[l.renderSlot(e.$slots,"targetHeader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"targetList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-target",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.targetList,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,n),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,1)}],onClick:e=>s.onItemClick(e,i,1),onDblclick:e=>s.onItemDblClick(e,i,1),onKeydown:e=>s.onItemKeyDown(e,i,1),onTouchend:t[6]||(t[6]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,1)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",k,[l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:t[7]||(t[7]=e=>s.moveUp(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:t[8]||(t[8]=e=>s.moveTop(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:t[9]||(t[9]=e=>s.moveDown(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:t[10]||(t[10]=e=>s.moveBottom(e,1))})])])},module.exports=r;
1
+ "use strict";var e=require("primevue/button"),t=require("primevue/utils"),i=require("primevue/ripple"),l=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(e),s=o(i),r={name:"PickList",emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source"],props:{modelValue:{type:Array,default:()=>[[],[]]},selection:{type:Array,default:()=>[[],[]]},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},updated(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount(){this.destroyStyle()},mounted(){this.responsive&&this.createStyle()},watch:{selection(e){this.d_selection=e}},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e,i){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection[i])},moveUp(e,i){if(this.d_selection&&this.d_selection[i]){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=0;e<o.length;e++){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(0===n)break;{let e=l[n],t=l[n-1];l[n-1]=e,l[n]=t}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="up",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveTop(e,i){if(this.d_selection){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=0;e<o.length;e++){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(0===n)break;{let e=l.splice(n,1)[0];l.unshift(e)}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="top",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveDown(e,i){if(this.d_selection){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=o.length-1;e>=0;e--){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(n===l.length-1)break;{let e=l[n],t=l[n+1];l[n+1]=e,l[n]=t}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="down",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveBottom(e,i){if(this.d_selection){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=o.length-1;e>=0;e--){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(n===l.length-1)break;{let e=l.splice(n,1)[0];l.push(e)}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="bottom",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveToTarget(e){let i=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,l=[...this.modelValue[0]],o=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let n=i[e];-1==t.ObjectUtils.findIndexInList(n,o)&&o.push(l.splice(t.ObjectUtils.findIndexInList(n,l),1)[0])}let n=[...this.modelValue];n[0]=l,n[1]=o,this.$emit("update:modelValue",n),this.$emit("move-to-target",{originalEvent:e,items:i}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget(e){if(this.modelValue[0]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[...i,...t],t=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource(e){let i=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,l=[...this.modelValue[0]],o=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let n=i[e];-1==t.ObjectUtils.findIndexInList(n,l)&&l.push(o.splice(t.ObjectUtils.findIndexInList(n,o),1)[0])}let n=[...this.modelValue];n[0]=l,n[1]=o,this.$emit("update:modelValue",n),this.$emit("move-to-source",{originalEvent:e,items:i}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource(e){if(this.modelValue[1]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[...t,...i],i=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick(e,i,l){this.itemTouched=!1;const o=this.d_selection[l],n=t.ObjectUtils.findIndexInList(i,o),s=-1!=n;let r;if(!this.itemTouched&&this.metaKeySelection){let t=e.metaKey||e.ctrlKey;s&&t?r=o.filter(((e,t)=>t!==n)):(r=t&&o?[...o]:[],r.push(i))}else s?r=o.filter(((e,t)=>t!==n)):(r=o?[...o]:[],r.push(i));let c=[...this.d_selection];c[l]=r,this.d_selection=c,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick(e,t,i){0===i?this.moveToTarget(e):1===i&&this.moveToSource(e)},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var o=this.findNextItem(l);o&&o.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(l);n&&n.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let i=e.nextElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findPrevItem(i):null},updateListScroll(e){const i=t.DomHandler.find(e,".p-picklist-item.p-highlight");if(i&&i.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(e,i[0]);break;case"top":e.scrollTop=0;break;case"down":t.DomHandler.scrollInView(e,i[i.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-picklist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-right:before {\n content: "\\e930"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-right:before {\n content: "\\e92c"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-left:before {\n content: "\\e933"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-left:before {\n content: "\\e92f"\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{sourceList(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:()=>t.UniqueComponentId()},components:{PLButton:n.default},directives:{ripple:s.default}};const c={class:"p-picklist p-component"},a={class:"p-picklist-buttons p-picklist-source-controls"},d={class:"p-picklist-list-wrapper p-picklist-source-wrapper"},p={key:0,class:"p-picklist-header"},u={class:"p-picklist-buttons p-picklist-transfer-buttons"},h={class:"p-picklist-list-wrapper p-picklist-target-wrapper"},m={key:0,class:"p-picklist-header"},k={class:"p-picklist-buttons p-picklist-target-controls"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&l.firstChild?l.insertBefore(o,l.firstChild):l.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-picklist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-picklist-buttons {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-picklist-list-wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n}\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n -webkit-transition: none !important;\n transition: none !important;\n}\n"),r.render=function(e,t,i,o,n,s){const r=l.resolveComponent("PLButton"),f=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",c,[l.createVNode("div",a,[l.renderSlot(e.$slots,"sourcecontrolsstart"),l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:t[1]||(t[1]=e=>s.moveUp(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:t[2]||(t[2]=e=>s.moveTop(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:t[3]||(t[3]=e=>s.moveDown(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:t[4]||(t[4]=e=>s.moveBottom(e,0))}),l.renderSlot(e.$slots,"sourcecontrolsend")]),l.createVNode("div",d,[e.$slots.sourceheader?(l.openBlock(),l.createBlock("div",p,[l.renderSlot(e.$slots,"sourceheader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"sourceList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-source",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.sourceList,((i,o)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,o),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,0)}],onClick:e=>s.onItemClick(e,i,0),onDblclick:e=>s.onItemDblClick(e,i,0),onKeydown:e=>s.onItemKeyDown(e,i,0),onTouchend:t[5]||(t[5]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,0)},[l.renderSlot(e.$slots,"item",{item:i,index:o})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",u,[l.renderSlot(e.$slots,"movecontrolsstart"),l.createVNode(r,{type:"button",icon:"pi pi-angle-right",onClick:s.moveToTarget},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-right",onClick:s.moveAllToTarget},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-left",onClick:s.moveToSource},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-left",onClick:s.moveAllToSource},null,8,["onClick"]),l.renderSlot(e.$slots,"movecontrolsend")]),l.createVNode("div",h,[e.$slots.targetheader?(l.openBlock(),l.createBlock("div",m,[l.renderSlot(e.$slots,"targetheader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"targetList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-target",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.targetList,((i,o)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,o),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,1)}],onClick:e=>s.onItemClick(e,i,1),onDblclick:e=>s.onItemDblClick(e,i,1),onKeydown:e=>s.onItemKeyDown(e,i,1),onTouchend:t[6]||(t[6]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,1)},[l.renderSlot(e.$slots,"item",{item:i,index:o})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",k,[l.renderSlot(e.$slots,"targetcontrolsstart"),l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:t[7]||(t[7]=e=>s.moveUp(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:t[8]||(t[8]=e=>s.moveTop(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:t[9]||(t[9]=e=>s.moveDown(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:t[10]||(t[10]=e=>s.moveBottom(e,1))}),l.renderSlot(e.$slots,"targetcontrolsend")])])},module.exports=r;
@@ -528,6 +528,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
528
528
 
529
529
  return (openBlock(), createBlock("div", _hoisted_1, [
530
530
  createVNode("div", _hoisted_2, [
531
+ renderSlot(_ctx.$slots, "sourcecontrolsstart"),
531
532
  createVNode(_component_PLButton, {
532
533
  type: "button",
533
534
  icon: "pi pi-angle-up",
@@ -547,12 +548,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
547
548
  type: "button",
548
549
  icon: "pi pi-angle-double-down",
549
550
  onClick: _cache[4] || (_cache[4] = $event => ($options.moveBottom($event, 0)))
550
- })
551
+ }),
552
+ renderSlot(_ctx.$slots, "sourcecontrolsend")
551
553
  ]),
552
554
  createVNode("div", _hoisted_3, [
553
- (_ctx.$slots.sourceHeader)
555
+ (_ctx.$slots.sourceheader)
554
556
  ? (openBlock(), createBlock("div", _hoisted_4, [
555
- renderSlot(_ctx.$slots, "sourceHeader")
557
+ renderSlot(_ctx.$slots, "sourceheader")
556
558
  ]))
557
559
  : createCommentVNode("", true),
558
560
  createVNode(TransitionGroup, {
@@ -590,6 +592,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
590
592
  }, 8, ["style"])
591
593
  ]),
592
594
  createVNode("div", _hoisted_5, [
595
+ renderSlot(_ctx.$slots, "movecontrolsstart"),
593
596
  createVNode(_component_PLButton, {
594
597
  type: "button",
595
598
  icon: "pi pi-angle-right",
@@ -609,12 +612,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
609
612
  type: "button",
610
613
  icon: "pi pi-angle-double-left",
611
614
  onClick: $options.moveAllToSource
612
- }, null, 8, ["onClick"])
615
+ }, null, 8, ["onClick"]),
616
+ renderSlot(_ctx.$slots, "movecontrolsend")
613
617
  ]),
614
618
  createVNode("div", _hoisted_6, [
615
- (_ctx.$slots.targetHeader)
619
+ (_ctx.$slots.targetheader)
616
620
  ? (openBlock(), createBlock("div", _hoisted_7, [
617
- renderSlot(_ctx.$slots, "targetHeader")
621
+ renderSlot(_ctx.$slots, "targetheader")
618
622
  ]))
619
623
  : createCommentVNode("", true),
620
624
  createVNode(TransitionGroup, {
@@ -652,6 +656,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
652
656
  }, 8, ["style"])
653
657
  ]),
654
658
  createVNode("div", _hoisted_8, [
659
+ renderSlot(_ctx.$slots, "targetcontrolsstart"),
655
660
  createVNode(_component_PLButton, {
656
661
  type: "button",
657
662
  icon: "pi pi-angle-up",
@@ -671,7 +676,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
671
676
  type: "button",
672
677
  icon: "pi pi-angle-double-down",
673
678
  onClick: _cache[10] || (_cache[10] = $event => ($options.moveBottom($event, 1)))
674
- })
679
+ }),
680
+ renderSlot(_ctx.$slots, "targetcontrolsend")
675
681
  ])
676
682
  ]))
677
683
  }
@@ -1 +1 @@
1
- import e from"primevue/button";import{ObjectUtils as t,DomHandler as i,UniqueComponentId as l}from"primevue/utils";import n from"primevue/ripple";import{resolveComponent as o,resolveDirective as s,openBlock as r,createBlock as c,createVNode as a,renderSlot as d,createCommentVNode as p,TransitionGroup as u,withCtx as h,Fragment as m,renderList as f,withDirectives as k}from"vue";var g={name:"PickList",emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source"],props:{modelValue:{type:Array,default:()=>[[],[]]},selection:{type:Array,default:()=>[[],[]]},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},updated(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount(){this.destroyStyle()},mounted(){this.responsive&&this.createStyle()},watch:{selection(e){this.d_selection=e}},methods:{getItemKey(e,i){return this.dataKey?t.resolveFieldData(e,this.dataKey):i},isSelected(e,i){return-1!=t.findIndexInList(e,this.d_selection[i])},moveUp(e,i){if(this.d_selection&&this.d_selection[i]){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.findIndexInList(i,l);if(0===o)break;{let e=l[o],t=l[o-1];l[o-1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="up",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveTop(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.findIndexInList(i,l);if(0===o)break;{let e=l.splice(o,1)[0];l.unshift(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="top",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveDown(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.findIndexInList(i,l);if(o===l.length-1)break;{let e=l[o],t=l[o+1];l[o+1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="down",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveBottom(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.findIndexInList(i,l);if(o===l.length-1)break;{let e=l.splice(o,1)[0];l.push(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="bottom",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveToTarget(e){let i=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.findIndexInList(o,n)&&n.push(l.splice(t.findIndexInList(o,l),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-target",{originalEvent:e,items:i}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget(e){if(this.modelValue[0]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[...i,...t],t=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource(e){let i=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.findIndexInList(o,l)&&l.push(n.splice(t.findIndexInList(o,n),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-source",{originalEvent:e,items:i}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource(e){if(this.modelValue[1]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[...t,...i],i=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick(e,i,l){this.itemTouched=!1;const n=this.d_selection[l],o=t.findIndexInList(i,n),s=-1!=o;let r;if(!this.itemTouched&&this.metaKeySelection){let t=e.metaKey||e.ctrlKey;s&&t?r=n.filter(((e,t)=>t!==o)):(r=t&&n?[...n]:[],r.push(i))}else s?r=n.filter(((e,t)=>t!==o)):(r=n?[...n]:[],r.push(i));let c=[...this.d_selection];c[l]=r,this.d_selection=c,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick(e,t,i){0===i?this.moveToTarget(e):1===i&&this.moveToSource(e)},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(l);n&&n.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(l);o&&o.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let t=e.nextElementSibling;return t?i.hasClass(t,"p-picklist-item")?t:this.findNextItem(t):null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-picklist-item")?t:this.findPrevItem(t):null},updateListScroll(e){const t=i.find(e,".p-picklist-item.p-highlight");if(t&&t.length)switch(this.reorderDirection){case"up":i.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":i.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-picklist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-right:before {\n content: "\\e930"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-right:before {\n content: "\\e92c"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-left:before {\n content: "\\e933"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-left:before {\n content: "\\e92f"\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{sourceList(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:()=>l()},components:{PLButton:e},directives:{ripple:n}};const v={class:"p-picklist p-component"},b={class:"p-picklist-buttons p-picklist-source-controls"},y={class:"p-picklist-list-wrapper p-picklist-source-wrapper"},x={key:0,class:"p-picklist-header"},I={class:"p-picklist-buttons p-picklist-transfer-buttons"},$={class:"p-picklist-list-wrapper p-picklist-target-wrapper"},V={key:0,class:"p-picklist-header"},w={class:"p-picklist-buttons p-picklist-target-controls"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&l.firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-picklist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-picklist-buttons {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-picklist-list-wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n}\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n -webkit-transition: none !important;\n transition: none !important;\n}\n"),g.render=function(e,t,i,l,n,g){const S=o("PLButton"),_=s("ripple");return r(),c("div",v,[a("div",b,[a(S,{type:"button",icon:"pi pi-angle-up",onClick:t[1]||(t[1]=e=>g.moveUp(e,0))}),a(S,{type:"button",icon:"pi pi-angle-double-up",onClick:t[2]||(t[2]=e=>g.moveTop(e,0))}),a(S,{type:"button",icon:"pi pi-angle-down",onClick:t[3]||(t[3]=e=>g.moveDown(e,0))}),a(S,{type:"button",icon:"pi pi-angle-double-down",onClick:t[4]||(t[4]=e=>g.moveBottom(e,0))})]),a("div",y,[e.$slots.sourceHeader?(r(),c("div",x,[d(e.$slots,"sourceHeader")])):p("",!0),a(u,{ref:"sourceList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-source",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:h((()=>[(r(!0),c(m,null,f(g.sourceList,((i,l)=>k((r(),c("li",{key:g.getItemKey(i,l),tabindex:"0",class:["p-picklist-item",{"p-highlight":g.isSelected(i,0)}],onClick:e=>g.onItemClick(e,i,0),onDblclick:e=>g.onItemDblClick(e,i,0),onKeydown:e=>g.onItemKeyDown(e,i,0),onTouchend:t[5]||(t[5]=(...e)=>g.onItemTouchEnd&&g.onItemTouchEnd(...e)),role:"option","aria-selected":g.isSelected(i,0)},[d(e.$slots,"item",{item:i,index:l})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[_]]))),128))])),_:3},8,["style"])]),a("div",I,[a(S,{type:"button",icon:"pi pi-angle-right",onClick:g.moveToTarget},null,8,["onClick"]),a(S,{type:"button",icon:"pi pi-angle-double-right",onClick:g.moveAllToTarget},null,8,["onClick"]),a(S,{type:"button",icon:"pi pi-angle-left",onClick:g.moveToSource},null,8,["onClick"]),a(S,{type:"button",icon:"pi pi-angle-double-left",onClick:g.moveAllToSource},null,8,["onClick"])]),a("div",$,[e.$slots.targetHeader?(r(),c("div",V,[d(e.$slots,"targetHeader")])):p("",!0),a(u,{ref:"targetList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-target",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:h((()=>[(r(!0),c(m,null,f(g.targetList,((i,l)=>k((r(),c("li",{key:g.getItemKey(i,l),tabindex:"0",class:["p-picklist-item",{"p-highlight":g.isSelected(i,1)}],onClick:e=>g.onItemClick(e,i,1),onDblclick:e=>g.onItemDblClick(e,i,1),onKeydown:e=>g.onItemKeyDown(e,i,1),onTouchend:t[6]||(t[6]=(...e)=>g.onItemTouchEnd&&g.onItemTouchEnd(...e)),role:"option","aria-selected":g.isSelected(i,1)},[d(e.$slots,"item",{item:i,index:l})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[_]]))),128))])),_:3},8,["style"])]),a("div",w,[a(S,{type:"button",icon:"pi pi-angle-up",onClick:t[7]||(t[7]=e=>g.moveUp(e,1))}),a(S,{type:"button",icon:"pi pi-angle-double-up",onClick:t[8]||(t[8]=e=>g.moveTop(e,1))}),a(S,{type:"button",icon:"pi pi-angle-down",onClick:t[9]||(t[9]=e=>g.moveDown(e,1))}),a(S,{type:"button",icon:"pi pi-angle-double-down",onClick:t[10]||(t[10]=e=>g.moveBottom(e,1))})])])};export default g;
1
+ import e from"primevue/button";import{ObjectUtils as t,DomHandler as i,UniqueComponentId as l}from"primevue/utils";import n from"primevue/ripple";import{resolveComponent as o,resolveDirective as s,openBlock as r,createBlock as c,createVNode as a,renderSlot as d,createCommentVNode as p,TransitionGroup as u,withCtx as h,Fragment as m,renderList as f,withDirectives as k}from"vue";var g={name:"PickList",emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source"],props:{modelValue:{type:Array,default:()=>[[],[]]},selection:{type:Array,default:()=>[[],[]]},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},updated(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount(){this.destroyStyle()},mounted(){this.responsive&&this.createStyle()},watch:{selection(e){this.d_selection=e}},methods:{getItemKey(e,i){return this.dataKey?t.resolveFieldData(e,this.dataKey):i},isSelected(e,i){return-1!=t.findIndexInList(e,this.d_selection[i])},moveUp(e,i){if(this.d_selection&&this.d_selection[i]){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.findIndexInList(i,l);if(0===o)break;{let e=l[o],t=l[o-1];l[o-1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="up",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveTop(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.findIndexInList(i,l);if(0===o)break;{let e=l.splice(o,1)[0];l.unshift(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="top",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveDown(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.findIndexInList(i,l);if(o===l.length-1)break;{let e=l[o],t=l[o+1];l[o+1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="down",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveBottom(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.findIndexInList(i,l);if(o===l.length-1)break;{let e=l.splice(o,1)[0];l.push(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="bottom",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveToTarget(e){let i=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.findIndexInList(o,n)&&n.push(l.splice(t.findIndexInList(o,l),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-target",{originalEvent:e,items:i}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget(e){if(this.modelValue[0]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[...i,...t],t=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource(e){let i=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.findIndexInList(o,l)&&l.push(n.splice(t.findIndexInList(o,n),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-source",{originalEvent:e,items:i}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource(e){if(this.modelValue[1]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[...t,...i],i=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick(e,i,l){this.itemTouched=!1;const n=this.d_selection[l],o=t.findIndexInList(i,n),s=-1!=o;let r;if(!this.itemTouched&&this.metaKeySelection){let t=e.metaKey||e.ctrlKey;s&&t?r=n.filter(((e,t)=>t!==o)):(r=t&&n?[...n]:[],r.push(i))}else s?r=n.filter(((e,t)=>t!==o)):(r=n?[...n]:[],r.push(i));let c=[...this.d_selection];c[l]=r,this.d_selection=c,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick(e,t,i){0===i?this.moveToTarget(e):1===i&&this.moveToSource(e)},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(l);n&&n.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(l);o&&o.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let t=e.nextElementSibling;return t?i.hasClass(t,"p-picklist-item")?t:this.findNextItem(t):null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-picklist-item")?t:this.findPrevItem(t):null},updateListScroll(e){const t=i.find(e,".p-picklist-item.p-highlight");if(t&&t.length)switch(this.reorderDirection){case"up":i.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":i.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-picklist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-right:before {\n content: "\\e930"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-right:before {\n content: "\\e92c"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-left:before {\n content: "\\e933"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-left:before {\n content: "\\e92f"\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{sourceList(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:()=>l()},components:{PLButton:e},directives:{ripple:n}};const v={class:"p-picklist p-component"},b={class:"p-picklist-buttons p-picklist-source-controls"},y={class:"p-picklist-list-wrapper p-picklist-source-wrapper"},x={key:0,class:"p-picklist-header"},$={class:"p-picklist-buttons p-picklist-transfer-buttons"},I={class:"p-picklist-list-wrapper p-picklist-target-wrapper"},V={key:0,class:"p-picklist-header"},w={class:"p-picklist-buttons p-picklist-target-controls"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&l.firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-picklist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-picklist-buttons {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-picklist-list-wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n}\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n -webkit-transition: none !important;\n transition: none !important;\n}\n"),g.render=function(e,t,i,l,n,g){const S=o("PLButton"),_=s("ripple");return r(),c("div",v,[a("div",b,[d(e.$slots,"sourcecontrolsstart"),a(S,{type:"button",icon:"pi pi-angle-up",onClick:t[1]||(t[1]=e=>g.moveUp(e,0))}),a(S,{type:"button",icon:"pi pi-angle-double-up",onClick:t[2]||(t[2]=e=>g.moveTop(e,0))}),a(S,{type:"button",icon:"pi pi-angle-down",onClick:t[3]||(t[3]=e=>g.moveDown(e,0))}),a(S,{type:"button",icon:"pi pi-angle-double-down",onClick:t[4]||(t[4]=e=>g.moveBottom(e,0))}),d(e.$slots,"sourcecontrolsend")]),a("div",y,[e.$slots.sourceheader?(r(),c("div",x,[d(e.$slots,"sourceheader")])):p("",!0),a(u,{ref:"sourceList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-source",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:h((()=>[(r(!0),c(m,null,f(g.sourceList,((i,l)=>k((r(),c("li",{key:g.getItemKey(i,l),tabindex:"0",class:["p-picklist-item",{"p-highlight":g.isSelected(i,0)}],onClick:e=>g.onItemClick(e,i,0),onDblclick:e=>g.onItemDblClick(e,i,0),onKeydown:e=>g.onItemKeyDown(e,i,0),onTouchend:t[5]||(t[5]=(...e)=>g.onItemTouchEnd&&g.onItemTouchEnd(...e)),role:"option","aria-selected":g.isSelected(i,0)},[d(e.$slots,"item",{item:i,index:l})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[_]]))),128))])),_:3},8,["style"])]),a("div",$,[d(e.$slots,"movecontrolsstart"),a(S,{type:"button",icon:"pi pi-angle-right",onClick:g.moveToTarget},null,8,["onClick"]),a(S,{type:"button",icon:"pi pi-angle-double-right",onClick:g.moveAllToTarget},null,8,["onClick"]),a(S,{type:"button",icon:"pi pi-angle-left",onClick:g.moveToSource},null,8,["onClick"]),a(S,{type:"button",icon:"pi pi-angle-double-left",onClick:g.moveAllToSource},null,8,["onClick"]),d(e.$slots,"movecontrolsend")]),a("div",I,[e.$slots.targetheader?(r(),c("div",V,[d(e.$slots,"targetheader")])):p("",!0),a(u,{ref:"targetList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-target",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:h((()=>[(r(!0),c(m,null,f(g.targetList,((i,l)=>k((r(),c("li",{key:g.getItemKey(i,l),tabindex:"0",class:["p-picklist-item",{"p-highlight":g.isSelected(i,1)}],onClick:e=>g.onItemClick(e,i,1),onDblclick:e=>g.onItemDblClick(e,i,1),onKeydown:e=>g.onItemKeyDown(e,i,1),onTouchend:t[6]||(t[6]=(...e)=>g.onItemTouchEnd&&g.onItemTouchEnd(...e)),role:"option","aria-selected":g.isSelected(i,1)},[d(e.$slots,"item",{item:i,index:l})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[_]]))),128))])),_:3},8,["style"])]),a("div",w,[d(e.$slots,"targetcontrolsstart"),a(S,{type:"button",icon:"pi pi-angle-up",onClick:t[7]||(t[7]=e=>g.moveUp(e,1))}),a(S,{type:"button",icon:"pi pi-angle-double-up",onClick:t[8]||(t[8]=e=>g.moveTop(e,1))}),a(S,{type:"button",icon:"pi pi-angle-down",onClick:t[9]||(t[9]=e=>g.moveDown(e,1))}),a(S,{type:"button",icon:"pi pi-angle-double-down",onClick:t[10]||(t[10]=e=>g.moveBottom(e,1))}),d(e.$slots,"targetcontrolsend")])])};export default g;
@@ -532,6 +532,7 @@ this.primevue.picklist = (function (Button, utils, Ripple, vue) {
532
532
 
533
533
  return (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
534
534
  vue.createVNode("div", _hoisted_2, [
535
+ vue.renderSlot(_ctx.$slots, "sourcecontrolsstart"),
535
536
  vue.createVNode(_component_PLButton, {
536
537
  type: "button",
537
538
  icon: "pi pi-angle-up",
@@ -551,12 +552,13 @@ this.primevue.picklist = (function (Button, utils, Ripple, vue) {
551
552
  type: "button",
552
553
  icon: "pi pi-angle-double-down",
553
554
  onClick: _cache[4] || (_cache[4] = $event => ($options.moveBottom($event, 0)))
554
- })
555
+ }),
556
+ vue.renderSlot(_ctx.$slots, "sourcecontrolsend")
555
557
  ]),
556
558
  vue.createVNode("div", _hoisted_3, [
557
- (_ctx.$slots.sourceHeader)
559
+ (_ctx.$slots.sourceheader)
558
560
  ? (vue.openBlock(), vue.createBlock("div", _hoisted_4, [
559
- vue.renderSlot(_ctx.$slots, "sourceHeader")
561
+ vue.renderSlot(_ctx.$slots, "sourceheader")
560
562
  ]))
561
563
  : vue.createCommentVNode("", true),
562
564
  vue.createVNode(vue.TransitionGroup, {
@@ -594,6 +596,7 @@ this.primevue.picklist = (function (Button, utils, Ripple, vue) {
594
596
  }, 8, ["style"])
595
597
  ]),
596
598
  vue.createVNode("div", _hoisted_5, [
599
+ vue.renderSlot(_ctx.$slots, "movecontrolsstart"),
597
600
  vue.createVNode(_component_PLButton, {
598
601
  type: "button",
599
602
  icon: "pi pi-angle-right",
@@ -613,12 +616,13 @@ this.primevue.picklist = (function (Button, utils, Ripple, vue) {
613
616
  type: "button",
614
617
  icon: "pi pi-angle-double-left",
615
618
  onClick: $options.moveAllToSource
616
- }, null, 8, ["onClick"])
619
+ }, null, 8, ["onClick"]),
620
+ vue.renderSlot(_ctx.$slots, "movecontrolsend")
617
621
  ]),
618
622
  vue.createVNode("div", _hoisted_6, [
619
- (_ctx.$slots.targetHeader)
623
+ (_ctx.$slots.targetheader)
620
624
  ? (vue.openBlock(), vue.createBlock("div", _hoisted_7, [
621
- vue.renderSlot(_ctx.$slots, "targetHeader")
625
+ vue.renderSlot(_ctx.$slots, "targetheader")
622
626
  ]))
623
627
  : vue.createCommentVNode("", true),
624
628
  vue.createVNode(vue.TransitionGroup, {
@@ -656,6 +660,7 @@ this.primevue.picklist = (function (Button, utils, Ripple, vue) {
656
660
  }, 8, ["style"])
657
661
  ]),
658
662
  vue.createVNode("div", _hoisted_8, [
663
+ vue.renderSlot(_ctx.$slots, "targetcontrolsstart"),
659
664
  vue.createVNode(_component_PLButton, {
660
665
  type: "button",
661
666
  icon: "pi pi-angle-up",
@@ -675,7 +680,8 @@ this.primevue.picklist = (function (Button, utils, Ripple, vue) {
675
680
  type: "button",
676
681
  icon: "pi pi-angle-double-down",
677
682
  onClick: _cache[10] || (_cache[10] = $event => ($options.moveBottom($event, 1)))
678
- })
683
+ }),
684
+ vue.renderSlot(_ctx.$slots, "targetcontrolsend")
679
685
  ])
680
686
  ]))
681
687
  }
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.picklist=function(e,t,i,l){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),s=n(i),c={name:"PickList",emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source"],props:{modelValue:{type:Array,default:()=>[[],[]]},selection:{type:Array,default:()=>[[],[]]},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},updated(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount(){this.destroyStyle()},mounted(){this.responsive&&this.createStyle()},watch:{selection(e){this.d_selection=e}},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e,i){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection[i])},moveUp(e,i){if(this.d_selection&&this.d_selection[i]){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(0===o)break;{let e=l[o],t=l[o-1];l[o-1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="up",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveTop(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=0;e<n.length;e++){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(0===o)break;{let e=l.splice(o,1)[0];l.unshift(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="top",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveDown(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(o===l.length-1)break;{let e=l[o],t=l[o+1];l[o+1]=e,l[o]=t}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="down",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveBottom(e,i){if(this.d_selection){let l=[...this.modelValue[i]],n=this.d_selection[i];for(let e=n.length-1;e>=0;e--){let i=n[e],o=t.ObjectUtils.findIndexInList(i,l);if(o===l.length-1)break;{let e=l.splice(o,1)[0];l.push(e)}}let o=[...this.modelValue];o[i]=l,this.reorderDirection="bottom",this.$emit("update:modelValue",o),this.$emit("reorder",{originalEvent:e,value:o,direction:this.reorderDirection,listIndex:i})}},moveToTarget(e){let i=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.ObjectUtils.findIndexInList(o,n)&&n.push(l.splice(t.ObjectUtils.findIndexInList(o,l),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-target",{originalEvent:e,items:i}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget(e){if(this.modelValue[0]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[...i,...t],t=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource(e){let i=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,l=[...this.modelValue[0]],n=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let o=i[e];-1==t.ObjectUtils.findIndexInList(o,l)&&l.push(n.splice(t.ObjectUtils.findIndexInList(o,n),1)[0])}let o=[...this.modelValue];o[0]=l,o[1]=n,this.$emit("update:modelValue",o),this.$emit("move-to-source",{originalEvent:e,items:i}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource(e){if(this.modelValue[1]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[...t,...i],i=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick(e,i,l){this.itemTouched=!1;const n=this.d_selection[l],o=t.ObjectUtils.findIndexInList(i,n),s=-1!=o;let c;if(!this.itemTouched&&this.metaKeySelection){let t=e.metaKey||e.ctrlKey;s&&t?c=n.filter(((e,t)=>t!==o)):(c=t&&n?[...n]:[],c.push(i))}else s?c=n.filter(((e,t)=>t!==o)):(c=n?[...n]:[],c.push(i));let r=[...this.d_selection];r[l]=c,this.d_selection=r,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick(e,t,i){0===i?this.moveToTarget(e):1===i&&this.moveToSource(e)},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(l);n&&n.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(l);o&&o.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let i=e.nextElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findPrevItem(i):null},updateListScroll(e){const i=t.DomHandler.find(e,".p-picklist-item.p-highlight");if(i&&i.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(e,i[0]);break;case"top":e.scrollTop=0;break;case"down":t.DomHandler.scrollInView(e,i[i.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-picklist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-right:before {\n content: "\\e930"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-right:before {\n content: "\\e92c"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-left:before {\n content: "\\e933"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-left:before {\n content: "\\e92f"\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{sourceList(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:()=>t.UniqueComponentId()},components:{PLButton:o.default},directives:{ripple:s.default}};const r={class:"p-picklist p-component"},a={class:"p-picklist-buttons p-picklist-source-controls"},d={class:"p-picklist-list-wrapper p-picklist-source-wrapper"},p={key:0,class:"p-picklist-header"},u={class:"p-picklist-buttons p-picklist-transfer-buttons"},m={class:"p-picklist-list-wrapper p-picklist-target-wrapper"},h={key:0,class:"p-picklist-header"},k={class:"p-picklist-buttons p-picklist-target-controls"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&l.firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-picklist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-picklist-buttons {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-picklist-list-wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n}\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n -webkit-transition: none !important;\n transition: none !important;\n}\n"),c.render=function(e,t,i,n,o,s){const c=l.resolveComponent("PLButton"),f=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",r,[l.createVNode("div",a,[l.createVNode(c,{type:"button",icon:"pi pi-angle-up",onClick:t[1]||(t[1]=e=>s.moveUp(e,0))}),l.createVNode(c,{type:"button",icon:"pi pi-angle-double-up",onClick:t[2]||(t[2]=e=>s.moveTop(e,0))}),l.createVNode(c,{type:"button",icon:"pi pi-angle-down",onClick:t[3]||(t[3]=e=>s.moveDown(e,0))}),l.createVNode(c,{type:"button",icon:"pi pi-angle-double-down",onClick:t[4]||(t[4]=e=>s.moveBottom(e,0))})]),l.createVNode("div",d,[e.$slots.sourceHeader?(l.openBlock(),l.createBlock("div",p,[l.renderSlot(e.$slots,"sourceHeader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"sourceList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-source",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.sourceList,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,n),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,0)}],onClick:e=>s.onItemClick(e,i,0),onDblclick:e=>s.onItemDblClick(e,i,0),onKeydown:e=>s.onItemKeyDown(e,i,0),onTouchend:t[5]||(t[5]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,0)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",u,[l.createVNode(c,{type:"button",icon:"pi pi-angle-right",onClick:s.moveToTarget},null,8,["onClick"]),l.createVNode(c,{type:"button",icon:"pi pi-angle-double-right",onClick:s.moveAllToTarget},null,8,["onClick"]),l.createVNode(c,{type:"button",icon:"pi pi-angle-left",onClick:s.moveToSource},null,8,["onClick"]),l.createVNode(c,{type:"button",icon:"pi pi-angle-double-left",onClick:s.moveAllToSource},null,8,["onClick"])]),l.createVNode("div",m,[e.$slots.targetHeader?(l.openBlock(),l.createBlock("div",h,[l.renderSlot(e.$slots,"targetHeader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"targetList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-target",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.targetList,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,n),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,1)}],onClick:e=>s.onItemClick(e,i,1),onDblclick:e=>s.onItemDblClick(e,i,1),onKeydown:e=>s.onItemKeyDown(e,i,1),onTouchend:t[6]||(t[6]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,1)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",k,[l.createVNode(c,{type:"button",icon:"pi pi-angle-up",onClick:t[7]||(t[7]=e=>s.moveUp(e,1))}),l.createVNode(c,{type:"button",icon:"pi pi-angle-double-up",onClick:t[8]||(t[8]=e=>s.moveTop(e,1))}),l.createVNode(c,{type:"button",icon:"pi pi-angle-down",onClick:t[9]||(t[9]=e=>s.moveDown(e,1))}),l.createVNode(c,{type:"button",icon:"pi pi-angle-double-down",onClick:t[10]||(t[10]=e=>s.moveBottom(e,1))})])])},c}(primevue.button,primevue.utils,primevue.ripple,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.picklist=function(e,t,i,l){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(e),s=o(i),r={name:"PickList",emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source"],props:{modelValue:{type:Array,default:()=>[[],[]]},selection:{type:Array,default:()=>[[],[]]},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},updated(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount(){this.destroyStyle()},mounted(){this.responsive&&this.createStyle()},watch:{selection(e){this.d_selection=e}},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e,i){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection[i])},moveUp(e,i){if(this.d_selection&&this.d_selection[i]){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=0;e<o.length;e++){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(0===n)break;{let e=l[n],t=l[n-1];l[n-1]=e,l[n]=t}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="up",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveTop(e,i){if(this.d_selection){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=0;e<o.length;e++){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(0===n)break;{let e=l.splice(n,1)[0];l.unshift(e)}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="top",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveDown(e,i){if(this.d_selection){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=o.length-1;e>=0;e--){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(n===l.length-1)break;{let e=l[n],t=l[n+1];l[n+1]=e,l[n]=t}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="down",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveBottom(e,i){if(this.d_selection){let l=[...this.modelValue[i]],o=this.d_selection[i];for(let e=o.length-1;e>=0;e--){let i=o[e],n=t.ObjectUtils.findIndexInList(i,l);if(n===l.length-1)break;{let e=l.splice(n,1)[0];l.push(e)}}let n=[...this.modelValue];n[i]=l,this.reorderDirection="bottom",this.$emit("update:modelValue",n),this.$emit("reorder",{originalEvent:e,value:n,direction:this.reorderDirection,listIndex:i})}},moveToTarget(e){let i=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,l=[...this.modelValue[0]],o=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let n=i[e];-1==t.ObjectUtils.findIndexInList(n,o)&&o.push(l.splice(t.ObjectUtils.findIndexInList(n,l),1)[0])}let n=[...this.modelValue];n[0]=l,n[1]=o,this.$emit("update:modelValue",n),this.$emit("move-to-target",{originalEvent:e,items:i}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget(e){if(this.modelValue[0]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[...i,...t],t=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource(e){let i=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,l=[...this.modelValue[0]],o=[...this.modelValue[1]];if(i){for(let e=0;e<i.length;e++){let n=i[e];-1==t.ObjectUtils.findIndexInList(n,l)&&l.push(o.splice(t.ObjectUtils.findIndexInList(n,o),1)[0])}let n=[...this.modelValue];n[0]=l,n[1]=o,this.$emit("update:modelValue",n),this.$emit("move-to-source",{originalEvent:e,items:i}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource(e){if(this.modelValue[1]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[...t,...i],i=[];let l=[...this.modelValue];l[0]=t,l[1]=i,this.$emit("update:modelValue",l),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick(e,i,l){this.itemTouched=!1;const o=this.d_selection[l],n=t.ObjectUtils.findIndexInList(i,o),s=-1!=n;let r;if(!this.itemTouched&&this.metaKeySelection){let t=e.metaKey||e.ctrlKey;s&&t?r=o.filter(((e,t)=>t!==n)):(r=t&&o?[...o]:[],r.push(i))}else s?r=o.filter(((e,t)=>t!==n)):(r=o?[...o]:[],r.push(i));let c=[...this.d_selection];c[l]=r,this.d_selection=c,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick(e,t,i){0===i?this.moveToTarget(e):1===i&&this.moveToSource(e)},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var o=this.findNextItem(l);o&&o.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(l);n&&n.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let i=e.nextElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-picklist-item")?i:this.findPrevItem(i):null},updateListScroll(e){const i=t.DomHandler.find(e,".p-picklist-item.p-highlight");if(i&&i.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(e,i[0]);break;case"top":e.scrollTop=0;break;case"down":t.DomHandler.scrollInView(e,i[i.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-picklist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-right:before {\n content: "\\e930"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-right:before {\n content: "\\e92c"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-left:before {\n content: "\\e933"\n }\n\n .p-picklist[${this.attributeSelector}] .pi-angle-double-left:before {\n content: "\\e92f"\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{sourceList(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:()=>t.UniqueComponentId()},components:{PLButton:n.default},directives:{ripple:s.default}};const c={class:"p-picklist p-component"},a={class:"p-picklist-buttons p-picklist-source-controls"},d={class:"p-picklist-list-wrapper p-picklist-source-wrapper"},p={key:0,class:"p-picklist-header"},u={class:"p-picklist-buttons p-picklist-transfer-buttons"},h={class:"p-picklist-list-wrapper p-picklist-target-wrapper"},m={key:0,class:"p-picklist-header"},k={class:"p-picklist-buttons p-picklist-target-controls"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&l.firstChild?l.insertBefore(o,l.firstChild):l.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-picklist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-picklist-buttons {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-picklist-list-wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n}\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n -webkit-transition: none !important;\n transition: none !important;\n}\n"),r.render=function(e,t,i,o,n,s){const r=l.resolveComponent("PLButton"),f=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",c,[l.createVNode("div",a,[l.renderSlot(e.$slots,"sourcecontrolsstart"),l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:t[1]||(t[1]=e=>s.moveUp(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:t[2]||(t[2]=e=>s.moveTop(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:t[3]||(t[3]=e=>s.moveDown(e,0))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:t[4]||(t[4]=e=>s.moveBottom(e,0))}),l.renderSlot(e.$slots,"sourcecontrolsend")]),l.createVNode("div",d,[e.$slots.sourceheader?(l.openBlock(),l.createBlock("div",p,[l.renderSlot(e.$slots,"sourceheader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"sourceList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-source",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.sourceList,((i,o)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,o),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,0)}],onClick:e=>s.onItemClick(e,i,0),onDblclick:e=>s.onItemDblClick(e,i,0),onKeydown:e=>s.onItemKeyDown(e,i,0),onTouchend:t[5]||(t[5]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,0)},[l.renderSlot(e.$slots,"item",{item:i,index:o})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",u,[l.renderSlot(e.$slots,"movecontrolsstart"),l.createVNode(r,{type:"button",icon:"pi pi-angle-right",onClick:s.moveToTarget},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-right",onClick:s.moveAllToTarget},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-left",onClick:s.moveToSource},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-left",onClick:s.moveAllToSource},null,8,["onClick"]),l.renderSlot(e.$slots,"movecontrolsend")]),l.createVNode("div",h,[e.$slots.targetheader?(l.openBlock(),l.createBlock("div",m,[l.renderSlot(e.$slots,"targetheader")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"targetList",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-target",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(s.targetList,((i,o)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,o),tabindex:"0",class:["p-picklist-item",{"p-highlight":s.isSelected(i,1)}],onClick:e=>s.onItemClick(e,i,1),onDblclick:e=>s.onItemDblClick(e,i,1),onKeydown:e=>s.onItemKeyDown(e,i,1),onTouchend:t[6]||(t[6]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i,1)},[l.renderSlot(e.$slots,"item",{item:i,index:o})],42,["onClick","onDblclick","onKeydown","aria-selected"])),[[f]]))),128))])),_:3},8,["style"])]),l.createVNode("div",k,[l.renderSlot(e.$slots,"targetcontrolsstart"),l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:t[7]||(t[7]=e=>s.moveUp(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:t[8]||(t[8]=e=>s.moveTop(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:t[9]||(t[9]=e=>s.moveDown(e,1))}),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:t[10]||(t[10]=e=>s.moveBottom(e,1))}),l.renderSlot(e.$slots,"targetcontrolsend")])])},r}(primevue.button,primevue.utils,primevue.ripple,Vue);
@@ -1,8 +1,9 @@
1
1
  <template>
2
2
  <div role="progressbar" :class="containerClass" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100">
3
- <div v-if="determinate" class="p-progressbar-value p-progressbar-value-animate" :style="progressStyle"></div>
4
- <div v-if="determinate && (value !== null) && showValue" class="p-progressbar-label">
5
- <slot>{{value + '%'}}</slot>
3
+ <div v-if="determinate" class="p-progressbar-value p-progressbar-value-animate" :style="progressStyle">
4
+ <div v-if="(value != null && value !== 0) && showValue" class="p-progressbar-label">
5
+ <slot>{{value + '%'}}</slot>
6
+ </div>
6
7
  </div>
7
8
  <div v-if="indeterminate" class="p-progressbar-indeterminate-container">
8
9
  <div class="p-progressbar-value p-progressbar-value-animate"></div>
@@ -40,7 +41,7 @@ export default {
40
41
  progressStyle() {
41
42
  return {
42
43
  width: this.value + '%',
43
- display: 'block'
44
+ display: 'flex'
44
45
  };
45
46
  },
46
47
  indeterminate() {
@@ -65,18 +66,18 @@ export default {
65
66
  position: absolute;
66
67
  display: none;
67
68
  border: 0 none;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ overflow: hidden;
68
73
  }
69
74
 
70
- .p-progressbar-determinate .p-progressbar-value-animate {
71
- transition: width 1s ease-in-out;
75
+ .p-progressbar-determinate .p-progressbar-label {
76
+ display: inline-flex;
72
77
  }
73
78
 
74
- .p-progressbar-determinate .p-progressbar-label {
75
- text-align: center;
76
- height: 100%;
77
- width: 100%;
78
- position: absolute;
79
- font-weight: bold;
79
+ .p-progressbar-determinate .p-progressbar-value-animate {
80
+ transition: width 1s ease-in-out;
80
81
  }
81
82
 
82
83
  .p-progressbar-indeterminate .p-progressbar-value::before {
@@ -31,7 +31,7 @@ var script = {
31
31
  progressStyle() {
32
32
  return {
33
33
  width: this.value + '%',
34
- display: 'block'
34
+ display: 'flex'
35
35
  };
36
36
  },
37
37
  indeterminate() {
@@ -44,11 +44,11 @@ var script = {
44
44
  };
45
45
 
46
46
  const _hoisted_1 = {
47
- key: 1,
47
+ key: 0,
48
48
  class: "p-progressbar-label"
49
49
  };
50
50
  const _hoisted_2 = {
51
- key: 2,
51
+ key: 1,
52
52
  class: "p-progressbar-indeterminate-container"
53
53
  };
54
54
  const _hoisted_3 = /*#__PURE__*/vue.createVNode("div", { class: "p-progressbar-value p-progressbar-value-animate" }, null, -1);
@@ -66,14 +66,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
66
66
  key: 0,
67
67
  class: "p-progressbar-value p-progressbar-value-animate",
68
68
  style: $options.progressStyle
69
- }, null, 4))
70
- : vue.createCommentVNode("", true),
71
- ($options.determinate && ($props.value !== null) && $props.showValue)
72
- ? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
73
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
74
- vue.createTextVNode(vue.toDisplayString($props.value + '%'), 1)
75
- ])
76
- ]))
69
+ }, [
70
+ (($props.value != null && $props.value !== 0) && $props.showValue)
71
+ ? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
72
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
73
+ vue.createTextVNode(vue.toDisplayString($props.value + '%'), 1)
74
+ ])
75
+ ]))
76
+ : vue.createCommentVNode("", true)
77
+ ], 4))
77
78
  : vue.createCommentVNode("", true),
78
79
  ($options.indeterminate)
79
80
  ? (vue.openBlock(), vue.createBlock("div", _hoisted_2, [
@@ -110,7 +111,7 @@ function styleInject(css, ref) {
110
111
  }
111
112
  }
112
113
 
113
- var css_248z = "\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-determinate .p-progressbar-label {\n text-align: center;\n height: 100%;\n width: 100%;\n position: absolute;\n font-weight: bold;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n";
114
+ var css_248z = "\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n";
114
115
  styleInject(css_248z);
115
116
 
116
117
  script.render = render;
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),n={name:"ProgressBar",props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"block"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const t={key:1,class:"p-progressbar-label"},r={key:2,class:"p-progressbar-indeterminate-container"},i=e.createVNode("div",{class:"p-progressbar-value p-progressbar-value-animate"},null,-1);!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-determinate .p-progressbar-label {\n text-align: center;\n height: 100%;\n width: 100%;\n position: absolute;\n font-weight: bold;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),n.render=function(n,a,o,s,l,p){return e.openBlock(),e.createBlock("div",{role:"progressbar",class:p.containerClass,"aria-valuemin":"0","aria-valuenow":o.value,"aria-valuemax":"100"},[p.determinate?(e.openBlock(),e.createBlock("div",{key:0,class:"p-progressbar-value p-progressbar-value-animate",style:p.progressStyle},null,4)):e.createCommentVNode("",!0),p.determinate&&null!==o.value&&o.showValue?(e.openBlock(),e.createBlock("div",t,[e.renderSlot(n.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value+"%"),1)]))])):e.createCommentVNode("",!0),p.indeterminate?(e.openBlock(),e.createBlock("div",r,[i])):e.createCommentVNode("",!0)],10,["aria-valuenow"])},module.exports=n;
1
+ "use strict";var e=require("vue"),n={name:"ProgressBar",props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"flex"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const t={key:0,class:"p-progressbar-label"},r={key:1,class:"p-progressbar-indeterminate-container"},i=e.createVNode("div",{class:"p-progressbar-value p-progressbar-value-animate"},null,-1);!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),n.render=function(n,a,s,o,l,p){return e.openBlock(),e.createBlock("div",{role:"progressbar",class:p.containerClass,"aria-valuemin":"0","aria-valuenow":s.value,"aria-valuemax":"100"},[p.determinate?(e.openBlock(),e.createBlock("div",{key:0,class:"p-progressbar-value p-progressbar-value-animate",style:p.progressStyle},[null!=s.value&&0!==s.value&&s.showValue?(e.openBlock(),e.createBlock("div",t,[e.renderSlot(n.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(s.value+"%"),1)]))])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),p.indeterminate?(e.openBlock(),e.createBlock("div",r,[i])):e.createCommentVNode("",!0)],10,["aria-valuenow"])},module.exports=n;
@@ -1,4 +1,4 @@
1
- import { openBlock, createBlock, createCommentVNode, renderSlot, createTextVNode, toDisplayString, createVNode } from 'vue';
1
+ import { openBlock, createBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode } from 'vue';
2
2
 
3
3
  var script = {
4
4
  name: 'ProgressBar',
@@ -29,7 +29,7 @@ var script = {
29
29
  progressStyle() {
30
30
  return {
31
31
  width: this.value + '%',
32
- display: 'block'
32
+ display: 'flex'
33
33
  };
34
34
  },
35
35
  indeterminate() {
@@ -42,11 +42,11 @@ var script = {
42
42
  };
43
43
 
44
44
  const _hoisted_1 = {
45
- key: 1,
45
+ key: 0,
46
46
  class: "p-progressbar-label"
47
47
  };
48
48
  const _hoisted_2 = {
49
- key: 2,
49
+ key: 1,
50
50
  class: "p-progressbar-indeterminate-container"
51
51
  };
52
52
  const _hoisted_3 = /*#__PURE__*/createVNode("div", { class: "p-progressbar-value p-progressbar-value-animate" }, null, -1);
@@ -64,14 +64,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
64
64
  key: 0,
65
65
  class: "p-progressbar-value p-progressbar-value-animate",
66
66
  style: $options.progressStyle
67
- }, null, 4))
68
- : createCommentVNode("", true),
69
- ($options.determinate && ($props.value !== null) && $props.showValue)
70
- ? (openBlock(), createBlock("div", _hoisted_1, [
71
- renderSlot(_ctx.$slots, "default", {}, () => [
72
- createTextVNode(toDisplayString($props.value + '%'), 1)
73
- ])
74
- ]))
67
+ }, [
68
+ (($props.value != null && $props.value !== 0) && $props.showValue)
69
+ ? (openBlock(), createBlock("div", _hoisted_1, [
70
+ renderSlot(_ctx.$slots, "default", {}, () => [
71
+ createTextVNode(toDisplayString($props.value + '%'), 1)
72
+ ])
73
+ ]))
74
+ : createCommentVNode("", true)
75
+ ], 4))
75
76
  : createCommentVNode("", true),
76
77
  ($options.indeterminate)
77
78
  ? (openBlock(), createBlock("div", _hoisted_2, [
@@ -108,7 +109,7 @@ function styleInject(css, ref) {
108
109
  }
109
110
  }
110
111
 
111
- var css_248z = "\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-determinate .p-progressbar-label {\n text-align: center;\n height: 100%;\n width: 100%;\n position: absolute;\n font-weight: bold;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n";
112
+ var css_248z = "\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n";
112
113
  styleInject(css_248z);
113
114
 
114
115
  script.render = render;
@@ -1 +1 @@
1
- import{openBlock as e,createBlock as n,createCommentVNode as t,renderSlot as r,createTextVNode as i,toDisplayString as a,createVNode as s}from"vue";var o={name:"ProgressBar",props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"block"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const l={key:1,class:"p-progressbar-label"},p={key:2,class:"p-progressbar-indeterminate-container"},d=s("div",{class:"p-progressbar-value p-progressbar-value-animate"},null,-1);!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-determinate .p-progressbar-label {\n text-align: center;\n height: 100%;\n width: 100%;\n position: absolute;\n font-weight: bold;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),o.render=function(s,o,m,b,g,u){return e(),n("div",{role:"progressbar",class:u.containerClass,"aria-valuemin":"0","aria-valuenow":m.value,"aria-valuemax":"100"},[u.determinate?(e(),n("div",{key:0,class:"p-progressbar-value p-progressbar-value-animate",style:u.progressStyle},null,4)):t("",!0),u.determinate&&null!==m.value&&m.showValue?(e(),n("div",l,[r(s.$slots,"default",{},(()=>[i(a(m.value+"%"),1)]))])):t("",!0),u.indeterminate?(e(),n("div",p,[d])):t("",!0)],10,["aria-valuenow"])};export default o;
1
+ import{openBlock as e,createBlock as n,renderSlot as t,createTextVNode as r,toDisplayString as i,createCommentVNode as a,createVNode as s}from"vue";var o={name:"ProgressBar",props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"flex"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const l={key:0,class:"p-progressbar-label"},p={key:1,class:"p-progressbar-indeterminate-container"},d=s("div",{class:"p-progressbar-value p-progressbar-value-animate"},null,-1);!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n -webkit-transition: width 1s ease-in-out;\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),o.render=function(s,o,m,b,g,u){return e(),n("div",{role:"progressbar",class:u.containerClass,"aria-valuemin":"0","aria-valuenow":m.value,"aria-valuemax":"100"},[u.determinate?(e(),n("div",{key:0,class:"p-progressbar-value p-progressbar-value-animate",style:u.progressStyle},[null!=m.value&&0!==m.value&&m.showValue?(e(),n("div",l,[t(s.$slots,"default",{},(()=>[r(i(m.value+"%"),1)]))])):a("",!0)],4)):a("",!0),u.indeterminate?(e(),n("div",p,[d])):a("",!0)],10,["aria-valuenow"])};export default o;