primevue 3.8.0 → 3.9.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 (465) hide show
  1. package/README.md +2 -2
  2. package/accordion/Accordion.vue +1 -1
  3. package/accordion/accordion.cjs.js +1 -1
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.esm.js +1 -1
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +1 -1
  8. package/accordion/accordion.min.js +1 -1
  9. package/api/Api.d.ts +73 -32
  10. package/api/api.cjs.js +66 -32
  11. package/api/api.cjs.min.js +1 -1
  12. package/api/api.esm.js +66 -32
  13. package/api/api.esm.min.js +1 -1
  14. package/api/api.js +66 -32
  15. package/api/api.min.js +1 -1
  16. package/autocomplete/AutoComplete.d.ts +43 -9
  17. package/autocomplete/AutoComplete.vue +16 -9
  18. package/autocomplete/autocomplete.cjs.js +19 -11
  19. package/autocomplete/autocomplete.cjs.min.js +1 -1
  20. package/autocomplete/autocomplete.esm.js +19 -11
  21. package/autocomplete/autocomplete.esm.min.js +1 -1
  22. package/autocomplete/autocomplete.js +19 -11
  23. package/autocomplete/autocomplete.min.js +1 -1
  24. package/blockui/BlockUI.vue +1 -1
  25. package/blockui/blockui.cjs.js +5 -7
  26. package/blockui/blockui.cjs.min.js +1 -1
  27. package/blockui/blockui.esm.js +6 -8
  28. package/blockui/blockui.esm.min.js +1 -1
  29. package/blockui/blockui.js +5 -7
  30. package/blockui/blockui.min.js +1 -1
  31. package/breadcrumb/Breadcrumb.d.ts +7 -0
  32. package/breadcrumb/BreadcrumbItem.vue +5 -2
  33. package/breadcrumb/breadcrumb.cjs.js +5 -2
  34. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  35. package/breadcrumb/breadcrumb.esm.js +5 -2
  36. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  37. package/breadcrumb/breadcrumb.js +5 -2
  38. package/breadcrumb/breadcrumb.min.js +1 -1
  39. package/calendar/Calendar.d.ts +11 -1
  40. package/calendar/Calendar.vue +362 -67
  41. package/calendar/calendar.cjs.js +459 -168
  42. package/calendar/calendar.cjs.min.js +1 -1
  43. package/calendar/calendar.esm.js +461 -170
  44. package/calendar/calendar.esm.min.js +1 -1
  45. package/calendar/calendar.js +459 -168
  46. package/calendar/calendar.min.js +1 -1
  47. package/carousel/Carousel.d.ts +6 -1
  48. package/carousel/Carousel.vue +2 -2
  49. package/carousel/carousel.cjs.js +6 -6
  50. package/carousel/carousel.cjs.min.js +1 -1
  51. package/carousel/carousel.esm.js +6 -6
  52. package/carousel/carousel.esm.min.js +1 -1
  53. package/carousel/carousel.js +6 -6
  54. package/carousel/carousel.min.js +1 -1
  55. package/cascadeselect/CascadeSelect.d.ts +19 -6
  56. package/chart/Chart.vue +9 -2
  57. package/chart/chart.cjs.js +9 -2
  58. package/chart/chart.cjs.min.js +1 -1
  59. package/chart/chart.esm.js +9 -2
  60. package/chart/chart.esm.min.js +1 -1
  61. package/chart/chart.js +9 -2
  62. package/chart/chart.min.js +1 -1
  63. package/chips/Chips.d.ts +5 -1
  64. package/colorpicker/ColorPicker.d.ts +3 -0
  65. package/colorpicker/ColorPicker.vue +6 -1
  66. package/colorpicker/colorpicker.cjs.js +6 -1
  67. package/colorpicker/colorpicker.cjs.min.js +1 -1
  68. package/colorpicker/colorpicker.esm.js +6 -1
  69. package/colorpicker/colorpicker.esm.min.js +1 -1
  70. package/colorpicker/colorpicker.js +6 -1
  71. package/colorpicker/colorpicker.min.js +1 -1
  72. package/column/Column.d.ts +42 -11
  73. package/confirmdialog/ConfirmDialog.vue +8 -2
  74. package/confirmdialog/confirmdialog.cjs.js +11 -4
  75. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  76. package/confirmdialog/confirmdialog.esm.js +11 -4
  77. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  78. package/confirmdialog/confirmdialog.js +11 -4
  79. package/confirmdialog/confirmdialog.min.js +1 -1
  80. package/confirmpopup/ConfirmPopup.d.ts +7 -0
  81. package/confirmpopup/ConfirmPopup.vue +7 -4
  82. package/confirmpopup/confirmpopup.cjs.js +13 -5
  83. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  84. package/confirmpopup/confirmpopup.esm.js +14 -6
  85. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  86. package/confirmpopup/confirmpopup.js +13 -5
  87. package/confirmpopup/confirmpopup.min.js +1 -1
  88. package/contextmenu/ContextMenu.d.ts +5 -1
  89. package/contextmenu/ContextMenuSub.vue +8 -5
  90. package/contextmenu/contextmenu.cjs.js +8 -5
  91. package/contextmenu/contextmenu.cjs.min.js +1 -1
  92. package/contextmenu/contextmenu.esm.js +8 -5
  93. package/contextmenu/contextmenu.esm.min.js +1 -1
  94. package/contextmenu/contextmenu.js +8 -5
  95. package/contextmenu/contextmenu.min.js +1 -1
  96. package/core/core.js +138 -68
  97. package/core/core.min.js +13 -12
  98. package/datatable/BodyCell.vue +1 -0
  99. package/datatable/ColumnFilter.vue +17 -6
  100. package/datatable/DataTable.d.ts +37 -9
  101. package/datatable/DataTable.vue +44 -23
  102. package/datatable/TableBody.vue +6 -2
  103. package/datatable/TableFooter.vue +17 -2
  104. package/datatable/TableHeader.vue +17 -2
  105. package/datatable/datatable.cjs.js +203 -126
  106. package/datatable/datatable.cjs.min.js +1 -1
  107. package/datatable/datatable.esm.js +203 -126
  108. package/datatable/datatable.esm.min.js +1 -1
  109. package/datatable/datatable.js +203 -126
  110. package/datatable/datatable.min.js +1 -1
  111. package/dataview/DataView.d.ts +9 -4
  112. package/dataview/DataView.vue +8 -8
  113. package/dataview/dataview.cjs.js +12 -12
  114. package/dataview/dataview.cjs.min.js +1 -1
  115. package/dataview/dataview.esm.js +12 -12
  116. package/dataview/dataview.esm.min.js +1 -1
  117. package/dataview/dataview.js +12 -12
  118. package/dataview/dataview.min.js +1 -1
  119. package/dialog/Dialog.vue +6 -1
  120. package/dialog/dialog.cjs.js +4 -2
  121. package/dialog/dialog.cjs.min.js +1 -1
  122. package/dialog/dialog.esm.js +4 -2
  123. package/dialog/dialog.esm.min.js +1 -1
  124. package/dialog/dialog.js +4 -2
  125. package/dialog/dialog.min.js +1 -1
  126. package/dock/Dock.d.ts +10 -1
  127. package/dock/Dock.vue +1 -1
  128. package/dock/DockSub.vue +13 -8
  129. package/dock/dock.cjs.js +24 -10
  130. package/dock/dock.cjs.min.js +1 -1
  131. package/dock/dock.esm.js +20 -10
  132. package/dock/dock.esm.min.js +1 -1
  133. package/dock/dock.js +25 -12
  134. package/dock/dock.min.js +1 -1
  135. package/dropdown/Dropdown.d.ts +56 -13
  136. package/dropdown/Dropdown.vue +1 -0
  137. package/dropdown/dropdown.cjs.js +1 -0
  138. package/dropdown/dropdown.cjs.min.js +1 -1
  139. package/dropdown/dropdown.esm.js +1 -0
  140. package/dropdown/dropdown.esm.min.js +1 -1
  141. package/dropdown/dropdown.js +1 -0
  142. package/dropdown/dropdown.min.js +1 -1
  143. package/fileupload/FileUpload.d.ts +5 -0
  144. package/galleria/Galleria.d.ts +20 -4
  145. package/inplace/Inplace.d.ts +1 -0
  146. package/inplace/Inplace.vue +12 -1
  147. package/inplace/inplace.cjs.js +13 -2
  148. package/inplace/inplace.cjs.min.js +1 -1
  149. package/inplace/inplace.esm.js +13 -2
  150. package/inplace/inplace.esm.min.js +1 -1
  151. package/inplace/inplace.js +13 -2
  152. package/inplace/inplace.min.js +1 -1
  153. package/inputnumber/InputNumber.d.ts +1 -1
  154. package/inputnumber/InputNumber.vue +19 -3
  155. package/inputnumber/inputnumber.cjs.js +19 -3
  156. package/inputnumber/inputnumber.cjs.min.js +1 -1
  157. package/inputnumber/inputnumber.esm.js +19 -3
  158. package/inputnumber/inputnumber.esm.min.js +1 -1
  159. package/inputnumber/inputnumber.js +19 -3
  160. package/inputnumber/inputnumber.min.js +1 -1
  161. package/inputtext/InputText.d.ts +1 -1
  162. package/inputtext/InputText.vue +1 -1
  163. package/inputtext/inputtext.cjs.js +2 -2
  164. package/inputtext/inputtext.cjs.min.js +1 -1
  165. package/inputtext/inputtext.esm.js +3 -3
  166. package/inputtext/inputtext.esm.min.js +1 -1
  167. package/inputtext/inputtext.js +2 -2
  168. package/inputtext/inputtext.min.js +1 -1
  169. package/listbox/Listbox.d.ts +48 -12
  170. package/megamenu/MegaMenu.d.ts +5 -1
  171. package/megamenu/MegaMenu.vue +11 -8
  172. package/megamenu/megamenu.cjs.js +11 -8
  173. package/megamenu/megamenu.cjs.min.js +1 -1
  174. package/megamenu/megamenu.esm.js +11 -8
  175. package/megamenu/megamenu.esm.min.js +1 -1
  176. package/megamenu/megamenu.js +11 -8
  177. package/megamenu/megamenu.min.js +1 -1
  178. package/menu/Menu.d.ts +5 -1
  179. package/menu/Menu.vue +6 -3
  180. package/menu/Menuitem.vue +5 -2
  181. package/menu/menu.cjs.js +11 -5
  182. package/menu/menu.cjs.min.js +1 -1
  183. package/menu/menu.esm.js +11 -5
  184. package/menu/menu.esm.min.js +1 -1
  185. package/menu/menu.js +11 -5
  186. package/menu/menu.min.js +1 -1
  187. package/menubar/Menubar.d.ts +5 -1
  188. package/menubar/Menubar.vue +1 -0
  189. package/menubar/MenubarSub.vue +8 -5
  190. package/menubar/menubar.cjs.js +9 -6
  191. package/menubar/menubar.cjs.min.js +1 -1
  192. package/menubar/menubar.esm.js +9 -6
  193. package/menubar/menubar.esm.min.js +1 -1
  194. package/menubar/menubar.js +9 -6
  195. package/menubar/menubar.min.js +1 -1
  196. package/message/Message.d.ts +1 -0
  197. package/message/Message.vue +6 -2
  198. package/message/message.cjs.js +6 -2
  199. package/message/message.cjs.min.js +1 -1
  200. package/message/message.esm.js +6 -2
  201. package/message/message.esm.min.js +1 -1
  202. package/message/message.js +6 -2
  203. package/message/message.min.js +1 -1
  204. package/multiselect/MultiSelect.d.ts +61 -14
  205. package/orderlist/OrderList.d.ts +8 -1
  206. package/orderlist/OrderList.vue +2 -0
  207. package/orderlist/orderlist.cjs.js +3 -1
  208. package/orderlist/orderlist.cjs.min.js +1 -1
  209. package/orderlist/orderlist.esm.js +3 -1
  210. package/orderlist/orderlist.esm.min.js +1 -1
  211. package/orderlist/orderlist.js +3 -1
  212. package/orderlist/orderlist.min.js +1 -1
  213. package/organizationchart/OrganizationChart.vue +1 -0
  214. package/organizationchart/organizationchart.cjs.js +1 -1
  215. package/organizationchart/organizationchart.cjs.min.js +1 -1
  216. package/organizationchart/organizationchart.esm.js +1 -1
  217. package/organizationchart/organizationchart.esm.min.js +1 -1
  218. package/organizationchart/organizationchart.js +1 -1
  219. package/organizationchart/organizationchart.min.js +1 -1
  220. package/package.json +5 -1
  221. package/paginator/Paginator.d.ts +10 -4
  222. package/paginator/Paginator.vue +4 -4
  223. package/paginator/paginator.cjs.js +4 -4
  224. package/paginator/paginator.cjs.min.js +1 -1
  225. package/paginator/paginator.esm.js +4 -4
  226. package/paginator/paginator.esm.min.js +1 -1
  227. package/paginator/paginator.js +4 -4
  228. package/paginator/paginator.min.js +1 -1
  229. package/panel/Panel.d.ts +1 -0
  230. package/panel/Panel.vue +1 -1
  231. package/panelmenu/PanelMenu.d.ts +5 -3
  232. package/panelmenu/PanelMenu.vue +6 -3
  233. package/panelmenu/PanelMenuSub.vue +8 -5
  234. package/panelmenu/panelmenu.cjs.js +14 -8
  235. package/panelmenu/panelmenu.cjs.min.js +1 -1
  236. package/panelmenu/panelmenu.esm.js +14 -8
  237. package/panelmenu/panelmenu.esm.min.js +1 -1
  238. package/panelmenu/panelmenu.js +14 -8
  239. package/panelmenu/panelmenu.min.js +1 -1
  240. package/picklist/PickList.d.ts +14 -3
  241. package/picklist/PickList.vue +10 -4
  242. package/picklist/picklist.cjs.js +13 -7
  243. package/picklist/picklist.cjs.min.js +1 -1
  244. package/picklist/picklist.esm.js +13 -7
  245. package/picklist/picklist.esm.min.js +1 -1
  246. package/picklist/picklist.js +13 -7
  247. package/picklist/picklist.min.js +1 -1
  248. package/progressbar/ProgressBar.vue +13 -12
  249. package/progressbar/progressbar.cjs.js +13 -12
  250. package/progressbar/progressbar.cjs.min.js +1 -1
  251. package/progressbar/progressbar.esm.js +14 -13
  252. package/progressbar/progressbar.esm.min.js +1 -1
  253. package/progressbar/progressbar.js +13 -12
  254. package/progressbar/progressbar.min.js +1 -1
  255. package/rating/Rating.vue +1 -1
  256. package/rating/rating.cjs.js +1 -1
  257. package/rating/rating.cjs.min.js +1 -1
  258. package/rating/rating.esm.js +1 -1
  259. package/rating/rating.esm.min.js +1 -1
  260. package/rating/rating.js +1 -1
  261. package/rating/rating.min.js +1 -1
  262. package/resources/primevue.css +5 -0
  263. package/resources/primevue.min.css +1 -1
  264. package/resources/themes/arya-blue/theme.css +56 -15
  265. package/resources/themes/arya-green/theme.css +56 -15
  266. package/resources/themes/arya-orange/theme.css +56 -15
  267. package/resources/themes/arya-purple/theme.css +56 -15
  268. package/resources/themes/bootstrap4-dark-blue/theme.css +53 -19
  269. package/resources/themes/bootstrap4-dark-purple/theme.css +53 -19
  270. package/resources/themes/bootstrap4-light-blue/theme.css +53 -19
  271. package/resources/themes/bootstrap4-light-purple/theme.css +53 -19
  272. package/resources/themes/fluent-light/theme.css +56 -15
  273. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
  274. package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
  275. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
  276. package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
  277. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
  278. package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
  279. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
  280. package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
  281. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
  282. package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
  283. package/resources/themes/lara-dark-blue/theme.css +5414 -0
  284. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
  285. package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
  286. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
  287. package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
  288. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
  289. package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
  290. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
  291. package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
  292. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
  293. package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  294. package/resources/themes/lara-dark-indigo/theme.css +5414 -0
  295. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
  296. package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
  297. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
  298. package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
  299. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
  300. package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
  301. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
  302. package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
  303. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
  304. package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
  305. package/resources/themes/lara-dark-purple/theme.css +5414 -0
  306. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
  307. package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
  308. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
  309. package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
  310. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
  311. package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
  312. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
  313. package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
  314. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
  315. package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
  316. package/resources/themes/lara-dark-teal/theme.css +5414 -0
  317. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
  318. package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
  319. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
  320. package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
  321. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
  322. package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
  323. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
  324. package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
  325. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
  326. package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
  327. package/resources/themes/lara-light-blue/theme.css +5414 -0
  328. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
  329. package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
  330. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
  331. package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
  332. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
  333. package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
  334. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
  335. package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
  336. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
  337. package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
  338. package/resources/themes/lara-light-indigo/theme.css +5414 -0
  339. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
  340. package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
  341. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
  342. package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
  343. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
  344. package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
  345. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
  346. package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
  347. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
  348. package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
  349. package/resources/themes/lara-light-purple/theme.css +5414 -0
  350. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
  351. package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
  352. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
  353. package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
  354. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
  355. package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
  356. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
  357. package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
  358. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
  359. package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
  360. package/resources/themes/lara-light-teal/theme.css +5414 -0
  361. package/resources/themes/luna-amber/theme.css +53 -19
  362. package/resources/themes/luna-blue/theme.css +53 -19
  363. package/resources/themes/luna-green/theme.css +53 -19
  364. package/resources/themes/luna-pink/theme.css +53 -19
  365. package/resources/themes/md-dark-deeppurple/theme.css +244 -47
  366. package/resources/themes/md-dark-indigo/theme.css +244 -47
  367. package/resources/themes/md-light-deeppurple/theme.css +244 -47
  368. package/resources/themes/md-light-indigo/theme.css +244 -47
  369. package/resources/themes/mdc-dark-deeppurple/theme.css +244 -47
  370. package/resources/themes/mdc-dark-indigo/theme.css +244 -47
  371. package/resources/themes/mdc-light-deeppurple/theme.css +244 -47
  372. package/resources/themes/mdc-light-indigo/theme.css +244 -47
  373. package/resources/themes/nova/theme.css +53 -19
  374. package/resources/themes/nova-accent/theme.css +53 -19
  375. package/resources/themes/nova-alt/theme.css +53 -19
  376. package/resources/themes/nova-vue/theme.css +53 -19
  377. package/resources/themes/rhea/theme.css +53 -19
  378. package/resources/themes/saga-blue/theme.css +56 -15
  379. package/resources/themes/saga-green/theme.css +56 -15
  380. package/resources/themes/saga-orange/theme.css +56 -15
  381. package/resources/themes/saga-purple/theme.css +56 -15
  382. package/resources/themes/tailwind-light/theme.css +67 -18
  383. package/resources/themes/vela-blue/theme.css +56 -15
  384. package/resources/themes/vela-green/theme.css +56 -15
  385. package/resources/themes/vela-orange/theme.css +56 -15
  386. package/resources/themes/vela-purple/theme.css +56 -15
  387. package/selectbutton/SelectButton.d.ts +13 -5
  388. package/selectbutton/SelectButton.vue +8 -2
  389. package/selectbutton/selectbutton.cjs.js +14 -9
  390. package/selectbutton/selectbutton.cjs.min.js +1 -1
  391. package/selectbutton/selectbutton.esm.js +14 -9
  392. package/selectbutton/selectbutton.esm.min.js +1 -1
  393. package/selectbutton/selectbutton.js +14 -9
  394. package/selectbutton/selectbutton.min.js +1 -1
  395. package/speeddial/SpeedDial.d.ts +5 -1
  396. package/steps/Steps.d.ts +5 -3
  397. package/steps/Steps.vue +5 -2
  398. package/steps/steps.cjs.js +5 -2
  399. package/steps/steps.cjs.min.js +1 -1
  400. package/steps/steps.esm.js +5 -2
  401. package/steps/steps.esm.min.js +1 -1
  402. package/steps/steps.js +5 -2
  403. package/steps/steps.min.js +1 -1
  404. package/tabmenu/TabMenu.d.ts +5 -3
  405. package/tabmenu/TabMenu.vue +6 -3
  406. package/tabmenu/tabmenu.cjs.js +6 -3
  407. package/tabmenu/tabmenu.cjs.min.js +1 -1
  408. package/tabmenu/tabmenu.esm.js +6 -3
  409. package/tabmenu/tabmenu.esm.min.js +1 -1
  410. package/tabmenu/tabmenu.js +6 -3
  411. package/tabmenu/tabmenu.min.js +1 -1
  412. package/terminalservice/TerminalService.d.ts +9 -6
  413. package/tieredmenu/TieredMenu.d.ts +5 -3
  414. package/tieredmenu/TieredMenuSub.vue +7 -4
  415. package/tieredmenu/tieredmenu.cjs.js +7 -4
  416. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  417. package/tieredmenu/tieredmenu.esm.js +7 -4
  418. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  419. package/tieredmenu/tieredmenu.js +7 -4
  420. package/tieredmenu/tieredmenu.min.js +1 -1
  421. package/timeline/Timeline.d.ts +8 -3
  422. package/toast/Toast.d.ts +7 -0
  423. package/toolbar/Toolbar.vue +2 -2
  424. package/toolbar/toolbar.cjs.js +2 -2
  425. package/toolbar/toolbar.cjs.min.js +1 -1
  426. package/toolbar/toolbar.esm.js +2 -2
  427. package/toolbar/toolbar.esm.min.js +1 -1
  428. package/toolbar/toolbar.js +2 -2
  429. package/toolbar/toolbar.min.js +1 -1
  430. package/tree/Tree.d.ts +5 -1
  431. package/tree/TreeNode.vue +4 -1
  432. package/tree/tree.cjs.js +4 -1
  433. package/tree/tree.cjs.min.js +1 -1
  434. package/tree/tree.esm.js +4 -1
  435. package/tree/tree.esm.min.js +1 -1
  436. package/tree/tree.js +4 -1
  437. package/tree/tree.min.js +1 -1
  438. package/treeselect/TreeSelect.d.ts +20 -3
  439. package/treeselect/TreeSelect.vue +9 -0
  440. package/treeselect/treeselect.cjs.js +9 -0
  441. package/treeselect/treeselect.cjs.min.js +1 -1
  442. package/treeselect/treeselect.esm.js +9 -0
  443. package/treeselect/treeselect.esm.min.js +1 -1
  444. package/treeselect/treeselect.js +9 -0
  445. package/treeselect/treeselect.min.js +1 -1
  446. package/treetable/TreeTable.d.ts +2 -2
  447. package/treetable/TreeTable.vue +10 -10
  448. package/treetable/TreeTableRow.vue +2 -2
  449. package/treetable/treetable.cjs.js +15 -15
  450. package/treetable/treetable.cjs.min.js +1 -1
  451. package/treetable/treetable.esm.js +15 -15
  452. package/treetable/treetable.esm.min.js +1 -1
  453. package/treetable/treetable.js +15 -15
  454. package/treetable/treetable.min.js +1 -1
  455. package/vetur-attributes.json +20 -0
  456. package/vetur-tags.json +8 -3
  457. package/virtualscroller/VirtualScroller.d.ts +52 -6
  458. package/virtualscroller/VirtualScroller.vue +1 -1
  459. package/virtualscroller/virtualscroller.cjs.js +1 -1
  460. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  461. package/virtualscroller/virtualscroller.esm.js +1 -1
  462. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  463. package/virtualscroller/virtualscroller.js +1 -1
  464. package/virtualscroller/virtualscroller.min.js +1 -1
  465. package/web-types.json +178 -9
