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
|
@@ -19,11 +19,24 @@ import { FormEvent } from '../ts-helpers';
|
|
|
19
19
|
*/
|
|
20
20
|
interface RadioButtonChangeEvent extends FormEvent {}
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Custom click event.
|
|
24
|
+
* @see {@link RadioButtonProps.onClick}
|
|
25
|
+
* @extends {FormEvent}
|
|
26
|
+
* @event
|
|
27
|
+
*/
|
|
28
|
+
interface RadioButtonClickEvent extends FormEvent {}
|
|
29
|
+
|
|
22
30
|
/**
|
|
23
31
|
* Defines valid properties in RadioButton component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
24
32
|
* @group Properties
|
|
25
33
|
*/
|
|
26
|
-
export interface RadioButtonProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange' | 'ref'> {
|
|
34
|
+
export interface RadioButtonProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange' | 'onClick' | 'ref'> {
|
|
35
|
+
/**
|
|
36
|
+
* When present, it specifies that the component should automatically get focus on load.
|
|
37
|
+
* @defaultValue false
|
|
38
|
+
*/
|
|
39
|
+
autoFocus?: boolean | undefined;
|
|
27
40
|
/**
|
|
28
41
|
* Reference of the input element.
|
|
29
42
|
*/
|
|
@@ -68,6 +81,11 @@ export interface RadioButtonProps extends Omit<React.DetailedHTMLProps<React.Inp
|
|
|
68
81
|
* @param {RadioButtonChangeEvent} event - Custom change event.
|
|
69
82
|
*/
|
|
70
83
|
onChange?(event: RadioButtonChangeEvent): void;
|
|
84
|
+
/**
|
|
85
|
+
* Callback to invoke on click. Mark the event with preventDefault to prevent the option from changing.
|
|
86
|
+
* @param {RadioButtonClickEvent} event - Custom click event.
|
|
87
|
+
*/
|
|
88
|
+
onClick?(event: RadioButtonClickEvent): void;
|
|
71
89
|
/**
|
|
72
90
|
* Used to get the child elements of the component.
|
|
73
91
|
* @readonly
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useMountEffect } from 'primereact/hooks';
|
|
2
3
|
import { Tooltip } from 'primereact/tooltip';
|
|
3
4
|
import { ObjectUtils, DomHandler, classNames } from 'primereact/utils';
|
|
4
5
|
|
|
@@ -75,20 +76,22 @@ function _slicedToArray(arr, i) {
|
|
|
75
76
|
var RadioButtonBase = {
|
|
76
77
|
defaultProps: {
|
|
77
78
|
__TYPE: 'RadioButton',
|
|
78
|
-
|
|
79
|
-
inputRef: null,
|
|
80
|
-
inputId: null,
|
|
81
|
-
name: null,
|
|
82
|
-
value: null,
|
|
79
|
+
autoFocus: false,
|
|
83
80
|
checked: false,
|
|
84
|
-
style: null,
|
|
85
81
|
className: null,
|
|
86
82
|
disabled: false,
|
|
83
|
+
id: null,
|
|
84
|
+
inputId: null,
|
|
85
|
+
inputRef: null,
|
|
86
|
+
name: null,
|
|
87
|
+
onChange: null,
|
|
88
|
+
onClick: null,
|
|
87
89
|
required: false,
|
|
90
|
+
style: null,
|
|
88
91
|
tabIndex: null,
|
|
89
92
|
tooltip: null,
|
|
90
93
|
tooltipOptions: null,
|
|
91
|
-
|
|
94
|
+
value: null,
|
|
92
95
|
children: undefined
|
|
93
96
|
},
|
|
94
97
|
getProps: function getProps(props) {
|
|
@@ -107,24 +110,31 @@ var RadioButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
107
110
|
setFocusedState = _React$useState2[1];
|
|
108
111
|
var elementRef = React.useRef(null);
|
|
109
112
|
var inputRef = React.useRef(props.inputRef);
|
|
110
|
-
var select = function select(
|
|
111
|
-
onClick(
|
|
113
|
+
var select = function select(event) {
|
|
114
|
+
onClick(event);
|
|
112
115
|
};
|
|
113
|
-
var onClick = function onClick(
|
|
114
|
-
if (
|
|
116
|
+
var onClick = function onClick(event) {
|
|
117
|
+
if (props.disabled) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (props.onChange || props.onClick) {
|
|
115
121
|
var checked = props.checked;
|
|
116
|
-
var radioClicked =
|
|
117
|
-
var inputClicked =
|
|
118
|
-
var isInputToggled = inputClicked &&
|
|
122
|
+
var radioClicked = event.target instanceof HTMLDivElement;
|
|
123
|
+
var inputClicked = event.target === inputRef.current;
|
|
124
|
+
var isInputToggled = inputClicked && event.target.checked !== checked;
|
|
119
125
|
var isRadioToggled = radioClicked && (DomHandler.hasClass(elementRef.current, 'p-radiobutton-checked') === checked ? !checked : false);
|
|
120
126
|
if (isInputToggled || isRadioToggled) {
|
|
121
127
|
var value = !checked;
|
|
122
|
-
|
|
123
|
-
originalEvent:
|
|
128
|
+
var eventData = {
|
|
129
|
+
originalEvent: event,
|
|
124
130
|
value: props.value,
|
|
125
131
|
checked: value,
|
|
126
|
-
stopPropagation: function stopPropagation() {
|
|
127
|
-
|
|
132
|
+
stopPropagation: function stopPropagation() {
|
|
133
|
+
event.stopPropagation();
|
|
134
|
+
},
|
|
135
|
+
preventDefault: function preventDefault() {
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
},
|
|
128
138
|
target: {
|
|
129
139
|
type: 'radio',
|
|
130
140
|
name: props.name,
|
|
@@ -132,13 +142,20 @@ var RadioButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
132
142
|
value: props.value,
|
|
133
143
|
checked: value
|
|
134
144
|
}
|
|
135
|
-
}
|
|
145
|
+
};
|
|
146
|
+
props.onClick && props.onClick(eventData);
|
|
147
|
+
|
|
148
|
+
// do not continue if the user defined click wants to prevent
|
|
149
|
+
if (event.defaultPrevented) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
props.onChange && props.onChange(eventData);
|
|
136
153
|
if (isRadioToggled) {
|
|
137
154
|
inputRef.current.checked = value;
|
|
138
155
|
}
|
|
139
156
|
}
|
|
140
157
|
DomHandler.focus(inputRef.current);
|
|
141
|
-
|
|
158
|
+
event.preventDefault();
|
|
142
159
|
}
|
|
143
160
|
};
|
|
144
161
|
var onFocus = function onFocus() {
|
|
@@ -161,6 +178,11 @@ var RadioButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
161
178
|
React.useEffect(function () {
|
|
162
179
|
ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
163
180
|
}, [inputRef, props.inputRef]);
|
|
181
|
+
useMountEffect(function () {
|
|
182
|
+
if (props.autoFocus) {
|
|
183
|
+
DomHandler.focus(inputRef.current, props.autoFocus);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
164
186
|
React.useImperativeHandle(ref, function () {
|
|
165
187
|
return {
|
|
166
188
|
props: props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{
|
|
1
|
+
import*as e from"react";import{useMountEffect as t}from"primereact/hooks";import{Tooltip as n}from"primereact/tooltip";import{ObjectUtils as r,DomHandler as o,classNames as a}from"primereact/utils";function u(){return u=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},u.apply(this,arguments)}function i(e){if(Array.isArray(e))return e}function c(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,u,i=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return i}}function l(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 d(e,t){if(e){if("string"==typeof e)return l(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)?l(e,t):void 0}}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f={defaultProps:{__TYPE:"RadioButton",autoFocus:!1,checked:!1,className:null,disabled:!1,id:null,inputId:null,inputRef:null,name:null,onChange:null,onClick:null,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},getProps:function(e){return r.getMergedProps(e,f.defaultProps)},getOtherProps:function(e){return r.getDiffProps(e,f.defaultProps)}},p=e.memo(e.forwardRef((function(l,p){var m,h,b=f.getProps(l),g=e.useState(!1),v=(h=2,i(m=g)||c(m,h)||d(m,h)||s()),y=v[0],k=v[1],P=e.useRef(null),E=e.useRef(b.inputRef),O=function(e){C(e)},C=function(e){if(!b.disabled&&(b.onChange||b.onClick)){var t=b.checked,n=e.target instanceof HTMLDivElement,r=e.target===E.current&&e.target.checked!==t,a=n&&o.hasClass(P.current,"p-radiobutton-checked")===t&&!t;if(r||a){var u=!t,i={originalEvent:e,value:b.value,checked:u,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{type:"radio",name:b.name,id:b.id,value:b.value,checked:u}};if(b.onClick&&b.onClick(i),e.defaultPrevented)return;b.onChange&&b.onChange(i),a&&(E.current.checked=u)}o.focus(E.current),e.preventDefault()}};e.useEffect((function(){E.current&&(E.current.checked=b.checked)}),[b.checked]),e.useEffect((function(){r.combinedRefs(E,b.inputRef)}),[E,b.inputRef]),t((function(){b.autoFocus&&o.focus(E.current,b.autoFocus)})),e.useImperativeHandle(p,(function(){return{props:b,select:O,focus:function(){return o.focus(E.current)},getElement:function(){return P.current},getInput:function(){return E.current}}}));var R=r.isNotEmpty(b.tooltip),I=f.getOtherProps(b),j=r.reduceKeys(I,o.ARIA_PROPS),A=a("p-radiobutton p-component",{"p-radiobutton-checked":b.checked,"p-radiobutton-disabled":b.disabled,"p-radiobutton-focused":y},b.className),N=a("p-radiobutton-box",{"p-highlight":b.checked,"p-disabled":b.disabled,"p-focus":y});return e.createElement(e.Fragment,null,e.createElement("div",u({ref:P,id:b.id,className:A,style:b.style},I,{onClick:C}),e.createElement("div",{className:"p-hidden-accessible"},e.createElement("input",u({ref:E,id:b.inputId,type:"radio",name:b.name,defaultChecked:b.checked,onFocus:function(){k(!0)},onBlur:function(){k(!1)},onKeyDown:function(e){"Space"!==e.code&&" "!==e.key||C(e)},disabled:b.disabled,required:b.required,tabIndex:b.tabIndex},j))),e.createElement("div",{className:N},e.createElement("div",{className:"p-radiobutton-icon"}))),R&&e.createElement(n,u({target:P,content:b.tooltip},b.tooltipOptions)))})));p.displayName="RadioButton";export{p as RadioButton};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.radiobutton = (function (exports, React, tooltip, utils) {
|
|
2
|
+
this.primereact.radiobutton = (function (exports, React, hooks, tooltip, utils) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -95,20 +95,22 @@ this.primereact.radiobutton = (function (exports, React, tooltip, utils) {
|
|
|
95
95
|
var RadioButtonBase = {
|
|
96
96
|
defaultProps: {
|
|
97
97
|
__TYPE: 'RadioButton',
|
|
98
|
-
|
|
99
|
-
inputRef: null,
|
|
100
|
-
inputId: null,
|
|
101
|
-
name: null,
|
|
102
|
-
value: null,
|
|
98
|
+
autoFocus: false,
|
|
103
99
|
checked: false,
|
|
104
|
-
style: null,
|
|
105
100
|
className: null,
|
|
106
101
|
disabled: false,
|
|
102
|
+
id: null,
|
|
103
|
+
inputId: null,
|
|
104
|
+
inputRef: null,
|
|
105
|
+
name: null,
|
|
106
|
+
onChange: null,
|
|
107
|
+
onClick: null,
|
|
107
108
|
required: false,
|
|
109
|
+
style: null,
|
|
108
110
|
tabIndex: null,
|
|
109
111
|
tooltip: null,
|
|
110
112
|
tooltipOptions: null,
|
|
111
|
-
|
|
113
|
+
value: null,
|
|
112
114
|
children: undefined
|
|
113
115
|
},
|
|
114
116
|
getProps: function getProps(props) {
|
|
@@ -127,24 +129,31 @@ this.primereact.radiobutton = (function (exports, React, tooltip, utils) {
|
|
|
127
129
|
setFocusedState = _React$useState2[1];
|
|
128
130
|
var elementRef = React__namespace.useRef(null);
|
|
129
131
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
130
|
-
var select = function select(
|
|
131
|
-
onClick(
|
|
132
|
+
var select = function select(event) {
|
|
133
|
+
onClick(event);
|
|
132
134
|
};
|
|
133
|
-
var onClick = function onClick(
|
|
134
|
-
if (
|
|
135
|
+
var onClick = function onClick(event) {
|
|
136
|
+
if (props.disabled) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (props.onChange || props.onClick) {
|
|
135
140
|
var checked = props.checked;
|
|
136
|
-
var radioClicked =
|
|
137
|
-
var inputClicked =
|
|
138
|
-
var isInputToggled = inputClicked &&
|
|
141
|
+
var radioClicked = event.target instanceof HTMLDivElement;
|
|
142
|
+
var inputClicked = event.target === inputRef.current;
|
|
143
|
+
var isInputToggled = inputClicked && event.target.checked !== checked;
|
|
139
144
|
var isRadioToggled = radioClicked && (utils.DomHandler.hasClass(elementRef.current, 'p-radiobutton-checked') === checked ? !checked : false);
|
|
140
145
|
if (isInputToggled || isRadioToggled) {
|
|
141
146
|
var value = !checked;
|
|
142
|
-
|
|
143
|
-
originalEvent:
|
|
147
|
+
var eventData = {
|
|
148
|
+
originalEvent: event,
|
|
144
149
|
value: props.value,
|
|
145
150
|
checked: value,
|
|
146
|
-
stopPropagation: function stopPropagation() {
|
|
147
|
-
|
|
151
|
+
stopPropagation: function stopPropagation() {
|
|
152
|
+
event.stopPropagation();
|
|
153
|
+
},
|
|
154
|
+
preventDefault: function preventDefault() {
|
|
155
|
+
event.preventDefault();
|
|
156
|
+
},
|
|
148
157
|
target: {
|
|
149
158
|
type: 'radio',
|
|
150
159
|
name: props.name,
|
|
@@ -152,13 +161,20 @@ this.primereact.radiobutton = (function (exports, React, tooltip, utils) {
|
|
|
152
161
|
value: props.value,
|
|
153
162
|
checked: value
|
|
154
163
|
}
|
|
155
|
-
}
|
|
164
|
+
};
|
|
165
|
+
props.onClick && props.onClick(eventData);
|
|
166
|
+
|
|
167
|
+
// do not continue if the user defined click wants to prevent
|
|
168
|
+
if (event.defaultPrevented) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
props.onChange && props.onChange(eventData);
|
|
156
172
|
if (isRadioToggled) {
|
|
157
173
|
inputRef.current.checked = value;
|
|
158
174
|
}
|
|
159
175
|
}
|
|
160
176
|
utils.DomHandler.focus(inputRef.current);
|
|
161
|
-
|
|
177
|
+
event.preventDefault();
|
|
162
178
|
}
|
|
163
179
|
};
|
|
164
180
|
var onFocus = function onFocus() {
|
|
@@ -181,6 +197,11 @@ this.primereact.radiobutton = (function (exports, React, tooltip, utils) {
|
|
|
181
197
|
React__namespace.useEffect(function () {
|
|
182
198
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
183
199
|
}, [inputRef, props.inputRef]);
|
|
200
|
+
hooks.useMountEffect(function () {
|
|
201
|
+
if (props.autoFocus) {
|
|
202
|
+
utils.DomHandler.focus(inputRef.current, props.autoFocus);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
184
205
|
React__namespace.useImperativeHandle(ref, function () {
|
|
185
206
|
return {
|
|
186
207
|
props: props,
|
|
@@ -247,4 +268,4 @@ this.primereact.radiobutton = (function (exports, React, tooltip, utils) {
|
|
|
247
268
|
|
|
248
269
|
return exports;
|
|
249
270
|
|
|
250
|
-
})({}, React, primereact.tooltip, primereact.utils);
|
|
271
|
+
})({}, React, primereact.hooks, primereact.tooltip, primereact.utils);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.radiobutton=function(e,t,n,r){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.radiobutton=function(e,t,n,r,o){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=a(t);function c(){return c=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},c.apply(this,arguments)}function i(e){if(Array.isArray(e))return e}function l(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,u,c=[],i=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{if(!i&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}function s(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 d(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p={defaultProps:{__TYPE:"RadioButton",autoFocus:!1,checked:!1,className:null,disabled:!1,id:null,inputId:null,inputRef:null,name:null,onChange:null,onClick:null,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},getProps:function(e){return o.ObjectUtils.getMergedProps(e,p.defaultProps)},getOtherProps:function(e){return o.ObjectUtils.getDiffProps(e,p.defaultProps)}},m=u.memo(u.forwardRef((function(e,t){var a,s,m=p.getProps(e),b=u.useState(!1),h=(s=2,i(a=b)||l(a,s)||d(a,s)||f()),v=h[0],g=h[1],y=u.useRef(null),O=u.useRef(m.inputRef),k=function(e){j(e)},j=function(e){if(!m.disabled&&(m.onChange||m.onClick)){var t=m.checked,n=e.target instanceof HTMLDivElement,r=e.target===O.current&&e.target.checked!==t,a=n&&o.DomHandler.hasClass(y.current,"p-radiobutton-checked")===t&&!t;if(r||a){var u=!t,c={originalEvent:e,value:m.value,checked:u,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{type:"radio",name:m.name,id:m.id,value:m.value,checked:u}};if(m.onClick&&m.onClick(c),e.defaultPrevented)return;m.onChange&&m.onChange(c),a&&(O.current.checked=u)}o.DomHandler.focus(O.current),e.preventDefault()}};u.useEffect((function(){O.current&&(O.current.checked=m.checked)}),[m.checked]),u.useEffect((function(){o.ObjectUtils.combinedRefs(O,m.inputRef)}),[O,m.inputRef]),n.useMountEffect((function(){m.autoFocus&&o.DomHandler.focus(O.current,m.autoFocus)})),u.useImperativeHandle(t,(function(){return{props:m,select:k,focus:function(){return o.DomHandler.focus(O.current)},getElement:function(){return y.current},getInput:function(){return O.current}}}));var P=o.ObjectUtils.isNotEmpty(m.tooltip),E=p.getOtherProps(m),R=o.ObjectUtils.reduceKeys(E,o.DomHandler.ARIA_PROPS),C=o.classNames("p-radiobutton p-component",{"p-radiobutton-checked":m.checked,"p-radiobutton-disabled":m.disabled,"p-radiobutton-focused":v},m.className),D=o.classNames("p-radiobutton-box",{"p-highlight":m.checked,"p-disabled":m.disabled,"p-focus":v});return u.createElement(u.Fragment,null,u.createElement("div",c({ref:y,id:m.id,className:C,style:m.style},E,{onClick:j}),u.createElement("div",{className:"p-hidden-accessible"},u.createElement("input",c({ref:O,id:m.inputId,type:"radio",name:m.name,defaultChecked:m.checked,onFocus:function(){g(!0)},onBlur:function(){g(!1)},onKeyDown:function(e){"Space"!==e.code&&" "!==e.key||j(e)},disabled:m.disabled,required:m.required,tabIndex:m.tabIndex},R))),u.createElement("div",{className:D},u.createElement("div",{className:"p-radiobutton-icon"}))),P&&u.createElement(r.Tooltip,c({target:y,content:m.tooltip},m.tooltipOptions)))})));return m.displayName="RadioButton",e.RadioButton=m,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.hooks,primereact.tooltip,primereact.utils);
|
package/rating/rating.cjs.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
7
|
-
var utils = require('primereact/utils');
|
|
6
|
+
var ban = require('primereact/icons/ban');
|
|
8
7
|
var star = require('primereact/icons/star');
|
|
9
8
|
var starfill = require('primereact/icons/starfill');
|
|
10
|
-
var
|
|
9
|
+
var tooltip = require('primereact/tooltip');
|
|
10
|
+
var utils = require('primereact/utils');
|
|
11
11
|
|
|
12
12
|
function _interopNamespace(e) {
|
|
13
13
|
if (e && e.__esModule) return e;
|
|
@@ -127,8 +127,12 @@ var Rating = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
|
|
|
127
127
|
props.onChange({
|
|
128
128
|
originalEvent: event,
|
|
129
129
|
value: i,
|
|
130
|
-
stopPropagation: function stopPropagation() {
|
|
131
|
-
|
|
130
|
+
stopPropagation: function stopPropagation() {
|
|
131
|
+
event.stopPropagation();
|
|
132
|
+
},
|
|
133
|
+
preventDefault: function preventDefault() {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
},
|
|
132
136
|
target: {
|
|
133
137
|
name: props.name,
|
|
134
138
|
id: props.id,
|
|
@@ -143,8 +147,12 @@ var Rating = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
|
|
|
143
147
|
props.onChange({
|
|
144
148
|
originalEvent: event,
|
|
145
149
|
value: null,
|
|
146
|
-
stopPropagation: function stopPropagation() {
|
|
147
|
-
|
|
150
|
+
stopPropagation: function stopPropagation() {
|
|
151
|
+
event.stopPropagation();
|
|
152
|
+
},
|
|
153
|
+
preventDefault: function preventDefault() {
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
},
|
|
148
156
|
target: {
|
|
149
157
|
name: props.name,
|
|
150
158
|
id: props.id,
|
package/rating/rating.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/icons/ban"),n=require("primereact/icons/star"),r=require("primereact/icons/starfill"),o=require("primereact/tooltip"),a=require("primereact/utils");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var l=i(e);function c(){return c=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},c.apply(this,arguments)}function u(e){return u="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},u(e)}function s(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){var t=s(e,"string");return"symbol"===u(t)?t:String(t)}function f(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m={defaultProps:{__TYPE:"Rating",id:null,value:null,disabled:!1,readOnly:!1,stars:5,cancel:!0,style:null,className:null,tooltip:null,tooltipOptions:null,onChange:null,onIcon:null,offIcon:null,cancelIcon:null,cancelIconProps:null,onIconProps:null,offIconProps:null,children:void 0},getProps:function(e){return a.ObjectUtils.getMergedProps(e,m.defaultProps)},getOtherProps:function(e){return a.ObjectUtils.getDiffProps(e,m.defaultProps)}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=l.memo(l.forwardRef((function(e,i){var u=m.getProps(e),s=l.useRef(null),p=!u.disabled&&!u.readOnly,f=p?0:null,g=function(e,t){p&&u.onChange&&u.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:u.name,id:u.id,value:t}}),e.preventDefault()},b=function(e){p&&u.onChange&&u.onChange({originalEvent:e,value:null,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:u.name,id:u.id,value:null}}),e.preventDefault()},v=function(e,t){"Enter"===e.key&&g(e,t)},d=function(e){"Enter"===e.key&&b(e)};l.useImperativeHandle(i,(function(){return{props:u,getElement:function(){return s.current}}}));var O=a.ObjectUtils.isNotEmpty(u.tooltip),P=m.getOtherProps(u),j=a.classNames("p-rating",{"p-disabled":u.disabled,"p-readonly":u.readOnly},u.className),I=function(){if(u.cancel){var e="p-rating-icon p-rating-cancel",n=a.IconUtils.getJSXIcon(u.cancelIcon||l.createElement(t.BanIcon,{className:e}),y({className:{iconClassName:e}},u.cancelIconProps),{props:u});return l.createElement("div",{className:"p-rating-item p-rating-cancel-item",onClick:b,tabIndex:f,onKeyDown:d},n)}return null}(),E=Array.from({length:u.stars},(function(e,t){return t+1})).map((function(e){var t=e<=u.value,o=a.classNames("p-rating-item",{"p-rating-item-active":t}),i="p-rating-icon",c=t?{type:u.onIcon||l.createElement(r.StarFillIcon,{className:i})}:{type:u.offIcon||l.createElement(n.StarIcon,{className:i})},s=a.IconUtils.getJSXIcon(c.type,y({className:i},c.props),{props:u});return l.createElement("div",{key:e,className:o,tabIndex:f,onClick:function(t){return g(t,e)},onKeyDown:function(t){return v(t,e)}},s)}));return l.createElement(l.Fragment,null,l.createElement("div",c({ref:s,id:u.id,className:j,style:u.style},P),I,E),O&&l.createElement(o.Tooltip,c({target:s,content:u.tooltip},u.tooltipOptions)))})));b.displayName="Rating",exports.Rating=b;
|
package/rating/rating.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ObjectUtils, classNames, IconUtils } from 'primereact/utils';
|
|
2
|
+
import { BanIcon } from 'primereact/icons/ban';
|
|
4
3
|
import { StarIcon } from 'primereact/icons/star';
|
|
5
4
|
import { StarFillIcon } from 'primereact/icons/starfill';
|
|
6
|
-
import {
|
|
5
|
+
import { Tooltip } from 'primereact/tooltip';
|
|
6
|
+
import { ObjectUtils, classNames, IconUtils } from 'primereact/utils';
|
|
7
7
|
|
|
8
8
|
function _extends() {
|
|
9
9
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -103,8 +103,12 @@ var Rating = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (in
|
|
|
103
103
|
props.onChange({
|
|
104
104
|
originalEvent: event,
|
|
105
105
|
value: i,
|
|
106
|
-
stopPropagation: function stopPropagation() {
|
|
107
|
-
|
|
106
|
+
stopPropagation: function stopPropagation() {
|
|
107
|
+
event.stopPropagation();
|
|
108
|
+
},
|
|
109
|
+
preventDefault: function preventDefault() {
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
},
|
|
108
112
|
target: {
|
|
109
113
|
name: props.name,
|
|
110
114
|
id: props.id,
|
|
@@ -119,8 +123,12 @@ var Rating = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (in
|
|
|
119
123
|
props.onChange({
|
|
120
124
|
originalEvent: event,
|
|
121
125
|
value: null,
|
|
122
|
-
stopPropagation: function stopPropagation() {
|
|
123
|
-
|
|
126
|
+
stopPropagation: function stopPropagation() {
|
|
127
|
+
event.stopPropagation();
|
|
128
|
+
},
|
|
129
|
+
preventDefault: function preventDefault() {
|
|
130
|
+
event.preventDefault();
|
|
131
|
+
},
|
|
124
132
|
target: {
|
|
125
133
|
name: props.name,
|
|
126
134
|
id: props.id,
|
package/rating/rating.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{
|
|
1
|
+
import*as e from"react";import{BanIcon as t}from"primereact/icons/ban";import{StarIcon as n}from"primereact/icons/star";import{StarFillIcon as r}from"primereact/icons/starfill";import{Tooltip as o}from"primereact/tooltip";import{ObjectUtils as a,classNames as i,IconUtils as l}from"primereact/utils";function c(){return c=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},c.apply(this,arguments)}function u(e){return u="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},u(e)}function p(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e){var t=p(e,"string");return"symbol"===u(t)?t:String(t)}function f(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m={defaultProps:{__TYPE:"Rating",id:null,value:null,disabled:!1,readOnly:!1,stars:5,cancel:!0,style:null,className:null,tooltip:null,tooltipOptions:null,onChange:null,onIcon:null,offIcon:null,cancelIcon:null,cancelIconProps:null,onIconProps:null,offIconProps:null,children:void 0},getProps:function(e){return a.getMergedProps(e,m.defaultProps)},getOtherProps:function(e){return a.getDiffProps(e,m.defaultProps)}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=e.memo(e.forwardRef((function(u,p){var s=m.getProps(u),f=e.useRef(null),g=!s.disabled&&!s.readOnly,v=g?0:null,b=function(e,t){g&&s.onChange&&s.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:s.name,id:s.id,value:t}}),e.preventDefault()},d=function(e){g&&s.onChange&&s.onChange({originalEvent:e,value:null,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:s.name,id:s.id,value:null}}),e.preventDefault()},P=function(e,t){"Enter"===e.key&&b(e,t)},O=function(e){"Enter"===e.key&&d(e)};e.useImperativeHandle(p,(function(){return{props:s,getElement:function(){return f.current}}}));var E=a.isNotEmpty(s.tooltip),h=m.getOtherProps(s),j=i("p-rating",{"p-disabled":s.disabled,"p-readonly":s.readOnly},s.className),I=function(){if(s.cancel){var n="p-rating-icon p-rating-cancel",r=l.getJSXIcon(s.cancelIcon||e.createElement(t,{className:n}),y({className:{iconClassName:n}},s.cancelIconProps),{props:s});return e.createElement("div",{className:"p-rating-item p-rating-cancel-item",onClick:d,tabIndex:v,onKeyDown:O},r)}return null}(),N=Array.from({length:s.stars},(function(e,t){return t+1})).map((function(t){var o=t<=s.value,a=i("p-rating-item",{"p-rating-item-active":o}),c="p-rating-icon",u=o?{type:s.onIcon||e.createElement(r,{className:c})}:{type:s.offIcon||e.createElement(n,{className:c})},p=l.getJSXIcon(u.type,y({className:c},u.props),{props:s});return e.createElement("div",{key:t,className:a,tabIndex:v,onClick:function(e){return b(e,t)},onKeyDown:function(e){return P(e,t)}},p)}));return e.createElement(e.Fragment,null,e.createElement("div",c({ref:f,id:s.id,className:j,style:s.style},h),I,N),E&&e.createElement(o,c({target:f,content:s.tooltip},s.tooltipOptions)))})));v.displayName="Rating";export{v as Rating};
|
package/rating/rating.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.rating = (function (exports, React,
|
|
2
|
+
this.primereact.rating = (function (exports, React, ban, star, starfill, tooltip, utils) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -120,8 +120,12 @@ this.primereact.rating = (function (exports, React, tooltip, utils, star, starfi
|
|
|
120
120
|
props.onChange({
|
|
121
121
|
originalEvent: event,
|
|
122
122
|
value: i,
|
|
123
|
-
stopPropagation: function stopPropagation() {
|
|
124
|
-
|
|
123
|
+
stopPropagation: function stopPropagation() {
|
|
124
|
+
event.stopPropagation();
|
|
125
|
+
},
|
|
126
|
+
preventDefault: function preventDefault() {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
},
|
|
125
129
|
target: {
|
|
126
130
|
name: props.name,
|
|
127
131
|
id: props.id,
|
|
@@ -136,8 +140,12 @@ this.primereact.rating = (function (exports, React, tooltip, utils, star, starfi
|
|
|
136
140
|
props.onChange({
|
|
137
141
|
originalEvent: event,
|
|
138
142
|
value: null,
|
|
139
|
-
stopPropagation: function stopPropagation() {
|
|
140
|
-
|
|
143
|
+
stopPropagation: function stopPropagation() {
|
|
144
|
+
event.stopPropagation();
|
|
145
|
+
},
|
|
146
|
+
preventDefault: function preventDefault() {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
},
|
|
141
149
|
target: {
|
|
142
150
|
name: props.name,
|
|
143
151
|
id: props.id,
|
|
@@ -251,4 +259,4 @@ this.primereact.rating = (function (exports, React, tooltip, utils, star, starfi
|
|
|
251
259
|
|
|
252
260
|
return exports;
|
|
253
261
|
|
|
254
|
-
})({}, React, primereact.
|
|
262
|
+
})({}, React, primereact.icons.ban, primereact.icons.star, primereact.icons.starfill, primereact.tooltip, primereact.utils);
|
package/rating/rating.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.rating=function(e,t,n,r,o,a,i){"use strict";function l(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=l(t);function u(){return u=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},u.apply(this,arguments)}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 p(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=p(e,"string");return"symbol"===s(t)?t:String(t)}function m(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g={defaultProps:{__TYPE:"Rating",id:null,value:null,disabled:!1,readOnly:!1,stars:5,cancel:!0,style:null,className:null,tooltip:null,tooltipOptions:null,onChange:null,onIcon:null,offIcon:null,cancelIcon:null,cancelIconProps:null,onIconProps:null,offIconProps:null,children:void 0},getProps:function(e){return
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.rating=function(e,t,n,r,o,a,i){"use strict";function l(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=l(t);function u(){return u=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},u.apply(this,arguments)}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 p(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=p(e,"string");return"symbol"===s(t)?t:String(t)}function m(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g={defaultProps:{__TYPE:"Rating",id:null,value:null,disabled:!1,readOnly:!1,stars:5,cancel:!0,style:null,className:null,tooltip:null,tooltipOptions:null,onChange:null,onIcon:null,offIcon:null,cancelIcon:null,cancelIconProps:null,onIconProps:null,offIconProps:null,children:void 0},getProps:function(e){return i.ObjectUtils.getMergedProps(e,g.defaultProps)},getOtherProps:function(e){return i.ObjectUtils.getDiffProps(e,g.defaultProps)}};function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=c.memo(c.forwardRef((function(e,t){var l=g.getProps(e),s=c.useRef(null),p=!l.disabled&&!l.readOnly,f=p?0:null,m=function(e,t){p&&l.onChange&&l.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:l.name,id:l.id,value:t}}),e.preventDefault()},y=function(e){p&&l.onChange&&l.onChange({originalEvent:e,value:null,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:l.name,id:l.id,value:null}}),e.preventDefault()},v=function(e,t){"Enter"===e.key&&m(e,t)},d=function(e){"Enter"===e.key&&y(e)};c.useImperativeHandle(t,(function(){return{props:l,getElement:function(){return s.current}}}));var O=i.ObjectUtils.isNotEmpty(l.tooltip),P=g.getOtherProps(l),j=i.classNames("p-rating",{"p-disabled":l.disabled,"p-readonly":l.readOnly},l.className),h=function(){if(l.cancel){var e="p-rating-icon p-rating-cancel",t=i.IconUtils.getJSXIcon(l.cancelIcon||c.createElement(n.BanIcon,{className:e}),b({className:{iconClassName:e}},l.cancelIconProps),{props:l});return c.createElement("div",{className:"p-rating-item p-rating-cancel-item",onClick:y,tabIndex:f,onKeyDown:d},t)}return null}(),I=Array.from({length:l.stars},(function(e,t){return t+1})).map((function(e){var t=e<=l.value,n=i.classNames("p-rating-item",{"p-rating-item-active":t}),a="p-rating-icon",u=t?{type:l.onIcon||c.createElement(o.StarFillIcon,{className:a})}:{type:l.offIcon||c.createElement(r.StarIcon,{className:a})},s=i.IconUtils.getJSXIcon(u.type,b({className:a},u.props),{props:l});return c.createElement("div",{key:e,className:n,tabIndex:f,onClick:function(t){return m(t,e)},onKeyDown:function(t){return v(t,e)}},s)}));return c.createElement(c.Fragment,null,c.createElement("div",u({ref:s,id:l.id,className:j,style:l.style},P),h,I),O&&c.createElement(a.Tooltip,u({target:s,content:l.tooltip},l.tooltipOptions)))})));return v.displayName="Rating",e.Rating=v,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.icons.ban,primereact.icons.star,primereact.icons.starfill,primereact.tooltip,primereact.utils);
|