primevue 3.22.4 → 3.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +13 -13
  3. package/accordion/Accordion.d.ts +53 -21
  4. package/accordiontab/AccordionTab.d.ts +33 -12
  5. package/autocomplete/AutoComplete.d.ts +111 -84
  6. package/avatar/Avatar.d.ts +38 -25
  7. package/avatar/Avatar.vue +1 -1
  8. package/avatar/avatar.cjs.js +2 -1
  9. package/avatar/avatar.cjs.min.js +1 -1
  10. package/avatar/avatar.esm.js +2 -1
  11. package/avatar/avatar.esm.min.js +1 -1
  12. package/avatar/avatar.js +2 -1
  13. package/avatar/avatar.min.js +1 -1
  14. package/avatargroup/AvatarGroup.d.ts +30 -14
  15. package/badge/Badge.d.ts +34 -20
  16. package/badge/Badge.vue +16 -5
  17. package/badge/badge.cjs.js +15 -5
  18. package/badge/badge.cjs.min.js +1 -1
  19. package/badge/badge.esm.js +15 -5
  20. package/badge/badge.esm.min.js +1 -1
  21. package/badge/badge.js +16 -7
  22. package/badge/badge.min.js +1 -1
  23. package/badgedirective/BadgeDirective.d.ts +60 -1
  24. package/blockui/BlockUI.d.ts +36 -16
  25. package/breadcrumb/Breadcrumb.d.ts +37 -20
  26. package/breadcrumb/Breadcrumb.vue +1 -1
  27. package/breadcrumb/breadcrumb.cjs.js +2 -1
  28. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  29. package/breadcrumb/breadcrumb.esm.js +2 -1
  30. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  31. package/breadcrumb/breadcrumb.js +2 -1
  32. package/breadcrumb/breadcrumb.min.js +1 -1
  33. package/button/Button.d.ts +74 -17
  34. package/button/Button.vue +51 -8
  35. package/button/button.cjs.js +51 -8
  36. package/button/button.cjs.min.js +1 -1
  37. package/button/button.esm.js +51 -8
  38. package/button/button.esm.min.js +1 -1
  39. package/button/button.js +51 -8
  40. package/button/button.min.js +1 -1
  41. package/calendar/Calendar.d.ts +112 -77
  42. package/calendar/Calendar.vue +4 -4
  43. package/calendar/calendar.cjs.js +4 -4
  44. package/calendar/calendar.cjs.min.js +1 -1
  45. package/calendar/calendar.esm.js +4 -4
  46. package/calendar/calendar.esm.min.js +1 -1
  47. package/calendar/calendar.js +4 -4
  48. package/calendar/calendar.min.js +1 -1
  49. package/card/Card.d.ts +35 -15
  50. package/carousel/Carousel.d.ts +47 -29
  51. package/cascadeselect/CascadeSelect.d.ts +70 -59
  52. package/chart/Chart.d.ts +41 -23
  53. package/checkbox/Checkbox.d.ts +39 -15
  54. package/checkbox/Checkbox.vue +1 -1
  55. package/checkbox/checkbox.cjs.js +1 -1
  56. package/checkbox/checkbox.cjs.min.js +1 -1
  57. package/checkbox/checkbox.esm.js +1 -1
  58. package/checkbox/checkbox.esm.min.js +1 -1
  59. package/checkbox/checkbox.js +1 -1
  60. package/checkbox/checkbox.min.js +1 -1
  61. package/chip/Chip.d.ts +35 -14
  62. package/chips/Chips.d.ts +45 -20
  63. package/colorpicker/ColorPicker.d.ts +46 -28
  64. package/column/Column.d.ts +81 -65
  65. package/columngroup/ColumnGroup.d.ts +29 -13
  66. package/config/PrimeVue.d.ts +1 -2
  67. package/config/config.cjs.js +20 -2
  68. package/config/config.cjs.min.js +1 -1
  69. package/config/config.esm.js +20 -2
  70. package/config/config.esm.min.js +1 -1
  71. package/config/config.js +20 -2
  72. package/config/config.min.js +1 -1
  73. package/confirmationoptions/ConfirmationOptions.d.ts +15 -6
  74. package/confirmationservice/ConfirmationService.d.ts +11 -0
  75. package/confirmdialog/ConfirmDialog.d.ts +35 -17
  76. package/confirmpopup/ConfirmPopup.d.ts +32 -17
  77. package/contextmenu/ContextMenu.d.ts +51 -35
  78. package/core/core.js +368 -121
  79. package/core/core.min.js +8 -8
  80. package/datatable/DataTable.d.ts +248 -205
  81. package/datatable/DataTable.vue +78 -117
  82. package/datatable/TableBody.vue +3 -17
  83. package/datatable/datatable.cjs.js +73 -67
  84. package/datatable/datatable.cjs.min.js +1 -1
  85. package/datatable/datatable.esm.js +73 -67
  86. package/datatable/datatable.esm.min.js +1 -1
  87. package/datatable/datatable.js +73 -67
  88. package/datatable/datatable.min.js +1 -1
  89. package/dataview/DataView.d.ts +65 -47
  90. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +33 -13
  91. package/deferredcontent/DeferredContent.d.ts +30 -13
  92. package/dialog/Dialog.d.ts +67 -46
  93. package/dialog/Dialog.vue +1 -1
  94. package/dialog/dialog.cjs.js +1 -1
  95. package/dialog/dialog.cjs.min.js +1 -1
  96. package/dialog/dialog.esm.js +1 -1
  97. package/dialog/dialog.esm.min.js +1 -1
  98. package/dialog/dialog.js +1 -1
  99. package/dialog/dialog.min.js +1 -1
  100. package/dialogservice/DialogService.d.ts +13 -2
  101. package/divider/Divider.d.ts +35 -30
  102. package/dock/Dock.d.ts +49 -36
  103. package/dropdown/Dropdown.d.ts +90 -82
  104. package/dropdown/Dropdown.vue +1 -1
  105. package/dropdown/dropdown.cjs.js +1 -1
  106. package/dropdown/dropdown.cjs.min.js +1 -1
  107. package/dropdown/dropdown.esm.js +1 -1
  108. package/dropdown/dropdown.esm.min.js +1 -1
  109. package/dropdown/dropdown.js +1 -1
  110. package/dropdown/dropdown.min.js +1 -1
  111. package/dynamicdialog/DynamicDialog.d.ts +30 -10
  112. package/dynamicdialog/DynamicDialog.vue +2 -2
  113. package/dynamicdialog/dynamicdialog.cjs.js +3 -3
  114. package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
  115. package/dynamicdialog/dynamicdialog.esm.js +2 -2
  116. package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
  117. package/dynamicdialog/dynamicdialog.js +3 -3
  118. package/dynamicdialog/dynamicdialog.min.js +1 -1
  119. package/dynamicdialogoptions/DynamicDialogOptions.d.ts +28 -8
  120. package/editor/Editor.d.ts +48 -17
  121. package/fieldset/Fieldset.d.ts +43 -16
  122. package/fileupload/FileUpload.d.ts +101 -47
  123. package/focustrap/FocusTrap.d.ts +42 -3
  124. package/fullcalendar/FullCalendar.d.ts +1 -1
  125. package/galleria/Galleria.d.ts +64 -40
  126. package/image/Image.d.ts +33 -14
  127. package/inlinemessage/InlineMessage.d.ts +31 -17
  128. package/inplace/Inplace.d.ts +41 -18
  129. package/inputmask/InputMask.d.ts +41 -17
  130. package/inputnumber/InputNumber.d.ts +60 -41
  131. package/inputswitch/InputSwitch.d.ts +35 -15
  132. package/inputswitch/InputSwitch.vue +1 -0
  133. package/inputswitch/inputswitch.cjs.js +1 -1
  134. package/inputswitch/inputswitch.cjs.min.js +1 -1
  135. package/inputswitch/inputswitch.esm.js +1 -1
  136. package/inputswitch/inputswitch.esm.min.js +1 -1
  137. package/inputswitch/inputswitch.js +1 -1
  138. package/inputswitch/inputswitch.min.js +1 -1
  139. package/inputtext/InputText.d.ts +32 -12
  140. package/knob/Knob.d.ts +47 -21
  141. package/listbox/Listbox.d.ts +81 -60
  142. package/megamenu/MegaMenu.d.ts +42 -27
  143. package/megamenu/MegaMenu.vue +17 -0
  144. package/megamenu/megamenu.cjs.js +1 -1
  145. package/megamenu/megamenu.cjs.min.js +1 -1
  146. package/megamenu/megamenu.esm.js +1 -1
  147. package/megamenu/megamenu.esm.min.js +1 -1
  148. package/megamenu/megamenu.js +1 -1
  149. package/megamenu/megamenu.min.js +1 -1
  150. package/menu/Menu.d.ts +57 -28
  151. package/menu/Menu.vue +6 -0
  152. package/menu/menu.cjs.js +26 -8
  153. package/menu/menu.cjs.min.js +1 -1
  154. package/menu/menu.esm.js +27 -9
  155. package/menu/menu.esm.min.js +1 -1
  156. package/menu/menu.js +26 -8
  157. package/menu/menu.min.js +1 -1
  158. package/menubar/Menubar.d.ts +36 -19
  159. package/menuitem/MenuItem.d.ts +22 -10
  160. package/message/Message.d.ts +40 -21
  161. package/multiselect/MultiSelect.d.ts +111 -90
  162. package/orderlist/OrderList.d.ts +51 -23
  163. package/organizationchart/OrganizationChart.d.ts +43 -26
  164. package/overlaypanel/OverlayPanel.d.ts +46 -26
  165. package/package.json +2 -2
  166. package/paginator/Paginator.d.ts +49 -24
  167. package/panel/Panel.d.ts +39 -14
  168. package/panelmenu/PanelMenu.d.ts +49 -21
  169. package/password/Password.d.ts +47 -28
  170. package/picklist/PickList.d.ts +74 -33
  171. package/progressbar/ProgressBar.d.ts +34 -17
  172. package/progressspinner/ProgressSpinner.d.ts +32 -13
  173. package/radiobutton/RadioButton.d.ts +32 -14
  174. package/rating/Rating.d.ts +51 -25
  175. package/resources/themes/arya-blue/theme.css +34 -11
  176. package/resources/themes/arya-green/theme.css +34 -11
  177. package/resources/themes/arya-orange/theme.css +34 -11
  178. package/resources/themes/arya-purple/theme.css +34 -11
  179. package/resources/themes/bootstrap4-dark-blue/theme.css +34 -11
  180. package/resources/themes/bootstrap4-dark-purple/theme.css +34 -11
  181. package/resources/themes/bootstrap4-light-blue/theme.css +34 -11
  182. package/resources/themes/bootstrap4-light-purple/theme.css +34 -11
  183. package/resources/themes/fluent-light/theme.css +34 -11
  184. package/resources/themes/lara-dark-blue/theme.css +34 -11
  185. package/resources/themes/lara-dark-indigo/theme.css +34 -11
  186. package/resources/themes/lara-dark-purple/theme.css +34 -11
  187. package/resources/themes/lara-dark-teal/theme.css +34 -11
  188. package/resources/themes/lara-light-blue/theme.css +34 -11
  189. package/resources/themes/lara-light-indigo/theme.css +34 -11
  190. package/resources/themes/lara-light-purple/theme.css +34 -11
  191. package/resources/themes/lara-light-teal/theme.css +34 -11
  192. package/resources/themes/luna-amber/theme.css +34 -11
  193. package/resources/themes/luna-blue/theme.css +34 -11
  194. package/resources/themes/luna-green/theme.css +34 -11
  195. package/resources/themes/luna-pink/theme.css +34 -11
  196. package/resources/themes/md-dark-deeppurple/theme.css +34 -11
  197. package/resources/themes/md-dark-indigo/theme.css +34 -11
  198. package/resources/themes/md-light-deeppurple/theme.css +34 -11
  199. package/resources/themes/md-light-indigo/theme.css +34 -11
  200. package/resources/themes/mdc-dark-deeppurple/theme.css +34 -11
  201. package/resources/themes/mdc-dark-indigo/theme.css +34 -11
  202. package/resources/themes/mdc-light-deeppurple/theme.css +34 -11
  203. package/resources/themes/mdc-light-indigo/theme.css +34 -11
  204. package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
  205. package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
  206. package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
  207. package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
  208. package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
  209. package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
  210. package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
  211. package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
  212. package/resources/themes/mira/theme.css +6089 -0
  213. package/resources/themes/nano/theme.css +5861 -0
  214. package/resources/themes/nova/theme.css +34 -11
  215. package/resources/themes/nova-accent/theme.css +34 -11
  216. package/resources/themes/nova-alt/theme.css +34 -11
  217. package/resources/themes/nova-vue/theme.css +34 -11
  218. package/resources/themes/rhea/theme.css +34 -11
  219. package/resources/themes/saga-blue/theme.css +34 -11
  220. package/resources/themes/saga-green/theme.css +34 -11
  221. package/resources/themes/saga-orange/theme.css +34 -11
  222. package/resources/themes/saga-purple/theme.css +34 -11
  223. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
  224. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
  225. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
  226. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
  227. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
  228. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
  229. package/resources/themes/soho-dark/theme.css +5854 -0
  230. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
  231. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
  232. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
  233. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
  234. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
  235. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
  236. package/resources/themes/soho-light/theme.css +5908 -0
  237. package/resources/themes/tailwind-light/theme.css +34 -11
  238. package/resources/themes/vela-blue/theme.css +34 -11
  239. package/resources/themes/vela-green/theme.css +34 -11
  240. package/resources/themes/vela-orange/theme.css +34 -11
  241. package/resources/themes/vela-purple/theme.css +34 -11
  242. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
  243. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
  244. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
  245. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
  246. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
  247. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
  248. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
  249. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
  250. package/resources/themes/viva-dark/theme.css +6016 -0
  251. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
  252. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
  253. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
  254. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
  255. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
  256. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
  257. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
  258. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
  259. package/resources/themes/viva-light/theme.css +6016 -0
  260. package/ripple/Ripple.d.ts +24 -1
  261. package/row/Row.d.ts +28 -10
  262. package/scrollpanel/ScrollPanel.d.ts +29 -11
  263. package/scrolltop/ScrollTop.d.ts +35 -18
  264. package/selectbutton/SelectButton.d.ts +47 -27
  265. package/sidebar/Sidebar.d.ts +46 -27
  266. package/skeleton/Skeleton.d.ts +36 -22
  267. package/slider/Slider.d.ts +46 -23
  268. package/speeddial/SpeedDial.d.ts +64 -51
  269. package/splitbutton/SplitButton.d.ts +73 -24
  270. package/splitbutton/SplitButton.vue +41 -1
  271. package/splitbutton/splitbutton.cjs.js +43 -3
  272. package/splitbutton/splitbutton.cjs.min.js +1 -1
  273. package/splitbutton/splitbutton.esm.js +43 -3
  274. package/splitbutton/splitbutton.esm.min.js +1 -1
  275. package/splitbutton/splitbutton.js +43 -3
  276. package/splitbutton/splitbutton.min.js +1 -1
  277. package/splitter/Splitter.d.ts +49 -30
  278. package/splitterpanel/SplitterPanel.d.ts +28 -10
  279. package/steps/Steps.d.ts +36 -15
  280. package/styleclass/StyleClass.d.ts +72 -1
  281. package/tabmenu/TabMenu.d.ts +41 -16
  282. package/tabmenu/TabMenu.vue +1 -1
  283. package/tabmenu/tabmenu.cjs.js +1 -0
  284. package/tabmenu/tabmenu.cjs.min.js +1 -1
  285. package/tabmenu/tabmenu.esm.js +1 -0
  286. package/tabmenu/tabmenu.esm.min.js +1 -1
  287. package/tabmenu/tabmenu.js +1 -0
  288. package/tabmenu/tabmenu.min.js +1 -1
  289. package/tabpanel/TabPanel.d.ts +29 -11
  290. package/tabview/TabView.d.ts +47 -19
  291. package/tag/Tag.d.ts +33 -15
  292. package/tag/Tag.vue +1 -1
  293. package/tag/tag.cjs.js +4 -2
  294. package/tag/tag.cjs.min.js +1 -1
  295. package/tag/tag.esm.js +5 -3
  296. package/tag/tag.esm.min.js +1 -1
  297. package/tag/tag.js +4 -2
  298. package/tag/tag.min.js +1 -1
  299. package/terminal/Terminal.d.ts +30 -14
  300. package/terminalservice/TerminalService.d.ts +24 -5
  301. package/textarea/Textarea.d.ts +33 -11
  302. package/tieredmenu/TieredMenu.d.ts +45 -31
  303. package/timeline/Timeline.d.ts +41 -32
  304. package/toast/Toast.d.ts +63 -35
  305. package/toast/Toast.vue +4 -2
  306. package/toast/ToastMessage.vue +4 -4
  307. package/toast/toast.cjs.js +8 -6
  308. package/toast/toast.cjs.min.js +1 -1
  309. package/toast/toast.esm.js +8 -6
  310. package/toast/toast.esm.min.js +1 -1
  311. package/toast/toast.js +8 -6
  312. package/toast/toast.min.js +1 -1
  313. package/toastservice/ToastService.d.ts +16 -3
  314. package/togglebutton/ToggleButton.d.ts +42 -22
  315. package/toolbar/Toolbar.d.ts +34 -14
  316. package/tooltip/Tooltip.d.ts +99 -1
  317. package/tree/Tree.d.ts +55 -36
  318. package/treeselect/TreeSelect.d.ts +63 -55
  319. package/treetable/TreeTable.d.ts +121 -107
  320. package/tristatecheckbox/TriStateCheckbox.d.ts +35 -12
  321. package/ts-helpers.d.ts +2 -2
  322. package/utils/utils.cjs.js +20 -22
  323. package/utils/utils.cjs.min.js +1 -1
  324. package/utils/utils.esm.js +20 -22
  325. package/utils/utils.esm.min.js +1 -1
  326. package/utils/utils.js +20 -22
  327. package/utils/utils.min.js +1 -1
  328. package/vetur-attributes.json +62 -2
  329. package/vetur-tags.json +17 -2
  330. package/virtualscroller/VirtualScroller.d.ts +99 -43
  331. package/virtualscroller/VirtualScroller.vue +248 -72
  332. package/virtualscroller/virtualscroller.cjs.js +234 -72
  333. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  334. package/virtualscroller/virtualscroller.esm.js +234 -72
  335. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  336. package/virtualscroller/virtualscroller.js +235 -74
  337. package/virtualscroller/virtualscroller.min.js +1 -1
  338. package/web-types.json +1930 -1742