@@ -240,7 +240,7 @@ this.primevue.treetable = (function (utils, api, Ripple, vue, Paginator) {
240
240
  nodeTouched: false,
241
241
  methods: {
242
242
  columnProp(col, prop) {
243
- return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
243
+ return utils.ObjectUtils.getVNodeProp(col, prop);
244
244
  },
245
245
  toggle() {
246
246
  this.$emit('node-toggle', this.node);
@@ -983,7 +983,7 @@ this.primevue.treetable = (function (utils, api, Ripple, vue, Paginator) {
983
983
  },
984
984
  methods: {
985
985
  columnProp(col, prop) {
986
- return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
986
+ return utils.ObjectUtils.getVNodeProp(col, prop);
987
987
  },
988
988
  onNodeToggle(node) {
989
989
  const key = node.key;
@@ -1396,7 +1396,7 @@ this.primevue.treetable = (function (utils, api, Ripple, vue, Paginator) {
1396
1396
  else if (this.columnResizeMode === 'expand') {
1397
1397
  this.$refs.table.style.width = this.$refs.table.offsetWidth + delta + 'px';
1398
1398
 
1399
- if (!this.scrollable)
1399
+ if (!this.scrollable)
1400
1400
  this.resizeColumnElement.style.width = newColumnWidth + 'px';
1401
1401
  else
1402
1402
  this.resizeTableCells(newColumnWidth);
@@ -1675,19 +1675,19 @@ this.primevue.treetable = (function (utils, api, Ripple, vue, Paginator) {
1675
1675
  onPage: _cache[1] || (_cache[1] = $event => ($options.onPage($event))),
1676
1676
  alwaysShow: $props.alwaysShowPaginator
1677
1677
  }, vue.createSlots({ _: 2 }, [
1678
- (_ctx.$slots.paginatorLeft)
1678
+ (_ctx.$slots.paginatorstart)
1679
1679
  ? {
1680
- name: "left",
1680
+ name: "start",
1681
1681
  fn: vue.withCtx(() => [
1682
- vue.renderSlot(_ctx.$slots, "paginatorLeft")
1682
+ vue.renderSlot(_ctx.$slots, "paginatorstart")
1683
1683
  ])
1684
1684
  }
1685
1685
  : undefined,
1686
- (_ctx.$slots.paginatorRight)
1686
+ (_ctx.$slots.paginatorend)
1687
1687
  ? {
1688
- name: "right",
1688
+ name: "end",
1689
1689
  fn: vue.withCtx(() => [
1690
- vue.renderSlot(_ctx.$slots, "paginatorRight")
1690
+ vue.renderSlot(_ctx.$slots, "paginatorend")
1691
1691
  ])
1692
1692
  }
1693
1693
  : undefined
@@ -1804,19 +1804,19 @@ this.primevue.treetable = (function (utils, api, Ripple, vue, Paginator) {
1804
1804
  onPage: _cache[2] || (_cache[2] = $event => ($options.onPage($event))),
1805
1805
  alwaysShow: $props.alwaysShowPaginator
1806
1806
  }, vue.createSlots({ _: 2 }, [
1807
- (_ctx.$slots.paginatorLeft)
1807
+ (_ctx.$slots.paginatorstart)
1808
1808
  ? {
1809
- name: "left",
1809
+ name: "start",
1810
1810
  fn: vue.withCtx(() => [
1811
- vue.renderSlot(_ctx.$slots, "paginatorLeft")
1811
+ vue.renderSlot(_ctx.$slots, "paginatorstart")
1812
1812
  ])
1813
1813
  }
1814
1814
  : undefined,
1815
- (_ctx.$slots.paginatorRight)
1815
+ (_ctx.$slots.paginatorend)
1816
1816
  ? {
1817
- name: "right",
1817
+ name: "end",
1818
1818
  fn: vue.withCtx(() => [
1819
- vue.renderSlot(_ctx.$slots, "paginatorRight")
1819
+ vue.renderSlot(_ctx.$slots, "paginatorend")
1820
1820
  ])
1821
1821
  }
1822
1822
  : undefined
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.treetable=function(e,t,l,o,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(l),s=i(n),a={name:"BodyCell",emits:["node-toggle","checkbox-toggle"],props:{node:{type:Object,default:null},column:{type:Object,default:null},level:{type:Number,default:0},indentation:{type:Number,default:1},leaf:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},selectionMode:{type:String,default:null},checked:{type:Boolean,default:!1},partialChecked:{type:Boolean,default:!1}},data:()=>({styleObject:{},checkboxFocused:!1}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{toggle(){this.$emit("node-toggle",this.node)},columnProp(t){return e.ObjectUtils.getVNodeProp(this.column,t)},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let t=0,l=this.$el.nextElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.right)),this.styleObject.right=t+"px"}else{let t=0,l=this.$el.previousElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.left)),this.styleObject.left=t+"px"}}},resolveFieldData:(t,l)=>e.ObjectUtils.resolveFieldData(t,l),toggleCheckbox(){this.$emit("checkbox-toggle")},onCheckboxFocus(){this.checkboxFocused=!0},onCheckboxBlur(){this.checkboxFocused=!1}},computed:{containerClass(){return[this.columnProp("bodyClass"),this.columnProp("class"),{"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("bodyStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},togglerStyle(){return{marginLeft:this.level*this.indentation+"rem",visibility:this.leaf?"hidden":"visible"}},togglerIcon(){return["p-treetable-toggler-icon pi",{"pi-chevron-right":!this.expanded,"pi-chevron-down":this.expanded}]},checkboxSelectionMode(){return"checkbox"===this.selectionMode},checkboxClass(){return["p-checkbox-box",{"p-highlight":this.checked,"p-focus":this.checkboxFocused,"p-indeterminate":this.partialChecked}]},checkboxIcon(){return["p-checkbox-icon",{"pi pi-check":this.checked,"pi pi-minus":this.partialChecked}]}},directives:{ripple:r.default}};const c={class:"p-hidden-accessible"},d={key:3};a.render=function(e,t,l,n,i,r){const s=o.resolveDirective("ripple");return o.openBlock(),o.createBlock("td",{style:r.containerStyle,class:r.containerClass},[r.columnProp("expander")?o.withDirectives((o.openBlock(),o.createBlock("button",{key:0,type:"button",class:"p-treetable-toggler p-link",onClick:t[1]||(t[1]=(...e)=>r.toggle&&r.toggle(...e)),style:r.togglerStyle,tabindex:"-1"},[o.createVNode("i",{class:r.togglerIcon},null,2)],4)),[[s]]):o.createCommentVNode("",!0),r.checkboxSelectionMode&&r.columnProp("expander")?(o.openBlock(),o.createBlock("div",{key:1,class:"p-checkbox p-treetable-checkbox p-component",onClick:t[4]||(t[4]=(...e)=>r.toggleCheckbox&&r.toggleCheckbox(...e)),role:"checkbox","aria-checked":l.checked},[o.createVNode("div",c,[o.createVNode("input",{type:"checkbox",onFocus:t[2]||(t[2]=(...e)=>r.onCheckboxFocus&&r.onCheckboxFocus(...e)),onBlur:t[3]||(t[3]=(...e)=>r.onCheckboxBlur&&r.onCheckboxBlur(...e))},null,32)]),o.createVNode("div",{ref:"checkboxEl",class:r.checkboxClass},[o.createVNode("span",{class:r.checkboxIcon},null,2)],2)],8,["aria-checked"])):o.createCommentVNode("",!0),l.column.children&&l.column.children.body?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.column.children.body),{key:2,node:l.node,column:l.column},null,8,["node","column"])):(o.openBlock(),o.createBlock("span",d,o.toDisplayString(r.resolveFieldData(l.node.data,r.columnProp("field"))),1))],6)};var h={name:"TreeTableRow",emits:["node-click","node-toggle","checkbox-change","nodeClick","nodeToggle","checkboxChange"],props:{node:{type:null,default:null},parentNode:{type:null,default:null},columns:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},level:{type:Number,default:0},indentation:{type:Number,default:1}},nodeTouched:!1,methods:{columnProp:(e,t)=>e.props?e.type.props[t].type===Boolean&&""===e.props[t]||e.props[t]:null,toggle(){this.$emit("node-toggle",this.node)},onClick(t){e.DomHandler.isClickable(t.target)||e.DomHandler.hasClass(t.target,"p-treetable-toggler")||e.DomHandler.hasClass(t.target.parentElement,"p-treetable-toggler")||(this.$emit("node-click",{originalEvent:t,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1)},onTouchEnd(){this.nodeTouched=!0},onKeyDown(e){if(e.target===this.$el){const t=this.$el;switch(e.which){case 40:{const l=t.nextElementSibling;l&&l.focus(),e.preventDefault();break}case 38:{const l=t.previousElementSibling;l&&l.focus(),e.preventDefault();break}case 37:case 39:this.leaf||(this.$emit("node-toggle",this.node),e.preventDefault());break;case 13:this.onClick(e),e.preventDefault()}}},toggleCheckbox(){let e=this.selectionKeys?{...this.selectionKeys}:{};const t=!this.checked;this.propagateDown(this.node,t,e),this.$emit("checkbox-change",{node:this.node,check:t,selectionKeys:e})},propagateDown(e,t,l){if(t?l[e.key]={checked:!0,partialChecked:!1}:delete l[e.key],e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,t,l)},propagateUp(e){let t=e.check,l={...e.selectionKeys},o=0,n=!1;for(let e of this.node.children)l[e.key]&&l[e.key].checked?o++:l[e.key]&&l[e.key].partialChecked&&(n=!0);t&&o===this.node.children.length?l[this.node.key]={checked:!0,partialChecked:!1}:(t||delete l[this.node.key],n||o>0&&o!==this.node.children.length?l[this.node.key]={checked:!1,partialChecked:!0}:l[this.node.key]={checked:!1,partialChecked:!1}),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:l})},onCheckboxChange(e){let t=e.check,l={...e.selectionKeys},o=0,n=!1;for(let e of this.node.children)l[e.key]&&l[e.key].checked?o++:l[e.key]&&l[e.key].partialChecked&&(n=!0);t&&o===this.node.children.length?l[this.node.key]={checked:!0,partialChecked:!1}:(t||delete l[this.node.key],n||o>0&&o!==this.node.children.length?l[this.node.key]={checked:!1,partialChecked:!0}:l[this.node.key]={checked:!1,partialChecked:!1}),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:l})}},computed:{containerClass(){return[this.node.styleClass,{"p-highlight":this.selected}]},hasChildren(){return this.node.children&&this.node.children.length>0},expanded(){return this.expandedKeys&&!0===this.expandedKeys[this.node.key]},leaf(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},selected(){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[this.node.key]},childLevel(){return this.level+1},checked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].checked)},partialChecked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].partialChecked)}},components:{TTBodyCell:a}};h.render=function(e,t,l,n,i,r){const s=o.resolveComponent("TTBodyCell"),a=o.resolveComponent("TreeTableRow",!0);return o.openBlock(),o.createBlock(o.Fragment,null,[o.createVNode("tr",{class:r.containerClass,onClick:t[2]||(t[2]=(...e)=>r.onClick&&r.onClick(...e)),onKeydown:t[3]||(t[3]=(...e)=>r.onKeyDown&&r.onKeyDown(...e)),onTouchend:t[4]||(t[4]=(...e)=>r.onTouchEnd&&r.onTouchEnd(...e)),style:l.node.style,tabindex:"0"},[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(l.columns,((n,i)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(n,"columnKey")||r.columnProp(n,"field")||i},[r.columnProp(n,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(s,{key:0,column:n,node:l.node,level:l.level,leaf:r.leaf,indentation:l.indentation,expanded:r.expanded,selectionMode:l.selectionMode,checked:r.checked,partialChecked:r.partialChecked,onNodeToggle:t[1]||(t[1]=t=>e.$emit("node-toggle",t)),onCheckboxToggle:r.toggleCheckbox},null,8,["column","node","level","leaf","indentation","expanded","selectionMode","checked","partialChecked","onCheckboxToggle"]))],64)))),128))],38),r.expanded&&l.node.children&&l.node.children.length?(o.openBlock(!0),o.createBlock(o.Fragment,{key:0},o.renderList(l.node.children,(n=>(o.openBlock(),o.createBlock(a,{key:n.key,columns:l.columns,node:n,parentNode:l.node,level:l.level+1,expandedKeys:l.expandedKeys,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,indentation:l.indentation,onNodeToggle:t[5]||(t[5]=t=>e.$emit("node-toggle",t)),onNodeClick:t[6]||(t[6]=t=>e.$emit("node-click",t)),onCheckboxChange:r.onCheckboxChange},null,8,["columns","node","parentNode","level","expandedKeys","selectionMode","selectionKeys","indentation","onCheckboxChange"])))),128)):o.createCommentVNode("",!0)],64)};var p={name:"HeaderCell",emits:["column-click","column-resizestart"],props:{column:{type:Object,default:null},resizableColumns:{type:Boolean,default:!1},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},multiSortMeta:{type:Array,default:null},sortMode:{type:String,default:"single"}},data:()=>({styleObject:{}}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp(t){return e.ObjectUtils.getVNodeProp(this.column,t)},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let t=0,l=this.$el.nextElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.right)),this.styleObject.right=t+"px"}else{let t=0,l=this.$el.previousElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.left)),this.styleObject.left=t+"px"}let t=this.$el.parentElement.nextElementSibling;if(t){let l=e.DomHandler.index(this.$el);t.children[l].style.left=this.styleObject.left,t.children[l].style.right=this.styleObject.right}}},onClick(e){this.$emit("column-click",{originalEvent:e,column:this.column})},onKeyDown(t){13===t.which&&"TH"===t.currentTarget.nodeName&&e.DomHandler.hasClass(t.currentTarget,"p-sortable-column")&&this.$emit("column-click",{originalEvent:t,column:this.column})},onResizeStart(e){this.$emit("column-resizestart",e)},getMultiSortMetaIndex(){let e=-1;for(let t=0;t<this.multiSortMeta.length;t++){let l=this.multiSortMeta[t];if(l.field===this.columnProp("field")||l.field===this.columnProp("sortField")){e=t;break}}return e},isMultiSorted(){return this.columnProp("sortable")&&this.getMultiSortMetaIndex()>-1},isColumnSorted(){return"single"===this.sortMode?this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")):this.isMultiSorted()}},computed:{containerClass(){return[this.columnProp("headerClass"),this.columnProp("class"),{"p-sortable-column":this.columnProp("sortable"),"p-resizable-column":this.resizableColumns,"p-highlight":this.isColumnSorted(),"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("headerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},sortableColumnIcon(){let e=!1,t=null;if("single"===this.sortMode)e=this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")),t=e?this.sortOrder:0;else if("multiple"===this.sortMode){let l=this.getMultiSortMetaIndex();l>-1&&(e=!0,t=this.multiSortMeta[l].order)}return["p-sortable-column-icon pi pi-fw",{"pi-sort-alt":!e,"pi-sort-amount-up-alt":e&&t>0,"pi-sort-amount-down":e&&t<0}]},ariaSort(){if(this.columnProp("sortable")){const e=this.sortableColumnIcon;return e[1]["pi-sort-amount-down"]?"descending":e[1]["pi-sort-amount-up-alt"]?"ascending":"none"}return null}}};const u={key:2,class:"p-column-title"},m={key:4,class:"p-sortable-column-badge"};p.render=function(e,t,l,n,i,r){return o.openBlock(),o.createBlock("th",{style:[r.containerStyle],class:r.containerClass,onClick:t[2]||(t[2]=(...e)=>r.onClick&&r.onClick(...e)),onKeydown:t[3]||(t[3]=(...e)=>r.onKeyDown&&r.onKeyDown(...e)),tabindex:r.columnProp("sortable")?"0":null,"aria-sort":r.ariaSort},[l.resizableColumns&&!r.columnProp("frozen")?(o.openBlock(),o.createBlock("span",{key:0,class:"p-column-resizer",onMousedown:t[1]||(t[1]=(...e)=>r.onResizeStart&&r.onResizeStart(...e))},null,32)):o.createCommentVNode("",!0),l.column.children&&l.column.children.header?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.column.children.header),{key:1,column:l.column},null,8,["column"])):o.createCommentVNode("",!0),r.columnProp("header")?(o.openBlock(),o.createBlock("span",u,o.toDisplayString(r.columnProp("header")),1)):o.createCommentVNode("",!0),r.columnProp("sortable")?(o.openBlock(),o.createBlock("span",{key:3,class:r.sortableColumnIcon},null,2)):o.createCommentVNode("",!0),r.isMultiSorted()?(o.openBlock(),o.createBlock("span",m,o.toDisplayString(r.getMultiSortMetaIndex()+1),1)):o.createCommentVNode("",!0)],46,["tabindex","aria-sort"])};var b={name:"FooterCell",props:{column:{type:Object,default:null}},data:()=>({styleObject:{}}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp(t){return e.ObjectUtils.getVNodeProp(this.column,t)},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let t=0,l=this.$el.nextElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.right)),this.styleObject.right=t+"px"}else{let t=0,l=this.$el.previousElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.left)),this.styleObject.left=t+"px"}}}},computed:{containerClass(){return[this.columnProp("footerClass"),this.columnProp("class"),{"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("footerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]}}};b.render=function(e,t,l,n,i,r){return o.openBlock(),o.createBlock("td",{style:r.containerStyle,class:r.containerClass},[l.column.children&&l.column.children.footer?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.column.children.footer),{key:0,column:e.col},null,8,["column"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(r.columnProp("footer")),1)],6)};var f={name:"TreeTable",emits:["node-expand","node-collapse","update:expandedKeys","update:selectionKeys","node-select","node-unselect","update:first","update:rows","page","update:sortField","update:sortOrder","update:multiSortMeta","sort","filter","column-resize-end"],props:{value:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},metaKeySelection:{type:Boolean,default:!0},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},lazy:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner"},rowHover:{type:Boolean,default:!1},autoLayout:{type:Boolean,default:!1},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},defaultSortOrder:{type:Number,default:1},multiSortMeta:{type:Array,default:null},sortMode:{type:String,default:"single"},removableSort:{type:Boolean,default:!1},filters:{type:Object,default:null},filterMode:{type:String,default:"lenient"},filterLocale:{type:String,default:void 0},resizableColumns:{type:Boolean,default:!1},columnResizeMode:{type:String,default:"fit"},indentation:{type:Number,default:1},showGridlines:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},scrollDirection:{type:String,default:"vertical"},scrollHeight:{type:String,default:null},responsiveLayout:{type:String,default:null}},documentColumnResizeListener:null,documentColumnResizeEndListener:null,lastResizeHelperX:null,resizeColumnElement:null,data(){return{d_expandedKeys:this.expandedKeys||{},d_first:this.first,d_rows:this.rows,d_sortField:this.sortField,d_sortOrder:this.sortOrder,d_multiSortMeta:this.multiSortMeta?[...this.multiSortMeta]:[]}},watch:{expandedKeys(e){this.d_expandedKeys=e},first(e){this.d_first=e},rows(e){this.d_rows=e},sortField(e){this.d_sortField=e},sortOrder(e){this.d_sortOrder=e},multiSortMeta(e){this.d_multiSortMeta=e}},mounted(){this.scrollable&&"vertical"!==this.scrollDirection&&this.updateScrollWidth()},updated(){this.scrollable&&"vertical"!==this.scrollDirection&&this.updateScrollWidth()},methods:{columnProp:(e,t)=>e.props?e.type.props[t].type===Boolean&&""===e.props[t]||e.props[t]:null,onNodeToggle(e){const t=e.key;this.d_expandedKeys[t]?(delete this.d_expandedKeys[t],this.$emit("node-collapse",e)):(this.d_expandedKeys[t]=!0,this.$emit("node-expand",e)),this.d_expandedKeys={...this.d_expandedKeys},this.$emit("update:expandedKeys",this.d_expandedKeys)},onNodeClick(e){if(this.rowSelectionMode&&!1!==e.node.selectable){const t=!e.nodeTouched&&this.metaKeySelection?this.handleSelectionWithMetaKey(e):this.handleSelectionWithoutMetaKey(e);this.$emit("update:selectionKeys",t)}},handleSelectionWithMetaKey(e){const t=e.originalEvent,l=e.node,o=t.metaKey||t.ctrlKey;let n;return this.isNodeSelected(l)&&o?(this.isSingleSelectionMode()?n={}:(n={...this.selectionKeys},delete n[l.key]),this.$emit("node-unselect",l)):(this.isSingleSelectionMode()?n={}:this.isMultipleSelectionMode()&&(n=o&&this.selectionKeys?{...this.selectionKeys}:{}),n[l.key]=!0,this.$emit("node-select",l)),n},handleSelectionWithoutMetaKey(e){const t=e.node,l=this.isNodeSelected(t);let o;return this.isSingleSelectionMode()?l?(o={},this.$emit("node-unselect",t)):(o={},o[t.key]=!0,this.$emit("node-select",t)):l?(o={...this.selectionKeys},delete o[t.key],this.$emit("node-unselect",t)):(o=this.selectionKeys?{...this.selectionKeys}:{},o[t.key]=!0,this.$emit("node-select",t)),o},onCheckboxChange(e){this.$emit("update:selectionKeys",e.selectionKeys),e.check?this.$emit("node-select",e.node):this.$emit("node-unselect",e.node)},isSingleSelectionMode(){return"single"===this.selectionMode},isMultipleSelectionMode(){return"multiple"===this.selectionMode},onPage(e){this.d_first=e.first,this.d_rows=e.rows;let t=this.createLazyLoadEvent(e);t.pageCount=e.pageCount,t.page=e.page,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},resetPage(){this.d_first=0,this.$emit("update:first",this.d_first)},getFilterColumnHeaderClass(e){return["p-filter-column",this.columnProp(e,"filterHeaderClass"),{"p-frozen-column":this.columnProp(e,"frozen")}]},onColumnHeaderClick(t){let l=t.originalEvent,o=t.column;if(this.columnProp(o,"sortable")){const t=l.target,n=this.columnProp(o,"sortField")||this.columnProp(o,"field");if(e.DomHandler.hasClass(t,"p-sortable-column")||e.DomHandler.hasClass(t,"p-column-title")||e.DomHandler.hasClass(t,"p-sortable-column-icon")||e.DomHandler.hasClass(t.parentElement,"p-sortable-column-icon")){if(e.DomHandler.clearSelection(),"single"===this.sortMode)this.d_sortField===n?this.removableSort&&-1*this.d_sortOrder===this.defaultSortOrder?(this.d_sortOrder=null,this.d_sortField=null):this.d_sortOrder=-1*this.d_sortOrder:(this.d_sortOrder=this.defaultSortOrder,this.d_sortField=n),this.$emit("update:sortField",this.d_sortField),this.$emit("update:sortOrder",this.d_sortOrder),this.resetPage();else if("multiple"===this.sortMode){l.metaKey||l.ctrlKey||(this.d_multiSortMeta=this.d_multiSortMeta.filter((e=>e.field===n))),this.addMultiSortField(n),this.$emit("update:multiSortMeta",this.d_multiSortMeta)}this.$emit("sort",this.createLazyLoadEvent(l))}}},addMultiSortField(e){let t=this.d_multiSortMeta.findIndex((t=>t.field===e));t>=0?this.removableSort&&-1*this.d_multiSortMeta[t].order===this.defaultSortOrder?this.d_multiSortMeta.splice(t,1):this.d_multiSortMeta[t]={field:e,order:-1*this.d_multiSortMeta[t].order}:this.d_multiSortMeta.push({field:e,order:this.defaultSortOrder}),this.d_multiSortMeta=[...this.d_multiSortMeta]},sortSingle(e){return this.sortNodesSingle(e)},sortNodesSingle(t){let l=[...t];return l.sort(((t,l)=>{const o=e.ObjectUtils.resolveFieldData(t.data,this.d_sortField),n=e.ObjectUtils.resolveFieldData(l.data,this.d_sortField);let i=null;return i=null==o&&null!=n?-1:null!=o&&null==n?1:null==o&&null==n?0:"string"==typeof o&&"string"==typeof n?o.localeCompare(n,void 0,{numeric:!0}):o<n?-1:o>n?1:0,this.d_sortOrder*i})),l},sortMultiple(e){return this.sortNodesMultiple(e)},sortNodesMultiple(e){let t=[...e];return t.sort(((e,t)=>this.multisortField(e,t,0))),t},multisortField(t,l,o){const n=e.ObjectUtils.resolveFieldData(t.data,this.d_multiSortMeta[o].field),i=e.ObjectUtils.resolveFieldData(l.data,this.d_multiSortMeta[o].field);let r=null;if(null==n&&null!=i)r=-1;else if(null!=n&&null==i)r=1;else if(null==n&&null==i)r=0;else{if(n===i)return this.d_multiSortMeta.length-1>o?this.multisortField(t,l,o+1):0;if(("string"==typeof n||n instanceof String)&&("string"==typeof i||i instanceof String))return this.d_multiSortMeta[o].order*n.localeCompare(i,void 0,{numeric:!0});r=n<i?-1:1}return this.d_multiSortMeta[o].order*r},filter(e){let l=[];const o="strict"===this.filterMode;for(let n of e){let e={...n},i=!0,r=!1;for(let l=0;l<this.columns.length;l++){let n=this.columns[l],s=this.columnProp(n,"field");if(Object.prototype.hasOwnProperty.call(this.filters,this.columnProp(n,"field"))){let l=this.columnProp(n,"filterMatchMode")||"startsWith",r={filterField:s,filterValue:this.filters[this.columnProp(n,"field")],filterConstraint:t.FilterService.filters[l],strict:o};if((!o||this.findFilteredNodes(e,r)||this.isFilterMatched(e,r))&&(o||this.isFilterMatched(e,r)||this.findFilteredNodes(e,r))||(i=!1),!i)break}if(this.hasGlobalFilter()&&!r){let l={...e},n={filterField:s,filterValue:this.filters.global,filterConstraint:t.FilterService.filters.contains,strict:o};(o&&(this.findFilteredNodes(l,n)||this.isFilterMatched(l,n))||!o&&(this.isFilterMatched(l,n)||this.findFilteredNodes(l,n)))&&(r=!0,e=l)}}let s=i;this.hasGlobalFilter()&&(s=i&&r),s&&l.push(e)}let n=this.createLazyLoadEvent(event);return n.filteredValue=l,this.$emit("filter",n),l},findFilteredNodes(e,t){if(e){let l=!1;if(e.children){let o=[...e.children];e.children=[];for(let n of o){let o={...n};this.isFilterMatched(o,t)&&(l=!0,e.children.push(o))}}if(l)return!0}},isFilterMatched(t,{filterField:l,filterValue:o,filterConstraint:n,strict:i}){let r=!1;return n(e.ObjectUtils.resolveFieldData(t.data,l),o,this.filterLocale)&&(r=!0),(!r||i&&!this.isNodeLeaf(t))&&(r=this.findFilteredNodes(t,{filterField:l,filterValue:o,filterConstraint:n,strict:i})||r),r},isNodeSelected(e){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[e.key]},isNodeLeaf:e=>!1!==e.leaf&&!(e.children&&e.children.length),createLazyLoadEvent(e){let t;return this.hasFilters()&&(t={},this.columns.forEach((e=>{this.columnProp(e,"field")&&(t[e.props.field]=this.columnProp(e,"filterMatchMode"))}))),{originalEvent:e,first:this.d_first,rows:this.d_rows,sortField:this.d_sortField,sortOrder:this.d_sortOrder,multiSortMeta:this.d_multiSortMeta,filters:this.filters,filterMatchModes:t}},onColumnResizeStart(t){let l=e.DomHandler.getOffset(this.$el).left;this.resizeColumnElement=t.target.parentElement,this.columnResizing=!0,this.lastResizeHelperX=t.pageX-l+this.$el.scrollLeft,this.bindColumnResizeEvents()},onColumnResize(t){let l=e.DomHandler.getOffset(this.$el).left;e.DomHandler.addClass(this.$el,"p-unselectable-text"),this.$refs.resizeHelper.style.height=this.$el.offsetHeight+"px",this.$refs.resizeHelper.style.top="0px",this.$refs.resizeHelper.style.left=t.pageX-l+this.$el.scrollLeft+"px",this.$refs.resizeHelper.style.display="block"},onColumnResizeEnd(){let t=this.$refs.resizeHelper.offsetLeft-this.lastResizeHelperX,l=this.resizeColumnElement.offsetWidth,o=l+t,n=this.resizeColumnElement.style.minWidth||15;if(l+t>parseInt(n,10)){if("fit"===this.columnResizeMode){let e=this.resizeColumnElement.nextElementSibling,l=e.offsetWidth-t;o>15&&l>15&&(this.scrollable?this.resizeTableCells(o,l):(this.resizeColumnElement.style.width=o+"px",e&&(e.style.width=l+"px")))}else"expand"===this.columnResizeMode&&(this.$refs.table.style.width=this.$refs.table.offsetWidth+t+"px",this.scrollable?this.resizeTableCells(o):this.resizeColumnElement.style.width=o+"px");this.$emit("column-resize-end",{element:this.resizeColumnElement,delta:t})}this.$refs.resizeHelper.style.display="none",this.resizeColumn=null,e.DomHandler.removeClass(this.$el,"p-unselectable-text"),this.unbindColumnResizeEvents()},resizeTableCells(t,l){let o=e.DomHandler.index(this.resizeColumnElement),n=this.$refs.table.children;for(let e of n)for(let n of e.children){let e=n.children[o];if(e.style.flex="0 0 "+t+"px","fit"===this.columnResizeMode){let t=e.nextElementSibling;t&&(t.style.flex="0 0 "+l+"px")}}},bindColumnResizeEvents(){this.documentColumnResizeListener||(this.documentColumnResizeListener=document.addEventListener("mousemove",(()=>{this.columnResizing&&this.onColumnResize(event)}))),this.documentColumnResizeEndListener||(this.documentColumnResizeEndListener=document.addEventListener("mouseup",(()=>{this.columnResizing&&(this.columnResizing=!1,this.onColumnResizeEnd())})))},unbindColumnResizeEvents(){this.documentColumnResizeListener&&(document.removeEventListener("document",this.documentColumnResizeListener),this.documentColumnResizeListener=null),this.documentColumnResizeEndListener&&(document.removeEventListener("document",this.documentColumnResizeEndListener),this.documentColumnResizeEndListener=null)},onColumnKeyDown(t,l){13===t.which&&"TH"===t.currentTarget.nodeName&&e.DomHandler.hasClass(t.currentTarget,"p-sortable-column")&&this.onColumnHeaderClick(t,l)},hasColumnFilter(){if(this.columns)for(let e of this.columns)if(e.children&&e.children.filter)return!0;return!1},hasFilters(){return this.filters&&Object.keys(this.filters).length>0&&this.filters.constructor===Object},hasGlobalFilter(){return this.filters&&Object.prototype.hasOwnProperty.call(this.filters,"global")},updateScrollWidth(){this.$refs.table.style.width=this.$refs.table.scrollWidth+"px"}},computed:{containerClass(){return["p-treetable p-component",{"p-treetable-hoverable-rows":this.rowHover||this.rowSelectionMode,"p-treetable-auto-layout":this.autoLayout,"p-treetable-resizable":this.resizableColumns,"p-treetable-resizable-fit":this.resizableColumns&&"fit"===this.columnResizeMode,"p-treetable-gridlines":this.showGridlines,"p-treetable-scrollable":this.scrollable,"p-treetable-scrollable-vertical":this.scrollable&&"vertical"===this.scrollDirection,"p-treetable-scrollable-horizontal":this.scrollable&&"horizontal"===this.scrollDirection,"p-treetable-scrollable-both":this.scrollable&&"both"===this.scrollDirection,"p-treetable-flex-scrollable":this.scrollable&&"flex"===this.scrollHeight,"p-treetable-responsive-scroll":"scroll"===this.responsiveLayout}]},columns(){let e=[];return this.$slots.default().forEach((t=>{t.children&&t.children instanceof Array?e=[...e,...t.children]:"Column"===t.type.name&&e.push(t)})),e},processedData(){if(this.lazy)return this.value;if(this.value&&this.value.length){let e=this.value;return this.sorted&&("single"===this.sortMode?e=this.sortSingle(e):"multiple"===this.sortMode&&(e=this.sortMultiple(e))),this.hasFilters()&&(e=this.filter(e)),e}return null},dataToRender(){const e=this.processedData;if(this.paginator){const t=this.lazy?0:this.d_first;return e.slice(t,t+this.d_rows)}return e},empty(){const e=this.processedData;return!e||0===e.length},sorted(){return this.d_sortField||this.d_multiSortMeta&&this.d_multiSortMeta.length>0},hasFooter(){let e=!1;for(let t of this.columns)if(this.columnProp(t,"footer")||t.children&&t.children.footer){e=!0;break}return e},paginatorTop(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},singleSelectionMode(){return this.selectionMode&&"single"===this.selectionMode},multipleSelectionMode(){return this.selectionMode&&"multiple"===this.selectionMode},rowSelectionMode(){return this.singleSelectionMode||this.multipleSelectionMode},totalRecordsLength(){if(this.lazy)return this.totalRecords;{const e=this.processedData;return e?e.length:0}},loadingIconClass(){return["p-treetable-loading-icon pi-spin",this.loadingIcon]}},components:{TTRow:h,TTPaginator:s.default,TTHeaderCell:p,TTFooterCell:b}};const y={key:0,class:"p-treetable-loading"},g={class:"p-treetable-loading-overlay p-component-overlay"},k={key:1,class:"p-treetable-header"},C={ref:"table"},x={class:"p-treetable-thead"},S={key:0},v={class:"p-treetable-tbody"},z={key:1,class:"p-treetable-emptymessage"},P={key:0,class:"p-treetable-tfoot"},w={key:4,class:"p-treetable-footer"},M={ref:"resizeHelper",class:"p-column-resizer-helper p-highlight",style:{display:"none"}};return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-treetable {\n position: relative;\n}\n.p-treetable table {\n border-collapse: collapse;\n width: 100%;\n table-layout: fixed;\n}\n.p-treetable .p-sortable-column {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-treetable-responsive-scroll > .p-treetable-wrapper {\n overflow-x: auto;\n}\n.p-treetable-responsive-scroll > .p-treetable-wrapper > table,\n.p-treetable-auto-layout > .p-treetable-wrapper > table {\n table-layout: auto;\n}\n.p-treetable-hoverable-rows .p-treetable-tbody > tr {\n cursor: pointer;\n}\n.p-treetable-toggler {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n vertical-align: middle;\n overflow: hidden;\n position: relative;\n}\n.p-treetable-toggler + .p-checkbox {\n vertical-align: middle;\n}\n.p-treetable-toggler + .p-checkbox + span {\n vertical-align: middle;\n}\n\n/* Resizable */\n.p-treetable-resizable > .p-treetable-wrapper {\n overflow-x: auto;\n}\n.p-treetable-resizable .p-treetable-thead > tr > th,\n.p-treetable-resizable .p-treetable-tfoot > tr > td,\n.p-treetable-resizable .p-treetable-tbody > tr > td {\n overflow: hidden;\n}\n.p-treetable-resizable .p-resizable-column {\n background-clip: padding-box;\n position: relative;\n}\n.p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer {\n display: none;\n}\n.p-treetable .p-column-resizer {\n display: block;\n position: absolute !important;\n top: 0;\n right: 0;\n margin: 0;\n width: .5rem;\n height: 100%;\n padding: 0px;\n cursor:col-resize;\n border: 1px solid transparent;\n}\n.p-treetable .p-column-resizer-helper {\n width: 1px;\n position: absolute;\n z-index: 10;\n display: none;\n}\n.p-treetable .p-treetable-loading-overlay {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n z-index: 2;\n}\n\n/* Scrollable */\n.p-treetable-scrollable .p-treetable-wrapper {\n position: relative;\n overflow: auto;\n}\n.p-treetable-scrollable .p-treetable-table {\n display: block;\n}\n.p-treetable-scrollable .p-treetable-thead,\n.p-treetable-scrollable .p-treetable-tbody,\n.p-treetable-scrollable .p-treetable-tfoot {\n display: block;\n}\n.p-treetable-scrollable .p-treetable-thead > tr,\n.p-treetable-scrollable .p-treetable-tbody > tr,\n.p-treetable-scrollable .p-treetable-tfoot > tr {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n width: 100%;\n}\n.p-treetable-scrollable .p-treetable-thead > tr > th,\n.p-treetable-scrollable .p-treetable-tbody > tr > td,\n.p-treetable-scrollable .p-treetable-tfoot > tr > td {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-treetable-scrollable .p-treetable-thead {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n.p-treetable-scrollable .p-treetable-tfoot {\n position: sticky;\n bottom: 0;\n z-index: 1;\n}\n.p-treetable-scrollable .p-frozen-column {\n position: sticky;\n background: inherit;\n}\n.p-treetable-scrollable-both .p-treetable-thead > tr > th,\n.p-treetable-scrollable-both .p-treetable-tbody > tr > td,\n.p-treetable-scrollable-both .p-treetable-tfoot > tr > td,\n.p-treetable-scrollable-horizontal .p-treetable-thead > tr > th\n.p-treetable-scrollable-horizontal .p-treetable-tbody > tr > td,\n.p-treetable-scrollable-horizontal .p-treetable-tfoot > tr > td {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-treetable-flex-scrollable {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 100%;\n}\n.p-treetable-flex-scrollable .p-treetable-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 100%;\n}\n"),f.render=function(e,t,l,n,i,r){const s=o.resolveComponent("TTPaginator"),a=o.resolveComponent("TTHeaderCell"),c=o.resolveComponent("TTRow"),d=o.resolveComponent("TTFooterCell");return o.openBlock(),o.createBlock("div",{class:r.containerClass,"data-scrollselectors":".p-treetable-scrollable-body"},[l.loading?(o.openBlock(),o.createBlock("div",y,[o.createVNode("div",g,[o.createVNode("i",{class:r.loadingIconClass},null,2)])])):o.createCommentVNode("",!0),e.$slots.header?(o.openBlock(),o.createBlock("div",k,[o.renderSlot(e.$slots,"header")])):o.createCommentVNode("",!0),r.paginatorTop?(o.openBlock(),o.createBlock(s,{key:2,rows:i.d_rows,first:i.d_first,totalRecords:r.totalRecordsLength,pageLinkSize:l.pageLinkSize,template:l.paginatorTemplate,rowsPerPageOptions:l.rowsPerPageOptions,currentPageReportTemplate:l.currentPageReportTemplate,class:"p-paginator-top",onPage:t[1]||(t[1]=e=>r.onPage(e)),alwaysShow:l.alwaysShowPaginator},o.createSlots({_:2},[e.$slots.paginatorLeft?{name:"left",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorLeft")]))}:void 0,e.$slots.paginatorRight?{name:"right",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorRight")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","alwaysShow"])):o.createCommentVNode("",!0),o.createVNode("div",{class:"p-treetable-wrapper",style:{maxHeight:l.scrollHeight}},[o.createVNode("table",C,[o.createVNode("thead",x,[o.createVNode("tr",null,[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(r.columns,((e,t)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(e,"columnKey")||r.columnProp(e,"field")||t},[r.columnProp(e,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(a,{key:0,column:e,resizableColumns:l.resizableColumns,sortField:i.d_sortField,sortOrder:i.d_sortOrder,multiSortMeta:i.d_multiSortMeta,sortMode:l.sortMode,onColumnClick:r.onColumnHeaderClick,onColumnResizestart:r.onColumnResizeStart},null,8,["column","resizableColumns","sortField","sortOrder","multiSortMeta","sortMode","onColumnClick","onColumnResizestart"]))],64)))),128))]),r.hasColumnFilter()?(o.openBlock(),o.createBlock("tr",S,[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(r.columns,((e,t)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(e,"columnKey")||r.columnProp(e,"field")||t},[r.columnProp(e,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock("th",{key:0,class:r.getFilterColumnHeaderClass(e),style:[r.columnProp(e,"style"),r.columnProp(e,"filterHeaderStyle")]},[e.children&&e.children.filter?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.children.filter),{key:0,column:e},null,8,["column"])):o.createCommentVNode("",!0)],6))],64)))),128))])):o.createCommentVNode("",!0)]),o.createVNode("tbody",v,[r.empty?(o.openBlock(),o.createBlock("tr",z,[o.createVNode("td",{colspan:r.columns.length},[o.renderSlot(e.$slots,"empty")],8,["colspan"])])):(o.openBlock(!0),o.createBlock(o.Fragment,{key:0},o.renderList(r.dataToRender,(e=>(o.openBlock(),o.createBlock(c,{key:e.key,columns:r.columns,node:e,level:0,expandedKeys:i.d_expandedKeys,onNodeToggle:r.onNodeToggle,indentation:l.indentation,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,onNodeClick:r.onNodeClick,onCheckboxChange:r.onCheckboxChange},null,8,["columns","node","expandedKeys","onNodeToggle","indentation","selectionMode","selectionKeys","onNodeClick","onCheckboxChange"])))),128))]),r.hasFooter?(o.openBlock(),o.createBlock("tfoot",P,[o.createVNode("tr",null,[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(r.columns,((e,t)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(e,"columnKey")||r.columnProp(e,"field")||t},[r.columnProp(e,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(d,{key:0,column:e},null,8,["column"]))],64)))),128))])])):o.createCommentVNode("",!0)],512)],4),r.paginatorBottom?(o.openBlock(),o.createBlock(s,{key:3,rows:i.d_rows,first:i.d_first,totalRecords:r.totalRecordsLength,pageLinkSize:l.pageLinkSize,template:l.paginatorTemplate,rowsPerPageOptions:l.rowsPerPageOptions,currentPageReportTemplate:l.currentPageReportTemplate,class:"p-paginator-bottom",onPage:t[2]||(t[2]=e=>r.onPage(e)),alwaysShow:l.alwaysShowPaginator},o.createSlots({_:2},[e.$slots.paginatorLeft?{name:"left",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorLeft")]))}:void 0,e.$slots.paginatorRight?{name:"right",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorRight")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","alwaysShow"])):o.createCommentVNode("",!0),e.$slots.footer?(o.openBlock(),o.createBlock("div",w,[o.renderSlot(e.$slots,"footer")])):o.createCommentVNode("",!0),o.createVNode("div",M,null,512)],2)},f}(primevue.utils,primevue.api,primevue.ripple,Vue,primevue.paginator);
1
+ this.primevue=this.primevue||{},this.primevue.treetable=function(e,t,l,o,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(l),s=i(n),a={name:"BodyCell",emits:["node-toggle","checkbox-toggle"],props:{node:{type:Object,default:null},column:{type:Object,default:null},level:{type:Number,default:0},indentation:{type:Number,default:1},leaf:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},selectionMode:{type:String,default:null},checked:{type:Boolean,default:!1},partialChecked:{type:Boolean,default:!1}},data:()=>({styleObject:{},checkboxFocused:!1}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{toggle(){this.$emit("node-toggle",this.node)},columnProp(t){return e.ObjectUtils.getVNodeProp(this.column,t)},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let t=0,l=this.$el.nextElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.right)),this.styleObject.right=t+"px"}else{let t=0,l=this.$el.previousElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.left)),this.styleObject.left=t+"px"}}},resolveFieldData:(t,l)=>e.ObjectUtils.resolveFieldData(t,l),toggleCheckbox(){this.$emit("checkbox-toggle")},onCheckboxFocus(){this.checkboxFocused=!0},onCheckboxBlur(){this.checkboxFocused=!1}},computed:{containerClass(){return[this.columnProp("bodyClass"),this.columnProp("class"),{"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("bodyStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},togglerStyle(){return{marginLeft:this.level*this.indentation+"rem",visibility:this.leaf?"hidden":"visible"}},togglerIcon(){return["p-treetable-toggler-icon pi",{"pi-chevron-right":!this.expanded,"pi-chevron-down":this.expanded}]},checkboxSelectionMode(){return"checkbox"===this.selectionMode},checkboxClass(){return["p-checkbox-box",{"p-highlight":this.checked,"p-focus":this.checkboxFocused,"p-indeterminate":this.partialChecked}]},checkboxIcon(){return["p-checkbox-icon",{"pi pi-check":this.checked,"pi pi-minus":this.partialChecked}]}},directives:{ripple:r.default}};const c={class:"p-hidden-accessible"},d={key:3};a.render=function(e,t,l,n,i,r){const s=o.resolveDirective("ripple");return o.openBlock(),o.createBlock("td",{style:r.containerStyle,class:r.containerClass},[r.columnProp("expander")?o.withDirectives((o.openBlock(),o.createBlock("button",{key:0,type:"button",class:"p-treetable-toggler p-link",onClick:t[1]||(t[1]=(...e)=>r.toggle&&r.toggle(...e)),style:r.togglerStyle,tabindex:"-1"},[o.createVNode("i",{class:r.togglerIcon},null,2)],4)),[[s]]):o.createCommentVNode("",!0),r.checkboxSelectionMode&&r.columnProp("expander")?(o.openBlock(),o.createBlock("div",{key:1,class:"p-checkbox p-treetable-checkbox p-component",onClick:t[4]||(t[4]=(...e)=>r.toggleCheckbox&&r.toggleCheckbox(...e)),role:"checkbox","aria-checked":l.checked},[o.createVNode("div",c,[o.createVNode("input",{type:"checkbox",onFocus:t[2]||(t[2]=(...e)=>r.onCheckboxFocus&&r.onCheckboxFocus(...e)),onBlur:t[3]||(t[3]=(...e)=>r.onCheckboxBlur&&r.onCheckboxBlur(...e))},null,32)]),o.createVNode("div",{ref:"checkboxEl",class:r.checkboxClass},[o.createVNode("span",{class:r.checkboxIcon},null,2)],2)],8,["aria-checked"])):o.createCommentVNode("",!0),l.column.children&&l.column.children.body?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.column.children.body),{key:2,node:l.node,column:l.column},null,8,["node","column"])):(o.openBlock(),o.createBlock("span",d,o.toDisplayString(r.resolveFieldData(l.node.data,r.columnProp("field"))),1))],6)};var h={name:"TreeTableRow",emits:["node-click","node-toggle","checkbox-change","nodeClick","nodeToggle","checkboxChange"],props:{node:{type:null,default:null},parentNode:{type:null,default:null},columns:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},level:{type:Number,default:0},indentation:{type:Number,default:1}},nodeTouched:!1,methods:{columnProp:(t,l)=>e.ObjectUtils.getVNodeProp(t,l),toggle(){this.$emit("node-toggle",this.node)},onClick(t){e.DomHandler.isClickable(t.target)||e.DomHandler.hasClass(t.target,"p-treetable-toggler")||e.DomHandler.hasClass(t.target.parentElement,"p-treetable-toggler")||(this.$emit("node-click",{originalEvent:t,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1)},onTouchEnd(){this.nodeTouched=!0},onKeyDown(e){if(e.target===this.$el){const t=this.$el;switch(e.which){case 40:{const l=t.nextElementSibling;l&&l.focus(),e.preventDefault();break}case 38:{const l=t.previousElementSibling;l&&l.focus(),e.preventDefault();break}case 37:case 39:this.leaf||(this.$emit("node-toggle",this.node),e.preventDefault());break;case 13:this.onClick(e),e.preventDefault()}}},toggleCheckbox(){let e=this.selectionKeys?{...this.selectionKeys}:{};const t=!this.checked;this.propagateDown(this.node,t,e),this.$emit("checkbox-change",{node:this.node,check:t,selectionKeys:e})},propagateDown(e,t,l){if(t?l[e.key]={checked:!0,partialChecked:!1}:delete l[e.key],e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,t,l)},propagateUp(e){let t=e.check,l={...e.selectionKeys},o=0,n=!1;for(let e of this.node.children)l[e.key]&&l[e.key].checked?o++:l[e.key]&&l[e.key].partialChecked&&(n=!0);t&&o===this.node.children.length?l[this.node.key]={checked:!0,partialChecked:!1}:(t||delete l[this.node.key],n||o>0&&o!==this.node.children.length?l[this.node.key]={checked:!1,partialChecked:!0}:l[this.node.key]={checked:!1,partialChecked:!1}),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:l})},onCheckboxChange(e){let t=e.check,l={...e.selectionKeys},o=0,n=!1;for(let e of this.node.children)l[e.key]&&l[e.key].checked?o++:l[e.key]&&l[e.key].partialChecked&&(n=!0);t&&o===this.node.children.length?l[this.node.key]={checked:!0,partialChecked:!1}:(t||delete l[this.node.key],n||o>0&&o!==this.node.children.length?l[this.node.key]={checked:!1,partialChecked:!0}:l[this.node.key]={checked:!1,partialChecked:!1}),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:l})}},computed:{containerClass(){return[this.node.styleClass,{"p-highlight":this.selected}]},hasChildren(){return this.node.children&&this.node.children.length>0},expanded(){return this.expandedKeys&&!0===this.expandedKeys[this.node.key]},leaf(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},selected(){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[this.node.key]},childLevel(){return this.level+1},checked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].checked)},partialChecked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].partialChecked)}},components:{TTBodyCell:a}};h.render=function(e,t,l,n,i,r){const s=o.resolveComponent("TTBodyCell"),a=o.resolveComponent("TreeTableRow",!0);return o.openBlock(),o.createBlock(o.Fragment,null,[o.createVNode("tr",{class:r.containerClass,onClick:t[2]||(t[2]=(...e)=>r.onClick&&r.onClick(...e)),onKeydown:t[3]||(t[3]=(...e)=>r.onKeyDown&&r.onKeyDown(...e)),onTouchend:t[4]||(t[4]=(...e)=>r.onTouchEnd&&r.onTouchEnd(...e)),style:l.node.style,tabindex:"0"},[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(l.columns,((n,i)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(n,"columnKey")||r.columnProp(n,"field")||i},[r.columnProp(n,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(s,{key:0,column:n,node:l.node,level:l.level,leaf:r.leaf,indentation:l.indentation,expanded:r.expanded,selectionMode:l.selectionMode,checked:r.checked,partialChecked:r.partialChecked,onNodeToggle:t[1]||(t[1]=t=>e.$emit("node-toggle",t)),onCheckboxToggle:r.toggleCheckbox},null,8,["column","node","level","leaf","indentation","expanded","selectionMode","checked","partialChecked","onCheckboxToggle"]))],64)))),128))],38),r.expanded&&l.node.children&&l.node.children.length?(o.openBlock(!0),o.createBlock(o.Fragment,{key:0},o.renderList(l.node.children,(n=>(o.openBlock(),o.createBlock(a,{key:n.key,columns:l.columns,node:n,parentNode:l.node,level:l.level+1,expandedKeys:l.expandedKeys,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,indentation:l.indentation,onNodeToggle:t[5]||(t[5]=t=>e.$emit("node-toggle",t)),onNodeClick:t[6]||(t[6]=t=>e.$emit("node-click",t)),onCheckboxChange:r.onCheckboxChange},null,8,["columns","node","parentNode","level","expandedKeys","selectionMode","selectionKeys","indentation","onCheckboxChange"])))),128)):o.createCommentVNode("",!0)],64)};var u={name:"HeaderCell",emits:["column-click","column-resizestart"],props:{column:{type:Object,default:null},resizableColumns:{type:Boolean,default:!1},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},multiSortMeta:{type:Array,default:null},sortMode:{type:String,default:"single"}},data:()=>({styleObject:{}}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp(t){return e.ObjectUtils.getVNodeProp(this.column,t)},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let t=0,l=this.$el.nextElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.right)),this.styleObject.right=t+"px"}else{let t=0,l=this.$el.previousElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.left)),this.styleObject.left=t+"px"}let t=this.$el.parentElement.nextElementSibling;if(t){let l=e.DomHandler.index(this.$el);t.children[l].style.left=this.styleObject.left,t.children[l].style.right=this.styleObject.right}}},onClick(e){this.$emit("column-click",{originalEvent:e,column:this.column})},onKeyDown(t){13===t.which&&"TH"===t.currentTarget.nodeName&&e.DomHandler.hasClass(t.currentTarget,"p-sortable-column")&&this.$emit("column-click",{originalEvent:t,column:this.column})},onResizeStart(e){this.$emit("column-resizestart",e)},getMultiSortMetaIndex(){let e=-1;for(let t=0;t<this.multiSortMeta.length;t++){let l=this.multiSortMeta[t];if(l.field===this.columnProp("field")||l.field===this.columnProp("sortField")){e=t;break}}return e},isMultiSorted(){return this.columnProp("sortable")&&this.getMultiSortMetaIndex()>-1},isColumnSorted(){return"single"===this.sortMode?this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")):this.isMultiSorted()}},computed:{containerClass(){return[this.columnProp("headerClass"),this.columnProp("class"),{"p-sortable-column":this.columnProp("sortable"),"p-resizable-column":this.resizableColumns,"p-highlight":this.isColumnSorted(),"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("headerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},sortableColumnIcon(){let e=!1,t=null;if("single"===this.sortMode)e=this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")),t=e?this.sortOrder:0;else if("multiple"===this.sortMode){let l=this.getMultiSortMetaIndex();l>-1&&(e=!0,t=this.multiSortMeta[l].order)}return["p-sortable-column-icon pi pi-fw",{"pi-sort-alt":!e,"pi-sort-amount-up-alt":e&&t>0,"pi-sort-amount-down":e&&t<0}]},ariaSort(){if(this.columnProp("sortable")){const e=this.sortableColumnIcon;return e[1]["pi-sort-amount-down"]?"descending":e[1]["pi-sort-amount-up-alt"]?"ascending":"none"}return null}}};const p={key:2,class:"p-column-title"},m={key:4,class:"p-sortable-column-badge"};u.render=function(e,t,l,n,i,r){return o.openBlock(),o.createBlock("th",{style:[r.containerStyle],class:r.containerClass,onClick:t[2]||(t[2]=(...e)=>r.onClick&&r.onClick(...e)),onKeydown:t[3]||(t[3]=(...e)=>r.onKeyDown&&r.onKeyDown(...e)),tabindex:r.columnProp("sortable")?"0":null,"aria-sort":r.ariaSort},[l.resizableColumns&&!r.columnProp("frozen")?(o.openBlock(),o.createBlock("span",{key:0,class:"p-column-resizer",onMousedown:t[1]||(t[1]=(...e)=>r.onResizeStart&&r.onResizeStart(...e))},null,32)):o.createCommentVNode("",!0),l.column.children&&l.column.children.header?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.column.children.header),{key:1,column:l.column},null,8,["column"])):o.createCommentVNode("",!0),r.columnProp("header")?(o.openBlock(),o.createBlock("span",p,o.toDisplayString(r.columnProp("header")),1)):o.createCommentVNode("",!0),r.columnProp("sortable")?(o.openBlock(),o.createBlock("span",{key:3,class:r.sortableColumnIcon},null,2)):o.createCommentVNode("",!0),r.isMultiSorted()?(o.openBlock(),o.createBlock("span",m,o.toDisplayString(r.getMultiSortMetaIndex()+1),1)):o.createCommentVNode("",!0)],46,["tabindex","aria-sort"])};var b={name:"FooterCell",props:{column:{type:Object,default:null}},data:()=>({styleObject:{}}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp(t){return e.ObjectUtils.getVNodeProp(this.column,t)},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let t=0,l=this.$el.nextElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.right)),this.styleObject.right=t+"px"}else{let t=0,l=this.$el.previousElementSibling;l&&(t=e.DomHandler.getOuterWidth(l)+parseFloat(l.style.left)),this.styleObject.left=t+"px"}}}},computed:{containerClass(){return[this.columnProp("footerClass"),this.columnProp("class"),{"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("footerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]}}};b.render=function(e,t,l,n,i,r){return o.openBlock(),o.createBlock("td",{style:r.containerStyle,class:r.containerClass},[l.column.children&&l.column.children.footer?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.column.children.footer),{key:0,column:e.col},null,8,["column"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(r.columnProp("footer")),1)],6)};var f={name:"TreeTable",emits:["node-expand","node-collapse","update:expandedKeys","update:selectionKeys","node-select","node-unselect","update:first","update:rows","page","update:sortField","update:sortOrder","update:multiSortMeta","sort","filter","column-resize-end"],props:{value:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},metaKeySelection:{type:Boolean,default:!0},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},lazy:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner"},rowHover:{type:Boolean,default:!1},autoLayout:{type:Boolean,default:!1},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},defaultSortOrder:{type:Number,default:1},multiSortMeta:{type:Array,default:null},sortMode:{type:String,default:"single"},removableSort:{type:Boolean,default:!1},filters:{type:Object,default:null},filterMode:{type:String,default:"lenient"},filterLocale:{type:String,default:void 0},resizableColumns:{type:Boolean,default:!1},columnResizeMode:{type:String,default:"fit"},indentation:{type:Number,default:1},showGridlines:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},scrollDirection:{type:String,default:"vertical"},scrollHeight:{type:String,default:null},responsiveLayout:{type:String,default:null}},documentColumnResizeListener:null,documentColumnResizeEndListener:null,lastResizeHelperX:null,resizeColumnElement:null,data(){return{d_expandedKeys:this.expandedKeys||{},d_first:this.first,d_rows:this.rows,d_sortField:this.sortField,d_sortOrder:this.sortOrder,d_multiSortMeta:this.multiSortMeta?[...this.multiSortMeta]:[]}},watch:{expandedKeys(e){this.d_expandedKeys=e},first(e){this.d_first=e},rows(e){this.d_rows=e},sortField(e){this.d_sortField=e},sortOrder(e){this.d_sortOrder=e},multiSortMeta(e){this.d_multiSortMeta=e}},mounted(){this.scrollable&&"vertical"!==this.scrollDirection&&this.updateScrollWidth()},updated(){this.scrollable&&"vertical"!==this.scrollDirection&&this.updateScrollWidth()},methods:{columnProp:(t,l)=>e.ObjectUtils.getVNodeProp(t,l),onNodeToggle(e){const t=e.key;this.d_expandedKeys[t]?(delete this.d_expandedKeys[t],this.$emit("node-collapse",e)):(this.d_expandedKeys[t]=!0,this.$emit("node-expand",e)),this.d_expandedKeys={...this.d_expandedKeys},this.$emit("update:expandedKeys",this.d_expandedKeys)},onNodeClick(e){if(this.rowSelectionMode&&!1!==e.node.selectable){const t=!e.nodeTouched&&this.metaKeySelection?this.handleSelectionWithMetaKey(e):this.handleSelectionWithoutMetaKey(e);this.$emit("update:selectionKeys",t)}},handleSelectionWithMetaKey(e){const t=e.originalEvent,l=e.node,o=t.metaKey||t.ctrlKey;let n;return this.isNodeSelected(l)&&o?(this.isSingleSelectionMode()?n={}:(n={...this.selectionKeys},delete n[l.key]),this.$emit("node-unselect",l)):(this.isSingleSelectionMode()?n={}:this.isMultipleSelectionMode()&&(n=o&&this.selectionKeys?{...this.selectionKeys}:{}),n[l.key]=!0,this.$emit("node-select",l)),n},handleSelectionWithoutMetaKey(e){const t=e.node,l=this.isNodeSelected(t);let o;return this.isSingleSelectionMode()?l?(o={},this.$emit("node-unselect",t)):(o={},o[t.key]=!0,this.$emit("node-select",t)):l?(o={...this.selectionKeys},delete o[t.key],this.$emit("node-unselect",t)):(o=this.selectionKeys?{...this.selectionKeys}:{},o[t.key]=!0,this.$emit("node-select",t)),o},onCheckboxChange(e){this.$emit("update:selectionKeys",e.selectionKeys),e.check?this.$emit("node-select",e.node):this.$emit("node-unselect",e.node)},isSingleSelectionMode(){return"single"===this.selectionMode},isMultipleSelectionMode(){return"multiple"===this.selectionMode},onPage(e){this.d_first=e.first,this.d_rows=e.rows;let t=this.createLazyLoadEvent(e);t.pageCount=e.pageCount,t.page=e.page,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},resetPage(){this.d_first=0,this.$emit("update:first",this.d_first)},getFilterColumnHeaderClass(e){return["p-filter-column",this.columnProp(e,"filterHeaderClass"),{"p-frozen-column":this.columnProp(e,"frozen")}]},onColumnHeaderClick(t){let l=t.originalEvent,o=t.column;if(this.columnProp(o,"sortable")){const t=l.target,n=this.columnProp(o,"sortField")||this.columnProp(o,"field");if(e.DomHandler.hasClass(t,"p-sortable-column")||e.DomHandler.hasClass(t,"p-column-title")||e.DomHandler.hasClass(t,"p-sortable-column-icon")||e.DomHandler.hasClass(t.parentElement,"p-sortable-column-icon")){if(e.DomHandler.clearSelection(),"single"===this.sortMode)this.d_sortField===n?this.removableSort&&-1*this.d_sortOrder===this.defaultSortOrder?(this.d_sortOrder=null,this.d_sortField=null):this.d_sortOrder=-1*this.d_sortOrder:(this.d_sortOrder=this.defaultSortOrder,this.d_sortField=n),this.$emit("update:sortField",this.d_sortField),this.$emit("update:sortOrder",this.d_sortOrder),this.resetPage();else if("multiple"===this.sortMode){l.metaKey||l.ctrlKey||(this.d_multiSortMeta=this.d_multiSortMeta.filter((e=>e.field===n))),this.addMultiSortField(n),this.$emit("update:multiSortMeta",this.d_multiSortMeta)}this.$emit("sort",this.createLazyLoadEvent(l))}}},addMultiSortField(e){let t=this.d_multiSortMeta.findIndex((t=>t.field===e));t>=0?this.removableSort&&-1*this.d_multiSortMeta[t].order===this.defaultSortOrder?this.d_multiSortMeta.splice(t,1):this.d_multiSortMeta[t]={field:e,order:-1*this.d_multiSortMeta[t].order}:this.d_multiSortMeta.push({field:e,order:this.defaultSortOrder}),this.d_multiSortMeta=[...this.d_multiSortMeta]},sortSingle(e){return this.sortNodesSingle(e)},sortNodesSingle(t){let l=[...t];return l.sort(((t,l)=>{const o=e.ObjectUtils.resolveFieldData(t.data,this.d_sortField),n=e.ObjectUtils.resolveFieldData(l.data,this.d_sortField);let i=null;return i=null==o&&null!=n?-1:null!=o&&null==n?1:null==o&&null==n?0:"string"==typeof o&&"string"==typeof n?o.localeCompare(n,void 0,{numeric:!0}):o<n?-1:o>n?1:0,this.d_sortOrder*i})),l},sortMultiple(e){return this.sortNodesMultiple(e)},sortNodesMultiple(e){let t=[...e];return t.sort(((e,t)=>this.multisortField(e,t,0))),t},multisortField(t,l,o){const n=e.ObjectUtils.resolveFieldData(t.data,this.d_multiSortMeta[o].field),i=e.ObjectUtils.resolveFieldData(l.data,this.d_multiSortMeta[o].field);let r=null;if(null==n&&null!=i)r=-1;else if(null!=n&&null==i)r=1;else if(null==n&&null==i)r=0;else{if(n===i)return this.d_multiSortMeta.length-1>o?this.multisortField(t,l,o+1):0;if(("string"==typeof n||n instanceof String)&&("string"==typeof i||i instanceof String))return this.d_multiSortMeta[o].order*n.localeCompare(i,void 0,{numeric:!0});r=n<i?-1:1}return this.d_multiSortMeta[o].order*r},filter(e){let l=[];const o="strict"===this.filterMode;for(let n of e){let e={...n},i=!0,r=!1;for(let l=0;l<this.columns.length;l++){let n=this.columns[l],s=this.columnProp(n,"field");if(Object.prototype.hasOwnProperty.call(this.filters,this.columnProp(n,"field"))){let l=this.columnProp(n,"filterMatchMode")||"startsWith",r={filterField:s,filterValue:this.filters[this.columnProp(n,"field")],filterConstraint:t.FilterService.filters[l],strict:o};if((!o||this.findFilteredNodes(e,r)||this.isFilterMatched(e,r))&&(o||this.isFilterMatched(e,r)||this.findFilteredNodes(e,r))||(i=!1),!i)break}if(this.hasGlobalFilter()&&!r){let l={...e},n={filterField:s,filterValue:this.filters.global,filterConstraint:t.FilterService.filters.contains,strict:o};(o&&(this.findFilteredNodes(l,n)||this.isFilterMatched(l,n))||!o&&(this.isFilterMatched(l,n)||this.findFilteredNodes(l,n)))&&(r=!0,e=l)}}let s=i;this.hasGlobalFilter()&&(s=i&&r),s&&l.push(e)}let n=this.createLazyLoadEvent(event);return n.filteredValue=l,this.$emit("filter",n),l},findFilteredNodes(e,t){if(e){let l=!1;if(e.children){let o=[...e.children];e.children=[];for(let n of o){let o={...n};this.isFilterMatched(o,t)&&(l=!0,e.children.push(o))}}if(l)return!0}},isFilterMatched(t,{filterField:l,filterValue:o,filterConstraint:n,strict:i}){let r=!1;return n(e.ObjectUtils.resolveFieldData(t.data,l),o,this.filterLocale)&&(r=!0),(!r||i&&!this.isNodeLeaf(t))&&(r=this.findFilteredNodes(t,{filterField:l,filterValue:o,filterConstraint:n,strict:i})||r),r},isNodeSelected(e){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[e.key]},isNodeLeaf:e=>!1!==e.leaf&&!(e.children&&e.children.length),createLazyLoadEvent(e){let t;return this.hasFilters()&&(t={},this.columns.forEach((e=>{this.columnProp(e,"field")&&(t[e.props.field]=this.columnProp(e,"filterMatchMode"))}))),{originalEvent:e,first:this.d_first,rows:this.d_rows,sortField:this.d_sortField,sortOrder:this.d_sortOrder,multiSortMeta:this.d_multiSortMeta,filters:this.filters,filterMatchModes:t}},onColumnResizeStart(t){let l=e.DomHandler.getOffset(this.$el).left;this.resizeColumnElement=t.target.parentElement,this.columnResizing=!0,this.lastResizeHelperX=t.pageX-l+this.$el.scrollLeft,this.bindColumnResizeEvents()},onColumnResize(t){let l=e.DomHandler.getOffset(this.$el).left;e.DomHandler.addClass(this.$el,"p-unselectable-text"),this.$refs.resizeHelper.style.height=this.$el.offsetHeight+"px",this.$refs.resizeHelper.style.top="0px",this.$refs.resizeHelper.style.left=t.pageX-l+this.$el.scrollLeft+"px",this.$refs.resizeHelper.style.display="block"},onColumnResizeEnd(){let t=this.$refs.resizeHelper.offsetLeft-this.lastResizeHelperX,l=this.resizeColumnElement.offsetWidth,o=l+t,n=this.resizeColumnElement.style.minWidth||15;if(l+t>parseInt(n,10)){if("fit"===this.columnResizeMode){let e=this.resizeColumnElement.nextElementSibling,l=e.offsetWidth-t;o>15&&l>15&&(this.scrollable?this.resizeTableCells(o,l):(this.resizeColumnElement.style.width=o+"px",e&&(e.style.width=l+"px")))}else"expand"===this.columnResizeMode&&(this.$refs.table.style.width=this.$refs.table.offsetWidth+t+"px",this.scrollable?this.resizeTableCells(o):this.resizeColumnElement.style.width=o+"px");this.$emit("column-resize-end",{element:this.resizeColumnElement,delta:t})}this.$refs.resizeHelper.style.display="none",this.resizeColumn=null,e.DomHandler.removeClass(this.$el,"p-unselectable-text"),this.unbindColumnResizeEvents()},resizeTableCells(t,l){let o=e.DomHandler.index(this.resizeColumnElement),n=this.$refs.table.children;for(let e of n)for(let n of e.children){let e=n.children[o];if(e.style.flex="0 0 "+t+"px","fit"===this.columnResizeMode){let t=e.nextElementSibling;t&&(t.style.flex="0 0 "+l+"px")}}},bindColumnResizeEvents(){this.documentColumnResizeListener||(this.documentColumnResizeListener=document.addEventListener("mousemove",(()=>{this.columnResizing&&this.onColumnResize(event)}))),this.documentColumnResizeEndListener||(this.documentColumnResizeEndListener=document.addEventListener("mouseup",(()=>{this.columnResizing&&(this.columnResizing=!1,this.onColumnResizeEnd())})))},unbindColumnResizeEvents(){this.documentColumnResizeListener&&(document.removeEventListener("document",this.documentColumnResizeListener),this.documentColumnResizeListener=null),this.documentColumnResizeEndListener&&(document.removeEventListener("document",this.documentColumnResizeEndListener),this.documentColumnResizeEndListener=null)},onColumnKeyDown(t,l){13===t.which&&"TH"===t.currentTarget.nodeName&&e.DomHandler.hasClass(t.currentTarget,"p-sortable-column")&&this.onColumnHeaderClick(t,l)},hasColumnFilter(){if(this.columns)for(let e of this.columns)if(e.children&&e.children.filter)return!0;return!1},hasFilters(){return this.filters&&Object.keys(this.filters).length>0&&this.filters.constructor===Object},hasGlobalFilter(){return this.filters&&Object.prototype.hasOwnProperty.call(this.filters,"global")},updateScrollWidth(){this.$refs.table.style.width=this.$refs.table.scrollWidth+"px"}},computed:{containerClass(){return["p-treetable p-component",{"p-treetable-hoverable-rows":this.rowHover||this.rowSelectionMode,"p-treetable-auto-layout":this.autoLayout,"p-treetable-resizable":this.resizableColumns,"p-treetable-resizable-fit":this.resizableColumns&&"fit"===this.columnResizeMode,"p-treetable-gridlines":this.showGridlines,"p-treetable-scrollable":this.scrollable,"p-treetable-scrollable-vertical":this.scrollable&&"vertical"===this.scrollDirection,"p-treetable-scrollable-horizontal":this.scrollable&&"horizontal"===this.scrollDirection,"p-treetable-scrollable-both":this.scrollable&&"both"===this.scrollDirection,"p-treetable-flex-scrollable":this.scrollable&&"flex"===this.scrollHeight,"p-treetable-responsive-scroll":"scroll"===this.responsiveLayout}]},columns(){let e=[];return this.$slots.default().forEach((t=>{t.children&&t.children instanceof Array?e=[...e,...t.children]:"Column"===t.type.name&&e.push(t)})),e},processedData(){if(this.lazy)return this.value;if(this.value&&this.value.length){let e=this.value;return this.sorted&&("single"===this.sortMode?e=this.sortSingle(e):"multiple"===this.sortMode&&(e=this.sortMultiple(e))),this.hasFilters()&&(e=this.filter(e)),e}return null},dataToRender(){const e=this.processedData;if(this.paginator){const t=this.lazy?0:this.d_first;return e.slice(t,t+this.d_rows)}return e},empty(){const e=this.processedData;return!e||0===e.length},sorted(){return this.d_sortField||this.d_multiSortMeta&&this.d_multiSortMeta.length>0},hasFooter(){let e=!1;for(let t of this.columns)if(this.columnProp(t,"footer")||t.children&&t.children.footer){e=!0;break}return e},paginatorTop(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},singleSelectionMode(){return this.selectionMode&&"single"===this.selectionMode},multipleSelectionMode(){return this.selectionMode&&"multiple"===this.selectionMode},rowSelectionMode(){return this.singleSelectionMode||this.multipleSelectionMode},totalRecordsLength(){if(this.lazy)return this.totalRecords;{const e=this.processedData;return e?e.length:0}},loadingIconClass(){return["p-treetable-loading-icon pi-spin",this.loadingIcon]}},components:{TTRow:h,TTPaginator:s.default,TTHeaderCell:u,TTFooterCell:b}};const y={key:0,class:"p-treetable-loading"},g={class:"p-treetable-loading-overlay p-component-overlay"},k={key:1,class:"p-treetable-header"},C={ref:"table"},x={class:"p-treetable-thead"},S={key:0},v={class:"p-treetable-tbody"},P={key:1,class:"p-treetable-emptymessage"},z={key:0,class:"p-treetable-tfoot"},w={key:4,class:"p-treetable-footer"},M={ref:"resizeHelper",class:"p-column-resizer-helper p-highlight",style:{display:"none"}};return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-treetable {\n position: relative;\n}\n.p-treetable table {\n border-collapse: collapse;\n width: 100%;\n table-layout: fixed;\n}\n.p-treetable .p-sortable-column {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-treetable-responsive-scroll > .p-treetable-wrapper {\n overflow-x: auto;\n}\n.p-treetable-responsive-scroll > .p-treetable-wrapper > table,\n.p-treetable-auto-layout > .p-treetable-wrapper > table {\n table-layout: auto;\n}\n.p-treetable-hoverable-rows .p-treetable-tbody > tr {\n cursor: pointer;\n}\n.p-treetable-toggler {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n vertical-align: middle;\n overflow: hidden;\n position: relative;\n}\n.p-treetable-toggler + .p-checkbox {\n vertical-align: middle;\n}\n.p-treetable-toggler + .p-checkbox + span {\n vertical-align: middle;\n}\n\n/* Resizable */\n.p-treetable-resizable > .p-treetable-wrapper {\n overflow-x: auto;\n}\n.p-treetable-resizable .p-treetable-thead > tr > th,\n.p-treetable-resizable .p-treetable-tfoot > tr > td,\n.p-treetable-resizable .p-treetable-tbody > tr > td {\n overflow: hidden;\n}\n.p-treetable-resizable .p-resizable-column {\n background-clip: padding-box;\n position: relative;\n}\n.p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer {\n display: none;\n}\n.p-treetable .p-column-resizer {\n display: block;\n position: absolute !important;\n top: 0;\n right: 0;\n margin: 0;\n width: .5rem;\n height: 100%;\n padding: 0px;\n cursor:col-resize;\n border: 1px solid transparent;\n}\n.p-treetable .p-column-resizer-helper {\n width: 1px;\n position: absolute;\n z-index: 10;\n display: none;\n}\n.p-treetable .p-treetable-loading-overlay {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n z-index: 2;\n}\n\n/* Scrollable */\n.p-treetable-scrollable .p-treetable-wrapper {\n position: relative;\n overflow: auto;\n}\n.p-treetable-scrollable .p-treetable-table {\n display: block;\n}\n.p-treetable-scrollable .p-treetable-thead,\n.p-treetable-scrollable .p-treetable-tbody,\n.p-treetable-scrollable .p-treetable-tfoot {\n display: block;\n}\n.p-treetable-scrollable .p-treetable-thead > tr,\n.p-treetable-scrollable .p-treetable-tbody > tr,\n.p-treetable-scrollable .p-treetable-tfoot > tr {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n width: 100%;\n}\n.p-treetable-scrollable .p-treetable-thead > tr > th,\n.p-treetable-scrollable .p-treetable-tbody > tr > td,\n.p-treetable-scrollable .p-treetable-tfoot > tr > td {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-treetable-scrollable .p-treetable-thead {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n.p-treetable-scrollable .p-treetable-tfoot {\n position: sticky;\n bottom: 0;\n z-index: 1;\n}\n.p-treetable-scrollable .p-frozen-column {\n position: sticky;\n background: inherit;\n}\n.p-treetable-scrollable-both .p-treetable-thead > tr > th,\n.p-treetable-scrollable-both .p-treetable-tbody > tr > td,\n.p-treetable-scrollable-both .p-treetable-tfoot > tr > td,\n.p-treetable-scrollable-horizontal .p-treetable-thead > tr > th\n.p-treetable-scrollable-horizontal .p-treetable-tbody > tr > td,\n.p-treetable-scrollable-horizontal .p-treetable-tfoot > tr > td {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-treetable-flex-scrollable {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 100%;\n}\n.p-treetable-flex-scrollable .p-treetable-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 100%;\n}\n"),f.render=function(e,t,l,n,i,r){const s=o.resolveComponent("TTPaginator"),a=o.resolveComponent("TTHeaderCell"),c=o.resolveComponent("TTRow"),d=o.resolveComponent("TTFooterCell");return o.openBlock(),o.createBlock("div",{class:r.containerClass,"data-scrollselectors":".p-treetable-scrollable-body"},[l.loading?(o.openBlock(),o.createBlock("div",y,[o.createVNode("div",g,[o.createVNode("i",{class:r.loadingIconClass},null,2)])])):o.createCommentVNode("",!0),e.$slots.header?(o.openBlock(),o.createBlock("div",k,[o.renderSlot(e.$slots,"header")])):o.createCommentVNode("",!0),r.paginatorTop?(o.openBlock(),o.createBlock(s,{key:2,rows:i.d_rows,first:i.d_first,totalRecords:r.totalRecordsLength,pageLinkSize:l.pageLinkSize,template:l.paginatorTemplate,rowsPerPageOptions:l.rowsPerPageOptions,currentPageReportTemplate:l.currentPageReportTemplate,class:"p-paginator-top",onPage:t[1]||(t[1]=e=>r.onPage(e)),alwaysShow:l.alwaysShowPaginator},o.createSlots({_:2},[e.$slots.paginatorstart?{name:"start",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorstart")]))}:void 0,e.$slots.paginatorend?{name:"end",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","alwaysShow"])):o.createCommentVNode("",!0),o.createVNode("div",{class:"p-treetable-wrapper",style:{maxHeight:l.scrollHeight}},[o.createVNode("table",C,[o.createVNode("thead",x,[o.createVNode("tr",null,[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(r.columns,((e,t)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(e,"columnKey")||r.columnProp(e,"field")||t},[r.columnProp(e,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(a,{key:0,column:e,resizableColumns:l.resizableColumns,sortField:i.d_sortField,sortOrder:i.d_sortOrder,multiSortMeta:i.d_multiSortMeta,sortMode:l.sortMode,onColumnClick:r.onColumnHeaderClick,onColumnResizestart:r.onColumnResizeStart},null,8,["column","resizableColumns","sortField","sortOrder","multiSortMeta","sortMode","onColumnClick","onColumnResizestart"]))],64)))),128))]),r.hasColumnFilter()?(o.openBlock(),o.createBlock("tr",S,[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(r.columns,((e,t)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(e,"columnKey")||r.columnProp(e,"field")||t},[r.columnProp(e,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock("th",{key:0,class:r.getFilterColumnHeaderClass(e),style:[r.columnProp(e,"style"),r.columnProp(e,"filterHeaderStyle")]},[e.children&&e.children.filter?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.children.filter),{key:0,column:e},null,8,["column"])):o.createCommentVNode("",!0)],6))],64)))),128))])):o.createCommentVNode("",!0)]),o.createVNode("tbody",v,[r.empty?(o.openBlock(),o.createBlock("tr",P,[o.createVNode("td",{colspan:r.columns.length},[o.renderSlot(e.$slots,"empty")],8,["colspan"])])):(o.openBlock(!0),o.createBlock(o.Fragment,{key:0},o.renderList(r.dataToRender,(e=>(o.openBlock(),o.createBlock(c,{key:e.key,columns:r.columns,node:e,level:0,expandedKeys:i.d_expandedKeys,onNodeToggle:r.onNodeToggle,indentation:l.indentation,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,onNodeClick:r.onNodeClick,onCheckboxChange:r.onCheckboxChange},null,8,["columns","node","expandedKeys","onNodeToggle","indentation","selectionMode","selectionKeys","onNodeClick","onCheckboxChange"])))),128))]),r.hasFooter?(o.openBlock(),o.createBlock("tfoot",z,[o.createVNode("tr",null,[(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(r.columns,((e,t)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.columnProp(e,"columnKey")||r.columnProp(e,"field")||t},[r.columnProp(e,"hidden")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(d,{key:0,column:e},null,8,["column"]))],64)))),128))])])):o.createCommentVNode("",!0)],512)],4),r.paginatorBottom?(o.openBlock(),o.createBlock(s,{key:3,rows:i.d_rows,first:i.d_first,totalRecords:r.totalRecordsLength,pageLinkSize:l.pageLinkSize,template:l.paginatorTemplate,rowsPerPageOptions:l.rowsPerPageOptions,currentPageReportTemplate:l.currentPageReportTemplate,class:"p-paginator-bottom",onPage:t[2]||(t[2]=e=>r.onPage(e)),alwaysShow:l.alwaysShowPaginator},o.createSlots({_:2},[e.$slots.paginatorstart?{name:"start",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorstart")]))}:void 0,e.$slots.paginatorend?{name:"end",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","alwaysShow"])):o.createCommentVNode("",!0),e.$slots.footer?(o.openBlock(),o.createBlock("div",w,[o.renderSlot(e.$slots,"footer")])):o.createCommentVNode("",!0),o.createVNode("div",M,null,512)],2)},f}(primevue.utils,primevue.api,primevue.ripple,Vue,primevue.paginator);
@@ -1007,6 +1007,10 @@
1007
1007
  "description": "A function that takes the row data and returns a string to apply a particular class for the row.",
