primevue 3.46.0 → 3.47.1

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 (738) hide show
  1. package/README.md +2 -2
  2. package/api/api.cjs.js +6 -6
  3. package/api/api.cjs.min.js +1 -1
  4. package/api/api.esm.js +6 -6
  5. package/api/api.esm.min.js +1 -1
  6. package/api/api.js +6 -6
  7. package/api/api.min.js +1 -1
  8. package/autocomplete/AutoComplete.d.ts +6 -1
  9. package/autocomplete/AutoComplete.vue +24 -15
  10. package/autocomplete/BaseAutoComplete.vue +5 -1
  11. package/autocomplete/autocomplete.cjs.js +29 -18
  12. package/autocomplete/autocomplete.cjs.min.js +1 -1
  13. package/autocomplete/autocomplete.esm.js +29 -18
  14. package/autocomplete/autocomplete.esm.min.js +1 -1
  15. package/autocomplete/autocomplete.js +29 -18
  16. package/autocomplete/autocomplete.min.js +1 -1
  17. package/basecomponent/basecomponent.cjs.js +1 -3
  18. package/basecomponent/basecomponent.cjs.min.js +1 -1
  19. package/basecomponent/basecomponent.esm.js +1 -3
  20. package/basecomponent/basecomponent.esm.min.js +1 -1
  21. package/basecomponent/basecomponent.js +1 -3
  22. package/basecomponent/basecomponent.min.js +1 -1
  23. package/basecomponent/style/basecomponentstyle.cjs.js +1 -3
  24. package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
  25. package/basecomponent/style/basecomponentstyle.esm.js +1 -3
  26. package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
  27. package/basecomponent/style/basecomponentstyle.js +1 -3
  28. package/basecomponent/style/basecomponentstyle.min.js +1 -1
  29. package/basedirective/basedirective.cjs.js +11 -2
  30. package/basedirective/basedirective.cjs.min.js +1 -1
  31. package/basedirective/basedirective.esm.js +11 -2
  32. package/basedirective/basedirective.esm.min.js +1 -1
  33. package/basedirective/basedirective.js +11 -2
  34. package/basedirective/basedirective.min.js +1 -1
  35. package/baseicon/BaseIcon.vue +6 -1
  36. package/baseicon/baseicon.cjs.js +5 -0
  37. package/baseicon/baseicon.cjs.min.js +1 -1
  38. package/baseicon/baseicon.esm.js +6 -1
  39. package/baseicon/baseicon.esm.min.js +1 -1
  40. package/baseicon/baseicon.js +5 -0
  41. package/baseicon/baseicon.min.js +1 -1
  42. package/calendar/Calendar.d.ts +53 -2
  43. package/calendar/Calendar.vue +12 -0
  44. package/calendar/calendar.cjs.js +12 -0
  45. package/calendar/calendar.cjs.min.js +1 -1
  46. package/calendar/calendar.esm.js +12 -0
  47. package/calendar/calendar.esm.min.js +1 -1
  48. package/calendar/calendar.js +12 -0
  49. package/calendar/calendar.min.js +1 -1
  50. package/cascadeselect/BaseCascadeSelect.vue +5 -1
  51. package/cascadeselect/CascadeSelect.d.ts +6 -1
  52. package/cascadeselect/CascadeSelect.vue +56 -35
  53. package/cascadeselect/CascadeSelectSub.vue +9 -2
  54. package/cascadeselect/cascadeselect.cjs.js +99 -52
  55. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  56. package/cascadeselect/cascadeselect.esm.js +99 -52
  57. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  58. package/cascadeselect/cascadeselect.js +99 -52
  59. package/cascadeselect/cascadeselect.min.js +1 -1
  60. package/checkbox/BaseCheckbox.vue +0 -4
  61. package/checkbox/Checkbox.d.ts +17 -34
  62. package/checkbox/Checkbox.vue +24 -35
  63. package/checkbox/checkbox.cjs.js +21 -49
  64. package/checkbox/checkbox.cjs.min.js +1 -1
  65. package/checkbox/checkbox.esm.js +21 -49
  66. package/checkbox/checkbox.esm.min.js +1 -1
  67. package/checkbox/checkbox.js +21 -49
  68. package/checkbox/checkbox.min.js +1 -1
  69. package/checkbox/style/checkboxstyle.cjs.js +5 -11
  70. package/checkbox/style/checkboxstyle.cjs.min.js +1 -1
  71. package/checkbox/style/checkboxstyle.esm.js +5 -11
  72. package/checkbox/style/checkboxstyle.esm.min.js +1 -1
  73. package/checkbox/style/checkboxstyle.js +5 -11
  74. package/checkbox/style/checkboxstyle.min.js +1 -1
  75. package/chips/Chips.vue +2 -1
  76. package/chips/chips.cjs.js +2 -1
  77. package/chips/chips.cjs.min.js +1 -1
  78. package/chips/chips.esm.js +2 -1
  79. package/chips/chips.esm.min.js +1 -1
  80. package/chips/chips.js +2 -1
  81. package/chips/chips.min.js +1 -1
  82. package/column/Column.d.ts +11 -44
  83. package/confirmpopup/ConfirmPopup.vue +1 -1
  84. package/confirmpopup/confirmpopup.cjs.js +1 -1
  85. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  86. package/confirmpopup/confirmpopup.esm.js +1 -1
  87. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  88. package/confirmpopup/confirmpopup.js +1 -1
  89. package/confirmpopup/confirmpopup.min.js +1 -1
  90. package/contextmenu/ContextMenu.vue +8 -8
  91. package/contextmenu/contextmenu.cjs.js +7 -6
  92. package/contextmenu/contextmenu.cjs.min.js +1 -1
  93. package/contextmenu/contextmenu.esm.js +7 -6
  94. package/contextmenu/contextmenu.esm.min.js +1 -1
  95. package/contextmenu/contextmenu.js +7 -6
  96. package/contextmenu/contextmenu.min.js +1 -1
  97. package/core/core.js +918 -628
  98. package/core/core.min.js +63 -55
  99. package/datatable/BaseDataTable.vue +4 -0
  100. package/datatable/BodyCell.vue +11 -1
  101. package/datatable/BodyRow.vue +5 -2
  102. package/datatable/ColumnFilter.vue +5 -2
  103. package/datatable/DataTable.d.ts +5 -0
  104. package/datatable/DataTable.vue +2 -2
  105. package/datatable/HeaderCell.vue +2 -1
  106. package/datatable/HeaderCheckbox.vue +14 -42
  107. package/datatable/RowCheckbox.vue +10 -52
  108. package/datatable/RowRadioButton.vue +11 -32
  109. package/datatable/TableHeader.vue +3 -1
  110. package/datatable/datatable.cjs.js +110 -193
  111. package/datatable/datatable.cjs.min.js +1 -1
  112. package/datatable/datatable.esm.js +109 -194
  113. package/datatable/datatable.esm.min.js +1 -1
  114. package/datatable/datatable.js +110 -195
  115. package/datatable/datatable.min.js +1 -1
  116. package/datatable/style/datatablestyle.cjs.js +23 -72
  117. package/datatable/style/datatablestyle.cjs.min.js +1 -1
  118. package/datatable/style/datatablestyle.esm.js +23 -72
  119. package/datatable/style/datatablestyle.esm.min.js +1 -1
  120. package/datatable/style/datatablestyle.js +23 -72
  121. package/datatable/style/datatablestyle.min.js +1 -1
  122. package/dialog/style/dialogstyle.cjs.js +1 -1
  123. package/dialog/style/dialogstyle.cjs.min.js +1 -1
  124. package/dialog/style/dialogstyle.esm.js +1 -1
  125. package/dialog/style/dialogstyle.esm.min.js +1 -1
  126. package/dialog/style/dialogstyle.js +1 -1
  127. package/dialog/style/dialogstyle.min.js +1 -1
  128. package/dropdown/BaseDropdown.vue +17 -1
  129. package/dropdown/Dropdown.d.ts +37 -1
  130. package/dropdown/Dropdown.vue +68 -40
  131. package/dropdown/dropdown.cjs.js +95 -45
  132. package/dropdown/dropdown.cjs.min.js +1 -1
  133. package/dropdown/dropdown.esm.js +93 -45
  134. package/dropdown/dropdown.esm.min.js +1 -1
  135. package/dropdown/dropdown.js +95 -47
  136. package/dropdown/dropdown.min.js +1 -1
  137. package/dropdown/style/dropdownstyle.cjs.js +7 -2
  138. package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
  139. package/dropdown/style/dropdownstyle.esm.js +7 -2
  140. package/dropdown/style/dropdownstyle.esm.min.js +1 -1
  141. package/dropdown/style/dropdownstyle.js +7 -2
  142. package/dropdown/style/dropdownstyle.min.js +1 -1
  143. package/focustrap/focustrap.cjs.js +15 -2
  144. package/focustrap/focustrap.cjs.min.js +1 -1
  145. package/focustrap/focustrap.esm.js +15 -2
  146. package/focustrap/focustrap.esm.min.js +1 -1
  147. package/focustrap/focustrap.js +15 -2
  148. package/focustrap/focustrap.min.js +1 -1
  149. package/icons/arrowdown/index.cjs.js +3 -9
  150. package/icons/arrowdown/index.cjs.min.js +1 -1
  151. package/icons/arrowdown/index.esm.js +3 -9
  152. package/icons/arrowdown/index.esm.min.js +1 -1
  153. package/icons/arrowdown/index.js +5 -10
  154. package/icons/arrowdown/index.min.js +1 -1
  155. package/icons/arrowdown/index.vue +1 -7
  156. package/icons/arrowup/index.cjs.js +3 -9
  157. package/icons/arrowup/index.cjs.min.js +1 -1
  158. package/icons/arrowup/index.esm.js +3 -9
  159. package/icons/arrowup/index.esm.min.js +1 -1
  160. package/icons/arrowup/index.js +5 -10
  161. package/icons/arrowup/index.min.js +1 -1
  162. package/icons/arrowup/index.vue +1 -7
  163. package/icons/ban/index.cjs.js +3 -9
  164. package/icons/ban/index.cjs.min.js +1 -1
  165. package/icons/ban/index.esm.js +3 -9
  166. package/icons/ban/index.esm.min.js +1 -1
  167. package/icons/ban/index.js +5 -10
  168. package/icons/ban/index.min.js +1 -1
  169. package/icons/ban/index.vue +1 -7
  170. package/icons/blank/index.cjs.js +34 -0
  171. package/icons/blank/index.cjs.min.js +1 -0
  172. package/icons/blank/index.d.ts +12 -0
  173. package/icons/blank/index.esm.js +28 -0
  174. package/icons/blank/index.esm.min.js +1 -0
  175. package/icons/blank/index.js +36 -0
  176. package/icons/blank/index.min.js +1 -0
  177. package/icons/blank/index.vue +13 -0
  178. package/icons/blank/package.json +9 -0
  179. package/icons/exclamationtriangle/index.cjs.js +3 -9
  180. package/icons/exclamationtriangle/index.cjs.min.js +1 -1
  181. package/icons/exclamationtriangle/index.esm.js +3 -9
  182. package/icons/exclamationtriangle/index.esm.min.js +1 -1
  183. package/icons/exclamationtriangle/index.js +5 -10
  184. package/icons/exclamationtriangle/index.min.js +1 -1
  185. package/icons/exclamationtriangle/index.vue +1 -7
  186. package/icons/eyeslash/index.cjs.js +3 -9
  187. package/icons/eyeslash/index.cjs.min.js +1 -1
  188. package/icons/eyeslash/index.esm.js +3 -9
  189. package/icons/eyeslash/index.esm.min.js +1 -1
  190. package/icons/eyeslash/index.js +5 -10
  191. package/icons/eyeslash/index.min.js +1 -1
  192. package/icons/eyeslash/index.vue +1 -7
  193. package/icons/filter/index.cjs.js +3 -9
  194. package/icons/filter/index.cjs.min.js +1 -1
  195. package/icons/filter/index.esm.js +3 -9
  196. package/icons/filter/index.esm.min.js +1 -1
  197. package/icons/filter/index.js +5 -10
  198. package/icons/filter/index.min.js +1 -1
  199. package/icons/filter/index.vue +1 -7
  200. package/icons/filterslash/index.cjs.js +3 -9
  201. package/icons/filterslash/index.cjs.min.js +1 -1
  202. package/icons/filterslash/index.esm.js +3 -9
  203. package/icons/filterslash/index.esm.min.js +1 -1
  204. package/icons/filterslash/index.js +5 -10
  205. package/icons/filterslash/index.min.js +1 -1
  206. package/icons/filterslash/index.vue +1 -7
  207. package/icons/infocircle/index.cjs.js +3 -9
  208. package/icons/infocircle/index.cjs.min.js +1 -1
  209. package/icons/infocircle/index.esm.js +3 -9
  210. package/icons/infocircle/index.esm.min.js +1 -1
  211. package/icons/infocircle/index.js +5 -10
  212. package/icons/infocircle/index.min.js +1 -1
  213. package/icons/infocircle/index.vue +1 -7
  214. package/icons/pencil/index.cjs.js +3 -9
  215. package/icons/pencil/index.cjs.min.js +1 -1
  216. package/icons/pencil/index.esm.js +3 -9
  217. package/icons/pencil/index.esm.min.js +1 -1
  218. package/icons/pencil/index.js +5 -10
  219. package/icons/pencil/index.min.js +1 -1
  220. package/icons/pencil/index.vue +1 -7
  221. package/icons/plus/index.cjs.js +3 -9
  222. package/icons/plus/index.cjs.min.js +1 -1
  223. package/icons/plus/index.esm.js +3 -9
  224. package/icons/plus/index.esm.min.js +1 -1
  225. package/icons/plus/index.js +5 -10
  226. package/icons/plus/index.min.js +1 -1
  227. package/icons/plus/index.vue +1 -7
  228. package/icons/refresh/index.cjs.js +3 -9
  229. package/icons/refresh/index.cjs.min.js +1 -1
  230. package/icons/refresh/index.esm.js +3 -9
  231. package/icons/refresh/index.esm.min.js +1 -1
  232. package/icons/refresh/index.js +5 -10
  233. package/icons/refresh/index.min.js +1 -1
  234. package/icons/refresh/index.vue +1 -7
  235. package/icons/search/index.cjs.js +3 -9
  236. package/icons/search/index.cjs.min.js +1 -1
  237. package/icons/search/index.esm.js +3 -9
  238. package/icons/search/index.esm.min.js +1 -1
  239. package/icons/search/index.js +5 -10
  240. package/icons/search/index.min.js +1 -1
  241. package/icons/search/index.vue +1 -7
  242. package/icons/searchminus/index.cjs.js +3 -9
  243. package/icons/searchminus/index.cjs.min.js +1 -1
  244. package/icons/searchminus/index.esm.js +3 -9
  245. package/icons/searchminus/index.esm.min.js +1 -1
  246. package/icons/searchminus/index.js +5 -10
  247. package/icons/searchminus/index.min.js +1 -1
  248. package/icons/searchminus/index.vue +1 -7
  249. package/icons/searchplus/index.cjs.js +3 -9
  250. package/icons/searchplus/index.cjs.min.js +1 -1
  251. package/icons/searchplus/index.esm.js +3 -9
  252. package/icons/searchplus/index.esm.min.js +1 -1
  253. package/icons/searchplus/index.js +5 -10
  254. package/icons/searchplus/index.min.js +1 -1
  255. package/icons/searchplus/index.vue +1 -7
  256. package/icons/sortalt/index.cjs.js +3 -9
  257. package/icons/sortalt/index.cjs.min.js +1 -1
  258. package/icons/sortalt/index.esm.js +3 -9
  259. package/icons/sortalt/index.esm.min.js +1 -1
  260. package/icons/sortalt/index.js +5 -10
  261. package/icons/sortalt/index.min.js +1 -1
  262. package/icons/sortalt/index.vue +1 -7
  263. package/icons/sortamountdown/index.cjs.js +3 -9
  264. package/icons/sortamountdown/index.cjs.min.js +1 -1
  265. package/icons/sortamountdown/index.esm.js +3 -9
  266. package/icons/sortamountdown/index.esm.min.js +1 -1
  267. package/icons/sortamountdown/index.js +5 -10
  268. package/icons/sortamountdown/index.min.js +1 -1
  269. package/icons/sortamountdown/index.vue +1 -7
  270. package/icons/sortamountupalt/index.cjs.js +3 -9
  271. package/icons/sortamountupalt/index.cjs.min.js +1 -1
  272. package/icons/sortamountupalt/index.esm.js +3 -9
  273. package/icons/sortamountupalt/index.esm.min.js +1 -1
  274. package/icons/sortamountupalt/index.js +5 -10
  275. package/icons/sortamountupalt/index.min.js +1 -1
  276. package/icons/sortamountupalt/index.vue +1 -7
  277. package/icons/spinner/index.cjs.js +3 -9
  278. package/icons/spinner/index.cjs.min.js +1 -1
  279. package/icons/spinner/index.esm.js +3 -9
  280. package/icons/spinner/index.esm.min.js +1 -1
  281. package/icons/spinner/index.js +5 -10
  282. package/icons/spinner/index.min.js +1 -1
  283. package/icons/spinner/index.vue +1 -7
  284. package/icons/star/index.cjs.js +3 -9
  285. package/icons/star/index.cjs.min.js +1 -1
  286. package/icons/star/index.esm.js +3 -9
  287. package/icons/star/index.esm.min.js +1 -1
  288. package/icons/star/index.js +5 -10
  289. package/icons/star/index.min.js +1 -1
  290. package/icons/star/index.vue +1 -7
  291. package/icons/starfill/index.cjs.js +3 -9
  292. package/icons/starfill/index.cjs.min.js +1 -1
  293. package/icons/starfill/index.esm.js +3 -9
  294. package/icons/starfill/index.esm.min.js +1 -1
  295. package/icons/starfill/index.js +5 -10
  296. package/icons/starfill/index.min.js +1 -1
  297. package/icons/starfill/index.vue +1 -7
  298. package/icons/thlarge/index.cjs.js +3 -9
  299. package/icons/thlarge/index.cjs.min.js +1 -1
  300. package/icons/thlarge/index.esm.js +3 -9
  301. package/icons/thlarge/index.esm.min.js +1 -1
  302. package/icons/thlarge/index.js +5 -10
  303. package/icons/thlarge/index.min.js +1 -1
  304. package/icons/thlarge/index.vue +1 -7
  305. package/icons/timescircle/index.cjs.js +3 -9
  306. package/icons/timescircle/index.cjs.min.js +1 -1
  307. package/icons/timescircle/index.esm.js +3 -9
  308. package/icons/timescircle/index.esm.min.js +1 -1
  309. package/icons/timescircle/index.js +5 -10
  310. package/icons/timescircle/index.min.js +1 -1
  311. package/icons/timescircle/index.vue +1 -7
  312. package/icons/trash/index.cjs.js +3 -9
  313. package/icons/trash/index.cjs.min.js +1 -1
  314. package/icons/trash/index.esm.js +3 -9
  315. package/icons/trash/index.esm.min.js +1 -1
  316. package/icons/trash/index.js +5 -10
  317. package/icons/trash/index.min.js +1 -1
  318. package/icons/trash/index.vue +1 -7
  319. package/icons/undo/index.cjs.js +3 -9
  320. package/icons/undo/index.cjs.min.js +1 -1
  321. package/icons/undo/index.esm.js +3 -9
  322. package/icons/undo/index.esm.min.js +1 -1
  323. package/icons/undo/index.js +5 -10
  324. package/icons/undo/index.min.js +1 -1
  325. package/icons/undo/index.vue +1 -7
  326. package/icons/upload/index.cjs.js +3 -9
  327. package/icons/upload/index.cjs.min.js +1 -1
  328. package/icons/upload/index.esm.js +3 -9
  329. package/icons/upload/index.esm.min.js +1 -1
  330. package/icons/upload/index.js +5 -10
  331. package/icons/upload/index.min.js +1 -1
  332. package/icons/upload/index.vue +1 -7
  333. package/icons/windowmaximize/index.cjs.js +3 -9
  334. package/icons/windowmaximize/index.cjs.min.js +1 -1
  335. package/icons/windowmaximize/index.esm.js +3 -9
  336. package/icons/windowmaximize/index.esm.min.js +1 -1
  337. package/icons/windowmaximize/index.js +5 -10
  338. package/icons/windowmaximize/index.min.js +1 -1
  339. package/icons/windowmaximize/index.vue +1 -7
  340. package/icons/windowminimize/index.cjs.js +3 -9
  341. package/icons/windowminimize/index.cjs.min.js +1 -1
  342. package/icons/windowminimize/index.esm.js +3 -9
  343. package/icons/windowminimize/index.esm.min.js +1 -1
  344. package/icons/windowminimize/index.js +5 -10
  345. package/icons/windowminimize/index.min.js +1 -1
  346. package/icons/windowminimize/index.vue +1 -7
  347. package/inputnumber/InputNumber.vue +18 -9
  348. package/inputnumber/inputnumber.cjs.js +14 -6
  349. package/inputnumber/inputnumber.cjs.min.js +1 -1
  350. package/inputnumber/inputnumber.esm.js +15 -7
  351. package/inputnumber/inputnumber.esm.min.js +1 -1
  352. package/inputnumber/inputnumber.js +14 -6
  353. package/inputnumber/inputnumber.min.js +1 -1
  354. package/inputswitch/BaseInputSwitch.vue +8 -4
  355. package/inputswitch/InputSwitch.d.ts +41 -20
  356. package/inputswitch/InputSwitch.vue +31 -33
  357. package/inputswitch/inputswitch.cjs.js +38 -42
  358. package/inputswitch/inputswitch.cjs.min.js +1 -1
  359. package/inputswitch/inputswitch.esm.js +38 -42
  360. package/inputswitch/inputswitch.esm.min.js +1 -1
  361. package/inputswitch/inputswitch.js +38 -42
  362. package/inputswitch/inputswitch.min.js +1 -1
  363. package/inputswitch/style/inputswitchstyle.cjs.js +4 -4
  364. package/inputswitch/style/inputswitchstyle.cjs.min.js +1 -1
  365. package/inputswitch/style/inputswitchstyle.esm.js +4 -4
  366. package/inputswitch/style/inputswitchstyle.esm.min.js +1 -1
  367. package/inputswitch/style/inputswitchstyle.js +4 -4
  368. package/inputswitch/style/inputswitchstyle.min.js +1 -1
  369. package/listbox/BaseListbox.vue +4 -0
  370. package/listbox/Listbox.d.ts +6 -1
  371. package/listbox/Listbox.vue +47 -26
  372. package/listbox/listbox.cjs.js +89 -50
  373. package/listbox/listbox.cjs.min.js +1 -1
  374. package/listbox/listbox.esm.js +89 -50
  375. package/listbox/listbox.esm.min.js +1 -1
  376. package/listbox/listbox.js +89 -50
  377. package/listbox/listbox.min.js +1 -1
  378. package/listbox/style/listboxstyle.cjs.js +2 -3
  379. package/listbox/style/listboxstyle.cjs.min.js +1 -1
  380. package/listbox/style/listboxstyle.esm.js +2 -3
  381. package/listbox/style/listboxstyle.esm.min.js +1 -1
  382. package/listbox/style/listboxstyle.js +2 -3
  383. package/listbox/style/listboxstyle.min.js +1 -1
  384. package/megamenu/MegaMenu.vue +1 -1
  385. package/megamenu/megamenu.cjs.js +2 -1
  386. package/megamenu/megamenu.cjs.min.js +1 -1
  387. package/megamenu/megamenu.esm.js +2 -1
  388. package/megamenu/megamenu.esm.min.js +1 -1
  389. package/megamenu/megamenu.js +2 -1
  390. package/megamenu/megamenu.min.js +1 -1
  391. package/menubar/Menubar.vue +1 -1
  392. package/menubar/menubar.cjs.js +2 -1
  393. package/menubar/menubar.cjs.min.js +1 -1
  394. package/menubar/menubar.esm.js +2 -1
  395. package/menubar/menubar.esm.min.js +1 -1
  396. package/menubar/menubar.js +2 -1
  397. package/menubar/menubar.min.js +1 -1
  398. package/message/Message.d.ts +4 -0
  399. package/message/Message.vue +2 -1
  400. package/message/message.cjs.js +2 -1
  401. package/message/message.cjs.min.js +1 -1
  402. package/message/message.esm.js +2 -1
  403. package/message/message.esm.min.js +1 -1
  404. package/message/message.js +2 -1
  405. package/message/message.min.js +1 -1
  406. package/metergroup/BaseMeterGroup.vue +41 -0
  407. package/metergroup/MeterGroup.d.ts +302 -0
  408. package/metergroup/MeterGroup.vue +73 -0
  409. package/metergroup/MeterGroupLabel.vue +36 -0
  410. package/metergroup/metergroup.cjs.js +218 -0
  411. package/metergroup/metergroup.cjs.min.js +1 -0
  412. package/metergroup/metergroup.esm.js +211 -0
  413. package/metergroup/metergroup.esm.min.js +1 -0
  414. package/metergroup/metergroup.js +218 -0
  415. package/metergroup/metergroup.min.js +1 -0
  416. package/metergroup/package.json +9 -0
  417. package/metergroup/style/MeterGroupStyle.d.ts +3 -0
  418. package/metergroup/style/metergroupstyle.cjs.js +40 -0
  419. package/metergroup/style/metergroupstyle.cjs.min.js +1 -0
  420. package/metergroup/style/metergroupstyle.esm.js +34 -0
  421. package/metergroup/style/metergroupstyle.esm.min.js +1 -0
  422. package/metergroup/style/metergroupstyle.js +43 -0
  423. package/metergroup/style/metergroupstyle.min.js +1 -0
  424. package/metergroup/style/package.json +6 -0
  425. package/multiselect/BaseMultiSelect.vue +9 -1
  426. package/multiselect/MultiSelect.d.ts +13 -19
  427. package/multiselect/MultiSelect.vue +108 -76
  428. package/multiselect/multiselect.cjs.js +173 -133
  429. package/multiselect/multiselect.cjs.min.js +1 -1
  430. package/multiselect/multiselect.esm.js +173 -134
  431. package/multiselect/multiselect.esm.min.js +1 -1
  432. package/multiselect/multiselect.js +174 -135
  433. package/multiselect/multiselect.min.js +1 -1
  434. package/multiselect/style/multiselectstyle.cjs.js +7 -30
  435. package/multiselect/style/multiselectstyle.cjs.min.js +1 -1
  436. package/multiselect/style/multiselectstyle.esm.js +7 -30
  437. package/multiselect/style/multiselectstyle.esm.min.js +1 -1
  438. package/multiselect/style/multiselectstyle.js +7 -30
  439. package/multiselect/style/multiselectstyle.min.js +1 -1
  440. package/orderlist/BaseOrderList.vue +8 -0
  441. package/orderlist/OrderList.d.ts +10 -0
  442. package/orderlist/OrderList.vue +73 -54
  443. package/orderlist/orderlist.cjs.js +82 -58
  444. package/orderlist/orderlist.cjs.min.js +1 -1
  445. package/orderlist/orderlist.esm.js +82 -58
  446. package/orderlist/orderlist.esm.min.js +1 -1
  447. package/orderlist/orderlist.js +82 -58
  448. package/orderlist/orderlist.min.js +1 -1
  449. package/orderlist/style/orderliststyle.cjs.js +1 -1
  450. package/orderlist/style/orderliststyle.cjs.min.js +1 -1
  451. package/orderlist/style/orderliststyle.esm.js +1 -1
  452. package/orderlist/style/orderliststyle.esm.min.js +1 -1
  453. package/orderlist/style/orderliststyle.js +1 -1
  454. package/orderlist/style/orderliststyle.min.js +1 -1
  455. package/overlaypanel/OverlayPanel.d.ts +4 -0
  456. package/overlaypanel/OverlayPanel.vue +1 -1
  457. package/overlaypanel/overlaypanel.cjs.js +1 -1
  458. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  459. package/overlaypanel/overlaypanel.esm.js +1 -1
  460. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  461. package/overlaypanel/overlaypanel.js +1 -1
  462. package/overlaypanel/overlaypanel.min.js +1 -1
  463. package/package.json +1 -1
  464. package/panelmenu/PanelMenuList.vue +1 -1
  465. package/panelmenu/panelmenu.cjs.js +2 -1
  466. package/panelmenu/panelmenu.cjs.min.js +1 -1
  467. package/panelmenu/panelmenu.esm.js +2 -1
  468. package/panelmenu/panelmenu.esm.min.js +1 -1
  469. package/panelmenu/panelmenu.js +2 -1
  470. package/panelmenu/panelmenu.min.js +1 -1
  471. package/picklist/BasePickList.vue +8 -0
  472. package/picklist/PickList.d.ts +10 -0
  473. package/picklist/PickList.vue +73 -38
  474. package/picklist/picklist.cjs.js +84 -47
  475. package/picklist/picklist.cjs.min.js +1 -1
  476. package/picklist/picklist.esm.js +84 -47
  477. package/picklist/picklist.esm.min.js +1 -1
  478. package/picklist/picklist.js +84 -47
  479. package/picklist/picklist.min.js +1 -1
  480. package/progressbar/ProgressBar.vue +1 -1
  481. package/progressbar/progressbar.cjs.js +3 -1
  482. package/progressbar/progressbar.cjs.min.js +1 -1
  483. package/progressbar/progressbar.esm.js +3 -1
  484. package/progressbar/progressbar.esm.min.js +1 -1
  485. package/progressbar/progressbar.js +3 -1
  486. package/progressbar/progressbar.min.js +1 -1
  487. package/radiobutton/BaseRadioButton.vue +9 -4
  488. package/radiobutton/RadioButton.d.ts +48 -22
  489. package/radiobutton/RadioButton.vue +36 -23
  490. package/radiobutton/radiobutton.cjs.js +42 -50
  491. package/radiobutton/radiobutton.cjs.min.js +1 -1
  492. package/radiobutton/radiobutton.esm.js +42 -50
  493. package/radiobutton/radiobutton.esm.min.js +1 -1
  494. package/radiobutton/radiobutton.js +42 -50
  495. package/radiobutton/radiobutton.min.js +1 -1
  496. package/radiobutton/style/radiobuttonstyle.cjs.js +5 -11
  497. package/radiobutton/style/radiobuttonstyle.cjs.min.js +1 -1
  498. package/radiobutton/style/radiobuttonstyle.esm.js +5 -11
  499. package/radiobutton/style/radiobuttonstyle.esm.min.js +1 -1
  500. package/radiobutton/style/radiobuttonstyle.js +5 -11
  501. package/radiobutton/style/radiobuttonstyle.min.js +1 -1
  502. package/resources/themes/arya-blue/theme.css +434 -353
  503. package/resources/themes/arya-green/theme.css +434 -353
  504. package/resources/themes/arya-orange/theme.css +434 -353
  505. package/resources/themes/arya-purple/theme.css +434 -353
  506. package/resources/themes/aura-dark-amber/fonts/Inter-italic.var.woff2 +0 -0
  507. package/resources/themes/aura-dark-amber/fonts/Inter-roman.var.woff2 +0 -0
  508. package/resources/themes/aura-dark-amber/theme.css +7012 -0
  509. package/resources/themes/aura-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
  510. package/resources/themes/aura-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
  511. package/resources/themes/aura-dark-blue/theme.css +7012 -0
  512. package/resources/themes/aura-dark-cyan/fonts/Inter-italic.var.woff2 +0 -0
  513. package/resources/themes/aura-dark-cyan/fonts/Inter-roman.var.woff2 +0 -0
  514. package/resources/themes/aura-dark-cyan/theme.css +7012 -0
  515. package/resources/themes/aura-dark-green/fonts/Inter-italic.var.woff2 +0 -0
  516. package/resources/themes/aura-dark-green/fonts/Inter-roman.var.woff2 +0 -0
  517. package/resources/themes/aura-dark-green/theme.css +7012 -0
  518. package/resources/themes/aura-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
  519. package/resources/themes/aura-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
  520. package/resources/themes/aura-dark-indigo/theme.css +7012 -0
  521. package/resources/themes/aura-dark-lime/fonts/Inter-italic.var.woff2 +0 -0
  522. package/resources/themes/aura-dark-lime/fonts/Inter-roman.var.woff2 +0 -0
  523. package/resources/themes/aura-dark-lime/theme.css +7012 -0
  524. package/resources/themes/aura-dark-noir/fonts/Inter-italic.var.woff2 +0 -0
  525. package/resources/themes/aura-dark-noir/fonts/Inter-roman.var.woff2 +0 -0
  526. package/resources/themes/aura-dark-noir/theme.css +7012 -0
  527. package/resources/themes/aura-dark-pink/fonts/Inter-italic.var.woff2 +0 -0
  528. package/resources/themes/aura-dark-pink/fonts/Inter-roman.var.woff2 +0 -0
  529. package/resources/themes/aura-dark-pink/theme.css +7012 -0
  530. package/resources/themes/aura-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
  531. package/resources/themes/aura-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
  532. package/resources/themes/aura-dark-purple/theme.css +7012 -0
  533. package/resources/themes/aura-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
  534. package/resources/themes/aura-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
  535. package/resources/themes/aura-dark-teal/theme.css +7012 -0
  536. package/resources/themes/aura-light-amber/fonts/Inter-italic.var.woff2 +0 -0
  537. package/resources/themes/aura-light-amber/fonts/Inter-roman.var.woff2 +0 -0
  538. package/resources/themes/aura-light-amber/theme.css +7014 -0
  539. package/resources/themes/aura-light-blue/fonts/Inter-italic.var.woff2 +0 -0
  540. package/resources/themes/aura-light-blue/fonts/Inter-roman.var.woff2 +0 -0
  541. package/resources/themes/aura-light-blue/theme.css +7014 -0
  542. package/resources/themes/aura-light-cyan/fonts/Inter-italic.var.woff2 +0 -0
  543. package/resources/themes/aura-light-cyan/fonts/Inter-roman.var.woff2 +0 -0
  544. package/resources/themes/aura-light-cyan/theme.css +7014 -0
  545. package/resources/themes/aura-light-green/fonts/Inter-italic.var.woff2 +0 -0
  546. package/resources/themes/aura-light-green/fonts/Inter-roman.var.woff2 +0 -0
  547. package/resources/themes/aura-light-green/theme.css +7014 -0
  548. package/resources/themes/aura-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
  549. package/resources/themes/aura-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
  550. package/resources/themes/aura-light-indigo/theme.css +7014 -0
  551. package/resources/themes/aura-light-lime/fonts/Inter-italic.var.woff2 +0 -0
  552. package/resources/themes/aura-light-lime/fonts/Inter-roman.var.woff2 +0 -0
  553. package/resources/themes/aura-light-lime/theme.css +7014 -0
  554. package/resources/themes/aura-light-noir/fonts/Inter-italic.var.woff2 +0 -0
  555. package/resources/themes/aura-light-noir/fonts/Inter-roman.var.woff2 +0 -0
  556. package/resources/themes/aura-light-noir/theme.css +7022 -0
  557. package/resources/themes/aura-light-pink/fonts/Inter-italic.var.woff2 +0 -0
  558. package/resources/themes/aura-light-pink/fonts/Inter-roman.var.woff2 +0 -0
  559. package/resources/themes/aura-light-pink/theme.css +7014 -0
  560. package/resources/themes/aura-light-purple/fonts/Inter-italic.var.woff2 +0 -0
  561. package/resources/themes/aura-light-purple/fonts/Inter-roman.var.woff2 +0 -0
  562. package/resources/themes/aura-light-purple/theme.css +7014 -0
  563. package/resources/themes/aura-light-teal/fonts/Inter-italic.var.woff2 +0 -0
  564. package/resources/themes/aura-light-teal/fonts/Inter-roman.var.woff2 +0 -0
  565. package/resources/themes/aura-light-teal/theme.css +7014 -0
  566. package/resources/themes/bootstrap4-dark-blue/theme.css +531 -401
  567. package/resources/themes/bootstrap4-dark-purple/theme.css +531 -401
  568. package/resources/themes/bootstrap4-light-blue/theme.css +531 -401
  569. package/resources/themes/bootstrap4-light-purple/theme.css +531 -401
  570. package/resources/themes/fluent-light/theme.css +433 -352
  571. package/resources/themes/lara-dark-amber/theme.css +532 -402
  572. package/resources/themes/lara-dark-blue/theme.css +532 -402
  573. package/resources/themes/lara-dark-cyan/theme.css +532 -402
  574. package/resources/themes/lara-dark-green/theme.css +532 -402
  575. package/resources/themes/lara-dark-indigo/theme.css +532 -402
  576. package/resources/themes/lara-dark-pink/theme.css +532 -402
  577. package/resources/themes/lara-dark-purple/theme.css +532 -402
  578. package/resources/themes/lara-dark-teal/theme.css +532 -402
  579. package/resources/themes/lara-light-amber/theme.css +528 -398
  580. package/resources/themes/lara-light-blue/theme.css +528 -398
  581. package/resources/themes/lara-light-cyan/theme.css +528 -398
  582. package/resources/themes/lara-light-green/theme.css +528 -398
  583. package/resources/themes/lara-light-indigo/theme.css +528 -398
  584. package/resources/themes/lara-light-pink/theme.css +528 -398
  585. package/resources/themes/lara-light-purple/theme.css +528 -398
  586. package/resources/themes/lara-light-teal/theme.css +528 -398
  587. package/resources/themes/luna-amber/theme.css +434 -353
  588. package/resources/themes/luna-blue/theme.css +434 -353
  589. package/resources/themes/luna-green/theme.css +434 -353
  590. package/resources/themes/luna-pink/theme.css +434 -353
  591. package/resources/themes/md-dark-deeppurple/theme.css +694 -429
  592. package/resources/themes/md-dark-indigo/theme.css +694 -429
  593. package/resources/themes/md-light-deeppurple/theme.css +698 -433
  594. package/resources/themes/md-light-indigo/theme.css +698 -433
  595. package/resources/themes/mdc-dark-deeppurple/theme.css +694 -429
  596. package/resources/themes/mdc-dark-indigo/theme.css +694 -429
  597. package/resources/themes/mdc-light-deeppurple/theme.css +698 -433
  598. package/resources/themes/mdc-light-indigo/theme.css +698 -433
  599. package/resources/themes/mira/theme.css +484 -403
  600. package/resources/themes/nano/theme.css +434 -353
  601. package/resources/themes/nova/theme.css +434 -353
  602. package/resources/themes/nova-accent/theme.css +434 -353
  603. package/resources/themes/nova-alt/theme.css +434 -353
  604. package/resources/themes/nova-vue/theme.css +434 -353
  605. package/resources/themes/rhea/theme.css +434 -353
  606. package/resources/themes/saga-blue/theme.css +434 -353
  607. package/resources/themes/saga-green/theme.css +434 -353
  608. package/resources/themes/saga-orange/theme.css +434 -353
  609. package/resources/themes/saga-purple/theme.css +434 -353
  610. package/resources/themes/soho-dark/theme.css +532 -402
  611. package/resources/themes/soho-light/theme.css +532 -402
  612. package/resources/themes/tailwind-light/theme.css +434 -353
  613. package/resources/themes/vela-blue/theme.css +434 -353
  614. package/resources/themes/vela-green/theme.css +434 -353
  615. package/resources/themes/vela-orange/theme.css +434 -353
  616. package/resources/themes/vela-purple/theme.css +434 -353
  617. package/resources/themes/viva-dark/theme.css +533 -403
  618. package/resources/themes/viva-light/theme.css +533 -403
  619. package/slider/Slider.vue +0 -1
  620. package/slider/slider.cjs.js +0 -1
  621. package/slider/slider.cjs.min.js +1 -1
  622. package/slider/slider.esm.js +0 -1
  623. package/slider/slider.esm.min.js +1 -1
  624. package/slider/slider.js +0 -1
  625. package/slider/slider.min.js +1 -1
  626. package/speeddial/SpeedDial.vue +2 -2
  627. package/speeddial/speeddial.cjs.js +2 -2
  628. package/speeddial/speeddial.cjs.min.js +1 -1
  629. package/speeddial/speeddial.esm.js +2 -2
  630. package/speeddial/speeddial.esm.min.js +1 -1
  631. package/speeddial/speeddial.js +2 -2
  632. package/speeddial/speeddial.min.js +1 -1
  633. package/splitbutton/style/splitbuttonstyle.cjs.js +8 -5
  634. package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
  635. package/splitbutton/style/splitbuttonstyle.esm.js +8 -5
  636. package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
  637. package/splitbutton/style/splitbuttonstyle.js +8 -5
  638. package/splitbutton/style/splitbuttonstyle.min.js +1 -1
  639. package/tabview/TabView.vue +2 -3
  640. package/tabview/tabview.cjs.js +3 -3
  641. package/tabview/tabview.cjs.min.js +1 -1
  642. package/tabview/tabview.esm.js +3 -3
  643. package/tabview/tabview.esm.min.js +1 -1
  644. package/tabview/tabview.js +3 -3
  645. package/tabview/tabview.min.js +1 -1
  646. package/tag/Tag.vue +1 -1
  647. package/tag/tag.cjs.js +4 -2
  648. package/tag/tag.cjs.min.js +1 -1
  649. package/tag/tag.esm.js +4 -2
  650. package/tag/tag.esm.min.js +1 -1
  651. package/tag/tag.js +4 -2
  652. package/tag/tag.min.js +1 -1
  653. package/textarea/Textarea.d.ts +2 -2
  654. package/tieredmenu/TieredMenu.vue +1 -1
  655. package/tieredmenu/tieredmenu.cjs.js +2 -1
  656. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  657. package/tieredmenu/tieredmenu.esm.js +2 -1
  658. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  659. package/tieredmenu/tieredmenu.js +2 -1
  660. package/tieredmenu/tieredmenu.min.js +1 -1
  661. package/togglebutton/BaseToggleButton.vue +4 -4
  662. package/togglebutton/ToggleButton.d.ts +17 -24
  663. package/togglebutton/ToggleButton.vue +41 -67
  664. package/togglebutton/style/togglebuttonstyle.cjs.js +15 -8
  665. package/togglebutton/style/togglebuttonstyle.cjs.min.js +1 -1
  666. package/togglebutton/style/togglebuttonstyle.esm.js +15 -8
  667. package/togglebutton/style/togglebuttonstyle.esm.min.js +1 -1
  668. package/togglebutton/style/togglebuttonstyle.js +15 -8
  669. package/togglebutton/style/togglebuttonstyle.min.js +1 -1
  670. package/togglebutton/togglebutton.cjs.js +45 -80
  671. package/togglebutton/togglebutton.cjs.min.js +1 -1
  672. package/togglebutton/togglebutton.esm.js +46 -81
  673. package/togglebutton/togglebutton.esm.min.js +1 -1
  674. package/togglebutton/togglebutton.js +46 -82
  675. package/togglebutton/togglebutton.min.js +1 -1
  676. package/tree/BaseTree.vue +4 -0
  677. package/tree/Tree.d.ts +6 -9
  678. package/tree/Tree.vue +1 -1
  679. package/tree/TreeNode.vue +14 -11
  680. package/tree/style/treestyle.cjs.js +3 -6
  681. package/tree/style/treestyle.cjs.min.js +1 -1
  682. package/tree/style/treestyle.esm.js +3 -6
  683. package/tree/style/treestyle.esm.min.js +1 -1
  684. package/tree/style/treestyle.js +3 -6
  685. package/tree/style/treestyle.min.js +1 -1
  686. package/tree/tree.cjs.js +34 -21
  687. package/tree/tree.cjs.min.js +1 -1
  688. package/tree/tree.esm.js +34 -22
  689. package/tree/tree.esm.min.js +1 -1
  690. package/tree/tree.js +35 -23
  691. package/tree/tree.min.js +1 -1
  692. package/treetable/BodyCell.vue +26 -24
  693. package/treetable/TreeTable.vue +3 -1
  694. package/treetable/TreeTableRow.vue +2 -0
  695. package/treetable/style/treetablestyle.cjs.js +4 -13
  696. package/treetable/style/treetablestyle.cjs.min.js +1 -1
  697. package/treetable/style/treetablestyle.esm.js +4 -13
  698. package/treetable/style/treetablestyle.esm.min.js +1 -1
  699. package/treetable/style/treetablestyle.js +4 -13
  700. package/treetable/style/treetablestyle.min.js +1 -1
  701. package/treetable/treetable.cjs.js +39 -44
  702. package/treetable/treetable.cjs.min.js +1 -1
  703. package/treetable/treetable.esm.js +39 -45
  704. package/treetable/treetable.esm.min.js +1 -1
  705. package/treetable/treetable.js +40 -46
  706. package/treetable/treetable.min.js +1 -1
  707. package/tristatecheckbox/BaseTriStateCheckbox.vue +17 -9
  708. package/tristatecheckbox/TriStateCheckbox.d.ts +34 -23
  709. package/tristatecheckbox/TriStateCheckbox.vue +49 -61
  710. package/tristatecheckbox/style/tristatecheckboxstyle.cjs.js +7 -13
  711. package/tristatecheckbox/style/tristatecheckboxstyle.cjs.min.js +1 -1
  712. package/tristatecheckbox/style/tristatecheckboxstyle.esm.js +7 -13
  713. package/tristatecheckbox/style/tristatecheckboxstyle.esm.min.js +1 -1
  714. package/tristatecheckbox/style/tristatecheckboxstyle.js +7 -13
  715. package/tristatecheckbox/style/tristatecheckboxstyle.min.js +1 -1
  716. package/tristatecheckbox/tristatecheckbox.cjs.js +69 -87
  717. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  718. package/tristatecheckbox/tristatecheckbox.esm.js +70 -88
  719. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  720. package/tristatecheckbox/tristatecheckbox.js +69 -87
  721. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  722. package/utils/utils.cjs.js +14 -6
  723. package/utils/utils.cjs.min.js +1 -1
  724. package/utils/utils.esm.js +14 -6
  725. package/utils/utils.esm.min.js +1 -1
  726. package/utils/utils.js +14 -6
  727. package/utils/utils.min.js +1 -1
  728. package/vetur-attributes.json +24 -0
  729. package/vetur-tags.json +6 -0
  730. package/virtualscroller/BaseVirtualScroller.vue +1 -1
  731. package/virtualscroller/VirtualScroller.vue +58 -50
  732. package/virtualscroller/virtualscroller.cjs.js +90 -77
  733. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  734. package/virtualscroller/virtualscroller.esm.js +90 -77
  735. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  736. package/virtualscroller/virtualscroller.js +90 -77
  737. package/virtualscroller/virtualscroller.min.js +1 -1
  738. package/web-types.json +71 -6
