primevue 3.28.0 → 3.29.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 (448) hide show
  1. package/README.md +3 -3
  2. package/autocomplete/AutoComplete.d.ts +153 -1
  3. package/autocomplete/AutoComplete.vue +46 -17
  4. package/autocomplete/autocomplete.cjs.js +80 -74
  5. package/autocomplete/autocomplete.cjs.min.js +1 -1
  6. package/autocomplete/autocomplete.esm.js +80 -75
  7. package/autocomplete/autocomplete.esm.min.js +1 -1
  8. package/autocomplete/autocomplete.js +81 -76
  9. package/autocomplete/autocomplete.min.js +1 -1
  10. package/basecomponent/BaseComponent.vue +19 -5
  11. package/basecomponent/basecomponent.cjs.js +19 -5
  12. package/basecomponent/basecomponent.cjs.min.js +1 -1
  13. package/basecomponent/basecomponent.esm.js +19 -5
  14. package/basecomponent/basecomponent.esm.min.js +1 -1
  15. package/basecomponent/basecomponent.js +20 -7
  16. package/basecomponent/basecomponent.min.js +1 -1
  17. package/calendar/Calendar.d.ts +273 -0
  18. package/calendar/Calendar.vue +75 -59
  19. package/calendar/calendar.cjs.js +223 -259
  20. package/calendar/calendar.cjs.min.js +1 -1
  21. package/calendar/calendar.esm.js +223 -260
  22. package/calendar/calendar.esm.min.js +1 -1
  23. package/calendar/calendar.js +224 -261
  24. package/calendar/calendar.min.js +1 -1
  25. package/carousel/Carousel.d.ts +154 -0
  26. package/carousel/Carousel.vue +27 -14
  27. package/carousel/carousel.cjs.js +64 -65
  28. package/carousel/carousel.cjs.min.js +1 -1
  29. package/carousel/carousel.esm.js +64 -66
  30. package/carousel/carousel.esm.min.js +1 -1
  31. package/carousel/carousel.js +65 -67
  32. package/carousel/carousel.min.js +1 -1
  33. package/cascadeselect/CascadeSelect.d.ts +133 -0
  34. package/cascadeselect/CascadeSelect.vue +15 -12
  35. package/cascadeselect/CascadeSelectSub.vue +7 -3
  36. package/cascadeselect/cascadeselect.cjs.js +63 -66
  37. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  38. package/cascadeselect/cascadeselect.esm.js +63 -67
  39. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  40. package/cascadeselect/cascadeselect.js +64 -68
  41. package/cascadeselect/cascadeselect.min.js +1 -1
  42. package/checkbox/Checkbox.d.ts +60 -0
  43. package/checkbox/Checkbox.vue +7 -5
  44. package/checkbox/checkbox.cjs.js +17 -15
  45. package/checkbox/checkbox.cjs.min.js +1 -1
  46. package/checkbox/checkbox.esm.js +17 -16
  47. package/checkbox/checkbox.esm.min.js +1 -1
  48. package/checkbox/checkbox.js +18 -17
  49. package/checkbox/checkbox.min.js +1 -1
  50. package/chips/Chips.d.ts +80 -0
  51. package/chips/Chips.vue +9 -5
  52. package/chips/chips.cjs.js +23 -24
  53. package/chips/chips.cjs.min.js +1 -1
  54. package/chips/chips.esm.js +23 -25
  55. package/chips/chips.esm.min.js +1 -1
  56. package/chips/chips.js +24 -26
  57. package/chips/chips.min.js +1 -1
  58. package/colorpicker/ColorPicker.d.ts +76 -0
  59. package/colorpicker/ColorPicker.vue +11 -9
  60. package/colorpicker/colorpicker.cjs.js +28 -27
  61. package/colorpicker/colorpicker.cjs.min.js +1 -1
  62. package/colorpicker/colorpicker.esm.js +28 -28
  63. package/colorpicker/colorpicker.esm.min.js +1 -1
  64. package/colorpicker/colorpicker.js +29 -29
  65. package/colorpicker/colorpicker.min.js +1 -1
  66. package/column/Column.d.ts +303 -2
  67. package/column/Column.vue +3 -0
  68. package/column/column.cjs.js +7 -0
  69. package/column/column.cjs.min.js +1 -1
  70. package/column/column.esm.js +3 -0
  71. package/column/column.esm.min.js +1 -1
  72. package/column/column.js +7 -2
  73. package/column/column.min.js +1 -1
  74. package/columngroup/ColumnGroup.d.ts +34 -0
  75. package/columngroup/ColumnGroup.vue +3 -0
  76. package/columngroup/columngroup.cjs.js +7 -0
  77. package/columngroup/columngroup.cjs.min.js +1 -1
  78. package/columngroup/columngroup.esm.js +3 -0
  79. package/columngroup/columngroup.esm.min.js +1 -1
  80. package/columngroup/columngroup.js +7 -2
  81. package/columngroup/columngroup.min.js +1 -1
  82. package/config/PrimeVue.d.ts +163 -2
  83. package/confirmdialog/ConfirmDialog.d.ts +14 -7
  84. package/contextmenu/ContextMenu.d.ts +1 -1
  85. package/core/core.js +448 -331
  86. package/core/core.min.js +9 -9
  87. package/datatable/BodyCell.vue +29 -13
  88. package/datatable/ColumnFilter.vue +49 -20
  89. package/datatable/DataTable.d.ts +188 -1
  90. package/datatable/DataTable.vue +29 -16
  91. package/datatable/FooterCell.vue +15 -1
  92. package/datatable/HeaderCell.vue +31 -6
  93. package/datatable/HeaderCheckbox.vue +35 -5
  94. package/datatable/RowCheckbox.vue +36 -5
  95. package/datatable/RowRadioButton.vue +26 -6
  96. package/datatable/TableBody.vue +41 -11
  97. package/datatable/TableFooter.vue +31 -5
  98. package/datatable/TableHeader.vue +53 -6
  99. package/datatable/datatable.cjs.js +563 -378
  100. package/datatable/datatable.cjs.min.js +1 -1
  101. package/datatable/datatable.esm.js +563 -379
  102. package/datatable/datatable.esm.min.js +1 -1
  103. package/datatable/datatable.js +564 -380
  104. package/datatable/datatable.min.js +1 -1
  105. package/dataview/DataView.d.ts +72 -0
  106. package/dataview/DataView.vue +13 -8
  107. package/dataview/dataview.cjs.js +33 -37
  108. package/dataview/dataview.cjs.min.js +1 -1
  109. package/dataview/dataview.esm.js +33 -38
  110. package/dataview/dataview.esm.min.js +1 -1
  111. package/dataview/dataview.js +33 -38
  112. package/dataview/dataview.min.js +1 -1
  113. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +65 -0
  114. package/dataviewlayoutoptions/DataViewLayoutOptions.vue +7 -5
  115. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -17
  116. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
  117. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -18
  118. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
  119. package/dataviewlayoutoptions/dataviewlayoutoptions.js +20 -19
  120. package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
  121. package/dialog/Dialog.d.ts +6 -4
  122. package/dialog/Dialog.vue +2 -3
  123. package/dialog/dialog.cjs.js +4 -5
  124. package/dialog/dialog.cjs.min.js +1 -1
  125. package/dialog/dialog.esm.js +4 -5
  126. package/dialog/dialog.esm.min.js +1 -1
  127. package/dialog/dialog.js +4 -5
  128. package/dialog/dialog.min.js +1 -1
  129. package/dialogservice/dialogservice.cjs.js +3 -3
  130. package/dialogservice/dialogservice.cjs.min.js +1 -1
  131. package/dialogservice/dialogservice.esm.js +3 -3
  132. package/dialogservice/dialogservice.esm.min.js +1 -1
  133. package/dialogservice/dialogservice.js +3 -3
  134. package/dialogservice/dialogservice.min.js +1 -1
  135. package/dropdown/Dropdown.d.ts +162 -1
  136. package/dropdown/Dropdown.vue +44 -25
  137. package/dropdown/dropdown.cjs.js +97 -93
  138. package/dropdown/dropdown.cjs.min.js +1 -1
  139. package/dropdown/dropdown.esm.js +97 -94
  140. package/dropdown/dropdown.esm.min.js +1 -1
  141. package/dropdown/dropdown.js +98 -95
  142. package/dropdown/dropdown.min.js +1 -1
  143. package/editor/Editor.d.ts +67 -0
  144. package/editor/Editor.vue +35 -33
  145. package/editor/editor.cjs.js +88 -73
  146. package/editor/editor.cjs.min.js +1 -1
  147. package/editor/editor.esm.js +85 -74
  148. package/editor/editor.esm.min.js +1 -1
  149. package/editor/editor.js +89 -75
  150. package/editor/editor.min.js +1 -1
  151. package/fileupload/FileUpload.d.ts +23 -23
  152. package/fileupload/FileUpload.vue +3 -3
  153. package/fileupload/fileupload.cjs.js +4 -4
  154. package/fileupload/fileupload.cjs.min.js +1 -1
  155. package/fileupload/fileupload.esm.js +4 -4
  156. package/fileupload/fileupload.esm.min.js +1 -1
  157. package/fileupload/fileupload.js +4 -4
  158. package/fileupload/fileupload.min.js +1 -1
  159. package/galleria/Galleria.d.ts +196 -0
  160. package/galleria/Galleria.vue +5 -3
  161. package/galleria/GalleriaContent.vue +10 -6
  162. package/galleria/GalleriaItem.vue +12 -9
  163. package/galleria/GalleriaThumbnails.vue +46 -9
  164. package/galleria/galleria.cjs.js +106 -104
  165. package/galleria/galleria.cjs.min.js +1 -1
  166. package/galleria/galleria.esm.js +106 -105
  167. package/galleria/galleria.esm.min.js +1 -1
  168. package/galleria/galleria.js +107 -106
  169. package/galleria/galleria.min.js +1 -1
  170. package/image/Image.d.ts +170 -0
  171. package/image/Image.vue +49 -21
  172. package/image/image.cjs.js +94 -59
  173. package/image/image.cjs.min.js +1 -1
  174. package/image/image.esm.js +94 -60
  175. package/image/image.esm.min.js +1 -1
  176. package/image/image.js +95 -61
  177. package/image/image.min.js +1 -1
  178. package/inputmask/InputMask.d.ts +25 -0
  179. package/inputmask/InputMask.vue +3 -1
  180. package/inputmask/inputmask.cjs.js +9 -3
  181. package/inputmask/inputmask.cjs.min.js +1 -1
  182. package/inputmask/inputmask.esm.js +6 -4
  183. package/inputmask/inputmask.esm.min.js +1 -1
  184. package/inputmask/inputmask.js +10 -5
  185. package/inputmask/inputmask.min.js +1 -1
  186. package/inputnumber/InputNumber.d.ts +69 -0
  187. package/inputnumber/InputNumber.vue +13 -11
  188. package/inputnumber/inputnumber.cjs.js +19 -28
  189. package/inputnumber/inputnumber.cjs.min.js +1 -1
  190. package/inputnumber/inputnumber.esm.js +19 -29
  191. package/inputnumber/inputnumber.esm.min.js +1 -1
  192. package/inputnumber/inputnumber.js +20 -30
  193. package/inputnumber/inputnumber.min.js +1 -1
  194. package/inputswitch/InputSwitch.d.ts +51 -0
  195. package/inputswitch/InputSwitch.vue +7 -4
  196. package/inputswitch/inputswitch.cjs.js +15 -11
  197. package/inputswitch/inputswitch.cjs.min.js +1 -1
  198. package/inputswitch/inputswitch.esm.js +12 -12
  199. package/inputswitch/inputswitch.esm.min.js +1 -1
  200. package/inputswitch/inputswitch.js +16 -13
  201. package/inputswitch/inputswitch.min.js +1 -1
  202. package/inputtext/InputText.d.ts +25 -0
  203. package/inputtext/InputText.vue +4 -1
  204. package/inputtext/inputtext.cjs.js +9 -3
  205. package/inputtext/inputtext.cjs.min.js +1 -1
  206. package/inputtext/inputtext.esm.js +6 -4
  207. package/inputtext/inputtext.esm.min.js +1 -1
  208. package/inputtext/inputtext.js +10 -5
  209. package/inputtext/inputtext.min.js +1 -1
  210. package/knob/Knob.d.ts +78 -0
  211. package/knob/Knob.vue +8 -4
  212. package/knob/knob.cjs.js +17 -13
  213. package/knob/knob.cjs.min.js +1 -1
  214. package/knob/knob.esm.js +14 -14
  215. package/knob/knob.esm.min.js +1 -1
  216. package/knob/knob.js +18 -15
  217. package/knob/knob.min.js +1 -1
  218. package/listbox/Listbox.d.ts +137 -1
  219. package/listbox/Listbox.vue +28 -15
  220. package/listbox/listbox.cjs.js +83 -78
  221. package/listbox/listbox.cjs.min.js +1 -1
  222. package/listbox/listbox.esm.js +83 -79
  223. package/listbox/listbox.esm.min.js +1 -1
  224. package/listbox/listbox.js +84 -80
  225. package/listbox/listbox.min.js +1 -1
  226. package/megamenu/MegaMenu.d.ts +5 -5
  227. package/menu/Menu.d.ts +4 -4
  228. package/menubar/Menubar.d.ts +1 -1
  229. package/multiselect/MultiSelect.d.ts +223 -1
  230. package/multiselect/MultiSelect.vue +72 -41
  231. package/multiselect/multiselect.cjs.js +156 -151
  232. package/multiselect/multiselect.cjs.min.js +1 -1
  233. package/multiselect/multiselect.esm.js +156 -152
  234. package/multiselect/multiselect.esm.min.js +1 -1
  235. package/multiselect/multiselect.js +157 -153
  236. package/multiselect/multiselect.min.js +1 -1
  237. package/orderlist/OrderList.d.ts +94 -0
  238. package/orderlist/OrderList.vue +38 -18
  239. package/orderlist/orderlist.cjs.js +50 -36
  240. package/orderlist/orderlist.cjs.min.js +1 -1
  241. package/orderlist/orderlist.esm.js +50 -37
  242. package/orderlist/orderlist.esm.min.js +1 -1
  243. package/orderlist/orderlist.js +51 -38
  244. package/orderlist/orderlist.min.js +1 -1
  245. package/organizationchart/OrganizationChart.d.ts +129 -0
  246. package/organizationchart/OrganizationChart.vue +14 -2
  247. package/organizationchart/OrganizationChartNode.vue +37 -16
  248. package/organizationchart/organizationchart.cjs.js +77 -61
  249. package/organizationchart/organizationchart.cjs.min.js +1 -1
  250. package/organizationchart/organizationchart.esm.js +77 -62
  251. package/organizationchart/organizationchart.esm.min.js +1 -1
  252. package/organizationchart/organizationchart.js +78 -63
  253. package/organizationchart/organizationchart.min.js +1 -1
  254. package/package.json +1 -1
  255. package/paginator/CurrentPageReport.vue +5 -1
  256. package/paginator/FirstPageLink.vue +13 -2
  257. package/paginator/JumpToPageDropdown.vue +3 -1
  258. package/paginator/JumpToPageInput.vue +3 -1
  259. package/paginator/LastPageLink.vue +13 -2
  260. package/paginator/NextPageLink.vue +13 -2
  261. package/paginator/PageLinks.vue +12 -2
  262. package/paginator/Paginator.d.ts +133 -0
  263. package/paginator/Paginator.vue +23 -12
  264. package/paginator/PrevPageLink.vue +13 -2
  265. package/paginator/RowsPerPageDropdown.vue +3 -1
  266. package/paginator/paginator.cjs.js +135 -76
  267. package/paginator/paginator.cjs.min.js +1 -1
  268. package/paginator/paginator.esm.js +135 -77
  269. package/paginator/paginator.esm.min.js +1 -1
  270. package/paginator/paginator.js +136 -78
  271. package/paginator/paginator.min.js +1 -1
  272. package/panelmenu/PanelMenu.d.ts +4 -8
  273. package/password/Password.d.ts +104 -0
  274. package/password/Password.vue +11 -9
  275. package/password/password.cjs.js +26 -28
  276. package/password/password.cjs.min.js +1 -1
  277. package/password/password.esm.js +26 -29
  278. package/password/password.esm.min.js +1 -1
  279. package/password/password.js +27 -30
  280. package/password/password.min.js +1 -1
  281. package/picklist/PickList.d.ts +160 -0
  282. package/picklist/PickList.vue +46 -34
  283. package/picklist/picklist.cjs.js +111 -85
  284. package/picklist/picklist.cjs.min.js +1 -1
  285. package/picklist/picklist.esm.js +111 -86
  286. package/picklist/picklist.esm.min.js +1 -1
  287. package/picklist/picklist.js +112 -87
  288. package/picklist/picklist.min.js +1 -1
  289. package/radiobutton/RadioButton.d.ts +55 -0
  290. package/radiobutton/RadioButton.vue +7 -5
  291. package/radiobutton/radiobutton.cjs.js +19 -16
  292. package/radiobutton/radiobutton.cjs.min.js +1 -1
  293. package/radiobutton/radiobutton.esm.js +16 -17
  294. package/radiobutton/radiobutton.esm.min.js +1 -1
  295. package/radiobutton/radiobutton.js +20 -18
  296. package/radiobutton/radiobutton.min.js +1 -1
  297. package/rating/Rating.d.ts +96 -0
  298. package/rating/Rating.vue +32 -9
  299. package/rating/rating.cjs.js +41 -34
  300. package/rating/rating.cjs.min.js +1 -1
  301. package/rating/rating.esm.js +41 -35
  302. package/rating/rating.esm.min.js +1 -1
  303. package/rating/rating.js +42 -36
  304. package/rating/rating.min.js +1 -1
  305. package/row/Row.d.ts +29 -0
  306. package/row/Row.vue +3 -0
  307. package/row/row.cjs.js +7 -0
  308. package/row/row.cjs.min.js +1 -1
  309. package/row/row.esm.js +3 -0
  310. package/row/row.esm.min.js +1 -1
  311. package/row/row.js +7 -2
  312. package/row/row.min.js +1 -1
  313. package/selectbutton/SelectButton.d.ts +68 -0
  314. package/selectbutton/SelectButton.vue +13 -2
  315. package/selectbutton/selectbutton.cjs.js +20 -10
  316. package/selectbutton/selectbutton.cjs.min.js +1 -1
  317. package/selectbutton/selectbutton.esm.js +20 -11
  318. package/selectbutton/selectbutton.esm.min.js +1 -1
  319. package/selectbutton/selectbutton.js +21 -12
  320. package/selectbutton/selectbutton.min.js +1 -1
  321. package/slider/Slider.d.ts +48 -0
  322. package/slider/Slider.vue +7 -2
  323. package/slider/slider.cjs.js +22 -16
  324. package/slider/slider.cjs.min.js +1 -1
  325. package/slider/slider.esm.js +19 -17
  326. package/slider/slider.esm.min.js +1 -1
  327. package/slider/slider.js +23 -18
  328. package/slider/slider.min.js +1 -1
  329. package/speeddial/SpeedDial.d.ts +4 -0
  330. package/speeddial/SpeedDial.vue +1 -1
  331. package/speeddial/speeddial.cjs.js +3 -2
  332. package/speeddial/speeddial.cjs.min.js +1 -1
  333. package/speeddial/speeddial.esm.js +3 -2
  334. package/speeddial/speeddial.esm.min.js +1 -1
  335. package/speeddial/speeddial.js +3 -2
  336. package/speeddial/speeddial.min.js +1 -1
  337. package/splitbutton/SplitButton.d.ts +0 -4
  338. package/splitbutton/SplitButton.vue +2 -2
  339. package/splitbutton/splitbutton.cjs.js +7 -6
  340. package/splitbutton/splitbutton.cjs.min.js +1 -1
  341. package/splitbutton/splitbutton.esm.js +7 -6
  342. package/splitbutton/splitbutton.esm.min.js +1 -1
  343. package/splitbutton/splitbutton.js +7 -6
  344. package/splitbutton/splitbutton.min.js +1 -1
  345. package/splitter/Splitter.d.ts +3 -3
  346. package/steps/Steps.vue +4 -0
  347. package/steps/steps.cjs.js +1 -1
  348. package/steps/steps.cjs.min.js +1 -1
  349. package/steps/steps.esm.js +1 -1
  350. package/steps/steps.esm.min.js +1 -1
  351. package/steps/steps.js +1 -1
  352. package/steps/steps.min.js +1 -1
  353. package/tabmenu/TabMenu.vue +13 -4
  354. package/tabmenu/tabmenu.cjs.js +13 -4
  355. package/tabmenu/tabmenu.cjs.min.js +1 -1
  356. package/tabmenu/tabmenu.esm.js +13 -4
  357. package/tabmenu/tabmenu.esm.min.js +1 -1
  358. package/tabmenu/tabmenu.js +13 -4
  359. package/tabmenu/tabmenu.min.js +1 -1
  360. package/textarea/Textarea.d.ts +32 -0
  361. package/textarea/Textarea.vue +4 -1
  362. package/textarea/textarea.cjs.js +9 -3
  363. package/textarea/textarea.cjs.min.js +1 -1
  364. package/textarea/textarea.esm.js +6 -4
  365. package/textarea/textarea.esm.min.js +1 -1
  366. package/textarea/textarea.js +10 -5
  367. package/textarea/textarea.min.js +1 -1
  368. package/timeline/Timeline.d.ts +49 -0
  369. package/timeline/Timeline.vue +9 -7
  370. package/timeline/timeline.cjs.js +19 -21
  371. package/timeline/timeline.cjs.min.js +1 -1
  372. package/timeline/timeline.esm.js +16 -22
  373. package/timeline/timeline.esm.min.js +1 -1
  374. package/timeline/timeline.js +20 -23
  375. package/timeline/timeline.min.js +1 -1
  376. package/toast/Toast.d.ts +4 -0
  377. package/toast/Toast.vue +1 -1
  378. package/toast/toast.cjs.js +3 -3
  379. package/toast/toast.cjs.min.js +1 -1
  380. package/toast/toast.esm.js +3 -3
  381. package/toast/toast.esm.min.js +1 -1
  382. package/toast/toast.js +3 -3
  383. package/toast/toast.min.js +1 -1
  384. package/togglebutton/ToggleButton.d.ts +59 -0
  385. package/togglebutton/ToggleButton.vue +7 -5
  386. package/togglebutton/togglebutton.cjs.js +15 -14
  387. package/togglebutton/togglebutton.cjs.min.js +1 -1
  388. package/togglebutton/togglebutton.esm.js +15 -15
  389. package/togglebutton/togglebutton.esm.min.js +1 -1
  390. package/togglebutton/togglebutton.js +16 -16
  391. package/togglebutton/togglebutton.min.js +1 -1
  392. package/tooltip/Tooltip.d.ts +10 -0
  393. package/tooltip/tooltip.cjs.js +51 -9
  394. package/tooltip/tooltip.cjs.min.js +1 -1
  395. package/tooltip/tooltip.esm.js +52 -10
  396. package/tooltip/tooltip.esm.min.js +1 -1
  397. package/tooltip/tooltip.js +51 -9
  398. package/tooltip/tooltip.min.js +1 -1
  399. package/tree/Tree.d.ts +137 -0
  400. package/tree/Tree.vue +12 -9
  401. package/tree/TreeNode.vue +23 -10
  402. package/tree/tree.cjs.js +85 -79
  403. package/tree/tree.cjs.min.js +1 -1
  404. package/tree/tree.esm.js +85 -80
  405. package/tree/tree.esm.min.js +1 -1
  406. package/tree/tree.js +86 -81
  407. package/tree/tree.min.js +1 -1
  408. package/treeselect/TreeSelect.d.ts +103 -1
  409. package/treeselect/TreeSelect.vue +15 -12
  410. package/treeselect/treeselect.cjs.js +37 -39
  411. package/treeselect/treeselect.cjs.min.js +1 -1
  412. package/treeselect/treeselect.esm.js +37 -40
  413. package/treeselect/treeselect.esm.min.js +1 -1
  414. package/treeselect/treeselect.js +38 -41
  415. package/treeselect/treeselect.min.js +1 -1
  416. package/treetable/BodyCell.vue +38 -10
  417. package/treetable/FooterCell.vue +15 -1
  418. package/treetable/HeaderCell.vue +28 -5
  419. package/treetable/TreeTable.d.ts +162 -0
  420. package/treetable/TreeTable.vue +25 -19
  421. package/treetable/TreeTableRow.vue +5 -0
  422. package/treetable/treetable.cjs.js +205 -158
  423. package/treetable/treetable.cjs.min.js +1 -1
  424. package/treetable/treetable.esm.js +205 -159
  425. package/treetable/treetable.esm.min.js +1 -1
  426. package/treetable/treetable.js +206 -160
  427. package/treetable/treetable.min.js +1 -1
  428. package/tristatecheckbox/TriStateCheckbox.d.ts +93 -0
  429. package/tristatecheckbox/TriStateCheckbox.vue +19 -8
  430. package/tristatecheckbox/tristatecheckbox.cjs.js +31 -22
  431. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  432. package/tristatecheckbox/tristatecheckbox.esm.js +31 -23
  433. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  434. package/tristatecheckbox/tristatecheckbox.js +32 -24
  435. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  436. package/ts-helpers.d.ts +3 -1
  437. package/vetur-attributes.json +180 -0
  438. package/vetur-tags.json +94 -39
  439. package/virtualscroller/VirtualScroller.d.ts +97 -0
  440. package/virtualscroller/VirtualScroller.vue +7 -5
  441. package/virtualscroller/virtualscroller.cjs.js +22 -19
  442. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  443. package/virtualscroller/virtualscroller.esm.js +22 -20
  444. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  445. package/virtualscroller/virtualscroller.js +23 -21
  446. package/virtualscroller/virtualscroller.min.js +1 -1
  447. package/web-types.json +467 -3
  448. package/datatable/TableLoadingBody.vue +0 -25
