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/carousel/carousel.cjs.js
CHANGED
|
@@ -11,6 +11,7 @@ var chevronright = require('primereact/icons/chevronright');
|
|
|
11
11
|
var chevronup = require('primereact/icons/chevronup');
|
|
12
12
|
var ripple = require('primereact/ripple');
|
|
13
13
|
var utils = require('primereact/utils');
|
|
14
|
+
var componentbase = require('primereact/componentbase');
|
|
14
15
|
|
|
15
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
17
|
|
|
@@ -35,19 +36,45 @@ function _interopNamespace(e) {
|
|
|
35
36
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
36
37
|
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
37
38
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
function _typeof(obj) {
|
|
40
|
+
"@babel/helpers - typeof";
|
|
41
|
+
|
|
42
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
43
|
+
return typeof obj;
|
|
44
|
+
} : function (obj) {
|
|
45
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
46
|
+
}, _typeof(obj);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function _toPrimitive(input, hint) {
|
|
50
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
51
|
+
var prim = input[Symbol.toPrimitive];
|
|
52
|
+
if (prim !== undefined) {
|
|
53
|
+
var res = prim.call(input, hint || "default");
|
|
54
|
+
if (_typeof(res) !== "object") return res;
|
|
55
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
56
|
+
}
|
|
57
|
+
return (hint === "string" ? String : Number)(input);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function _toPropertyKey(arg) {
|
|
61
|
+
var key = _toPrimitive(arg, "string");
|
|
62
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function _defineProperty(obj, key, value) {
|
|
66
|
+
key = _toPropertyKey(key);
|
|
67
|
+
if (key in obj) {
|
|
68
|
+
Object.defineProperty(obj, key, {
|
|
69
|
+
value: value,
|
|
70
|
+
enumerable: true,
|
|
71
|
+
configurable: true,
|
|
72
|
+
writable: true
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
obj[key] = value;
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
51
78
|
}
|
|
52
79
|
|
|
53
80
|
function _arrayLikeToArray(arr, len) {
|
|
@@ -121,7 +148,7 @@ function _slicedToArray(arr, i) {
|
|
|
121
148
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
122
149
|
}
|
|
123
150
|
|
|
124
|
-
var CarouselBase = {
|
|
151
|
+
var CarouselBase = componentbase.ComponentBase.extend({
|
|
125
152
|
defaultProps: {
|
|
126
153
|
__TYPE: 'Carousel',
|
|
127
154
|
id: null,
|
|
@@ -148,15 +175,11 @@ var CarouselBase = {
|
|
|
148
175
|
indicatorsContentClassName: null,
|
|
149
176
|
onPageChange: null,
|
|
150
177
|
children: undefined
|
|
151
|
-
},
|
|
152
|
-
getProps: function getProps(props) {
|
|
153
|
-
return utils.ObjectUtils.getMergedProps(props, CarouselBase.defaultProps);
|
|
154
|
-
},
|
|
155
|
-
getOtherProps: function getOtherProps(props) {
|
|
156
|
-
return utils.ObjectUtils.getDiffProps(props, CarouselBase.defaultProps);
|
|
157
178
|
}
|
|
158
|
-
};
|
|
179
|
+
});
|
|
159
180
|
|
|
181
|
+
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; }
|
|
182
|
+
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; }
|
|
160
183
|
var CarouselItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
161
184
|
var content = props.template(props.item);
|
|
162
185
|
var className = utils.classNames(props.className, 'p-carousel-item', {
|
|
@@ -164,12 +187,15 @@ var CarouselItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
164
187
|
'p-carousel-item-start': props.start,
|
|
165
188
|
'p-carousel-item-end': props.end
|
|
166
189
|
});
|
|
167
|
-
|
|
190
|
+
var ptParams = props.className && props.className === 'p-carousel-item-cloned' ? props.ptm('itemCloned') : props.ptm('item');
|
|
191
|
+
var itemClonedProps = utils.mergeProps({
|
|
168
192
|
className: className
|
|
169
|
-
},
|
|
193
|
+
}, ptParams);
|
|
194
|
+
return /*#__PURE__*/React__namespace.createElement("div", itemClonedProps, content);
|
|
170
195
|
});
|
|
171
196
|
var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
172
|
-
var
|
|
197
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
198
|
+
var props = CarouselBase.getProps(inProps, context);
|
|
173
199
|
var _React$useState = React__namespace.useState(props.numVisible),
|
|
174
200
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
175
201
|
numVisibleState = _React$useState2[0],
|
|
@@ -186,6 +212,16 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
186
212
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
187
213
|
pageState = _React$useState8[0],
|
|
188
214
|
setPageState = _React$useState8[1];
|
|
215
|
+
var _CarouselBase$setMeta = CarouselBase.setMetaData({
|
|
216
|
+
props: props,
|
|
217
|
+
state: {
|
|
218
|
+
numVisible: numVisibleState,
|
|
219
|
+
numScroll: numScrollState,
|
|
220
|
+
totalShiftedItems: totalShiftedItemsState,
|
|
221
|
+
page: pageState
|
|
222
|
+
}
|
|
223
|
+
}),
|
|
224
|
+
ptm = _CarouselBase$setMeta.ptm;
|
|
189
225
|
var elementRef = React__namespace.useRef(null);
|
|
190
226
|
var itemsContainerRef = React__namespace.useRef(null);
|
|
191
227
|
var remainingItems = React__namespace.useRef(0);
|
|
@@ -313,19 +349,19 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
313
349
|
}
|
|
314
350
|
}
|
|
315
351
|
};
|
|
316
|
-
var
|
|
352
|
+
var _onTouchStart = function onTouchStart(e) {
|
|
317
353
|
var touchobj = e.changedTouches[0];
|
|
318
354
|
startPos.current = {
|
|
319
355
|
x: touchobj.pageX,
|
|
320
356
|
y: touchobj.pageY
|
|
321
357
|
};
|
|
322
358
|
};
|
|
323
|
-
var
|
|
359
|
+
var _onTouchMove = function onTouchMove(e) {
|
|
324
360
|
if (e.cancelable) {
|
|
325
361
|
e.preventDefault();
|
|
326
362
|
}
|
|
327
363
|
};
|
|
328
|
-
var
|
|
364
|
+
var _onTouchEnd = function onTouchEnd(e) {
|
|
329
365
|
var touchobj = e.changedTouches[0];
|
|
330
366
|
if (isVertical) {
|
|
331
367
|
changePageOnTouch(e, touchobj.pageY - startPos.current.y);
|
|
@@ -345,13 +381,15 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
345
381
|
}
|
|
346
382
|
};
|
|
347
383
|
var startAutoplay = function startAutoplay() {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
384
|
+
if (props.autoplayInterval > 0) {
|
|
385
|
+
interval.current = setInterval(function () {
|
|
386
|
+
if (pageState === totalIndicators - 1) {
|
|
387
|
+
step(-1, 0);
|
|
388
|
+
} else {
|
|
389
|
+
step(-1, pageState + 1);
|
|
390
|
+
}
|
|
391
|
+
}, props.autoplayInterval);
|
|
392
|
+
}
|
|
355
393
|
};
|
|
356
394
|
var stopAutoplay = function stopAutoplay() {
|
|
357
395
|
if (interval.current) {
|
|
@@ -360,7 +398,7 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
360
398
|
};
|
|
361
399
|
var createStyle = function createStyle() {
|
|
362
400
|
if (!carouselStyle.current) {
|
|
363
|
-
carouselStyle.current = utils.DomHandler.createInlineStyle(PrimeReact__default["default"].nonce);
|
|
401
|
+
carouselStyle.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce);
|
|
364
402
|
}
|
|
365
403
|
var innerHTML = "\n .p-carousel[".concat(attributeSelector.current, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / numVisibleState, "%\n }\n ");
|
|
366
404
|
if (props.responsiveOptions) {
|
|
@@ -368,7 +406,7 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
368
406
|
responsiveOptions.current.sort(function (data1, data2) {
|
|
369
407
|
var value1 = data1.breakpoint;
|
|
370
408
|
var value2 = data2.breakpoint;
|
|
371
|
-
return utils.ObjectUtils.sort(value1, value2, -1, PrimeReact__default["default"].locale, PrimeReact__default["default"].nullSortOrder);
|
|
409
|
+
return utils.ObjectUtils.sort(value1, value2, -1, context && context.locale || PrimeReact__default["default"].locale, context && context.nullSortOrder || PrimeReact__default["default"].nullSortOrder);
|
|
372
410
|
});
|
|
373
411
|
for (var i = 0; i < responsiveOptions.current.length; i++) {
|
|
374
412
|
var res = responsiveOptions.current[i];
|
|
@@ -377,6 +415,9 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
377
415
|
}
|
|
378
416
|
carouselStyle.current.innerHTML = innerHTML;
|
|
379
417
|
};
|
|
418
|
+
var destroyStyle = function destroyStyle() {
|
|
419
|
+
carouselStyle.current = utils.DomHandler.removeInlineStyle(carouselStyle.current);
|
|
420
|
+
};
|
|
380
421
|
var changePosition = function changePosition(totalShiftedItems) {
|
|
381
422
|
if (itemsContainerRef.current) {
|
|
382
423
|
itemsContainerRef.current.style.transform = isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
|
|
@@ -391,6 +432,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
391
432
|
React__namespace.useImperativeHandle(ref, function () {
|
|
392
433
|
return {
|
|
393
434
|
props: props,
|
|
435
|
+
startAutoplay: startAutoplay,
|
|
436
|
+
stopAutoplay: stopAutoplay,
|
|
394
437
|
getElement: function getElement() {
|
|
395
438
|
return elementRef.current;
|
|
396
439
|
}
|
|
@@ -465,6 +508,7 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
465
508
|
if (props.autoplayInterval) {
|
|
466
509
|
stopAutoplay();
|
|
467
510
|
}
|
|
511
|
+
destroyStyle();
|
|
468
512
|
});
|
|
469
513
|
var createItems = function createItems() {
|
|
470
514
|
if (props.value && props.value.length) {
|
|
@@ -485,7 +529,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
485
529
|
item: item,
|
|
486
530
|
active: isActive,
|
|
487
531
|
start: start,
|
|
488
|
-
end: end
|
|
532
|
+
end: end,
|
|
533
|
+
ptm: ptm
|
|
489
534
|
});
|
|
490
535
|
});
|
|
491
536
|
clonedElements = props.value.slice(0, numVisibleState);
|
|
@@ -501,7 +546,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
501
546
|
item: item,
|
|
502
547
|
active: isActive,
|
|
503
548
|
start: start,
|
|
504
|
-
end: end
|
|
549
|
+
end: end,
|
|
550
|
+
ptm: ptm
|
|
505
551
|
});
|
|
506
552
|
});
|
|
507
553
|
}
|
|
@@ -517,7 +563,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
517
563
|
item: item,
|
|
518
564
|
active: isActive,
|
|
519
565
|
start: start,
|
|
520
|
-
end: end
|
|
566
|
+
end: end,
|
|
567
|
+
ptm: ptm
|
|
521
568
|
});
|
|
522
569
|
});
|
|
523
570
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
|
|
@@ -525,17 +572,19 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
525
572
|
};
|
|
526
573
|
var createHeader = function createHeader() {
|
|
527
574
|
if (props.header) {
|
|
528
|
-
|
|
529
|
-
className:
|
|
530
|
-
},
|
|
575
|
+
var headerProps = utils.mergeProps({
|
|
576
|
+
className: 'p-carousel-header'
|
|
577
|
+
}, ptm('header'));
|
|
578
|
+
return /*#__PURE__*/React__namespace.createElement("div", headerProps, props.header);
|
|
531
579
|
}
|
|
532
580
|
return null;
|
|
533
581
|
};
|
|
534
582
|
var createFooter = function createFooter() {
|
|
535
583
|
if (props.footer) {
|
|
536
|
-
|
|
537
|
-
className:
|
|
538
|
-
},
|
|
584
|
+
var footerProps = utils.mergeProps({
|
|
585
|
+
className: 'p-carousel-footer'
|
|
586
|
+
}, ptm('footer'));
|
|
587
|
+
return /*#__PURE__*/React__namespace.createElement("div", footerProps, props.footer);
|
|
539
588
|
}
|
|
540
589
|
return null;
|
|
541
590
|
};
|
|
@@ -545,21 +594,30 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
545
594
|
var backwardNavigator = createBackwardNavigator();
|
|
546
595
|
var forwardNavigator = createForwardNavigator();
|
|
547
596
|
var className = utils.classNames('p-carousel-container', props.containerClassName);
|
|
548
|
-
|
|
549
|
-
className:
|
|
550
|
-
}, backwardNavigator, /*#__PURE__*/React__namespace.createElement("div", {
|
|
551
|
-
className: "p-carousel-items-content",
|
|
597
|
+
var itemsContentProps = utils.mergeProps({
|
|
598
|
+
className: 'p-carousel-items-content',
|
|
552
599
|
style: {
|
|
553
600
|
height: height
|
|
554
601
|
},
|
|
555
|
-
onTouchStart: onTouchStart
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
602
|
+
onTouchStart: function onTouchStart(e) {
|
|
603
|
+
return _onTouchStart(e);
|
|
604
|
+
},
|
|
605
|
+
onTouchMove: function onTouchMove(e) {
|
|
606
|
+
return _onTouchMove(e);
|
|
607
|
+
},
|
|
608
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
609
|
+
return _onTouchEnd(e);
|
|
610
|
+
}
|
|
611
|
+
}, ptm('itemsContent'));
|
|
612
|
+
var containerProps = utils.mergeProps({
|
|
613
|
+
className: className
|
|
614
|
+
}, ptm('container'));
|
|
615
|
+
var itemsContainerProps = utils.mergeProps({
|
|
559
616
|
ref: itemsContainerRef,
|
|
560
|
-
className:
|
|
617
|
+
className: 'p-carousel-items-container',
|
|
561
618
|
onTransitionEnd: onTransitionEnd
|
|
562
|
-
},
|
|
619
|
+
}, ptm('itemsContainer'));
|
|
620
|
+
return /*#__PURE__*/React__namespace.createElement("div", containerProps, backwardNavigator, /*#__PURE__*/React__namespace.createElement("div", itemsContentProps, /*#__PURE__*/React__namespace.createElement("div", itemsContainerProps, items)), forwardNavigator);
|
|
563
621
|
};
|
|
564
622
|
var createBackwardNavigator = function createBackwardNavigator() {
|
|
565
623
|
if (props.showNavigators) {
|
|
@@ -568,23 +626,23 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
568
626
|
'p-disabled': isDisabled
|
|
569
627
|
});
|
|
570
628
|
var iconClassName = 'p-carousel-prev-icon';
|
|
571
|
-
var
|
|
629
|
+
var previousButtonIconProps = utils.mergeProps({
|
|
572
630
|
className: iconClassName
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
})
|
|
576
|
-
var backwardNavigatorIcon = utils.IconUtils.getJSXIcon(icon, {
|
|
577
|
-
className: _className
|
|
578
|
-
}, {
|
|
631
|
+
}, ptm('previousButtonIcon'));
|
|
632
|
+
var icon = isVertical ? props.prevIcon || /*#__PURE__*/React__namespace.createElement(chevronup.ChevronUpIcon, previousButtonIconProps) : props.prevIcon || /*#__PURE__*/React__namespace.createElement(chevronleft.ChevronLeftIcon, previousButtonIconProps);
|
|
633
|
+
var backwardNavigatorIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, previousButtonIconProps), {
|
|
579
634
|
props: props
|
|
580
635
|
});
|
|
581
|
-
|
|
582
|
-
type:
|
|
636
|
+
var previousButtonProps = utils.mergeProps({
|
|
637
|
+
type: 'button',
|
|
583
638
|
className: _className,
|
|
584
|
-
onClick:
|
|
639
|
+
onClick: function onClick(e) {
|
|
640
|
+
return navBackward(e);
|
|
641
|
+
},
|
|
585
642
|
disabled: isDisabled,
|
|
586
|
-
|
|
587
|
-
},
|
|
643
|
+
'aria-label': PrimeReact.ariaLabel('previousPageLabel')
|
|
644
|
+
}, ptm('previousButton'));
|
|
645
|
+
return /*#__PURE__*/React__namespace.createElement("button", previousButtonProps, backwardNavigatorIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
588
646
|
}
|
|
589
647
|
return null;
|
|
590
648
|
};
|
|
@@ -595,23 +653,23 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
595
653
|
'p-disabled': isDisabled
|
|
596
654
|
});
|
|
597
655
|
var iconClassName = 'p-carousel-next-icon';
|
|
598
|
-
var
|
|
656
|
+
var nextButtonIconProps = utils.mergeProps({
|
|
599
657
|
className: iconClassName
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
})
|
|
603
|
-
var forwardNavigatorIcon = utils.IconUtils.getJSXIcon(icon, {
|
|
604
|
-
className: _className2
|
|
605
|
-
}, {
|
|
658
|
+
}, ptm('nextButtonIcon'));
|
|
659
|
+
var icon = isVertical ? props.nextIcon || /*#__PURE__*/React__namespace.createElement(chevrondown.ChevronDownIcon, nextButtonIconProps) : props.nextIcon || /*#__PURE__*/React__namespace.createElement(chevronright.ChevronRightIcon, nextButtonIconProps);
|
|
660
|
+
var forwardNavigatorIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, nextButtonIconProps), {
|
|
606
661
|
props: props
|
|
607
662
|
});
|
|
608
|
-
|
|
609
|
-
type:
|
|
663
|
+
var nextButtonProps = utils.mergeProps({
|
|
664
|
+
type: 'button',
|
|
610
665
|
className: _className2,
|
|
611
|
-
onClick:
|
|
666
|
+
onClick: function onClick(e) {
|
|
667
|
+
return navForward(e);
|
|
668
|
+
},
|
|
612
669
|
disabled: isDisabled,
|
|
613
|
-
|
|
614
|
-
},
|
|
670
|
+
'aria-label': PrimeReact.ariaLabel('nextPageLabel')
|
|
671
|
+
}, ptm('nextButton'));
|
|
672
|
+
return /*#__PURE__*/React__namespace.createElement("button", nextButtonProps, forwardNavigatorIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
615
673
|
}
|
|
616
674
|
return null;
|
|
617
675
|
};
|
|
@@ -621,17 +679,19 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
621
679
|
var className = utils.classNames('p-carousel-indicator', {
|
|
622
680
|
'p-highlight': isActive
|
|
623
681
|
});
|
|
624
|
-
|
|
682
|
+
var indicatorProps = utils.mergeProps({
|
|
625
683
|
key: key,
|
|
626
684
|
className: className
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
|
|
685
|
+
}, ptm('indicator'));
|
|
686
|
+
var indicatorButtonProps = utils.mergeProps({
|
|
687
|
+
type: 'button',
|
|
688
|
+
className: 'p-link',
|
|
630
689
|
onClick: function onClick(e) {
|
|
631
690
|
return onDotClick(e, index);
|
|
632
691
|
},
|
|
633
|
-
|
|
634
|
-
},
|
|
692
|
+
'aria-label': "".concat(PrimeReact.ariaLabel('pageLabel'), " ").concat(index + 1)
|
|
693
|
+
}, ptm('indicatorButton'));
|
|
694
|
+
return /*#__PURE__*/React__namespace.createElement("li", indicatorProps, /*#__PURE__*/React__namespace.createElement("button", indicatorButtonProps, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null)));
|
|
635
695
|
};
|
|
636
696
|
var createIndicators = function createIndicators() {
|
|
637
697
|
if (props.showIndicators) {
|
|
@@ -640,13 +700,13 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
640
700
|
for (var i = 0; i < totalIndicators; i++) {
|
|
641
701
|
_indicators.push(createIndicator(i));
|
|
642
702
|
}
|
|
643
|
-
|
|
703
|
+
var indicatorsProps = utils.mergeProps({
|
|
644
704
|
className: _className3
|
|
645
|
-
},
|
|
705
|
+
}, ptm('indicators'));
|
|
706
|
+
return /*#__PURE__*/React__namespace.createElement("ul", indicatorsProps, _indicators);
|
|
646
707
|
}
|
|
647
708
|
return null;
|
|
648
709
|
};
|
|
649
|
-
var otherProps = CarouselBase.getOtherProps(props);
|
|
650
710
|
var className = utils.classNames('p-carousel p-component', {
|
|
651
711
|
'p-carousel-vertical': isVertical,
|
|
652
712
|
'p-carousel-horizontal': !isVertical
|
|
@@ -656,14 +716,16 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
656
716
|
var indicators = createIndicators();
|
|
657
717
|
var header = createHeader();
|
|
658
718
|
var footer = createFooter();
|
|
659
|
-
|
|
660
|
-
ref: elementRef,
|
|
719
|
+
var rootProps = utils.mergeProps({
|
|
661
720
|
id: props.id,
|
|
721
|
+
ref: elementRef,
|
|
662
722
|
className: className,
|
|
663
723
|
style: props.style
|
|
664
|
-
},
|
|
724
|
+
}, CarouselBase.getOtherProps(props), ptm('root'));
|
|
725
|
+
var contentProps = utils.mergeProps({
|
|
665
726
|
className: contentClassName
|
|
666
|
-
}, content
|
|
727
|
+
}, ptm('content'));
|
|
728
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, header, /*#__PURE__*/React__namespace.createElement("div", contentProps, content, indicators), footer);
|
|
667
729
|
}));
|
|
668
730
|
CarouselItem.displayName = 'CarouselItem';
|
|
669
731
|
Carousel.displayName = 'Carousel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/hooks"),n=require("primereact/icons/chevrondown"),a=require("primereact/icons/chevronleft"),l=require("primereact/icons/chevronright"),u=require("primereact/icons/chevronup"),c=require("primereact/ripple"),o=require("primereact/utils");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(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 p=s(e),m=i(t);function f(){return f=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},f.apply(this,arguments)}function v(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 d(e){if(Array.isArray(e))return v(e)}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e,t){if(e){if("string"==typeof e)return v(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)?v(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e){if(Array.isArray(e))return e}function N(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,u,c=[],o=!0,i=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;o=!1}else for(;!(o=(n=l.call(r)).done)&&(c.push(n.value),c.length!==t);o=!0);}catch(e){i=!0,a=e}finally{try{if(!o&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(i)throw a}}return c}}function I(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(e,t){return y(e)||N(e,t)||g(e,t)||I()}var C={defaultProps:{__TYPE:"Carousel",id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,showIndicators:!0,showNavigators:!0,autoplayInterval:0,numVisible:1,numScroll:1,prevIcon:null,nextIcon:null,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null,children:void 0},getProps:function(e){return o.ObjectUtils.getMergedProps(e,C.defaultProps)},getOtherProps:function(e){return o.ObjectUtils.getDiffProps(e,C.defaultProps)}},P=p.memo((function(e){var t=e.template(e.item),r=o.classNames(e.className,"p-carousel-item",{"p-carousel-item-active":e.active,"p-carousel-item-start":e.start,"p-carousel-item-end":e.end});return p.createElement("div",{className:r},t)})),S=p.memo(p.forwardRef((function(e,i){var s=C.getProps(e),v=E(p.useState(s.numVisible),2),y=v[0],N=v[1],I=E(p.useState(s.numScroll),2),S=I[0],O=I[1],w=E(p.useState(s.page*s.numScroll*-1),2),j=w[0],R=w[1],k=E(p.useState(s.page),2),x=k[0],T=k[1],M=p.useRef(null),q=p.useRef(null),A=p.useRef(0),U=p.useRef(!!s.autoplayInterval),V=p.useRef(""),D=p.useRef(20),L=p.useRef(null),_=p.useRef(null),H=p.useRef(null),z=p.useRef(!1),X=p.useRef(null),Y=r.usePrevious(S),J=r.usePrevious(y),F=r.usePrevious(s.value),W=r.usePrevious(s.page),$="vertical"===s.orientation,B=s.circular||!!s.autoplayInterval,G=B&&s.value&&s.value.length>=y,K=s.value?Math.max(Math.ceil((s.value.length-y)/S)+1,0):0,Q=K&&s.autoplayInterval&&U.current,Z=s.onPageChange&&!Q,ee=Z?s.page:x,te=E(r.useResizeListener({listener:function(){ne()},when:s.responsiveOptions}),1)[0],re=function(e,t){var r=j;null!=t?(r=S*t*-1,G&&(r-=y),z.current=!1):(r+=S*e,z.current&&(r+=A.current-S*e,z.current=!1),t=Math.abs(Math.floor((G?r+y:r)/S)));G&&x===K-1&&-1===e?(r=-1*(s.value.length+y),t=0):G&&0===x&&1===e?(r=0,t=K-1):t===K-1&&A.current>0&&(r+=-1*A.current-S*e,z.current=!0),q.current&&(o.DomHandler.removeClass(q.current,"p-items-hidden"),ve(r),q.current.style.transition="transform 500ms ease 0s"),de(t),R(r)},ne=function(){if(q.current&&X.current){for(var e=window.innerWidth,t={numVisible:s.numVisible,numScroll:s.numScroll},r=0;r<X.current.length;r++){var n=X.current[r];parseInt(n.breakpoint,10)>=e&&(t=n)}if(S!==t.numScroll){var a=Math.floor(ee*S/t.numScroll),l=t.numScroll*a*-1;G&&(l-=t.numVisible),R(l),O(t.numScroll),de(a)}y!==t.numVisible&&N(t.numVisible)}},ae=function(e,t){(B||0!==ee)&&re(1,t),U.current=!1,e.cancelable&&e.preventDefault()},le=function(e,t){(B||ee<K-1)&&re(-1,t),U.current=!1,e.cancelable&&e.preventDefault()},ue=function(e,t){t>ee?le(e,t):t<ee&&ae(e,t)},ce=function(e){q.current&&"transform"===e.propertyName&&(o.DomHandler.addClass(q.current,"p-items-hidden"),q.current.style.transition="",0!==x&&x!==K-1||!G||ve(j))},oe=function(e){var t=e.changedTouches[0];L.current={x:t.pageX,y:t.pageY}},ie=function(e){e.cancelable&&e.preventDefault()},se=function(e){var t=e.changedTouches[0];pe(e,$?t.pageY-L.current.y:t.pageX-L.current.x)},pe=function(e,t){Math.abs(t)>D&&(t<0?le(e):ae(e))},me=function(){_.current&&clearInterval(_.current)},fe=function(){H.current||(H.current=o.DomHandler.createInlineStyle(m.default.nonce));var e,t="\n .p-carousel[".concat(V.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/y,"%\n }\n ");if(s.responsiveOptions){X.current=d(e=s.responsiveOptions)||h(e)||g(e)||b(),X.current.sort((function(e,t){return o.ObjectUtils.sort(e.breakpoint,t.breakpoint,-1,m.default.locale,m.default.nullSortOrder)}));for(var r=0;r<X.current.length;r++){var n=X.current[r];t+="\n @media screen and (max-width: ".concat(n.breakpoint,") {\n .p-carousel[").concat(V.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/n.numVisible,"%\n }\n }\n ")}}H.current.innerHTML=t},ve=function(e){q.current&&(q.current.style.transform=$?"translate3d(0, ".concat(e*(100/y),"%, 0)"):"translate3d(".concat(e*(100/y),"%, 0, 0)"))},de=function(e){!Z&&T(e),s.onPageChange&&s.onPageChange({page:e})};p.useImperativeHandle(i,(function(){return{props:s,getElement:function(){return M.current}}})),r.useMountEffect((function(){M.current&&(V.current=o.UniqueComponentId(),M.current.setAttribute(V.current,"")),fe(),ne(),ve(j),te()})),r.useUpdateEffect((function(){var e=!1,t=j;if(s.autoplayInterval&&me(),Y!==S||J!==y||s.value&&F&&F.length!==s.value.length){A.current=(s.value.length-y)%S;var r=ee;0!==K&&r>=K&&(de(r=K-1),e=!0),t=r*S*-1,G&&(t-=y),r===K-1&&A.current>0?(t+=-1*A.current+S,z.current=!0):z.current=!1,t!==j&&(R(t),e=!0),ve(t)}G&&(0===x?t=-1*y:0===t&&(t=-1*s.value.length,A.current>0&&(z.current=!0)),t!==j&&(R(t),e=!0)),W!==s.page&&(s.page>W&&s.page<=K-1?re(-1,s.page):s.page<W&&re(1,s.page)),!e&&Q&&(_.current=setInterval((function(){re(-1,x===K-1?0:x+1)}),s.autoplayInterval))})),r.useUnmountEffect((function(){s.autoplayInterval&&me()}));var he=function(){if(s.value&&s.value.length){var e=null,t=null;if(G){var r=null;e=(r=s.value.slice(-1*y)).map((function(e,t){return p.createElement(P,{key:t+"_scloned",className:"p-carousel-item-cloned",template:s.itemTemplate,item:e,active:-1*j===s.value.length+y,start:0===t,end:t===r.length-1})})),t=(r=s.value.slice(0,y)).map((function(e,t){return p.createElement(P,{key:t+"_fcloned",className:"p-carousel-item-cloned",template:s.itemTemplate,item:e,active:0===j,start:0===t,end:t===r.length-1})}))}var n=s.value.map((function(e,t){var r=G?-1*(j+y):-1*j,n=r+y-1;return p.createElement(P,{key:t,template:s.itemTemplate,item:e,active:r<=t&&n>=t,start:r===t,end:n===t})}));return p.createElement(p.Fragment,null,e,n,t)}},ge=function(){if(s.showNavigators){var e=(!B||s.value&&s.value.length<y)&&0===ee,r=o.classNames("p-carousel-prev p-link",{"p-disabled":e}),n="p-carousel-prev-icon",l=o.IconUtils.getJSXIcon($?s.prevIcon||p.createElement(u.ChevronUpIcon,{className:n}):s.prevIcon||p.createElement(a.ChevronLeftIcon,{className:n}),{className:r},{props:s});return p.createElement("button",{type:"button",className:r,onClick:ae,disabled:e,"aria-label":t.ariaLabel("previousPageLabel")},l,p.createElement(c.Ripple,null))}return null},be=function(){if(s.showNavigators){var e=(!B||s.value&&s.value.length<y)&&(ee===K-1||0===K),r=o.classNames("p-carousel-next p-link",{"p-disabled":e}),a="p-carousel-next-icon",u=o.IconUtils.getJSXIcon($?s.nextIcon||p.createElement(n.ChevronDownIcon,{className:a}):s.nextIcon||p.createElement(l.ChevronRightIcon,{className:a}),{className:r},{props:s});return p.createElement("button",{type:"button",className:r,onClick:le,disabled:e,"aria-label":t.ariaLabel("nextPageLabel")},u,p.createElement(c.Ripple,null))}return null},ye=function(e){var r="carousel-indicator-"+e,n=o.classNames("p-carousel-indicator",{"p-highlight":ee===e});return p.createElement("li",{key:r,className:n},p.createElement("button",{type:"button",className:"p-link",onClick:function(t){return ue(t,e)},"aria-label":"".concat(t.ariaLabel("pageLabel")," ").concat(e+1)},p.createElement(c.Ripple,null)))},Ne=C.getOtherProps(s),Ie=o.classNames("p-carousel p-component",{"p-carousel-vertical":$,"p-carousel-horizontal":!$},s.className),Ee=o.classNames("p-carousel-content",s.contentClassName),Ce=function(){var e=he(),t=$?s.verticalViewPortHeight:"auto",r=ge(),n=be(),a=o.classNames("p-carousel-container",s.containerClassName);return p.createElement("div",{className:a},r,p.createElement("div",{className:"p-carousel-items-content",style:{height:t},onTouchStart:oe,onTouchMove:ie,onTouchEnd:se},p.createElement("div",{ref:q,className:"p-carousel-items-container",onTransitionEnd:ce},e)),n)}(),Pe=function(){if(s.showIndicators){for(var e=o.classNames("p-carousel-indicators p-reset",s.indicatorsContentClassName),t=[],r=0;r<K;r++)t.push(ye(r));return p.createElement("ul",{className:e},t)}return null}(),Se=s.header?p.createElement("div",{className:"p-carousel-header"},s.header):null,Oe=s.footer?p.createElement("div",{className:"p-carousel-footer"},s.footer):null;return p.createElement("div",f({ref:M,id:s.id,className:Ie,style:s.style},Ne),Se,p.createElement("div",{className:Ee},Ce,Pe),Oe)})));P.displayName="CarouselItem",S.displayName="Carousel",exports.Carousel=S;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/hooks"),n=require("primereact/icons/chevrondown"),a=require("primereact/icons/chevronleft"),o=require("primereact/icons/chevronright"),l=require("primereact/icons/chevronup"),u=require("primereact/ripple"),c=require("primereact/utils"),i=require("primereact/componentbase");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(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 p=m(e),f=s(t);function v(e){return v="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},v(e)}function d(e,t){if("object"!==v(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e){var t=d(e,"string");return"symbol"===v(t)?t:String(t)}function b(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(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 h(e){if(Array.isArray(e))return y(e)}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function N(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function I(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e){if(Array.isArray(e))return e}function E(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,l,u=[],c=!0,i=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){i=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(i)throw a}}return u}}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.")}function C(e,t){return S(e)||E(e,t)||N(e,t)||O()}var w=i.ComponentBase.extend({defaultProps:{__TYPE:"Carousel",id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,showIndicators:!0,showNavigators:!0,autoplayInterval:0,numVisible:1,numScroll:1,prevIcon:null,nextIcon:null,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null,children:void 0}});function j(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 x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=p.memo((function(e){var t=e.template(e.item),r=c.classNames(e.className,"p-carousel-item",{"p-carousel-item-active":e.active,"p-carousel-item-start":e.start,"p-carousel-item-end":e.end}),n=e.ptm(e.className&&"p-carousel-item-cloned"===e.className?"itemCloned":"item"),a=c.mergeProps({className:r},n);return p.createElement("div",a,t)})),k=p.memo(p.forwardRef((function(e,i){var s=p.useContext(t.PrimeReactContext),m=w.getProps(e,s),v=C(p.useState(m.numVisible),2),d=v[0],g=v[1],b=C(p.useState(m.numScroll),2),y=b[0],S=b[1],E=C(p.useState(m.page*m.numScroll*-1),2),O=E[0],j=E[1],k=C(p.useState(m.page),2),T=k[0],D=k[1],M=w.setMetaData({props:m,state:{numVisible:d,numScroll:y,totalShiftedItems:O,page:T}}).ptm,A=p.useRef(null),q=p.useRef(null),V=p.useRef(0),L=p.useRef(!!m.autoplayInterval),H=p.useRef(""),U=p.useRef(20),_=p.useRef(null),B=p.useRef(null),z=p.useRef(null),X=p.useRef(!1),Y=p.useRef(null),J=r.usePrevious(y),F=r.usePrevious(d),W=r.usePrevious(m.value),$=r.usePrevious(m.page),G="vertical"===m.orientation,K=m.circular||!!m.autoplayInterval,Q=K&&m.value&&m.value.length>=d,Z=m.value?Math.max(Math.ceil((m.value.length-d)/y)+1,0):0,ee=Z&&m.autoplayInterval&&L.current,te=m.onPageChange&&!ee,re=te?m.page:T,ne=C(r.useResizeListener({listener:function(){oe()},when:m.responsiveOptions}),1)[0],ae=function(e,t){var r=O;null!=t?(r=y*t*-1,Q&&(r-=d),X.current=!1):(r+=y*e,X.current&&(r+=V.current-y*e,X.current=!1),t=Math.abs(Math.floor((Q?r+d:r)/y)));Q&&T===Z-1&&-1===e?(r=-1*(m.value.length+d),t=0):Q&&0===T&&1===e?(r=0,t=Z-1):t===Z-1&&V.current>0&&(r+=-1*V.current-y*e,X.current=!0),q.current&&(c.DomHandler.removeClass(q.current,"p-items-hidden"),be(r),q.current.style.transition="transform 500ms ease 0s"),ye(t),j(r)},oe=function(){if(q.current&&Y.current){for(var e=window.innerWidth,t={numVisible:m.numVisible,numScroll:m.numScroll},r=0;r<Y.current.length;r++){var n=Y.current[r];parseInt(n.breakpoint,10)>=e&&(t=n)}if(y!==t.numScroll){var a=Math.floor(re*y/t.numScroll),o=t.numScroll*a*-1;Q&&(o-=t.numVisible),j(o),S(t.numScroll),ye(a)}d!==t.numVisible&&g(t.numVisible)}},le=function(e,t){(K||0!==re)&&ae(1,t),L.current=!1,e.cancelable&&e.preventDefault()},ue=function(e,t){(K||re<Z-1)&&ae(-1,t),L.current=!1,e.cancelable&&e.preventDefault()},ce=function(e,t){t>re?ue(e,t):t<re&&le(e,t)},ie=function(e){q.current&&"transform"===e.propertyName&&(c.DomHandler.addClass(q.current,"p-items-hidden"),q.current.style.transition="",0!==T&&T!==Z-1||!Q||be(O))},se=function(e){var t=e.changedTouches[0];_.current={x:t.pageX,y:t.pageY}},me=function(e){e.cancelable&&e.preventDefault()},pe=function(e){var t=e.changedTouches[0];fe(e,G?t.pageY-_.current.y:t.pageX-_.current.x)},fe=function(e,t){Math.abs(t)>U&&(t<0?ue(e):le(e))},ve=function(){m.autoplayInterval>0&&(B.current=setInterval((function(){ae(-1,T===Z-1?0:T+1)}),m.autoplayInterval))},de=function(){B.current&&clearInterval(B.current)},ge=function(){z.current||(z.current=c.DomHandler.createInlineStyle(s&&s.nonce||f.default.nonce));var e,t="\n .p-carousel[".concat(H.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/d,"%\n }\n ");if(m.responsiveOptions){Y.current=h(e=m.responsiveOptions)||P(e)||N(e)||I(),Y.current.sort((function(e,t){return c.ObjectUtils.sort(e.breakpoint,t.breakpoint,-1,s&&s.locale||f.default.locale,s&&s.nullSortOrder||f.default.nullSortOrder)}));for(var r=0;r<Y.current.length;r++){var n=Y.current[r];t+="\n @media screen and (max-width: ".concat(n.breakpoint,") {\n .p-carousel[").concat(H.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/n.numVisible,"%\n }\n }\n ")}}z.current.innerHTML=t},be=function(e){q.current&&(q.current.style.transform=G?"translate3d(0, ".concat(e*(100/d),"%, 0)"):"translate3d(".concat(e*(100/d),"%, 0, 0)"))},ye=function(e){!te&&D(e),m.onPageChange&&m.onPageChange({page:e})};p.useImperativeHandle(i,(function(){return{props:m,startAutoplay:ve,stopAutoplay:de,getElement:function(){return A.current}}})),r.useMountEffect((function(){A.current&&(H.current=c.UniqueComponentId(),A.current.setAttribute(H.current,"")),ge(),oe(),be(O),ne()})),r.useUpdateEffect((function(){var e=!1,t=O;if(m.autoplayInterval&&de(),J!==y||F!==d||m.value&&W&&W.length!==m.value.length){V.current=(m.value.length-d)%y;var r=re;0!==Z&&r>=Z&&(ye(r=Z-1),e=!0),t=r*y*-1,Q&&(t-=d),r===Z-1&&V.current>0?(t+=-1*V.current+y,X.current=!0):X.current=!1,t!==O&&(j(t),e=!0),be(t)}Q&&(0===T?t=-1*d:0===t&&(t=-1*m.value.length,V.current>0&&(X.current=!0)),t!==O&&(j(t),e=!0)),$!==m.page&&(m.page>$&&m.page<=Z-1?ae(-1,m.page):m.page<$&&ae(1,m.page)),!e&&ee&&ve()})),r.useUnmountEffect((function(){m.autoplayInterval&&de(),z.current=c.DomHandler.removeInlineStyle(z.current)}));var he=function(){if(m.value&&m.value.length){var e=null,t=null;if(Q){var r=null;e=(r=m.value.slice(-1*d)).map((function(e,t){return p.createElement(R,{key:t+"_scloned",className:"p-carousel-item-cloned",template:m.itemTemplate,item:e,active:-1*O===m.value.length+d,start:0===t,end:t===r.length-1,ptm:M})})),t=(r=m.value.slice(0,d)).map((function(e,t){return p.createElement(R,{key:t+"_fcloned",className:"p-carousel-item-cloned",template:m.itemTemplate,item:e,active:0===O,start:0===t,end:t===r.length-1,ptm:M})}))}var n=m.value.map((function(e,t){var r=Q?-1*(O+d):-1*O,n=r+d-1;return p.createElement(R,{key:t,template:m.itemTemplate,item:e,active:r<=t&&n>=t,start:r===t,end:n===t,ptm:M})}));return p.createElement(p.Fragment,null,e,n,t)}},Pe=function(){if(m.showNavigators){var e=(!K||m.value&&m.value.length<d)&&0===re,r=c.classNames("p-carousel-prev p-link",{"p-disabled":e}),n=c.mergeProps({className:"p-carousel-prev-icon"},M("previousButtonIcon")),o=c.IconUtils.getJSXIcon(G?m.prevIcon||p.createElement(l.ChevronUpIcon,n):m.prevIcon||p.createElement(a.ChevronLeftIcon,n),x({},n),{props:m}),i=c.mergeProps({type:"button",className:r,onClick:function(e){return le(e)},disabled:e,"aria-label":t.ariaLabel("previousPageLabel")},M("previousButton"));return p.createElement("button",i,o,p.createElement(u.Ripple,null))}return null},Ne=function(){if(m.showNavigators){var e=(!K||m.value&&m.value.length<d)&&(re===Z-1||0===Z),r=c.classNames("p-carousel-next p-link",{"p-disabled":e}),a=c.mergeProps({className:"p-carousel-next-icon"},M("nextButtonIcon")),l=c.IconUtils.getJSXIcon(G?m.nextIcon||p.createElement(n.ChevronDownIcon,a):m.nextIcon||p.createElement(o.ChevronRightIcon,a),x({},a),{props:m}),i=c.mergeProps({type:"button",className:r,onClick:function(e){return ue(e)},disabled:e,"aria-label":t.ariaLabel("nextPageLabel")},M("nextButton"));return p.createElement("button",i,l,p.createElement(u.Ripple,null))}return null},Ie=function(e){var r="carousel-indicator-"+e,n=c.classNames("p-carousel-indicator",{"p-highlight":re===e}),a=c.mergeProps({key:r,className:n},M("indicator")),o=c.mergeProps({type:"button",className:"p-link",onClick:function(t){return ce(t,e)},"aria-label":"".concat(t.ariaLabel("pageLabel")," ").concat(e+1)},M("indicatorButton"));return p.createElement("li",a,p.createElement("button",o,p.createElement(u.Ripple,null)))},Se=c.classNames("p-carousel p-component",{"p-carousel-vertical":G,"p-carousel-horizontal":!G},m.className),Ee=c.classNames("p-carousel-content",m.contentClassName),Oe=function(){var e=he(),t=G?m.verticalViewPortHeight:"auto",r=Pe(),n=Ne(),a=c.classNames("p-carousel-container",m.containerClassName),o=c.mergeProps({className:"p-carousel-items-content",style:{height:t},onTouchStart:function(e){return se(e)},onTouchMove:function(e){return me(e)},onTouchEnd:function(e){return pe(e)}},M("itemsContent")),l=c.mergeProps({className:a},M("container")),u=c.mergeProps({ref:q,className:"p-carousel-items-container",onTransitionEnd:ie},M("itemsContainer"));return p.createElement("div",l,r,p.createElement("div",o,p.createElement("div",u,e)),n)}(),Ce=function(){if(m.showIndicators){for(var e=c.classNames("p-carousel-indicators p-reset",m.indicatorsContentClassName),t=[],r=0;r<Z;r++)t.push(Ie(r));var n=c.mergeProps({className:e},M("indicators"));return p.createElement("ul",n,t)}return null}(),we=function(){if(m.header){var e=c.mergeProps({className:"p-carousel-header"},M("header"));return p.createElement("div",e,m.header)}return null}(),je=function(){if(m.footer){var e=c.mergeProps({className:"p-carousel-footer"},M("footer"));return p.createElement("div",e,m.footer)}return null}(),xe=c.mergeProps({id:m.id,ref:A,className:Se,style:m.style},w.getOtherProps(m),M("root")),Re=c.mergeProps({className:Ee},M("content"));return p.createElement("div",xe,we,p.createElement("div",Re,Oe,Ce),je)})));R.displayName="CarouselItem",k.displayName="Carousel",exports.Carousel=k;
|
package/carousel/carousel.d.ts
CHANGED
|
@@ -8,7 +8,114 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
|
-
import { IconType } from '../utils/utils';
|
|
11
|
+
import { IconType, PassThroughType } from '../utils/utils';
|
|
12
|
+
|
|
13
|
+
export declare type CarouselPassThroughType<T> = PassThroughType<T, CarouselPassThroughMethodOptions>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface CarouselPassThroughMethodOptions {
|
|
19
|
+
props: CarouselProps;
|
|
20
|
+
state: CarouselState;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Custom passthrough(pt) options.
|
|
25
|
+
* @see {@link CarouselProps.pt}
|
|
26
|
+
*/
|
|
27
|
+
export interface CarouselPassThroughOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Uses to pass attributes to the root's DOM element.
|
|
30
|
+
*/
|
|
31
|
+
root?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
32
|
+
/**
|
|
33
|
+
* Uses to pass attributes to the header's DOM element.
|
|
34
|
+
*/
|
|
35
|
+
header?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
36
|
+
/**
|
|
37
|
+
* Uses to pass attributes to the content's DOM element.
|
|
38
|
+
*/
|
|
39
|
+
content?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
40
|
+
/**
|
|
41
|
+
* Uses to pass attributes to the container's DOM element.
|
|
42
|
+
*/
|
|
43
|
+
container?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
44
|
+
/**
|
|
45
|
+
* Uses to pass attributes to the previous button's DOM element.
|
|
46
|
+
*/
|
|
47
|
+
previousButton?: CarouselPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
48
|
+
/**
|
|
49
|
+
* Uses to pass attributes to the previous button icon's DOM element.
|
|
50
|
+
*/
|
|
51
|
+
previousButtonIcon?: CarouselPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
52
|
+
/**
|
|
53
|
+
* Uses to pass attributes to the items content's DOM element.
|
|
54
|
+
*/
|
|
55
|
+
itemsContent?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
56
|
+
/**
|
|
57
|
+
* Uses to pass attributes to the items container's DOM element.
|
|
58
|
+
*/
|
|
59
|
+
itemsContainer?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
60
|
+
/**
|
|
61
|
+
* Uses to pass attributes to the item cloned's DOM element.
|
|
62
|
+
*/
|
|
63
|
+
itemCloned?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
64
|
+
/**
|
|
65
|
+
* Uses to pass attributes to the item's DOM element.
|
|
66
|
+
*/
|
|
67
|
+
item?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
68
|
+
/**
|
|
69
|
+
* Uses to pass attributes to the next button's DOM element.
|
|
70
|
+
*/
|
|
71
|
+
nextButton?: CarouselPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
72
|
+
/**
|
|
73
|
+
* Uses to pass attributes to the next button icon's DOM element.
|
|
74
|
+
*/
|
|
75
|
+
nextButtonIcon?: CarouselPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
76
|
+
/**
|
|
77
|
+
* Uses to pass attributes to the indicators's DOM element.
|
|
78
|
+
*/
|
|
79
|
+
indicators?: CarouselPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
80
|
+
/**
|
|
81
|
+
* Uses to pass attributes to the indicator's DOM element.
|
|
82
|
+
*/
|
|
83
|
+
indicator?: CarouselPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
84
|
+
/**
|
|
85
|
+
* Uses to pass attributes to the indicator button's DOM element.
|
|
86
|
+
*/
|
|
87
|
+
indicatorButton?: CarouselPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
88
|
+
/**
|
|
89
|
+
* Uses to pass attributes to the footer's DOM element.
|
|
90
|
+
*/
|
|
91
|
+
footer?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Defines current inline state in Carousel component.
|
|
96
|
+
*/
|
|
97
|
+
export interface CarouselState {
|
|
98
|
+
/**
|
|
99
|
+
* Number of items per page as a number.
|
|
100
|
+
* @defaultValue 1
|
|
101
|
+
*/
|
|
102
|
+
numVisible: number;
|
|
103
|
+
/**
|
|
104
|
+
* Number of items to scroll as a number.
|
|
105
|
+
* @defaultValue 1
|
|
106
|
+
*/
|
|
107
|
+
numScroll: number;
|
|
108
|
+
/**
|
|
109
|
+
* Index of the first item.
|
|
110
|
+
* @defaultValue 0
|
|
111
|
+
*/
|
|
112
|
+
page: number;
|
|
113
|
+
/**
|
|
114
|
+
* Total shifted items' count as a number.
|
|
115
|
+
* @defaultValue 0
|
|
116
|
+
*/
|
|
117
|
+
totalShiftedItems: number;
|
|
118
|
+
}
|
|
12
119
|
|
|
13
120
|
/**
|
|
14
121
|
* Custom responsive option
|
|
@@ -141,6 +248,11 @@ export interface CarouselProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
|
|
|
141
248
|
* @readonly
|
|
142
249
|
*/
|
|
143
250
|
children?: React.ReactNode | undefined;
|
|
251
|
+
/**
|
|
252
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
253
|
+
* @type {CarouselPassThroughOptions}
|
|
254
|
+
*/
|
|
255
|
+
pt?: CarouselPassThroughOptions;
|
|
144
256
|
}
|
|
145
257
|
|
|
146
258
|
/**
|
|
@@ -155,6 +267,14 @@ export interface CarouselProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
|
|
|
155
267
|
* @group Component
|
|
156
268
|
*/
|
|
157
269
|
export declare class Carousel extends React.Component<CarouselProps, any> {
|
|
270
|
+
/**
|
|
271
|
+
* Used to start the autoplay if it is currently stopped.
|
|
272
|
+
*/
|
|
273
|
+
public startAutoplay(): void;
|
|
274
|
+
/**
|
|
275
|
+
* Used to stop the autoplay if it is currently started.
|
|
276
|
+
*/
|
|
277
|
+
public stopAutoplay(): void;
|
|
158
278
|
/**
|
|
159
279
|
* Used to get container element.
|
|
160
280
|
* @return {HTMLDivElement} Container element
|