primevue 3.16.2 → 3.18.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 (824) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +2 -1
  3. package/accordion/Accordion.d.ts +23 -5
  4. package/accordion/Accordion.vue +196 -79
  5. package/accordion/accordion.cjs.js +204 -98
  6. package/accordion/accordion.cjs.min.js +1 -1
  7. package/accordion/accordion.esm.js +202 -100
  8. package/accordion/accordion.esm.min.js +1 -1
  9. package/accordion/accordion.js +205 -100
  10. package/accordion/accordion.min.js +1 -1
  11. package/accordiontab/AccordionTab.d.ts +33 -5
  12. package/accordiontab/AccordionTab.vue +8 -1
  13. package/accordiontab/accordiontab.cjs.js +7 -0
  14. package/accordiontab/accordiontab.cjs.min.js +1 -1
  15. package/accordiontab/accordiontab.esm.js +7 -0
  16. package/accordiontab/accordiontab.esm.min.js +1 -1
  17. package/accordiontab/accordiontab.js +7 -0
  18. package/accordiontab/accordiontab.min.js +1 -1
  19. package/api/Api.d.ts +1 -1
  20. package/api/api.cjs.js +321 -313
  21. package/api/api.cjs.min.js +1 -1
  22. package/api/api.esm.js +321 -313
  23. package/api/api.esm.min.js +1 -1
  24. package/api/api.js +321 -313
  25. package/api/api.min.js +1 -1
  26. package/autocomplete/AutoComplete.d.ts +32 -17
  27. package/autocomplete/AutoComplete.vue +252 -131
  28. package/autocomplete/autocomplete.cjs.js +163 -118
  29. package/autocomplete/autocomplete.cjs.min.js +1 -1
  30. package/autocomplete/autocomplete.esm.js +161 -116
  31. package/autocomplete/autocomplete.esm.min.js +1 -1
  32. package/autocomplete/autocomplete.js +162 -117
  33. package/autocomplete/autocomplete.min.js +1 -1
  34. package/avatar/Avatar.d.ts +4 -4
  35. package/avatar/Avatar.vue +15 -11
  36. package/avatar/avatar.cjs.js +11 -7
  37. package/avatar/avatar.cjs.min.js +1 -1
  38. package/avatar/avatar.esm.js +11 -7
  39. package/avatar/avatar.esm.min.js +1 -1
  40. package/avatar/avatar.js +11 -7
  41. package/avatar/avatar.min.js +1 -1
  42. package/avatargroup/AvatarGroup.d.ts +6 -9
  43. package/avatargroup/AvatarGroup.vue +1 -1
  44. package/badge/Badge.d.ts +4 -5
  45. package/badge/Badge.vue +16 -13
  46. package/badge/badge.cjs.js +14 -11
  47. package/badge/badge.esm.js +14 -11
  48. package/badge/badge.js +14 -11
  49. package/badgedirective/badgedirective.cjs.js +8 -10
  50. package/badgedirective/badgedirective.esm.js +8 -10
  51. package/badgedirective/badgedirective.js +8 -10
  52. package/blockui/BlockUI.d.ts +6 -6
  53. package/blockui/BlockUI.vue +13 -15
  54. package/blockui/blockui.cjs.js +11 -13
  55. package/blockui/blockui.cjs.min.js +1 -1
  56. package/blockui/blockui.esm.js +11 -13
  57. package/blockui/blockui.esm.min.js +1 -1
  58. package/blockui/blockui.js +11 -13
  59. package/blockui/blockui.min.js +1 -1
  60. package/breadcrumb/Breadcrumb.d.ts +14 -7
  61. package/breadcrumb/Breadcrumb.vue +16 -7
  62. package/breadcrumb/BreadcrumbItem.vue +24 -15
  63. package/breadcrumb/breadcrumb.cjs.js +39 -25
  64. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  65. package/breadcrumb/breadcrumb.esm.js +39 -25
  66. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  67. package/breadcrumb/breadcrumb.js +39 -25
  68. package/breadcrumb/breadcrumb.min.js +1 -1
  69. package/button/Button.d.ts +10 -7
  70. package/button/Button.vue +28 -17
  71. package/button/button.cjs.js +25 -14
  72. package/button/button.cjs.min.js +1 -1
  73. package/button/button.esm.js +25 -14
  74. package/button/button.esm.min.js +1 -1
  75. package/button/button.js +25 -14
  76. package/button/button.min.js +1 -1
  77. package/calendar/Calendar.d.ts +14 -14
  78. package/calendar/Calendar.vue +856 -601
  79. package/calendar/calendar.cjs.js +714 -614
  80. package/calendar/calendar.cjs.min.js +1 -1
  81. package/calendar/calendar.esm.js +712 -612
  82. package/calendar/calendar.esm.min.js +1 -1
  83. package/calendar/calendar.js +713 -613
  84. package/calendar/calendar.min.js +1 -1
  85. package/card/Card.d.ts +5 -7
  86. package/card/Card.vue +5 -5
  87. package/carousel/Carousel.d.ts +29 -19
  88. package/carousel/Carousel.vue +537 -528
  89. package/carousel/carousel.cjs.js +496 -493
  90. package/carousel/carousel.cjs.min.js +1 -1
  91. package/carousel/carousel.esm.js +496 -493
  92. package/carousel/carousel.esm.min.js +1 -1
  93. package/carousel/carousel.js +645 -642
  94. package/carousel/carousel.min.js +1 -1
  95. package/cascadeselect/CascadeSelect.d.ts +29 -14
  96. package/cascadeselect/CascadeSelect.vue +197 -102
  97. package/cascadeselect/CascadeSelectSub.vue +50 -15
  98. package/cascadeselect/cascadeselect.cjs.js +185 -111
  99. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  100. package/cascadeselect/cascadeselect.esm.js +184 -110
  101. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  102. package/cascadeselect/cascadeselect.js +185 -111
  103. package/cascadeselect/cascadeselect.min.js +1 -1
  104. package/chart/Chart.d.ts +6 -7
  105. package/chart/Chart.vue +12 -12
  106. package/chart/chart.cjs.js +11 -11
  107. package/chart/chart.cjs.min.js +1 -1
  108. package/chart/chart.esm.js +11 -11
  109. package/chart/chart.esm.min.js +1 -1
  110. package/chart/chart.js +11 -11
  111. package/chart/chart.min.js +1 -1
  112. package/checkbox/Checkbox.d.ts +12 -12
  113. package/checkbox/Checkbox.vue +48 -20
  114. package/checkbox/checkbox.cjs.js +28 -17
  115. package/checkbox/checkbox.cjs.min.js +1 -1
  116. package/checkbox/checkbox.esm.js +28 -17
  117. package/checkbox/checkbox.esm.min.js +1 -1
  118. package/checkbox/checkbox.js +28 -17
  119. package/checkbox/checkbox.min.js +1 -1
  120. package/chip/Chip.d.ts +5 -5
  121. package/chip/Chip.vue +13 -11
  122. package/chip/chip.cjs.js +7 -4
  123. package/chip/chip.esm.js +7 -4
  124. package/chip/chip.js +7 -4
  125. package/chips/Chips.d.ts +9 -9
  126. package/chips/Chips.vue +89 -33
  127. package/chips/chips.cjs.js +48 -26
  128. package/chips/chips.cjs.min.js +1 -1
  129. package/chips/chips.esm.js +48 -26
  130. package/chips/chips.esm.min.js +1 -1
  131. package/chips/chips.js +48 -26
  132. package/chips/chips.min.js +1 -1
  133. package/colorpicker/ColorPicker.d.ts +11 -12
  134. package/colorpicker/ColorPicker.vue +146 -110
  135. package/colorpicker/colorpicker.cjs.js +113 -74
  136. package/colorpicker/colorpicker.cjs.min.js +1 -1
  137. package/colorpicker/colorpicker.esm.js +113 -74
  138. package/colorpicker/colorpicker.esm.min.js +1 -1
  139. package/colorpicker/colorpicker.js +113 -74
  140. package/colorpicker/colorpicker.min.js +1 -1
  141. package/column/Column.d.ts +5 -6
  142. package/column/Column.vue +1 -1
  143. package/columngroup/ColumnGroup.d.ts +5 -7
  144. package/columngroup/ColumnGroup.vue +1 -1
  145. package/config/PrimeVue.d.ts +8 -3
  146. package/config/config.cjs.js +18 -30
  147. package/config/config.cjs.min.js +1 -1
  148. package/config/config.esm.js +18 -30
  149. package/config/config.esm.min.js +1 -1
  150. package/config/config.js +19 -31
  151. package/config/config.min.js +1 -1
  152. package/confirmationoptions/ConfirmationOptions.d.ts +4 -0
  153. package/confirmationservice/confirmationservice.cjs.js +1 -0
  154. package/confirmationservice/confirmationservice.esm.js +1 -0
  155. package/confirmationservice/confirmationservice.js +1 -0
  156. package/confirmdialog/ConfirmDialog.d.ts +11 -5
  157. package/confirmdialog/ConfirmDialog.vue +25 -15
  158. package/confirmdialog/confirmdialog.cjs.js +34 -16
  159. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  160. package/confirmdialog/confirmdialog.esm.js +34 -16
  161. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  162. package/confirmdialog/confirmdialog.js +35 -17
  163. package/confirmdialog/confirmdialog.min.js +1 -1
  164. package/confirmpopup/ConfirmPopup.d.ts +5 -8
  165. package/confirmpopup/ConfirmPopup.vue +44 -32
  166. package/confirmpopup/confirmpopup.cjs.js +24 -14
  167. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  168. package/confirmpopup/confirmpopup.esm.js +24 -14
  169. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  170. package/confirmpopup/confirmpopup.js +24 -14
  171. package/confirmpopup/confirmpopup.min.js +1 -1
  172. package/contextmenu/ContextMenu.d.ts +43 -5
  173. package/contextmenu/ContextMenu.vue +449 -38
  174. package/contextmenu/ContextMenuSub.vue +134 -101
  175. package/contextmenu/contextmenu.cjs.js +639 -206
  176. package/contextmenu/contextmenu.cjs.min.js +1 -1
  177. package/contextmenu/contextmenu.esm.js +640 -207
  178. package/contextmenu/contextmenu.esm.min.js +1 -1
  179. package/contextmenu/contextmenu.js +640 -207
  180. package/contextmenu/contextmenu.min.js +1 -1
  181. package/core/core.js +2984 -2116
  182. package/core/core.min.js +16 -16
  183. package/datatable/BodyCell.vue +93 -75
  184. package/datatable/ColumnFilter.vue +137 -86
  185. package/datatable/DataTable.d.ts +25 -26
  186. package/datatable/DataTable.vue +472 -298
  187. package/datatable/FooterCell.vue +20 -13
  188. package/datatable/HeaderCell.vue +108 -51
  189. package/datatable/HeaderCheckbox.vue +12 -5
  190. package/datatable/RowCheckbox.vue +14 -6
  191. package/datatable/RowRadioButton.vue +4 -4
  192. package/datatable/TableBody.vue +135 -83
  193. package/datatable/TableFooter.vue +17 -20
  194. package/datatable/TableHeader.vue +132 -52
  195. package/datatable/TableLoadingBody.vue +3 -3
  196. package/datatable/datatable.cjs.js +2674 -2537
  197. package/datatable/datatable.cjs.min.js +1 -1
  198. package/datatable/datatable.esm.js +2676 -2539
  199. package/datatable/datatable.esm.min.js +1 -1
  200. package/datatable/datatable.js +2676 -2539
  201. package/datatable/datatable.min.js +1 -1
  202. package/dataview/DataView.d.ts +8 -8
  203. package/dataview/DataView.vue +80 -66
  204. package/dataview/dataview.cjs.js +31 -35
  205. package/dataview/dataview.cjs.min.js +1 -1
  206. package/dataview/dataview.esm.js +31 -35
  207. package/dataview/dataview.esm.min.js +1 -1
  208. package/dataview/dataview.js +31 -35
  209. package/dataview/dataview.min.js +1 -1
  210. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +5 -6
  211. package/dataviewlayoutoptions/DataViewLayoutOptions.vue +28 -34
  212. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -25
  213. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
  214. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -25
  215. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
  216. package/dataviewlayoutoptions/dataviewlayoutoptions.js +46 -52
  217. package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
  218. package/deferredcontent/DeferredContent.d.ts +6 -7
  219. package/deferredcontent/DeferredContent.vue +6 -9
  220. package/deferredcontent/deferredcontent.cjs.js +5 -8
  221. package/deferredcontent/deferredcontent.esm.js +5 -8
  222. package/deferredcontent/deferredcontent.js +5 -8
  223. package/dialog/Dialog.d.ts +10 -10
  224. package/dialog/Dialog.vue +64 -60
  225. package/dialog/dialog.cjs.js +50 -46
  226. package/dialog/dialog.cjs.min.js +1 -1
  227. package/dialog/dialog.esm.js +50 -46
  228. package/dialog/dialog.esm.min.js +1 -1
  229. package/dialog/dialog.js +50 -46
  230. package/dialog/dialog.min.js +1 -1
  231. package/divider/Divider.d.ts +4 -5
  232. package/divider/Divider.vue +15 -12
  233. package/divider/divider.cjs.js +17 -12
  234. package/divider/divider.cjs.min.js +1 -1
  235. package/divider/divider.esm.js +17 -12
  236. package/divider/divider.esm.min.js +1 -1
  237. package/divider/divider.js +17 -12
  238. package/divider/divider.min.js +1 -1
  239. package/dock/Dock.d.ts +36 -6
  240. package/dock/Dock.vue +21 -5
  241. package/dock/DockSub.vue +229 -55
  242. package/dock/dock.cjs.js +284 -106
  243. package/dock/dock.cjs.min.js +1 -1
  244. package/dock/dock.esm.js +284 -106
  245. package/dock/dock.esm.min.js +1 -1
  246. package/dock/dock.js +285 -108
  247. package/dock/dock.min.js +1 -1
  248. package/dropdown/Dropdown.d.ts +46 -17
  249. package/dropdown/Dropdown.vue +271 -129
  250. package/dropdown/dropdown.cjs.js +213 -132
  251. package/dropdown/dropdown.cjs.min.js +1 -1
  252. package/dropdown/dropdown.esm.js +212 -131
  253. package/dropdown/dropdown.esm.min.js +1 -1
  254. package/dropdown/dropdown.js +212 -131
  255. package/dropdown/dropdown.min.js +1 -1
  256. package/dynamicdialog/DynamicDialog.d.ts +4 -4
  257. package/dynamicdialog/DynamicDialog.vue +10 -10
  258. package/dynamicdialog/dynamicdialog.cjs.js +11 -9
  259. package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
  260. package/dynamicdialog/dynamicdialog.esm.js +11 -9
  261. package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
  262. package/dynamicdialog/dynamicdialog.js +11 -9
  263. package/dynamicdialog/dynamicdialog.min.js +1 -1
  264. package/editor/Editor.d.ts +20 -4
  265. package/editor/Editor.vue +506 -466
  266. package/editor/editor.cjs.js +99 -45
  267. package/editor/editor.cjs.min.js +1 -1
  268. package/editor/editor.esm.js +82 -42
  269. package/editor/editor.esm.min.js +1 -1
  270. package/editor/editor.js +83 -47
  271. package/editor/editor.min.js +1 -1
  272. package/fieldset/Fieldset.d.ts +9 -5
  273. package/fieldset/Fieldset.vue +28 -20
  274. package/fieldset/fieldset.cjs.js +31 -19
  275. package/fieldset/fieldset.cjs.min.js +1 -1
  276. package/fieldset/fieldset.esm.js +32 -20
  277. package/fieldset/fieldset.esm.min.js +1 -1
  278. package/fieldset/fieldset.js +31 -19
  279. package/fieldset/fieldset.min.js +1 -1
  280. package/fileupload/FileContent.vue +51 -0
  281. package/fileupload/FileUpload.d.ts +32 -12
  282. package/fileupload/FileUpload.vue +122 -102
  283. package/fileupload/fileupload.cjs.js +265 -160
  284. package/fileupload/fileupload.cjs.min.js +1 -1
  285. package/fileupload/fileupload.esm.js +265 -160
  286. package/fileupload/fileupload.esm.min.js +1 -1
  287. package/fileupload/fileupload.js +265 -160
  288. package/fileupload/fileupload.min.js +1 -1
  289. package/fullcalendar/FullCalendar.d.ts +5 -7
  290. package/fullcalendar/FullCalendar.vue +6 -6
  291. package/fullcalendar/fullcalendar.cjs.js +3 -2
  292. package/fullcalendar/fullcalendar.esm.js +3 -2
  293. package/fullcalendar/fullcalendar.js +3 -2
  294. package/galleria/Galleria.d.ts +4 -4
  295. package/galleria/Galleria.vue +39 -34
  296. package/galleria/GalleriaContent.vue +58 -31
  297. package/galleria/GalleriaItem.vue +44 -36
  298. package/galleria/GalleriaItemSlot.vue +2 -1
  299. package/galleria/GalleriaThumbnails.vue +108 -92
  300. package/galleria/galleria.cjs.js +181 -153
  301. package/galleria/galleria.cjs.min.js +1 -1
  302. package/galleria/galleria.esm.js +181 -153
  303. package/galleria/galleria.esm.min.js +1 -1
  304. package/galleria/galleria.js +181 -153
  305. package/galleria/galleria.min.js +1 -1
  306. package/image/Image.d.ts +4 -5
  307. package/image/Image.vue +19 -15
  308. package/image/image.cjs.js +11 -7
  309. package/image/image.cjs.min.js +1 -1
  310. package/image/image.esm.js +11 -7
  311. package/image/image.esm.min.js +1 -1
  312. package/image/image.js +11 -7
  313. package/image/image.min.js +1 -1
  314. package/inlinemessage/InlineMessage.d.ts +4 -5
  315. package/inlinemessage/InlineMessage.vue +12 -9
  316. package/inlinemessage/inlinemessage.cjs.js +12 -10
  317. package/inlinemessage/inlinemessage.cjs.min.js +1 -1
  318. package/inlinemessage/inlinemessage.esm.js +12 -10
  319. package/inlinemessage/inlinemessage.esm.min.js +1 -1
  320. package/inlinemessage/inlinemessage.js +12 -10
  321. package/inlinemessage/inlinemessage.min.js +1 -1
  322. package/inplace/Inplace.d.ts +6 -6
  323. package/inplace/Inplace.vue +11 -11
  324. package/inplace/inplace.cjs.js +9 -9
  325. package/inplace/inplace.cjs.min.js +1 -1
  326. package/inplace/inplace.esm.js +9 -9
  327. package/inplace/inplace.esm.min.js +1 -1
  328. package/inplace/inplace.js +9 -9
  329. package/inplace/inplace.min.js +1 -1
  330. package/inputmask/InputMask.d.ts +11 -12
  331. package/inputmask/InputMask.vue +119 -92
  332. package/inputmask/inputmask.cjs.js +116 -89
  333. package/inputmask/inputmask.cjs.min.js +1 -1
  334. package/inputmask/inputmask.esm.js +116 -89
  335. package/inputmask/inputmask.esm.min.js +1 -1
  336. package/inputmask/inputmask.js +116 -89
  337. package/inputmask/inputmask.min.js +1 -1
  338. package/inputnumber/InputNumber.d.ts +17 -17
  339. package/inputnumber/InputNumber.vue +247 -180
  340. package/inputnumber/inputnumber.cjs.js +219 -175
  341. package/inputnumber/inputnumber.cjs.min.js +1 -1
  342. package/inputnumber/inputnumber.esm.js +218 -174
  343. package/inputnumber/inputnumber.esm.min.js +1 -1
  344. package/inputnumber/inputnumber.js +219 -176
  345. package/inputnumber/inputnumber.min.js +1 -1
  346. package/inputswitch/InputSwitch.d.ts +10 -10
  347. package/inputswitch/InputSwitch.vue +39 -11
  348. package/inputswitch/inputswitch.cjs.js +23 -9
  349. package/inputswitch/inputswitch.cjs.min.js +1 -1
  350. package/inputswitch/inputswitch.esm.js +23 -9
  351. package/inputswitch/inputswitch.esm.min.js +1 -1
  352. package/inputswitch/inputswitch.js +23 -9
  353. package/inputswitch/inputswitch.min.js +1 -1
  354. package/inputtext/InputText.d.ts +5 -6
  355. package/inputtext/InputText.vue +3 -3
  356. package/inputtext/inputtext.cjs.js +2 -2
  357. package/inputtext/inputtext.esm.js +2 -2
  358. package/inputtext/inputtext.js +2 -2
  359. package/knob/Knob.d.ts +10 -11
  360. package/knob/Knob.vue +47 -29
  361. package/knob/knob.cjs.js +27 -25
  362. package/knob/knob.cjs.min.js +1 -1
  363. package/knob/knob.esm.js +27 -25
  364. package/knob/knob.esm.min.js +1 -1
  365. package/knob/knob.js +27 -25
  366. package/knob/knob.min.js +1 -1
  367. package/listbox/Listbox.d.ts +22 -13
  368. package/listbox/Listbox.vue +149 -98
  369. package/listbox/listbox.cjs.js +121 -106
  370. package/listbox/listbox.cjs.min.js +1 -1
  371. package/listbox/listbox.esm.js +122 -107
  372. package/listbox/listbox.esm.min.js +1 -1
  373. package/listbox/listbox.js +121 -106
  374. package/listbox/listbox.min.js +1 -1
  375. package/megamenu/MegaMenu.d.ts +32 -6
  376. package/megamenu/MegaMenu.vue +510 -238
  377. package/megamenu/MegaMenuSub.vue +231 -0
  378. package/megamenu/megamenu.cjs.js +837 -391
  379. package/megamenu/megamenu.cjs.min.js +1 -1
  380. package/megamenu/megamenu.esm.js +839 -393
  381. package/megamenu/megamenu.esm.min.js +1 -1
  382. package/megamenu/megamenu.js +837 -391
  383. package/megamenu/megamenu.min.js +1 -1
  384. package/menu/Menu.d.ts +28 -8
  385. package/menu/Menu.vue +204 -34
  386. package/menu/Menuitem.vue +48 -38
  387. package/menu/menu.cjs.js +325 -137
  388. package/menu/menu.cjs.min.js +1 -1
  389. package/menu/menu.esm.js +325 -137
  390. package/menu/menu.esm.min.js +1 -1
  391. package/menu/menu.js +325 -137
  392. package/menu/menu.min.js +1 -1
  393. package/menubar/Menubar.d.ts +19 -8
  394. package/menubar/Menubar.vue +536 -26
  395. package/menubar/MenubarSub.vue +123 -239
  396. package/menubar/menubar.cjs.js +708 -335
  397. package/menubar/menubar.cjs.min.js +1 -1
  398. package/menubar/menubar.esm.js +710 -337
  399. package/menubar/menubar.esm.min.js +1 -1
  400. package/menubar/menubar.js +708 -335
  401. package/menubar/menubar.min.js +1 -1
  402. package/menuitem/MenuItem.d.ts +2 -2
  403. package/message/Message.d.ts +5 -5
  404. package/message/Message.vue +19 -14
  405. package/message/message.cjs.js +15 -10
  406. package/message/message.cjs.min.js +1 -1
  407. package/message/message.esm.js +15 -10
  408. package/message/message.esm.min.js +1 -1
  409. package/message/message.js +15 -10
  410. package/message/message.min.js +1 -1
  411. package/multiselect/MultiSelect.d.ts +46 -16
  412. package/multiselect/MultiSelect.vue +266 -156
  413. package/multiselect/multiselect.cjs.js +239 -167
  414. package/multiselect/multiselect.cjs.min.js +1 -1
  415. package/multiselect/multiselect.esm.js +238 -166
  416. package/multiselect/multiselect.esm.min.js +1 -1
  417. package/multiselect/multiselect.js +238 -166
  418. package/multiselect/multiselect.min.js +1 -1
  419. package/orderlist/OrderList.d.ts +5 -5
  420. package/orderlist/OrderList.vue +65 -60
  421. package/orderlist/orderlist.cjs.js +51 -53
  422. package/orderlist/orderlist.esm.js +51 -53
  423. package/orderlist/orderlist.js +51 -53
  424. package/organizationchart/OrganizationChart.d.ts +4 -4
  425. package/organizationchart/OrganizationChart.vue +13 -17
  426. package/organizationchart/OrganizationChartNode.vue +20 -12
  427. package/organizationchart/organizationchart.cjs.js +14 -16
  428. package/organizationchart/organizationchart.cjs.min.js +1 -1
  429. package/organizationchart/organizationchart.esm.js +14 -16
  430. package/organizationchart/organizationchart.esm.min.js +1 -1
  431. package/organizationchart/organizationchart.js +14 -16
  432. package/organizationchart/organizationchart.min.js +1 -1
  433. package/overlaypanel/OverlayPanel.d.ts +5 -5
  434. package/overlaypanel/OverlayPanel.vue +60 -50
  435. package/overlaypanel/overlaypanel.cjs.js +40 -32
  436. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  437. package/overlaypanel/overlaypanel.esm.js +40 -32
  438. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  439. package/overlaypanel/overlaypanel.js +40 -32
  440. package/overlaypanel/overlaypanel.min.js +1 -1
  441. package/package.json +3 -3
  442. package/paginator/CurrentPageReport.vue +47 -47
  443. package/paginator/FirstPageLink.vue +11 -8
  444. package/paginator/JumpToPageDropdown.vue +7 -6
  445. package/paginator/JumpToPageInput.vue +3 -3
  446. package/paginator/LastPageLink.vue +11 -8
  447. package/paginator/NextPageLink.vue +11 -8
  448. package/paginator/PageLinks.vue +3 -4
  449. package/paginator/Paginator.d.ts +7 -7
  450. package/paginator/Paginator.vue +144 -49
  451. package/paginator/PrevPageLink.vue +11 -8
  452. package/paginator/RowsPerPageDropdown.vue +7 -6
  453. package/paginator/paginator.cjs.js +373 -259
  454. package/paginator/paginator.cjs.min.js +1 -1
  455. package/paginator/paginator.esm.js +374 -260
  456. package/paginator/paginator.esm.min.js +1 -1
  457. package/paginator/paginator.js +651 -538
  458. package/paginator/paginator.min.js +1 -1
  459. package/panel/Panel.d.ts +9 -5
  460. package/panel/Panel.vue +29 -11
  461. package/panel/panel.cjs.js +24 -14
  462. package/panel/panel.cjs.min.js +1 -1
  463. package/panel/panel.esm.js +24 -14
  464. package/panel/panel.esm.min.js +1 -1
  465. package/panel/panel.js +24 -14
  466. package/panel/panel.min.js +1 -1
  467. package/panelmenu/PanelMenu.d.ts +37 -6
  468. package/panelmenu/PanelMenu.vue +202 -88
  469. package/panelmenu/PanelMenuList.vue +335 -0
  470. package/panelmenu/PanelMenuSub.vue +130 -80
  471. package/panelmenu/panelmenu.cjs.js +1385 -283
  472. package/panelmenu/panelmenu.cjs.min.js +1 -1
  473. package/panelmenu/panelmenu.esm.js +1382 -284
  474. package/panelmenu/panelmenu.esm.min.js +1 -1
  475. package/panelmenu/panelmenu.js +1385 -284
  476. package/panelmenu/panelmenu.min.js +1 -1
  477. package/password/Password.d.ts +12 -7
  478. package/password/Password.vue +158 -80
  479. package/password/password.cjs.js +140 -78
  480. package/password/password.cjs.min.js +1 -1
  481. package/password/password.esm.js +139 -77
  482. package/password/password.esm.min.js +1 -1
  483. package/password/password.js +140 -78
  484. package/password/password.min.js +1 -1
  485. package/picklist/PickList.d.ts +9 -9
  486. package/picklist/PickList.vue +99 -78
  487. package/picklist/picklist.cjs.js +71 -66
  488. package/picklist/picklist.cjs.min.js +1 -1
  489. package/picklist/picklist.esm.js +71 -66
  490. package/picklist/picklist.esm.min.js +1 -1
  491. package/picklist/picklist.js +71 -66
  492. package/picklist/picklist.min.js +1 -1
  493. package/portal/Portal.d.ts +3 -3
  494. package/portal/Portal.vue +2 -2
  495. package/portal/portal.cjs.js +1 -1
  496. package/portal/portal.esm.js +1 -1
  497. package/portal/portal.js +1 -1
  498. package/progressbar/ProgressBar.d.ts +4 -5
  499. package/progressbar/ProgressBar.vue +63 -51
  500. package/progressbar/progressbar.cjs.js +2 -2
  501. package/progressbar/progressbar.cjs.min.js +1 -1
  502. package/progressbar/progressbar.esm.js +2 -2
  503. package/progressbar/progressbar.esm.min.js +1 -1
  504. package/progressbar/progressbar.js +2 -2
  505. package/progressbar/progressbar.min.js +1 -1
  506. package/progressspinner/ProgressSpinner.d.ts +5 -7
  507. package/progressspinner/ProgressSpinner.vue +1 -1
  508. package/radiobutton/RadioButton.d.ts +9 -9
  509. package/radiobutton/RadioButton.vue +41 -13
  510. package/radiobutton/radiobutton.cjs.js +24 -10
  511. package/radiobutton/radiobutton.cjs.min.js +1 -1
  512. package/radiobutton/radiobutton.esm.js +24 -10
  513. package/radiobutton/radiobutton.esm.min.js +1 -1
  514. package/radiobutton/radiobutton.js +24 -10
  515. package/radiobutton/radiobutton.min.js +1 -1
  516. package/rating/Rating.d.ts +54 -5
  517. package/rating/Rating.vue +88 -62
  518. package/rating/rating.cjs.js +105 -84
  519. package/rating/rating.cjs.min.js +1 -1
  520. package/rating/rating.esm.js +106 -85
  521. package/rating/rating.esm.min.js +1 -1
  522. package/rating/rating.js +106 -86
  523. package/rating/rating.min.js +1 -1
  524. package/resources/primevue.css +21 -2
  525. package/resources/primevue.min.css +1 -1
  526. package/resources/themes/arya-blue/theme.css +340 -282
  527. package/resources/themes/arya-green/theme.css +340 -282
  528. package/resources/themes/arya-orange/theme.css +340 -282
  529. package/resources/themes/arya-purple/theme.css +340 -282
  530. package/resources/themes/bootstrap4-dark-blue/theme.css +356 -298
  531. package/resources/themes/bootstrap4-dark-purple/theme.css +356 -298
  532. package/resources/themes/bootstrap4-light-blue/theme.css +369 -311
  533. package/resources/themes/bootstrap4-light-purple/theme.css +369 -311
  534. package/resources/themes/fluent-light/theme.css +350 -292
  535. package/resources/themes/lara-dark-blue/theme.css +343 -285
  536. package/resources/themes/lara-dark-indigo/theme.css +343 -285
  537. package/resources/themes/lara-dark-purple/theme.css +343 -285
  538. package/resources/themes/lara-dark-teal/theme.css +343 -285
  539. package/resources/themes/lara-light-blue/theme.css +367 -309
  540. package/resources/themes/lara-light-indigo/theme.css +367 -309
  541. package/resources/themes/lara-light-purple/theme.css +367 -309
  542. package/resources/themes/lara-light-teal/theme.css +367 -309
  543. package/resources/themes/luna-amber/theme.css +372 -314
  544. package/resources/themes/luna-blue/theme.css +372 -314
  545. package/resources/themes/luna-green/theme.css +372 -314
  546. package/resources/themes/luna-pink/theme.css +372 -314
  547. package/resources/themes/md-dark-deeppurple/theme.css +413 -318
  548. package/resources/themes/md-dark-indigo/theme.css +413 -318
  549. package/resources/themes/md-light-deeppurple/theme.css +413 -318
  550. package/resources/themes/md-light-indigo/theme.css +413 -318
  551. package/resources/themes/mdc-dark-deeppurple/theme.css +413 -318
  552. package/resources/themes/mdc-dark-indigo/theme.css +413 -318
  553. package/resources/themes/mdc-light-deeppurple/theme.css +413 -318
  554. package/resources/themes/mdc-light-indigo/theme.css +413 -318
  555. package/resources/themes/nova/theme.css +336 -278
  556. package/resources/themes/nova-accent/theme.css +335 -277
  557. package/resources/themes/nova-alt/theme.css +336 -278
  558. package/resources/themes/nova-vue/theme.css +336 -278
  559. package/resources/themes/rhea/theme.css +335 -277
  560. package/resources/themes/saga-blue/theme.css +347 -289
  561. package/resources/themes/saga-green/theme.css +347 -289
  562. package/resources/themes/saga-orange/theme.css +347 -289
  563. package/resources/themes/saga-purple/theme.css +347 -289
  564. package/resources/themes/tailwind-light/theme.css +359 -301
  565. package/resources/themes/vela-blue/theme.css +347 -289
  566. package/resources/themes/vela-green/theme.css +347 -289
  567. package/resources/themes/vela-orange/theme.css +347 -289
  568. package/resources/themes/vela-purple/theme.css +347 -289
  569. package/ripple/ripple.cjs.js +19 -1
  570. package/ripple/ripple.cjs.min.js +1 -1
  571. package/ripple/ripple.esm.js +19 -1
  572. package/ripple/ripple.esm.min.js +1 -1
  573. package/ripple/ripple.js +19 -1
  574. package/ripple/ripple.min.js +1 -1
  575. package/row/Row.d.ts +6 -9
  576. package/row/Row.vue +1 -1
  577. package/scrollpanel/ScrollPanel.d.ts +9 -5
  578. package/scrollpanel/ScrollPanel.vue +194 -56
  579. package/scrollpanel/scrollpanel.cjs.js +180 -56
  580. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  581. package/scrollpanel/scrollpanel.esm.js +181 -57
  582. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  583. package/scrollpanel/scrollpanel.js +180 -56
  584. package/scrollpanel/scrollpanel.min.js +1 -1
  585. package/scrolltop/ScrollTop.d.ts +5 -7
  586. package/scrolltop/ScrollTop.vue +18 -23
  587. package/scrolltop/scrolltop.cjs.js +14 -19
  588. package/scrolltop/scrolltop.cjs.min.js +1 -1
  589. package/scrolltop/scrolltop.esm.js +14 -19
  590. package/scrolltop/scrolltop.esm.min.js +1 -1
  591. package/scrolltop/scrolltop.js +14 -19
  592. package/scrolltop/scrolltop.min.js +1 -1
  593. package/selectbutton/SelectButton.d.ts +11 -11
  594. package/selectbutton/SelectButton.vue +50 -32
  595. package/selectbutton/selectbutton.cjs.js +30 -25
  596. package/selectbutton/selectbutton.esm.js +30 -25
  597. package/selectbutton/selectbutton.js +30 -25
  598. package/sidebar/Sidebar.d.ts +6 -6
  599. package/sidebar/Sidebar.vue +24 -14
  600. package/sidebar/sidebar.cjs.js +20 -10
  601. package/sidebar/sidebar.cjs.min.js +1 -1
  602. package/sidebar/sidebar.esm.js +20 -10
  603. package/sidebar/sidebar.esm.min.js +1 -1
  604. package/sidebar/sidebar.js +20 -10
  605. package/sidebar/sidebar.min.js +1 -1
  606. package/skeleton/Skeleton.d.ts +5 -7
  607. package/skeleton/Skeleton.vue +12 -11
  608. package/skeleton/skeleton.cjs.js +10 -9
  609. package/skeleton/skeleton.cjs.min.js +1 -1
  610. package/skeleton/skeleton.esm.js +10 -9
  611. package/skeleton/skeleton.esm.min.js +1 -1
  612. package/skeleton/skeleton.js +10 -9
  613. package/skeleton/skeleton.min.js +1 -1
  614. package/slider/Slider.d.ts +7 -8
  615. package/slider/Slider.vue +162 -141
  616. package/slider/slider.cjs.js +100 -127
  617. package/slider/slider.cjs.min.js +1 -1
  618. package/slider/slider.esm.js +100 -127
  619. package/slider/slider.esm.min.js +1 -1
  620. package/slider/slider.js +100 -127
  621. package/slider/slider.min.js +1 -1
  622. package/speeddial/SpeedDial.d.ts +8 -8
  623. package/speeddial/SpeedDial.vue +66 -46
  624. package/speeddial/speeddial.cjs.js +77 -62
  625. package/speeddial/speeddial.cjs.min.js +1 -1
  626. package/speeddial/speeddial.esm.js +77 -62
  627. package/speeddial/speeddial.esm.min.js +1 -1
  628. package/speeddial/speeddial.js +77 -62
  629. package/speeddial/speeddial.min.js +1 -1
  630. package/splitbutton/SplitButton.d.ts +6 -6
  631. package/splitbutton/SplitButton.vue +9 -11
  632. package/splitbutton/splitbutton.cjs.js +7 -7
  633. package/splitbutton/splitbutton.cjs.min.js +1 -1
  634. package/splitbutton/splitbutton.esm.js +7 -7
  635. package/splitbutton/splitbutton.esm.min.js +1 -1
  636. package/splitbutton/splitbutton.js +7 -7
  637. package/splitbutton/splitbutton.min.js +1 -1
  638. package/splitter/Splitter.d.ts +10 -5
  639. package/splitter/Splitter.vue +158 -53
  640. package/splitter/splitter.cjs.js +156 -52
  641. package/splitter/splitter.cjs.min.js +1 -1
  642. package/splitter/splitter.esm.js +157 -53
  643. package/splitter/splitter.esm.min.js +1 -1
  644. package/splitter/splitter.js +156 -52
  645. package/splitter/splitter.min.js +1 -1
  646. package/splitterpanel/SplitterPanel.d.ts +4 -5
  647. package/splitterpanel/SplitterPanel.vue +3 -3
  648. package/splitterpanel/splitterpanel.cjs.js +2 -2
  649. package/splitterpanel/splitterpanel.esm.js +2 -2
  650. package/splitterpanel/splitterpanel.js +2 -2
  651. package/steps/Steps.d.ts +4 -5
  652. package/steps/Steps.vue +137 -30
  653. package/steps/steps.cjs.js +135 -36
  654. package/steps/steps.cjs.min.js +1 -1
  655. package/steps/steps.esm.js +136 -37
  656. package/steps/steps.esm.min.js +1 -1
  657. package/steps/steps.js +135 -36
  658. package/steps/steps.min.js +1 -1
  659. package/styleclass/styleclass.cjs.js +20 -22
  660. package/styleclass/styleclass.cjs.min.js +1 -1
  661. package/styleclass/styleclass.esm.js +20 -22
  662. package/styleclass/styleclass.esm.min.js +1 -1
  663. package/styleclass/styleclass.js +20 -22
  664. package/styleclass/styleclass.min.js +1 -1
  665. package/tabmenu/TabMenu.d.ts +13 -5
  666. package/tabmenu/TabMenu.vue +176 -36
  667. package/tabmenu/tabmenu.cjs.js +173 -42
  668. package/tabmenu/tabmenu.cjs.min.js +1 -1
  669. package/tabmenu/tabmenu.esm.js +173 -42
  670. package/tabmenu/tabmenu.esm.min.js +1 -1
  671. package/tabmenu/tabmenu.js +174 -43
  672. package/tabmenu/tabmenu.min.js +1 -1
  673. package/tabpanel/TabPanel.d.ts +33 -6
  674. package/tabpanel/TabPanel.vue +8 -1
  675. package/tabpanel/tabpanel.cjs.js +7 -0
  676. package/tabpanel/tabpanel.cjs.min.js +1 -1
  677. package/tabpanel/tabpanel.esm.js +7 -0
  678. package/tabpanel/tabpanel.esm.min.js +1 -1
  679. package/tabpanel/tabpanel.js +7 -0
  680. package/tabpanel/tabpanel.min.js +1 -1
  681. package/tabview/TabView.d.ts +22 -6
  682. package/tabview/TabView.vue +280 -96
  683. package/tabview/tabview.cjs.js +295 -132
  684. package/tabview/tabview.cjs.min.js +1 -1
  685. package/tabview/tabview.esm.js +296 -133
  686. package/tabview/tabview.esm.min.js +1 -1
  687. package/tabview/tabview.js +296 -133
  688. package/tabview/tabview.min.js +1 -1
  689. package/tag/Tag.d.ts +4 -5
  690. package/tag/Tag.vue +13 -10
  691. package/tag/tag.cjs.js +10 -7
  692. package/tag/tag.esm.js +10 -7
  693. package/tag/tag.js +10 -7
  694. package/terminal/Terminal.d.ts +5 -7
  695. package/terminal/Terminal.vue +10 -10
  696. package/terminal/terminal.cjs.js +3 -3
  697. package/terminal/terminal.cjs.min.js +1 -1
  698. package/terminal/terminal.esm.js +3 -3
  699. package/terminal/terminal.esm.min.js +1 -1
  700. package/terminal/terminal.js +3 -3
  701. package/terminal/terminal.min.js +1 -1
  702. package/textarea/Textarea.d.ts +5 -6
  703. package/textarea/Textarea.vue +7 -7
  704. package/textarea/textarea.cjs.js +6 -6
  705. package/textarea/textarea.esm.js +6 -6
  706. package/textarea/textarea.js +6 -6
  707. package/tieredmenu/TieredMenu.d.ts +48 -6
  708. package/tieredmenu/TieredMenu.vue +500 -58
  709. package/tieredmenu/TieredMenuSub.vue +126 -208
  710. package/tieredmenu/tieredmenu.cjs.js +684 -338
  711. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  712. package/tieredmenu/tieredmenu.esm.js +685 -339
  713. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  714. package/tieredmenu/tieredmenu.js +685 -339
  715. package/tieredmenu/tieredmenu.min.js +1 -1
  716. package/timeline/Timeline.d.ts +4 -5
  717. package/timeline/Timeline.vue +6 -10
  718. package/timeline/timeline.cjs.js +3 -7
  719. package/timeline/timeline.cjs.min.js +1 -1
  720. package/timeline/timeline.esm.js +3 -7
  721. package/timeline/timeline.esm.min.js +1 -1
  722. package/timeline/timeline.js +3 -7
  723. package/timeline/timeline.min.js +1 -1
  724. package/toast/Toast.d.ts +10 -13
  725. package/toast/Toast.vue +40 -31
  726. package/toast/ToastMessage.vue +29 -20
  727. package/toast/toast.cjs.js +56 -38
  728. package/toast/toast.cjs.min.js +1 -1
  729. package/toast/toast.esm.js +55 -37
  730. package/toast/toast.esm.min.js +1 -1
  731. package/toast/toast.js +56 -38
  732. package/toast/toast.min.js +1 -1
  733. package/toastservice/toastservice.cjs.js +1 -0
  734. package/toastservice/toastservice.esm.js +1 -0
  735. package/toastservice/toastservice.js +1 -0
  736. package/togglebutton/ToggleButton.d.ts +10 -10
  737. package/togglebutton/ToggleButton.vue +82 -23
  738. package/togglebutton/togglebutton.cjs.js +66 -18
  739. package/togglebutton/togglebutton.cjs.min.js +1 -1
  740. package/togglebutton/togglebutton.esm.js +66 -18
  741. package/togglebutton/togglebutton.esm.min.js +1 -1
  742. package/togglebutton/togglebutton.js +66 -18
  743. package/togglebutton/togglebutton.min.js +1 -1
  744. package/toolbar/Toolbar.d.ts +8 -5
  745. package/toolbar/Toolbar.vue +9 -3
  746. package/toolbar/toolbar.cjs.js +14 -7
  747. package/toolbar/toolbar.cjs.min.js +1 -1
  748. package/toolbar/toolbar.esm.js +14 -7
  749. package/toolbar/toolbar.esm.min.js +1 -1
  750. package/toolbar/toolbar.js +14 -7
  751. package/toolbar/toolbar.min.js +1 -1
  752. package/tooltip/tooltip.cjs.js +36 -24
  753. package/tooltip/tooltip.cjs.min.js +1 -1
  754. package/tooltip/tooltip.esm.js +37 -25
  755. package/tooltip/tooltip.esm.min.js +1 -1
  756. package/tooltip/tooltip.js +36 -24
  757. package/tooltip/tooltip.min.js +1 -1
  758. package/tree/Tree.d.ts +15 -7
  759. package/tree/Tree.vue +66 -56
  760. package/tree/TreeNode.vue +70 -66
  761. package/tree/tree.cjs.js +99 -102
  762. package/tree/tree.cjs.min.js +1 -1
  763. package/tree/tree.esm.js +99 -102
  764. package/tree/tree.esm.min.js +1 -1
  765. package/tree/tree.js +99 -102
  766. package/tree/tree.min.js +1 -1
  767. package/treeselect/TreeSelect.d.ts +9 -9
  768. package/treeselect/TreeSelect.vue +130 -72
  769. package/treeselect/treeselect.cjs.js +89 -59
  770. package/treeselect/treeselect.cjs.min.js +1 -1
  771. package/treeselect/treeselect.esm.js +89 -59
  772. package/treeselect/treeselect.esm.min.js +1 -1
  773. package/treeselect/treeselect.js +89 -59
  774. package/treeselect/treeselect.min.js +1 -1
  775. package/treetable/BodyCell.vue +29 -19
  776. package/treetable/FooterCell.vue +19 -11
  777. package/treetable/HeaderCell.vue +44 -36
  778. package/treetable/TreeTable.d.ts +8 -8
  779. package/treetable/TreeTable.vue +229 -178
  780. package/treetable/TreeTableRow.vue +74 -58
  781. package/treetable/treetable.cjs.js +287 -253
  782. package/treetable/treetable.cjs.min.js +1 -1
  783. package/treetable/treetable.esm.js +287 -253
  784. package/treetable/treetable.esm.min.js +1 -1
  785. package/treetable/treetable.js +287 -253
  786. package/treetable/treetable.min.js +1 -1
  787. package/tristatecheckbox/TriStateCheckbox.d.ts +9 -9
  788. package/tristatecheckbox/TriStateCheckbox.vue +39 -18
  789. package/tristatecheckbox/tristatecheckbox.cjs.js +24 -15
  790. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  791. package/tristatecheckbox/tristatecheckbox.esm.js +24 -15
  792. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  793. package/tristatecheckbox/tristatecheckbox.js +24 -15
  794. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  795. package/ts-helpers.d.ts +16 -10
  796. package/useconfirm/UseConfirm.d.ts +1 -1
  797. package/useconfirm/useconfirm.cjs.js +2 -1
  798. package/useconfirm/useconfirm.esm.js +2 -1
  799. package/useconfirm/useconfirm.js +2 -1
  800. package/usedialog/UseDialog.d.ts +1 -1
  801. package/usedialog/usedialog.cjs.js +2 -1
  802. package/usedialog/usedialog.esm.js +2 -1
  803. package/usedialog/usedialog.js +2 -1
  804. package/usetoast/usetoast.cjs.js +2 -1
  805. package/usetoast/usetoast.esm.js +2 -1
  806. package/usetoast/usetoast.js +2 -1
  807. package/utils/Utils.d.ts +10 -5
  808. package/utils/utils.cjs.js +209 -156
  809. package/utils/utils.cjs.min.js +1 -1
  810. package/utils/utils.esm.js +209 -156
  811. package/utils/utils.esm.min.js +1 -1
  812. package/utils/utils.js +209 -156
  813. package/utils/utils.min.js +1 -1
  814. package/vetur-attributes.json +335 -3
  815. package/vetur-tags.json +112 -19
  816. package/virtualscroller/VirtualScroller.d.ts +9 -9
  817. package/virtualscroller/VirtualScroller.vue +108 -96
  818. package/virtualscroller/virtualscroller.cjs.js +87 -89
  819. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  820. package/virtualscroller/virtualscroller.esm.js +87 -89
  821. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  822. package/virtualscroller/virtualscroller.js +87 -89
  823. package/virtualscroller/virtualscroller.min.js +1 -1
  824. package/web-types.json +1183 -73