1008
1008
  "type": "function"
1009
1009
  },
1010
+ "datatable/rowStyle": {
1011
+ "description": "A function that takes the row data as a parameter and returns the inline style for the corresponding row.",
1012
+ "type": "object"
1013
+ },
1010
1014
  "datatable/scrollable": {
1011
1015
  "description": "When specified, enables horizontal and/or vertical scrolling.",
1012
1016
  "type": "boolean"
@@ -1039,6 +1043,14 @@
1039
1043
  "description": "Whether to displays rows with alternating colors.",
1040
1044
  "type": "boolean"
1041
1045
  },
1046
+ "datatable/tableStyle": {
1047
+ "description": "Inline style of the table element.",
1048
+ "type": "object"
1049
+ },
1050
+ "datatable/tableClass": {
1051
+ "description": "Style class of the table element.",
1052
+ "type": "string"
1053
+ },
1042
1054
  "dataview/value": {
1043
1055
  "description": "An array of objects to display.",
1044
1056
  "type": "array"
@@ -1567,6 +1579,10 @@
1567
1579
  "description": "Displays a button to switch back to display mode.",
1568
1580
  "type": "boolean"
1569
1581
  },
1582
+ "inplace/diabled": {
1583
+ "description": "When present, it specifies that the element should be disabled.",
1584
+ "type": "boolean"
1585
+ },
1570
1586
  "inputmask/modelValue": {
1571
1587
  "description": "Value of the component.",
1572
1588
  "type": "any"
@@ -1903,6 +1919,10 @@
1903
1919
  "description": "Delay in milliseconds to close the message automatically.",
1904
1920
  "type": "number"
1905
1921
  },
