primevue 3.42.0 → 3.44.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 (552) hide show
  1. package/accordion/Accordion.d.ts +8 -0
  2. package/accordion/Accordion.vue +1 -0
  3. package/accordion/accordion.cjs.js +3 -2
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.esm.js +3 -2
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +3 -2
  8. package/accordion/accordion.min.js +1 -1
  9. package/accordiontab/AccordionTab.d.ts +6 -3
  10. package/animateonscroll/animateonscroll.cjs.js +2 -2
  11. package/animateonscroll/animateonscroll.cjs.min.js +1 -1
  12. package/animateonscroll/animateonscroll.esm.js +2 -2
  13. package/animateonscroll/animateonscroll.esm.min.js +1 -1
  14. package/animateonscroll/animateonscroll.js +2 -2
  15. package/animateonscroll/animateonscroll.min.js +1 -1
  16. package/api/api.cjs.js +6 -6
  17. package/api/api.cjs.min.js +1 -1
  18. package/api/api.esm.js +6 -6
  19. package/api/api.esm.min.js +1 -1
  20. package/api/api.js +6 -6
  21. package/api/api.min.js +1 -1
  22. package/autocomplete/AutoComplete.d.ts +25 -2
  23. package/autocomplete/AutoComplete.vue +2 -1
  24. package/autocomplete/autocomplete.cjs.js +5 -3
  25. package/autocomplete/autocomplete.cjs.min.js +1 -1
  26. package/autocomplete/autocomplete.esm.js +5 -3
  27. package/autocomplete/autocomplete.esm.min.js +1 -1
  28. package/autocomplete/autocomplete.js +5 -3
  29. package/autocomplete/autocomplete.min.js +1 -1
  30. package/avatar/Avatar.d.ts +6 -3
  31. package/avatar/Avatar.vue +4 -11
  32. package/avatar/avatar.cjs.js +4 -11
  33. package/avatar/avatar.cjs.min.js +1 -1
  34. package/avatar/avatar.esm.js +4 -11
  35. package/avatar/avatar.esm.min.js +1 -1
  36. package/avatar/avatar.js +4 -11
  37. package/avatar/avatar.min.js +1 -1
  38. package/badge/Badge.d.ts +8 -4
  39. package/badgedirective/BadgeDirective.d.ts +8 -0
  40. package/badgedirective/badgedirective.cjs.js +2 -2
  41. package/badgedirective/badgedirective.cjs.min.js +1 -1
  42. package/badgedirective/badgedirective.esm.js +2 -2
  43. package/badgedirective/badgedirective.esm.min.js +1 -1
  44. package/badgedirective/badgedirective.js +2 -2
  45. package/badgedirective/badgedirective.min.js +1 -1
  46. package/base/style/basestyle.cjs.js +2 -2
  47. package/base/style/basestyle.cjs.min.js +1 -1
  48. package/base/style/basestyle.esm.js +2 -2
  49. package/base/style/basestyle.esm.min.js +1 -1
  50. package/base/style/basestyle.js +2 -2
  51. package/base/style/basestyle.min.js +1 -1
  52. package/basecomponent/BaseComponent.vue +16 -1
  53. package/basecomponent/basecomponent.cjs.js +14 -5
  54. package/basecomponent/basecomponent.cjs.min.js +1 -1
  55. package/basecomponent/basecomponent.esm.js +14 -5
  56. package/basecomponent/basecomponent.esm.min.js +1 -1
  57. package/basecomponent/basecomponent.js +14 -5
  58. package/basecomponent/basecomponent.min.js +1 -1
  59. package/basecomponent/style/basecomponentstyle.cjs.js +2 -2
  60. package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
  61. package/basecomponent/style/basecomponentstyle.esm.js +2 -2
  62. package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
  63. package/basecomponent/style/basecomponentstyle.js +2 -2
  64. package/basecomponent/style/basecomponentstyle.min.js +1 -1
  65. package/basedirective/basedirective.cjs.js +2 -3
  66. package/basedirective/basedirective.cjs.min.js +1 -1
  67. package/basedirective/basedirective.esm.js +2 -3
  68. package/basedirective/basedirective.esm.min.js +1 -1
  69. package/basedirective/basedirective.js +2 -3
  70. package/basedirective/basedirective.min.js +1 -1
  71. package/blockui/BlockUI.d.ts +8 -0
  72. package/breadcrumb/Breadcrumb.d.ts +8 -0
  73. package/button/Button.d.ts +10 -10
  74. package/button/Button.vue +1 -5
  75. package/button/button.cjs.js +1 -6
  76. package/button/button.cjs.min.js +1 -1
  77. package/button/button.esm.js +1 -6
  78. package/button/button.esm.min.js +1 -1
  79. package/button/button.js +1 -6
  80. package/button/button.min.js +1 -1
  81. package/button/style/buttonstyle.cjs.js +2 -2
  82. package/button/style/buttonstyle.cjs.min.js +1 -1
  83. package/button/style/buttonstyle.esm.js +2 -2
  84. package/button/style/buttonstyle.esm.min.js +1 -1
  85. package/button/style/buttonstyle.js +2 -2
  86. package/button/style/buttonstyle.min.js +1 -1
  87. package/calendar/Calendar.d.ts +37 -11
  88. package/calendar/Calendar.vue +9 -5
  89. package/calendar/calendar.cjs.js +10 -8
  90. package/calendar/calendar.cjs.min.js +1 -1
  91. package/calendar/calendar.esm.js +10 -8
  92. package/calendar/calendar.esm.min.js +1 -1
  93. package/calendar/calendar.js +10 -8
  94. package/calendar/calendar.min.js +1 -1
  95. package/carousel/Carousel.d.ts +8 -0
  96. package/carousel/Carousel.vue +4 -2
  97. package/carousel/carousel.cjs.js +5 -3
  98. package/carousel/carousel.cjs.min.js +1 -1
  99. package/carousel/carousel.esm.js +5 -3
  100. package/carousel/carousel.esm.min.js +1 -1
  101. package/carousel/carousel.js +5 -3
  102. package/carousel/carousel.min.js +1 -1
  103. package/cascadeselect/CascadeSelect.d.ts +8 -0
  104. package/cascadeselect/CascadeSelect.vue +1 -1
  105. package/cascadeselect/CascadeSelectSub.vue +4 -1
  106. package/cascadeselect/cascadeselect.cjs.js +7 -4
  107. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  108. package/cascadeselect/cascadeselect.esm.js +7 -4
  109. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  110. package/cascadeselect/cascadeselect.js +7 -4
  111. package/cascadeselect/cascadeselect.min.js +1 -1
  112. package/chart/Chart.d.ts +8 -0
  113. package/chart/Chart.vue +1 -1
  114. package/chart/chart.cjs.js +4 -3
  115. package/chart/chart.cjs.min.js +1 -1
  116. package/chart/chart.esm.js +4 -3
  117. package/chart/chart.esm.min.js +1 -1
  118. package/chart/chart.js +4 -3
  119. package/chart/chart.min.js +1 -1
  120. package/chart/style/chartstyle.cjs.js +6 -2
  121. package/chart/style/chartstyle.cjs.min.js +1 -1
  122. package/chart/style/chartstyle.esm.js +6 -2
  123. package/chart/style/chartstyle.esm.min.js +1 -1
  124. package/chart/style/chartstyle.js +6 -2
  125. package/chart/style/chartstyle.min.js +1 -1
  126. package/checkbox/Checkbox.d.ts +8 -0
  127. package/checkbox/checkbox.cjs.js +2 -2
  128. package/checkbox/checkbox.cjs.min.js +1 -1
  129. package/checkbox/checkbox.esm.js +2 -2
  130. package/checkbox/checkbox.esm.min.js +1 -1
  131. package/checkbox/checkbox.js +2 -2
  132. package/checkbox/checkbox.min.js +1 -1
  133. package/chip/Chip.d.ts +8 -0
  134. package/chips/Chips.d.ts +8 -0
  135. package/chips/chips.cjs.js +2 -2
  136. package/chips/chips.cjs.min.js +1 -1
  137. package/chips/chips.esm.js +2 -2
  138. package/chips/chips.esm.min.js +1 -1
  139. package/chips/chips.js +2 -2
  140. package/chips/chips.min.js +1 -1
  141. package/colorpicker/ColorPicker.d.ts +8 -0
  142. package/column/Column.d.ts +31 -13
  143. package/columngroup/ColumnGroup.d.ts +6 -3
  144. package/config/config.cjs.js +3 -3
  145. package/config/config.cjs.min.js +1 -1
  146. package/config/config.esm.js +3 -3
  147. package/config/config.esm.min.js +1 -1
  148. package/config/config.js +3 -3
  149. package/config/config.min.js +1 -1
  150. package/confirmdialog/ConfirmDialog.d.ts +24 -2
  151. package/confirmpopup/ConfirmPopup.d.ts +24 -2
  152. package/confirmpopup/confirmpopup.cjs.js +2 -2
  153. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  154. package/confirmpopup/confirmpopup.esm.js +2 -2
  155. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  156. package/confirmpopup/confirmpopup.js +2 -2
  157. package/confirmpopup/confirmpopup.min.js +1 -1
  158. package/contextmenu/ContextMenu.d.ts +8 -0
  159. package/contextmenu/contextmenu.cjs.js +2 -2
  160. package/contextmenu/contextmenu.cjs.min.js +1 -1
  161. package/contextmenu/contextmenu.esm.js +2 -2
  162. package/contextmenu/contextmenu.esm.min.js +1 -1
  163. package/contextmenu/contextmenu.js +2 -2
  164. package/contextmenu/contextmenu.min.js +1 -1
  165. package/core/core.js +308 -229
  166. package/core/core.min.js +27 -27
  167. package/datatable/BodyCell.vue +1 -0
  168. package/datatable/ColumnFilter.vue +1 -0
  169. package/datatable/DataTable.d.ts +23 -1
  170. package/datatable/FooterCell.vue +1 -0
  171. package/datatable/HeaderCell.vue +1 -0
  172. package/datatable/HeaderCheckbox.vue +1 -0
  173. package/datatable/RowCheckbox.vue +2 -0
  174. package/datatable/RowRadioButton.vue +1 -0
  175. package/datatable/TableBody.vue +1 -0
  176. package/datatable/TableFooter.vue +2 -0
  177. package/datatable/TableHeader.vue +3 -0
  178. package/datatable/datatable.cjs.js +34 -20
  179. package/datatable/datatable.cjs.min.js +1 -1
  180. package/datatable/datatable.esm.js +34 -20
  181. package/datatable/datatable.esm.min.js +1 -1
  182. package/datatable/datatable.js +34 -20
  183. package/datatable/datatable.min.js +1 -1
  184. package/dataview/DataView.d.ts +24 -1
  185. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +8 -0
  186. package/deferredcontent/DeferredContent.d.ts +8 -0
  187. package/dialog/Dialog.d.ts +20 -16
  188. package/dialog/dialog.cjs.js +2 -2
  189. package/dialog/dialog.cjs.min.js +1 -1
  190. package/dialog/dialog.esm.js +2 -2
  191. package/dialog/dialog.esm.min.js +1 -1
  192. package/dialog/dialog.js +2 -2
  193. package/dialog/dialog.min.js +1 -1
  194. package/divider/Divider.d.ts +8 -0
  195. package/dock/Dock.d.ts +8 -0
  196. package/dropdown/Dropdown.d.ts +28 -24
  197. package/dropdown/Dropdown.vue +5 -3
  198. package/dropdown/dropdown.cjs.js +8 -7
  199. package/dropdown/dropdown.cjs.min.js +1 -1
  200. package/dropdown/dropdown.esm.js +8 -7
  201. package/dropdown/dropdown.esm.min.js +1 -1
  202. package/dropdown/dropdown.js +8 -7
  203. package/dropdown/dropdown.min.js +1 -1
  204. package/dropdown/style/dropdownstyle.cjs.js +1 -1
  205. package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
  206. package/dropdown/style/dropdownstyle.esm.js +1 -1
  207. package/dropdown/style/dropdownstyle.esm.min.js +1 -1
  208. package/dropdown/style/dropdownstyle.js +1 -1
  209. package/dropdown/style/dropdownstyle.min.js +1 -1
  210. package/dynamicdialog/DynamicDialog.vue +1 -1
  211. package/dynamicdialog/dynamicdialog.cjs.js +1 -3
  212. package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
  213. package/dynamicdialog/dynamicdialog.esm.js +1 -3
  214. package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
  215. package/dynamicdialog/dynamicdialog.js +1 -3
  216. package/dynamicdialog/dynamicdialog.min.js +1 -1
  217. package/editor/Editor.d.ts +8 -0
  218. package/editor/editor.cjs.js +2 -2
  219. package/editor/editor.cjs.min.js +1 -1
  220. package/editor/editor.esm.js +2 -2
  221. package/editor/editor.esm.min.js +1 -1
  222. package/editor/editor.js +2 -2
  223. package/editor/editor.min.js +1 -1
  224. package/fieldset/Fieldset.d.ts +8 -0
  225. package/fieldset/Fieldset.vue +1 -1
  226. package/fieldset/fieldset.cjs.js +3 -3
  227. package/fieldset/fieldset.cjs.min.js +1 -1
  228. package/fieldset/fieldset.esm.js +3 -3
  229. package/fieldset/fieldset.esm.min.js +1 -1
  230. package/fieldset/fieldset.js +3 -3
  231. package/fieldset/fieldset.min.js +1 -1
  232. package/fileupload/FileUpload.d.ts +30 -6
  233. package/galleria/BaseGalleria.vue +8 -0
  234. package/galleria/Galleria.d.ts +16 -0
  235. package/galleria/Galleria.vue +1 -1
  236. package/galleria/GalleriaContent.vue +11 -1
  237. package/galleria/GalleriaItem.vue +72 -3
  238. package/galleria/galleria.cjs.js +93 -13
  239. package/galleria/galleria.cjs.min.js +1 -1
  240. package/galleria/galleria.esm.js +93 -13
  241. package/galleria/galleria.esm.min.js +1 -1
  242. package/galleria/galleria.js +93 -13
  243. package/galleria/galleria.min.js +1 -1
  244. package/image/Image.d.ts +8 -0
  245. package/image/Image.vue +4 -1
  246. package/image/image.cjs.js +20 -15
  247. package/image/image.cjs.min.js +1 -1
  248. package/image/image.esm.js +20 -15
  249. package/image/image.esm.min.js +1 -1
  250. package/image/image.js +20 -15
  251. package/image/image.min.js +1 -1
  252. package/inlinemessage/InlineMessage.d.ts +8 -0
  253. package/inplace/Inplace.d.ts +23 -1
  254. package/inplace/inplace.cjs.js +2 -2
  255. package/inplace/inplace.cjs.min.js +1 -1
  256. package/inplace/inplace.esm.js +2 -2
  257. package/inplace/inplace.esm.min.js +1 -1
  258. package/inplace/inplace.js +2 -2
  259. package/inplace/inplace.min.js +1 -1
  260. package/inputgroup/InputGroup.d.ts +8 -0
  261. package/inputgroupaddon/InputGroupAddon.d.ts +8 -0
  262. package/inputmask/InputMask.d.ts +8 -0
  263. package/inputnumber/InputNumber.d.ts +30 -12
  264. package/inputnumber/InputNumber.vue +10 -5
  265. package/inputnumber/inputnumber.cjs.js +22 -23
  266. package/inputnumber/inputnumber.cjs.min.js +1 -1
  267. package/inputnumber/inputnumber.esm.js +22 -23
  268. package/inputnumber/inputnumber.esm.min.js +1 -1
  269. package/inputnumber/inputnumber.js +22 -23
  270. package/inputnumber/inputnumber.min.js +1 -1
  271. package/inputswitch/InputSwitch.d.ts +8 -0
  272. package/inputswitch/inputswitch.cjs.js +2 -2
  273. package/inputswitch/inputswitch.cjs.min.js +1 -1
  274. package/inputswitch/inputswitch.esm.js +2 -2
  275. package/inputswitch/inputswitch.esm.min.js +1 -1
  276. package/inputswitch/inputswitch.js +2 -2
  277. package/inputswitch/inputswitch.min.js +1 -1
  278. package/inputtext/InputText.d.ts +8 -4
  279. package/inputtext/InputText.vue +9 -9
  280. package/inputtext/inputtext.cjs.js +9 -9
  281. package/inputtext/inputtext.cjs.min.js +1 -1
  282. package/inputtext/inputtext.esm.js +9 -9
  283. package/inputtext/inputtext.esm.min.js +1 -1
  284. package/inputtext/inputtext.js +9 -9
  285. package/inputtext/inputtext.min.js +1 -1
  286. package/knob/Knob.d.ts +8 -0
  287. package/listbox/Listbox.d.ts +8 -0
  288. package/listbox/listbox.cjs.js +2 -2
  289. package/listbox/listbox.cjs.min.js +1 -1
  290. package/listbox/listbox.esm.js +2 -2
  291. package/listbox/listbox.esm.min.js +1 -1
  292. package/listbox/listbox.js +2 -2
  293. package/listbox/listbox.min.js +1 -1
  294. package/megamenu/MegaMenu.d.ts +8 -0
  295. package/menu/Menu.d.ts +8 -0
  296. package/menu/menu.cjs.js +2 -2
  297. package/menu/menu.cjs.min.js +1 -1
  298. package/menu/menu.esm.js +2 -2
  299. package/menu/menu.esm.min.js +1 -1
  300. package/menu/menu.js +2 -2
  301. package/menu/menu.min.js +1 -1
  302. package/menubar/Menubar.d.ts +8 -0
  303. package/menubar/menubar.cjs.js +2 -2
  304. package/menubar/menubar.cjs.min.js +1 -1
  305. package/menubar/menubar.esm.js +2 -2
  306. package/menubar/menubar.esm.min.js +1 -1
  307. package/menubar/menubar.js +2 -2
  308. package/menubar/menubar.min.js +1 -1
  309. package/message/Message.d.ts +17 -13
  310. package/message/message.cjs.js +2 -2
  311. package/message/message.cjs.min.js +1 -1
  312. package/message/message.esm.js +2 -2
  313. package/message/message.esm.min.js +1 -1
  314. package/message/message.js +2 -2
  315. package/message/message.min.js +1 -1
  316. package/multiselect/MultiSelect.d.ts +8 -0
  317. package/multiselect/multiselect.cjs.js +4 -4
  318. package/multiselect/multiselect.cjs.min.js +1 -1
  319. package/multiselect/multiselect.esm.js +4 -4
  320. package/multiselect/multiselect.esm.min.js +1 -1
  321. package/multiselect/multiselect.js +4 -4
  322. package/multiselect/multiselect.min.js +1 -1
  323. package/orderlist/OrderList.d.ts +27 -5
  324. package/orderlist/OrderList.vue +4 -4
  325. package/orderlist/orderlist.cjs.js +18 -18
  326. package/orderlist/orderlist.cjs.min.js +1 -1
  327. package/orderlist/orderlist.esm.js +18 -18
  328. package/orderlist/orderlist.esm.min.js +1 -1
  329. package/orderlist/orderlist.js +18 -18
  330. package/orderlist/orderlist.min.js +1 -1
  331. package/organizationchart/OrganizationChart.d.ts +8 -0
  332. package/organizationchart/organizationchart.cjs.js +2 -2
  333. package/organizationchart/organizationchart.cjs.min.js +1 -1
  334. package/organizationchart/organizationchart.esm.js +2 -2
  335. package/organizationchart/organizationchart.esm.min.js +1 -1
  336. package/organizationchart/organizationchart.js +2 -2
  337. package/organizationchart/organizationchart.min.js +1 -1
  338. package/overlaypanel/OverlayPanel.d.ts +8 -0
  339. package/overlaypanel/overlaypanel.cjs.js +2 -2
  340. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  341. package/overlaypanel/overlaypanel.esm.js +2 -2
  342. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  343. package/overlaypanel/overlaypanel.js +2 -2
  344. package/overlaypanel/overlaypanel.min.js +1 -1
  345. package/package.json +1 -1
  346. package/paginator/Paginator.d.ts +44 -26
  347. package/paginator/style/paginatorstyle.cjs.js +2 -2
  348. package/paginator/style/paginatorstyle.cjs.min.js +1 -1
  349. package/paginator/style/paginatorstyle.esm.js +2 -2
  350. package/paginator/style/paginatorstyle.esm.min.js +1 -1
  351. package/paginator/style/paginatorstyle.js +2 -2
  352. package/paginator/style/paginatorstyle.min.js +1 -1
  353. package/panel/Panel.d.ts +8 -0
  354. package/panel/Panel.vue +1 -1
  355. package/panel/panel.cjs.js +3 -3
  356. package/panel/panel.cjs.min.js +1 -1
  357. package/panel/panel.esm.js +3 -3
  358. package/panel/panel.esm.min.js +1 -1
  359. package/panel/panel.js +3 -3
  360. package/panel/panel.min.js +1 -1
  361. package/panelmenu/PanelMenu.d.ts +8 -0
  362. package/panelmenu/panelmenu.cjs.js +2 -2
  363. package/panelmenu/panelmenu.cjs.min.js +1 -1
  364. package/panelmenu/panelmenu.esm.js +2 -2
  365. package/panelmenu/panelmenu.esm.min.js +1 -1
  366. package/panelmenu/panelmenu.js +2 -2
  367. package/panelmenu/panelmenu.min.js +1 -1
  368. package/passthrough/index.cjs.js +2 -2
  369. package/passthrough/index.cjs.min.js +1 -1
  370. package/passthrough/index.esm.js +2 -2
  371. package/passthrough/index.esm.min.js +1 -1
  372. package/passthrough/index.js +2 -2
  373. package/passthrough/index.min.js +1 -1
  374. package/passthrough/tailwind/index.cjs.js +168 -124
  375. package/passthrough/tailwind/index.cjs.min.js +1 -1
  376. package/passthrough/tailwind/index.esm.js +168 -124
  377. package/passthrough/tailwind/index.esm.min.js +1 -1
  378. package/passthrough/tailwind/index.js +168 -124
  379. package/passthrough/tailwind/index.min.js +1 -1
  380. package/password/Password.d.ts +25 -3
  381. package/password/Password.vue +2 -1
  382. package/password/password.cjs.js +5 -6
  383. package/password/password.cjs.min.js +1 -1
  384. package/password/password.esm.js +5 -6
  385. package/password/password.esm.min.js +1 -1
  386. package/password/password.js +5 -6
  387. package/password/password.min.js +1 -1
  388. package/picklist/PickList.d.ts +35 -13
  389. package/picklist/PickList.vue +48 -12
  390. package/picklist/picklist.cjs.js +49 -37
  391. package/picklist/picklist.cjs.min.js +1 -1
  392. package/picklist/picklist.esm.js +49 -37
  393. package/picklist/picklist.esm.min.js +1 -1
  394. package/picklist/picklist.js +49 -37
  395. package/picklist/picklist.min.js +1 -1
  396. package/progressbar/ProgressBar.d.ts +10 -6
  397. package/progressspinner/ProgressSpinner.d.ts +8 -0
  398. package/radiobutton/RadioButton.d.ts +8 -0
  399. package/radiobutton/radiobutton.cjs.js +2 -2
  400. package/radiobutton/radiobutton.cjs.min.js +1 -1
  401. package/radiobutton/radiobutton.esm.js +2 -2
  402. package/radiobutton/radiobutton.esm.min.js +1 -1
  403. package/radiobutton/radiobutton.js +2 -2
  404. package/radiobutton/radiobutton.min.js +1 -1
  405. package/rating/Rating.d.ts +8 -0
  406. package/row/Row.d.ts +6 -3
  407. package/scrollpanel/ScrollPanel.d.ts +8 -0
  408. package/scrollpanel/ScrollPanel.vue +8 -1
  409. package/scrollpanel/scrollpanel.cjs.js +14 -5
  410. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  411. package/scrollpanel/scrollpanel.esm.js +14 -5
  412. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  413. package/scrollpanel/scrollpanel.js +14 -5
  414. package/scrollpanel/scrollpanel.min.js +1 -1
  415. package/scrolltop/ScrollTop.d.ts +8 -0
  416. package/selectbutton/SelectButton.d.ts +8 -0
  417. package/sidebar/Sidebar.d.ts +8 -0
  418. package/sidebar/sidebar.cjs.js +2 -2
  419. package/sidebar/sidebar.cjs.min.js +1 -1
  420. package/sidebar/sidebar.esm.js +2 -2
  421. package/sidebar/sidebar.esm.min.js +1 -1
  422. package/sidebar/sidebar.js +2 -2
  423. package/sidebar/sidebar.min.js +1 -1
  424. package/skeleton/Skeleton.d.ts +8 -0
  425. package/slider/Slider.d.ts +8 -0
  426. package/speeddial/SpeedDial.d.ts +23 -1
  427. package/speeddial/speeddial.cjs.js +2 -2
  428. package/speeddial/speeddial.cjs.min.js +1 -1
  429. package/speeddial/speeddial.esm.js +2 -2
  430. package/speeddial/speeddial.esm.min.js +1 -1
  431. package/speeddial/speeddial.js +2 -2
  432. package/speeddial/speeddial.min.js +1 -1
  433. package/speeddial/style/speeddialstyle.cjs.js +2 -2
  434. package/speeddial/style/speeddialstyle.cjs.min.js +1 -1
  435. package/speeddial/style/speeddialstyle.esm.js +2 -2
  436. package/speeddial/style/speeddialstyle.esm.min.js +1 -1
  437. package/speeddial/style/speeddialstyle.js +2 -2
  438. package/speeddial/style/speeddialstyle.min.js +1 -1
  439. package/splitbutton/SplitButton.d.ts +24 -2
  440. package/splitbutton/SplitButton.vue +2 -2
  441. package/splitbutton/splitbutton.cjs.js +4 -4
  442. package/splitbutton/splitbutton.cjs.min.js +1 -1
  443. package/splitbutton/splitbutton.esm.js +4 -4
  444. package/splitbutton/splitbutton.esm.min.js +1 -1
  445. package/splitbutton/splitbutton.js +4 -4
  446. package/splitbutton/splitbutton.min.js +1 -1
  447. package/splitbutton/style/splitbuttonstyle.cjs.js +3 -3
  448. package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
  449. package/splitbutton/style/splitbuttonstyle.esm.js +3 -3
  450. package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
  451. package/splitbutton/style/splitbuttonstyle.js +3 -3
  452. package/splitbutton/style/splitbuttonstyle.min.js +1 -1
  453. package/splitter/Splitter.d.ts +8 -0
  454. package/splitterpanel/SplitterPanel.d.ts +8 -0
  455. package/steps/Steps.d.ts +8 -0
  456. package/tabmenu/TabMenu.d.ts +8 -0
  457. package/tabpanel/TabPanel.d.ts +8 -5
  458. package/tabview/TabView.vue +1 -0
  459. package/tabview/tabview.cjs.js +3 -2
  460. package/tabview/tabview.cjs.min.js +1 -1
  461. package/tabview/tabview.esm.js +3 -2
  462. package/tabview/tabview.esm.min.js +1 -1
  463. package/tabview/tabview.js +3 -2
  464. package/tabview/tabview.min.js +1 -1
  465. package/tag/Tag.d.ts +8 -0
  466. package/terminal/Terminal.d.ts +8 -0
  467. package/textarea/Textarea.d.ts +8 -0
  468. package/tieredmenu/TieredMenu.d.ts +18 -14
  469. package/tieredmenu/tieredmenu.cjs.js +2 -2
  470. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  471. package/tieredmenu/tieredmenu.esm.js +2 -2
  472. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  473. package/tieredmenu/tieredmenu.js +2 -2
  474. package/tieredmenu/tieredmenu.min.js +1 -1
  475. package/timeline/Timeline.d.ts +8 -0
  476. package/toast/Toast.d.ts +8 -0
  477. package/toast/style/toaststyle.cjs.js +2 -2
  478. package/toast/style/toaststyle.cjs.min.js +1 -1
  479. package/toast/style/toaststyle.esm.js +2 -2
  480. package/toast/style/toaststyle.esm.min.js +1 -1
  481. package/toast/style/toaststyle.js +2 -2
  482. package/toast/style/toaststyle.min.js +1 -1
  483. package/toast/toast.cjs.js +4 -4
  484. package/toast/toast.cjs.min.js +1 -1
  485. package/toast/toast.esm.js +4 -4
  486. package/toast/toast.esm.min.js +1 -1
  487. package/toast/toast.js +4 -4
  488. package/toast/toast.min.js +1 -1
  489. package/togglebutton/ToggleButton.d.ts +8 -0
  490. package/togglebutton/togglebutton.cjs.js +2 -2
  491. package/togglebutton/togglebutton.cjs.min.js +1 -1
  492. package/togglebutton/togglebutton.esm.js +2 -2
  493. package/togglebutton/togglebutton.esm.min.js +1 -1
  494. package/togglebutton/togglebutton.js +2 -2
  495. package/togglebutton/togglebutton.min.js +1 -1
  496. package/toolbar/Toolbar.d.ts +8 -0
  497. package/tooltip/Tooltip.d.ts +8 -0
  498. package/tree/Tree.d.ts +46 -22
  499. package/tree/Tree.vue +3 -1
  500. package/tree/tree.cjs.js +9 -5
  501. package/tree/tree.cjs.min.js +1 -1
  502. package/tree/tree.esm.js +9 -5
  503. package/tree/tree.esm.min.js +1 -1
  504. package/tree/tree.js +9 -5
  505. package/tree/tree.min.js +1 -1
  506. package/treeselect/TreeSelect.d.ts +25 -3
  507. package/treeselect/treeselect.cjs.js +4 -4
  508. package/treeselect/treeselect.cjs.min.js +1 -1
  509. package/treeselect/treeselect.esm.js +4 -4
  510. package/treeselect/treeselect.esm.min.js +1 -1
  511. package/treeselect/treeselect.js +4 -4
  512. package/treeselect/treeselect.min.js +1 -1
  513. package/treetable/BodyCell.vue +3 -1
  514. package/treetable/FooterCell.vue +1 -0
  515. package/treetable/HeaderCell.vue +1 -0
  516. package/treetable/TreeTable.d.ts +23 -1
  517. package/treetable/TreeTable.vue +3 -1
  518. package/treetable/treetable.cjs.js +19 -13
  519. package/treetable/treetable.cjs.min.js +1 -1
  520. package/treetable/treetable.esm.js +19 -13
  521. package/treetable/treetable.esm.min.js +1 -1
  522. package/treetable/treetable.js +19 -13
  523. package/treetable/treetable.min.js +1 -1
  524. package/tristatecheckbox/TriStateCheckbox.d.ts +8 -0
  525. package/tristatecheckbox/tristatecheckbox.cjs.js +2 -2
  526. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  527. package/tristatecheckbox/tristatecheckbox.esm.js +2 -2
  528. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  529. package/tristatecheckbox/tristatecheckbox.js +2 -2
  530. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  531. package/usestyle/usestyle.cjs.js +2 -2
  532. package/usestyle/usestyle.cjs.min.js +1 -1
  533. package/usestyle/usestyle.esm.js +2 -2
  534. package/usestyle/usestyle.esm.min.js +1 -1
  535. package/usestyle/usestyle.js +2 -2
  536. package/usestyle/usestyle.min.js +1 -1
  537. package/utils/Utils.d.ts +1 -0
  538. package/utils/utils.cjs.js +27 -3
  539. package/utils/utils.cjs.min.js +1 -1
  540. package/utils/utils.esm.js +27 -3
  541. package/utils/utils.esm.min.js +1 -1
  542. package/utils/utils.js +27 -3
  543. package/utils/utils.min.js +1 -1
  544. package/virtualscroller/VirtualScroller.d.ts +8 -0
  545. package/virtualscroller/VirtualScroller.vue +1 -1
  546. package/virtualscroller/virtualscroller.cjs.js +5 -5
  547. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  548. package/virtualscroller/virtualscroller.esm.js +5 -5
  549. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  550. package/virtualscroller/virtualscroller.js +5 -5
  551. package/virtualscroller/virtualscroller.min.js +1 -1
  552. package/web-types.json +1 -1