@@ -66,6 +66,10 @@ var script$1 = {
66
66
  type: Boolean,
67
67
  "default": false
68
68
  },
69
+ focusOnHover: {
70
+ type: Boolean,
71
+ "default": true
72
+ },
69
73
  filterMessage: {
70
74
  type: String,
71
75
  "default": null
@@ -127,7 +131,6 @@ var script = {
127
131
  startRangeIndex: -1,
128
132
  searchTimeout: null,
129
133
  searchValue: '',
130
- focusOnHover: false,
131
134
  data: function data() {
132
135
  return {
133
136
  id: this.$attrs.id,
@@ -212,7 +215,7 @@ var script = {
212
215
  },
213
216
  onListFocus: function onListFocus(event) {
214
217
  this.focused = true;
215
- this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
218
+ this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex();
216
219
  this.autoUpdateModel();
217
220
  this.$emit('focus', event);
218
221
  },
@@ -287,7 +290,7 @@ var script = {
287
290
  this.changeFocusedOptionIndex(event, index);
288
291
  },
289
292
  onOptionMouseMove: function onOptionMouseMove(event, index) {
290
- if (this.focusOnHover) {
293
+ if (this.focusOnHover && this.focused) {
291
294
  this.changeFocusedOptionIndex(event, index);
292
295
  }
293
296
  },
@@ -466,7 +469,8 @@ var script = {
466
469
  this.startRangeIndex = this.focusedOptionIndex;
467
470
  },
468
471
  isOptionMatched: function isOptionMatched(option) {
469
- return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
472
+ var _this$getOptionLabel;
473
+ return this.isValidOption(option) && ((_this$getOptionLabel = this.getOptionLabel(option)) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)));
470
474
  },
471
475
  isValidOption: function isValidOption(option) {
472
476
  return utils.ObjectUtils.isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
@@ -474,12 +478,15 @@ var script = {
474
478
  isValidSelectedOption: function isValidSelectedOption(option) {
475
479
  return this.isValidOption(option) && this.isSelected(option);
476
480
  },
481
+ isEquals: function isEquals(value1, value2) {
482
+ return utils.ObjectUtils.equals(value1, value2, this.equalityKey);
483
+ },
477
484
  isSelected: function isSelected(option) {
478
485
  var _this4 = this;
479
486
  var optionValue = this.getOptionValue(option);
480
487
  if (this.multiple) return (this.modelValue || []).some(function (value) {
481
- return utils.ObjectUtils.equals(value, optionValue, _this4.equalityKey);
482
- });else return utils.ObjectUtils.equals(this.modelValue, optionValue, this.equalityKey);
488
+ return _this4.isEquals(value, optionValue);
489
+ });else return this.isEquals(this.modelValue, optionValue);
483
490
  },
484
491
  findFirstOptionIndex: function findFirstOptionIndex() {
485
492
  var _this5 = this;
@@ -507,29 +514,55 @@ var script = {
507
514
  }) : -1;
508
515
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
509
516
  },
510
- findFirstSelectedOptionIndex: function findFirstSelectedOptionIndex() {
517
+ findSelectedOptionIndex: function findSelectedOptionIndex() {
511
518
  var _this9 = this;
519
+ if (this.hasSelectedOption) {
520
+ if (this.multiple) {
521
+ var _loop = function _loop() {
522
+ var value = _this9.modelValue[index];
523
+ var matchedOptionIndex = _this9.visibleOptions.findIndex(function (option) {
524
+ return _this9.isValidSelectedOption(option) && _this9.isEquals(value, _this9.getOptionValue(option));
525
+ });
526
+ if (matchedOptionIndex > -1) return {
527
+ v: matchedOptionIndex
528
+ };
529
+ },
530
+ _ret;
531
+ for (var index = this.modelValue.length - 1; index >= 0; index--) {
532
+ _ret = _loop();
533
+ if (_ret) return _ret.v;
534
+ }
535
+ } else {
536
+ return this.visibleOptions.findIndex(function (option) {
537
+ return _this9.isValidSelectedOption(option);
538
+ });
539
+ }
540
+ }
541
+ return -1;
542
+ },
543
+ findFirstSelectedOptionIndex: function findFirstSelectedOptionIndex() {
544
+ var _this10 = this;
512
545
  return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {
513
- return _this9.isValidSelectedOption(option);
546
+ return _this10.isValidSelectedOption(option);
514
547
  }) : -1;
515
548
  },
516
549
  findLastSelectedOptionIndex: function findLastSelectedOptionIndex() {
517
- var _this10 = this;
550
+ var _this11 = this;
518
551
  return this.hasSelectedOption ? utils.ObjectUtils.findLastIndex(this.visibleOptions, function (option) {
519
- return _this10.isValidSelectedOption(option);
552
+ return _this11.isValidSelectedOption(option);
520
553
  }) : -1;
521
554
  },
522
555
  findNextSelectedOptionIndex: function findNextSelectedOptionIndex(index) {
523
- var _this11 = this;
556
+ var _this12 = this;
524
557
  var matchedOptionIndex = this.hasSelectedOption && index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
525
- return _this11.isValidSelectedOption(option);
558
+ return _this12.isValidSelectedOption(option);
526
559
  }) : -1;
527
560
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
528
561
  },
