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
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ariaLabel } from 'primereact/api';
|
|
2
|
+
import { PrimeReactContext, ariaLabel } from 'primereact/api';
|
|
3
|
+
import { useMountEffect } from 'primereact/hooks';
|
|
3
4
|
import { CheckIcon } from 'primereact/icons/check';
|
|
4
5
|
import { TimesIcon } from 'primereact/icons/times';
|
|
5
6
|
import { Tooltip } from 'primereact/tooltip';
|
|
6
|
-
import {
|
|
7
|
+
import { DomHandler, ObjectUtils, classNames, mergeProps, IconUtils } from 'primereact/utils';
|
|
8
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
7
9
|
|
|
8
10
|
function _extends() {
|
|
9
11
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -20,6 +22,47 @@ function _extends() {
|
|
|
20
22
|
return _extends.apply(this, arguments);
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
function _typeof(obj) {
|
|
26
|
+
"@babel/helpers - typeof";
|
|
27
|
+
|
|
28
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
29
|
+
return typeof obj;
|
|
30
|
+
} : function (obj) {
|
|
31
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
32
|
+
}, _typeof(obj);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function _toPrimitive(input, hint) {
|
|
36
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
37
|
+
var prim = input[Symbol.toPrimitive];
|
|
38
|
+
if (prim !== undefined) {
|
|
39
|
+
var res = prim.call(input, hint || "default");
|
|
40
|
+
if (_typeof(res) !== "object") return res;
|
|
41
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
42
|
+
}
|
|
43
|
+
return (hint === "string" ? String : Number)(input);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function _toPropertyKey(arg) {
|
|
47
|
+
var key = _toPrimitive(arg, "string");
|
|
48
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function _defineProperty(obj, key, value) {
|
|
52
|
+
key = _toPropertyKey(key);
|
|
53
|
+
if (key in obj) {
|
|
54
|
+
Object.defineProperty(obj, key, {
|
|
55
|
+
value: value,
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
writable: true
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
obj[key] = value;
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
|
|
23
66
|
function _arrayWithHoles(arr) {
|
|
24
67
|
if (Array.isArray(arr)) return arr;
|
|
25
68
|
}
|
|
@@ -75,38 +118,43 @@ function _slicedToArray(arr, i) {
|
|
|
75
118
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
76
119
|
}
|
|
77
120
|
|
|
78
|
-
var TriStateCheckboxBase = {
|
|
121
|
+
var TriStateCheckboxBase = ComponentBase.extend({
|
|
79
122
|
defaultProps: {
|
|
80
123
|
__TYPE: 'TriStateCheckbox',
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
style: null,
|
|
124
|
+
autoFocus: false,
|
|
125
|
+
checkIcon: null,
|
|
84
126
|
className: null,
|
|
85
127
|
disabled: false,
|
|
128
|
+
id: null,
|
|
129
|
+
onChange: null,
|
|
86
130
|
readOnly: false,
|
|
131
|
+
style: null,
|
|
87
132
|
tabIndex: '0',
|
|
88
133
|
tooltip: null,
|
|
89
|
-
checkIcon: null,
|
|
90
|
-
uncheckIcon: null,
|
|
91
134
|
tooltipOptions: null,
|
|
92
|
-
|
|
135
|
+
uncheckIcon: null,
|
|
136
|
+
value: null,
|
|
93
137
|
children: undefined
|
|
94
|
-
},
|
|
95
|
-
getProps: function getProps(props) {
|
|
96
|
-
return ObjectUtils.getMergedProps(props, TriStateCheckboxBase.defaultProps);
|
|
97
|
-
},
|
|
98
|
-
getOtherProps: function getOtherProps(props) {
|
|
99
|
-
return ObjectUtils.getDiffProps(props, TriStateCheckboxBase.defaultProps);
|
|
100
138
|
}
|
|
101
|
-
};
|
|
139
|
+
});
|
|
102
140
|
|
|
141
|
+
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; }
|
|
142
|
+
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; }
|
|
103
143
|
var TriStateCheckbox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
104
|
-
var
|
|
144
|
+
var context = React.useContext(PrimeReactContext);
|
|
145
|
+
var props = TriStateCheckboxBase.getProps(inProps, context);
|
|
105
146
|
var _React$useState = React.useState(false),
|
|
106
147
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
107
148
|
focusedState = _React$useState2[0],
|
|
108
149
|
setFocusedState = _React$useState2[1];
|
|
109
150
|
var elementRef = React.useRef(null);
|
|
151
|
+
var _TriStateCheckboxBase = TriStateCheckboxBase.setMetaData({
|
|
152
|
+
props: props,
|
|
153
|
+
state: {
|
|
154
|
+
focused: focusedState
|
|
155
|
+
}
|
|
156
|
+
}),
|
|
157
|
+
ptm = _TriStateCheckboxBase.ptm;
|
|
110
158
|
var onClick = function onClick(event) {
|
|
111
159
|
if (!props.disabled && !props.readOnly) {
|
|
112
160
|
toggle(event);
|
|
@@ -156,6 +204,11 @@ var TriStateCheckbox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fu
|
|
|
156
204
|
}
|
|
157
205
|
};
|
|
158
206
|
});
|
|
207
|
+
useMountEffect(function () {
|
|
208
|
+
if (props.autoFocus) {
|
|
209
|
+
DomHandler.focusFirstElement(elementRef.current);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
159
212
|
var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
|
|
160
213
|
var otherProps = TriStateCheckboxBase.getOtherProps(props);
|
|
161
214
|
var ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
|
|
@@ -163,50 +216,54 @@ var TriStateCheckbox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(fu
|
|
|
163
216
|
'p-checkbox-disabled': props.disabled
|
|
164
217
|
});
|
|
165
218
|
var boxClassName = classNames('p-checkbox-box', {
|
|
166
|
-
'p-highlight': (props.value
|
|
219
|
+
'p-highlight': ObjectUtils.isNotEmpty(props.value),
|
|
167
220
|
'p-disabled': props.disabled,
|
|
168
221
|
'p-focus': focusedState
|
|
169
222
|
});
|
|
170
223
|
var iconClassName = 'p-checkbox-icon p-c';
|
|
224
|
+
var checkIconProps = mergeProps({
|
|
225
|
+
className: iconClassName
|
|
226
|
+
}, ptm('checkIcon'));
|
|
227
|
+
var uncheckIconProps = mergeProps({
|
|
228
|
+
className: iconClassName
|
|
229
|
+
}, ptm('uncheckIcon'));
|
|
171
230
|
var icon;
|
|
172
231
|
if (props.value === false) {
|
|
173
|
-
icon = props.uncheckIcon || /*#__PURE__*/React.createElement(TimesIcon,
|
|
174
|
-
className: iconClassName
|
|
175
|
-
});
|
|
232
|
+
icon = props.uncheckIcon || /*#__PURE__*/React.createElement(TimesIcon, uncheckIconProps);
|
|
176
233
|
} else if (props.value === true) {
|
|
177
|
-
icon = props.checkIcon || /*#__PURE__*/React.createElement(CheckIcon,
|
|
178
|
-
className: iconClassName
|
|
179
|
-
});
|
|
234
|
+
icon = props.checkIcon || /*#__PURE__*/React.createElement(CheckIcon, checkIconProps);
|
|
180
235
|
}
|
|
181
|
-
var checkIcon = IconUtils.getJSXIcon(icon, {
|
|
182
|
-
className: iconClassName
|
|
183
|
-
}, {
|
|
236
|
+
var checkIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, checkIconProps), {
|
|
184
237
|
props: props
|
|
185
238
|
});
|
|
186
239
|
var ariaValueLabel = props.value ? ariaLabel('trueLabel') : props.value === false ? ariaLabel('falseLabel') : ariaLabel('nullLabel');
|
|
187
240
|
var ariaChecked = props.value ? 'true' : 'false';
|
|
188
|
-
|
|
189
|
-
ref: elementRef,
|
|
190
|
-
id: props.id,
|
|
191
|
-
className: className,
|
|
192
|
-
style: props.style
|
|
193
|
-
}, otherProps, {
|
|
194
|
-
onClick: onClick
|
|
195
|
-
}), /*#__PURE__*/React.createElement("div", _extends({
|
|
241
|
+
var checkboxProps = mergeProps(_objectSpread({
|
|
196
242
|
className: boxClassName,
|
|
197
243
|
tabIndex: props.tabIndex,
|
|
198
244
|
onFocus: onFocus,
|
|
199
245
|
onBlur: onBlur,
|
|
200
246
|
onKeyDown: onKeyDown,
|
|
201
|
-
role:
|
|
202
|
-
|
|
203
|
-
}, ariaProps),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
247
|
+
role: 'checkbox',
|
|
248
|
+
'aria-checked': ariaChecked
|
|
249
|
+
}, ariaProps), ptm('checkbox'));
|
|
250
|
+
var srOnlyAriaProps = mergeProps({
|
|
251
|
+
className: 'p-sr-only',
|
|
252
|
+
'aria-live': 'polite'
|
|
253
|
+
}, ptm('srOnlyAria'));
|
|
254
|
+
var rootProps = mergeProps({
|
|
255
|
+
ref: elementRef,
|
|
256
|
+
id: props.id,
|
|
257
|
+
className: className,
|
|
258
|
+
style: props.style,
|
|
259
|
+
onClick: onClick
|
|
260
|
+
}, TriStateCheckboxBase.getOtherProps(props), ptm('root'));
|
|
261
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement("div", checkboxProps, checkIcon), focusedState && /*#__PURE__*/React.createElement("span", srOnlyAriaProps, ariaValueLabel)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
207
262
|
target: elementRef,
|
|
208
263
|
content: props.tooltip
|
|
209
|
-
}, props.tooltipOptions
|
|
264
|
+
}, props.tooltipOptions, {
|
|
265
|
+
pt: ptm('tooltip')
|
|
266
|
+
})));
|
|
210
267
|
}));
|
|
211
268
|
TriStateCheckbox.displayName = 'TriStateCheckbox';
|
|
212
269
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{ariaLabel as
|
|
1
|
+
import*as e from"react";import{PrimeReactContext as t,ariaLabel as r}from"primereact/api";import{useMountEffect as n}from"primereact/hooks";import{CheckIcon as o}from"primereact/icons/check";import{TimesIcon as a}from"primereact/icons/times";import{Tooltip as l}from"primereact/tooltip";import{DomHandler as c,ObjectUtils as i,classNames as u,mergeProps as s,IconUtils as p}from"primereact/utils";import{ComponentBase as f}from"primereact/componentbase";function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function y(e,t){if("object"!==b(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e){var t=y(e,"string");return"symbol"===b(t)?t:String(t)}function d(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){if(Array.isArray(e))return e}function g(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,c=[],i=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return c}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var P=f.extend({defaultProps:{__TYPE:"TriStateCheckbox",autoFocus:!1,checkIcon:null,className:null,disabled:!1,id:null,onChange:null,readOnly:!1,style:null,tabIndex:"0",tooltip:null,tooltipOptions:null,uncheckIcon:null,value:null,children:void 0}});function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=e.memo(e.forwardRef((function(f,b){var y,v,d=e.useContext(t),O=P.getProps(f,d),S=e.useState(!1),x=(v=2,h(y=S)||g(y,v)||j(y,v)||k()),w=x[0],I=x[1],N=e.useRef(null),A=P.setMetaData({props:O,state:{focused:w}}).ptm,C=function(e){var t;null==O.value?t=!0:!0===O.value?t=!1:!1===O.value&&(t=null),O.onChange&&O.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:O.name,id:O.id,value:t}})};e.useImperativeHandle(b,(function(){return{props:O,focus:function(){return c.focusFirstElement(N.current)},getElement:function(){return N.current}}})),n((function(){O.autoFocus&&c.focusFirstElement(N.current)}));var D,F=i.isNotEmpty(O.tooltip),T=P.getOtherProps(O),R=i.reduceKeys(T,c.ARIA_PROPS),L=u("p-tristatecheckbox p-checkbox p-component",O.className,{"p-checkbox-disabled":O.disabled}),_=u("p-checkbox-box",{"p-highlight":i.isNotEmpty(O.value),"p-disabled":O.disabled,"p-focus":w}),K="p-checkbox-icon p-c",M=s({className:K},A("checkIcon")),B=s({className:K},A("uncheckIcon"));!1===O.value?D=O.uncheckIcon||e.createElement(a,B):!0===O.value&&(D=O.checkIcon||e.createElement(o,M));var H=p.getJSXIcon(D,E({},M),{props:O}),J=r(O.value?"trueLabel":!1===O.value?"falseLabel":"nullLabel"),U=s(E({className:_,tabIndex:O.tabIndex,onFocus:function(){I(!0)},onBlur:function(){I(!1)},onKeyDown:function(e){32===e.keyCode&&(C(e),e.preventDefault())},role:"checkbox","aria-checked":O.value?"true":"false"},R),A("checkbox")),X=s({className:"p-sr-only","aria-live":"polite"},A("srOnlyAria")),Y=s({ref:N,id:O.id,className:L,style:O.style,onClick:function(e){O.disabled||O.readOnly||C(e)}},P.getOtherProps(O),A("root"));return e.createElement(e.Fragment,null,e.createElement("div",Y,e.createElement("div",U,H),w&&e.createElement("span",X,J)),F&&e.createElement(l,m({target:N,content:O.tooltip},O.tooltipOptions,{pt:A("tooltip")})))})));x.displayName="TriStateCheckbox";export{x as TriStateCheckbox};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.tristatecheckbox = (function (exports, React, api, check, times, tooltip, utils) {
|
|
2
|
+
this.primereact.tristatecheckbox = (function (exports, React, api, hooks, check, times, tooltip, utils, componentbase) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -37,6 +37,47 @@ this.primereact.tristatecheckbox = (function (exports, React, api, check, times,
|
|
|
37
37
|
return _extends.apply(this, arguments);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function _typeof(obj) {
|
|
41
|
+
"@babel/helpers - typeof";
|
|
42
|
+
|
|
43
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
44
|
+
return typeof obj;
|
|
45
|
+
} : function (obj) {
|
|
46
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
47
|
+
}, _typeof(obj);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _toPrimitive(input, hint) {
|
|
51
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
52
|
+
var prim = input[Symbol.toPrimitive];
|
|
53
|
+
if (prim !== undefined) {
|
|
54
|
+
var res = prim.call(input, hint || "default");
|
|
55
|
+
if (_typeof(res) !== "object") return res;
|
|
56
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
57
|
+
}
|
|
58
|
+
return (hint === "string" ? String : Number)(input);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function _toPropertyKey(arg) {
|
|
62
|
+
var key = _toPrimitive(arg, "string");
|
|
63
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _defineProperty(obj, key, value) {
|
|
67
|
+
key = _toPropertyKey(key);
|
|
68
|
+
if (key in obj) {
|
|
69
|
+
Object.defineProperty(obj, key, {
|
|
70
|
+
value: value,
|
|
71
|
+
enumerable: true,
|
|
72
|
+
configurable: true,
|
|
73
|
+
writable: true
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
obj[key] = value;
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
}
|
|
80
|
+
|
|
40
81
|
function _arrayWithHoles(arr) {
|
|
41
82
|
if (Array.isArray(arr)) return arr;
|
|
42
83
|
}
|
|
@@ -92,38 +133,43 @@ this.primereact.tristatecheckbox = (function (exports, React, api, check, times,
|
|
|
92
133
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
93
134
|
}
|
|
94
135
|
|
|
95
|
-
var TriStateCheckboxBase = {
|
|
136
|
+
var TriStateCheckboxBase = componentbase.ComponentBase.extend({
|
|
96
137
|
defaultProps: {
|
|
97
138
|
__TYPE: 'TriStateCheckbox',
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
style: null,
|
|
139
|
+
autoFocus: false,
|
|
140
|
+
checkIcon: null,
|
|
101
141
|
className: null,
|
|
102
142
|
disabled: false,
|
|
143
|
+
id: null,
|
|
144
|
+
onChange: null,
|
|
103
145
|
readOnly: false,
|
|
146
|
+
style: null,
|
|
104
147
|
tabIndex: '0',
|
|
105
148
|
tooltip: null,
|
|
106
|
-
checkIcon: null,
|
|
107
|
-
uncheckIcon: null,
|
|
108
149
|
tooltipOptions: null,
|
|
109
|
-
|
|
150
|
+
uncheckIcon: null,
|
|
151
|
+
value: null,
|
|
110
152
|
children: undefined
|
|
111
|
-
},
|
|
112
|
-
getProps: function getProps(props) {
|
|
113
|
-
return utils.ObjectUtils.getMergedProps(props, TriStateCheckboxBase.defaultProps);
|
|
114
|
-
},
|
|
115
|
-
getOtherProps: function getOtherProps(props) {
|
|
116
|
-
return utils.ObjectUtils.getDiffProps(props, TriStateCheckboxBase.defaultProps);
|
|
117
153
|
}
|
|
118
|
-
};
|
|
154
|
+
});
|
|
119
155
|
|
|
156
|
+
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; }
|
|
157
|
+
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; }
|
|
120
158
|
var TriStateCheckbox = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
121
|
-
var
|
|
159
|
+
var context = React__namespace.useContext(api.PrimeReactContext);
|
|
160
|
+
var props = TriStateCheckboxBase.getProps(inProps, context);
|
|
122
161
|
var _React$useState = React__namespace.useState(false),
|
|
123
162
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
124
163
|
focusedState = _React$useState2[0],
|
|
125
164
|
setFocusedState = _React$useState2[1];
|
|
126
165
|
var elementRef = React__namespace.useRef(null);
|
|
166
|
+
var _TriStateCheckboxBase = TriStateCheckboxBase.setMetaData({
|
|
167
|
+
props: props,
|
|
168
|
+
state: {
|
|
169
|
+
focused: focusedState
|
|
170
|
+
}
|
|
171
|
+
}),
|
|
172
|
+
ptm = _TriStateCheckboxBase.ptm;
|
|
127
173
|
var onClick = function onClick(event) {
|
|
128
174
|
if (!props.disabled && !props.readOnly) {
|
|
129
175
|
toggle(event);
|
|
@@ -173,6 +219,11 @@ this.primereact.tristatecheckbox = (function (exports, React, api, check, times,
|
|
|
173
219
|
}
|
|
174
220
|
};
|
|
175
221
|
});
|
|
222
|
+
hooks.useMountEffect(function () {
|
|
223
|
+
if (props.autoFocus) {
|
|
224
|
+
utils.DomHandler.focusFirstElement(elementRef.current);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
176
227
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
177
228
|
var otherProps = TriStateCheckboxBase.getOtherProps(props);
|
|
178
229
|
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
@@ -180,50 +231,54 @@ this.primereact.tristatecheckbox = (function (exports, React, api, check, times,
|
|
|
180
231
|
'p-checkbox-disabled': props.disabled
|
|
181
232
|
});
|
|
182
233
|
var boxClassName = utils.classNames('p-checkbox-box', {
|
|
183
|
-
'p-highlight': (props.value
|
|
234
|
+
'p-highlight': utils.ObjectUtils.isNotEmpty(props.value),
|
|
184
235
|
'p-disabled': props.disabled,
|
|
185
236
|
'p-focus': focusedState
|
|
186
237
|
});
|
|
187
238
|
var iconClassName = 'p-checkbox-icon p-c';
|
|
239
|
+
var checkIconProps = utils.mergeProps({
|
|
240
|
+
className: iconClassName
|
|
241
|
+
}, ptm('checkIcon'));
|
|
242
|
+
var uncheckIconProps = utils.mergeProps({
|
|
243
|
+
className: iconClassName
|
|
244
|
+
}, ptm('uncheckIcon'));
|
|
188
245
|
var icon;
|
|
189
246
|
if (props.value === false) {
|
|
190
|
-
icon = props.uncheckIcon || /*#__PURE__*/React__namespace.createElement(times.TimesIcon,
|
|
191
|
-
className: iconClassName
|
|
192
|
-
});
|
|
247
|
+
icon = props.uncheckIcon || /*#__PURE__*/React__namespace.createElement(times.TimesIcon, uncheckIconProps);
|
|
193
248
|
} else if (props.value === true) {
|
|
194
|
-
icon = props.checkIcon || /*#__PURE__*/React__namespace.createElement(check.CheckIcon,
|
|
195
|
-
className: iconClassName
|
|
196
|
-
});
|
|
249
|
+
icon = props.checkIcon || /*#__PURE__*/React__namespace.createElement(check.CheckIcon, checkIconProps);
|
|
197
250
|
}
|
|
198
|
-
var checkIcon = utils.IconUtils.getJSXIcon(icon, {
|
|
199
|
-
className: iconClassName
|
|
200
|
-
}, {
|
|
251
|
+
var checkIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, checkIconProps), {
|
|
201
252
|
props: props
|
|
202
253
|
});
|
|
203
254
|
var ariaValueLabel = props.value ? api.ariaLabel('trueLabel') : props.value === false ? api.ariaLabel('falseLabel') : api.ariaLabel('nullLabel');
|
|
204
255
|
var ariaChecked = props.value ? 'true' : 'false';
|
|
205
|
-
|
|
206
|
-
ref: elementRef,
|
|
207
|
-
id: props.id,
|
|
208
|
-
className: className,
|
|
209
|
-
style: props.style
|
|
210
|
-
}, otherProps, {
|
|
211
|
-
onClick: onClick
|
|
212
|
-
}), /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
256
|
+
var checkboxProps = utils.mergeProps(_objectSpread({
|
|
213
257
|
className: boxClassName,
|
|
214
258
|
tabIndex: props.tabIndex,
|
|
215
259
|
onFocus: onFocus,
|
|
216
260
|
onBlur: onBlur,
|
|
217
261
|
onKeyDown: onKeyDown,
|
|
218
|
-
role:
|
|
219
|
-
|
|
220
|
-
}, ariaProps),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
262
|
+
role: 'checkbox',
|
|
263
|
+
'aria-checked': ariaChecked
|
|
264
|
+
}, ariaProps), ptm('checkbox'));
|
|
265
|
+
var srOnlyAriaProps = utils.mergeProps({
|
|
266
|
+
className: 'p-sr-only',
|
|
267
|
+
'aria-live': 'polite'
|
|
268
|
+
}, ptm('srOnlyAria'));
|
|
269
|
+
var rootProps = utils.mergeProps({
|
|
270
|
+
ref: elementRef,
|
|
271
|
+
id: props.id,
|
|
272
|
+
className: className,
|
|
273
|
+
style: props.style,
|
|
274
|
+
onClick: onClick
|
|
275
|
+
}, TriStateCheckboxBase.getOtherProps(props), ptm('root'));
|
|
276
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement("div", checkboxProps, checkIcon), focusedState && /*#__PURE__*/React__namespace.createElement("span", srOnlyAriaProps, ariaValueLabel)), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
224
277
|
target: elementRef,
|
|
225
278
|
content: props.tooltip
|
|
226
|
-
}, props.tooltipOptions
|
|
279
|
+
}, props.tooltipOptions, {
|
|
280
|
+
pt: ptm('tooltip')
|
|
281
|
+
})));
|
|
227
282
|
}));
|
|
228
283
|
TriStateCheckbox.displayName = 'TriStateCheckbox';
|
|
229
284
|
|
|
@@ -233,4 +288,4 @@ this.primereact.tristatecheckbox = (function (exports, React, api, check, times,
|
|
|
233
288
|
|
|
234
289
|
return exports;
|
|
235
290
|
|
|
236
|
-
})({}, React, primereact.api, primereact.icons.check, primereact.icons.times, primereact.tooltip, primereact.utils);
|
|
291
|
+
})({}, React, primereact.api, primereact.hooks, primereact.icons.check, primereact.icons.times, primereact.tooltip, primereact.utils, primereact.componentbase);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.tristatecheckbox=function(e,t,r,n,a,l,
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.tristatecheckbox=function(e,t,r,n,o,c,a,l,i){"use strict";function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var s=u(t);function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(this,arguments)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function m(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){var t=m(e,"string");return"symbol"===f(t)?t:String(t)}function y(e,t,r){return(t=b(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){if(Array.isArray(e))return e}function v(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c,a,l=[],i=!0,u=!1;try{if(c=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(n=c.call(r)).done)&&(l.push(n.value),l.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function g(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var j=i.ComponentBase.extend({defaultProps:{__TYPE:"TriStateCheckbox",autoFocus:!1,checkIcon:null,className:null,disabled:!1,id:null,onChange:null,readOnly:!1,style:null,tabIndex:"0",tooltip:null,tooltipOptions:null,uncheckIcon:null,value:null,children:void 0}});function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=s.memo(s.forwardRef((function(e,t){var i,u,f=s.useContext(r.PrimeReactContext),m=j.getProps(e,f),b=s.useState(!1),y=(u=2,d(i=b)||v(i,u)||g(i,u)||O()),h=y[0],P=y[1],S=s.useRef(null),E=j.setMetaData({props:m,state:{focused:h}}).ptm,x=function(e){var t;null==m.value?t=!0:!0===m.value?t=!1:!1===m.value&&(t=null),m.onChange&&m.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:m.name,id:m.id,value:t}})};s.useImperativeHandle(t,(function(){return{props:m,focus:function(){return l.DomHandler.focusFirstElement(S.current)},getElement:function(){return S.current}}})),n.useMountEffect((function(){m.autoFocus&&l.DomHandler.focusFirstElement(S.current)}));var I,w=l.ObjectUtils.isNotEmpty(m.tooltip),C=j.getOtherProps(m),D=l.ObjectUtils.reduceKeys(C,l.DomHandler.ARIA_PROPS),N=l.classNames("p-tristatecheckbox p-checkbox p-component",m.className,{"p-checkbox-disabled":m.disabled}),A=l.classNames("p-checkbox-box",{"p-highlight":l.ObjectUtils.isNotEmpty(m.value),"p-disabled":m.disabled,"p-focus":h}),T="p-checkbox-icon p-c",_=l.mergeProps({className:T},E("checkIcon")),F=l.mergeProps({className:T},E("uncheckIcon"));!1===m.value?I=m.uncheckIcon||s.createElement(c.TimesIcon,F):!0===m.value&&(I=m.checkIcon||s.createElement(o.CheckIcon,_));var R=l.IconUtils.getJSXIcon(I,k({},_),{props:m}),M=r.ariaLabel(m.value?"trueLabel":!1===m.value?"falseLabel":"nullLabel"),U=l.mergeProps(k({className:A,tabIndex:m.tabIndex,onFocus:function(){P(!0)},onBlur:function(){P(!1)},onKeyDown:function(e){32===e.keyCode&&(x(e),e.preventDefault())},role:"checkbox","aria-checked":m.value?"true":"false"},D),E("checkbox")),H=l.mergeProps({className:"p-sr-only","aria-live":"polite"},E("srOnlyAria")),L=l.mergeProps({ref:S,id:m.id,className:N,style:m.style,onClick:function(e){m.disabled||m.readOnly||x(e)}},j.getOtherProps(m),E("root"));return s.createElement(s.Fragment,null,s.createElement("div",L,s.createElement("div",U,R),h&&s.createElement("span",H,M)),w&&s.createElement(a.Tooltip,p({target:S,content:m.tooltip},m.tooltipOptions,{pt:E("tooltip")})))})));return S.displayName="TriStateCheckbox",e.TriStateCheckbox=S,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.hooks,primereact.icons.check,primereact.icons.times,primereact.tooltip,primereact.utils,primereact.componentbase);
|
package/utils/utils.cjs.js
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var PrimeReact = require('primereact/api');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
7
10
|
function _interopNamespace(e) {
|
|
8
11
|
if (e && e.__esModule) return e;
|
|
9
12
|
var n = Object.create(null);
|
|
@@ -22,6 +25,7 @@ function _interopNamespace(e) {
|
|
|
22
25
|
return Object.freeze(n);
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
25
29
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
30
|
|
|
27
31
|
function _arrayWithHoles(arr) {
|
|
@@ -429,6 +433,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
429
433
|
}, {
|
|
430
434
|
key: "absolutePosition",
|
|
431
435
|
value: function absolutePosition(element, target) {
|
|
436
|
+
var align = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'left';
|
|
432
437
|
if (element && target) {
|
|
433
438
|
var elementDimensions = element.offsetParent ? {
|
|
434
439
|
width: element.offsetWidth,
|
|
@@ -453,7 +458,9 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
453
458
|
top = targetOuterHeight + targetOffset.top + windowScrollTop;
|
|
454
459
|
element.style.transformOrigin = 'top';
|
|
455
460
|
}
|
|
456
|
-
|
|
461
|
+
var targetOffsetPx = targetOffset.left;
|
|
462
|
+
var alignOffset = align === 'left' ? 0 : elementOuterWidth - targetOuterWidth;
|
|
463
|
+
if (targetOffsetPx + targetOuterWidth + elementOuterWidth > viewport.width) left = Math.max(0, targetOffsetPx + windowScrollLeft + targetOuterWidth - elementOuterWidth);else left = targetOffsetPx - alignOffset + windowScrollLeft;
|
|
457
464
|
element.style.top = top + 'px';
|
|
458
465
|
element.style.left = left + 'px';
|
|
459
466
|
}
|
|
@@ -659,6 +666,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
659
666
|
}, {
|
|
660
667
|
key: "getScrollableParents",
|
|
661
668
|
value: function getScrollableParents(element) {
|
|
669
|
+
var hideOverlaysOnDocumentScrolling = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
662
670
|
var scrollableParents = [];
|
|
663
671
|
if (element) {
|
|
664
672
|
var parents = this.getParents(element);
|
|
@@ -667,6 +675,14 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
667
675
|
var styleDeclaration = node ? getComputedStyle(node) : null;
|
|
668
676
|
return styleDeclaration && (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
|
669
677
|
};
|
|
678
|
+
var addScrollableParent = function addScrollableParent(node) {
|
|
679
|
+
if (hideOverlaysOnDocumentScrolling) {
|
|
680
|
+
// nodeType 9 is for document element
|
|
681
|
+
scrollableParents.push(node.nodeName === 'BODY' || node.nodeName === 'HTML' || node.nodeType === 9 ? window : node);
|
|
682
|
+
} else {
|
|
683
|
+
scrollableParents.push(node);
|
|
684
|
+
}
|
|
685
|
+
};
|
|
670
686
|
var _iterator = _createForOfIteratorHelper(parents),
|
|
671
687
|
_step;
|
|
672
688
|
try {
|
|
@@ -682,7 +698,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
682
698
|
var selector = _step2.value;
|
|
683
699
|
var el = this.findSingle(parent, selector);
|
|
684
700
|
if (el && overflowCheck(el)) {
|
|
685
|
-
|
|
701
|
+
addScrollableParent(el);
|
|
686
702
|
}
|
|
687
703
|
}
|
|
688
704
|
} catch (err) {
|
|
@@ -692,7 +708,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
692
708
|
}
|
|
693
709
|
}
|
|
694
710
|
if (parent.nodeType === 1 && overflowCheck(parent)) {
|
|
695
|
-
|
|
711
|
+
addScrollableParent(parent);
|
|
696
712
|
}
|
|
697
713
|
}
|
|
698
714
|
} catch (err) {
|
|
@@ -701,6 +717,11 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
701
717
|
_iterator.f();
|
|
702
718
|
}
|
|
703
719
|
}
|
|
720
|
+
|
|
721
|
+
// if no parents make it the window
|
|
722
|
+
if (scrollableParents.length === 0) {
|
|
723
|
+
scrollableParents.push(window);
|
|
724
|
+
}
|
|
704
725
|
return scrollableParents;
|
|
705
726
|
}
|
|
706
727
|
}, {
|
|
@@ -1233,7 +1254,7 @@ var ConnectedOverlayScrollHandler = /*#__PURE__*/function () {
|
|
|
1233
1254
|
_createClass(ConnectedOverlayScrollHandler, [{
|
|
1234
1255
|
key: "bindScrollListener",
|
|
1235
1256
|
value: function bindScrollListener() {
|
|
1236
|
-
this.scrollableParents = DomHandler.getScrollableParents(this.element);
|
|
1257
|
+
this.scrollableParents = DomHandler.getScrollableParents(this.element, PrimeReact__default["default"].hideOverlaysOnDocumentScrolling);
|
|
1237
1258
|
for (var i = 0; i < this.scrollableParents.length; i++) {
|
|
1238
1259
|
this.scrollableParents[i].addEventListener('scroll', this.listener);
|
|
1239
1260
|
}
|
|
@@ -1373,6 +1394,11 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1373
1394
|
value: function isFunction(obj) {
|
|
1374
1395
|
return !!(obj && obj.constructor && obj.call && obj.apply);
|
|
1375
1396
|
}
|
|
1397
|
+
}, {
|
|
1398
|
+
key: "isObject",
|
|
1399
|
+
value: function isObject(obj) {
|
|
1400
|
+
return obj !== null && obj instanceof Object && obj.constructor === Object;
|
|
1401
|
+
}
|
|
1376
1402
|
}, {
|
|
1377
1403
|
key: "isLetter",
|
|
1378
1404
|
value: function isLetter(_char) {
|
|
@@ -1539,7 +1565,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1539
1565
|
key: "convertToFlatCase",
|
|
1540
1566
|
value: function convertToFlatCase(str) {
|
|
1541
1567
|
// convert snake, kebab, camel and pascal cases to flat case
|
|
1542
|
-
return this.isNotEmpty(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str;
|
|
1568
|
+
return this.isNotEmpty(str) && typeof str === 'string' ? str.replace(/(-|_)/g, '').toLowerCase() : str;
|
|
1543
1569
|
}
|
|
1544
1570
|
}, {
|
|
1545
1571
|
key: "isEmpty",
|