primevue 3.8.2 → 3.11.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 (745) hide show
  1. package/README.md +2 -2
  2. package/accordion/Accordion.d.ts +74 -11
  3. package/accordion/accordion.esm.js +1 -1
  4. package/accordion/accordion.esm.min.js +1 -1
  5. package/accordion/accordion.js +1 -1
  6. package/accordiontab/AccordionTab.d.ts +37 -8
  7. package/accordiontab/accordiontab.esm.js +1 -1
  8. package/accordiontab/accordiontab.esm.min.js +1 -1
  9. package/accordiontab/accordiontab.js +1 -1
  10. package/api/Api.d.ts +292 -251
  11. package/api/api.cjs.js +66 -32
  12. package/api/api.cjs.min.js +1 -1
  13. package/api/api.esm.js +66 -32
  14. package/api/api.esm.min.js +1 -1
  15. package/api/api.js +67 -33
  16. package/api/api.min.js +1 -1
  17. package/autocomplete/AutoComplete.d.ts +280 -63
  18. package/autocomplete/AutoComplete.vue +16 -9
  19. package/autocomplete/autocomplete.cjs.js +23 -15
  20. package/autocomplete/autocomplete.cjs.min.js +1 -1
  21. package/autocomplete/autocomplete.esm.js +20 -12
  22. package/autocomplete/autocomplete.esm.min.js +1 -1
  23. package/autocomplete/autocomplete.js +24 -16
  24. package/autocomplete/autocomplete.min.js +1 -1
  25. package/avatar/Avatar.d.ts +57 -8
  26. package/avatar/avatar.esm.js +1 -1
  27. package/avatar/avatar.esm.min.js +1 -1
  28. package/avatar/avatar.js +1 -1
  29. package/avatargroup/AvatarGroup.d.ts +29 -3
  30. package/avatargroup/avatargroup.esm.js +1 -1
  31. package/avatargroup/avatargroup.esm.min.js +1 -1
  32. package/avatargroup/avatargroup.js +1 -1
  33. package/badge/Badge.d.ts +46 -5
  34. package/badge/badge.esm.js +1 -1
  35. package/badge/badge.esm.min.js +1 -1
  36. package/badge/badge.js +1 -1
  37. package/badgedirective/badgedirective.esm.js +1 -1
  38. package/badgedirective/badgedirective.esm.min.js +1 -1
  39. package/badgedirective/badgedirective.js +1 -1
  40. package/blockui/BlockUI.d.ts +52 -11
  41. package/blockui/blockui.esm.js +1 -1
  42. package/blockui/blockui.esm.min.js +1 -1
  43. package/blockui/blockui.js +1 -1
  44. package/breadcrumb/Breadcrumb.d.ts +49 -9
  45. package/breadcrumb/BreadcrumbItem.vue +5 -2
  46. package/breadcrumb/breadcrumb.cjs.js +5 -2
  47. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  48. package/breadcrumb/breadcrumb.esm.js +6 -3
  49. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  50. package/breadcrumb/breadcrumb.js +6 -3
  51. package/breadcrumb/breadcrumb.min.js +1 -1
  52. package/button/Button.d.ts +68 -11
  53. package/button/button.cjs.js +1 -1
  54. package/button/button.esm.js +1 -1
  55. package/button/button.esm.min.js +1 -1
  56. package/button/button.js +2 -2
  57. package/calendar/Calendar.d.ts +320 -58
  58. package/calendar/Calendar.vue +406 -84
  59. package/calendar/calendar.cjs.js +521 -204
  60. package/calendar/calendar.cjs.min.js +1 -1
  61. package/calendar/calendar.esm.js +521 -203
  62. package/calendar/calendar.esm.min.js +1 -1
  63. package/calendar/calendar.js +523 -205
  64. package/calendar/calendar.min.js +1 -1
  65. package/card/Card.d.ts +43 -9
  66. package/card/card.esm.js +1 -1
  67. package/card/card.esm.min.js +1 -1
  68. package/card/card.js +1 -1
  69. package/carousel/Carousel.d.ts +121 -24
  70. package/carousel/Carousel.vue +2 -2
  71. package/carousel/carousel.cjs.js +7 -7
  72. package/carousel/carousel.cjs.min.js +1 -1
  73. package/carousel/carousel.esm.js +7 -7
  74. package/carousel/carousel.esm.min.js +1 -1
  75. package/carousel/carousel.js +8 -8
  76. package/carousel/carousel.min.js +1 -1
  77. package/cascadeselect/CascadeSelect.d.ts +172 -35
  78. package/cascadeselect/cascadeselect.cjs.js +2 -2
  79. package/cascadeselect/cascadeselect.esm.js +1 -1
  80. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  81. package/cascadeselect/cascadeselect.js +3 -3
  82. package/chart/Chart.d.ts +104 -12
  83. package/chart/Chart.vue +18 -4
  84. package/chart/chart.cjs.js +20 -8
  85. package/chart/chart.cjs.min.js +1 -1
  86. package/chart/chart.esm.js +19 -5
  87. package/chart/chart.esm.min.js +1 -1
  88. package/chart/chart.js +19 -5
  89. package/chart/chart.min.js +1 -1
  90. package/checkbox/Checkbox.d.ts +66 -8
  91. package/checkbox/checkbox.esm.js +1 -1
  92. package/checkbox/checkbox.esm.min.js +1 -1
  93. package/checkbox/checkbox.js +1 -1
  94. package/chip/Chip.d.ts +50 -4
  95. package/chip/chip.esm.js +1 -1
  96. package/chip/chip.esm.min.js +1 -1
  97. package/chip/chip.js +1 -1
  98. package/chips/Chips.d.ts +88 -15
  99. package/chips/chips.esm.js +1 -1
  100. package/chips/chips.esm.min.js +1 -1
  101. package/chips/chips.js +1 -1
  102. package/colorpicker/ColorPicker.d.ts +105 -13
  103. package/colorpicker/ColorPicker.vue +6 -1
  104. package/colorpicker/colorpicker.cjs.js +7 -2
  105. package/colorpicker/colorpicker.cjs.min.js +1 -1
  106. package/colorpicker/colorpicker.esm.js +7 -2
  107. package/colorpicker/colorpicker.esm.min.js +1 -1
  108. package/colorpicker/colorpicker.js +8 -3
  109. package/colorpicker/colorpicker.min.js +1 -1
  110. package/column/Column.d.ts +448 -78
  111. package/column/column.esm.js +1 -1
  112. package/column/column.esm.min.js +1 -1
  113. package/column/column.js +1 -1
  114. package/columngroup/ColumnGroup.d.ts +30 -4
  115. package/columngroup/columngroup.esm.js +1 -1
  116. package/columngroup/columngroup.esm.min.js +1 -1
  117. package/columngroup/columngroup.js +1 -1
  118. package/config/config.cjs.js +1 -1
  119. package/config/config.esm.js +1 -2
  120. package/config/config.esm.min.js +1 -1
  121. package/config/config.js +2 -2
  122. package/confirmationeventbus/confirmationeventbus.esm.js +1 -1
  123. package/confirmationeventbus/confirmationeventbus.esm.min.js +1 -1
  124. package/confirmationeventbus/confirmationeventbus.js +1 -1
  125. package/confirmationoptions/ConfirmationOptions.d.ts +58 -0
  126. package/confirmationoptions/package.json +3 -0
  127. package/confirmationservice/ConfirmationService.d.ts +2 -1
  128. package/confirmationservice/confirmationservice.cjs.js +2 -2
  129. package/confirmationservice/confirmationservice.esm.js +1 -1
  130. package/confirmationservice/confirmationservice.esm.min.js +1 -1
  131. package/confirmationservice/confirmationservice.js +3 -3
  132. package/confirmdialog/ConfirmDialog.d.ts +57 -5
  133. package/confirmdialog/ConfirmDialog.vue +8 -2
  134. package/confirmdialog/confirmdialog.cjs.js +17 -10
  135. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  136. package/confirmdialog/confirmdialog.esm.js +12 -5
  137. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  138. package/confirmdialog/confirmdialog.js +18 -11
  139. package/confirmdialog/confirmdialog.min.js +1 -1
  140. package/confirmpopup/ConfirmPopup.d.ts +41 -3
  141. package/confirmpopup/ConfirmPopup.vue +7 -4
  142. package/confirmpopup/confirmpopup.cjs.js +19 -11
  143. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  144. package/confirmpopup/confirmpopup.esm.js +15 -7
  145. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  146. package/confirmpopup/confirmpopup.js +20 -12
  147. package/confirmpopup/confirmpopup.min.js +1 -1
  148. package/contextmenu/ContextMenu.d.ts +88 -16
  149. package/contextmenu/ContextMenuSub.vue +7 -4
  150. package/contextmenu/contextmenu.cjs.js +8 -5
  151. package/contextmenu/contextmenu.cjs.min.js +1 -1
  152. package/contextmenu/contextmenu.esm.js +8 -5
  153. package/contextmenu/contextmenu.esm.min.js +1 -1
  154. package/contextmenu/contextmenu.js +9 -6
  155. package/contextmenu/contextmenu.min.js +1 -1
  156. package/core/core.js +861 -383
  157. package/core/core.min.js +15 -13
  158. package/datatable/BodyCell.vue +27 -1
  159. package/datatable/ColumnFilter.vue +17 -6
  160. package/datatable/DataTable.d.ts +1056 -130
  161. package/datatable/DataTable.vue +150 -131
  162. package/datatable/HeaderCheckbox.vue +5 -2
  163. package/datatable/RowCheckbox.vue +1 -1
  164. package/datatable/RowRadioButton.vue +1 -1
  165. package/datatable/TableBody.vue +57 -14
  166. package/datatable/TableFooter.vue +15 -1
  167. package/datatable/TableHeader.vue +15 -1
  168. package/datatable/datatable.cjs.js +542 -381
  169. package/datatable/datatable.cjs.min.js +1 -1
  170. package/datatable/datatable.esm.js +533 -373
  171. package/datatable/datatable.esm.min.js +1 -1
  172. package/datatable/datatable.js +543 -383
  173. package/datatable/datatable.min.js +1 -1
  174. package/dataview/DataView.d.ts +198 -32
  175. package/dataview/DataView.vue +8 -8
  176. package/dataview/dataview.cjs.js +13 -13
  177. package/dataview/dataview.cjs.min.js +1 -1
  178. package/dataview/dataview.esm.js +13 -13
  179. package/dataview/dataview.esm.min.js +1 -1
  180. package/dataview/dataview.js +14 -14
  181. package/dataview/dataview.min.js +1 -1
  182. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +34 -5
  183. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +1 -1
  184. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
  185. package/dataviewlayoutoptions/dataviewlayoutoptions.js +1 -1
  186. package/deferredcontent/DeferredContent.d.ts +31 -6
  187. package/deferredcontent/deferredcontent.esm.js +1 -1
  188. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  189. package/deferredcontent/deferredcontent.js +1 -1
  190. package/dialog/Dialog.d.ts +187 -34
  191. package/dialog/Dialog.vue +1 -1
  192. package/dialog/dialog.cjs.js +2 -3
  193. package/dialog/dialog.cjs.min.js +1 -1
  194. package/dialog/dialog.esm.js +2 -3
  195. package/dialog/dialog.esm.min.js +1 -1
  196. package/dialog/dialog.js +3 -4
  197. package/dialog/dialog.min.js +1 -1
  198. package/divider/Divider.d.ts +53 -8
  199. package/divider/divider.esm.js +1 -1
  200. package/divider/divider.esm.min.js +1 -1
  201. package/divider/divider.js +1 -1
  202. package/dock/Dock.d.ts +92 -15
  203. package/dock/DockSub.vue +3 -1
  204. package/dock/dock.cjs.js +4 -1
  205. package/dock/dock.cjs.min.js +1 -1
  206. package/dock/dock.esm.js +4 -2
  207. package/dock/dock.esm.min.js +1 -1
  208. package/dock/dock.js +5 -3
  209. package/dock/dock.min.js +1 -1
  210. package/dropdown/Dropdown.d.ts +340 -76
  211. package/dropdown/Dropdown.vue +1 -1
  212. package/dropdown/dropdown.cjs.js +4 -4
  213. package/dropdown/dropdown.cjs.min.js +1 -1
  214. package/dropdown/dropdown.esm.js +2 -2
  215. package/dropdown/dropdown.esm.min.js +1 -1
  216. package/dropdown/dropdown.js +5 -5
  217. package/dropdown/dropdown.min.js +1 -1
  218. package/editor/Editor.d.ts +78 -11
  219. package/editor/editor.cjs.js +1 -1
  220. package/editor/editor.esm.js +1 -1
  221. package/editor/editor.esm.min.js +1 -1
  222. package/editor/editor.js +2 -2
  223. package/fieldset/Fieldset.d.ts +63 -11
  224. package/fieldset/fieldset.cjs.js +1 -1
  225. package/fieldset/fieldset.esm.js +1 -1
  226. package/fieldset/fieldset.esm.min.js +1 -1
  227. package/fieldset/fieldset.js +2 -2
  228. package/fileupload/FileUpload.d.ts +255 -37
  229. package/fileupload/fileupload.cjs.js +4 -4
  230. package/fileupload/fileupload.esm.js +1 -1
  231. package/fileupload/fileupload.esm.min.js +1 -1
  232. package/fileupload/fileupload.js +5 -5
  233. package/fullcalendar/FullCalendar.d.ts +29 -3
  234. package/fullcalendar/fullcalendar.esm.js +1 -1
  235. package/fullcalendar/fullcalendar.esm.min.js +1 -1
  236. package/fullcalendar/fullcalendar.js +1 -1
  237. package/galleria/Galleria.d.ts +196 -46
  238. package/galleria/galleria.cjs.js +3 -3
  239. package/galleria/galleria.esm.js +1 -1
  240. package/galleria/galleria.esm.min.js +1 -1
  241. package/galleria/galleria.js +4 -4
  242. package/image/Image.d.ts +51 -6
  243. package/image/image.esm.js +1 -1
  244. package/image/image.esm.min.js +1 -1
  245. package/image/image.js +1 -1
  246. package/inlinemessage/InlineMessage.d.ts +34 -6
  247. package/inlinemessage/inlinemessage.esm.js +1 -1
  248. package/inlinemessage/inlinemessage.esm.min.js +1 -1
  249. package/inlinemessage/inlinemessage.js +1 -1
  250. package/inplace/Inplace.d.ts +57 -12
  251. package/inplace/inplace.cjs.js +1 -1
  252. package/inplace/inplace.esm.js +1 -1
  253. package/inplace/inplace.esm.min.js +1 -1
  254. package/inplace/inplace.js +2 -2
  255. package/inputmask/InputMask.d.ts +75 -15
  256. package/inputmask/inputmask.esm.js +1 -1
  257. package/inputmask/inputmask.esm.min.js +1 -1
  258. package/inputmask/inputmask.js +1 -1
  259. package/inputnumber/InputNumber.d.ts +180 -30
  260. package/inputnumber/InputNumber.vue +19 -3
  261. package/inputnumber/inputnumber.cjs.js +21 -5
  262. package/inputnumber/inputnumber.cjs.min.js +1 -1
  263. package/inputnumber/inputnumber.esm.js +20 -4
  264. package/inputnumber/inputnumber.esm.min.js +1 -1
  265. package/inputnumber/inputnumber.js +22 -6
  266. package/inputnumber/inputnumber.min.js +1 -1
  267. package/inputswitch/InputSwitch.d.ts +61 -9
  268. package/inputswitch/inputswitch.esm.js +1 -1
  269. package/inputswitch/inputswitch.esm.min.js +1 -1
  270. package/inputswitch/inputswitch.js +1 -1
  271. package/inputtext/InputText.d.ts +34 -5
  272. package/inputtext/InputText.vue +1 -1
  273. package/inputtext/inputtext.cjs.js +2 -2
  274. package/inputtext/inputtext.cjs.min.js +1 -1
  275. package/inputtext/inputtext.esm.js +4 -4
  276. package/inputtext/inputtext.esm.min.js +1 -1
  277. package/inputtext/inputtext.js +3 -3
  278. package/inputtext/inputtext.min.js +1 -1
  279. package/knob/Knob.d.ts +92 -18
  280. package/knob/knob.esm.js +1 -1
  281. package/knob/knob.esm.min.js +1 -1
  282. package/knob/knob.js +1 -1
  283. package/listbox/Listbox.d.ts +246 -56
  284. package/listbox/listbox.cjs.js +2 -2
  285. package/listbox/listbox.esm.js +1 -1
  286. package/listbox/listbox.esm.min.js +1 -1
  287. package/listbox/listbox.js +3 -3
  288. package/megamenu/MegaMenu.d.ts +60 -12
  289. package/megamenu/MegaMenu.vue +10 -7
  290. package/megamenu/megamenu.cjs.js +11 -8
  291. package/megamenu/megamenu.cjs.min.js +1 -1
  292. package/megamenu/megamenu.esm.js +11 -8
  293. package/megamenu/megamenu.esm.min.js +1 -1
  294. package/megamenu/megamenu.js +12 -9
  295. package/megamenu/megamenu.min.js +1 -1
  296. package/menu/Menu.d.ts +84 -15
  297. package/menu/Menu.vue +6 -3
  298. package/menu/Menuitem.vue +5 -2
  299. package/menu/menu.cjs.js +13 -7
  300. package/menu/menu.cjs.min.js +1 -1
  301. package/menu/menu.esm.js +12 -6
  302. package/menu/menu.esm.min.js +1 -1
  303. package/menu/menu.js +14 -8
  304. package/menu/menu.min.js +1 -1
  305. package/menubar/Menubar.d.ts +52 -11
  306. package/menubar/Menubar.vue +1 -0
  307. package/menubar/MenubarSub.vue +7 -4
  308. package/menubar/menubar.cjs.js +9 -6
  309. package/menubar/menubar.cjs.min.js +1 -1
  310. package/menubar/menubar.esm.js +9 -6
  311. package/menubar/menubar.esm.min.js +1 -1
  312. package/menubar/menubar.js +10 -7
  313. package/menubar/menubar.min.js +1 -1
  314. package/menuitem/MenuItem.d.ts +82 -0
  315. package/menuitem/package.json +3 -0
  316. package/message/Message.d.ts +57 -10
  317. package/message/Message.vue +6 -2
  318. package/message/message.cjs.js +7 -3
  319. package/message/message.cjs.min.js +1 -1
  320. package/message/message.esm.js +7 -3
  321. package/message/message.esm.min.js +1 -1
  322. package/message/message.js +8 -4
  323. package/message/message.min.js +1 -1
  324. package/multiselect/MultiSelect.d.ts +368 -83
  325. package/multiselect/multiselect.cjs.js +3 -3
  326. package/multiselect/multiselect.esm.js +1 -1
  327. package/multiselect/multiselect.esm.min.js +1 -1
  328. package/multiselect/multiselect.js +4 -4
  329. package/orderlist/OrderList.d.ts +122 -17
  330. package/orderlist/OrderList.vue +2 -0
  331. package/orderlist/orderlist.cjs.js +5 -3
  332. package/orderlist/orderlist.cjs.min.js +1 -1
  333. package/orderlist/orderlist.esm.js +4 -2
  334. package/orderlist/orderlist.esm.min.js +1 -1
  335. package/orderlist/orderlist.js +6 -4
  336. package/orderlist/orderlist.min.js +1 -1
  337. package/organizationchart/OrganizationChart.d.ts +137 -15
  338. package/organizationchart/OrganizationChart.vue +1 -0
  339. package/organizationchart/organizationchart.cjs.js +1 -1
  340. package/organizationchart/organizationchart.cjs.min.js +1 -1
  341. package/organizationchart/organizationchart.esm.js +2 -2
  342. package/organizationchart/organizationchart.esm.min.js +1 -1
  343. package/organizationchart/organizationchart.js +2 -2
  344. package/organizationchart/organizationchart.min.js +1 -1
  345. package/overlayeventbus/overlayeventbus.esm.js +1 -1
  346. package/overlayeventbus/overlayeventbus.esm.min.js +1 -1
  347. package/overlayeventbus/overlayeventbus.js +1 -1
  348. package/overlaypanel/OverlayPanel.d.ts +107 -12
  349. package/overlaypanel/overlaypanel.cjs.js +5 -5
  350. package/overlaypanel/overlaypanel.esm.js +1 -1
  351. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  352. package/overlaypanel/overlaypanel.js +6 -6
  353. package/package.json +5 -1
  354. package/paginator/Paginator.d.ts +129 -27
  355. package/paginator/Paginator.vue +4 -4
  356. package/paginator/paginator.cjs.js +12 -12
  357. package/paginator/paginator.cjs.min.js +1 -1
  358. package/paginator/paginator.esm.js +5 -5
  359. package/paginator/paginator.esm.min.js +1 -1
  360. package/paginator/paginator.js +13 -13
  361. package/paginator/paginator.min.js +1 -1
  362. package/panel/Panel.d.ts +64 -8
  363. package/panel/Panel.vue +1 -1
  364. package/panel/panel.cjs.js +1 -1
  365. package/panel/panel.esm.js +1 -1
  366. package/panel/panel.esm.min.js +1 -1
  367. package/panel/panel.js +2 -2
  368. package/panelmenu/PanelMenu.d.ts +59 -11
  369. package/panelmenu/PanelMenu.vue +8 -5
  370. package/panelmenu/PanelMenuSub.vue +8 -5
  371. package/panelmenu/panelmenu.cjs.js +18 -12
  372. package/panelmenu/panelmenu.cjs.min.js +1 -1
  373. package/panelmenu/panelmenu.esm.js +19 -13
  374. package/panelmenu/panelmenu.esm.min.js +1 -1
  375. package/panelmenu/panelmenu.js +19 -13
  376. package/panelmenu/panelmenu.min.js +1 -1
  377. package/password/Password.d.ts +115 -24
  378. package/password/password.cjs.js +2 -2
  379. package/password/password.esm.js +1 -1
  380. package/password/password.esm.min.js +1 -1
  381. package/password/password.js +3 -3
  382. package/picklist/PickList.d.ts +199 -26
  383. package/picklist/PickList.vue +10 -4
  384. package/picklist/picklist.cjs.js +15 -9
  385. package/picklist/picklist.cjs.min.js +1 -1
  386. package/picklist/picklist.esm.js +14 -8
  387. package/picklist/picklist.esm.min.js +1 -1
  388. package/picklist/picklist.js +16 -10
  389. package/picklist/picklist.min.js +1 -1
  390. package/progressbar/ProgressBar.d.ts +43 -8
  391. package/progressbar/ProgressBar.vue +13 -12
  392. package/progressbar/progressbar.cjs.js +13 -12
  393. package/progressbar/progressbar.cjs.min.js +1 -1
  394. package/progressbar/progressbar.esm.js +15 -14
  395. package/progressbar/progressbar.esm.min.js +1 -1
  396. package/progressbar/progressbar.js +14 -13
  397. package/progressbar/progressbar.min.js +1 -1
  398. package/progressspinner/ProgressSpinner.d.ts +39 -6
  399. package/progressspinner/progressspinner.esm.js +1 -1
  400. package/progressspinner/progressspinner.esm.min.js +1 -1
  401. package/progressspinner/progressspinner.js +1 -1
  402. package/radiobutton/RadioButton.d.ts +52 -7
  403. package/radiobutton/radiobutton.esm.js +1 -1
  404. package/radiobutton/radiobutton.esm.min.js +1 -1
  405. package/radiobutton/radiobutton.js +1 -1
  406. package/rating/Rating.d.ts +67 -10
  407. package/rating/Rating.vue +1 -1
  408. package/rating/rating.cjs.js +1 -1
  409. package/rating/rating.cjs.min.js +1 -1
  410. package/rating/rating.esm.js +2 -2
  411. package/rating/rating.esm.min.js +1 -1
  412. package/rating/rating.js +2 -2
  413. package/rating/rating.min.js +1 -1
  414. package/resources/primevue.css +5 -0
  415. package/resources/primevue.min.css +1 -1
  416. package/resources/themes/arya-blue/theme.css +81 -33
  417. package/resources/themes/arya-green/theme.css +81 -33
  418. package/resources/themes/arya-orange/theme.css +81 -33
  419. package/resources/themes/arya-purple/theme.css +81 -33
  420. package/resources/themes/bootstrap4-dark-blue/theme.css +62 -21
  421. package/resources/themes/bootstrap4-dark-purple/theme.css +62 -21
  422. package/resources/themes/bootstrap4-light-blue/theme.css +62 -21
  423. package/resources/themes/bootstrap4-light-purple/theme.css +62 -21
  424. package/resources/themes/fluent-light/theme.css +81 -33
  425. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
  426. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
  427. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
  428. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
  429. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
  430. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
  431. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
  432. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
  433. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
  434. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
  435. package/resources/themes/lara-dark-blue/theme.css +5421 -0
  436. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
  437. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
  438. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
  439. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
  440. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
  441. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
  442. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
  443. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
  444. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
  445. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  446. package/resources/themes/lara-dark-indigo/theme.css +5421 -0
  447. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
  448. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
  449. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
  450. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
  451. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
  452. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
  453. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
  454. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
  455. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
  456. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
  457. package/resources/themes/lara-dark-purple/theme.css +5421 -0
  458. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
  459. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
  460. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
  461. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
  462. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
  463. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
  464. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
  465. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
  466. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
  467. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
  468. package/resources/themes/lara-dark-teal/theme.css +5421 -0
  469. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
  470. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
  471. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
  472. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
  473. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
  474. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
  475. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
  476. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
  477. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
  478. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
  479. package/resources/themes/lara-light-blue/theme.css +5421 -0
  480. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
  481. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
  482. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
  483. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
  484. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
  485. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
  486. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
  487. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
  488. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
  489. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  490. package/resources/themes/lara-light-indigo/theme.css +5421 -0
  491. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
  492. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
  493. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
  494. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
  495. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
  496. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
  497. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
  498. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
  499. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
  500. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
  501. package/resources/themes/lara-light-purple/theme.css +5421 -0
  502. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
  503. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
  504. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
  505. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
  506. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
  507. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
  508. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
  509. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
  510. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
  511. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
  512. package/resources/themes/lara-light-teal/theme.css +5421 -0
  513. package/resources/themes/luna-amber/theme.css +78 -37
  514. package/resources/themes/luna-blue/theme.css +78 -37
  515. package/resources/themes/luna-green/theme.css +78 -37
  516. package/resources/themes/luna-pink/theme.css +78 -37
  517. package/resources/themes/md-dark-deeppurple/theme.css +252 -48
  518. package/resources/themes/md-dark-indigo/theme.css +252 -48
  519. package/resources/themes/md-light-deeppurple/theme.css +252 -48
  520. package/resources/themes/md-light-indigo/theme.css +252 -48
  521. package/resources/themes/mdc-dark-deeppurple/theme.css +252 -48
  522. package/resources/themes/mdc-dark-indigo/theme.css +252 -48
  523. package/resources/themes/mdc-light-deeppurple/theme.css +252 -48
  524. package/resources/themes/mdc-light-indigo/theme.css +252 -48
  525. package/resources/themes/nova/theme.css +78 -37
  526. package/resources/themes/nova-accent/theme.css +78 -37
  527. package/resources/themes/nova-alt/theme.css +78 -37
  528. package/resources/themes/nova-vue/theme.css +78 -37
  529. package/resources/themes/rhea/theme.css +78 -37
  530. package/resources/themes/saga-blue/theme.css +65 -17
  531. package/resources/themes/saga-green/theme.css +65 -17
  532. package/resources/themes/saga-orange/theme.css +65 -17
  533. package/resources/themes/saga-purple/theme.css +65 -17
  534. package/resources/themes/tailwind-light/theme.css +92 -36
  535. package/resources/themes/vela-blue/theme.css +81 -33
  536. package/resources/themes/vela-green/theme.css +81 -33
  537. package/resources/themes/vela-orange/theme.css +81 -33
  538. package/resources/themes/vela-purple/theme.css +81 -33
  539. package/ripple/ripple.esm.js +1 -1
  540. package/ripple/ripple.esm.min.js +1 -1
  541. package/ripple/ripple.js +1 -1
  542. package/row/Row.d.ts +25 -3
  543. package/row/row.esm.js +1 -1
  544. package/row/row.esm.min.js +1 -1
  545. package/row/row.js +1 -1
  546. package/scrollpanel/ScrollPanel.d.ts +27 -5
  547. package/scrollpanel/scrollpanel.esm.js +1 -1
  548. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  549. package/scrollpanel/scrollpanel.js +1 -1
  550. package/scrolltop/ScrollTop.d.ts +47 -7
  551. package/scrolltop/scrolltop.esm.js +1 -1
  552. package/scrolltop/scrolltop.esm.min.js +1 -1
  553. package/scrolltop/scrolltop.js +1 -1
  554. package/selectbutton/SelectButton.d.ts +108 -19
  555. package/selectbutton/SelectButton.vue +8 -2
  556. package/selectbutton/selectbutton.cjs.js +15 -10
  557. package/selectbutton/selectbutton.cjs.min.js +1 -1
  558. package/selectbutton/selectbutton.esm.js +15 -10
  559. package/selectbutton/selectbutton.esm.min.js +1 -1
  560. package/selectbutton/selectbutton.js +16 -11
  561. package/selectbutton/selectbutton.min.js +1 -1
  562. package/sidebar/Sidebar.d.ts +81 -16
  563. package/sidebar/sidebar.cjs.js +1 -1
  564. package/sidebar/sidebar.esm.js +1 -1
  565. package/sidebar/sidebar.esm.min.js +1 -1
  566. package/sidebar/sidebar.js +2 -2
  567. package/skeleton/Skeleton.d.ts +58 -9
  568. package/skeleton/skeleton.esm.js +1 -1
  569. package/skeleton/skeleton.esm.min.js +1 -1
  570. package/skeleton/skeleton.js +1 -1
  571. package/slider/Slider.d.ts +90 -14
  572. package/slider/slider.esm.js +1 -1
  573. package/slider/slider.esm.min.js +1 -1
  574. package/slider/slider.js +1 -1
  575. package/speeddial/SpeedDial.d.ts +166 -29
  576. package/speeddial/SpeedDial.vue +3 -1
  577. package/speeddial/speeddial.cjs.js +5 -2
  578. package/speeddial/speeddial.cjs.min.js +1 -1
  579. package/speeddial/speeddial.esm.js +4 -2
  580. package/speeddial/speeddial.esm.min.js +1 -1
  581. package/speeddial/speeddial.js +6 -4
  582. package/speeddial/speeddial.min.js +1 -1
  583. package/splitbutton/SplitButton.d.ts +76 -11
  584. package/splitbutton/SplitButton.vue +3 -1
  585. package/splitbutton/splitbutton.cjs.js +15 -13
  586. package/splitbutton/splitbutton.cjs.min.js +1 -1
  587. package/splitbutton/splitbutton.esm.js +15 -13
  588. package/splitbutton/splitbutton.esm.min.js +1 -1
  589. package/splitbutton/splitbutton.js +16 -14
  590. package/splitbutton/splitbutton.min.js +1 -1
  591. package/splitter/Splitter.d.ts +74 -7
  592. package/splitter/Splitter.vue +5 -5
  593. package/splitter/splitter.cjs.js +1 -1
  594. package/splitter/splitter.cjs.min.js +1 -1
  595. package/splitter/splitter.esm.js +2 -2
  596. package/splitter/splitter.esm.min.js +1 -1
  597. package/splitter/splitter.js +2 -2
  598. package/splitter/splitter.min.js +1 -1
  599. package/splitterpanel/SplitterPanel.d.ts +34 -7
  600. package/splitterpanel/splitterpanel.esm.js +1 -1
  601. package/splitterpanel/splitterpanel.esm.min.js +1 -1
  602. package/splitterpanel/splitterpanel.js +1 -1
  603. package/steps/Steps.d.ts +51 -11
  604. package/steps/Steps.vue +5 -2
  605. package/steps/steps.cjs.js +5 -2
  606. package/steps/steps.cjs.min.js +1 -1
  607. package/steps/steps.esm.js +6 -3
  608. package/steps/steps.esm.min.js +1 -1
  609. package/steps/steps.js +6 -3
  610. package/steps/steps.min.js +1 -1
  611. package/styleclass/styleclass.esm.js +1 -1
  612. package/styleclass/styleclass.esm.min.js +1 -1
  613. package/styleclass/styleclass.js +1 -1
  614. package/tabmenu/TabMenu.d.ts +63 -10
  615. package/tabmenu/TabMenu.vue +6 -3
  616. package/tabmenu/tabmenu.cjs.js +7 -4
  617. package/tabmenu/tabmenu.cjs.min.js +1 -1
  618. package/tabmenu/tabmenu.esm.js +7 -4
  619. package/tabmenu/tabmenu.esm.min.js +1 -1
  620. package/tabmenu/tabmenu.js +8 -5
  621. package/tabmenu/tabmenu.min.js +1 -1
  622. package/tabpanel/TabPanel.d.ts +38 -7
  623. package/tabpanel/tabpanel.esm.js +1 -1
  624. package/tabpanel/tabpanel.esm.min.js +1 -1
  625. package/tabpanel/tabpanel.js +1 -1
  626. package/tabview/TabView.d.ts +73 -11
  627. package/tabview/tabview.cjs.js +1 -1
  628. package/tabview/tabview.esm.js +1 -1
  629. package/tabview/tabview.esm.min.js +1 -1
  630. package/tabview/tabview.js +2 -2
  631. package/tag/Tag.d.ts +44 -8
  632. package/tag/Tag.vue +1 -1
  633. package/tag/tag.cjs.js +6 -6
  634. package/tag/tag.cjs.min.js +1 -1
  635. package/tag/tag.esm.js +8 -8
  636. package/tag/tag.esm.min.js +1 -1
  637. package/tag/tag.js +7 -7
  638. package/tag/tag.min.js +1 -1
  639. package/terminal/Terminal.d.ts +36 -5
  640. package/terminal/terminal.cjs.js +3 -3
  641. package/terminal/terminal.esm.js +1 -1
  642. package/terminal/terminal.esm.min.js +1 -1
  643. package/terminal/terminal.js +4 -4
  644. package/terminalservice/TerminalService.d.ts +9 -6
  645. package/terminalservice/terminalservice.esm.js +1 -1
  646. package/terminalservice/terminalservice.esm.min.js +1 -1
  647. package/terminalservice/terminalservice.js +1 -1
  648. package/textarea/Textarea.d.ts +38 -6
  649. package/textarea/textarea.esm.js +1 -1
  650. package/textarea/textarea.esm.min.js +1 -1
  651. package/textarea/textarea.js +1 -1
  652. package/tieredmenu/TieredMenu.d.ts +89 -15
  653. package/tieredmenu/TieredMenuSub.vue +7 -4
  654. package/tieredmenu/tieredmenu.cjs.js +9 -6
  655. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  656. package/tieredmenu/tieredmenu.esm.js +8 -5
  657. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  658. package/tieredmenu/tieredmenu.js +10 -7
  659. package/tieredmenu/tieredmenu.min.js +1 -1
  660. package/timeline/Timeline.d.ts +94 -15
  661. package/timeline/timeline.esm.js +1 -1
  662. package/timeline/timeline.esm.min.js +1 -1
  663. package/timeline/timeline.js +1 -1
  664. package/toast/Toast.d.ts +118 -12
  665. package/toast/toast.cjs.js +7 -7
  666. package/toast/toast.esm.js +1 -1
  667. package/toast/toast.esm.min.js +1 -1
  668. package/toast/toast.js +8 -8
  669. package/toasteventbus/toasteventbus.esm.js +1 -1
  670. package/toasteventbus/toasteventbus.esm.min.js +1 -1
  671. package/toasteventbus/toasteventbus.js +1 -1
  672. package/toastservice/ToastService.d.ts +17 -5
  673. package/toastservice/toastservice.cjs.js +3 -3
  674. package/toastservice/toastservice.esm.js +1 -1
  675. package/toastservice/toastservice.esm.min.js +1 -1
  676. package/toastservice/toastservice.js +4 -4
  677. package/togglebutton/ToggleButton.d.ts +64 -11
  678. package/togglebutton/togglebutton.cjs.js +1 -1
  679. package/togglebutton/togglebutton.esm.js +1 -1
  680. package/togglebutton/togglebutton.esm.min.js +1 -1
  681. package/togglebutton/togglebutton.js +2 -2
  682. package/toolbar/Toolbar.d.ts +31 -6
  683. package/toolbar/Toolbar.vue +2 -2
  684. package/toolbar/toolbar.cjs.js +2 -2
  685. package/toolbar/toolbar.cjs.min.js +1 -1
  686. package/toolbar/toolbar.esm.js +3 -3
  687. package/toolbar/toolbar.esm.min.js +1 -1
  688. package/toolbar/toolbar.js +3 -3
  689. package/toolbar/toolbar.min.js +1 -1
  690. package/tooltip/tooltip.esm.js +1 -1
  691. package/tooltip/tooltip.esm.min.js +1 -1
  692. package/tooltip/tooltip.js +1 -1
  693. package/tree/Tree.d.ts +189 -26
  694. package/tree/Tree.vue +1 -0
  695. package/tree/TreeNode.vue +4 -1
  696. package/tree/tree.cjs.js +6 -3
  697. package/tree/tree.cjs.min.js +1 -1
  698. package/tree/tree.esm.js +6 -3
  699. package/tree/tree.esm.min.js +1 -1
  700. package/tree/tree.js +7 -4
  701. package/tree/tree.min.js +1 -1
  702. package/treeselect/TreeSelect.d.ts +201 -44
  703. package/treeselect/TreeSelect.vue +9 -0
  704. package/treeselect/treeselect.cjs.js +12 -3
  705. package/treeselect/treeselect.cjs.min.js +1 -1
  706. package/treeselect/treeselect.esm.js +10 -1
  707. package/treeselect/treeselect.esm.min.js +1 -1
  708. package/treeselect/treeselect.js +13 -4
  709. package/treeselect/treeselect.min.js +1 -1
  710. package/treetable/BodyCell.vue +3 -3
  711. package/treetable/TreeTable.d.ts +459 -63
  712. package/treetable/TreeTable.vue +9 -9
  713. package/treetable/treetable.cjs.js +17 -17
  714. package/treetable/treetable.cjs.min.js +1 -1
  715. package/treetable/treetable.esm.js +16 -16
  716. package/treetable/treetable.esm.min.js +1 -1
  717. package/treetable/treetable.js +18 -18
  718. package/treetable/treetable.min.js +1 -1
  719. package/tristatecheckbox/TriStateCheckbox.d.ts +40 -6
  720. package/tristatecheckbox/tristatecheckbox.esm.js +1 -1
  721. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  722. package/tristatecheckbox/tristatecheckbox.js +1 -1
  723. package/ts-helpers.d.ts +28 -0
  724. package/useconfirm/UseConfirm.d.ts +5 -19
  725. package/useconfirm/useconfirm.js +1 -1
  726. package/usetoast/UseToast.d.ts +3 -5
  727. package/usetoast/usetoast.js +1 -1
  728. package/utils/Utils.d.ts +3 -0
  729. package/utils/utils.cjs.js +41 -4
  730. package/utils/utils.cjs.min.js +1 -1
  731. package/utils/utils.esm.js +41 -4
  732. package/utils/utils.esm.min.js +1 -1
  733. package/utils/utils.js +42 -5
  734. package/utils/utils.min.js +1 -1
  735. package/vetur-attributes.json +66 -30
  736. package/vetur-tags.json +16 -7
  737. package/virtualscroller/VirtualScroller.d.ts +294 -53
  738. package/virtualscroller/VirtualScroller.vue +296 -255
  739. package/virtualscroller/virtualscroller.cjs.js +325 -266
  740. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  741. package/virtualscroller/virtualscroller.esm.js +326 -267
  742. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  743. package/virtualscroller/virtualscroller.js +326 -267
  744. package/virtualscroller/virtualscroller.min.js +1 -1
  745. package/web-types.json +296 -47