529
562
  findPrevSelectedOptionIndex: function findPrevSelectedOptionIndex(index) {
530
- var _this12 = this;
563
+ var _this13 = this;
531
564
  var matchedOptionIndex = this.hasSelectedOption && index > 0 ? utils.ObjectUtils.findLastIndex(this.visibleOptions.slice(0, index), function (option) {
532
- return _this12.isValidSelectedOption(option);
565
+ return _this13.isValidSelectedOption(option);
533
566
  }) : -1;
534
567
  return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
535
568
  },
@@ -556,39 +589,41 @@ var script = {
556
589
  return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
557
590
  },
558
591
  searchOptions: function searchOptions(event, _char) {
559
- var _this13 = this;
592
+ var _this14 = this;
560
593
  this.searchValue = (this.searchValue || '') + _char;
561
594
  var optionIndex = -1;
562
- if (this.focusedOptionIndex !== -1) {
563
- optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {
564
- return _this13.isOptionMatched(option);
565
- });
566
- optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {
567
- return _this13.isOptionMatched(option);
568
- }) : optionIndex + this.focusedOptionIndex;
569
- } else {
570
- optionIndex = this.visibleOptions.findIndex(function (option) {
571
- return _this13.isOptionMatched(option);
572
- });
573
- }
574
- if (optionIndex === -1 && this.focusedOptionIndex === -1) {
575
- optionIndex = this.findFirstFocusedOptionIndex();
576
- }
577
- if (optionIndex !== -1) {
578
- this.changeFocusedOptionIndex(event, optionIndex);
595
+ if (utils.ObjectUtils.isNotEmpty(this.searchValue)) {
596
+ if (this.focusedOptionIndex !== -1) {
597
+ optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {
598
+ return _this14.isOptionMatched(option);
599
+ });
600
+ optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {
601
+ return _this14.isOptionMatched(option);
602
+ }) : optionIndex + this.focusedOptionIndex;
603
+ } else {
604
+ optionIndex = this.visibleOptions.findIndex(function (option) {
605
+ return _this14.isOptionMatched(option);
606
+ });
607
+ }
608
+ if (optionIndex === -1 && this.focusedOptionIndex === -1) {
609
+ optionIndex = this.findFirstFocusedOptionIndex();
610
+ }
611
+ if (optionIndex !== -1) {
612
+ this.changeFocusedOptionIndex(event, optionIndex);
613
+ }
579
614
  }
