primereact 9.4.0 → 9.6.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/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -2
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +215 -3
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +882 -8
- package/api/api.esm.js +210 -4
- package/api/api.esm.min.js +1 -1
- package/api/api.js +216 -5
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +148 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +138 -2
- package/autocomplete/autocomplete.esm.js +150 -91
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +149 -91
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +3 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +4 -3
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +3 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +4 -3
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +4 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +4 -3
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +5 -4
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +97 -52
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +97 -52
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +96 -53
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +6 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +6 -0
- package/button/button.esm.js +6 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +7 -4
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +322 -223
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +272 -3
- package/calendar/calendar.esm.js +324 -225
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +323 -225
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +3 -1
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +5 -11
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +4 -3
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +154 -92
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +121 -1
- package/carousel/carousel.esm.js +156 -94
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +155 -94
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +181 -108
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +100 -1
- package/cascadeselect/cascadeselect.esm.js +183 -110
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +180 -108
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +31 -44
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +30 -0
- package/chart/chart.esm.js +18 -31
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +141 -156
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +113 -48
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +65 -1
- package/checkbox/checkbox.esm.js +115 -50
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +113 -50
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +3 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.esm.js +3 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +4 -3
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +84 -55
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +78 -6
- package/chips/chips.esm.js +85 -56
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +83 -57
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +123 -49
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +81 -0
- package/colorpicker/colorpicker.esm.js +125 -51
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +124 -51
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +2 -0
- package/column/column.d.ts +298 -1
- package/column/column.esm.js +2 -0
- package/column/column.js +2 -0
- package/columngroup/columngroup.d.ts +28 -0
- package/componentbase/componentbase.cjs.js +29 -5
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +25 -5
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +30 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +4 -3
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +5 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +4 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +5 -4
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +6 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -4
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +121 -69
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +123 -71
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +122 -71
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +14005 -2381
- package/core/core.min.js +47 -47
- package/csstransition/csstransition.cjs.js +3 -2
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +3 -2
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -3
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +34 -43
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +51 -1
- package/datascroller/datascroller.esm.js +36 -45
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +35 -45
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +1089 -649
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +191 -3
- package/datatable/datatable.esm.js +1091 -651
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +1090 -651
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +125 -109
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +105 -2
- package/dataview/dataview.esm.js +127 -111
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +123 -108
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -3
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +6 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +7 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +3 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +4 -3
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +85 -46
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +86 -47
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +85 -48
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +170 -120
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +154 -2
- package/dropdown/dropdown.esm.js +172 -122
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +170 -121
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +95 -116
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +50 -0
- package/editor/editor.esm.js +96 -117
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +95 -118
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +3 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +4 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +234 -191
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +160 -1
- package/fileupload/fileupload.esm.js +235 -192
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +231 -188
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +139 -124
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +141 -126
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +138 -124
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +10 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +7 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +11 -5
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +415 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +415 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +415 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +415 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +415 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +415 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +415 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +415 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +415 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +415 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +415 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +415 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +415 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +415 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +415 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +415 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +415 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +415 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +415 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +415 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +415 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +415 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +415 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +415 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +415 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +415 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +415 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +415 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +415 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +415 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +415 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +415 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +415 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +415 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +415 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +415 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +415 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +415 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +415 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +415 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +415 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +415 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +415 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +415 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +415 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +415 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +415 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +415 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +415 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +415 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +415 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +415 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +415 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +415 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +415 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +415 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +415 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +415 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +415 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +415 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +415 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +415 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +415 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +415 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +415 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +415 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +415 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +415 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +415 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +415 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +415 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +415 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +415 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +415 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +415 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +415 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +415 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +415 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +415 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +415 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +415 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +415 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +415 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +415 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +480 -80
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +483 -83
- package/image/image.esm.min.js +1 -1
- package/image/image.js +481 -82
- package/image/image.min.css +1 -1
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +26 -26
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +7 -2
- package/inputmask/inputmask.esm.js +27 -27
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +26 -28
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +68 -48
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +62 -1
- package/inputnumber/inputnumber.esm.js +66 -49
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +68 -50
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +84 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +61 -0
- package/inputswitch/inputswitch.esm.js +85 -26
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +83 -27
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -15
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +32 -0
- package/inputtext/inputtext.esm.js +26 -16
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +25 -17
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +25 -15
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +33 -1
- package/inputtextarea/inputtextarea.esm.js +26 -16
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +25 -17
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +25 -9
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +25 -9
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +25 -11
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +44 -43
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +42 -0
- package/knob/knob.esm.js +45 -44
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +44 -45
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +86 -56
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +103 -3
- package/listbox/listbox.esm.js +88 -58
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +86 -57
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +151 -99
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +152 -100
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +149 -98
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +87 -61
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +80 -1
- package/mention/mention.esm.js +89 -63
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +88 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +99 -59
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +101 -61
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +100 -61
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +122 -114
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +124 -116
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +122 -115
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +69 -47
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +70 -48
- package/message/message.esm.min.js +1 -1
- package/message/message.js +69 -49
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +65 -63
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +66 -64
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +65 -64
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +249 -193
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +185 -3
- package/multiselect/multiselect.esm.js +252 -196
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +249 -194
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +47 -33
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +61 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +49 -35
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +48 -35
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +188 -110
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +118 -2
- package/orderlist/orderlist.esm.js +190 -112
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +186 -109
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +139 -73
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +89 -2
- package/organizationchart/organizationchart.esm.js +140 -74
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +139 -75
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +7 -6
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +8 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +8 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +172 -166
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +111 -5
- package/paginator/paginator.esm.js +174 -168
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +172 -167
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +3 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +148 -84
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +148 -84
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +146 -84
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +89 -46
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +98 -2
- package/password/password.esm.js +91 -48
- package/password/password.esm.min.js +1 -1
- package/password/password.js +88 -46
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +146 -82
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +133 -1
- package/picklist/picklist.esm.js +148 -84
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +143 -80
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +3 -2
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +3 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +4 -3
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +6656 -4389
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6655 -4390
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +6656 -4389
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +3 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +4 -3
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +3 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +4 -3
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +90 -30
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +66 -1
- package/radiobutton/radiobutton.esm.js +91 -31
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +89 -32
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +47 -36
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +64 -1
- package/rating/rating.esm.js +48 -37
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +47 -38
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +475 -465
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +33 -8
- package/resources/themes/arya-green/theme.css +33 -8
- package/resources/themes/arya-orange/theme.css +33 -8
- package/resources/themes/arya-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-light-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-light-purple/theme.css +33 -8
- package/resources/themes/fluent-light/theme.css +33 -8
- package/resources/themes/lara-dark-blue/theme.css +33 -8
- package/resources/themes/lara-dark-indigo/theme.css +33 -8
- package/resources/themes/lara-dark-purple/theme.css +33 -8
- package/resources/themes/lara-dark-teal/theme.css +33 -8
- package/resources/themes/lara-light-blue/theme.css +33 -8
- package/resources/themes/lara-light-indigo/theme.css +33 -8
- package/resources/themes/lara-light-purple/theme.css +33 -8
- package/resources/themes/lara-light-teal/theme.css +33 -8
- package/resources/themes/luna-amber/theme.css +33 -8
- package/resources/themes/luna-blue/theme.css +33 -8
- package/resources/themes/luna-green/theme.css +33 -8
- package/resources/themes/luna-pink/theme.css +33 -8
- package/resources/themes/md-dark-deeppurple/theme.css +33 -8
- package/resources/themes/md-dark-indigo/theme.css +33 -8
- package/resources/themes/md-light-deeppurple/theme.css +33 -8
- package/resources/themes/md-light-indigo/theme.css +33 -8
- package/resources/themes/mdc-dark-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-dark-indigo/theme.css +33 -8
- package/resources/themes/mdc-light-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-light-indigo/theme.css +33 -8
- package/resources/themes/mira/theme.css +33 -8
- package/resources/themes/nano/theme.css +33 -8
- package/resources/themes/nova/theme.css +33 -8
- package/resources/themes/nova-accent/theme.css +33 -8
- package/resources/themes/nova-alt/theme.css +33 -8
- package/resources/themes/rhea/theme.css +33 -8
- package/resources/themes/saga-blue/theme.css +33 -8
- package/resources/themes/saga-green/theme.css +33 -8
- package/resources/themes/saga-orange/theme.css +33 -8
- package/resources/themes/saga-purple/theme.css +33 -8
- package/resources/themes/soho-dark/theme.css +33 -8
- package/resources/themes/soho-light/theme.css +33 -8
- package/resources/themes/tailwind-light/theme.css +45 -20
- package/resources/themes/vela-blue/theme.css +33 -8
- package/resources/themes/vela-green/theme.css +33 -8
- package/resources/themes/vela-orange/theme.css +33 -8
- package/resources/themes/vela-purple/theme.css +33 -8
- package/resources/themes/viva-dark/theme.css +33 -8
- package/resources/themes/viva-light/theme.css +33 -8
- package/ripple/ripple.cjs.js +3 -2
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +3 -2
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +4 -3
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +28 -41
- package/row/row.cjs.min.js +1 -1
- package/row/row.d.ts +28 -0
- package/row/row.esm.js +15 -28
- package/row/row.esm.min.js +1 -1
- package/row/row.js +49 -64
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +3 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +4 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +9 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +11 -9
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +10 -8
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +37 -25
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +52 -1
- package/selectbutton/selectbutton.esm.js +38 -26
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +37 -27
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +7 -6
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +8 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +8 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +4 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +4 -3
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +5 -5
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +125 -114
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +103 -1
- package/slidemenu/slidemenu.esm.js +127 -116
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +125 -115
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +71 -39
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +34 -1
- package/slider/slider.esm.js +72 -40
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +71 -41
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +3 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +3 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +4 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +74 -63
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +39 -11
- package/splitbutton/splitbutton.esm.js +76 -65
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +74 -63
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +3 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +10 -0
- package/splitter/splitter.esm.js +3 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +4 -3
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +81 -46
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +82 -47
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +81 -48
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +3 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +3 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +4 -3
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +86 -48
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +87 -49
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +86 -50
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +8 -5
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +9 -6
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +7 -4
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +3 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +4 -3
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +3 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +4 -3
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +110 -64
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +112 -66
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +111 -66
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +51 -43
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +51 -1
- package/timeline/timeline.esm.js +52 -44
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +51 -45
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +118 -75
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +122 -4
- package/toast/toast.esm.js +120 -77
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +116 -74
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +74 -21
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +40 -2
- package/togglebutton/togglebutton.esm.js +75 -22
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +73 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +3 -1
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +5 -11
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +4 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +3 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +7 -7
- package/tooltip/tooltip.esm.js +4 -3
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +3 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +118 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +139 -1
- package/tree/tree.esm.js +120 -90
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +116 -87
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +135 -102
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +143 -2
- package/treeselect/treeselect.esm.js +137 -104
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +136 -104
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +385 -198
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +305 -2
- package/treetable/treetable.esm.js +387 -200
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +383 -197
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +97 -40
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +64 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +99 -42
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +97 -42
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +31 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +28 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +32 -7
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +43 -29
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +78 -1
- package/virtualscroller/virtualscroller.esm.js +44 -30
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +43 -31
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
package/calendar/calendar.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import PrimeReact, { localeOptions, localeOption } from 'primereact/api';
|
|
2
|
+
import PrimeReact, { PrimeReactContext, localeOptions, localeOption } from 'primereact/api';
|
|
3
3
|
import { Button } from 'primereact/button';
|
|
4
4
|
import { usePrevious, useOverlayListener, useMountEffect, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
5
5
|
import { CalendarIcon } from 'primereact/icons/calendar';
|
|
@@ -10,10 +10,26 @@ import { ChevronUpIcon } from 'primereact/icons/chevronup';
|
|
|
10
10
|
import { InputText } from 'primereact/inputtext';
|
|
11
11
|
import { OverlayService } from 'primereact/overlayservice';
|
|
12
12
|
import { Ripple } from 'primereact/ripple';
|
|
13
|
-
import {
|
|
13
|
+
import { mergeProps, UniqueComponentId, DomHandler, ObjectUtils, mask, ZIndexUtils, IconUtils, classNames } from 'primereact/utils';
|
|
14
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
14
15
|
import { CSSTransition } from 'primereact/csstransition';
|
|
15
16
|
import { Portal } from 'primereact/portal';
|
|
16
17
|
|
|
18
|
+
function _extends() {
|
|
19
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
20
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
21
|
+
var source = arguments[i];
|
|
22
|
+
for (var key in source) {
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
24
|
+
target[key] = source[key];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return target;
|
|
29
|
+
};
|
|
30
|
+
return _extends.apply(this, arguments);
|
|
31
|
+
}
|
|
32
|
+
|
|
17
33
|
function _typeof(obj) {
|
|
18
34
|
"@babel/helpers - typeof";
|
|
19
35
|
|
|
@@ -55,21 +71,6 @@ function _defineProperty(obj, key, value) {
|
|
|
55
71
|
return obj;
|
|
56
72
|
}
|
|
57
73
|
|
|
58
|
-
function _extends() {
|
|
59
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
60
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
61
|
-
var source = arguments[i];
|
|
62
|
-
for (var key in source) {
|
|
63
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
64
|
-
target[key] = source[key];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return target;
|
|
69
|
-
};
|
|
70
|
-
return _extends.apply(this, arguments);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
74
|
function _arrayLikeToArray$1(arr, len) {
|
|
74
75
|
if (len == null || len > arr.length) len = arr.length;
|
|
75
76
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -141,12 +142,13 @@ function _slicedToArray(arr, i) {
|
|
|
141
142
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
var CalendarBase = {
|
|
145
|
+
var CalendarBase = ComponentBase.extend({
|
|
145
146
|
defaultProps: {
|
|
146
147
|
__TYPE: 'Calendar',
|
|
147
148
|
appendTo: null,
|
|
148
149
|
ariaLabelledBy: null,
|
|
149
150
|
autoZIndex: true,
|
|
151
|
+
autoFocus: false,
|
|
150
152
|
baseZIndex: 0,
|
|
151
153
|
className: null,
|
|
152
154
|
clearButtonClassName: 'p-button-secondary',
|
|
@@ -234,17 +236,18 @@ var CalendarBase = {
|
|
|
234
236
|
yearNavigatorTemplate: null,
|
|
235
237
|
yearRange: null,
|
|
236
238
|
children: undefined
|
|
237
|
-
},
|
|
238
|
-
getProps: function getProps(props) {
|
|
239
|
-
return ObjectUtils.getMergedProps(props, CalendarBase.defaultProps);
|
|
240
|
-
},
|
|
241
|
-
getOtherProps: function getOtherProps(props) {
|
|
242
|
-
return ObjectUtils.getDiffProps(props, CalendarBase.defaultProps);
|
|
243
239
|
}
|
|
244
|
-
};
|
|
240
|
+
});
|
|
245
241
|
|
|
246
242
|
var CalendarPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
247
243
|
var createElement = function createElement() {
|
|
244
|
+
var panelProps = mergeProps({
|
|
245
|
+
ref: ref,
|
|
246
|
+
className: props.className,
|
|
247
|
+
style: props.style,
|
|
248
|
+
onClick: props.onClick,
|
|
249
|
+
onMouseUp: props.onMouseUp
|
|
250
|
+
}, props.ptm('panel'));
|
|
248
251
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
249
252
|
nodeRef: ref,
|
|
250
253
|
classNames: "p-connected-overlay",
|
|
@@ -259,13 +262,7 @@ var CalendarPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
259
262
|
onEntered: props.onEntered,
|
|
260
263
|
onExit: props.onExit,
|
|
261
264
|
onExited: props.onExited
|
|
262
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
263
|
-
ref: ref,
|
|
264
|
-
className: props.className,
|
|
265
|
-
style: props.style,
|
|
266
|
-
onClick: props.onClick,
|
|
267
|
-
onMouseUp: props.onMouseUp
|
|
268
|
-
}, props.children));
|
|
265
|
+
}, /*#__PURE__*/React.createElement("div", panelProps, props.children));
|
|
269
266
|
};
|
|
270
267
|
var element = createElement();
|
|
271
268
|
return props.inline ? element : /*#__PURE__*/React.createElement(Portal, {
|
|
@@ -275,12 +272,15 @@ var CalendarPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
275
272
|
});
|
|
276
273
|
CalendarPanel.displayName = 'CalendarPanel';
|
|
277
274
|
|
|
275
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
276
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
278
277
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
279
278
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
280
279
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
281
280
|
var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
282
281
|
var _classNames;
|
|
283
|
-
var
|
|
282
|
+
var context = React.useContext(PrimeReactContext);
|
|
283
|
+
var props = CalendarBase.getProps(inProps, context);
|
|
284
284
|
var _React$useState = React.useState(false),
|
|
285
285
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
286
286
|
focusedState = _React$useState2[0],
|
|
@@ -293,6 +293,15 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
293
293
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
294
294
|
viewDateState = _React$useState6[0],
|
|
295
295
|
setViewDateState = _React$useState6[1];
|
|
296
|
+
var _CalendarBase$setMeta = CalendarBase.setMetaData({
|
|
297
|
+
props: props,
|
|
298
|
+
state: {
|
|
299
|
+
focused: focusedState,
|
|
300
|
+
overlayVisible: overlayVisibleState,
|
|
301
|
+
viewDate: viewDateState
|
|
302
|
+
}
|
|
303
|
+
}),
|
|
304
|
+
ptm = _CalendarBase$setMeta.ptm;
|
|
296
305
|
var elementRef = React.useRef(null);
|
|
297
306
|
var overlayRef = React.useRef(null);
|
|
298
307
|
var inputRef = React.useRef(props.inputRef);
|
|
@@ -1068,7 +1077,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1068
1077
|
setCurrentYear(value.getFullYear());
|
|
1069
1078
|
};
|
|
1070
1079
|
var setNavigationState = function setNavigationState(newViewDate) {
|
|
1071
|
-
if (!props.showMinMaxRange || props.view !== 'date' || !overlayRef.current) {
|
|
1080
|
+
if (!newViewDate || !props.showMinMaxRange || props.view !== 'date' || !overlayRef.current) {
|
|
1072
1081
|
return;
|
|
1073
1082
|
}
|
|
1074
1083
|
var navPrev = DomHandler.findSingle(overlayRef.current, '.p-datepicker-prev');
|
|
@@ -1086,7 +1095,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1086
1095
|
firstDayOfMonth.setMonth(11, 1);
|
|
1087
1096
|
firstDayOfMonth.setFullYear(firstDayOfMonth.getFullYear() - 1);
|
|
1088
1097
|
} else {
|
|
1089
|
-
firstDayOfMonth.setMonth(firstDayOfMonth.getMonth()
|
|
1098
|
+
firstDayOfMonth.setMonth(firstDayOfMonth.getMonth(), 1);
|
|
1090
1099
|
}
|
|
1091
1100
|
firstDayOfMonth.setHours(0);
|
|
1092
1101
|
firstDayOfMonth.setMinutes(0);
|
|
@@ -1487,7 +1496,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1487
1496
|
var onOverlayEnter = function onOverlayEnter() {
|
|
1488
1497
|
if (props.autoZIndex) {
|
|
1489
1498
|
var key = props.touchUI ? 'modal' : 'overlay';
|
|
1490
|
-
ZIndexUtils.set(key, overlayRef.current, PrimeReact.autoZIndex, props.baseZIndex || PrimeReact.zIndex[key]);
|
|
1499
|
+
ZIndexUtils.set(key, overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, props.baseZIndex || context && context.zIndex[key] || PrimeReact.zIndex[key]);
|
|
1491
1500
|
}
|
|
1492
1501
|
alignOverlay();
|
|
1493
1502
|
};
|
|
@@ -1509,7 +1518,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1509
1518
|
if (props.touchUI) {
|
|
1510
1519
|
enableModality();
|
|
1511
1520
|
} else if (overlayRef && overlayRef.current && inputRef && inputRef.current) {
|
|
1512
|
-
DomHandler.alignOverlay(overlayRef.current, inputRef.current, props.appendTo || PrimeReact.appendTo);
|
|
1521
|
+
DomHandler.alignOverlay(overlayRef.current, inputRef.current, props.appendTo || context && context.appendTo || PrimeReact.appendTo);
|
|
1513
1522
|
if (appendDisabled()) {
|
|
1514
1523
|
DomHandler.relativePosition(overlayRef.current, inputRef.current);
|
|
1515
1524
|
} else {
|
|
@@ -1737,9 +1746,9 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1737
1746
|
if (props.minDate.getFullYear() > year) {
|
|
1738
1747
|
validMin = false;
|
|
1739
1748
|
} else if (props.minDate.getFullYear() === year) {
|
|
1740
|
-
if (props.minDate.getMonth() > month) {
|
|
1749
|
+
if (month > -1 && props.minDate.getMonth() > month) {
|
|
1741
1750
|
validMin = false;
|
|
1742
|
-
} else if (props.minDate.getMonth() === month) {
|
|
1751
|
+
} else if (month > -1 && props.minDate.getMonth() === month) {
|
|
1743
1752
|
if (day > 0 && props.minDate.getDate() > day) {
|
|
1744
1753
|
validMin = false;
|
|
1745
1754
|
}
|
|
@@ -1750,9 +1759,9 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1750
1759
|
if (props.maxDate.getFullYear() < year) {
|
|
1751
1760
|
validMax = false;
|
|
1752
1761
|
} else if (props.maxDate.getFullYear() === year) {
|
|
1753
|
-
if (props.maxDate.getMonth() < month) {
|
|
1762
|
+
if (month > -1 && props.maxDate.getMonth() < month) {
|
|
1754
1763
|
validMax = false;
|
|
1755
|
-
} else if (props.maxDate.getMonth() === month) {
|
|
1764
|
+
} else if (month > -1 && props.maxDate.getMonth() === month) {
|
|
1756
1765
|
if (day > 0 && props.maxDate.getDate() < day) {
|
|
1757
1766
|
validMax = false;
|
|
1758
1767
|
}
|
|
@@ -1762,7 +1771,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1762
1771
|
if (props.disabledDates) {
|
|
1763
1772
|
validDate = !isDateDisabled(day, month, year);
|
|
1764
1773
|
}
|
|
1765
|
-
if (props.disabledDays) {
|
|
1774
|
+
if (props.disabledDays && currentView !== 'month') {
|
|
1766
1775
|
validDay = !isDayDisabled(day, month, year);
|
|
1767
1776
|
}
|
|
1768
1777
|
if (props.selectOtherMonths === false && otherMonth) {
|
|
@@ -2314,7 +2323,6 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2314
2323
|
ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
2315
2324
|
}, [inputRef, props.inputRef]);
|
|
2316
2325
|
useMountEffect(function () {
|
|
2317
|
-
var unbindMaskEvents = null;
|
|
2318
2326
|
var viewDate = getViewDate(props.viewDate);
|
|
2319
2327
|
validateDate(viewDate);
|
|
2320
2328
|
setViewDateState(viewDate);
|
|
@@ -2329,7 +2337,21 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2329
2337
|
overlayRef.current.style.width = DomHandler.getOuterWidth(overlayRef.current) + 'px';
|
|
2330
2338
|
}
|
|
2331
2339
|
}
|
|
2332
|
-
}
|
|
2340
|
+
}
|
|
2341
|
+
if (props.value) {
|
|
2342
|
+
updateInputfield(props.value);
|
|
2343
|
+
setValue(props.value);
|
|
2344
|
+
}
|
|
2345
|
+
if (props.autoFocus) {
|
|
2346
|
+
// delay showing until rendered so `alignPanel()` method aligns the popup in the right location
|
|
2347
|
+
setTimeout(function () {
|
|
2348
|
+
return DomHandler.focus(inputRef.current, props.autoFocus);
|
|
2349
|
+
}, 200);
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
useUpdateEffect(function () {
|
|
2353
|
+
var unbindMaskEvents = null;
|
|
2354
|
+
if (props.mask) {
|
|
2333
2355
|
unbindMaskEvents = mask(inputRef.current, {
|
|
2334
2356
|
mask: props.mask,
|
|
2335
2357
|
readOnly: props.readOnlyInput || props.disabled,
|
|
@@ -2342,14 +2364,10 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2342
2364
|
}
|
|
2343
2365
|
}).unbindEvents;
|
|
2344
2366
|
}
|
|
2345
|
-
if (props.value) {
|
|
2346
|
-
updateInputfield(props.value);
|
|
2347
|
-
setValue(props.value);
|
|
2348
|
-
}
|
|
2349
2367
|
return function () {
|
|
2350
2368
|
props.mask && unbindMaskEvents && unbindMaskEvents();
|
|
2351
2369
|
};
|
|
2352
|
-
});
|
|
2370
|
+
}, [props.mask]);
|
|
2353
2371
|
useUpdateEffect(function () {
|
|
2354
2372
|
setCurrentView(props.view);
|
|
2355
2373
|
}, [props.view]);
|
|
@@ -2451,18 +2469,18 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2451
2469
|
}
|
|
2452
2470
|
};
|
|
2453
2471
|
var iconClassName = 'p-datepicker-prev-icon';
|
|
2454
|
-
var
|
|
2472
|
+
var previousIconProps = mergeProps({
|
|
2455
2473
|
className: iconClassName
|
|
2456
|
-
});
|
|
2457
|
-
var
|
|
2458
|
-
|
|
2459
|
-
}, {
|
|
2474
|
+
}, ptm('previousIcon'));
|
|
2475
|
+
var icon = props.prevIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, previousIconProps);
|
|
2476
|
+
var backwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, previousIconProps), {
|
|
2460
2477
|
props: props
|
|
2461
2478
|
});
|
|
2462
|
-
|
|
2463
|
-
type:
|
|
2464
|
-
className:
|
|
2465
|
-
}, navigatorProps),
|
|
2479
|
+
var previousButtonProps = mergeProps(_objectSpread({
|
|
2480
|
+
type: 'button',
|
|
2481
|
+
className: 'p-datepicker-prev'
|
|
2482
|
+
}, navigatorProps), ptm('previousButton'));
|
|
2483
|
+
return /*#__PURE__*/React.createElement("button", previousButtonProps, backwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
2466
2484
|
};
|
|
2467
2485
|
var createForwardNavigator = function createForwardNavigator(isVisible) {
|
|
2468
2486
|
var navigatorProps = isVisible ? {
|
|
@@ -2476,18 +2494,18 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2476
2494
|
}
|
|
2477
2495
|
};
|
|
2478
2496
|
var iconClassName = 'p-datepicker-next-icon';
|
|
2479
|
-
var
|
|
2480
|
-
className: iconClassName
|
|
2481
|
-
});
|
|
2482
|
-
var forwardNavigatorIcon = IconUtils.getJSXIcon(icon, {
|
|
2497
|
+
var nextIconProps = mergeProps({
|
|
2483
2498
|
className: iconClassName
|
|
2484
|
-
},
|
|
2499
|
+
}, ptm('nextIcon'));
|
|
2500
|
+
var icon = props.nextIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, nextIconProps);
|
|
2501
|
+
var forwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, nextIconProps), {
|
|
2485
2502
|
props: props
|
|
2486
2503
|
});
|
|
2487
|
-
|
|
2488
|
-
type:
|
|
2489
|
-
className:
|
|
2490
|
-
}, navigatorProps),
|
|
2504
|
+
var nextButtonProps = mergeProps(_objectSpread({
|
|
2505
|
+
type: 'button',
|
|
2506
|
+
className: 'p-datepicker-next'
|
|
2507
|
+
}, navigatorProps), ptm('nextButton'));
|
|
2508
|
+
return /*#__PURE__*/React.createElement("button", nextButtonProps, forwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
2491
2509
|
};
|
|
2492
2510
|
var createTitleMonthElement = function createTitleMonthElement(month) {
|
|
2493
2511
|
var monthNames = localeOption('monthNames', props.locale);
|
|
@@ -2506,17 +2524,20 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2506
2524
|
var displayedMonthNames = displayedMonthOptions.map(function (option) {
|
|
2507
2525
|
return option.label;
|
|
2508
2526
|
});
|
|
2509
|
-
var
|
|
2510
|
-
className:
|
|
2527
|
+
var selectProps = mergeProps({
|
|
2528
|
+
className: 'p-datepicker-month',
|
|
2511
2529
|
onChange: function onChange(e) {
|
|
2512
2530
|
return onMonthDropdownChange(e, e.target.value);
|
|
2513
2531
|
},
|
|
2514
2532
|
value: viewMonth
|
|
2515
|
-
},
|
|
2516
|
-
|
|
2517
|
-
|
|
2533
|
+
}, ptm('select'));
|
|
2534
|
+
var _content = /*#__PURE__*/React.createElement("select", selectProps, displayedMonthOptions.map(function (option) {
|
|
2535
|
+
var optionProps = mergeProps({
|
|
2518
2536
|
value: option.value
|
|
2519
|
-
}, option
|
|
2537
|
+
}, ptm('option'));
|
|
2538
|
+
return /*#__PURE__*/React.createElement("option", _extends({}, optionProps, {
|
|
2539
|
+
key: option.label
|
|
2540
|
+
}), option.label);
|
|
2520
2541
|
}));
|
|
2521
2542
|
if (props.monthNavigatorTemplate) {
|
|
2522
2543
|
var defaultContentOptions = {
|
|
@@ -2532,11 +2553,12 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2532
2553
|
}
|
|
2533
2554
|
return _content;
|
|
2534
2555
|
}
|
|
2535
|
-
|
|
2536
|
-
className:
|
|
2556
|
+
var monthTitleProps = mergeProps({
|
|
2557
|
+
className: 'p-datepicker-month p-link',
|
|
2537
2558
|
onClick: switchToMonthView,
|
|
2538
2559
|
disabled: switchViewButtonDisabled()
|
|
2539
|
-
},
|
|
2560
|
+
}, ptm('monthTitle'));
|
|
2561
|
+
return currentView === 'date' && /*#__PURE__*/React.createElement("button", monthTitleProps, monthNames[month]);
|
|
2540
2562
|
};
|
|
2541
2563
|
var createTitleYearElement = function createTitleYearElement(metaYear) {
|
|
2542
2564
|
if (props.yearNavigator) {
|
|
@@ -2552,17 +2574,20 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2552
2574
|
var displayedYearNames = _yearOptions2.filter(function (year) {
|
|
2553
2575
|
return !(props.minDate && props.minDate.getFullYear() > year) && !(props.maxDate && props.maxDate.getFullYear() < year);
|
|
2554
2576
|
});
|
|
2555
|
-
var
|
|
2556
|
-
className:
|
|
2577
|
+
var selectProps = mergeProps({
|
|
2578
|
+
className: 'p-datepicker-year',
|
|
2557
2579
|
onChange: function onChange(e) {
|
|
2558
2580
|
return onYearDropdownChange(e, e.target.value);
|
|
2559
2581
|
},
|
|
2560
2582
|
value: viewYear
|
|
2561
|
-
},
|
|
2562
|
-
|
|
2563
|
-
|
|
2583
|
+
}, ptm('select'));
|
|
2584
|
+
var _content2 = /*#__PURE__*/React.createElement("select", selectProps, displayedYearNames.map(function (year) {
|
|
2585
|
+
var optionProps = mergeProps({
|
|
2564
2586
|
value: year
|
|
2565
|
-
},
|
|
2587
|
+
}, ptm('option'));
|
|
2588
|
+
return /*#__PURE__*/React.createElement("option", _extends({}, optionProps, {
|
|
2589
|
+
key: year
|
|
2590
|
+
}), year);
|
|
2566
2591
|
}));
|
|
2567
2592
|
if (props.yearNavigatorTemplate) {
|
|
2568
2593
|
var options = displayedYearNames.map(function (name, i) {
|
|
@@ -2586,18 +2611,23 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2586
2611
|
return _content2;
|
|
2587
2612
|
}
|
|
2588
2613
|
var displayYear = props.numberOfMonths > 1 ? metaYear : currentYear;
|
|
2589
|
-
|
|
2590
|
-
className:
|
|
2591
|
-
onClick:
|
|
2614
|
+
var yearTitleProps = mergeProps({
|
|
2615
|
+
className: 'p-datepicker-year p-link',
|
|
2616
|
+
onClick: function onClick(e) {
|
|
2617
|
+
return switchToYearView(e);
|
|
2618
|
+
},
|
|
2592
2619
|
disabled: switchViewButtonDisabled()
|
|
2593
|
-
},
|
|
2620
|
+
}, ptm('yearTitle'));
|
|
2621
|
+
return currentView !== 'year' && /*#__PURE__*/React.createElement("button", yearTitleProps, displayYear);
|
|
2594
2622
|
};
|
|
2595
2623
|
var createTitleDecadeElement = function createTitleDecadeElement() {
|
|
2596
2624
|
var years = yearPickerValues();
|
|
2625
|
+
var decadeTitleProps = mergeProps({
|
|
2626
|
+
className: 'p-datepicker-decade'
|
|
2627
|
+
}, ptm('decadeTitle'));
|
|
2597
2628
|
if (currentView === 'year') {
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
}, props.decadeTemplate ? props.decadeTemplate(years) : /*#__PURE__*/React.createElement("span", null, "".concat(yearPickerValues()[0], " - ").concat(yearPickerValues()[yearPickerValues().length - 1])));
|
|
2629
|
+
var decadeTitleTextProps = mergeProps(ptm('decadeTitleText'));
|
|
2630
|
+
return /*#__PURE__*/React.createElement("span", decadeTitleProps, props.decadeTemplate ? props.decadeTemplate(years) : /*#__PURE__*/React.createElement("span", decadeTitleTextProps, "".concat(yearPickerValues()[0], " - ").concat(yearPickerValues()[yearPickerValues().length - 1])));
|
|
2601
2631
|
}
|
|
2602
2632
|
return null;
|
|
2603
2633
|
};
|
|
@@ -2605,23 +2635,30 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2605
2635
|
var month = createTitleMonthElement(monthMetaData.month);
|
|
2606
2636
|
var year = createTitleYearElement(monthMetaData.year);
|
|
2607
2637
|
var decade = createTitleDecadeElement();
|
|
2608
|
-
|
|
2609
|
-
className:
|
|
2610
|
-
},
|
|
2638
|
+
var titleProps = mergeProps({
|
|
2639
|
+
className: 'p-datepicker-title'
|
|
2640
|
+
}, ptm('title'));
|
|
2641
|
+
return /*#__PURE__*/React.createElement("div", titleProps, month, year, decade);
|
|
2611
2642
|
};
|
|
2612
2643
|
var createDayNames = function createDayNames(weekDays) {
|
|
2644
|
+
var weekDayProps = mergeProps(ptm('weekDay'));
|
|
2645
|
+
var tableHeaderCellProps = mergeProps({
|
|
2646
|
+
scope: 'col'
|
|
2647
|
+
}, ptm(ptm('tableHeaderCell')));
|
|
2613
2648
|
var dayNames = weekDays.map(function (weekDay, index) {
|
|
2614
|
-
return /*#__PURE__*/React.createElement("th", {
|
|
2615
|
-
key: "".concat(weekDay, "-").concat(index)
|
|
2616
|
-
|
|
2617
|
-
}, /*#__PURE__*/React.createElement("span", null, weekDay));
|
|
2649
|
+
return /*#__PURE__*/React.createElement("th", _extends({}, tableHeaderCellProps, {
|
|
2650
|
+
key: "".concat(weekDay, "-").concat(index)
|
|
2651
|
+
}), /*#__PURE__*/React.createElement("span", weekDayProps, weekDay));
|
|
2618
2652
|
});
|
|
2619
2653
|
if (props.showWeek) {
|
|
2620
|
-
var
|
|
2621
|
-
scope:
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2654
|
+
var weekHeaderProps = mergeProps({
|
|
2655
|
+
scope: 'col',
|
|
2656
|
+
className: 'p-datepicker-weekheader p-disabled'
|
|
2657
|
+
}, ptm('weekHeader'));
|
|
2658
|
+
var weekLabel = mergeProps(ptm('weekLabel'));
|
|
2659
|
+
var weekHeader = /*#__PURE__*/React.createElement("th", _extends({}, weekHeaderProps, {
|
|
2660
|
+
key: "wn"
|
|
2661
|
+
}), /*#__PURE__*/React.createElement("span", weekLabel, localeOption('weekHeader', props.locale)));
|
|
2625
2662
|
return [weekHeader].concat(_toConsumableArray(dayNames));
|
|
2626
2663
|
}
|
|
2627
2664
|
return dayNames;
|
|
@@ -2650,37 +2687,49 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2650
2687
|
'p-disabled': !date.selectable
|
|
2651
2688
|
});
|
|
2652
2689
|
var content = date.otherMonth && !props.showOtherMonths ? null : createDateCellContent(date, dateClassName, groupIndex);
|
|
2653
|
-
|
|
2654
|
-
key: date.day,
|
|
2690
|
+
var dayProps = mergeProps({
|
|
2655
2691
|
className: cellClassName
|
|
2656
|
-
},
|
|
2692
|
+
}, ptm('day'));
|
|
2693
|
+
return /*#__PURE__*/React.createElement("td", _extends({}, dayProps, {
|
|
2694
|
+
key: date.day
|
|
2695
|
+
}), content);
|
|
2657
2696
|
});
|
|
2658
2697
|
if (props.showWeek) {
|
|
2659
|
-
var
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
className:
|
|
2664
|
-
},
|
|
2698
|
+
var weekNumberProps = mergeProps({
|
|
2699
|
+
className: 'p-datepicker-weeknumber'
|
|
2700
|
+
}, ptm('weekNumber'));
|
|
2701
|
+
var weekLabelContainerProps = mergeProps({
|
|
2702
|
+
className: 'p-disabled'
|
|
2703
|
+
}, ptm('weekLabelContainer'));
|
|
2704
|
+
var weekNumberCell = /*#__PURE__*/React.createElement("td", _extends({}, weekNumberProps, {
|
|
2705
|
+
key: 'wn' + weekNumber
|
|
2706
|
+
}), /*#__PURE__*/React.createElement("span", weekLabelContainerProps, weekNumber));
|
|
2665
2707
|
return [weekNumberCell].concat(_toConsumableArray(week));
|
|
2666
2708
|
}
|
|
2667
2709
|
return week;
|
|
2668
2710
|
};
|
|
2669
2711
|
var createDates = function createDates(monthMetaData, groupIndex) {
|
|
2712
|
+
var tableBodyRowProps = mergeProps(ptm('tableBodyRowProps'));
|
|
2670
2713
|
return monthMetaData.dates.map(function (weekDates, index) {
|
|
2671
|
-
return /*#__PURE__*/React.createElement("tr", {
|
|
2714
|
+
return /*#__PURE__*/React.createElement("tr", _extends({}, tableBodyRowProps, {
|
|
2672
2715
|
key: index
|
|
2673
|
-
}, createWeek(weekDates, monthMetaData.weekNumbers[index], groupIndex));
|
|
2716
|
+
}), createWeek(weekDates, monthMetaData.weekNumbers[index], groupIndex));
|
|
2674
2717
|
});
|
|
2675
2718
|
};
|
|
2676
2719
|
var createDateViewGrid = function createDateViewGrid(monthMetaData, weekDays, groupIndex) {
|
|
2677
2720
|
var dayNames = createDayNames(weekDays);
|
|
2678
2721
|
var dates = createDates(monthMetaData, groupIndex);
|
|
2679
|
-
|
|
2680
|
-
className:
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2722
|
+
var containerProps = mergeProps({
|
|
2723
|
+
className: 'p-datepicker-calendar-container',
|
|
2724
|
+
key: UniqueComponentId('calendar_container_')
|
|
2725
|
+
}, ptm('container'));
|
|
2726
|
+
var tableProps = mergeProps({
|
|
2727
|
+
className: 'p-datepicker-calendar'
|
|
2728
|
+
}, ptm('table'));
|
|
2729
|
+
var tableHeaderProps = mergeProps(ptm('tableHeader'));
|
|
2730
|
+
var tableHeaderRowProps = mergeProps(ptm('tableHeaderRow'));
|
|
2731
|
+
var tableBodyProps = mergeProps(ptm('tableBody'));
|
|
2732
|
+
return currentView === 'date' && /*#__PURE__*/React.createElement("div", containerProps, /*#__PURE__*/React.createElement("table", tableProps, /*#__PURE__*/React.createElement("thead", tableHeaderProps, /*#__PURE__*/React.createElement("tr", tableHeaderRowProps, dayNames)), /*#__PURE__*/React.createElement("tbody", tableBodyProps, dates)));
|
|
2684
2733
|
};
|
|
2685
2734
|
var createMonth = function createMonth(monthMetaData, index) {
|
|
2686
2735
|
var weekDays = createWeekDaysMeta();
|
|
@@ -2690,12 +2739,16 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2690
2739
|
var dateViewGrid = createDateViewGrid(monthMetaData, weekDays, index);
|
|
2691
2740
|
var header = props.headerTemplate ? props.headerTemplate() : null;
|
|
2692
2741
|
var monthKey = monthMetaData.month + '-' + monthMetaData.year;
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
className:
|
|
2698
|
-
|
|
2742
|
+
var groupProps = mergeProps({
|
|
2743
|
+
className: 'p-datepicker-group'
|
|
2744
|
+
}, ptm('group'));
|
|
2745
|
+
var headerProps = mergeProps({
|
|
2746
|
+
className: 'p-datepicker-header',
|
|
2747
|
+
key: index
|
|
2748
|
+
}, ptm('header'));
|
|
2749
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, groupProps, {
|
|
2750
|
+
key: monthKey
|
|
2751
|
+
}), /*#__PURE__*/React.createElement("div", headerProps, header, backwardNavigator, title, forwardNavigator), dateViewGrid);
|
|
2699
2752
|
};
|
|
2700
2753
|
var createMonths = function createMonths(monthsMetaData) {
|
|
2701
2754
|
var groups = monthsMetaData.map(createMonth);
|
|
@@ -2730,15 +2783,19 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2730
2783
|
var forwardNavigator = createForwardNavigator(true);
|
|
2731
2784
|
var yearElement = createTitleYearElement(getViewDate().getFullYear());
|
|
2732
2785
|
var decade = createTitleDecadeElement();
|
|
2733
|
-
|
|
2734
|
-
className:
|
|
2735
|
-
},
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
className:
|
|
2741
|
-
},
|
|
2786
|
+
var groupContainerProps = mergeProps({
|
|
2787
|
+
className: 'p-datepicker-group-container'
|
|
2788
|
+
}, ptm('groupContainer'));
|
|
2789
|
+
var groupProps = mergeProps({
|
|
2790
|
+
className: 'p-datepicker-group'
|
|
2791
|
+
}, ptm('group'));
|
|
2792
|
+
var headerProps = mergeProps({
|
|
2793
|
+
className: 'p-datepicker-header'
|
|
2794
|
+
}, ptm('header'));
|
|
2795
|
+
var titleProps = mergeProps({
|
|
2796
|
+
className: 'p-datepicker-title'
|
|
2797
|
+
}, ptm('title'));
|
|
2798
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", groupContainerProps, /*#__PURE__*/React.createElement("div", groupProps, /*#__PURE__*/React.createElement("div", headerProps, backwardNavigator, /*#__PURE__*/React.createElement("div", titleProps, yearElement, decade), forwardNavigator))));
|
|
2742
2799
|
};
|
|
2743
2800
|
var createDatePicker = function createDatePicker() {
|
|
2744
2801
|
if (!props.timeOnly) {
|
|
@@ -2750,10 +2807,12 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2750
2807
|
}
|
|
2751
2808
|
return null;
|
|
2752
2809
|
};
|
|
2753
|
-
var
|
|
2810
|
+
var incrementIconProps = mergeProps(ptm('incrementIcon'));
|
|
2811
|
+
var decrementIconProps = mergeProps(ptm('decrementIcon'));
|
|
2812
|
+
var incrementIcon = IconUtils.getJSXIcon(props.incrementIcon || /*#__PURE__*/React.createElement(ChevronUpIcon, incrementIconProps), _objectSpread({}, incrementIconProps), {
|
|
2754
2813
|
props: props
|
|
2755
2814
|
});
|
|
2756
|
-
var decrementIcon = IconUtils.getJSXIcon(props.decrementIcon || /*#__PURE__*/React.createElement(ChevronDownIcon,
|
|
2815
|
+
var decrementIcon = IconUtils.getJSXIcon(props.decrementIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, decrementIconProps), _objectSpread({}, decrementIconProps), {
|
|
2757
2816
|
props: props
|
|
2758
2817
|
});
|
|
2759
2818
|
var createHourPicker = function createHourPicker() {
|
|
@@ -2766,12 +2825,14 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2766
2825
|
if (props.hourFormat === '12') {
|
|
2767
2826
|
if (hour === 0) hour = 12;else if (hour > 11 && hour !== 12) hour = hour - 12;
|
|
2768
2827
|
}
|
|
2828
|
+
var hourProps = mergeProps(ptm('hour'));
|
|
2769
2829
|
var hourDisplay = hour < 10 ? '0' + hour : hour;
|
|
2770
|
-
|
|
2771
|
-
className:
|
|
2772
|
-
},
|
|
2773
|
-
|
|
2774
|
-
|
|
2830
|
+
var hourPickerProps = mergeProps({
|
|
2831
|
+
className: 'p-hour-picker'
|
|
2832
|
+
}, ptm('hourPicker'));
|
|
2833
|
+
var incrementButtonProps = mergeProps({
|
|
2834
|
+
type: 'button',
|
|
2835
|
+
className: 'p-link',
|
|
2775
2836
|
onMouseDown: function onMouseDown(e) {
|
|
2776
2837
|
return onTimePickerElementMouseDown(e, 0, 1);
|
|
2777
2838
|
},
|
|
@@ -2780,9 +2841,10 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2780
2841
|
onKeyDown: function onKeyDown(e) {
|
|
2781
2842
|
return onContainerButtonKeydown(e);
|
|
2782
2843
|
}
|
|
2783
|
-
},
|
|
2784
|
-
|
|
2785
|
-
|
|
2844
|
+
}, ptm('incrementButton'));
|
|
2845
|
+
var decrementButtonProps = mergeProps({
|
|
2846
|
+
type: 'button',
|
|
2847
|
+
className: 'p-link',
|
|
2786
2848
|
onMouseDown: function onMouseDown(e) {
|
|
2787
2849
|
return onTimePickerElementMouseDown(e, 0, -1);
|
|
2788
2850
|
},
|
|
@@ -2791,18 +2853,21 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2791
2853
|
onKeyDown: function onKeyDown(e) {
|
|
2792
2854
|
return onContainerButtonKeydown(e);
|
|
2793
2855
|
}
|
|
2794
|
-
},
|
|
2856
|
+
}, ptm('decrementButton'));
|
|
2857
|
+
return /*#__PURE__*/React.createElement("div", hourPickerProps, /*#__PURE__*/React.createElement("button", incrementButtonProps, incrementIcon, /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement("span", hourProps, hourDisplay), /*#__PURE__*/React.createElement("button", decrementButtonProps, decrementIcon, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
2795
2858
|
};
|
|
2796
2859
|
var createMinutePicker = function createMinutePicker() {
|
|
2797
2860
|
var currentTime = getCurrentDateTime();
|
|
2798
2861
|
var minute = doStepMinute(currentTime.getMinutes());
|
|
2799
2862
|
minute = minute > 59 ? minute - 60 : minute;
|
|
2863
|
+
var minuteProps = mergeProps(ptm('minute'));
|
|
2800
2864
|
var minuteDisplay = minute < 10 ? '0' + minute : minute;
|
|
2801
|
-
|
|
2802
|
-
className:
|
|
2803
|
-
},
|
|
2804
|
-
|
|
2805
|
-
|
|
2865
|
+
var minutePickerProps = mergeProps({
|
|
2866
|
+
className: 'p-minute-picker'
|
|
2867
|
+
}, ptm('minutePicker'));
|
|
2868
|
+
var incrementButtonProps = mergeProps({
|
|
2869
|
+
type: 'button',
|
|
2870
|
+
className: 'p-link',
|
|
2806
2871
|
onMouseDown: function onMouseDown(e) {
|
|
2807
2872
|
return onTimePickerElementMouseDown(e, 1, 1);
|
|
2808
2873
|
},
|
|
@@ -2811,9 +2876,10 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2811
2876
|
onKeyDown: function onKeyDown(e) {
|
|
2812
2877
|
return onContainerButtonKeydown(e);
|
|
2813
2878
|
}
|
|
2814
|
-
},
|
|
2815
|
-
|
|
2816
|
-
|
|
2879
|
+
}, ptm('incrementButton'));
|
|
2880
|
+
var decrementButtonProps = mergeProps({
|
|
2881
|
+
type: 'button',
|
|
2882
|
+
className: 'p-link',
|
|
2817
2883
|
onMouseDown: function onMouseDown(e) {
|
|
2818
2884
|
return onTimePickerElementMouseDown(e, 1, -1);
|
|
2819
2885
|
},
|
|
@@ -2822,18 +2888,21 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2822
2888
|
onKeyDown: function onKeyDown(e) {
|
|
2823
2889
|
return onContainerButtonKeydown(e);
|
|
2824
2890
|
}
|
|
2825
|
-
},
|
|
2891
|
+
}, ptm('decrementButton'));
|
|
2892
|
+
return /*#__PURE__*/React.createElement("div", minutePickerProps, /*#__PURE__*/React.createElement("button", incrementButtonProps, incrementIcon, /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement("span", minuteProps, minuteDisplay), /*#__PURE__*/React.createElement("button", decrementButtonProps, decrementIcon, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
2826
2893
|
};
|
|
2827
2894
|
var createSecondPicker = function createSecondPicker() {
|
|
2828
2895
|
if (props.showSeconds) {
|
|
2829
2896
|
var currentTime = getCurrentDateTime();
|
|
2897
|
+
var secondProps = mergeProps(ptm('second'));
|
|
2830
2898
|
var second = currentTime.getSeconds();
|
|
2831
2899
|
var secondDisplay = second < 10 ? '0' + second : second;
|
|
2832
|
-
|
|
2833
|
-
className:
|
|
2834
|
-
},
|
|
2835
|
-
|
|
2836
|
-
|
|
2900
|
+
var secondPickerProps = mergeProps({
|
|
2901
|
+
className: 'p-second-picker'
|
|
2902
|
+
}, ptm('secondPicker'));
|
|
2903
|
+
var incrementButtonProps = mergeProps({
|
|
2904
|
+
type: 'button',
|
|
2905
|
+
className: 'p-link',
|
|
2837
2906
|
onMouseDown: function onMouseDown(e) {
|
|
2838
2907
|
return onTimePickerElementMouseDown(e, 2, 1);
|
|
2839
2908
|
},
|
|
@@ -2842,9 +2911,10 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2842
2911
|
onKeyDown: function onKeyDown(e) {
|
|
2843
2912
|
return onContainerButtonKeydown(e);
|
|
2844
2913
|
}
|
|
2845
|
-
},
|
|
2846
|
-
|
|
2847
|
-
|
|
2914
|
+
}, ptm('incrementButton'));
|
|
2915
|
+
var decrementButtonProps = mergeProps({
|
|
2916
|
+
type: 'button',
|
|
2917
|
+
className: 'p-link',
|
|
2848
2918
|
onMouseDown: function onMouseDown(e) {
|
|
2849
2919
|
return onTimePickerElementMouseDown(e, 2, -1);
|
|
2850
2920
|
},
|
|
@@ -2853,20 +2923,23 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2853
2923
|
onKeyDown: function onKeyDown(e) {
|
|
2854
2924
|
return onContainerButtonKeydown(e);
|
|
2855
2925
|
}
|
|
2856
|
-
},
|
|
2926
|
+
}, ptm('decrementButton'));
|
|
2927
|
+
return /*#__PURE__*/React.createElement("div", secondPickerProps, /*#__PURE__*/React.createElement("button", incrementButtonProps, incrementIcon, /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement("span", secondProps, secondDisplay), /*#__PURE__*/React.createElement("button", decrementButtonProps, decrementIcon, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
2857
2928
|
}
|
|
2858
2929
|
return null;
|
|
2859
2930
|
};
|
|
2860
2931
|
var createMiliSecondPicker = function createMiliSecondPicker() {
|
|
2861
2932
|
if (props.showMillisec) {
|
|
2862
2933
|
var currentTime = getCurrentDateTime();
|
|
2934
|
+
var millisecondProps = mergeProps(ptm('millisecond'));
|
|
2863
2935
|
var millisecond = currentTime.getMilliseconds();
|
|
2864
2936
|
var millisecondDisplay = millisecond < 100 ? (millisecond < 10 ? '00' : '0') + millisecond : millisecond;
|
|
2865
|
-
|
|
2866
|
-
className:
|
|
2867
|
-
},
|
|
2868
|
-
|
|
2869
|
-
|
|
2937
|
+
var millisecondPickerProps = mergeProps({
|
|
2938
|
+
className: 'p-millisecond-picker'
|
|
2939
|
+
}, ptm('millisecond'));
|
|
2940
|
+
var incrementButtonProps = mergeProps({
|
|
2941
|
+
type: 'button',
|
|
2942
|
+
className: 'p-link',
|
|
2870
2943
|
onMouseDown: function onMouseDown(e) {
|
|
2871
2944
|
return onTimePickerElementMouseDown(e, 3, 1);
|
|
2872
2945
|
},
|
|
@@ -2875,9 +2948,10 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2875
2948
|
onKeyDown: function onKeyDown(e) {
|
|
2876
2949
|
return onContainerButtonKeydown(e);
|
|
2877
2950
|
}
|
|
2878
|
-
},
|
|
2879
|
-
|
|
2880
|
-
|
|
2951
|
+
}, ptm('incrementButton'));
|
|
2952
|
+
var decrementButtonProps = mergeProps({
|
|
2953
|
+
type: 'button',
|
|
2954
|
+
className: 'p-link',
|
|
2881
2955
|
onMouseDown: function onMouseDown(e) {
|
|
2882
2956
|
return onTimePickerElementMouseDown(e, 3, -1);
|
|
2883
2957
|
},
|
|
@@ -2886,7 +2960,8 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2886
2960
|
onKeyDown: function onKeyDown(e) {
|
|
2887
2961
|
return onContainerButtonKeydown(e);
|
|
2888
2962
|
}
|
|
2889
|
-
},
|
|
2963
|
+
}, ptm('decrementButton'));
|
|
2964
|
+
return /*#__PURE__*/React.createElement("div", millisecondPickerProps, /*#__PURE__*/React.createElement("button", incrementButtonProps, incrementIcon, /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement("span", millisecondProps, millisecondDisplay), /*#__PURE__*/React.createElement("button", decrementButtonProps, decrementIcon, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
2890
2965
|
}
|
|
2891
2966
|
return null;
|
|
2892
2967
|
};
|
|
@@ -2895,30 +2970,41 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2895
2970
|
var currentTime = getCurrentDateTime();
|
|
2896
2971
|
var hour = currentTime.getHours();
|
|
2897
2972
|
var display = hour > 11 ? 'PM' : 'AM';
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
},
|
|
2973
|
+
var ampmProps = mergeProps(ptm('ampm'));
|
|
2974
|
+
var ampmPickerProps = mergeProps({
|
|
2975
|
+
className: 'p-ampm-picker'
|
|
2976
|
+
}, ptm('ampmPicker'));
|
|
2977
|
+
var incrementButtonProps = mergeProps({
|
|
2978
|
+
type: 'button',
|
|
2979
|
+
className: 'p-link',
|
|
2980
|
+
onClick: function onClick(e) {
|
|
2981
|
+
return toggleAmPm(e);
|
|
2982
|
+
}
|
|
2983
|
+
}, ptm('incrementButton'));
|
|
2984
|
+
var decrementButtonProps = mergeProps({
|
|
2985
|
+
type: 'button',
|
|
2986
|
+
className: 'p-link',
|
|
2987
|
+
onClick: function onClick(e) {
|
|
2988
|
+
return toggleAmPm(e);
|
|
2989
|
+
}
|
|
2990
|
+
}, ptm('decrementButton'));
|
|
2991
|
+
return /*#__PURE__*/React.createElement("div", ampmPickerProps, /*#__PURE__*/React.createElement("button", incrementButtonProps, incrementIcon, /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement("span", ampmProps, display), /*#__PURE__*/React.createElement("button", decrementButtonProps, decrementIcon, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
2909
2992
|
}
|
|
2910
2993
|
return null;
|
|
2911
2994
|
};
|
|
2912
2995
|
var createSeparator = function createSeparator(separator) {
|
|
2913
|
-
|
|
2914
|
-
className:
|
|
2915
|
-
},
|
|
2996
|
+
var separatorContainerProps = mergeProps({
|
|
2997
|
+
className: 'p-separator'
|
|
2998
|
+
}, ptm('separatorContainer'));
|
|
2999
|
+
var separatorProps = mergeProps(ptm('separator'));
|
|
3000
|
+
return /*#__PURE__*/React.createElement("div", separatorContainerProps, /*#__PURE__*/React.createElement("span", separatorProps, separator));
|
|
2916
3001
|
};
|
|
2917
3002
|
var createTimePicker = function createTimePicker() {
|
|
2918
3003
|
if ((props.showTime || props.timeOnly) && currentView === 'date') {
|
|
2919
|
-
|
|
2920
|
-
className:
|
|
2921
|
-
},
|
|
3004
|
+
var timePickerProps = mergeProps({
|
|
3005
|
+
className: 'p-timepicker'
|
|
3006
|
+
}, ptm('timePicker'));
|
|
3007
|
+
return /*#__PURE__*/React.createElement("div", timePickerProps, createHourPicker(), createSeparator(':'), createMinutePicker(), props.showSeconds && createSeparator(':'), createSecondPicker(), props.showMillisec && createSeparator('.'), createMiliSecondPicker(), props.hourFormat === '12' && createSeparator(':'), createAmPmPicker());
|
|
2922
3008
|
}
|
|
2923
3009
|
return null;
|
|
2924
3010
|
};
|
|
@@ -2944,7 +3030,8 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2944
3030
|
"aria-labelledby": props.ariaLabelledBy,
|
|
2945
3031
|
inputMode: props.inputMode,
|
|
2946
3032
|
tooltip: props.tooltip,
|
|
2947
|
-
tooltipOptions: props.tooltipOptions
|
|
3033
|
+
tooltipOptions: props.tooltipOptions,
|
|
3034
|
+
pt: ptm('input')
|
|
2948
3035
|
});
|
|
2949
3036
|
}
|
|
2950
3037
|
return null;
|
|
@@ -2957,7 +3044,8 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2957
3044
|
onClick: onButtonClick,
|
|
2958
3045
|
tabIndex: "-1",
|
|
2959
3046
|
disabled: props.disabled,
|
|
2960
|
-
className: "p-datepicker-trigger"
|
|
3047
|
+
className: "p-datepicker-trigger",
|
|
3048
|
+
pt: ptm('dropdownButton')
|
|
2961
3049
|
});
|
|
2962
3050
|
}
|
|
2963
3051
|
return null;
|
|
@@ -2977,16 +3065,18 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2977
3065
|
var _localeOptions4 = localeOptions(props.locale),
|
|
2978
3066
|
today = _localeOptions4.today,
|
|
2979
3067
|
clear = _localeOptions4.clear;
|
|
2980
|
-
|
|
2981
|
-
className:
|
|
2982
|
-
},
|
|
3068
|
+
var buttonbarProps = mergeProps({
|
|
3069
|
+
className: 'p-datepicker-buttonbar'
|
|
3070
|
+
}, ptm('buttonbar'));
|
|
3071
|
+
return /*#__PURE__*/React.createElement("div", buttonbarProps, /*#__PURE__*/React.createElement(Button, {
|
|
2983
3072
|
type: "button",
|
|
2984
3073
|
label: today,
|
|
2985
3074
|
onClick: onTodayButtonClick,
|
|
2986
3075
|
onKeyDown: function onKeyDown(e) {
|
|
2987
3076
|
return onContainerButtonKeydown(e);
|
|
2988
3077
|
},
|
|
2989
|
-
className: todayClassName
|
|
3078
|
+
className: todayClassName,
|
|
3079
|
+
pt: ptm('todayButton')
|
|
2990
3080
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
2991
3081
|
type: "button",
|
|
2992
3082
|
label: clear,
|
|
@@ -2994,7 +3084,8 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
2994
3084
|
onKeyDown: function onKeyDown(e) {
|
|
2995
3085
|
return onContainerButtonKeydown(e);
|
|
2996
3086
|
},
|
|
2997
|
-
className: clearClassName
|
|
3087
|
+
className: clearClassName,
|
|
3088
|
+
pt: ptm('clearButton')
|
|
2998
3089
|
}));
|
|
2999
3090
|
}
|
|
3000
3091
|
return null;
|
|
@@ -3002,51 +3093,57 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
3002
3093
|
var createFooter = function createFooter() {
|
|
3003
3094
|
if (props.footerTemplate) {
|
|
3004
3095
|
var _content3 = props.footerTemplate();
|
|
3005
|
-
|
|
3006
|
-
className:
|
|
3007
|
-
},
|
|
3096
|
+
var footerProps = mergeProps({
|
|
3097
|
+
className: 'p-datepicker-footer'
|
|
3098
|
+
}, ptm('footer'));
|
|
3099
|
+
return /*#__PURE__*/React.createElement("div", footerProps, _content3);
|
|
3008
3100
|
}
|
|
3009
3101
|
return null;
|
|
3010
3102
|
};
|
|
3011
3103
|
var createMonthPicker = function createMonthPicker() {
|
|
3012
3104
|
if (currentView === 'month') {
|
|
3013
|
-
|
|
3014
|
-
className:
|
|
3015
|
-
},
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
return onMonthSelect(event, i);
|
|
3019
|
-
},
|
|
3020
|
-
key: "month".concat(i + 1),
|
|
3105
|
+
var monthPickerProps = mergeProps({
|
|
3106
|
+
className: 'p-monthpicker'
|
|
3107
|
+
}, ptm('monthPicker'));
|
|
3108
|
+
return /*#__PURE__*/React.createElement("div", monthPickerProps, monthPickerValues().map(function (m, i) {
|
|
3109
|
+
var monthProps = mergeProps({
|
|
3021
3110
|
className: classNames('p-monthpicker-month', {
|
|
3022
3111
|
'p-highlight': isMonthSelected(i),
|
|
3023
|
-
'p-disabled': !isSelectable(
|
|
3024
|
-
})
|
|
3025
|
-
|
|
3112
|
+
'p-disabled': !isSelectable(0, i, currentYear)
|
|
3113
|
+
}),
|
|
3114
|
+
onClick: function onClick(event) {
|
|
3115
|
+
return onMonthSelect(event, i);
|
|
3116
|
+
}
|
|
3117
|
+
}, ptm('month'));
|
|
3118
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, monthProps, {
|
|
3119
|
+
key: "month".concat(i + 1)
|
|
3120
|
+
}), m);
|
|
3026
3121
|
}));
|
|
3027
3122
|
}
|
|
3028
3123
|
return null;
|
|
3029
3124
|
};
|
|
3030
3125
|
var createYearPicker = function createYearPicker() {
|
|
3031
3126
|
if (currentView === 'year') {
|
|
3032
|
-
|
|
3033
|
-
className:
|
|
3034
|
-
},
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
return onYearSelect(event, y);
|
|
3038
|
-
},
|
|
3039
|
-
key: "year".concat(i + 1),
|
|
3127
|
+
var yearPickerProps = mergeProps({
|
|
3128
|
+
className: 'p-yearpicker'
|
|
3129
|
+
}, ptm('yearPicker'));
|
|
3130
|
+
return /*#__PURE__*/React.createElement("div", yearPickerProps, yearPickerValues().map(function (y, i) {
|
|
3131
|
+
var yearProps = mergeProps({
|
|
3040
3132
|
className: classNames('p-yearpicker-year', {
|
|
3041
3133
|
'p-highlight': isYearSelected(y),
|
|
3042
|
-
'p-disabled': !
|
|
3043
|
-
})
|
|
3044
|
-
|
|
3134
|
+
'p-disabled': !isSelectable(0, -1, y)
|
|
3135
|
+
}),
|
|
3136
|
+
onClick: function onClick(event) {
|
|
3137
|
+
return onYearSelect(event, y);
|
|
3138
|
+
}
|
|
3139
|
+
}, ptm('year'));
|
|
3140
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, yearProps, {
|
|
3141
|
+
key: "year".concat(i + 1)
|
|
3142
|
+
}), y);
|
|
3045
3143
|
}));
|
|
3046
3144
|
}
|
|
3047
3145
|
return null;
|
|
3048
3146
|
};
|
|
3049
|
-
var otherProps = CalendarBase.getOtherProps(props);
|
|
3050
3147
|
var className = classNames('p-calendar p-component p-inputwrapper', props.className, (_classNames = {}, _defineProperty(_classNames, "p-calendar-w-btn p-calendar-w-btn-".concat(props.iconPos), props.showIcon), _defineProperty(_classNames, 'p-calendar-disabled', props.disabled), _defineProperty(_classNames, 'p-calendar-timeonly', props.timeOnly), _defineProperty(_classNames, 'p-inputwrapper-filled', props.value || DomHandler.hasClass(inputRef.current, 'p-filled') && inputRef.current.value !== ''), _defineProperty(_classNames, 'p-inputwrapper-focus', focusedState), _classNames));
|
|
3051
3148
|
var panelClassName = classNames('p-datepicker p-component', props.panelClassName, {
|
|
3052
3149
|
'p-datepicker-inline': props.inline,
|
|
@@ -3055,8 +3152,8 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
3055
3152
|
'p-datepicker-multiple-month': props.numberOfMonths > 1,
|
|
3056
3153
|
'p-datepicker-monthpicker': currentView === 'month',
|
|
3057
3154
|
'p-datepicker-touch-ui': props.touchUI,
|
|
3058
|
-
'p-input-filled': PrimeReact.inputStyle === 'filled',
|
|
3059
|
-
'p-ripple-disabled': PrimeReact.ripple === false
|
|
3155
|
+
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact.inputStyle === 'filled',
|
|
3156
|
+
'p-ripple-disabled': context && context.ripple === false || PrimeReact.ripple === false
|
|
3060
3157
|
});
|
|
3061
3158
|
var content = createContent();
|
|
3062
3159
|
var datePicker = createDatePicker();
|
|
@@ -3065,12 +3162,13 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
3065
3162
|
var footer = createFooter();
|
|
3066
3163
|
var monthPicker = createMonthPicker();
|
|
3067
3164
|
var yearPicker = createYearPicker();
|
|
3068
|
-
|
|
3165
|
+
var rootProps = mergeProps({
|
|
3069
3166
|
ref: elementRef,
|
|
3070
3167
|
id: props.id,
|
|
3071
3168
|
className: className,
|
|
3072
3169
|
style: props.style
|
|
3073
|
-
},
|
|
3170
|
+
}, CalendarBase.getOtherProps(props), ptm('root'));
|
|
3171
|
+
return /*#__PURE__*/React.createElement("span", rootProps, content, /*#__PURE__*/React.createElement(CalendarPanel, {
|
|
3074
3172
|
ref: overlayRef,
|
|
3075
3173
|
className: panelClassName,
|
|
3076
3174
|
style: props.panelStyle,
|
|
@@ -3083,7 +3181,8 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
3083
3181
|
onEntered: onOverlayEntered,
|
|
3084
3182
|
onExit: onOverlayExit,
|
|
3085
3183
|
onExited: onOverlayExited,
|
|
3086
|
-
transitionOptions: props.transitionOptions
|
|
3184
|
+
transitionOptions: props.transitionOptions,
|
|
3185
|
+
ptm: ptm
|
|
3087
3186
|
}, datePicker, timePicker, monthPicker, yearPicker, buttonBar, footer));
|
|
3088
3187
|
}));
|
|
3089
3188
|
Calendar.displayName = 'Calendar';
|