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