580
615
  if (this.searchTimeout) {
581
616
  clearTimeout(this.searchTimeout);
582
617
  }
583
618
  this.searchTimeout = setTimeout(function () {
584
- _this13.searchValue = '';
585
- _this13.searchTimeout = null;
619
+ _this14.searchValue = '';
620
+ _this14.searchTimeout = null;
586
621
  }, 500);
587
622
  },
588
623
  removeOption: function removeOption(option) {
589
- var _this14 = this;
624
+ var _this15 = this;
590
625
  return this.modelValue.filter(function (val) {
591
- return !utils.ObjectUtils.equals(val, _this14.getOptionValue(option), _this14.equalityKey);
626
+ return !utils.ObjectUtils.equals(val, _this15.getOptionValue(option), _this15.equalityKey);
592
627
  });
593
628
  },
594
629
  changeFocusedOptionIndex: function changeFocusedOptionIndex(event, index) {
@@ -601,17 +636,21 @@ var script = {
601
636
  }
602
637
  },
603
638
  scrollInView: function scrollInView() {
639
+ var _this16 = this;
604
640
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
605
- var id = index !== -1 ? "".concat(this.id, "_").concat(index) : this.focusedOptionId;
606
- var element = utils.DomHandler.findSingle(this.list, "li[id=\"".concat(id, "\"]"));
607
- if (element) {
608
- element.scrollIntoView && element.scrollIntoView({
609
- block: 'nearest',
610
- inline: 'nearest'
611
- });
612
- } else if (!this.virtualScrollerDisabled) {
613
- this.virtualScroller && this.virtualScroller.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex);
614
- }
641
+ this.$nextTick(function () {
642
+ var id = index !== -1 ? "".concat(_this16.id, "_").concat(index) : _this16.focusedOptionId;
643
+ var element = utils.DomHandler.findSingle(_this16.list, "li[id=\"".concat(id, "\"]"));
644
+ if (element) {
645
+ element.scrollIntoView && element.scrollIntoView({
646
+ block: 'nearest',
647
+ inline: 'nearest',
648
+ behavior: 'smooth'
649
+ });
650
+ } else if (!_this16.virtualScrollerDisabled) {
651
+ _this16.virtualScroller && _this16.virtualScroller.scrollToIndex(index !== -1 ? index : _this16.focusedOptionIndex);
652
+ }
653
+ });
615
654
  },