1922
+ "message/icon": {
1923
+ "description": "Display a custom icon for the message.",
1924
+ "type": "string"
1925
+ },
1906
1926
  "multiselect/modelValue": {
1907
1927
  "description": "Value of the component.",
1908
1928
  "type": "any"
package/vetur-tags.json CHANGED
@@ -354,6 +354,7 @@
354
354
  "editMode",
355
355
  "editingRows",
356
356
  "rowClass",
357
+ "rowStyle",
357
358
  "scrollable",
358
359
  "scrollDirection",
359
360
  "scrollHeight",
@@ -361,7 +362,9 @@
361
362
  "responsiveLayout",
362
363
  "breakpoint",
363
364
  "showGridlines",
364
- "stripedRows"
365
+ "stripedRows",
366
+ "tableStyle",
367
+ "tableClass"
365
368
  ]
366
369
  },
367
370
  "DataView": {
@@ -558,7 +561,8 @@
558
561
  "description": "Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.",
559
562
  "attributes": [
560
563
  "active",
561
- "closable"
564
+ "closable",
565
+ "diabled"
562
566
  ]
563
567
  },
564
568
  "InputMask": {
@@ -692,7 +696,8 @@
692
696
  "severity",
693
697
  "closable",
694
698
  "sticky",
695
- "life"
699
+ "life",
700
+ "icon"
696
701
  ]