@@ -1,9 +1,10 @@
1
1
  this.primevue = this.primevue || {};
2
- this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, TimesCircleIcon, OverlayEventBus, Portal, Ripple, utils, VirtualScroller, vue) {
2
+ this.primevue.autocomplete = (function (BaseComponent, Button, ChevronDownIcon, SpinnerIcon, TimesCircleIcon, OverlayEventBus, Portal, Ripple, utils, VirtualScroller, vue) {
3
3
  'use strict';
4
4
 
5
5
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
6
 
7
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
7
8
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
8
9
  var ChevronDownIcon__default = /*#__PURE__*/_interopDefaultLegacy(ChevronDownIcon);
9
10
  var SpinnerIcon__default = /*#__PURE__*/_interopDefaultLegacy(SpinnerIcon);
@@ -15,6 +16,7 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
15
16
 
16
17
  var script = {
17
18
  name: 'AutoComplete',
19
+ extends: BaseComponent__default["default"],
18
20
  emits: ['update:modelValue', 'change', 'focus', 'blur', 'item-select', 'item-unselect', 'dropdown-click', 'clear', 'complete', 'before-show', 'before-hide', 'show', 'hide'],
19
21
  props: {
20
22
  modelValue: null,
@@ -242,6 +244,15 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
242
244
  getOptionRenderKey(option, index) {
243
245
  return (this.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index;
244
246
  },
247
+ getPTOptions(option, itemOptions, index, key) {
248
+ return this.ptm(key, {
249
+ context: {
250
+ selected: this.isSelected(option),
251
+ focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),
252
+ disabled: this.isOptionDisabled(option)
253
+ }
254
+ });
255
+ },
245
256
  isOptionDisabled(option) {
246
257
  return this.optionDisabled ? utils.ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
247
258
  },
@@ -942,30 +953,10 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
942
953
  const _hoisted_1 = ["id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant"];
943
954
  const _hoisted_2 = ["aria-activedescendant"];
944
955
  const _hoisted_3 = ["id", "aria-label", "aria-setsize", "aria-posinset"];
945
- const _hoisted_4 = { class: "p-autocomplete-token-label" };
946
- const _hoisted_5 = {
947
- class: "p-autocomplete-input-token",
948
- role: "option"
949
- };
950
- const _hoisted_6 = ["id", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant"];
951
- const _hoisted_7 = {
952
- role: "status",
953
- "aria-live": "polite",
954
- class: "p-hidden-accessible"
955
- };
956
- const _hoisted_8 = ["id"];
957
- const _hoisted_9 = ["id"];
958
- const _hoisted_10 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove"];
959
- const _hoisted_11 = {
960
- key: 0,
961
- class: "p-autocomplete-empty-message",
962
- role: "option"
963
- };
964
- const _hoisted_12 = {
965
- role: "status",
966
- "aria-live": "polite",
967
- class: "p-hidden-accessible"
968
- };
956
+ const _hoisted_4 = ["id", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant"];
957
+ const _hoisted_5 = ["id"];
958
+ const _hoisted_6 = ["id"];
959
+ const _hoisted_7 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove"];
969
960
 
970
961
  function render(_ctx, _cache, $props, $setup, $data, $options) {
971
962
  const _component_SpinnerIcon = vue.resolveComponent("SpinnerIcon");
@@ -974,11 +965,11 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
974
965
  const _component_Portal = vue.resolveComponent("Portal");
975
966
  const _directive_ripple = vue.resolveDirective("ripple");
976
967
 
977
- return (vue.openBlock(), vue.createElementBlock("div", {
968
+ return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
978
969
  ref: "container",
979
- class: vue.normalizeClass($options.containerClass),
970
+ class: $options.containerClass,
980
971
  onClick: _cache[15] || (_cache[15] = (...args) => ($options.onContainerClick && $options.onContainerClick(...args)))
981
- }, [
972
+ }, _ctx.ptm('root')), [
982
973
  (!$props.multiple)
983
974
  ? (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
984
975
  key: 0,
@@ -1005,13 +996,13 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1005
996
  onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
1006
997
  onInput: _cache[3] || (_cache[3] = (...args) => ($options.onInput && $options.onInput(...args))),
1007
998
  onChange: _cache[4] || (_cache[4] = (...args) => ($options.onChange && $options.onChange(...args)))
1008
- }, $props.inputProps), null, 16, _hoisted_1))
999
+ }, { ...$props.inputProps, ..._ctx.ptm('input') }), null, 16, _hoisted_1))
1009
1000
  : vue.createCommentVNode("", true),
1010
1001
  ($props.multiple)
1011
- ? (vue.openBlock(), vue.createElementBlock("ul", {
1002
+ ? (vue.openBlock(), vue.createElementBlock("ul", vue.mergeProps({
1012
1003
  key: 1,
1013
1004
  ref: "multiContainer",
1014
- class: vue.normalizeClass($options.multiContainerClass),
1005
+ class: $options.multiContainerClass,
1015
1006
  tabindex: "-1",
1016
1007
  role: "listbox",
1017
1008
  "aria-orientation": "horizontal",
@@ -1019,34 +1010,37 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1019
1010
  onFocus: _cache[10] || (_cache[10] = (...args) => ($options.onMultipleContainerFocus && $options.onMultipleContainerFocus(...args))),
1020
1011
  onBlur: _cache[11] || (_cache[11] = (...args) => ($options.onMultipleContainerBlur && $options.onMultipleContainerBlur(...args))),
1021
1012
  onKeydown: _cache[12] || (_cache[12] = (...args) => ($options.onMultipleContainerKeyDown && $options.onMultipleContainerKeyDown(...args)))
1022
- }, [
1013
+ }, _ctx.ptm('container')), [
1023
1014
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.modelValue, (option, i) => {
1024
- return (vue.openBlock(), vue.createElementBlock("li", {
1015
+ return (vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
1025
1016
  key: i,
1026
1017
  id: $data.id + '_multiple_option_' + i,
1027
- class: vue.normalizeClass(['p-autocomplete-token', { 'p-focus': $data.focusedMultipleOptionIndex === i }]),
1018
+ class: ['p-autocomplete-token', { 'p-focus': $data.focusedMultipleOptionIndex === i }],
1028
1019
  role: "option",
1029
1020
  "aria-label": $options.getOptionLabel(option),
1030
1021
  "aria-selected": true,
1031
1022
  "aria-setsize": $props.modelValue.length,
1032
1023
  "aria-posinset": i + 1
1033
- }, [
1024
+ }, _ctx.ptm('token')), [
1034
1025
  vue.renderSlot(_ctx.$slots, "chip", { value: option }, () => [
1035
- vue.createElementVNode("span", _hoisted_4, vue.toDisplayString($options.getOptionLabel(option)), 1)
1026
+ vue.createElementVNode("span", vue.mergeProps({ class: "p-autocomplete-token-label" }, _ctx.ptm('tokenLabel')), vue.toDisplayString($options.getOptionLabel(option)), 17)
1036
1027
  ]),
1037
1028
  vue.renderSlot(_ctx.$slots, "removetokenicon", {
1038
1029
  class: "p-autocomplete-token-icon",
1039
1030
  onClick: (event) => $options.removeOption(event, i)
1040
1031
  }, () => [
1041
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.removeTokenIcon ? 'span' : 'TimesCircleIcon'), {
1042
- class: vue.normalizeClass(['p-autocomplete-token-icon', $props.removeTokenIcon]),
1032
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.removeTokenIcon ? 'span' : 'TimesCircleIcon'), vue.mergeProps({
1033
+ class: ['p-autocomplete-token-icon', $props.removeTokenIcon],
1043
1034
  onClick: $event => ($options.removeOption($event, i)),
1044
1035
  "aria-hidden": "true"
1045
- }, null, 8, ["class", "onClick"]))
1036
+ }, _ctx.ptm('removeTokenIcon')), null, 16, ["class", "onClick"]))
1046
1037
  ])
1047
- ], 10, _hoisted_3))
1038
+ ], 16, _hoisted_3))
1048
1039
  }), 128)),