616
655
  autoUpdateModel: function autoUpdateModel() {
617
656
  if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption && !this.multiple && this.focused) {
@@ -627,14 +666,14 @@ var script = {
627
666
  });
628
667
  },
629
668
  flatOptions: function flatOptions(options) {
630
- var _this15 = this;
669
+ var _this17 = this;
631
670
  return (options || []).reduce(function (result, option, index) {
632
671
  result.push({
633
672
  optionGroup: option,
634
673
  group: true,
635
674
  index: index
636
675
  });
637
- var optionGroupChildren = _this15.getOptionGroupChildren(option);
676
+ var optionGroupChildren = _this17.getOptionGroupChildren(option);
638
677
  optionGroupChildren && optionGroupChildren.forEach(function (o) {
639
678
  return result.push(o);
640
679
  });
@@ -688,9 +727,9 @@ var script = {
688
727
  return this.focusedOptionIndex !== -1 ? "".concat(this.id, "_").concat(this.focusedOptionIndex) : null;
689
728
  },
690
729
  ariaSetSize: function ariaSetSize() {
691
- var _this16 = this;
730
+ var _this18 = this;
692
731
  return this.visibleOptions.filter(function (option) {
693
- return !_this16.isOptionGroup(option);
732
+ return !_this18.isOptionGroup(option);
694
733
  }).length;
695
734
  },
696
735
  virtualScrollerDisabled: function virtualScrollerDisabled() {
@@ -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:!1},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"NumpadEnter":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":case"NumpadEnter":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;
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:!1},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},focusOnHover:{type:Boolean,default:!0},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:"",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():this.findSelectedOptionIndex(),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"NumpadEnter":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.focused&&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":case"NumpadEnter":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){var t;return this.isValidOption(e)&&(null===(t=this.getOptionLabel(e))||void 0===t?void 0:t.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)},isEquals:function(e,t){return n.ObjectUtils.equals(e,t,this.equalityKey)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return t.isEquals(e,i)})):this.isEquals(this.modelValue,i)},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},findSelectedOptionIndex:function(){var e=this;if(this.hasSelectedOption){if(!this.multiple)return this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)}));for(var t,i=function(){var t=e.modelValue[n],i=e.visibleOptions.findIndex((function(i){return e.isValidSelectedOption(i)&&e.isEquals(t,e.getOptionValue(i))}));if(i>-1)return{v:i}},n=this.modelValue.length-1;n>=0;n--)if(t=i())return t.v}return-1},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 o=-1;n.ObjectUtils.isNotEmpty(this.searchValue)&&(-1===(o=-1!==this.focusedOptionIndex?-1===(o=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)})):o+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(o=this.findFirstFocusedOptionIndex()),-1!==o&&this.changeFocusedOptionIndex(e,o)),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=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,o=n.DomHandler.findSingle(e.list,'li[id="'.concat(i,'"]'));o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.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 v(e){return v="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},v(e)}function y(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?y(Object(i),!0).forEach((function(t){I(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):y(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"==v(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"!=v(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=v(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"],E=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],K=["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,E)),[[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,K)],16,F)},module.exports=g;
@@ -56,6 +56,10 @@ var script$1 = {
56
56
  type: Boolean,
57
57
  "default": false
58
58
  },
59
+ focusOnHover: {
60
+ type: Boolean,
61
+ "default": true
62
+ },
59
63
  filterMessage: {
60
64
  type: String,
61
65
  "default": null
@@ -117,7 +121,6 @@ var script = {
117
121
  startRangeIndex: -1,
118
122
  searchTimeout: null,
119
123
  searchValue: '',
120
- focusOnHover: false,
121
124
  data: function data() {
122
125
  return {
123
126
  id: this.$attrs.id,
@@ -202,7 +205,7 @@ var script = {
202
205
  },
203
206
  onListFocus: function onListFocus(event) {
204
207
  this.focused = true;
205
- this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
208
+ this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex();
206
209
  this.autoUpdateModel();
207
210
  this.$emit('focus', event);
208
211
  },
@@ -277,7 +280,7 @@ var script = {
277
280
  this.changeFocusedOptionIndex(event, index);
278
281
  },
279
282
  onOptionMouseMove: function onOptionMouseMove(event, index) {
280
- if (this.focusOnHover) {
283
+ if (this.focusOnHover && this.focused) {
281
284
  this.changeFocusedOptionIndex(event, index);
282
285
  }
283
286
  },
@@ -456,7 +459,8 @@ var script = {
456
459
  this.startRangeIndex = this.focusedOptionIndex;
457
460
  },
458
461
  isOptionMatched: function isOptionMatched(option) {
459
- return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
462
+ var _this$getOptionLabel;
463
+ return this.isValidOption(option) && ((_this$getOptionLabel = this.getOptionLabel(option)) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)));
460
464
  },
461
465
  isValidOption: function isValidOption(option) {
462
466
  return ObjectUtils.isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
@@ -464,12 +468,15 @@ var script = {
464
468
  isValidSelectedOption: function isValidSelectedOption(option) {
465
469
  return this.isValidOption(option) && this.isSelected(option);
466
470
  },
471
+ isEquals: function isEquals(value1, value2) {
472
+ return ObjectUtils.equals(value1, value2, this.equalityKey);
473
+ },
467
474
  isSelected: function isSelected(option) {
468
475
  var _this4 = this;
469
476
  var optionValue = this.getOptionValue(option);
470
477
  if (this.multiple) return (this.modelValue || []).some(function (value) {
471
- return ObjectUtils.equals(value, optionValue, _this4.equalityKey);
472
- });else return ObjectUtils.equals(this.modelValue, optionValue, this.equalityKey);
478
+ return _this4.isEquals(value, optionValue);
479
+ });else return this.isEquals(this.modelValue, optionValue);
473
480
  },
474
481
  findFirstOptionIndex: function findFirstOptionIndex() {
475
482
  var _this5 = this;
@@ -497,29 +504,55 @@ var script = {
497
504
  }) : -1;
498
505
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
499
506
  },
500
- findFirstSelectedOptionIndex: function findFirstSelectedOptionIndex() {
507
+ findSelectedOptionIndex: function findSelectedOptionIndex() {
501
508
  var _this9 = this;
509
+ if (this.hasSelectedOption) {
510
+ if (this.multiple) {
511
+ var _loop = function _loop() {
512
+ var value = _this9.modelValue[index];
513
+ var matchedOptionIndex = _this9.visibleOptions.findIndex(function (option) {
514
+ return _this9.isValidSelectedOption(option) && _this9.isEquals(value, _this9.getOptionValue(option));
515
+ });
516
+ if (matchedOptionIndex > -1) return {
517
+ v: matchedOptionIndex
518
+ };
519
+ },
520
+ _ret;
521
+ for (var index = this.modelValue.length - 1; index >= 0; index--) {
522
+ _ret = _loop();
523
+ if (_ret) return _ret.v;
524
+ }
525
+ } else {
526
+ return this.visibleOptions.findIndex(function (option) {
527
+ return _this9.isValidSelectedOption(option);
528
+ });
529
+ }
530
+ }
531
+ return -1;
532
+ },
533
+ findFirstSelectedOptionIndex: function findFirstSelectedOptionIndex() {
534
+ var _this10 = this;
502
535
  return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {
503
- return _this9.isValidSelectedOption(option);
536
+ return _this10.isValidSelectedOption(option);
504
537
  }) : -1;
505
538
  },
506
539
  findLastSelectedOptionIndex: function findLastSelectedOptionIndex() {
507
- var _this10 = this;
540
+ var _this11 = this;
508
541
  return this.hasSelectedOption ? ObjectUtils.findLastIndex(this.visibleOptions, function (option) {
509
- return _this10.isValidSelectedOption(option);
542
+ return _this11.isValidSelectedOption(option);
510
543
  }) : -1;
511
544
  },
512
545
  findNextSelectedOptionIndex: function findNextSelectedOptionIndex(index) {
513
- var _this11 = this;
546
+ var _this12 = this;
514
547
  var matchedOptionIndex = this.hasSelectedOption && index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
515
- return _this11.isValidSelectedOption(option);
548
+ return _this12.isValidSelectedOption(option);
516
549
  }) : -1;
517
550
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
518
551
  },
519
552
  findPrevSelectedOptionIndex: function findPrevSelectedOptionIndex(index) {
520
- var _this12 = this;
553
+ var _this13 = this;
521
554
  var matchedOptionIndex = this.hasSelectedOption && index > 0 ? ObjectUtils.findLastIndex(this.visibleOptions.slice(0, index), function (option) {
522
- return _this12.isValidSelectedOption(option);
555
+ return _this13.isValidSelectedOption(option);
523
556
  }) : -1;
524
557
  return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
525
558
  },
@@ -546,39 +579,41 @@ var script = {
546
579
  return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
547
580
  },
548
581
  searchOptions: function searchOptions(event, _char) {
549
- var _this13 = this;
582
+ var _this14 = this;
550
583
  this.searchValue = (this.searchValue || '') + _char;
551
584
  var optionIndex = -1;
552
- if (this.focusedOptionIndex !== -1) {
553
- optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {
554
- return _this13.isOptionMatched(option);
555
- });
556
- optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {
557
- return _this13.isOptionMatched(option);
558
- }) : optionIndex + this.focusedOptionIndex;
559
- } else {
560
- optionIndex = this.visibleOptions.findIndex(function (option) {
561
- return _this13.isOptionMatched(option);
562
- });
563
- }
564
- if (optionIndex === -1 && this.focusedOptionIndex === -1) {
565
- optionIndex = this.findFirstFocusedOptionIndex();
566
- }
567
- if (optionIndex !== -1) {
568
- this.changeFocusedOptionIndex(event, optionIndex);
585
+ if (ObjectUtils.isNotEmpty(this.searchValue)) {
586
+ if (this.focusedOptionIndex !== -1) {
587
+ optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {
588
+ return _this14.isOptionMatched(option);
589
+ });
590
+ optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {
591
+ return _this14.isOptionMatched(option);
592
+ }) : optionIndex + this.focusedOptionIndex;
593
+ } else {
594
+ optionIndex = this.visibleOptions.findIndex(function (option) {
595
+ return _this14.isOptionMatched(option);
596
+ });
597
+ }
598
+ if (optionIndex === -1 && this.focusedOptionIndex === -1) {
599
+ optionIndex = this.findFirstFocusedOptionIndex();
600
+ }
601
+ if (optionIndex !== -1) {
602
+ this.changeFocusedOptionIndex(event, optionIndex);
603
+ }
569
604
  }
570
605
  if (this.searchTimeout) {
571
606
  clearTimeout(this.searchTimeout);
572
607
  }
573
608
  this.searchTimeout = setTimeout(function () {
574
- _this13.searchValue = '';
575
- _this13.searchTimeout = null;
609
+ _this14.searchValue = '';
610
+ _this14.searchTimeout = null;
576
611
  }, 500);
577
612
  },