697
702
  },
698
703
  "MultiSelect": {
@@ -1,5 +1,3 @@
1
- import { VNode } from 'vue';
2
-
3
1
  interface VirtualScrollerProps {
4
2
  items?: any[]|any[][];
5
3
  itemSize?: number|any[];
@@ -15,14 +13,62 @@ interface VirtualScrollerProps {
15
13
  class?: string;
16
14
  }
17
15
 
16
+ interface VirtualScrollerRangeMethodInterface {
17
+ first: number;
18
+ last: number;
19
+ viewport: {
20
+ first: number;
21
+ last: number;
22
+ }
23
+ }
24
+
25
+ interface VirtualScrollerGetItemOptionsInterface {
26
+ index: number;
27
+ count: number;
28
+ first: number;
29
+ last: number;
30
+ even: number;
31
+ odd: number;
32
+ }
33
+
34
+ interface VirtualScrollerGetLoaderOptionsInterface {
35
+ loading: boolean;
36
+ first: number;
37
+ last: number;
38
+ even: number;
39
+ odd: number;
40
+ }
41
+
42
+ interface VirtualScrollerContentSlotInterface {
43
+ contentRef: string;
44
+ styleClass: string;
45
+ items: any[];
46
+ getItemOptions: VirtualScrollerGetItemOptionsInterface;
47
+ }
48
+
49
+ interface VirtualScrollerItemSlotInterface {
50
+ item: any;
51
+ options: VirtualScrollerGetItemOptionsInterface;
52
+ }
53
+
54
+ interface VirtualScrollerLoaderSlotInterface {
55
+ options: VirtualScrollerGetLoaderOptionsInterface;
56
+ }
57
+
18
58
  declare class VirtualScroller {
19
59
  $props: VirtualScrollerProps;
60
+ scrollTo(options?: ScrollToOptions): void;
61
+ scrollToIndex(index: number, behavior: ScrollBehavior): void;
62
+ scrollInView(index: number, to: "to-start" | "to-end", behavior: ScrollBehavior): void;
63
+ getRenderedRange(): VirtualScrollerRangeMethodInterface;
20
64
  $emit(eventName: 'update:numToleratedItems', value: number): this;
21
65
  $emit(eventName: 'scroll-index-change', value: { first: number, last: number }): this;
22
66
  $emit(eventName: 'lazy-load', value: { first: number, last: number }): this;
23
67
  $slots: {
24
- content: VNode[];
25
- items: VNode[];
26
- loader: VNode[];
68
+ content: VirtualScrollerContentSlotInterface;
69
+ item: VirtualScrollerItemSlotInterface;
70
+ loader: VirtualScrollerLoaderSlotInterface;
27
71
  }
28
- }
72
+ }
73
+
74
+ export default VirtualScroller;
@@ -391,7 +391,7 @@ export default {
391
391
  isHorizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPadding.left), 0) : scrollTo(0, calculateCoord(newFirst, itemSize, contentPadding.top));
