primereact 10.3.0 → 10.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.cjs.js +24 -20
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +36 -1
- package/accordion/accordion.esm.js +16 -12
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +22 -18
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +39 -33
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +14 -3
- package/api/api.esm.js +39 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +39 -33
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +24 -21
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +7 -4
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -21
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +6 -4
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +7 -6
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +3 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +4 -3
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +11 -7
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +11 -7
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +11 -7
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +12 -11
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +12 -11
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +9 -6
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +4 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +10 -8
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +158 -113
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -5
- package/calendar/calendar.esm.js +92 -47
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +158 -113
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +11 -9
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +4 -2
- package/card/card.esm.min.js +1 -1
- package/card/card.js +10 -9
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +60 -36
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +27 -4
- package/cascadeselect/cascadeselect.esm.js +46 -22
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +61 -37
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +4 -3
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -2
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +5 -4
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +31 -30
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +28 -27
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +32 -31
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +13 -7
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +17 -2
- package/chip/chip.esm.js +9 -3
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +14 -9
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +10 -8
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +5 -3
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +10 -8
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +9 -8
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/colorpicker/colorpicker.esm.js +2 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +9 -8
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +1 -1
- package/componentbase/componentbase.cjs.js +62 -50
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +63 -51
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +62 -50
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +32 -22
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +19 -3
- package/confirmdialog/confirmdialog.esm.js +30 -20
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +32 -22
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +41 -128
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +12 -2
- package/confirmpopup/confirmpopup.esm.js +36 -123
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +41 -128
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +14 -12
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +1 -1
- package/contextmenu/contextmenu.esm.js +5 -3
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -12
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1232 -649
- package/core/core.min.js +44 -44
- package/datascroller/datascroller.cjs.js +8 -7
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +3 -2
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +8 -7
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +166 -146
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +4 -3
- package/datatable/datatable.esm.js +72 -52
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +166 -146
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -3
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -3
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -3
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +40 -130
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -2
- package/dialog/dialog.esm.js +35 -125
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +41 -131
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +6 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +4 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +5 -4
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +10 -9
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +3 -2
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +10 -9
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +46 -36
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +21 -11
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +47 -37
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +8 -7
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +4 -3
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +8 -7
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +9 -8
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -2
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +9 -8
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +25 -24
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +5 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +26 -26
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +13 -12
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -3
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +14 -13
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +254 -94
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +12 -4
- package/hooks/hooks.esm.js +253 -96
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +254 -94
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +1 -1
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +1 -1
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +1 -1
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +1 -1
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +1 -1
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +1 -1
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +1 -1
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +1 -1
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +1 -1
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +1 -1
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +1 -1
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +1 -1
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +1 -1
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +1 -1
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +1 -1
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +1 -1
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +1 -1
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +1 -1
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +1 -1
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +1 -1
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +1 -1
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +1 -1
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +1 -1
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +1 -1
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +1 -1
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +1 -1
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +1 -1
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +1 -1
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +1 -1
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +1 -1
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +1 -1
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +1 -1
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +1 -1
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +1 -1
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +1 -1
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +1 -1
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +1 -1
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +1 -1
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +1 -1
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +1 -1
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +1 -1
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +1 -1
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +1 -1
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +1 -1
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +1 -1
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +1 -1
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +1 -1
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +1 -1
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +1 -1
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +1 -1
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +1 -1
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +1 -1
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +1 -1
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +1 -1
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +1 -1
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +1 -1
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +1 -1
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +1 -1
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +1 -1
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +1 -1
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +1 -1
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +1 -1
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +1 -1
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +1 -1
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +1 -1
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +1 -1
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +1 -1
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +1 -1
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +1 -1
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +1 -1
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +1 -1
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +1 -1
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +1 -1
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +1 -1
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +1 -1
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +1 -1
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +1 -1
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +1 -1
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +1 -1
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +1 -1
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +1 -1
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +1 -1
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +1 -1
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +1 -1
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +45 -151
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +26 -132
- package/image/image.esm.min.js +1 -1
- package/image/image.js +46 -152
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +12 -4
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +9 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +13 -6
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +15 -6
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +15 -6
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +15 -6
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +84 -26
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +7 -0
- package/inputnumber/inputnumber.esm.js +80 -22
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +84 -26
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +8 -7
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +6 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +8 -7
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +10 -7
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +10 -7
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +11 -9
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -1
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +4 -3
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/knob/knob.cjs.js +7 -6
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +3 -2
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +8 -7
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +31 -14
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +8 -3
- package/listbox/listbox.esm.js +23 -6
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +31 -14
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +94 -92
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +73 -71
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +94 -92
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +133 -57
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +4 -0
- package/mention/mention.esm.js +128 -52
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +133 -57
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +22 -117
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.esm.js +15 -110
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +22 -117
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +15 -13
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +4 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +15 -13
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +5 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +3 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +6 -5
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +5 -4
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +3 -2
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +6 -5
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +89 -67
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -1
- package/multiselect/multiselect.esm.js +56 -34
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +90 -68
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +5 -4
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +3 -2
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +5 -4
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +21 -18
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +11 -1
- package/orderlist/orderlist.esm.js +6 -3
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +21 -18
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +32 -19
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +15 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +31 -19
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +15 -109
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +12 -106
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +16 -110
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +271 -21
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/paginator/paginator.esm.js +265 -15
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +271 -21
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +11 -10
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -2
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +11 -10
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +39 -34
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +20 -15
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +39 -34
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +5 -3
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +1 -0
- package/passthrough/index.esm.js +5 -3
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +5 -3
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +401 -391
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +401 -391
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +401 -391
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +18 -12
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +11 -5
- package/password/password.esm.min.js +1 -1
- package/password/password.js +18 -12
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +725 -192
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +11 -1
- package/picklist/picklist.esm.js +713 -180
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +725 -192
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -1
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +7 -1
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +7 -1
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3715 -2447
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +3711 -2447
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3715 -2447
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +8 -6
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +9 -8
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +5 -3
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +6 -5
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +32 -31
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +29 -28
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +33 -32
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +9 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +4 -2
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +9 -8
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +18 -9
- package/resources/themes/arya-green/theme.css +18 -9
- package/resources/themes/arya-orange/theme.css +18 -9
- package/resources/themes/arya-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-light-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-light-purple/theme.css +18 -9
- package/resources/themes/fluent-light/theme.css +18 -9
- package/resources/themes/lara-dark-amber/theme.css +18 -9
- package/resources/themes/lara-dark-blue/theme.css +18 -9
- package/resources/themes/lara-dark-cyan/theme.css +18 -9
- package/resources/themes/lara-dark-green/theme.css +18 -9
- package/resources/themes/lara-dark-indigo/theme.css +18 -9
- package/resources/themes/lara-dark-pink/theme.css +18 -9
- package/resources/themes/lara-dark-purple/theme.css +18 -9
- package/resources/themes/lara-dark-teal/theme.css +18 -9
- package/resources/themes/lara-light-amber/theme.css +18 -9
- package/resources/themes/lara-light-blue/theme.css +18 -9
- package/resources/themes/lara-light-cyan/theme.css +18 -9
- package/resources/themes/lara-light-green/theme.css +18 -9
- package/resources/themes/lara-light-indigo/theme.css +18 -9
- package/resources/themes/lara-light-pink/theme.css +18 -9
- package/resources/themes/lara-light-purple/theme.css +18 -9
- package/resources/themes/lara-light-teal/theme.css +18 -9
- package/resources/themes/luna-amber/theme.css +18 -9
- package/resources/themes/luna-blue/theme.css +18 -9
- package/resources/themes/luna-green/theme.css +18 -9
- package/resources/themes/luna-pink/theme.css +18 -9
- package/resources/themes/md-dark-deeppurple/theme.css +18 -9
- package/resources/themes/md-dark-indigo/theme.css +18 -9
- package/resources/themes/md-light-deeppurple/theme.css +18 -9
- package/resources/themes/md-light-indigo/theme.css +18 -9
- package/resources/themes/mdc-dark-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-dark-indigo/theme.css +18 -9
- package/resources/themes/mdc-light-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-light-indigo/theme.css +18 -9
- package/resources/themes/mira/theme.css +18 -9
- package/resources/themes/nano/theme.css +18 -9
- package/resources/themes/nova/theme.css +18 -9
- package/resources/themes/nova-accent/theme.css +18 -9
- package/resources/themes/nova-alt/theme.css +18 -9
- package/resources/themes/rhea/theme.css +18 -9
- package/resources/themes/saga-blue/theme.css +18 -9
- package/resources/themes/saga-green/theme.css +18 -9
- package/resources/themes/saga-orange/theme.css +18 -9
- package/resources/themes/saga-purple/theme.css +18 -9
- package/resources/themes/soho-dark/theme.css +18 -9
- package/resources/themes/soho-light/theme.css +18 -9
- package/resources/themes/tailwind-light/theme.css +18 -9
- package/resources/themes/vela-blue/theme.css +18 -9
- package/resources/themes/vela-green/theme.css +18 -9
- package/resources/themes/vela-orange/theme.css +18 -9
- package/resources/themes/vela-purple/theme.css +18 -9
- package/resources/themes/viva-dark/theme.css +18 -9
- package/resources/themes/viva-light/theme.css +18 -9
- package/ripple/ripple.cjs.js +8 -4
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +9 -5
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +8 -4
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +4 -2
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +4 -2
- package/row/row.esm.min.js +1 -1
- package/row/row.js +4 -3
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +7 -6
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -2
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +8 -7
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +4 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +3 -2
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +4 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -3
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +4 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +7 -5
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +17 -113
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +3 -3
- package/sidebar/sidebar.esm.js +12 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +18 -114
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +3 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +3 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +4 -3
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +23 -116
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +1 -1
- package/slidemenu/slidemenu.esm.js +12 -105
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +23 -116
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +6 -5
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +4 -3
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +6 -5
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +19 -10
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +14 -5
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +19 -10
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +105 -94
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +1 -1
- package/splitbutton/splitbutton.esm.js +94 -83
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +105 -94
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +5 -4
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +3 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +5 -4
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +8 -7
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +8 -7
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +17 -14
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +12 -9
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +17 -14
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +38 -22
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +35 -0
- package/tabview/tabview.esm.js +26 -10
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +38 -22
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +5 -3
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +6 -5
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +11 -9
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +12 -11
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +14 -12
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +1 -1
- package/tieredmenu/tieredmenu.esm.js +6 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +14 -12
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +10 -8
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +10 -9
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +12 -10
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -2
- package/toast/toast.esm.js +4 -2
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +12 -10
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +78 -7
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +77 -6
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +79 -8
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +7 -5
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +7 -6
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +4 -3
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +27 -0
- package/tooltip/tooltip.esm.js +3 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +4 -3
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +1 -1
- package/tree/tree.cjs.js +267 -150
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -0
- package/tree/tree.esm.js +250 -133
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +268 -152
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +209 -71
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +26 -1
- package/treeselect/treeselect.esm.js +191 -53
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +210 -73
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +139 -107
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +86 -54
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +139 -107
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +6 -5
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +3 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +6 -5
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +52 -9
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +3 -2
- package/utils/utils.esm.js +52 -10
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +52 -9
- package/utils/utils.min.js +1 -1
- package/web-types.json +137 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.confirmdialog=function(e,t,r,n,o,a,c,i,l,u){"use strict";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(t);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function m(e){if(Array.isArray(e))return e}function b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,c,i=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.confirmdialog=function(e,t,r,n,o,a,c,i,l,u){"use strict";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(t);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function m(e){if(Array.isArray(e))return e}function b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,c,i=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function g(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function 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 y(e,t){return m(e)||b(e,t)||g(e,t)||d()}function j(e){return j="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},j(e)}function O(e,t){if("object"!==j(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function h(e){var t=O(e,"string");return"symbol"===j(t)?t:String(t)}var S=u.ComponentBase.extend({defaultProps:{__TYPE:"ConfirmDialog",accept:null,acceptClassName:null,acceptIcon:null,acceptLabel:null,appendTo:null,breakpoints:null,children:void 0,className:null,defaultFocus:"accept",footer:null,icon:null,message:null,onHide:null,reject:null,rejectClassName:null,rejectIcon:null,rejectLabel:null,tagKey:void 0,visible:void 0},css:{classes:{root:"p-confirm-dialog",message:"p-confirm-dialog-message",icon:"p-confirm-dialog-icon",acceptButton:"p-confirm-dialog-accept",rejectButton:function(e){return l.classNames("p-confirm-dialog-reject",{"p-button-text":!(0,e.getPropValue)("rejectClassName")})}}}});function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){var n,o,a;n=e,a=r[t],(o=h(o=t))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=p.memo(p.forwardRef((function(e,t){var u=a.useMergeProps(),s=p.useContext(r.PrimeReactContext),m=S.getProps(e,s),b=y(p.useState(m.visible),2),v=b[0],g=b[1],d=y(p.useState(!1),2),j=d[0],O=d[1],h=p.useRef(null),N=p.useRef(!1),C=p.useRef(null),E=function(){var e=m.group;return h.current&&(e=h.current.group),Object.assign({},m,h.current,{group:e})},w=function(e){return E()[e]},D=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(w(e),r)},_=w("acceptLabel")||r.localeOption("accept"),B=w("rejectLabel")||r.localeOption("reject"),I={props:m,state:{visible:v}},k=S.setMetaData(I),M=k.ptm,T=k.cx,x=function(){N.current||(N.current=!0,D("accept"),L("accept"))},A=function(){N.current||(N.current=!0,D("reject"),L("reject"))},U=function(){E().group===m.group&&(g(!0),N.current=!1,C.current=document.activeElement)},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cancel";g(!1),D("onHide",{result:e}),l.DomHandler.focus(C.current),C.current=null},R=function(e){if(e.tagKey===m.tagKey){var t=v!==e.visible;w("target")!==e.target&&!m.target?(L(),h.current=e,O(!0)):t&&(h.current=e,e.visible?U():L())}};p.useEffect((function(){m.visible?U():L()}),[m.visible]),p.useEffect((function(){return m.target||m.message||c.OverlayService.on("confirm-dialog",R),function(){c.OverlayService.off("confirm-dialog",R)}}),[m.target]),a.useUpdateEffect((function(){j&&U()}),[j]),a.useUnmountEffect((function(){c.OverlayService.off("confirm-dialog",R)})),p.useImperativeHandle(t,(function(){return{props:m,confirm:R}}));var F,H,J,K,V,X,z,Y=function(){var e=w("defaultFocus"),t=l.classNames("p-confirm-dialog-accept",w("acceptClassName")),r=l.classNames("p-confirm-dialog-reject",{"p-button-text":!w("rejectClassName")},w("rejectClassName")),o={label:B,autoFocus:"reject"===e,icon:w("rejectIcon"),className:l.classNames(w("rejectClassName"),T("rejectButton",{getPropValue:w})),onClick:A,pt:M("rejectButton"),unstyled:m.unstyled,__parentMetadata:{parent:I}},a=u({label:_,autoFocus:void 0===e||"accept"===e,icon:w("acceptIcon"),className:l.classNames(w("acceptClassName"),T("acceptButton")),onClick:x,pt:M("acceptButton"),unstyled:m.unstyled,__parentMetadata:{parent:I}},M("acceptButton")),c=p.createElement(p.Fragment,null,p.createElement(n.Button,o),p.createElement(n.Button,a));if(w("footer")){var i={accept:x,reject:A,acceptClassName:t,rejectClassName:r,acceptLabel:_,rejectLabel:B,element:c,props:E()};return l.ObjectUtils.getJSXElement(w("footer"),i)}return c},$=(F=E(),H=l.ObjectUtils.getJSXElement(w("message"),F),J=u({className:T("icon")},M("icon")),K=l.IconUtils.getJSXIcon(w("icon"),P({},J),{props:F}),V=Y(),X=u({className:T("message")},M("message")),z=u({visible:v,className:l.classNames(w("className"),T("root")),footer:V,onHide:L,breakpoints:w("breakpoints"),pt:F.pt,unstyled:m.unstyled,appendTo:w("appendTo"),__parentMetadata:{parent:I}},S.getOtherProps(F)),p.createElement(o.Dialog,f({},z,{content:null==e?void 0:e.content}),K,p.createElement("span",X,H)));return p.createElement(i.Portal,{element:$,appendTo:w("appendTo")})})));return C.displayName="ConfirmDialog",e.ConfirmDialog=C,e.confirmDialog=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=P(P({},e),{visible:void 0===e.visible||e.visible})).visible&&c.OverlayService.emit("confirm-dialog",e);return{show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c.OverlayService.emit("confirm-dialog",P(P(P({},e),t),{visible:!0}))},hide:function(){c.OverlayService.emit("confirm-dialog",{visible:!1})}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.button,primereact.dialog,primereact.hooks,primereact.overlayservice,primereact.portal,primereact.utils,primereact.componentbase);
|
|
@@ -176,29 +176,30 @@ var classes = {
|
|
|
176
176
|
var ConfirmPopupBase = componentbase.ComponentBase.extend({
|
|
177
177
|
defaultProps: {
|
|
178
178
|
__TYPE: 'ConfirmPopup',
|
|
179
|
-
|
|
180
|
-
target: null,
|
|
181
|
-
visible: false,
|
|
182
|
-
message: null,
|
|
183
|
-
rejectLabel: null,
|
|
184
|
-
acceptLabel: null,
|
|
185
|
-
icon: null,
|
|
186
|
-
rejectIcon: null,
|
|
187
|
-
acceptIcon: null,
|
|
188
|
-
rejectClassName: null,
|
|
179
|
+
accept: null,
|
|
189
180
|
acceptClassName: null,
|
|
190
|
-
|
|
191
|
-
|
|
181
|
+
acceptIcon: null,
|
|
182
|
+
acceptLabel: null,
|
|
192
183
|
appendTo: null,
|
|
184
|
+
children: undefined,
|
|
185
|
+
className: null,
|
|
186
|
+
closeOnEscape: true,
|
|
187
|
+
defaultFocus: 'accept',
|
|
193
188
|
dismissable: true,
|
|
194
189
|
footer: null,
|
|
195
|
-
|
|
190
|
+
icon: null,
|
|
191
|
+
message: null,
|
|
196
192
|
onHide: null,
|
|
197
|
-
|
|
193
|
+
onShow: null,
|
|
198
194
|
reject: null,
|
|
195
|
+
rejectClassName: null,
|
|
196
|
+
rejectIcon: null,
|
|
197
|
+
rejectLabel: null,
|
|
198
|
+
style: null,
|
|
199
|
+
tagKey: undefined,
|
|
200
|
+
target: null,
|
|
199
201
|
transitionOptions: null,
|
|
200
|
-
|
|
201
|
-
closeOnEscape: true
|
|
202
|
+
visible: false
|
|
202
203
|
},
|
|
203
204
|
css: {
|
|
204
205
|
classes: classes,
|
|
@@ -206,106 +207,6 @@ var ConfirmPopupBase = componentbase.ComponentBase.extend({
|
|
|
206
207
|
}
|
|
207
208
|
});
|
|
208
209
|
|
|
209
|
-
var usePrevious = function usePrevious(newValue) {
|
|
210
|
-
var ref = React__namespace.useRef(undefined);
|
|
211
|
-
React__namespace.useEffect(function () {
|
|
212
|
-
ref.current = newValue;
|
|
213
|
-
});
|
|
214
|
-
return ref.current;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
/* eslint-disable */
|
|
218
|
-
var useUnmountEffect = function useUnmountEffect(fn) {
|
|
219
|
-
return React__namespace.useEffect(function () {
|
|
220
|
-
return fn;
|
|
221
|
-
}, []);
|
|
222
|
-
};
|
|
223
|
-
/* eslint-enable */
|
|
224
|
-
|
|
225
|
-
/* eslint-disable */
|
|
226
|
-
var useEventListener = function useEventListener(_ref) {
|
|
227
|
-
var _ref$target = _ref.target,
|
|
228
|
-
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
229
|
-
type = _ref.type,
|
|
230
|
-
listener = _ref.listener,
|
|
231
|
-
options = _ref.options,
|
|
232
|
-
_ref$when = _ref.when,
|
|
233
|
-
when = _ref$when === void 0 ? true : _ref$when;
|
|
234
|
-
var targetRef = React__namespace.useRef(null);
|
|
235
|
-
var listenerRef = React__namespace.useRef(null);
|
|
236
|
-
var prevListener = usePrevious(listener);
|
|
237
|
-
var prevOptions = usePrevious(options);
|
|
238
|
-
var bind = function bind() {
|
|
239
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
240
|
-
if (utils.ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
241
|
-
unbind();
|
|
242
|
-
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(bindOptions.target));
|
|
243
|
-
}
|
|
244
|
-
if (!listenerRef.current && targetRef.current) {
|
|
245
|
-
listenerRef.current = function (event) {
|
|
246
|
-
return listener && listener(event);
|
|
247
|
-
};
|
|
248
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
var unbind = function unbind() {
|
|
252
|
-
if (listenerRef.current) {
|
|
253
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
254
|
-
listenerRef.current = null;
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
React__namespace.useEffect(function () {
|
|
258
|
-
if (when) {
|
|
259
|
-
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
260
|
-
} else {
|
|
261
|
-
unbind();
|
|
262
|
-
targetRef.current = null;
|
|
263
|
-
}
|
|
264
|
-
}, [target, when]);
|
|
265
|
-
React__namespace.useEffect(function () {
|
|
266
|
-
// to properly compare functions we can implicitly converting the function to it's body's text as a String
|
|
267
|
-
if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
|
|
268
|
-
unbind();
|
|
269
|
-
when && bind();
|
|
270
|
-
}
|
|
271
|
-
}, [listener, options, when]);
|
|
272
|
-
useUnmountEffect(function () {
|
|
273
|
-
unbind();
|
|
274
|
-
});
|
|
275
|
-
return [bind, unbind];
|
|
276
|
-
};
|
|
277
|
-
/* eslint-enable */
|
|
278
|
-
|
|
279
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
280
|
-
var handleEsc = function handleEsc(event) {
|
|
281
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
282
|
-
event.stopImmediatePropagation();
|
|
283
|
-
callback(event);
|
|
284
|
-
}
|
|
285
|
-
return;
|
|
286
|
-
};
|
|
287
|
-
var _useEventListener = useEventListener({
|
|
288
|
-
type: 'keydown',
|
|
289
|
-
listener: handleEsc
|
|
290
|
-
}),
|
|
291
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
292
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
293
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
294
|
-
React__namespace.useEffect(function () {
|
|
295
|
-
if (!condition) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
if (!ref.current) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
bindKeyDownListener();
|
|
302
|
-
return function () {
|
|
303
|
-
unbindKeyDownListener();
|
|
304
|
-
};
|
|
305
|
-
});
|
|
306
|
-
return [ref, callback];
|
|
307
|
-
};
|
|
308
|
-
|
|
309
210
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
310
211
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
311
212
|
var confirmPopup = function confirmPopup() {
|
|
@@ -331,6 +232,7 @@ var confirmPopup = function confirmPopup() {
|
|
|
331
232
|
};
|
|
332
233
|
};
|
|
333
234
|
var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
235
|
+
var mergeProps = hooks.useMergeProps();
|
|
334
236
|
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
335
237
|
var props = ConfirmPopupBase.getProps(inProps, context);
|
|
336
238
|
var _React$useState = React__namespace.useState(props.visible),
|
|
@@ -377,8 +279,15 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
377
279
|
};
|
|
378
280
|
var acceptLabel = getPropValue('acceptLabel') || PrimeReact.localeOption('accept');
|
|
379
281
|
var rejectLabel = getPropValue('rejectLabel') || PrimeReact.localeOption('reject');
|
|
380
|
-
|
|
381
|
-
|
|
282
|
+
var displayOrder = hooks.useDisplayOrder('dialog', visibleState);
|
|
283
|
+
hooks.useGlobalOnEscapeKey({
|
|
284
|
+
callback: function callback() {
|
|
285
|
+
if (props.dismissable && props.closeOnEscape) {
|
|
286
|
+
hide('hide');
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
when: visibleState && displayOrder,
|
|
290
|
+
priority: [hooks.ESC_KEY_HANDLING_PRIORITIES.DIALOG, displayOrder]
|
|
382
291
|
});
|
|
383
292
|
var _useOverlayListener = hooks.useOverlayListener({
|
|
384
293
|
target: getPropValue('target'),
|
|
@@ -455,8 +364,12 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
455
364
|
};
|
|
456
365
|
var onEntered = function onEntered() {
|
|
457
366
|
bindOverlayListener();
|
|
458
|
-
|
|
459
|
-
|
|
367
|
+
var defaultFocus = getPropValue('defaultFocus');
|
|
368
|
+
if (defaultFocus === undefined || defaultFocus === 'accept') {
|
|
369
|
+
acceptBtnRef.current && acceptBtnRef.current.focus();
|
|
370
|
+
}
|
|
371
|
+
if (defaultFocus === 'reject') {
|
|
372
|
+
rejectBtnRef.current && rejectBtnRef.current.focus();
|
|
460
373
|
}
|
|
461
374
|
callbackFromProp('onShow');
|
|
462
375
|
};
|
|
@@ -532,16 +445,16 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
532
445
|
var createContent = function createContent() {
|
|
533
446
|
var currentProps = getCurrentProps();
|
|
534
447
|
var message = utils.ObjectUtils.getJSXElement(getPropValue('message'), currentProps);
|
|
535
|
-
var iconProps =
|
|
448
|
+
var iconProps = mergeProps({
|
|
536
449
|
className: cx('icon')
|
|
537
450
|
}, ptm('icon'));
|
|
538
451
|
var icon = utils.IconUtils.getJSXIcon(getPropValue('icon'), _objectSpread({}, iconProps), {
|
|
539
452
|
props: currentProps
|
|
540
453
|
});
|
|
541
|
-
var messageProps =
|
|
454
|
+
var messageProps = mergeProps({
|
|
542
455
|
className: cx('message')
|
|
543
456
|
}, ptm('message'));
|
|
544
|
-
var contentProps =
|
|
457
|
+
var contentProps = mergeProps({
|
|
545
458
|
className: cx('content')
|
|
546
459
|
}, ptm('content'));
|
|
547
460
|
return /*#__PURE__*/React__namespace.createElement("div", contentProps, icon, /*#__PURE__*/React__namespace.createElement("span", messageProps, message));
|
|
@@ -551,10 +464,10 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
551
464
|
var rejectClassName = utils.classNames('p-confirm-popup-reject p-button-sm', {
|
|
552
465
|
'p-button-text': !getPropValue('rejectClassName')
|
|
553
466
|
}, getPropValue('rejectClassName'));
|
|
554
|
-
var footerProps =
|
|
467
|
+
var footerProps = mergeProps({
|
|
555
468
|
className: cx('footer')
|
|
556
469
|
}, ptm('footer'));
|
|
557
|
-
var rejectButtonProps =
|
|
470
|
+
var rejectButtonProps = mergeProps({
|
|
558
471
|
ref: rejectBtnRef,
|
|
559
472
|
label: rejectLabel,
|
|
560
473
|
icon: getPropValue('rejectIcon'),
|
|
@@ -568,7 +481,7 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
568
481
|
parent: metaData
|
|
569
482
|
}
|
|
570
483
|
});
|
|
571
|
-
var acceptButtonProps =
|
|
484
|
+
var acceptButtonProps = mergeProps({
|
|
572
485
|
ref: acceptBtnRef,
|
|
573
486
|
label: acceptLabel,
|
|
574
487
|
icon: getPropValue('acceptIcon'),
|
|
@@ -599,7 +512,7 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
599
512
|
}
|
|
600
513
|
return content;
|
|
601
514
|
};
|
|
602
|
-
var rootProps =
|
|
515
|
+
var rootProps = mergeProps({
|
|
603
516
|
ref: overlayRef,
|
|
604
517
|
id: getPropValue('id'),
|
|
605
518
|
className: cx('root', {
|
|
@@ -609,7 +522,7 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
609
522
|
style: getPropValue('style'),
|
|
610
523
|
onClick: onPanelClick
|
|
611
524
|
}, ConfirmPopupBase.getOtherProps(props), ptm('root'));
|
|
612
|
-
var transitionProps =
|
|
525
|
+
var transitionProps = mergeProps({
|
|
613
526
|
classNames: cx('transition'),
|
|
614
527
|
"in": visibleState,
|
|
615
528
|
timeout: {
|
|
@@ -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/componentbase"),o=require("primereact/csstransition"),c=require("primereact/hooks"),i=require("primereact/overlayservice"),u=require("primereact/portal"),a=require("primereact/utils");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(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 s=p(e),f=l(t);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function d(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,u=[],a=!0,l=!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)&&(u.push(n.value),u.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}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 g(){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 O(e,t){return d(e)||v(e,t)||y(e,t)||g()}function j(e){return j="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},j(e)}function E(e,t){if("object"!==j(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function P(e){var t=E(e,"string");return"symbol"===j(t)?t:String(t)}var S=n.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,closeOnEscape:!0},css:{classes:{root:function(e){var t=e.context;return a.classNames("p-confirm-popup p-component",(0,e.getPropValue)("className"),{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===f.default.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===f.default.ripple})},acceptButton:function(e){return a.classNames("p-confirm-popup-accept p-button-sm",(0,e.getPropValue)("acceptClassName"))},rejectButton:function(e){var t=e.getPropValue;return a.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!t("rejectClassName")},t("rejectClassName"))},content:"p-confirm-popup-content",icon:"p-confirm-popup-icon",message:"p-confirm-popup-message",footer:"p-confirm-popup-footer",transition:"p-connected-overlay"},styles:'\n@layer primereact {\n .p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-confirm-popup:after, .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n }\n \n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n'}}),h=function(e){var t=s.useRef(void 0);return s.useEffect((function(){t.current=e})),t.current},x=function(e,t,r){var n,o,c,i,u,l,p,f,m,d,v,b,y,g,j,E=(i=void 0===(c=(n={type:"keydown",listener:function(e){"Esc"!==e.key&&"Escape"!==e.key||(e.stopImmediatePropagation(),r(e))}}).target)?"document":c,u=n.type,l=n.listener,p=n.options,m=void 0===(f=n.when)||f,d=s.useRef(null),v=s.useRef(null),b=h(l),y=h(p),g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.ObjectUtils.isNotEmpty(e.target)&&(j(),(e.when||m)&&(d.current=a.DomHandler.getTargetElement(e.target))),!v.current&&d.current&&(v.current=function(e){return l&&l(e)},d.current.addEventListener(u,v.current,p))},j=function(){v.current&&(d.current.removeEventListener(u,v.current,p),v.current=null)},s.useEffect((function(){m?d.current=a.DomHandler.getTargetElement(i):(j(),d.current=null)}),[i,m]),s.useEffect((function(){!v.current||""+b==""+l&&y===p||(j(),m&&g())}),[l,p,m]),o=function(){j()},s.useEffect((function(){return o}),[]),[g,j]),P=O(E,2),S=P[0],x=P[1];return s.useEffect((function(){if(t&&e.current)return S(),function(){x()}})),[e,r]};function w(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?w(Object(r),!0).forEach((function(t){var n,o,c;n=e,c=r[t],(o=P(o=t))in n?Object.defineProperty(n,o,{value:c,enumerable:!0,configurable:!0,writable:!0}):n[o]=c})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=s.memo(s.forwardRef((function(e,l){var p=s.useContext(t.PrimeReactContext),d=S.getProps(e,p),v=O(s.useState(d.visible),2),b=v[0],y=v[1],g=O(s.useState(!1),2),j=g[0],E=g[1],P={props:d,state:{visible:b,reshow:j}},h=S.setMetaData(P),w=h.ptm,C=h.cx,I=h.isUnstyled;n.useHandleStyle(S.css.styles,I,{name:"confirmpopup"});var R=s.useRef(null),D=s.useRef(null),U=s.useRef(null),k=s.useRef(!1),H=s.useRef(null),B=s.useRef(null),L=s.useRef(null),T=s.useRef(!1),_=function(){return B.current||d},q=function(e){return(B.current||d)[e]},A=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 a.ObjectUtils.getPropValue(q(e),r)},V=q("acceptLabel")||t.localeOption("accept"),M=q("rejectLabel")||t.localeOption("reject");x(R,d.dismissable&&d.closeOnEscape,(function(e){$("hide")}));var J=O(c.useOverlayListener({target:q("target"),overlay:R,listener:function(e,t){t.valid&&("outside"===t.type?d.dismissable&&!k.current&&$("hide"):$("hide")),k.current=!1},when:b}),2),X=J[0],Z=J[1],z=function(){T.current||(T.current=!0,A("accept"),$("accept"))},K=function(){T.current||(T.current=!0,A("reject"),$("reject"))},Y=function(){var e=_();E(!1),e.group===d.group&&(y(!0),T.current=!1,H.current=function(e){!G(e.target)&&(k.current=!0)},i.OverlayService.on("overlay-click",H.current),L.current=document.activeElement)},$=function(e){y(!1),i.OverlayService.off("overlay-click",H.current),H.current=null,e&&A("onHide",e),a.DomHandler.focus(L.current),L.current=null},F=function(){if(q("target")){a.DomHandler.absolutePosition(R.current,q("target"));var e=a.DomHandler.getOffset(R.current),t=a.DomHandler.getOffset(q("target")),r=0;e.left<t.left&&(r=t.left-e.left),R.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&!I()&&a.DomHandler.addClass(R.current,"p-confirm-popup-flipped")}},G=function(e){return R&&R.current&&!(R.current.isSameNode(e)||R.current.contains(e))},Q=function(e){if(e.tagKey===d.tagKey){var t=b!==e.visible;q("target")!==e.target&&!d.target?($(),B.current=e,E(!0)):t&&(B.current=e,e.visible?Y():$())}};s.useEffect((function(){d.visible?Y():$()}),[d.visible]),s.useEffect((function(){return d.target||d.message||i.OverlayService.on("confirm-popup",Q),function(){i.OverlayService.off("confirm-popup",Q)}}),[d.target]),c.useUpdateEffect((function(){j&&Y()}),[j]),c.useUnmountEffect((function(){H.current&&(i.OverlayService.off("overlay-click",H.current),H.current=null),i.OverlayService.off("confirm-popup",Q),a.ZIndexUtils.clear(R.current)})),s.useImperativeHandle(l,(function(){return{props:d,confirm:Q}}));var W,ee,te=function(){var e=a.classNames("p-confirm-popup-accept p-button-sm",q("acceptClassName")),t=a.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!q("rejectClassName")},q("rejectClassName")),n=a.mergeProps({className:C("footer")},w("footer")),o=a.mergeProps({ref:U,label:M,icon:q("rejectIcon"),className:C("rejectButton",{getPropValue:q}),onClick:K,pt:w("rejectButton"),unstyled:d.unstyled,__parentMetadata:{parent:P}}),c=a.mergeProps({ref:D,label:V,icon:q("acceptIcon"),className:C("acceptButton",{getPropValue:q}),onClick:z,pt:w("acceptButton"),unstyled:d.unstyled,__parentMetadata:{parent:P}}),i=s.createElement("div",n,s.createElement(r.Button,o),s.createElement(r.Button,c));if(q("footer")){var u={accept:z,reject:K,className:"p-confirm-popup-footer",acceptClassName:e,rejectClassName:t,acceptLabel:V,rejectLabel:M,element:i,props:_()};return a.ObjectUtils.getJSXElement(q("footer"),u)}return i},re=a.mergeProps({ref:R,id:q("id"),className:C("root",{context:p,getPropValue:q}),style:q("style"),onClick:function(e){k.current=!0,i.OverlayService.emit("overlay-click",{originalEvent:e,target:q("target")})}},S.getOtherProps(d),w("root")),ne=a.mergeProps({classNames:C("transition"),in:b,timeout:{enter:120,exit:100},options:q("transitionOptions"),unmountOnExit:!0,onEnter:function(){a.ZIndexUtils.set("overlay",R.current,p&&p.autoZIndex||f.default.autoZIndex,p&&p.zIndex.overlay||f.default.zIndex.overlay),a.DomHandler.addStyles(R.current,{position:"absolute",top:"50%",left:"50%",marginTop:"10px"}),F()},onEntered:function(){X(),D.current&&D.current.focus(),A("onShow")},onExit:function(){Z()},onExited:function(){a.ZIndexUtils.clear(R.current),k.current=!1}},w("transition")),oe=null!=e&&e.content?(W=_(),ee={message:a.ObjectUtils.getJSXElement(q("message"),W),acceptBtnRef:D,rejectBtnRef:U,hide:$},s.createElement(o.CSSTransition,m({nodeRef:R},ne),s.createElement("div",re,a.ObjectUtils.getJSXElement(e.content,ee)))):function(){var e,t,r,n,c,i,u=(e=_(),t=a.ObjectUtils.getJSXElement(q("message"),e),r=a.mergeProps({className:C("icon")},w("icon")),n=a.IconUtils.getJSXIcon(q("icon"),N({},r),{props:e}),c=a.mergeProps({className:C("message")},w("message")),i=a.mergeProps({className:C("content")},w("content")),s.createElement("div",i,n,s.createElement("span",c,t))),l=te();return s.createElement(o.CSSTransition,m({nodeRef:R},ne),s.createElement("div",re,u,l))}();return s.createElement(u.Portal,{element:oe,appendTo:q("appendTo"),visible:q("visible")})})));C.displayName="ConfirmPopup",exports.ConfirmPopup=C,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&&i.OverlayService.emit("confirm-popup",e);return{show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.OverlayService.emit("confirm-popup",N(N(N({},e),t),{visible:!0}))},hide:function(){i.OverlayService.emit("confirm-popup",{visible:!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/componentbase"),o=require("primereact/csstransition"),c=require("primereact/hooks"),i=require("primereact/overlayservice"),a=require("primereact/portal"),l=require("primereact/utils");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(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 s=p(e),f=u(t);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function d(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,a=[],l=!0,u=!1;try{if(c=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=c.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return a}}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 g(){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 O(e,t){return d(e)||v(e,t)||y(e,t)||g()}function j(e){return j="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},j(e)}function S(e,t){if("object"!==j(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function h(e){var t=S(e,"string");return"symbol"===j(t)?t:String(t)}var E=n.ComponentBase.extend({defaultProps:{__TYPE:"ConfirmPopup",accept:null,acceptClassName:null,acceptIcon:null,acceptLabel:null,appendTo:null,children:void 0,className:null,closeOnEscape:!0,defaultFocus:"accept",dismissable:!0,footer:null,icon:null,message:null,onHide:null,onShow:null,reject:null,rejectClassName:null,rejectIcon:null,rejectLabel:null,style:null,tagKey:void 0,target:null,transitionOptions:null,visible:!1},css:{classes:{root:function(e){var t=e.context;return l.classNames("p-confirm-popup p-component",(0,e.getPropValue)("className"),{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===f.default.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===f.default.ripple})},acceptButton:function(e){return l.classNames("p-confirm-popup-accept p-button-sm",(0,e.getPropValue)("acceptClassName"))},rejectButton:function(e){var t=e.getPropValue;return l.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!t("rejectClassName")},t("rejectClassName"))},content:"p-confirm-popup-content",icon:"p-confirm-popup-icon",message:"p-confirm-popup-message",footer:"p-confirm-popup-footer",transition:"p-connected-overlay"},styles:'\n@layer primereact {\n .p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-confirm-popup:after, .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n }\n \n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n'}});function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){var n,o,c;n=e,c=r[t],(o=h(o=t))in n?Object.defineProperty(n,o,{value:c,enumerable:!0,configurable:!0,writable:!0}):n[o]=c})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N=s.memo(s.forwardRef((function(e,u){var p=c.useMergeProps(),d=s.useContext(t.PrimeReactContext),v=E.getProps(e,d),b=O(s.useState(v.visible),2),y=b[0],g=b[1],j=O(s.useState(!1),2),S=j[0],h=j[1],P={props:v,state:{visible:y,reshow:S}},N=E.setMetaData(P),w=N.ptm,C=N.cx,I=N.isUnstyled;n.useHandleStyle(E.css.styles,I,{name:"confirmpopup"});var R=s.useRef(null),D=s.useRef(null),U=s.useRef(null),_=s.useRef(!1),k=s.useRef(null),A=s.useRef(null),B=s.useRef(null),H=s.useRef(!1),L=function(){return A.current||v},T=function(e){return(A.current||v)[e]},q=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(T(e),r)},M=T("acceptLabel")||t.localeOption("accept"),V=T("rejectLabel")||t.localeOption("reject"),J=c.useDisplayOrder("dialog",y);c.useGlobalOnEscapeKey({callback:function(){v.dismissable&&v.closeOnEscape&&Y("hide")},when:y&&J,priority:[c.ESC_KEY_HANDLING_PRIORITIES.DIALOG,J]});var K=O(c.useOverlayListener({target:T("target"),overlay:R,listener:function(e,t){t.valid&&("outside"===t.type?v.dismissable&&!_.current&&Y("hide"):Y("hide")),_.current=!1},when:y}),2),X=K[0],Z=K[1],z=function(){H.current||(H.current=!0,q("accept"),Y("accept"))},G=function(){H.current||(H.current=!0,q("reject"),Y("reject"))},F=function(){var e=L();h(!1),e.group===v.group&&(g(!0),H.current=!1,k.current=function(e){!Q(e.target)&&(_.current=!0)},i.OverlayService.on("overlay-click",k.current),B.current=document.activeElement)},Y=function(e){g(!1),i.OverlayService.off("overlay-click",k.current),k.current=null,e&&q("onHide",e),l.DomHandler.focus(B.current),B.current=null},$=function(){if(T("target")){l.DomHandler.absolutePosition(R.current,T("target"));var e=l.DomHandler.getOffset(R.current),t=l.DomHandler.getOffset(T("target")),r=0;e.left<t.left&&(r=t.left-e.left),R.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&!I()&&l.DomHandler.addClass(R.current,"p-confirm-popup-flipped")}},Q=function(e){return R&&R.current&&!(R.current.isSameNode(e)||R.current.contains(e))},W=function(e){if(e.tagKey===v.tagKey){var t=y!==e.visible;T("target")!==e.target&&!v.target?(Y(),A.current=e,h(!0)):t&&(A.current=e,e.visible?F():Y())}};s.useEffect((function(){v.visible?F():Y()}),[v.visible]),s.useEffect((function(){return v.target||v.message||i.OverlayService.on("confirm-popup",W),function(){i.OverlayService.off("confirm-popup",W)}}),[v.target]),c.useUpdateEffect((function(){S&&F()}),[S]),c.useUnmountEffect((function(){k.current&&(i.OverlayService.off("overlay-click",k.current),k.current=null),i.OverlayService.off("confirm-popup",W),l.ZIndexUtils.clear(R.current)})),s.useImperativeHandle(u,(function(){return{props:v,confirm:W}}));var ee,te,re=function(){var e=l.classNames("p-confirm-popup-accept p-button-sm",T("acceptClassName")),t=l.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!T("rejectClassName")},T("rejectClassName")),n=p({className:C("footer")},w("footer")),o=p({ref:U,label:V,icon:T("rejectIcon"),className:C("rejectButton",{getPropValue:T}),onClick:G,pt:w("rejectButton"),unstyled:v.unstyled,__parentMetadata:{parent:P}}),c=p({ref:D,label:M,icon:T("acceptIcon"),className:C("acceptButton",{getPropValue:T}),onClick:z,pt:w("acceptButton"),unstyled:v.unstyled,__parentMetadata:{parent:P}}),i=s.createElement("div",n,s.createElement(r.Button,o),s.createElement(r.Button,c));if(T("footer")){var a={accept:z,reject:G,className:"p-confirm-popup-footer",acceptClassName:e,rejectClassName:t,acceptLabel:M,rejectLabel:V,element:i,props:L()};return l.ObjectUtils.getJSXElement(T("footer"),a)}return i},ne=p({ref:R,id:T("id"),className:C("root",{context:d,getPropValue:T}),style:T("style"),onClick:function(e){_.current=!0,i.OverlayService.emit("overlay-click",{originalEvent:e,target:T("target")})}},E.getOtherProps(v),w("root")),oe=p({classNames:C("transition"),in:y,timeout:{enter:120,exit:100},options:T("transitionOptions"),unmountOnExit:!0,onEnter:function(){l.ZIndexUtils.set("overlay",R.current,d&&d.autoZIndex||f.default.autoZIndex,d&&d.zIndex.overlay||f.default.zIndex.overlay),l.DomHandler.addStyles(R.current,{position:"absolute",top:"50%",left:"50%",marginTop:"10px"}),$()},onEntered:function(){X();var e=T("defaultFocus");void 0!==e&&"accept"!==e||D.current&&D.current.focus(),"reject"===e&&U.current&&U.current.focus(),q("onShow")},onExit:function(){Z()},onExited:function(){l.ZIndexUtils.clear(R.current),_.current=!1}},w("transition")),ce=null!=e&&e.content?(ee=L(),te={message:l.ObjectUtils.getJSXElement(T("message"),ee),acceptBtnRef:D,rejectBtnRef:U,hide:Y},s.createElement(o.CSSTransition,m({nodeRef:R},oe),s.createElement("div",ne,l.ObjectUtils.getJSXElement(e.content,te)))):function(){var e,t,r,n,c,i,a=(e=L(),t=l.ObjectUtils.getJSXElement(T("message"),e),r=p({className:C("icon")},w("icon")),n=l.IconUtils.getJSXIcon(T("icon"),x({},r),{props:e}),c=p({className:C("message")},w("message")),i=p({className:C("content")},w("content")),s.createElement("div",i,n,s.createElement("span",c,t))),u=re();return s.createElement(o.CSSTransition,m({nodeRef:R},oe),s.createElement("div",ne,a,u))}();return s.createElement(a.Portal,{element:ce,appendTo:T("appendTo"),visible:T("visible")})})));N.displayName="ConfirmPopup",exports.ConfirmPopup=N,exports.confirmPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=x(x({},e),{visible:void 0===e.visible||e.visible})).visible&&i.OverlayService.emit("confirm-popup",e);return{show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.OverlayService.emit("confirm-popup",x(x(x({},e),t),{visible:!0}))},hide:function(){i.OverlayService.emit("confirm-popup",{visible:!1})}}};
|
|
@@ -122,6 +122,11 @@ interface ConfirmPopupOptions {
|
|
|
122
122
|
* @defaultValue No
|
|
123
123
|
*/
|
|
124
124
|
rejectLabel: string;
|
|
125
|
+
/**
|
|
126
|
+
* Element to receive the focus when the dialog gets visible, valid values are "accept" and "reject".
|
|
127
|
+
* @defaultValue accept
|
|
128
|
+
*/
|
|
129
|
+
defaultFocus: string;
|
|
125
130
|
/**
|
|
126
131
|
* Default element created by the component.
|
|
127
132
|
*/
|
|
@@ -178,6 +183,11 @@ export interface ConfirmPopupProps {
|
|
|
178
183
|
* @defaultValue false
|
|
179
184
|
*/
|
|
180
185
|
visible?: boolean | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Element to receive the focus when the dialog gets visible, valid values are "accept" and "reject".
|
|
188
|
+
* @defaultValue accept
|
|
189
|
+
*/
|
|
190
|
+
defaultFocus?: string | undefined;
|
|
181
191
|
/**
|
|
182
192
|
* Message of the confirmation.
|
|
183
193
|
*/
|
|
@@ -224,7 +234,7 @@ export interface ConfirmPopupProps {
|
|
|
224
234
|
* DOM element instance where the overlay panel should be mounted. Valid values are any DOM Element and 'self'. The self value is used to render a component where it is located.
|
|
225
235
|
* @defaultValue document.body
|
|
226
236
|
*/
|
|
227
|
-
appendTo?: 'self' | HTMLElement | undefined | null;
|
|
237
|
+
appendTo?: 'self' | HTMLElement | undefined | null | (() => HTMLElement);
|
|
228
238
|
/**
|
|
229
239
|
* Enables to hide the popup when outside is clicked.
|
|
230
240
|
* @defaultValue true
|
|
@@ -284,7 +294,7 @@ export interface ConfirmPopupProps {
|
|
|
284
294
|
* @param {ContentProps} props - The values of dialog.
|
|
285
295
|
* @return {React.ReactNode}
|
|
286
296
|
*/
|
|
287
|
-
content
|
|
297
|
+
content?: React.ReactNode | ((props: ContentProps) => React.ReactNode);
|
|
288
298
|
}
|
|
289
299
|
|
|
290
300
|
/**
|
|
@@ -4,10 +4,10 @@ import PrimeReact, { PrimeReactContext, localeOption } from 'primereact/api';
|
|
|
4
4
|
import { Button } from 'primereact/button';
|
|
5
5
|
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
6
|
import { CSSTransition } from 'primereact/csstransition';
|
|
7
|
-
import { useOverlayListener, useUpdateEffect, useUnmountEffect
|
|
7
|
+
import { useMergeProps, useDisplayOrder, useGlobalOnEscapeKey, ESC_KEY_HANDLING_PRIORITIES, useOverlayListener, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
8
8
|
import { OverlayService } from 'primereact/overlayservice';
|
|
9
9
|
import { Portal } from 'primereact/portal';
|
|
10
|
-
import { classNames, DomHandler,
|
|
10
|
+
import { classNames, DomHandler, ZIndexUtils, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
11
11
|
|
|
12
12
|
function _extends() {
|
|
13
13
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -149,29 +149,30 @@ var classes = {
|
|
|
149
149
|
var ConfirmPopupBase = ComponentBase.extend({
|
|
150
150
|
defaultProps: {
|
|
151
151
|
__TYPE: 'ConfirmPopup',
|
|
152
|
-
|
|
153
|
-
target: null,
|
|
154
|
-
visible: false,
|
|
155
|
-
message: null,
|
|
156
|
-
rejectLabel: null,
|
|
157
|
-
acceptLabel: null,
|
|
158
|
-
icon: null,
|
|
159
|
-
rejectIcon: null,
|
|
160
|
-
acceptIcon: null,
|
|
161
|
-
rejectClassName: null,
|
|
152
|
+
accept: null,
|
|
162
153
|
acceptClassName: null,
|
|
163
|
-
|
|
164
|
-
|
|
154
|
+
acceptIcon: null,
|
|
155
|
+
acceptLabel: null,
|
|
165
156
|
appendTo: null,
|
|
157
|
+
children: undefined,
|
|
158
|
+
className: null,
|
|
159
|
+
closeOnEscape: true,
|
|
160
|
+
defaultFocus: 'accept',
|
|
166
161
|
dismissable: true,
|
|
167
162
|
footer: null,
|
|
168
|
-
|
|
163
|
+
icon: null,
|
|
164
|
+
message: null,
|
|
169
165
|
onHide: null,
|
|
170
|
-
|
|
166
|
+
onShow: null,
|
|
171
167
|
reject: null,
|
|
168
|
+
rejectClassName: null,
|
|
169
|
+
rejectIcon: null,
|
|
170
|
+
rejectLabel: null,
|
|
171
|
+
style: null,
|
|
172
|
+
tagKey: undefined,
|
|
173
|
+
target: null,
|
|
172
174
|
transitionOptions: null,
|
|
173
|
-
|
|
174
|
-
closeOnEscape: true
|
|
175
|
+
visible: false
|
|
175
176
|
},
|
|
176
177
|
css: {
|
|
177
178
|
classes: classes,
|
|
@@ -179,106 +180,6 @@ var ConfirmPopupBase = ComponentBase.extend({
|
|
|
179
180
|
}
|
|
180
181
|
});
|
|
181
182
|
|
|
182
|
-
var usePrevious = function usePrevious(newValue) {
|
|
183
|
-
var ref = React.useRef(undefined);
|
|
184
|
-
React.useEffect(function () {
|
|
185
|
-
ref.current = newValue;
|
|
186
|
-
});
|
|
187
|
-
return ref.current;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
/* eslint-disable */
|
|
191
|
-
var useUnmountEffect = function useUnmountEffect(fn) {
|
|
192
|
-
return React.useEffect(function () {
|
|
193
|
-
return fn;
|
|
194
|
-
}, []);
|
|
195
|
-
};
|
|
196
|
-
/* eslint-enable */
|
|
197
|
-
|
|
198
|
-
/* eslint-disable */
|
|
199
|
-
var useEventListener = function useEventListener(_ref) {
|
|
200
|
-
var _ref$target = _ref.target,
|
|
201
|
-
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
202
|
-
type = _ref.type,
|
|
203
|
-
listener = _ref.listener,
|
|
204
|
-
options = _ref.options,
|
|
205
|
-
_ref$when = _ref.when,
|
|
206
|
-
when = _ref$when === void 0 ? true : _ref$when;
|
|
207
|
-
var targetRef = React.useRef(null);
|
|
208
|
-
var listenerRef = React.useRef(null);
|
|
209
|
-
var prevListener = usePrevious(listener);
|
|
210
|
-
var prevOptions = usePrevious(options);
|
|
211
|
-
var bind = function bind() {
|
|
212
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
213
|
-
if (ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
214
|
-
unbind();
|
|
215
|
-
(bindOptions.when || when) && (targetRef.current = DomHandler.getTargetElement(bindOptions.target));
|
|
216
|
-
}
|
|
217
|
-
if (!listenerRef.current && targetRef.current) {
|
|
218
|
-
listenerRef.current = function (event) {
|
|
219
|
-
return listener && listener(event);
|
|
220
|
-
};
|
|
221
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
var unbind = function unbind() {
|
|
225
|
-
if (listenerRef.current) {
|
|
226
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
227
|
-
listenerRef.current = null;
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
React.useEffect(function () {
|
|
231
|
-
if (when) {
|
|
232
|
-
targetRef.current = DomHandler.getTargetElement(target);
|
|
233
|
-
} else {
|
|
234
|
-
unbind();
|
|
235
|
-
targetRef.current = null;
|
|
236
|
-
}
|
|
237
|
-
}, [target, when]);
|
|
238
|
-
React.useEffect(function () {
|
|
239
|
-
// to properly compare functions we can implicitly converting the function to it's body's text as a String
|
|
240
|
-
if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
|
|
241
|
-
unbind();
|
|
242
|
-
when && bind();
|
|
243
|
-
}
|
|
244
|
-
}, [listener, options, when]);
|
|
245
|
-
useUnmountEffect(function () {
|
|
246
|
-
unbind();
|
|
247
|
-
});
|
|
248
|
-
return [bind, unbind];
|
|
249
|
-
};
|
|
250
|
-
/* eslint-enable */
|
|
251
|
-
|
|
252
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
253
|
-
var handleEsc = function handleEsc(event) {
|
|
254
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
255
|
-
event.stopImmediatePropagation();
|
|
256
|
-
callback(event);
|
|
257
|
-
}
|
|
258
|
-
return;
|
|
259
|
-
};
|
|
260
|
-
var _useEventListener = useEventListener({
|
|
261
|
-
type: 'keydown',
|
|
262
|
-
listener: handleEsc
|
|
263
|
-
}),
|
|
264
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
265
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
266
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
267
|
-
React.useEffect(function () {
|
|
268
|
-
if (!condition) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
if (!ref.current) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
bindKeyDownListener();
|
|
275
|
-
return function () {
|
|
276
|
-
unbindKeyDownListener();
|
|
277
|
-
};
|
|
278
|
-
});
|
|
279
|
-
return [ref, callback];
|
|
280
|
-
};
|
|
281
|
-
|
|
282
183
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
283
184
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
284
185
|
var confirmPopup = function confirmPopup() {
|
|
@@ -304,6 +205,7 @@ var confirmPopup = function confirmPopup() {
|
|
|
304
205
|
};
|
|
305
206
|
};
|
|
306
207
|
var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
208
|
+
var mergeProps = useMergeProps();
|
|
307
209
|
var context = React.useContext(PrimeReactContext);
|
|
308
210
|
var props = ConfirmPopupBase.getProps(inProps, context);
|
|
309
211
|
var _React$useState = React.useState(props.visible),
|
|
@@ -350,8 +252,15 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
350
252
|
};
|
|
351
253
|
var acceptLabel = getPropValue('acceptLabel') || localeOption('accept');
|
|
352
254
|
var rejectLabel = getPropValue('rejectLabel') || localeOption('reject');
|
|
353
|
-
|
|
354
|
-
|
|
255
|
+
var displayOrder = useDisplayOrder('dialog', visibleState);
|
|
256
|
+
useGlobalOnEscapeKey({
|
|
257
|
+
callback: function callback() {
|
|
258
|
+
if (props.dismissable && props.closeOnEscape) {
|
|
259
|
+
hide('hide');
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
when: visibleState && displayOrder,
|
|
263
|
+
priority: [ESC_KEY_HANDLING_PRIORITIES.DIALOG, displayOrder]
|
|
355
264
|
});
|
|
356
265
|
var _useOverlayListener = useOverlayListener({
|
|
357
266
|
target: getPropValue('target'),
|
|
@@ -428,8 +337,12 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
428
337
|
};
|
|
429
338
|
var onEntered = function onEntered() {
|
|
430
339
|
bindOverlayListener();
|
|
431
|
-
|
|
432
|
-
|
|
340
|
+
var defaultFocus = getPropValue('defaultFocus');
|
|
341
|
+
if (defaultFocus === undefined || defaultFocus === 'accept') {
|
|
342
|
+
acceptBtnRef.current && acceptBtnRef.current.focus();
|
|
343
|
+
}
|
|
344
|
+
if (defaultFocus === 'reject') {
|
|
345
|
+
rejectBtnRef.current && rejectBtnRef.current.focus();
|
|
433
346
|
}
|
|
434
347
|
callbackFromProp('onShow');
|
|
435
348
|
};
|
|
@@ -488,7 +401,7 @@ var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
488
401
|
useUpdateEffect(function () {
|
|
489
402
|
reshowState && show();
|
|
490
403
|
}, [reshowState]);
|
|
491
|
-
useUnmountEffect
|
|
404
|
+
useUnmountEffect(function () {
|
|
492
405
|
if (overlayEventListener.current) {
|
|
493
406
|
OverlayService.off('overlay-click', overlayEventListener.current);
|
|
494
407
|
overlayEventListener.current = null;
|