@@ -1,66 +1,149 @@
1
1
  <template>
2
2
  <span ref="container" :id="id" :class="containerClass">
3
- <input :ref="inputRef" v-if="!inline" type="text" role="combobox" :id="inputId" :class="['p-inputtext p-component', inputClass]" :style="inputStyle" :placeholder="placeholder"
4
- aria-autocomplete="none" aria-haspopup="dialog" :aria-expanded="overlayVisible" :aria-controls="panelId" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" inputmode="none"
5
- @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" :readonly="!manualInput" :tabindex="0" v-bind="inputProps">
6
- <CalendarButton v-if="showIcon" :icon="icon" class="p-datepicker-trigger" :disabled="disabled" @click="onButtonClick" type="button" :aria-label="$primevue.config.locale.chooseDate" aria-haspopup="dialog" :aria-expanded="overlayVisible" :aria-controls="panelId"/>
3
+ <input
4
+ v-if="!inline"
5
+ :ref="inputRef"
6
+ :id="inputId"
7
+ type="text"
8
+ role="combobox"
9
+ :class="['p-inputtext p-component', inputClass]"
10
+ :style="inputStyle"
11
+ :placeholder="placeholder"
12
+ aria-autocomplete="none"
13
+ aria-haspopup="dialog"
14
+ :aria-expanded="overlayVisible"
15
+ :aria-controls="panelId"
16
+ :aria-labelledby="ariaLabelledby"
17
+ :aria-label="ariaLabel"
18
+ inputmode="none"
19
+ :disabled="disabled"
20
+ :readonly="!manualInput"
21
+ :tabindex="0"
22
+ @input="onInput"
23
+ @click="onInputClick"
24
+ @focus="onFocus"
25
+ @blur="onBlur"
26
+ @keydown="onKeyDown"
27
+ v-bind="inputProps"
28
+ />
29
+ <CalendarButton
30
+ v-if="showIcon"
31
+ :icon="icon"
32
+ class="p-datepicker-trigger"
33
+ :disabled="disabled"
34
+ @click="onButtonClick"
35
+ type="button"
36
+ :aria-label="$primevue.config.locale.chooseDate"
37
+ aria-haspopup="dialog"
38
+ :aria-expanded="overlayVisible"
39
+ :aria-controls="panelId"
40
+ />
7
41
  <Portal :appendTo="appendTo" :disabled="inline">
