primevue 3.16.2 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +2 -1
- package/accordion/Accordion.d.ts +23 -5
- package/accordion/Accordion.vue +196 -79
- package/accordion/accordion.cjs.js +204 -98
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +202 -100
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +205 -100
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +33 -5
- package/accordiontab/AccordionTab.vue +8 -1
- package/accordiontab/accordiontab.cjs.js +7 -0
- package/accordiontab/accordiontab.cjs.min.js +1 -1
- package/accordiontab/accordiontab.esm.js +7 -0
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +7 -0
- package/accordiontab/accordiontab.min.js +1 -1
- package/api/Api.d.ts +1 -1
- package/api/api.cjs.js +321 -313
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +321 -313
- package/api/api.esm.min.js +1 -1
- package/api/api.js +321 -313
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +32 -17
- package/autocomplete/AutoComplete.vue +252 -131
- package/autocomplete/autocomplete.cjs.js +163 -118
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +161 -116
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +162 -117
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +4 -4
- package/avatar/Avatar.vue +15 -11
- package/avatar/avatar.cjs.js +11 -7
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +11 -7
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +11 -7
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +6 -9
- package/avatargroup/AvatarGroup.vue +1 -1
- package/badge/Badge.d.ts +4 -5
- package/badge/Badge.vue +16 -13
- package/badge/badge.cjs.js +14 -11
- package/badge/badge.esm.js +14 -11
- package/badge/badge.js +14 -11
- package/badgedirective/badgedirective.cjs.js +8 -10
- package/badgedirective/badgedirective.esm.js +8 -10
- package/badgedirective/badgedirective.js +8 -10
- package/blockui/BlockUI.d.ts +6 -6
- package/blockui/BlockUI.vue +13 -15
- package/blockui/blockui.cjs.js +11 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +11 -13
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +11 -13
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +14 -7
- package/breadcrumb/Breadcrumb.vue +16 -7
- package/breadcrumb/BreadcrumbItem.vue +24 -15
- package/breadcrumb/breadcrumb.cjs.js +39 -25
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +39 -25
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +39 -25
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +10 -7
- package/button/Button.vue +28 -17
- package/button/button.cjs.js +25 -14
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +25 -14
- package/button/button.esm.min.js +1 -1
- package/button/button.js +25 -14
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +14 -14
- package/calendar/Calendar.vue +856 -601
- package/calendar/calendar.cjs.js +714 -614
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +712 -612
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +713 -613
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +5 -7
- package/card/Card.vue +5 -5
- package/carousel/Carousel.d.ts +29 -19
- package/carousel/Carousel.vue +537 -528
- package/carousel/carousel.cjs.js +496 -493
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +496 -493
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +645 -642
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +29 -14
- package/cascadeselect/CascadeSelect.vue +197 -102
- package/cascadeselect/CascadeSelectSub.vue +50 -15
- package/cascadeselect/cascadeselect.cjs.js +185 -111
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +184 -110
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +185 -111
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +6 -7
- package/chart/Chart.vue +12 -12
- package/chart/chart.cjs.js +11 -11
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +11 -11
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +11 -11
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.d.ts +12 -12
- package/checkbox/Checkbox.vue +48 -20
- package/checkbox/checkbox.cjs.js +28 -17
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +28 -17
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +28 -17
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.d.ts +5 -5
- package/chip/Chip.vue +13 -11
- package/chip/chip.cjs.js +7 -4
- package/chip/chip.esm.js +7 -4
- package/chip/chip.js +7 -4
- package/chips/Chips.d.ts +9 -9
- package/chips/Chips.vue +89 -33
- package/chips/chips.cjs.js +48 -26
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +48 -26
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +48 -26
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +11 -12
- package/colorpicker/ColorPicker.vue +146 -110
- package/colorpicker/colorpicker.cjs.js +113 -74
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +113 -74
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +113 -74
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +5 -6
- package/column/Column.vue +1 -1
- package/columngroup/ColumnGroup.d.ts +5 -7
- package/columngroup/ColumnGroup.vue +1 -1
- package/config/PrimeVue.d.ts +8 -3
- package/config/config.cjs.js +18 -30
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +18 -30
- package/config/config.esm.min.js +1 -1
- package/config/config.js +19 -31
- package/config/config.min.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +4 -0
- package/confirmationservice/confirmationservice.cjs.js +1 -0
- package/confirmationservice/confirmationservice.esm.js +1 -0
- package/confirmationservice/confirmationservice.js +1 -0
- package/confirmdialog/ConfirmDialog.d.ts +11 -5
- package/confirmdialog/ConfirmDialog.vue +25 -15
- package/confirmdialog/confirmdialog.cjs.js +34 -16
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +34 -16
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -17
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +5 -8
- package/confirmpopup/ConfirmPopup.vue +44 -32
- package/confirmpopup/confirmpopup.cjs.js +24 -14
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +24 -14
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +24 -14
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +43 -5
- package/contextmenu/ContextMenu.vue +449 -38
- package/contextmenu/ContextMenuSub.vue +134 -101
- package/contextmenu/contextmenu.cjs.js +639 -206
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +640 -207
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +640 -207
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +2984 -2116
- package/core/core.min.js +16 -16
- package/datatable/BodyCell.vue +93 -75
- package/datatable/ColumnFilter.vue +137 -86
- package/datatable/DataTable.d.ts +25 -26
- package/datatable/DataTable.vue +472 -298
- package/datatable/FooterCell.vue +20 -13
- package/datatable/HeaderCell.vue +108 -51
- package/datatable/HeaderCheckbox.vue +12 -5
- package/datatable/RowCheckbox.vue +14 -6
- package/datatable/RowRadioButton.vue +4 -4
- package/datatable/TableBody.vue +135 -83
- package/datatable/TableFooter.vue +17 -20
- package/datatable/TableHeader.vue +132 -52
- package/datatable/TableLoadingBody.vue +3 -3
- package/datatable/datatable.cjs.js +2674 -2537
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +2676 -2539
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +2676 -2539
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +8 -8
- package/dataview/DataView.vue +80 -66
- package/dataview/dataview.cjs.js +31 -35
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +31 -35
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +31 -35
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +5 -6
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +28 -34
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -25
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -25
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +46 -52
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/deferredcontent/DeferredContent.d.ts +6 -7
- package/deferredcontent/DeferredContent.vue +6 -9
- package/deferredcontent/deferredcontent.cjs.js +5 -8
- package/deferredcontent/deferredcontent.esm.js +5 -8
- package/deferredcontent/deferredcontent.js +5 -8
- package/dialog/Dialog.d.ts +10 -10
- package/dialog/Dialog.vue +64 -60
- package/dialog/dialog.cjs.js +50 -46
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +50 -46
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +50 -46
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +4 -5
- package/divider/Divider.vue +15 -12
- package/divider/divider.cjs.js +17 -12
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +17 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +17 -12
- package/divider/divider.min.js +1 -1
- package/dock/Dock.d.ts +36 -6
- package/dock/Dock.vue +21 -5
- package/dock/DockSub.vue +229 -55
- package/dock/dock.cjs.js +284 -106
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +284 -106
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +285 -108
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +46 -17
- package/dropdown/Dropdown.vue +271 -129
- package/dropdown/dropdown.cjs.js +213 -132
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +212 -131
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +212 -131
- package/dropdown/dropdown.min.js +1 -1
- package/dynamicdialog/DynamicDialog.d.ts +4 -4
- package/dynamicdialog/DynamicDialog.vue +10 -10
- package/dynamicdialog/dynamicdialog.cjs.js +11 -9
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +11 -9
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +11 -9
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/editor/Editor.d.ts +20 -4
- package/editor/Editor.vue +506 -466
- package/editor/editor.cjs.js +99 -45
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +82 -42
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +83 -47
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +9 -5
- package/fieldset/Fieldset.vue +28 -20
- package/fieldset/fieldset.cjs.js +31 -19
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +32 -20
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +31 -19
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileContent.vue +51 -0
- package/fileupload/FileUpload.d.ts +32 -12
- package/fileupload/FileUpload.vue +122 -102
- package/fileupload/fileupload.cjs.js +265 -160
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +265 -160
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +265 -160
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/FullCalendar.d.ts +5 -7
- package/fullcalendar/FullCalendar.vue +6 -6
- package/fullcalendar/fullcalendar.cjs.js +3 -2
- package/fullcalendar/fullcalendar.esm.js +3 -2
- package/fullcalendar/fullcalendar.js +3 -2
- package/galleria/Galleria.d.ts +4 -4
- package/galleria/Galleria.vue +39 -34
- package/galleria/GalleriaContent.vue +58 -31
- package/galleria/GalleriaItem.vue +44 -36
- package/galleria/GalleriaItemSlot.vue +2 -1
- package/galleria/GalleriaThumbnails.vue +108 -92
- package/galleria/galleria.cjs.js +181 -153
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +181 -153
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +181 -153
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +4 -5
- package/image/Image.vue +19 -15
- package/image/image.cjs.js +11 -7
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +11 -7
- package/image/image.esm.min.js +1 -1
- package/image/image.js +11 -7
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +4 -5
- package/inlinemessage/InlineMessage.vue +12 -9
- package/inlinemessage/inlinemessage.cjs.js +12 -10
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +12 -10
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +12 -10
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.d.ts +6 -6
- package/inplace/Inplace.vue +11 -11
- package/inplace/inplace.cjs.js +9 -9
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +9 -9
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +9 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/InputMask.d.ts +11 -12
- package/inputmask/InputMask.vue +119 -92
- package/inputmask/inputmask.cjs.js +116 -89
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +116 -89
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +116 -89
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +17 -17
- package/inputnumber/InputNumber.vue +247 -180
- package/inputnumber/inputnumber.cjs.js +219 -175
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +218 -174
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +219 -176
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +10 -10
- package/inputswitch/InputSwitch.vue +39 -11
- package/inputswitch/inputswitch.cjs.js +23 -9
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +23 -9
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +23 -9
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +5 -6
- package/inputtext/InputText.vue +3 -3
- package/inputtext/inputtext.cjs.js +2 -2
- package/inputtext/inputtext.esm.js +2 -2
- package/inputtext/inputtext.js +2 -2
- package/knob/Knob.d.ts +10 -11
- package/knob/Knob.vue +47 -29
- package/knob/knob.cjs.js +27 -25
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +27 -25
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +27 -25
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +22 -13
- package/listbox/Listbox.vue +149 -98
- package/listbox/listbox.cjs.js +121 -106
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +122 -107
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +121 -106
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +32 -6
- package/megamenu/MegaMenu.vue +510 -238
- package/megamenu/MegaMenuSub.vue +231 -0
- package/megamenu/megamenu.cjs.js +837 -391
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +839 -393
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +837 -391
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +28 -8
- package/menu/Menu.vue +204 -34
- package/menu/Menuitem.vue +48 -38
- package/menu/menu.cjs.js +325 -137
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +325 -137
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +325 -137
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +19 -8
- package/menubar/Menubar.vue +536 -26
- package/menubar/MenubarSub.vue +123 -239
- package/menubar/menubar.cjs.js +708 -335
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +710 -337
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +708 -335
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +2 -2
- package/message/Message.d.ts +5 -5
- package/message/Message.vue +19 -14
- package/message/message.cjs.js +15 -10
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +15 -10
- package/message/message.esm.min.js +1 -1
- package/message/message.js +15 -10
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +46 -16
- package/multiselect/MultiSelect.vue +266 -156
- package/multiselect/multiselect.cjs.js +239 -167
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +238 -166
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +238 -166
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +5 -5
- package/orderlist/OrderList.vue +65 -60
- package/orderlist/orderlist.cjs.js +51 -53
- package/orderlist/orderlist.esm.js +51 -53
- package/orderlist/orderlist.js +51 -53
- package/organizationchart/OrganizationChart.d.ts +4 -4
- package/organizationchart/OrganizationChart.vue +13 -17
- package/organizationchart/OrganizationChartNode.vue +20 -12
- package/organizationchart/organizationchart.cjs.js +14 -16
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +14 -16
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +14 -16
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +5 -5
- package/overlaypanel/OverlayPanel.vue +60 -50
- package/overlaypanel/overlaypanel.cjs.js +40 -32
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +40 -32
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +40 -32
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +3 -3
- package/paginator/CurrentPageReport.vue +47 -47
- package/paginator/FirstPageLink.vue +11 -8
- package/paginator/JumpToPageDropdown.vue +7 -6
- package/paginator/JumpToPageInput.vue +3 -3
- package/paginator/LastPageLink.vue +11 -8
- package/paginator/NextPageLink.vue +11 -8
- package/paginator/PageLinks.vue +3 -4
- package/paginator/Paginator.d.ts +7 -7
- package/paginator/Paginator.vue +144 -49
- package/paginator/PrevPageLink.vue +11 -8
- package/paginator/RowsPerPageDropdown.vue +7 -6
- package/paginator/paginator.cjs.js +373 -259
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +374 -260
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +651 -538
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +9 -5
- package/panel/Panel.vue +29 -11
- package/panel/panel.cjs.js +24 -14
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +24 -14
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +24 -14
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +37 -6
- package/panelmenu/PanelMenu.vue +202 -88
- package/panelmenu/PanelMenuList.vue +335 -0
- package/panelmenu/PanelMenuSub.vue +130 -80
- package/panelmenu/panelmenu.cjs.js +1385 -283
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1382 -284
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1385 -284
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +12 -7
- package/password/Password.vue +158 -80
- package/password/password.cjs.js +140 -78
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +139 -77
- package/password/password.esm.min.js +1 -1
- package/password/password.js +140 -78
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +9 -9
- package/picklist/PickList.vue +99 -78
- package/picklist/picklist.cjs.js +71 -66
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +71 -66
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +71 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +3 -3
- package/portal/Portal.vue +2 -2
- package/portal/portal.cjs.js +1 -1
- package/portal/portal.esm.js +1 -1
- package/portal/portal.js +1 -1
- package/progressbar/ProgressBar.d.ts +4 -5
- package/progressbar/ProgressBar.vue +63 -51
- package/progressbar/progressbar.cjs.js +2 -2
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +2 -2
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +2 -2
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +5 -7
- package/progressspinner/ProgressSpinner.vue +1 -1
- package/radiobutton/RadioButton.d.ts +9 -9
- package/radiobutton/RadioButton.vue +41 -13
- package/radiobutton/radiobutton.cjs.js +24 -10
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +24 -10
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +24 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +54 -5
- package/rating/Rating.vue +88 -62
- package/rating/rating.cjs.js +105 -84
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +106 -85
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +106 -86
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +21 -2
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +340 -282
- package/resources/themes/arya-green/theme.css +340 -282
- package/resources/themes/arya-orange/theme.css +340 -282
- package/resources/themes/arya-purple/theme.css +340 -282
- package/resources/themes/bootstrap4-dark-blue/theme.css +356 -298
- package/resources/themes/bootstrap4-dark-purple/theme.css +356 -298
- package/resources/themes/bootstrap4-light-blue/theme.css +369 -311
- package/resources/themes/bootstrap4-light-purple/theme.css +369 -311
- package/resources/themes/fluent-light/theme.css +350 -292
- package/resources/themes/lara-dark-blue/theme.css +343 -285
- package/resources/themes/lara-dark-indigo/theme.css +343 -285
- package/resources/themes/lara-dark-purple/theme.css +343 -285
- package/resources/themes/lara-dark-teal/theme.css +343 -285
- package/resources/themes/lara-light-blue/theme.css +367 -309
- package/resources/themes/lara-light-indigo/theme.css +367 -309
- package/resources/themes/lara-light-purple/theme.css +367 -309
- package/resources/themes/lara-light-teal/theme.css +367 -309
- package/resources/themes/luna-amber/theme.css +372 -314
- package/resources/themes/luna-blue/theme.css +372 -314
- package/resources/themes/luna-green/theme.css +372 -314
- package/resources/themes/luna-pink/theme.css +372 -314
- package/resources/themes/md-dark-deeppurple/theme.css +413 -318
- package/resources/themes/md-dark-indigo/theme.css +413 -318
- package/resources/themes/md-light-deeppurple/theme.css +413 -318
- package/resources/themes/md-light-indigo/theme.css +413 -318
- package/resources/themes/mdc-dark-deeppurple/theme.css +413 -318
- package/resources/themes/mdc-dark-indigo/theme.css +413 -318
- package/resources/themes/mdc-light-deeppurple/theme.css +413 -318
- package/resources/themes/mdc-light-indigo/theme.css +413 -318
- package/resources/themes/nova/theme.css +336 -278
- package/resources/themes/nova-accent/theme.css +335 -277
- package/resources/themes/nova-alt/theme.css +336 -278
- package/resources/themes/nova-vue/theme.css +336 -278
- package/resources/themes/rhea/theme.css +335 -277
- package/resources/themes/saga-blue/theme.css +347 -289
- package/resources/themes/saga-green/theme.css +347 -289
- package/resources/themes/saga-orange/theme.css +347 -289
- package/resources/themes/saga-purple/theme.css +347 -289
- package/resources/themes/tailwind-light/theme.css +359 -301
- package/resources/themes/vela-blue/theme.css +347 -289
- package/resources/themes/vela-green/theme.css +347 -289
- package/resources/themes/vela-orange/theme.css +347 -289
- package/resources/themes/vela-purple/theme.css +347 -289
- package/ripple/ripple.cjs.js +19 -1
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +19 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +19 -1
- package/ripple/ripple.min.js +1 -1
- package/row/Row.d.ts +6 -9
- package/row/Row.vue +1 -1
- package/scrollpanel/ScrollPanel.d.ts +9 -5
- package/scrollpanel/ScrollPanel.vue +194 -56
- package/scrollpanel/scrollpanel.cjs.js +180 -56
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +181 -57
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +180 -56
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.d.ts +5 -7
- package/scrolltop/ScrollTop.vue +18 -23
- package/scrolltop/scrolltop.cjs.js +14 -19
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +14 -19
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +14 -19
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +11 -11
- package/selectbutton/SelectButton.vue +50 -32
- package/selectbutton/selectbutton.cjs.js +30 -25
- package/selectbutton/selectbutton.esm.js +30 -25
- package/selectbutton/selectbutton.js +30 -25
- package/sidebar/Sidebar.d.ts +6 -6
- package/sidebar/Sidebar.vue +24 -14
- package/sidebar/sidebar.cjs.js +20 -10
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +20 -10
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +20 -10
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +5 -7
- package/skeleton/Skeleton.vue +12 -11
- package/skeleton/skeleton.cjs.js +10 -9
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +10 -9
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +10 -9
- package/skeleton/skeleton.min.js +1 -1
- package/slider/Slider.d.ts +7 -8
- package/slider/Slider.vue +162 -141
- package/slider/slider.cjs.js +100 -127
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +100 -127
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +100 -127
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +8 -8
- package/speeddial/SpeedDial.vue +66 -46
- package/speeddial/speeddial.cjs.js +77 -62
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +77 -62
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +77 -62
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +6 -6
- package/splitbutton/SplitButton.vue +9 -11
- package/splitbutton/splitbutton.cjs.js +7 -7
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -7
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -7
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +10 -5
- package/splitter/Splitter.vue +158 -53
- package/splitter/splitter.cjs.js +156 -52
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +157 -53
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +156 -52
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +4 -5
- package/splitterpanel/SplitterPanel.vue +3 -3
- package/splitterpanel/splitterpanel.cjs.js +2 -2
- package/splitterpanel/splitterpanel.esm.js +2 -2
- package/splitterpanel/splitterpanel.js +2 -2
- package/steps/Steps.d.ts +4 -5
- package/steps/Steps.vue +137 -30
- package/steps/steps.cjs.js +135 -36
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +136 -37
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +135 -36
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +20 -22
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +20 -22
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +20 -22
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/TabMenu.d.ts +13 -5
- package/tabmenu/TabMenu.vue +176 -36
- package/tabmenu/tabmenu.cjs.js +173 -42
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +173 -42
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +174 -43
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +33 -6
- package/tabpanel/TabPanel.vue +8 -1
- package/tabpanel/tabpanel.cjs.js +7 -0
- package/tabpanel/tabpanel.cjs.min.js +1 -1
- package/tabpanel/tabpanel.esm.js +7 -0
- package/tabpanel/tabpanel.esm.min.js +1 -1
- package/tabpanel/tabpanel.js +7 -0
- package/tabpanel/tabpanel.min.js +1 -1
- package/tabview/TabView.d.ts +22 -6
- package/tabview/TabView.vue +280 -96
- package/tabview/tabview.cjs.js +295 -132
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +296 -133
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +296 -133
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +4 -5
- package/tag/Tag.vue +13 -10
- package/tag/tag.cjs.js +10 -7
- package/tag/tag.esm.js +10 -7
- package/tag/tag.js +10 -7
- package/terminal/Terminal.d.ts +5 -7
- package/terminal/Terminal.vue +10 -10
- package/terminal/terminal.cjs.js +3 -3
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -3
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +3 -3
- package/terminal/terminal.min.js +1 -1
- package/textarea/Textarea.d.ts +5 -6
- package/textarea/Textarea.vue +7 -7
- package/textarea/textarea.cjs.js +6 -6
- package/textarea/textarea.esm.js +6 -6
- package/textarea/textarea.js +6 -6
- package/tieredmenu/TieredMenu.d.ts +48 -6
- package/tieredmenu/TieredMenu.vue +500 -58
- package/tieredmenu/TieredMenuSub.vue +126 -208
- package/tieredmenu/tieredmenu.cjs.js +684 -338
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +685 -339
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +685 -339
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +4 -5
- package/timeline/Timeline.vue +6 -10
- package/timeline/timeline.cjs.js +3 -7
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -7
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +3 -7
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +10 -13
- package/toast/Toast.vue +40 -31
- package/toast/ToastMessage.vue +29 -20
- package/toast/toast.cjs.js +56 -38
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +55 -37
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +56 -38
- package/toast/toast.min.js +1 -1
- package/toastservice/toastservice.cjs.js +1 -0
- package/toastservice/toastservice.esm.js +1 -0
- package/toastservice/toastservice.js +1 -0
- package/togglebutton/ToggleButton.d.ts +10 -10
- package/togglebutton/ToggleButton.vue +82 -23
- package/togglebutton/togglebutton.cjs.js +66 -18
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +66 -18
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +66 -18
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +8 -5
- package/toolbar/Toolbar.vue +9 -3
- package/toolbar/toolbar.cjs.js +14 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +14 -7
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +14 -7
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +36 -24
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +37 -25
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +36 -24
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +15 -7
- package/tree/Tree.vue +66 -56
- package/tree/TreeNode.vue +70 -66
- package/tree/tree.cjs.js +99 -102
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +99 -102
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +99 -102
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +9 -9
- package/treeselect/TreeSelect.vue +130 -72
- package/treeselect/treeselect.cjs.js +89 -59
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +89 -59
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +89 -59
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +29 -19
- package/treetable/FooterCell.vue +19 -11
- package/treetable/HeaderCell.vue +44 -36
- package/treetable/TreeTable.d.ts +8 -8
- package/treetable/TreeTable.vue +229 -178
- package/treetable/TreeTableRow.vue +74 -58
- package/treetable/treetable.cjs.js +287 -253
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +287 -253
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +287 -253
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +9 -9
- package/tristatecheckbox/TriStateCheckbox.vue +39 -18
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -15
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +24 -15
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -15
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +16 -10
- package/useconfirm/UseConfirm.d.ts +1 -1
- package/useconfirm/useconfirm.cjs.js +2 -1
- package/useconfirm/useconfirm.esm.js +2 -1
- package/useconfirm/useconfirm.js +2 -1
- package/usedialog/UseDialog.d.ts +1 -1
- package/usedialog/usedialog.cjs.js +2 -1
- package/usedialog/usedialog.esm.js +2 -1
- package/usedialog/usedialog.js +2 -1
- package/usetoast/usetoast.cjs.js +2 -1
- package/usetoast/usetoast.esm.js +2 -1
- package/usetoast/usetoast.js +2 -1
- package/utils/Utils.d.ts +10 -5
- package/utils/utils.cjs.js +209 -156
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +209 -156
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +209 -156
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +335 -3
- package/vetur-tags.json +112 -19
- package/virtualscroller/VirtualScroller.d.ts +9 -9
- package/virtualscroller/VirtualScroller.vue +108 -96
- package/virtualscroller/virtualscroller.cjs.js +87 -89
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +87 -89
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +87 -89
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1183 -73
package/calendar/calendar.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler, UniqueComponentId } from 'primevue/utils';
|
|
2
|
-
import OverlayEventBus from 'primevue/overlayeventbus';
|
|
3
1
|
import Button from 'primevue/button';
|
|
4
|
-
import
|
|
2
|
+
import OverlayEventBus from 'primevue/overlayeventbus';
|
|
5
3
|
import Portal from 'primevue/portal';
|
|
4
|
+
import Ripple from 'primevue/ripple';
|
|
5
|
+
import { DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler, UniqueComponentId } from 'primevue/utils';
|
|
6
6
|
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, mergeProps, createCommentVNode, createBlock, createVNode, withCtx, Transition, Fragment, createElementVNode, renderList, renderSlot, withDirectives, vShow, toDisplayString, createTextVNode, withKeys } from 'vue';
|
|
7
7
|
|
|
8
8
|
var script = {
|
|
@@ -167,17 +167,41 @@ var script = {
|
|
|
167
167
|
type: String,
|
|
168
168
|
default: null
|
|
169
169
|
},
|
|
170
|
-
id:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
170
|
+
id: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: null
|
|
173
|
+
},
|
|
174
|
+
inputId: {
|
|
175
|
+
type: String,
|
|
176
|
+
default: null
|
|
177
|
+
},
|
|
178
|
+
inputClass: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: null
|
|
181
|
+
},
|
|
182
|
+
inputStyle: {
|
|
183
|
+
type: null,
|
|
184
|
+
default: null
|
|
185
|
+
},
|
|
186
|
+
inputProps: {
|
|
187
|
+
type: null,
|
|
188
|
+
default: null
|
|
189
|
+
},
|
|
190
|
+
panelClass: {
|
|
191
|
+
type: String,
|
|
192
|
+
default: null
|
|
193
|
+
},
|
|
194
|
+
panelStyle: {
|
|
195
|
+
type: null,
|
|
196
|
+
default: null
|
|
197
|
+
},
|
|
198
|
+
panelProps: {
|
|
199
|
+
type: null,
|
|
200
|
+
default: null
|
|
201
|
+
},
|
|
178
202
|
'aria-labelledby': {
|
|
179
203
|
type: String,
|
|
180
|
-
|
|
204
|
+
default: null
|
|
181
205
|
},
|
|
182
206
|
'aria-label': {
|
|
183
207
|
type: String,
|
|
@@ -196,6 +220,55 @@ var script = {
|
|
|
196
220
|
timePickerTimer: null,
|
|
197
221
|
preventFocus: false,
|
|
198
222
|
typeUpdate: false,
|
|
223
|
+
data() {
|
|
224
|
+
return {
|
|
225
|
+
currentMonth: null,
|
|
226
|
+
currentYear: null,
|
|
227
|
+
currentHour: null,
|
|
228
|
+
currentMinute: null,
|
|
229
|
+
currentSecond: null,
|
|
230
|
+
pm: null,
|
|
231
|
+
focused: false,
|
|
232
|
+
overlayVisible: false,
|
|
233
|
+
currentView: this.view
|
|
234
|
+
};
|
|
235
|
+
},
|
|
236
|
+
watch: {
|
|
237
|
+
modelValue(newValue) {
|
|
238
|
+
this.updateCurrentMetaData();
|
|
239
|
+
|
|
240
|
+
if (!this.typeUpdate && !this.inline && this.input) {
|
|
241
|
+
this.input.value = this.formatValue(newValue);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
this.typeUpdate = false;
|
|
245
|
+
},
|
|
246
|
+
showTime() {
|
|
247
|
+
this.updateCurrentMetaData();
|
|
248
|
+
},
|
|
249
|
+
months() {
|
|
250
|
+
if (this.overlay) {
|
|
251
|
+
if (!this.focused) {
|
|
252
|
+
if (this.inline) {
|
|
253
|
+
this.preventFocus = true;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
setTimeout(this.updateFocus, 0);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
numberOfMonths() {
|
|
261
|
+
this.destroyResponsiveStyleElement();
|
|
262
|
+
this.createResponsiveStyle();
|
|
263
|
+
},
|
|
264
|
+
responsiveOptions() {
|
|
265
|
+
this.destroyResponsiveStyleElement();
|
|
266
|
+
this.createResponsiveStyle();
|
|
267
|
+
},
|
|
268
|
+
currentView() {
|
|
269
|
+
Promise.resolve(null).then(() => this.alignOverlay());
|
|
270
|
+
}
|
|
271
|
+
},
|
|
199
272
|
created() {
|
|
200
273
|
this.updateCurrentMetaData();
|
|
201
274
|
},
|
|
@@ -213,8 +286,7 @@ var script = {
|
|
|
213
286
|
this.overlay.style.width = DomHandler.getOuterWidth(this.$el) + 'px';
|
|
214
287
|
}
|
|
215
288
|
}
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
289
|
+
} else {
|
|
218
290
|
this.input.value = this.formatValue(this.modelValue);
|
|
219
291
|
}
|
|
220
292
|
},
|
|
@@ -239,6 +311,7 @@ var script = {
|
|
|
239
311
|
if (this.mask) {
|
|
240
312
|
this.destroyMask();
|
|
241
313
|
}
|
|
314
|
+
|
|
242
315
|
this.destroyResponsiveStyleElement();
|
|
243
316
|
|
|
244
317
|
this.unbindOutsideClickListener();
|
|
@@ -252,51 +325,9 @@ var script = {
|
|
|
252
325
|
if (this.overlay && this.autoZIndex) {
|
|
253
326
|
ZIndexUtils.clear(this.overlay);
|
|
254
327
|
}
|
|
328
|
+
|
|
255
329
|
this.overlay = null;
|
|
256
330
|
},
|
|
257
|
-
data() {
|
|
258
|
-
return {
|
|
259
|
-
currentMonth: null,
|
|
260
|
-
currentYear: null,
|
|
261
|
-
currentHour: null,
|
|
262
|
-
currentMinute: null,
|
|
263
|
-
currentSecond: null,
|
|
264
|
-
pm: null,
|
|
265
|
-
focused: false,
|
|
266
|
-
overlayVisible: false,
|
|
267
|
-
currentView: this.view
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
watch: {
|
|
271
|
-
modelValue(newValue) {
|
|
272
|
-
this.updateCurrentMetaData();
|
|
273
|
-
if (!this.typeUpdate && !this.inline && this.input) {
|
|
274
|
-
this.input.value = this.formatValue(newValue);
|
|
275
|
-
}
|
|
276
|
-
this.typeUpdate = false;
|
|
277
|
-
},
|
|
278
|
-
showTime() {
|
|
279
|
-
this.updateCurrentMetaData();
|
|
280
|
-
},
|
|
281
|
-
months() {
|
|
282
|
-
if (this.overlay) {
|
|
283
|
-
if (!this.focused) {
|
|
284
|
-
setTimeout(this.updateFocus, 0);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
numberOfMonths() {
|
|
289
|
-
this.destroyResponsiveStyleElement();
|
|
290
|
-
this.createResponsiveStyle();
|
|
291
|
-
},
|
|
292
|
-
responsiveOptions() {
|
|
293
|
-
this.destroyResponsiveStyleElement();
|
|
294
|
-
this.createResponsiveStyle();
|
|
295
|
-
},
|
|
296
|
-
currentView() {
|
|
297
|
-
Promise.resolve(null).then(() => this.alignOverlay());
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
331
|
methods: {
|
|
301
332
|
isComparable() {
|
|
302
333
|
return this.modelValue != null && typeof this.modelValue !== 'string';
|
|
@@ -309,25 +340,23 @@ var script = {
|
|
|
309
340
|
if (this.modelValue) {
|
|
310
341
|
if (this.isSingleSelection()) {
|
|
311
342
|
return this.isDateEquals(this.modelValue, dateMeta);
|
|
312
|
-
}
|
|
313
|
-
else if (this.isMultipleSelection()) {
|
|
343
|
+
} else if (this.isMultipleSelection()) {
|
|
314
344
|
let selected = false;
|
|
345
|
+
|
|
315
346
|
for (let date of this.modelValue) {
|
|
316
347
|
selected = this.isDateEquals(date, dateMeta);
|
|
348
|
+
|
|
317
349
|
if (selected) {
|
|
318
350
|
break;
|
|
319
351
|
}
|
|
320
352
|
}
|
|
321
353
|
|
|
322
354
|
return selected;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
if (this.modelValue[1])
|
|
326
|
-
return this.isDateEquals(this.modelValue[0], dateMeta) || this.isDateEquals(this.modelValue[1], dateMeta) || this.isDateBetween(this.modelValue[0], this.modelValue[1], dateMeta);
|
|
355
|
+
} else if (this.isRangeSelection()) {
|
|
356
|
+
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);
|
|
327
357
|
else {
|
|
328
358
|
return this.isDateEquals(this.modelValue[0], dateMeta);
|
|
329
359
|
}
|
|
330
|
-
|
|
331
360
|
}
|
|
332
361
|
}
|
|
333
362
|
|
|
@@ -337,7 +366,7 @@ var script = {
|
|
|
337
366
|
if (this.isComparable()) {
|
|
338
367
|
let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
|
|
339
368
|
|
|
340
|
-
return !this.isMultipleSelection() ?
|
|
369
|
+
return !this.isMultipleSelection() ? value.getMonth() === month && value.getFullYear() === this.currentYear : false;
|
|
341
370
|
}
|
|
342
371
|
|
|
343
372
|
return false;
|
|
@@ -346,21 +375,21 @@ var script = {
|
|
|
346
375
|
if (this.isComparable()) {
|
|
347
376
|
let value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
|
|
348
377
|
|
|
349
|
-
return !this.isMultipleSelection() && this.isComparable() ?
|
|
378
|
+
return !this.isMultipleSelection() && this.isComparable() ? value.getFullYear() === year : false;
|
|
350
379
|
}
|
|
351
380
|
|
|
352
381
|
return false;
|
|
353
382
|
},
|
|
354
383
|
isDateEquals(value, dateMeta) {
|
|
355
|
-
if (value)
|
|
356
|
-
|
|
357
|
-
else
|
|
358
|
-
return false;
|
|
384
|
+
if (value) return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;
|
|
385
|
+
else return false;
|
|
359
386
|
},
|
|
360
387
|
isDateBetween(start, end, dateMeta) {
|
|
361
388
|
let between = false;
|
|
389
|
+
|
|
362
390
|
if (start && end) {
|
|
363
391
|
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
392
|
+
|
|
364
393
|
return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();
|
|
365
394
|
}
|
|
366
395
|
|
|
@@ -368,11 +397,13 @@ var script = {
|
|
|
368
397
|
},
|
|
369
398
|
getFirstDayOfMonthIndex(month, year) {
|
|
370
399
|
let day = new Date();
|
|
400
|
+
|
|
371
401
|
day.setDate(1);
|
|
372
402
|
day.setMonth(month);
|
|
373
403
|
day.setFullYear(year);
|
|
374
404
|
|
|
375
405
|
let dayIndex = day.getDay() + this.sundayIndex;
|
|
406
|
+
|
|
376
407
|
return dayIndex >= 7 ? dayIndex - 7 : dayIndex;
|
|
377
408
|
},
|
|
378
409
|
getDaysCountInMonth(month, year) {
|
|
@@ -380,6 +411,7 @@ var script = {
|
|
|
380
411
|
},
|
|
381
412
|
getDaysCountInPrevMonth(month, year) {
|
|
382
413
|
let prev = this.getPreviousMonthAndYear(month, year);
|
|
414
|
+
|
|
383
415
|
return this.getDaysCountInMonth(prev.month, prev.year);
|
|
384
416
|
},
|
|
385
417
|
getPreviousMonthAndYear(month, year) {
|
|
@@ -388,13 +420,12 @@ var script = {
|
|
|
388
420
|
if (month === 0) {
|
|
389
421
|
m = 11;
|
|
390
422
|
y = year - 1;
|
|
391
|
-
}
|
|
392
|
-
else {
|
|
423
|
+
} else {
|
|
393
424
|
m = month - 1;
|
|
394
425
|
y = year;
|
|
395
426
|
}
|
|
396
427
|
|
|
397
|
-
return {
|
|
428
|
+
return { month: m, year: y };
|
|
398
429
|
},
|
|
399
430
|
getNextMonthAndYear(month, year) {
|
|
400
431
|
let m, y;
|
|
@@ -402,13 +433,12 @@ var script = {
|
|
|
402
433
|
if (month === 11) {
|
|
403
434
|
m = 0;
|
|
404
435
|
y = year + 1;
|
|
405
|
-
}
|
|
406
|
-
else {
|
|
436
|
+
} else {
|
|
407
437
|
m = month + 1;
|
|
408
438
|
y = year;
|
|
409
439
|
}
|
|
410
440
|
|
|
411
|
-
return {
|
|
441
|
+
return { month: m, year: y };
|
|
412
442
|
},
|
|
413
443
|
daylightSavingAdjust(date) {
|
|
414
444
|
if (!date) {
|
|
@@ -435,12 +465,10 @@ var script = {
|
|
|
435
465
|
if (this.minDate) {
|
|
436
466
|
if (this.minDate.getFullYear() > year) {
|
|
437
467
|
validMin = false;
|
|
438
|
-
}
|
|
439
|
-
else if (this.minDate.getFullYear() === year) {
|
|
468
|
+
} else if (this.minDate.getFullYear() === year) {
|
|
440
469
|
if (this.minDate.getMonth() > month) {
|
|
441
470
|
validMin = false;
|
|
442
|
-
}
|
|
443
|
-
else if (this.minDate.getMonth() === month) {
|
|
471
|
+
} else if (this.minDate.getMonth() === month) {
|
|
444
472
|
if (this.minDate.getDate() > day) {
|
|
445
473
|
validMin = false;
|
|
446
474
|
}
|
|
@@ -451,12 +479,10 @@ var script = {
|
|
|
451
479
|
if (this.maxDate) {
|
|
452
480
|
if (this.maxDate.getFullYear() < year) {
|
|
453
481
|
validMax = false;
|
|
454
|
-
}
|
|
455
|
-
else if (this.maxDate.getFullYear() === year) {
|
|
482
|
+
} else if (this.maxDate.getFullYear() === year) {
|
|
456
483
|
if (this.maxDate.getMonth() < month) {
|
|
457
484
|
validMax = false;
|
|
458
|
-
}
|
|
459
|
-
else if (this.maxDate.getMonth() === month) {
|
|
485
|
+
} else if (this.maxDate.getMonth() === month) {
|
|
460
486
|
if (this.maxDate.getDate() < day) {
|
|
461
487
|
validMax = false;
|
|
462
488
|
}
|
|
@@ -465,11 +491,11 @@ var script = {
|
|
|
465
491
|
}
|
|
466
492
|
|
|
467
493
|
if (this.disabledDates) {
|
|
468
|
-
validDate = !this.isDateDisabled(day,month,year);
|
|
494
|
+
validDate = !this.isDateDisabled(day, month, year);
|
|
469
495
|
}
|
|
470
496
|
|
|
471
497
|
if (this.disabledDays) {
|
|
472
|
-
validDay = !this.isDayDisabled(day,month,year);
|
|
498
|
+
validDay = !this.isDayDisabled(day, month, year);
|
|
473
499
|
}
|
|
474
500
|
|
|
475
501
|
return validMin && validMax && validDate && validDay;
|
|
@@ -478,10 +504,8 @@ var script = {
|
|
|
478
504
|
el.setAttribute(this.attributeSelector, '');
|
|
479
505
|
|
|
480
506
|
if (this.autoZIndex) {
|
|
481
|
-
if (this.touchUI)
|
|
482
|
-
|
|
483
|
-
else
|
|
484
|
-
ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
|
|
507
|
+
if (this.touchUI) ZIndexUtils.set('modal', el, this.baseZIndex || this.$primevue.config.zIndex.modal);
|
|
508
|
+
else ZIndexUtils.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
|
|
485
509
|
}
|
|
486
510
|
|
|
487
511
|
this.alignOverlay();
|
|
@@ -511,14 +535,14 @@ var script = {
|
|
|
511
535
|
this.overlay = null;
|
|
512
536
|
},
|
|
513
537
|
onPrevButtonClick(event) {
|
|
514
|
-
if(this.showOtherMonths) {
|
|
515
|
-
this.navigationState = {backward: true, button: true};
|
|
538
|
+
if (this.showOtherMonths) {
|
|
539
|
+
this.navigationState = { backward: true, button: true };
|
|
516
540
|
this.navBackward(event);
|
|
517
541
|
}
|
|
518
542
|
},
|
|
519
543
|
onNextButtonClick(event) {
|
|
520
|
-
if(this.showOtherMonths) {
|
|
521
|
-
this.navigationState = {backward: false, button: true};
|
|
544
|
+
if (this.showOtherMonths) {
|
|
545
|
+
this.navigationState = { backward: false, button: true };
|
|
522
546
|
this.navForward(event);
|
|
523
547
|
}
|
|
524
548
|
},
|
|
@@ -531,24 +555,20 @@ var script = {
|
|
|
531
555
|
|
|
532
556
|
if (this.currentView === 'month') {
|
|
533
557
|
this.decrementYear();
|
|
534
|
-
}
|
|
535
|
-
else if (this.currentView === 'year') {
|
|
558
|
+
} else if (this.currentView === 'year') {
|
|
536
559
|
this.decrementDecade();
|
|
537
|
-
}
|
|
538
|
-
else {
|
|
560
|
+
} else {
|
|
539
561
|
if (event.shiftKey) {
|
|
540
562
|
this.decrementYear();
|
|
541
|
-
}
|
|
542
|
-
else {
|
|
563
|
+
} else {
|
|
543
564
|
if (this.currentMonth === 0) {
|
|
544
565
|
this.currentMonth = 11;
|
|
545
566
|
this.decrementYear();
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
567
|
+
} else {
|
|
548
568
|
this.currentMonth--;
|
|
549
569
|
}
|
|
550
570
|
|
|
551
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
571
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
552
572
|
}
|
|
553
573
|
}
|
|
554
574
|
},
|
|
@@ -561,24 +581,20 @@ var script = {
|
|
|
561
581
|
|
|
562
582
|
if (this.currentView === 'month') {
|
|
563
583
|
this.incrementYear();
|
|
564
|
-
}
|
|
565
|
-
else if (this.currentView === 'year') {
|
|
584
|
+
} else if (this.currentView === 'year') {
|
|
566
585
|
this.incrementDecade();
|
|
567
|
-
}
|
|
568
|
-
else {
|
|
586
|
+
} else {
|
|
569
587
|
if (event.shiftKey) {
|
|
570
588
|
this.incrementYear();
|
|
571
|
-
}
|
|
572
|
-
else {
|
|
589
|
+
} else {
|
|
573
590
|
if (this.currentMonth === 11) {
|
|
574
591
|
this.currentMonth = 0;
|
|
575
592
|
this.incrementYear();
|
|
576
|
-
}
|
|
577
|
-
else {
|
|
593
|
+
} else {
|
|
578
594
|
this.currentMonth++;
|
|
579
595
|
}
|
|
580
596
|
|
|
581
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
597
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
582
598
|
}
|
|
583
599
|
}
|
|
584
600
|
},
|
|
@@ -613,10 +629,8 @@ var script = {
|
|
|
613
629
|
if (this.hourFormat === '12') {
|
|
614
630
|
this.pm = currentHour > 11;
|
|
615
631
|
|
|
616
|
-
if (currentHour >= 12)
|
|
617
|
-
|
|
618
|
-
else
|
|
619
|
-
currentHour = (currentHour == 0) ? 12 : currentHour;
|
|
632
|
+
if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
|
|
633
|
+
else currentHour = currentHour == 0 ? 12 : currentHour;
|
|
620
634
|
}
|
|
621
635
|
|
|
622
636
|
this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
|
|
@@ -630,6 +644,7 @@ var script = {
|
|
|
630
644
|
this.overlayVisible = false;
|
|
631
645
|
}
|
|
632
646
|
};
|
|
647
|
+
|
|
633
648
|
document.addEventListener('mousedown', this.outsideClickListener);
|
|
634
649
|
}
|
|
635
650
|
},
|
|
@@ -662,6 +677,7 @@ var script = {
|
|
|
662
677
|
this.overlayVisible = false;
|
|
663
678
|
}
|
|
664
679
|
};
|
|
680
|
+
|
|
665
681
|
window.addEventListener('resize', this.resizeListener);
|
|
666
682
|
}
|
|
667
683
|
},
|
|
@@ -672,27 +688,27 @@ var script = {
|
|
|
672
688
|
}
|
|
673
689
|
},
|
|
674
690
|
isOutsideClicked(event) {
|
|
675
|
-
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) ||
|
|
676
|
-
this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
691
|
+
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) || this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
677
692
|
},
|
|
678
693
|
isNavIconClicked(event) {
|
|
679
|
-
return (
|
|
680
|
-
|
|
694
|
+
return (
|
|
695
|
+
DomHandler.hasClass(event.target, 'p-datepicker-prev') ||
|
|
696
|
+
DomHandler.hasClass(event.target, 'p-datepicker-prev-icon') ||
|
|
697
|
+
DomHandler.hasClass(event.target, 'p-datepicker-next') ||
|
|
698
|
+
DomHandler.hasClass(event.target, 'p-datepicker-next-icon')
|
|
699
|
+
);
|
|
681
700
|
},
|
|
682
701
|
alignOverlay() {
|
|
683
702
|
if (this.touchUI) {
|
|
684
703
|
this.enableModality();
|
|
685
|
-
}
|
|
686
|
-
else if (this.overlay) {
|
|
704
|
+
} else if (this.overlay) {
|
|
687
705
|
if (this.appendTo === 'self' || this.inline) {
|
|
688
706
|
DomHandler.relativePosition(this.overlay, this.$el);
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
707
|
+
} else {
|
|
691
708
|
if (this.view === 'date') {
|
|
692
709
|
this.overlay.style.width = DomHandler.getOuterWidth(this.overlay) + 'px';
|
|
693
710
|
this.overlay.style.minWidth = DomHandler.getOuterWidth(this.$el) + 'px';
|
|
694
|
-
}
|
|
695
|
-
else {
|
|
711
|
+
} else {
|
|
696
712
|
this.overlay.style.width = DomHandler.getOuterWidth(this.$el) + 'px';
|
|
697
713
|
}
|
|
698
714
|
|
|
@@ -705,8 +721,7 @@ var script = {
|
|
|
705
721
|
if (!this.overlayVisible) {
|
|
706
722
|
this.input.focus();
|
|
707
723
|
this.overlayVisible = true;
|
|
708
|
-
}
|
|
709
|
-
else {
|
|
724
|
+
} else {
|
|
710
725
|
this.overlayVisible = false;
|
|
711
726
|
}
|
|
712
727
|
}
|
|
@@ -726,41 +741,42 @@ var script = {
|
|
|
726
741
|
if (this.disabledDays) {
|
|
727
742
|
let weekday = new Date(year, month, day);
|
|
728
743
|
let weekdayNumber = weekday.getDay();
|
|
744
|
+
|
|
729
745
|
return this.disabledDays.indexOf(weekdayNumber) !== -1;
|
|
730
746
|
}
|
|
747
|
+
|
|
731
748
|
return false;
|
|
732
749
|
},
|
|
733
750
|
onMonthDropdownChange(value) {
|
|
734
751
|
this.currentMonth = parseInt(value);
|
|
735
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
752
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
736
753
|
},
|
|
737
754
|
onYearDropdownChange(value) {
|
|
738
755
|
this.currentYear = parseInt(value);
|
|
739
|
-
this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
756
|
+
this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
740
757
|
},
|
|
741
758
|
onDateSelect(event, dateMeta) {
|
|
742
759
|
if (this.disabled || !dateMeta.selectable) {
|
|
743
760
|
return;
|
|
744
761
|
}
|
|
745
762
|
|
|
746
|
-
DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach(cell => cell.tabIndex = -1);
|
|
763
|
+
DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach((cell) => (cell.tabIndex = -1));
|
|
747
764
|
|
|
748
765
|
if (event) {
|
|
749
766
|
event.currentTarget.focus();
|
|
750
767
|
}
|
|
751
768
|
|
|
752
769
|
if (this.isMultipleSelection() && this.isSelected(dateMeta)) {
|
|
753
|
-
let newValue = this.modelValue.filter(date => !this.isDateEquals(date, dateMeta));
|
|
770
|
+
let newValue = this.modelValue.filter((date) => !this.isDateEquals(date, dateMeta));
|
|
771
|
+
|
|
754
772
|
this.updateModel(newValue);
|
|
755
|
-
}
|
|
756
|
-
else {
|
|
773
|
+
} else {
|
|
757
774
|
if (this.shouldSelectDate(dateMeta)) {
|
|
758
775
|
if (dateMeta.otherMonth) {
|
|
759
776
|
this.currentMonth = dateMeta.month;
|
|
760
777
|
this.currentYear = dateMeta.year;
|
|
761
778
|
this.selectDate(dateMeta);
|
|
762
|
-
}
|
|
763
|
-
else {
|
|
779
|
+
} else {
|
|
764
780
|
this.selectDate(dateMeta);
|
|
765
781
|
}
|
|
766
782
|
}
|
|
@@ -777,10 +793,8 @@ var script = {
|
|
|
777
793
|
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
778
794
|
|
|
779
795
|
if (this.showTime) {
|
|
780
|
-
if (this.hourFormat === '12' && this.pm && this.currentHour != 12)
|
|
781
|
-
|
|
782
|
-
else
|
|
783
|
-
date.setHours(this.currentHour);
|
|
796
|
+
if (this.hourFormat === '12' && this.pm && this.currentHour != 12) date.setHours(this.currentHour + 12);
|
|
797
|
+
else date.setHours(this.currentHour);
|
|
784
798
|
|
|
785
799
|
date.setMinutes(this.currentMinute);
|
|
786
800
|
date.setSeconds(this.currentSecond);
|
|
@@ -804,25 +818,22 @@ var script = {
|
|
|
804
818
|
|
|
805
819
|
if (this.isSingleSelection()) {
|
|
806
820
|
modelVal = date;
|
|
807
|
-
}
|
|
808
|
-
else if (this.isMultipleSelection()) {
|
|
821
|
+
} else if (this.isMultipleSelection()) {
|
|
809
822
|
modelVal = this.modelValue ? [...this.modelValue, date] : [date];
|
|
810
|
-
}
|
|
811
|
-
else if (this.isRangeSelection()) {
|
|
823
|
+
} else if (this.isRangeSelection()) {
|
|
812
824
|
if (this.modelValue && this.modelValue.length) {
|
|
813
825
|
let startDate = this.modelValue[0];
|
|
814
826
|
let endDate = this.modelValue[1];
|
|
815
827
|
|
|
816
828
|
if (!endDate && date.getTime() >= startDate.getTime()) {
|
|
817
829
|
endDate = date;
|
|
818
|
-
}
|
|
819
|
-
else {
|
|
830
|
+
} else {
|
|
820
831
|
startDate = date;
|
|
821
832
|
endDate = null;
|
|
822
833
|
}
|
|
834
|
+
|
|
823
835
|
modelVal = [startDate, endDate];
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
836
|
+
} else {
|
|
826
837
|
modelVal = [date, null];
|
|
827
838
|
}
|
|
828
839
|
}
|
|
@@ -836,16 +847,15 @@ var script = {
|
|
|
836
847
|
this.overlayVisible = false;
|
|
837
848
|
}, 150);
|
|
838
849
|
}
|
|
850
|
+
|
|
839
851
|
this.$emit('date-select', date);
|
|
840
852
|
},
|
|
841
853
|
updateModel(value) {
|
|
842
854
|
this.$emit('update:modelValue', value);
|
|
843
855
|
},
|
|
844
856
|
shouldSelectDate() {
|
|
845
|
-
if (this.isMultipleSelection())
|
|
846
|
-
|
|
847
|
-
else
|
|
848
|
-
return true;
|
|
857
|
+
if (this.isMultipleSelection()) return this.maxDateCount != null ? this.maxDateCount > (this.modelValue ? this.modelValue.length : 0) : true;
|
|
858
|
+
else return true;
|
|
849
859
|
},
|
|
850
860
|
isSingleSelection() {
|
|
851
861
|
return this.selectionMode === 'single';
|
|
@@ -862,33 +872,34 @@ var script = {
|
|
|
862
872
|
}
|
|
863
873
|
|
|
864
874
|
let formattedValue = '';
|
|
875
|
+
|
|
865
876
|
if (value) {
|
|
866
877
|
try {
|
|
867
878
|
if (this.isSingleSelection()) {
|
|
868
879
|
formattedValue = this.formatDateTime(value);
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
for(let i = 0; i < value.length; i++) {
|
|
880
|
+
} else if (this.isMultipleSelection()) {
|
|
881
|
+
for (let i = 0; i < value.length; i++) {
|
|
872
882
|
let dateAsString = this.formatDateTime(value[i]);
|
|
883
|
+
|
|
873
884
|
formattedValue += dateAsString;
|
|
874
|
-
|
|
885
|
+
|
|
886
|
+
if (i !== value.length - 1) {
|
|
875
887
|
formattedValue += ', ';
|
|
876
888
|
}
|
|
877
889
|
}
|
|
878
|
-
}
|
|
879
|
-
else if (this.isRangeSelection()) {
|
|
890
|
+
} else if (this.isRangeSelection()) {
|
|
880
891
|
if (value && value.length) {
|
|
881
892
|
let startDate = value[0];
|
|
882
893
|
let endDate = value[1];
|
|
883
894
|
|
|
884
895
|
formattedValue = this.formatDateTime(startDate);
|
|
896
|
+
|
|
885
897
|
if (endDate) {
|
|
886
898
|
formattedValue += ' - ' + this.formatDateTime(endDate);
|
|
887
899
|
}
|
|
888
900
|
}
|
|
889
901
|
}
|
|
890
|
-
}
|
|
891
|
-
catch(err) {
|
|
902
|
+
} catch (err) {
|
|
892
903
|
formattedValue = value;
|
|
893
904
|
}
|
|
894
905
|
}
|
|
@@ -897,13 +908,14 @@ var script = {
|
|
|
897
908
|
},
|
|
898
909
|
formatDateTime(date) {
|
|
899
910
|
let formattedValue = null;
|
|
911
|
+
|
|
900
912
|
if (date) {
|
|
901
|
-
if(this.timeOnly) {
|
|
913
|
+
if (this.timeOnly) {
|
|
902
914
|
formattedValue = this.formatTime(date);
|
|
903
|
-
}
|
|
904
|
-
else {
|
|
915
|
+
} else {
|
|
905
916
|
formattedValue = this.formatDate(date, this.datePattern);
|
|
906
|
-
|
|
917
|
+
|
|
918
|
+
if (this.showTime) {
|
|
907
919
|
formattedValue += ' ' + this.formatTime(date);
|
|
908
920
|
}
|
|
909
921
|
}
|
|
@@ -917,32 +929,38 @@ var script = {
|
|
|
917
929
|
}
|
|
918
930
|
|
|
919
931
|
let iFormat;
|
|
932
|
+
|
|
920
933
|
const lookAhead = (match) => {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
934
|
+
const matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
|
|
935
|
+
|
|
936
|
+
if (matches) {
|
|
937
|
+
iFormat++;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
return matches;
|
|
941
|
+
},
|
|
927
942
|
formatNumber = (match, value, len) => {
|
|
928
943
|
let num = '' + value;
|
|
944
|
+
|
|
929
945
|
if (lookAhead(match)) {
|
|
930
946
|
while (num.length < len) {
|
|
931
947
|
num = '0' + num;
|
|
932
948
|
}
|
|
933
949
|
}
|
|
950
|
+
|
|
934
951
|
return num;
|
|
935
952
|
},
|
|
936
953
|
formatName = (match, value, shortNames, longNames) => {
|
|
937
|
-
return
|
|
954
|
+
return lookAhead(match) ? longNames[value] : shortNames[value];
|
|
938
955
|
};
|
|
956
|
+
|
|
939
957
|
let output = '';
|
|
940
958
|
let literal = false;
|
|
941
959
|
|
|
942
960
|
if (date) {
|
|
943
961
|
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
|
944
962
|
if (literal) {
|
|
945
|
-
if (format.charAt(iFormat) === '
|
|
963
|
+
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
|
946
964
|
literal = false;
|
|
947
965
|
} else {
|
|
948
966
|
output += format.charAt(iFormat);
|
|
@@ -956,16 +974,13 @@ var script = {
|
|
|
956
974
|
output += formatName('D', date.getDay(), this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
|
|
957
975
|
break;
|
|
958
976
|
case 'o':
|
|
959
|
-
output += formatNumber('o',
|
|
960
|
-
Math.round((
|
|
961
|
-
new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() -
|
|
962
|
-
new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
|
977
|
+
output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
|
963
978
|
break;
|
|
964
979
|
case 'm':
|
|
965
980
|
output += formatNumber('m', date.getMonth() + 1, 2);
|
|
966
981
|
break;
|
|
967
982
|
case 'M':
|
|
968
|
-
output += formatName('M',date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
983
|
+
output += formatName('M', date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
969
984
|
break;
|
|
970
985
|
case 'y':
|
|
971
986
|
output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + (date.getFullYear() % 100);
|
|
@@ -976,12 +991,13 @@ var script = {
|
|
|
976
991
|
case '!':
|
|
977
992
|
output += date.getTime() * 10000 + this.ticksTo1970;
|
|
978
993
|
break;
|
|
979
|
-
case '
|
|
980
|
-
if (lookAhead('
|
|
981
|
-
output += '
|
|
994
|
+
case "'":
|
|
995
|
+
if (lookAhead("'")) {
|
|
996
|
+
output += "'";
|
|
982
997
|
} else {
|
|
983
998
|
literal = true;
|
|
984
999
|
}
|
|
1000
|
+
|
|
985
1001
|
break;
|
|
986
1002
|
default:
|
|
987
1003
|
output += format.charAt(iFormat);
|
|
@@ -989,6 +1005,7 @@ var script = {
|
|
|
989
1005
|
}
|
|
990
1006
|
}
|
|
991
1007
|
}
|
|
1008
|
+
|
|
992
1009
|
return output;
|
|
993
1010
|
},
|
|
994
1011
|
formatTime(date) {
|
|
@@ -1006,21 +1023,21 @@ var script = {
|
|
|
1006
1023
|
}
|
|
1007
1024
|
|
|
1008
1025
|
if (this.hourFormat === '12') {
|
|
1009
|
-
output += hours === 0 ? 12 :
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
output += (hours < 10) ? '0' + hours : hours;
|
|
1026
|
+
output += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;
|
|
1027
|
+
} else {
|
|
1028
|
+
output += hours < 10 ? '0' + hours : hours;
|
|
1013
1029
|
}
|
|
1030
|
+
|
|
1014
1031
|
output += ':';
|
|
1015
|
-
output +=
|
|
1032
|
+
output += minutes < 10 ? '0' + minutes : minutes;
|
|
1016
1033
|
|
|
1017
1034
|
if (this.showSeconds) {
|
|
1018
1035
|
output += ':';
|
|
1019
|
-
output +=
|
|
1036
|
+
output += seconds < 10 ? '0' + seconds : seconds;
|
|
1020
1037
|
}
|
|
1021
1038
|
|
|
1022
1039
|
if (this.hourFormat === '12') {
|
|
1023
|
-
output += date.getHours() > 11 ?
|
|
1040
|
+
output += date.getHours() > 11 ? ` ${this.$primevue.config.locale.pm}` : ` ${this.$primevue.config.locale.am}`;
|
|
1024
1041
|
}
|
|
1025
1042
|
|
|
1026
1043
|
return output;
|
|
@@ -1063,44 +1080,39 @@ var script = {
|
|
|
1063
1080
|
this.clearTimePickerTimer();
|
|
1064
1081
|
},
|
|
1065
1082
|
repeat(event, interval, type, direction) {
|
|
1066
|
-
let i = interval||500;
|
|
1083
|
+
let i = interval || 500;
|
|
1067
1084
|
|
|
1068
1085
|
this.clearTimePickerTimer();
|
|
1069
1086
|
this.timePickerTimer = setTimeout(() => {
|
|
1070
1087
|
this.repeat(event, 100, type, direction);
|
|
1071
1088
|
}, i);
|
|
1072
1089
|
|
|
1073
|
-
switch(type) {
|
|
1090
|
+
switch (type) {
|
|
1074
1091
|
case 0:
|
|
1075
|
-
if (direction === 1)
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
this.decrementHour(event);
|
|
1079
|
-
break;
|
|
1092
|
+
if (direction === 1) this.incrementHour(event);
|
|
1093
|
+
else this.decrementHour(event);
|
|
1094
|
+
break;
|
|
1080
1095
|
|
|
1081
1096
|
case 1:
|
|
1082
|
-
if (direction === 1)
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
this.decrementMinute(event);
|
|
1086
|
-
break;
|
|
1097
|
+
if (direction === 1) this.incrementMinute(event);
|
|
1098
|
+
else this.decrementMinute(event);
|
|
1099
|
+
break;
|
|
1087
1100
|
|
|
1088
1101
|
case 2:
|
|
1089
|
-
if (direction === 1)
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
this.decrementSecond(event);
|
|
1093
|
-
break;
|
|
1102
|
+
if (direction === 1) this.incrementSecond(event);
|
|
1103
|
+
else this.decrementSecond(event);
|
|
1104
|
+
break;
|
|
1094
1105
|
}
|
|
1095
1106
|
},
|
|
1096
1107
|
convertTo24Hour(hours, pm) {
|
|
1097
1108
|
if (this.hourFormat == '12') {
|
|
1098
1109
|
if (hours === 12) {
|
|
1099
|
-
return
|
|
1110
|
+
return pm ? 12 : 0;
|
|
1100
1111
|
} else {
|
|
1101
|
-
return
|
|
1112
|
+
return pm ? hours + 12 : hours;
|
|
1102
1113
|
}
|
|
1103
1114
|
}
|
|
1115
|
+
|
|
1104
1116
|
return hours;
|
|
1105
1117
|
},
|
|
1106
1118
|
validateTime(hour, minute, second, pm) {
|
|
@@ -1110,18 +1122,23 @@ var script = {
|
|
|
1110
1122
|
if (this.isRangeSelection()) {
|
|
1111
1123
|
value = this.modelValue[1] || this.modelValue[0];
|
|
1112
1124
|
}
|
|
1125
|
+
|
|
1113
1126
|
if (this.isMultipleSelection()) {
|
|
1114
1127
|
value = this.modelValue[this.modelValue.length - 1];
|
|
1115
1128
|
}
|
|
1129
|
+
|
|
1116
1130
|
const valueDateString = value ? value.toDateString() : null;
|
|
1131
|
+
|
|
1117
1132
|
if (this.minDate && valueDateString && this.minDate.toDateString() === valueDateString) {
|
|
1118
1133
|
if (this.minDate.getHours() > convertedHour) {
|
|
1119
1134
|
return false;
|
|
1120
1135
|
}
|
|
1136
|
+
|
|
1121
1137
|
if (this.minDate.getHours() === convertedHour) {
|
|
1122
1138
|
if (this.minDate.getMinutes() > minute) {
|
|
1123
1139
|
return false;
|
|
1124
1140
|
}
|
|
1141
|
+
|
|
1125
1142
|
if (this.minDate.getMinutes() === minute) {
|
|
1126
1143
|
if (this.minDate.getSeconds() > second) {
|
|
1127
1144
|
return false;
|
|
@@ -1134,10 +1151,12 @@ var script = {
|
|
|
1134
1151
|
if (this.maxDate.getHours() < convertedHour) {
|
|
1135
1152
|
return false;
|
|
1136
1153
|
}
|
|
1154
|
+
|
|
1137
1155
|
if (this.maxDate.getHours() === convertedHour) {
|
|
1138
1156
|
if (this.maxDate.getMinutes() < minute) {
|
|
1139
1157
|
return false;
|
|
1140
1158
|
}
|
|
1159
|
+
|
|
1141
1160
|
if (this.maxDate.getMinutes() === minute) {
|
|
1142
1161
|
if (this.maxDate.getSeconds() < second) {
|
|
1143
1162
|
return false;
|
|
@@ -1145,6 +1164,7 @@ var script = {
|
|
|
1145
1164
|
}
|
|
1146
1165
|
}
|
|
1147
1166
|
}
|
|
1167
|
+
|
|
1148
1168
|
return true;
|
|
1149
1169
|
},
|
|
1150
1170
|
incrementHour(event) {
|
|
@@ -1152,51 +1172,58 @@ var script = {
|
|
|
1152
1172
|
let newHour = this.currentHour + this.stepHour;
|
|
1153
1173
|
let newPM = this.pm;
|
|
1154
1174
|
|
|
1155
|
-
if (this.hourFormat == '24')
|
|
1156
|
-
newHour = (newHour >= 24) ? (newHour - 24) : newHour;
|
|
1175
|
+
if (this.hourFormat == '24') newHour = newHour >= 24 ? newHour - 24 : newHour;
|
|
1157
1176
|
else if (this.hourFormat == '12') {
|
|
1158
1177
|
// Before the AM/PM break, now after
|
|
1159
1178
|
if (prevHour < 12 && newHour > 11) {
|
|
1160
|
-
newPM= !this.pm;
|
|
1179
|
+
newPM = !this.pm;
|
|
1161
1180
|
}
|
|
1162
|
-
|
|
1181
|
+
|
|
1182
|
+
newHour = newHour >= 13 ? newHour - 12 : newHour;
|
|
1163
1183
|
}
|
|
1164
1184
|
|
|
1165
1185
|
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
|
|
1166
1186
|
this.currentHour = newHour;
|
|
1167
1187
|
this.pm = newPM;
|
|
1168
1188
|
}
|
|
1189
|
+
|
|
1169
1190
|
event.preventDefault();
|
|
1170
1191
|
},
|
|
1171
1192
|
decrementHour(event) {
|
|
1172
1193
|
let newHour = this.currentHour - this.stepHour;
|
|
1173
1194
|
let newPM = this.pm;
|
|
1174
1195
|
|
|
1175
|
-
if (this.hourFormat == '24')
|
|
1176
|
-
newHour = (newHour < 0) ? (24 + newHour) : newHour;
|
|
1196
|
+
if (this.hourFormat == '24') newHour = newHour < 0 ? 24 + newHour : newHour;
|
|
1177
1197
|
else if (this.hourFormat == '12') {
|
|
1178
1198
|
// If we were at noon/midnight, then switch
|
|
1179
1199
|
if (this.currentHour === 12) {
|
|
1180
1200
|
newPM = !this.pm;
|
|
1181
1201
|
}
|
|
1182
|
-
|
|
1202
|
+
|
|
1203
|
+
newHour = newHour <= 0 ? 12 + newHour : newHour;
|
|
1183
1204
|
}
|
|
1205
|
+
|
|
1184
1206
|
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
|
|
1185
1207
|
this.currentHour = newHour;
|
|
1186
1208
|
this.pm = newPM;
|
|
1187
1209
|
}
|
|
1210
|
+
|
|
1188
1211
|
event.preventDefault();
|
|
1189
1212
|
},
|
|
1190
1213
|
incrementMinute(event) {
|
|
1191
1214
|
let newMinute = this.currentMinute + this.stepMinute;
|
|
1215
|
+
|
|
1192
1216
|
if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
|
|
1193
|
-
this.currentMinute =
|
|
1217
|
+
this.currentMinute = newMinute > 59 ? newMinute - 60 : newMinute;
|
|
1194
1218
|
}
|
|
1219
|
+
|
|
1195
1220
|
event.preventDefault();
|
|
1196
1221
|
},
|
|
1197
1222
|
decrementMinute(event) {
|
|
1198
1223
|
let newMinute = this.currentMinute - this.stepMinute;
|
|
1199
|
-
|
|
1224
|
+
|
|
1225
|
+
newMinute = newMinute < 0 ? 60 + newMinute : newMinute;
|
|
1226
|
+
|
|
1200
1227
|
if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {
|
|
1201
1228
|
this.currentMinute = newMinute;
|
|
1202
1229
|
}
|
|
@@ -1205,15 +1232,18 @@ var script = {
|
|
|
1205
1232
|
},
|
|
1206
1233
|
incrementSecond(event) {
|
|
1207
1234
|
let newSecond = this.currentSecond + this.stepSecond;
|
|
1235
|
+
|
|
1208
1236
|
if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
|
|
1209
|
-
this.currentSecond =
|
|
1237
|
+
this.currentSecond = newSecond > 59 ? newSecond - 60 : newSecond;
|
|
1210
1238
|
}
|
|
1211
1239
|
|
|
1212
1240
|
event.preventDefault();
|
|
1213
1241
|
},
|
|
1214
1242
|
decrementSecond(event) {
|
|
1215
1243
|
let newSecond = this.currentSecond - this.stepSecond;
|
|
1216
|
-
|
|
1244
|
+
|
|
1245
|
+
newSecond = newSecond < 0 ? 60 + newSecond : newSecond;
|
|
1246
|
+
|
|
1217
1247
|
if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {
|
|
1218
1248
|
this.currentSecond = newSecond;
|
|
1219
1249
|
}
|
|
@@ -1227,18 +1257,17 @@ var script = {
|
|
|
1227
1257
|
if (this.isRangeSelection()) {
|
|
1228
1258
|
value = this.modelValue[1] || this.modelValue[0];
|
|
1229
1259
|
}
|
|
1260
|
+
|
|
1230
1261
|
if (this.isMultipleSelection()) {
|
|
1231
1262
|
value = this.modelValue[this.modelValue.length - 1];
|
|
1232
1263
|
}
|
|
1264
|
+
|
|
1233
1265
|
value = value ? new Date(value.getTime()) : new Date();
|
|
1234
1266
|
|
|
1235
1267
|
if (this.hourFormat == '12') {
|
|
1236
|
-
if (this.currentHour === 12)
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
|
|
1240
|
-
}
|
|
1241
|
-
else {
|
|
1268
|
+
if (this.currentHour === 12) value.setHours(this.pm ? 12 : 0);
|
|
1269
|
+
else value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
|
|
1270
|
+
} else {
|
|
1242
1271
|
value.setHours(this.currentHour);
|
|
1243
1272
|
}
|
|
1244
1273
|
|
|
@@ -1246,19 +1275,17 @@ var script = {
|
|
|
1246
1275
|
value.setSeconds(this.currentSecond);
|
|
1247
1276
|
|
|
1248
1277
|
if (this.isRangeSelection()) {
|
|
1249
|
-
if (this.modelValue[1])
|
|
1250
|
-
|
|
1251
|
-
else
|
|
1252
|
-
value = [value, null];
|
|
1278
|
+
if (this.modelValue[1]) value = [this.modelValue[0], value];
|
|
1279
|
+
else value = [value, null];
|
|
1253
1280
|
}
|
|
1254
1281
|
|
|
1255
|
-
if (this.isMultipleSelection()){
|
|
1282
|
+
if (this.isMultipleSelection()) {
|
|
1256
1283
|
value = [...this.modelValue.slice(0, -1), value];
|
|
1257
1284
|
}
|
|
1258
1285
|
|
|
1259
1286
|
this.updateModel(value);
|
|
1260
1287
|
this.$emit('date-select', value);
|
|
1261
|
-
setTimeout(() => this.timePickerChange = false, 0);
|
|
1288
|
+
setTimeout(() => (this.timePickerChange = false), 0);
|
|
1262
1289
|
},
|
|
1263
1290
|
toggleAMPM(event) {
|
|
1264
1291
|
this.pm = !this.pm;
|
|
@@ -1272,24 +1299,22 @@ var script = {
|
|
|
1272
1299
|
},
|
|
1273
1300
|
onMonthSelect(event, index) {
|
|
1274
1301
|
if (this.view === 'month') {
|
|
1275
|
-
this.onDateSelect(event, {year: this.currentYear, month: index, day: 1, selectable: true});
|
|
1276
|
-
}
|
|
1277
|
-
else {
|
|
1302
|
+
this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true });
|
|
1303
|
+
} else {
|
|
1278
1304
|
this.currentMonth = index;
|
|
1279
1305
|
this.currentView = 'date';
|
|
1280
|
-
this.$emit('month-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
1306
|
+
this.$emit('month-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
1281
1307
|
}
|
|
1282
1308
|
|
|
1283
1309
|
setTimeout(this.updateFocus, 0);
|
|
1284
1310
|
},
|
|
1285
1311
|
onYearSelect(event, year) {
|
|
1286
1312
|
if (this.view === 'year') {
|
|
1287
|
-
this.onDateSelect(event, {year: year, month: 0, day: 1, selectable: true});
|
|
1288
|
-
}
|
|
1289
|
-
else {
|
|
1313
|
+
this.onDateSelect(event, { year: year, month: 0, day: 1, selectable: true });
|
|
1314
|
+
} else {
|
|
1290
1315
|
this.currentYear = year;
|
|
1291
1316
|
this.currentView = 'month';
|
|
1292
|
-
this.$emit('year-change', {month: this.currentMonth + 1, year: this.currentYear});
|
|
1317
|
+
this.$emit('year-change', { month: this.currentMonth + 1, year: this.currentYear });
|
|
1293
1318
|
}
|
|
1294
1319
|
|
|
1295
1320
|
setTimeout(this.updateFocus, 0);
|
|
@@ -1303,6 +1328,7 @@ var script = {
|
|
|
1303
1328
|
this.maskClickListener = () => {
|
|
1304
1329
|
this.overlayVisible = false;
|
|
1305
1330
|
};
|
|
1331
|
+
|
|
1306
1332
|
this.mask.addEventListener('click', this.maskClickListener);
|
|
1307
1333
|
|
|
1308
1334
|
document.body.appendChild(this.mask);
|
|
@@ -1325,9 +1351,11 @@ var script = {
|
|
|
1325
1351
|
|
|
1326
1352
|
let bodyChildren = document.body.children;
|
|
1327
1353
|
let hasBlockerMasks;
|
|
1354
|
+
|
|
1328
1355
|
for (let i = 0; i < bodyChildren.length; i++) {
|
|
1329
1356
|
let bodyChild = bodyChildren[i];
|
|
1330
|
-
|
|
1357
|
+
|
|
1358
|
+
if (DomHandler.hasClass(bodyChild, 'p-datepicker-mask-scrollblocker')) {
|
|
1331
1359
|
hasBlockerMasks = true;
|
|
1332
1360
|
break;
|
|
1333
1361
|
}
|
|
@@ -1339,6 +1367,7 @@ var script = {
|
|
|
1339
1367
|
},
|
|
1340
1368
|
updateCurrentMetaData() {
|
|
1341
1369
|
const viewDate = this.viewDate;
|
|
1370
|
+
|
|
1342
1371
|
this.currentMonth = viewDate.getMonth();
|
|
1343
1372
|
this.currentYear = viewDate.getFullYear();
|
|
1344
1373
|
|
|
@@ -1352,15 +1381,17 @@ var script = {
|
|
|
1352
1381
|
}
|
|
1353
1382
|
|
|
1354
1383
|
let isValid = true;
|
|
1384
|
+
|
|
1355
1385
|
if (this.isSingleSelection()) {
|
|
1356
1386
|
if (!this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false)) {
|
|
1357
1387
|
isValid = false;
|
|
1358
1388
|
}
|
|
1359
|
-
} else if (value.every(v => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
|
|
1389
|
+
} else if (value.every((v) => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {
|
|
1360
1390
|
if (this.isRangeSelection()) {
|
|
1361
1391
|
isValid = value.length > 1 && value[1] > value[0] ? true : false;
|
|
1362
1392
|
}
|
|
1363
1393
|
}
|
|
1394
|
+
|
|
1364
1395
|
return isValid;
|
|
1365
1396
|
},
|
|
1366
1397
|
parseValue(text) {
|
|
@@ -1372,17 +1403,19 @@ var script = {
|
|
|
1372
1403
|
|
|
1373
1404
|
if (this.isSingleSelection()) {
|
|
1374
1405
|
value = this.parseDateTime(text);
|
|
1375
|
-
}
|
|
1376
|
-
else if (this.isMultipleSelection()) {
|
|
1406
|
+
} else if (this.isMultipleSelection()) {
|
|
1377
1407
|
let tokens = text.split(',');
|
|
1408
|
+
|
|
1378
1409
|
value = [];
|
|
1410
|
+
|
|
1379
1411
|
for (let token of tokens) {
|
|
1380
1412
|
value.push(this.parseDateTime(token.trim()));
|
|
1381
1413
|
}
|
|
1382
|
-
}
|
|
1383
|
-
else if (this.isRangeSelection()) {
|
|
1414
|
+
} else if (this.isRangeSelection()) {
|
|
1384
1415
|
let tokens = text.split(' - ');
|
|
1416
|
+
|
|
1385
1417
|
value = [];
|
|
1418
|
+
|
|
1386
1419
|
for (let i = 0; i < tokens.length; i++) {
|
|
1387
1420
|
value[i] = this.parseDateTime(tokens[i].trim());
|
|
1388
1421
|
}
|
|
@@ -1397,14 +1430,13 @@ var script = {
|
|
|
1397
1430
|
if (this.timeOnly) {
|
|
1398
1431
|
date = new Date();
|
|
1399
1432
|
this.populateTime(date, parts[0], parts[1]);
|
|
1400
|
-
}
|
|
1401
|
-
else {
|
|
1433
|
+
} else {
|
|
1402
1434
|
const dateFormat = this.datePattern;
|
|
1435
|
+
|
|
1403
1436
|
if (this.showTime) {
|
|
1404
1437
|
date = this.parseDate(parts[0], dateFormat);
|
|
1405
1438
|
this.populateTime(date, parts[1], parts[2]);
|
|
1406
|
-
}
|
|
1407
|
-
else {
|
|
1439
|
+
} else {
|
|
1408
1440
|
date = this.parseDate(text, dateFormat);
|
|
1409
1441
|
}
|
|
1410
1442
|
}
|
|
@@ -1416,8 +1448,10 @@ var script = {
|
|
|
1416
1448
|
throw 'Invalid Time';
|
|
1417
1449
|
}
|
|
1418
1450
|
|
|
1419
|
-
|
|
1451
|
+
//DEBUG: 2952
|
|
1452
|
+
this.pm = ampm === this.$primevue.config.locale.am || ampm === this.$primevue.config.locale.am.toLowerCase();
|
|
1420
1453
|
let time = this.parseTime(timeString);
|
|
1454
|
+
|
|
1421
1455
|
value.setHours(time.hour);
|
|
1422
1456
|
value.setMinutes(time.minute);
|
|
1423
1457
|
value.setSeconds(time.second);
|
|
@@ -1425,10 +1459,10 @@ var script = {
|
|
|
1425
1459
|
parseTime(value) {
|
|
1426
1460
|
let tokens = value.split(':');
|
|
1427
1461
|
let validTokenLength = this.showSeconds ? 3 : 2;
|
|
1428
|
-
let regex =
|
|
1462
|
+
let regex = /^[0-9][0-9]$/;
|
|
1429
1463
|
|
|
1430
1464
|
if (tokens.length !== validTokenLength || !tokens[0].match(regex) || !tokens[1].match(regex) || (this.showSeconds && !tokens[2].match(regex))) {
|
|
1431
|
-
throw
|
|
1465
|
+
throw 'Invalid time';
|
|
1432
1466
|
}
|
|
1433
1467
|
|
|
1434
1468
|
let h = parseInt(tokens[0]);
|
|
@@ -1436,88 +1470,97 @@ var script = {
|
|
|
1436
1470
|
let s = this.showSeconds ? parseInt(tokens[2]) : null;
|
|
1437
1471
|
|
|
1438
1472
|
if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || (this.hourFormat == '12' && h > 12) || (this.showSeconds && (isNaN(s) || s > 59))) {
|
|
1439
|
-
throw
|
|
1440
|
-
}
|
|
1441
|
-
else {
|
|
1473
|
+
throw 'Invalid time';
|
|
1474
|
+
} else {
|
|
1442
1475
|
if (this.hourFormat == '12' && h !== 12 && this.pm) {
|
|
1443
|
-
h+= 12;
|
|
1476
|
+
h += 12;
|
|
1444
1477
|
}
|
|
1445
1478
|
|
|
1446
|
-
return {hour: h, minute: m, second: s};
|
|
1479
|
+
return { hour: h, minute: m, second: s };
|
|
1447
1480
|
}
|
|
1448
1481
|
},
|
|
1449
1482
|
parseDate(value, format) {
|
|
1450
1483
|
if (format == null || value == null) {
|
|
1451
|
-
throw
|
|
1484
|
+
throw 'Invalid arguments';
|
|
1452
1485
|
}
|
|
1453
1486
|
|
|
1454
|
-
value =
|
|
1455
|
-
|
|
1487
|
+
value = typeof value === 'object' ? value.toString() : value + '';
|
|
1488
|
+
|
|
1489
|
+
if (value === '') {
|
|
1456
1490
|
return null;
|
|
1457
1491
|
}
|
|
1458
1492
|
|
|
1459
|
-
let iFormat,
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
iFormat
|
|
1472
|
-
}
|
|
1473
|
-
return matches;
|
|
1474
|
-
},
|
|
1475
|
-
getNumber = (match) => {
|
|
1476
|
-
let isDoubled = lookAhead(match),
|
|
1477
|
-
size = (match === "@" ? 14 : (match === "!" ? 20 :
|
|
1478
|
-
(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
|
|
1479
|
-
minSize = (match === "y" ? size : 1),
|
|
1480
|
-
digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
|
|
1481
|
-
num = value.substring(iValue).match(digits);
|
|
1482
|
-
if (!num) {
|
|
1483
|
-
throw "Missing number at position " + iValue;
|
|
1484
|
-
}
|
|
1485
|
-
iValue += num[ 0 ].length;
|
|
1486
|
-
return parseInt(num[ 0 ], 10);
|
|
1487
|
-
},
|
|
1488
|
-
getName = (match, shortNames, longNames) => {
|
|
1489
|
-
let index = -1;
|
|
1490
|
-
let arr = lookAhead(match) ? longNames : shortNames;
|
|
1491
|
-
let names = [];
|
|
1492
|
-
|
|
1493
|
-
for (let i = 0; i < arr.length; i++) {
|
|
1494
|
-
names.push([i,arr[i]]);
|
|
1495
|
-
}
|
|
1496
|
-
names.sort((a,b) => {
|
|
1497
|
-
return -(a[ 1 ].length - b[ 1 ].length);
|
|
1498
|
-
});
|
|
1493
|
+
let iFormat,
|
|
1494
|
+
dim,
|
|
1495
|
+
extra,
|
|
1496
|
+
iValue = 0,
|
|
1497
|
+
shortYearCutoff = typeof this.shortYearCutoff !== 'string' ? this.shortYearCutoff : (new Date().getFullYear() % 100) + parseInt(this.shortYearCutoff, 10),
|
|
1498
|
+
year = -1,
|
|
1499
|
+
month = -1,
|
|
1500
|
+
day = -1,
|
|
1501
|
+
doy = -1,
|
|
1502
|
+
literal = false,
|
|
1503
|
+
date,
|
|
1504
|
+
lookAhead = (match) => {
|
|
1505
|
+
let matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
|
|
1499
1506
|
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
|
1503
|
-
index = names[i][0];
|
|
1504
|
-
iValue += name.length;
|
|
1505
|
-
break;
|
|
1507
|
+
if (matches) {
|
|
1508
|
+
iFormat++;
|
|
1506
1509
|
}
|
|
1507
|
-
}
|
|
1508
1510
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1511
|
+
return matches;
|
|
1512
|
+
},
|
|
1513
|
+
getNumber = (match) => {
|
|
1514
|
+
let isDoubled = lookAhead(match),
|
|
1515
|
+
size = match === '@' ? 14 : match === '!' ? 20 : match === 'y' && isDoubled ? 4 : match === 'o' ? 3 : 2,
|
|
1516
|
+
minSize = match === 'y' ? size : 1,
|
|
1517
|
+
digits = new RegExp('^\\d{' + minSize + ',' + size + '}'),
|
|
1518
|
+
num = value.substring(iValue).match(digits);
|
|
1519
|
+
|
|
1520
|
+
if (!num) {
|
|
1521
|
+
throw 'Missing number at position ' + iValue;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
iValue += num[0].length;
|
|
1525
|
+
|
|
1526
|
+
return parseInt(num[0], 10);
|
|
1527
|
+
},
|
|
1528
|
+
getName = (match, shortNames, longNames) => {
|
|
1529
|
+
let index = -1;
|
|
1530
|
+
let arr = lookAhead(match) ? longNames : shortNames;
|
|
1531
|
+
let names = [];
|
|
1532
|
+
|
|
1533
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1534
|
+
names.push([i, arr[i]]);
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
names.sort((a, b) => {
|
|
1538
|
+
return -(a[1].length - b[1].length);
|
|
1539
|
+
});
|
|
1540
|
+
|
|
1541
|
+
for (let i = 0; i < names.length; i++) {
|
|
1542
|
+
let name = names[i][1];
|
|
1543
|
+
|
|
1544
|
+
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
|
1545
|
+
index = names[i][0];
|
|
1546
|
+
iValue += name.length;
|
|
1547
|
+
break;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
if (index !== -1) {
|
|
1552
|
+
return index + 1;
|
|
1553
|
+
} else {
|
|
1554
|
+
throw 'Unknown name at position ' + iValue;
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
checkLiteral = () => {
|
|
1558
|
+
if (value.charAt(iValue) !== format.charAt(iFormat)) {
|
|
1559
|
+
throw 'Unexpected literal at position ' + iValue;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
iValue++;
|
|
1563
|
+
};
|
|
1521
1564
|
|
|
1522
1565
|
if (this.currentView === 'month') {
|
|
1523
1566
|
day = 1;
|
|
@@ -1532,32 +1575,32 @@ var script = {
|
|
|
1532
1575
|
}
|
|
1533
1576
|
} else {
|
|
1534
1577
|
switch (format.charAt(iFormat)) {
|
|
1535
|
-
case
|
|
1536
|
-
day = getNumber(
|
|
1578
|
+
case 'd':
|
|
1579
|
+
day = getNumber('d');
|
|
1537
1580
|
break;
|
|
1538
|
-
case
|
|
1539
|
-
getName(
|
|
1581
|
+
case 'D':
|
|
1582
|
+
getName('D', this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
|
|
1540
1583
|
break;
|
|
1541
|
-
case
|
|
1542
|
-
doy = getNumber(
|
|
1584
|
+
case 'o':
|
|
1585
|
+
doy = getNumber('o');
|
|
1543
1586
|
break;
|
|
1544
|
-
case
|
|
1545
|
-
month = getNumber(
|
|
1587
|
+
case 'm':
|
|
1588
|
+
month = getNumber('m');
|
|
1546
1589
|
break;
|
|
1547
|
-
case
|
|
1548
|
-
month = getName(
|
|
1590
|
+
case 'M':
|
|
1591
|
+
month = getName('M', this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
|
|
1549
1592
|
break;
|
|
1550
|
-
case
|
|
1551
|
-
year = getNumber(
|
|
1593
|
+
case 'y':
|
|
1594
|
+
year = getNumber('y');
|
|
1552
1595
|
break;
|
|
1553
|
-
case
|
|
1554
|
-
date = new Date(getNumber(
|
|
1596
|
+
case '@':
|
|
1597
|
+
date = new Date(getNumber('@'));
|
|
1555
1598
|
year = date.getFullYear();
|
|
1556
1599
|
month = date.getMonth() + 1;
|
|
1557
1600
|
day = date.getDate();
|
|
1558
1601
|
break;
|
|
1559
|
-
case
|
|
1560
|
-
date = new Date((getNumber(
|
|
1602
|
+
case '!':
|
|
1603
|
+
date = new Date((getNumber('!') - this.ticksTo1970) / 10000);
|
|
1561
1604
|
year = date.getFullYear();
|
|
1562
1605
|
month = date.getMonth() + 1;
|
|
1563
1606
|
day = date.getDate();
|
|
@@ -1568,6 +1611,7 @@ var script = {
|
|
|
1568
1611
|
} else {
|
|
1569
1612
|
literal = true;
|
|
1570
1613
|
}
|
|
1614
|
+
|
|
1571
1615
|
break;
|
|
1572
1616
|
default:
|
|
1573
1617
|
checkLiteral();
|
|
@@ -1577,95 +1621,124 @@ var script = {
|
|
|
1577
1621
|
|
|
1578
1622
|
if (iValue < value.length) {
|
|
1579
1623
|
extra = value.substr(iValue);
|
|
1624
|
+
|
|
1580
1625
|
if (!/^\s+/.test(extra)) {
|
|
1581
|
-
throw
|
|
1626
|
+
throw 'Extra/unparsed characters found in date: ' + extra;
|
|
1582
1627
|
}
|
|
1583
1628
|
}
|
|
1584
1629
|
|
|
1585
1630
|
if (year === -1) {
|
|
1586
1631
|
year = new Date().getFullYear();
|
|
1587
1632
|
} else if (year < 100) {
|
|
1588
|
-
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
|
|
1589
|
-
(year <= shortYearCutoff ? 0 : -100);
|
|
1633
|
+
year += new Date().getFullYear() - (new Date().getFullYear() % 100) + (year <= shortYearCutoff ? 0 : -100);
|
|
1590
1634
|
}
|
|
1591
1635
|
|
|
1592
1636
|
if (doy > -1) {
|
|
1593
1637
|
month = 1;
|
|
1594
1638
|
day = doy;
|
|
1639
|
+
|
|
1595
1640
|
do {
|
|
1596
1641
|
dim = this.getDaysCountInMonth(year, month - 1);
|
|
1642
|
+
|
|
1597
1643
|
if (day <= dim) {
|
|
1598
1644
|
break;
|
|
1599
1645
|
}
|
|
1646
|
+
|
|
1600
1647
|
month++;
|
|
1601
1648
|
day -= dim;
|
|
1602
|
-
|
|
1649
|
+
// eslint-disable-next-line
|
|
1603
1650
|
} while (true);
|
|
1604
1651
|
}
|
|
1605
1652
|
|
|
1606
1653
|
date = this.daylightSavingAdjust(new Date(year, month - 1, day));
|
|
1607
1654
|
|
|
1608
1655
|
if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
|
|
1609
|
-
throw
|
|
1656
|
+
throw 'Invalid date'; // E.g. 31/02/00
|
|
1610
1657
|
}
|
|
1611
1658
|
|
|
1612
1659
|
return date;
|
|
1613
1660
|
},
|
|
1614
1661
|
getWeekNumber(date) {
|
|
1615
1662
|
let checkDate = new Date(date.getTime());
|
|
1616
|
-
|
|
1663
|
+
|
|
1664
|
+
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
|
1617
1665
|
let time = checkDate.getTime();
|
|
1618
|
-
|
|
1619
|
-
checkDate.
|
|
1620
|
-
|
|
1666
|
+
|
|
1667
|
+
checkDate.setMonth(0);
|
|
1668
|
+
checkDate.setDate(1);
|
|
1669
|
+
|
|
1670
|
+
return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;
|
|
1621
1671
|
},
|
|
1622
1672
|
onDateCellKeydown(event, date, groupIndex) {
|
|
1623
1673
|
const cellContent = event.currentTarget;
|
|
1624
1674
|
const cell = cellContent.parentElement;
|
|
1625
1675
|
|
|
1676
|
+
const cellIndex = DomHandler.index(cell);
|
|
1677
|
+
|
|
1626
1678
|
switch (event.code) {
|
|
1627
1679
|
case 'ArrowDown': {
|
|
1628
1680
|
cellContent.tabIndex = '-1';
|
|
1629
|
-
|
|
1681
|
+
|
|
1630
1682
|
let nextRow = cell.parentElement.nextElementSibling;
|
|
1683
|
+
|
|
1631
1684
|
if (nextRow) {
|
|
1632
|
-
let
|
|
1633
|
-
|
|
1634
|
-
|
|
1685
|
+
let tableRowIndex = DomHandler.index(cell.parentElement);
|
|
1686
|
+
const tableRows = Array.from(cell.parentElement.parentElement.children);
|
|
1687
|
+
const nextTableRows = tableRows.slice(tableRowIndex + 1);
|
|
1688
|
+
|
|
1689
|
+
let hasNextFocusableDate = nextTableRows.find((el) => {
|
|
1690
|
+
let focusCell = el.children[cellIndex].children[0];
|
|
1691
|
+
|
|
1692
|
+
return !DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
if (hasNextFocusableDate) {
|
|
1696
|
+
let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
|
|
1697
|
+
|
|
1698
|
+
focusCell.tabIndex = '0';
|
|
1699
|
+
focusCell.focus();
|
|
1700
|
+
} else {
|
|
1701
|
+
this.navigationState = { backward: false };
|
|
1635
1702
|
this.navForward(event);
|
|
1636
1703
|
}
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
nextRow.children[cellIndex].children[0].focus();
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
else {
|
|
1643
|
-
this.navigationState = {backward: false};
|
|
1704
|
+
} else {
|
|
1705
|
+
this.navigationState = { backward: false };
|
|
1644
1706
|
this.navForward(event);
|
|
1645
1707
|
}
|
|
1708
|
+
|
|
1646
1709
|
event.preventDefault();
|
|
1647
1710
|
break;
|
|
1648
1711
|
}
|
|
1649
1712
|
|
|
1650
1713
|
case 'ArrowUp': {
|
|
1651
1714
|
cellContent.tabIndex = '-1';
|
|
1652
|
-
let cellIndex = DomHandler.index(cell);
|
|
1653
1715
|
let prevRow = cell.parentElement.previousElementSibling;
|
|
1716
|
+
|
|
1654
1717
|
if (prevRow) {
|
|
1655
|
-
let
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1718
|
+
let tableRowIndex = DomHandler.index(cell.parentElement);
|
|
1719
|
+
const tableRows = Array.from(cell.parentElement.parentElement.children);
|
|
1720
|
+
const prevTableRows = tableRows.slice(0, tableRowIndex).reverse();
|
|
1721
|
+
|
|
1722
|
+
let hasNextFocusableDate = prevTableRows.find((el) => {
|
|
1723
|
+
let focusCell = el.children[cellIndex].children[0];
|
|
1724
|
+
|
|
1725
|
+
return !DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1726
|
+
});
|
|
1727
|
+
|
|
1728
|
+
if (hasNextFocusableDate) {
|
|
1729
|
+
let focusCell = hasNextFocusableDate.children[cellIndex].children[0];
|
|
1730
|
+
|
|
1661
1731
|
focusCell.tabIndex = '0';
|
|
1662
1732
|
focusCell.focus();
|
|
1733
|
+
} else {
|
|
1734
|
+
this.navigationState = { backward: true };
|
|
1735
|
+
this.navBackward(event);
|
|
1663
1736
|
}
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
this.navigationState = {backward: true};
|
|
1737
|
+
} else {
|
|
1738
|
+
this.navigationState = { backward: true };
|
|
1667
1739
|
this.navBackward(event);
|
|
1668
1740
|
}
|
|
1741
|
+
|
|
1669
1742
|
event.preventDefault();
|
|
1670
1743
|
break;
|
|
1671
1744
|
}
|
|
@@ -1673,19 +1746,29 @@ var script = {
|
|
|
1673
1746
|
case 'ArrowLeft': {
|
|
1674
1747
|
cellContent.tabIndex = '-1';
|
|
1675
1748
|
let prevCell = cell.previousElementSibling;
|
|
1749
|
+
|
|
1676
1750
|
if (prevCell) {
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1751
|
+
const cells = Array.from(cell.parentElement.children);
|
|
1752
|
+
const prevCells = cells.slice(0, cellIndex).reverse();
|
|
1753
|
+
|
|
1754
|
+
let hasNextFocusableDate = prevCells.find((el) => {
|
|
1755
|
+
let focusCell = el.children[0];
|
|
1756
|
+
|
|
1757
|
+
return !DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1758
|
+
});
|
|
1759
|
+
|
|
1760
|
+
if (hasNextFocusableDate) {
|
|
1761
|
+
let focusCell = hasNextFocusableDate.children[0];
|
|
1762
|
+
|
|
1682
1763
|
focusCell.tabIndex = '0';
|
|
1683
1764
|
focusCell.focus();
|
|
1765
|
+
} else {
|
|
1766
|
+
this.navigateToMonth(event, true, groupIndex);
|
|
1684
1767
|
}
|
|
1685
|
-
}
|
|
1686
|
-
else {
|
|
1768
|
+
} else {
|
|
1687
1769
|
this.navigateToMonth(event, true, groupIndex);
|
|
1688
1770
|
}
|
|
1771
|
+
|
|
1689
1772
|
event.preventDefault();
|
|
1690
1773
|
break;
|
|
1691
1774
|
}
|
|
@@ -1693,24 +1776,34 @@ var script = {
|
|
|
1693
1776
|
case 'ArrowRight': {
|
|
1694
1777
|
cellContent.tabIndex = '-1';
|
|
1695
1778
|
let nextCell = cell.nextElementSibling;
|
|
1779
|
+
|
|
1696
1780
|
if (nextCell) {
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1781
|
+
const cells = Array.from(cell.parentElement.children);
|
|
1782
|
+
const nextCells = cells.slice(cellIndex + 1);
|
|
1783
|
+
let hasNextFocusableDate = nextCells.find((el) => {
|
|
1784
|
+
let focusCell = el.children[0];
|
|
1785
|
+
|
|
1786
|
+
return !DomHandler.hasClass(focusCell, 'p-disabled');
|
|
1787
|
+
});
|
|
1788
|
+
|
|
1789
|
+
if (hasNextFocusableDate) {
|
|
1790
|
+
let focusCell = hasNextFocusableDate.children[0];
|
|
1791
|
+
|
|
1702
1792
|
focusCell.tabIndex = '0';
|
|
1703
1793
|
focusCell.focus();
|
|
1794
|
+
} else {
|
|
1795
|
+
this.navigateToMonth(event, false, groupIndex);
|
|
1704
1796
|
}
|
|
1705
|
-
}
|
|
1706
|
-
else {
|
|
1797
|
+
} else {
|
|
1707
1798
|
this.navigateToMonth(event, false, groupIndex);
|
|
1708
1799
|
}
|
|
1800
|
+
|
|
1709
1801
|
event.preventDefault();
|
|
1710
1802
|
break;
|
|
1711
1803
|
}
|
|
1712
1804
|
|
|
1713
1805
|
case 'Enter':
|
|
1806
|
+
|
|
1714
1807
|
case 'Space': {
|
|
1715
1808
|
this.onDateSelect(event, date);
|
|
1716
1809
|
event.preventDefault();
|
|
@@ -1727,6 +1820,7 @@ var script = {
|
|
|
1727
1820
|
if (!this.inline) {
|
|
1728
1821
|
this.trapFocus(event);
|
|
1729
1822
|
}
|
|
1823
|
+
|
|
1730
1824
|
break;
|
|
1731
1825
|
}
|
|
1732
1826
|
|
|
@@ -1734,10 +1828,10 @@ var script = {
|
|
|
1734
1828
|
cellContent.tabIndex = '-1';
|
|
1735
1829
|
let currentRow = cell.parentElement;
|
|
1736
1830
|
let focusCell = currentRow.children[0].children[0];
|
|
1831
|
+
|
|
1737
1832
|
if (DomHandler.hasClass(focusCell, 'p-disabled')) {
|
|
1738
1833
|
this.navigateToMonth(event, true, groupIndex);
|
|
1739
|
-
}
|
|
1740
|
-
else {
|
|
1834
|
+
} else {
|
|
1741
1835
|
focusCell.tabIndex = '0';
|
|
1742
1836
|
focusCell.focus();
|
|
1743
1837
|
}
|
|
@@ -1749,11 +1843,11 @@ var script = {
|
|
|
1749
1843
|
case 'End': {
|
|
1750
1844
|
cellContent.tabIndex = '-1';
|
|
1751
1845
|
let currentRow = cell.parentElement;
|
|
1752
|
-
let focusCell = currentRow.children[currentRow.children.length -1].children[0];
|
|
1846
|
+
let focusCell = currentRow.children[currentRow.children.length - 1].children[0];
|
|
1847
|
+
|
|
1753
1848
|
if (DomHandler.hasClass(focusCell, 'p-disabled')) {
|
|
1754
1849
|
this.navigateToMonth(event, false, groupIndex);
|
|
1755
|
-
}
|
|
1756
|
-
else {
|
|
1850
|
+
} else {
|
|
1757
1851
|
focusCell.tabIndex = '0';
|
|
1758
1852
|
focusCell.focus();
|
|
1759
1853
|
}
|
|
@@ -1765,10 +1859,9 @@ var script = {
|
|
|
1765
1859
|
case 'PageUp': {
|
|
1766
1860
|
cellContent.tabIndex = '-1';
|
|
1767
1861
|
if (event.shiftKey) {
|
|
1768
|
-
this.navigationState = {backward: true};
|
|
1862
|
+
this.navigationState = { backward: true };
|
|
1769
1863
|
this.navBackward(event);
|
|
1770
|
-
}
|
|
1771
|
-
else this.navigateToMonth(event, true, groupIndex);
|
|
1864
|
+
} else this.navigateToMonth(event, true, groupIndex);
|
|
1772
1865
|
|
|
1773
1866
|
event.preventDefault();
|
|
1774
1867
|
break;
|
|
@@ -1777,10 +1870,9 @@ var script = {
|
|
|
1777
1870
|
case 'PageDown': {
|
|
1778
1871
|
cellContent.tabIndex = '-1';
|
|
1779
1872
|
if (event.shiftKey) {
|
|
1780
|
-
this.navigationState = {backward: false};
|
|
1873
|
+
this.navigationState = { backward: false };
|
|
1781
1874
|
this.navForward(event);
|
|
1782
|
-
}
|
|
1783
|
-
else this.navigateToMonth(event, false, groupIndex);
|
|
1875
|
+
} else this.navigateToMonth(event, false, groupIndex);
|
|
1784
1876
|
|
|
1785
1877
|
event.preventDefault();
|
|
1786
1878
|
break;
|
|
@@ -1789,26 +1881,25 @@ var script = {
|
|
|
1789
1881
|
},
|
|
1790
1882
|
navigateToMonth(event, prev, groupIndex) {
|
|
1791
1883
|
if (prev) {
|
|
1792
|
-
if (this.numberOfMonths === 1 ||
|
|
1793
|
-
this.navigationState = {backward: true};
|
|
1884
|
+
if (this.numberOfMonths === 1 || groupIndex === 0) {
|
|
1885
|
+
this.navigationState = { backward: true };
|
|
1794
1886
|
this.navBackward(event);
|
|
1795
|
-
}
|
|
1796
|
-
else {
|
|
1887
|
+
} else {
|
|
1797
1888
|
let prevMonthContainer = this.overlay.children[groupIndex - 1];
|
|
1798
1889
|
let cells = DomHandler.find(prevMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
1799
1890
|
let focusCell = cells[cells.length - 1];
|
|
1891
|
+
|
|
1800
1892
|
focusCell.tabIndex = '0';
|
|
1801
1893
|
focusCell.focus();
|
|
1802
1894
|
}
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
this.navigationState = {backward: false};
|
|
1895
|
+
} else {
|
|
1896
|
+
if (this.numberOfMonths === 1 || groupIndex === this.numberOfMonths - 1) {
|
|
1897
|
+
this.navigationState = { backward: false };
|
|
1807
1898
|
this.navForward(event);
|
|
1808
|
-
}
|
|
1809
|
-
else {
|
|
1899
|
+
} else {
|
|
1810
1900
|
let nextMonthContainer = this.overlay.children[groupIndex + 1];
|
|
1811
1901
|
let focusCell = DomHandler.findSingle(nextMonthContainer, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
1902
|
+
|
|
1812
1903
|
focusCell.tabIndex = '0';
|
|
1813
1904
|
focusCell.focus();
|
|
1814
1905
|
}
|
|
@@ -1819,15 +1910,18 @@ var script = {
|
|
|
1819
1910
|
|
|
1820
1911
|
switch (event.code) {
|
|
1821
1912
|
case 'ArrowUp':
|
|
1913
|
+
|
|
1822
1914
|
case 'ArrowDown': {
|
|
1823
1915
|
cell.tabIndex = '-1';
|
|
1824
1916
|
var cells = cell.parentElement.children;
|
|
1825
1917
|
var cellIndex = DomHandler.index(cell);
|
|
1826
|
-
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex -3];
|
|
1918
|
+
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex - 3];
|
|
1919
|
+
|
|
1827
1920
|
if (nextCell) {
|
|
1828
1921
|
nextCell.tabIndex = '0';
|
|
1829
1922
|
nextCell.focus();
|
|
1830
1923
|
}
|
|
1924
|
+
|
|
1831
1925
|
event.preventDefault();
|
|
1832
1926
|
break;
|
|
1833
1927
|
}
|
|
@@ -1835,14 +1929,15 @@ var script = {
|
|
|
1835
1929
|
case 'ArrowLeft': {
|
|
1836
1930
|
cell.tabIndex = '-1';
|
|
1837
1931
|
let prevCell = cell.previousElementSibling;
|
|
1932
|
+
|
|
1838
1933
|
if (prevCell) {
|
|
1839
1934
|
prevCell.tabIndex = '0';
|
|
1840
1935
|
prevCell.focus();
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
this.navigationState = {backward: true};
|
|
1936
|
+
} else {
|
|
1937
|
+
this.navigationState = { backward: true };
|
|
1844
1938
|
this.navBackward(event);
|
|
1845
1939
|
}
|
|
1940
|
+
|
|
1846
1941
|
event.preventDefault();
|
|
1847
1942
|
break;
|
|
1848
1943
|
}
|
|
@@ -1850,21 +1945,22 @@ var script = {
|
|
|
1850
1945
|
case 'ArrowRight': {
|
|
1851
1946
|
cell.tabIndex = '-1';
|
|
1852
1947
|
let nextCell = cell.nextElementSibling;
|
|
1948
|
+
|
|
1853
1949
|
if (nextCell) {
|
|
1854
1950
|
nextCell.tabIndex = '0';
|
|
1855
1951
|
nextCell.focus();
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
this.navigationState = {backward: false};
|
|
1952
|
+
} else {
|
|
1953
|
+
this.navigationState = { backward: false };
|
|
1859
1954
|
this.navForward(event);
|
|
1860
1955
|
}
|
|
1956
|
+
|
|
1861
1957
|
event.preventDefault();
|
|
1862
1958
|
break;
|
|
1863
1959
|
}
|
|
1864
1960
|
|
|
1865
1961
|
case 'PageUp': {
|
|
1866
1962
|
if (event.shiftKey) return;
|
|
1867
|
-
this.navigationState = {backward: true};
|
|
1963
|
+
this.navigationState = { backward: true };
|
|
1868
1964
|
this.navBackward(event);
|
|
1869
1965
|
|
|
1870
1966
|
break;
|
|
@@ -1872,13 +1968,14 @@ var script = {
|
|
|
1872
1968
|
|
|
1873
1969
|
case 'PageDown': {
|
|
1874
1970
|
if (event.shiftKey) return;
|
|
1875
|
-
this.navigationState = {backward: false};
|
|
1971
|
+
this.navigationState = { backward: false };
|
|
1876
1972
|
this.navForward(event);
|
|
1877
1973
|
|
|
1878
1974
|
break;
|
|
1879
1975
|
}
|
|
1880
1976
|
|
|
1881
1977
|
case 'Enter':
|
|
1978
|
+
|
|
1882
1979
|
case 'Space': {
|
|
1883
1980
|
this.onMonthSelect(event, index);
|
|
1884
1981
|
event.preventDefault();
|
|
@@ -1902,15 +1999,18 @@ var script = {
|
|
|
1902
1999
|
|
|
1903
2000
|
switch (event.code) {
|
|
1904
2001
|
case 'ArrowUp':
|
|
1905
|
-
|
|
2002
|
+
|
|
2003
|
+
case 'ArrowDown': {
|
|
1906
2004
|
cell.tabIndex = '-1';
|
|
1907
2005
|
var cells = cell.parentElement.children;
|
|
1908
2006
|
var cellIndex = DomHandler.index(cell);
|
|
1909
2007
|
let nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 2 : cellIndex - 2];
|
|
2008
|
+
|
|
1910
2009
|
if (nextCell) {
|
|
1911
2010
|
nextCell.tabIndex = '0';
|
|
1912
2011
|
nextCell.focus();
|
|
1913
2012
|
}
|
|
2013
|
+
|
|
1914
2014
|
event.preventDefault();
|
|
1915
2015
|
break;
|
|
1916
2016
|
}
|
|
@@ -1918,14 +2018,15 @@ var script = {
|
|
|
1918
2018
|
case 'ArrowLeft': {
|
|
1919
2019
|
cell.tabIndex = '-1';
|
|
1920
2020
|
let prevCell = cell.previousElementSibling;
|
|
2021
|
+
|
|
1921
2022
|
if (prevCell) {
|
|
1922
2023
|
prevCell.tabIndex = '0';
|
|
1923
2024
|
prevCell.focus();
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
this.navigationState = {backward: true};
|
|
2025
|
+
} else {
|
|
2026
|
+
this.navigationState = { backward: true };
|
|
1927
2027
|
this.navBackward(event);
|
|
1928
2028
|
}
|
|
2029
|
+
|
|
1929
2030
|
event.preventDefault();
|
|
1930
2031
|
break;
|
|
1931
2032
|
}
|
|
@@ -1933,21 +2034,22 @@ var script = {
|
|
|
1933
2034
|
case 'ArrowRight': {
|
|
1934
2035
|
cell.tabIndex = '-1';
|
|
1935
2036
|
let nextCell = cell.nextElementSibling;
|
|
2037
|
+
|
|
1936
2038
|
if (nextCell) {
|
|
1937
2039
|
nextCell.tabIndex = '0';
|
|
1938
2040
|
nextCell.focus();
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
this.navigationState = {backward: false};
|
|
2041
|
+
} else {
|
|
2042
|
+
this.navigationState = { backward: false };
|
|
1942
2043
|
this.navForward(event);
|
|
1943
2044
|
}
|
|
2045
|
+
|
|
1944
2046
|
event.preventDefault();
|
|
1945
2047
|
break;
|
|
1946
2048
|
}
|
|
1947
2049
|
|
|
1948
2050
|
case 'PageUp': {
|
|
1949
2051
|
if (event.shiftKey) return;
|
|
1950
|
-
this.navigationState = {backward: true};
|
|
2052
|
+
this.navigationState = { backward: true };
|
|
1951
2053
|
this.navBackward(event);
|
|
1952
2054
|
|
|
1953
2055
|
break;
|
|
@@ -1955,13 +2057,14 @@ var script = {
|
|
|
1955
2057
|
|
|
1956
2058
|
case 'PageDown': {
|
|
1957
2059
|
if (event.shiftKey) return;
|
|
1958
|
-
this.navigationState = {backward: false};
|
|
2060
|
+
this.navigationState = { backward: false };
|
|
1959
2061
|
this.navForward(event);
|
|
1960
2062
|
|
|
1961
2063
|
break;
|
|
1962
2064
|
}
|
|
1963
2065
|
|
|
1964
2066
|
case 'Enter':
|
|
2067
|
+
|
|
1965
2068
|
case 'Space': {
|
|
1966
2069
|
this.onYearSelect(event, index);
|
|
1967
2070
|
event.preventDefault();
|
|
@@ -1987,37 +2090,29 @@ var script = {
|
|
|
1987
2090
|
if (this.navigationState.button) {
|
|
1988
2091
|
this.initFocusableCell();
|
|
1989
2092
|
|
|
1990
|
-
if (this.navigationState.backward)
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
|
|
1994
|
-
}
|
|
1995
|
-
else {
|
|
2093
|
+
if (this.navigationState.backward) DomHandler.findSingle(this.overlay, '.p-datepicker-prev').focus();
|
|
2094
|
+
else DomHandler.findSingle(this.overlay, '.p-datepicker-next').focus();
|
|
2095
|
+
} else {
|
|
1996
2096
|
if (this.navigationState.backward) {
|
|
1997
2097
|
let cells;
|
|
1998
2098
|
|
|
1999
2099
|
if (this.currentView === 'month') {
|
|
2000
2100
|
cells = DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
|
|
2001
|
-
}
|
|
2002
|
-
else if (this.currentView === 'year') {
|
|
2101
|
+
} else if (this.currentView === 'year') {
|
|
2003
2102
|
cells = DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
|
|
2004
|
-
}
|
|
2005
|
-
else {
|
|
2103
|
+
} else {
|
|
2006
2104
|
cells = DomHandler.find(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
2007
2105
|
}
|
|
2008
2106
|
|
|
2009
2107
|
if (cells && cells.length > 0) {
|
|
2010
2108
|
cell = cells[cells.length - 1];
|
|
2011
2109
|
}
|
|
2012
|
-
}
|
|
2013
|
-
else {
|
|
2110
|
+
} else {
|
|
2014
2111
|
if (this.currentView === 'month') {
|
|
2015
2112
|
cell = DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month:not(.p-disabled)');
|
|
2016
|
-
}
|
|
2017
|
-
else if (this.currentView === 'year') {
|
|
2113
|
+
} else if (this.currentView === 'year') {
|
|
2018
2114
|
cell = DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year:not(.p-disabled)');
|
|
2019
|
-
}
|
|
2020
|
-
else {
|
|
2115
|
+
} else {
|
|
2021
2116
|
cell = DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
|
|
2022
2117
|
}
|
|
2023
2118
|
}
|
|
@@ -2029,8 +2124,7 @@ var script = {
|
|
|
2029
2124
|
}
|
|
2030
2125
|
|
|
2031
2126
|
this.navigationState = null;
|
|
2032
|
-
}
|
|
2033
|
-
else {
|
|
2127
|
+
} else {
|
|
2034
2128
|
this.initFocusableCell();
|
|
2035
2129
|
}
|
|
2036
2130
|
},
|
|
@@ -2039,24 +2133,24 @@ var script = {
|
|
|
2039
2133
|
|
|
2040
2134
|
if (this.currentView === 'month') {
|
|
2041
2135
|
let cells = DomHandler.find(this.overlay, '.p-monthpicker .p-monthpicker-month');
|
|
2042
|
-
let selectedCell= DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
|
|
2043
|
-
|
|
2136
|
+
let selectedCell = DomHandler.findSingle(this.overlay, '.p-monthpicker .p-monthpicker-month.p-highlight');
|
|
2137
|
+
|
|
2138
|
+
cells.forEach((cell) => (cell.tabIndex = -1));
|
|
2044
2139
|
cell = selectedCell || cells[0];
|
|
2045
|
-
}
|
|
2046
|
-
else if (this.currentView === 'year') {
|
|
2140
|
+
} else if (this.currentView === 'year') {
|
|
2047
2141
|
let cells = DomHandler.find(this.overlay, '.p-yearpicker .p-yearpicker-year');
|
|
2048
|
-
let selectedCell= DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
|
|
2049
|
-
|
|
2142
|
+
let selectedCell = DomHandler.findSingle(this.overlay, '.p-yearpicker .p-yearpicker-year.p-highlight');
|
|
2143
|
+
|
|
2144
|
+
cells.forEach((cell) => (cell.tabIndex = -1));
|
|
2050
2145
|
cell = selectedCell || cells[0];
|
|
2051
|
-
}
|
|
2052
|
-
else {
|
|
2146
|
+
} else {
|
|
2053
2147
|
cell = DomHandler.findSingle(this.overlay, 'span.p-highlight');
|
|
2148
|
+
|
|
2054
2149
|
if (!cell) {
|
|
2055
2150
|
let todayCell = DomHandler.findSingle(this.overlay, 'td.p-datepicker-today span:not(.p-disabled):not(.p-ink');
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
else
|
|
2059
|
-
cell = DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
|
|
2151
|
+
|
|
2152
|
+
if (todayCell) cell = todayCell;
|
|
2153
|
+
else cell = DomHandler.findSingle(this.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
|
|
2060
2154
|
}
|
|
2061
2155
|
}
|
|
2062
2156
|
|
|
@@ -2077,34 +2171,27 @@ var script = {
|
|
|
2077
2171
|
if (focusableElements && focusableElements.length > 0) {
|
|
2078
2172
|
if (!document.activeElement) {
|
|
2079
2173
|
focusableElements[0].focus();
|
|
2080
|
-
}
|
|
2081
|
-
else {
|
|
2174
|
+
} else {
|
|
2082
2175
|
let focusedIndex = focusableElements.indexOf(document.activeElement);
|
|
2083
2176
|
|
|
2084
2177
|
if (event.shiftKey) {
|
|
2085
|
-
if (focusedIndex === -1 || focusedIndex === 0)
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
focusableElements[focusedIndex - 1].focus();
|
|
2089
|
-
}
|
|
2090
|
-
else {
|
|
2178
|
+
if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus();
|
|
2179
|
+
else focusableElements[focusedIndex - 1].focus();
|
|
2180
|
+
} else {
|
|
2091
2181
|
if (focusedIndex === -1) {
|
|
2092
2182
|
if (this.timeOnly) {
|
|
2093
2183
|
focusableElements[0].focus();
|
|
2094
|
-
}
|
|
2095
|
-
else {
|
|
2184
|
+
} else {
|
|
2096
2185
|
let spanIndex = null;
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2186
|
+
|
|
2187
|
+
for (let i = 0; i < focusableElements.length; i++) {
|
|
2188
|
+
if (focusableElements[i].tagName === 'SPAN') spanIndex = i;
|
|
2100
2189
|
}
|
|
2190
|
+
|
|
2101
2191
|
focusableElements[spanIndex].focus();
|
|
2102
2192
|
}
|
|
2103
|
-
}
|
|
2104
|
-
else
|
|
2105
|
-
focusableElements[0].focus();
|
|
2106
|
-
else
|
|
2107
|
-
focusableElements[focusedIndex + 1].focus();
|
|
2193
|
+
} else if (focusedIndex === focusableElements.length - 1) focusableElements[0].focus();
|
|
2194
|
+
else focusableElements[focusedIndex + 1].focus();
|
|
2108
2195
|
}
|
|
2109
2196
|
}
|
|
2110
2197
|
}
|
|
@@ -2113,12 +2200,12 @@ var script = {
|
|
|
2113
2200
|
switch (event.code) {
|
|
2114
2201
|
case 'Tab':
|
|
2115
2202
|
this.trapFocus(event);
|
|
2116
|
-
|
|
2203
|
+
break;
|
|
2117
2204
|
|
|
2118
2205
|
case 'Escape':
|
|
2119
2206
|
this.overlayVisible = false;
|
|
2120
2207
|
event.preventDefault();
|
|
2121
|
-
|
|
2208
|
+
break;
|
|
2122
2209
|
}
|
|
2123
2210
|
|
|
2124
2211
|
this.$emit('keydown', event);
|
|
@@ -2129,26 +2216,32 @@ var script = {
|
|
|
2129
2216
|
this.selectionEnd = this.input.selectionEnd;
|
|
2130
2217
|
|
|
2131
2218
|
let value = this.parseValue(event.target.value);
|
|
2219
|
+
|
|
2132
2220
|
if (this.isValidSelection(value)) {
|
|
2133
2221
|
this.typeUpdate = true;
|
|
2134
2222
|
this.updateModel(value);
|
|
2135
2223
|
}
|
|
2136
|
-
}
|
|
2137
|
-
catch(err) {
|
|
2224
|
+
} catch (err) {
|
|
2138
2225
|
/* NoOp */
|
|
2139
2226
|
}
|
|
2140
2227
|
|
|
2141
2228
|
this.$emit('input', event);
|
|
2142
2229
|
},
|
|
2230
|
+
onInputClick() {
|
|
2231
|
+
if (this.showOnFocus && this.isEnabled() && !this.overlayVisible) {
|
|
2232
|
+
this.overlayVisible = true;
|
|
2233
|
+
}
|
|
2234
|
+
},
|
|
2143
2235
|
onFocus(event) {
|
|
2144
2236
|
if (this.showOnFocus && this.isEnabled()) {
|
|
2145
2237
|
this.overlayVisible = true;
|
|
2146
2238
|
}
|
|
2239
|
+
|
|
2147
2240
|
this.focused = true;
|
|
2148
2241
|
this.$emit('focus', event);
|
|
2149
2242
|
},
|
|
2150
2243
|
onBlur(event) {
|
|
2151
|
-
this.$emit('blur', {originalEvent: event, value: event.target.value});
|
|
2244
|
+
this.$emit('blur', { originalEvent: event, value: event.target.value });
|
|
2152
2245
|
|
|
2153
2246
|
this.focused = false;
|
|
2154
2247
|
event.target.value = this.formatValue(this.modelValue);
|
|
@@ -2156,19 +2249,16 @@ var script = {
|
|
|
2156
2249
|
onKeyDown(event) {
|
|
2157
2250
|
if (event.code === 'ArrowDown' && this.overlay) {
|
|
2158
2251
|
this.trapFocus(event);
|
|
2159
|
-
}
|
|
2160
|
-
else if (event.code === 'ArrowDown' && !this.overlay) {
|
|
2252
|
+
} else if (event.code === 'ArrowDown' && !this.overlay) {
|
|
2161
2253
|
this.overlayVisible = true;
|
|
2162
|
-
}
|
|
2163
|
-
else if (event.code === 'Escape') {
|
|
2254
|
+
} else if (event.code === 'Escape') {
|
|
2164
2255
|
if (this.overlayVisible) {
|
|
2165
2256
|
this.overlayVisible = false;
|
|
2166
2257
|
event.preventDefault();
|
|
2167
2258
|
}
|
|
2168
|
-
}
|
|
2169
|
-
else if (event.code === 'Tab') {
|
|
2259
|
+
} else if (event.code === 'Tab') {
|
|
2170
2260
|
if (this.overlay) {
|
|
2171
|
-
DomHandler.getFocusableElements(this.overlay).forEach(el => el.tabIndex = '-1');
|
|
2261
|
+
DomHandler.getFocusableElements(this.overlay).forEach((el) => (el.tabIndex = '-1'));
|
|
2172
2262
|
}
|
|
2173
2263
|
|
|
2174
2264
|
if (this.overlayVisible) {
|
|
@@ -2216,10 +2306,9 @@ var script = {
|
|
|
2216
2306
|
}
|
|
2217
2307
|
|
|
2218
2308
|
let innerHTML = '';
|
|
2309
|
+
|
|
2219
2310
|
if (this.responsiveOptions) {
|
|
2220
|
-
let responsiveOptions = [...this.responsiveOptions]
|
|
2221
|
-
.filter(o => !!(o.breakpoint && o.numMonths))
|
|
2222
|
-
.sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
|
|
2311
|
+
let responsiveOptions = [...this.responsiveOptions].filter((o) => !!(o.breakpoint && o.numMonths)).sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
|
|
2223
2312
|
|
|
2224
2313
|
for (let i = 0; i < responsiveOptions.length; i++) {
|
|
2225
2314
|
let { breakpoint, numMonths } = responsiveOptions[i];
|
|
@@ -2247,7 +2336,7 @@ var script = {
|
|
|
2247
2336
|
|
|
2248
2337
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
2249
2338
|
}
|
|
2250
|
-
|
|
2339
|
+
},
|
|
2251
2340
|
destroyResponsiveStyleElement() {
|
|
2252
2341
|
if (this.responsiveStyleElement) {
|
|
2253
2342
|
this.responsiveStyleElement.remove();
|
|
@@ -2258,19 +2347,18 @@ var script = {
|
|
|
2258
2347
|
computed: {
|
|
2259
2348
|
viewDate() {
|
|
2260
2349
|
let propValue = this.modelValue;
|
|
2350
|
+
|
|
2261
2351
|
if (propValue && Array.isArray(propValue)) {
|
|
2262
2352
|
if (this.isRangeSelection()) {
|
|
2263
2353
|
propValue = propValue[1] || propValue[0];
|
|
2264
|
-
}
|
|
2265
|
-
else if (this.isMultipleSelection()) {
|
|
2354
|
+
} else if (this.isMultipleSelection()) {
|
|
2266
2355
|
propValue = propValue[propValue.length - 1];
|
|
2267
2356
|
}
|
|
2268
2357
|
}
|
|
2269
2358
|
|
|
2270
2359
|
if (propValue && typeof propValue !== 'string') {
|
|
2271
2360
|
return propValue;
|
|
2272
|
-
}
|
|
2273
|
-
else {
|
|
2361
|
+
} else {
|
|
2274
2362
|
let today = new Date();
|
|
2275
2363
|
|
|
2276
2364
|
if (this.maxDate && this.maxDate < today) {
|
|
@@ -2300,25 +2388,31 @@ var script = {
|
|
|
2300
2388
|
];
|
|
2301
2389
|
},
|
|
2302
2390
|
panelStyleClass() {
|
|
2303
|
-
return [
|
|
2304
|
-
'p-datepicker-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2391
|
+
return [
|
|
2392
|
+
'p-datepicker p-component',
|
|
2393
|
+
this.panelClass,
|
|
2394
|
+
{
|
|
2395
|
+
'p-datepicker-inline': this.inline,
|
|
2396
|
+
'p-disabled': this.disabled,
|
|
2397
|
+
'p-datepicker-timeonly': this.timeOnly,
|
|
2398
|
+
'p-datepicker-multiple-month': this.numberOfMonths > 1,
|
|
2399
|
+
'p-datepicker-monthpicker': this.currentView === 'month',
|
|
2400
|
+
'p-datepicker-yearpicker': this.currentView === 'year',
|
|
2401
|
+
'p-datepicker-touch-ui': this.touchUI,
|
|
2402
|
+
'p-input-filled': this.$primevue.config.inputStyle === 'filled',
|
|
2403
|
+
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
2404
|
+
}
|
|
2405
|
+
];
|
|
2314
2406
|
},
|
|
2315
2407
|
months() {
|
|
2316
2408
|
let months = [];
|
|
2317
|
-
|
|
2409
|
+
|
|
2410
|
+
for (let i = 0; i < this.numberOfMonths; i++) {
|
|
2318
2411
|
let month = this.currentMonth + i;
|
|
2319
2412
|
let year = this.currentYear;
|
|
2413
|
+
|
|
2320
2414
|
if (month > 11) {
|
|
2321
|
-
month = month % 11 - 1;
|
|
2415
|
+
month = (month % 11) - 1;
|
|
2322
2416
|
year = year + 1;
|
|
2323
2417
|
}
|
|
2324
2418
|
|
|
@@ -2335,30 +2429,33 @@ var script = {
|
|
|
2335
2429
|
let week = [];
|
|
2336
2430
|
|
|
2337
2431
|
if (i == 0) {
|
|
2338
|
-
for (let j =
|
|
2432
|
+
for (let j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) {
|
|
2339
2433
|
let prev = this.getPreviousMonthAndYear(month, year);
|
|
2340
|
-
|
|
2341
|
-
|
|
2434
|
+
|
|
2435
|
+
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) });
|
|
2342
2436
|
}
|
|
2343
2437
|
|
|
2344
2438
|
let remainingDaysLength = 7 - week.length;
|
|
2439
|
+
|
|
2345
2440
|
for (let j = 0; j < remainingDaysLength; j++) {
|
|
2346
|
-
week.push({day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year),
|
|
2347
|
-
selectable: this.isSelectable(dayNo, month, year, false)});
|
|
2441
|
+
week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
|
|
2348
2442
|
dayNo++;
|
|
2349
2443
|
}
|
|
2350
|
-
}
|
|
2351
|
-
else {
|
|
2444
|
+
} else {
|
|
2352
2445
|
for (let j = 0; j < 7; j++) {
|
|
2353
2446
|
if (dayNo > daysLength) {
|
|
2354
2447
|
let next = this.getNextMonthAndYear(month, year);
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2448
|
+
|
|
2449
|
+
week.push({
|
|
2450
|
+
day: dayNo - daysLength,
|
|
2451
|
+
month: next.month,
|
|
2452
|
+
year: next.year,
|
|
2453
|
+
otherMonth: true,
|
|
2454
|
+
today: this.isToday(today, dayNo - daysLength, next.month, next.year),
|
|
2455
|
+
selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true)
|
|
2456
|
+
});
|
|
2457
|
+
} else {
|
|
2458
|
+
week.push({ day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year), selectable: this.isSelectable(dayNo, month, year, false) });
|
|
2362
2459
|
}
|
|
2363
2460
|
|
|
2364
2461
|
dayNo++;
|
|
@@ -2385,15 +2482,16 @@ var script = {
|
|
|
2385
2482
|
weekDays() {
|
|
2386
2483
|
let weekDays = [];
|
|
2387
2484
|
let dayIndex = this.$primevue.config.locale.firstDayOfWeek;
|
|
2485
|
+
|
|
2388
2486
|
for (let i = 0; i < 7; i++) {
|
|
2389
2487
|
weekDays.push(this.$primevue.config.locale.dayNamesMin[dayIndex]);
|
|
2390
|
-
dayIndex =
|
|
2488
|
+
dayIndex = dayIndex == 6 ? 0 : ++dayIndex;
|
|
2391
2489
|
}
|
|
2392
2490
|
|
|
2393
2491
|
return weekDays;
|
|
2394
2492
|
},
|
|
2395
2493
|
ticksTo1970() {
|
|
2396
|
-
return ((
|
|
2494
|
+
return ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000;
|
|
2397
2495
|
},
|
|
2398
2496
|
sundayIndex() {
|
|
2399
2497
|
return this.$primevue.config.locale.firstDayOfWeek > 0 ? 7 - this.$primevue.config.locale.firstDayOfWeek : 0;
|
|
@@ -2411,8 +2509,7 @@ var script = {
|
|
|
2411
2509
|
|
|
2412
2510
|
if (this.currentYear < yearStart) {
|
|
2413
2511
|
$vm.currentYear = yearEnd;
|
|
2414
|
-
}
|
|
2415
|
-
else if (this.currentYear > yearEnd) {
|
|
2512
|
+
} else if (this.currentYear > yearEnd) {
|
|
2416
2513
|
$vm.currentYear = yearStart;
|
|
2417
2514
|
}
|
|
2418
2515
|
|
|
@@ -2421,13 +2518,13 @@ var script = {
|
|
|
2421
2518
|
}
|
|
2422
2519
|
|
|
2423
2520
|
return yearOptions;
|
|
2424
|
-
}
|
|
2425
|
-
else {
|
|
2521
|
+
} else {
|
|
2426
2522
|
return null;
|
|
2427
2523
|
}
|
|
2428
2524
|
},
|
|
2429
2525
|
monthPickerValues() {
|
|
2430
2526
|
let monthPickerValues = [];
|
|
2527
|
+
|
|
2431
2528
|
for (let i = 0; i <= 11; i++) {
|
|
2432
2529
|
monthPickerValues.push(this.$primevue.config.locale.monthNamesShort[i]);
|
|
2433
2530
|
}
|
|
@@ -2436,7 +2533,8 @@ var script = {
|
|
|
2436
2533
|
},
|
|
2437
2534
|
yearPickerValues() {
|
|
2438
2535
|
let yearPickerValues = [];
|
|
2439
|
-
let base = this.currentYear -
|
|
2536
|
+
let base = this.currentYear - (this.currentYear % 10);
|
|
2537
|
+
|
|
2440
2538
|
for (let i = 0; i < 10; i++) {
|
|
2441
2539
|
yearPickerValues.push(base + i);
|
|
2442
2540
|
}
|
|
@@ -2475,16 +2573,16 @@ var script = {
|
|
|
2475
2573
|
}
|
|
2476
2574
|
},
|
|
2477
2575
|
components: {
|
|
2478
|
-
|
|
2479
|
-
|
|
2576
|
+
CalendarButton: Button,
|
|
2577
|
+
Portal: Portal
|
|
2480
2578
|
},
|
|
2481
2579
|
directives: {
|
|
2482
|
-
|
|
2580
|
+
ripple: Ripple
|
|
2483
2581
|
}
|
|
2484
2582
|
};
|
|
2485
2583
|
|
|
2486
2584
|
const _hoisted_1 = ["id"];
|
|
2487
|
-
const _hoisted_2 = ["id", "placeholder", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "readonly"];
|
|
2585
|
+
const _hoisted_2 = ["id", "placeholder", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "disabled", "readonly"];
|
|
2488
2586
|
const _hoisted_3 = ["id", "role", "aria-modal", "aria-label"];
|
|
2489
2587
|
const _hoisted_4 = { class: "p-datepicker-group-container" };
|
|
2490
2588
|
const _hoisted_5 = { class: "p-datepicker-header" };
|
|
@@ -2637,9 +2735,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2637
2735
|
? (openBlock(), createElementBlock("input", mergeProps({
|
|
2638
2736
|
key: 0,
|
|
2639
2737
|
ref: $options.inputRef,
|
|
2738
|
+
id: $props.inputId,
|
|
2640
2739
|
type: "text",
|
|
2641
2740
|
role: "combobox",
|
|
2642
|
-
id: $props.inputId,
|
|
2643
2741
|
class: ['p-inputtext p-component', $props.inputClass],
|
|
2644
2742
|
style: $props.inputStyle,
|
|
2645
2743
|
placeholder: $props.placeholder,
|
|
@@ -2650,12 +2748,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2650
2748
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
2651
2749
|
"aria-label": _ctx.ariaLabel,
|
|
2652
2750
|
inputmode: "none",
|
|
2653
|
-
|
|
2654
|
-
onFocus: _cache[1] || (_cache[1] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
2655
|
-
onBlur: _cache[2] || (_cache[2] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
2656
|
-
onKeydown: _cache[3] || (_cache[3] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
|
|
2751
|
+
disabled: $props.disabled,
|
|
2657
2752
|
readonly: !$props.manualInput,
|
|
2658
|
-
tabindex: 0
|
|
2753
|
+
tabindex: 0,
|
|
2754
|
+
onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args))),
|
|
2755
|
+
onClick: _cache[1] || (_cache[1] = (...args) => ($options.onInputClick && $options.onInputClick(...args))),
|
|
2756
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
2757
|
+
onBlur: _cache[3] || (_cache[3] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
2758
|
+
onKeydown: _cache[4] || (_cache[4] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args)))
|
|
2659
2759
|
}, $props.inputProps), null, 16, _hoisted_2))
|
|
2660
2760
|
: createCommentVNode("", true),
|
|
2661
2761
|
($props.showIcon)
|
|
@@ -2679,7 +2779,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2679
2779
|
default: withCtx(() => [
|
|
2680
2780
|
createVNode(Transition, {
|
|
2681
2781
|
name: "p-connected-overlay",
|
|
2682
|
-
onEnter: _cache[
|
|
2782
|
+
onEnter: _cache[68] || (_cache[68] = $event => ($options.onOverlayEnter($event))),
|
|
2683
2783
|
onAfterEnter: $options.onOverlayEnterComplete,
|
|
2684
2784
|
onAfterLeave: $options.onOverlayAfterLeave,
|
|
2685
2785
|
onLeave: $options.onOverlayLeave
|
|
@@ -2695,27 +2795,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2695
2795
|
role: $props.inline ? null : 'dialog',
|
|
2696
2796
|
"aria-modal": $props.inline ? null : 'true',
|
|
2697
2797
|
"aria-label": _ctx.$primevue.config.locale.chooseDate,
|
|
2698
|
-
onClick: _cache[
|
|
2699
|
-
onKeydown: _cache[
|
|
2700
|
-
onMouseup: _cache[
|
|
2798
|
+
onClick: _cache[65] || (_cache[65] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args))),
|
|
2799
|
+
onKeydown: _cache[66] || (_cache[66] = (...args) => ($options.onOverlayKeyDown && $options.onOverlayKeyDown(...args))),
|
|
2800
|
+
onMouseup: _cache[67] || (_cache[67] = (...args) => ($options.onOverlayMouseUp && $options.onOverlayMouseUp(...args)))
|
|
2701
2801
|
}, $props.panelProps), [
|
|
2702
2802
|
(!$props.timeOnly)
|
|
2703
2803
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2704
2804
|
createElementVNode("div", _hoisted_4, [
|
|
2705
2805
|
(openBlock(true), createElementBlock(Fragment, null, renderList($options.months, (month, groupIndex) => {
|
|
2706
2806
|
return (openBlock(), createElementBlock("div", {
|
|
2707
|
-
|
|
2708
|
-
|
|
2807
|
+
key: month.month + month.year,
|
|
2808
|
+
class: "p-datepicker-group"
|
|
2709
2809
|
}, [
|
|
2710
2810
|
createElementVNode("div", _hoisted_5, [
|
|
2711
2811
|
renderSlot(_ctx.$slots, "header"),
|
|
2712
2812
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2713
2813
|
class: "p-datepicker-prev p-link",
|
|
2714
|
-
onClick: _cache[
|
|
2814
|
+
onClick: _cache[5] || (_cache[5] = (...args) => ($options.onPrevButtonClick && $options.onPrevButtonClick(...args))),
|
|
2715
2815
|
type: "button",
|
|
2716
|
-
onKeydown: _cache[
|
|
2816
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2717
2817
|
disabled: $props.disabled,
|
|
2718
|
-
"aria-label":
|
|
2818
|
+
"aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.prevDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.prevYear : _ctx.$primevue.config.locale.prevMonth
|
|
2719
2819
|
}, _hoisted_8, 40, _hoisted_6)), [
|
|
2720
2820
|
[vShow, $props.showOtherMonths ? groupIndex === 0 : false],
|
|
2721
2821
|
[_directive_ripple]
|
|
@@ -2725,8 +2825,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2725
2825
|
? (openBlock(), createElementBlock("button", {
|
|
2726
2826
|
key: 0,
|
|
2727
2827
|
type: "button",
|
|
2728
|
-
onClick: _cache[
|
|
2729
|
-
onKeydown: _cache[
|
|
2828
|
+
onClick: _cache[7] || (_cache[7] = (...args) => ($options.switchToMonthView && $options.switchToMonthView(...args))),
|
|
2829
|
+
onKeydown: _cache[8] || (_cache[8] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2730
2830
|
class: "p-datepicker-month p-link",
|
|
2731
2831
|
disabled: $options.switchViewButtonDisabled,
|
|
2732
2832
|
"aria-label": _ctx.$primevue.config.locale.chooseMonth
|
|
@@ -2736,8 +2836,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2736
2836
|
? (openBlock(), createElementBlock("button", {
|
|
2737
2837
|
key: 1,
|
|
2738
2838
|
type: "button",
|
|
2739
|
-
onClick: _cache[
|
|
2740
|
-
onKeydown: _cache[
|
|
2839
|
+
onClick: _cache[9] || (_cache[9] = (...args) => ($options.switchToYearView && $options.switchToYearView(...args))),
|
|
2840
|
+
onKeydown: _cache[10] || (_cache[10] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2741
2841
|
class: "p-datepicker-year p-link",
|
|
2742
2842
|
disabled: $options.switchViewButtonDisabled,
|
|
2743
2843
|
"aria-label": _ctx.$primevue.config.locale.chooseYear
|
|
@@ -2753,17 +2853,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2753
2853
|
]),
|
|
2754
2854
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2755
2855
|
class: "p-datepicker-next p-link",
|
|
2756
|
-
onClick: _cache[
|
|
2856
|
+
onClick: _cache[11] || (_cache[11] = (...args) => ($options.onNextButtonClick && $options.onNextButtonClick(...args))),
|
|
2757
2857
|
type: "button",
|
|
2758
|
-
onKeydown: _cache[
|
|
2858
|
+
onKeydown: _cache[12] || (_cache[12] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2759
2859
|
disabled: $props.disabled,
|
|
2760
|
-
"aria-label":
|
|
2860
|
+
"aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.nextDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.nextYear : _ctx.$primevue.config.locale.nextMonth
|
|
2761
2861
|
}, _hoisted_15, 40, _hoisted_13)), [
|
|
2762
|
-
[vShow, $props.showOtherMonths ? $props.numberOfMonths === 1 ? true :
|
|
2862
|
+
[vShow, $props.showOtherMonths ? ($props.numberOfMonths === 1 ? true : groupIndex === $props.numberOfMonths - 1) : false],
|
|
2763
2863
|
[_directive_ripple]
|
|
2764
2864
|
])
|
|
2765
2865
|
]),
|
|
2766
|
-
($data.currentView ==='date')
|
|
2866
|
+
($data.currentView === 'date')
|
|
2767
2867
|
? (openBlock(), createElementBlock("div", _hoisted_16, [
|
|
2768
2868
|
createElementVNode("table", _hoisted_17, [
|
|
2769
2869
|
createElementVNode("thead", null, [
|
|
@@ -2775,8 +2875,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2775
2875
|
: createCommentVNode("", true),
|
|
2776
2876
|
(openBlock(true), createElementBlock(Fragment, null, renderList($options.weekDays, (weekDay) => {
|
|
2777
2877
|
return (openBlock(), createElementBlock("th", {
|
|
2778
|
-
scope: "col",
|
|
2779
2878
|
key: weekDay,
|
|
2879
|
+
scope: "col",
|
|
2780
2880
|
abbr: weekDay
|
|
2781
2881
|
}, [
|
|
2782
2882
|
createElementVNode("span", null, toDisplayString(weekDay), 1)
|
|
@@ -2801,15 +2901,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2801
2901
|
: createCommentVNode("", true),
|
|
2802
2902
|
(openBlock(true), createElementBlock(Fragment, null, renderList(week, (date) => {
|
|
2803
2903
|
return (openBlock(), createElementBlock("td", {
|
|
2804
|
-
"aria-label": date.day,
|
|
2805
2904
|
key: date.day + '' + date.month,
|
|
2806
|
-
|
|
2905
|
+
"aria-label": date.day,
|
|
2906
|
+
class: normalizeClass({ 'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today })
|
|
2807
2907
|
}, [
|
|
2808
2908
|
withDirectives((openBlock(), createElementBlock("span", {
|
|
2809
|
-
class: normalizeClass({'p-highlight': $options.isSelected(date), 'p-disabled': !date.selectable}),
|
|
2909
|
+
class: normalizeClass({ 'p-highlight': $options.isSelected(date), 'p-disabled': !date.selectable }),
|
|
2810
2910
|
onClick: $event => ($options.onDateSelect($event, date)),
|
|
2811
2911
|
draggable: "false",
|
|
2812
|
-
onKeydown: $event => ($options.onDateCellKeydown($event,date,groupIndex)),
|
|
2912
|
+
onKeydown: $event => ($options.onDateCellKeydown($event, date, groupIndex)),
|
|
2813
2913
|
"aria-selected": $options.isSelected(date)
|
|
2814
2914
|
}, [
|
|
2815
2915
|
renderSlot(_ctx.$slots, "date", { date: date }, () => [
|
|
@@ -2838,8 +2938,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2838
2938
|
return withDirectives((openBlock(), createElementBlock("span", {
|
|
2839
2939
|
key: m,
|
|
2840
2940
|
onClick: $event => ($options.onMonthSelect($event, i)),
|
|
2841
|
-
onKeydown: $event => ($options.onMonthCellKeydown($event,i)),
|
|
2842
|
-
class: normalizeClass(["p-monthpicker-month", {'p-highlight': $options.isMonthSelected(i)}])
|
|
2941
|
+
onKeydown: $event => ($options.onMonthCellKeydown($event, i)),
|
|
2942
|
+
class: normalizeClass(["p-monthpicker-month", { 'p-highlight': $options.isMonthSelected(i) }])
|
|
2843
2943
|
}, [
|
|
2844
2944
|
createTextVNode(toDisplayString(m) + " ", 1),
|
|
2845
2945
|
($options.isMonthSelected(i))
|
|
@@ -2857,8 +2957,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2857
2957
|
return withDirectives((openBlock(), createElementBlock("span", {
|
|
2858
2958
|
key: y,
|
|
2859
2959
|
onClick: $event => ($options.onYearSelect($event, y)),
|
|
2860
|
-
onKeydown: $event => ($options.onYearCellKeydown($event,y)),
|
|
2861
|
-
class: normalizeClass(["p-yearpicker-year", {'p-highlight': $options.isYearSelected(y)}])
|
|
2960
|
+
onKeydown: $event => ($options.onYearCellKeydown($event, y)),
|
|
2961
|
+
class: normalizeClass(["p-yearpicker-year", { 'p-highlight': $options.isYearSelected(y) }])
|
|
2862
2962
|
}, [
|
|
2863
2963
|
createTextVNode(toDisplayString(y) + " ", 1),
|
|
2864
2964
|
($options.isYearSelected(y))
|
|
@@ -2872,23 +2972,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2872
2972
|
: createCommentVNode("", true)
|
|
2873
2973
|
], 64))
|
|
2874
2974
|
: createCommentVNode("", true),
|
|
2875
|
-
(($props.showTime
|
|
2975
|
+
(($props.showTime || $props.timeOnly) && $data.currentView === 'date')
|
|
2876
2976
|
? (openBlock(), createElementBlock("div", _hoisted_32, [
|
|
2877
2977
|
createElementVNode("div", _hoisted_33, [
|
|
2878
2978
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2879
2979
|
class: "p-link",
|
|
2880
2980
|
"aria-label": _ctx.$primevue.config.locale.nextHour,
|
|
2881
|
-
onMousedown: _cache[
|
|
2882
|
-
onMouseup: _cache[
|
|
2981
|
+
onMousedown: _cache[13] || (_cache[13] = $event => ($options.onTimePickerElementMouseDown($event, 0, 1))),
|
|
2982
|
+
onMouseup: _cache[14] || (_cache[14] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2883
2983
|
onKeydown: [
|
|
2884
|
-
_cache[
|
|
2885
|
-
_cache[
|
|
2886
|
-
_cache[
|
|
2984
|
+
_cache[15] || (_cache[15] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
2985
|
+
_cache[17] || (_cache[17] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["enter"])),
|
|
2986
|
+
_cache[18] || (_cache[18] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["space"]))
|
|
2887
2987
|
],
|
|
2888
|
-
onMouseleave: _cache[
|
|
2988
|
+
onMouseleave: _cache[16] || (_cache[16] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2889
2989
|
onKeyup: [
|
|
2890
|
-
_cache[
|
|
2891
|
-
_cache[
|
|
2990
|
+
_cache[19] || (_cache[19] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
2991
|
+
_cache[20] || (_cache[20] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2892
2992
|
],
|
|
2893
2993
|
type: "button"
|
|
2894
2994
|
}, _hoisted_36, 40, _hoisted_34)), [
|
|
@@ -2898,17 +2998,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2898
2998
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2899
2999
|
class: "p-link",
|
|
2900
3000
|
"aria-label": _ctx.$primevue.config.locale.prevHour,
|
|
2901
|
-
onMousedown: _cache[
|
|
2902
|
-
onMouseup: _cache[
|
|
3001
|
+
onMousedown: _cache[21] || (_cache[21] = $event => ($options.onTimePickerElementMouseDown($event, 0, -1))),
|
|
3002
|
+
onMouseup: _cache[22] || (_cache[22] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2903
3003
|
onKeydown: [
|
|
2904
|
-
_cache[
|
|
2905
|
-
_cache[
|
|
2906
|
-
_cache[
|
|
3004
|
+
_cache[23] || (_cache[23] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3005
|
+
_cache[25] || (_cache[25] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["enter"])),
|
|
3006
|
+
_cache[26] || (_cache[26] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["space"]))
|
|
2907
3007
|
],
|
|
2908
|
-
onMouseleave: _cache[
|
|
3008
|
+
onMouseleave: _cache[24] || (_cache[24] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2909
3009
|
onKeyup: [
|
|
2910
|
-
_cache[
|
|
2911
|
-
_cache[
|
|
3010
|
+
_cache[27] || (_cache[27] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3011
|
+
_cache[28] || (_cache[28] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2912
3012
|
],
|
|
2913
3013
|
type: "button"
|
|
2914
3014
|
}, _hoisted_39, 40, _hoisted_37)), [
|
|
@@ -2922,18 +3022,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2922
3022
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2923
3023
|
class: "p-link",
|
|
2924
3024
|
"aria-label": _ctx.$primevue.config.locale.nextMinute,
|
|
2925
|
-
onMousedown: _cache[
|
|
2926
|
-
onMouseup: _cache[
|
|
3025
|
+
onMousedown: _cache[29] || (_cache[29] = $event => ($options.onTimePickerElementMouseDown($event, 1, 1))),
|
|
3026
|
+
onMouseup: _cache[30] || (_cache[30] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2927
3027
|
onKeydown: [
|
|
2928
|
-
_cache[
|
|
2929
|
-
_cache[
|
|
2930
|
-
_cache[
|
|
3028
|
+
_cache[31] || (_cache[31] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3029
|
+
_cache[33] || (_cache[33] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["enter"])),
|
|
3030
|
+
_cache[34] || (_cache[34] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["space"]))
|
|
2931
3031
|
],
|
|
2932
3032
|
disabled: $props.disabled,
|
|
2933
|
-
onMouseleave: _cache[
|
|
3033
|
+
onMouseleave: _cache[32] || (_cache[32] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2934
3034
|
onKeyup: [
|
|
2935
|
-
_cache[
|
|
2936
|
-
_cache[
|
|
3035
|
+
_cache[35] || (_cache[35] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3036
|
+
_cache[36] || (_cache[36] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2937
3037
|
],
|
|
2938
3038
|
type: "button"
|
|
2939
3039
|
}, _hoisted_44, 40, _hoisted_42)), [
|
|
@@ -2943,18 +3043,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2943
3043
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2944
3044
|
class: "p-link",
|
|
2945
3045
|
"aria-label": _ctx.$primevue.config.locale.prevMinute,
|
|
2946
|
-
onMousedown: _cache[
|
|
2947
|
-
onMouseup: _cache[
|
|
3046
|
+
onMousedown: _cache[37] || (_cache[37] = $event => ($options.onTimePickerElementMouseDown($event, 1, -1))),
|
|
3047
|
+
onMouseup: _cache[38] || (_cache[38] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2948
3048
|
onKeydown: [
|
|
2949
|
-
_cache[
|
|
2950
|
-
_cache[
|
|
2951
|
-
_cache[
|
|
3049
|
+
_cache[39] || (_cache[39] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3050
|
+
_cache[41] || (_cache[41] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["enter"])),
|
|
3051
|
+
_cache[42] || (_cache[42] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["space"]))
|
|
2952
3052
|
],
|
|
2953
3053
|
disabled: $props.disabled,
|
|
2954
|
-
onMouseleave: _cache[
|
|
3054
|
+
onMouseleave: _cache[40] || (_cache[40] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2955
3055
|
onKeyup: [
|
|
2956
|
-
_cache[
|
|
2957
|
-
_cache[
|
|
3056
|
+
_cache[43] || (_cache[43] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3057
|
+
_cache[44] || (_cache[44] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2958
3058
|
],
|
|
2959
3059
|
type: "button"
|
|
2960
3060
|
}, _hoisted_47, 40, _hoisted_45)), [
|
|
@@ -2971,18 +3071,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2971
3071
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2972
3072
|
class: "p-link",
|
|
2973
3073
|
"aria-label": _ctx.$primevue.config.locale.nextSecond,
|
|
2974
|
-
onMousedown: _cache[
|
|
2975
|
-
onMouseup: _cache[
|
|
3074
|
+
onMousedown: _cache[45] || (_cache[45] = $event => ($options.onTimePickerElementMouseDown($event, 2, 1))),
|
|
3075
|
+
onMouseup: _cache[46] || (_cache[46] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2976
3076
|
onKeydown: [
|
|
2977
|
-
_cache[
|
|
2978
|
-
_cache[
|
|
2979
|
-
_cache[
|
|
3077
|
+
_cache[47] || (_cache[47] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3078
|
+
_cache[49] || (_cache[49] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["enter"])),
|
|
3079
|
+
_cache[50] || (_cache[50] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["space"]))
|
|
2980
3080
|
],
|
|
2981
3081
|
disabled: $props.disabled,
|
|
2982
|
-
onMouseleave: _cache[
|
|
3082
|
+
onMouseleave: _cache[48] || (_cache[48] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
2983
3083
|
onKeyup: [
|
|
2984
|
-
_cache[
|
|
2985
|
-
_cache[
|
|
3084
|
+
_cache[51] || (_cache[51] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3085
|
+
_cache[52] || (_cache[52] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
2986
3086
|
],
|
|
2987
3087
|
type: "button"
|
|
2988
3088
|
}, _hoisted_52, 40, _hoisted_50)), [
|
|
@@ -2992,18 +3092,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2992
3092
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
2993
3093
|
class: "p-link",
|
|
2994
3094
|
"aria-label": _ctx.$primevue.config.locale.prevSecond,
|
|
2995
|
-
onMousedown: _cache[
|
|
2996
|
-
onMouseup: _cache[
|
|
3095
|
+
onMousedown: _cache[53] || (_cache[53] = $event => ($options.onTimePickerElementMouseDown($event, 2, -1))),
|
|
3096
|
+
onMouseup: _cache[54] || (_cache[54] = $event => ($options.onTimePickerElementMouseUp($event))),
|
|
2997
3097
|
onKeydown: [
|
|
2998
|
-
_cache[
|
|
2999
|
-
_cache[
|
|
3000
|
-
_cache[
|
|
3098
|
+
_cache[55] || (_cache[55] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),
|
|
3099
|
+
_cache[57] || (_cache[57] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["enter"])),
|
|
3100
|
+
_cache[58] || (_cache[58] = withKeys($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["space"]))
|
|
3001
3101
|
],
|
|
3002
3102
|
disabled: $props.disabled,
|
|
3003
|
-
onMouseleave: _cache[
|
|
3103
|
+
onMouseleave: _cache[56] || (_cache[56] = $event => ($options.onTimePickerElementMouseLeave())),
|
|
3004
3104
|
onKeyup: [
|
|
3005
|
-
_cache[
|
|
3006
|
-
_cache[
|
|
3105
|
+
_cache[59] || (_cache[59] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),
|
|
3106
|
+
_cache[60] || (_cache[60] = withKeys($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))
|
|
3007
3107
|
],
|
|
3008
3108
|
type: "button"
|
|
3009
3109
|
}, _hoisted_55, 40, _hoisted_53)), [
|
|
@@ -3011,27 +3111,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3011
3111
|
])
|
|
3012
3112
|
]))
|
|
3013
3113
|
: createCommentVNode("", true),
|
|
3014
|
-
($props.hourFormat=='12')
|
|
3114
|
+
($props.hourFormat == '12')
|
|
3015
3115
|
? (openBlock(), createElementBlock("div", _hoisted_56, [
|
|
3016
3116
|
createElementVNode("span", null, toDisplayString($props.timeSeparator), 1)
|
|
3017
3117
|
]))
|
|
3018
3118
|
: createCommentVNode("", true),
|
|
3019
|
-
($props.hourFormat=='12')
|
|
3119
|
+
($props.hourFormat == '12')
|
|
3020
3120
|
? (openBlock(), createElementBlock("div", _hoisted_57, [
|
|
3021
3121
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
3022
3122
|
class: "p-link",
|
|
3023
3123
|
"aria-label": _ctx.$primevue.config.locale.am,
|
|
3024
|
-
onClick: _cache[
|
|
3124
|
+
onClick: _cache[61] || (_cache[61] = $event => ($options.toggleAMPM($event))),
|
|
3025
3125
|
type: "button",
|
|
3026
3126
|
disabled: $props.disabled
|
|
3027
3127
|
}, _hoisted_60, 8, _hoisted_58)), [
|
|
3028
3128
|
[_directive_ripple]
|
|
3029
3129
|
]),
|
|
3030
|
-
createElementVNode("span", null, toDisplayString($data.pm ?
|
|
3130
|
+
createElementVNode("span", null, toDisplayString($data.pm ? _ctx.$primevue.config.locale.pm : _ctx.$primevue.config.locale.am), 1),
|
|
3031
3131
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
3032
3132
|
class: "p-link",
|
|
3033
3133
|
"aria-label": _ctx.$primevue.config.locale.pm,
|
|
3034
|
-
onClick: _cache[
|
|
3134
|
+
onClick: _cache[62] || (_cache[62] = $event => ($options.toggleAMPM($event))),
|
|
3035
3135
|
type: "button",
|
|
3036
3136
|
disabled: $props.disabled
|
|
3037
3137
|
}, _hoisted_63, 8, _hoisted_61)), [
|
|
@@ -3046,14 +3146,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3046
3146
|
createVNode(_component_CalendarButton, {
|
|
3047
3147
|
type: "button",
|
|
3048
3148
|
label: $options.todayLabel,
|
|
3049
|
-
onClick: _cache[
|
|
3149
|
+
onClick: _cache[63] || (_cache[63] = $event => ($options.onTodayButtonClick($event))),
|
|
3050
3150
|
class: "p-button-text",
|
|
3051
3151
|
onKeydown: $options.onContainerButtonKeydown
|
|
3052
3152
|
}, null, 8, ["label", "onKeydown"]),
|
|
3053
3153
|
createVNode(_component_CalendarButton, {
|
|
3054
3154
|
type: "button",
|
|
3055
3155
|
label: $options.clearLabel,
|
|
3056
|
-
onClick: _cache[
|
|
3156
|
+
onClick: _cache[64] || (_cache[64] = $event => ($options.onClearButtonClick($event))),
|
|
3057
3157
|
class: "p-button-text",
|
|
3058
3158
|
onKeydown: $options.onContainerButtonKeydown
|
|
3059
3159
|
}, null, 8, ["label", "onKeydown"])
|
|
@@ -3098,7 +3198,7 @@ function styleInject(css, ref) {
|
|
|
3098
3198
|
}
|
|
3099
3199
|
}
|
|
3100
3200
|
|
|
3101
|
-
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
|
|
3201
|
+
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";
|
|
3102
3202
|
styleInject(css_248z);
|
|
3103
3203
|
|
|
3104
3204
|
script.render = render;
|