@@ -1 +1 @@
1
- import e from"primevue/basecomponent";import t from"primevue/inputswitch/style";import{openBlock as n,createElementBlock as r,mergeProps as i,createElementVNode as u}from"vue";var l={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:e,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:t,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=d(e,"string");return"symbol"===o(t)?t:String(t)}function d(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"];l.render=function(e,t,l,o,a,s){return n(),r("div",i({class:e.cx("root"),style:e.sx("root"),onClick:t[2]||(t[2]=function(e){return s.onClick(e)})},e.ptm("root"),{"data-pc-name":"inputswitch"}),[u("div",i({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",i({ref:"input",id:e.inputId,type:"checkbox",role:"switch",class:e.inputClass,style:e.inputStyle,checked:s.checked,disabled:e.disabled,"aria-checked":s.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return s.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return s.onBlur(e)})},c(c({},e.inputProps),e.ptm("hiddenInput"))),null,16,f)],16),u("span",i({class:e.cx("slider")},e.ptm("slider")),null,16)],16)};export{l as default};
1
+ import e from"primevue/basecomponent";import t from"primevue/inputswitch/style";import{openBlock as n,createElementBlock as r,mergeProps as i,createElementVNode as u}from"vue";var l={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:e,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:t,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){var r;return(t="symbol"==o(r=p(t,"string"))?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"];l.render=function(e,t,l,o,a,s){return n(),r("div",i({class:e.cx("root"),style:e.sx("root"),onClick:t[2]||(t[2]=function(e){return s.onClick(e)})},e.ptm("root"),{"data-pc-name":"inputswitch"}),[u("div",i({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",i({ref:"input",id:e.inputId,type:"checkbox",role:"switch",class:e.inputClass,style:e.inputStyle,checked:s.checked,disabled:e.disabled,"aria-checked":s.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return s.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return s.onBlur(e)})},c(c({},e.inputProps),e.ptm("hiddenInput"))),null,16,d)],16),u("span",i({class:e.cx("slider")},e.ptm("slider")),null,16)],16)};export{l as default};
@@ -100,8 +100,8 @@ this.primevue.inputswitch = (function (BaseComponent, InputSwitchStyle, vue) {
100
100
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
101
101
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
102
102
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
103
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
104
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
103
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
104
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
105
105
  var _hoisted_1 = ["id", "checked", "disabled", "aria-checked", "aria-labelledby", "aria-label"];
106
106
  function render(_ctx, _cache, $props, $setup, $data, $options) {
107
107
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.inputswitch=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:r(e).default,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:r(t).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=s(e,"string");return"symbol"===u(t)?t:String(t)}function s(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var p=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"];return i.render=function(e,t,r,i,u,l){return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:e.cx("root"),style:e.sx("root"),onClick:t[2]||(t[2]=function(e){return l.onClick(e)})},e.ptm("root"),{"data-pc-name":"inputswitch"}),[n.createElementVNode("div",n.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[n.createElementVNode("input",n.mergeProps({ref:"input",id:e.inputId,type:"checkbox",role:"switch",class:e.inputClass,style:e.inputStyle,checked:l.checked,disabled:e.disabled,"aria-checked":l.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)})},o(o({},e.inputProps),e.ptm("hiddenInput"))),null,16,p)],16),n.createElementVNode("span",n.mergeProps({class:e.cx("slider")},e.ptm("slider")),null,16)],16)},i}(primevue.basecomponent,primevue.inputswitch.style,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.inputswitch=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:r(e).default,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:r(t).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){var r;return(t="symbol"==u(r=a(t,"string"))?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var s=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"];return i.render=function(e,t,r,i,u,l){return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:e.cx("root"),style:e.sx("root"),onClick:t[2]||(t[2]=function(e){return l.onClick(e)})},e.ptm("root"),{"data-pc-name":"inputswitch"}),[n.createElementVNode("div",n.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[n.createElementVNode("input",n.mergeProps({ref:"input",id:e.inputId,type:"checkbox",role:"switch",class:e.inputClass,style:e.inputStyle,checked:l.checked,disabled:e.disabled,"aria-checked":l.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)})},o(o({},e.inputProps),e.ptm("hiddenInput"))),null,16,s)],16),n.createElementVNode("span",n.mergeProps({class:e.cx("slider")},e.ptm("slider")),null,16)],16)},i}(primevue.basecomponent,primevue.inputswitch.style,Vue);
@@ -12,12 +12,12 @@ import { ComponentHooks } from '../basecomponent';
12
12
  import { PassThroughOptions } from '../passthrough';