8
42
  <transition name="p-connected-overlay" @enter="onOverlayEnter($event)" @after-enter="onOverlayEnterComplete" @after-leave="onOverlayAfterLeave" @leave="onOverlayLeave">
9
- <div :ref="overlayRef" :id="panelId" :class="panelStyleClass" :style=panelStyle v-if="inline || overlayVisible" :role="inline ? null : 'dialog'" :aria-modal="inline ? null : 'true'" :aria-label="$primevue.config.locale.chooseDate"
10
- @click="onOverlayClick" @keydown="onOverlayKeyDown" @mouseup="onOverlayMouseUp" v-bind="panelProps">
43
+ <div
44
+ v-if="inline || overlayVisible"
45
+ :ref="overlayRef"
46
+ :id="panelId"
47
+ :class="panelStyleClass"
48
+ :style="panelStyle"
49
+ :role="inline ? null : 'dialog'"
50
+ :aria-modal="inline ? null : 'true'"
51
+ :aria-label="$primevue.config.locale.chooseDate"
52
+ @click="onOverlayClick"
53
+ @keydown="onOverlayKeyDown"
54
+ @mouseup="onOverlayMouseUp"
55
+ v-bind="panelProps"
56
+ >
11
57
  <template v-if="!timeOnly">
12
58
  <div class="p-datepicker-group-container">
13
- <div class="p-datepicker-group" v-for="(month,groupIndex) of months" :key="month.month + month.year">
59
+ <div v-for="(month, groupIndex) of months" :key="month.month + month.year" class="p-datepicker-group">
14
60
  <div class="p-datepicker-header">
15
61
  <slot name="header"></slot>
16
- <button class="p-datepicker-prev p-link" v-show="showOtherMonths ? groupIndex === 0 : false" @click="onPrevButtonClick" type="button" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled" :aria-label=" currentView === 'year' ? $primevue.config.locale.prevDecade: currentView === 'month' ? $primevue.config.locale.prevYear : $primevue.config.locale.prevMonth">
62
+ <button
63
+ v-show="showOtherMonths ? groupIndex === 0 : false"
64
+ v-ripple
65
+ class="p-datepicker-prev p-link"
66
+ @click="onPrevButtonClick"
67
+ type="button"
68
+ @keydown="onContainerButtonKeydown"
69
+ :disabled="disabled"
70
+ :aria-label="currentView === 'year' ? $primevue.config.locale.prevDecade : currentView === 'month' ? $primevue.config.locale.prevYear : $primevue.config.locale.prevMonth"
71
+ >
17
72
  <span class="p-datepicker-prev-icon pi pi-chevron-left"></span>
18
73
  </button>
19
74
  <div class="p-datepicker-title">
20
- <button type="button" @click="switchToMonthView" @keydown="onContainerButtonKeydown" v-if="currentView === 'date'" class="p-datepicker-month p-link" :disabled="switchViewButtonDisabled" :aria-label="$primevue.config.locale.chooseMonth">
21
- {{getMonthName(month.month)}}
75
+ <button
76
+ v-if="currentView === 'date'"
77
+ type="button"
78
+ @click="switchToMonthView"
79
+ @keydown="onContainerButtonKeydown"
80
+ class="p-datepicker-month p-link"
81
+ :disabled="switchViewButtonDisabled"
82
+ :aria-label="$primevue.config.locale.chooseMonth"
83
+ >
84
+ {{ getMonthName(month.month) }}
22
85
  </button>
23
- <button type="button" @click="switchToYearView" @keydown="onContainerButtonKeydown" v-if="currentView !== 'year'" class="p-datepicker-year p-link" :disabled="switchViewButtonDisabled" :aria-label="$primevue.config.locale.chooseYear">
24
- {{getYear(month)}}
86
+ <button
87
+ v-if="currentView !== 'year'"
88
+ type="button"
89
+ @click="switchToYearView"
90
+ @keydown="onContainerButtonKeydown"
91
+ class="p-datepicker-year p-link"
92
+ :disabled="switchViewButtonDisabled"
93
+ :aria-label="$primevue.config.locale.chooseYear"
94
+ >
95
+ {{ getYear(month) }}
25
96
  </button>
26
- <span class="p-datepicker-decade" v-if="currentView === 'year'">
27
- <slot name="decade" :years="yearPickerValues">
28
- {{yearPickerValues[0]}} - {{yearPickerValues[yearPickerValues.length - 1]}}
29
- </slot>
97
+ <span v-if="currentView === 'year'" class="p-datepicker-decade">
98
+ <slot name="decade" :years="yearPickerValues"> {{ yearPickerValues[0] }} - {{ yearPickerValues[yearPickerValues.length - 1] }} </slot>
30
99
  </span>
31
100
  </div>
32
- <button class="p-datepicker-next p-link" v-show="showOtherMonths ? numberOfMonths === 1 ? true : (groupIndex === numberOfMonths - 1) : false"
33
- @click="onNextButtonClick" type="button" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled" :aria-label=" currentView === 'year' ? $primevue.config.locale.nextDecade : currentView === 'month' ? $primevue.config.locale.nextYear : $primevue.config.locale.nextMonth">
101
+ <button
102
+ v-show="showOtherMonths ? (numberOfMonths === 1 ? true : groupIndex === numberOfMonths - 1) : false"
103
+ v-ripple
104
+ class="p-datepicker-next p-link"
105
+ @click="onNextButtonClick"
106
+ type="button"
107
+ @keydown="onContainerButtonKeydown"
108
+ :disabled="disabled"
109
+ :aria-label="currentView === 'year' ? $primevue.config.locale.nextDecade : currentView === 'month' ? $primevue.config.locale.nextYear : $primevue.config.locale.nextMonth"
110
+ >
34
111
  <span class="p-datepicker-next-icon pi pi-chevron-right"></span>
35
112
  </button>
36
113
  </div>
37
- <div class="p-datepicker-calendar-container" v-if="currentView ==='date'">
114
+ <div v-if="currentView === 'date'" class="p-datepicker-calendar-container">
38
115
  <table class="p-datepicker-calendar" role="grid">
39
116
  <thead>
40
117
  <tr>
41
- <th scope="col" v-if="showWeek" class="p-datepicker-weekheader p-disabled">
42
- <span>{{weekHeaderLabel}}</span>
118
+ <th v-if="showWeek" scope="col" class="p-datepicker-weekheader p-disabled">
119
+ <span>{{ weekHeaderLabel }}</span>
43
120
  </th>
44
- <th scope="col" v-for="weekDay of weekDays" :key="weekDay" :abbr="weekDay">
45
- <span>{{weekDay}}</span>
121
+ <th v-for="weekDay of weekDays" :key="weekDay" scope="col" :abbr="weekDay">
122
+ <span>{{ weekDay }}</span>
46
123
  </th>
47
124
  </tr>
48
125
  </thead>
49
126
  <tbody>
50
- <tr v-for="(week,i) of month.dates" :key="week[0].day + '' + week[0].month">
127
+ <tr v-for="(week, i) of month.dates" :key="week[0].day + '' + week[0].month">
51
128
  <td v-if="showWeek" class="p-datepicker-weeknumber">
52
129
  <span class="p-disabled">
53
- <span style="visibility:hidden" v-if="month.weekNumbers[i] < 10">0</span>
54
- {{month.weekNumbers[i]}}
130
+ <span v-if="month.weekNumbers[i] < 10" style="visibility: hidden">0</span>
131
+ {{ month.weekNumbers[i] }}
55
132
  </span>
56
133
  </td>
57
- <td v-for="date of week" :aria-label="date.day" :key="date.day + '' + date.month" :class="{'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today}">
58
- <span :class="{'p-highlight': isSelected(date), 'p-disabled': !date.selectable}" @click="onDateSelect($event, date)"
59
- draggable="false" @keydown="onDateCellKeydown($event,date,groupIndex)" v-ripple :aria-selected="isSelected(date)">
60
- <slot name="date" :date="date">{{date.day}}</slot>
134
+ <td v-for="date of week" :key="date.day + '' + date.month" :aria-label="date.day" :class="{ 'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today }">
135
+ <span
136
+ v-ripple
137
+ :class="{ 'p-highlight': isSelected(date), 'p-disabled': !date.selectable }"
138
+ @click="onDateSelect($event, date)"
139
+ draggable="false"
140
+ @keydown="onDateCellKeydown($event, date, groupIndex)"
141
+ :aria-selected="isSelected(date)"
142
+ >
143
+ <slot name="date" :date="date">{{ date.day }}</slot>
61
144
  </span>
62
145
  <div v-if="isSelected(date)" class="p-hidden-accessible" aria-live="polite">
63
- {{date.day}}
146
+ {{ date.day }}
64
147
  </div>
65
148
  </td>
66
149
  </tr>
@@ -69,81 +152,155 @@
69
152
  </div>
70
153
  </div>
71
154
  </div>
72
- <div class="p-monthpicker" v-if="currentView === 'month'">
73
- <span v-for="(m,i) of monthPickerValues" :key="m" @click="onMonthSelect($event, i)" @keydown="onMonthCellKeydown($event,i)"
74
- class="p-monthpicker-month" :class="{'p-highlight': isMonthSelected(i)}" v-ripple>
75
- {{m}}
155
+ <div v-if="currentView === 'month'" class="p-monthpicker">
156
+ <span v-for="(m, i) of monthPickerValues" :key="m" v-ripple @click="onMonthSelect($event, i)" @keydown="onMonthCellKeydown($event, i)" class="p-monthpicker-month" :class="{ 'p-highlight': isMonthSelected(i) }">
157
+ {{ m }}
76
158
  <div v-if="isMonthSelected(i)" class="p-hidden-accessible" aria-live="polite">
77
- {{m}}
159
+ {{ m }}
78
160
  </div>
79
161
  </span>
80
162
  </div>
81
- <div class="p-yearpicker" v-if="currentView === 'year'">
82
- <span v-for="y of yearPickerValues" :key="y" @click="onYearSelect($event, y)" @keydown="onYearCellKeydown($event,y)"
83
- class="p-yearpicker-year" :class="{'p-highlight': isYearSelected(y)}" v-ripple>
84
- {{y}}
163
+ <div v-if="currentView === 'year'" class="p-yearpicker">
164
+ <span v-for="y of yearPickerValues" :key="y" v-ripple @click="onYearSelect($event, y)" @keydown="onYearCellKeydown($event, y)" class="p-yearpicker-year" :class="{ 'p-highlight': isYearSelected(y) }">
165
+ {{ y }}
85
166
  <div v-if="isYearSelected(y)" class="p-hidden-accessible" aria-live="polite">
86
- {{y}}
167
+ {{ y }}
87
168
  </div>
88
169
  </span>
89
170
  </div>
90
171
  </template>
91
- <div class="p-timepicker" v-if="(showTime||timeOnly) && currentView === 'date'">
172
+ <div v-if="(showTime || timeOnly) && currentView === 'date'" class="p-timepicker">
92
173
  <div class="p-hour-picker">
