primereact 9.3.1 → 9.5.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/README.md +18 -31
- package/accordion/accordion.cjs.js +88 -90
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +90 -1
- package/accordion/accordion.esm.js +89 -91
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +89 -92
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +7 -6
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +33 -11
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -0
- package/autocomplete/autocomplete.esm.js +33 -11
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +32 -10
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +71 -22
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +37 -1
- package/avatar/avatar.esm.js +72 -23
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +72 -24
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +26 -42
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +24 -0
- package/avatargroup/avatargroup.esm.js +13 -29
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +52 -69
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +12 -28
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +26 -0
- package/badge/badge.esm.js +13 -29
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +13 -30
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +12 -28
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +38 -0
- package/blockui/blockui.esm.js +13 -29
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -30
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +87 -49
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +88 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +88 -51
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +49 -42
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +42 -1
- package/button/button.esm.js +50 -43
- package/button/button.esm.min.js +1 -1
- package/button/button.js +49 -43
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +37 -23
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -2
- package/calendar/calendar.esm.js +37 -23
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +34 -20
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +52 -63
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +56 -0
- package/card/card.esm.js +39 -50
- package/card/card.esm.min.js +1 -1
- package/card/card.js +86 -98
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +151 -110
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +113 -1
- package/carousel/carousel.esm.js +151 -110
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +148 -108
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +27 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +27 -23
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -24
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +31 -42
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +35 -0
- package/chart/chart.esm.js +18 -29
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +140 -152
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +40 -19
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +19 -1
- package/checkbox/checkbox.esm.js +41 -20
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +41 -20
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +45 -42
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +53 -1
- package/chip/chip.esm.js +46 -43
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +46 -44
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +37 -22
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +37 -22
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +37 -23
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +11 -4
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +13 -0
- package/colorpicker/colorpicker.esm.js +11 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +11 -4
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +6 -2
- package/componentbase/componentbase.cjs.js +105 -0
- package/componentbase/componentbase.cjs.min.js +1 -0
- package/componentbase/componentbase.esm.js +101 -0
- package/componentbase/componentbase.esm.min.js +1 -0
- package/componentbase/componentbase.js +109 -0
- package/componentbase/componentbase.min.js +1 -0
- package/componentbase/package.json +6 -0
- package/confirmdialog/confirmdialog.cjs.js +44 -27
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +90 -2
- package/confirmdialog/confirmdialog.esm.js +45 -28
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +45 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +53 -50
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +70 -1
- package/confirmpopup/confirmpopup.esm.js +54 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +54 -52
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +111 -61
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +112 -62
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +112 -63
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +16510 -5273
- package/core/core.min.js +41 -39
- package/datatable/datatable.cjs.js +253 -210
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +20 -7
- package/datatable/datatable.esm.js +253 -210
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +246 -203
- package/datatable/datatable.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +13 -26
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +38 -0
- package/deferredcontent/deferredcontent.esm.js +14 -27
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -28
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +83 -83
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +85 -3
- package/dialog/dialog.esm.js +83 -83
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +81 -82
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +35 -51
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.d.ts +30 -0
- package/divider/divider.esm.js +22 -38
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +66 -83
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +82 -45
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +83 -46
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +83 -47
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +46 -20
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +6 -1
- package/dropdown/dropdown.esm.js +46 -20
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +45 -19
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +55 -54
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +77 -1
- package/fieldset/fieldset.esm.js +56 -55
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +56 -56
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +181 -151
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +150 -1
- package/fileupload/fileupload.esm.js +182 -152
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +182 -153
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +136 -118
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +137 -119
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +135 -118
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +20 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +17 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +21 -5
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +410 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +410 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +410 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +410 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +410 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +410 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +410 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +410 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +410 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +410 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +410 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +410 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +410 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +410 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +410 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +410 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +410 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +410 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +410 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +410 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +410 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +410 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +410 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +410 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +410 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +410 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +410 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +410 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +410 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +410 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +410 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +410 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +410 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +410 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +410 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +410 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +410 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +410 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +410 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +410 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +410 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +410 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +410 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +410 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +410 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +410 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +410 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +410 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +410 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +410 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +410 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +410 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +410 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +410 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +410 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +410 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +410 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +410 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +410 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +410 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +410 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +410 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +410 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +410 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +410 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +410 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +410 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +410 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +410 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +410 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +410 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +410 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +410 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +410 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +410 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +410 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +410 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +410 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +410 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +410 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +410 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +410 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +410 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +410 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +506 -103
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +507 -104
- package/image/image.esm.min.js +1 -1
- package/image/image.js +503 -101
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +33 -51
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +51 -1
- package/inplace/inplace.esm.js +33 -51
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +33 -52
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -18
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +24 -18
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -18
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +8 -6
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +8 -6
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +8 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +13 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +5 -0
- package/inputswitch/inputswitch.esm.js +13 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +14 -4
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -8
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -8
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -8
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +3 -4
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +12 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +12 -4
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +147 -96
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +147 -96
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +145 -95
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +3 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +3 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +3 -4
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +94 -55
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +95 -56
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +95 -57
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +118 -110
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +119 -111
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +119 -112
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +0 -2
- package/message/message.cjs.js +66 -46
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +67 -47
- package/message/message.esm.min.js +1 -1
- package/message/message.js +67 -48
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +78 -74
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +78 -74
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +78 -75
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +74 -47
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +9 -0
- package/multiselect/multiselect.esm.js +75 -48
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +73 -46
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +21 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +5 -0
- package/multistatecheckbox/multistatecheckbox.esm.js +21 -13
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +21 -13
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +18 -2
- package/overlaypanel/overlaypanel.cjs.js +40 -46
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +45 -1
- package/overlaypanel/overlaypanel.esm.js +41 -47
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -48
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +3 -3
- package/panel/panel.cjs.js +78 -63
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +100 -1
- package/panel/panel.esm.js +79 -64
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +79 -65
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +145 -83
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +145 -83
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +144 -83
- package/panelmenu/panelmenu.min.js +1 -1
- package/primereact.all.cjs.js +4240 -3058
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +4240 -3059
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +4240 -3058
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +45 -57
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +38 -0
- package/progressbar/progressbar.esm.js +32 -44
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +105 -118
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +37 -51
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +34 -0
- package/progressspinner/progressspinner.esm.js +24 -38
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +75 -90
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +42 -20
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +19 -1
- package/radiobutton/radiobutton.esm.js +42 -20
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +43 -22
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +15 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +15 -7
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +14 -6
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +195 -187
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +16 -7
- package/resources/themes/arya-green/theme.css +16 -7
- package/resources/themes/arya-orange/theme.css +16 -7
- package/resources/themes/arya-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +16 -7
- package/resources/themes/fluent-light/theme.css +16 -7
- package/resources/themes/lara-dark-blue/theme.css +16 -7
- package/resources/themes/lara-dark-indigo/theme.css +16 -7
- package/resources/themes/lara-dark-purple/theme.css +16 -7
- package/resources/themes/lara-dark-teal/theme.css +16 -7
- package/resources/themes/lara-light-blue/theme.css +16 -7
- package/resources/themes/lara-light-indigo/theme.css +16 -7
- package/resources/themes/lara-light-purple/theme.css +16 -7
- package/resources/themes/lara-light-teal/theme.css +16 -7
- package/resources/themes/luna-amber/theme.css +16 -7
- package/resources/themes/luna-blue/theme.css +16 -7
- package/resources/themes/luna-green/theme.css +16 -7
- package/resources/themes/luna-pink/theme.css +16 -7
- package/resources/themes/md-dark-deeppurple/theme.css +16 -7
- package/resources/themes/md-dark-indigo/theme.css +16 -7
- package/resources/themes/md-light-deeppurple/theme.css +16 -7
- package/resources/themes/md-light-indigo/theme.css +16 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-dark-indigo/theme.css +16 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-light-indigo/theme.css +16 -7
- package/resources/themes/mira/theme.css +16 -7
- package/resources/themes/nano/theme.css +16 -7
- package/resources/themes/nova/theme.css +16 -7
- package/resources/themes/nova-accent/theme.css +16 -7
- package/resources/themes/nova-alt/theme.css +16 -7
- package/resources/themes/rhea/theme.css +16 -7
- package/resources/themes/saga-blue/theme.css +16 -7
- package/resources/themes/saga-green/theme.css +16 -7
- package/resources/themes/saga-orange/theme.css +16 -7
- package/resources/themes/saga-purple/theme.css +16 -7
- package/resources/themes/soho-dark/theme.css +16 -7
- package/resources/themes/soho-light/theme.css +16 -7
- package/resources/themes/tailwind-light/theme.css +16 -7
- package/resources/themes/vela-blue/theme.css +16 -7
- package/resources/themes/vela-green/theme.css +16 -7
- package/resources/themes/vela-orange/theme.css +16 -7
- package/resources/themes/vela-purple/theme.css +16 -7
- package/resources/themes/viva-dark/theme.css +16 -7
- package/resources/themes/viva-light/theme.css +16 -7
- package/scrollpanel/scrollpanel.cjs.js +39 -52
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +42 -0
- package/scrollpanel/scrollpanel.esm.js +26 -39
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +193 -207
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +64 -36
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +42 -1
- package/scrolltop/scrolltop.esm.js +65 -37
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +65 -38
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +6 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +6 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +88 -52
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +58 -1
- package/sidebar/sidebar.esm.js +89 -53
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +89 -54
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +26 -42
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +26 -0
- package/skeleton/skeleton.esm.js +13 -29
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +70 -87
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +121 -111
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +98 -1
- package/slidemenu/slidemenu.esm.js +122 -112
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +122 -113
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +63 -56
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +64 -1
- package/speeddial/speeddial.esm.js +64 -57
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +62 -56
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +50 -40
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +59 -1
- package/splitbutton/splitbutton.esm.js +51 -41
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +50 -41
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +68 -70
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +60 -0
- package/splitter/splitter.esm.js +69 -71
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +69 -72
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +78 -45
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +79 -46
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +79 -47
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +9 -7
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +9 -7
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +9 -7
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +83 -47
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +84 -48
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +84 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +142 -122
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +132 -1
- package/tabview/tabview.esm.js +143 -123
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +143 -124
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +18 -30
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +34 -1
- package/tag/tag.esm.js +19 -31
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +19 -32
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +49 -52
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +73 -0
- package/terminal/terminal.esm.js +50 -53
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +50 -54
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +1 -1
- package/tieredmenu/tieredmenu.cjs.js +104 -59
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +105 -60
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +105 -61
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.d.ts +1 -1
- package/toast/toast.cjs.js +85 -81
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +124 -2
- package/toast/toast.esm.js +86 -82
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +83 -80
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +12 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +13 -4
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +35 -49
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +44 -0
- package/toolbar/toolbar.esm.js +22 -36
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +72 -87
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +31 -37
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +55 -0
- package/tooltip/tooltip.esm.js +32 -38
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +32 -39
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.d.ts +1 -1
- package/treenode/treenode.d.ts +5 -1
- package/treeselect/treeselect.cjs.js +12 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +6 -1
- package/treeselect/treeselect.esm.js +12 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +11 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +10 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +10 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +10 -3
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +22 -11
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +22 -11
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +21 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +735 -676
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +5 -1
- package/utils/utils.esm.js +732 -677
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +736 -678
- package/utils/utils.min.js +1 -1
- package/web-types.json +13 -1
package/carousel/carousel.esm.js
CHANGED
|
@@ -1,26 +1,53 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PrimeReact, { ariaLabel } from 'primereact/api';
|
|
3
3
|
import { usePrevious, useResizeListener, useMountEffect, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
4
|
-
import { Ripple } from 'primereact/ripple';
|
|
5
|
-
import { ObjectUtils, classNames, UniqueComponentId, DomHandler, IconUtils } from 'primereact/utils';
|
|
6
|
-
import { ChevronUpIcon } from 'primereact/icons/chevronup';
|
|
7
|
-
import { ChevronRightIcon } from 'primereact/icons/chevronright';
|
|
8
4
|
import { ChevronDownIcon } from 'primereact/icons/chevrondown';
|
|
9
5
|
import { ChevronLeftIcon } from 'primereact/icons/chevronleft';
|
|
6
|
+
import { ChevronRightIcon } from 'primereact/icons/chevronright';
|
|
7
|
+
import { ChevronUpIcon } from 'primereact/icons/chevronup';
|
|
8
|
+
import { Ripple } from 'primereact/ripple';
|
|
9
|
+
import { classNames, mergeProps, UniqueComponentId, DomHandler, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
10
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
10
11
|
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
function _typeof(obj) {
|
|
13
|
+
"@babel/helpers - typeof";
|
|
14
|
+
|
|
15
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
16
|
+
return typeof obj;
|
|
17
|
+
} : function (obj) {
|
|
18
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
19
|
+
}, _typeof(obj);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function _toPrimitive(input, hint) {
|
|
23
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
24
|
+
var prim = input[Symbol.toPrimitive];
|
|
25
|
+
if (prim !== undefined) {
|
|
26
|
+
var res = prim.call(input, hint || "default");
|
|
27
|
+
if (_typeof(res) !== "object") return res;
|
|
28
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
29
|
+
}
|
|
30
|
+
return (hint === "string" ? String : Number)(input);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _toPropertyKey(arg) {
|
|
34
|
+
var key = _toPrimitive(arg, "string");
|
|
35
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _defineProperty(obj, key, value) {
|
|
39
|
+
key = _toPropertyKey(key);
|
|
40
|
+
if (key in obj) {
|
|
41
|
+
Object.defineProperty(obj, key, {
|
|
42
|
+
value: value,
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
obj[key] = value;
|
|
49
|
+
}
|
|
50
|
+
return obj;
|
|
24
51
|
}
|
|
25
52
|
|
|
26
53
|
function _arrayLikeToArray(arr, len) {
|
|
@@ -94,7 +121,7 @@ function _slicedToArray(arr, i) {
|
|
|
94
121
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
95
122
|
}
|
|
96
123
|
|
|
97
|
-
var CarouselBase = {
|
|
124
|
+
var CarouselBase = ComponentBase.extend({
|
|
98
125
|
defaultProps: {
|
|
99
126
|
__TYPE: 'Carousel',
|
|
100
127
|
id: null,
|
|
@@ -121,15 +148,11 @@ var CarouselBase = {
|
|
|
121
148
|
indicatorsContentClassName: null,
|
|
122
149
|
onPageChange: null,
|
|
123
150
|
children: undefined
|
|
124
|
-
},
|
|
125
|
-
getProps: function getProps(props) {
|
|
126
|
-
return ObjectUtils.getMergedProps(props, CarouselBase.defaultProps);
|
|
127
|
-
},
|
|
128
|
-
getOtherProps: function getOtherProps(props) {
|
|
129
|
-
return ObjectUtils.getDiffProps(props, CarouselBase.defaultProps);
|
|
130
151
|
}
|
|
131
|
-
};
|
|
152
|
+
});
|
|
132
153
|
|
|
154
|
+
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; }
|
|
155
|
+
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; }
|
|
133
156
|
var CarouselItem = /*#__PURE__*/React.memo(function (props) {
|
|
134
157
|
var content = props.template(props.item);
|
|
135
158
|
var className = classNames(props.className, 'p-carousel-item', {
|
|
@@ -137,9 +160,11 @@ var CarouselItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
137
160
|
'p-carousel-item-start': props.start,
|
|
138
161
|
'p-carousel-item-end': props.end
|
|
139
162
|
});
|
|
140
|
-
|
|
163
|
+
var ptParams = props.className && props.className === 'p-carousel-item-cloned' ? props.ptm('itemCloned') : props.ptm('item');
|
|
164
|
+
var itemClonedProps = mergeProps({
|
|
141
165
|
className: className
|
|
142
|
-
},
|
|
166
|
+
}, ptParams);
|
|
167
|
+
return /*#__PURE__*/React.createElement("div", itemClonedProps, content);
|
|
143
168
|
});
|
|
144
169
|
var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
145
170
|
var props = CarouselBase.getProps(inProps);
|
|
@@ -159,6 +184,16 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
159
184
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
160
185
|
pageState = _React$useState8[0],
|
|
161
186
|
setPageState = _React$useState8[1];
|
|
187
|
+
var _CarouselBase$setMeta = CarouselBase.setMetaData({
|
|
188
|
+
props: props,
|
|
189
|
+
state: {
|
|
190
|
+
numVisible: numVisibleState,
|
|
191
|
+
numScroll: numScrollState,
|
|
192
|
+
totalShiftedItems: totalShiftedItemsState,
|
|
193
|
+
page: pageState
|
|
194
|
+
}
|
|
195
|
+
}),
|
|
196
|
+
ptm = _CarouselBase$setMeta.ptm;
|
|
162
197
|
var elementRef = React.useRef(null);
|
|
163
198
|
var itemsContainerRef = React.useRef(null);
|
|
164
199
|
var remainingItems = React.useRef(0);
|
|
@@ -177,9 +212,10 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
177
212
|
var isVertical = props.orientation === 'vertical';
|
|
178
213
|
var circular = props.circular || !!props.autoplayInterval;
|
|
179
214
|
var isCircular = circular && props.value && props.value.length >= numVisibleState;
|
|
180
|
-
var currentPage = props.onPageChange ? props.page : pageState;
|
|
181
215
|
var totalIndicators = props.value ? Math.max(Math.ceil((props.value.length - numVisibleState) / numScrollState) + 1, 0) : 0;
|
|
182
216
|
var isAutoplay = totalIndicators && props.autoplayInterval && allowAutoplay.current;
|
|
217
|
+
var isControlled = props.onPageChange && !isAutoplay;
|
|
218
|
+
var currentPage = isControlled ? props.page : pageState;
|
|
183
219
|
var _useResizeListener = useResizeListener({
|
|
184
220
|
listener: function listener() {
|
|
185
221
|
calculatePosition();
|
|
@@ -220,15 +256,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
220
256
|
changePosition(totalShiftedItems);
|
|
221
257
|
itemsContainerRef.current.style.transition = 'transform 500ms ease 0s';
|
|
222
258
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
props.onPageChange({
|
|
226
|
-
page: page
|
|
227
|
-
});
|
|
228
|
-
} else {
|
|
229
|
-
setPageState(page);
|
|
230
|
-
setTotalShiftedItemsState(totalShiftedItems);
|
|
231
|
-
}
|
|
259
|
+
changePage(page);
|
|
260
|
+
setTotalShiftedItemsState(totalShiftedItems);
|
|
232
261
|
};
|
|
233
262
|
var calculatePosition = function calculatePosition() {
|
|
234
263
|
if (itemsContainerRef.current && responsiveOptions.current) {
|
|
@@ -251,13 +280,7 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
251
280
|
}
|
|
252
281
|
setTotalShiftedItemsState(totalShiftedItems);
|
|
253
282
|
setNumScrollState(matchedResponsiveData.numScroll);
|
|
254
|
-
|
|
255
|
-
props.onPageChange({
|
|
256
|
-
page: page
|
|
257
|
-
});
|
|
258
|
-
} else {
|
|
259
|
-
setPageState(page);
|
|
260
|
-
}
|
|
283
|
+
changePage(page);
|
|
261
284
|
}
|
|
262
285
|
if (numVisibleState !== matchedResponsiveData.numVisible) {
|
|
263
286
|
setNumVisibleState(matchedResponsiveData.numVisible);
|
|
@@ -298,19 +321,19 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
298
321
|
}
|
|
299
322
|
}
|
|
300
323
|
};
|
|
301
|
-
var
|
|
324
|
+
var _onTouchStart = function onTouchStart(e) {
|
|
302
325
|
var touchobj = e.changedTouches[0];
|
|
303
326
|
startPos.current = {
|
|
304
327
|
x: touchobj.pageX,
|
|
305
328
|
y: touchobj.pageY
|
|
306
329
|
};
|
|
307
330
|
};
|
|
308
|
-
var
|
|
331
|
+
var _onTouchMove = function onTouchMove(e) {
|
|
309
332
|
if (e.cancelable) {
|
|
310
333
|
e.preventDefault();
|
|
311
334
|
}
|
|
312
335
|
};
|
|
313
|
-
var
|
|
336
|
+
var _onTouchEnd = function onTouchEnd(e) {
|
|
314
337
|
var touchobj = e.changedTouches[0];
|
|
315
338
|
if (isVertical) {
|
|
316
339
|
changePageOnTouch(e, touchobj.pageY - startPos.current.y);
|
|
@@ -367,6 +390,12 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
367
390
|
itemsContainerRef.current.style.transform = isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
|
|
368
391
|
}
|
|
369
392
|
};
|
|
393
|
+
var changePage = function changePage(page) {
|
|
394
|
+
!isControlled && setPageState(page);
|
|
395
|
+
props.onPageChange && props.onPageChange({
|
|
396
|
+
page: page
|
|
397
|
+
});
|
|
398
|
+
};
|
|
370
399
|
React.useImperativeHandle(ref, function () {
|
|
371
400
|
return {
|
|
372
401
|
props: props,
|
|
@@ -396,13 +425,7 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
396
425
|
var page = currentPage;
|
|
397
426
|
if (totalIndicators !== 0 && page >= totalIndicators) {
|
|
398
427
|
page = totalIndicators - 1;
|
|
399
|
-
|
|
400
|
-
props.onPageChange({
|
|
401
|
-
page: page
|
|
402
|
-
});
|
|
403
|
-
} else {
|
|
404
|
-
setPageState(page);
|
|
405
|
-
}
|
|
428
|
+
changePage(page);
|
|
406
429
|
stateChanged = true;
|
|
407
430
|
}
|
|
408
431
|
totalShiftedItems = page * numScrollState * -1;
|
|
@@ -470,7 +493,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
470
493
|
item: item,
|
|
471
494
|
active: isActive,
|
|
472
495
|
start: start,
|
|
473
|
-
end: end
|
|
496
|
+
end: end,
|
|
497
|
+
ptm: ptm
|
|
474
498
|
});
|
|
475
499
|
});
|
|
476
500
|
clonedElements = props.value.slice(0, numVisibleState);
|
|
@@ -486,7 +510,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
486
510
|
item: item,
|
|
487
511
|
active: isActive,
|
|
488
512
|
start: start,
|
|
489
|
-
end: end
|
|
513
|
+
end: end,
|
|
514
|
+
ptm: ptm
|
|
490
515
|
});
|
|
491
516
|
});
|
|
492
517
|
}
|
|
@@ -502,7 +527,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
502
527
|
item: item,
|
|
503
528
|
active: isActive,
|
|
504
529
|
start: start,
|
|
505
|
-
end: end
|
|
530
|
+
end: end,
|
|
531
|
+
ptm: ptm
|
|
506
532
|
});
|
|
507
533
|
});
|
|
508
534
|
return /*#__PURE__*/React.createElement(React.Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
|
|
@@ -510,17 +536,19 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
510
536
|
};
|
|
511
537
|
var createHeader = function createHeader() {
|
|
512
538
|
if (props.header) {
|
|
513
|
-
|
|
514
|
-
className:
|
|
515
|
-
},
|
|
539
|
+
var headerProps = mergeProps({
|
|
540
|
+
className: 'p-carousel-header'
|
|
541
|
+
}, ptm('header'));
|
|
542
|
+
return /*#__PURE__*/React.createElement("div", headerProps, props.header);
|
|
516
543
|
}
|
|
517
544
|
return null;
|
|
518
545
|
};
|
|
519
546
|
var createFooter = function createFooter() {
|
|
520
547
|
if (props.footer) {
|
|
521
|
-
|
|
522
|
-
className:
|
|
523
|
-
},
|
|
548
|
+
var footerProps = mergeProps({
|
|
549
|
+
className: 'p-carousel-footer'
|
|
550
|
+
}, ptm('footer'));
|
|
551
|
+
return /*#__PURE__*/React.createElement("div", footerProps, props.footer);
|
|
524
552
|
}
|
|
525
553
|
return null;
|
|
526
554
|
};
|
|
@@ -530,21 +558,30 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
530
558
|
var backwardNavigator = createBackwardNavigator();
|
|
531
559
|
var forwardNavigator = createForwardNavigator();
|
|
532
560
|
var className = classNames('p-carousel-container', props.containerClassName);
|
|
533
|
-
|
|
534
|
-
className:
|
|
535
|
-
}, backwardNavigator, /*#__PURE__*/React.createElement("div", {
|
|
536
|
-
className: "p-carousel-items-content",
|
|
561
|
+
var itemsContentProps = mergeProps({
|
|
562
|
+
className: 'p-carousel-items-content',
|
|
537
563
|
style: {
|
|
538
564
|
height: height
|
|
539
565
|
},
|
|
540
|
-
onTouchStart: onTouchStart
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
566
|
+
onTouchStart: function onTouchStart(e) {
|
|
567
|
+
return _onTouchStart(e);
|
|
568
|
+
},
|
|
569
|
+
onTouchMove: function onTouchMove(e) {
|
|
570
|
+
return _onTouchMove(e);
|
|
571
|
+
},
|
|
572
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
573
|
+
return _onTouchEnd(e);
|
|
574
|
+
}
|
|
575
|
+
}, ptm('itemsContent'));
|
|
576
|
+
var containerProps = mergeProps({
|
|
577
|
+
className: className
|
|
578
|
+
}, ptm('container'));
|
|
579
|
+
var itemsContainerProps = mergeProps({
|
|
544
580
|
ref: itemsContainerRef,
|
|
545
|
-
className:
|
|
581
|
+
className: 'p-carousel-items-container',
|
|
546
582
|
onTransitionEnd: onTransitionEnd
|
|
547
|
-
},
|
|
583
|
+
}, ptm('itemsContainer'));
|
|
584
|
+
return /*#__PURE__*/React.createElement("div", containerProps, backwardNavigator, /*#__PURE__*/React.createElement("div", itemsContentProps, /*#__PURE__*/React.createElement("div", itemsContainerProps, items)), forwardNavigator);
|
|
548
585
|
};
|
|
549
586
|
var createBackwardNavigator = function createBackwardNavigator() {
|
|
550
587
|
if (props.showNavigators) {
|
|
@@ -553,23 +590,23 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
553
590
|
'p-disabled': isDisabled
|
|
554
591
|
});
|
|
555
592
|
var iconClassName = 'p-carousel-prev-icon';
|
|
556
|
-
var
|
|
557
|
-
className: iconClassName
|
|
558
|
-
}) : props.prevIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, {
|
|
593
|
+
var previousButtonIconProps = mergeProps({
|
|
559
594
|
className: iconClassName
|
|
560
|
-
});
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
}, {
|
|
595
|
+
}, ptm('previousButtonIcon'));
|
|
596
|
+
var icon = isVertical ? props.prevIcon || /*#__PURE__*/React.createElement(ChevronUpIcon, previousButtonIconProps) : props.prevIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, previousButtonIconProps);
|
|
597
|
+
var backwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, previousButtonIconProps), {
|
|
564
598
|
props: props
|
|
565
599
|
});
|
|
566
|
-
|
|
567
|
-
type:
|
|
600
|
+
var previousButtonProps = mergeProps({
|
|
601
|
+
type: 'button',
|
|
568
602
|
className: _className,
|
|
569
|
-
onClick:
|
|
603
|
+
onClick: function onClick(e) {
|
|
604
|
+
return navBackward(e);
|
|
605
|
+
},
|
|
570
606
|
disabled: isDisabled,
|
|
571
|
-
|
|
572
|
-
},
|
|
607
|
+
'aria-label': ariaLabel('previousPageLabel')
|
|
608
|
+
}, ptm('previousButton'));
|
|
609
|
+
return /*#__PURE__*/React.createElement("button", previousButtonProps, backwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
573
610
|
}
|
|
574
611
|
return null;
|
|
575
612
|
};
|
|
@@ -580,23 +617,23 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
580
617
|
'p-disabled': isDisabled
|
|
581
618
|
});
|
|
582
619
|
var iconClassName = 'p-carousel-next-icon';
|
|
583
|
-
var
|
|
584
|
-
className: iconClassName
|
|
585
|
-
}) : props.nextIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
620
|
+
var nextButtonIconProps = mergeProps({
|
|
586
621
|
className: iconClassName
|
|
587
|
-
});
|
|
588
|
-
var
|
|
589
|
-
|
|
590
|
-
}, {
|
|
622
|
+
}, ptm('nextButtonIcon'));
|
|
623
|
+
var icon = isVertical ? props.nextIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, nextButtonIconProps) : props.nextIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, nextButtonIconProps);
|
|
624
|
+
var forwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, nextButtonIconProps), {
|
|
591
625
|
props: props
|
|
592
626
|
});
|
|
593
|
-
|
|
594
|
-
type:
|
|
627
|
+
var nextButtonProps = mergeProps({
|
|
628
|
+
type: 'button',
|
|
595
629
|
className: _className2,
|
|
596
|
-
onClick:
|
|
630
|
+
onClick: function onClick(e) {
|
|
631
|
+
return navForward(e);
|
|
632
|
+
},
|
|
597
633
|
disabled: isDisabled,
|
|
598
|
-
|
|
599
|
-
},
|
|
634
|
+
'aria-label': ariaLabel('nextPageLabel')
|
|
635
|
+
}, ptm('nextButton'));
|
|
636
|
+
return /*#__PURE__*/React.createElement("button", nextButtonProps, forwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
600
637
|
}
|
|
601
638
|
return null;
|
|
602
639
|
};
|
|
@@ -606,17 +643,19 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
606
643
|
var className = classNames('p-carousel-indicator', {
|
|
607
644
|
'p-highlight': isActive
|
|
608
645
|
});
|
|
609
|
-
|
|
646
|
+
var indicatorProps = mergeProps({
|
|
610
647
|
key: key,
|
|
611
648
|
className: className
|
|
612
|
-
},
|
|
613
|
-
|
|
614
|
-
|
|
649
|
+
}, ptm('indicator'));
|
|
650
|
+
var indicatorButtonProps = mergeProps({
|
|
651
|
+
type: 'button',
|
|
652
|
+
className: 'p-link',
|
|
615
653
|
onClick: function onClick(e) {
|
|
616
654
|
return onDotClick(e, index);
|
|
617
655
|
},
|
|
618
|
-
|
|
619
|
-
},
|
|
656
|
+
'aria-label': "".concat(ariaLabel('pageLabel'), " ").concat(index + 1)
|
|
657
|
+
}, ptm('indicatorButton'));
|
|
658
|
+
return /*#__PURE__*/React.createElement("li", indicatorProps, /*#__PURE__*/React.createElement("button", indicatorButtonProps, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
620
659
|
};
|
|
621
660
|
var createIndicators = function createIndicators() {
|
|
622
661
|
if (props.showIndicators) {
|
|
@@ -625,13 +664,13 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
625
664
|
for (var i = 0; i < totalIndicators; i++) {
|
|
626
665
|
_indicators.push(createIndicator(i));
|
|
627
666
|
}
|
|
628
|
-
|
|
667
|
+
var indicatorsProps = mergeProps({
|
|
629
668
|
className: _className3
|
|
630
|
-
},
|
|
669
|
+
}, ptm('indicators'));
|
|
670
|
+
return /*#__PURE__*/React.createElement("ul", indicatorsProps, _indicators);
|
|
631
671
|
}
|
|
632
672
|
return null;
|
|
633
673
|
};
|
|
634
|
-
var otherProps = CarouselBase.getOtherProps(props);
|
|
635
674
|
var className = classNames('p-carousel p-component', {
|
|
636
675
|
'p-carousel-vertical': isVertical,
|
|
637
676
|
'p-carousel-horizontal': !isVertical
|
|
@@ -641,14 +680,16 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
641
680
|
var indicators = createIndicators();
|
|
642
681
|
var header = createHeader();
|
|
643
682
|
var footer = createFooter();
|
|
644
|
-
|
|
645
|
-
ref: elementRef,
|
|
683
|
+
var rootProps = mergeProps({
|
|
646
684
|
id: props.id,
|
|
685
|
+
ref: elementRef,
|
|
647
686
|
className: className,
|
|
648
687
|
style: props.style
|
|
649
|
-
},
|
|
688
|
+
}, CarouselBase.getOtherProps(props), ptm('root'));
|
|
689
|
+
var contentProps = mergeProps({
|
|
650
690
|
className: contentClassName
|
|
651
|
-
}, content
|
|
691
|
+
}, ptm('content'));
|
|
692
|
+
return /*#__PURE__*/React.createElement("div", rootProps, header, /*#__PURE__*/React.createElement("div", contentProps, content, indicators), footer);
|
|
652
693
|
}));
|
|
653
694
|
CarouselItem.displayName = 'CarouselItem';
|
|
654
695
|
Carousel.displayName = 'Carousel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{ariaLabel as n}from"primereact/api";import{usePrevious as r,useResizeListener as a,useMountEffect as l,useUpdateEffect as o,useUnmountEffect as c}from"primereact/hooks";import{Ripple as u}from"primereact/ripple";import{ObjectUtils as i,classNames as s,UniqueComponentId as m,DomHandler as p,IconUtils as f}from"primereact/utils";import{ChevronUpIcon as v}from"primereact/icons/chevronup";import{ChevronRightIcon as d}from"primereact/icons/chevronright";import{ChevronDownIcon as h}from"primereact/icons/chevrondown";import{ChevronLeftIcon as g}from"primereact/icons/chevronleft";function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e){if(Array.isArray(e))return y(e)}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function S(){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 C(e){if(Array.isArray(e))return e}function P(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,l,o,c=[],u=!0,i=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(e){i=!0,a=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(i)throw a}}return c}}function w(){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 k(e,t){return C(e)||P(e,t)||I(e,t)||w()}var x={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 i.getMergedProps(e,x.defaultProps)},getOtherProps:function(e){return i.getDiffProps(e,x.defaultProps)}},O=e.memo((function(t){var n=t.template(t.item),r=s(t.className,"p-carousel-item",{"p-carousel-item-active":t.active,"p-carousel-item-start":t.start,"p-carousel-item-end":t.end});return e.createElement("div",{className:r},n)})),T=e.memo(e.forwardRef((function(y,C){var P=x.getProps(y),w=k(e.useState(P.numVisible),2),T=w[0],R=w[1],A=k(e.useState(P.numScroll),2),M=A[0],V=A[1],j=k(e.useState(P.page*P.numScroll*-1),2),D=j[0],H=j[1],L=k(e.useState(P.page),2),X=L[0],_=L[1],Y=e.useRef(null),z=e.useRef(null),J=e.useRef(0),F=e.useRef(!!P.autoplayInterval),U=e.useRef(""),W=e.useRef(20),$=e.useRef(null),q=e.useRef(null),B=e.useRef(null),G=e.useRef(!1),K=e.useRef(null),Q=r(M),Z=r(T),ee=r(P.value),te=r(P.page),ne="vertical"===P.orientation,re=P.circular||!!P.autoplayInterval,ae=re&&P.value&&P.value.length>=T,le=P.onPageChange?P.page:X,oe=P.value?Math.max(Math.ceil((P.value.length-T)/M)+1,0):0,ce=oe&&P.autoplayInterval&&F.current,ue=k(a({listener:function(){se()},when:P.responsiveOptions}),1)[0],ie=function(e,t){var n=D;null!=t?(n=M*t*-1,ae&&(n-=T),G.current=!1):(n+=M*e,G.current&&(n+=J.current-M*e,G.current=!1),t=Math.abs(Math.floor((ae?n+T:n)/M)));ae&&X===oe-1&&-1===e?(n=-1*(P.value.length+T),t=0):ae&&0===X&&1===e?(n=0,t=oe-1):t===oe-1&&J.current>0&&(n+=-1*J.current-M*e,G.current=!0),z.current&&(p.removeClass(z.current,"p-items-hidden"),Ee(n),z.current.style.transition="transform 500ms ease 0s"),P.onPageChange?(H(n),P.onPageChange({page:t})):(_(t),H(n))},se=function(){if(z.current&&K.current){for(var e=window.innerWidth,t={numVisible:P.numVisible,numScroll:P.numScroll},n=0;n<K.current.length;n++){var r=K.current[n];parseInt(r.breakpoint,10)>=e&&(t=r)}if(M!==t.numScroll){var a=Math.floor(le*M/t.numScroll),l=t.numScroll*a*-1;ae&&(l-=t.numVisible),H(l),V(t.numScroll),P.onPageChange?P.onPageChange({page:a}):_(a)}T!==t.numVisible&&R(t.numVisible)}},me=function(e,t){(re||0!==le)&&ie(1,t),F.current=!1,e.cancelable&&e.preventDefault()},pe=function(e,t){(re||le<oe-1)&&ie(-1,t),F.current=!1,e.cancelable&&e.preventDefault()},fe=function(e,t){t>le?pe(e,t):t<le&&me(e,t)},ve=function(e){z.current&&"transform"===e.propertyName&&(p.addClass(z.current,"p-items-hidden"),z.current.style.transition="",0!==X&&X!==oe-1||!ae||Ee(D))},de=function(e){var t=e.changedTouches[0];$.current={x:t.pageX,y:t.pageY}},he=function(e){e.cancelable&&e.preventDefault()},ge=function(e){var t=e.changedTouches[0];be(e,ne?t.pageY-$.current.y:t.pageX-$.current.x)},be=function(e,t){Math.abs(t)>W&&(t<0?pe(e):me(e))},ye=function(){q.current&&clearInterval(q.current)},Ne=function(){B.current||(B.current=p.createInlineStyle(t.nonce));var e,n="\n .p-carousel[".concat(U.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/T,"%\n }\n ");if(P.responsiveOptions){K.current=N(e=P.responsiveOptions)||E(e)||I(e)||S(),K.current.sort((function(e,n){return i.sort(e.breakpoint,n.breakpoint,-1,t.locale,t.nullSortOrder)}));for(var r=0;r<K.current.length;r++){var a=K.current[r];n+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(U.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}B.current.innerHTML=n},Ee=function(e){z.current&&(z.current.style.transform=ne?"translate3d(0, ".concat(e*(100/T),"%, 0)"):"translate3d(".concat(e*(100/T),"%, 0, 0)"))};e.useImperativeHandle(C,(function(){return{props:P,getElement:function(){return Y.current}}})),l((function(){Y.current&&(U.current=m(),Y.current.setAttribute(U.current,"")),Ne(),se(),Ee(D),ue()})),o((function(){var e=!1,t=D;if(P.autoplayInterval&&ye(),Q!==M||Z!==T||P.value&&ee&&ee.length!==P.value.length){J.current=(P.value.length-T)%M;var n=le;0!==oe&&n>=oe&&(n=oe-1,P.onPageChange?P.onPageChange({page:n}):_(n),e=!0),t=n*M*-1,ae&&(t-=T),n===oe-1&&J.current>0?(t+=-1*J.current+M,G.current=!0):G.current=!1,t!==D&&(H(t),e=!0),Ee(t)}ae&&(0===X?t=-1*T:0===t&&(t=-1*P.value.length,J.current>0&&(G.current=!0)),t!==D&&(H(t),e=!0)),te!==P.page&&(P.page>te&&P.page<=oe-1?ie(-1,P.page):P.page<te&&ie(1,P.page)),!e&&ce&&(q.current=setInterval((function(){ie(-1,X===oe-1?0:X+1)}),P.autoplayInterval))})),c((function(){P.autoplayInterval&&ye()}));var Ie=function(){if(P.value&&P.value.length){var t=null,n=null;if(ae){var r=null;t=(r=P.value.slice(-1*T)).map((function(t,n){return e.createElement(O,{key:n+"_scloned",className:"p-carousel-item-cloned",template:P.itemTemplate,item:t,active:-1*D===P.value.length+T,start:0===n,end:n===r.length-1})})),n=(r=P.value.slice(0,T)).map((function(t,n){return e.createElement(O,{key:n+"_fcloned",className:"p-carousel-item-cloned",template:P.itemTemplate,item:t,active:0===D,start:0===n,end:n===r.length-1})}))}var a=P.value.map((function(t,n){var r=ae?-1*(D+T):-1*D,a=r+T-1;return e.createElement(O,{key:n,template:P.itemTemplate,item:t,active:r<=n&&a>=n,start:r===n,end:a===n})}));return e.createElement(e.Fragment,null,t,a,n)}},Se=function(){if(P.showNavigators){var t=(!re||P.value&&P.value.length<T)&&0===le,r=s("p-carousel-prev p-link",{"p-disabled":t}),a="p-carousel-prev-icon",l=f.getJSXIcon(ne?P.prevIcon||e.createElement(v,{className:a}):P.prevIcon||e.createElement(g,{className:a}),{className:r},{props:P});return e.createElement("button",{type:"button",className:r,onClick:me,disabled:t,"aria-label":n("previousPageLabel")},l,e.createElement(u,null))}return null},Ce=function(){if(P.showNavigators){var t=(!re||P.value&&P.value.length<T)&&(le===oe-1||0===oe),r=s("p-carousel-next p-link",{"p-disabled":t}),a="p-carousel-next-icon",l=f.getJSXIcon(ne?P.nextIcon||e.createElement(h,{className:a}):P.nextIcon||e.createElement(d,{className:a}),{className:r},{props:P});return e.createElement("button",{type:"button",className:r,onClick:pe,disabled:t,"aria-label":n("nextPageLabel")},l,e.createElement(u,null))}return null},Pe=function(t){var r="carousel-indicator-"+t,a=s("p-carousel-indicator",{"p-highlight":le===t});return e.createElement("li",{key:r,className:a},e.createElement("button",{type:"button",className:"p-link",onClick:function(e){return fe(e,t)},"aria-label":"".concat(n("pageLabel")," ").concat(t+1)},e.createElement(u,null)))},we=x.getOtherProps(P),ke=s("p-carousel p-component",{"p-carousel-vertical":ne,"p-carousel-horizontal":!ne},P.className),xe=s("p-carousel-content",P.contentClassName),Oe=function(){var t=Ie(),n=ne?P.verticalViewPortHeight:"auto",r=Se(),a=Ce(),l=s("p-carousel-container",P.containerClassName);return e.createElement("div",{className:l},r,e.createElement("div",{className:"p-carousel-items-content",style:{height:n},onTouchStart:de,onTouchMove:he,onTouchEnd:ge},e.createElement("div",{ref:z,className:"p-carousel-items-container",onTransitionEnd:ve},t)),a)}(),Te=function(){if(P.showIndicators){for(var t=s("p-carousel-indicators p-reset",P.indicatorsContentClassName),n=[],r=0;r<oe;r++)n.push(Pe(r));return e.createElement("ul",{className:t},n)}return null}(),Re=P.header?e.createElement("div",{className:"p-carousel-header"},P.header):null,Ae=P.footer?e.createElement("div",{className:"p-carousel-footer"},P.footer):null;return e.createElement("div",b({ref:Y,id:P.id,className:ke,style:P.style},we),Re,e.createElement("div",{className:xe},Oe,Te),Ae)})));O.displayName="CarouselItem",T.displayName="Carousel";export{T as Carousel};
|
|
1
|
+
import*as e from"react";import t,{ariaLabel as r}from"primereact/api";import{usePrevious as n,useResizeListener as a,useMountEffect as o,useUpdateEffect as l,useUnmountEffect as c}from"primereact/hooks";import{ChevronDownIcon as u}from"primereact/icons/chevrondown";import{ChevronLeftIcon as i}from"primereact/icons/chevronleft";import{ChevronRightIcon as s}from"primereact/icons/chevronright";import{ChevronUpIcon as m}from"primereact/icons/chevronup";import{Ripple as p}from"primereact/ripple";import{classNames as f,mergeProps as v,UniqueComponentId as d,DomHandler as b,ObjectUtils as h,IconUtils as y}from"primereact/utils";import{ComponentBase as g}from"primereact/componentbase";function S(e){return S="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},S(e)}function N(e,t){if("object"!==S(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e){var t=N(e,"string");return"symbol"===S(t)?t:String(t)}function I(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(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 O(e){if(Array.isArray(e))return w(e)}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function P(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function j(){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 x(e){if(Array.isArray(e))return e}function k(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,l,c=[],u=!0,i=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){i=!0,a=e}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(i)throw a}}return c}}function T(){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 R(e,t){return x(e)||k(e,t)||P(e,t)||T()}var V=g.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 A(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 M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){I(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var D=e.memo((function(t){var r=t.template(t.item),n=f(t.className,"p-carousel-item",{"p-carousel-item-active":t.active,"p-carousel-item-start":t.start,"p-carousel-item-end":t.end}),a=t.ptm(t.className&&"p-carousel-item-cloned"===t.className?"itemCloned":"item"),o=v({className:n},a);return e.createElement("div",o,r)})),B=e.memo(e.forwardRef((function(g,S){var N=V.getProps(g),E=R(e.useState(N.numVisible),2),I=E[0],w=E[1],x=R(e.useState(N.numScroll),2),k=x[0],T=x[1],A=R(e.useState(N.page*N.numScroll*-1),2),B=A[0],H=A[1],L=R(e.useState(N.page),2),X=L[0],_=L[1],Y=V.setMetaData({props:N,state:{numVisible:I,numScroll:k,totalShiftedItems:B,page:X}}).ptm,z=e.useRef(null),J=e.useRef(null),F=e.useRef(0),U=e.useRef(!!N.autoplayInterval),W=e.useRef(""),$=e.useRef(20),q=e.useRef(null),G=e.useRef(null),K=e.useRef(null),Q=e.useRef(!1),Z=e.useRef(null),ee=n(k),te=n(I),re=n(N.value),ne=n(N.page),ae="vertical"===N.orientation,oe=N.circular||!!N.autoplayInterval,le=oe&&N.value&&N.value.length>=I,ce=N.value?Math.max(Math.ceil((N.value.length-I)/k)+1,0):0,ue=ce&&N.autoplayInterval&&U.current,ie=N.onPageChange&&!ue,se=ie?N.page:X,me=R(a({listener:function(){fe()},when:N.responsiveOptions}),1)[0],pe=function(e,t){var r=B;null!=t?(r=k*t*-1,le&&(r-=I),Q.current=!1):(r+=k*e,Q.current&&(r+=F.current-k*e,Q.current=!1),t=Math.abs(Math.floor((le?r+I:r)/k)));le&&X===ce-1&&-1===e?(r=-1*(N.value.length+I),t=0):le&&0===X&&1===e?(r=0,t=ce-1):t===ce-1&&F.current>0&&(r+=-1*F.current-k*e,Q.current=!0),J.current&&(b.removeClass(J.current,"p-items-hidden"),we(r),J.current.style.transition="transform 500ms ease 0s"),Oe(t),H(r)},fe=function(){if(J.current&&Z.current){for(var e=window.innerWidth,t={numVisible:N.numVisible,numScroll:N.numScroll},r=0;r<Z.current.length;r++){var n=Z.current[r];parseInt(n.breakpoint,10)>=e&&(t=n)}if(k!==t.numScroll){var a=Math.floor(se*k/t.numScroll),o=t.numScroll*a*-1;le&&(o-=t.numVisible),H(o),T(t.numScroll),Oe(a)}I!==t.numVisible&&w(t.numVisible)}},ve=function(e,t){(oe||0!==se)&&pe(1,t),U.current=!1,e.cancelable&&e.preventDefault()},de=function(e,t){(oe||se<ce-1)&&pe(-1,t),U.current=!1,e.cancelable&&e.preventDefault()},be=function(e,t){t>se?de(e,t):t<se&&ve(e,t)},he=function(e){J.current&&"transform"===e.propertyName&&(b.addClass(J.current,"p-items-hidden"),J.current.style.transition="",0!==X&&X!==ce-1||!le||we(B))},ye=function(e){var t=e.changedTouches[0];q.current={x:t.pageX,y:t.pageY}},ge=function(e){e.cancelable&&e.preventDefault()},Se=function(e){var t=e.changedTouches[0];Ne(e,ae?t.pageY-q.current.y:t.pageX-q.current.x)},Ne=function(e,t){Math.abs(t)>$&&(t<0?de(e):ve(e))},Ee=function(){G.current&&clearInterval(G.current)},Ie=function(){K.current||(K.current=b.createInlineStyle(t.nonce));var e,r="\n .p-carousel[".concat(W.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/I,"%\n }\n ");if(N.responsiveOptions){Z.current=O(e=N.responsiveOptions)||C(e)||P(e)||j(),Z.current.sort((function(e,r){return h.sort(e.breakpoint,r.breakpoint,-1,t.locale,t.nullSortOrder)}));for(var n=0;n<Z.current.length;n++){var a=Z.current[n];r+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(W.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}K.current.innerHTML=r},we=function(e){J.current&&(J.current.style.transform=ae?"translate3d(0, ".concat(e*(100/I),"%, 0)"):"translate3d(".concat(e*(100/I),"%, 0, 0)"))},Oe=function(e){!ie&&_(e),N.onPageChange&&N.onPageChange({page:e})};e.useImperativeHandle(S,(function(){return{props:N,getElement:function(){return z.current}}})),o((function(){z.current&&(W.current=d(),z.current.setAttribute(W.current,"")),Ie(),fe(),we(B),me()})),l((function(){var e=!1,t=B;if(N.autoplayInterval&&Ee(),ee!==k||te!==I||N.value&&re&&re.length!==N.value.length){F.current=(N.value.length-I)%k;var r=se;0!==ce&&r>=ce&&(Oe(r=ce-1),e=!0),t=r*k*-1,le&&(t-=I),r===ce-1&&F.current>0?(t+=-1*F.current+k,Q.current=!0):Q.current=!1,t!==B&&(H(t),e=!0),we(t)}le&&(0===X?t=-1*I:0===t&&(t=-1*N.value.length,F.current>0&&(Q.current=!0)),t!==B&&(H(t),e=!0)),ne!==N.page&&(N.page>ne&&N.page<=ce-1?pe(-1,N.page):N.page<ne&&pe(1,N.page)),!e&&ue&&(G.current=setInterval((function(){pe(-1,X===ce-1?0:X+1)}),N.autoplayInterval))})),c((function(){N.autoplayInterval&&Ee()}));var Ce=function(){if(N.value&&N.value.length){var t=null,r=null;if(le){var n=null;t=(n=N.value.slice(-1*I)).map((function(t,r){return e.createElement(D,{key:r+"_scloned",className:"p-carousel-item-cloned",template:N.itemTemplate,item:t,active:-1*B===N.value.length+I,start:0===r,end:r===n.length-1,ptm:Y})})),r=(n=N.value.slice(0,I)).map((function(t,r){return e.createElement(D,{key:r+"_fcloned",className:"p-carousel-item-cloned",template:N.itemTemplate,item:t,active:0===B,start:0===r,end:r===n.length-1,ptm:Y})}))}var a=N.value.map((function(t,r){var n=le?-1*(B+I):-1*B,a=n+I-1;return e.createElement(D,{key:r,template:N.itemTemplate,item:t,active:n<=r&&a>=r,start:n===r,end:a===r,ptm:Y})}));return e.createElement(e.Fragment,null,t,a,r)}},Pe=function(){if(N.showNavigators){var t=(!oe||N.value&&N.value.length<I)&&0===se,n=f("p-carousel-prev p-link",{"p-disabled":t}),a=v({className:"p-carousel-prev-icon"},Y("previousButtonIcon")),o=y.getJSXIcon(ae?N.prevIcon||e.createElement(m,a):N.prevIcon||e.createElement(i,a),M({},a),{props:N}),l=v({type:"button",className:n,onClick:function(e){return ve(e)},disabled:t,"aria-label":r("previousPageLabel")},Y("previousButton"));return e.createElement("button",l,o,e.createElement(p,null))}return null},je=function(){if(N.showNavigators){var t=(!oe||N.value&&N.value.length<I)&&(se===ce-1||0===ce),n=f("p-carousel-next p-link",{"p-disabled":t}),a=v({className:"p-carousel-next-icon"},Y("nextButtonIcon")),o=y.getJSXIcon(ae?N.nextIcon||e.createElement(u,a):N.nextIcon||e.createElement(s,a),M({},a),{props:N}),l=v({type:"button",className:n,onClick:function(e){return de(e)},disabled:t,"aria-label":r("nextPageLabel")},Y("nextButton"));return e.createElement("button",l,o,e.createElement(p,null))}return null},xe=function(t){var n="carousel-indicator-"+t,a=f("p-carousel-indicator",{"p-highlight":se===t}),o=v({key:n,className:a},Y("indicator")),l=v({type:"button",className:"p-link",onClick:function(e){return be(e,t)},"aria-label":"".concat(r("pageLabel")," ").concat(t+1)},Y("indicatorButton"));return e.createElement("li",o,e.createElement("button",l,e.createElement(p,null)))},ke=f("p-carousel p-component",{"p-carousel-vertical":ae,"p-carousel-horizontal":!ae},N.className),Te=f("p-carousel-content",N.contentClassName),Re=function(){var t=Ce(),r=ae?N.verticalViewPortHeight:"auto",n=Pe(),a=je(),o=f("p-carousel-container",N.containerClassName),l=v({className:"p-carousel-items-content",style:{height:r},onTouchStart:function(e){return ye(e)},onTouchMove:function(e){return ge(e)},onTouchEnd:function(e){return Se(e)}},Y("itemsContent")),c=v({className:o},Y("container")),u=v({ref:J,className:"p-carousel-items-container",onTransitionEnd:he},Y("itemsContainer"));return e.createElement("div",c,n,e.createElement("div",l,e.createElement("div",u,t)),a)}(),Ve=function(){if(N.showIndicators){for(var t=f("p-carousel-indicators p-reset",N.indicatorsContentClassName),r=[],n=0;n<ce;n++)r.push(xe(n));var a=v({className:t},Y("indicators"));return e.createElement("ul",a,r)}return null}(),Ae=function(){if(N.header){var t=v({className:"p-carousel-header"},Y("header"));return e.createElement("div",t,N.header)}return null}(),Me=function(){if(N.footer){var t=v({className:"p-carousel-footer"},Y("footer"));return e.createElement("div",t,N.footer)}return null}(),De=v({id:N.id,ref:z,className:ke,style:N.style},V.getOtherProps(N),Y("root")),Be=v({className:Te},Y("content"));return e.createElement("div",De,Ae,e.createElement("div",Be,Re,Ve),Me)})));D.displayName="CarouselItem",B.displayName="Carousel";export{B as Carousel};
|