1049
- vue.createElementVNode("li", _hoisted_5, [
1040
+ vue.createElementVNode("li", vue.mergeProps({
1041
+ class: "p-autocomplete-input-token",
1042
+ role: "option"
1043
+ }, _ctx.ptm('token')), [
1050
1044
  vue.createElementVNode("input", vue.mergeProps({
1051
1045
  ref: "focusInput",
1052
1046
  id: $props.inputId,
@@ -1070,24 +1064,24 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1070
1064
  onKeydown: _cache[7] || (_cache[7] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
1071
1065
  onInput: _cache[8] || (_cache[8] = (...args) => ($options.onInput && $options.onInput(...args))),
1072
1066
  onChange: _cache[9] || (_cache[9] = (...args) => ($options.onChange && $options.onChange(...args)))
1073
- }, $props.inputProps), null, 16, _hoisted_6)
1074
- ])
1075
- ], 42, _hoisted_2))
1067
+ }, { ...$props.inputProps, ..._ctx.ptm('input') }), null, 16, _hoisted_4)
1068
+ ], 16)
1069
+ ], 16, _hoisted_2))
1076
1070
  : vue.createCommentVNode("", true),
1077
1071
  ($data.searching)
1078
1072
  ? vue.renderSlot(_ctx.$slots, "loadingicon", { key: 2 }, () => [
1079
1073
  ($props.loadingIcon)
1080
- ? (vue.openBlock(), vue.createElementBlock("i", {
1074
+ ? (vue.openBlock(), vue.createElementBlock("i", vue.mergeProps({
1081
1075
  key: 0,
1082
- class: vue.normalizeClass(['p-autocomplete-loader pi-spin', $props.loadingIcon]),
1076
+ class: ['p-autocomplete-loader pi-spin', $props.loadingIcon],
1083
1077
  "aria-hidden": "true"
1084
- }, null, 2))
1085
- : (vue.openBlock(), vue.createBlock(_component_SpinnerIcon, {
1078
+ }, _ctx.ptm('loadingIcon')), null, 16))
1079
+ : (vue.openBlock(), vue.createBlock(_component_SpinnerIcon, vue.mergeProps({
1086
1080
  key: 1,
1087
1081
  class: "p-autocomplete-loader",
1088
1082
  spin: "",
1089
1083
  "aria-hidden": "true"
1090
- }))
1084
+ }, _ctx.ptm('loadingIcon')), null, 16))
1091
1085
  ])