93
- <button class="p-link" :aria-label="$primevue.config.locale.nextHour" @mousedown="onTimePickerElementMouseDown($event, 0, 1)" @mouseup="onTimePickerElementMouseUp($event)" @keydown="onContainerButtonKeydown" v-ripple
94
- @mouseleave="onTimePickerElementMouseLeave()" @keydown.enter="onTimePickerElementMouseDown($event, 0, 1)" @keydown.space="onTimePickerElementMouseDown($event, 0, 1)" @keyup.enter="onTimePickerElementMouseUp($event)" @keyup.space="onTimePickerElementMouseUp($event)" type="button">
174
+ <button
175
+ v-ripple
176
+ class="p-link"
177
+ :aria-label="$primevue.config.locale.nextHour"
178
+ @mousedown="onTimePickerElementMouseDown($event, 0, 1)"
179
+ @mouseup="onTimePickerElementMouseUp($event)"
180
+ @keydown="onContainerButtonKeydown"
181
+ @mouseleave="onTimePickerElementMouseLeave()"
182
+ @keydown.enter="onTimePickerElementMouseDown($event, 0, 1)"
183
+ @keydown.space="onTimePickerElementMouseDown($event, 0, 1)"
184
+ @keyup.enter="onTimePickerElementMouseUp($event)"
185
+ @keyup.space="onTimePickerElementMouseUp($event)"
186
+ type="button"
187
+ >
95
188
  <span class="pi pi-chevron-up"></span>
96
189
  </button>
97
- <span>{{formattedCurrentHour}}</span>
98
- <button class="p-link" :aria-label="$primevue.config.locale.prevHour" @mousedown="onTimePickerElementMouseDown($event, 0, -1)" @mouseup="onTimePickerElementMouseUp($event)" @keydown="onContainerButtonKeydown" v-ripple
99
- @mouseleave="onTimePickerElementMouseLeave()" @keydown.enter="onTimePickerElementMouseDown($event, 0, -1)" @keydown.space="onTimePickerElementMouseDown($event, 0, -1)" @keyup.enter="onTimePickerElementMouseUp($event)" @keyup.space="onTimePickerElementMouseUp($event)" type="button">
190
+ <span>{{ formattedCurrentHour }}</span>
191
+ <button
192
+ v-ripple
193
+ class="p-link"
194
+ :aria-label="$primevue.config.locale.prevHour"
195
+ @mousedown="onTimePickerElementMouseDown($event, 0, -1)"
196
+ @mouseup="onTimePickerElementMouseUp($event)"
197
+ @keydown="onContainerButtonKeydown"
198
+ @mouseleave="onTimePickerElementMouseLeave()"
199
+ @keydown.enter="onTimePickerElementMouseDown($event, 0, -1)"
200
+ @keydown.space="onTimePickerElementMouseDown($event, 0, -1)"
201
+ @keyup.enter="onTimePickerElementMouseUp($event)"
202
+ @keyup.space="onTimePickerElementMouseUp($event)"
203
+ type="button"
204
+ >
100
205
  <span class="pi pi-chevron-down"></span>
101
206
  </button>
102
207
  </div>
103
208
  <div class="p-separator">
104
- <span>{{timeSeparator}}</span>
209
+ <span>{{ timeSeparator }}</span>
105
210
  </div>
106
211
  <div class="p-minute-picker">
107
- <button class="p-link" :aria-label="$primevue.config.locale.nextMinute" @mousedown="onTimePickerElementMouseDown($event, 1, 1)" @mouseup="onTimePickerElementMouseUp($event)" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled"
108
- @mouseleave="onTimePickerElementMouseLeave()" @keydown.enter="onTimePickerElementMouseDown($event, 1, 1)" @keydown.space="onTimePickerElementMouseDown($event, 1, 1)" @keyup.enter="onTimePickerElementMouseUp($event)" @keyup.space="onTimePickerElementMouseUp($event)" type="button">
212
+ <button
213
+ v-ripple
214
+ class="p-link"
215
+ :aria-label="$primevue.config.locale.nextMinute"
216
+ @mousedown="onTimePickerElementMouseDown($event, 1, 1)"
217
+ @mouseup="onTimePickerElementMouseUp($event)"
218
+ @keydown="onContainerButtonKeydown"
219
+ :disabled="disabled"
220
+ @mouseleave="onTimePickerElementMouseLeave()"
221
+ @keydown.enter="onTimePickerElementMouseDown($event, 1, 1)"
222
+ @keydown.space="onTimePickerElementMouseDown($event, 1, 1)"
223
+ @keyup.enter="onTimePickerElementMouseUp($event)"
224
+ @keyup.space="onTimePickerElementMouseUp($event)"
225
+ type="button"
226
+ >
109
227
  <span class="pi pi-chevron-up"></span>
110
228
  </button>
111
- <span>{{formattedCurrentMinute}}</span>
112
- <button class="p-link" :aria-label="$primevue.config.locale.prevMinute" @mousedown="onTimePickerElementMouseDown($event, 1, -1)" @mouseup="onTimePickerElementMouseUp($event)" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled"
113
- @mouseleave="onTimePickerElementMouseLeave()" @keydown.enter="onTimePickerElementMouseDown($event, 1, -1)" @keydown.space="onTimePickerElementMouseDown($event, 1, -1)" @keyup.enter="onTimePickerElementMouseUp($event)" @keyup.space="onTimePickerElementMouseUp($event)" type="button">
229
+ <span>{{ formattedCurrentMinute }}</span>
230
+ <button
231
+ v-ripple
232
+ class="p-link"
233
+ :aria-label="$primevue.config.locale.prevMinute"
234
+ @mousedown="onTimePickerElementMouseDown($event, 1, -1)"
235
+ @mouseup="onTimePickerElementMouseUp($event)"
236
+ @keydown="onContainerButtonKeydown"
237
+ :disabled="disabled"
238
+ @mouseleave="onTimePickerElementMouseLeave()"
239
+ @keydown.enter="onTimePickerElementMouseDown($event, 1, -1)"
240
+ @keydown.space="onTimePickerElementMouseDown($event, 1, -1)"
241
+ @keyup.enter="onTimePickerElementMouseUp($event)"
242
+ @keyup.space="onTimePickerElementMouseUp($event)"
243
+ type="button"
244
+ >
114
245
  <span class="pi pi-chevron-down"></span>
115
246
  </button>
116
247
  </div>
117
- <div class="p-separator" v-if="showSeconds">
118
- <span>{{timeSeparator}}</span>
248
+ <div v-if="showSeconds" class="p-separator">
249
+ <span>{{ timeSeparator }}</span>
119
250
  </div>
120
- <div class="p-second-picker" v-if="showSeconds">
121
- <button class="p-link" :aria-label="$primevue.config.locale.nextSecond" @mousedown="onTimePickerElementMouseDown($event, 2, 1)" @mouseup="onTimePickerElementMouseUp($event)" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled"
122
- @mouseleave="onTimePickerElementMouseLeave()" @keydown.enter="onTimePickerElementMouseDown($event, 2, 1)" @keydown.space="onTimePickerElementMouseDown($event, 2, 1)" @keyup.enter="onTimePickerElementMouseUp($event)" @keyup.space="onTimePickerElementMouseUp($event)" type="button">
251
+ <div v-if="showSeconds" class="p-second-picker">
252
+ <button
253
+ v-ripple
254
+ class="p-link"
255
+ :aria-label="$primevue.config.locale.nextSecond"
256
+ @mousedown="onTimePickerElementMouseDown($event, 2, 1)"
257
+ @mouseup="onTimePickerElementMouseUp($event)"
258
+ @keydown="onContainerButtonKeydown"
259
+ :disabled="disabled"
260
+ @mouseleave="onTimePickerElementMouseLeave()"
261
+ @keydown.enter="onTimePickerElementMouseDown($event, 2, 1)"
262
+ @keydown.space="onTimePickerElementMouseDown($event, 2, 1)"
263
+ @keyup.enter="onTimePickerElementMouseUp($event)"
264
+ @keyup.space="onTimePickerElementMouseUp($event)"
265
+ type="button"
266
+ >
123
267
  <span class="pi pi-chevron-up"></span>
124
268
  </button>
125
- <span>{{formattedCurrentSecond}}</span>
126
- <button class="p-link" :aria-label="$primevue.config.locale.prevSecond" @mousedown="onTimePickerElementMouseDown($event, 2, -1)" @mouseup="onTimePickerElementMouseUp($event)" @keydown="onContainerButtonKeydown" v-ripple :disabled="disabled"
127
- @mouseleave="onTimePickerElementMouseLeave()" @keydown.enter="onTimePickerElementMouseDown($event, 2, -1)" @keydown.space="onTimePickerElementMouseDown($event, 2, -1)" @keyup.enter="onTimePickerElementMouseUp($event)" @keyup.space="onTimePickerElementMouseUp($event)" type="button">
269
+ <span>{{ formattedCurrentSecond }}</span>
270
+ <button
271
+ v-ripple
272
+ class="p-link"
273
+ :aria-label="$primevue.config.locale.prevSecond"
274
+ @mousedown="onTimePickerElementMouseDown($event, 2, -1)"
275
+ @mouseup="onTimePickerElementMouseUp($event)"
276
+ @keydown="onContainerButtonKeydown"
277
+ :disabled="disabled"
278
+ @mouseleave="onTimePickerElementMouseLeave()"
279
+ @keydown.enter="onTimePickerElementMouseDown($event, 2, -1)"
280
+ @keydown.space="onTimePickerElementMouseDown($event, 2, -1)"
281
+ @keyup.enter="onTimePickerElementMouseUp($event)"
282
+ @keyup.space="onTimePickerElementMouseUp($event)"
283
+ type="button"
284
+ >
128
285
  <span class="pi pi-chevron-down"></span>
129
286
  </button>
130
287
  </div>
131
- <div class="p-separator" v-if="hourFormat=='12'">
132
- <span>{{timeSeparator}}</span>
288
+ <div v-if="hourFormat == '12'" class="p-separator">
289
+ <span>{{ timeSeparator }}</span>
133
290
  </div>
134
- <div class="p-ampm-picker" v-if="hourFormat=='12'">
135
- <button class="p-link" :aria-label="$primevue.config.locale.am" @click="toggleAMPM($event)" type="button" v-ripple :disabled="disabled">
291
+ <div v-if="hourFormat == '12'" class="p-ampm-picker">
292
+ <button v-ripple class="p-link" :aria-label="$primevue.config.locale.am" @click="toggleAMPM($event)" type="button" :disabled="disabled">
136
293
  <span class="pi pi-chevron-up"></span>
137
294
  </button>
138
- <span>{{pm ? 'PM' : 'AM'}}</span>
139
- <button class="p-link" :aria-label="$primevue.config.locale.pm" @click="toggleAMPM($event)" type="button" v-ripple :disabled="disabled">
295
+ <span>{{ pm ? $primevue.config.locale.pm : $primevue.config.locale.am }}</span>
296
+ <button v-ripple class="p-link" :aria-label="$primevue.config.locale.pm" @click="toggleAMPM($event)" type="button" :disabled="disabled">
140
297
  <span class="pi pi-chevron-down"></span>
141
298
  </button>
142
299
  </div>
143
300
  </div>
144
- <div class="p-datepicker-buttonbar" v-if="showButtonBar">
145
- <CalendarButton type="button" :label="todayLabel" @click="onTodayButtonClick($event)" class="p-button-text" @keydown="onContainerButtonKeydown"/>
146
- <CalendarButton type="button" :label="clearLabel" @click="onClearButtonClick($event)" class="p-button-text" @keydown="onContainerButtonKeydown"/>
301
+ <div v-if="showButtonBar" class="p-datepicker-buttonbar">
302
+ <CalendarButton type="button" :label="todayLabel" @click="onTodayButtonClick($event)" class="p-button-text" @keydown="onContainerButtonKeydown" />
303
+ <CalendarButton type="button" :label="clearLabel" @click="onClearButtonClick($event)" class="p-button-text" @keydown="onContainerButtonKeydown" />
147
304
  </div>
148
305
  <slot name="footer"></slot>
149
306
  </div>
@@ -153,11 +310,11 @@
153
310
  </template>
154
311
 
155
312
  <script>
156
- import {ConnectedOverlayScrollHandler,DomHandler,ZIndexUtils,UniqueComponentId} from 'primevue/utils';
157
- import OverlayEventBus from 'primevue/overlayeventbus';
158
313
  import Button from 'primevue/button';
159
- import Ripple from 'primevue/ripple';
314
+ import OverlayEventBus from 'primevue/overlayeventbus';
160
315
  import Portal from 'primevue/portal';
