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
|
@@ -10,6 +10,7 @@ var hooks = require('primereact/hooks');
|
|
|
10
10
|
var overlayservice = require('primereact/overlayservice');
|
|
11
11
|
var portal = require('primereact/portal');
|
|
12
12
|
var utils = require('primereact/utils');
|
|
13
|
+
var componentbase = require('primereact/componentbase');
|
|
13
14
|
|
|
14
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
16
|
|
|
@@ -34,21 +35,6 @@ function _interopNamespace(e) {
|
|
|
34
35
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
35
36
|
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
36
37
|
|
|
37
|
-
function _extends() {
|
|
38
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
39
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
40
|
-
var source = arguments[i];
|
|
41
|
-
for (var key in source) {
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
43
|
-
target[key] = source[key];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return target;
|
|
48
|
-
};
|
|
49
|
-
return _extends.apply(this, arguments);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
38
|
function _arrayWithHoles(arr) {
|
|
53
39
|
if (Array.isArray(arr)) return arr;
|
|
54
40
|
}
|
|
@@ -145,7 +131,7 @@ function _defineProperty(obj, key, value) {
|
|
|
145
131
|
return obj;
|
|
146
132
|
}
|
|
147
133
|
|
|
148
|
-
var ConfirmPopupBase = {
|
|
134
|
+
var ConfirmPopupBase = componentbase.ComponentBase.extend({
|
|
149
135
|
defaultProps: {
|
|
150
136
|
__TYPE: 'ConfirmPopup',
|
|
151
137
|
tagKey: undefined,
|
|
@@ -170,14 +156,8 @@ var ConfirmPopupBase = {
|
|
|
170
156
|
reject: null,
|
|
171
157
|
transitionOptions: null,
|
|
172
158
|
children: undefined
|
|
173
|
-
},
|
|
174
|
-
getProps: function getProps(props) {
|
|
175
|
-
return utils.ObjectUtils.getMergedProps(props, ConfirmPopupBase.defaultProps);
|
|
176
|
-
},
|
|
177
|
-
getOtherProps: function getOtherProps(props) {
|
|
178
|
-
return utils.ObjectUtils.getDiffProps(props, ConfirmPopupBase.defaultProps);
|
|
179
159
|
}
|
|
180
|
-
};
|
|
160
|
+
});
|
|
181
161
|
|
|
182
162
|
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; }
|
|
183
163
|
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; }
|
|
@@ -213,11 +193,20 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
213
193
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
214
194
|
reshowState = _React$useState4[0],
|
|
215
195
|
setReshowState = _React$useState4[1];
|
|
196
|
+
var _ConfirmPopupBase$set = ConfirmPopupBase.setMetaData({
|
|
197
|
+
props: props,
|
|
198
|
+
state: {
|
|
199
|
+
visible: visibleState,
|
|
200
|
+
reshow: reshowState
|
|
201
|
+
}
|
|
202
|
+
}),
|
|
203
|
+
ptm = _ConfirmPopupBase$set.ptm;
|
|
216
204
|
var overlayRef = React__namespace.useRef(null);
|
|
217
205
|
var acceptBtnRef = React__namespace.useRef(null);
|
|
218
206
|
var isPanelClicked = React__namespace.useRef(false);
|
|
219
207
|
var overlayEventListener = React__namespace.useRef(null);
|
|
220
208
|
var confirmProps = React__namespace.useRef(null);
|
|
209
|
+
var isCallbackExecuting = React__namespace.useRef(false);
|
|
221
210
|
var getCurrentProps = function getCurrentProps() {
|
|
222
211
|
return confirmProps.current || props;
|
|
223
212
|
};
|
|
@@ -256,16 +245,23 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
256
245
|
});
|
|
257
246
|
};
|
|
258
247
|
var accept = function accept() {
|
|
259
|
-
|
|
260
|
-
|
|
248
|
+
if (!isCallbackExecuting.current) {
|
|
249
|
+
isCallbackExecuting.current = true;
|
|
250
|
+
callbackFromProp('accept');
|
|
251
|
+
hide('accept');
|
|
252
|
+
}
|
|
261
253
|
};
|
|
262
254
|
var reject = function reject() {
|
|
263
|
-
|
|
264
|
-
|
|
255
|
+
if (!isCallbackExecuting.current) {
|
|
256
|
+
isCallbackExecuting.current = true;
|
|
257
|
+
callbackFromProp('reject');
|
|
258
|
+
hide('reject');
|
|
259
|
+
}
|
|
265
260
|
};
|
|
266
261
|
var show = function show() {
|
|
267
262
|
setVisibleState(true);
|
|
268
263
|
setReshowState(false);
|
|
264
|
+
isCallbackExecuting.current = false;
|
|
269
265
|
overlayEventListener.current = function (e) {
|
|
270
266
|
!isOutsideClicked(e.target) && (isPanelClicked.current = true);
|
|
271
267
|
};
|
|
@@ -362,36 +358,44 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
362
358
|
var createContent = function createContent() {
|
|
363
359
|
var currentProps = getCurrentProps();
|
|
364
360
|
var message = utils.ObjectUtils.getJSXElement(getPropValue('message'), currentProps);
|
|
365
|
-
var
|
|
361
|
+
var iconProps = utils.mergeProps({
|
|
366
362
|
className: 'p-confirm-popup-icon'
|
|
367
|
-
},
|
|
363
|
+
}, ptm('icon'));
|
|
364
|
+
var icon = utils.IconUtils.getJSXIcon(getPropValue('icon'), _objectSpread({}, iconProps), {
|
|
368
365
|
props: currentProps
|
|
369
366
|
});
|
|
370
|
-
|
|
371
|
-
className:
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
|
|
367
|
+
var messageProps = utils.mergeProps({
|
|
368
|
+
className: 'p-confirm-popup-message'
|
|
369
|
+
}, ptm('message'));
|
|
370
|
+
var contentProps = utils.mergeProps({
|
|
371
|
+
className: 'p-confirm-popup-content'
|
|
372
|
+
}, ptm('content'));
|
|
373
|
+
return /*#__PURE__*/React__namespace.createElement("div", contentProps, icon, /*#__PURE__*/React__namespace.createElement("span", messageProps, message));
|
|
375
374
|
};
|
|
376
375
|
var createFooter = function createFooter() {
|
|
377
376
|
var acceptClassName = utils.classNames('p-confirm-popup-accept p-button-sm', getPropValue('acceptClassName'));
|
|
378
377
|
var rejectClassName = utils.classNames('p-confirm-popup-reject p-button-sm', {
|
|
379
378
|
'p-button-text': !getPropValue('rejectClassName')
|
|
380
379
|
}, getPropValue('rejectClassName'));
|
|
381
|
-
var
|
|
382
|
-
className:
|
|
383
|
-
},
|
|
380
|
+
var footerProps = utils.mergeProps({
|
|
381
|
+
className: 'p-confirm-popup-footer'
|
|
382
|
+
}, ptm('footer'));
|
|
383
|
+
var rejectButtonProps = utils.mergeProps({
|
|
384
384
|
label: rejectLabel,
|
|
385
385
|
icon: getPropValue('rejectIcon'),
|
|
386
386
|
className: rejectClassName,
|
|
387
|
-
onClick: reject
|
|
388
|
-
|
|
387
|
+
onClick: reject,
|
|
388
|
+
pt: ptm('rejectButton')
|
|
389
|
+
});
|
|
390
|
+
var acceptButtonProps = utils.mergeProps({
|
|
389
391
|
ref: acceptBtnRef,
|
|
390
392
|
label: acceptLabel,
|
|
391
393
|
icon: getPropValue('acceptIcon'),
|
|
392
394
|
className: acceptClassName,
|
|
393
|
-
onClick: accept
|
|
394
|
-
|
|
395
|
+
onClick: accept,
|
|
396
|
+
pt: ptm('acceptButton')
|
|
397
|
+
});
|
|
398
|
+
var content = /*#__PURE__*/React__namespace.createElement("div", footerProps, /*#__PURE__*/React__namespace.createElement(button.Button, rejectButtonProps), /*#__PURE__*/React__namespace.createElement(button.Button, acceptButtonProps));
|
|
395
399
|
if (getPropValue('footer')) {
|
|
396
400
|
var defaultContentOptions = {
|
|
397
401
|
accept: accept,
|
|
@@ -409,13 +413,19 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
409
413
|
return content;
|
|
410
414
|
};
|
|
411
415
|
var createElement = function createElement() {
|
|
412
|
-
var otherProps = ConfirmPopupBase.getOtherProps(props);
|
|
413
416
|
var className = utils.classNames('p-confirm-popup p-component', getPropValue('className'), {
|
|
414
417
|
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
415
418
|
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
416
419
|
});
|
|
417
420
|
var content = createContent();
|
|
418
421
|
var footer = createFooter();
|
|
422
|
+
var rootProps = utils.mergeProps({
|
|
423
|
+
ref: overlayRef,
|
|
424
|
+
id: getPropValue('id'),
|
|
425
|
+
className: className,
|
|
426
|
+
style: getPropValue('style'),
|
|
427
|
+
onClick: onPanelClick
|
|
428
|
+
}, ConfirmPopupBase.getOtherProps(props), ptm('root'));
|
|
419
429
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
420
430
|
nodeRef: overlayRef,
|
|
421
431
|
classNames: "p-connected-overlay",
|
|
@@ -430,14 +440,7 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
430
440
|
onEntered: onEntered,
|
|
431
441
|
onExit: onExit,
|
|
432
442
|
onExited: onExited
|
|
433
|
-
}, /*#__PURE__*/React__namespace.createElement("div",
|
|
434
|
-
ref: overlayRef,
|
|
435
|
-
id: getPropValue('id'),
|
|
436
|
-
className: className,
|
|
437
|
-
style: getPropValue('style')
|
|
438
|
-
}, otherProps, {
|
|
439
|
-
onClick: onPanelClick
|
|
440
|
-
}), content, footer));
|
|
443
|
+
}, /*#__PURE__*/React__namespace.createElement("div", rootProps, content, footer));
|
|
441
444
|
};
|
|
442
445
|
var element = createElement();
|
|
443
446
|
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/button"),n=require("primereact/csstransition"),o=require("primereact/hooks"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/button"),n=require("primereact/csstransition"),o=require("primereact/hooks"),c=require("primereact/overlayservice"),i=require("primereact/portal"),l=require("primereact/utils"),a=require("primereact/componentbase");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var p=s(e),f=u(t);function m(e){if(Array.isArray(e))return e}function v(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c,i,l=[],a=!0,u=!1;try{if(c=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=c.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function b(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 y(e,t){if(e){if("string"==typeof e)return b(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)?b(e,t):void 0}}function d(){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 g(e,t){return m(e)||v(e,t)||y(e,t)||d()}function O(e){return O="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},O(e)}function j(e,t){if("object"!==O(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e){var t=j(e,"string");return"symbol"===O(t)?t:String(t)}function P(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=a.ComponentBase.extend({defaultProps:{__TYPE:"ConfirmPopup",tagKey:void 0,target:null,visible:!1,message:null,rejectLabel:null,acceptLabel:null,icon:null,rejectIcon:null,acceptIcon:null,rejectClassName:null,acceptClassName:null,className:null,style:null,appendTo:null,dismissable:!0,footer:null,onShow:null,onHide:null,accept:null,reject:null,transitionOptions:null,children:void 0}});function E(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){P(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=p.memo(p.forwardRef((function(e,a){var u=h.getProps(e),s=g(p.useState(u.visible),2),m=s[0],v=s[1],b=g(p.useState(!1),2),y=b[0],d=b[1],O=h.setMetaData({props:u,state:{visible:m,reshow:y}}).ptm,j=p.useRef(null),S=p.useRef(null),P=p.useRef(!1),E=p.useRef(null),w=p.useRef(null),C=p.useRef(!1),x=function(){return w.current||u},I=function(e){return(w.current||u)[e]},k=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return l.ObjectUtils.getPropValue(I(e),r)},D=I("acceptLabel")||t.localeOption("accept"),U=I("rejectLabel")||t.localeOption("reject"),q=g(o.useOverlayListener({target:I("target"),overlay:j,listener:function(e,t){t.valid&&("outside"===t.type?u.dismissable&&!P.current&&B("hide"):B("hide")),P.current=!1},when:m}),2),A=q[0],L=q[1],R=function(e){P.current=!0,c.OverlayService.emit("overlay-click",{originalEvent:e,target:I("target")})},H=function(){C.current||(C.current=!0,k("accept"),B("accept"))},T=function(){C.current||(C.current=!0,k("reject"),B("reject"))},_=function(){v(!0),d(!1),C.current=!1,E.current=function(e){!z(e.target)&&(P.current=!0)},c.OverlayService.on("overlay-click",E.current)},B=function(e){v(!1),c.OverlayService.off("overlay-click",E.current),E.current=null,e&&k("onHide",e)},M=function(){l.ZIndexUtils.set("overlay",j.current,f.default.autoZIndex,f.default.zIndex.overlay),X()},Z=function(){A(),S.current&&S.current.focus(),k("onShow")},J=function(){L()},K=function(){l.ZIndexUtils.clear(j.current),P.current=!1},X=function(){if(I("target")){l.DomHandler.absolutePosition(j.current,I("target"));var e=l.DomHandler.getOffset(j.current),t=l.DomHandler.getOffset(I("target")),r=0;e.left<t.left&&(r=t.left-e.left),j.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&l.DomHandler.addClass(j.current,"p-confirm-popup-flipped")}},z=function(e){return j&&j.current&&!(j.current.isSameNode(e)||j.current.contains(e))},V=function(e){if(e.tagKey===u.tagKey){var t=m!==e.visible;I("target")!==e.target&&!u.target?(B(),w.current=e,d(!0)):t&&(w.current=e,e.visible?_():B())}};p.useEffect((function(){u.visible?_():B()}),[u.visible]),p.useEffect((function(){return u.target||u.message||c.OverlayService.on("confirm-popup",V),function(){c.OverlayService.off("confirm-popup",V)}}),[u.target]),o.useUpdateEffect((function(){y&&_()}),[y]),o.useUnmountEffect((function(){E.current&&(c.OverlayService.off("overlay-click",E.current),E.current=null),c.OverlayService.off("confirm-popup",V),l.ZIndexUtils.clear(j.current)})),p.useImperativeHandle(a,(function(){return{props:u,confirm:V}}));var Y,$,F,G,Q,W,ee,te,re,ne,oe=function(){var e=l.classNames("p-confirm-popup-accept p-button-sm",I("acceptClassName")),t=l.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!I("rejectClassName")},I("rejectClassName")),n=l.mergeProps({className:"p-confirm-popup-footer"},O("footer")),o=l.mergeProps({label:U,icon:I("rejectIcon"),className:t,onClick:T,pt:O("rejectButton")}),c=l.mergeProps({ref:S,label:D,icon:I("acceptIcon"),className:e,onClick:H,pt:O("acceptButton")}),i=p.createElement("div",n,p.createElement(r.Button,o),p.createElement(r.Button,c));if(I("footer")){var a={accept:H,reject:T,className:"p-confirm-popup-footer",acceptClassName:e,rejectClassName:t,acceptLabel:D,rejectLabel:U,element:i,props:x()};return l.ObjectUtils.getJSXElement(I("footer"),a)}return i},ce=(ee=l.classNames("p-confirm-popup p-component",I("className"),{"p-input-filled":"filled"===f.default.inputStyle,"p-ripple-disabled":!1===f.default.ripple}),Y=x(),$=l.ObjectUtils.getJSXElement(I("message"),Y),F=l.mergeProps({className:"p-confirm-popup-icon"},O("icon")),G=l.IconUtils.getJSXIcon(I("icon"),N({},F),{props:Y}),Q=l.mergeProps({className:"p-confirm-popup-message"},O("message")),W=l.mergeProps({className:"p-confirm-popup-content"},O("content")),te=p.createElement("div",W,G,p.createElement("span",Q,$)),re=oe(),ne=l.mergeProps({ref:j,id:I("id"),className:ee,style:I("style"),onClick:R},h.getOtherProps(u),O("root")),p.createElement(n.CSSTransition,{nodeRef:j,classNames:"p-connected-overlay",in:m,timeout:{enter:120,exit:100},options:I("transitionOptions"),unmountOnExit:!0,onEnter:M,onEntered:Z,onExit:J,onExited:K},p.createElement("div",ne,te,re)));return p.createElement(i.Portal,{element:ce,appendTo:I("appendTo"),visible:I("visible")})})));w.displayName="ConfirmPopup",exports.ConfirmPopup=w,exports.confirmPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=N(N({},e),{visible:void 0===e.visible||e.visible})).visible&&c.OverlayService.emit("confirm-popup",e);return{show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c.OverlayService.emit("confirm-popup",N(N(N({},e),t),{visible:!0}))},hide:function(){c.OverlayService.emit("confirm-popup",{visible:!1})}}};
|
|
@@ -9,7 +9,71 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { CSSTransitionProps } from '../csstransition';
|
|
12
|
-
import { IconType } from '../utils';
|
|
12
|
+
import { IconType, PassThroughType } from '../utils';
|
|
13
|
+
import { ButtonPassThroughOptions } from '../button/button';
|
|
14
|
+
|
|
15
|
+
export declare type ConfirmPopupPassThroughType<T> = PassThroughType<T, ConfirmPopupPassThroughMethodOptions>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom passthrough(pt) option method.
|
|
19
|
+
*/
|
|
20
|
+
export interface ConfirmPopupPassThroughMethodOptions {
|
|
21
|
+
props: ConfirmPopupProps;
|
|
22
|
+
state: ConfirmPopupState;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Custom passthrough(pt) options.
|
|
27
|
+
* @see {@link ConfirmPopupProps.pt}
|
|
28
|
+
*/
|
|
29
|
+
export interface ConfirmPopupPassThroughOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Uses to pass attributes to the root's DOM element.
|
|
32
|
+
*/
|
|
33
|
+
root?: ConfirmPopupPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
34
|
+
/**
|
|
35
|
+
* Uses to pass attributes to the content's DOM element.
|
|
36
|
+
*/
|
|
37
|
+
content?: ConfirmPopupPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
38
|
+
/**
|
|
39
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
40
|
+
*/
|
|
41
|
+
icon?: ConfirmPopupPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
42
|
+
/**
|
|
43
|
+
* Uses to pass attributes to the message's DOM element.
|
|
44
|
+
*/
|
|
45
|
+
message?: ConfirmPopupPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
46
|
+
/**
|
|
47
|
+
* Uses to pass attributes to the footer's DOM element.
|
|
48
|
+
*/
|
|
49
|
+
footer?: ConfirmPopupPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
50
|
+
/**
|
|
51
|
+
* Uses to pass attributes to the Button component.
|
|
52
|
+
* @see {@link ButtonPassThroughOptions}
|
|
53
|
+
*/
|
|
54
|
+
rejectButton?: ButtonPassThroughOptions;
|
|
55
|
+
/**
|
|
56
|
+
* Uses to pass attributes to the Button component.
|
|
57
|
+
* @see {@link ButtonPassThroughOptions}
|
|
58
|
+
*/
|
|
59
|
+
acceptButton?: ButtonPassThroughOptions;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Defines current inline state in ConfirmPopup component.
|
|
64
|
+
*/
|
|
65
|
+
export interface ConfirmPopupState {
|
|
66
|
+
/**
|
|
67
|
+
* Current visible state as a boolean.
|
|
68
|
+
* @defaultValue false
|
|
69
|
+
*/
|
|
70
|
+
visible: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Current reshow state as a boolean.
|
|
73
|
+
* @defaultValue false
|
|
74
|
+
*/
|
|
75
|
+
reshow: boolean;
|
|
76
|
+
}
|
|
13
77
|
|
|
14
78
|
/**
|
|
15
79
|
* Custom confirm popup options
|
|
@@ -159,6 +223,11 @@ export interface ConfirmPopupProps {
|
|
|
159
223
|
* @readonly
|
|
160
224
|
*/
|
|
161
225
|
children?: React.ReactNode | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
228
|
+
* @type {ConfirmPopupPassThroughOptions}
|
|
229
|
+
*/
|
|
230
|
+
pt?: ConfirmPopupPassThroughOptions;
|
|
162
231
|
}
|
|
163
232
|
|
|
164
233
|
/**
|
|
@@ -5,22 +5,8 @@ import { CSSTransition } from 'primereact/csstransition';
|
|
|
5
5
|
import { useOverlayListener, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
6
6
|
import { OverlayService } from 'primereact/overlayservice';
|
|
7
7
|
import { Portal } from 'primereact/portal';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
12
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for (var key in source) {
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
16
|
-
target[key] = source[key];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
|
-
return _extends.apply(this, arguments);
|
|
23
|
-
}
|
|
8
|
+
import { ZIndexUtils, ObjectUtils, classNames, mergeProps, DomHandler, IconUtils } from 'primereact/utils';
|
|
9
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
24
10
|
|
|
25
11
|
function _arrayWithHoles(arr) {
|
|
26
12
|
if (Array.isArray(arr)) return arr;
|
|
@@ -118,7 +104,7 @@ function _defineProperty(obj, key, value) {
|
|
|
118
104
|
return obj;
|
|
119
105
|
}
|
|
120
106
|
|
|
121
|
-
var ConfirmPopupBase = {
|
|
107
|
+
var ConfirmPopupBase = ComponentBase.extend({
|
|
122
108
|
defaultProps: {
|
|
123
109
|
__TYPE: 'ConfirmPopup',
|
|
124
110
|
tagKey: undefined,
|
|
@@ -143,14 +129,8 @@ var ConfirmPopupBase = {
|
|
|
143
129
|
reject: null,
|
|
144
130
|
transitionOptions: null,
|
|
145
131
|
children: undefined
|
|
146
|
-
},
|
|
147
|
-
getProps: function getProps(props) {
|
|
148
|
-
return ObjectUtils.getMergedProps(props, ConfirmPopupBase.defaultProps);
|
|
149
|
-
},
|
|
150
|
-
getOtherProps: function getOtherProps(props) {
|
|
151
|
-
return ObjectUtils.getDiffProps(props, ConfirmPopupBase.defaultProps);
|
|
152
132
|
}
|
|
153
|
-
};
|
|
133
|
+
});
|
|
154
134
|
|
|
155
135
|
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; }
|
|
156
136
|
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; }
|
|
@@ -186,11 +166,20 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
186
166
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
187
167
|
reshowState = _React$useState4[0],
|
|
188
168
|
setReshowState = _React$useState4[1];
|
|
169
|
+
var _ConfirmPopupBase$set = ConfirmPopupBase.setMetaData({
|
|
170
|
+
props: props,
|
|
171
|
+
state: {
|
|
172
|
+
visible: visibleState,
|
|
173
|
+
reshow: reshowState
|
|
174
|
+
}
|
|
175
|
+
}),
|
|
176
|
+
ptm = _ConfirmPopupBase$set.ptm;
|
|
189
177
|
var overlayRef = React.useRef(null);
|
|
190
178
|
var acceptBtnRef = React.useRef(null);
|
|
191
179
|
var isPanelClicked = React.useRef(false);
|
|
192
180
|
var overlayEventListener = React.useRef(null);
|
|
193
181
|
var confirmProps = React.useRef(null);
|
|
182
|
+
var isCallbackExecuting = React.useRef(false);
|
|
194
183
|
var getCurrentProps = function getCurrentProps() {
|
|
195
184
|
return confirmProps.current || props;
|
|
196
185
|
};
|
|
@@ -229,16 +218,23 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
229
218
|
});
|
|
230
219
|
};
|
|
231
220
|
var accept = function accept() {
|
|
232
|
-
|
|
233
|
-
|
|
221
|
+
if (!isCallbackExecuting.current) {
|
|
222
|
+
isCallbackExecuting.current = true;
|
|
223
|
+
callbackFromProp('accept');
|
|
224
|
+
hide('accept');
|
|
225
|
+
}
|
|
234
226
|
};
|
|
235
227
|
var reject = function reject() {
|
|
236
|
-
|
|
237
|
-
|
|
228
|
+
if (!isCallbackExecuting.current) {
|
|
229
|
+
isCallbackExecuting.current = true;
|
|
230
|
+
callbackFromProp('reject');
|
|
231
|
+
hide('reject');
|
|
232
|
+
}
|
|
238
233
|
};
|
|
239
234
|
var show = function show() {
|
|
240
235
|
setVisibleState(true);
|
|
241
236
|
setReshowState(false);
|
|
237
|
+
isCallbackExecuting.current = false;
|
|
242
238
|
overlayEventListener.current = function (e) {
|
|
243
239
|
!isOutsideClicked(e.target) && (isPanelClicked.current = true);
|
|
244
240
|
};
|
|
@@ -335,36 +331,44 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
335
331
|
var createContent = function createContent() {
|
|
336
332
|
var currentProps = getCurrentProps();
|
|
337
333
|
var message = ObjectUtils.getJSXElement(getPropValue('message'), currentProps);
|
|
338
|
-
var
|
|
334
|
+
var iconProps = mergeProps({
|
|
339
335
|
className: 'p-confirm-popup-icon'
|
|
340
|
-
},
|
|
336
|
+
}, ptm('icon'));
|
|
337
|
+
var icon = IconUtils.getJSXIcon(getPropValue('icon'), _objectSpread({}, iconProps), {
|
|
341
338
|
props: currentProps
|
|
342
339
|
});
|
|
343
|
-
|
|
344
|
-
className:
|
|
345
|
-
},
|
|
346
|
-
|
|
347
|
-
|
|
340
|
+
var messageProps = mergeProps({
|
|
341
|
+
className: 'p-confirm-popup-message'
|
|
342
|
+
}, ptm('message'));
|
|
343
|
+
var contentProps = mergeProps({
|
|
344
|
+
className: 'p-confirm-popup-content'
|
|
345
|
+
}, ptm('content'));
|
|
346
|
+
return /*#__PURE__*/React.createElement("div", contentProps, icon, /*#__PURE__*/React.createElement("span", messageProps, message));
|
|
348
347
|
};
|
|
349
348
|
var createFooter = function createFooter() {
|
|
350
349
|
var acceptClassName = classNames('p-confirm-popup-accept p-button-sm', getPropValue('acceptClassName'));
|
|
351
350
|
var rejectClassName = classNames('p-confirm-popup-reject p-button-sm', {
|
|
352
351
|
'p-button-text': !getPropValue('rejectClassName')
|
|
353
352
|
}, getPropValue('rejectClassName'));
|
|
354
|
-
var
|
|
355
|
-
className:
|
|
356
|
-
},
|
|
353
|
+
var footerProps = mergeProps({
|
|
354
|
+
className: 'p-confirm-popup-footer'
|
|
355
|
+
}, ptm('footer'));
|
|
356
|
+
var rejectButtonProps = mergeProps({
|
|
357
357
|
label: rejectLabel,
|
|
358
358
|
icon: getPropValue('rejectIcon'),
|
|
359
359
|
className: rejectClassName,
|
|
360
|
-
onClick: reject
|
|
361
|
-
|
|
360
|
+
onClick: reject,
|
|
361
|
+
pt: ptm('rejectButton')
|
|
362
|
+
});
|
|
363
|
+
var acceptButtonProps = mergeProps({
|
|
362
364
|
ref: acceptBtnRef,
|
|
363
365
|
label: acceptLabel,
|
|
364
366
|
icon: getPropValue('acceptIcon'),
|
|
365
367
|
className: acceptClassName,
|
|
366
|
-
onClick: accept
|
|
367
|
-
|
|
368
|
+
onClick: accept,
|
|
369
|
+
pt: ptm('acceptButton')
|
|
370
|
+
});
|
|
371
|
+
var content = /*#__PURE__*/React.createElement("div", footerProps, /*#__PURE__*/React.createElement(Button, rejectButtonProps), /*#__PURE__*/React.createElement(Button, acceptButtonProps));
|
|
368
372
|
if (getPropValue('footer')) {
|
|
369
373
|
var defaultContentOptions = {
|
|
370
374
|
accept: accept,
|
|
@@ -382,13 +386,19 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
382
386
|
return content;
|
|
383
387
|
};
|
|
384
388
|
var createElement = function createElement() {
|
|
385
|
-
var otherProps = ConfirmPopupBase.getOtherProps(props);
|
|
386
389
|
var className = classNames('p-confirm-popup p-component', getPropValue('className'), {
|
|
387
390
|
'p-input-filled': PrimeReact.inputStyle === 'filled',
|
|
388
391
|
'p-ripple-disabled': PrimeReact.ripple === false
|
|
389
392
|
});
|
|
390
393
|
var content = createContent();
|
|
391
394
|
var footer = createFooter();
|
|
395
|
+
var rootProps = mergeProps({
|
|
396
|
+
ref: overlayRef,
|
|
397
|
+
id: getPropValue('id'),
|
|
398
|
+
className: className,
|
|
399
|
+
style: getPropValue('style'),
|
|
400
|
+
onClick: onPanelClick
|
|
401
|
+
}, ConfirmPopupBase.getOtherProps(props), ptm('root'));
|
|
392
402
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
393
403
|
nodeRef: overlayRef,
|
|
394
404
|
classNames: "p-connected-overlay",
|
|
@@ -403,14 +413,7 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
403
413
|
onEntered: onEntered,
|
|
404
414
|
onExit: onExit,
|
|
405
415
|
onExited: onExited
|
|
406
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
407
|
-
ref: overlayRef,
|
|
408
|
-
id: getPropValue('id'),
|
|
409
|
-
className: className,
|
|
410
|
-
style: getPropValue('style')
|
|
411
|
-
}, otherProps, {
|
|
412
|
-
onClick: onPanelClick
|
|
413
|
-
}), content, footer));
|
|
416
|
+
}, /*#__PURE__*/React.createElement("div", rootProps, content, footer));
|
|
414
417
|
};
|
|
415
418
|
var element = createElement();
|
|
416
419
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{localeOption as r}from"primereact/api";import{Button as n}from"primereact/button";import{CSSTransition as o}from"primereact/csstransition";import{useOverlayListener as
|
|
1
|
+
import*as e from"react";import t,{localeOption as r}from"primereact/api";import{Button as n}from"primereact/button";import{CSSTransition as o}from"primereact/csstransition";import{useOverlayListener as c,useUpdateEffect as i,useUnmountEffect as l}from"primereact/hooks";import{OverlayService as a}from"primereact/overlayservice";import{Portal as u}from"primereact/portal";import{ZIndexUtils as p,ObjectUtils as s,classNames as f,mergeProps as m,DomHandler as b,IconUtils as v}from"primereact/utils";import{ComponentBase as y}from"primereact/componentbase";function d(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,c,i,l=[],a=!0,u=!1;try{if(c=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=c.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(e){if("string"==typeof e)return j(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)?j(e,t):void 0}}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e,t){return d(e)||g(e,t)||h(e,t)||O()}function E(e){return E="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},E(e)}function w(e,t){if("object"!==E(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function N(e){var t=w(e,"string");return"symbol"===E(t)?t:String(t)}function P(e,t,r){return(t=N(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var C=y.extend({defaultProps:{__TYPE:"ConfirmPopup",tagKey:void 0,target:null,visible:!1,message:null,rejectLabel:null,acceptLabel:null,icon:null,rejectIcon:null,acceptIcon:null,rejectClassName:null,acceptClassName:null,className:null,style:null,appendTo:null,dismissable:!0,footer:null,onShow:null,onHide:null,accept:null,reject:null,transitionOptions:null,children:void 0}});function x(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 I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){P(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=I(I({},e),{visible:void 0===e.visible||e.visible})).visible&&a.emit("confirm-popup",e);return{show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.emit("confirm-popup",I(I(I({},e),t),{visible:!0}))},hide:function(){a.emit("confirm-popup",{visible:!1})}}},A=e.memo(e.forwardRef((function(y,d){var g=C.getProps(y),j=S(e.useState(g.visible),2),h=j[0],O=j[1],E=S(e.useState(!1),2),w=E[0],N=E[1],P=C.setMetaData({props:g,state:{visible:h,reshow:w}}).ptm,x=e.useRef(null),k=e.useRef(null),A=e.useRef(!1),R=e.useRef(null),L=e.useRef(null),T=e.useRef(!1),D=function(){return L.current||g},H=function(e){return(L.current||g)[e]},J=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return s.getPropValue(H(e),r)},K=H("acceptLabel")||r("accept"),X=H("rejectLabel")||r("reject"),B=S(c({target:H("target"),overlay:x,listener:function(e,t){t.valid&&("outside"===t.type?g.dismissable&&!A.current&&Z("hide"):Z("hide")),A.current=!1},when:h}),2),M=B[0],_=B[1],z=function(e){A.current=!0,a.emit("overlay-click",{originalEvent:e,target:H("target")})},U=function(){T.current||(T.current=!0,J("accept"),Z("accept"))},V=function(){T.current||(T.current=!0,J("reject"),Z("reject"))},Y=function(){O(!0),N(!1),T.current=!1,R.current=function(e){!W(e.target)&&(A.current=!0)},a.on("overlay-click",R.current)},Z=function(e){O(!1),a.off("overlay-click",R.current),R.current=null,e&&J("onHide",e)},$=function(){p.set("overlay",x.current,t.autoZIndex,t.zIndex.overlay),Q()},q=function(){M(),k.current&&k.current.focus(),J("onShow")},F=function(){_()},G=function(){p.clear(x.current),A.current=!1},Q=function(){if(H("target")){b.absolutePosition(x.current,H("target"));var e=b.getOffset(x.current),t=b.getOffset(H("target")),r=0;e.left<t.left&&(r=t.left-e.left),x.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&b.addClass(x.current,"p-confirm-popup-flipped")}},W=function(e){return x&&x.current&&!(x.current.isSameNode(e)||x.current.contains(e))},ee=function(e){if(e.tagKey===g.tagKey){var t=h!==e.visible;H("target")!==e.target&&!g.target?(Z(),L.current=e,N(!0)):t&&(L.current=e,e.visible?Y():Z())}};e.useEffect((function(){g.visible?Y():Z()}),[g.visible]),e.useEffect((function(){return g.target||g.message||a.on("confirm-popup",ee),function(){a.off("confirm-popup",ee)}}),[g.target]),i((function(){w&&Y()}),[w]),l((function(){R.current&&(a.off("overlay-click",R.current),R.current=null),a.off("confirm-popup",ee),p.clear(x.current)})),e.useImperativeHandle(d,(function(){return{props:g,confirm:ee}}));var te,re,ne,oe,ce,ie,le,ae,ue,pe,se=function(){var t=f("p-confirm-popup-accept p-button-sm",H("acceptClassName")),r=f("p-confirm-popup-reject p-button-sm",{"p-button-text":!H("rejectClassName")},H("rejectClassName")),o=m({className:"p-confirm-popup-footer"},P("footer")),c=m({label:X,icon:H("rejectIcon"),className:r,onClick:V,pt:P("rejectButton")}),i=m({ref:k,label:K,icon:H("acceptIcon"),className:t,onClick:U,pt:P("acceptButton")}),l=e.createElement("div",o,e.createElement(n,c),e.createElement(n,i));if(H("footer")){var a={accept:U,reject:V,className:"p-confirm-popup-footer",acceptClassName:t,rejectClassName:r,acceptLabel:K,rejectLabel:X,element:l,props:D()};return s.getJSXElement(H("footer"),a)}return l},fe=(le=f("p-confirm-popup p-component",H("className"),{"p-input-filled":"filled"===t.inputStyle,"p-ripple-disabled":!1===t.ripple}),te=D(),re=s.getJSXElement(H("message"),te),ne=m({className:"p-confirm-popup-icon"},P("icon")),oe=v.getJSXIcon(H("icon"),I({},ne),{props:te}),ce=m({className:"p-confirm-popup-message"},P("message")),ie=m({className:"p-confirm-popup-content"},P("content")),ae=e.createElement("div",ie,oe,e.createElement("span",ce,re)),ue=se(),pe=m({ref:x,id:H("id"),className:le,style:H("style"),onClick:z},C.getOtherProps(g),P("root")),e.createElement(o,{nodeRef:x,classNames:"p-connected-overlay",in:h,timeout:{enter:120,exit:100},options:H("transitionOptions"),unmountOnExit:!0,onEnter:$,onEntered:q,onExit:F,onExited:G},e.createElement("div",pe,ae,ue)));return e.createElement(u,{element:fe,appendTo:H("appendTo"),visible:H("visible")})})));A.displayName="ConfirmPopup";export{A as ConfirmPopup,k as confirmPopup};
|