1092
1086
  : vue.createCommentVNode("", true),
1093
1087
  ($props.dropdown)
@@ -1099,19 +1093,22 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1099
1093
  class: vue.normalizeClass(['p-autocomplete-dropdown', $props.dropdownClass]),
1100
1094
  disabled: $props.disabled,
1101
1095
  "aria-hidden": "true",
1102
- onClick: $options.onDropdownClick
1096
+ onClick: $options.onDropdownClick,
1097
+ pt: _ctx.ptm('dropdownButton')
1103
1098
  }, {
1104
1099
  icon: vue.withCtx(() => [
1105
1100
  vue.renderSlot(_ctx.$slots, "dropdownicon", {}, () => [
1106
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.dropdownIcon ? 'span' : 'ChevronDownIcon'), {
1107
- class: vue.normalizeClass($props.dropdownIcon)
1108
- }, null, 8, ["class"]))
1101
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.dropdownIcon ? 'span' : 'ChevronDownIcon'), vue.mergeProps({ class: $props.dropdownIcon }, _ctx.ptm('dropdownButton')['icon']), null, 16, ["class"]))
1109
1102
  ])
1110
1103
  ]),
1111
1104
  _: 3
1112
- }, 8, ["class", "disabled", "onClick"]))
1105
+ }, 8, ["class", "disabled", "onClick", "pt"]))
1113
1106
  : vue.createCommentVNode("", true),
