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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/hooks"),r=require("primereact/utils");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/hooks"),r=require("primereact/utils"),n=require("primereact/componentbase");function o(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 u=o(e);function l(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 i(e){if(Array.isArray(e))return l(e)}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e,t){if(e){if("string"==typeof e)return l(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)?l(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 p(e){return p="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},p(e)}function f(e,t){if("object"!==p(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e){var t=f(e,"string");return"symbol"===p(t)?t:String(t)}function m(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){if(Array.isArray(e))return e}function g(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,l,i=[],c=!0,a=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=u.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(a)throw o}}return i}}function h(){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 v(e,t){return y(e)||g(e,t)||a(e,t)||h()}var b=n.ComponentBase.extend({defaultProps:{__TYPE:"Splitter",className:null,gutterSize:4,id:null,layout:"horizontal",onResizeEnd:null,stateKey:null,stateStorage:"session",style:null,children:void 0}}),S=n.ComponentBase.extend({defaultProps:{__TYPE:"SplitterPanel",className:null,minSize:null,size:null,style:null,children:void 0},getCProps:function(e){return r.ObjectUtils.getComponentProps(e,S.defaultProps)},getCOtherProps:function(e){return r.ObjectUtils.getComponentDiffProps(e,S.defaultProps)},getCProp:function(e,t){return r.ObjectUtils.getComponentProp(e,t,S.defaultProps)}});function O(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 P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(){},E=u.memo(u.forwardRef((function(e,n){var o=b.getProps(e),l=u.useRef(null),p=u.useRef(),f=u.useRef({}),d=u.useRef(null),m=u.useRef(null),y=u.useRef(null),g=u.useRef(null),h=u.useRef(null),O=u.useRef(null),w=u.useRef(null),E=u.useRef(null),j=u.useRef(null),z=u.useRef(null),D=v(u.useState([]),2),C=D[0],H=D[1],N=null!=o.stateKey,R=o.children&&o.children.length||1,x=function(e,t){return t in e?e[t]:o.children&&[].concat(o.children)[t].props.size||100/R},A={props:o,state:{panelSizes:C}},I=b.setMetaData(P({},A)),T=I.ptm,_=I.ptmo,k=function(e,t){return _(X(e,"pt"),t,{props:e.props,parent:A})},L=v(t.useEventListener({type:"mousemove",listener:function(e){return Q(e)}}),2),M=L[0],Y=L[1],B=v(t.useEventListener({type:"mouseup",listener:function(e){V(e),q()}}),2),K=B[0],U=B[1],q=function(){Y(),U()},X=function(e,t){return S.getCProp(e,t)},W=function(e,t){return!(e>100||e<0)&&(!(t>100||t<0)&&(!(o.children[z.current].props&&o.children[z.current].props.minSize&&o.children[z.current].props.minSize>e)&&!(o.children[z.current+1].props&&o.children[z.current+1].props.minSize&&o.children[z.current+1].props.minSize>t)))},J=u.useCallback((function(){switch(o.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(o.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}}),[o.stateStorage]),F=function(e){J().setItem(o.stateKey,JSON.stringify(e))},$=u.useCallback((function(){var e=J().getItem(o.stateKey);e&&H(JSON.parse(e))}),[J,o.stateKey]),G=function(e,t){p.current=f.current[t];var n="touchstart"===e.type?e.touches[0].pageX:e.pageX,u="touchstart"===e.type?e.touches[0].pageY:e.pageY;d.current="horizontal"===o.layout?r.DomHandler.getWidth(l.current):r.DomHandler.getHeight(l.current),m.current=!0,y.current="horizontal"===o.layout?n:u,g.current=p.current.previousElementSibling,h.current=p.current.nextElementSibling,O.current=100*("horizontal"===o.layout?r.DomHandler.getOuterWidth(g.current,!0):r.DomHandler.getOuterHeight(g.current,!0))/d.current,w.current=O.current,E.current=100*("horizontal"===o.layout?r.DomHandler.getOuterWidth(h.current,!0):r.DomHandler.getOuterHeight(h.current,!0))/d.current,j.current=E.current,z.current=t,r.DomHandler.addClass(p.current,"p-splitter-gutter-resizing"),r.DomHandler.addClass(l.current,"p-splitter-resizing")},Q=function(e){var t,r=O.current+(t="horizontal"===o.layout?100*("touchmove"===e.type?e.touches[0].pageX:e.pageX)/d.current-100*y.current/d.current:100*("touchmove"===e.type?e.touches[0].pageY:e.pageY)/d.current-100*y.current/d.current),n=E.current-t;W(r,n)&&(w.current=r,j.current=n,g.current.style.flexBasis="calc("+r+"% - "+(o.children.length-1)*o.gutterSize+"px)",h.current.style.flexBasis="calc("+n+"% - "+(o.children.length-1)*o.gutterSize+"px)")},V=function(e){H((function(t){for(var r=[],n=0;n<o.children.length;n++)r[n]=x(t,n);return r[z.current]=w.current,r[z.current+1]=j.current,o.onResizeEnd&&o.onResizeEnd({originalEvent:e,sizes:r}),N&&F(r),r})),r.DomHandler.removeClass(p.current,"p-splitter-gutter-resizing"),r.DomHandler.removeClass(l.current,"p-splitter-resizing"),m.current=!1,d.current=null,y.current=null,g.current=null,h.current=null,O.current=null,w.current=null,E.current=null,j.current=null,z.current=null},Z=function(e,t){G(e,t),M(),K()},ee=function(e,t){G(e,t),window.addEventListener("touchmove",te,{passive:!1,cancelable:!1}),window.addEventListener("touchend",re)},te=function(e){Q(e)},re=function e(t){V(t),window.removeEventListener("touchmove",te),window.removeEventListener("touchend",e)};u.useImperativeHandle(n,(function(){return{props:o,getElement:function(){return l.current}}})),u.useEffect((function(){var e;(e=l.current.children,i(e)||c(e)||a(e)||s()).filter((function(e){return r.DomHandler.hasClass(e,"p-splitter-panel")})).map((function(e){e.childNodes&&r.ObjectUtils.isNotEmpty(r.DomHandler.find(e,".p-splitter"))&&r.DomHandler.addClass(e,"p-splitter-panel-nested")}))}),[]),u.useEffect((function(){N&&$()}),[$,N]);var ne=function(e,t){var n=r.classNames("p-splitter-panel",X(e,"className")),l=r.mergeProps({ref:function(e){return f.current[t]=e},className:"p-splitter-gutter",style:"horizontal"===o.layout?{width:o.gutterSize+"px"}:{height:o.gutterSize+"px"},onMouseDown:function(e){return Z(e,t)},onTouchStart:function(e){return ee(e,t)},onTouchMove:function(e){return te(e)},onTouchEnd:function(e){return re(e)}},T("gutter")),i=r.mergeProps({className:"p-splitter-gutter-handle"},T("gutterHandler")),c=t!==o.children.length-1&&u.createElement("div",l,u.createElement("div",i)),a="calc("+x(C,t)+"% - "+(R-1)*o.gutterSize+"px)",s=r.mergeProps({key:t,className:n,style:P(P({},X(e,"style")),{},{flexBasis:a}),role:"presentation"},k(e,"root"));return u.createElement(u.Fragment,null,u.createElement("div",s,X(e,"children")),c)},oe=r.classNames("p-splitter p-component p-splitter-".concat(o.layout),o.className),ue=r.mergeProps({id:o.id,ref:l,style:o.style,className:oe},b.getOtherProps(o),T("root")),le=u.Children.map(o.children,ne);return u.createElement("div",ue,le)})));w.displayName="SplitterPanel",E.displayName="Splitter",exports.Splitter=E,exports.SplitterPanel=w;
|
package/splitter/splitter.d.ts
CHANGED
|
@@ -12,6 +12,28 @@
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
import * as React from 'react';
|
|
15
|
+
import { PassThroughType } from '../utils/utils';
|
|
16
|
+
|
|
17
|
+
export declare type SplitterPassThroughType<T> = PassThroughType<T, SplitterPassThroughMethodOptions>;
|
|
18
|
+
export declare type SplitterPanelPassThroughType<T> = PassThroughType<T, SplitterPanelPassThroughMethodOptions>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Custom passthrough(pt) option method.
|
|
22
|
+
*/
|
|
23
|
+
export interface SplitterPassThroughMethodOptions {
|
|
24
|
+
props: SplitterProps;
|
|
25
|
+
state: SplitterState;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Defines current inline state in Panel component.
|
|
30
|
+
*/
|
|
31
|
+
export interface SplitterState {
|
|
32
|
+
/**
|
|
33
|
+
* Previous size state as a number.
|
|
34
|
+
*/
|
|
35
|
+
panelSizes: number[];
|
|
36
|
+
}
|
|
15
37
|
|
|
16
38
|
/**
|
|
17
39
|
* Custom resize end event.
|
|
@@ -29,6 +51,44 @@ interface SplitterResizeEndEvent {
|
|
|
29
51
|
sizes: number[];
|
|
30
52
|
}
|
|
31
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Custom passthrough(pt) options.
|
|
56
|
+
* @see {@link PanelProps.pt}
|
|
57
|
+
*/
|
|
58
|
+
export interface SplitterPanelPassThroughOptions {
|
|
59
|
+
/**
|
|
60
|
+
* Uses to pass attributes to the root's DOM element.
|
|
61
|
+
*/
|
|
62
|
+
root?: SplitterPanelPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Custom passthrough(pt) option method.
|
|
67
|
+
*/
|
|
68
|
+
export interface SplitterPanelPassThroughMethodOptions {
|
|
69
|
+
props: SplitterPanelProps;
|
|
70
|
+
parent: SplitterPassThroughMethodOptions;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Custom passthrough(pt) options.
|
|
75
|
+
* @see {@link SplitterProps.pt}
|
|
76
|
+
*/
|
|
77
|
+
export interface SplitterPassThroughOptions {
|
|
78
|
+
/**
|
|
79
|
+
* Uses to pass attributes to the root's DOM element.
|
|
80
|
+
*/
|
|
81
|
+
root?: SplitterPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
82
|
+
/**
|
|
83
|
+
* Uses to pass attributes to the gutter's DOM element.
|
|
84
|
+
*/
|
|
85
|
+
gutter?: SplitterPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
86
|
+
/**
|
|
87
|
+
* Uses to pass attributes to the gutter handler's DOM element.
|
|
88
|
+
*/
|
|
89
|
+
gutterHandler?: SplitterPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
90
|
+
}
|
|
91
|
+
|
|
32
92
|
/**
|
|
33
93
|
* Defines valid properties in SplitterPanel component.
|
|
34
94
|
* @group Properties
|
package/splitter/splitter.esm.js
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useEventListener } from 'primereact/hooks';
|
|
3
|
-
import { ObjectUtils, DomHandler, classNames } from 'primereact/utils';
|
|
3
|
+
import { ObjectUtils, DomHandler, classNames, mergeProps } from 'primereact/utils';
|
|
4
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
4
5
|
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
function _arrayLikeToArray(arr, len) {
|
|
7
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
8
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
9
|
+
return arr2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function _arrayWithoutHoles(arr) {
|
|
13
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function _iterableToArray(iter) {
|
|
17
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
21
|
+
if (!o) return;
|
|
22
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
23
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
24
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
25
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
26
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function _nonIterableSpread() {
|
|
30
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _toConsumableArray(arr) {
|
|
34
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
18
35
|
}
|
|
19
36
|
|
|
20
37
|
function _typeof(obj) {
|
|
@@ -58,37 +75,6 @@ function _defineProperty(obj, key, value) {
|
|
|
58
75
|
return obj;
|
|
59
76
|
}
|
|
60
77
|
|
|
61
|
-
function _arrayLikeToArray(arr, len) {
|
|
62
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
63
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
64
|
-
return arr2;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function _arrayWithoutHoles(arr) {
|
|
68
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function _iterableToArray(iter) {
|
|
72
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
76
|
-
if (!o) return;
|
|
77
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
78
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
79
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
80
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
81
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _nonIterableSpread() {
|
|
85
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _toConsumableArray(arr) {
|
|
89
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
90
|
-
}
|
|
91
|
-
|
|
92
78
|
function _arrayWithHoles(arr) {
|
|
93
79
|
if (Array.isArray(arr)) return arr;
|
|
94
80
|
}
|
|
@@ -129,7 +115,7 @@ function _slicedToArray(arr, i) {
|
|
|
129
115
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
130
116
|
}
|
|
131
117
|
|
|
132
|
-
var SplitterBase = {
|
|
118
|
+
var SplitterBase = ComponentBase.extend({
|
|
133
119
|
defaultProps: {
|
|
134
120
|
__TYPE: 'Splitter',
|
|
135
121
|
className: null,
|
|
@@ -141,15 +127,9 @@ var SplitterBase = {
|
|
|
141
127
|
stateStorage: 'session',
|
|
142
128
|
style: null,
|
|
143
129
|
children: undefined
|
|
144
|
-
},
|
|
145
|
-
getProps: function getProps(props) {
|
|
146
|
-
return ObjectUtils.getMergedProps(props, SplitterBase.defaultProps);
|
|
147
|
-
},
|
|
148
|
-
getOtherProps: function getOtherProps(props) {
|
|
149
|
-
return ObjectUtils.getDiffProps(props, SplitterBase.defaultProps);
|
|
150
130
|
}
|
|
151
|
-
};
|
|
152
|
-
var SplitterPanelBase = {
|
|
131
|
+
});
|
|
132
|
+
var SplitterPanelBase = ComponentBase.extend({
|
|
153
133
|
defaultProps: {
|
|
154
134
|
__TYPE: 'SplitterPanel',
|
|
155
135
|
className: null,
|
|
@@ -167,7 +147,7 @@ var SplitterPanelBase = {
|
|
|
167
147
|
getCProp: function getCProp(panel, name) {
|
|
168
148
|
return ObjectUtils.getComponentProp(panel, name, SplitterPanelBase.defaultProps);
|
|
169
149
|
}
|
|
170
|
-
};
|
|
150
|
+
});
|
|
171
151
|
|
|
172
152
|
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; }
|
|
173
153
|
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; }
|
|
@@ -196,6 +176,21 @@ var Splitter = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
196
176
|
var panelSize = function panelSize(sizes, index) {
|
|
197
177
|
return index in sizes ? sizes[index] : props.children && [].concat(props.children)[index].props.size || 100 / childrenLength;
|
|
198
178
|
};
|
|
179
|
+
var metaData = {
|
|
180
|
+
props: props,
|
|
181
|
+
state: {
|
|
182
|
+
panelSizes: panelSizes
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
var _SplitterBase$setMeta = SplitterBase.setMetaData(_objectSpread({}, metaData)),
|
|
186
|
+
ptm = _SplitterBase$setMeta.ptm,
|
|
187
|
+
ptmo = _SplitterBase$setMeta.ptmo;
|
|
188
|
+
var getPanelPT = function getPanelPT(panel, key) {
|
|
189
|
+
return ptmo(getPanelProp(panel, 'pt'), key, {
|
|
190
|
+
props: panel.props,
|
|
191
|
+
parent: metaData
|
|
192
|
+
});
|
|
193
|
+
};
|
|
199
194
|
var _useEventListener = useEventListener({
|
|
200
195
|
type: 'mousemove',
|
|
201
196
|
listener: function listener(event) {
|
|
@@ -358,18 +353,17 @@ var Splitter = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
358
353
|
if (isStateful) restoreState();
|
|
359
354
|
}, [restoreState, isStateful]);
|
|
360
355
|
var createPanel = function createPanel(panel, index) {
|
|
361
|
-
var otherProps = SplitterPanelBase.getCOtherProps(panel);
|
|
362
356
|
var panelClassName = classNames('p-splitter-panel', getPanelProp(panel, 'className'));
|
|
363
357
|
var gutterStyle = props.layout === 'horizontal' ? {
|
|
364
358
|
width: props.gutterSize + 'px'
|
|
365
359
|
} : {
|
|
366
360
|
height: props.gutterSize + 'px'
|
|
367
361
|
};
|
|
368
|
-
var
|
|
362
|
+
var gutterProps = mergeProps({
|
|
369
363
|
ref: function ref(el) {
|
|
370
364
|
return gutterRefs.current[index] = el;
|
|
371
365
|
},
|
|
372
|
-
className:
|
|
366
|
+
className: 'p-splitter-gutter',
|
|
373
367
|
style: gutterStyle,
|
|
374
368
|
onMouseDown: function onMouseDown(event) {
|
|
375
369
|
return onGutterMouseDown(event, index);
|
|
@@ -383,30 +377,34 @@ var Splitter = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
383
377
|
onTouchEnd: function onTouchEnd(event) {
|
|
384
378
|
return onGutterTouchEnd(event);
|
|
385
379
|
}
|
|
386
|
-
},
|
|
387
|
-
|
|
388
|
-
|
|
380
|
+
}, ptm('gutter'));
|
|
381
|
+
var gutterHandlerProps = mergeProps({
|
|
382
|
+
className: 'p-splitter-gutter-handle'
|
|
383
|
+
}, ptm('gutterHandler'));
|
|
384
|
+
var gutter = index !== props.children.length - 1 && /*#__PURE__*/React.createElement("div", gutterProps, /*#__PURE__*/React.createElement("div", gutterHandlerProps));
|
|
389
385
|
var flexBasis = 'calc(' + panelSize(panelSizes, index) + '% - ' + (childrenLength - 1) * props.gutterSize + 'px)';
|
|
390
|
-
|
|
386
|
+
var rootProps = mergeProps({
|
|
391
387
|
key: index,
|
|
392
388
|
className: panelClassName,
|
|
393
389
|
style: _objectSpread(_objectSpread({}, getPanelProp(panel, 'style')), {}, {
|
|
394
390
|
flexBasis: flexBasis
|
|
395
|
-
})
|
|
396
|
-
|
|
391
|
+
}),
|
|
392
|
+
role: 'presentation'
|
|
393
|
+
}, getPanelPT(panel, 'root'));
|
|
394
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, getPanelProp(panel, 'children')), gutter);
|
|
397
395
|
};
|
|
398
396
|
var createPanels = function createPanels() {
|
|
399
397
|
return React.Children.map(props.children, createPanel);
|
|
400
398
|
};
|
|
401
|
-
var otherProps = SplitterBase.getOtherProps(props);
|
|
402
399
|
var className = classNames("p-splitter p-component p-splitter-".concat(props.layout), props.className);
|
|
403
|
-
var
|
|
404
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
405
|
-
ref: elementRef,
|
|
400
|
+
var rootProps = mergeProps({
|
|
406
401
|
id: props.id,
|
|
407
|
-
|
|
408
|
-
style: props.style
|
|
409
|
-
|
|
402
|
+
ref: elementRef,
|
|
403
|
+
style: props.style,
|
|
404
|
+
className: className
|
|
405
|
+
}, SplitterBase.getOtherProps(props), ptm('root'));
|
|
406
|
+
var panels = createPanels();
|
|
407
|
+
return /*#__PURE__*/React.createElement("div", rootProps, panels);
|
|
410
408
|
}));
|
|
411
409
|
SplitterPanel.displayName = 'SplitterPanel';
|
|
412
410
|
Splitter.displayName = 'Splitter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useEventListener as t}from"primereact/hooks";import{ObjectUtils as r,DomHandler as n,classNames as u}from"primereact/utils";function
|
|
1
|
+
import*as e from"react";import{useEventListener as t}from"primereact/hooks";import{ObjectUtils as r,DomHandler as n,classNames as u,mergeProps as o}from"primereact/utils";import{ComponentBase as l}from"primereact/componentbase";function i(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 c(e){if(Array.isArray(e))return i(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}function p(){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 f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e){var t=d(e,"string");return"symbol"===f(t)?t:String(t)}function y(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){if(Array.isArray(e))return e}function g(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,u,o,l,i=[],c=!0,a=!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)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){a=!0,u=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(a)throw u}}return i}}function v(){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 b(e,t){return h(e)||g(e,t)||s(e,t)||v()}var S=l.extend({defaultProps:{__TYPE:"Splitter",className:null,gutterSize:4,id:null,layout:"horizontal",onResizeEnd:null,stateKey:null,stateStorage:"session",style:null,children:void 0}}),w=l.extend({defaultProps:{__TYPE:"SplitterPanel",className:null,minSize:null,size:null,style:null,children:void 0},getCProps:function(e){return r.getComponentProps(e,w.defaultProps)},getCOtherProps:function(e){return r.getComponentDiffProps(e,w.defaultProps)},getCProp:function(e,t){return r.getComponentProp(e,t,w.defaultProps)}});function O(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P=function(){},E=e.memo(e.forwardRef((function(l,i){var f=S.getProps(l),d=e.useRef(null),m=e.useRef(),y=e.useRef({}),h=e.useRef(null),g=e.useRef(null),v=e.useRef(null),O=e.useRef(null),P=e.useRef(null),E=e.useRef(null),j=e.useRef(null),C=e.useRef(null),R=e.useRef(null),N=e.useRef(null),x=b(e.useState([]),2),A=x[0],I=x[1],T=null!=f.stateKey,D=f.children&&f.children.length||1,Y=function(e,t){return t in e?e[t]:f.children&&[].concat(f.children)[t].props.size||100/D},k={props:f,state:{panelSizes:A}},H=S.setMetaData(z({},k)),K=H.ptm,L=H.ptmo,M=function(e,t){return L($(e,"pt"),t,{props:e.props,parent:k})},X=b(t({type:"mousemove",listener:function(e){return ee(e)}}),2),_=X[0],B=X[1],W=b(t({type:"mouseup",listener:function(e){te(e),U()}}),2),J=W[0],F=W[1],U=function(){B(),F()},$=function(e,t){return w.getCProp(e,t)},q=function(e,t){return!(e>100||e<0)&&(!(t>100||t<0)&&(!(f.children[N.current].props&&f.children[N.current].props.minSize&&f.children[N.current].props.minSize>e)&&!(f.children[N.current+1].props&&f.children[N.current+1].props.minSize&&f.children[N.current+1].props.minSize>t)))},G=e.useCallback((function(){switch(f.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(f.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}}),[f.stateStorage]),Q=function(e){G().setItem(f.stateKey,JSON.stringify(e))},V=e.useCallback((function(){var e=G().getItem(f.stateKey);e&&I(JSON.parse(e))}),[G,f.stateKey]),Z=function(e,t){m.current=y.current[t];var r="touchstart"===e.type?e.touches[0].pageX:e.pageX,u="touchstart"===e.type?e.touches[0].pageY:e.pageY;h.current="horizontal"===f.layout?n.getWidth(d.current):n.getHeight(d.current),g.current=!0,v.current="horizontal"===f.layout?r:u,O.current=m.current.previousElementSibling,P.current=m.current.nextElementSibling,E.current=100*("horizontal"===f.layout?n.getOuterWidth(O.current,!0):n.getOuterHeight(O.current,!0))/h.current,j.current=E.current,C.current=100*("horizontal"===f.layout?n.getOuterWidth(P.current,!0):n.getOuterHeight(P.current,!0))/h.current,R.current=C.current,N.current=t,n.addClass(m.current,"p-splitter-gutter-resizing"),n.addClass(d.current,"p-splitter-resizing")},ee=function(e){var t,r=E.current+(t="horizontal"===f.layout?100*("touchmove"===e.type?e.touches[0].pageX:e.pageX)/h.current-100*v.current/h.current:100*("touchmove"===e.type?e.touches[0].pageY:e.pageY)/h.current-100*v.current/h.current),n=C.current-t;q(r,n)&&(j.current=r,R.current=n,O.current.style.flexBasis="calc("+r+"% - "+(f.children.length-1)*f.gutterSize+"px)",P.current.style.flexBasis="calc("+n+"% - "+(f.children.length-1)*f.gutterSize+"px)")},te=function(e){I((function(t){for(var r=[],n=0;n<f.children.length;n++)r[n]=Y(t,n);return r[N.current]=j.current,r[N.current+1]=R.current,f.onResizeEnd&&f.onResizeEnd({originalEvent:e,sizes:r}),T&&Q(r),r})),n.removeClass(m.current,"p-splitter-gutter-resizing"),n.removeClass(d.current,"p-splitter-resizing"),g.current=!1,h.current=null,v.current=null,O.current=null,P.current=null,E.current=null,j.current=null,C.current=null,R.current=null,N.current=null},re=function(e,t){Z(e,t),_(),J()},ne=function(e,t){Z(e,t),window.addEventListener("touchmove",ue,{passive:!1,cancelable:!1}),window.addEventListener("touchend",oe)},ue=function(e){ee(e)},oe=function e(t){te(t),window.removeEventListener("touchmove",ue),window.removeEventListener("touchend",e)};e.useImperativeHandle(i,(function(){return{props:f,getElement:function(){return d.current}}})),e.useEffect((function(){var e;(e=d.current.children,c(e)||a(e)||s(e)||p()).filter((function(e){return n.hasClass(e,"p-splitter-panel")})).map((function(e){e.childNodes&&r.isNotEmpty(n.find(e,".p-splitter"))&&n.addClass(e,"p-splitter-panel-nested")}))}),[]),e.useEffect((function(){T&&V()}),[V,T]);var le=function(t,r){var n=u("p-splitter-panel",$(t,"className")),l=o({ref:function(e){return y.current[r]=e},className:"p-splitter-gutter",style:"horizontal"===f.layout?{width:f.gutterSize+"px"}:{height:f.gutterSize+"px"},onMouseDown:function(e){return re(e,r)},onTouchStart:function(e){return ne(e,r)},onTouchMove:function(e){return ue(e)},onTouchEnd:function(e){return oe(e)}},K("gutter")),i=o({className:"p-splitter-gutter-handle"},K("gutterHandler")),c=r!==f.children.length-1&&e.createElement("div",l,e.createElement("div",i)),a="calc("+Y(A,r)+"% - "+(D-1)*f.gutterSize+"px)",s=o({key:r,className:n,style:z(z({},$(t,"style")),{},{flexBasis:a}),role:"presentation"},M(t,"root"));return e.createElement(e.Fragment,null,e.createElement("div",s,$(t,"children")),c)},ie=u("p-splitter p-component p-splitter-".concat(f.layout),f.className),ce=o({id:f.id,ref:d,style:f.style,className:ie},S.getOtherProps(f),K("root")),ae=e.Children.map(f.children,le);return e.createElement("div",ce,ae)})));P.displayName="SplitterPanel",E.displayName="Splitter";export{E as Splitter,P as SplitterPanel};
|
package/splitter/splitter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
2
|
+
this.primereact.splitter = (function (exports, React, hooks, utils, componentbase) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -22,19 +22,35 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
22
22
|
|
|
23
23
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
24
24
|
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
function _arrayLikeToArray(arr, len) {
|
|
26
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
27
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
28
|
+
return arr2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function _arrayWithoutHoles(arr) {
|
|
32
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function _iterableToArray(iter) {
|
|
36
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
40
|
+
if (!o) return;
|
|
41
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
42
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
43
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
44
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
45
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _nonIterableSpread() {
|
|
49
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _toConsumableArray(arr) {
|
|
53
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
38
54
|
}
|
|
39
55
|
|
|
40
56
|
function _typeof(obj) {
|
|
@@ -78,37 +94,6 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
78
94
|
return obj;
|
|
79
95
|
}
|
|
80
96
|
|
|
81
|
-
function _arrayLikeToArray(arr, len) {
|
|
82
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
83
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
84
|
-
return arr2;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function _arrayWithoutHoles(arr) {
|
|
88
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function _iterableToArray(iter) {
|
|
92
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
96
|
-
if (!o) return;
|
|
97
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
98
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
99
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
100
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
101
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _nonIterableSpread() {
|
|
105
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _toConsumableArray(arr) {
|
|
109
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
97
|
function _arrayWithHoles(arr) {
|
|
113
98
|
if (Array.isArray(arr)) return arr;
|
|
114
99
|
}
|
|
@@ -149,7 +134,7 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
149
134
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
150
135
|
}
|
|
151
136
|
|
|
152
|
-
var SplitterBase = {
|
|
137
|
+
var SplitterBase = componentbase.ComponentBase.extend({
|
|
153
138
|
defaultProps: {
|
|
154
139
|
__TYPE: 'Splitter',
|
|
155
140
|
className: null,
|
|
@@ -161,15 +146,9 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
161
146
|
stateStorage: 'session',
|
|
162
147
|
style: null,
|
|
163
148
|
children: undefined
|
|
164
|
-
},
|
|
165
|
-
getProps: function getProps(props) {
|
|
166
|
-
return utils.ObjectUtils.getMergedProps(props, SplitterBase.defaultProps);
|
|
167
|
-
},
|
|
168
|
-
getOtherProps: function getOtherProps(props) {
|
|
169
|
-
return utils.ObjectUtils.getDiffProps(props, SplitterBase.defaultProps);
|
|
170
149
|
}
|
|
171
|
-
};
|
|
172
|
-
var SplitterPanelBase = {
|
|
150
|
+
});
|
|
151
|
+
var SplitterPanelBase = componentbase.ComponentBase.extend({
|
|
173
152
|
defaultProps: {
|
|
174
153
|
__TYPE: 'SplitterPanel',
|
|
175
154
|
className: null,
|
|
@@ -187,7 +166,7 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
187
166
|
getCProp: function getCProp(panel, name) {
|
|
188
167
|
return utils.ObjectUtils.getComponentProp(panel, name, SplitterPanelBase.defaultProps);
|
|
189
168
|
}
|
|
190
|
-
};
|
|
169
|
+
});
|
|
191
170
|
|
|
192
171
|
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; }
|
|
193
172
|
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; }
|
|
@@ -216,6 +195,21 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
216
195
|
var panelSize = function panelSize(sizes, index) {
|
|
217
196
|
return index in sizes ? sizes[index] : props.children && [].concat(props.children)[index].props.size || 100 / childrenLength;
|
|
218
197
|
};
|
|
198
|
+
var metaData = {
|
|
199
|
+
props: props,
|
|
200
|
+
state: {
|
|
201
|
+
panelSizes: panelSizes
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
var _SplitterBase$setMeta = SplitterBase.setMetaData(_objectSpread({}, metaData)),
|
|
205
|
+
ptm = _SplitterBase$setMeta.ptm,
|
|
206
|
+
ptmo = _SplitterBase$setMeta.ptmo;
|
|
207
|
+
var getPanelPT = function getPanelPT(panel, key) {
|
|
208
|
+
return ptmo(getPanelProp(panel, 'pt'), key, {
|
|
209
|
+
props: panel.props,
|
|
210
|
+
parent: metaData
|
|
211
|
+
});
|
|
212
|
+
};
|
|
219
213
|
var _useEventListener = hooks.useEventListener({
|
|
220
214
|
type: 'mousemove',
|
|
221
215
|
listener: function listener(event) {
|
|
@@ -378,18 +372,17 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
378
372
|
if (isStateful) restoreState();
|
|
379
373
|
}, [restoreState, isStateful]);
|
|
380
374
|
var createPanel = function createPanel(panel, index) {
|
|
381
|
-
var otherProps = SplitterPanelBase.getCOtherProps(panel);
|
|
382
375
|
var panelClassName = utils.classNames('p-splitter-panel', getPanelProp(panel, 'className'));
|
|
383
376
|
var gutterStyle = props.layout === 'horizontal' ? {
|
|
384
377
|
width: props.gutterSize + 'px'
|
|
385
378
|
} : {
|
|
386
379
|
height: props.gutterSize + 'px'
|
|
387
380
|
};
|
|
388
|
-
var
|
|
381
|
+
var gutterProps = utils.mergeProps({
|
|
389
382
|
ref: function ref(el) {
|
|
390
383
|
return gutterRefs.current[index] = el;
|
|
391
384
|
},
|
|
392
|
-
className:
|
|
385
|
+
className: 'p-splitter-gutter',
|
|
393
386
|
style: gutterStyle,
|
|
394
387
|
onMouseDown: function onMouseDown(event) {
|
|
395
388
|
return onGutterMouseDown(event, index);
|
|
@@ -403,30 +396,34 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
403
396
|
onTouchEnd: function onTouchEnd(event) {
|
|
404
397
|
return onGutterTouchEnd(event);
|
|
405
398
|
}
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
|
|
399
|
+
}, ptm('gutter'));
|
|
400
|
+
var gutterHandlerProps = utils.mergeProps({
|
|
401
|
+
className: 'p-splitter-gutter-handle'
|
|
402
|
+
}, ptm('gutterHandler'));
|
|
403
|
+
var gutter = index !== props.children.length - 1 && /*#__PURE__*/React__namespace.createElement("div", gutterProps, /*#__PURE__*/React__namespace.createElement("div", gutterHandlerProps));
|
|
409
404
|
var flexBasis = 'calc(' + panelSize(panelSizes, index) + '% - ' + (childrenLength - 1) * props.gutterSize + 'px)';
|
|
410
|
-
|
|
405
|
+
var rootProps = utils.mergeProps({
|
|
411
406
|
key: index,
|
|
412
407
|
className: panelClassName,
|
|
413
408
|
style: _objectSpread(_objectSpread({}, getPanelProp(panel, 'style')), {}, {
|
|
414
409
|
flexBasis: flexBasis
|
|
415
|
-
})
|
|
416
|
-
|
|
410
|
+
}),
|
|
411
|
+
role: 'presentation'
|
|
412
|
+
}, getPanelPT(panel, 'root'));
|
|
413
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, getPanelProp(panel, 'children')), gutter);
|
|
417
414
|
};
|
|
418
415
|
var createPanels = function createPanels() {
|
|
419
416
|
return React__namespace.Children.map(props.children, createPanel);
|
|
420
417
|
};
|
|
421
|
-
var otherProps = SplitterBase.getOtherProps(props);
|
|
422
418
|
var className = utils.classNames("p-splitter p-component p-splitter-".concat(props.layout), props.className);
|
|
423
|
-
var
|
|
424
|
-
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
425
|
-
ref: elementRef,
|
|
419
|
+
var rootProps = utils.mergeProps({
|
|
426
420
|
id: props.id,
|
|
427
|
-
|
|
428
|
-
style: props.style
|
|
429
|
-
|
|
421
|
+
ref: elementRef,
|
|
422
|
+
style: props.style,
|
|
423
|
+
className: className
|
|
424
|
+
}, SplitterBase.getOtherProps(props), ptm('root'));
|
|
425
|
+
var panels = createPanels();
|
|
426
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, panels);
|
|
430
427
|
}));
|
|
431
428
|
SplitterPanel.displayName = 'SplitterPanel';
|
|
432
429
|
Splitter.displayName = 'Splitter';
|
|
@@ -438,4 +435,4 @@ this.primereact.splitter = (function (exports, React, hooks, utils) {
|
|
|
438
435
|
|
|
439
436
|
return exports;
|
|
440
437
|
|
|
441
|
-
})({}, React, primereact.hooks, primereact.utils);
|
|
438
|
+
})({}, React, primereact.hooks, primereact.utils, primereact.componentbase);
|