13
13
  import { ClassComponent, GlobalComponentConstructor, Nullable, PassThrough } from '../ts-helpers';
14
14
 
15
- export declare type InputTextPassThroughOptionType = InputTextPassThroughAttributes | ((options: InputTextPassThroughMethodOptions) => InputTextPassThroughAttributes | string) | string | null | undefined;
15
+ export declare type InputTextPassThroughOptionType<T = any> = InputTextPassThroughAttributes | ((options: InputTextPassThroughMethodOptions<T>) => InputTextPassThroughAttributes | string) | string | null | undefined;
16
16
 
17
17
  /**
18
18
  * Custom passthrough(pt) option method.
19
19
  */
20
- export interface InputTextPassThroughMethodOptions {
20
+ export interface InputTextPassThroughMethodOptions<T = any> {
21
21
  /**
22
22
  * Defines instance.
23
23
  */
@@ -30,6 +30,10 @@ export interface InputTextPassThroughMethodOptions {
30
30
  * Defines current options.
31
31
  */
32
32
  context: InputTextContext;
33
+ /**
34
+ * Defines parent instance.
35
+ */
36
+ parent: T;
33
37
  /**
34
38
  * Defines passthrough(pt) options in global config.
35
39
  */
@@ -40,11 +44,11 @@ export interface InputTextPassThroughMethodOptions {
40
44
  * Custom passthrough(pt) options.
41
45
  * @see {@link InputTextProps.pt}
42
46
  */
43
- export interface InputTextPassThroughOptions {
47
+ export interface InputTextPassThroughOptions<T = any> {
44
48
  /**
45
49
  * Used to pass attributes to the root's DOM element.
46
50
  */
47
- root?: InputTextPassThroughOptionType;
51
+ root?: InputTextPassThroughOptionType<T>;
48
52
  /**
49
53
  * Used to manage all lifecycle hooks.
50
54
  * @see {@link BaseComponent.ComponentHooks}
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root', ptmParams)" data-pc-name="inputtext" />
2
+ <input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="getPTOptions('root')" data-pc-name="inputtext" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -10,6 +10,14 @@ export default {
10
10
  extends: BaseInputText,
11
11
  emits: ['update:modelValue'],
12
12
  methods: {
13
+ getPTOptions(key) {
14
+ return this.ptm(key, {
15
+ context: {
16
+ filled: this.filled,
17
+ disabled: this.$attrs.disabled || this.$attrs.disabled === ''
18
+ }
19
+ });
20
+ },
13
21
  onInput(event) {
14
22
  this.$emit('update:modelValue', event.target.value);
15
23
  }
@@ -17,14 +25,6 @@ export default {
17
25
  computed: {
18
26
  filled() {
19
27
  return this.modelValue != null && this.modelValue.toString().length > 0;
20
- },
21
- ptmParams() {
22
- return {
23
- context: {
24
- filled: this.filled,
25
- disabled: this.$attrs.disabled || this.$attrs.disabled === ''
26
- }
27
- };
28
28
  }
29
29
  }
30
30
  };
@@ -32,6 +32,14 @@ var script = {
32
32
  "extends": script$1,
33
33
  emits: ['update:modelValue'],
34
34
  methods: {
35
+ getPTOptions: function getPTOptions(key) {
36
+ return this.ptm(key, {
37
+ context: {
38
+ filled: this.filled,
39
+ disabled: this.$attrs.disabled || this.$attrs.disabled === ''
40
+ }
41
+ });
42
+ },
35
43
  onInput: function onInput(event) {
36
44
  this.$emit('update:modelValue', event.target.value);
37
45
  }
@@ -39,14 +47,6 @@ var script = {
39
47
  computed: {
40
48
  filled: function filled() {
41
49
  return this.modelValue != null && this.modelValue.toString().length > 0;
42
- },
43
- ptmParams: function ptmParams() {
44
- return {
45
- context: {
46
- filled: this.filled,
47
- disabled: this.$attrs.disabled || this.$attrs.disabled === ''
48
- }
49
- };
50
50
  }
51
51
  }
52
52
  };
@@ -59,7 +59,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
59
59
  onInput: _cache[0] || (_cache[0] = function () {
60
60
  return $options.onInput && $options.onInput.apply($options, arguments);
61
61
  })
62
- }, _ctx.ptm('root', $options.ptmParams), {
62
+ }, $options.getPTOptions('root'), {
63
63
  "data-pc-name": "inputtext"
64
64
  }), null, 16, _hoisted_1);
65
65
  }
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/basecomponent"),t=require("primevue/inputtext/style"),n=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},r=["value"];l.render=function(e,t,u,l,a,o){return n.openBlock(),n.createElementBlock("input",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return o.onInput&&o.onInput.apply(o,arguments)})},e.ptm("root",o.ptmParams),{"data-pc-name":"inputtext"}),null,16,r)},module.exports=l;
1
+ "use strict";var e=require("primevue/basecomponent"),t=require("primevue/inputtext/style"),n=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{getPTOptions:function(e){return this.ptm(e,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},i=["value"];l.render=function(e,t,u,l,o,r){return n.openBlock(),n.createElementBlock("input",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return r.onInput&&r.onInput.apply(r,arguments)})},r.getPTOptions("root"),{"data-pc-name":"inputtext"}),null,16,i)},module.exports=l;
@@ -25,6 +25,14 @@ var script = {
25
25
  "extends": script$1,
26
26
  emits: ['update:modelValue'],
27
27
  methods: {
28
+ getPTOptions: function getPTOptions(key) {
29
+ return this.ptm(key, {
30
+ context: {
31
+ filled: this.filled,
32
+ disabled: this.$attrs.disabled || this.$attrs.disabled === ''
33
+ }
34
+ });
35
+ },
28
36
  onInput: function onInput(event) {
29
37
  this.$emit('update:modelValue', event.target.value);
30
38
  }
@@ -32,14 +40,6 @@ var script = {
32
40
  computed: {
33
41
  filled: function filled() {
34
42
  return this.modelValue != null && this.modelValue.toString().length > 0;
35
- },
36
- ptmParams: function ptmParams() {
37
- return {
38
- context: {
39
- filled: this.filled,
40
- disabled: this.$attrs.disabled || this.$attrs.disabled === ''
41
- }
42
- };
43
43
  }
44
44
  }
45
45
  };
@@ -52,7 +52,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
52
52
  onInput: _cache[0] || (_cache[0] = function () {
53
53
  return $options.onInput && $options.onInput.apply($options, arguments);
54
54
  })
55
- }, _ctx.ptm('root', $options.ptmParams), {
55
+ }, $options.getPTOptions('root'), {
56
56
  "data-pc-name": "inputtext"
57
57
  }), null, 16, _hoisted_1);
58
58
  }
@@ -1 +1 @@
1
- import t from"primevue/basecomponent";import e from"primevue/inputtext/style";import{openBlock as n,createElementBlock as u,mergeProps as l}from"vue";var a={name:"InputText",extends:{name:"BaseInputText",extends:t,props:{modelValue:null,size:{type:String,default:null}},style:e,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{onInput:function(t){this.$emit("update:modelValue",t.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},o=["value"];a.render=function(t,e,a,r,i,p){return n(),u("input",l({class:t.cx("root"),value:t.modelValue,onInput:e[0]||(e[0]=function(){return p.onInput&&p.onInput.apply(p,arguments)})},t.ptm("root",p.ptmParams),{"data-pc-name":"inputtext"}),null,16,o)};export{a as default};
1
+ import t from"primevue/basecomponent";import e from"primevue/inputtext/style";import{openBlock as n,createElementBlock as u,mergeProps as l}from"vue";var o={name:"InputText",extends:{name:"BaseInputText",extends:t,props:{modelValue:null,size:{type:String,default:null}},style:e,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{getPTOptions:function(t){return this.ptm(t,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(t){this.$emit("update:modelValue",t.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},i=["value"];o.render=function(t,e,o,a,r,p){return n(),u("input",l({class:t.cx("root"),value:t.modelValue,onInput:e[0]||(e[0]=function(){return p.onInput&&p.onInput.apply(p,arguments)})},p.getPTOptions("root"),{"data-pc-name":"inputtext"}),null,16,i)};export{o as default};
@@ -30,6 +30,14 @@ this.primevue.inputtext = (function (BaseComponent, InputTextStyle, vue) {
30
30
  "extends": script$1,
31
31
  emits: ['update:modelValue'],
32
32
  methods: {
33
+ getPTOptions: function getPTOptions(key) {
34
+ return this.ptm(key, {
35
+ context: {
36
+ filled: this.filled,
37
+ disabled: this.$attrs.disabled || this.$attrs.disabled === ''
38
+ }
39
+ });
40
+ },
33
41
  onInput: function onInput(event) {
34
42
  this.$emit('update:modelValue', event.target.value);
35
43
  }
@@ -37,14 +45,6 @@ this.primevue.inputtext = (function (BaseComponent, InputTextStyle, vue) {
37
45
  computed: {
38
46
  filled: function filled() {
39
47
  return this.modelValue != null && this.modelValue.toString().length > 0;
40
- },
41
- ptmParams: function ptmParams() {
42
- return {
43
- context: {
44
- filled: this.filled,
45
- disabled: this.$attrs.disabled || this.$attrs.disabled === ''
46
- }
47
- };
48
48
  }
49
49
  }
50
50
  };
@@ -57,7 +57,7 @@ this.primevue.inputtext = (function (BaseComponent, InputTextStyle, vue) {
57
57
  onInput: _cache[0] || (_cache[0] = function () {
58
58
  return $options.onInput && $options.onInput.apply($options, arguments);
59
59
  })
60
- }, _ctx.ptm('root', $options.ptmParams), {
60
+ }, $options.getPTOptions('root'), {
61
61
  "data-pc-name": "inputtext"
62
62
  }), null, 16, _hoisted_1);
63
63
  }
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.inputtext=function(e,t,n){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},i=["value"];return l.render=function(e,t,u,l,a,r){return n.openBlock(),n.createElementBlock("input",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return r.onInput&&r.onInput.apply(r,arguments)})},e.ptm("root",r.ptmParams),{"data-pc-name":"inputtext"}),null,16,i)},l}(primevue.basecomponent,primevue.inputtext.style,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.inputtext=function(e,t,n){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{getPTOptions:function(e){return this.ptm(e,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},i=["value"];return l.render=function(e,t,u,l,o,r){return n.openBlock(),n.createElementBlock("input",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return r.onInput&&r.onInput.apply(r,arguments)})},r.getPTOptions("root"),{"data-pc-name":"inputtext"}),null,16,i)},l}(primevue.basecomponent,primevue.inputtext.style,Vue);
package/knob/Knob.d.ts CHANGED
@@ -29,6 +29,14 @@ export interface KnobPassThroughMethodOptions {
29
29
  * Defines current inline state.
30
30
  */
31
31
  state: KnobState;
32
+ /**
33
+ * Defines valid attributes.
34
+ */
35
+ attrs: any;
36
+ /**
37
+ * Defines parent options.
38
+ */
39
+ parent: any;
32
40
  /**
33
41
  * Defines passthrough(pt) options in global config.
34
42
  */
@@ -35,6 +35,14 @@ export interface ListboxPassThroughMethodOptions {
35
35
  * Defines current options.
36
36
  */
37
37
  context: ListboxContext;
38
+ /**
39
+ * Defines valid attributes.
40
+ */
41
+ attrs: any;
42
+ /**
43
+ * Defines parent options.
44
+ */
45
+ parent: any;
38
46
  /**
39
47
  * Defines passthrough(pt) options in global config.
40
48
  */
@@ -708,8 +708,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
708
708
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
709
709
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
710
710
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
711
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
712
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
711
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
712
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
713
713
  var _hoisted_1 = ["id"];
714
714
  var _hoisted_2 = ["tabindex"];
715
715
  var _hoisted_3 = ["placeholder", "aria-owns", "aria-activedescendant", "tabindex"];
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/api"),t=require("primevue/icons/search"),i=require("primevue/ripple"),n=require("primevue/utils"),o=require("primevue/virtualscroller"),s=require("primevue/basecomponent"),r=require("primevue/listbox/style"),l=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),u=a(i),d=a(o);function p(e){return m(e)||O(e)||f(e)||h()}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){if(e){if("string"==typeof e)return b(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(e,t):void 0}}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var g={name:"Listbox",extends:{name:"BaseListbox",extends:a(s).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a(r).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n.UniqueComponentId(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?n.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?n.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){n.DomHandler.focus(this.list);var e=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=n.DomHandler.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');n.DomHandler.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else n.DomHandler.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var o=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,o),e.preventDefault();break}!i&&n.ObjectUtils.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(p(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(p(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),r=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,r)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return n.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return n.ObjectUtils.equals(e,i,t.equalityKey)})):n.ObjectUtils.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!n.ObjectUtils.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=n.DomHandler.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return n.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return n.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:u.default},components:{VirtualScroller:d.default,SearchIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){I(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function I(e,t,i){return(t=S(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function S(e){var t=F(e,"string");return"symbol"===y(t)?t:String(t)}function F(e,t){if("object"!==y(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var V=["id"],M=["tabindex"],D=["placeholder","aria-owns","aria-activedescendant","tabindex"],w=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],K=["id"],L=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],E=["tabindex"];g.render=function(e,t,i,n,o,s){var r=l.resolveComponent("VirtualScroller"),a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[l.createElementVNode("span",l.mergeProps({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,M),l.renderSlot(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[l.createElementVNode("div",l.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[l.withDirectives(l.createElementVNode("input",l.mergeProps({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},x(x({},e.filterInputProps),e.ptm("filterInput"))),null,16,D),[[l.vModelText,o.filterValue]]),l.renderSlot(e.$slots,"filtericon",{class:l.normalizeClass(e.cx("filterIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),l.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.filterResultMessageText),17)],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),l.createSlots({content:l.withCtx((function(i){var n=i.styleClass,r=i.contentRef,c=i.items,u=i.getItemOptions,d=i.contentStyle,p=i.itemSize;return[l.createElementVNode("ul",l.mergeProps({ref:function(e){return s.listRef(e,r)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c,(function(i,n){return l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[l.renderSlot(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,K)):l.withDirectives((l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[l.renderSlot(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionLabel(i)),1)]}))],16,L)),[[a]])],64)})),128)),o.filterValue&&(!c||c&&0===c.length)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"emptyfilter",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"empty",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]}))],16)):l.createCommentVNode("",!0)],16,w)]})),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),l.renderSlot(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.emptyMessageText),17)):l.createCommentVNode("",!0),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.selectedMessageText),17),l.createElementVNode("span",l.mergeProps({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,E)],16,V)},module.exports=g;
1
+ "use strict";var e=require("primevue/api"),t=require("primevue/icons/search"),i=require("primevue/ripple"),n=require("primevue/utils"),o=require("primevue/virtualscroller"),s=require("primevue/basecomponent"),r=require("primevue/listbox/style"),l=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),u=a(i),d=a(o);function p(e){return m(e)||O(e)||f(e)||h()}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){if(e){if("string"==typeof e)return b(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(e,t):void 0}}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var g={name:"Listbox",extends:{name:"BaseListbox",extends:a(s).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a(r).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n.UniqueComponentId(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?n.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?n.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){n.DomHandler.focus(this.list);var e=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=n.DomHandler.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');n.DomHandler.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else n.DomHandler.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var o=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,o),e.preventDefault();break}!i&&n.ObjectUtils.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(p(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(p(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),r=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,r)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return n.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return n.ObjectUtils.equals(e,i,t.equalityKey)})):n.ObjectUtils.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!n.ObjectUtils.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=n.DomHandler.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return n.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return n.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:u.default},components:{VirtualScroller:d.default,SearchIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){I(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function I(e,t,i){var n;return(t="symbol"==y(n=S(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function S(e,t){if("object"!=y(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var F=["id"],V=["tabindex"],M=["placeholder","aria-owns","aria-activedescendant","tabindex"],D=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],w=["id"],K=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],L=["tabindex"];g.render=function(e,t,i,n,o,s){var r=l.resolveComponent("VirtualScroller"),a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[l.createElementVNode("span",l.mergeProps({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,V),l.renderSlot(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[l.createElementVNode("div",l.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[l.withDirectives(l.createElementVNode("input",l.mergeProps({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},x(x({},e.filterInputProps),e.ptm("filterInput"))),null,16,M),[[l.vModelText,o.filterValue]]),l.renderSlot(e.$slots,"filtericon",{class:l.normalizeClass(e.cx("filterIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),l.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.filterResultMessageText),17)],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),l.createSlots({content:l.withCtx((function(i){var n=i.styleClass,r=i.contentRef,c=i.items,u=i.getItemOptions,d=i.contentStyle,p=i.itemSize;return[l.createElementVNode("ul",l.mergeProps({ref:function(e){return s.listRef(e,r)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c,(function(i,n){return l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[l.renderSlot(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,w)):l.withDirectives((l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[l.renderSlot(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionLabel(i)),1)]}))],16,K)),[[a]])],64)})),128)),o.filterValue&&(!c||c&&0===c.length)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"emptyfilter",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"empty",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]}))],16)):l.createCommentVNode("",!0)],16,D)]})),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),l.renderSlot(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.emptyMessageText),17)):l.createCommentVNode("",!0),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.selectedMessageText),17),l.createElementVNode("span",l.mergeProps({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,L)],16,F)},module.exports=g;
@@ -698,8 +698,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
698
698
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
699
699
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
700
700
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
701
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
702
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
701
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
702
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
703
703
  var _hoisted_1 = ["id"];
704
704
  var _hoisted_2 = ["tabindex"];
705
705
  var _hoisted_3 = ["placeholder", "aria-owns", "aria-activedescendant", "tabindex"];
@@ -1 +1 @@
1
- import{FilterService as e}from"primevue/api";import t from"primevue/icons/search";import i from"primevue/ripple";import{UniqueComponentId as n,ObjectUtils as o,DomHandler as s}from"primevue/utils";import l from"primevue/virtualscroller";import r from"primevue/basecomponent";import a from"primevue/listbox/style";import{resolveComponent as u,resolveDirective as d,openBlock as c,createElementBlock as p,mergeProps as h,createElementVNode as f,renderSlot as O,withDirectives as b,vModelText as m,normalizeClass as y,createBlock as g,resolveDynamicComponent as v,toDisplayString as x,createCommentVNode as I,createVNode as S,createSlots as F,withCtx as M,Fragment as K,renderList as w,createTextVNode as V}from"vue";function L(e){return $(e)||E(e)||T(e)||D()}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){if(e){if("string"==typeof e)return P(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?P(e,t):void 0}}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function $(e){if(Array.isArray(e))return P(e)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var k={name:"Listbox",extends:{name:"BaseListbox",extends:r,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?o.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?o.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?o.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&o.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return o.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return o.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){s.focus(this.list);var e=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=s.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');s.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else s.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var n=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,n),e.preventDefault();break}!i&&o.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(L(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(L(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),l=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,l)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return o.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return o.equals(e,i,t.equalityKey)})):o.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return o.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?o.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!o.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=s.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return o.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return o.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:i},components:{VirtualScroller:l,SearchIcon:t}};function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function A(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function H(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach((function(t){G(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function G(e,t,i){return(t=j(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function j(e){var t=C(e,"string");return"symbol"===R(t)?t:String(t)}function C(e,t){if("object"!==R(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var B=["id"],U=["tabindex"],N=["placeholder","aria-owns","aria-activedescendant","tabindex"],_=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],q=["id"],z=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],W=["tabindex"];k.render=function(e,t,i,n,o,s){var l=u("VirtualScroller"),r=d("ripple");return c(),p("div",h({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[f("span",h({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,U),O(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(c(),p("div",h({key:0,class:e.cx("header")},e.ptm("header")),[f("div",h({class:e.cx("filterContainer")},e.ptm("filterContainer")),[b(f("input",h({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},H(H({},e.filterInputProps),e.ptm("filterInput"))),null,16,N),[[m,o.filterValue]]),O(e.$slots,"filtericon",{class:y(e.cx("filterIcon"))},(function(){return[(c(),g(v(e.filterIcon?"span":"SearchIcon"),h({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),x(s.filterResultMessageText),17)],16)):I("",!0),f("div",h({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[S(l,h({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),F({content:M((function(i){var n=i.styleClass,l=i.contentRef,a=i.items,u=i.getItemOptions,d=i.contentStyle,m=i.itemSize;return[f("ul",h({ref:function(e){return s.listRef(e,l)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(c(!0),p(K,null,w(a,(function(i,n){return c(),p(K,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(c(),p("li",h({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[O(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,q)):b((c(),p("li",h({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[O(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionLabel(i)),1)]}))],16,z)),[[r]])],64)})),128)),o.filterValue&&(!a||a&&0===a.length)?(c(),p("li",h({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"emptyfilter",{},(function(){return[V(x(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(c(),p("li",h({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"empty",{},(function(){return[V(x(s.emptyMessageText),1)]}))],16)):I("",!0)],16,_)]})),_:2},[e.$slots.loader?{name:"loader",fn:M((function(t){return[O(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),O(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(c(),p("span",h({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),x(s.emptyMessageText),17)):I("",!0),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),x(s.selectedMessageText),17),f("span",h({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,W)],16,B)};export{k as default};
1
+ import{FilterService as e}from"primevue/api";import t from"primevue/icons/search";import i from"primevue/ripple";import{UniqueComponentId as n,ObjectUtils as o,DomHandler as s}from"primevue/utils";import l from"primevue/virtualscroller";import r from"primevue/basecomponent";import a from"primevue/listbox/style";import{resolveComponent as u,resolveDirective as d,openBlock as c,createElementBlock as p,mergeProps as h,createElementVNode as f,renderSlot as O,withDirectives as b,vModelText as m,normalizeClass as y,createBlock as g,resolveDynamicComponent as v,toDisplayString as x,createCommentVNode as I,createVNode as S,createSlots as F,withCtx as M,Fragment as K,renderList as w,createTextVNode as V}from"vue";function L(e){return $(e)||E(e)||T(e)||D()}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){if(e){if("string"==typeof e)return P(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?P(e,t):void 0}}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function $(e){if(Array.isArray(e))return P(e)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var k={name:"Listbox",extends:{name:"BaseListbox",extends:r,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?o.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?o.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?o.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&o.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return o.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return o.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){s.focus(this.list);var e=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=s.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');s.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else s.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var n=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,n),e.preventDefault();break}!i&&o.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(L(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(L(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),l=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,l)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return o.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return o.equals(e,i,t.equalityKey)})):o.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return o.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?o.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!o.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=s.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return o.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return o.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:i},components:{VirtualScroller:l,SearchIcon:t}};function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function A(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function H(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach((function(t){G(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function G(e,t,i){var n;return(t="symbol"==R(n=j(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function j(e,t){if("object"!=R(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var C=["id"],B=["tabindex"],U=["placeholder","aria-owns","aria-activedescendant","tabindex"],N=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],_=["id"],q=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],z=["tabindex"];k.render=function(e,t,i,n,o,s){var l=u("VirtualScroller"),r=d("ripple");return c(),p("div",h({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[f("span",h({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,B),O(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(c(),p("div",h({key:0,class:e.cx("header")},e.ptm("header")),[f("div",h({class:e.cx("filterContainer")},e.ptm("filterContainer")),[b(f("input",h({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},H(H({},e.filterInputProps),e.ptm("filterInput"))),null,16,U),[[m,o.filterValue]]),O(e.$slots,"filtericon",{class:y(e.cx("filterIcon"))},(function(){return[(c(),g(v(e.filterIcon?"span":"SearchIcon"),h({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),x(s.filterResultMessageText),17)],16)):I("",!0),f("div",h({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[S(l,h({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),F({content:M((function(i){var n=i.styleClass,l=i.contentRef,a=i.items,u=i.getItemOptions,d=i.contentStyle,m=i.itemSize;return[f("ul",h({ref:function(e){return s.listRef(e,l)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(c(!0),p(K,null,w(a,(function(i,n){return c(),p(K,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(c(),p("li",h({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[O(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,_)):b((c(),p("li",h({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[O(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionLabel(i)),1)]}))],16,q)),[[r]])],64)})),128)),o.filterValue&&(!a||a&&0===a.length)?(c(),p("li",h({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"emptyfilter",{},(function(){return[V(x(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(c(),p("li",h({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"empty",{},(function(){return[V(x(s.emptyMessageText),1)]}))],16)):I("",!0)],16,N)]})),_:2},[e.$slots.loader?{name:"loader",fn:M((function(t){return[O(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),O(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(c(),p("span",h({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),x(s.emptyMessageText),17)):I("",!0),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),x(s.selectedMessageText),17),f("span",h({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,z)],16,C)};export{k as default};