578
613
  removeOption: function removeOption(option) {
579
- var _this14 = this;
614
+ var _this15 = this;
580
615
  return this.modelValue.filter(function (val) {
581
- return !ObjectUtils.equals(val, _this14.getOptionValue(option), _this14.equalityKey);
616
+ return !ObjectUtils.equals(val, _this15.getOptionValue(option), _this15.equalityKey);
582
617
  });
583
618
  },
584
619
  changeFocusedOptionIndex: function changeFocusedOptionIndex(event, index) {
@@ -591,17 +626,21 @@ var script = {
591
626
  }
592
627
  },
593
628
  scrollInView: function scrollInView() {
629
+ var _this16 = this;
594
630
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
595
- var id = index !== -1 ? "".concat(this.id, "_").concat(index) : this.focusedOptionId;
596
- var element = DomHandler.findSingle(this.list, "li[id=\"".concat(id, "\"]"));
597
- if (element) {
598
- element.scrollIntoView && element.scrollIntoView({
599
- block: 'nearest',
600
- inline: 'nearest'
601
- });
602
- } else if (!this.virtualScrollerDisabled) {
603
- this.virtualScroller && this.virtualScroller.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex);
604
- }
631
+ this.$nextTick(function () {
632
+ var id = index !== -1 ? "".concat(_this16.id, "_").concat(index) : _this16.focusedOptionId;
633
+ var element = DomHandler.findSingle(_this16.list, "li[id=\"".concat(id, "\"]"));
634
+ if (element) {
635
+ element.scrollIntoView && element.scrollIntoView({
636
+ block: 'nearest',
637
+ inline: 'nearest',
638
+ behavior: 'smooth'
639
+ });
640
+ } else if (!_this16.virtualScrollerDisabled) {
641
+ _this16.virtualScroller && _this16.virtualScroller.scrollToIndex(index !== -1 ? index : _this16.focusedOptionIndex);
642
+ }
643
+ });
605
644
  },