package/core/core.js CHANGED
@@ -582,21 +582,24 @@ this.primevue.utils = (function (exports) {
582
582
  },
583
583
 
584
584
  isClickable(element) {
585
- const targetNode = element.nodeName;
586
- const parentNode = element.parentElement && element.parentElement.nodeName;
587
-
588
- return (
589
- targetNode == 'INPUT' ||
590
- targetNode == 'BUTTON' ||
591
- targetNode == 'A' ||
592
- parentNode == 'INPUT' ||
593
- parentNode == 'BUTTON' ||
594
- parentNode == 'A' ||
595
- this.hasClass(element, 'p-button') ||
596
- this.hasClass(element.parentElement, 'p-button') ||
597
- this.hasClass(element.parentElement, 'p-checkbox') ||
598
- this.hasClass(element.parentElement, 'p-radiobutton')
599
- );
585
+ if (element) {
586
+ const targetNode = element.nodeName;
587
+ const parentNode = element.parentElement && element.parentElement.nodeName;
588
+
589
+ return (
590
+ targetNode === 'INPUT' ||
591
+ targetNode === 'TEXTAREA' ||
592
+ targetNode === 'BUTTON' ||
593
+ targetNode === 'A' ||
594
+ parentNode === 'INPUT' ||
595
+ parentNode === 'TEXTAREA' ||
596
+ parentNode === 'BUTTON' ||
597
+ parentNode === 'A' ||
598
+ !!element.closest('.p-button, .p-checkbox, .p-radiobutton')
599
+ );
600
+ }
601
+
602
+ return false;
600
603
  },
601
604
 
602
605
  applyStyle(element, style) {
@@ -817,15 +820,10 @@ this.primevue.utils = (function (exports) {
817
820
  },
818
821
 
819
822
  reorderArray(value, from, to) {
820
- let target;
821
-
822
823
  if (value && from !== to) {
823
824
  if (to >= value.length) {
824
- target = to - value.length;
825
-
826
- while (target-- + 1) {
827
- value.push(undefined);
828
- }
825
+ to %= value.length;
826
+ from %= value.length;
829
827
  }
830
828
 
831
829
  value.splice(to, 0, value.splice(from, 1)[0]);
@@ -1668,7 +1666,6 @@ this.primevue.config = (function (exports, api, vue) {
1668
1666
  nextPageLabel: 'Next Page',
1669
1667
  prevPageLabel: 'Previous Page',
1670
1668
  rowsPerPageLabel: 'Rows per page',
1671
- previousPageLabel: 'Previous Page',
1672
1669
  jumpToPageDropdownLabel: 'Jump to Page Dropdown',
1673
1670
  jumpToPageInputLabel: 'Jump to Page Input',
1674
1671
  selectRow: 'Row Selected',
@@ -1718,11 +1715,30 @@ this.primevue.config = (function (exports, api, vue) {
1718
1715
  return PrimeVue;
1719
1716
  }
1720
1717
 
1718
+ function switchTheme(currentTheme, newTheme, linkElementId, callback) {
1719
+ const linkElement = document.getElementById(linkElementId);
1720
+ const cloneLinkElement = linkElement.cloneNode(true);
1721
+ const newThemeUrl = linkElement.getAttribute('href').replace(currentTheme, newTheme);
1722
+
1723
+ cloneLinkElement.setAttribute('id', linkElementId + '-clone');
1724
+ cloneLinkElement.setAttribute('href', newThemeUrl);
1725
+ cloneLinkElement.addEventListener('load', () => {
1726
+ linkElement.remove();
1727
+ cloneLinkElement.setAttribute('id', linkElementId);
1728
+
1729
+ if (callback) {
1730
+ callback();
1731
+ }
1732
+ });
1733
+ linkElement.parentNode?.insertBefore(cloneLinkElement, linkElement.nextSibling);
1734
+ }
1735
+
1721
1736
  var PrimeVue = {
1722
1737
  install: (app, options) => {
1723
1738
  let configOptions = options ? { ...defaultOptions, ...options } : { ...defaultOptions };
1724
1739
  const PrimeVue = {
1725
- config: vue.reactive(configOptions)
1740
+ config: vue.reactive(configOptions),
1741
+ changeTheme: switchTheme
1726
1742
  };
1727
1743
 
1728
1744
  app.config.globalProperties.$primevue = PrimeVue;
@@ -2402,7 +2418,7 @@ this.primevue.focustrap = (function (utils) {
2402
2418
  })(primevue.utils);
2403
2419
 
2404
2420
  this.primevue = this.primevue || {};
2405
- this.primevue.virtualscroller = (function (vue) {
2421
+ this.primevue.virtualscroller = (function (utils, vue) {
2406
2422
  'use strict';
2407
2423
 
2408
2424
  var script = {
@@ -2437,6 +2453,10 @@ this.primevue.virtualscroller = (function (vue) {
2437
2453
  type: Number,
2438
2454
  default: 0
2439
2455
  },
2456
+ resizeDelay: {
2457
+ type: Number,
2458
+ default: 10
2459
+ },
2440
2460
  lazy: {
2441
2461
  type: Boolean,
2442
2462
  default: false
@@ -2468,12 +2488,29 @@ this.primevue.virtualscroller = (function (vue) {
2468
2488
  tabindex: {
2469
2489
  type: Number,
2470
2490
  default: 0
2491
+ },
2492
+ inline: {
2493
+ type: Boolean,
2494
+ default: false
2495
+ },
2496
+ step: {
2497
+ type: Number,
2498
+ default: 0
2499
+ },
2500
+ appendOnly: {
2501
+ type: Boolean,
2502
+ default: false
2503
+ },
2504
+ autoSize: {
2505
+ type: Boolean,
2506
+ default: false
2471
2507
  }
2472
2508
  },
2473
2509
  data() {
2474
2510
  return {
2475
2511
  first: this.isBoth() ? { rows: 0, cols: 0 } : 0,
2476
2512
  last: this.isBoth() ? { rows: 0, cols: 0 } : 0,
2513
+ page: this.isBoth() ? { rows: 0, cols: 0 } : 0,
2477
2514
  numItemsInViewport: this.isBoth() ? { rows: 0, cols: 0 } : 0,
2478
2515
  lastScrollPos: this.isBoth() ? { top: 0, left: 0 } : 0,
2479
2516
  d_numToleratedItems: this.numToleratedItems,
@@ -2487,6 +2524,15 @@ this.primevue.virtualscroller = (function (vue) {
2487
2524
  content: null,
2488
2525
  lastScrollPos: null,
2489
2526
  scrollTimeout: null,
2527
+ resizeTimeout: null,
2528
+ defaultWidth: 0,
2529
+ defaultHeight: 0,
2530
+ defaultContentWidth: 0,
2531
+ defaultContentHeight: 0,
2532
+ isRangeChanged: false,
2533
+ lazyLoadState: {},
2534
+ resizeListener: null,
2535
+ initialized: false,
2490
2536
  watch: {
2491
2537
  numToleratedItems(newValue) {
2492
2538
  this.d_numToleratedItems = newValue;
@@ -2497,22 +2543,59 @@ this.primevue.virtualscroller = (function (vue) {
2497
2543
  items(newValue, oldValue) {
2498
2544
  if (!oldValue || oldValue.length !== (newValue || []).length) {
2499
2545
  this.init();
2546
+ this.calculateAutoSize();
2500
2547
  }
2501
2548
  },
2549
+ itemSize() {
2550
+ this.init();
2551
+ this.calculateAutoSize();
2552
+ },
2502
2553
  orientation() {
2503
2554
  this.lastScrollPos = this.isBoth() ? { top: 0, left: 0 } : 0;
2555
+ },
2556
+ scrollHeight() {
2557
+ this.init();
2558
+ this.calculateAutoSize();
2559
+ },
2560
+ scrollWidth() {
2561
+ this.init();
2562
+ this.calculateAutoSize();
2504
2563
  }
2505
2564
  },
2506
2565
  mounted() {
2507
- this.init();
2566
+ this.viewInit();
2508
2567
 
2509
2568
  this.lastScrollPos = this.isBoth() ? { top: 0, left: 0 } : 0;
2569
+ this.lazyLoadState = this.lazyLoadState || {};
2570
+ },
2571
+ updated() {
2572
+ !this.initialized && this.viewInit();
2573
+ },
2574
+ unmounted() {
2575
+ this.unbindResizeListener();
2576
+
2577
+ this.initialized = false;
2510
2578
  },
2511
2579
  methods: {
2580
+ viewInit() {
2581
+ if (utils.DomHandler.isVisible(this.element)) {
2582
+ this.setContentEl(this.content);
2583
+ this.init();
2584
+ this.bindResizeListener();
2585
+
2586
+ this.defaultWidth = utils.DomHandler.getWidth(this.element);
2587
+ this.defaultHeight = utils.DomHandler.getHeight(this.element);
2588
+ this.defaultContentWidth = utils.DomHandler.getWidth(this.content);
2589
+ this.defaultContentHeight = utils.DomHandler.getHeight(this.content);
2590
+ this.initialized = true;
2591
+ }
2592
+ },
2512
2593
  init() {
2513
- this.setSize();
2514
- this.calculateOptions();
2515
- this.setSpacerSize();
2594
+ if (!this.disabled) {
2595
+ this.setSize();
2596
+ this.calculateOptions();
2597
+ this.setSpacerSize();
2598
+ }
2516
2599
  },
2517
2600
  isVertical() {
2518
2601
  return this.orientation === 'vertical';
@@ -2524,31 +2607,34 @@ this.primevue.virtualscroller = (function (vue) {
2524
2607
  return this.orientation === 'both';
2525
2608
  },
2526
2609
  scrollTo(options) {
2527
- this.element && this.element.scrollTo(options);
2610
+ this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
2611
+ this.element?.scrollTo(options);
2528
2612
  },
2529
2613
  scrollToIndex(index, behavior = 'auto') {
2530
2614
  const both = this.isBoth();
2531
2615
  const horizontal = this.isHorizontal();
2532
2616
  const first = this.first;
2533
2617
  const { numToleratedItems } = this.calculateNumItems();
2618
+ const contentPos = this.getContentPosition();
2534
2619
  const itemSize = this.itemSize;
2535
2620
  const calculateFirst = (_index = 0, _numT) => (_index <= _numT ? 0 : _index);
2536
- const calculateCoord = (_first, _size) => _first * _size;
2621
+ const calculateCoord = (_first, _size, _cpos) => _first * _size + _cpos;
2537
2622
  const scrollTo = (left = 0, top = 0) => this.scrollTo({ left, top, behavior });
2623
+ let newFirst = both ? { rows: 0, cols: 0 } : 0;
2624
+ let isRangeChanged = false;
2538
2625
 
2539
2626
  if (both) {
2540
- const newFirst = { rows: calculateFirst(index[0], numToleratedItems[0]), cols: calculateFirst(index[1], numToleratedItems[1]) };
2541
-
2542
- if (newFirst.rows !== first.rows || newFirst.cols !== first.cols) {
2543
- scrollTo(calculateCoord(newFirst.cols, itemSize[1]), calculateCoord(newFirst.rows, itemSize[0]));
2544
- }
2627
+ newFirst = { rows: calculateFirst(index[0], numToleratedItems[0]), cols: calculateFirst(index[1], numToleratedItems[1]) };
2628
+ scrollTo(calculateCoord(newFirst.cols, itemSize[1], contentPos.left), calculateCoord(newFirst.rows, itemSize[0], contentPos.top));
2629
+ isRangeChanged = newFirst.rows !== first.rows || newFirst.cols !== first.cols;
2545
2630
  } else {
2546
- const newFirst = calculateFirst(index, numToleratedItems);
2547
-
2548
- if (newFirst !== first) {
2549
- horizontal ? scrollTo(calculateCoord(newFirst, itemSize), 0) : scrollTo(0, calculateCoord(newFirst, itemSize));
2550
- }
2631
+ newFirst = calculateFirst(index, numToleratedItems);
2632
+ horizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPos.left), 0) : scrollTo(0, calculateCoord(newFirst, itemSize, contentPos.top));
2633
+ isRangeChanged = newFirst !== first;
2551
2634
  }
2635
+
2636
+ this.isRangeChanged = isRangeChanged;
2637
+ this.first = newFirst;
2552
2638
  },
2553
2639
  scrollInView(index, to, behavior = 'auto') {
2554
2640
  if (to) {
@@ -2601,8 +2687,7 @@ this.primevue.virtualscroller = (function (vue) {
2601
2687
  if (this.element) {
2602
2688
  const both = this.isBoth();
2603
2689
  const horizontal = this.isHorizontal();
2604
- const scrollTop = this.element.scrollTop;
2605
- const scrollLeft = this.element.scrollLeft;
2690
+ const { scrollTop, scrollLeft } = this.element.scrollTop;
2606
2691
 
2607
2692
  if (both) {
2608
2693
  firstInViewport = { rows: calculateFirstInViewport(scrollTop, this.itemSize[0]), cols: calculateFirstInViewport(scrollLeft, this.itemSize[1]) };
@@ -2645,7 +2730,7 @@ this.primevue.virtualscroller = (function (vue) {
2645
2730
  const both = this.isBoth();
2646
2731
  const first = this.first;
2647
2732
  const { numItemsInViewport, numToleratedItems } = this.calculateNumItems();
2648
- const calculateLast = (_first, _num, _numT, _isCols) => this.getLast(_first + _num + (_first < _numT ? 2 : 3) * _numT, _isCols);
2733
+ const calculateLast = (_first, _num, _numT, _isCols = false) => this.getLast(_first + _num + (_first < _numT ? 2 : 3) * _numT, _isCols);
2649
2734
  const last = both
2650
2735
  ? { rows: calculateLast(first.rows, numItemsInViewport.rows, numToleratedItems[0]), cols: calculateLast(first.cols, numItemsInViewport.cols, numToleratedItems[1], true) }
2651
2736
  : calculateLast(first, numItemsInViewport, numToleratedItems);
@@ -2660,23 +2745,55 @@ this.primevue.virtualscroller = (function (vue) {
2660
2745
  }
2661
2746
 
2662
2747
  if (this.lazy) {
2663
- this.$emit('lazy-load', { first, last });
2748
+ Promise.resolve().then(() => {
2749
+ this.lazyLoadState = {
2750
+ first: this.step ? (both ? { rows: 0, cols: first.cols } : 0) : first,
2751
+ last: Math.min(this.step ? this.step : last, this.items.length)
2752
+ };
2753
+
2754
+ this.$emit('lazy-load', this.lazyLoadState);
2755
+ });
2664
2756
  }
2665
2757
  },
2666
- getLast(last = 0, isCols) {
2667
- if (this.items) {
2668
- return Math.min(isCols ? (this.columns || this.items[0]).length : this.items.length, last);
2669
- }
2758
+ calculateAutoSize() {
2759
+ if (this.autoSize && !this.d_loading) {
2760
+ Promise.resolve().then(() => {
2761
+ if (this.content) {
2762
+ const both = this.isBoth();
2763
+ const horizontal = this.isHorizontal();
2764
+ const vertical = this.isVertical();
2670
2765
 
2671
- return 0;
2766
+ this.content.style.minHeight = this.content.style.minWidth = 'auto';
2767
+ this.content.style.position = 'relative';
2768
+ this.element.style.contain = 'none';
2769
+
2770
+ const [contentWidth, contentHeight] = [utils.DomHandler.getWidth(this.content), utils.DomHandler.getHeight(this.content)];
2771
+
2772
+ contentWidth !== this.defaultContentWidth && (this.element.style.width = '');
2773
+ contentHeight !== this.defaultContentHeight && (this.element.style.height = '');
2774
+
2775
+ const [width, height] = [utils.DomHandler.getWidth(this.element), utils.DomHandler.getHeight(this.element)];
2776
+
2777
+ (both || horizontal) && (this.element.style.width = width < this.defaultWidth ? width + 'px' : this.scrollWidth || this.defaultWidth + 'px');
2778
+ (both || vertical) && (this.element.style.height = height < this.defaultHeight ? height + 'px' : this.scrollHeight || this.defaultHeight + 'px');
2779
+
2780
+ this.content.style.minHeight = this.content.style.minWidth = '';
2781
+ this.content.style.position = '';
2782
+ this.element.style.contain = '';
2783
+ }
2784
+ });
2785
+ }
2786
+ },
2787
+ getLast(last = 0, isCols) {
2788
+ return this.items ? Math.min(isCols ? (this.columns || this.items[0]).length : this.items.length, last) : 0;
2672
2789
  },
2673
2790
  getContentPosition() {
2674
2791
  if (this.content) {
2675
2792
  const style = getComputedStyle(this.content);
2676
- const left = parseInt(style.paddingLeft, 10) + Math.max(parseInt(style.left, 10), 0);
2677
- const right = parseInt(style.paddingRight, 10) + Math.max(parseInt(style.right, 10), 0);
2678
- const top = parseInt(style.paddingTop, 10) + Math.max(parseInt(style.top, 10), 0);
2679
- const bottom = parseInt(style.paddingBottom, 10) + Math.max(parseInt(style.bottom, 10), 0);
2793
+ const left = parseFloat(style.paddingLeft) + Math.max(parseFloat(style.left) || 0, 0);
2794
+ const right = parseFloat(style.paddingRight) + Math.max(parseFloat(style.right) || 0, 0);
2795
+ const top = parseFloat(style.paddingTop) + Math.max(parseFloat(style.top) || 0, 0);
2796
+ const bottom = parseFloat(style.paddingBottom) + Math.max(parseFloat(style.bottom) || 0, 0);
2680
2797
 
2681
2798
  return { left, right, top, bottom, x: left + right, y: top + bottom };
2682
2799
  }
@@ -2718,15 +2835,12 @@ this.primevue.virtualscroller = (function (vue) {
2718
2835
  }
2719
2836
  },
2720
2837
  setContentPosition(pos) {
2721
- if (this.content) {
2838
+ if (this.content && !this.appendOnly) {
2722
2839
  const both = this.isBoth();
2723
2840
  const horizontal = this.isHorizontal();
2724
2841
  const first = pos ? pos.first : this.first;
2725
2842
  const calculateTranslateVal = (_first, _size) => _first * _size;
2726
-
2727
- const setTransform = (_x = 0, _y = 0) => {
2728
- this.contentStyle = { ...this.contentStyle, ...{ transform: `translate3d(${_x}px, ${_y}px, 0)` } };
2729
- };
2843
+ const setTransform = (_x = 0, _y = 0) => (this.contentStyle = { ...this.contentStyle, ...{ transform: `translate3d(${_x}px, ${_y}px, 0)` } });
2730
2844
 
2731
2845
  if (both) {
2732
2846
  setTransform(calculateTranslateVal(first.cols, this.itemSize[1]), calculateTranslateVal(first.rows, this.itemSize[0]));
@@ -2775,33 +2889,39 @@ this.primevue.virtualscroller = (function (vue) {
2775
2889
  if (both) {
2776
2890
  const isScrollDown = this.lastScrollPos.top <= scrollTop;
2777
2891
  const isScrollRight = this.lastScrollPos.left <= scrollLeft;
2778
- const currentIndex = { rows: calculateCurrentIndex(scrollTop, this.itemSize[0]), cols: calculateCurrentIndex(scrollLeft, this.itemSize[1]) };
2779
- const triggerIndex = {
2780
- rows: calculateTriggerIndex(currentIndex.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], isScrollDown),
2781
- cols: calculateTriggerIndex(currentIndex.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], isScrollRight)
2782
- };
2783
2892
 
2784
- newFirst = {
2785
- rows: calculateFirst(currentIndex.rows, triggerIndex.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], isScrollDown),
2786
- cols: calculateFirst(currentIndex.cols, triggerIndex.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], isScrollRight)
2787
- };
2788
- newLast = {
2789
- rows: calculateLast(currentIndex.rows, newFirst.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0]),
2790
- cols: calculateLast(currentIndex.cols, newFirst.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], true)
2791
- };
2893
+ if (!this.appendOnly || (this.appendOnly && (isScrollDown || isScrollRight))) {
2894
+ const currentIndex = { rows: calculateCurrentIndex(scrollTop, this.itemSize[0]), cols: calculateCurrentIndex(scrollLeft, this.itemSize[1]) };
2895
+ const triggerIndex = {
2896
+ rows: calculateTriggerIndex(currentIndex.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], isScrollDown),
2897
+ cols: calculateTriggerIndex(currentIndex.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], isScrollRight)
2898
+ };
2899
+
2900
+ newFirst = {
2901
+ rows: calculateFirst(currentIndex.rows, triggerIndex.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], isScrollDown),
2902
+ cols: calculateFirst(currentIndex.cols, triggerIndex.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], isScrollRight)
2903
+ };
2904
+ newLast = {
2905
+ rows: calculateLast(currentIndex.rows, newFirst.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0]),
2906
+ cols: calculateLast(currentIndex.cols, newFirst.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], true)
2907
+ };
2792
2908
 
2793
- isRangeChanged = newFirst.rows !== this.first.rows || newLast.rows !== this.last.rows || newFirst.cols !== this.first.cols || newLast.cols !== this.last.cols;
2794
- newScrollPos = { top: scrollTop, left: scrollLeft };
2909
+ isRangeChanged = newFirst.rows !== this.first.rows || newLast.rows !== this.last.rows || newFirst.cols !== this.first.cols || newLast.cols !== this.last.cols || this.isRangeChanged;
2910
+ newScrollPos = { top: scrollTop, left: scrollLeft };
2911
+ }
2795
2912
  } else {
2796
2913
  const scrollPos = horizontal ? scrollLeft : scrollTop;
2797
2914
  const isScrollDownOrRight = this.lastScrollPos <= scrollPos;
2798
- const currentIndex = calculateCurrentIndex(scrollPos, this.itemSize);
2799
- const triggerIndex = calculateTriggerIndex(currentIndex, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, isScrollDownOrRight);
2800
2915
 
2801
- newFirst = calculateFirst(currentIndex, triggerIndex, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, isScrollDownOrRight);
2802
- newLast = calculateLast(currentIndex, newFirst, this.last, this.numItemsInViewport, this.d_numToleratedItems);
2803
- isRangeChanged = newFirst !== this.first || newLast !== this.last;
2804
- newScrollPos = scrollPos;
2916
+ if (!this.appendOnly || (this.appendOnly && isScrollDownOrRight)) {
2917
+ const currentIndex = calculateCurrentIndex(scrollPos, this.itemSize);
2918
+ const triggerIndex = calculateTriggerIndex(currentIndex, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, isScrollDownOrRight);
2919
+
2920
+ newFirst = calculateFirst(currentIndex, triggerIndex, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, isScrollDownOrRight);
2921
+ newLast = calculateLast(currentIndex, newFirst, this.last, this.numItemsInViewport, this.d_numToleratedItems);
2922
+ isRangeChanged = newFirst !== this.first || newLast !== this.last || this.isRangeChanged;
2923
+ newScrollPos = scrollPos;
2924
+ }
2805
2925
  }
2806
2926
 
2807
2927
  return {
@@ -2825,21 +2945,29 @@ this.primevue.virtualscroller = (function (vue) {
2825
2945
 
2826
2946
  this.$emit('scroll-index-change', newState);
2827
2947
 
2828
- if (this.lazy) {
2829
- this.$emit('lazy-load', newState);
2948
+ if (this.lazy && this.isPageChanged(first)) {
2949
+ const lazyLoadState = {
2950
+ first: this.step ? Math.min(this.getPageByFirst(first) * this.step, this.items.length - this.step) : first,
2951
+ last: Math.min(this.step ? (this.getPageByFirst(first) + 1) * this.step : last, this.items.length)
2952
+ };
2953
+ const isLazyStateChanged = this.lazyLoadState.first !== lazyLoadState.first || this.lazyLoadState.last !== lazyLoadState.last;
2954
+
2955
+ isLazyStateChanged && this.$emit('lazy-load', lazyLoadState);
2956
+ this.lazyLoadState = lazyLoadState;
2830
2957
  }
2831
2958
  }
2832
2959
  },
2833
2960
  onScroll(event) {
2834
2961
  this.$emit('scroll', event);
2835
2962
 
2836
- if (this.delay) {
2963
+ if (this.delay && this.isPageChanged()) {
2837
2964
  if (this.scrollTimeout) {
2838
2965
  clearTimeout(this.scrollTimeout);
2839
2966
  }
2840
2967
 
2841
2968
  if (!this.d_loading && this.showLoader) {
2842
- const { isRangeChanged: changed } = this.onScrollPositionChange(event);
2969
+ const { isRangeChanged } = this.onScrollPositionChange(event);
2970
+ const changed = isRangeChanged || (this.step ? this.isPageChanged() : false);
2843
2971
 
2844
2972
  changed && (this.d_loading = true);
2845
2973
  }
@@ -2847,14 +2975,56 @@ this.primevue.virtualscroller = (function (vue) {
2847
2975
  this.scrollTimeout = setTimeout(() => {
2848
2976
  this.onScrollChange(event);
2849
2977
 
2850
- if (this.d_loading && this.showLoader && !this.lazy) {
2978
+ if (this.d_loading && this.showLoader && (!this.lazy || this.loading === undefined)) {
2851
2979
  this.d_loading = false;
2980
+ this.page = this.getPageByFirst();
2852
2981
  }
2853
2982
  }, this.delay);
2854
2983
  } else {
2855
2984
  this.onScrollChange(event);
2856
2985
  }
2857
2986
  },
2987
+ onResize() {
2988
+ if (this.resizeTimeout) {
2989
+ clearTimeout(this.resizeTimeout);
2990
+ }
2991
+
2992
+ this.resizeTimeout = setTimeout(() => {
2993
+ if (utils.DomHandler.isVisible(this.element)) {
2994
+ const both = this.isBoth();
2995
+ const vertical = this.isVertical();
2996
+ const horizontal = this.isHorizontal();
2997
+ const [width, height] = [utils.DomHandler.getWidth(this.element), utils.DomHandler.getHeight(this.element)];
2998
+ const [isDiffWidth, isDiffHeight] = [width !== this.defaultWidth, height !== this.defaultHeight];
2999
+ const reinit = both ? isDiffWidth || isDiffHeight : horizontal ? isDiffWidth : vertical ? isDiffHeight : false;
3000
+
3001
+ if (reinit) {
3002
+ this.d_numToleratedItems = this.numToleratedItems;
3003
+ this.defaultWidth = width;
3004
+ this.defaultHeight = height;
3005
+ this.defaultContentWidth = utils.DomHandler.getWidth(this.content);
3006
+ this.defaultContentHeight = utils.DomHandler.getHeight(this.content);
3007
+
3008
+ this.init();
3009
+ }
3010
+ }
3011
+ }, this.resizeDelay);
3012
+ },
3013
+ bindResizeListener() {
3014
+ if (!this.resizeListener) {
3015
+ this.resizeListener = this.onResize.bind(this);
3016
+
3017
+ window.addEventListener('resize', this.resizeListener);
3018
+ window.addEventListener('orientationchange', this.resizeListener);
3019
+ }
3020
+ },
3021
+ unbindResizeListener() {
3022
+ if (this.resizeListener) {
3023
+ window.removeEventListener('resize', this.resizeListener);
3024
+ window.removeEventListener('orientationchange', this.resizeListener);
3025
+ this.resizeListener = null;
3026
+ }
3027
+ },
2858
3028
  getOptions(renderedIndex) {
2859
3029
  const count = (this.items || []).length;
2860
3030
  const index = this.isBoth() ? this.first.rows + renderedIndex : this.first + renderedIndex;
@@ -2881,6 +3051,15 @@ this.primevue.virtualscroller = (function (vue) {
2881
3051
  ...extOptions
2882
3052
  };
2883
3053
  },
3054
+ getPageByFirst(first) {
3055
+ return Math.floor(((first ?? this.first) + this.d_numToleratedItems * 4) / (this.step || 1));
3056
+ },
3057
+ isPageChanged(first) {
3058
+ return this.step ? this.page !== this.getPageByFirst(first ?? this.first) : true;
3059
+ },
3060
+ setContentEl(el) {
3061
+ this.content = el || this.content || utils.DomHandler.findSingle(this.element, '.p-virtualscroller-content');
3062
+ },
2884
3063
  elementRef(el) {
2885
3064
  this.element = el;
2886
3065
  },
@@ -2893,8 +3072,9 @@ this.primevue.virtualscroller = (function (vue) {
2893
3072
  return [
2894
3073
  'p-virtualscroller',
2895
3074
  {
2896
- 'p-both-scroll': this.isBoth(),
2897
- 'p-horizontal-scroll': this.isHorizontal()
3075
+ 'p-virtualscroller-inline': this.inline,
3076
+ 'p-virtualscroller-both p-both-scroll': this.isBoth(),
3077
+ 'p-virtualscroller-horizontal p-horizontal-scroll': this.isHorizontal()
2898
3078
  },
2899
3079
  this.class
2900
3080
  ];
@@ -2916,13 +3096,10 @@ this.primevue.virtualscroller = (function (vue) {
2916
3096
  ];
2917
3097
  },
2918
3098
  loadedItems() {
2919
- const items = this.items;
2920
-
2921
- if (items && !this.d_loading) {
2922
- if (this.isBoth()) {
2923
- return items.slice(this.first.rows, this.last.rows).map((item) => (this.columns ? item : item.slice(this.first.cols, this.last.cols)));
2924
- } else if (this.isHorizontal() && this.columns) return items;
2925
- else return items.slice(this.first, this.last);
3099
+ if (this.items && !this.d_loading) {
3100
+ if (this.isBoth()) return this.items.slice(this.appendOnly ? 0 : this.first.rows, this.last.rows).map((item) => (this.columns ? item : item.slice(this.appendOnly ? 0 : this.first.cols, this.last.cols)));
3101
+ else if (this.isHorizontal() && this.columns) return this.items;
3102
+ else return this.items.slice(this.appendOnly ? 0 : this.first, this.last);
2926
3103
  }
2927
3104
 
2928
3105
  return [];
@@ -3051,14 +3228,14 @@ this.primevue.virtualscroller = (function (vue) {
3051
3228
  }
3052
3229
  }
3053
3230
 
3054
- var css_248z = "\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n transform: translateZ(0);\n will-change: scroll-position;\n outline: 0 none;\n}\n.p-virtualscroller-content {\n position: absolute;\n top: 0;\n left: 0;\n contain: content;\n min-height: 100%;\n min-width: 100%;\n will-change: transform;\n}\n.p-virtualscroller-spacer {\n position: absolute;\n top: 0;\n left: 0;\n height: 1px;\n width: 1px;\n transform-origin: 0 0;\n pointer-events: none;\n}\n.p-virtualscroller .p-virtualscroller-loader {\n position: sticky;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-virtualscroller-loader.p-component-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n";
3231
+ var css_248z = "\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n transform: translateZ(0);\n will-change: scroll-position;\n outline: 0 none;\n}\n.p-virtualscroller-content {\n position: absolute;\n top: 0;\n left: 0;\n /* contain: content; */\n min-height: 100%;\n min-width: 100%;\n will-change: transform;\n}\n.p-virtualscroller-spacer {\n position: absolute;\n top: 0;\n left: 0;\n height: 1px;\n width: 1px;\n transform-origin: 0 0;\n pointer-events: none;\n}\n.p-virtualscroller .p-virtualscroller-loader {\n position: sticky;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-virtualscroller-loader.p-component-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.p-virtualscroller-loading-icon {\n font-size: 2rem;\n}\n.p-virtualscroller-horizontal > .p-virtualscroller-content {\n display: flex;\n}\n\n/* Inline */\n.p-virtualscroller-inline .p-virtualscroller-content {\n position: static;\n}\n";
3055
3232
  styleInject(css_248z);
3056
3233
 
3057
3234
  script.render = render;
3058
3235
 
3059
3236
  return script;
3060
3237
 
3061
- })(Vue);
3238
+ })(primevue.utils, Vue);
3062
3239
 
3063
3240
  this.primevue = this.primevue || {};
3064
3241
  this.primevue.confirmationeventbus = (function (utils) {
@@ -3227,18 +3404,61 @@ this.primevue.button = (function (Ripple, vue) {
3227
3404
  loadingIcon: {
3228
3405
  type: String,
3229
3406
  default: 'pi pi-spinner pi-spin'
3407
+ },
3408
+ link: {
3409
+ type: Boolean,
3410
+ default: false
3411
+ },
3412
+ severity: {
3413
+ type: String,
3414
+ default: null
3415
+ },
3416
+ raised: {
3417
+ type: Boolean,
3418
+ default: false
3419
+ },
3420
+ rounded: {
3421
+ type: Boolean,
3422
+ default: false
3423
+ },
3424
+ text: {
3425
+ type: Boolean,
3426
+ default: false
3427
+ },
3428
+ outlined: {
3429
+ type: Boolean,
3430
+ default: false
3431
+ },
3432
+ size: {
3433
+ type: String,
3434
+ default: null
3435
+ },
3436
+ plain: {
3437
+ type: Boolean,
3438
+ default: false
3230
3439
  }
3231
3440
  },
3232
3441
  computed: {
3233
3442
  buttonClass() {
3234
- return {
3235
- 'p-button p-component': true,
3236
- 'p-button-icon-only': this.icon && !this.label,
3237
- 'p-button-vertical': (this.iconPos === 'top' || this.iconPos === 'bottom') && this.label,
3238
- 'p-disabled': this.$attrs.disabled || this.loading,
3239
- 'p-button-loading': this.loading,
3240
- 'p-button-loading-label-only': this.loading && !this.icon && this.label
3241
- };
3443
+ return [
3444
+ 'p-button p-component',
3445
+ {
3446
+ 'p-button-icon-only': this.icon && !this.label,
3447
+ 'p-button-vertical': (this.iconPos === 'top' || this.iconPos === 'bottom') && this.label,
3448
+ 'p-disabled': this.$attrs.disabled || this.loading,
3449
+ 'p-button-loading': this.loading,
3450
+ 'p-button-loading-label-only': this.loading && !this.icon && this.label,
3451
+ 'p-button-link': this.link,
3452
+ [`p-button-${this.severity}`]: this.severity,
3453
+ 'p-button-raised': this.raised,
3454
+ 'p-button-rounded': this.rounded,
3455
+ 'p-button-text': this.text,
3456
+ 'p-button-outlined': this.outlined,
3457
+ 'p-button-sm': this.size === 'small',
3458
+ 'p-button-lg': this.size === 'large',
3459
+ 'p-button-plain': this.plain
3460
+ }
3461
+ ];
3242
3462
  },
3243
3463
  iconStyleClass() {
3244
3464
  return [
@@ -5207,7 +5427,7 @@ this.primevue.dropdown = (function (api, OverlayEventBus, Portal, Ripple, utils,
5207
5427
 
5208
5428
  !matched && (this.focusedOptionIndex = -1);
5209
5429
 
5210
- this.$emit('update:modelValue', value);
5430
+ this.updateModel(event, value);
5211
5431
  },
5212
5432
  onContainerClick(event) {
5213
5433
  if (this.disabled || this.loading) {
@@ -6282,7 +6502,7 @@ this.primevue.dialog = (function (FocusTrap, Portal, Ripple, utils, vue) {
6282
6502
  this.$emit('after-hide');
6283
6503
  },
6284
6504
  onMaskClick(event) {
6285
- if (this.dismissableMask && this.closable && this.modal && this.mask === event.target) {
6505
+ if (this.dismissableMask && this.modal && this.mask === event.target) {
6286
6506
  this.close();
6287
6507
  }
6288
6508
  },
@@ -8474,8 +8694,8 @@ this.primevue.menu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
8474
8694
  const _hoisted_1$1 = ["id", "aria-label", "aria-disabled"];
8475
8695
  const _hoisted_2$1 = ["href", "onClick"];
8476
8696
  const _hoisted_3$1 = { class: "p-menuitem-text" };
8477
- const _hoisted_4 = ["href", "target"];
8478
- const _hoisted_5 = { class: "p-menuitem-text" };
8697
+ const _hoisted_4$1 = ["href", "target"];
8698
+ const _hoisted_5$1 = { class: "p-menuitem-text" };
8479
8699
 
8480
8700
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
8481
8701
  const _component_router_link = vue.resolveComponent("router-link");
@@ -8538,8 +8758,8 @@ this.primevue.menu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
8538
8758
  class: vue.normalizeClass(['p-menuitem-icon', $props.item.icon])
8539
8759
  }, null, 2))
8540
8760
  : vue.createCommentVNode("", true),
8541
- vue.createElementVNode("span", _hoisted_5, vue.toDisplayString($options.label()), 1)
8542
- ], 10, _hoisted_4)), [
8761
+ vue.createElementVNode("span", _hoisted_5$1, vue.toDisplayString($options.label()), 1)
8762
+ ], 10, _hoisted_4$1)), [
8543
8763
  [_directive_ripple]
8544
8764
  ])
8545
8765
  ], 64))
@@ -8919,8 +9139,16 @@ this.primevue.menu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
8919
9139
  };
8920
9140
 
8921
9141
  const _hoisted_1 = ["id"];
8922
- const _hoisted_2 = ["id", "tabindex", "aria-activedescendant", "aria-label", "aria-labelledby"];
8923
- const _hoisted_3 = ["id"];
9142
+ const _hoisted_2 = {
9143
+ key: 0,
9144
+ class: "p-menu-start"
9145
+ };
9146
+ const _hoisted_3 = ["id", "tabindex", "aria-activedescendant", "aria-label", "aria-labelledby"];
9147
+ const _hoisted_4 = ["id"];
9148
+ const _hoisted_5 = {
9149
+ key: 1,
9150
+ class: "p-menu-end"
9151
+ };
8924
9152
 
8925
9153
  function render(_ctx, _cache, $props, $setup, $data, $options) {
8926
9154
  const _component_PVMenuitem = vue.resolveComponent("PVMenuitem");
@@ -8947,6 +9175,11 @@ this.primevue.menu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
8947
9175
  }, _ctx.$attrs, {
8948
9176
  onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
8949
9177
  }), [
9178
+ (_ctx.$slots.start)
9179
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
9180
+ vue.renderSlot(_ctx.$slots, "start")
9181
+ ]))
9182
+ : vue.createCommentVNode("", true),
8950
9183
  vue.createElementVNode("ul", {
8951
9184
  ref: $options.listRef,
8952
9185
  id: $data.id + '_list',
@@ -8976,7 +9209,7 @@ this.primevue.menu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
8976
9209
  vue.renderSlot(_ctx.$slots, "item", { item: item }, () => [
8977
9210
  vue.createTextVNode(vue.toDisplayString($options.label(item)), 1)
8978
9211
  ])
8979
- ], 8, _hoisted_3))
9212
+ ], 8, _hoisted_4))
8980
9213
  : vue.createCommentVNode("", true),
8981
9214
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.items, (child, j) => {
8982
9215
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
@@ -9021,7 +9254,12 @@ this.primevue.menu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
9021
9254
  }, null, 8, ["id", "item", "template", "exact", "focusedOptionId", "onItemClick"]))
9022
9255
  ], 64))
9023
9256
  }), 128))
9024
- ], 40, _hoisted_2)
9257
+ ], 40, _hoisted_3),
9258
+ (_ctx.$slots.end)
9259
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
9260
+ vue.renderSlot(_ctx.$slots, "end")
9261
+ ]))
9262
+ : vue.createCommentVNode("", true)
9025
9263
  ], 16, _hoisted_1))
9026
9264
  : vue.createCommentVNode("", true)
9027
9265
  ]),
@@ -10030,15 +10268,24 @@ this.primevue.tieredmenu = (function (OverlayEventBus, Portal, utils, Ripple, vu
10030
10268
  })(primevue.overlayeventbus, primevue.portal, primevue.utils, primevue.ripple, Vue);
10031
10269
 
10032
10270
  this.primevue = this.primevue || {};
10033
- this.primevue.badge = (function (vue) {
10271
+ this.primevue.badge = (function (utils, vue) {
10034
10272
  'use strict';
10035
10273
 
10036
10274
  var script = {
10037
10275
  name: 'Badge',
10038
10276
  props: {
10039
- value: null,
10040
- severity: null,
10041
- size: null
10277
+ value: {
10278
+ type: [String, Number],
10279
+ default: null
10280
+ },
10281
+ severity: {
10282
+ type: String,
10283
+ default: null
10284
+ },
10285
+ size: {
10286
+ type: String,
10287
+ default: null
10288
+ }
10042
10289
  },
10043
10290
  computed: {
10044
10291
  containerClass() {
@@ -10048,8 +10295,8 @@ this.primevue.badge = (function (vue) {
10048
10295
  return [
10049
10296
  'p-badge p-component',
10050
10297
  {
10051
- 'p-badge-no-gutter': this.value && String(this.value).length === 1,
10052
- 'p-badge-dot': !this.value && !this.$slots.default,
10298
+ 'p-badge-no-gutter': utils.ObjectUtils.isNotEmpty(this.value) && String(this.value).length === 1,
10299
+ 'p-badge-dot': utils.ObjectUtils.isEmpty(this.value) && !this.$slots.default,
10053
10300
  'p-badge-lg': this.size === 'large',
10054
10301
  'p-badge-xl': this.size === 'xlarge',
10055
10302
  'p-badge-info': this.severity === 'info',
@@ -10076,5 +10323,5 @@ this.primevue.badge = (function (vue) {
10076
10323
 
10077
10324
  return script;
10078
10325
 
10079
- })(Vue);
10326
+ })(primevue.utils, Vue);
10080
10327