primereact 10.2.1 → 10.3.1
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 +83 -8
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +35 -0
- package/accordion/accordion.esm.js +85 -10
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +83 -8
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +63 -33
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +24 -246
- package/api/api.esm.js +63 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +63 -33
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +3 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +3 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/blockui.cjs.js +8 -5
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +8 -5
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +8 -5
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +12 -6
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -6
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +12 -6
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +71 -37
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -5
- package/calendar/calendar.esm.js +71 -37
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +71 -37
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +103 -9
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +104 -10
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +103 -9
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +64 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +27 -4
- package/cascadeselect/cascadeselect.esm.js +65 -24
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +65 -25
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +25 -25
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +25 -25
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +26 -26
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +5 -2
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +17 -2
- package/chip/chip.esm.js +5 -2
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +5 -2
- package/chip/chip.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/componentbase/componentbase.cjs.js +49 -8
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +50 -9
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +49 -8
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +30 -22
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +19 -3
- package/confirmdialog/confirmdialog.esm.js +30 -22
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +30 -22
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +85 -152
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +40 -1
- package/confirmpopup/confirmpopup.esm.js +88 -155
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +85 -152
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +641 -99
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +23 -1
- package/contextmenu/contextmenu.esm.js +641 -99
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +641 -99
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1217 -484
- package/core/core.min.js +40 -40
- package/datatable/datatable.cjs.js +30 -26
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +5 -4
- package/datatable/datatable.esm.js +30 -26
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +30 -26
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +1 -1
- package/dialog/dialog.cjs.js +108 -151
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +60 -1
- package/dialog/dialog.esm.js +115 -158
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +109 -152
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +1 -0
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -0
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -0
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +169 -33
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +15 -0
- package/dock/dock.esm.js +170 -34
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +169 -33
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +29 -4
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +29 -4
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +30 -6
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +12 -5
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +12 -5
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +12 -5
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +14 -6
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +17 -1
- package/fileupload/fileupload.esm.js +14 -6
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +14 -6
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +223 -43
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +225 -45
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +223 -43
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +219 -78
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +8 -4
- package/hooks/hooks.esm.js +219 -80
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +219 -78
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +13 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +13 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +13 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +13 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +13 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +13 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +13 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +13 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +13 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +13 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +13 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +13 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +13 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +13 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +13 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +13 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +13 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +13 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +13 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +13 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +13 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +13 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +13 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +13 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +13 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +13 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +13 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +13 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +13 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +13 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +13 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +13 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +13 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +13 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +13 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +13 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +13 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +13 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +13 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +13 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +13 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +13 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +13 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +13 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +13 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +13 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +13 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +13 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +13 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +13 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +13 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +13 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +13 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +13 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +13 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +13 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +13 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +13 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +13 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +13 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +13 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +13 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +13 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +13 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +13 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +13 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +13 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +13 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +13 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +13 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +13 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +13 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +13 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +13 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +13 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +13 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +13 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +13 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +13 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +13 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +13 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +13 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +13 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +13 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +85 -119
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +87 -121
- package/image/image.esm.min.js +1 -1
- package/image/image.js +86 -120
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +7 -0
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +7 -0
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +8 -2
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +63 -19
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +7 -0
- package/inputnumber/inputnumber.esm.js +63 -19
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +63 -19
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +3 -3
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +3 -3
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +3 -3
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -6
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -6
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -6
- package/inputtext/inputtext.min.js +1 -1
- package/listbox/listbox.cjs.js +14 -1
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +8 -3
- package/listbox/listbox.esm.js +14 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +14 -1
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +799 -179
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +14 -0
- package/megamenu/megamenu.esm.js +801 -181
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +799 -179
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +7 -9
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +7 -9
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +7 -9
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +217 -166
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +15 -1
- package/menu/menu.esm.js +220 -169
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +217 -166
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +714 -179
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +18 -0
- package/menubar/menubar.esm.js +717 -182
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +714 -179
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +5 -3
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -3
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +5 -3
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +58 -35
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -1
- package/multiselect/multiselect.esm.js +58 -35
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +59 -37
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +260 -105
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +18 -0
- package/orderlist/orderlist.esm.js +261 -106
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +260 -105
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +10 -0
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +10 -0
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +10 -0
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +9 -102
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +11 -104
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +10 -103
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/panel/panel.cjs.js +22 -19
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +22 -19
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +22 -19
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +774 -195
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +15 -0
- package/panelmenu/panelmenu.esm.js +775 -196
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +774 -195
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +163 -159
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +163 -159
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +163 -159
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +7 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +8 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +7 -2
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +709 -181
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +10 -0
- package/picklist/picklist.esm.js +708 -180
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +709 -181
- 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 +8352 -3145
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +8351 -3146
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +8352 -3145
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +27 -26
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +27 -26
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +28 -27
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +854 -790
- package/resources/themes/arya-green/theme.css +854 -790
- package/resources/themes/arya-orange/theme.css +854 -790
- package/resources/themes/arya-purple/theme.css +854 -790
- package/resources/themes/bootstrap4-dark-blue/theme.css +678 -615
- package/resources/themes/bootstrap4-dark-purple/theme.css +678 -615
- package/resources/themes/bootstrap4-light-blue/theme.css +679 -616
- package/resources/themes/bootstrap4-light-purple/theme.css +679 -616
- package/resources/themes/fluent-light/theme.css +686 -638
- package/resources/themes/lara-dark-amber/theme.css +679 -630
- package/resources/themes/lara-dark-blue/theme.css +679 -630
- package/resources/themes/lara-dark-cyan/theme.css +679 -630
- package/resources/themes/lara-dark-green/theme.css +679 -630
- package/resources/themes/lara-dark-indigo/theme.css +679 -630
- package/resources/themes/lara-dark-pink/theme.css +679 -630
- package/resources/themes/lara-dark-purple/theme.css +679 -630
- package/resources/themes/lara-dark-teal/theme.css +679 -630
- package/resources/themes/lara-light-amber/theme.css +776 -725
- package/resources/themes/lara-light-blue/theme.css +1011 -960
- package/resources/themes/lara-light-cyan/theme.css +776 -725
- package/resources/themes/lara-light-green/theme.css +820 -769
- package/resources/themes/lara-light-indigo/theme.css +1016 -965
- package/resources/themes/lara-light-pink/theme.css +776 -725
- package/resources/themes/lara-light-purple/theme.css +1016 -965
- package/resources/themes/lara-light-teal/theme.css +776 -725
- package/resources/themes/luna-amber/theme.css +950 -887
- package/resources/themes/luna-blue/theme.css +950 -887
- package/resources/themes/luna-green/theme.css +950 -887
- package/resources/themes/luna-pink/theme.css +950 -887
- package/resources/themes/md-dark-deeppurple/theme.css +918 -950
- package/resources/themes/md-dark-indigo/theme.css +918 -950
- package/resources/themes/md-light-deeppurple/theme.css +878 -910
- package/resources/themes/md-light-indigo/theme.css +878 -910
- package/resources/themes/mdc-dark-deeppurple/theme.css +918 -950
- package/resources/themes/mdc-dark-indigo/theme.css +918 -950
- package/resources/themes/mdc-light-deeppurple/theme.css +878 -910
- package/resources/themes/mdc-light-indigo/theme.css +878 -910
- package/resources/themes/mira/theme.css +1562 -1532
- package/resources/themes/nano/theme.css +707 -641
- package/resources/themes/nova/theme.css +705 -643
- package/resources/themes/nova-accent/theme.css +701 -636
- package/resources/themes/nova-alt/theme.css +705 -643
- package/resources/themes/rhea/theme.css +876 -811
- package/resources/themes/saga-blue/theme.css +896 -832
- package/resources/themes/saga-green/theme.css +896 -832
- package/resources/themes/saga-orange/theme.css +896 -832
- package/resources/themes/saga-purple/theme.css +896 -832
- package/resources/themes/soho-dark/theme.css +701 -643
- package/resources/themes/soho-light/theme.css +690 -634
- package/resources/themes/tailwind-light/theme.css +1370 -1306
- package/resources/themes/vela-blue/theme.css +862 -798
- package/resources/themes/vela-green/theme.css +862 -798
- package/resources/themes/vela-orange/theme.css +862 -798
- package/resources/themes/vela-purple/theme.css +862 -798
- package/resources/themes/viva-dark/theme.css +655 -612
- package/resources/themes/viva-light/theme.css +737 -694
- package/ripple/ripple.cjs.js +71 -5
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +71 -5
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +71 -5
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +183 -3
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +184 -4
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +183 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/sidebar/sidebar.cjs.js +62 -146
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +25 -3
- package/sidebar/sidebar.esm.js +65 -149
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +63 -147
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +7 -100
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +1 -1
- package/slidemenu/slidemenu.esm.js +10 -103
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +7 -100
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +275 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +277 -34
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +275 -32
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +1098 -309
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +5 -5
- package/splitbutton/splitbutton.esm.js +1100 -311
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +1096 -309
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +103 -15
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +5 -0
- package/splitter/splitter.esm.js +103 -15
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +103 -15
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +99 -13
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +100 -14
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +99 -13
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +113 -17
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +113 -17
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +113 -17
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +128 -20
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +35 -0
- package/tabview/tabview.esm.js +128 -20
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +128 -20
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +753 -275
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +11 -1
- package/tieredmenu/tieredmenu.esm.js +755 -277
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +753 -275
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +6 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +36 -2
- package/toast/toast.esm.js +6 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +6 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +74 -4
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +74 -4
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +75 -5
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.d.ts +27 -0
- package/tooltip/tooltipoptions.d.ts +1 -1
- package/tree/tree.cjs.js +198 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -0
- package/tree/tree.esm.js +199 -89
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +198 -88
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +185 -49
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +26 -1
- package/treeselect/treeselect.esm.js +186 -50
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +186 -51
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +59 -53
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +59 -53
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +59 -53
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +19 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +19 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +19 -5
- package/utils/utils.min.js +1 -1
- package/web-types.json +402 -33
|
@@ -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,104 +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 prevOptions = usePrevious(options);
|
|
237
|
-
var bind = function bind() {
|
|
238
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
239
|
-
if (utils.ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
240
|
-
unbind();
|
|
241
|
-
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(bindOptions.target));
|
|
242
|
-
}
|
|
243
|
-
if (!listenerRef.current && targetRef.current) {
|
|
244
|
-
listenerRef.current = function (event) {
|
|
245
|
-
return listener && listener(event);
|
|
246
|
-
};
|
|
247
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
var unbind = function unbind() {
|
|
251
|
-
if (listenerRef.current) {
|
|
252
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
253
|
-
listenerRef.current = null;
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
React__namespace.useEffect(function () {
|
|
257
|
-
if (when) {
|
|
258
|
-
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
259
|
-
} else {
|
|
260
|
-
unbind();
|
|
261
|
-
targetRef.current = null;
|
|
262
|
-
}
|
|
263
|
-
}, [target, when]);
|
|
264
|
-
React__namespace.useEffect(function () {
|
|
265
|
-
if (listenerRef.current && (listenerRef.current !== listener || prevOptions !== options)) {
|
|
266
|
-
unbind();
|
|
267
|
-
when && bind();
|
|
268
|
-
}
|
|
269
|
-
}, [listener, options]);
|
|
270
|
-
useUnmountEffect(function () {
|
|
271
|
-
unbind();
|
|
272
|
-
});
|
|
273
|
-
return [bind, unbind];
|
|
274
|
-
};
|
|
275
|
-
/* eslint-enable */
|
|
276
|
-
|
|
277
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
278
|
-
var handleEsc = function handleEsc(event) {
|
|
279
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
280
|
-
event.stopImmediatePropagation();
|
|
281
|
-
callback(event);
|
|
282
|
-
}
|
|
283
|
-
return;
|
|
284
|
-
};
|
|
285
|
-
var _useEventListener = useEventListener({
|
|
286
|
-
type: 'keydown',
|
|
287
|
-
listener: handleEsc
|
|
288
|
-
}),
|
|
289
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
290
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
291
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
292
|
-
React__namespace.useEffect(function () {
|
|
293
|
-
if (!condition) {
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
if (!ref.current) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
bindKeyDownListener();
|
|
300
|
-
return function () {
|
|
301
|
-
unbindKeyDownListener();
|
|
302
|
-
};
|
|
303
|
-
});
|
|
304
|
-
return [ref, callback];
|
|
305
|
-
};
|
|
306
|
-
|
|
307
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; }
|
|
308
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; }
|
|
309
212
|
var confirmPopup = function confirmPopup() {
|
|
@@ -355,6 +258,7 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
355
258
|
});
|
|
356
259
|
var overlayRef = React__namespace.useRef(null);
|
|
357
260
|
var acceptBtnRef = React__namespace.useRef(null);
|
|
261
|
+
var rejectBtnRef = React__namespace.useRef(null);
|
|
358
262
|
var isPanelClicked = React__namespace.useRef(false);
|
|
359
263
|
var overlayEventListener = React__namespace.useRef(null);
|
|
360
264
|
var confirmProps = React__namespace.useRef(null);
|
|
@@ -374,8 +278,15 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
374
278
|
};
|
|
375
279
|
var acceptLabel = getPropValue('acceptLabel') || PrimeReact.localeOption('accept');
|
|
376
280
|
var rejectLabel = getPropValue('rejectLabel') || PrimeReact.localeOption('reject');
|
|
377
|
-
|
|
378
|
-
|
|
281
|
+
var displayOrder = hooks.useDisplayOrder('dialog', visibleState);
|
|
282
|
+
hooks.useGlobalOnEscapeKey({
|
|
283
|
+
callback: function callback() {
|
|
284
|
+
if (props.dismissable && props.closeOnEscape) {
|
|
285
|
+
hide('hide');
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
when: visibleState,
|
|
289
|
+
priority: [hooks.ESC_KEY_HANDLING_PRIORITIES.DIALOG, displayOrder]
|
|
379
290
|
});
|
|
380
291
|
var _useOverlayListener = hooks.useOverlayListener({
|
|
381
292
|
target: getPropValue('target'),
|
|
@@ -415,16 +326,20 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
415
326
|
}
|
|
416
327
|
};
|
|
417
328
|
var show = function show() {
|
|
418
|
-
|
|
419
|
-
// so we can return focus to it once we close the dialog.
|
|
420
|
-
focusElementOnHide.current = document.activeElement;
|
|
421
|
-
setVisibleState(true);
|
|
329
|
+
var currentProps = getCurrentProps();
|
|
422
330
|
setReshowState(false);
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
331
|
+
if (currentProps.group === props.group) {
|
|
332
|
+
setVisibleState(true);
|
|
333
|
+
isCallbackExecuting.current = false;
|
|
334
|
+
overlayEventListener.current = function (e) {
|
|
335
|
+
!isOutsideClicked(e.target) && (isPanelClicked.current = true);
|
|
336
|
+
};
|
|
337
|
+
overlayservice.OverlayService.on('overlay-click', overlayEventListener.current);
|
|
338
|
+
|
|
339
|
+
// Remember the focused element before we opened the dialog
|
|
340
|
+
// so we can return focus to it once we close the dialog.
|
|
341
|
+
focusElementOnHide.current = document.activeElement;
|
|
342
|
+
}
|
|
428
343
|
};
|
|
429
344
|
var hide = function hide(result) {
|
|
430
345
|
setVisibleState(false);
|
|
@@ -448,8 +363,12 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
448
363
|
};
|
|
449
364
|
var onEntered = function onEntered() {
|
|
450
365
|
bindOverlayListener();
|
|
451
|
-
|
|
452
|
-
|
|
366
|
+
var defaultFocus = getPropValue('defaultFocus');
|
|
367
|
+
if (defaultFocus === undefined || defaultFocus === 'accept') {
|
|
368
|
+
acceptBtnRef.current && acceptBtnRef.current.focus();
|
|
369
|
+
}
|
|
370
|
+
if (defaultFocus === 'reject') {
|
|
371
|
+
rejectBtnRef.current && rejectBtnRef.current.focus();
|
|
453
372
|
}
|
|
454
373
|
callbackFromProp('onShow');
|
|
455
374
|
};
|
|
@@ -548,6 +467,7 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
548
467
|
className: cx('footer')
|
|
549
468
|
}, ptm('footer'));
|
|
550
469
|
var rejectButtonProps = utils.mergeProps({
|
|
470
|
+
ref: rejectBtnRef,
|
|
551
471
|
label: rejectLabel,
|
|
552
472
|
icon: getPropValue('rejectIcon'),
|
|
553
473
|
className: cx('rejectButton', {
|
|
@@ -591,38 +511,51 @@ var ConfirmPopup = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__names
|
|
|
591
511
|
}
|
|
592
512
|
return content;
|
|
593
513
|
};
|
|
514
|
+
var rootProps = utils.mergeProps({
|
|
515
|
+
ref: overlayRef,
|
|
516
|
+
id: getPropValue('id'),
|
|
517
|
+
className: cx('root', {
|
|
518
|
+
context: context,
|
|
519
|
+
getPropValue: getPropValue
|
|
520
|
+
}),
|
|
521
|
+
style: getPropValue('style'),
|
|
522
|
+
onClick: onPanelClick
|
|
523
|
+
}, ConfirmPopupBase.getOtherProps(props), ptm('root'));
|
|
524
|
+
var transitionProps = utils.mergeProps({
|
|
525
|
+
classNames: cx('transition'),
|
|
526
|
+
"in": visibleState,
|
|
527
|
+
timeout: {
|
|
528
|
+
enter: 120,
|
|
529
|
+
exit: 100
|
|
530
|
+
},
|
|
531
|
+
options: getPropValue('transitionOptions'),
|
|
532
|
+
unmountOnExit: true,
|
|
533
|
+
onEnter: onEnter,
|
|
534
|
+
onEntered: onEntered,
|
|
535
|
+
onExit: onExit,
|
|
536
|
+
onExited: onExited
|
|
537
|
+
}, ptm('transition'));
|
|
538
|
+
var createTemplateElement = function createTemplateElement() {
|
|
539
|
+
var currentProps = getCurrentProps();
|
|
540
|
+
var message = utils.ObjectUtils.getJSXElement(getPropValue('message'), currentProps);
|
|
541
|
+
var templateElementProps = {
|
|
542
|
+
message: message,
|
|
543
|
+
acceptBtnRef: acceptBtnRef,
|
|
544
|
+
rejectBtnRef: rejectBtnRef,
|
|
545
|
+
hide: hide
|
|
546
|
+
};
|
|
547
|
+
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, _extends({
|
|
548
|
+
nodeRef: overlayRef
|
|
549
|
+
}, transitionProps), /*#__PURE__*/React__namespace.createElement("div", rootProps, utils.ObjectUtils.getJSXElement(inProps.content, templateElementProps)));
|
|
550
|
+
};
|
|
594
551
|
var createElement = function createElement() {
|
|
595
552
|
var content = createContent();
|
|
596
553
|
var footer = createFooter();
|
|
597
|
-
var rootProps = utils.mergeProps({
|
|
598
|
-
ref: overlayRef,
|
|
599
|
-
id: getPropValue('id'),
|
|
600
|
-
className: cx('root', {
|
|
601
|
-
context: context,
|
|
602
|
-
getPropValue: getPropValue
|
|
603
|
-
}),
|
|
604
|
-
style: getPropValue('style'),
|
|
605
|
-
onClick: onPanelClick
|
|
606
|
-
}, ConfirmPopupBase.getOtherProps(props), ptm('root'));
|
|
607
|
-
var transitionProps = utils.mergeProps({
|
|
608
|
-
classNames: cx('transition'),
|
|
609
|
-
"in": visibleState,
|
|
610
|
-
timeout: {
|
|
611
|
-
enter: 120,
|
|
612
|
-
exit: 100
|
|
613
|
-
},
|
|
614
|
-
options: getPropValue('transitionOptions'),
|
|
615
|
-
unmountOnExit: true,
|
|
616
|
-
onEnter: onEnter,
|
|
617
|
-
onEntered: onEntered,
|
|
618
|
-
onExit: onExit,
|
|
619
|
-
onExited: onExited
|
|
620
|
-
}, ptm('transition'));
|
|
621
554
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, _extends({
|
|
622
555
|
nodeRef: overlayRef
|
|
623
556
|
}, transitionProps), /*#__PURE__*/React__namespace.createElement("div", rootProps, content, footer));
|
|
624
557
|
};
|
|
625
|
-
var element = createElement();
|
|
558
|
+
var element = inProps !== null && inProps !== void 0 && inProps.content ? createTemplateElement() : createElement();
|
|
626
559
|
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
627
560
|
element: element,
|
|
628
561
|
appendTo: getPropValue('appendTo'),
|
|
@@ -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 P(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=P(e,"string");return"symbol"===j(t)?t:String(t)}var E=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'}}),S=function(e){var t,r,n,o=e.target,c=void 0===o?"document":o,i=e.type,u=e.listener,l=e.options,p=e.when,f=void 0===p||p,m=s.useRef(null),d=s.useRef(null),v=(t=l,r=s.useRef(void 0),s.useEffect((function(){r.current=t})),r.current),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.ObjectUtils.isNotEmpty(e.target)&&(y(),(e.when||f)&&(m.current=a.DomHandler.getTargetElement(e.target))),!d.current&&m.current&&(d.current=function(e){return u&&u(e)},m.current.addEventListener(i,d.current,l))},y=function(){d.current&&(m.current.removeEventListener(i,d.current,l),d.current=null)};return s.useEffect((function(){f?m.current=a.DomHandler.getTargetElement(c):(y(),m.current=null)}),[c,f]),s.useEffect((function(){!d.current||d.current===u&&v===l||(y(),f&&b())}),[u,l]),n=function(){y()},s.useEffect((function(){return n}),[]),[b,y]},x=function(e,t,r){var n=O(S({type:"keydown",listener:function(e){"Esc"!==e.key&&"Escape"!==e.key||(e.stopImmediatePropagation(),r(e))}}),2),o=n[0],c=n[1];return s.useEffect((function(){if(t&&e.current)return o(),function(){c()}})),[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=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)):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=E.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],P=g[1],h={props:d,state:{visible:b,reshow:j}},S=E.setMetaData(h),w=S.ptm,C=S.cx,I=S.isUnstyled;n.useHandleStyle(E.css.styles,I,{name:"confirmpopup"});var D=s.useRef(null),k=s.useRef(null),R=s.useRef(!1),H=s.useRef(null),U=s.useRef(null),L=s.useRef(null),T=s.useRef(!1),_=function(){return U.current||d},q=function(e){return(U.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)},B=q("acceptLabel")||t.localeOption("accept"),V=q("rejectLabel")||t.localeOption("reject");x(D,d.dismissable&&d.closeOnEscape,(function(e){$("hide")}));var M=O(c.useOverlayListener({target:q("target"),overlay:D,listener:function(e,t){t.valid&&("outside"===t.type?d.dismissable&&!R.current&&$("hide"):$("hide")),R.current=!1},when:b}),2),Z=M[0],z=M[1],J=function(e){R.current=!0,i.OverlayService.emit("overlay-click",{originalEvent:e,target:q("target")})},K=function(){T.current||(T.current=!0,A("accept"),$("accept"))},X=function(){T.current||(T.current=!0,A("reject"),$("reject"))},Y=function(){L.current=document.activeElement,y(!0),P(!1),T.current=!1,H.current=function(e){!te(e.target)&&(R.current=!0)},i.OverlayService.on("overlay-click",H.current)},$=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(){a.ZIndexUtils.set("overlay",D.current,p&&p.autoZIndex||f.default.autoZIndex,p&&p.zIndex.overlay||f.default.zIndex.overlay),a.DomHandler.addStyles(D.current,{position:"absolute",top:"50%",left:"50%",marginTop:"10px"}),ee()},G=function(){Z(),k.current&&k.current.focus(),A("onShow")},Q=function(){z()},W=function(){a.ZIndexUtils.clear(D.current),R.current=!1},ee=function(){if(q("target")){a.DomHandler.absolutePosition(D.current,q("target"));var e=a.DomHandler.getOffset(D.current),t=a.DomHandler.getOffset(q("target")),r=0;e.left<t.left&&(r=t.left-e.left),D.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&!I()&&a.DomHandler.addClass(D.current,"p-confirm-popup-flipped")}},te=function(e){return D&&D.current&&!(D.current.isSameNode(e)||D.current.contains(e))},re=function(e){if(e.tagKey===d.tagKey){var t=b!==e.visible;q("target")!==e.target&&!d.target?($(),U.current=e,P(!0)):t&&(U.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",re),function(){i.OverlayService.off("confirm-popup",re)}}),[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",re),a.ZIndexUtils.clear(D.current)})),s.useImperativeHandle(l,(function(){return{props:d,confirm:re}}));var ne,oe,ce,ie,ue,ae,le,pe,se,fe,me=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({label:V,icon:q("rejectIcon"),className:C("rejectButton",{getPropValue:q}),onClick:X,pt:w("rejectButton"),unstyled:d.unstyled,__parentMetadata:{parent:h}}),c=a.mergeProps({ref:k,label:B,icon:q("acceptIcon"),className:C("acceptButton",{getPropValue:q}),onClick:K,pt:w("acceptButton"),unstyled:d.unstyled,__parentMetadata:{parent:h}}),i=s.createElement("div",n,s.createElement(r.Button,o),s.createElement(r.Button,c));if(q("footer")){var u={accept:K,reject:X,className:"p-confirm-popup-footer",acceptClassName:e,rejectClassName:t,acceptLabel:B,rejectLabel:V,element:i,props:_()};return a.ObjectUtils.getJSXElement(q("footer"),u)}return i},de=(ne=_(),oe=a.ObjectUtils.getJSXElement(q("message"),ne),ce=a.mergeProps({className:C("icon")},w("icon")),ie=a.IconUtils.getJSXIcon(q("icon"),N({},ce),{props:ne}),ue=a.mergeProps({className:C("message")},w("message")),ae=a.mergeProps({className:C("content")},w("content")),le=s.createElement("div",ae,ie,s.createElement("span",ue,oe)),pe=me(),se=a.mergeProps({ref:D,id:q("id"),className:C("root",{context:p,getPropValue:q}),style:q("style"),onClick:J},E.getOtherProps(d),w("root")),fe=a.mergeProps({classNames:C("transition"),in:b,timeout:{enter:120,exit:100},options:q("transitionOptions"),unmountOnExit:!0,onEnter:F,onEntered:G,onExit:Q,onExited:W},w("transition")),s.createElement(o.CSSTransition,m({nodeRef:D},fe),s.createElement("div",se,le,pe)));return s.createElement(u.Portal,{element:de,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 P(e){var t=S(e,"string");return"symbol"===j(t)?t:String(t)}var h=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 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 x(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){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)):E(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=s.useContext(t.PrimeReactContext),d=h.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],S=g[1],P={props:d,state:{visible:b,reshow:j}},E=h.setMetaData(P),N=E.ptm,w=E.cx,C=E.isUnstyled;n.useHandleStyle(h.css.styles,C,{name:"confirmpopup"});var I=s.useRef(null),R=s.useRef(null),D=s.useRef(null),U=s.useRef(!1),_=s.useRef(null),k=s.useRef(null),A=s.useRef(null),B=s.useRef(!1),H=function(){return k.current||d},L=function(e){return(k.current||d)[e]},T=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(L(e),r)},q=L("acceptLabel")||t.localeOption("accept"),V=L("rejectLabel")||t.localeOption("reject"),M=c.useDisplayOrder("dialog",b);c.useGlobalOnEscapeKey({callback:function(){d.dismissable&&d.closeOnEscape&&F("hide")},when:b,priority:[c.ESC_KEY_HANDLING_PRIORITIES.DIALOG,M]});var J=O(c.useOverlayListener({target:L("target"),overlay:I,listener:function(e,t){t.valid&&("outside"===t.type?d.dismissable&&!U.current&&F("hide"):F("hide")),U.current=!1},when:b}),2),K=J[0],X=J[1],Z=function(){B.current||(B.current=!0,T("accept"),F("accept"))},z=function(){B.current||(B.current=!0,T("reject"),F("reject"))},G=function(){var e=H();S(!1),e.group===d.group&&(y(!0),B.current=!1,_.current=function(e){!$(e.target)&&(U.current=!0)},i.OverlayService.on("overlay-click",_.current),A.current=document.activeElement)},F=function(e){y(!1),i.OverlayService.off("overlay-click",_.current),_.current=null,e&&T("onHide",e),l.DomHandler.focus(A.current),A.current=null},Y=function(){if(L("target")){l.DomHandler.absolutePosition(I.current,L("target"));var e=l.DomHandler.getOffset(I.current),t=l.DomHandler.getOffset(L("target")),r=0;e.left<t.left&&(r=t.left-e.left),I.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top&&!C()&&l.DomHandler.addClass(I.current,"p-confirm-popup-flipped")}},$=function(e){return I&&I.current&&!(I.current.isSameNode(e)||I.current.contains(e))},Q=function(e){if(e.tagKey===d.tagKey){var t=b!==e.visible;L("target")!==e.target&&!d.target?(F(),k.current=e,S(!0)):t&&(k.current=e,e.visible?G():F())}};s.useEffect((function(){d.visible?G():F()}),[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&&G()}),[j]),c.useUnmountEffect((function(){_.current&&(i.OverlayService.off("overlay-click",_.current),_.current=null),i.OverlayService.off("confirm-popup",Q),l.ZIndexUtils.clear(I.current)})),s.useImperativeHandle(u,(function(){return{props:d,confirm:Q}}));var W,ee,te=function(){var e=l.classNames("p-confirm-popup-accept p-button-sm",L("acceptClassName")),t=l.classNames("p-confirm-popup-reject p-button-sm",{"p-button-text":!L("rejectClassName")},L("rejectClassName")),n=l.mergeProps({className:w("footer")},N("footer")),o=l.mergeProps({ref:D,label:V,icon:L("rejectIcon"),className:w("rejectButton",{getPropValue:L}),onClick:z,pt:N("rejectButton"),unstyled:d.unstyled,__parentMetadata:{parent:P}}),c=l.mergeProps({ref:R,label:q,icon:L("acceptIcon"),className:w("acceptButton",{getPropValue:L}),onClick:Z,pt:N("acceptButton"),unstyled:d.unstyled,__parentMetadata:{parent:P}}),i=s.createElement("div",n,s.createElement(r.Button,o),s.createElement(r.Button,c));if(L("footer")){var a={accept:Z,reject:z,className:"p-confirm-popup-footer",acceptClassName:e,rejectClassName:t,acceptLabel:q,rejectLabel:V,element:i,props:H()};return l.ObjectUtils.getJSXElement(L("footer"),a)}return i},re=l.mergeProps({ref:I,id:L("id"),className:w("root",{context:p,getPropValue:L}),style:L("style"),onClick:function(e){U.current=!0,i.OverlayService.emit("overlay-click",{originalEvent:e,target:L("target")})}},h.getOtherProps(d),N("root")),ne=l.mergeProps({classNames:w("transition"),in:b,timeout:{enter:120,exit:100},options:L("transitionOptions"),unmountOnExit:!0,onEnter:function(){l.ZIndexUtils.set("overlay",I.current,p&&p.autoZIndex||f.default.autoZIndex,p&&p.zIndex.overlay||f.default.zIndex.overlay),l.DomHandler.addStyles(I.current,{position:"absolute",top:"50%",left:"50%",marginTop:"10px"}),Y()},onEntered:function(){K();var e=L("defaultFocus");void 0!==e&&"accept"!==e||R.current&&R.current.focus(),"reject"===e&&D.current&&D.current.focus(),T("onShow")},onExit:function(){X()},onExited:function(){l.ZIndexUtils.clear(I.current),U.current=!1}},N("transition")),oe=null!=e&&e.content?(W=H(),ee={message:l.ObjectUtils.getJSXElement(L("message"),W),acceptBtnRef:R,rejectBtnRef:D,hide:F},s.createElement(o.CSSTransition,m({nodeRef:I},ne),s.createElement("div",re,l.ObjectUtils.getJSXElement(e.content,ee)))):function(){var e,t,r,n,c,i,a=(e=H(),t=l.ObjectUtils.getJSXElement(L("message"),e),r=l.mergeProps({className:w("icon")},N("icon")),n=l.IconUtils.getJSXIcon(L("icon"),x({},r),{props:e}),c=l.mergeProps({className:w("message")},N("message")),i=l.mergeProps({className:w("content")},N("content")),s.createElement("div",i,n,s.createElement("span",c,t))),u=te();return s.createElement(o.CSSTransition,m({nodeRef:I},ne),s.createElement("div",re,a,u))}();return s.createElement(a.Portal,{element:oe,appendTo:L("appendTo"),visible:L("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
|
*/
|
|
@@ -137,6 +142,29 @@ interface ConfirmPopupOptions {
|
|
|
137
142
|
[key: string]: any;
|
|
138
143
|
}
|
|
139
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Defines current content values and refs for headless development.
|
|
147
|
+
* @see {@link ConfirmPopupProps.content}
|
|
148
|
+
*/
|
|
149
|
+
interface ContentProps {
|
|
150
|
+
/**
|
|
151
|
+
* Reference for the accept button. Used to focus the element and execute the action.
|
|
152
|
+
*/
|
|
153
|
+
acceptBtnRef: React.RefObject<HTMLButtonElement>;
|
|
154
|
+
/**
|
|
155
|
+
* Reference for the reject button. Used to focus the element and execute the action.
|
|
156
|
+
*/
|
|
157
|
+
rejectBtnRef: React.RefObject<HTMLButtonElement>;
|
|
158
|
+
/**
|
|
159
|
+
* Message value of confirm popup.
|
|
160
|
+
*/
|
|
161
|
+
message: React.ReactNode | string;
|
|
162
|
+
/**
|
|
163
|
+
* Hide action of confirm popup.
|
|
164
|
+
*/
|
|
165
|
+
hide(): void;
|
|
166
|
+
}
|
|
167
|
+
|
|
140
168
|
/**
|
|
141
169
|
* Defines valid properties in ConfirmPopup component.
|
|
142
170
|
* @group Properties
|
|
@@ -155,6 +183,11 @@ export interface ConfirmPopupProps {
|
|
|
155
183
|
* @defaultValue false
|
|
156
184
|
*/
|
|
157
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;
|
|
158
191
|
/**
|
|
159
192
|
* Message of the confirmation.
|
|
160
193
|
*/
|
|
@@ -201,7 +234,7 @@ export interface ConfirmPopupProps {
|
|
|
201
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.
|
|
202
235
|
* @defaultValue document.body
|
|
203
236
|
*/
|
|
204
|
-
appendTo?: 'self' | HTMLElement | undefined | null;
|
|
237
|
+
appendTo?: 'self' | HTMLElement | undefined | null | (() => HTMLElement);
|
|
205
238
|
/**
|
|
206
239
|
* Enables to hide the popup when outside is clicked.
|
|
207
240
|
* @defaultValue true
|
|
@@ -256,6 +289,12 @@ export interface ConfirmPopupProps {
|
|
|
256
289
|
* @defaultValue false
|
|
257
290
|
*/
|
|
258
291
|
unstyled?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Specifies a custom content for the dialog. For more complex markup, use the "content" slot instead.
|
|
294
|
+
* @param {ContentProps} props - The values of dialog.
|
|
295
|
+
* @return {React.ReactNode}
|
|
296
|
+
*/
|
|
297
|
+
content?: React.ReactNode | ((props: ContentProps) => React.ReactNode);
|
|
259
298
|
}
|
|
260
299
|
|
|
261
300
|
/**
|