392
392
  }
393
393
 
394
- this.first = newFirst.index;
394
+ this.first = newFirst;
395
395
  }
396
396
  },
397
397
  scrollInView(index, to, behavior = 'auto') {
@@ -368,7 +368,7 @@ var script = {
368
368
  isHorizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPadding.left), 0) : scrollTo(0, calculateCoord(newFirst, itemSize, contentPadding.top));
369
369
  }
370
370
 
371
- this.first = newFirst.index;
371
+ this.first = newFirst;
372
372
  }
373
373
  },
374
374
  scrollInView(index, to, behavior = 'auto') {
@@ -1 +1 @@
1
- "use strict";var t=require("vue"),s={name:"VirtualScroller",emits:["update:numToleratedItems","scroll-index-change","lazy-load"],props:{items:{type:Array,default:null},itemSize:{type:[Number,Array],default:null},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},lazy:{type:Boolean,default:!1},showLoader:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},style:null,class:null,disabled:{type:Boolean,default:!1}},data(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:null}},element:null,content:null,spacer:null,scrollTimeout:null,mounted(){this.init()},watch:{numToleratedItems(t){this.d_numToleratedItems=t},loading(t){this.d_loading=t},items(t,s){s&&s.length===(t||[]).length||this.init()}},methods:{init(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},getLast(t,s){return this.items?Math.min(s?this.items[0].length:this.items.length,t):0},calculateOptions(){const t=this.isBoth(),s=this.isHorizontal(),e=this.first,i=this.itemSize,o=this.getContentPadding(),l=this.element?this.element.offsetWidth-o.left:0,n=this.element?this.element.offsetHeight-o.top:0,r=(t,s)=>Math.ceil(t/(s||t)),a=t?{rows:r(n,i[0]),cols:r(l,i[1])}:r(s?l:n,i);let h=this.d_numToleratedItems||Math.ceil((t?a.rows:a)/2);const c=(t,s,e)=>this.getLast(t+s+(t<h?2:3)*h,e),d=t?{rows:c(e.rows,a.rows),cols:c(e.cols,a.cols,!0)}:c(e,a);this.d_numToleratedItems=h,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.last=d,this.numItemsInViewport=a,this.showLoader&&(this.$slots&&this.$slots.loader?this.loaderArr=Array.from({length:t?a.rows:a}):this.loaderArr=Array.from({length:1})),this.lazy&&this.$emit("lazy-load",{first:e,last:d})},getContentPadding(){if(this.content){const t=getComputedStyle(this.content),s=parseInt(parseFloat(t.paddingLeft.slice(0,-2)),10),e=parseInt(parseFloat(t.paddingRight.slice(0,-2)),10),i=parseInt(parseFloat(t.paddingTop.slice(0,-2)),10),o=parseInt(parseFloat(t.paddingBottom.slice(0,-2)),10);return{left:s,right:e,top:i,bottom:o,x:s+e,y:i+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize(){if(this.element){const t=this.isBoth(),s=this.isHorizontal(),e=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||e.offsetWidth}px`,o=this.scrollHeight||`${this.element.offsetHeight||e.offsetHeight}px`,l=(t,s)=>this.element.style[t]=s;t?(l("height",o),l("width",i)):s?l("width",i):l("height",o)}},setSpacerSize(){const t=this.items;if(this.spacer&&t){const s=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,o=this.getContentPadding(),l=(t,s,e,i=0)=>this.spacer.style[t]=(s||[]).length*e+i+"px";s?(l("height",t[0],i[0],o.y),l("width",t[1],i[1],o.x)):e?l("width",t,i,o.x):l("height",t,i,o.y)}},setContentPosition(t){if(this.content){const s=this.isBoth(),e=this.isHorizontal(),i=this.content,o=t?t.first:this.first,l=this.itemSize,n=(t,s)=>t*s,r=(t=0,s=0)=>i.style.transform=`translate3d(${t}px, ${s}px, 0)`;if(s)r(n(o.cols,l[1]),n(o.rows,l[0]));else{const t=n(o,l);e?r(t,0):r(0,t)}}},onScrollPositionChange(t){const s=t.target,e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t,s)=>t?t>s?t-s:t:0,r=(t,s)=>Math.floor(t/(s||t)),a=(t,s,e,i,o)=>t<=this.d_numToleratedItems?this.d_numToleratedItems:o?e-i-this.d_numToleratedItems:s+this.d_numToleratedItems-1,h=(t,s,e,i,o,l)=>t<=this.d_numToleratedItems?0:l?t<s?e:t-this.d_numToleratedItems:t>s?e:t-2*this.d_numToleratedItems,c=(t,s,e,i,o)=>{let l=s+i+2*this.d_numToleratedItems;return t>=this.d_numToleratedItems&&(l+=this.d_numToleratedItems+1),this.getLast(l,o)},d=n(s.scrollTop,l.top),m=n(s.scrollLeft,l.left);let f=0,p=this.last,u=!1;if(e){const t=this.lastScrollPos.top<=d,s=this.lastScrollPos.left<=m,e={rows:r(d,o[0]),cols:r(m,o[1])},i={rows:a(e.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:a(e.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)};f={rows:h(e.rows,i.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:h(e.cols,i.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)},p={rows:c(e.rows,f.rows,this.last.rows,this.numItemsInViewport.rows),cols:c(e.cols,f.cols,this.last.cols,this.numItemsInViewport.cols,!0)},u=f.rows!==this.first.rows||f.cols!==this.first.cols||p.rows!==this.last.rows||p.cols!==this.last.cols,this.lastScrollPos={top:d,left:m}}else{const t=i?m:d,s=this.lastScrollPos<=t,e=r(t,o);f=h(e,a(e,this.first,this.last,this.numItemsInViewport,s),this.first,this.last,this.numItemsInViewport,s),p=c(e,f,this.last,this.numItemsInViewport),u=f!==this.first||p!==this.last,this.lastScrollPos=t}return{first:f,last:p,isRangeChanged:u}},onScrollChange(t){const{first:s,last:e,isRangeChanged:i}=this.onScrollPositionChange(t);if(i){const t={first:s,last:e};this.setContentPosition(t),this.lazy&&this.$emit("lazy-load",{first:s,last:e}),this.first=s,this.last=e,this.$emit("scroll-index-change",{first:s,last:e})}},onScroll(t){if(this.delay&&!this.lazy){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:s}=this.onScrollPositionChange(t);s&&(this.d_loading=!0)}this.scrollTimeout=setTimeout((()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&!this.lazy&&(this.d_loading=!1)}),this.delay)}else this.onScrollChange(t)},getOptions(t){let s=this.items.length,e=this.isBoth()?this.first.rows+t:this.first+t;return{index:e,count:s,first:0===e,last:e===s-1,even:e%2==0,odd:e%2!=0}},getLoaderOptions(t){let s=this.loaderArr.length;return{loading:this.d_loading,first:0===t,last:t===s-1,even:t%2==0,odd:t%2!=0}},isHorizontal(){return"horizontal"===this.orientation},isBoth(){return"both"===this.orientation},scrollTo(t){this.element&&this.element.scrollTo(t)},scrollToIndex(t,s="auto"){const e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t=0)=>t<=this.d_numToleratedItems?0:t,r=(t,s,e)=>t*s+e,a=(t=0,e=0)=>this.scrollTo({left:t,top:e,behavior:s});if(e){const s={rows:n(t[0]),cols:n(t[1])};s.rows===this.first.rows&&s.cols===this.first.cols||a(r(s.cols,o[1],l.left),r(s.rows,o[0],l.top))}else{const s=n(t);s!==this.first&&(i?a(r(s,o,l.left),0):a(0,r(s,o,l.top))),this.first=s.index}},scrollInView(t,s,e="auto"){if(s){const i=this.isBoth(),o=this.isHorizontal(),{first:l,viewport:n}=this.getRenderedRange(),r=this.itemSize,a=(t=0,s=0)=>this.scrollTo({left:t,top:s,behavior:e}),h="to-end"===s;if("to-start"===s){if(i)n.first.rows-l.rows>t[0]?a(n.first.cols*r[1],(n.first.rows-1)*r[0]):n.first.cols-l.cols>t[1]&&a((n.first.cols-1)*r[1],n.first.rows*r[0]);else if(n.first-l>t){const t=(n.first-1)*r;o?a(t,0):a(0,t)}}else if(h)if(i)n.last.rows-l.rows<=t[0]+1?a(n.first.cols*r[1],(n.first.rows+1)*r[0]):n.last.cols-l.cols<=t[1]+1&&a((n.first.cols+1)*r[1],n.first.rows*r[0]);else if(n.last-l<=t+1){const t=(n.first+1)*r;o?a(t,0):a(0,t)}}else this.scrollToIndex(t,e)},getRenderedRange(){const t=this.isBoth(),s=this.isHorizontal(),e=this.itemSize,i=(t,s)=>Math.floor(t/(s||t));let o=this.first,l=0;if(this.element){const n=this.element.scrollTop,r=this.element.scrollLeft;if(t)o={rows:i(n,e[0]),cols:i(r,e[1])},l={rows:o.rows+this.numItemsInViewport.rows,cols:o.cols+this.numItemsInViewport.cols};else{o=i(s?r:n,e),l=o+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:o,last:l}}},elementRef(t){this.element=t},contentRef(t){this.content=t},spacerRef(t){this.spacer=t}},computed:{containerClass(){return["p-virtualscroller",{"p-both-scroll":this.isBoth(),"p-horizontal-scroll":this.isHorizontal()},this.class]},loaderClass(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems(){const t=this.items;if(t&&!this.d_loading){return this.isBoth()?t.slice(this.first.rows,this.last.rows).map((t=>t.slice(this.first.cols,this.last.cols))):t.slice(this.first,this.last).map((t=>t))}return[]}}};const e=t.createVNode("i",{class:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"},null,-1);!function(t,s){void 0===s&&(s={});var e=s.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n will-change: scroll-position;\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 -webkit-transform-origin: 0 0;\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: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n"),s.render=function(s,i,o,l,n,r){return o.disabled?(t.openBlock(),t.createBlock(t.Fragment,{key:1},[t.renderSlot(s.$slots,"default"),t.renderSlot(s.$slots,"content",{items:o.items})],64)):(t.openBlock(),t.createBlock("div",{key:0,ref:r.elementRef,class:r.containerClass,style:o.style,onScroll:i[1]||(i[1]=(...t)=>r.onScroll&&r.onScroll(...t))},[t.renderSlot(s.$slots,"content",{styleClass:"p-virtualscroller-content",contentRef:r.contentRef,items:r.loadedItems,getItemOptions:r.getOptions},(()=>[t.createVNode("div",{ref:r.contentRef,class:"p-virtualscroller-content"},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(r.loadedItems,((e,i)=>t.renderSlot(s.$slots,"item",{key:i,item:e,options:r.getOptions(i)}))),128))],512)])),t.createVNode("div",{ref:r.spacerRef,class:"p-virtualscroller-spacer"},null,512),n.d_loading?(t.openBlock(),t.createBlock("div",{key:0,class:r.loaderClass},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(n.loaderArr,((i,o)=>t.renderSlot(s.$slots,"loader",{key:o,options:r.getLoaderOptions(o)},(()=>[e])))),128))],2)):t.createCommentVNode("",!0)],38))},module.exports=s;
1
+ "use strict";var t=require("vue"),s={name:"VirtualScroller",emits:["update:numToleratedItems","scroll-index-change","lazy-load"],props:{items:{type:Array,default:null},itemSize:{type:[Number,Array],default:null},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},lazy:{type:Boolean,default:!1},showLoader:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},style:null,class:null,disabled:{type:Boolean,default:!1}},data(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:null}},element:null,content:null,spacer:null,scrollTimeout:null,mounted(){this.init()},watch:{numToleratedItems(t){this.d_numToleratedItems=t},loading(t){this.d_loading=t},items(t,s){s&&s.length===(t||[]).length||this.init()}},methods:{init(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},getLast(t,s){return this.items?Math.min(s?this.items[0].length:this.items.length,t):0},calculateOptions(){const t=this.isBoth(),s=this.isHorizontal(),e=this.first,i=this.itemSize,o=this.getContentPadding(),l=this.element?this.element.offsetWidth-o.left:0,n=this.element?this.element.offsetHeight-o.top:0,r=(t,s)=>Math.ceil(t/(s||t)),a=t?{rows:r(n,i[0]),cols:r(l,i[1])}:r(s?l:n,i);let h=this.d_numToleratedItems||Math.ceil((t?a.rows:a)/2);const c=(t,s,e)=>this.getLast(t+s+(t<h?2:3)*h,e),d=t?{rows:c(e.rows,a.rows),cols:c(e.cols,a.cols,!0)}:c(e,a);this.d_numToleratedItems=h,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.last=d,this.numItemsInViewport=a,this.showLoader&&(this.$slots&&this.$slots.loader?this.loaderArr=Array.from({length:t?a.rows:a}):this.loaderArr=Array.from({length:1})),this.lazy&&this.$emit("lazy-load",{first:e,last:d})},getContentPadding(){if(this.content){const t=getComputedStyle(this.content),s=parseInt(parseFloat(t.paddingLeft.slice(0,-2)),10),e=parseInt(parseFloat(t.paddingRight.slice(0,-2)),10),i=parseInt(parseFloat(t.paddingTop.slice(0,-2)),10),o=parseInt(parseFloat(t.paddingBottom.slice(0,-2)),10);return{left:s,right:e,top:i,bottom:o,x:s+e,y:i+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize(){if(this.element){const t=this.isBoth(),s=this.isHorizontal(),e=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||e.offsetWidth}px`,o=this.scrollHeight||`${this.element.offsetHeight||e.offsetHeight}px`,l=(t,s)=>this.element.style[t]=s;t?(l("height",o),l("width",i)):s?l("width",i):l("height",o)}},setSpacerSize(){const t=this.items;if(this.spacer&&t){const s=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,o=this.getContentPadding(),l=(t,s,e,i=0)=>this.spacer.style[t]=(s||[]).length*e+i+"px";s?(l("height",t[0],i[0],o.y),l("width",t[1],i[1],o.x)):e?l("width",t,i,o.x):l("height",t,i,o.y)}},setContentPosition(t){if(this.content){const s=this.isBoth(),e=this.isHorizontal(),i=this.content,o=t?t.first:this.first,l=this.itemSize,n=(t,s)=>t*s,r=(t=0,s=0)=>i.style.transform=`translate3d(${t}px, ${s}px, 0)`;if(s)r(n(o.cols,l[1]),n(o.rows,l[0]));else{const t=n(o,l);e?r(t,0):r(0,t)}}},onScrollPositionChange(t){const s=t.target,e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t,s)=>t?t>s?t-s:t:0,r=(t,s)=>Math.floor(t/(s||t)),a=(t,s,e,i,o)=>t<=this.d_numToleratedItems?this.d_numToleratedItems:o?e-i-this.d_numToleratedItems:s+this.d_numToleratedItems-1,h=(t,s,e,i,o,l)=>t<=this.d_numToleratedItems?0:l?t<s?e:t-this.d_numToleratedItems:t>s?e:t-2*this.d_numToleratedItems,c=(t,s,e,i,o)=>{let l=s+i+2*this.d_numToleratedItems;return t>=this.d_numToleratedItems&&(l+=this.d_numToleratedItems+1),this.getLast(l,o)},d=n(s.scrollTop,l.top),m=n(s.scrollLeft,l.left);let f=0,p=this.last,u=!1;if(e){const t=this.lastScrollPos.top<=d,s=this.lastScrollPos.left<=m,e={rows:r(d,o[0]),cols:r(m,o[1])},i={rows:a(e.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:a(e.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)};f={rows:h(e.rows,i.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:h(e.cols,i.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)},p={rows:c(e.rows,f.rows,this.last.rows,this.numItemsInViewport.rows),cols:c(e.cols,f.cols,this.last.cols,this.numItemsInViewport.cols,!0)},u=f.rows!==this.first.rows||f.cols!==this.first.cols||p.rows!==this.last.rows||p.cols!==this.last.cols,this.lastScrollPos={top:d,left:m}}else{const t=i?m:d,s=this.lastScrollPos<=t,e=r(t,o);f=h(e,a(e,this.first,this.last,this.numItemsInViewport,s),this.first,this.last,this.numItemsInViewport,s),p=c(e,f,this.last,this.numItemsInViewport),u=f!==this.first||p!==this.last,this.lastScrollPos=t}return{first:f,last:p,isRangeChanged:u}},onScrollChange(t){const{first:s,last:e,isRangeChanged:i}=this.onScrollPositionChange(t);if(i){const t={first:s,last:e};this.setContentPosition(t),this.lazy&&this.$emit("lazy-load",{first:s,last:e}),this.first=s,this.last=e,this.$emit("scroll-index-change",{first:s,last:e})}},onScroll(t){if(this.delay&&!this.lazy){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:s}=this.onScrollPositionChange(t);s&&(this.d_loading=!0)}this.scrollTimeout=setTimeout((()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&!this.lazy&&(this.d_loading=!1)}),this.delay)}else this.onScrollChange(t)},getOptions(t){let s=this.items.length,e=this.isBoth()?this.first.rows+t:this.first+t;return{index:e,count:s,first:0===e,last:e===s-1,even:e%2==0,odd:e%2!=0}},getLoaderOptions(t){let s=this.loaderArr.length;return{loading:this.d_loading,first:0===t,last:t===s-1,even:t%2==0,odd:t%2!=0}},isHorizontal(){return"horizontal"===this.orientation},isBoth(){return"both"===this.orientation},scrollTo(t){this.element&&this.element.scrollTo(t)},scrollToIndex(t,s="auto"){const e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t=0)=>t<=this.d_numToleratedItems?0:t,r=(t,s,e)=>t*s+e,a=(t=0,e=0)=>this.scrollTo({left:t,top:e,behavior:s});if(e){const s={rows:n(t[0]),cols:n(t[1])};s.rows===this.first.rows&&s.cols===this.first.cols||a(r(s.cols,o[1],l.left),r(s.rows,o[0],l.top))}else{const s=n(t);s!==this.first&&(i?a(r(s,o,l.left),0):a(0,r(s,o,l.top))),this.first=s}},scrollInView(t,s,e="auto"){if(s){const i=this.isBoth(),o=this.isHorizontal(),{first:l,viewport:n}=this.getRenderedRange(),r=this.itemSize,a=(t=0,s=0)=>this.scrollTo({left:t,top:s,behavior:e}),h="to-end"===s;if("to-start"===s){if(i)n.first.rows-l.rows>t[0]?a(n.first.cols*r[1],(n.first.rows-1)*r[0]):n.first.cols-l.cols>t[1]&&a((n.first.cols-1)*r[1],n.first.rows*r[0]);else if(n.first-l>t){const t=(n.first-1)*r;o?a(t,0):a(0,t)}}else if(h)if(i)n.last.rows-l.rows<=t[0]+1?a(n.first.cols*r[1],(n.first.rows+1)*r[0]):n.last.cols-l.cols<=t[1]+1&&a((n.first.cols+1)*r[1],n.first.rows*r[0]);else if(n.last-l<=t+1){const t=(n.first+1)*r;o?a(t,0):a(0,t)}}else this.scrollToIndex(t,e)},getRenderedRange(){const t=this.isBoth(),s=this.isHorizontal(),e=this.itemSize,i=(t,s)=>Math.floor(t/(s||t));let o=this.first,l=0;if(this.element){const n=this.element.scrollTop,r=this.element.scrollLeft;if(t)o={rows:i(n,e[0]),cols:i(r,e[1])},l={rows:o.rows+this.numItemsInViewport.rows,cols:o.cols+this.numItemsInViewport.cols};else{o=i(s?r:n,e),l=o+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:o,last:l}}},elementRef(t){this.element=t},contentRef(t){this.content=t},spacerRef(t){this.spacer=t}},computed:{containerClass(){return["p-virtualscroller",{"p-both-scroll":this.isBoth(),"p-horizontal-scroll":this.isHorizontal()},this.class]},loaderClass(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems(){const t=this.items;if(t&&!this.d_loading){return this.isBoth()?t.slice(this.first.rows,this.last.rows).map((t=>t.slice(this.first.cols,this.last.cols))):t.slice(this.first,this.last).map((t=>t))}return[]}}};const e=t.createVNode("i",{class:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"},null,-1);!function(t,s){void 0===s&&(s={});var e=s.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n will-change: scroll-position;\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 -webkit-transform-origin: 0 0;\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: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n"),s.render=function(s,i,o,l,n,r){return o.disabled?(t.openBlock(),t.createBlock(t.Fragment,{key:1},[t.renderSlot(s.$slots,"default"),t.renderSlot(s.$slots,"content",{items:o.items})],64)):(t.openBlock(),t.createBlock("div",{key:0,ref:r.elementRef,class:r.containerClass,style:o.style,onScroll:i[1]||(i[1]=(...t)=>r.onScroll&&r.onScroll(...t))},[t.renderSlot(s.$slots,"content",{styleClass:"p-virtualscroller-content",contentRef:r.contentRef,items:r.loadedItems,getItemOptions:r.getOptions},(()=>[t.createVNode("div",{ref:r.contentRef,class:"p-virtualscroller-content"},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(r.loadedItems,((e,i)=>t.renderSlot(s.$slots,"item",{key:i,item:e,options:r.getOptions(i)}))),128))],512)])),t.createVNode("div",{ref:r.spacerRef,class:"p-virtualscroller-spacer"},null,512),n.d_loading?(t.openBlock(),t.createBlock("div",{key:0,class:r.loaderClass},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(n.loaderArr,((i,o)=>t.renderSlot(s.$slots,"loader",{key:o,options:r.getLoaderOptions(o)},(()=>[e])))),128))],2)):t.createCommentVNode("",!0)],38))},module.exports=s;
@@ -366,7 +366,7 @@ var script = {
366
366
  isHorizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPadding.left), 0) : scrollTo(0, calculateCoord(newFirst, itemSize, contentPadding.top));