1114
- vue.createElementVNode("span", _hoisted_7, vue.toDisplayString($options.searchResultMessageText), 1),
1107
+ vue.createElementVNode("span", vue.mergeProps({
1108
+ role: "status",
1109
+ "aria-live": "polite",
1110
+ class: "p-hidden-accessible"
1111
+ }, _ctx.ptm('hiddenSearchResult')), vue.toDisplayString($options.searchResultMessageText), 17),
1115
1112
  vue.createVNode(_component_Portal, { appendTo: $props.appendTo }, {
1116
1113
  default: vue.withCtx(() => [
1117
1114
  vue.createVNode(vue.Transition, {
@@ -1130,37 +1127,37 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1130
1127
  style: { ...$props.panelStyle, 'max-height': $options.virtualScrollerDisabled ? $props.scrollHeight : '' },
1131
1128
  onClick: _cache[13] || (_cache[13] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args))),
1132
1129
  onKeydown: _cache[14] || (_cache[14] = (...args) => ($options.onOverlayKeyDown && $options.onOverlayKeyDown(...args)))
1133
- }, $props.panelProps), [
1130
+ }, { ...$props.panelProps, ..._ctx.ptm('panel') }), [
1134
1131
  vue.renderSlot(_ctx.$slots, "header", {
1135
1132
  value: $props.modelValue,
1136
1133
  suggestions: $options.visibleOptions
1137
1134
  }),
1138
- vue.createVNode(_component_VirtualScroller, vue.mergeProps({ ref: $options.virtualScrollerRef }, $props.virtualScrollerOptions, {
1135
+ vue.createVNode(_component_VirtualScroller, vue.mergeProps({ ref: $options.virtualScrollerRef }, { ...$props.virtualScrollerOptions, ..._ctx.ptm('virtualScroller') }, {
1139
1136
  style: { height: $props.scrollHeight },
1140
1137
  items: $options.visibleOptions,
1141
1138
  tabindex: -1,
1142
1139
  disabled: $options.virtualScrollerDisabled
1143
1140
  }), vue.createSlots({
1144
1141
  content: vue.withCtx(({ styleClass, contentRef, items, getItemOptions, contentStyle, itemSize }) => [
1145
- vue.createElementVNode("ul", {
1142
+ vue.createElementVNode("ul", vue.mergeProps({
1146
1143
  ref: (el) => $options.listRef(el, contentRef),
1147
1144
  id: $data.id + '_list',
1148
- class: vue.normalizeClass(['p-autocomplete-items', styleClass]),
1149
- style: vue.normalizeStyle(contentStyle),
1145
+ class: ['p-autocomplete-items', styleClass],
1146
+ style: contentStyle,
1150
1147
  role: "listbox"
1151
- }, [
1148
+ }, _ctx.ptm('list')), [
1152
1149
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items, (option, i) => {
1153
1150
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
1154
1151
  key: $options.getOptionRenderKey(option, $options.getOptionIndex(i, getItemOptions))
1155
1152
  }, [
1156
1153
  ($options.isOptionGroup(option))
1157
- ? (vue.openBlock(), vue.createElementBlock("li", {
1154
+ ? (vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
1158
1155
  key: 0,
1159
1156
  id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),
1160
- style: vue.normalizeStyle({ height: itemSize ? itemSize + 'px' : undefined }),
1157
+ style: { height: itemSize ? itemSize + 'px' : undefined },
1161
1158
  class: "p-autocomplete-item-group",
1162
1159
  role: "option"
1163
- }, [
1160
+ }, _ctx.ptm('itemGroup')), [
1164
1161
  vue.renderSlot(_ctx.$slots, "optiongroup", {
1165
1162
  option: option.optionGroup,
1166
1163
  item: option.optionGroup,
@@ -1168,12 +1165,12 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1168
1165
  }, () => [
1169
1166
  vue.createTextVNode(vue.toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 1)
1170
1167
  ])
1171
- ], 12, _hoisted_9))
1172
- : vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
1168
+ ], 16, _hoisted_6))
1169
+ : vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
1173
1170
  key: 1,
1174
1171
  id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),
1175
- style: vue.normalizeStyle({ height: itemSize ? itemSize + 'px' : undefined }),
1176
- class: vue.normalizeClass(['p-autocomplete-item', { 'p-highlight': $options.isSelected(option), 'p-focus': $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions), 'p-disabled': $options.isOptionDisabled(option) }]),
1172
+ style: { height: itemSize ? itemSize + 'px' : undefined },
1173
+ class: ['p-autocomplete-item', { 'p-highlight': $options.isSelected(option), 'p-focus': $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions), 'p-disabled': $options.isOptionDisabled(option) }],
1177
1174
  role: "option",
1178
1175
  "aria-label": $options.getOptionLabel(option),
1179
1176
  "aria-selected": $options.isSelected(option),
@@ -1182,7 +1179,7 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1182
1179
  "aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),
1183
1180
  onClick: $event => ($options.onOptionSelect($event, option)),
1184
1181
  onMousemove: $event => ($options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions)))
1185
- }, [
1182
+ }, $options.getPTOptions(option, getItemOptions, i, 'item')), [
1186
1183
  (_ctx.$slots.option)
1187
1184
  ? vue.renderSlot(_ctx.$slots, "option", {
1188
1185
  key: 0,
@@ -1198,19 +1195,23 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1198
1195
  }, () => [
1199
1196
  vue.createTextVNode(vue.toDisplayString($options.getOptionLabel(option)), 1)
1200
1197
  ])
1201
- ], 46, _hoisted_10)), [
1198
+ ], 16, _hoisted_7)), [
1202
1199
  [_directive_ripple]
1203
1200
  ])
1204
1201
  ], 64))
1205
1202
  }), 128)),
1206
1203
  (!items || (items && items.length === 0))
1207
- ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_11, [
1204
+ ? (vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
1205
+ key: 0,
1206
+ class: "p-autocomplete-empty-message",
1207
+ role: "option"
1208
+ }, _ctx.ptm('emptyMessage')), [
1208
1209
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
1209
1210
  vue.createTextVNode(vue.toDisplayString($options.searchResultMessageText), 1)
1210
1211
  ])
1211
- ]))
1212
+ ], 16))
1212
1213
  : vue.createCommentVNode("", true)
1213
- ], 14, _hoisted_8)
1214
+ ], 16, _hoisted_5)
1214
1215
  ]),
1215
1216
  _: 2
1216
1217
  }, [
@@ -1228,7 +1229,11 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1228
1229
  value: $props.modelValue,
1229
1230
  suggestions: $options.visibleOptions
1230
1231
  }),
1231
- vue.createElementVNode("span", _hoisted_12, vue.toDisplayString($options.selectedMessageText), 1)
1232
+ vue.createElementVNode("span", vue.mergeProps({
1233
+ role: "status",
1234
+ "aria-live": "polite",
1235
+ class: "p-hidden-accessible"
1236
+ }, _ctx.ptm('hiddenSelectedMessage')), vue.toDisplayString($options.selectedMessageText), 17)
1232
1237
  ], 16))
1233
1238
  : vue.createCommentVNode("", true)
1234
1239
  ]),
@@ -1237,7 +1242,7 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1237
1242
  ]),
1238
1243
  _: 3
1239
1244
  }, 8, ["appendTo"])
1240
- ], 2))
1245
+ ], 16))
1241
1246
  }
1242
1247
 