@@ -1 +1 @@
1
- import{ZIndexUtils as e,ObjectUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as l}from"primevue/utils";import n from"primevue/overlayeventbus";import{FilterService as s}from"primevue/api";import o from"primevue/ripple";import a from"primevue/virtualscroller";import{resolveComponent as r,resolveDirective as p,openBlock as c,createBlock as d,createVNode as u,renderSlot as h,Fragment as m,createTextVNode as b,toDisplayString as f,renderList as y,createCommentVNode as g,Teleport as v,Transition as x,withCtx as k,withDirectives as L,vModelText as O,mergeProps as C,createSlots as V}from"vue";var S={name:"MultiSelect",emits:["update:modelValue","before-show","before-hide","change","show","hide","filter","selectall-change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,tabindex:String,inputId:String,dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},panelClass:null,selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null},selectAll:{type:Boolean,default:null}},data:()=>({focused:!1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}),outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(e.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?t.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?t.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?t.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getOptionGroupRenderKey(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupLabel(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return t.resolveFieldData(e,this.optionGroupChildren)},isOptionDisabled(e){return!(!this.maxSelectionLimitReached||this.isSelected(e))||!!this.optionDisabled&&t.resolveFieldData(e,this.optionDisabled)},getSelectedOptionIndex(){if(null!=this.modelValue&&this.options){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.options);for(let e=0;e<this.options.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.options[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(e,i){return e?i.findIndex((i=>e.some((e=>t.equals(e,this.getOptionValue(i),this.equalityKey))))):-1},isSelected(e){if(this.modelValue){let i=this.getOptionValue(e),l=this.equalityKey;return this.modelValue.some((e=>t.equals(e,i,l)))}return!1},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onHeaderCheckboxFocus(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur(){this.headerCheckboxFocused=!1},onClick(e){this.disabled||this.loading||this.overlay&&this.overlay.contains(e.target)||i.hasClass(e.target,"p-multiselect-close")||(i.hasClass(e.target,"p-multiselect-close"),this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onCloseClick(){this.hide()},onKeyDown(e){switch(e.which){case 40:this.visibleOptions&&!this.overlayVisible&&e.altKey&&this.show();break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 13:case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide()}},onOptionSelect(e,i){if(this.disabled||this.isOptionDisabled(i))return;let l=null;l=this.isSelected(i)?this.modelValue.filter((e=>!t.equals(e,this.getOptionValue(i),this.equalityKey))):[...this.modelValue||[],this.getOptionValue(i)],this.$emit("update:modelValue",l),this.$emit("change",{originalEvent:e,value:l})},onOptionKeyDown(e,t){let i=e.target;switch(e.which){case 40:var l=this.findNextItem(i);l&&l.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(i);n&&n.focus(),e.preventDefault();break;case 13:this.onOptionSelect(e,t),e.preventDefault()}},findNextItem(e){let t=e.nextElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findNextItem(t):t:null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findPrevItem(t):t:null},onOverlayEnter(t){if(e.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.filter&&this.$refs.filterInput.focus(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&this.virtualScroller.scrollToIndex(e)}this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(t){e.clear(t)},alignOverlay(){this.appendDisabled?i.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.getOuterWidth(this.$el)+"px",i.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new l(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.isAndroid()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue(e){let t;if(this.options)if(this.optionGroupLabel){for(let i of this.options)if(t=this.findOptionByValue(e,this.getOptionGroupChildren(i)),t)break}else t=this.findOptionByValue(e,this.options);return t?this.getOptionLabel(t):null},findOptionByValue(e,i){for(let l of i){let i=this.getOptionValue(l);if(t.equals(i,e,this.equalityKey))return l}return null},getSelectedItemsLabel(){let e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll(e){if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{let t=null;this.allSelected?t=[]:this.visibleOptions&&(this.optionGroupLabel?(t=[],this.visibleOptions.forEach((e=>t=[...t,...this.getOptionGroupChildren(e)]))):t=this.visibleOptions.map((e=>this.getOptionValue(e)))),this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},virtualScrollerRef(e){this.virtualScroller=e},removeChip(e){let i=this.modelValue.filter((i=>!t.equals(i,e,this.equalityKey)));this.$emit("update:modelValue",i),this.$emit("change",{originalEvent:event,value:i})},onOverlayClick(e){n.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{visibleOptions(){if(this.filterValue){if(this.optionGroupLabel){let e=[];for(let t of this.options){let i=s.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push({...t,items:i})}return e}return s.filter(this.options,this.searchFields,this.filterValue,"contains",this.filterLocale)}return this.options},containerClass(){return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue&&this.modelValue.length,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-multiselect-label",{"p-placeholder":this.label===this.placeholder,"p-multiselect-label-empty":!(this.placeholder||this.modelValue&&0!==this.modelValue.length)}]},panelStyleClass(){return["p-multiselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e;if(this.modelValue&&this.modelValue.length){if(this.maxSelectedLabels&&!(this.modelValue.length<=this.maxSelectedLabels))return this.getSelectedItemsLabel();e="";for(let t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},allSelected(){if(null!==this.selectAll)return this.selectAll;if(this.filterValue&&this.filterValue.trim().length>0){if(0===this.visibleOptions.length)return!1;if(this.optionGroupLabel){for(let e of this.visibleOptions)for(let t of this.getOptionGroupChildren(e))if(!this.isSelected(t))return!1}else for(let e of this.visibleOptions)if(!this.isSelected(e))return!1;return!0}if(this.modelValue&&this.options){let e=0;return this.optionGroupLabel?this.options.forEach((t=>e+=this.getOptionGroupChildren(t).length)):e=this.options.length,e>0&&e===this.modelValue.length}return!1},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptyFilterMessage},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage},appendDisabled(){return"self"===this.appendTo},appendTarget(){return this.appendDisabled?null:this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},dropdownIconClass(){return["p-multiselect-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:o},components:{VirtualScroller:a}};const w={class:"p-hidden-accessible"},I={class:"p-multiselect-label-container"},$={class:"p-multiselect-token-label"},D={class:"p-multiselect-trigger"},F={key:0,class:"p-multiselect-header"},K={class:"p-hidden-accessible"},B={key:1,class:"p-multiselect-filter-container"},G=u("span",{class:"p-multiselect-filter-icon pi pi-search"},null,-1),E=u("span",{class:"p-multiselect-close-icon pi pi-times"},null,-1),T={class:"p-checkbox p-component"},A={class:"p-multiselect-item-group"},H={class:"p-checkbox p-component"},R={key:2,class:"p-multiselect-empty-message"},z={key:3,class:"p-multiselect-empty-message"};!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-multiselect {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-multiselect-trigger {\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 -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-multiselect-label-container {\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n cursor: pointer;\n}\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-multiselect-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n.p-multiselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-multiselect-item {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-multiselect-item-group {\n cursor: auto;\n}\n.p-multiselect-header {\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: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-multiselect-filter-container {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n.p-multiselect-close {\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 -ms-flex-negative: 0;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n.p-fluid .p-multiselect {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),S.render=function(e,t,i,l,n,s){const o=r("VirtualScroller"),a=p("ripple");return c(),d("div",{ref:"container",class:s.containerClass,onClick:t[11]||(t[11]=(...e)=>s.onClick&&s.onClick(...e))},[u("div",w,[u("input",{ref:"focusInput",type:"text",role:"listbox",id:i.inputId,readonly:"",disabled:i.disabled,onFocus:t[1]||(t[1]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),tabindex:i.tabindex,"aria-haspopup":"true","aria-expanded":n.overlayVisible,"aria-labelledby":i.ariaLabelledBy},null,40,["id","disabled","tabindex","aria-expanded","aria-labelledby"])]),u("div",I,[u("div",{class:s.labelClass},[h(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>["comma"===i.display?(c(),d(m,{key:0},[b(f(s.label||"empty"),1)],64)):"chip"===i.display?(c(),d(m,{key:1},[(c(!0),d(m,null,y(i.modelValue,(t=>(c(),d("div",{class:"p-multiselect-token",key:s.getLabelByValue(t)},[h(e.$slots,"chip",{value:t},(()=>[u("span",$,f(s.getLabelByValue(t)),1)])),i.disabled?g("",!0):(c(),d("span",{key:0,class:"p-multiselect-token-icon pi pi-times-circle",onClick:e=>s.removeChip(t)},null,8,["onClick"]))])))),128)),i.modelValue&&0!==i.modelValue.length?g("",!0):(c(),d(m,{key:0},[b(f(i.placeholder||"empty"),1)],64))],64)):g("",!0)]))],2)]),u("div",D,[h(e.$slots,"indicator",{},(()=>[u("span",{class:s.dropdownIconClass},null,2)]))]),(c(),d(v,{to:s.appendTarget,disabled:s.appendDisabled},[u(x,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:k((()=>[n.overlayVisible?(c(),d("div",{key:0,ref:s.overlayRef,class:s.panelStyleClass,onClick:t[10]||(t[10]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},[h(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.showToggleAll&&null==i.selectionLimit||i.filter?(c(),d("div",F,[i.showToggleAll&&null==i.selectionLimit?(c(),d("div",{key:0,class:"p-checkbox p-component",onClick:t[6]||(t[6]=(...e)=>s.onToggleAll&&s.onToggleAll(...e)),role:"checkbox","aria-checked":s.allSelected},[u("div",K,[u("input",{type:"checkbox",readonly:"",onFocus:t[4]||(t[4]=(...e)=>s.onHeaderCheckboxFocus&&s.onHeaderCheckboxFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>s.onHeaderCheckboxBlur&&s.onHeaderCheckboxBlur(...e))},null,32)]),u("div",{class:["p-checkbox-box",{"p-highlight":s.allSelected,"p-focus":n.headerCheckboxFocused}],role:"checkbox","aria-checked":s.allSelected},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.allSelected}]},null,2)],10,["aria-checked"])],8,["aria-checked"])):g("",!0),i.filter?(c(),d("div",B,[L(u("input",{type:"text",ref:"filterInput","onUpdate:modelValue":t[7]||(t[7]=e=>n.filterValue=e),class:"p-multiselect-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onInput:t[8]||(t[8]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},null,40,["placeholder"]),[[O,n.filterValue]]),G])):g("",!0),L(u("button",{class:"p-multiselect-close p-link",onClick:t[9]||(t[9]=(...e)=>s.onCloseClick&&s.onCloseClick(...e)),type:"button"},[E],512),[[a]])])):g("",!0),u("div",{class:"p-multiselect-items-wrapper",style:{"max-height":s.virtualScrollerDisabled?i.scrollHeight:""}},[u(o,C({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},disabled:s.virtualScrollerDisabled}),V({content:k((({styleClass:t,contentRef:l,items:o,getItemOptions:r})=>[u("ul",{ref:l,class:["p-multiselect-items p-component",t],role:"listbox","aria-multiselectable":"true"},[i.optionGroupLabel?(c(!0),d(m,{key:1},y(o,((t,l)=>(c(),d(m,{key:s.getOptionGroupRenderKey(t)},[u("li",A,[h(e.$slots,"optiongroup",{option:t,index:s.getOptionIndex(l,r)},(()=>[b(f(s.getOptionGroupLabel(t)),1)]))]),(c(!0),d(m,null,y(s.getOptionGroupChildren(t),((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}],role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[u("div",H,[u("div",{class:["p-checkbox-box",{"p-highlight":s.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[u("span",null,f(s.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128))],64)))),128)):(c(!0),d(m,{key:0},y(o,((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}],role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[u("div",T,[u("div",{class:["p-checkbox-box",{"p-highlight":s.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[u("span",null,f(s.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128)),n.filterValue&&(!o||o&&0===o.length)?(c(),d("li",R,[h(e.$slots,"emptyfilter",{},(()=>[b(f(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(c(),d("li",z,[h(e.$slots,"empty",{},(()=>[b(f(s.emptyMessageText),1)]))])):g("",!0)],2)])),_:2},[e.$slots.loader?{name:"loader",fn:k((({options:t})=>[h(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),h(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions})],2)):g("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"]))],2)};export default S;
1
+ import{ZIndexUtils as e,ObjectUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as l}from"primevue/utils";import s from"primevue/overlayeventbus";import{FilterService as n}from"primevue/api";import o from"primevue/ripple";import a from"primevue/virtualscroller";import{resolveComponent as r,resolveDirective as p,openBlock as c,createBlock as d,createVNode as u,renderSlot as h,Fragment as m,createTextVNode as b,toDisplayString as f,renderList as y,createCommentVNode as g,Teleport as v,Transition as x,withCtx as k,withDirectives as L,vModelText as O,mergeProps as C,createSlots as V}from"vue";var S={name:"MultiSelect",emits:["update:modelValue","before-show","before-hide","change","show","hide","filter","selectall-change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,tabindex:String,inputId:String,dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},panelClass:null,selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null},selectAll:{type:Boolean,default:null}},data:()=>({focused:!1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}),outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(e.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?t.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?t.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?t.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getOptionGroupRenderKey(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupLabel(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return t.resolveFieldData(e,this.optionGroupChildren)},isOptionDisabled(e){return!(!this.maxSelectionLimitReached||this.isSelected(e))||!!this.optionDisabled&&t.resolveFieldData(e,this.optionDisabled)},getSelectedOptionIndex(){if(null!=this.modelValue&&this.options){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.options);for(let e=0;e<this.options.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.options[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(e,i){return e?i.findIndex((i=>e.some((e=>t.equals(e,this.getOptionValue(i),this.equalityKey))))):-1},isSelected(e){if(this.modelValue){let i=this.getOptionValue(e),l=this.equalityKey;return this.modelValue.some((e=>t.equals(e,i,l)))}return!1},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onHeaderCheckboxFocus(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur(){this.headerCheckboxFocused=!1},onClick(e){this.disabled||this.loading||this.overlay&&this.overlay.contains(e.target)||i.hasClass(e.target,"p-multiselect-close")||(i.hasClass(e.target,"p-multiselect-close"),this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onCloseClick(){this.hide()},onKeyDown(e){switch(e.which){case 40:this.visibleOptions&&!this.overlayVisible&&e.altKey&&this.show();break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 13:case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide()}},onOptionSelect(e,i){if(this.disabled||this.isOptionDisabled(i))return;let l=null;l=this.isSelected(i)?this.modelValue.filter((e=>!t.equals(e,this.getOptionValue(i),this.equalityKey))):[...this.modelValue||[],this.getOptionValue(i)],this.$emit("update:modelValue",l),this.$emit("change",{originalEvent:e,value:l})},onOptionKeyDown(e,t){let i=e.target;switch(e.which){case 40:var l=this.findNextItem(i);l&&l.focus(),e.preventDefault();break;case 38:var s=this.findPrevItem(i);s&&s.focus(),e.preventDefault();break;case 13:this.onOptionSelect(e,t),e.preventDefault()}},findNextItem(e){let t=e.nextElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findNextItem(t):t:null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findPrevItem(t):t:null},onOverlayEnter(t){if(e.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.filter&&this.$refs.filterInput.focus(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&this.virtualScroller.scrollToIndex(e)}this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(t){e.clear(t)},alignOverlay(){this.appendDisabled?i.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.getOuterWidth(this.$el)+"px",i.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new l(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.isAndroid()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue(e){let t;if(this.options)if(this.optionGroupLabel){for(let i of this.options)if(t=this.findOptionByValue(e,this.getOptionGroupChildren(i)),t)break}else t=this.findOptionByValue(e,this.options);return t?this.getOptionLabel(t):null},findOptionByValue(e,i){for(let l of i){let i=this.getOptionValue(l);if(t.equals(i,e,this.equalityKey))return l}return null},getSelectedItemsLabel(){let e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll(e){if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{let t=null;this.allSelected?t=[]:this.visibleOptions&&(this.optionGroupLabel?(t=[],this.visibleOptions.forEach((e=>t=[...t,...this.getOptionGroupChildren(e)]))):t=this.visibleOptions.map((e=>this.getOptionValue(e)))),this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},virtualScrollerRef(e){this.virtualScroller=e},removeChip(e){let i=this.modelValue.filter((i=>!t.equals(i,e,this.equalityKey)));this.$emit("update:modelValue",i),this.$emit("change",{originalEvent:event,value:i})},onOverlayClick(e){s.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{visibleOptions(){if(this.filterValue){if(this.optionGroupLabel){let e=[];for(let t of this.options){let i=n.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push({...t,items:i})}return e}return n.filter(this.options,this.searchFields,this.filterValue,"contains",this.filterLocale)}return this.options},containerClass(){return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue&&this.modelValue.length,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-multiselect-label",{"p-placeholder":this.label===this.placeholder,"p-multiselect-label-empty":!(this.placeholder||this.modelValue&&0!==this.modelValue.length)}]},panelStyleClass(){return["p-multiselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e;if(this.modelValue&&this.modelValue.length){if(this.maxSelectedLabels&&!(this.modelValue.length<=this.maxSelectedLabels))return this.getSelectedItemsLabel();e="";for(let t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},allSelected(){if(null!==this.selectAll)return this.selectAll;if(this.filterValue&&this.filterValue.trim().length>0){if(0===this.visibleOptions.length)return!1;if(this.optionGroupLabel){for(let e of this.visibleOptions)for(let t of this.getOptionGroupChildren(e))if(!this.isSelected(t))return!1}else for(let e of this.visibleOptions)if(!this.isSelected(e))return!1;return!0}if(this.modelValue&&this.options){let e=0;return this.optionGroupLabel?this.options.forEach((t=>e+=this.getOptionGroupChildren(t).length)):e=this.options.length,e>0&&e===this.modelValue.length}return!1},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptyFilterMessage},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage},appendDisabled(){return"self"===this.appendTo},appendTarget(){return this.appendDisabled?null:this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},dropdownIconClass(){return["p-multiselect-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:o},components:{VirtualScroller:a}};const w={class:"p-hidden-accessible"},I={class:"p-multiselect-label-container"},$={class:"p-multiselect-token-label"},D={class:"p-multiselect-trigger"},F={key:0,class:"p-multiselect-header"},K={class:"p-hidden-accessible"},B={key:1,class:"p-multiselect-filter-container"},G=u("span",{class:"p-multiselect-filter-icon pi pi-search"},null,-1),E=u("span",{class:"p-multiselect-close-icon pi pi-times"},null,-1),T={class:"p-checkbox p-component"},A={class:"p-multiselect-item-group"},H={class:"p-checkbox p-component"},R={key:2,class:"p-multiselect-empty-message"},z={key:3,class:"p-multiselect-empty-message"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===i&&l.firstChild?l.insertBefore(s,l.firstChild):l.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-multiselect {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-multiselect-trigger {\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 -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-multiselect-label-container {\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n cursor: pointer;\n}\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-multiselect-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n.p-multiselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-multiselect-item {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-multiselect-item-group {\n cursor: auto;\n}\n.p-multiselect-header {\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: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-multiselect-filter-container {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n.p-multiselect-close {\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 -ms-flex-negative: 0;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n.p-fluid .p-multiselect {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),S.render=function(e,t,i,l,s,n){const o=r("VirtualScroller"),a=p("ripple");return c(),d("div",{ref:"container",class:n.containerClass,onClick:t[11]||(t[11]=(...e)=>n.onClick&&n.onClick(...e))},[u("div",w,[u("input",{ref:"focusInput",type:"text",role:"listbox",id:i.inputId,readonly:"",disabled:i.disabled,onFocus:t[1]||(t[1]=(...e)=>n.onFocus&&n.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>n.onBlur&&n.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>n.onKeyDown&&n.onKeyDown(...e)),tabindex:i.tabindex,"aria-haspopup":"true","aria-expanded":s.overlayVisible,"aria-labelledby":i.ariaLabelledBy},null,40,["id","disabled","tabindex","aria-expanded","aria-labelledby"])]),u("div",I,[u("div",{class:n.labelClass},[h(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>["comma"===i.display?(c(),d(m,{key:0},[b(f(n.label||"empty"),1)],64)):"chip"===i.display?(c(),d(m,{key:1},[(c(!0),d(m,null,y(i.modelValue,(t=>(c(),d("div",{class:"p-multiselect-token",key:n.getLabelByValue(t)},[h(e.$slots,"chip",{value:t},(()=>[u("span",$,f(n.getLabelByValue(t)),1)])),i.disabled?g("",!0):(c(),d("span",{key:0,class:"p-multiselect-token-icon pi pi-times-circle",onClick:e=>n.removeChip(t)},null,8,["onClick"]))])))),128)),i.modelValue&&0!==i.modelValue.length?g("",!0):(c(),d(m,{key:0},[b(f(i.placeholder||"empty"),1)],64))],64)):g("",!0)]))],2)]),u("div",D,[h(e.$slots,"indicator",{},(()=>[u("span",{class:n.dropdownIconClass},null,2)]))]),(c(),d(v,{to:n.appendTarget,disabled:n.appendDisabled},[u(x,{name:"p-connected-overlay",onEnter:n.onOverlayEnter,onLeave:n.onOverlayLeave,onAfterLeave:n.onOverlayAfterLeave},{default:k((()=>[s.overlayVisible?(c(),d("div",{key:0,ref:n.overlayRef,class:n.panelStyleClass,onClick:t[10]||(t[10]=(...e)=>n.onOverlayClick&&n.onOverlayClick(...e))},[h(e.$slots,"header",{value:i.modelValue,options:n.visibleOptions}),i.showToggleAll&&null==i.selectionLimit||i.filter?(c(),d("div",F,[i.showToggleAll&&null==i.selectionLimit?(c(),d("div",{key:0,class:"p-checkbox p-component",onClick:t[6]||(t[6]=(...e)=>n.onToggleAll&&n.onToggleAll(...e)),role:"checkbox","aria-checked":n.allSelected},[u("div",K,[u("input",{type:"checkbox",readonly:"",onFocus:t[4]||(t[4]=(...e)=>n.onHeaderCheckboxFocus&&n.onHeaderCheckboxFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>n.onHeaderCheckboxBlur&&n.onHeaderCheckboxBlur(...e))},null,32)]),u("div",{class:["p-checkbox-box",{"p-highlight":n.allSelected,"p-focus":s.headerCheckboxFocused}],role:"checkbox","aria-checked":n.allSelected},[u("span",{class:["p-checkbox-icon",{"pi pi-check":n.allSelected}]},null,2)],10,["aria-checked"])],8,["aria-checked"])):g("",!0),i.filter?(c(),d("div",B,[L(u("input",{type:"text",ref:"filterInput","onUpdate:modelValue":t[7]||(t[7]=e=>s.filterValue=e),class:"p-multiselect-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onInput:t[8]||(t[8]=(...e)=>n.onFilterChange&&n.onFilterChange(...e))},null,40,["placeholder"]),[[O,s.filterValue]]),G])):g("",!0),L(u("button",{class:"p-multiselect-close p-link",onClick:t[9]||(t[9]=(...e)=>n.onCloseClick&&n.onCloseClick(...e)),type:"button"},[E],512),[[a]])])):g("",!0),u("div",{class:"p-multiselect-items-wrapper",style:{"max-height":n.virtualScrollerDisabled?i.scrollHeight:""}},[u(o,C({ref:n.virtualScrollerRef},i.virtualScrollerOptions,{items:n.visibleOptions,style:{height:i.scrollHeight},disabled:n.virtualScrollerDisabled}),V({content:k((({styleClass:t,contentRef:l,items:o,getItemOptions:r})=>[u("ul",{ref:l,class:["p-multiselect-items p-component",t],role:"listbox","aria-multiselectable":"true"},[i.optionGroupLabel?(c(!0),d(m,{key:1},y(o,((t,l)=>(c(),d(m,{key:n.getOptionGroupRenderKey(t)},[u("li",A,[h(e.$slots,"optiongroup",{option:t,index:n.getOptionIndex(l,r)},(()=>[b(f(n.getOptionGroupLabel(t)),1)]))]),(c(!0),d(m,null,y(n.getOptionGroupChildren(t),((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":n.isSelected(t),"p-disabled":n.isOptionDisabled(t)}],role:"option","aria-selected":n.isSelected(t),key:n.getOptionRenderKey(t),onClick:e=>n.onOptionSelect(e,t),onKeydown:e=>n.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":n.getOptionLabel(t)},[u("div",H,[u("div",{class:["p-checkbox-box",{"p-highlight":n.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":n.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:n.getOptionIndex(l,r)},(()=>[u("span",null,f(n.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128))],64)))),128)):(c(!0),d(m,{key:0},y(o,((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":n.isSelected(t),"p-disabled":n.isOptionDisabled(t)}],role:"option","aria-selected":n.isSelected(t),key:n.getOptionRenderKey(t),onClick:e=>n.onOptionSelect(e,t),onKeydown:e=>n.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":n.getOptionLabel(t)},[u("div",T,[u("div",{class:["p-checkbox-box",{"p-highlight":n.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":n.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:n.getOptionIndex(l,r)},(()=>[u("span",null,f(n.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128)),s.filterValue&&(!o||o&&0===o.length)?(c(),d("li",R,[h(e.$slots,"emptyfilter",{},(()=>[b(f(n.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(c(),d("li",z,[h(e.$slots,"empty",{},(()=>[b(f(n.emptyMessageText),1)]))])):g("",!0)],2)])),_:2},[e.$slots.loader?{name:"loader",fn:k((({options:t})=>[h(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),h(e.$slots,"footer",{value:i.modelValue,options:n.visibleOptions})],2)):g("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"]))],2)};export{S as default};
@@ -479,7 +479,7 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
479
479
  this.$emit('change', {originalEvent: event, value: value});
480
480
  },
481
481
  onOverlayClick(event) {
482
- OverlayEventBus__default['default'].emit('overlay-click', {
482
+ OverlayEventBus__default["default"].emit('overlay-click', {
483
483
  originalEvent: event,
484
484
  target: this.$el
485
485
  });
@@ -624,10 +624,10 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
624
624
  }
625
625
  },
626
626
  directives: {
627
- 'ripple': Ripple__default['default']
627
+ 'ripple': Ripple__default["default"]
628
628
  },
629
629
  components: {
630
- 'VirtualScroller': VirtualScroller__default['default']
630
+ 'VirtualScroller': VirtualScroller__default["default"]
631
631
  }
632
632
  };
633
633
 
@@ -970,4 +970,4 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
970
970
 
971
971
  return script;
972
972
 
973
- }(primevue.utils, primevue.overlayeventbus, primevue.api, primevue.ripple, primevue.virtualscroller, Vue));
973
+ })(primevue.utils, primevue.overlayeventbus, primevue.api, primevue.ripple, primevue.virtualscroller, Vue);
@@ -1,30 +1,135 @@
1
1
  import { VNode } from 'vue';
2
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2
3
 
3
- interface OrderListProps {
4
+ export interface OrderListReorderEvent {
5
+ /**
6
+ * Browser event
7
+ */
8
+ originalEvent: Event;
9
+ /**
10
+ * Ordered list
11
+ */
12
+ value: any[];
13
+ /**
14
+ * Direction of the change; 'up', 'down', 'bottom', 'top'
15
+ */
16
+ direction: string;
17
+ }
18
+
19
+ export interface OrderListSelectionChangeEvent {
20
+ /**
21
+ * Browser event
22
+ */
23
+ originalEvent: Event;
24
+ /**
25
+ * Ordered list
26
+ */
27
+ value: any[];
28
+ }
29
+
30
+ export interface OrderListProps {
31
+ /**
32
+ * Value of the component.
33
+ */
4
34
  modelValue?: any[];
5
- dataKey?: string;
35
+ /**
36
+ * Name of the field that uniquely identifies the a record in the data.
37
+ */
38
+ dataKey?: string | undefined;
39
+ /**
40
+ * Selected items in the list.
41
+ */
6
42
  selection?: any[];
7
- metaKeySelection?: boolean;
43
+ /**
44
+ * Defines whether metaKey is requred or not for the selection.
45
+ * When true metaKey needs to be pressed to select or unselect an item and
46
+ * when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.
47
+ * Default value is true.
48
+ */
49
+ metaKeySelection?: boolean | undefined;
50
+ /**
51
+ * Inline style of the the list element.
52
+ */
8
53
  listStyle?: any;
9
- responsive?: boolean;
10
- breakpoint?: string;
54
+ /**
55
+ * Whether the list optimizes layout based on screen size.
56
+ * Default value is true.
57
+ */
58
+ responsive?: boolean | undefined;
59
+ /**
60
+ * The breakpoint to define the maximum width boundary when responsiveness is enabled.
61
+ * Default value is '960px'.
62
+ */
63
+ breakpoint?: string | undefined;
11
64
  }
12
65
 
13
- interface OrderListItemSlotInterface {
14
- item: any;
15
- index: number;
66
+ export interface OrderListSlots {
67
+ /**
68
+ * Custom header template.
69
+ */
70
+ header: () => VNode[];
71
+ /**
72
+ * Custom item template.
73
+ * @param {Object} scope - item slot's params.
74
+ */
75
+ item: (scope: {
76
+ /**
77
+ * Item of the component
78
+ */
79
+ item: any;
80
+ /**
81
+ * Index of the item.
82
+ */
83
+ index: number;
84
+ }) => VNode[];
85
+ /**
86
+ * Custom controls start template.
87
+ */
88
+ controlsstart: () => VNode[];
89
+ /**
90
+ * Custom controls end template.
91
+ */
92
+ controlsend: () => VNode[];
16
93
  }
17
94
 
18
- declare class OrderList {
19
- $props: OrderListProps;
20
- $emit(eventName: 'update:modelValue', value: any[]): this;
21
- $emit(eventName: 'update:selection', value: any[]): this;
22
- $emit(eventName: 'reorder', e: { originalEvent: Event, value: any[]; direction: string}): this;
23
- $emit(eventName: 'selection-change', e: { originalEvent: Event, value: any[]}): this;
24
- $slots: {
25
- header: VNode[];
26
- item: OrderListItemSlotInterface;
95
+ export declare type OrderListEmits = {
96
+ /**
97
+ * Emitted when the value changes.
98
+ * @param {*} value - New value.
99
+ */
100
+ 'update:modelValue': (value: any[]) => void;
101
+ /**
102
+ * Emitted when the selection changes.
103
+ * @param {*} value - New value.
104
+ */
105
+ 'update:selection': (value: any[]) => void;
106
+ /**
107
+ * Callback to invoke when the list is reordered.
108
+ * @param {OrderListReorderEvent} event - Custom reorder event.
109
+ */
110
+ 'reorder': (event: OrderListReorderEvent) => void;
111
+ /**
112
+ * Callback to invoke when selection changes.
113
+ * @param {OrderListSelectionChangeEvent} event - Custom selection change event.
114
+ */
115
+ 'selection-change': (event: OrderListSelectionChangeEvent) => void;
116
+ }
117
+
118
+ declare class OrderList extends ClassComponent<OrderListProps, OrderListSlots, OrderListEmits> { }
119
+
120
+ declare module '@vue/runtime-core' {
121
+ interface GlobalComponents {
122
+ OrderList: GlobalComponentConstructor<OrderList>
27
123
  }
28
124
  }
29
125
 
126
+ /**
127
+ *
128
+ * OrderList is used to managed the order of a collection.
129
+ *
130
+ * Demos:
131
+ *
132
+ * - [OrderList](https://www.primefaces.org/primevue/showcase/#/orderlist)
133
+ *
134
+ */
30
135
  export default OrderList;
@@ -1,10 +1,12 @@
1
1
  <template>
2
2
  <div class="p-orderlist p-component">
3
3
  <div class="p-orderlist-controls">
4
+ <slot name="controlsstart"></slot>
4
5
  <OLButton type="button" icon="pi pi-angle-up" @click="moveUp"></OLButton>
5
6
  <OLButton type="button" icon="pi pi-angle-double-up" @click="moveTop"></OLButton>
6
7
  <OLButton type="button" icon="pi pi-angle-down" @click="moveDown"></OLButton>
7
8
  <OLButton type="button" icon="pi pi-angle-double-down" @click="moveBottom"></OLButton>
9
+ <slot name="controlsend"></slot>
8
10
  </div>
9
11
  <div class="p-orderlist-list-container">
10
12
  <div class="p-orderlist-header" v-if="$slots.header">
@@ -331,10 +331,10 @@ var script = {
331
331
  }
332
332
  },
333
333
  components: {
334
- 'OLButton': Button__default['default']
334
+ 'OLButton': Button__default["default"]
335
335
  },
336
336
  directives: {
337
- 'ripple': Ripple__default['default']
337
+ 'ripple': Ripple__default["default"]
338
338
  }
339
339
  };
340
340
 
@@ -352,6 +352,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
352
352
 
353
353
  return (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
354
354
  vue.createVNode("div", _hoisted_2, [
355
+ vue.renderSlot(_ctx.$slots, "controlsstart"),
355
356
  vue.createVNode(_component_OLButton, {
356
357
  type: "button",
357
358
  icon: "pi pi-angle-up",
@@ -371,7 +372,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
371
372
  type: "button",
372
373
  icon: "pi pi-angle-double-down",
373
374
  onClick: $options.moveBottom
374
- }, null, 8, ["onClick"])
375
+ }, null, 8, ["onClick"]),
376
+ vue.renderSlot(_ctx.$slots, "controlsend")
375
377
  ]),
376
378
  vue.createVNode("div", _hoisted_3, [
377
379
  (_ctx.$slots.header)
@@ -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),r=n(i),s={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},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}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.ObjectUtils.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let r=e.metaKey||e.ctrlKey;o&&r?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=r&&this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},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-orderlist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findPrevItem(i):null},updateListScroll(){const e=t.DomHandler.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":t.DomHandler.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.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-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:()=>t.UniqueComponentId()},components:{OLButton:o.default},directives:{ripple:r.default}};const d={class:"p-orderlist p-component"},c={class:"p-orderlist-controls"},a={class:"p-orderlist-list-container"},h={key:0,class:"p-orderlist-header"};!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-orderlist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-orderlist-controls {\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-orderlist-list-container {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-orderlist-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-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n"),s.render=function(e,t,i,n,o,r){const s=l.resolveComponent("OLButton"),u=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",d,[l.createVNode("div",c,[l.createVNode(s,{type:"button",icon:"pi pi-angle-up",onClick:r.moveUp},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-double-up",onClick:r.moveTop},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-down",onClick:r.moveDown},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-double-down",onClick:r.moveBottom},null,8,["onClick"])]),l.createVNode("div",a,[e.$slots.header?(l.openBlock(),l.createBlock("div",h,[l.renderSlot(e.$slots,"header")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"list",name:"p-orderlist-flip",tag:"ul",class:"p-orderlist-list",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(i.modelValue,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:r.getItemKey(i,n),tabindex:"0",class:["p-orderlist-item",{"p-highlight":r.isSelected(i)}],onClick:e=>r.onItemClick(e,i,n),onKeydown:e=>r.onItemKeyDown(e,i,n),onTouchend:t[1]||(t[1]=(...e)=>r.onItemTouchEnd&&r.onItemTouchEnd(...e)),role:"option","aria-selected":r.isSelected(i)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onKeydown","aria-selected"])),[[u]]))),128))])),_:3},8,["style"])])])},module.exports=s;
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),r=n(i),s={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},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}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.ObjectUtils.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let r=e.metaKey||e.ctrlKey;o&&r?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=r&&this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},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-orderlist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findPrevItem(i):null},updateListScroll(){const e=t.DomHandler.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":t.DomHandler.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.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-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:()=>t.UniqueComponentId()},components:{OLButton:o.default},directives:{ripple:r.default}};const d={class:"p-orderlist p-component"},c={class:"p-orderlist-controls"},a={class:"p-orderlist-list-container"},h={key:0,class:"p-orderlist-header"};!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-orderlist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-orderlist-controls {\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-orderlist-list-container {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-orderlist-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-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n"),s.render=function(e,t,i,n,o,r){const s=l.resolveComponent("OLButton"),u=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",d,[l.createVNode("div",c,[l.renderSlot(e.$slots,"controlsstart"),l.createVNode(s,{type:"button",icon:"pi pi-angle-up",onClick:r.moveUp},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-double-up",onClick:r.moveTop},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-down",onClick:r.moveDown},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-double-down",onClick:r.moveBottom},null,8,["onClick"]),l.renderSlot(e.$slots,"controlsend")]),l.createVNode("div",a,[e.$slots.header?(l.openBlock(),l.createBlock("div",h,[l.renderSlot(e.$slots,"header")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"list",name:"p-orderlist-flip",tag:"ul",class:"p-orderlist-list",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(i.modelValue,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:r.getItemKey(i,n),tabindex:"0",class:["p-orderlist-item",{"p-highlight":r.isSelected(i)}],onClick:e=>r.onItemClick(e,i,n),onKeydown:e=>r.onItemKeyDown(e,i,n),onTouchend:t[1]||(t[1]=(...e)=>r.onItemTouchEnd&&r.onItemTouchEnd(...e)),role:"option","aria-selected":r.isSelected(i)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onKeydown","aria-selected"])),[[u]]))),128))])),_:3},8,["style"])])])},module.exports=s;
@@ -345,6 +345,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
345
345
 
346
346
  return (openBlock(), createBlock("div", _hoisted_1, [
347
347
  createVNode("div", _hoisted_2, [
348
+ renderSlot(_ctx.$slots, "controlsstart"),
348
349
  createVNode(_component_OLButton, {
349
350
  type: "button",
350
351
  icon: "pi pi-angle-up",
@@ -364,7 +365,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
364
365
  type: "button",
365
366
  icon: "pi pi-angle-double-down",
366
367
  onClick: $options.moveBottom
367
- }, null, 8, ["onClick"])
368
+ }, null, 8, ["onClick"]),
369
+ renderSlot(_ctx.$slots, "controlsend")
368
370
  ]),
369
371
  createVNode("div", _hoisted_3, [
370
372
  (_ctx.$slots.header)
@@ -440,4 +442,4 @@ styleInject(css_248z);
440
442
 
441
443
  script.render = render;
442
444
 
443
- export default script;
445
+ export { script as default };
@@ -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 d,createVNode as a,renderSlot as c,createCommentVNode as h,TransitionGroup as p,withCtx as m,Fragment as u,renderList as f,withDirectives as y}from"vue";var v={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},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}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let s=e.metaKey||e.ctrlKey;o&&s?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=s&&this.d_selection?[...this.d_selection]:[],t.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},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-orderlist-item")?t:this.findNextItem(t):null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-orderlist-item")?t:this.findPrevItem(t):null},updateListScroll(){const e=i.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":i.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":i.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.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-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:()=>l()},components:{OLButton:e},directives:{ripple:n}};const b={class:"p-orderlist p-component"},g={class:"p-orderlist-controls"},x={class:"p-orderlist-list-container"},k={key:0,class:"p-orderlist-header"};!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-orderlist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-orderlist-controls {\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-orderlist-list-container {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-orderlist-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-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n"),v.render=function(e,t,i,l,n,v){const I=o("OLButton"),$=s("ripple");return r(),d("div",b,[a("div",g,[a(I,{type:"button",icon:"pi pi-angle-up",onClick:v.moveUp},null,8,["onClick"]),a(I,{type:"button",icon:"pi pi-angle-double-up",onClick:v.moveTop},null,8,["onClick"]),a(I,{type:"button",icon:"pi pi-angle-down",onClick:v.moveDown},null,8,["onClick"]),a(I,{type:"button",icon:"pi pi-angle-double-down",onClick:v.moveBottom},null,8,["onClick"])]),a("div",x,[e.$slots.header?(r(),d("div",k,[c(e.$slots,"header")])):h("",!0),a(p,{ref:"list",name:"p-orderlist-flip",tag:"ul",class:"p-orderlist-list",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:m((()=>[(r(!0),d(u,null,f(i.modelValue,((i,l)=>y((r(),d("li",{key:v.getItemKey(i,l),tabindex:"0",class:["p-orderlist-item",{"p-highlight":v.isSelected(i)}],onClick:e=>v.onItemClick(e,i,l),onKeydown:e=>v.onItemKeyDown(e,i,l),onTouchend:t[1]||(t[1]=(...e)=>v.onItemTouchEnd&&v.onItemTouchEnd(...e)),role:"option","aria-selected":v.isSelected(i)},[c(e.$slots,"item",{item:i,index:l})],42,["onClick","onKeydown","aria-selected"])),[[$]]))),128))])),_:3},8,["style"])])])};export default v;
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 d,createVNode as a,renderSlot as c,createCommentVNode as h,TransitionGroup as p,withCtx as m,Fragment as u,renderList as f,withDirectives as y}from"vue";var v={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},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}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let s=e.metaKey||e.ctrlKey;o&&s?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=s&&this.d_selection?[...this.d_selection]:[],t.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},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-orderlist-item")?t:this.findNextItem(t):null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-orderlist-item")?t:this.findPrevItem(t):null},updateListScroll(){const e=i.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":i.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":i.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.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-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:()=>l()},components:{OLButton:e},directives:{ripple:n}};const b={class:"p-orderlist p-component"},g={class:"p-orderlist-controls"},x={class:"p-orderlist-list-container"},k={key:0,class:"p-orderlist-header"};!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-orderlist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-orderlist-controls {\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-orderlist-list-container {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-orderlist-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-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n"),v.render=function(e,t,i,l,n,v){const $=o("OLButton"),I=s("ripple");return r(),d("div",b,[a("div",g,[c(e.$slots,"controlsstart"),a($,{type:"button",icon:"pi pi-angle-up",onClick:v.moveUp},null,8,["onClick"]),a($,{type:"button",icon:"pi pi-angle-double-up",onClick:v.moveTop},null,8,["onClick"]),a($,{type:"button",icon:"pi pi-angle-down",onClick:v.moveDown},null,8,["onClick"]),a($,{type:"button",icon:"pi pi-angle-double-down",onClick:v.moveBottom},null,8,["onClick"]),c(e.$slots,"controlsend")]),a("div",x,[e.$slots.header?(r(),d("div",k,[c(e.$slots,"header")])):h("",!0),a(p,{ref:"list",name:"p-orderlist-flip",tag:"ul",class:"p-orderlist-list",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:m((()=>[(r(!0),d(u,null,f(i.modelValue,((i,l)=>y((r(),d("li",{key:v.getItemKey(i,l),tabindex:"0",class:["p-orderlist-item",{"p-highlight":v.isSelected(i)}],onClick:e=>v.onItemClick(e,i,l),onKeydown:e=>v.onItemKeyDown(e,i,l),onTouchend:t[1]||(t[1]=(...e)=>v.onItemTouchEnd&&v.onItemTouchEnd(...e)),role:"option","aria-selected":v.isSelected(i)},[c(e.$slots,"item",{item:i,index:l})],42,["onClick","onKeydown","aria-selected"])),[[I]]))),128))])),_:3},8,["style"])])])};export{v as default};
@@ -328,10 +328,10 @@ this.primevue.orderlist = (function (Button, utils, Ripple, vue) {
328
328
  }
329
329
  },
330
330
  components: {
331
- 'OLButton': Button__default['default']
331
+ 'OLButton': Button__default["default"]
332
332
  },
333
333
  directives: {
334
- 'ripple': Ripple__default['default']
334
+ 'ripple': Ripple__default["default"]
335
335
  }
336
336
  };
337
337
 
@@ -349,6 +349,7 @@ this.primevue.orderlist = (function (Button, utils, Ripple, vue) {
349
349
 
350
350
  return (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
351
351
  vue.createVNode("div", _hoisted_2, [
352
+ vue.renderSlot(_ctx.$slots, "controlsstart"),
352
353
  vue.createVNode(_component_OLButton, {
353
354
  type: "button",
354
355
  icon: "pi pi-angle-up",
@@ -368,7 +369,8 @@ this.primevue.orderlist = (function (Button, utils, Ripple, vue) {
368
369
  type: "button",
369
370
  icon: "pi pi-angle-double-down",
370
371
  onClick: $options.moveBottom
371
- }, null, 8, ["onClick"])
372
+ }, null, 8, ["onClick"]),
373
+ vue.renderSlot(_ctx.$slots, "controlsend")
372
374
  ]),
373
375
  vue.createVNode("div", _hoisted_3, [
374
376
  (_ctx.$slots.header)
@@ -446,4 +448,4 @@ this.primevue.orderlist = (function (Button, utils, Ripple, vue) {
446
448
 
447
449
  return script;
448
450
 
449
- }(primevue.button, primevue.utils, primevue.ripple, Vue));
451
+ })(primevue.button, primevue.utils, primevue.ripple, Vue);
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.orderlist=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),r={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},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}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.ObjectUtils.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let s=e.metaKey||e.ctrlKey;o&&s?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=s&&this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},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-orderlist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findPrevItem(i):null},updateListScroll(){const e=t.DomHandler.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":t.DomHandler.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.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-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:()=>t.UniqueComponentId()},components:{OLButton:o.default},directives:{ripple:s.default}};const d={class:"p-orderlist p-component"},c={class:"p-orderlist-controls"},a={class:"p-orderlist-list-container"},h={key:0,class:"p-orderlist-header"};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-orderlist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-orderlist-controls {\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-orderlist-list-container {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-orderlist-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-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n"),r.render=function(e,t,i,n,o,s){const r=l.resolveComponent("OLButton"),u=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",d,[l.createVNode("div",c,[l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:s.moveUp},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:s.moveTop},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:s.moveDown},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:s.moveBottom},null,8,["onClick"])]),l.createVNode("div",a,[e.$slots.header?(l.openBlock(),l.createBlock("div",h,[l.renderSlot(e.$slots,"header")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"list",name:"p-orderlist-flip",tag:"ul",class:"p-orderlist-list",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(i.modelValue,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,n),tabindex:"0",class:["p-orderlist-item",{"p-highlight":s.isSelected(i)}],onClick:e=>s.onItemClick(e,i,n),onKeydown:e=>s.onItemKeyDown(e,i,n),onTouchend:t[1]||(t[1]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onKeydown","aria-selected"])),[[u]]))),128))])),_:3},8,["style"])])])},r}(primevue.button,primevue.utils,primevue.ripple,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.orderlist=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),r={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},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}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.ObjectUtils.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let s=e.metaKey||e.ctrlKey;o&&s?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=s&&this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},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-orderlist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findPrevItem(i):null},updateListScroll(){const e=t.DomHandler.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":t.DomHandler.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.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-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:()=>t.UniqueComponentId()},components:{OLButton:o.default},directives:{ripple:s.default}};const d={class:"p-orderlist p-component"},c={class:"p-orderlist-controls"},a={class:"p-orderlist-list-container"},h={key:0,class:"p-orderlist-header"};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-orderlist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-orderlist-controls {\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-orderlist-list-container {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-orderlist-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-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n"),r.render=function(e,t,i,n,o,s){const r=l.resolveComponent("OLButton"),u=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",d,[l.createVNode("div",c,[l.renderSlot(e.$slots,"controlsstart"),l.createVNode(r,{type:"button",icon:"pi pi-angle-up",onClick:s.moveUp},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-up",onClick:s.moveTop},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-down",onClick:s.moveDown},null,8,["onClick"]),l.createVNode(r,{type:"button",icon:"pi pi-angle-double-down",onClick:s.moveBottom},null,8,["onClick"]),l.renderSlot(e.$slots,"controlsend")]),l.createVNode("div",a,[e.$slots.header?(l.openBlock(),l.createBlock("div",h,[l.renderSlot(e.$slots,"header")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"list",name:"p-orderlist-flip",tag:"ul",class:"p-orderlist-list",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(i.modelValue,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:s.getItemKey(i,n),tabindex:"0",class:["p-orderlist-item",{"p-highlight":s.isSelected(i)}],onClick:e=>s.onItemClick(e,i,n),onKeydown:e=>s.onItemKeyDown(e,i,n),onTouchend:t[1]||(t[1]=(...e)=>s.onItemTouchEnd&&s.onItemTouchEnd(...e)),role:"option","aria-selected":s.isSelected(i)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onKeydown","aria-selected"])),[[u]]))),128))])),_:3},8,["style"])])])},r}(primevue.button,primevue.utils,primevue.ripple,Vue);