primevue 3.28.0 → 3.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (420) hide show
  1. package/README.md +3 -3
  2. package/autocomplete/AutoComplete.d.ts +153 -1
  3. package/autocomplete/AutoComplete.vue +46 -17
  4. package/autocomplete/autocomplete.cjs.js +80 -74
  5. package/autocomplete/autocomplete.cjs.min.js +1 -1
  6. package/autocomplete/autocomplete.esm.js +80 -75
  7. package/autocomplete/autocomplete.esm.min.js +1 -1
  8. package/autocomplete/autocomplete.js +81 -76
  9. package/autocomplete/autocomplete.min.js +1 -1
  10. package/basecomponent/BaseComponent.vue +19 -5
  11. package/basecomponent/basecomponent.cjs.js +19 -5
  12. package/basecomponent/basecomponent.cjs.min.js +1 -1
  13. package/basecomponent/basecomponent.esm.js +19 -5
  14. package/basecomponent/basecomponent.esm.min.js +1 -1
  15. package/basecomponent/basecomponent.js +20 -7
  16. package/basecomponent/basecomponent.min.js +1 -1
  17. package/calendar/Calendar.d.ts +269 -0
  18. package/calendar/Calendar.vue +75 -59
  19. package/calendar/calendar.cjs.js +223 -259
  20. package/calendar/calendar.cjs.min.js +1 -1
  21. package/calendar/calendar.esm.js +223 -260
  22. package/calendar/calendar.esm.min.js +1 -1
  23. package/calendar/calendar.js +224 -261
  24. package/calendar/calendar.min.js +1 -1
  25. package/carousel/Carousel.d.ts +154 -0
  26. package/carousel/Carousel.vue +27 -14
  27. package/carousel/carousel.cjs.js +64 -65
  28. package/carousel/carousel.cjs.min.js +1 -1
  29. package/carousel/carousel.esm.js +64 -66
  30. package/carousel/carousel.esm.min.js +1 -1
  31. package/carousel/carousel.js +65 -67
  32. package/carousel/carousel.min.js +1 -1
  33. package/cascadeselect/CascadeSelect.d.ts +133 -0
  34. package/cascadeselect/CascadeSelect.vue +15 -12
  35. package/cascadeselect/CascadeSelectSub.vue +7 -3
  36. package/cascadeselect/cascadeselect.cjs.js +63 -66
  37. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  38. package/cascadeselect/cascadeselect.esm.js +63 -67
  39. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  40. package/cascadeselect/cascadeselect.js +64 -68
  41. package/cascadeselect/cascadeselect.min.js +1 -1
  42. package/checkbox/Checkbox.d.ts +60 -0
  43. package/checkbox/Checkbox.vue +7 -5
  44. package/checkbox/checkbox.cjs.js +17 -15
  45. package/checkbox/checkbox.cjs.min.js +1 -1
  46. package/checkbox/checkbox.esm.js +17 -16
  47. package/checkbox/checkbox.esm.min.js +1 -1
  48. package/checkbox/checkbox.js +18 -17
  49. package/checkbox/checkbox.min.js +1 -1
  50. package/chips/Chips.d.ts +80 -0
  51. package/chips/Chips.vue +9 -5
  52. package/chips/chips.cjs.js +23 -24
  53. package/chips/chips.cjs.min.js +1 -1
  54. package/chips/chips.esm.js +23 -25
  55. package/chips/chips.esm.min.js +1 -1
  56. package/chips/chips.js +24 -26
  57. package/chips/chips.min.js +1 -1
  58. package/colorpicker/ColorPicker.d.ts +76 -0
  59. package/colorpicker/ColorPicker.vue +11 -9
  60. package/colorpicker/colorpicker.cjs.js +28 -27
  61. package/colorpicker/colorpicker.cjs.min.js +1 -1
  62. package/colorpicker/colorpicker.esm.js +28 -28
  63. package/colorpicker/colorpicker.esm.min.js +1 -1
  64. package/colorpicker/colorpicker.js +29 -29
  65. package/colorpicker/colorpicker.min.js +1 -1
  66. package/column/Column.d.ts +303 -2
  67. package/column/Column.vue +3 -0
  68. package/column/column.cjs.js +7 -0
  69. package/column/column.cjs.min.js +1 -1
  70. package/column/column.esm.js +3 -0
  71. package/column/column.esm.min.js +1 -1
  72. package/column/column.js +7 -2
  73. package/column/column.min.js +1 -1
  74. package/columngroup/ColumnGroup.d.ts +34 -0
  75. package/columngroup/ColumnGroup.vue +3 -0
  76. package/columngroup/columngroup.cjs.js +7 -0
  77. package/columngroup/columngroup.cjs.min.js +1 -1
  78. package/columngroup/columngroup.esm.js +3 -0
  79. package/columngroup/columngroup.esm.min.js +1 -1
  80. package/columngroup/columngroup.js +7 -2
  81. package/columngroup/columngroup.min.js +1 -1
  82. package/config/PrimeVue.d.ts +163 -2
  83. package/confirmdialog/ConfirmDialog.d.ts +14 -7
  84. package/contextmenu/ContextMenu.d.ts +1 -1
  85. package/core/core.js +448 -331
  86. package/core/core.min.js +9 -9
  87. package/datatable/BodyCell.vue +29 -13
  88. package/datatable/ColumnFilter.vue +49 -20
  89. package/datatable/DataTable.d.ts +188 -1
  90. package/datatable/DataTable.vue +25 -14
  91. package/datatable/FooterCell.vue +15 -1
  92. package/datatable/HeaderCell.vue +31 -6
  93. package/datatable/HeaderCheckbox.vue +35 -5
  94. package/datatable/RowCheckbox.vue +36 -5
  95. package/datatable/RowRadioButton.vue +26 -6
  96. package/datatable/TableBody.vue +41 -11
  97. package/datatable/TableFooter.vue +31 -5
  98. package/datatable/TableHeader.vue +53 -6
  99. package/datatable/datatable.cjs.js +559 -376
  100. package/datatable/datatable.cjs.min.js +1 -1
  101. package/datatable/datatable.esm.js +559 -377
  102. package/datatable/datatable.esm.min.js +1 -1
  103. package/datatable/datatable.js +560 -378
  104. package/datatable/datatable.min.js +1 -1
  105. package/dataview/DataView.d.ts +72 -0
  106. package/dataview/DataView.vue +13 -8
  107. package/dataview/dataview.cjs.js +33 -37
  108. package/dataview/dataview.cjs.min.js +1 -1
  109. package/dataview/dataview.esm.js +33 -38
  110. package/dataview/dataview.esm.min.js +1 -1
  111. package/dataview/dataview.js +33 -38
  112. package/dataview/dataview.min.js +1 -1
  113. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +65 -0
  114. package/dataviewlayoutoptions/DataViewLayoutOptions.vue +7 -5
  115. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -17
  116. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
  117. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -18
  118. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
  119. package/dataviewlayoutoptions/dataviewlayoutoptions.js +20 -19
  120. package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
  121. package/dialog/Dialog.d.ts +6 -4
  122. package/dialog/Dialog.vue +2 -3
  123. package/dialog/dialog.cjs.js +4 -5
  124. package/dialog/dialog.cjs.min.js +1 -1
  125. package/dialog/dialog.esm.js +4 -5
  126. package/dialog/dialog.esm.min.js +1 -1
  127. package/dialog/dialog.js +4 -5
  128. package/dialog/dialog.min.js +1 -1
  129. package/dropdown/Dropdown.d.ts +162 -1
  130. package/dropdown/Dropdown.vue +44 -25
  131. package/dropdown/dropdown.cjs.js +97 -93
  132. package/dropdown/dropdown.cjs.min.js +1 -1
  133. package/dropdown/dropdown.esm.js +97 -94
  134. package/dropdown/dropdown.esm.min.js +1 -1
  135. package/dropdown/dropdown.js +98 -95
  136. package/dropdown/dropdown.min.js +1 -1
  137. package/editor/Editor.d.ts +67 -0
  138. package/editor/Editor.vue +35 -33
  139. package/editor/editor.cjs.js +88 -73
  140. package/editor/editor.cjs.min.js +1 -1
  141. package/editor/editor.esm.js +85 -74
  142. package/editor/editor.esm.min.js +1 -1
  143. package/editor/editor.js +89 -75
  144. package/editor/editor.min.js +1 -1
  145. package/fileupload/FileUpload.d.ts +23 -23
  146. package/fileupload/FileUpload.vue +3 -3
  147. package/fileupload/fileupload.cjs.js +4 -4
  148. package/fileupload/fileupload.cjs.min.js +1 -1
  149. package/fileupload/fileupload.esm.js +4 -4
  150. package/fileupload/fileupload.esm.min.js +1 -1
  151. package/fileupload/fileupload.js +4 -4
  152. package/fileupload/fileupload.min.js +1 -1
  153. package/galleria/Galleria.d.ts +196 -0
  154. package/galleria/Galleria.vue +5 -3
  155. package/galleria/GalleriaContent.vue +10 -6
  156. package/galleria/GalleriaItem.vue +12 -9
  157. package/galleria/GalleriaThumbnails.vue +46 -9
  158. package/galleria/galleria.cjs.js +106 -104
  159. package/galleria/galleria.cjs.min.js +1 -1
  160. package/galleria/galleria.esm.js +106 -105
  161. package/galleria/galleria.esm.min.js +1 -1
  162. package/galleria/galleria.js +107 -106
  163. package/galleria/galleria.min.js +1 -1
  164. package/image/Image.d.ts +170 -0
  165. package/image/Image.vue +49 -21
  166. package/image/image.cjs.js +94 -59
  167. package/image/image.cjs.min.js +1 -1
  168. package/image/image.esm.js +94 -60
  169. package/image/image.esm.min.js +1 -1
  170. package/image/image.js +95 -61
  171. package/image/image.min.js +1 -1
  172. package/inputmask/InputMask.d.ts +25 -0
  173. package/inputmask/InputMask.vue +3 -1
  174. package/inputmask/inputmask.cjs.js +9 -3
  175. package/inputmask/inputmask.cjs.min.js +1 -1
  176. package/inputmask/inputmask.esm.js +6 -4
  177. package/inputmask/inputmask.esm.min.js +1 -1
  178. package/inputmask/inputmask.js +10 -5
  179. package/inputmask/inputmask.min.js +1 -1
  180. package/inputnumber/InputNumber.d.ts +69 -0
  181. package/inputnumber/InputNumber.vue +13 -11
  182. package/inputnumber/inputnumber.cjs.js +19 -28
  183. package/inputnumber/inputnumber.cjs.min.js +1 -1
  184. package/inputnumber/inputnumber.esm.js +19 -29
  185. package/inputnumber/inputnumber.esm.min.js +1 -1
  186. package/inputnumber/inputnumber.js +20 -30
  187. package/inputnumber/inputnumber.min.js +1 -1
  188. package/inputswitch/InputSwitch.d.ts +51 -0
  189. package/inputswitch/InputSwitch.vue +7 -4
  190. package/inputswitch/inputswitch.cjs.js +15 -11
  191. package/inputswitch/inputswitch.cjs.min.js +1 -1
  192. package/inputswitch/inputswitch.esm.js +12 -12
  193. package/inputswitch/inputswitch.esm.min.js +1 -1
  194. package/inputswitch/inputswitch.js +16 -13
  195. package/inputswitch/inputswitch.min.js +1 -1
  196. package/inputtext/InputText.d.ts +25 -0
  197. package/inputtext/InputText.vue +4 -1
  198. package/inputtext/inputtext.cjs.js +9 -3
  199. package/inputtext/inputtext.cjs.min.js +1 -1
  200. package/inputtext/inputtext.esm.js +6 -4
  201. package/inputtext/inputtext.esm.min.js +1 -1
  202. package/inputtext/inputtext.js +10 -5
  203. package/inputtext/inputtext.min.js +1 -1
  204. package/knob/Knob.d.ts +78 -0
  205. package/knob/Knob.vue +8 -4
  206. package/knob/knob.cjs.js +17 -13
  207. package/knob/knob.cjs.min.js +1 -1
  208. package/knob/knob.esm.js +14 -14
  209. package/knob/knob.esm.min.js +1 -1
  210. package/knob/knob.js +18 -15
  211. package/knob/knob.min.js +1 -1
  212. package/listbox/Listbox.d.ts +137 -1
  213. package/listbox/Listbox.vue +28 -15
  214. package/listbox/listbox.cjs.js +83 -78
  215. package/listbox/listbox.cjs.min.js +1 -1
  216. package/listbox/listbox.esm.js +83 -79
  217. package/listbox/listbox.esm.min.js +1 -1
  218. package/listbox/listbox.js +84 -80
  219. package/listbox/listbox.min.js +1 -1
  220. package/megamenu/MegaMenu.d.ts +5 -5
  221. package/menu/Menu.d.ts +4 -4
  222. package/menubar/Menubar.d.ts +1 -1
  223. package/multiselect/MultiSelect.d.ts +223 -1
  224. package/multiselect/MultiSelect.vue +72 -41
  225. package/multiselect/multiselect.cjs.js +156 -151
  226. package/multiselect/multiselect.cjs.min.js +1 -1
  227. package/multiselect/multiselect.esm.js +156 -152
  228. package/multiselect/multiselect.esm.min.js +1 -1
  229. package/multiselect/multiselect.js +157 -153
  230. package/multiselect/multiselect.min.js +1 -1
  231. package/orderlist/OrderList.d.ts +94 -0
  232. package/orderlist/OrderList.vue +38 -18
  233. package/orderlist/orderlist.cjs.js +50 -36
  234. package/orderlist/orderlist.cjs.min.js +1 -1
  235. package/orderlist/orderlist.esm.js +50 -37
  236. package/orderlist/orderlist.esm.min.js +1 -1
  237. package/orderlist/orderlist.js +51 -38
  238. package/orderlist/orderlist.min.js +1 -1
  239. package/organizationchart/OrganizationChart.d.ts +129 -0
  240. package/organizationchart/OrganizationChart.vue +14 -2
  241. package/organizationchart/OrganizationChartNode.vue +37 -16
  242. package/organizationchart/organizationchart.cjs.js +77 -61
  243. package/organizationchart/organizationchart.cjs.min.js +1 -1
  244. package/organizationchart/organizationchart.esm.js +77 -62
  245. package/organizationchart/organizationchart.esm.min.js +1 -1
  246. package/organizationchart/organizationchart.js +78 -63
  247. package/organizationchart/organizationchart.min.js +1 -1
  248. package/package.json +1 -1
  249. package/paginator/CurrentPageReport.vue +5 -1
  250. package/paginator/FirstPageLink.vue +13 -2
  251. package/paginator/JumpToPageDropdown.vue +3 -1
  252. package/paginator/JumpToPageInput.vue +3 -1
  253. package/paginator/LastPageLink.vue +13 -2
  254. package/paginator/NextPageLink.vue +13 -2
  255. package/paginator/PageLinks.vue +12 -2
  256. package/paginator/Paginator.d.ts +133 -0
  257. package/paginator/Paginator.vue +23 -12
  258. package/paginator/PrevPageLink.vue +13 -2
  259. package/paginator/RowsPerPageDropdown.vue +3 -1
  260. package/paginator/paginator.cjs.js +135 -76
  261. package/paginator/paginator.cjs.min.js +1 -1
  262. package/paginator/paginator.esm.js +135 -77
  263. package/paginator/paginator.esm.min.js +1 -1
  264. package/paginator/paginator.js +136 -78
  265. package/paginator/paginator.min.js +1 -1
  266. package/panelmenu/PanelMenu.d.ts +4 -8
  267. package/password/Password.d.ts +104 -0
  268. package/password/Password.vue +11 -9
  269. package/password/password.cjs.js +26 -28
  270. package/password/password.cjs.min.js +1 -1
  271. package/password/password.esm.js +26 -29
  272. package/password/password.esm.min.js +1 -1
  273. package/password/password.js +27 -30
  274. package/password/password.min.js +1 -1
  275. package/picklist/PickList.d.ts +160 -0
  276. package/picklist/PickList.vue +46 -34
  277. package/picklist/picklist.cjs.js +111 -85
  278. package/picklist/picklist.cjs.min.js +1 -1
  279. package/picklist/picklist.esm.js +111 -86
  280. package/picklist/picklist.esm.min.js +1 -1
  281. package/picklist/picklist.js +112 -87
  282. package/picklist/picklist.min.js +1 -1
  283. package/radiobutton/RadioButton.d.ts +55 -0
  284. package/radiobutton/RadioButton.vue +7 -5
  285. package/radiobutton/radiobutton.cjs.js +19 -16
  286. package/radiobutton/radiobutton.cjs.min.js +1 -1
  287. package/radiobutton/radiobutton.esm.js +16 -17
  288. package/radiobutton/radiobutton.esm.min.js +1 -1
  289. package/radiobutton/radiobutton.js +20 -18
  290. package/radiobutton/radiobutton.min.js +1 -1
  291. package/rating/Rating.d.ts +96 -0
  292. package/rating/Rating.vue +32 -9
  293. package/rating/rating.cjs.js +41 -34
  294. package/rating/rating.cjs.min.js +1 -1
  295. package/rating/rating.esm.js +41 -35
  296. package/rating/rating.esm.min.js +1 -1
  297. package/rating/rating.js +42 -36
  298. package/rating/rating.min.js +1 -1
  299. package/row/Row.d.ts +29 -0
  300. package/row/Row.vue +3 -0
  301. package/row/row.cjs.js +7 -0
  302. package/row/row.cjs.min.js +1 -1
  303. package/row/row.esm.js +3 -0
  304. package/row/row.esm.min.js +1 -1
  305. package/row/row.js +7 -2
  306. package/row/row.min.js +1 -1
  307. package/selectbutton/SelectButton.d.ts +68 -0
  308. package/selectbutton/SelectButton.vue +13 -2
  309. package/selectbutton/selectbutton.cjs.js +20 -10
  310. package/selectbutton/selectbutton.cjs.min.js +1 -1
  311. package/selectbutton/selectbutton.esm.js +20 -11
  312. package/selectbutton/selectbutton.esm.min.js +1 -1
  313. package/selectbutton/selectbutton.js +21 -12
  314. package/selectbutton/selectbutton.min.js +1 -1
  315. package/slider/Slider.d.ts +48 -0
  316. package/slider/Slider.vue +7 -2
  317. package/slider/slider.cjs.js +22 -16
  318. package/slider/slider.cjs.min.js +1 -1
  319. package/slider/slider.esm.js +19 -17
  320. package/slider/slider.esm.min.js +1 -1
  321. package/slider/slider.js +23 -18
  322. package/slider/slider.min.js +1 -1
  323. package/splitbutton/SplitButton.d.ts +0 -4
  324. package/splitbutton/SplitButton.vue +2 -2
  325. package/splitbutton/splitbutton.cjs.js +7 -6
  326. package/splitbutton/splitbutton.cjs.min.js +1 -1
  327. package/splitbutton/splitbutton.esm.js +7 -6
  328. package/splitbutton/splitbutton.esm.min.js +1 -1
  329. package/splitbutton/splitbutton.js +7 -6
  330. package/splitbutton/splitbutton.min.js +1 -1
  331. package/splitter/Splitter.d.ts +3 -3
  332. package/textarea/Textarea.d.ts +32 -0
  333. package/textarea/Textarea.vue +4 -1
  334. package/textarea/textarea.cjs.js +9 -3
  335. package/textarea/textarea.cjs.min.js +1 -1
  336. package/textarea/textarea.esm.js +6 -4
  337. package/textarea/textarea.esm.min.js +1 -1
  338. package/textarea/textarea.js +10 -5
  339. package/textarea/textarea.min.js +1 -1
  340. package/timeline/Timeline.d.ts +49 -0
  341. package/timeline/Timeline.vue +9 -7
  342. package/timeline/timeline.cjs.js +19 -21
  343. package/timeline/timeline.cjs.min.js +1 -1
  344. package/timeline/timeline.esm.js +16 -22
  345. package/timeline/timeline.esm.min.js +1 -1
  346. package/timeline/timeline.js +20 -23
  347. package/timeline/timeline.min.js +1 -1
  348. package/toast/Toast.d.ts +4 -0
  349. package/toast/Toast.vue +1 -1
  350. package/toast/toast.cjs.js +3 -3
  351. package/toast/toast.cjs.min.js +1 -1
  352. package/toast/toast.esm.js +3 -3
  353. package/toast/toast.esm.min.js +1 -1
  354. package/toast/toast.js +3 -3
  355. package/toast/toast.min.js +1 -1
  356. package/togglebutton/ToggleButton.d.ts +59 -0
  357. package/togglebutton/ToggleButton.vue +7 -5
  358. package/togglebutton/togglebutton.cjs.js +15 -14
  359. package/togglebutton/togglebutton.cjs.min.js +1 -1
  360. package/togglebutton/togglebutton.esm.js +15 -15
  361. package/togglebutton/togglebutton.esm.min.js +1 -1
  362. package/togglebutton/togglebutton.js +16 -16
  363. package/togglebutton/togglebutton.min.js +1 -1
  364. package/tooltip/Tooltip.d.ts +10 -0
  365. package/tooltip/tooltip.cjs.js +51 -9
  366. package/tooltip/tooltip.cjs.min.js +1 -1
  367. package/tooltip/tooltip.esm.js +52 -10
  368. package/tooltip/tooltip.esm.min.js +1 -1
  369. package/tooltip/tooltip.js +51 -9
  370. package/tooltip/tooltip.min.js +1 -1
  371. package/tree/Tree.d.ts +137 -0
  372. package/tree/Tree.vue +12 -9
  373. package/tree/TreeNode.vue +23 -10
  374. package/tree/tree.cjs.js +85 -79
  375. package/tree/tree.cjs.min.js +1 -1
  376. package/tree/tree.esm.js +85 -80
  377. package/tree/tree.esm.min.js +1 -1
  378. package/tree/tree.js +86 -81
  379. package/tree/tree.min.js +1 -1
  380. package/treeselect/TreeSelect.d.ts +103 -1
  381. package/treeselect/TreeSelect.vue +15 -12
  382. package/treeselect/treeselect.cjs.js +37 -39
  383. package/treeselect/treeselect.cjs.min.js +1 -1
  384. package/treeselect/treeselect.esm.js +37 -40
  385. package/treeselect/treeselect.esm.min.js +1 -1
  386. package/treeselect/treeselect.js +38 -41
  387. package/treeselect/treeselect.min.js +1 -1
  388. package/treetable/BodyCell.vue +38 -10
  389. package/treetable/FooterCell.vue +15 -1
  390. package/treetable/HeaderCell.vue +28 -5
  391. package/treetable/TreeTable.d.ts +162 -0
  392. package/treetable/TreeTable.vue +25 -19
  393. package/treetable/TreeTableRow.vue +5 -0
  394. package/treetable/treetable.cjs.js +205 -158
  395. package/treetable/treetable.cjs.min.js +1 -1
  396. package/treetable/treetable.esm.js +205 -159
  397. package/treetable/treetable.esm.min.js +1 -1
  398. package/treetable/treetable.js +206 -160
  399. package/treetable/treetable.min.js +1 -1
  400. package/tristatecheckbox/TriStateCheckbox.d.ts +93 -0
  401. package/tristatecheckbox/TriStateCheckbox.vue +19 -8
  402. package/tristatecheckbox/tristatecheckbox.cjs.js +31 -22
  403. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  404. package/tristatecheckbox/tristatecheckbox.esm.js +31 -23
  405. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  406. package/tristatecheckbox/tristatecheckbox.js +32 -24
  407. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  408. package/ts-helpers.d.ts +3 -1
  409. package/vetur-attributes.json +180 -0
  410. package/vetur-tags.json +94 -39
  411. package/virtualscroller/VirtualScroller.d.ts +97 -0
  412. package/virtualscroller/VirtualScroller.vue +7 -5
  413. package/virtualscroller/virtualscroller.cjs.js +22 -19
  414. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  415. package/virtualscroller/virtualscroller.esm.js +22 -20
  416. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  417. package/virtualscroller/virtualscroller.js +23 -21
  418. package/virtualscroller/virtualscroller.min.js +1 -1
  419. package/web-types.json +467 -3
  420. package/datatable/TableLoadingBody.vue +0 -25
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.fileupload=function(e,t,l,o,i,s,a,n,p,r,d){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),m=c(t),h=c(l),f=c(o),g=c(i),v=c(s),b=c(a),B=c(n),y=c(r),F={extends:u.default,emits:["remove"],props:{files:{type:Array,default:()=>[]},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}},components:{FileUploadButton:m.default,FileUploadBadge:y.default,TimesIcon:f.default}};const C=["alt","src","width"];F.render=function(e,t,l,o,i,s){const a=d.resolveComponent("FileUploadBadge"),n=d.resolveComponent("TimesIcon"),p=d.resolveComponent("FileUploadButton");return d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(l.files,((t,o)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:t.name+t.type+t.size,class:"p-fileupload-file"},e.ptm("file")),[d.createElementVNode("img",d.mergeProps({role:"presentation",class:"p-fileupload-file-thumbnail",alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,C),d.createElementVNode("div",d.mergeProps({class:"p-fileupload-file-details"},e.ptm("details")),[d.createElementVNode("div",d.mergeProps({class:"p-fileupload-file-name"},e.ptm("fileName")),d.toDisplayString(t.name),17),d.createElementVNode("span",d.mergeProps({class:"p-fileupload-file-size"},e.ptm("fileSize")),d.toDisplayString(s.formatSize(t.size)),17),d.createVNode(a,{value:l.badgeValue,class:"p-fileupload-file-badge",severity:l.badgeSeverity,pt:e.ptm("badge")},null,8,["value","severity","pt"])],16),d.createElementVNode("div",d.mergeProps({class:"p-fileupload-file-actions"},e.ptm("actions")),[d.createVNode(p,{onClick:t=>e.$emit("remove",o),text:"",rounded:"",severity:"danger",class:"p-fileupload-file-remove",pt:e.ptm("removeButton")},{icon:d.withCtx((i=>[l.templates.fileremoveicon?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:d.normalizeClass(i.class),file:t,index:o},null,8,["class","file","index"])):(d.openBlock(),d.createBlock(n,d.mergeProps({key:1,class:i.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))])),_:2},1032,["onClick","pt"])],16)],16)))),128)};var k={name:"FileUpload",extends:u.default,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},duplicateIEEvent:!1,data:()=>({uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}),methods:{onFileSelect(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.messages=[],this.files=this.files||[];let t=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let e of t)this.isFileSelected(e)||this.validate(e)&&(this.isImage(e)&&(e.objectURL=window.URL.createObjectURL(e)),this.files.push(e));this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()},choose(){this.$refs.fileInput.click()},upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{let e=new XMLHttpRequest,t=new FormData;this.$emit("before-upload",{xhr:e,formData:t});for(let e of this.files)t.append(this.name,e,e.name);e.upload.addEventListener("progress",(e=>{e.lengthComputable&&(this.progress=Math.round(100*e.loaded/e.total)),this.$emit("progress",{originalEvent:e,progress:this.progress})})),e.onreadystatechange=()=>{4===e.readyState&&(this.progress=0,e.status>=200&&e.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("upload",{xhr:e,files:this.files})):this.$emit("error",{xhr:e,files:this.files}),this.uploadedFiles.push(...this.files),this.clear())},e.open("POST",this.url,!0),this.$emit("before-send",{xhr:e,formData:t}),e.withCredentials=this.withCredentials,e.send(t)}},clear(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus(){this.focused=!0},onBlur(){this.focused=!1},isFileSelected(e){if(this.files&&this.files.length)for(let t of this.files)if(t.name+t.type+t.size===e.name+e.type+e.size)return!0;return!1},isIE11:()=>!!window.MSInputMethodContext&&!!document.documentMode,validate(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid(e){let t=this.accept.split(",").map((e=>e.trim()));for(let l of t){if(this.isWildcard(l)?this.getTypeClass(e.type)===this.getTypeClass(l):e.type==l||this.getFileExtension(e).toLowerCase()===l.toLowerCase())return!0}return!1},getTypeClass:e=>e.substring(0,e.indexOf("/")),isWildcard:e=>-1!==e.indexOf("*"),getFileExtension:e=>"."+e.name.split(".").pop(),isImage:e=>/^image\//.test(e.type),onDragEnter(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver(e){this.disabled||(p.DomHandler.addClass(this.$refs.content,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault())},onDragLeave(){this.disabled||p.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight")},onDrop(e){if(!this.disabled){p.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();const t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick(){this.hasFiles?this.upload():this.$refs.fileInput.click()},remove(e){this.clearInputElement();let t=this.files.splice(e,1)[0];this.files=[...this.files],this.$emit("remove",{file:t,files:this.files})},removeUploadedFile(e){let t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=[...this.uploadedFiles],this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement(){this.$refs.fileInput.value=""},clearIEInput(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]},isFileLimitExceeded(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose(){this.messages=null}},computed:{isAdvanced(){return"advanced"===this.mode},isBasic(){return"basic"===this.mode},advancedChooseButtonClass(){return["p-button p-component p-fileupload-choose",this.class,{"p-disabled":this.disabled,"p-focus":this.focused}]},basicChooseButtonClass(){return["p-button p-component p-fileupload-choose",this.class,{"p-fileupload-choose-selected":this.hasFiles,"p-disabled":this.disabled,"p-focus":this.focused}]},basicChooseButtonLabel(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((e=>e.name)).join(", "):this.chooseButtonLabel},hasFiles(){return this.files&&this.files.length>0},hasUploadedFiles(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled(){return this.disabled||!this.hasFiles},chooseButtonLabel(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel(){return this.$primevue.config.locale.completed},pendingLabel(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:m.default,FileUploadProgressBar:b.default,FileUploadMessage:v.default,FileContent:F,PlusIcon:h.default,UploadIcon:g.default,TimesIcon:f.default},directives:{ripple:B.default}};const S=["multiple","accept","disabled"],L=["accept","disabled","multiple"];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],i=document.createElement("style");i.type="text/css","top"===l&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-fileupload-content {\n position: relative;\n}\n.p-fileupload-content .p-progressbar {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-button.p-fileupload-choose {\n position: relative;\n overflow: hidden;\n}\n.p-fileupload-buttonbar {\n display: flex;\n flex-wrap: wrap;\n}\n.p-fileupload > input[type='file'],\n.p-fileupload-basic input[type='file'] {\n display: none;\n}\n.p-fluid .p-fileupload .p-button {\n width: auto;\n}\n.p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.p-fileupload-file-thumbnail {\n flex-shrink: 0;\n}\n.p-fileupload-file-actions {\n margin-left: auto;\n}\n"),k.render=function(e,t,l,o,i,s){const a=d.resolveComponent("FileUploadButton"),n=d.resolveComponent("FileUploadProgressBar"),p=d.resolveComponent("FileUploadMessage"),r=d.resolveComponent("FileContent"),c=d.resolveDirective("ripple");return s.isAdvanced?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:"p-fileupload p-fileupload-advanced p-component"},e.ptm("root")),[d.createElementVNode("input",d.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=(...e)=>s.onFileSelect&&s.onFileSelect(...e)),multiple:l.multiple,accept:l.accept,disabled:s.chooseDisabled},e.ptm("input")),null,16,S),d.createElementVNode("div",d.mergeProps({class:"p-fileupload-buttonbar"},e.ptm("buttonbar")),[d.renderSlot(e.$slots,"header",d.mergeProps({files:i.files,uploadedFiles:i.uploadedFiles,chooseCallback:s.choose,uploadCallback:s.upload,clearCallback:s.clear},e.ptm("header")),(()=>[d.withDirectives((d.openBlock(),d.createElementBlock("span",d.mergeProps({class:s.advancedChooseButtonClass,style:l.style,onClick:t[1]||(t[1]=(...e)=>s.choose&&s.choose(...e)),onKeydown:t[2]||(t[2]=d.withKeys(((...e)=>s.choose&&s.choose(...e)),["enter"])),onFocus:t[3]||(t[3]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[4]||(t[4]=(...e)=>s.onBlur&&s.onBlur(...e)),tabindex:"0"},e.ptm("button")),[d.renderSlot(e.$slots,"chooseicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.chooseIcon?"span":"PlusIcon"),d.mergeProps({class:["p-button-icon p-button-icon-left",l.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))])),d.createElementVNode("span",d.mergeProps({class:"p-button-label"},e.ptm("chooseButtonLabel")),d.toDisplayString(s.chooseButtonLabel),17)],16)),[[c]]),l.showUploadButton?(d.openBlock(),d.createBlock(a,{key:0,label:s.uploadButtonLabel,onClick:s.upload,disabled:s.uploadDisabled,pt:e.ptm("uploadButton")},{icon:d.withCtx((t=>[d.renderSlot(e.$slots,"uploadicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.uploadIcon?"span":"UploadIcon"),d.mergeProps({class:[t.class,l.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon),null,16,["class"]))]))])),_:3},8,["label","onClick","disabled","pt"])):d.createCommentVNode("",!0),l.showCancelButton?(d.openBlock(),d.createBlock(a,{key:1,label:s.cancelButtonLabel,onClick:s.clear,disabled:s.cancelDisabled,pt:e.ptm("cancelButton")},{icon:d.withCtx((t=>[d.renderSlot(e.$slots,"cancelicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.cancelIcon?"span":"TimesIcon"),d.mergeProps({class:[t.class,l.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon),null,16,["class"]))]))])),_:3},8,["label","onClick","disabled","pt"])):d.createCommentVNode("",!0)]))],16),d.createElementVNode("div",d.mergeProps({ref:"content",class:"p-fileupload-content",onDragenter:t[5]||(t[5]=(...e)=>s.onDragEnter&&s.onDragEnter(...e)),onDragover:t[6]||(t[6]=(...e)=>s.onDragOver&&s.onDragOver(...e)),onDragleave:t[7]||(t[7]=(...e)=>s.onDragLeave&&s.onDragLeave(...e)),onDrop:t[8]||(t[8]=(...e)=>s.onDrop&&s.onDrop(...e))},e.ptm("content")),[d.renderSlot(e.$slots,"content",{files:i.files,uploadedFiles:i.uploadedFiles,removeUploadedFileCallback:s.removeUploadedFile,removeFileCallback:s.remove,progress:i.progress,messages:i.messages},(()=>[s.hasFiles?(d.openBlock(),d.createBlock(n,{key:0,value:i.progress,showValue:!1,pt:e.ptm("progressbar")},null,8,["value","pt"])):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.messages,(t=>(d.openBlock(),d.createBlock(p,{key:t,severity:"error",onClose:s.onMessageClose,pt:e.ptm("messages")},{default:d.withCtx((()=>[d.createTextVNode(d.toDisplayString(t),1)])),_:2},1032,["onClose","pt"])))),128)),s.hasFiles?(d.openBlock(),d.createBlock(r,{key:1,files:i.files,onRemove:s.remove,badgeValue:s.pendingLabel,previewWidth:l.previewWidth,templates:e.$slots,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","pt"])):d.createCommentVNode("",!0),d.createVNode(r,{files:i.uploadedFiles,onRemove:s.removeUploadedFile,badgeValue:s.completedLabel,badgeSeverity:"success",previewWidth:l.previewWidth,templates:e.$slots,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","pt"])])),!e.$slots.empty||s.hasFiles||s.hasUploadedFiles?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:"p-fileupload-empty"},e.ptm("empty")),[d.renderSlot(e.$slots,"empty")],16))],16)],16)):s.isBasic?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:1,class:"p-fileupload p-fileupload-basic p-component"},e.ptm("root")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.messages,(t=>(d.openBlock(),d.createBlock(p,{key:t,severity:"error",onClose:s.onMessageClose,pt:e.ptm("messages")},{default:d.withCtx((()=>[d.createTextVNode(d.toDisplayString(t),1)])),_:2},1032,["onClose","pt"])))),128)),d.withDirectives((d.openBlock(),d.createElementBlock("span",d.mergeProps({class:s.basicChooseButtonClass,style:l.style,onMouseup:t[12]||(t[12]=(...e)=>s.onBasicUploaderClick&&s.onBasicUploaderClick(...e)),onKeydown:t[13]||(t[13]=d.withKeys(((...e)=>s.choose&&s.choose(...e)),["enter"])),onFocus:t[14]||(t[14]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[15]||(t[15]=(...e)=>s.onBlur&&s.onBlur(...e)),tabindex:"0"},e.ptm("basicButton")),[!s.hasFiles||l.auto?d.renderSlot(e.$slots,"uploadicon",{key:0},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.uploadIcon?"span":"UploadIcon"),d.mergeProps({class:["p-button-icon p-button-icon-left",l.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))])):d.renderSlot(e.$slots,"chooseicon",{key:1},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.chooseIcon?"span":"PlusIcon"),d.mergeProps({class:["p-button-icon p-button-icon-left",l.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))])),d.createElementVNode("span",d.mergeProps({class:"p-button-label"},e.ptm("label")),d.toDisplayString(s.basicChooseButtonLabel),17),s.hasFiles?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("input",d.mergeProps({key:2,ref:"fileInput",type:"file",accept:l.accept,disabled:l.disabled,multiple:l.multiple,onChange:t[9]||(t[9]=(...e)=>s.onFileSelect&&s.onFileSelect(...e)),onFocus:t[10]||(t[10]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onBlur&&s.onBlur(...e))},e.ptm("input")),null,16,L))],16)),[[c]])],16)):d.createCommentVNode("",!0)},k}(primevue.basecomponent,primevue.button,primevue.icons.plus,primevue.icons.times,primevue.icons.upload,primevue.message,primevue.progressbar,primevue.ripple,primevue.utils,primevue.badge,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.fileupload=function(e,t,l,o,i,s,a,n,p,r,d){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),h=c(t),m=c(l),f=c(o),g=c(i),v=c(s),b=c(a),B=c(n),y=c(r),F={extends:u.default,emits:["remove"],props:{files:{type:Array,default:()=>[]},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}},components:{FileUploadButton:h.default,FileUploadBadge:y.default,TimesIcon:f.default}};const C=["alt","src","width"];F.render=function(e,t,l,o,i,s){const a=d.resolveComponent("FileUploadBadge"),n=d.resolveComponent("TimesIcon"),p=d.resolveComponent("FileUploadButton");return d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(l.files,((t,o)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:t.name+t.type+t.size,class:"p-fileupload-file"},e.ptm("file")),[d.createElementVNode("img",d.mergeProps({role:"presentation",class:"p-fileupload-file-thumbnail",alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,C),d.createElementVNode("div",d.mergeProps({class:"p-fileupload-file-details"},e.ptm("details")),[d.createElementVNode("div",d.mergeProps({class:"p-fileupload-file-name"},e.ptm("fileName")),d.toDisplayString(t.name),17),d.createElementVNode("span",d.mergeProps({class:"p-fileupload-file-size"},e.ptm("fileSize")),d.toDisplayString(s.formatSize(t.size)),17),d.createVNode(a,{value:l.badgeValue,class:"p-fileupload-file-badge",severity:l.badgeSeverity,pt:e.ptm("badge")},null,8,["value","severity","pt"])],16),d.createElementVNode("div",d.mergeProps({class:"p-fileupload-file-actions"},e.ptm("actions")),[d.createVNode(p,{onClick:t=>e.$emit("remove",o),text:"",rounded:"",severity:"danger",class:"p-fileupload-file-remove",pt:e.ptm("removeButton")},{icon:d.withCtx((i=>[l.templates.fileremoveicon?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:d.normalizeClass(i.class),file:t,index:o},null,8,["class","file","index"])):(d.openBlock(),d.createBlock(n,d.mergeProps({key:1,class:i.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))])),_:2},1032,["onClick","pt"])],16)],16)))),128)};var k={name:"FileUpload",extends:u.default,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},duplicateIEEvent:!1,data:()=>({uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}),methods:{onFileSelect(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.messages=[],this.files=this.files||[];let t=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let e of t)this.isFileSelected(e)||this.validate(e)&&(this.isImage(e)&&(e.objectURL=window.URL.createObjectURL(e)),this.files.push(e));this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()},choose(){this.$refs.fileInput.click()},upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{let e=new XMLHttpRequest,t=new FormData;this.$emit("before-upload",{xhr:e,formData:t});for(let e of this.files)t.append(this.name,e,e.name);e.upload.addEventListener("progress",(e=>{e.lengthComputable&&(this.progress=Math.round(100*e.loaded/e.total)),this.$emit("progress",{originalEvent:e,progress:this.progress})})),e.onreadystatechange=()=>{4===e.readyState&&(this.progress=0,e.status>=200&&e.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("upload",{xhr:e,files:this.files})):this.$emit("error",{xhr:e,files:this.files}),this.uploadedFiles.push(...this.files),this.clear())},e.open("POST",this.url,!0),this.$emit("before-send",{xhr:e,formData:t}),e.withCredentials=this.withCredentials,e.send(t)}},clear(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus(){this.focused=!0},onBlur(){this.focused=!1},isFileSelected(e){if(this.files&&this.files.length)for(let t of this.files)if(t.name+t.type+t.size===e.name+e.type+e.size)return!0;return!1},isIE11:()=>!!window.MSInputMethodContext&&!!document.documentMode,validate(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid(e){let t=this.accept.split(",").map((e=>e.trim()));for(let l of t){if(this.isWildcard(l)?this.getTypeClass(e.type)===this.getTypeClass(l):e.type==l||this.getFileExtension(e).toLowerCase()===l.toLowerCase())return!0}return!1},getTypeClass:e=>e.substring(0,e.indexOf("/")),isWildcard:e=>-1!==e.indexOf("*"),getFileExtension:e=>"."+e.name.split(".").pop(),isImage:e=>/^image\//.test(e.type),onDragEnter(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver(e){this.disabled||(p.DomHandler.addClass(this.$refs.content,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault())},onDragLeave(){this.disabled||p.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight")},onDrop(e){if(!this.disabled){p.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();const t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick(){this.hasFiles?this.upload():this.$refs.fileInput.click()},remove(e){this.clearInputElement();let t=this.files.splice(e,1)[0];this.files=[...this.files],this.$emit("remove",{file:t,files:this.files})},removeUploadedFile(e){let t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=[...this.uploadedFiles],this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement(){this.$refs.fileInput.value=""},clearIEInput(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]},isFileLimitExceeded(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose(){this.messages=null}},computed:{isAdvanced(){return"advanced"===this.mode},isBasic(){return"basic"===this.mode},advancedChooseButtonClass(){return["p-button p-component p-fileupload-choose",this.class,{"p-disabled":this.disabled,"p-focus":this.focused}]},basicChooseButtonClass(){return["p-button p-component p-fileupload-choose",this.class,{"p-fileupload-choose-selected":this.hasFiles,"p-disabled":this.disabled,"p-focus":this.focused}]},basicChooseButtonLabel(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((e=>e.name)).join(", "):this.chooseButtonLabel},hasFiles(){return this.files&&this.files.length>0},hasUploadedFiles(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled(){return this.disabled||!this.hasFiles},chooseButtonLabel(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel(){return this.$primevue.config.locale.completed},pendingLabel(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:h.default,FileUploadProgressBar:b.default,FileUploadMessage:v.default,FileContent:F,PlusIcon:m.default,UploadIcon:g.default,TimesIcon:f.default},directives:{ripple:B.default}};const S=["multiple","accept","disabled"],L=["accept","disabled","multiple"];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],i=document.createElement("style");i.type="text/css","top"===l&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-fileupload-content {\n position: relative;\n}\n.p-fileupload-content .p-progressbar {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-button.p-fileupload-choose {\n position: relative;\n overflow: hidden;\n}\n.p-fileupload-buttonbar {\n display: flex;\n flex-wrap: wrap;\n}\n.p-fileupload > input[type='file'],\n.p-fileupload-basic input[type='file'] {\n display: none;\n}\n.p-fluid .p-fileupload .p-button {\n width: auto;\n}\n.p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.p-fileupload-file-thumbnail {\n flex-shrink: 0;\n}\n.p-fileupload-file-actions {\n margin-left: auto;\n}\n"),k.render=function(e,t,l,o,i,s){const a=d.resolveComponent("FileUploadButton"),n=d.resolveComponent("FileUploadProgressBar"),p=d.resolveComponent("FileUploadMessage"),r=d.resolveComponent("FileContent"),c=d.resolveDirective("ripple");return s.isAdvanced?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:"p-fileupload p-fileupload-advanced p-component"},e.ptm("root")),[d.createElementVNode("input",d.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=(...e)=>s.onFileSelect&&s.onFileSelect(...e)),multiple:l.multiple,accept:l.accept,disabled:s.chooseDisabled},e.ptm("input")),null,16,S),d.createElementVNode("div",d.mergeProps({class:"p-fileupload-buttonbar"},e.ptm("buttonbar")),[d.renderSlot(e.$slots,"header",{files:i.files,uploadedFiles:i.uploadedFiles,chooseCallback:s.choose,uploadCallback:s.upload,clearCallback:s.clear},(()=>[d.withDirectives((d.openBlock(),d.createElementBlock("span",d.mergeProps({class:s.advancedChooseButtonClass,style:l.style,onClick:t[1]||(t[1]=(...e)=>s.choose&&s.choose(...e)),onKeydown:t[2]||(t[2]=d.withKeys(((...e)=>s.choose&&s.choose(...e)),["enter"])),onFocus:t[3]||(t[3]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[4]||(t[4]=(...e)=>s.onBlur&&s.onBlur(...e)),tabindex:"0"},e.ptm("chooseButton")),[d.renderSlot(e.$slots,"chooseicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.chooseIcon?"span":"PlusIcon"),d.mergeProps({class:["p-button-icon p-button-icon-left",l.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))])),d.createElementVNode("span",d.mergeProps({class:"p-button-label"},e.ptm("chooseButtonLabel")),d.toDisplayString(s.chooseButtonLabel),17)],16)),[[c]]),l.showUploadButton?(d.openBlock(),d.createBlock(a,{key:0,label:s.uploadButtonLabel,onClick:s.upload,disabled:s.uploadDisabled,pt:e.ptm("uploadButton")},{icon:d.withCtx((t=>[d.renderSlot(e.$slots,"uploadicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.uploadIcon?"span":"UploadIcon"),d.mergeProps({class:[t.class,l.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon),null,16,["class"]))]))])),_:3},8,["label","onClick","disabled","pt"])):d.createCommentVNode("",!0),l.showCancelButton?(d.openBlock(),d.createBlock(a,{key:1,label:s.cancelButtonLabel,onClick:s.clear,disabled:s.cancelDisabled,pt:e.ptm("cancelButton")},{icon:d.withCtx((t=>[d.renderSlot(e.$slots,"cancelicon",{},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.cancelIcon?"span":"TimesIcon"),d.mergeProps({class:[t.class,l.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon),null,16,["class"]))]))])),_:3},8,["label","onClick","disabled","pt"])):d.createCommentVNode("",!0)]))],16),d.createElementVNode("div",d.mergeProps({ref:"content",class:"p-fileupload-content",onDragenter:t[5]||(t[5]=(...e)=>s.onDragEnter&&s.onDragEnter(...e)),onDragover:t[6]||(t[6]=(...e)=>s.onDragOver&&s.onDragOver(...e)),onDragleave:t[7]||(t[7]=(...e)=>s.onDragLeave&&s.onDragLeave(...e)),onDrop:t[8]||(t[8]=(...e)=>s.onDrop&&s.onDrop(...e))},e.ptm("content")),[d.renderSlot(e.$slots,"content",{files:i.files,uploadedFiles:i.uploadedFiles,removeUploadedFileCallback:s.removeUploadedFile,removeFileCallback:s.remove,progress:i.progress,messages:i.messages},(()=>[s.hasFiles?(d.openBlock(),d.createBlock(n,{key:0,value:i.progress,showValue:!1,pt:e.ptm("progressbar")},null,8,["value","pt"])):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.messages,(t=>(d.openBlock(),d.createBlock(p,{key:t,severity:"error",onClose:s.onMessageClose,pt:e.ptm("message")},{default:d.withCtx((()=>[d.createTextVNode(d.toDisplayString(t),1)])),_:2},1032,["onClose","pt"])))),128)),s.hasFiles?(d.openBlock(),d.createBlock(r,{key:1,files:i.files,onRemove:s.remove,badgeValue:s.pendingLabel,previewWidth:l.previewWidth,templates:e.$slots,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","pt"])):d.createCommentVNode("",!0),d.createVNode(r,{files:i.uploadedFiles,onRemove:s.removeUploadedFile,badgeValue:s.completedLabel,badgeSeverity:"success",previewWidth:l.previewWidth,templates:e.$slots,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","pt"])])),!e.$slots.empty||s.hasFiles||s.hasUploadedFiles?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:"p-fileupload-empty"},e.ptm("empty")),[d.renderSlot(e.$slots,"empty")],16))],16)],16)):s.isBasic?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:1,class:"p-fileupload p-fileupload-basic p-component"},e.ptm("root")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.messages,(t=>(d.openBlock(),d.createBlock(p,{key:t,severity:"error",onClose:s.onMessageClose,pt:e.ptm("messages")},{default:d.withCtx((()=>[d.createTextVNode(d.toDisplayString(t),1)])),_:2},1032,["onClose","pt"])))),128)),d.withDirectives((d.openBlock(),d.createElementBlock("span",d.mergeProps({class:s.basicChooseButtonClass,style:l.style,onMouseup:t[12]||(t[12]=(...e)=>s.onBasicUploaderClick&&s.onBasicUploaderClick(...e)),onKeydown:t[13]||(t[13]=d.withKeys(((...e)=>s.choose&&s.choose(...e)),["enter"])),onFocus:t[14]||(t[14]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[15]||(t[15]=(...e)=>s.onBlur&&s.onBlur(...e)),tabindex:"0"},e.ptm("basicButton")),[!s.hasFiles||l.auto?d.renderSlot(e.$slots,"uploadicon",{key:0},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.uploadIcon?"span":"UploadIcon"),d.mergeProps({class:["p-button-icon p-button-icon-left",l.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))])):d.renderSlot(e.$slots,"chooseicon",{key:1},(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(l.chooseIcon?"span":"PlusIcon"),d.mergeProps({class:["p-button-icon p-button-icon-left",l.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))])),d.createElementVNode("span",d.mergeProps({class:"p-button-label"},e.ptm("label")),d.toDisplayString(s.basicChooseButtonLabel),17),s.hasFiles?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("input",d.mergeProps({key:2,ref:"fileInput",type:"file",accept:l.accept,disabled:l.disabled,multiple:l.multiple,onChange:t[9]||(t[9]=(...e)=>s.onFileSelect&&s.onFileSelect(...e)),onFocus:t[10]||(t[10]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onBlur&&s.onBlur(...e))},e.ptm("input")),null,16,L))],16)),[[c]])],16)):d.createCommentVNode("",!0)},k}(primevue.basecomponent,primevue.button,primevue.icons.plus,primevue.icons.times,primevue.icons.upload,primevue.message,primevue.progressbar,primevue.ripple,primevue.utils,primevue.badge,Vue);
@@ -9,6 +9,15 @@
9
9
  */
10
10
  import { ButtonHTMLAttributes, HTMLAttributes, VNode } from 'vue';
11
11
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ export declare type GalleriaPassThroughOptionType = GalleriaPassThroughAttributes | ((options: GalleriaPassThroughMethodOptions) => GalleriaPassThroughAttributes) | null | undefined;
13
+
14
+ /**
15
+ * Custom passthrough(pt) option method.
16
+ */
17
+ export interface GalleriaPassThroughMethodOptions {
18
+ props: GalleriaProps;
19
+ state: GalleriaState;
20
+ }
12
21
 
13
22
  export interface GalleriaResponsiveOptions {
14
23
  /**
@@ -21,6 +30,188 @@ export interface GalleriaResponsiveOptions {
21
30
  numVisible: number;
22
31
  }
23
32
 
33
+ /**
34
+ * Custom passthrough(pt) options.
35
+ * @see {@link GalleriaProps.pt}
36
+ */
37
+ export interface GalleriaPassThroughOptions {
38
+ /**
39
+ * Uses to pass attributes to the root's DOM element.
40
+ */
41
+ root?: GalleriaPassThroughOptionType;
42
+ /**
43
+ * Uses to pass attributes to the close button's DOM element.
44
+ */
45
+ closeButton?: GalleriaPassThroughOptionType;
46
+ /**
47
+ * Uses to pass attributes to the close icon's DOM element.
48
+ */
49
+ closeIcon?: GalleriaPassThroughOptionType;
50
+ /**
51
+ * Uses to pass attributes to the header's DOM element.
52
+ */
53
+ header?: GalleriaPassThroughOptionType;
54
+ /**
55
+ * Uses to pass attributes to the content's DOM element.
56
+ */
57
+ content?: GalleriaPassThroughOptionType;
58
+ /**
59
+ * Uses to pass attributes to the footer's DOM element.
60
+ */
61
+ footer?: GalleriaPassThroughOptionType;
62
+ /**
63
+ * Uses to pass attributes to the item wrapper's DOM element.
64
+ */
65
+ itemWrapper?: GalleriaPassThroughOptionType;
66
+ /**
67
+ * Uses to pass attributes to the item container's DOM element.
68
+ */
69
+ itemContainer?: GalleriaPassThroughOptionType;
70
+ /**
71
+ * Uses to pass attributes to the previous item button's DOM element.
72
+ */
73
+ previousItemButton?: GalleriaPassThroughOptionType;
74
+ /**
75
+ * Uses to pass attributes to the previous item icon's DOM element.
76
+ */
77
+ previousItemIcon?: GalleriaPassThroughOptionType;
78
+ /**
79
+ * Uses to pass attributes to the item's DOM element.
80
+ */
81
+ item?: GalleriaPassThroughOptionType;
82
+ /**
83
+ * Uses to pass attributes to the next item button's DOM element.
84
+ */
85
+ nextItemButton?: GalleriaPassThroughOptionType;
86
+ /**
87
+ * Uses to pass attributes to the next item icon's DOM element.
88
+ */
89
+ nextItemIcon?: GalleriaPassThroughOptionType;
90
+ /**
91
+ * Uses to pass attributes to the caption's DOM element.
92
+ */
93
+ caption?: GalleriaPassThroughOptionType;
94
+ /**
95
+ * Uses to pass attributes to the indicators's DOM element.
96
+ */
97
+ indicators?: GalleriaPassThroughOptionType;
98
+ /**
99
+ * Uses to pass attributes to the indicator's DOM element.
100
+ */
101
+ indicator?: GalleriaPassThroughOptionType;
102
+ /**
103
+ * Uses to pass attributes to the thumbnail wrapper's DOM element.
104
+ */
105
+ thumbnailWrapper?: GalleriaPassThroughOptionType;
106
+ /**
107
+ * Uses to pass attributes to the thumbnail container's DOM element.
108
+ */
109
+ thumbnailContainer?: GalleriaPassThroughOptionType;
110
+ /**
111
+ * Uses to pass attributes to the previous thumbnail button's DOM element.
112
+ */
113
+ previousThumbnailButton?: GalleriaPassThroughOptionType;
114
+ /**
115
+ * Uses to pass attributes to the previous thumbnail icon's DOM element.
116
+ */
117
+ previousThumbnailIcon?: GalleriaPassThroughOptionType;
118
+ /**
119
+ * Uses to pass attributes to the thumbnail items container's DOM element.
120
+ */
121
+ thumbnailItemsContainer?: GalleriaPassThroughOptionType;
122
+ /**
123
+ * Uses to pass attributes to the thumbnail items' DOM element.
124
+ */
125
+ thumbnailItems?: GalleriaPassThroughOptionType;
126
+ /**
127
+ * Uses to pass attributes to the thumbnail item's DOM element.
128
+ */
129
+ thumbnailItem?: GalleriaPassThroughOptionType;
130
+ /**
131
+ * Uses to pass attributes to the thumbnail item content's DOM element.
132
+ */
133
+ thumbnailItemContent?: GalleriaPassThroughOptionType;
134
+ /**
135
+ * Uses to pass attributes to the next thumbnail button's DOM element.
136
+ */
137
+ nextThumbnailButton?: GalleriaPassThroughOptionType;
138
+ /**
139
+ * Uses to pass attributes to the next thumbnail icon's DOM element.
140
+ */
141
+ nextThumbnailIcon?: GalleriaPassThroughOptionType;
142
+ /**
143
+ * Uses to pass attributes to the mask's DOM element.
144
+ */
145
+ mask?: GalleriaPassThroughOptionType;
146
+ }
147
+
148
+ /**
149
+ * Custom passthrough attributes for each DOM elements
150
+ */
151
+ export interface GalleriaPassThroughAttributes {
152
+ [key: string]: any;
153
+ }
154
+
155
+ /**
156
+ * Defines current inline state in Galleria component.
157
+ */
158
+ export interface GalleriaState {
159
+ /**
160
+ * Current container visible state as a boolean.
161
+ * @defaultValue false
162
+ */
163
+ containerVisible: boolean;
164
+ /**
165
+ * Style id of the component.
166
+ */
167
+ id: string;
168
+ /**
169
+ * Index of the first item as a number.
170
+ * @defaultValue 0
171
+ */
172
+ activeIndex: number;
173
+ /**
174
+ * Number of items per page as a number.
175
+ * @defaultValue 3
176
+ */
177
+ numVisible: number;
178
+ /**
179
+ * Current slide active state as a boolean.
180
+ * @defaultValue false
181
+ */
182
+ slideShowActive: boolean;
183
+ /**
184
+ * Number of items per page as a number.
185
+ * @defaultValue 3
186
+ */
187
+ d_numVisible: number;
188
+ /**
189
+ * Old number of items per page as a number.
190
+ * @defaultValue 3
191
+ */
192
+ d_oldNumVisible: number;
193
+ /**
194
+ * Current active item index as a number.
195
+ * @defaultValue 0
196
+ */
197
+ d_activeIndex: number;
198
+ /**
199
+ * The previous active item index as a number.
200
+ * @defaultValue 0
201
+ */
202
+ d_oldActiveItemIndex: number;
203
+ /**
204
+ * Index of the first item.
205
+ * @defaultValue 0
206
+ */
207
+ page: number;
208
+ /**
209
+ * Total shifted items' count as a number.
210
+ * @defaultValue 0
211
+ */
212
+ totalShiftedItems: number;
213
+ }
214
+
24
215
  /**
25
216
  * Defines valid properties in Galleria component.
26
217
  */
@@ -152,6 +343,11 @@ export interface GalleriaProps {
152
343
  * Uses to pass all properties of the HTMLButtonElement to the next navigation button.
153
344
  */
154
345
  nextButtonProps?: ButtonHTMLAttributes | undefined;
346
+ /**
347
+ * Uses to pass attributes to DOM elements inside the component.
348
+ * @type {GalleriaPassThroughOptions}
349
+ */
350
+ pt?: GalleriaPassThroughOptions;
155
351
  }
156
352
  /**
157
353
  * Defines valid slots in Galleria slots.
@@ -1,15 +1,16 @@
1
1
  <template>
2
2
  <Portal v-if="fullScreen">
3
- <div v-if="containerVisible" :ref="maskRef" :class="maskContentClass" :role="fullScreen ? 'dialog' : 'region'" :aria-modal="fullScreen ? 'true' : undefined">
3
+ <div v-if="containerVisible" :ref="maskRef" :class="maskContentClass" :role="fullScreen ? 'dialog' : 'region'" :aria-modal="fullScreen ? 'true' : undefined" v-bind="ptm('mask')">
4
4
  <transition name="p-galleria" @before-enter="onBeforeEnter" @enter="onEnter" @before-leave="onBeforeLeave" @after-leave="onAfterLeave" appear>
5
- <GalleriaContent v-if="visible" :ref="containerRef" v-focustrap @mask-hide="maskHide" :templates="$slots" @activeitem-change="onActiveItemChange" v-bind="$props" />
5
+ <GalleriaContent v-if="visible" :ref="containerRef" v-focustrap @mask-hide="maskHide" :templates="$slots" @activeitem-change="onActiveItemChange" :pt="pt" v-bind="$props" />
6
6
  </transition>
7
7
  </div>
8
8
  </Portal>
9
- <GalleriaContent v-else :templates="$slots" @activeitem-change="onActiveItemChange" v-bind="$props" />
9
+ <GalleriaContent v-else :templates="$slots" @activeitem-change="onActiveItemChange" :pt="pt" v-bind="$props" />
10
10
  </template>
11
11
 
12
12
  <script>
13
+ import BaseComponent from 'primevue/basecomponent';
13
14
  import FocusTrap from 'primevue/focustrap';
14
15
  import Portal from 'primevue/portal';
15
16
  import { DomHandler, ZIndexUtils } from 'primevue/utils';
@@ -17,6 +18,7 @@ import GalleriaContent from './GalleriaContent.vue';
17
18
 
18
19
  export default {
19
20
  name: 'Galleria',
21
+ extends: BaseComponent,
20
22
  inheritAttrs: false,
21
23
  emits: ['update:activeIndex', 'update:visible'],
22
24
  props: {
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <div v-if="$attrs.value && $attrs.value.length > 0" :id="id" :class="galleriaClass" :style="$attrs.containerStyle" v-bind="$attrs.containerProps">
3
- <button v-if="$attrs.fullScreen" v-ripple autofocus type="button" class="p-galleria-close p-link" :aria-label="closeAriaLabel" @click="$emit('mask-hide')">
4
- <component :is="$attrs.templates['closeicon'] || 'TimesIcon'" class="p-galleria-close-icon" />
2
+ <div v-if="$attrs.value && $attrs.value.length > 0" :id="id" :class="galleriaClass" :style="$attrs.containerStyle" v-bind="{ ...$attrs.containerProps, ...ptm('root') }">
3
+ <button v-if="$attrs.fullScreen" v-ripple autofocus type="button" class="p-galleria-close p-link" :aria-label="closeAriaLabel" @click="$emit('mask-hide')" v-bind="ptm('closeButton')">
4
+ <component :is="$attrs.templates['closeicon'] || 'TimesIcon'" class="p-galleria-close-icon" v-bind="ptm('closeIcon')" />
5
5
  </button>
6
- <div v-if="$attrs.templates && $attrs.templates['header']" class="p-galleria-header">
6
+ <div v-if="$attrs.templates && $attrs.templates['header']" class="p-galleria-header" v-bind="ptm('header')">
7
7
  <component :is="$attrs.templates['header']" />
8
8
  </div>
9
- <div class="p-galleria-content" :aria-live="$attrs.autoPlay ? 'polite' : 'off'">
9
+ <div class="p-galleria-content" :aria-live="$attrs.autoPlay ? 'polite' : 'off'" v-bind="ptm('content')">
10
10
  <GalleriaItem
11
11
  :id="id"
12
12
  v-model:activeIndex="activeIndex"
@@ -20,6 +20,7 @@
20
20
  :autoPlay="$attrs.autoPlay"
21
21
  @start-slideshow="startSlideShow"
22
22
  @stop-slideshow="stopSlideShow"
23
+ :pt="pt"
23
24
  />
24
25
 
25
26
  <GalleriaThumbnails
@@ -38,15 +39,17 @@
38
39
  :prevButtonProps="$attrs.prevButtonProps"
39
40
  :nextButtonProps="$attrs.nextButtonProps"
40
41
  @stop-slideshow="stopSlideShow"
42
+ :pt="pt"
41
43
  />
42
44
  </div>
43
- <div v-if="$attrs.templates && $attrs.templates['footer']" class="p-galleria-footer">
45
+ <div v-if="$attrs.templates && $attrs.templates['footer']" class="p-galleria-footer" v-bind="ptm('footer')">
44
46
  <component :is="$attrs.templates['footer']" />
45
47
  </div>
46
48
  </div>
47
49
  </template>
48
50
 
49
51
  <script>
52
+ import BaseComponent from 'primevue/basecomponent';
50
53
  import TimesIcon from 'primevue/icons/times';
51
54
  import Ripple from 'primevue/ripple';
52
55
  import { UniqueComponentId } from 'primevue/utils';
@@ -55,6 +58,7 @@ import GalleriaThumbnails from './GalleriaThumbnails.vue';
55
58
 
56
59
  export default {
57
60
  name: 'GalleriaContent',
61
+ extends: BaseComponent,
58
62
  inheritAttrs: false,
59
63
  interval: null,
60
64
  emits: ['activeitem-change', 'mask-hide'],
@@ -1,20 +1,20 @@
1
1
  <template>
2
- <div class="p-galleria-item-wrapper">
3
- <div class="p-galleria-item-container">
4
- <button v-if="showItemNavigators" v-ripple type="button" :class="navBackwardClass" @click="navBackward($event)" :disabled="isNavBackwardDisabled()">
5
- <component :is="templates.previousitemicon || 'ChevronLeftIcon'" class="p-galleria-item-prev-icon" />
2
+ <div class="p-galleria-item-wrapper" v-bind="ptm('itemWrapper')">
3
+ <div class="p-galleria-item-container" v-bind="ptm('itemContainer')">
4
+ <button v-if="showItemNavigators" v-ripple type="button" :class="navBackwardClass" @click="navBackward($event)" :disabled="isNavBackwardDisabled()" v-bind="ptm('previousItemButton')">
5
+ <component :is="templates.previousitemicon || 'ChevronLeftIcon'" class="p-galleria-item-prev-icon" v-bind="ptm('previousItemIcon')" />
6
6
  </button>
7
- <div :id="id + '_item_' + activeIndex" class="p-galleria-item" role="group" :aria-label="ariaSlideNumber(activeIndex + 1)" :aria-roledescription="ariaSlideLabel">
7
+ <div :id="id + '_item_' + activeIndex" class="p-galleria-item" role="group" :aria-label="ariaSlideNumber(activeIndex + 1)" :aria-roledescription="ariaSlideLabel" v-bind="ptm('item')">
8
8
  <component v-if="templates.item" :is="templates.item" :item="activeItem" />
9
9
  </div>
10
- <button v-if="showItemNavigators" v-ripple type="button" :class="navForwardClass" @click="navForward($event)" :disabled="isNavForwardDisabled()">
11
- <component :is="templates.nextitemicon || 'ChevronRightIcon'" class="p-galleria-item-next-icon" />
10
+ <button v-if="showItemNavigators" v-ripple type="button" :class="navForwardClass" @click="navForward($event)" :disabled="isNavForwardDisabled()" v-bind="ptm('nextItemButton')">
11
+ <component :is="templates.nextitemicon || 'ChevronRightIcon'" class="p-galleria-item-next-icon" v-bind="ptm('nextItemIcon')" />
12
12
  </button>
13
- <div v-if="templates['caption']" class="p-galleria-caption">
13
+ <div v-if="templates['caption']" class="p-galleria-caption" v-bind="ptm('caption')">
14
14
  <component v-if="templates.caption" :is="templates.caption" :item="activeItem" />
15
15
  </div>
16
16
  </div>
17
- <ul v-if="showIndicators" class="p-galleria-indicators p-reset">
17
+ <ul v-if="showIndicators" class="p-galleria-indicators p-reset" v-bind="ptm('indicators')">
18
18
  <li
19
19
  v-for="(item, index) of value"
20
20
  :key="`p-galleria-indicator-${index}`"
@@ -26,6 +26,7 @@
26
26
  @click="onIndicatorClick(index)"
27
27
  @mouseenter="onIndicatorMouseEnter(index)"
28
28
  @keydown="onIndicatorKeyDown($event, index)"
29
+ v-bind="ptm('indicator')"
29
30
  >
30
31
  <button v-if="!templates['indicator']" type="button" tabindex="-1" class="p-link"></button>
31
32
  <component v-if="templates.indicator" :is="templates.indicator" :index="index" />
@@ -35,12 +36,14 @@
35
36
  </template>
36
37
 
37
38
  <script>
39
+ import BaseComponent from 'primevue/basecomponent';
38
40
  import ChevronLeftIcon from 'primevue/icons/chevronleft';
39
41
  import ChevronRightIcon from 'primevue/icons/chevronright';
40
42
  import Ripple from 'primevue/ripple';
41
43
 
42
44
  export default {
43
45
  name: 'GalleriaItem',
46
+ extends: BaseComponent,
44
47
  emits: ['start-slideshow', 'stop-slideshow', 'update:activeIndex'],
45
48
  props: {
46
49
  circular: {
@@ -1,11 +1,29 @@
1
1
  <template>
2
- <div class="p-galleria-thumbnail-wrapper">
3
- <div class="p-galleria-thumbnail-container">
4
- <button v-if="showThumbnailNavigators" v-ripple :class="navBackwardClass" :disabled="isNavBackwardDisabled()" type="button" :aria-label="ariaPrevButtonLabel" @click="navBackward($event)" v-bind="prevButtonProps">
5
- <component :is="templates.previousthumbnailicon || (isVertical ? 'ChevronUpIcon' : 'ChevronLeftIcon')" class="p-galleria-thumbnail-prev-icon" />
2
+ <div class="p-galleria-thumbnail-wrapper" v-bind="ptm('thumbnailWrapper')">
3
+ <div class="p-galleria-thumbnail-container" v-bind="ptm('thumbnailContainer')">
4
+ <button
5
+ v-if="showThumbnailNavigators"
6
+ v-ripple
7
+ :class="navBackwardClass"
8
+ :disabled="isNavBackwardDisabled()"
9
+ type="button"
10
+ :aria-label="ariaPrevButtonLabel"
11
+ @click="navBackward($event)"
12
+ v-bind="{ ...prevButtonProps, ...ptm('previousThumbnailButton') }"
13
+ >
14
+ <component :is="templates.previousthumbnailicon || (isVertical ? 'ChevronUpIcon' : 'ChevronLeftIcon')" class="p-galleria-thumbnail-prev-icon" v-bind="ptm('previousThumbnailIcon')" />
6
15
  </button>
7
- <div class="p-galleria-thumbnail-items-container" :style="{ height: isVertical ? contentHeight : '' }">
8
- <div ref="itemsContainer" class="p-galleria-thumbnail-items" role="tablist" @transitionend="onTransitionEnd" @touchstart="onTouchStart($event)" @touchmove="onTouchMove($event)" @touchend="onTouchEnd($event)">
16
+ <div class="p-galleria-thumbnail-items-container" :style="{ height: isVertical ? contentHeight : '' }" v-bind="ptm('thumbnailItemsContainer')">
17
+ <div
18
+ ref="itemsContainer"
19
+ class="p-galleria-thumbnail-items"
20
+ role="tablist"
21
+ @transitionend="onTransitionEnd"
22
+ @touchstart="onTouchStart($event)"
23
+ @touchmove="onTouchMove($event)"
24
+ @touchend="onTouchEnd($event)"
25
+ v-bind="ptm('thumbnailItems')"
26
+ >
9
27
  <div
10
28
  v-for="(item, index) of value"
11
29
  :key="`p-galleria-thumbnail-item-${index}`"
@@ -22,21 +40,39 @@
22
40
  :aria-selected="activeIndex === index"
23
41
  :aria-controls="containerId + '_item_' + index"
24
42
  @keydown="onThumbnailKeydown($event, index)"
43
+ v-bind="ptm('thumbnailItem')"
25
44
  >
26
- <div class="p-galleria-thumbnail-item-content" :tabindex="activeIndex === index ? '0' : '-1'" :aria-label="ariaPageLabel(index + 1)" :aria-current="activeIndex === index ? 'page' : undefined" @click="onItemClick(index)">
45
+ <div
46
+ class="p-galleria-thumbnail-item-content"
47
+ :tabindex="activeIndex === index ? '0' : '-1'"
48
+ :aria-label="ariaPageLabel(index + 1)"
49
+ :aria-current="activeIndex === index ? 'page' : undefined"
50
+ @click="onItemClick(index)"
51
+ v-bind="ptm('thumbnailItemContent')"
52
+ >
27
53
  <component v-if="templates.thumbnail" :is="templates.thumbnail" :item="item" />
28
54
  </div>
29
55
  </div>
30
56
  </div>
31
57
  </div>
32
- <button v-if="showThumbnailNavigators" v-ripple :class="navForwardClass" :disabled="isNavForwardDisabled()" type="button" :aria-label="ariaNextButtonLabel" @click="navForward($event)" v-bind="nextButtonProps">
33
- <component :is="templates.nextthumbnailicon || (isVertical ? 'ChevronDownIcon' : 'ChevronRightIcon')" class="p-galleria-thumbnail-prev-icon" />
58
+ <button
59
+ v-if="showThumbnailNavigators"
60
+ v-ripple
61
+ :class="navForwardClass"
62
+ :disabled="isNavForwardDisabled()"
63
+ type="button"
64
+ :aria-label="ariaNextButtonLabel"
65
+ @click="navForward($event)"
66
+ v-bind="{ ...nextButtonProps, ...ptm('nextThumbnailButton') }"
67
+ >
68
+ <component :is="templates.nextthumbnailicon || (isVertical ? 'ChevronDownIcon' : 'ChevronRightIcon')" class="p-galleria-thumbnail-next-icon" v-bind="ptm('nextThumbnailIcon')" />
34
69
  </button>
35
70
  </div>
36
71
  </div>
37
72
  </template>
38
73
 
39
74
  <script>
75
+ import BaseComponent from 'primevue/basecomponent';
40
76
  import ChevronDownIcon from 'primevue/icons/chevrondown';
41
77
  import ChevronLeftIcon from 'primevue/icons/chevronleft';
42
78
  import ChevronRightIcon from 'primevue/icons/chevronright';
@@ -46,6 +82,7 @@ import { DomHandler } from 'primevue/utils';
46
82
 
47
83
  export default {
48
84
  name: 'GalleriaThumbnails',
85
+ extends: BaseComponent,
49
86
  emits: ['stop-slideshow', 'update:activeIndex'],
50
87
  props: {
51
88
  containerId: {