1243
1248
  function styleInject(css, ref) {
@@ -1274,4 +1279,4 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
1274
1279
 
1275
1280
  return script;
1276
1281
 
1277
- })(primevue.button, primevue.icons.chevrondown, primevue.icons.spinner, primevue.icons.timescircle, primevue.overlayeventbus, primevue.portal, primevue.ripple, primevue.utils, primevue.virtualscroller, Vue);
1282
+ })(primevue.basecomponent, primevue.button, primevue.icons.chevrondown, primevue.icons.spinner, primevue.icons.timescircle, primevue.overlayeventbus, primevue.portal, primevue.ripple, primevue.utils, primevue.virtualscroller, Vue);
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.autocomplete=function(e,t,i,o,n,s,l,a,r,d){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=p(e),c=p(t),h=p(i),m=p(o),f=p(n),y=p(s),O=p(l),v=p(r),b={name:"AutoComplete",emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:String,default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,focusOnHover:!1,dirty:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":function(e){this.id=e||a.UniqueComponentId()},suggestions(){this.searching&&(a.ObjectUtils.isNotEmpty(this.suggestions)||this.$slots.empty?this.show():this.hide(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted(){this.id=this.id||a.UniqueComponentId(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.alignOverlay()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(a.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.field||this.optionLabel?a.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:e=>e,getOptionRenderKey(e,t){return(this.dataKey?a.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return!!this.optionDisabled&&a.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return a.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return a.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&a.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex=-1,e&&a.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(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":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}},onInput(e){this.searchTimeout&&clearTimeout(this.searchTimeout);let t=e.target.value;this.multiple||this.updateModel(e,t),0===t.length?(this.hide(),this.$emit("clear")):t.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((()=>{this.search(e,t,"input")}),this.delay)):this.hide()},onChange(e){if(this.forceSelection){let t=!1;if(this.visibleOptions){const i=this.visibleOptions.find((e=>this.isOptionMatched(e,this.$refs.focusInput.value||"")));void 0!==i&&(t=!0,!this.isSelected(i)&&this.onOptionSelect(e,i))}t||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus(){this.disabled||(this.focused=!0)},onMultipleContainerBlur(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick(e){this.disabled||this.searching||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||a.DomHandler.focus(this.$refs.focusInput)},onDropdownClick(e){let t;this.overlayVisible?this.hide(!0):(a.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect(e,t,i=!0){const o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[...this.modelValue||[],o])):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick(e){f.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){if(!this.overlayVisible)return;const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey(e){const t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(a.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(a.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey(e){const{currentTarget:t}=e,i=t.value.length;t.setSelectionRange(0,e.shiftKey?i:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey(e){const{currentTarget:t}=e,i=t.value.length;t.setSelectionRange(e.shiftKey?0:i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey(e){if(this.multiple){if(a.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){const t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,a.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter(e){a.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){a.ZIndexUtils.clear(e)},alignOverlay(){let e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?a.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=a.DomHandler.getOuterWidth(e)+"px",a.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new a.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!a.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched(e,t){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===t.toLocaleLowerCase(this.searchLocale)},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return a.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return a.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?a.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption(e,t){const i=this.modelValue[t],o=this.modelValue.filter(((e,i)=>i!==t)).map((e=>this.getOptionValue(e)));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:i}),this.dirty=!0,a.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=a.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const o=this.getOptionGroupChildren(t);return o&&o.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-autocomplete p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-autocomplete-dd":this.dropdown,"p-autocomplete-multiple":this.multiple,"p-inputwrapper-filled":this.modelValue||a.ObjectUtils.isNotEmpty(this.inputValue),"p-inputwrapper-focus":this.focused,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-autocomplete-input p-inputtext p-component",this.inputClass,{"p-autocomplete-dd-input":this.dropdown}]},multiContainerClass:()=>["p-autocomplete-multiple-container p-component p-inputtext"],panelStyleClass(){return["p-autocomplete-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},visibleOptions(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue(){if(this.modelValue){if("object"==typeof this.modelValue){const e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption(){return a.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey(){return this.dataKey},searchResultMessageText(){return a.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},focusedMultipleOptionId(){return-1!==this.focusedMultipleOptionIndex?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},components:{Button:u.default,VirtualScroller:v.default,Portal:y.default,ChevronDownIcon:c.default,SpinnerIcon:h.default,TimesCircleIcon:m.default},directives:{ripple:O.default}};const g=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],x=["aria-activedescendant"],I=["id","aria-label","aria-setsize","aria-posinset"],k={class:"p-autocomplete-token-label"},S={class:"p-autocomplete-input-token",role:"option"},C=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],w={role:"status","aria-live":"polite",class:"p-hidden-accessible"},V=["id"],L=["id"],D=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],M={key:0,class:"p-autocomplete-empty-message",role:"option"},$={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-autocomplete {\n display: inline-flex;\n position: relative;\n}\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-autocomplete-dd .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n.p-autocomplete-dd .p-autocomplete-input,\n.p-autocomplete-dd .p-autocomplete-multiple-container {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-autocomplete-dd .p-autocomplete-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0px;\n}\n.p-autocomplete .p-autocomplete-panel {\n min-width: 100%;\n}\n.p-autocomplete-panel {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n}\n.p-autocomplete-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-autocomplete-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-autocomplete-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n.p-autocomplete-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n.p-autocomplete-token-icon {\n cursor: pointer;\n}\n.p-autocomplete-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n.p-autocomplete-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-autocomplete {\n display: flex;\n}\n.p-fluid .p-autocomplete-dd .p-autocomplete-input {\n width: 1%;\n}\n"),b.render=function(e,t,i,o,n,s){const l=d.resolveComponent("SpinnerIcon"),a=d.resolveComponent("Button"),r=d.resolveComponent("VirtualScroller"),p=d.resolveComponent("Portal"),u=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",{ref:"container",class:d.normalizeClass(s.containerClass),onClick:t[15]||(t[15]=(...e)=>s.onContainerClick&&s.onContainerClick(...e))},[i.multiple?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("input",d.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:s.inputStyleClass,value:s.inputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":n.overlayVisible,"aria-controls":n.id+"_list","aria-activedescendant":n.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>s.onInput&&s.onInput(...e)),onChange:t[4]||(t[4]=(...e)=>s.onChange&&s.onChange(...e))},i.inputProps),null,16,g)),i.multiple?(d.openBlock(),d.createElementBlock("ul",{key:1,ref:"multiContainer",class:d.normalizeClass(s.multiContainerClass),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":n.focused?s.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=(...e)=>s.onMultipleContainerFocus&&s.onMultipleContainerFocus(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onMultipleContainerBlur&&s.onMultipleContainerBlur(...e)),onKeydown:t[12]||(t[12]=(...e)=>s.onMultipleContainerKeyDown&&s.onMultipleContainerKeyDown(...e))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.modelValue,((t,o)=>(d.openBlock(),d.createElementBlock("li",{key:o,id:n.id+"_multiple_option_"+o,class:d.normalizeClass(["p-autocomplete-token",{"p-focus":n.focusedMultipleOptionIndex===o}]),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":!0,"aria-setsize":i.modelValue.length,"aria-posinset":o+1},[d.renderSlot(e.$slots,"chip",{value:t},(()=>[d.createElementVNode("span",k,d.toDisplayString(s.getOptionLabel(t)),1)])),d.renderSlot(e.$slots,"removetokenicon",{class:"p-autocomplete-token-icon",onClick:e=>s.removeOption(e,o)},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i.removeTokenIcon?"span":"TimesCircleIcon"),{class:d.normalizeClass(["p-autocomplete-token-icon",i.removeTokenIcon]),onClick:e=>s.removeOption(e,o),"aria-hidden":"true"},null,8,["class","onClick"]))]))],10,I)))),128)),d.createElementVNode("li",S,[d.createElementVNode("input",d.mergeProps({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":n.overlayVisible,"aria-controls":n.id+"_list","aria-activedescendant":n.focused?s.focusedOptionId:void 0,onFocus:t[5]||(t[5]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[6]||(t[6]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[7]||(t[7]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[8]||(t[8]=(...e)=>s.onInput&&s.onInput(...e)),onChange:t[9]||(t[9]=(...e)=>s.onChange&&s.onChange(...e))},i.inputProps),null,16,C)])],42,x)):d.createCommentVNode("",!0),n.searching?d.renderSlot(e.$slots,"loadingicon",{key:2},(()=>[i.loadingIcon?(d.openBlock(),d.createElementBlock("i",{key:0,class:d.normalizeClass(["p-autocomplete-loader pi-spin",i.loadingIcon]),"aria-hidden":"true"},null,2)):(d.openBlock(),d.createBlock(l,{key:1,class:"p-autocomplete-loader",spin:"","aria-hidden":"true"}))])):d.createCommentVNode("",!0),i.dropdown?(d.openBlock(),d.createBlock(a,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:d.normalizeClass(["p-autocomplete-dropdown",i.dropdownClass]),disabled:i.disabled,"aria-hidden":"true",onClick:s.onDropdownClick},{icon:d.withCtx((()=>[d.renderSlot(e.$slots,"dropdownicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i.dropdownIcon?"span":"ChevronDownIcon"),{class:d.normalizeClass(i.dropdownIcon)},null,8,["class"]))]))])),_:3},8,["class","disabled","onClick"])):d.createCommentVNode("",!0),d.createElementVNode("span",w,d.toDisplayString(s.searchResultMessageText),1),d.createVNode(p,{appendTo:i.appendTo},{default:d.withCtx((()=>[d.createVNode(d.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:d.withCtx((()=>[n.overlayVisible?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,ref:s.overlayRef,class:s.panelStyleClass,style:{...i.panelStyle,"max-height":s.virtualScrollerDisabled?i.scrollHeight:""},onClick:t[13]||(t[13]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e)),onKeydown:t[14]||(t[14]=(...e)=>s.onOverlayKeyDown&&s.onOverlayKeyDown(...e))},i.panelProps),[d.renderSlot(e.$slots,"header",{value:i.modelValue,suggestions:s.visibleOptions}),d.createVNode(r,d.mergeProps({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{style:{height:i.scrollHeight},items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled}),d.createSlots({content:d.withCtx((({styleClass:t,contentRef:i,items:o,getItemOptions:l,contentStyle:a,itemSize:r})=>[d.createElementVNode("ul",{ref:e=>s.listRef(e,i),id:n.id+"_list",class:d.normalizeClass(["p-autocomplete-items",t]),style:d.normalizeStyle(a),role:"listbox"},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o,((t,i)=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,l))},[s.isOptionGroup(t)?(d.openBlock(),d.createElementBlock("li",{key:0,id:n.id+"_"+s.getOptionIndex(i,l),style:d.normalizeStyle({height:r?r+"px":void 0}),class:"p-autocomplete-item-group",role:"option"},[d.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:s.getOptionIndex(i,l)},(()=>[d.createTextVNode(d.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]))],12,L)):d.withDirectives((d.openBlock(),d.createElementBlock("li",{key:1,id:n.id+"_"+s.getOptionIndex(i,l),style:d.normalizeStyle({height:r?r+"px":void 0}),class:d.normalizeClass(["p-autocomplete-item",{"p-highlight":s.isSelected(t),"p-focus":n.focusedOptionIndex===s.getOptionIndex(i,l),"p-disabled":s.isOptionDisabled(t)}]),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,l)),onClick:e=>s.onOptionSelect(e,t),onMousemove:e=>s.onOptionMouseMove(e,s.getOptionIndex(i,l))},[e.$slots.option?d.renderSlot(e.$slots,"option",{key:0,option:t,index:s.getOptionIndex(i,l)},(()=>[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)])):d.renderSlot(e.$slots,"item",{key:1,item:t,index:s.getOptionIndex(i,l)},(()=>[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)]))],46,D)),[[u]])],64)))),128)),!o||o&&0===o.length?(d.openBlock(),d.createElementBlock("li",M,[d.renderSlot(e.$slots,"empty",{},(()=>[d.createTextVNode(d.toDisplayString(s.searchResultMessageText),1)]))])):d.createCommentVNode("",!0)],14,V)])),_:2},[e.$slots.loader?{name:"loader",fn:d.withCtx((({options:t})=>[d.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["style","items","disabled"]),d.renderSlot(e.$slots,"footer",{value:i.modelValue,suggestions:s.visibleOptions}),d.createElementVNode("span",$,d.toDisplayString(s.selectedMessageText),1)],16)):d.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)},b}(primevue.button,primevue.icons.chevrondown,primevue.icons.spinner,primevue.icons.timescircle,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.autocomplete=function(e,t,i,o,n,s,l,r,a,p,d){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(e),h=u(t),m=u(i),f=u(o),y=u(n),g=u(s),O=u(l),v=u(r),b=u(p),x={name:"AutoComplete",extends:c.default,emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:String,default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,focusOnHover:!1,dirty:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":function(e){this.id=e||a.UniqueComponentId()},suggestions(){this.searching&&(a.ObjectUtils.isNotEmpty(this.suggestions)||this.$slots.empty?this.show():this.hide(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted(){this.id=this.id||a.UniqueComponentId(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.alignOverlay()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(a.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.field||this.optionLabel?a.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:e=>e,getOptionRenderKey(e,t){return(this.dataKey?a.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions(e,t,i,o){return this.ptm(o,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled(e){return!!this.optionDisabled&&a.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return a.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return a.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&a.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex=-1,e&&a.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(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":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}},onInput(e){this.searchTimeout&&clearTimeout(this.searchTimeout);let t=e.target.value;this.multiple||this.updateModel(e,t),0===t.length?(this.hide(),this.$emit("clear")):t.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((()=>{this.search(e,t,"input")}),this.delay)):this.hide()},onChange(e){if(this.forceSelection){let t=!1;if(this.visibleOptions){const i=this.visibleOptions.find((e=>this.isOptionMatched(e,this.$refs.focusInput.value||"")));void 0!==i&&(t=!0,!this.isSelected(i)&&this.onOptionSelect(e,i))}t||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus(){this.disabled||(this.focused=!0)},onMultipleContainerBlur(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick(e){this.disabled||this.searching||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||a.DomHandler.focus(this.$refs.focusInput)},onDropdownClick(e){let t;this.overlayVisible?this.hide(!0):(a.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect(e,t,i=!0){const o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[...this.modelValue||[],o])):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick(e){g.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){if(!this.overlayVisible)return;const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey(e){const t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(a.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(a.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey(e){const{currentTarget:t}=e,i=t.value.length;t.setSelectionRange(0,e.shiftKey?i:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey(e){const{currentTarget:t}=e,i=t.value.length;t.setSelectionRange(e.shiftKey?0:i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey(e){if(this.multiple){if(a.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){const t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,a.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter(e){a.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){a.ZIndexUtils.clear(e)},alignOverlay(){let e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?a.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=a.DomHandler.getOuterWidth(e)+"px",a.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new a.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!a.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched(e,t){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===t.toLocaleLowerCase(this.searchLocale)},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return a.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return a.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?a.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption(e,t){const i=this.modelValue[t],o=this.modelValue.filter(((e,i)=>i!==t)).map((e=>this.getOptionValue(e)));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:i}),this.dirty=!0,a.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=a.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const o=this.getOptionGroupChildren(t);return o&&o.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-autocomplete p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-autocomplete-dd":this.dropdown,"p-autocomplete-multiple":this.multiple,"p-inputwrapper-filled":this.modelValue||a.ObjectUtils.isNotEmpty(this.inputValue),"p-inputwrapper-focus":this.focused,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-autocomplete-input p-inputtext p-component",this.inputClass,{"p-autocomplete-dd-input":this.dropdown}]},multiContainerClass:()=>["p-autocomplete-multiple-container p-component p-inputtext"],panelStyleClass(){return["p-autocomplete-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},visibleOptions(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue(){if(this.modelValue){if("object"==typeof this.modelValue){const e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption(){return a.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey(){return this.dataKey},searchResultMessageText(){return a.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},focusedMultipleOptionId(){return-1!==this.focusedMultipleOptionIndex?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},components:{Button:h.default,VirtualScroller:b.default,Portal:O.default,ChevronDownIcon:m.default,SpinnerIcon:f.default,TimesCircleIcon:y.default},directives:{ripple:v.default}};const I=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],k=["aria-activedescendant"],S=["id","aria-label","aria-setsize","aria-posinset"],w=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],C=["id"],V=["id"],L=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"];return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-autocomplete {\n display: inline-flex;\n position: relative;\n}\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-autocomplete-dd .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n.p-autocomplete-dd .p-autocomplete-input,\n.p-autocomplete-dd .p-autocomplete-multiple-container {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-autocomplete-dd .p-autocomplete-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0px;\n}\n.p-autocomplete .p-autocomplete-panel {\n min-width: 100%;\n}\n.p-autocomplete-panel {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n}\n.p-autocomplete-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-autocomplete-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-autocomplete-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n.p-autocomplete-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n.p-autocomplete-token-icon {\n cursor: pointer;\n}\n.p-autocomplete-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n.p-autocomplete-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-autocomplete {\n display: flex;\n}\n.p-fluid .p-autocomplete-dd .p-autocomplete-input {\n width: 1%;\n}\n"),x.render=function(e,t,i,o,n,s){const l=d.resolveComponent("SpinnerIcon"),r=d.resolveComponent("Button"),a=d.resolveComponent("VirtualScroller"),p=d.resolveComponent("Portal"),u=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",d.mergeProps({ref:"container",class:s.containerClass,onClick:t[15]||(t[15]=(...e)=>s.onContainerClick&&s.onContainerClick(...e))},e.ptm("root")),[i.multiple?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("input",d.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:s.inputStyleClass,value:s.inputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":n.overlayVisible,"aria-controls":n.id+"_list","aria-activedescendant":n.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>s.onInput&&s.onInput(...e)),onChange:t[4]||(t[4]=(...e)=>s.onChange&&s.onChange(...e))},{...i.inputProps,...e.ptm("input")}),null,16,I)),i.multiple?(d.openBlock(),d.createElementBlock("ul",d.mergeProps({key:1,ref:"multiContainer",class:s.multiContainerClass,tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":n.focused?s.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=(...e)=>s.onMultipleContainerFocus&&s.onMultipleContainerFocus(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onMultipleContainerBlur&&s.onMultipleContainerBlur(...e)),onKeydown:t[12]||(t[12]=(...e)=>s.onMultipleContainerKeyDown&&s.onMultipleContainerKeyDown(...e))},e.ptm("container")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.modelValue,((t,o)=>(d.openBlock(),d.createElementBlock("li",d.mergeProps({key:o,id:n.id+"_multiple_option_"+o,class:["p-autocomplete-token",{"p-focus":n.focusedMultipleOptionIndex===o}],role:"option","aria-label":s.getOptionLabel(t),"aria-selected":!0,"aria-setsize":i.modelValue.length,"aria-posinset":o+1},e.ptm("token")),[d.renderSlot(e.$slots,"chip",{value:t},(()=>[d.createElementVNode("span",d.mergeProps({class:"p-autocomplete-token-label"},e.ptm("tokenLabel")),d.toDisplayString(s.getOptionLabel(t)),17)])),d.renderSlot(e.$slots,"removetokenicon",{class:"p-autocomplete-token-icon",onClick:e=>s.removeOption(e,o)},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i.removeTokenIcon?"span":"TimesCircleIcon"),d.mergeProps({class:["p-autocomplete-token-icon",i.removeTokenIcon],onClick:e=>s.removeOption(e,o),"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]))],16,S)))),128)),d.createElementVNode("li",d.mergeProps({class:"p-autocomplete-input-token",role:"option"},e.ptm("token")),[d.createElementVNode("input",d.mergeProps({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":n.overlayVisible,"aria-controls":n.id+"_list","aria-activedescendant":n.focused?s.focusedOptionId:void 0,onFocus:t[5]||(t[5]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[6]||(t[6]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[7]||(t[7]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[8]||(t[8]=(...e)=>s.onInput&&s.onInput(...e)),onChange:t[9]||(t[9]=(...e)=>s.onChange&&s.onChange(...e))},{...i.inputProps,...e.ptm("input")}),null,16,w)],16)],16,k)):d.createCommentVNode("",!0),n.searching?d.renderSlot(e.$slots,"loadingicon",{key:2},(()=>[i.loadingIcon?(d.openBlock(),d.createElementBlock("i",d.mergeProps({key:0,class:["p-autocomplete-loader pi-spin",i.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(d.openBlock(),d.createBlock(l,d.mergeProps({key:1,class:"p-autocomplete-loader",spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16))])):d.createCommentVNode("",!0),i.dropdown?(d.openBlock(),d.createBlock(r,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:d.normalizeClass(["p-autocomplete-dropdown",i.dropdownClass]),disabled:i.disabled,"aria-hidden":"true",onClick:s.onDropdownClick,pt:e.ptm("dropdownButton")},{icon:d.withCtx((()=>[d.renderSlot(e.$slots,"dropdownicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i.dropdownIcon?"span":"ChevronDownIcon"),d.mergeProps({class:i.dropdownIcon},e.ptm("dropdownButton").icon),null,16,["class"]))]))])),_:3},8,["class","disabled","onClick","pt"])):d.createCommentVNode("",!0),d.createElementVNode("span",d.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult")),d.toDisplayString(s.searchResultMessageText),17),d.createVNode(p,{appendTo:i.appendTo},{default:d.withCtx((()=>[d.createVNode(d.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:d.withCtx((()=>[n.overlayVisible?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,ref:s.overlayRef,class:s.panelStyleClass,style:{...i.panelStyle,"max-height":s.virtualScrollerDisabled?i.scrollHeight:""},onClick:t[13]||(t[13]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e)),onKeydown:t[14]||(t[14]=(...e)=>s.onOverlayKeyDown&&s.onOverlayKeyDown(...e))},{...i.panelProps,...e.ptm("panel")}),[d.renderSlot(e.$slots,"header",{value:i.modelValue,suggestions:s.visibleOptions}),d.createVNode(a,d.mergeProps({ref:s.virtualScrollerRef},{...i.virtualScrollerOptions,...e.ptm("virtualScroller")},{style:{height:i.scrollHeight},items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled}),d.createSlots({content:d.withCtx((({styleClass:t,contentRef:i,items:o,getItemOptions:l,contentStyle:r,itemSize:a})=>[d.createElementVNode("ul",d.mergeProps({ref:e=>s.listRef(e,i),id:n.id+"_list",class:["p-autocomplete-items",t],style:r,role:"listbox"},e.ptm("list")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o,((t,i)=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,l))},[s.isOptionGroup(t)?(d.openBlock(),d.createElementBlock("li",d.mergeProps({key:0,id:n.id+"_"+s.getOptionIndex(i,l),style:{height:a?a+"px":void 0},class:"p-autocomplete-item-group",role:"option"},e.ptm("itemGroup")),[d.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:s.getOptionIndex(i,l)},(()=>[d.createTextVNode(d.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]))],16,V)):d.withDirectives((d.openBlock(),d.createElementBlock("li",d.mergeProps({key:1,id:n.id+"_"+s.getOptionIndex(i,l),style:{height:a?a+"px":void 0},class:["p-autocomplete-item",{"p-highlight":s.isSelected(t),"p-focus":n.focusedOptionIndex===s.getOptionIndex(i,l),"p-disabled":s.isOptionDisabled(t)}],role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,l)),onClick:e=>s.onOptionSelect(e,t),onMousemove:e=>s.onOptionMouseMove(e,s.getOptionIndex(i,l))},s.getPTOptions(t,l,i,"item")),[e.$slots.option?d.renderSlot(e.$slots,"option",{key:0,option:t,index:s.getOptionIndex(i,l)},(()=>[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)])):d.renderSlot(e.$slots,"item",{key:1,item:t,index:s.getOptionIndex(i,l)},(()=>[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)]))],16,L)),[[u]])],64)))),128)),!o||o&&0===o.length?(d.openBlock(),d.createElementBlock("li",d.mergeProps({key:0,class:"p-autocomplete-empty-message",role:"option"},e.ptm("emptyMessage")),[d.renderSlot(e.$slots,"empty",{},(()=>[d.createTextVNode(d.toDisplayString(s.searchResultMessageText),1)]))],16)):d.createCommentVNode("",!0)],16,C)])),_:2},[e.$slots.loader?{name:"loader",fn:d.withCtx((({options:t})=>[d.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["style","items","disabled"]),d.renderSlot(e.$slots,"footer",{value:i.modelValue,suggestions:s.visibleOptions}),d.createElementVNode("span",d.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage")),d.toDisplayString(s.selectedMessageText),17)],16)):d.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],16)},x}(primevue.basecomponent,primevue.button,primevue.icons.chevrondown,primevue.icons.spinner,primevue.icons.timescircle,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
@@ -1,5 +1,6 @@
1
1
  <script>
2
2
  import { ObjectUtils } from 'primevue/utils';
3
+ import { mergeProps } from 'vue';
3
4
 
4
5
  export default {
5
6
  name: 'BaseComponent',
@@ -10,17 +11,22 @@ export default {
10
11
  }
11
12
  },
12
13
  methods: {
13
- getPTItem(obj = {}, key = '') {
14
+ getOption(obj = {}, key = '') {
14
15
  const fKey = ObjectUtils.convertToFlatCase(key);
15
16
 
16
17
  return obj[Object.keys(obj).find((k) => ObjectUtils.convertToFlatCase(k) === fKey) || ''];
17
18
  },
18
19
  getPTValue(obj = {}, key = '', params = {}) {
19
- const self = ObjectUtils.getItemValue(this.getPTItem(obj, key), params);
20
- const globalComponentPT = this.getPTItem(this.$primevue.config.pt, this.$.type.name);
21
- const global = ObjectUtils.getItemValue(this.getPTItem(globalComponentPT, key), params);
20
+ const self = ObjectUtils.getItemValue(this.getOption(obj, key), params);
21
+ const globalPT = ObjectUtils.getItemValue(this.getOption(this.defaultPT, key), params);
22
+ const merged = mergeProps(self, globalPT);
22
23
 
23
- return { ...global, ...self };
24
+ return merged;
25
+ /*
26
+ * @todo: The 'class' option in self can always be more powerful to style the component easily.
27
+ *
28
+ * return self && self['class'] ? { ...merged, ...{ class: self['class'] } } : merged;
29
+ */
24
30
  },
25
31
  ptm(key = '', params = {}) {
26
32
  return this.getPTValue(this.pt, key, { props: this.$props, state: this.$data, ...params });
@@ -28,6 +34,14 @@ export default {
28
34
  ptmo(obj = {}, key = '', params = {}) {
29
35
  return this.getPTValue(obj, key, params);
30
36
  }
37
+ },
38
+ computed: {
39
+ defaultPT() {
40
+ return ObjectUtils.getItemValue(this.getOption(this.$primevue.config.pt, this.$.type.name), this.defaultsParams);
41
+ },
42
+ defaultsParams() {
43
+ return { instance: this.$ };
44
+ }
31
45
  }
32
46
  };
33
47
  </script>
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var utils = require('primevue/utils');
4
+ var vue = require('vue');
4
5
 
5
6
  var script = {
6
7
  name: 'BaseComponent',
@@ -11,17 +12,22 @@ var script = {
11
12
  }
12
13
  },
13
14
  methods: {
14
- getPTItem(obj = {}, key = '') {
15
+ getOption(obj = {}, key = '') {
15
16
  const fKey = utils.ObjectUtils.convertToFlatCase(key);
16
17
 
17
18
  return obj[Object.keys(obj).find((k) => utils.ObjectUtils.convertToFlatCase(k) === fKey) || ''];
18
19
  },
19
20
  getPTValue(obj = {}, key = '', params = {}) {
20
- const self = utils.ObjectUtils.getItemValue(this.getPTItem(obj, key), params);
21
- const globalComponentPT = this.getPTItem(this.$primevue.config.pt, this.$.type.name);
22
- const global = utils.ObjectUtils.getItemValue(this.getPTItem(globalComponentPT, key), params);
21
+ const self = utils.ObjectUtils.getItemValue(this.getOption(obj, key), params);
22
+ const globalPT = utils.ObjectUtils.getItemValue(this.getOption(this.defaultPT, key), params);
23
+ const merged = vue.mergeProps(self, globalPT);
23
24
 
24
- return { ...global, ...self };
25
+ return merged;
26
+ /*
27
+ * @todo: The 'class' option in self can always be more powerful to style the component easily.
28
+ *
29
+ * return self && self['class'] ? { ...merged, ...{ class: self['class'] } } : merged;
30
+ */
25
31
  },
26
32
  ptm(key = '', params = {}) {
27
33
  return this.getPTValue(this.pt, key, { props: this.$props, state: this.$data, ...params });
@@ -29,6 +35,14 @@ var script = {
29
35
  ptmo(obj = {}, key = '', params = {}) {
30
36
  return this.getPTValue(obj, key, params);
31
37
  }
38
+ },
39
+ computed: {
40
+ defaultPT() {
41
+ return utils.ObjectUtils.getItemValue(this.getOption(this.$primevue.config.pt, this.$.type.name), this.defaultsParams);
42
+ },
43
+ defaultsParams() {
44
+ return { instance: this.$ };
45
+ }
32
46
  }
33
47
  };
34
48
 
@@ -1 +1 @@
1
- "use strict";var t=require("primevue/utils"),e={name:"BaseComponent",props:{pt:{type:Object,default:void 0}},methods:{getPTItem(e={},s=""){const i=t.ObjectUtils.convertToFlatCase(s);return e[Object.keys(e).find((e=>t.ObjectUtils.convertToFlatCase(e)===i))||""]},getPTValue(e={},s="",i={}){const r=t.ObjectUtils.getItemValue(this.getPTItem(e,s),i),a=this.getPTItem(this.$primevue.config.pt,this.$.type.name);return{...t.ObjectUtils.getItemValue(this.getPTItem(a,s),i),...r}},ptm(t="",e={}){return this.getPTValue(this.pt,t,{props:this.$props,state:this.$data,...e})},ptmo(t={},e="",s={}){return this.getPTValue(t,e,s)}}};module.exports=e;
1
+ "use strict";var t=require("primevue/utils"),e=require("vue"),s={name:"BaseComponent",props:{pt:{type:Object,default:void 0}},methods:{getOption(e={},s=""){const i=t.ObjectUtils.convertToFlatCase(s);return e[Object.keys(e).find((e=>t.ObjectUtils.convertToFlatCase(e)===i))||""]},getPTValue(s={},i="",r={}){const a=t.ObjectUtils.getItemValue(this.getOption(s,i),r),u=t.ObjectUtils.getItemValue(this.getOption(this.defaultPT,i),r);return e.mergeProps(a,u)},ptm(t="",e={}){return this.getPTValue(this.pt,t,{props:this.$props,state:this.$data,...e})},ptmo(t={},e="",s={}){return this.getPTValue(t,e,s)}},computed:{defaultPT(){return t.ObjectUtils.getItemValue(this.getOption(this.$primevue.config.pt,this.$.type.name),this.defaultsParams)},defaultsParams(){return{instance:this.$}}}};module.exports=s;