316
+ import Ripple from 'primevue/ripple';
317
+ import { ConnectedOverlayScrollHandler, DomHandler, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
161
318
 
162
319
  export default {
163
320
  name: 'Calendar',
@@ -321,17 +478,41 @@ export default {
321
478
  type: String,
322
479
  default: null
323
480
  },
324
- id: null,
325
- inputId: null,
326
- inputClass: null,
327
- inputStyle: null,
328
- inputProps: null,
329
- panelClass: null,
330
- panelStyle: null,
331
- panelProps: null,
481
+ id: {
482
+ type: String,
483
+ default: null
484
+ },
485
+ inputId: {
486
+ type: String,
487
+ default: null
488
+ },
489
+ inputClass: {
490
+ type: String,
491
+ default: null
492
+ },
493
+ inputStyle: {
494
+ type: null,
495
+ default: null
496
+ },
497
+ inputProps: {
498
+ type: null,
499
+ default: null
500
+ },
501
+ panelClass: {
502
+ type: String,
503
+ default: null
504
+ },
505
+ panelStyle: {
506
+ type: null,
507
+ default: null
508
+ },
509
+ panelProps: {
510
+ type: null,
511
+ default: null
512
+ },
332
513
  'aria-labelledby': {
333
514
  type: String,
334
- default: null
515
+ default: null
335
516
  },
336
517
  'aria-label': {
337
518
  type: String,
@@ -350,6 +531,55 @@ export default {
350
531
  timePickerTimer: null,
351
532
  preventFocus: false,
352
533
  typeUpdate: false,
534
+ data() {
535
+ return {
536
+ currentMonth: null,
537
+ currentYear: null,
538
+ currentHour: null,
539
+ currentMinute: null,
540
+ currentSecond: null,
541
+ pm: null,
542
+ focused: false,
543
+ overlayVisible: false,
544
+ currentView: this.view
545
+ };
546
+ },
547
+ watch: {
548
+ modelValue(newValue) {
549
+ this.updateCurrentMetaData();
550
+
551
+ if (!this.typeUpdate && !this.inline && this.input) {
552
+ this.input.value = this.formatValue(newValue);
553
+ }
554
+
555
+ this.typeUpdate = false;
556
+ },
557
+ showTime() {
558
+ this.updateCurrentMetaData();
559
+ },
560
+ months() {
561
+ if (this.overlay) {
562
+ if (!this.focused) {
563
+ if (this.inline) {
564
+ this.preventFocus = true;
565
+ }
566
+
567
+ setTimeout(this.updateFocus, 0);
568
+ }
569
+ }
570
+ },
571
+ numberOfMonths() {
572
+ this.destroyResponsiveStyleElement();
573
+ this.createResponsiveStyle();
574
+ },
575
+ responsiveOptions() {
576
+ this.destroyResponsiveStyleElement();
577
+ this.createResponsiveStyle();
578
+ },
579
+ currentView() {
580
+ Promise.resolve(null).then(() => this.alignOverlay());
581
+ }
582
+ },
353
583
  created() {
354
584
  this.updateCurrentMetaData();
355
585
  },
@@ -367,8 +597,7 @@ export default {
367
597
  this.overlay.style.width = DomHandler.getOuterWidth(this.$el) + 'px';
368
598
  }
369
599
  }
370
- }
371
- else {
600
+ } else {
372
601
  this.input.value = this.formatValue(this.modelValue);
373
602
  }
374
603
  },
@@ -393,6 +622,7 @@ export default {
393
622
  if (this.mask) {
394
623
  this.destroyMask();
395
624
  }
625
+
396
626
  this.destroyResponsiveStyleElement();
397
627
 
398
628
  this.unbindOutsideClickListener();
@@ -406,51 +636,9 @@ export default {
406
636
  if (this.overlay && this.autoZIndex) {
407
637
  ZIndexUtils.clear(this.overlay);
408
638
  }
639
+
409
640
  this.overlay = null;
410
641
  },
411
- data() {
412
- return {
413
- currentMonth: null,
414
- currentYear: null,
415
- currentHour: null,
416
- currentMinute: null,
417
- currentSecond: null,
418
- pm: null,
419
- focused: false,
420
- overlayVisible: false,
421
- currentView: this.view
422
- }
423
- },
424
- watch: {
425
- modelValue(newValue) {
426
- this.updateCurrentMetaData();
427
- if (!this.typeUpdate && !this.inline && this.input) {
428
- this.input.value = this.formatValue(newValue);
429
- }
430
- this.typeUpdate = false;
431
- },
432
- showTime() {
433
- this.updateCurrentMetaData();
434
- },
435
- months() {
436
- if (this.overlay) {
437
- if (!this.focused) {
438
- setTimeout(this.updateFocus, 0);
439
- }
440
- }
441
- },
442
- numberOfMonths() {
443
- this.destroyResponsiveStyleElement();
444
- this.createResponsiveStyle();
445
- },
446
- responsiveOptions() {
447
- this.destroyResponsiveStyleElement();
448
- this.createResponsiveStyle();
449
- },
450
- currentView() {
451
- Promise.resolve(null).then(() => this.alignOverlay());
452
- }
453
- },
454
642
  methods: {
455
643
  isComparable() {
456
644
  return this.modelValue != null && typeof this.modelValue !== 'string';
@@ -463,25 +651,23 @@ export default {
463
651
  if (this.modelValue) {
464
652
  if (this.isSingleSelection()) {
465
653
  return this.isDateEquals(this.modelValue, dateMeta);
466
- }
467
- else if (this.isMultipleSelection()) {
654
+ } else if (this.isMultipleSelection()) {
468
655
  let selected = false;
656
+
469
657
  for (let date of this.modelValue) {
470
658
  selected = this.isDateEquals(date, dateMeta);
659
+
471
660
  if (selected) {
472
661
  break;
473
662
  }
474
663
  }
475
664
 
476
665
  return selected;
477
- }
478
- else if (this.isRangeSelection()) {
479
- if (this.modelValue[1])
480
- return this.isDateEquals(this.modelValue[0], dateMeta) || this.isDateEquals(this.modelValue[1], dateMeta) || this.isDateBetween(this.modelValue[0], this.modelValue[1], dateMeta);
666
+ } else if (this.isRangeSelection()) {
667
+ if (this.modelValue[1]) return this.isDateEquals(this.modelValue[0], dateMeta) || this.isDateEquals(this.modelValue[1], dateMeta) || this.isDateBetween(this.modelValue[0], this.modelValue[1], dateMeta);
481
668
  else {
482
669
  return this.isDateEquals(this.modelValue[0], dateMeta);
483
670
  }
484
-
485
671
  }
486
672
  }
487
673
 
@@ -491,7 +677,7 @@ export default {
491
677
  if (this.isComparable()) {
492
678
  let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
493
679
 
494
- return !this.isMultipleSelection() ? (value.getMonth() === month && value.getFullYear() === this.currentYear) : false;
680
+ return !this.isMultipleSelection() ? value.getMonth() === month && value.getFullYear() === this.currentYear : false;
495
681
  }
496
682
 
497
683
  return false;
@@ -500,21 +686,21 @@ export default {
500
686
  if (this.isComparable()) {
501
687
  let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
502
688
 
503
- return !this.isMultipleSelection() && this.isComparable() ? (value.getFullYear() === year) : false;
689
+ return !this.isMultipleSelection() && this.isComparable() ? value.getFullYear() === year : false;
504
690
  }
505
691
 
506
692
  return false;
507
693
  },
508
694
  isDateEquals(value, dateMeta) {
509
- if (value)
510
- return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;
511
- else
512
- return false;
695
+ if (value) return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;
696
+ else return false;
513
697
  },
514
698
  isDateBetween(start, end, dateMeta) {
515
699
  let between = false;
700
+
516
701
  if (start && end) {
517
702
  let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
703
+
518
704
  return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();
519
705
  }
520
706
 
@@ -522,11 +708,13 @@ export default {
522
708
  },
523
709
  getFirstDayOfMonthIndex(month, year) {
524
710
  let day = new Date();
711
+
525
712
  day.setDate(1);
526
713
  day.setMonth(month);
527
714
  day.setFullYear(year);
528
715
 
529
716
  let dayIndex = day.getDay() + this.sundayIndex;
717
+
530
718
  return dayIndex >= 7 ? dayIndex - 7 : dayIndex;
531
719
  },
532
720
  getDaysCountInMonth(month, year) {
@@ -534,6 +722,7 @@ export default {
534
722
  },
535
723
  getDaysCountInPrevMonth(month, year) {
536
724
  let prev = this.getPreviousMonthAndYear(month, year);
725
+
537
726
  return this.getDaysCountInMonth(prev.month, prev.year);
538
727
  },
539
728
  getPreviousMonthAndYear(month, year) {
@@ -542,13 +731,12 @@ export default {
542
731
  if (month === 0) {
543
732
  m = 11;
544
733
  y = year - 1;
545
- }
546
- else {
734
+ } else {
547
735
  m = month - 1;
548
736
  y = year;
549
737
  }
550
738
 
551
- return {'month':m, 'year': y};
739
+ return { month: m, year: y };
552
740
  },
553
741
  getNextMonthAndYear(month, year) {
554
742
  let m, y;
@@ -556,13 +744,12 @@ export default {
556
744
  if (month === 11) {
557
745
  m = 0;
558
746
  y = year + 1;
559
- }
560
- else {
747
+ } else {
561
748
  m = month + 1;
562
749
  y = year;
563
750
  }
564
751
 
565
- return {'month':m,'year':y};
752
+ return { month: m, year: y };
566
753
  },
567
754
  daylightSavingAdjust(date) {
568
755
  if (!date) {
@@ -589,12 +776,10 @@ export default {
589
776
  if (this.minDate) {
590
777
  if (this.minDate.getFullYear() > year) {
591
778
  validMin = false;
592
- }
593
- else if (this.minDate.getFullYear() === year) {
779
+ } else if (this.minDate.getFullYear() === year) {
594
780
  if (this.minDate.getMonth() > month) {
595
781
  validMin = false;
596
- }
597
- else if (this.minDate.getMonth() === month) {
782
+ } else if (this.minDate.getMonth() === month) {
598
783
  if (this.minDate.getDate() > day) {
599
784
  validMin = false;
600
785
  }
@@ -605,12 +790,10 @@ export default {
605
790
  if (this.maxDate) {
606
791
  if (this.maxDate.getFullYear() < year) {
607
792
  validMax = false;
608
- }
609
- else if (this.maxDate.getFullYear() === year) {
793
+ } else if (this.maxDate.getFullYear() === year) {
610
794
  if (this.maxDate.getMonth() < month) {
611
795
  validMax = false;
612
- }
613
- else if (this.maxDate.getMonth() === month) {
796
+ } else if (this.maxDate.getMonth() === month) {
614
797
  if (this.maxDate.getDate() < day) {
615
798
  validMax = false;
616
799
  }
@@ -619,11 +802,11 @@ export default {
619
802
  }
620
803
 
621
804
  if (this.disabledDates) {
622
- validDate = !this.isDateDisabled(day,month,year);
805
+ validDate = !this.isDateDisabled(day, month, year);
623
806
  }
624
807
 
625
808
  if (this.disabledDays) {
626
- validDay = !this.isDayDisabled(day,month,year)
809
+ validDay = !this.isDayDisabled(day, month, year);
627
810
  }
628
811
 
629
812
  return validMin && validMax && validDate && validDay;
@@ -632,10 +815,8 @@ export default {
632
815
  el.setAttribute(this.attributeSelector, '');
633
816
 
634
817
  if (this.autoZIndex) {
635
- if (this.touchUI)
636
- ZIndexUtils.set('modal', el, this.baseZIndex || this.$primevue.config.zIndex.modal);
637
- else
638
- ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
818
+ if (this.touchUI) ZIndexUtils.set('modal', el, this.baseZIndex || this.$primevue.config.zIndex.modal);
819
+ else ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
639
820
  }
640
821
 
641
822
  this.alignOverlay();
@@ -665,14 +846,14 @@ export default {
665
846
  this.overlay = null;
666
847
  },
667
848
  onPrevButtonClick(event) {
668
- if(this.showOtherMonths) {
669
- this.navigationState = {backward: true, button: true};
849
+ if (this.showOtherMonths) {
850
+ this.navigationState = { backward: true, button: true };
670
851
  this.navBackward(event);
671
852
  }
672
853
  },
673
854
  onNextButtonClick(event) {
674
- if(this.showOtherMonths) {
675
- this.navigationState = {backward: false, button: true};
855
+ if (this.showOtherMonths) {
856
+ this.navigationState = { backward: false, button: true };
676
857
  this.navForward(event);
677
858
  }
678
859
  },
@@ -685,24 +866,20 @@ export default {
685
866
 
686
867
  if (this.currentView === 'month') {
687
868
  this.decrementYear();
688
- }
689
- else if (this.currentView === 'year') {
869
+ } else if (this.currentView === 'year') {
690
870
  this.decrementDecade();
691
- }
692
- else {
871
+ } else {
693
872
  if (event.shiftKey) {
694
873
  this.decrementYear();
695
- }
696
- else {
874
+ } else {
697
875
  if (this.currentMonth === 0) {
698
876
  this.currentMonth = 11;
699
877
  this.decrementYear();
700
- }
701
- else {
878
+ } else {
702
879
  this.currentMonth--;
703
880
  }
704
881
 
705
- this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
882
+ this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
706
883
  }
707
884
  }
708
885
  },
@@ -715,24 +892,20 @@ export default {
715
892
 
716
893
  if (this.currentView === 'month') {
717
894
  this.incrementYear();
718
- }
719
- else if (this.currentView === 'year') {
895
+ } else if (this.currentView === 'year') {
720
896
  this.incrementDecade();
721
- }
722
- else {
897
+ } else {
723
898
  if (event.shiftKey) {
724
899
  this.incrementYear();
725
- }
726
- else {
900
+ } else {
727
901
  if (this.currentMonth === 11) {
728
902
  this.currentMonth = 0;
729
903
  this.incrementYear();
730
- }
731
- else {
904
+ } else {
732
905
  this.currentMonth++;
733
906
  }
734
907
 
735
- this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
908
+ this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
736
909
  }
737
910
  }
738
911
  },
@@ -767,10 +940,8 @@ export default {
767
940
  if (this.hourFormat === '12') {
768
941
  this.pm = currentHour > 11;
769
942
 
770
- if (currentHour >= 12)
771
- currentHour = (currentHour == 12) ? 12 : currentHour - 12;
772
- else
773
- currentHour = (currentHour == 0) ? 12 : currentHour;
943
+ if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
944
+ else currentHour = currentHour == 0 ? 12 : currentHour;
774
945
  }
775
946
 
776
947
  this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
@@ -784,6 +955,7 @@ export default {
784
955
  this.overlayVisible = false;
785
956
  }
786
957
  };
958
+
787
959
  document.addEventListener('mousedown', this.outsideClickListener);
788
960
  }
789
961
  },
@@ -816,6 +988,7 @@ export default {
816
988
  this.overlayVisible = false;
817
989
  }
818
990
  };
991
+
819
992
  window.addEventListener('resize', this.resizeListener);
820
993
  }
821
994
  },
@@ -826,27 +999,27 @@ export default {
826
999
  }
827
1000
  },
828
1001
  isOutsideClicked(event) {
829
- return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) ||
830
- this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
1002
+ return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) || this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
831
1003
  },
832
1004
  isNavIconClicked(event) {
833
- return (DomHandler.hasClass(event.target, 'p-datepicker-prev') || DomHandler.hasClass(event.target, 'p-datepicker-prev-icon')
834
- || DomHandler.hasClass(event.target, 'p-datepicker-next') || DomHandler.hasClass(event.target, 'p-datepicker-next-icon'));
1005
+ return (
1006
+ DomHandler.hasClass(event.target, 'p-datepicker-prev') ||
1007
+ DomHandler.hasClass(event.target, 'p-datepicker-prev-icon') ||
1008
+ DomHandler.hasClass(event.target, 'p-datepicker-next') ||
1009
+ DomHandler.hasClass(event.target, 'p-datepicker-next-icon')
1010
+ );
835
1011
  },
836
1012
  alignOverlay() {
837
1013
  if (this.touchUI) {
838
1014
  this.enableModality();
839
- }
840
- else if (this.overlay) {
1015
+ } else if (this.overlay) {
841
1016
  if (this.appendTo === 'self' || this.inline) {
842
1017
  DomHandler.relativePosition(this.overlay, this.$el);
843
- }
844
- else {
1018
+ } else {
845
1019
  if (this.view === 'date') {
846
1020
  this.overlay.style.width = DomHandler.getOuterWidth(this.overlay) + 'px';
847
1021
  this.overlay.style.minWidth = DomHandler.getOuterWidth(this.$el) + 'px';
848
- }
849
- else {
1022
+ } else {
850
1023
  this.overlay.style.width = DomHandler.getOuterWidth(this.$el) + 'px';
851
1024
  }
852
1025
 
@@ -859,8 +1032,7 @@ export default {
859
1032
  if (!this.overlayVisible) {
860
1033
  this.input.focus();
861
1034
  this.overlayVisible = true;
862
- }
863
- else {
1035
+ } else {
864
1036
  this.overlayVisible = false;
865
1037
  }
866
1038
  }
@@ -880,41 +1052,42 @@ export default {
880
1052
  if (this.disabledDays) {
881
1053
  let weekday = new Date(year, month, day);
882
1054
  let weekdayNumber = weekday.getDay();
1055
+
883
1056
  return this.disabledDays.indexOf(weekdayNumber) !== -1;
884
1057
  }
1058
+
885
1059
  return false;
886
1060
  },
887
1061
  onMonthDropdownChange(value) {
888
1062
  this.currentMonth = parseInt(value);
889
- this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
1063
+ this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
890
1064
  },
891
1065
  onYearDropdownChange(value) {
892
1066
  this.currentYear = parseInt(value);
893
- this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
1067
+ this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
894
1068
  },
895
1069
  onDateSelect(event, dateMeta) {
896
1070
  if (this.disabled || !dateMeta.selectable) {
897
1071
  return;
898
1072
  }
899
1073
 
900
- DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach(cell => cell.tabIndex = -1);
1074
+ DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach((cell) => (cell.tabIndex = -1));
901
1075
 
902
1076
  if (event) {
903
1077
  event.currentTarget.focus();
904
1078
  }
905
1079
 
906
1080
  if (this.isMultipleSelection() && this.isSelected(dateMeta)) {
907
- let newValue = this.modelValue.filter(date => !this.isDateEquals(date, dateMeta));
1081
+ let newValue = this.modelValue.filter((date) => !this.isDateEquals(date, dateMeta));
1082
+
908
1083
  this.updateModel(newValue);
909
- }
910
- else {
1084
+ } else {
911
1085
  if (this.shouldSelectDate(dateMeta)) {
912
1086
  if (dateMeta.otherMonth) {
913
1087
  this.currentMonth = dateMeta.month;
914
1088
  this.currentYear = dateMeta.year;
915
1089
  this.selectDate(dateMeta);
916
- }
917
- else {
1090
+ } else {
918
1091
  this.selectDate(dateMeta);
919
1092
  }
920
1093
  }
@@ -931,10 +1104,8 @@ export default {
931
1104
  let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
932
1105
 
933
1106
  if (this.showTime) {
934
- if (this.hourFormat === '12' && this.pm && this.currentHour != 12)
935
- date.setHours(this.currentHour + 12);
936
- else
937
- date.setHours(this.currentHour);
1107
+ if (this.hourFormat === '12' && this.pm && this.currentHour != 12) date.setHours(this.currentHour + 12);
1108
+ else date.setHours(this.currentHour);
938
1109
 
939
1110
  date.setMinutes(this.currentMinute);
940
1111
  date.setSeconds(this.currentSecond);
@@ -958,25 +1129,22 @@ export default {
958
1129
 
959
1130
  if (this.isSingleSelection()) {
960
1131
  modelVal = date;
961
- }
962
- else if (this.isMultipleSelection()) {
1132
+ } else if (this.isMultipleSelection()) {
963
1133
  modelVal = this.modelValue ? [...this.modelValue, date] : [date];
964
- }
965
- else if (this.isRangeSelection()) {
1134
+ } else if (this.isRangeSelection()) {
966
1135
  if (this.modelValue && this.modelValue.length) {
967
1136
  let startDate = this.modelValue[0];
968
1137
  let endDate = this.modelValue[1];
969
1138
 
970
1139
  if (!endDate && date.getTime() >= startDate.getTime()) {
971
1140
  endDate = date;
972
- }
973
- else {
1141
+ } else {
974
1142
  startDate = date;
975
1143
  endDate = null;
976
1144
  }
1145
+
977
1146
  modelVal = [startDate, endDate];
978
- }
979
- else {
1147
+ } else {
980
1148
  modelVal = [date, null];
981
1149
  }
982
1150
  }
@@ -990,16 +1158,15 @@ export default {
990
1158
  this.overlayVisible = false;
991
1159
  }, 150);
992
1160
  }
1161
+
993
1162
  this.$emit('date-select', date);
994
1163
  },
995
1164
  updateModel(value) {
996
1165
  this.$emit('update:modelValue', value);
997
1166
  },
998
1167
  shouldSelectDate() {
999
- if (this.isMultipleSelection())
1000
- return this.maxDateCount != null ? this.maxDateCount > (this.modelValue ? this.modelValue.length : 0) : true;
1001
- else
1002
- return true;
1168
+ if (this.isMultipleSelection()) return this.maxDateCount != null ? this.maxDateCount > (this.modelValue ? this.modelValue.length : 0) : true;
1169
+ else return true;
1003
1170
  },
1004
1171
  isSingleSelection() {
1005
1172
  return this.selectionMode === 'single';
@@ -1016,33 +1183,34 @@ export default {
1016
1183
  }
1017
1184
 
1018
1185
  let formattedValue = '';
1186
+
1019
1187
  if (value) {
1020
1188
  try {
1021
1189
  if (this.isSingleSelection()) {
1022
1190
  formattedValue = this.formatDateTime(value);
1023
- }
1024
- else if (this.isMultipleSelection()) {
1025
- for(let i = 0; i < value.length; i++) {
1191
+ } else if (this.isMultipleSelection()) {
1192
+ for (let i = 0; i < value.length; i++) {
1026
1193
  let dateAsString = this.formatDateTime(value[i]);
1194
+
1027
1195
  formattedValue += dateAsString;
1028
- if(i !== (value.length - 1)) {
1196
+
1197
+ if (i !== value.length - 1) {
1029
1198
  formattedValue += ', ';
1030
1199
  }
1031
1200
  }
1032
- }
1033
- else if (this.isRangeSelection()) {
1201
+ } else if (this.isRangeSelection()) {
1034
1202
  if (value && value.length) {
1035
1203
  let startDate = value[0];
1036
1204
  let endDate = value[1];
1037
1205
 
1038
1206
  formattedValue = this.formatDateTime(startDate);
1207
+
1039
1208
  if (endDate) {
1040
1209
  formattedValue += ' - ' + this.formatDateTime(endDate);
1041
1210
  }
1042
1211
  }
1043
1212
  }
1044
- }
1045
- catch(err) {
1213
+ } catch (err) {
1046
1214
  formattedValue = value;
1047
1215
  }
1048
1216
  }
@@ -1051,13 +1219,14 @@ export default {
1051
1219
  },
1052
1220
  formatDateTime(date) {
1053
1221
  let formattedValue = null;
1222
+
1054
1223
  if (date) {
1055
- if(this.timeOnly) {
1224
+ if (this.timeOnly) {
1056
1225
  formattedValue = this.formatTime(date);
1057
- }
1058
- else {
1226
+ } else {
1059
1227
  formattedValue = this.formatDate(date, this.datePattern);
1060
- if(this.showTime) {
1228
+
1229
+ if (this.showTime) {
1061
1230
  formattedValue += ' ' + this.formatTime(date);
1062
1231
  }
1063
1232
  }
@@ -1071,32 +1240,38 @@ export default {
1071
1240
  }
1072
1241
 
1073
1242
  let iFormat;
1243
+
1074
1244
  const lookAhead = (match) => {
1075
- const matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
1076
- if (matches) {
1077
- iFormat++;
1078
- }
1079
- return matches;
1080
- },
1245
+ const matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
1246
+
1247
+ if (matches) {
1248
+ iFormat++;
1249
+ }
1250
+
1251
+ return matches;
1252
+ },
1081
1253
  formatNumber = (match, value, len) => {
1082
1254
  let num = '' + value;
1255
+
1083
1256
  if (lookAhead(match)) {
1084
1257
  while (num.length < len) {
1085
1258
  num = '0' + num;
1086
1259
  }
1087
1260
  }
1261
+
1088
1262
  return num;
1089
1263
  },
1090
1264
  formatName = (match, value, shortNames, longNames) => {
1091
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
1265
+ return lookAhead(match) ? longNames[value] : shortNames[value];
1092
1266
  };
1267
+
1093
1268
  let output = '';
1094
1269
  let literal = false;
1095
1270
 
1096
1271
  if (date) {
1097
1272
  for (iFormat = 0; iFormat < format.length; iFormat++) {
1098
1273
  if (literal) {
1099
- if (format.charAt(iFormat) === '\'' && !lookAhead('\'')) {
1274
+ if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
1100
1275
  literal = false;
1101
1276
  } else {
1102
1277
  output += format.charAt(iFormat);
@@ -1110,16 +1285,13 @@ export default {
1110
1285
  output += formatName('D', date.getDay(), this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
1111
1286
  break;
1112
1287
  case 'o':
1113
- output += formatNumber('o',
1114
- Math.round((
1115
- new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() -
1116
- new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
1288
+ output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
1117
1289
  break;
1118
1290
  case 'm':
1119
1291
  output += formatNumber('m', date.getMonth() + 1, 2);
1120
1292
  break;
1121
1293
  case 'M':
1122
- output += formatName('M',date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
1294
+ output += formatName('M', date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
1123
1295
  break;
1124
1296
  case 'y':
1125
1297
  output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + (date.getFullYear() % 100);
@@ -1130,12 +1302,13 @@ export default {
1130
1302
  case '!':
1131
1303
  output += date.getTime() * 10000 + this.ticksTo1970;
1132
1304
  break;
1133
- case '\'':
1134
- if (lookAhead('\'')) {
1135
- output += '\'';
1305
+ case "'":
1306
+ if (lookAhead("'")) {
1307
+ output += "'";
1136
1308
  } else {
1137
1309
  literal = true;
1138
1310
  }
1311
+
1139
1312
  break;
1140
1313
  default:
1141
1314
  output += format.charAt(iFormat);
@@ -1143,6 +1316,7 @@ export default {
1143
1316
  }
1144
1317
  }
1145
1318
  }
1319
+
1146
1320
  return output;
1147
1321
  },
1148
1322
  formatTime(date) {
@@ -1160,21 +1334,21 @@ export default {
1160
1334
  }
1161
1335
 
1162
1336
  if (this.hourFormat === '12') {
1163
- output += hours === 0 ? 12 : (hours < 10) ? '0' + hours : hours;
1164
- }
1165
- else {
1166
- output += (hours < 10) ? '0' + hours : hours;
1337
+ output += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;
1338
+ } else {
1339
+ output += hours < 10 ? '0' + hours : hours;
1167
1340
  }
1341
+
1168
1342
  output += ':';
1169
- output += (minutes < 10) ? '0' + minutes : minutes;
1343
+ output += minutes < 10 ? '0' + minutes : minutes;
1170
1344
 
1171
1345
  if (this.showSeconds) {
1172
1346
  output += ':';
1173
- output += (seconds < 10) ? '0' + seconds : seconds;
1347
+ output += seconds < 10 ? '0' + seconds : seconds;
1174
1348
  }
1175
1349
 
1176
1350
  if (this.hourFormat === '12') {
1177
- output += date.getHours() > 11 ? ' PM' : ' AM';
1351
+ output += date.getHours() > 11 ? ` ${this.$primevue.config.locale.pm}` : ` ${this.$primevue.config.locale.am}`;
1178
1352
  }
1179
1353
 
1180
1354
  return output;
@@ -1217,44 +1391,39 @@ export default {
1217
1391
  this.clearTimePickerTimer();
1218
1392
  },
1219
1393
  repeat(event, interval, type, direction) {
1220
- let i = interval||500;
1394
+ let i = interval || 500;
1221
1395
 
1222
1396
  this.clearTimePickerTimer();
1223
1397
  this.timePickerTimer = setTimeout(() => {
1224
1398
  this.repeat(event, 100, type, direction);
1225
1399
  }, i);
1226
1400
 
1227
- switch(type) {
1401
+ switch (type) {
1228
1402
  case 0:
1229
- if (direction === 1)
1230
- this.incrementHour(event);
1231
- else
1232
- this.decrementHour(event);
1233
- break;
1403
+ if (direction === 1) this.incrementHour(event);
1404
+ else this.decrementHour(event);
1405
+ break;
1234
1406
 
1235
1407
  case 1:
1236
- if (direction === 1)
1237
- this.incrementMinute(event);
1238
- else
1239
- this.decrementMinute(event);
1240
- break;
1408
+ if (direction === 1) this.incrementMinute(event);
1409
+ else this.decrementMinute(event);
1410
+ break;
1241
1411
 
1242
1412
  case 2:
1243
- if (direction === 1)
1244
- this.incrementSecond(event);
1245
- else
1246
- this.decrementSecond(event);
1247
- break;
1413
+ if (direction === 1) this.incrementSecond(event);
1414
+ else this.decrementSecond(event);
1415
+ break;
1248
1416
  }
1249
1417
  },
1250
1418
  convertTo24Hour(hours, pm) {
1251
1419
  if (this.hourFormat == '12') {
1252
1420
  if (hours === 12) {
1253
- return (pm ? 12 : 0);
1421
+ return pm ? 12 : 0;
1254
1422
  } else {
1255
- return (pm ? hours + 12 : hours);
1423
+ return pm ? hours + 12 : hours;
1256
1424
  }
1257
1425
  }
1426
+
1258
1427
  return hours;
1259
1428
  },
1260
1429
  validateTime(hour, minute, second, pm) {
@@ -1264,18 +1433,23 @@ export default {
1264
1433
  if (this.isRangeSelection()) {
1265
1434
  value = this.modelValue[1] || this.modelValue[0];
1266
1435
  }
1436
+
1267
1437
  if (this.isMultipleSelection()) {
1268
1438
  value = this.modelValue[this.modelValue.length - 1];
1269
1439
  }
1440
+
1270
1441
  const valueDateString = value ? value.toDateString() : null;
1442
+
1271
1443
  if (this.minDate && valueDateString && this.minDate.toDateString() === valueDateString) {
1272
1444
  if (this.minDate.getHours() > convertedHour) {
1273
1445
  return false;
1274
1446
  }
1447
+
1275
1448
  if (this.minDate.getHours() === convertedHour) {
1276
1449
  if (this.minDate.getMinutes() > minute) {
1277
1450
  return false;
1278
1451
  }
1452
+
1279
1453
  if (this.minDate.getMinutes() === minute) {
1280
1454
  if (this.minDate.getSeconds() > second) {
1281
1455
  return false;
@@ -1288,10 +1462,12 @@ export default {
1288
1462
  if (this.maxDate.getHours() < convertedHour) {
1289
1463
  return false;
1290
1464
  }
1465
+
1291
1466
  if (this.maxDate.getHours() === convertedHour) {
1292
1467
  if (this.maxDate.getMinutes() < minute) {
1293
1468
  return false;
1294
1469
  }
1470
+
1295
1471
  if (this.maxDate.getMinutes() === minute) {
1296
1472
  if (this.maxDate.getSeconds() < second) {
1297
1473
  return false;
@@ -1299,6 +1475,7 @@ export default {
1299
1475
  }
1300
1476
  }
1301
1477
  }
1478
+
1302
1479
  return true;
1303
1480
  },
1304
1481
  incrementHour(event) {
@@ -1306,51 +1483,58 @@ export default {
1306
1483
  let newHour = this.currentHour + this.stepHour;
1307
1484
  let newPM = this.pm;
1308
1485
 
1309
- if (this.hourFormat == '24')
1310
- newHour = (newHour >= 24) ? (newHour - 24) : newHour;
1486
+ if (this.hourFormat == '24') newHour = newHour >= 24 ? newHour - 24 : newHour;
1311
1487
  else if (this.hourFormat == '12') {
1312
1488
  // Before the AM/PM break, now after
1313
1489
  if (prevHour < 12 && newHour > 11) {
1314
- newPM= !this.pm;
1490
+ newPM = !this.pm;
1315
1491
  }
1316
- newHour = (newHour >= 13) ? (newHour - 12) : newHour;
1492
+
1493
+ newHour = newHour >= 13 ? newHour - 12 : newHour;
1317
1494
  }
1318
1495
 
1319
1496
  if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
1320
1497
  this.currentHour = newHour;
1321
1498
  this.pm = newPM;
1322
1499
  }
1500
+
1323
1501
  event.preventDefault();
1324
1502
  },
1325
1503
  decrementHour(event) {
1326
1504
  let newHour = this.currentHour - this.stepHour;
1327
1505
  let newPM = this.pm;
1328
1506
 
1329
- if (this.hourFormat == '24')
1330
- newHour = (newHour < 0) ? (24 + newHour) : newHour;
1507
+ if (this.hourFormat == '24') newHour = newHour < 0 ? 24 + newHour : newHour;
1331
1508
  else if (this.hourFormat == '12') {
1332
1509
  // If we were at noon/midnight, then switch
1333
1510
  if (this.currentHour === 12) {
1334
1511
  newPM = !this.pm;
1335
1512
  }
1336
- newHour = (newHour <= 0) ? (12 + newHour) : newHour;
1513
+
1514
+ newHour = newHour <= 0 ? 12 + newHour : newHour;
1337
1515
  }
1516
+
1338
1517
  if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
1339
1518
  this.currentHour = newHour;
1340
1519
  this.pm = newPM;
1341
1520
  }
1521
+
1342
1522
  event.preventDefault();
1343
1523
  },
1344
1524
  incrementMinute(event) {
1345
1525
  let newMinute = this.currentMinute + this.stepMinute;
1526
+
1346
1527
  if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
1347
- this.currentMinute = (newMinute > 59) ? newMinute - 60 : newMinute;
1528
+ this.currentMinute = newMinute > 59 ? newMinute - 60 : newMinute;
1348
1529
  }
1530
+
1349
1531
  event.preventDefault();
1350
1532
  },
1351
1533
  decrementMinute(event) {
1352
1534
  let newMinute = this.currentMinute - this.stepMinute;
1353
- newMinute = (newMinute < 0) ? 60 + newMinute : newMinute;
1535
+
1536
+ newMinute = newMinute < 0 ? 60 + newMinute : newMinute;
1537
+
1354
1538
  if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
1355
1539
  this.currentMinute = newMinute;
1356
1540
  }
@@ -1359,15 +1543,18 @@ export default {
1359
1543
  },
1360
1544
  incrementSecond(event) {
1361
1545
  let newSecond = this.currentSecond + this.stepSecond;
1546
+
1362
1547
  if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
1363
- this.currentSecond = (newSecond > 59) ? newSecond - 60 : newSecond;
1548
+ this.currentSecond = newSecond > 59 ? newSecond - 60 : newSecond;
1364
1549
  }
1365
1550
 
1366
1551
  event.preventDefault();
1367
1552
  },
1368
1553
  decrementSecond(event) {
1369
1554
  let newSecond = this.currentSecond - this.stepSecond;
1370
- newSecond = (newSecond < 0) ? 60 + newSecond : newSecond;
1555
+
1556
+ newSecond = newSecond < 0 ? 60 + newSecond : newSecond;
1557
+
1371
1558
  if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
1372
1559
  this.currentSecond = newSecond;
1373
1560
  }
@@ -1381,18 +1568,17 @@ export default {
1381
1568
  if (this.isRangeSelection()) {
1382
1569
  value = this.modelValue[1] || this.modelValue[0];
1383
1570
  }
1571
+
1384
1572
  if (this.isMultipleSelection()) {
1385
1573
  value = this.modelValue[this.modelValue.length - 1];
1386
1574
  }
1575
+
1387
1576
  value = value ? new Date(value.getTime()) : new Date();
1388
1577
 
1389
1578
  if (this.hourFormat == '12') {
1390
- if (this.currentHour === 12)
1391
- value.setHours(this.pm ? 12 : 0);
1392
- else
1393
- value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
1394
- }
1395
- else {
1579
+ if (this.currentHour === 12) value.setHours(this.pm ? 12 : 0);
1580
+ else value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
1581
+ } else {
1396
1582
  value.setHours(this.currentHour);
1397
1583
  }
1398
1584
 
@@ -1400,19 +1586,17 @@ export default {
1400
1586
  value.setSeconds(this.currentSecond);
1401
1587
 
1402
1588
  if (this.isRangeSelection()) {
1403
- if (this.modelValue[1])
1404
- value = [this.modelValue[0], value];
1405
- else
1406
- value = [value, null];
1589
+ if (this.modelValue[1]) value = [this.modelValue[0], value];
1590
+ else value = [value, null];
1407
1591
  }
1408
1592
 
1409
- if (this.isMultipleSelection()){
1593
+ if (this.isMultipleSelection()) {
1410
1594
  value = [...this.modelValue.slice(0, -1), value];
1411
1595
  }
1412
1596
 
1413
1597
  this.updateModel(value);
1414
1598
  this.$emit('date-select', value);
1415
- setTimeout(() => this.timePickerChange = false, 0);
1599
+ setTimeout(() => (this.timePickerChange = false), 0);
1416
1600
  },
1417
1601
  toggleAMPM(event) {
1418
1602
  this.pm = !this.pm;
@@ -1426,24 +1610,22 @@ export default {
1426
1610
  },
1427
1611
  onMonthSelect(event, index) {
1428
1612
  if (this.view === 'month') {
1429
- this.onDateSelect(event, {year: this.currentYear, month: index, day: 1, selectable: true});
1430
- }
1431
- else {
1613
+ this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true });
1614
+ } else {
1432
1615
  this.currentMonth = index;
1433
1616
  this.currentView = 'date';
1434
- this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
1617
+ this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
1435
1618
  }
1436
1619
 
1437
1620
  setTimeout(this.updateFocus, 0);
1438
1621
  },
1439
1622
  onYearSelect(event, year) {
1440
1623
  if (this.view === 'year') {
1441
- this.onDateSelect(event, {year: year, month: 0, day: 1, selectable: true});
1442
- }
1443
- else {
1624
+ this.onDateSelect(event, { year: year, month: 0, day: 1, selectable: true });
1625
+ } else {
1444
1626
  this.currentYear = year;
1445
1627
  this.currentView = 'month';
1446
- this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
1628
+ this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
1447
1629
  }
1448
1630
 
1449
1631
  setTimeout(this.updateFocus, 0);
@@ -1457,6 +1639,7 @@ export default {
1457
1639
  this.maskClickListener = () => {
1458
1640
  this.overlayVisible = false;
1459
1641
  };
1642
+
1460
1643
  this.mask.addEventListener('click', this.maskClickListener);
1461
1644
 
1462
1645
  document.body.appendChild(this.mask);
@@ -1479,9 +1662,11 @@ export default {
1479
1662
 
1480
1663
  let bodyChildren = document.body.children;
1481
1664
  let hasBlockerMasks;
1665
+
1482
1666
  for (let i = 0; i < bodyChildren.length; i++) {
1483
1667
  let bodyChild = bodyChildren[i];
1484
- if(DomHandler.hasClass(bodyChild, 'p-datepicker-mask-scrollblocker')) {
1668
+
1669
+ if (DomHandler.hasClass(bodyChild, 'p-datepicker-mask-scrollblocker')) {
1485
1670
  hasBlockerMasks = true;
1486
1671
  break;
1487
1672
  }
@@ -1493,6 +1678,7 @@ export default {
1493
1678
  },
1494
1679
  updateCurrentMetaData() {
1495
1680
  const viewDate = this.viewDate;
1681
+
1496
1682
  this.currentMonth = viewDate.getMonth();
1497
1683
  this.currentYear = viewDate.getFullYear();
1498
1684
 
@@ -1506,15 +1692,17 @@ export default {
1506
1692
  }
1507
1693
 
1508
1694
  let isValid = true;
1695
+
1509
1696
  if (this.isSingleSelection()) {
1510
1697
  if (!this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false)) {
1511
1698
  isValid = false;
1512
1699
  }
1513
- } else if (value.every(v => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
1700
+ } else if (value.every((v) => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
1514
1701
  if (this.isRangeSelection()) {
1515
1702
  isValid = value.length > 1 && value[1] > value[0] ? true : false;
1516
1703
  }
1517
1704
  }
1705
+
1518
1706
  return isValid;
1519
1707
  },
1520
1708
  parseValue(text) {
@@ -1526,17 +1714,19 @@ export default {
1526
1714
 
1527
1715
  if (this.isSingleSelection()) {
1528
1716
  value = this.parseDateTime(text);
1529
- }
1530
- else if (this.isMultipleSelection()) {
1717
+ } else if (this.isMultipleSelection()) {
1531
1718
  let tokens = text.split(',');
1719
+
1532
1720
  value = [];
1721
+
1533
1722
  for (let token of tokens) {
1534
1723
  value.push(this.parseDateTime(token.trim()));
1535
1724
  }
1536
- }
1537
- else if (this.isRangeSelection()) {
1725
+ } else if (this.isRangeSelection()) {
1538
1726
  let tokens = text.split(' - ');
1727
+
1539
1728
  value = [];
1729
+
1540
1730
  for (let i = 0; i < tokens.length; i++) {
1541
1731
  value[i] = this.parseDateTime(tokens[i].trim());
1542
1732
  }
@@ -1551,14 +1741,13 @@ export default {
1551
1741
  if (this.timeOnly) {
1552
1742
  date = new Date();
1553
1743
  this.populateTime(date, parts[0], parts[1]);
1554
- }
1555
- else {
1744
+ } else {
1556
1745
  const dateFormat = this.datePattern;
1746
+
1557
1747
  if (this.showTime) {
1558
1748
  date = this.parseDate(parts[0], dateFormat);
1559
1749
  this.populateTime(date, parts[1], parts[2]);
1560
- }
1561
- else {
1750
+ } else {
1562
1751
  date = this.parseDate(text, dateFormat);
1563
1752
  }
1564
1753
  }
@@ -1570,8 +1759,10 @@ export default {
1570
1759
  throw 'Invalid Time';
1571
1760
  }
1572
1761
 
1573
- this.pm = (ampm === 'PM' || ampm === 'pm');
1762
+ //DEBUG: 2952
1763
+ this.pm = ampm === this.$primevue.config.locale.am || ampm === this.$primevue.config.locale.am.toLowerCase();
1574
1764
  let time = this.parseTime(timeString);
1765
+
1575
1766
  value.setHours(time.hour);
1576
1767
  value.setMinutes(time.minute);
1577
1768
  value.setSeconds(time.second);
@@ -1579,10 +1770,10 @@ export default {
1579
1770
  parseTime(value) {
1580
1771
  let tokens = value.split(':');
1581
1772
  let validTokenLength = this.showSeconds ? 3 : 2;
1582
- let regex = (/^[0-9][0-9]$/);
1773
+ let regex = /^[0-9][0-9]$/;
1583
1774
 
1584
1775
  if (tokens.length !== validTokenLength || !tokens[0].match(regex) || !tokens[1].match(regex) || (this.showSeconds && !tokens[2].match(regex))) {
1585
- throw "Invalid time";
1776
+ throw 'Invalid time';
1586
1777
  }
1587
1778
 
1588
1779
  let h = parseInt(tokens[0]);
@@ -1590,88 +1781,97 @@ export default {
1590
1781
  let s = this.showSeconds ? parseInt(tokens[2]) : null;
1591
1782
 
1592
1783
  if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || (this.hourFormat == '12' && h > 12) || (this.showSeconds && (isNaN(s) || s > 59))) {
1593
- throw "Invalid time";
1594
- }
1595
- else {
1784
+ throw 'Invalid time';
1785
+ } else {
1596
1786
  if (this.hourFormat == '12' && h !== 12 && this.pm) {
1597
- h+= 12;
1787
+ h += 12;
1598
1788
  }
1599
1789
 
1600
- return {hour: h, minute: m, second: s};
1790
+ return { hour: h, minute: m, second: s };
1601
1791
  }
1602
1792
  },
1603
1793
  parseDate(value, format) {
1604
1794
  if (format == null || value == null) {
1605
- throw "Invalid arguments";
1795
+ throw 'Invalid arguments';
1606
1796
  }
1607
1797
 
1608
- value = (typeof value === "object" ? value.toString() : value + "");
1609
- if (value === "") {
1798
+ value = typeof value === 'object' ? value.toString() : value + '';
1799
+
1800
+ if (value === '') {
1610
1801
  return null;
1611
1802
  }
1612
1803
 
1613
- let iFormat, dim, extra,
1614
- iValue = 0,
1615
- shortYearCutoff = (typeof this.shortYearCutoff !== "string" ? this.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.shortYearCutoff, 10)),
1616
- year = -1,
1617
- month = -1,
1618
- day = -1,
1619
- doy = -1,
1620
- literal = false,
1621
- date,
1622
- lookAhead = (match) => {
1623
- let matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
1624
- if (matches) {
1625
- iFormat++;
1626
- }
1627
- return matches;
1628
- },
1629
- getNumber = (match) => {
1630
- let isDoubled = lookAhead(match),
1631
- size = (match === "@" ? 14 : (match === "!" ? 20 :
1632
- (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
1633
- minSize = (match === "y" ? size : 1),
1634
- digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
1635
- num = value.substring(iValue).match(digits);
1636
- if (!num) {
1637
- throw "Missing number at position " + iValue;
1638
- }
1639
- iValue += num[ 0 ].length;
1640
- return parseInt(num[ 0 ], 10);
1641
- },
1642
- getName = (match, shortNames, longNames) => {
1643
- let index = -1;
1644
- let arr = lookAhead(match) ? longNames : shortNames;
1645
- let names = [];
1646
-
1647
- for (let i = 0; i < arr.length; i++) {
1648
- names.push([i,arr[i]]);
1649
- }
1650
- names.sort((a,b) => {
1651
- return -(a[ 1 ].length - b[ 1 ].length);
1652
- });
1804
+ let iFormat,
1805
+ dim,
1806
+ extra,
1807
+ iValue = 0,
1808
+ shortYearCutoff = typeof this.shortYearCutoff !== 'string' ? this.shortYearCutoff : (new Date().getFullYear() % 100) + parseInt(this.shortYearCutoff, 10),
1809
+ year = -1,
1810
+ month = -1,
1811
+ day = -1,
1812
+ doy = -1,
1813
+ literal = false,
1814
+ date,
1815
+ lookAhead = (match) => {
1816
+ let matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
1653
1817
 
1654
- for (let i = 0; i < names.length; i++) {
1655
- let name = names[i][1];
1656
- if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
1657
- index = names[i][0];
1658
- iValue += name.length;
1659
- break;
1818
+ if (matches) {
1819
+ iFormat++;
1660
1820
  }
1661
- }
1662
1821
 
1663
- if (index !== -1) {
1664
- return index + 1;
1665
- } else {
1666
- throw "Unknown name at position " + iValue;
1667
- }
1668
- },
1669
- checkLiteral = () => {
1670
- if (value.charAt(iValue) !== format.charAt(iFormat)) {
1671
- throw "Unexpected literal at position " + iValue;
1672
- }
1673
- iValue++;
1674
- };
1822
+ return matches;
1823
+ },
1824
+ getNumber = (match) => {
1825
+ let isDoubled = lookAhead(match),
1826
+ size = match === '@' ? 14 : match === '!' ? 20 : match === 'y' && isDoubled ? 4 : match === 'o' ? 3 : 2,
1827
+ minSize = match === 'y' ? size : 1,
1828
+ digits = new RegExp('^\\d{' + minSize + ',' + size + '}'),
1829
+ num = value.substring(iValue).match(digits);
1830
+
1831
+ if (!num) {
1832
+ throw 'Missing number at position ' + iValue;
1833
+ }
1834
+
1835
+ iValue += num[0].length;
1836
+
1837
+ return parseInt(num[0], 10);
1838
+ },
1839
+ getName = (match, shortNames, longNames) => {
1840
+ let index = -1;
1841
+ let arr = lookAhead(match) ? longNames : shortNames;
1842
+ let names = [];
1843
+
1844
+ for (let i = 0; i < arr.length; i++) {
1845
+ names.push([i, arr[i]]);
1846
+ }
1847
+
1848
+ names.sort((a, b) => {
1849
+ return -(a[1].length - b[1].length);
1850
+ });
1851
+
1852
+ for (let i = 0; i < names.length; i++) {
1853
+ let name = names[i][1];
1854
+
1855
+ if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
1856
+ index = names[i][0];
1857
+ iValue += name.length;
1858
+ break;
1859
+ }
1860
+ }
1861
+
1862
+ if (index !== -1) {
1863
+ return index + 1;
1864
+ } else {
1865
+ throw 'Unknown name at position ' + iValue;
1866
+ }
1867
+ },
1868
+ checkLiteral = () => {
1869
+ if (value.charAt(iValue) !== format.charAt(iFormat)) {
1870
+ throw 'Unexpected literal at position ' + iValue;
1871
+ }
1872
+
1873
+ iValue++;
1874
+ };
1675
1875
 
1676
1876
  if (this.currentView === 'month') {
1677
1877
  day = 1;
@@ -1686,32 +1886,32 @@ export default {
1686
1886
  }
1687
1887
  } else {
1688
1888
  switch (format.charAt(iFormat)) {
1689
- case "d":
1690
- day = getNumber("d");
1889
+ case 'd':
1890
+ day = getNumber('d');
1691
1891
  break;
1692
- case "D":
1693
- getName("D", this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
1892
+ case 'D':
1893
+ getName('D', this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
1694
1894
  break;
1695
- case "o":
1696
- doy = getNumber("o");
1895
+ case 'o':
1896
+ doy = getNumber('o');
1697
1897
  break;
1698
- case "m":
1699
- month = getNumber("m");
1898
+ case 'm':
1899
+ month = getNumber('m');
1700
1900
  break;
1701
- case "M":
1702
- month = getName("M", this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
1901
+ case 'M':
1902
+ month = getName('M', this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
1703
1903
  break;
1704
- case "y":
1705
- year = getNumber("y");
1904
+ case 'y':
1905
+ year = getNumber('y');
1706
1906
  break;
1707
- case "@":
1708
- date = new Date(getNumber("@"));
1907
+ case '@':
1908
+ date = new Date(getNumber('@'));
1709
1909
  year = date.getFullYear();
1710
1910
  month = date.getMonth() + 1;
1711
1911
  day = date.getDate();
1712
1912
  break;
1713
- case "!":
1714
- date = new Date((getNumber("!") - this.ticksTo1970) / 10000);
1913
+ case '!':
1914
+ date = new Date((getNumber('!') - this.ticksTo1970) / 10000);
1715
1915
  year = date.getFullYear();
1716
1916
  month = date.getMonth() + 1;
1717
1917
  day = date.getDate();
@@ -1722,6 +1922,7 @@ export default {
1722
1922
  } else {
1723
1923
  literal = true;
1724
1924
  }
1925
+
1725
1926
  break;
1726
1927
  default:
1727
1928
  checkLiteral();
@@ -1731,95 +1932,124 @@ export default {
1731
1932
 
1732
1933
  if (iValue < value.length) {
1733
1934
  extra = value.substr(iValue);
1935
+
1734
1936
  if (!/^\s+/.test(extra)) {
1735
- throw "Extra/unparsed characters found in date: " + extra;
1937
+ throw 'Extra/unparsed characters found in date: ' + extra;
1736
1938
  }
1737
1939
  }
1738
1940
 
1739
1941
  if (year === -1) {
1740
1942
  year = new Date().getFullYear();
1741
1943
  } else if (year < 100) {
1742
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
1743
- (year <= shortYearCutoff ? 0 : -100);
1944
+ year += new Date().getFullYear() - (new Date().getFullYear() % 100) + (year <= shortYearCutoff ? 0 : -100);
1744
1945
  }
1745
1946
 
1746
1947
  if (doy > -1) {
1747
1948
  month = 1;
1748
1949
  day = doy;
1950
+
1749
1951
  do {
1750
1952
  dim = this.getDaysCountInMonth(year, month - 1);
1953
+
1751
1954
  if (day <= dim) {
1752
1955
  break;
1753
1956
  }
1957
+
1754
1958
  month++;
1755
1959
  day -= dim;
1756
- // eslint-disable-next-line
1960
+ // eslint-disable-next-line
1757
1961
  } while (true);
1758
1962
  }
1759
1963
 
1760
1964
  date = this.daylightSavingAdjust(new Date(year, month - 1, day));
1761
1965
 
1762
1966
  if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
1763
- throw "Invalid date"; // E.g. 31/02/00
1967
+ throw 'Invalid date'; // E.g. 31/02/00
1764
1968
  }
1765
1969
 
1766
1970
  return date;
1767
1971
  },
1768
1972
  getWeekNumber(date) {
1769
1973
  let checkDate = new Date(date.getTime());
1770
- checkDate.setDate(checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ));
1974
+
1975
+ checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
1771
1976
  let time = checkDate.getTime();
1772
- checkDate.setMonth( 0 );
1773
- checkDate.setDate( 1 );
1774
- return Math.floor( Math.round((time - checkDate.getTime()) / 86400000 ) / 7 ) + 1;
1977
+
1978
+ checkDate.setMonth(0);
1979
+ checkDate.setDate(1);
1980
+
1981
+ return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;
1775
1982
  },
1776
1983
  onDateCellKeydown(event, date, groupIndex) {
1777
1984
  const cellContent = event.currentTarget;
1778
1985
  const cell = cellContent.parentElement;
1779
1986
 
1987
+ const cellIndex = DomHandler.index(cell);
1988
+
1780
1989
  switch (event.code) {
1781
1990
  case 'ArrowDown': {
1782
1991
  cellContent.tabIndex = '-1';
1783
- let cellIndex = DomHandler.index(cell);
1992
+
1784
1993
  let nextRow = cell.parentElement.nextElementSibling;
1994
+
1785
1995
  if (nextRow) {
1786
- let focusCell = nextRow.children[cellIndex].children[0];
1787
- if (DomHandler.hasClass(focusCell, 'p-disabled')) {
1788
- this.navigationState = {backward: false};
1996
+ let tableRowIndex = DomHandler.index(cell.parentElement);
1997
+ const tableRows = Array.from(cell.parentElement.parentElement.children);
1998
+ const nextTableRows = tableRows.slice(tableRowIndex + 1);
1999
+
2000
+ let hasNextFocusableDate = nextTableRows.find((el) => {
2001
+ let focusCell = el.children[cellIndex].children[0];
2002
+
2003
+ return !DomHandler.hasClass(focusCell, 'p-disabled');
2004
+ });
2005
+
2006
+ if (hasNextFocusableDate) {
2007
+ let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
2008
+
2009
+ focusCell.tabIndex = '0';
2010
+ focusCell.focus();
2011
+ } else {
2012
+ this.navigationState = { backward: false };
1789
2013
  this.navForward(event);
1790
2014
  }
1791
- else {
1792
- nextRow.children[cellIndex].children[0].tabIndex = '0';
1793
- nextRow.children[cellIndex].children[0].focus();
1794
- }
1795
- }
1796
- else {
1797
- this.navigationState = {backward: false};
2015
+ } else {
2016
+ this.navigationState = { backward: false };
1798
2017
  this.navForward(event);
1799
2018
  }
2019
+
1800
2020
  event.preventDefault();
1801
2021
  break;
1802
2022
  }
1803
2023
 
1804
2024
  case 'ArrowUp': {
1805
2025
  cellContent.tabIndex = '-1';
1806
- let cellIndex = DomHandler.index(cell);
1807
2026
  let prevRow = cell.parentElement.previousElementSibling;
2027
+
1808
2028
  if (prevRow) {
1809
- let focusCell = prevRow.children[cellIndex].children[0];
1810
- if (DomHandler.hasClass(focusCell, 'p-disabled')) {
1811
- this.navigationState = {backward: true};
1812
- this.navBackward(event);
1813
- }
1814
- else {
2029
+ let tableRowIndex = DomHandler.index(cell.parentElement);
2030
+ const tableRows = Array.from(cell.parentElement.parentElement.children);
2031
+ const prevTableRows = tableRows.slice(0, tableRowIndex).reverse();
2032
+
2033
+ let hasNextFocusableDate = prevTableRows.find((el) => {
2034
+ let focusCell = el.children[cellIndex].children[0];
2035
+
2036
+ return !DomHandler.hasClass(focusCell, 'p-disabled');
2037
+ });
2038
+
2039
+ if (hasNextFocusableDate) {
2040
+ let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
2041
+
1815
2042
  focusCell.tabIndex = '0';
1816
2043
  focusCell.focus();
2044
+ } else {
2045
+ this.navigationState = { backward: true };
2046
+ this.navBackward(event);
1817
2047
  }
1818
- }
1819
- else {
1820
- this.navigationState = {backward: true};
2048
+ } else {
2049
+ this.navigationState = { backward: true };
1821
2050
  this.navBackward(event);
1822
2051
  }
2052
+
1823
2053
  event.preventDefault();
1824
2054
  break;
1825
2055
  }
@@ -1827,19 +2057,29 @@ export default {
1827
2057
  case 'ArrowLeft': {
1828
2058
  cellContent.tabIndex = '-1';
1829
2059
  let prevCell = cell.previousElementSibling;
2060
+
1830
2061
  if (prevCell) {
1831
- let focusCell = prevCell.children[0];
1832
- if (DomHandler.hasClass(focusCell, 'p-disabled')) {
1833
- this.navigateToMonth(event, true, groupIndex);
1834
- }
1835
- else {
2062
+ const cells = Array.from(cell.parentElement.children);
2063
+ const prevCells = cells.slice(0, cellIndex).reverse();
2064
+
2065
+ let hasNextFocusableDate = prevCells.find((el) => {
2066
+ let focusCell = el.children[0];
2067
+
2068
+ return !DomHandler.hasClass(focusCell, 'p-disabled');
2069
+ });
2070
+
2071
+ if (hasNextFocusableDate) {
2072
+ let focusCell = hasNextFocusableDate.children[0];
2073
+
1836
2074
  focusCell.tabIndex = '0';
1837
2075
  focusCell.focus();
2076
+ } else {
2077
+ this.navigateToMonth(event, true, groupIndex);
1838
2078
  }
1839
- }
1840
- else {
2079
+ } else {
1841
2080
  this.navigateToMonth(event, true, groupIndex);
1842
2081
  }
2082
+
1843
2083
  event.preventDefault();
1844
2084
  break;
1845
2085
  }
@@ -1847,24 +2087,34 @@ export default {
1847
2087
  case 'ArrowRight': {
1848
2088
  cellContent.tabIndex = '-1';
1849
2089
  let nextCell = cell.nextElementSibling;
2090
+
1850
2091
  if (nextCell) {
1851
- let focusCell = nextCell.children[0];
1852
- if (DomHandler.hasClass(focusCell, 'p-disabled')) {
1853
- this.navigateToMonth(event, false, groupIndex);
1854
- }
1855
- else {
2092
+ const cells = Array.from(cell.parentElement.children);
2093
+ const nextCells = cells.slice(cellIndex + 1);
2094
+ let hasNextFocusableDate = nextCells.find((el) => {
2095
+ let focusCell = el.children[0];
2096
+
2097
+ return !DomHandler.hasClass(focusCell, 'p-disabled');
2098
+ });
2099
+
2100
+ if (hasNextFocusableDate) {
2101
+ let focusCell = hasNextFocusableDate.children[0];
2102
+
1856
2103
  focusCell.tabIndex = '0';
1857
2104
  focusCell.focus();
2105
+ } else {
2106
+ this.navigateToMonth(event, false, groupIndex);
1858
2107
  }
1859
- }
1860
- else {
2108
+ } else {
1861
2109
  this.navigateToMonth(event, false, groupIndex);
1862
2110
  }
2111
+
1863
2112
  event.preventDefault();
1864
2113
  break;
1865
2114
  }
1866
2115
 
1867
2116
  case 'Enter':
2117
+
1868
2118
  case 'Space': {
1869
2119
  this.onDateSelect(event, date);
1870
2120
  event.preventDefault();
@@ -1881,6 +2131,7 @@ export default {
1881
2131
  if (!this.inline) {
1882
2132
  this.trapFocus(event);
1883
2133
  }
2134
+
1884
2135
  break;
1885
2136
  }
1886
2137
 
@@ -1888,10 +2139,10 @@ export default {
1888
2139
  cellContent.tabIndex = '-1';
1889
2140
  let currentRow = cell.parentElement;
1890
2141
  let focusCell = currentRow.children[0].children[0];
2142
+
1891
2143
  if (DomHandler.hasClass(focusCell, 'p-disabled')) {
1892
2144
  this.navigateToMonth(event, true, groupIndex);
1893
- }
1894
- else {
2145
+ } else {
1895
2146
  focusCell.tabIndex = '0';
1896
2147
  focusCell.focus();
1897
2148
  }
@@ -1903,11 +2154,11 @@ export default {
1903
2154
  case 'End': {
1904
2155
  cellContent.tabIndex = '-1';
1905
2156
  let currentRow = cell.parentElement;
1906
- let focusCell = currentRow.children[currentRow.children.length -1].children[0];
2157
+ let focusCell = currentRow.children[currentRow.children.length - 1].children[0];
2158
+
1907
2159
  if (DomHandler.hasClass(focusCell, 'p-disabled')) {
1908
2160
  this.navigateToMonth(event, false, groupIndex);
1909
- }
1910
- else {
2161
+ } else {
1911
2162
  focusCell.tabIndex = '0';
1912
2163
  focusCell.focus();
1913
2164
  }
@@ -1919,10 +2170,9 @@ export default {
1919
2170
  case 'PageUp': {
1920
2171
  cellContent.tabIndex = '-1';
1921
2172
  if (event.shiftKey) {
1922
- this.navigationState = {backward: true};
2173
+ this.navigationState = { backward: true };
1923
2174
  this.navBackward(event);
1924
- }
1925
- else this.navigateToMonth(event, true, groupIndex);
2175
+ } else this.navigateToMonth(event, true, groupIndex);
1926
2176
 
1927
2177
  event.preventDefault();
1928
2178
  break;
@@ -1931,10 +2181,9 @@ export default {
1931
2181
  case 'PageDown': {
1932
2182
  cellContent.tabIndex = '-1';
1933
2183
  if (event.shiftKey) {
1934
- this.navigationState = {backward: false};
2184
+ this.navigationState = { backward: false };
1935
2185
  this.navForward(event);
1936
- }
1937
- else this.navigateToMonth(event, false, groupIndex);
2186
+ } else this.navigateToMonth(event, false, groupIndex);
1938
2187
 
1939
2188
  event.preventDefault();
1940
2189
  break;
@@ -1942,31 +2191,30 @@ export default {
1942
2191
 
1943
2192
  default:
1944
2193
  //no op
1945
- break;
2194
+ break;
1946
2195
  }
1947
2196
  },
1948
2197
  navigateToMonth(event, prev, groupIndex) {
1949
2198
  if (prev) {
1950
- if (this.numberOfMonths === 1 || (groupIndex === 0)) {
1951
- this.navigationState = {backward: true};
2199
+ if (this.numberOfMonths === 1 || groupIndex === 0) {
2200
+ this.navigationState = { backward: true };
1952
2201
  this.navBackward(event);
1953
- }
1954
- else {
2202
+ } else {
1955
2203
  let prevMonthContainer = this.overlay.children[groupIndex - 1];
1956
2204
  let cells = DomHandler.find(prevMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
1957
2205
  let focusCell = cells[cells.length - 1];
2206
+
1958
2207
  focusCell.tabIndex = '0';
1959
2208
  focusCell.focus();
1960
2209
  }
1961
- }
1962
- else {
1963
- if (this.numberOfMonths === 1 || (groupIndex === this.numberOfMonths - 1)) {
1964
- this.navigationState = {backward: false};
2210
+ } else {
2211
+ if (this.numberOfMonths === 1 || groupIndex === this.numberOfMonths - 1) {
2212
+ this.navigationState = { backward: false };
1965
2213
  this.navForward(event);
1966
- }
1967
- else {
2214
+ } else {
1968
2215
  let nextMonthContainer = this.overlay.children[groupIndex + 1];
1969
2216
  let focusCell = DomHandler.findSingle(nextMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
2217
+
1970
2218
  focusCell.tabIndex = '0';
1971
2219
  focusCell.focus();
1972
2220
  }
@@ -1977,15 +2225,18 @@ export default {
1977
2225
 
1978
2226
  switch (event.code) {
1979
2227
  case 'ArrowUp':
2228
+
1980
2229
  case 'ArrowDown': {
1981
2230
  cell.tabIndex = '-1';
1982
2231
  var cells = cell.parentElement.children;
1983
2232
  var cellIndex = DomHandler.index(cell);
1984
- let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex -3];
2233
+ let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex - 3];
2234
+
1985
2235
  if (nextCell) {
1986
2236
  nextCell.tabIndex = '0';
1987
2237
  nextCell.focus();
1988
2238
  }
2239
+
1989
2240
  event.preventDefault();
1990
2241
  break;
1991
2242
  }
@@ -1993,14 +2244,15 @@ export default {
1993
2244
  case 'ArrowLeft': {
1994
2245
  cell.tabIndex = '-1';
1995
2246
  let prevCell = cell.previousElementSibling;
2247
+
1996
2248
  if (prevCell) {
1997
2249
  prevCell.tabIndex = '0';
1998
2250
  prevCell.focus();
1999
- }
2000
- else {
2001
- this.navigationState = {backward: true};
2251
+ } else {
2252
+ this.navigationState = { backward: true };
2002
2253
  this.navBackward(event);
2003
2254
  }
2255
+
2004
2256
  event.preventDefault();
2005
2257
  break;
2006
2258
  }
@@ -2008,21 +2260,22 @@ export default {
2008
2260
  case 'ArrowRight': {
2009
2261
  cell.tabIndex = '-1';
2010
2262
  let nextCell = cell.nextElementSibling;
2263
+
2011
2264
  if (nextCell) {
2012
2265
  nextCell.tabIndex = '0';
2013
2266
  nextCell.focus();
2014
- }
2015
- else {
2016
- this.navigationState = {backward: false};
2267
+ } else {
2268
+ this.navigationState = { backward: false };
2017
2269
  this.navForward(event);
2018
2270
  }
2271
+
2019
2272
  event.preventDefault();
2020
2273
  break;
2021
2274
  }
2022
2275
 
2023
2276
  case 'PageUp': {
2024
2277
  if (event.shiftKey) return;
2025
- this.navigationState = {backward: true};
2278
+ this.navigationState = { backward: true };
2026
2279
  this.navBackward(event);
2027
2280
 
2028
2281
  break;
@@ -2030,13 +2283,14 @@ export default {
2030
2283
 
2031
2284
  case 'PageDown': {
2032
2285
  if (event.shiftKey) return;
2033
- this.navigationState = {backward: false};
2286
+ this.navigationState = { backward: false };
2034
2287
  this.navForward(event);
2035
2288
 
2036
2289
  break;
2037
2290
  }
2038
2291
 
2039
2292
  case 'Enter':
2293
+
2040
2294
  case 'Space': {
2041
2295
  this.onMonthSelect(event, index);
2042
2296
  event.preventDefault();
@@ -2056,7 +2310,7 @@ export default {
2056
2310
 
2057
2311
  default:
2058
2312
  //no op
2059
- break;
2313
+ break;
2060
2314
  }
2061
2315
  },
2062
2316
  onYearCellKeydown(event, index) {
@@ -2064,15 +2318,18 @@ export default {
2064
2318
 
2065
2319
  switch (event.code) {
2066
2320
  case 'ArrowUp':
2067
- case 'ArrowDown': {
2321
+
2322
+ case 'ArrowDown': {
2068
2323
  cell.tabIndex = '-1';
2069
2324
  var cells = cell.parentElement.children;
2070
2325
  var cellIndex = DomHandler.index(cell);
2071
2326
  let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 2 : cellIndex - 2];
2327
+
2072
2328
  if (nextCell) {
2073
2329
  nextCell.tabIndex = '0';
2074
2330
  nextCell.focus();
2075
2331
  }
2332
+
2076
2333
  event.preventDefault();
2077
2334
  break;
2078
2335
  }
@@ -2080,14 +2337,15 @@ export default {
2080
2337
  case 'ArrowLeft': {
2081
2338
  cell.tabIndex = '-1';
2082
2339
  let prevCell = cell.previousElementSibling;
2340
+
2083
2341
  if (prevCell) {
2084
2342
  prevCell.tabIndex = '0';
2085
2343
  prevCell.focus();
2086
- }
2087
- else {
2088
- this.navigationState = {backward: true};
2344
+ } else {
2345
+ this.navigationState = { backward: true };
2089
2346
  this.navBackward(event);
2090
2347
  }
2348
+
2091
2349
  event.preventDefault();
2092
2350
  break;
2093
2351
  }
@@ -2095,21 +2353,22 @@ export default {
2095
2353
  case 'ArrowRight': {
2096
2354
  cell.tabIndex = '-1';
2097
2355
  let nextCell = cell.nextElementSibling;
2356
+
2098
2357
  if (nextCell) {
2099
2358
  nextCell.tabIndex = '0';
2100
2359
  nextCell.focus();
2101
- }
2102
- else {
2103
- this.navigationState = {backward: false};
2360
+ } else {
2361
+ this.navigationState = { backward: false };
2104
2362
  this.navForward(event);
2105
2363
  }
2364
+
2106
2365
  event.preventDefault();
2107
2366
  break;
2108
2367
  }
2109
2368
 
2110
2369
  case 'PageUp': {
2111
2370
  if (event.shiftKey) return;
2112
- this.navigationState = {backward: true};
2371
+ this.navigationState = { backward: true };
2113
2372
  this.navBackward(event);
2114
2373
 
2115
2374
  break;
@@ -2117,13 +2376,14 @@ export default {
2117
2376
 
2118
2377
  case 'PageDown': {
2119
2378
  if (event.shiftKey) return;
2120
- this.navigationState = {backward: false};
2379
+ this.navigationState = { backward: false };
2121
2380
  this.navForward(event);
2122
2381
 
2123
2382
  break;
2124
2383
  }
2125
2384
 
2126
2385
  case 'Enter':
2386
+
2127
2387
  case 'Space': {
2128
2388
  this.onYearSelect(event, index);
2129
2389
  event.preventDefault();
@@ -2143,7 +2403,7 @@ export default {
2143
2403
 
2144
2404
  default:
2145
2405
  //no op
2146
- break;
2406
+ break;
2147
2407
  }
2148
2408
  },
2149
2409
  updateFocus() {
@@ -2153,37 +2413,29 @@ export default {
2153
2413
  if (this.navigationState.button) {
2154
2414
  this.initFocusableCell();
2155
2415
 
2156
- if (this.navigationState.backward)
2157
- DomHandler.findSingle(this.overlay, '.p-datepicker-prev').focus();
2158
- else
2159
- DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
2160
- }
2161
- else {
2416
+ if (this.navigationState.backward) DomHandler.findSingle(this.overlay, '.p-datepicker-prev').focus();
2417
+ else DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
2418
+ } else {
2162
2419
  if (this.navigationState.backward) {
2163
2420
  let cells;
2164
2421
 
2165
2422
  if (this.currentView === 'month') {
2166
2423
  cells = DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
2167
- }
2168
- else if (this.currentView === 'year') {
2424
+ } else if (this.currentView === 'year') {
2169
2425
  cells = DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
2170
- }
2171
- else {
2426
+ } else {
2172
2427
  cells = DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
2173
2428
  }
2174
2429
 
2175
2430
  if (cells && cells.length > 0) {
2176
2431
  cell = cells[cells.length - 1];
2177
2432
  }
2178
- }
2179
- else {
2433
+ } else {
2180
2434
  if (this.currentView === 'month') {
2181
2435
  cell = DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
2182
- }
2183
- else if (this.currentView === 'year') {
2436
+ } else if (this.currentView === 'year') {
2184
2437
  cell = DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
2185
- }
2186
- else {
2438
+ } else {
2187
2439
  cell = DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
2188
2440
  }
2189
2441
  }
@@ -2195,8 +2447,7 @@ export default {
2195
2447
  }
2196
2448
 
2197
2449
  this.navigationState = null;
2198
- }
2199
- else {
2450
+ } else {
2200
2451
  this.initFocusableCell();
2201
2452
  }
2202
2453
  },
@@ -2205,24 +2456,24 @@ export default {
2205
2456
 
2206
2457
  if (this.currentView === 'month') {
2207
2458
  let cells = DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month');
2208
- let selectedCell= DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
2209
- cells.forEach(cell => cell.tabIndex = -1);
2459
+ let selectedCell = DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
2460
+
2461
+ cells.forEach((cell) => (cell.tabIndex = -1));
2210
2462
  cell = selectedCell || cells[0];
2211
- }
2212
- else if (this.currentView === 'year') {
2463
+ } else if (this.currentView === 'year') {
2213
2464
  let cells = DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year');
2214
- let selectedCell= DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
2215
- cells.forEach(cell => cell.tabIndex = -1);
2465
+ let selectedCell = DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
2466
+
2467
+ cells.forEach((cell) => (cell.tabIndex = -1));
2216
2468
  cell = selectedCell || cells[0];
2217
- }
2218
- else {
2469
+ } else {
2219
2470
  cell = DomHandler.findSingle(this.overlay, 'span.p-highlight');
2471
+
2220
2472
  if (!cell) {
2221
2473
  let todayCell = DomHandler.findSingle(this.overlay, 'td.p-datepicker-today span:not(.p-disabled):not(.p-ink');
2222
- if (todayCell)
2223
- cell = todayCell;
2224
- else
2225
- cell = DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
2474
+
2475
+ if (todayCell) cell = todayCell;
2476
+ else cell = DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
2226
2477
  }
2227
2478
  }
2228
2479
 
@@ -2243,34 +2494,27 @@ export default {
2243
2494
  if (focusableElements && focusableElements.length > 0) {
2244
2495
  if (!document.activeElement) {
2245
2496
  focusableElements[0].focus();
2246
- }
2247
- else {
2497
+ } else {
2248
2498
  let focusedIndex = focusableElements.indexOf(document.activeElement);
2249
2499
 
2250
2500
  if (event.shiftKey) {
2251
- if (focusedIndex === -1 || focusedIndex === 0)
2252
- focusableElements[focusableElements.length - 1].focus();
2253
- else
2254
- focusableElements[focusedIndex - 1].focus();
2255
- }
2256
- else {
2501
+ if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus();
2502
+ else focusableElements[focusedIndex - 1].focus();
2503
+ } else {
2257
2504
  if (focusedIndex === -1) {
2258
2505
  if (this.timeOnly) {
2259
2506
  focusableElements[0].focus();
2260
- }
2261
- else {
2507
+ } else {
2262
2508
  let spanIndex = null;
2263
- for (let i = 0; i < focusableElements.length; i++){
2264
- if (focusableElements[i].tagName === 'SPAN')
2265
- spanIndex = i;
2509
+
2510
+ for (let i = 0; i < focusableElements.length; i++) {
2511
+ if (focusableElements[i].tagName === 'SPAN') spanIndex = i;
2266
2512
  }
2513
+
2267
2514
  focusableElements[spanIndex].focus();
2268
2515
  }
2269
- }
2270
- else if (focusedIndex === (focusableElements.length - 1))
2271
- focusableElements[0].focus();
2272
- else
2273
- focusableElements[focusedIndex + 1].focus();
2516
+ } else if (focusedIndex === focusableElements.length - 1) focusableElements[0].focus();
2517
+ else focusableElements[focusedIndex + 1].focus();
2274
2518
  }
2275
2519
  }
2276
2520
  }
@@ -2279,16 +2523,16 @@ export default {
2279
2523
  switch (event.code) {
2280
2524
  case 'Tab':
2281
2525
  this.trapFocus(event);
2282
- break;
2526
+ break;
2283
2527
 
2284
2528
  case 'Escape':
2285
2529
  this.overlayVisible = false;
2286
2530
  event.preventDefault();
2287
- break;
2531
+ break;
2288
2532
 
2289
2533
  default:
2290
2534
  //Noop
2291
- break;
2535
+ break;
2292
2536
  }
2293
2537
 
2294
2538
  this.$emit('keydown', event);
@@ -2299,26 +2543,32 @@ export default {
2299
2543
  this.selectionEnd = this.input.selectionEnd;
2300
2544
 
2301
2545
  let value = this.parseValue(event.target.value);
2546
+
2302
2547
  if (this.isValidSelection(value)) {
2303
2548
  this.typeUpdate = true;
2304
2549
  this.updateModel(value);
2305
2550
  }
2306
- }
2307
- catch(err) {
2551
+ } catch (err) {
2308
2552
  /* NoOp */
2309
2553
  }
2310
2554
 
2311
2555
  this.$emit('input', event);
2312
2556
  },
2557
+ onInputClick() {
2558
+ if (this.showOnFocus && this.isEnabled() && !this.overlayVisible) {
2559
+ this.overlayVisible = true;
2560
+ }
2561
+ },
2313
2562
  onFocus(event) {
2314
2563
  if (this.showOnFocus && this.isEnabled()) {
2315
2564
  this.overlayVisible = true;
2316
2565
  }
2566
+
2317
2567
  this.focused = true;
2318
2568
  this.$emit('focus', event);
2319
2569
  },
2320
2570
  onBlur(event) {
2321
- this.$emit('blur', {originalEvent: event, value: event.target.value});
2571
+ this.$emit('blur', { originalEvent: event, value: event.target.value });
2322
2572
 
2323
2573
  this.focused = false;
2324
2574
  event.target.value = this.formatValue(this.modelValue);
@@ -2326,19 +2576,16 @@ export default {
2326
2576
  onKeyDown(event) {
2327
2577
  if (event.code === 'ArrowDown' && this.overlay) {
2328
2578
  this.trapFocus(event);
2329
- }
2330
- else if (event.code === 'ArrowDown' && !this.overlay) {
2579
+ } else if (event.code === 'ArrowDown' && !this.overlay) {
2331
2580
  this.overlayVisible = true;
2332
- }
2333
- else if (event.code === 'Escape') {
2581
+ } else if (event.code === 'Escape') {
2334
2582
  if (this.overlayVisible) {
2335
2583
  this.overlayVisible = false;
2336
2584
  event.preventDefault();
2337
2585
  }
2338
- }
2339
- else if (event.code === 'Tab') {
2586
+ } else if (event.code === 'Tab') {
2340
2587
  if (this.overlay) {
2341
- DomHandler.getFocusableElements(this.overlay).forEach(el => el.tabIndex = '-1');
2588
+ DomHandler.getFocusableElements(this.overlay).forEach((el) => (el.tabIndex = '-1'));
2342
2589
  }
2343
2590
 
2344
2591
  if (this.overlayVisible) {
@@ -2389,10 +2636,9 @@ export default {
2389
2636
  }
2390
2637
 
2391
2638
  let innerHTML = '';
2639
+
2392
2640
  if (this.responsiveOptions) {
2393
- let responsiveOptions = [...this.responsiveOptions]
2394
- .filter(o => !!(o.breakpoint && o.numMonths))
2395
- .sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
2641
+ let responsiveOptions = [...this.responsiveOptions].filter((o) => !!(o.breakpoint && o.numMonths)).sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
2396
2642
 
2397
2643
  for (let i = 0; i < responsiveOptions.length; i++) {
2398
2644
  let { breakpoint, numMonths } = responsiveOptions[i];
@@ -2407,20 +2653,20 @@ export default {
2407
2653
  .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${j + 1}) {
2408
2654
  display: none !important;
2409
2655
  }
2410
- `
2656
+ `;
2411
2657
  }
2412
2658
 
2413
2659
  innerHTML += `
2414
2660
  @media screen and (max-width: ${breakpoint}) {
2415
2661
  ${styles}
2416
2662
  }
2417
- `
2663
+ `;
2418
2664
  }
2419
2665
  }
2420
2666
 
2421
2667
  this.responsiveStyleElement.innerHTML = innerHTML;
2422
2668
  }
2423
- },
2669
+ },
2424
2670
  destroyResponsiveStyleElement() {
2425
2671
  if (this.responsiveStyleElement) {
2426
2672
  this.responsiveStyleElement.remove();
@@ -2431,19 +2677,18 @@ export default {
2431
2677
  computed: {
2432
2678
  viewDate() {
2433
2679
  let propValue = this.modelValue;
2680
+
2434
2681
  if (propValue && Array.isArray(propValue)) {
2435
2682
  if (this.isRangeSelection()) {
2436
2683
  propValue = propValue[1] || propValue[0];
2437
- }
2438
- else if (this.isMultipleSelection()) {
2684
+ } else if (this.isMultipleSelection()) {
2439
2685
  propValue = propValue[propValue.length - 1];
2440
2686
  }
2441
2687
  }
2442
2688
 
2443
2689
  if (propValue && typeof propValue !== 'string') {
2444
2690
  return propValue;
2445
- }
2446
- else {
2691
+ } else {
2447
2692
  let today = new Date();
2448
2693
 
2449
2694
  if (this.maxDate && this.maxDate < today) {
@@ -2473,25 +2718,31 @@ export default {
2473
2718
  ];
2474
2719
  },
2475
2720
  panelStyleClass() {
2476
- return ['p-datepicker p-component', this.panelClass, {
2477
- 'p-datepicker-inline': this.inline,
2478
- 'p-disabled': this.disabled,
2479
- 'p-datepicker-timeonly': this.timeOnly,
2480
- 'p-datepicker-multiple-month': this.numberOfMonths > 1,
2481
- 'p-datepicker-monthpicker': (this.currentView === 'month'),
2482
- 'p-datepicker-yearpicker': (this.currentView === 'year'),
2483
- 'p-datepicker-touch-ui': this.touchUI,
2484
- 'p-input-filled': this.$primevue.config.inputStyle === 'filled',
2485
- 'p-ripple-disabled': this.$primevue.config.ripple === false
2486
- }];
2721
+ return [
2722
+ 'p-datepicker p-component',
2723
+ this.panelClass,
2724
+ {
2725
+ 'p-datepicker-inline': this.inline,
2726
+ 'p-disabled': this.disabled,
2727
+ 'p-datepicker-timeonly': this.timeOnly,
2728
+ 'p-datepicker-multiple-month': this.numberOfMonths > 1,
2729
+ 'p-datepicker-monthpicker': this.currentView === 'month',
2730
+ 'p-datepicker-yearpicker': this.currentView === 'year',
2731
+ 'p-datepicker-touch-ui': this.touchUI,
2732
+ 'p-input-filled': this.$primevue.config.inputStyle === 'filled',
2733
+ 'p-ripple-disabled': this.$primevue.config.ripple === false
2734
+ }
2735
+ ];
2487
2736
  },
2488
2737
  months() {
2489
2738
  let months = [];
2490
- for (let i = 0 ; i < this.numberOfMonths; i++) {
2739
+
2740
+ for (let i = 0; i < this.numberOfMonths; i++) {
2491
2741
  let month = this.currentMonth + i;
2492
2742
  let year = this.currentYear;
2743
+
2493
2744
  if (month > 11) {
2494
- month = month % 11 - 1;
2745
+ month = (month % 11) - 1;
2495
2746
  year = year + 1;
2496
2747
  }
2497
2748
 
@@ -2508,30 +2759,33 @@ export default {
2508
2759
  let week = [];
2509
2760
 
2510
2761
  if (i == 0) {
2511
- for (let j = (prevMonthDaysLength - firstDay + 1); j <= prevMonthDaysLength; j++) {
2762
+ for (let j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) {
2512
2763
  let prev = this.getPreviousMonthAndYear(month, year);
2513
- week.push({day: j, month: prev.month, year: prev.year, otherMonth: true,
2514
- today: this.isToday(today, j, prev.month, prev.year), selectable: this.isSelectable(j, prev.month, prev.year, true)});
2764
+
2765
+ week.push({ day: j, month: prev.month, year: prev.year, otherMonth: true, today: this.isToday(today, j, prev.month, prev.year), selectable: this.isSelectable(j, prev.month, prev.year, true) });
2515
2766
  }
2516
2767
 
2517
2768
  let remainingDaysLength = 7 - week.length;
2769
+
2518
2770
  for (let j = 0; j < remainingDaysLength; j++) {
2519
- week.push({day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year),
2520
- selectable: this.isSelectable(dayNo, month, year, false)});
2771
+ week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
2521
2772
  dayNo++;
2522
2773
  }
2523
- }
2524
- else {
2774
+ } else {
2525
2775
  for (let j = 0; j < 7; j++) {
2526
2776
  if (dayNo > daysLength) {
2527
2777
  let next = this.getNextMonthAndYear(month, year);
2528
- week.push({day: dayNo - daysLength, month: next.month, year: next.year, otherMonth: true,
2529
- today: this.isToday(today, dayNo - daysLength, next.month, next.year),
2530
- selectable: this.isSelectable((dayNo - daysLength), next.month, next.year, true)});
2531
- }
2532
- else {
2533
- week.push({day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year),
2534
- selectable: this.isSelectable(dayNo, month, year, false)});
2778
+
2779
+ week.push({
2780
+ day: dayNo - daysLength,
2781
+ month: next.month,
2782
+ year: next.year,
2783
+ otherMonth: true,
2784
+ today: this.isToday(today, dayNo - daysLength, next.month, next.year),
2785
+ selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true)
2786
+ });
2787
+ } else {
2788
+ week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
2535
2789
  }
2536
2790
 
2537
2791
  dayNo++;
@@ -2558,15 +2812,16 @@ export default {
2558
2812
  weekDays() {
2559
2813
  let weekDays = [];
2560
2814
  let dayIndex = this.$primevue.config.locale.firstDayOfWeek;
2815
+
2561
2816
  for (let i = 0; i < 7; i++) {
2562
2817
  weekDays.push(this.$primevue.config.locale.dayNamesMin[dayIndex]);
2563
- dayIndex = (dayIndex == 6) ? 0 : ++dayIndex;
2818
+ dayIndex = dayIndex == 6 ? 0 : ++dayIndex;
2564
2819
  }
2565
2820
 
2566
2821
  return weekDays;
2567
2822
  },
2568
2823
  ticksTo1970() {
2569
- return (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000);
2824
+ return ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000;
2570
2825
  },
2571
2826
  sundayIndex() {
2572
2827
  return this.$primevue.config.locale.firstDayOfWeek > 0 ? 7 - this.$primevue.config.locale.firstDayOfWeek : 0;
@@ -2584,8 +2839,7 @@ export default {
2584
2839
 
2585
2840
  if (this.currentYear < yearStart) {
2586
2841
  $vm.currentYear = yearEnd;
2587
- }
2588
- else if (this.currentYear > yearEnd) {
2842
+ } else if (this.currentYear > yearEnd) {
2589
2843
  $vm.currentYear = yearStart;
2590
2844
  }
2591
2845
 
@@ -2594,13 +2848,13 @@ export default {
2594
2848
  }
2595
2849
 
2596
2850
  return yearOptions;
2597
- }
2598
- else {
2851
+ } else {
2599
2852
  return null;
2600
2853
  }
2601
2854
  },
2602
2855
  monthPickerValues() {
2603
2856
  let monthPickerValues = [];
2857
+
2604
2858
  for (let i = 0; i <= 11; i++) {
2605
2859
  monthPickerValues.push(this.$primevue.config.locale.monthNamesShort[i]);
2606
2860
  }
@@ -2609,7 +2863,8 @@ export default {
2609
2863
  },
2610
2864
  yearPickerValues() {
2611
2865
  let yearPickerValues = [];
2612
- let base = this.currentYear - (this.currentYear % 10);
2866
+ let base = this.currentYear - (this.currentYear % 10);
2867
+
2613
2868
  for (let i = 0; i < 10; i++) {
2614
2869
  yearPickerValues.push(base + i);
2615
2870
  }
@@ -2648,13 +2903,13 @@ export default {
2648
2903
  }
2649
2904
  },
2650
2905
  components: {
2651
- 'CalendarButton': Button,
2652
- 'Portal': Portal
2906
+ CalendarButton: Button,
2907
+ Portal: Portal
2653
2908
  },
2654
2909
  directives: {
2655
- 'ripple': Ripple
2910
+ ripple: Ripple
2656
2911
  }
2657
- }
2912
+ };
2658
2913
  </script>
2659
2914
 
2660
2915
  <style>
@@ -2694,7 +2949,7 @@ export default {
2694
2949
  }
2695
2950
 
2696
2951
  .p-datepicker {
2697
- width: auto;
2952
+ width: auto;
2698
2953
  position: absolute;
2699
2954
  top: 0;
2700
2955
  left: 0;
@@ -2738,8 +2993,8 @@ export default {
2738
2993
 
2739
2994
  /* DatePicker Table */
2740
2995
  .p-datepicker table {
2741
- width: 100%;
2742
- border-collapse: collapse;
2996
+ width: 100%;
2997
+ border-collapse: collapse;
2743
2998
  }
2744
2999
 
2745
3000
  .p-datepicker td > span {