606
645
  autoUpdateModel: function autoUpdateModel() {
607
646
  if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption && !this.multiple && this.focused) {
@@ -617,14 +656,14 @@ var script = {
617
656
  });
618
657
  },
619
658
  flatOptions: function flatOptions(options) {
620
- var _this15 = this;
659
+ var _this17 = this;
621
660
  return (options || []).reduce(function (result, option, index) {
622
661
  result.push({
623
662
  optionGroup: option,
624
663
  group: true,
625
664
  index: index
626
665
  });
627
- var optionGroupChildren = _this15.getOptionGroupChildren(option);
666
+ var optionGroupChildren = _this17.getOptionGroupChildren(option);
628
667
  optionGroupChildren && optionGroupChildren.forEach(function (o) {
629
668
  return result.push(o);
630
669
  });
@@ -678,9 +717,9 @@ var script = {
678
717
  return this.focusedOptionIndex !== -1 ? "".concat(this.id, "_").concat(this.focusedOptionIndex) : null;
679
718
  },
680
719
  ariaSetSize: function ariaSetSize() {
681
- var _this16 = this;
720
+ var _this18 = this;
682
721
  return this.visibleOptions.filter(function (option) {
683
- return !_this16.isOptionGroup(option);
722
+ return !_this18.isOptionGroup(option);
684
723
  }).length;
685
724
  },
686
725
  virtualScrollerDisabled: function virtualScrollerDisabled() {