367
367
  }
368
368
 
369
- this.first = newFirst.index;
369
+ this.first = newFirst;
370
370
  }
371
371
  },
372
372
  scrollInView(index, to, behavior = 'auto') {
@@ -1 +1 @@
1
- import{openBlock as t,createBlock as s,renderSlot as e,createVNode as i,Fragment as o,renderList as l,createCommentVNode as n}from"vue";var r={name:"VirtualScroller",emits:["update:numToleratedItems","scroll-index-change","lazy-load"],props:{items:{type:Array,default:null},itemSize:{type:[Number,Array],default:null},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},lazy:{type:Boolean,default:!1},showLoader:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},style:null,class:null,disabled:{type:Boolean,default:!1}},data(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:null}},element:null,content:null,spacer:null,scrollTimeout:null,mounted(){this.init()},watch:{numToleratedItems(t){this.d_numToleratedItems=t},loading(t){this.d_loading=t},items(t,s){s&&s.length===(t||[]).length||this.init()}},methods:{init(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},getLast(t,s){return this.items?Math.min(s?this.items[0].length:this.items.length,t):0},calculateOptions(){const t=this.isBoth(),s=this.isHorizontal(),e=this.first,i=this.itemSize,o=this.getContentPadding(),l=this.element?this.element.offsetWidth-o.left:0,n=this.element?this.element.offsetHeight-o.top:0,r=(t,s)=>Math.ceil(t/(s||t)),a=t?{rows:r(n,i[0]),cols:r(l,i[1])}:r(s?l:n,i);let h=this.d_numToleratedItems||Math.ceil((t?a.rows:a)/2);const c=(t,s,e)=>this.getLast(t+s+(t<h?2:3)*h,e),d=t?{rows:c(e.rows,a.rows),cols:c(e.cols,a.cols,!0)}:c(e,a);this.d_numToleratedItems=h,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.last=d,this.numItemsInViewport=a,this.showLoader&&(this.$slots&&this.$slots.loader?this.loaderArr=Array.from({length:t?a.rows:a}):this.loaderArr=Array.from({length:1})),this.lazy&&this.$emit("lazy-load",{first:e,last:d})},getContentPadding(){if(this.content){const t=getComputedStyle(this.content),s=parseInt(parseFloat(t.paddingLeft.slice(0,-2)),10),e=parseInt(parseFloat(t.paddingRight.slice(0,-2)),10),i=parseInt(parseFloat(t.paddingTop.slice(0,-2)),10),o=parseInt(parseFloat(t.paddingBottom.slice(0,-2)),10);return{left:s,right:e,top:i,bottom:o,x:s+e,y:i+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize(){if(this.element){const t=this.isBoth(),s=this.isHorizontal(),e=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||e.offsetWidth}px`,o=this.scrollHeight||`${this.element.offsetHeight||e.offsetHeight}px`,l=(t,s)=>this.element.style[t]=s;t?(l("height",o),l("width",i)):s?l("width",i):l("height",o)}},setSpacerSize(){const t=this.items;if(this.spacer&&t){const s=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,o=this.getContentPadding(),l=(t,s,e,i=0)=>this.spacer.style[t]=(s||[]).length*e+i+"px";s?(l("height",t[0],i[0],o.y),l("width",t[1],i[1],o.x)):e?l("width",t,i,o.x):l("height",t,i,o.y)}},setContentPosition(t){if(this.content){const s=this.isBoth(),e=this.isHorizontal(),i=this.content,o=t?t.first:this.first,l=this.itemSize,n=(t,s)=>t*s,r=(t=0,s=0)=>i.style.transform=`translate3d(${t}px, ${s}px, 0)`;if(s)r(n(o.cols,l[1]),n(o.rows,l[0]));else{const t=n(o,l);e?r(t,0):r(0,t)}}},onScrollPositionChange(t){const s=t.target,e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t,s)=>t?t>s?t-s:t:0,r=(t,s)=>Math.floor(t/(s||t)),a=(t,s,e,i,o)=>t<=this.d_numToleratedItems?this.d_numToleratedItems:o?e-i-this.d_numToleratedItems:s+this.d_numToleratedItems-1,h=(t,s,e,i,o,l)=>t<=this.d_numToleratedItems?0:l?t<s?e:t-this.d_numToleratedItems:t>s?e:t-2*this.d_numToleratedItems,c=(t,s,e,i,o)=>{let l=s+i+2*this.d_numToleratedItems;return t>=this.d_numToleratedItems&&(l+=this.d_numToleratedItems+1),this.getLast(l,o)},d=n(s.scrollTop,l.top),m=n(s.scrollLeft,l.left);let f=0,p=this.last,u=!1;if(e){const t=this.lastScrollPos.top<=d,s=this.lastScrollPos.left<=m,e={rows:r(d,o[0]),cols:r(m,o[1])},i={rows:a(e.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:a(e.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)};f={rows:h(e.rows,i.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:h(e.cols,i.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)},p={rows:c(e.rows,f.rows,this.last.rows,this.numItemsInViewport.rows),cols:c(e.cols,f.cols,this.last.cols,this.numItemsInViewport.cols,!0)},u=f.rows!==this.first.rows||f.cols!==this.first.cols||p.rows!==this.last.rows||p.cols!==this.last.cols,this.lastScrollPos={top:d,left:m}}else{const t=i?m:d,s=this.lastScrollPos<=t,e=r(t,o);f=h(e,a(e,this.first,this.last,this.numItemsInViewport,s),this.first,this.last,this.numItemsInViewport,s),p=c(e,f,this.last,this.numItemsInViewport),u=f!==this.first||p!==this.last,this.lastScrollPos=t}return{first:f,last:p,isRangeChanged:u}},onScrollChange(t){const{first:s,last:e,isRangeChanged:i}=this.onScrollPositionChange(t);if(i){const t={first:s,last:e};this.setContentPosition(t),this.lazy&&this.$emit("lazy-load",{first:s,last:e}),this.first=s,this.last=e,this.$emit("scroll-index-change",{first:s,last:e})}},onScroll(t){if(this.delay&&!this.lazy){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:s}=this.onScrollPositionChange(t);s&&(this.d_loading=!0)}this.scrollTimeout=setTimeout((()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&!this.lazy&&(this.d_loading=!1)}),this.delay)}else this.onScrollChange(t)},getOptions(t){let s=this.items.length,e=this.isBoth()?this.first.rows+t:this.first+t;return{index:e,count:s,first:0===e,last:e===s-1,even:e%2==0,odd:e%2!=0}},getLoaderOptions(t){let s=this.loaderArr.length;return{loading:this.d_loading,first:0===t,last:t===s-1,even:t%2==0,odd:t%2!=0}},isHorizontal(){return"horizontal"===this.orientation},isBoth(){return"both"===this.orientation},scrollTo(t){this.element&&this.element.scrollTo(t)},scrollToIndex(t,s="auto"){const e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t=0)=>t<=this.d_numToleratedItems?0:t,r=(t,s,e)=>t*s+e,a=(t=0,e=0)=>this.scrollTo({left:t,top:e,behavior:s});if(e){const s={rows:n(t[0]),cols:n(t[1])};s.rows===this.first.rows&&s.cols===this.first.cols||a(r(s.cols,o[1],l.left),r(s.rows,o[0],l.top))}else{const s=n(t);s!==this.first&&(i?a(r(s,o,l.left),0):a(0,r(s,o,l.top))),this.first=s.index}},scrollInView(t,s,e="auto"){if(s){const i=this.isBoth(),o=this.isHorizontal(),{first:l,viewport:n}=this.getRenderedRange(),r=this.itemSize,a=(t=0,s=0)=>this.scrollTo({left:t,top:s,behavior:e}),h="to-end"===s;if("to-start"===s){if(i)n.first.rows-l.rows>t[0]?a(n.first.cols*r[1],(n.first.rows-1)*r[0]):n.first.cols-l.cols>t[1]&&a((n.first.cols-1)*r[1],n.first.rows*r[0]);else if(n.first-l>t){const t=(n.first-1)*r;o?a(t,0):a(0,t)}}else if(h)if(i)n.last.rows-l.rows<=t[0]+1?a(n.first.cols*r[1],(n.first.rows+1)*r[0]):n.last.cols-l.cols<=t[1]+1&&a((n.first.cols+1)*r[1],n.first.rows*r[0]);else if(n.last-l<=t+1){const t=(n.first+1)*r;o?a(t,0):a(0,t)}}else this.scrollToIndex(t,e)},getRenderedRange(){const t=this.isBoth(),s=this.isHorizontal(),e=this.itemSize,i=(t,s)=>Math.floor(t/(s||t));let o=this.first,l=0;if(this.element){const n=this.element.scrollTop,r=this.element.scrollLeft;if(t)o={rows:i(n,e[0]),cols:i(r,e[1])},l={rows:o.rows+this.numItemsInViewport.rows,cols:o.cols+this.numItemsInViewport.cols};else{o=i(s?r:n,e),l=o+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:o,last:l}}},elementRef(t){this.element=t},contentRef(t){this.content=t},spacerRef(t){this.spacer=t}},computed:{containerClass(){return["p-virtualscroller",{"p-both-scroll":this.isBoth(),"p-horizontal-scroll":this.isHorizontal()},this.class]},loaderClass(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems(){const t=this.items;if(t&&!this.d_loading){return this.isBoth()?t.slice(this.first.rows,this.last.rows).map((t=>t.slice(this.first.cols,this.last.cols))):t.slice(this.first,this.last).map((t=>t))}return[]}}};const a=i("i",{class:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"},null,-1);!function(t,s){void 0===s&&(s={});var e=s.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n will-change: scroll-position;\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 -webkit-transform-origin: 0 0;\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: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n"),r.render=function(r,h,c,d,m,f){return c.disabled?(t(),s(o,{key:1},[e(r.$slots,"default"),e(r.$slots,"content",{items:c.items})],64)):(t(),s("div",{key:0,ref:f.elementRef,class:f.containerClass,style:c.style,onScroll:h[1]||(h[1]=(...t)=>f.onScroll&&f.onScroll(...t))},[e(r.$slots,"content",{styleClass:"p-virtualscroller-content",contentRef:f.contentRef,items:f.loadedItems,getItemOptions:f.getOptions},(()=>[i("div",{ref:f.contentRef,class:"p-virtualscroller-content"},[(t(!0),s(o,null,l(f.loadedItems,((t,s)=>e(r.$slots,"item",{key:s,item:t,options:f.getOptions(s)}))),128))],512)])),i("div",{ref:f.spacerRef,class:"p-virtualscroller-spacer"},null,512),m.d_loading?(t(),s("div",{key:0,class:f.loaderClass},[(t(!0),s(o,null,l(m.loaderArr,((t,s)=>e(r.$slots,"loader",{key:s,options:f.getLoaderOptions(s)},(()=>[a])))),128))],2)):n("",!0)],38))};export default r;
1
+ import{openBlock as t,createBlock as s,renderSlot as e,createVNode as i,Fragment as o,renderList as l,createCommentVNode as n}from"vue";var r={name:"VirtualScroller",emits:["update:numToleratedItems","scroll-index-change","lazy-load"],props:{items:{type:Array,default:null},itemSize:{type:[Number,Array],default:null},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},lazy:{type:Boolean,default:!1},showLoader:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},style:null,class:null,disabled:{type:Boolean,default:!1}},data(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:null}},element:null,content:null,spacer:null,scrollTimeout:null,mounted(){this.init()},watch:{numToleratedItems(t){this.d_numToleratedItems=t},loading(t){this.d_loading=t},items(t,s){s&&s.length===(t||[]).length||this.init()}},methods:{init(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},getLast(t,s){return this.items?Math.min(s?this.items[0].length:this.items.length,t):0},calculateOptions(){const t=this.isBoth(),s=this.isHorizontal(),e=this.first,i=this.itemSize,o=this.getContentPadding(),l=this.element?this.element.offsetWidth-o.left:0,n=this.element?this.element.offsetHeight-o.top:0,r=(t,s)=>Math.ceil(t/(s||t)),a=t?{rows:r(n,i[0]),cols:r(l,i[1])}:r(s?l:n,i);let h=this.d_numToleratedItems||Math.ceil((t?a.rows:a)/2);const c=(t,s,e)=>this.getLast(t+s+(t<h?2:3)*h,e),d=t?{rows:c(e.rows,a.rows),cols:c(e.cols,a.cols,!0)}:c(e,a);this.d_numToleratedItems=h,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.last=d,this.numItemsInViewport=a,this.showLoader&&(this.$slots&&this.$slots.loader?this.loaderArr=Array.from({length:t?a.rows:a}):this.loaderArr=Array.from({length:1})),this.lazy&&this.$emit("lazy-load",{first:e,last:d})},getContentPadding(){if(this.content){const t=getComputedStyle(this.content),s=parseInt(parseFloat(t.paddingLeft.slice(0,-2)),10),e=parseInt(parseFloat(t.paddingRight.slice(0,-2)),10),i=parseInt(parseFloat(t.paddingTop.slice(0,-2)),10),o=parseInt(parseFloat(t.paddingBottom.slice(0,-2)),10);return{left:s,right:e,top:i,bottom:o,x:s+e,y:i+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize(){if(this.element){const t=this.isBoth(),s=this.isHorizontal(),e=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||e.offsetWidth}px`,o=this.scrollHeight||`${this.element.offsetHeight||e.offsetHeight}px`,l=(t,s)=>this.element.style[t]=s;t?(l("height",o),l("width",i)):s?l("width",i):l("height",o)}},setSpacerSize(){const t=this.items;if(this.spacer&&t){const s=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,o=this.getContentPadding(),l=(t,s,e,i=0)=>this.spacer.style[t]=(s||[]).length*e+i+"px";s?(l("height",t[0],i[0],o.y),l("width",t[1],i[1],o.x)):e?l("width",t,i,o.x):l("height",t,i,o.y)}},setContentPosition(t){if(this.content){const s=this.isBoth(),e=this.isHorizontal(),i=this.content,o=t?t.first:this.first,l=this.itemSize,n=(t,s)=>t*s,r=(t=0,s=0)=>i.style.transform=`translate3d(${t}px, ${s}px, 0)`;if(s)r(n(o.cols,l[1]),n(o.rows,l[0]));else{const t=n(o,l);e?r(t,0):r(0,t)}}},onScrollPositionChange(t){const s=t.target,e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t,s)=>t?t>s?t-s:t:0,r=(t,s)=>Math.floor(t/(s||t)),a=(t,s,e,i,o)=>t<=this.d_numToleratedItems?this.d_numToleratedItems:o?e-i-this.d_numToleratedItems:s+this.d_numToleratedItems-1,h=(t,s,e,i,o,l)=>t<=this.d_numToleratedItems?0:l?t<s?e:t-this.d_numToleratedItems:t>s?e:t-2*this.d_numToleratedItems,c=(t,s,e,i,o)=>{let l=s+i+2*this.d_numToleratedItems;return t>=this.d_numToleratedItems&&(l+=this.d_numToleratedItems+1),this.getLast(l,o)},d=n(s.scrollTop,l.top),m=n(s.scrollLeft,l.left);let f=0,p=this.last,u=!1;if(e){const t=this.lastScrollPos.top<=d,s=this.lastScrollPos.left<=m,e={rows:r(d,o[0]),cols:r(m,o[1])},i={rows:a(e.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:a(e.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)};f={rows:h(e.rows,i.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,t),cols:h(e.cols,i.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,s)},p={rows:c(e.rows,f.rows,this.last.rows,this.numItemsInViewport.rows),cols:c(e.cols,f.cols,this.last.cols,this.numItemsInViewport.cols,!0)},u=f.rows!==this.first.rows||f.cols!==this.first.cols||p.rows!==this.last.rows||p.cols!==this.last.cols,this.lastScrollPos={top:d,left:m}}else{const t=i?m:d,s=this.lastScrollPos<=t,e=r(t,o);f=h(e,a(e,this.first,this.last,this.numItemsInViewport,s),this.first,this.last,this.numItemsInViewport,s),p=c(e,f,this.last,this.numItemsInViewport),u=f!==this.first||p!==this.last,this.lastScrollPos=t}return{first:f,last:p,isRangeChanged:u}},onScrollChange(t){const{first:s,last:e,isRangeChanged:i}=this.onScrollPositionChange(t);if(i){const t={first:s,last:e};this.setContentPosition(t),this.lazy&&this.$emit("lazy-load",{first:s,last:e}),this.first=s,this.last=e,this.$emit("scroll-index-change",{first:s,last:e})}},onScroll(t){if(this.delay&&!this.lazy){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:s}=this.onScrollPositionChange(t);s&&(this.d_loading=!0)}this.scrollTimeout=setTimeout((()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&!this.lazy&&(this.d_loading=!1)}),this.delay)}else this.onScrollChange(t)},getOptions(t){let s=this.items.length,e=this.isBoth()?this.first.rows+t:this.first+t;return{index:e,count:s,first:0===e,last:e===s-1,even:e%2==0,odd:e%2!=0}},getLoaderOptions(t){let s=this.loaderArr.length;return{loading:this.d_loading,first:0===t,last:t===s-1,even:t%2==0,odd:t%2!=0}},isHorizontal(){return"horizontal"===this.orientation},isBoth(){return"both"===this.orientation},scrollTo(t){this.element&&this.element.scrollTo(t)},scrollToIndex(t,s="auto"){const e=this.isBoth(),i=this.isHorizontal(),o=this.itemSize,l=this.getContentPadding(),n=(t=0)=>t<=this.d_numToleratedItems?0:t,r=(t,s,e)=>t*s+e,a=(t=0,e=0)=>this.scrollTo({left:t,top:e,behavior:s});if(e){const s={rows:n(t[0]),cols:n(t[1])};s.rows===this.first.rows&&s.cols===this.first.cols||a(r(s.cols,o[1],l.left),r(s.rows,o[0],l.top))}else{const s=n(t);s!==this.first&&(i?a(r(s,o,l.left),0):a(0,r(s,o,l.top))),this.first=s}},scrollInView(t,s,e="auto"){if(s){const i=this.isBoth(),o=this.isHorizontal(),{first:l,viewport:n}=this.getRenderedRange(),r=this.itemSize,a=(t=0,s=0)=>this.scrollTo({left:t,top:s,behavior:e}),h="to-end"===s;if("to-start"===s){if(i)n.first.rows-l.rows>t[0]?a(n.first.cols*r[1],(n.first.rows-1)*r[0]):n.first.cols-l.cols>t[1]&&a((n.first.cols-1)*r[1],n.first.rows*r[0]);else if(n.first-l>t){const t=(n.first-1)*r;o?a(t,0):a(0,t)}}else if(h)if(i)n.last.rows-l.rows<=t[0]+1?a(n.first.cols*r[1],(n.first.rows+1)*r[0]):n.last.cols-l.cols<=t[1]+1&&a((n.first.cols+1)*r[1],n.first.rows*r[0]);else if(n.last-l<=t+1){const t=(n.first+1)*r;o?a(t,0):a(0,t)}}else this.scrollToIndex(t,e)},getRenderedRange(){const t=this.isBoth(),s=this.isHorizontal(),e=this.itemSize,i=(t,s)=>Math.floor(t/(s||t));let o=this.first,l=0;if(this.element){const n=this.element.scrollTop,r=this.element.scrollLeft;if(t)o={rows:i(n,e[0]),cols:i(r,e[1])},l={rows:o.rows+this.numItemsInViewport.rows,cols:o.cols+this.numItemsInViewport.cols};else{o=i(s?r:n,e),l=o+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:o,last:l}}},elementRef(t){this.element=t},contentRef(t){this.content=t},spacerRef(t){this.spacer=t}},computed:{containerClass(){return["p-virtualscroller",{"p-both-scroll":this.isBoth(),"p-horizontal-scroll":this.isHorizontal()},this.class]},loaderClass(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems(){const t=this.items;if(t&&!this.d_loading){return this.isBoth()?t.slice(this.first.rows,this.last.rows).map((t=>t.slice(this.first.cols,this.last.cols))):t.slice(this.first,this.last).map((t=>t))}return[]}}};const a=i("i",{class:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"},null,-1);!function(t,s){void 0===s&&(s={});var e=s.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n will-change: scroll-position;\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 -webkit-transform-origin: 0 0;\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: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n"),r.render=function(r,h,c,d,m,f){return c.disabled?(t(),s(o,{key:1},[e(r.$slots,"default"),e(r.$slots,"content",{items:c.items})],64)):(t(),s("div",{key:0,ref:f.elementRef,class:f.containerClass,style:c.style,onScroll:h[1]||(h[1]=(...t)=>f.onScroll&&f.onScroll(...t))},[e(r.$slots,"content",{styleClass:"p-virtualscroller-content",contentRef:f.contentRef,items:f.loadedItems,getItemOptions:f.getOptions},(()=>[i("div",{ref:f.contentRef,class:"p-virtualscroller-content"},[(t(!0),s(o,null,l(f.loadedItems,((t,s)=>e(r.$slots,"item",{key:s,item:t,options:f.getOptions(s)}))),128))],512)])),i("div",{ref:f.spacerRef,class:"p-virtualscroller-spacer"},null,512),m.d_loading?(t(),s("div",{key:0,class:f.loaderClass},[(t(!0),s(o,null,l(m.loaderArr,((t,s)=>e(r.$slots,"loader",{key:s,options:f.getLoaderOptions(s)},(()=>[a])))),128))],2)):n("",!0)],38))};export default r;
@@ -368,7 +368,7 @@ this.primevue.virtualscroller = (function (vue) {
368
368
  isHorizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPadding.left), 0) : scrollTo(0, calculateCoord(newFirst, itemSize, contentPadding.top));
369
369
  }
370
370
 
371
- this.first = newFirst.index;
371
+ this.first = newFirst;
372
372
  }
373
373
  },
374
374
  scrollInView(index, to, behavior = 'auto') {