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
package/dataview/dataview.d.ts
CHANGED
|
@@ -285,7 +285,7 @@ export interface DataViewProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
|
|
|
285
285
|
* 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.
|
|
286
286
|
* @defaultValue document.body
|
|
287
287
|
*/
|
|
288
|
-
paginatorDropdownAppendTo?: 'self' | HTMLElement | undefined | null;
|
|
288
|
+
paginatorDropdownAppendTo?: 'self' | HTMLElement | undefined | null | (() => HTMLElement);
|
|
289
289
|
/**
|
|
290
290
|
* Array of integer values to display inside rows per page dropdown.
|
|
291
291
|
*/
|
package/dialog/dialog.cjs.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var utils = require('primereact/utils');
|
|
8
7
|
var PrimeReact = require('primereact/api');
|
|
9
8
|
var componentbase = require('primereact/componentbase');
|
|
10
9
|
var csstransition = require('primereact/csstransition');
|
|
@@ -14,6 +13,7 @@ var windowmaximize = require('primereact/icons/windowmaximize');
|
|
|
14
13
|
var windowminimize = require('primereact/icons/windowminimize');
|
|
15
14
|
var portal = require('primereact/portal');
|
|
16
15
|
var ripple = require('primereact/ripple');
|
|
16
|
+
var utils = require('primereact/utils');
|
|
17
17
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
19
|
|
|
@@ -53,6 +53,16 @@ function _extends() {
|
|
|
53
53
|
return _extends.apply(this, arguments);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
function _typeof(o) {
|
|
57
|
+
"@babel/helpers - typeof";
|
|
58
|
+
|
|
59
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
60
|
+
return typeof o;
|
|
61
|
+
} : function (o) {
|
|
62
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
63
|
+
}, _typeof(o);
|
|
64
|
+
}
|
|
65
|
+
|
|
56
66
|
function _arrayLikeToArray(arr, len) {
|
|
57
67
|
if (len == null || len > arr.length) len = arr.length;
|
|
58
68
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -84,16 +94,6 @@ function _toConsumableArray(arr) {
|
|
|
84
94
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
85
95
|
}
|
|
86
96
|
|
|
87
|
-
function _typeof(o) {
|
|
88
|
-
"@babel/helpers - typeof";
|
|
89
|
-
|
|
90
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
91
|
-
return typeof o;
|
|
92
|
-
} : function (o) {
|
|
93
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
94
|
-
}, _typeof(o);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
97
|
function _toPrimitive(input, hint) {
|
|
98
98
|
if (_typeof(input) !== "object" || input === null) return input;
|
|
99
99
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -165,104 +165,6 @@ function _slicedToArray(arr, i) {
|
|
|
165
165
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
var usePrevious = function usePrevious(newValue) {
|
|
169
|
-
var ref = React__namespace.useRef(undefined);
|
|
170
|
-
React__namespace.useEffect(function () {
|
|
171
|
-
ref.current = newValue;
|
|
172
|
-
});
|
|
173
|
-
return ref.current;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
/* eslint-disable */
|
|
177
|
-
var useUnmountEffect = function useUnmountEffect(fn) {
|
|
178
|
-
return React__namespace.useEffect(function () {
|
|
179
|
-
return fn;
|
|
180
|
-
}, []);
|
|
181
|
-
};
|
|
182
|
-
/* eslint-enable */
|
|
183
|
-
|
|
184
|
-
/* eslint-disable */
|
|
185
|
-
var useEventListener = function useEventListener(_ref) {
|
|
186
|
-
var _ref$target = _ref.target,
|
|
187
|
-
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
188
|
-
type = _ref.type,
|
|
189
|
-
listener = _ref.listener,
|
|
190
|
-
options = _ref.options,
|
|
191
|
-
_ref$when = _ref.when,
|
|
192
|
-
when = _ref$when === void 0 ? true : _ref$when;
|
|
193
|
-
var targetRef = React__namespace.useRef(null);
|
|
194
|
-
var listenerRef = React__namespace.useRef(null);
|
|
195
|
-
var prevOptions = usePrevious(options);
|
|
196
|
-
var bind = function bind() {
|
|
197
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
198
|
-
if (utils.ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
199
|
-
unbind();
|
|
200
|
-
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(bindOptions.target));
|
|
201
|
-
}
|
|
202
|
-
if (!listenerRef.current && targetRef.current) {
|
|
203
|
-
listenerRef.current = function (event) {
|
|
204
|
-
return listener && listener(event);
|
|
205
|
-
};
|
|
206
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
var unbind = function unbind() {
|
|
210
|
-
if (listenerRef.current) {
|
|
211
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
212
|
-
listenerRef.current = null;
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
React__namespace.useEffect(function () {
|
|
216
|
-
if (when) {
|
|
217
|
-
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
218
|
-
} else {
|
|
219
|
-
unbind();
|
|
220
|
-
targetRef.current = null;
|
|
221
|
-
}
|
|
222
|
-
}, [target, when]);
|
|
223
|
-
React__namespace.useEffect(function () {
|
|
224
|
-
if (listenerRef.current && (listenerRef.current !== listener || prevOptions !== options)) {
|
|
225
|
-
unbind();
|
|
226
|
-
when && bind();
|
|
227
|
-
}
|
|
228
|
-
}, [listener, options]);
|
|
229
|
-
useUnmountEffect(function () {
|
|
230
|
-
unbind();
|
|
231
|
-
});
|
|
232
|
-
return [bind, unbind];
|
|
233
|
-
};
|
|
234
|
-
/* eslint-enable */
|
|
235
|
-
|
|
236
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
237
|
-
var handleEsc = function handleEsc(event) {
|
|
238
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
239
|
-
event.stopImmediatePropagation();
|
|
240
|
-
callback(event);
|
|
241
|
-
}
|
|
242
|
-
return;
|
|
243
|
-
};
|
|
244
|
-
var _useEventListener = useEventListener({
|
|
245
|
-
type: 'keydown',
|
|
246
|
-
listener: handleEsc
|
|
247
|
-
}),
|
|
248
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
249
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
250
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
251
|
-
React__namespace.useEffect(function () {
|
|
252
|
-
if (!condition) {
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
if (!ref.current) {
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
bindKeyDownListener();
|
|
259
|
-
return function () {
|
|
260
|
-
unbindKeyDownListener();
|
|
261
|
-
};
|
|
262
|
-
});
|
|
263
|
-
return [ref, callback];
|
|
264
|
-
};
|
|
265
|
-
|
|
266
168
|
function ownKeys$1(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; }
|
|
267
169
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
268
170
|
var classes = {
|
|
@@ -280,10 +182,13 @@ var classes = {
|
|
|
280
182
|
var props = _ref2.props;
|
|
281
183
|
return utils.classNames('p-dialog-content', props.contentClassName);
|
|
282
184
|
},
|
|
283
|
-
footer:
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
185
|
+
footer: function footer(_ref3) {
|
|
186
|
+
var props = _ref3.props;
|
|
187
|
+
return utils.classNames('p-dialog-footer', props.footerClassName);
|
|
188
|
+
},
|
|
189
|
+
mask: function mask(_ref4) {
|
|
190
|
+
var props = _ref4.props,
|
|
191
|
+
maskVisibleState = _ref4.maskVisibleState;
|
|
287
192
|
var positions = ['center', 'left', 'right', 'top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right'];
|
|
288
193
|
var pos = positions.find(function (item) {
|
|
289
194
|
return item === props.position || item.replace('-', '') === props.position;
|
|
@@ -295,10 +200,10 @@ var classes = {
|
|
|
295
200
|
'p-dialog-resizable': props.resizable
|
|
296
201
|
}, props.maskClassName);
|
|
297
202
|
},
|
|
298
|
-
root: function root(
|
|
299
|
-
var props =
|
|
300
|
-
maximized =
|
|
301
|
-
context =
|
|
203
|
+
root: function root(_ref5) {
|
|
204
|
+
var props = _ref5.props,
|
|
205
|
+
maximized = _ref5.maximized,
|
|
206
|
+
context = _ref5.context;
|
|
302
207
|
return utils.classNames('p-dialog p-component', props.className, {
|
|
303
208
|
'p-dialog-rtl': props.rtl,
|
|
304
209
|
'p-dialog-maximized': maximized,
|
|
@@ -309,10 +214,10 @@ var classes = {
|
|
|
309
214
|
},
|
|
310
215
|
transition: 'p-dialog'
|
|
311
216
|
};
|
|
312
|
-
var styles = "\n@layer primereact {\n .p-dialog-mask {\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-dialog-visible {\n display: flex;\n }\n \n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n position: relative;\n }\n \n .p-dialog-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-dialog-header {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-dialog-footer {\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-dialog .p-dialog-title {\n flex-grow: 1;\n }\n \n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n \n /* Animation */\n /* Center */\n .p-dialog-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-dialog-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-dialog-enter-done {\n transform: none;\n }\n \n .p-dialog-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-top-left .p-dialog,\n .p-dialog-top-right .p-dialog,\n .p-dialog-bottom-left .p-dialog,\n .p-dialog-bottom-right .p-dialog {\n margin: 0.75em;\n }\n \n .p-dialog-top .p-dialog-enter,\n .p-dialog-top .p-dialog-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-dialog-bottom .p-dialog-enter,\n .p-dialog-bottom .p-dialog-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-dialog-left .p-dialog-enter,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-enter,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-enter,\n .p-dialog-bottom-left .p-dialog-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-dialog-right .p-dialog-enter,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-enter,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-enter,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-top-left .p-dialog-enter-active,\n .p-dialog-bottom-left .p-dialog-enter-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-top-right .p-dialog-enter-active,\n .p-dialog-bottom-right .p-dialog-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s ease-out;\n }\n \n .p-dialog-top .p-dialog-exit-active,\n .p-dialog-bottom .p-dialog-exit-active,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-exit-active,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transition: all 0.3s ease-out;\n }\n \n /* Maximize */\n .p-dialog-maximized {\n transition: none;\n transform: none;\n margin: 0;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n \n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n \n /* Resizable */\n .p-dialog .p-resizable-handle {\n position: absolute;\n font-size: 0.1px;\n display: block;\n cursor: se-resize;\n width: 12px;\n height: 12px;\n right: 1px;\n bottom: 1px;\n }\n \n .p-dialog-draggable .p-dialog-header {\n cursor: move;\n } \n}\n";
|
|
217
|
+
var styles = "\n@layer primereact {\n .p-dialog-mask {\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-dialog-visible {\n display: flex;\n }\n \n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n position: relative;\n }\n \n .p-dialog-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-dialog-header {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-dialog-footer {\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-dialog .p-dialog-title {\n flex-grow: 1;\n }\n \n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n \n /* Animation */\n /* Center */\n .p-dialog-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-dialog-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-dialog-enter-done {\n transform: none;\n }\n \n .p-dialog-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-top-left .p-dialog,\n .p-dialog-top-right .p-dialog,\n .p-dialog-bottom-left .p-dialog,\n .p-dialog-bottom-right .p-dialog {\n margin: 0.75em;\n }\n \n .p-dialog-top .p-dialog-enter,\n .p-dialog-top .p-dialog-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-dialog-bottom .p-dialog-enter,\n .p-dialog-bottom .p-dialog-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-dialog-left .p-dialog-enter,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-enter,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-enter,\n .p-dialog-bottom-left .p-dialog-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-dialog-right .p-dialog-enter,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-enter,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-enter,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-top-left .p-dialog-enter-active,\n .p-dialog-bottom-left .p-dialog-enter-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-top-right .p-dialog-enter-active,\n .p-dialog-bottom-right .p-dialog-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s ease-out;\n }\n \n .p-dialog-top .p-dialog-exit-active,\n .p-dialog-bottom .p-dialog-exit-active,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-exit-active,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transition: all 0.3s ease-out;\n }\n \n /* Maximize */\n .p-dialog-maximized {\n transition: none;\n transform: none;\n margin: 0;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n }\n \n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n \n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n \n /* Resizable */\n .p-dialog .p-resizable-handle {\n position: absolute;\n font-size: 0.1px;\n display: block;\n cursor: se-resize;\n width: 12px;\n height: 12px;\n right: 1px;\n bottom: 1px;\n }\n \n .p-dialog-draggable .p-dialog-header {\n cursor: move;\n } \n}\n";
|
|
313
218
|
var inlineStyles = {
|
|
314
|
-
mask: function mask(
|
|
315
|
-
var props =
|
|
219
|
+
mask: function mask(_ref6) {
|
|
220
|
+
var props = _ref6.props;
|
|
316
221
|
return _objectSpread$1({
|
|
317
222
|
position: 'fixed',
|
|
318
223
|
height: '100%',
|
|
@@ -345,6 +250,7 @@ var DialogBase = componentbase.ComponentBase.extend({
|
|
|
345
250
|
draggable: true,
|
|
346
251
|
focusOnShow: true,
|
|
347
252
|
footer: null,
|
|
253
|
+
footerClassName: null,
|
|
348
254
|
header: null,
|
|
349
255
|
headerClassName: null,
|
|
350
256
|
headerStyle: null,
|
|
@@ -425,6 +331,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
425
331
|
var focusElementOnHide = React__namespace.useRef(null);
|
|
426
332
|
var maximized = props.onMaximize ? props.maximized : maximizedState;
|
|
427
333
|
var shouldBlockScroll = visibleState && (props.blockScroll || props.maximizable && maximized);
|
|
334
|
+
var displayOrder = hooks.useDisplayOrder('dialog', visibleState);
|
|
428
335
|
var _DialogBase$setMetaDa = DialogBase.setMetaData(_objectSpread(_objectSpread({
|
|
429
336
|
props: props
|
|
430
337
|
}, props.__parentMetadata), {}, {
|
|
@@ -441,15 +348,14 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
441
348
|
componentbase.useHandleStyle(DialogBase.css.styles, isUnstyled, {
|
|
442
349
|
name: 'dialog'
|
|
443
350
|
});
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
params.splice(paramLength - 1, 1);
|
|
351
|
+
hooks.useGlobalOnEscapeKey({
|
|
352
|
+
callback: function callback(event) {
|
|
353
|
+
if (props.closable && props.closeOnEscape) {
|
|
354
|
+
onClose(event);
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
when: visibleState,
|
|
358
|
+
priority: [hooks.ESC_KEY_HANDLING_PRIORITIES.DIALOG, displayOrder]
|
|
453
359
|
});
|
|
454
360
|
var _useEventListener = hooks.useEventListener({
|
|
455
361
|
type: 'keydown',
|
|
@@ -515,7 +421,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
515
421
|
var focus = function focus() {
|
|
516
422
|
var activeElement = document.activeElement;
|
|
517
423
|
var isActiveElementInDialog = activeElement && dialogRef.current && dialogRef.current.contains(activeElement);
|
|
518
|
-
if (!isActiveElementInDialog && props.closable && props.showHeader) {
|
|
424
|
+
if (!isActiveElementInDialog && props.closable && props.showHeader && closeRef.current) {
|
|
519
425
|
closeRef.current.focus();
|
|
520
426
|
}
|
|
521
427
|
};
|
|
@@ -709,11 +615,9 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
709
615
|
};
|
|
710
616
|
var enableDocumentSettings = function enableDocumentSettings() {
|
|
711
617
|
bindGlobalListeners();
|
|
712
|
-
updateGlobalDialogsRegistry(true);
|
|
713
618
|
};
|
|
714
619
|
var disableDocumentSettings = function disableDocumentSettings() {
|
|
715
620
|
unbindGlobalListeners();
|
|
716
|
-
updateGlobalDialogsRegistry(false);
|
|
717
621
|
};
|
|
718
622
|
var updateScrollBlocker = function updateScrollBlocker() {
|
|
719
623
|
// Scroll should be unblocked if there is at least one dialog that blocks scrolling:
|
|
@@ -727,8 +631,8 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
727
631
|
}
|
|
728
632
|
};
|
|
729
633
|
var updateGlobalDialogsRegistry = function updateGlobalDialogsRegistry(isMounted) {
|
|
730
|
-
// Update current dialog info in global registry if it is mounted:
|
|
731
|
-
if (isMounted) {
|
|
634
|
+
// Update current dialog info in global registry if it is mounted and visible:
|
|
635
|
+
if (isMounted && visibleState) {
|
|
732
636
|
var newParam = {
|
|
733
637
|
id: idState,
|
|
734
638
|
hasBlockScroll: shouldBlockScroll
|
|
@@ -747,7 +651,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
747
651
|
document.primeDialogParams = document.primeDialogParams.toSpliced(currentDialogIndexInRegistry, 1, newParam);
|
|
748
652
|
}
|
|
749
653
|
}
|
|
750
|
-
// Or remove it from global registry if unmounted:
|
|
654
|
+
// Or remove it from global registry if unmounted or invisible:
|
|
751
655
|
else {
|
|
752
656
|
document.primeDialogParams = document.primeDialogParams && document.primeDialogParams.filter(function (param) {
|
|
753
657
|
return param.id !== idState;
|
|
@@ -777,21 +681,31 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
777
681
|
unbindDocumentKeyDownListener();
|
|
778
682
|
};
|
|
779
683
|
var createStyle = function createStyle() {
|
|
780
|
-
styleElement.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce);
|
|
684
|
+
styleElement.current = utils.DomHandler.createInlineStyle(context && context.nonce || PrimeReact__default["default"].nonce, context && context.styleContainer);
|
|
781
685
|
var innerHTML = '';
|
|
782
686
|
for (var breakpoint in props.breakpoints) {
|
|
783
|
-
innerHTML += "\n @media screen and (max-width: ".concat(breakpoint, ") {\n
|
|
687
|
+
innerHTML += "\n @media screen and (max-width: ".concat(breakpoint, ") {\n [data-pc-name=\"dialog\"][").concat(attributeSelector.current, "] {\n width: ").concat(props.breakpoints[breakpoint], " !important;\n }\n }\n ");
|
|
784
688
|
}
|
|
785
689
|
styleElement.current.innerHTML = innerHTML;
|
|
786
690
|
};
|
|
691
|
+
var destroyStyle = function destroyStyle() {
|
|
692
|
+
styleElement.current = utils.DomHandler.removeInlineStyle(styleElement.current);
|
|
693
|
+
};
|
|
787
694
|
hooks.useMountEffect(function () {
|
|
695
|
+
updateGlobalDialogsRegistry(true);
|
|
788
696
|
if (props.visible) {
|
|
789
697
|
setMaskVisibleState(true);
|
|
790
698
|
}
|
|
699
|
+
});
|
|
700
|
+
React__namespace.useEffect(function () {
|
|
791
701
|
if (props.breakpoints) {
|
|
792
702
|
createStyle();
|
|
793
703
|
}
|
|
794
|
-
|
|
704
|
+
return function () {
|
|
705
|
+
destroyStyle();
|
|
706
|
+
};
|
|
707
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
708
|
+
}, [props.breakpoints]);
|
|
795
709
|
hooks.useUpdateEffect(function () {
|
|
796
710
|
if (props.visible && !maskVisibleState) {
|
|
797
711
|
setMaskVisibleState(true);
|
|
@@ -813,9 +727,10 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
813
727
|
}, [maskVisibleState]);
|
|
814
728
|
hooks.useUpdateEffect(function () {
|
|
815
729
|
updateGlobalDialogsRegistry(true);
|
|
816
|
-
}, [shouldBlockScroll]);
|
|
730
|
+
}, [shouldBlockScroll, visibleState]);
|
|
817
731
|
hooks.useUnmountEffect(function () {
|
|
818
732
|
disableDocumentSettings();
|
|
733
|
+
updateGlobalDialogsRegistry(false);
|
|
819
734
|
utils.DomHandler.removeInlineStyle(styleElement.current);
|
|
820
735
|
utils.ZIndexUtils.clear(maskRef.current);
|
|
821
736
|
});
|
|
@@ -942,11 +857,41 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
942
857
|
}
|
|
943
858
|
return null;
|
|
944
859
|
};
|
|
945
|
-
var
|
|
860
|
+
var createTemplateElement = function createTemplateElement(_ref) {
|
|
861
|
+
var _props$children;
|
|
862
|
+
var maskProps = _ref.maskProps,
|
|
863
|
+
rootProps = _ref.rootProps,
|
|
864
|
+
transitionProps = _ref.transitionProps;
|
|
865
|
+
var messageProps = {
|
|
866
|
+
header: props.header,
|
|
867
|
+
content: props.message,
|
|
868
|
+
message: props === null || props === void 0 || (_props$children = props.children) === null || _props$children === void 0 || (_props$children = _props$children[1]) === null || _props$children === void 0 || (_props$children = _props$children.props) === null || _props$children === void 0 ? void 0 : _props$children.children
|
|
869
|
+
};
|
|
870
|
+
var templateElementProps = {
|
|
871
|
+
headerRef: headerRef,
|
|
872
|
+
contentRef: contentRef,
|
|
873
|
+
footerRef: footerRef,
|
|
874
|
+
closeRef: closeRef,
|
|
875
|
+
hide: onClose,
|
|
876
|
+
message: messageProps
|
|
877
|
+
};
|
|
878
|
+
return /*#__PURE__*/React__namespace.createElement("div", maskProps, /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, _extends({
|
|
879
|
+
nodeRef: dialogRef
|
|
880
|
+
}, transitionProps), /*#__PURE__*/React__namespace.createElement("div", rootProps, utils.ObjectUtils.getJSXElement(inProps.content, templateElementProps))));
|
|
881
|
+
};
|
|
882
|
+
var createElement = function createElement(_ref2) {
|
|
883
|
+
var maskProps = _ref2.maskProps,
|
|
884
|
+
rootProps = _ref2.rootProps,
|
|
885
|
+
transitionProps = _ref2.transitionProps;
|
|
946
886
|
var header = createHeader();
|
|
947
887
|
var content = createContent();
|
|
948
888
|
var footer = createFooter();
|
|
949
889
|
var resizer = createResizer();
|
|
890
|
+
return /*#__PURE__*/React__namespace.createElement("div", maskProps, /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, _extends({
|
|
891
|
+
nodeRef: dialogRef
|
|
892
|
+
}, transitionProps), /*#__PURE__*/React__namespace.createElement("div", rootProps, header, content, footer, resizer)));
|
|
893
|
+
};
|
|
894
|
+
var createDialog = function createDialog() {
|
|
950
895
|
var headerId = idState + '_header';
|
|
951
896
|
var contentId = idState + '_content';
|
|
952
897
|
var transitionTimeout = {
|
|
@@ -986,17 +931,29 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
986
931
|
onExiting: onExiting,
|
|
987
932
|
onExited: onExited
|
|
988
933
|
}, ptm('transition'));
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
934
|
+
if (inProps !== null && inProps !== void 0 && inProps.content) {
|
|
935
|
+
var templateElement = createTemplateElement({
|
|
936
|
+
maskProps: maskProps,
|
|
937
|
+
rootProps: rootProps,
|
|
938
|
+
transitionProps: transitionProps
|
|
939
|
+
});
|
|
940
|
+
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
941
|
+
element: templateElement,
|
|
942
|
+
appendTo: props.appendTo,
|
|
943
|
+
visible: true
|
|
944
|
+
});
|
|
945
|
+
} else {
|
|
946
|
+
var element = createElement({
|
|
947
|
+
maskProps: maskProps,
|
|
948
|
+
rootProps: rootProps,
|
|
949
|
+
transitionProps: transitionProps
|
|
950
|
+
});
|
|
951
|
+
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
952
|
+
element: element,
|
|
953
|
+
appendTo: props.appendTo,
|
|
954
|
+
visible: true
|
|
955
|
+
});
|
|
956
|
+
}
|
|
1000
957
|
};
|
|
1001
958
|
return maskVisibleState && createDialog();
|
|
1002
959
|
});
|
package/dialog/dialog.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),n=require("primereact/api"),r=require("primereact/componentbase"),o=require("primereact/csstransition"),i=require("primereact/hooks"),a=require("primereact/icons/times"),l=require("primereact/icons/windowmaximize"),c=require("primereact/icons/windowminimize"),u=require("primereact/portal"),s=require("primereact/ripple");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var m=d(e),g=p(n);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e){if(Array.isArray(e))return b(e)}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(e){return w="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},w(e)}function E(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function O(e){var t=E(e,"string");return"symbol"===w(t)?t:String(t)}function D(e,t,n){return(t=O(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e){if(Array.isArray(e))return e}function P(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function z(){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 k(e,t){return S(e)||P(e,t)||h(e,t)||z()}var I=function(e){var n,r,o,i=e.target,a=void 0===i?"document":i,l=e.type,c=e.listener,u=e.options,s=e.when,p=void 0===s||s,d=m.useRef(null),g=m.useRef(null),f=(n=u,r=m.useRef(void 0),m.useEffect((function(){r.current=n})),r.current),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.ObjectUtils.isNotEmpty(e.target)&&(y(),(e.when||p)&&(d.current=t.DomHandler.getTargetElement(e.target))),!g.current&&d.current&&(g.current=function(e){return c&&c(e)},d.current.addEventListener(l,g.current,u))},y=function(){g.current&&(d.current.removeEventListener(l,g.current,u),g.current=null)};return m.useEffect((function(){p?d.current=t.DomHandler.getTargetElement(a):(y(),d.current=null)}),[a,p]),m.useEffect((function(){!g.current||g.current===c&&f===u||(y(),p&&b())}),[c,u]),o=function(){y()},m.useEffect((function(){return o}),[]),[b,y]},j=function(e,t,n){var r=k(I({type:"keydown",listener:function(e){"Esc"!==e.key&&"Escape"!==e.key||(e.stopImmediatePropagation(),n(e))}}),2),o=r[0],i=r[1];return m.useEffect((function(){if(t&&e.current)return o(),function(){i()}})),[e,n]};function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=r.ComponentBase.extend({defaultProps:{__TYPE:"Dialog",__parentMetadata:null,appendTo:null,ariaCloseIconLabel:null,baseZIndex:0,blockScroll:!1,breakpoints:null,className:null,closable:!0,closeIcon:null,closeOnEscape:!0,contentClassName:null,contentStyle:null,dismissableMask:!1,draggable:!0,focusOnShow:!0,footer:null,header:null,headerClassName:null,headerStyle:null,icons:null,id:null,keepInViewport:!0,maskClassName:null,maskStyle:null,maximizable:!1,maximizeIcon:null,maximized:!1,minX:0,minY:0,minimizeIcon:null,modal:!0,onClick:null,onDrag:null,onDragEnd:null,onDragStart:null,onHide:null,onMaskClick:null,onMaximize:null,onResize:null,onResizeEnd:null,onResizeStart:null,onShow:null,position:"center",resizable:!0,rtl:!1,showHeader:!0,style:null,transitionOptions:null,visible:!1,children:void 0},css:{classes:{closeButtonIcon:"p-dialog-header-close-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",maximizableIcon:"p-dialog-header-maximize-icon",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",header:function(e){return t.classNames("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return t.classNames("p-dialog-content",e.props.contentClassName)},footer:"p-dialog-footer",mask:function(e){var n=e.props,r=e.maskVisibleState,o=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find((function(e){return e===n.position||e.replace("-","")===n.position}));return t.classNames("p-dialog-mask",o?"p-dialog-".concat(o):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-dialog-visible":r,"p-dialog-draggable":n.draggable,"p-dialog-resizable":n.resizable},n.maskClassName)},root:function(e){var n=e.props,r=e.maximized,o=e.context;return t.classNames("p-dialog p-component",n.className,{"p-dialog-rtl":n.rtl,"p-dialog-maximized":r,"p-dialog-default":!r,"p-input-filled":o&&"filled"===o.inputStyle||"filled"===g.default.inputStyle,"p-ripple-disabled":o&&!1===o.ripple||!1===g.default.ripple})},transition:"p-dialog"},styles:"\n@layer primereact {\n .p-dialog-mask {\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-dialog-visible {\n display: flex;\n }\n \n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n position: relative;\n }\n \n .p-dialog-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-dialog-header {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-dialog-footer {\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-dialog .p-dialog-title {\n flex-grow: 1;\n }\n \n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n \n /* Animation */\n /* Center */\n .p-dialog-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-dialog-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-dialog-enter-done {\n transform: none;\n }\n \n .p-dialog-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-top-left .p-dialog,\n .p-dialog-top-right .p-dialog,\n .p-dialog-bottom-left .p-dialog,\n .p-dialog-bottom-right .p-dialog {\n margin: 0.75em;\n }\n \n .p-dialog-top .p-dialog-enter,\n .p-dialog-top .p-dialog-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-dialog-bottom .p-dialog-enter,\n .p-dialog-bottom .p-dialog-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-dialog-left .p-dialog-enter,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-enter,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-enter,\n .p-dialog-bottom-left .p-dialog-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-dialog-right .p-dialog-enter,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-enter,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-enter,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-top-left .p-dialog-enter-active,\n .p-dialog-bottom-left .p-dialog-enter-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-top-right .p-dialog-enter-active,\n .p-dialog-bottom-right .p-dialog-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s ease-out;\n }\n \n .p-dialog-top .p-dialog-exit-active,\n .p-dialog-bottom .p-dialog-exit-active,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-exit-active,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transition: all 0.3s ease-out;\n }\n \n /* Maximize */\n .p-dialog-maximized {\n transition: none;\n transform: none;\n margin: 0;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px;\n left: 0px;\n }\n \n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n \n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n \n /* Resizable */\n .p-dialog .p-resizable-handle {\n position: absolute;\n font-size: 0.1px;\n display: block;\n cursor: se-resize;\n width: 12px;\n height: 12px;\n right: 1px;\n bottom: 1px;\n }\n \n .p-dialog-draggable .p-dialog-header {\n cursor: move;\n } \n}\n",inlineStyles:{mask:function(e){var t=e.props;return R({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===t.position||"top-left"===t.position||"bottom-left"===t.position?"flex-start":"right"===t.position||"top-right"===t.position||"bottom-right"===t.position?"flex-end":"center",alignItems:"top"===t.position||"top-left"===t.position||"top-right"===t.position?"flex-start":"bottom"===t.position||"bottom-left"===t.position||"bottom-right"===t.position?"flex-end":"center",pointerEvents:!t.modal&&"none"},t.maskStyle)}}}});function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=m.forwardRef((function(e,p){var d=m.useContext(n.PrimeReactContext),b=H.getProps(e,d),w=b.id?b.id:t.UniqueComponentId(),E=k(m.useState(w),2),O=E[0],D=k(m.useState(!1),2),S=D[0],P=D[1],z=k(m.useState(!1),2),I=z[0],C=z[1],R=k(m.useState(b.maximized),2),N=R[0],T=R[1],B=m.useRef(null),U=m.useRef(null),X=m.useRef(null),_=m.useRef(null),q=m.useRef(null),L=m.useRef(null),A=m.useRef(null),Y=m.useRef(!1),V=m.useRef(!1),Z=m.useRef(null),F=m.useRef(null),J=m.useRef(null),W=m.useRef(w),$=m.useRef(null),K=b.onMaximize?b.maximized:N,G=I&&(b.blockScroll||b.maximizable&&K),Q=H.setMetaData(M(M({props:b},b.__parentMetadata),{},{state:{id:O,maximized:K,containerVisible:S}})),ee=Q.ptm,te=Q.cx,ne=Q.sx;r.useHandleStyle(H.css.styles,Q.isUnstyled,{name:"dialog"}),j(U,b.closable&&b.closeOnEscape,(function(e){var t=e.currentTarget;if(t&&t.primeDialogParams){var n=t.primeDialogParams,r=n.length;ve(e),n.splice(r-1,1)}}));var re=k(i.useEventListener({type:"keydown",listener:function(e){return Ee(e)}}),2),oe=re[0],ie=re[1],ae=k(i.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return ke(e)}}),2),le=ae[0],ce=ae[1],ue=k(i.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Ie(e)}}),2),se=ue[0],pe=ue[1],de=k(i.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return De(e)}}),2),me=de[0],ge=de[1],fe=k(i.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Se(e)}}),2),be=fe[0],ye=fe[1],ve=function(e){b.onHide(),e.preventDefault()},he=function(e){X.current=e.target,b.onPointerDown&&b.onPointerDown(e)},xe=function(e){b.dismissableMask&&b.modal&&U.current===e.target&&!X.current&&ve(e),b.onMaskClick&&b.onMaskClick(e),X.current=null},we=function(e){b.onMaximize?b.onMaximize({originalEvent:e,maximized:!K}):T((function(e){return!e})),e.preventDefault()},Ee=function(e){var n=e.currentTarget;if(n&&n.primeDialogParams){var r=n.primeDialogParams,o=r.length,i=r[o-1]?r[o-1].id:void 0;if(i===O){var a=document.getElementById(i);if("Tab"===e.key){e.preventDefault();var l=t.DomHandler.getFocusableElements(a);if(l&&l.length>0)if(document.activeElement){var c=l.indexOf(document.activeElement);e.shiftKey?-1===c||0===c?l[l.length-1].focus():l[c-1].focus():-1===c||c===l.length-1?l[0].focus():l[c+1].focus()}else l[0].focus()}}}},Oe=function(e){t.DomHandler.hasClass(e.target,"p-dialog-header-icon")||t.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||b.draggable&&(Y.current=!0,Z.current=e.pageX,F.current=e.pageY,B.current.style.margin="0",t.DomHandler.addClass(document.body,"p-unselectable-text"),b.onDragStart&&b.onDragStart(e))},De=function(e){if(Y.current){var n=t.DomHandler.getOuterWidth(B.current),r=t.DomHandler.getOuterHeight(B.current),o=e.pageX-Z.current,i=e.pageY-F.current,a=B.current.getBoundingClientRect(),l=a.left+o,c=a.top+i,u=t.DomHandler.getViewport(),s=getComputedStyle(B.current),p=parseFloat(s.marginLeft),d=parseFloat(s.marginTop);B.current.style.position="fixed",b.keepInViewport?(l>=b.minX&&l+n<u.width&&(Z.current=e.pageX,B.current.style.left=l-p+"px"),c>=b.minY&&c+r<u.height&&(F.current=e.pageY,B.current.style.top=c-d+"px")):(Z.current=e.pageX,B.current.style.left=l-p+"px",F.current=e.pageY,B.current.style.top=c-d+"px"),b.onDrag&&b.onDrag(e)}},Se=function(e){Y.current&&(Y.current=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),b.onDragEnd&&b.onDragEnd(e))},Pe=function(e){b.resizable&&(V.current=!0,Z.current=e.pageX,F.current=e.pageY,t.DomHandler.addClass(document.body,"p-unselectable-text"),b.onResizeStart&&b.onResizeStart(e))},ze=function(e,n,r){!r&&(r=t.DomHandler.getViewport());var o=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?o*(r[n]/100):o},ke=function(e){if(V.current){var n=e.pageX-Z.current,r=e.pageY-F.current,o=t.DomHandler.getOuterWidth(B.current),i=t.DomHandler.getOuterHeight(B.current),a=B.current.getBoundingClientRect(),l=t.DomHandler.getViewport(),c=!parseInt(B.current.style.top)||!parseInt(B.current.style.left),u=ze(B.current.style.minWidth,"width",l),s=ze(B.current.style.minHeight,"height",l),p=o+n,d=i+r;c&&(p+=n,d+=r),(!u||p>u)&&a.left+p<l.width&&(B.current.style.width=p+"px"),(!s||d>s)&&a.top+d<l.height&&(B.current.style.height=d+"px"),Z.current=e.pageX,F.current=e.pageY,b.onResize&&b.onResize(e)}},Ie=function(e){V.current&&(V.current=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),b.onResizeEnd&&b.onResizeEnd(e))},je=function(){B.current.style.position="",B.current.style.left="",B.current.style.top="",B.current.style.margin=""},Ce=function(){B.current.setAttribute(W.current,"")},Re=function(){var e;b.onShow&&b.onShow(),b.focusOnShow&&!((e=document.activeElement)&&B.current&&B.current.contains(e))&&b.closable&&b.showHeader&&A.current.focus(),Me()},He=function(){b.modal&&t.DomHandler.addClass(U.current,"p-component-overlay-leave")},Ne=function(){Y.current=!1,t.ZIndexUtils.clear(U.current),P(!1),Te(),t.DomHandler.focus($.current),$.current=null},Me=function(){Ue(),Be(!0)},Te=function(){Xe(),Be(!1)},Be=function(e){if(e){var n={id:O,hasBlockScroll:G};document.primeDialogParams||(document.primeDialogParams=[]);var r=document.primeDialogParams.findIndex((function(e){return e.id===O}));document.primeDialogParams=-1===r?[].concat(y(o=document.primeDialogParams)||v(o)||h(o)||x(),[n]):document.primeDialogParams.toSpliced(r,1,n)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==O}));var o;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?t.DomHandler.blockBodyScroll():t.DomHandler.unblockBodyScroll()},Ue=function(){b.draggable&&(me(),be()),b.resizable&&(le(),se()),oe()},Xe=function(){ge(),ye(),ce(),pe(),ie()},_e=function(){J.current=t.DomHandler.createInlineStyle(d&&d.nonce||g.default.nonce);var e="";for(var n in b.breakpoints)e+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(W.current,"] {\n width: ").concat(b.breakpoints[n],";\n }\n }\n ");J.current.innerHTML=e};i.useMountEffect((function(){b.visible&&P(!0),b.breakpoints&&_e()})),i.useUpdateEffect((function(){b.visible&&!S&&P(!0),b.visible!==I&&S&&C(b.visible),b.visible&&($.current=document.activeElement)}),[b.visible,S]),i.useUpdateEffect((function(){S&&(t.ZIndexUtils.set("modal",U.current,d&&d.autoZIndex||g.default.autoZIndex,b.baseZIndex||d&&d.zIndex.modal||g.default.zIndex.modal),C(!0))}),[S]),i.useUpdateEffect((function(){Be(!0)}),[G]),i.useUnmountEffect((function(){Te(),t.DomHandler.removeInlineStyle(J.current),t.ZIndexUtils.clear(U.current)})),m.useImperativeHandle(p,(function(){return{props:b,resetPosition:je,getElement:function(){return B.current},getMask:function(){return U.current},getContent:function(){return _.current},getHeader:function(){return q.current},getFooter:function(){return L.current},getCloseButton:function(){return A.current}}}));var qe,Le,Ae,Ye,Ve,Ze,Fe,Je,We,$e,Ke,Ge,Qe=function(){if(b.closable){var e=b.ariaCloseIconLabel||n.localeOption("close"),r=t.mergeProps({className:te("closeButtonIcon"),"aria-hidden":!0},ee("closeButtonIcon")),o=t.IconUtils.getJSXIcon(b.closeIcon||m.createElement(a.TimesIcon,r),M({},r),{props:b}),i=t.mergeProps({ref:A,type:"button",className:te("closeButton"),"aria-label":e,onClick:ve},ee("closeButton"));return m.createElement("button",i,o,m.createElement(s.Ripple,null))}return null},et=function(){var e=t.mergeProps({className:te("maximizableIcon")},ee("maximizableIcon")),n=t.IconUtils.getJSXIcon(K?b.minimizeIcon||m.createElement(c.WindowMinimizeIcon,e):b.maximizeIcon||m.createElement(l.WindowMaximizeIcon,e),e,{props:b});if(b.maximizable){var r=t.mergeProps({type:"button",className:te("maximizableButton"),onClick:we},ee("maximizableButton"));return m.createElement("button",r,n,m.createElement(s.Ripple,null))}return null},tt=function(){if(b.showHeader){var e=Qe(),n=et(),r=t.ObjectUtils.getJSXElement(b.icons,b),o=t.ObjectUtils.getJSXElement(b.header,b),i=O+"_header",a=t.mergeProps({ref:q,style:b.headerStyle,className:te("header"),onMouseDown:Oe},ee("header")),l=t.mergeProps({id:i,className:te("headerTitle")},ee("headerTitle")),c=t.mergeProps({className:te("headerIcons")},ee("headerIcons"));return m.createElement("div",a,m.createElement("div",l,o),m.createElement("div",c,r,n,e))}return null},nt=function(){var e=t.ObjectUtils.getJSXElement(b.footer,b),n=t.mergeProps({ref:L,className:te("footer")},ee("footer"));return e&&m.createElement("div",n,e)};return S&&(Le=tt(),qe=t.mergeProps({id:O+"_content",ref:_,style:b.contentStyle,className:te("content")},ee("content")),Ae=m.createElement("div",qe,b.children),Ye=nt(),Ve=b.resizable?m.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Pe}):null,Ze=O+"_header",Fe=O+"_content",Je={enter:"center"===b.position?150:300,exit:"center"===b.position?150:300},We=t.mergeProps({ref:U,style:ne("mask"),className:te("mask"),onPointerUp:xe},ee("mask")),$e=t.mergeProps({ref:B,id:O,className:te("root",{props:b,maximized:K,context:d}),style:b.style,onClick:b.onClick,role:"dialog","aria-labelledby":Ze,"aria-describedby":Fe,"aria-modal":b.modal,onPointerDown:he},H.getOtherProps(b),ee("root")),Ke=t.mergeProps({classNames:te("transition"),timeout:Je,in:I,options:b.transitionOptions,unmountOnExit:!0,onEnter:Ce,onEntered:Re,onExiting:He,onExited:Ne},ee("transition")),Ge=m.createElement("div",We,m.createElement(o.CSSTransition,f({nodeRef:B},Ke),m.createElement("div",$e,Le,Ae,Ye,Ve))),m.createElement(u.Portal,{element:Ge,appendTo:b.appendTo,visible:!0}))}));T.displayName="Dialog",exports.Dialog=T;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/componentbase"),r=require("primereact/csstransition"),o=require("primereact/hooks"),i=require("primereact/icons/times"),a=require("primereact/icons/windowmaximize"),l=require("primereact/icons/windowminimize"),c=require("primereact/portal"),s=require("primereact/ripple"),u=require("primereact/utils");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var m=d(e),g=p(t);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function b(e){return b="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},b(e)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){if(Array.isArray(e))return y(e)}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function x(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e){var t=P(e,"string");return"symbol"===b(t)?t:String(t)}function O(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e){if(Array.isArray(e))return e}function D(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}function z(){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 k(e,t){return S(e)||D(e,t)||x(e,t)||z()}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=n.ComponentBase.extend({defaultProps:{__TYPE:"Dialog",__parentMetadata:null,appendTo:null,ariaCloseIconLabel:null,baseZIndex:0,blockScroll:!1,breakpoints:null,className:null,closable:!0,closeIcon:null,closeOnEscape:!0,contentClassName:null,contentStyle:null,dismissableMask:!1,draggable:!0,focusOnShow:!0,footer:null,footerClassName:null,header:null,headerClassName:null,headerStyle:null,icons:null,id:null,keepInViewport:!0,maskClassName:null,maskStyle:null,maximizable:!1,maximizeIcon:null,maximized:!1,minX:0,minY:0,minimizeIcon:null,modal:!0,onClick:null,onDrag:null,onDragEnd:null,onDragStart:null,onHide:null,onMaskClick:null,onMaximize:null,onResize:null,onResizeEnd:null,onResizeStart:null,onShow:null,position:"center",resizable:!0,rtl:!1,showHeader:!0,style:null,transitionOptions:null,visible:!1,children:void 0},css:{classes:{closeButtonIcon:"p-dialog-header-close-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",maximizableIcon:"p-dialog-header-maximize-icon",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",header:function(e){return u.classNames("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return u.classNames("p-dialog-content",e.props.contentClassName)},footer:function(e){return u.classNames("p-dialog-footer",e.props.footerClassName)},mask:function(e){var t=e.props,n=e.maskVisibleState,r=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find((function(e){return e===t.position||e.replace("-","")===t.position}));return u.classNames("p-dialog-mask",r?"p-dialog-".concat(r):"",{"p-component-overlay p-component-overlay-enter":t.modal,"p-dialog-visible":n,"p-dialog-draggable":t.draggable,"p-dialog-resizable":t.resizable},t.maskClassName)},root:function(e){var t=e.props,n=e.maximized,r=e.context;return u.classNames("p-dialog p-component",t.className,{"p-dialog-rtl":t.rtl,"p-dialog-maximized":n,"p-dialog-default":!n,"p-input-filled":r&&"filled"===r.inputStyle||"filled"===g.default.inputStyle,"p-ripple-disabled":r&&!1===r.ripple||!1===g.default.ripple})},transition:"p-dialog"},styles:"\n@layer primereact {\n .p-dialog-mask {\n background-color: transparent;\n transition-property: background-color;\n }\n \n .p-dialog-visible {\n display: flex;\n }\n \n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n position: relative;\n }\n \n .p-dialog-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n \n .p-dialog-header {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n \n .p-dialog-footer {\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n }\n \n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-dialog .p-dialog-title {\n flex-grow: 1;\n }\n \n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n \n /* Animation */\n /* Center */\n .p-dialog-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-dialog-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-dialog-enter-done {\n transform: none;\n }\n \n .p-dialog-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-top-left .p-dialog,\n .p-dialog-top-right .p-dialog,\n .p-dialog-bottom-left .p-dialog,\n .p-dialog-bottom-right .p-dialog {\n margin: 0.75em;\n }\n \n .p-dialog-top .p-dialog-enter,\n .p-dialog-top .p-dialog-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n \n .p-dialog-bottom .p-dialog-enter,\n .p-dialog-bottom .p-dialog-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n \n .p-dialog-left .p-dialog-enter,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-enter,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-enter,\n .p-dialog-bottom-left .p-dialog-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n \n .p-dialog-right .p-dialog-enter,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-enter,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-enter,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n \n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-top-left .p-dialog-enter-active,\n .p-dialog-bottom-left .p-dialog-enter-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-top-right .p-dialog-enter-active,\n .p-dialog-bottom-right .p-dialog-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s ease-out;\n }\n \n .p-dialog-top .p-dialog-exit-active,\n .p-dialog-bottom .p-dialog-exit-active,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-exit-active,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transition: all 0.3s ease-out;\n }\n \n /* Maximize */\n .p-dialog-maximized {\n transition: none;\n transform: none;\n margin: 0;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n }\n \n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n \n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n \n /* Resizable */\n .p-dialog .p-resizable-handle {\n position: absolute;\n font-size: 0.1px;\n display: block;\n cursor: se-resize;\n width: 12px;\n height: 12px;\n right: 1px;\n bottom: 1px;\n }\n \n .p-dialog-draggable .p-dialog-header {\n cursor: move;\n } \n}\n",inlineStyles:{mask:function(e){var t=e.props;return j({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===t.position||"top-left"===t.position||"bottom-left"===t.position?"flex-start":"right"===t.position||"top-right"===t.position||"bottom-right"===t.position?"flex-end":"center",alignItems:"top"===t.position||"top-left"===t.position||"top-right"===t.position?"flex-start":"bottom"===t.position||"bottom-left"===t.position||"bottom-right"===t.position?"flex-end":"center",pointerEvents:!t.modal&&"none"},t.maskStyle)}}}});function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N=m.forwardRef((function(e,p){var d=m.useContext(t.PrimeReactContext),b=C.getProps(e,d),y=b.id?b.id:u.UniqueComponentId(),P=k(m.useState(y),2),E=P[0],O=k(m.useState(!1),2),S=O[0],D=O[1],z=k(m.useState(!1),2),I=z[0],j=z[1],R=k(m.useState(b.maximized),2),N=R[0],M=R[1],T=m.useRef(null),B=m.useRef(null),U=m.useRef(null),_=m.useRef(null),X=m.useRef(null),A=m.useRef(null),q=m.useRef(null),L=m.useRef(!1),Y=m.useRef(!1),V=m.useRef(null),Z=m.useRef(null),J=m.useRef(null),F=m.useRef(y),W=m.useRef(null),G=b.onMaximize?b.maximized:N,K=I&&(b.blockScroll||b.maximizable&&G),$=o.useDisplayOrder("dialog",I),Q=C.setMetaData(H(H({props:b},b.__parentMetadata),{},{state:{id:E,maximized:G,containerVisible:S}})),ee=Q.ptm,te=Q.cx,ne=Q.sx;n.useHandleStyle(C.css.styles,Q.isUnstyled,{name:"dialog"}),o.useGlobalOnEscapeKey({callback:function(e){b.closable&&b.closeOnEscape&&ve(e)},when:I,priority:[o.ESC_KEY_HANDLING_PRIORITIES.DIALOG,$]});var re=k(o.useEventListener({type:"keydown",listener:function(e){return Pe(e)}}),2),oe=re[0],ie=re[1],ae=k(o.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return ke(e)}}),2),le=ae[0],ce=ae[1],se=k(o.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Ie(e)}}),2),ue=se[0],pe=se[1],de=k(o.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return Oe(e)}}),2),me=de[0],ge=de[1],fe=k(o.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Se(e)}}),2),be=fe[0],ye=fe[1],ve=function(e){b.onHide(),e.preventDefault()},he=function(e){U.current=e.target,b.onPointerDown&&b.onPointerDown(e)},xe=function(e){b.dismissableMask&&b.modal&&B.current===e.target&&!U.current&&ve(e),b.onMaskClick&&b.onMaskClick(e),U.current=null},we=function(e){b.onMaximize?b.onMaximize({originalEvent:e,maximized:!G}):M((function(e){return!e})),e.preventDefault()},Pe=function(e){var t=e.currentTarget;if(t&&t.primeDialogParams){var n=t.primeDialogParams,r=n.length,o=n[r-1]?n[r-1].id:void 0;if(o===E){var i=document.getElementById(o);if("Tab"===e.key){e.preventDefault();var a=u.DomHandler.getFocusableElements(i);if(a&&a.length>0)if(document.activeElement){var l=a.indexOf(document.activeElement);e.shiftKey?-1===l||0===l?a[a.length-1].focus():a[l-1].focus():-1===l||l===a.length-1?a[0].focus():a[l+1].focus()}else a[0].focus()}}}},Ee=function(e){u.DomHandler.hasClass(e.target,"p-dialog-header-icon")||u.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||b.draggable&&(L.current=!0,V.current=e.pageX,Z.current=e.pageY,T.current.style.margin="0",u.DomHandler.addClass(document.body,"p-unselectable-text"),b.onDragStart&&b.onDragStart(e))},Oe=function(e){if(L.current){var t=u.DomHandler.getOuterWidth(T.current),n=u.DomHandler.getOuterHeight(T.current),r=e.pageX-V.current,o=e.pageY-Z.current,i=T.current.getBoundingClientRect(),a=i.left+r,l=i.top+o,c=u.DomHandler.getViewport(),s=getComputedStyle(T.current),p=parseFloat(s.marginLeft),d=parseFloat(s.marginTop);T.current.style.position="fixed",b.keepInViewport?(a>=b.minX&&a+t<c.width&&(V.current=e.pageX,T.current.style.left=a-p+"px"),l>=b.minY&&l+n<c.height&&(Z.current=e.pageY,T.current.style.top=l-d+"px")):(V.current=e.pageX,T.current.style.left=a-p+"px",Z.current=e.pageY,T.current.style.top=l-d+"px"),b.onDrag&&b.onDrag(e)}},Se=function(e){L.current&&(L.current=!1,u.DomHandler.removeClass(document.body,"p-unselectable-text"),b.onDragEnd&&b.onDragEnd(e))},De=function(e){b.resizable&&(Y.current=!0,V.current=e.pageX,Z.current=e.pageY,u.DomHandler.addClass(document.body,"p-unselectable-text"),b.onResizeStart&&b.onResizeStart(e))},ze=function(e,t,n){!n&&(n=u.DomHandler.getViewport());var r=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?r*(n[t]/100):r},ke=function(e){if(Y.current){var t=e.pageX-V.current,n=e.pageY-Z.current,r=u.DomHandler.getOuterWidth(T.current),o=u.DomHandler.getOuterHeight(T.current),i=T.current.getBoundingClientRect(),a=u.DomHandler.getViewport(),l=!parseInt(T.current.style.top)||!parseInt(T.current.style.left),c=ze(T.current.style.minWidth,"width",a),s=ze(T.current.style.minHeight,"height",a),p=r+t,d=o+n;l&&(p+=t,d+=n),(!c||p>c)&&i.left+p<a.width&&(T.current.style.width=p+"px"),(!s||d>s)&&i.top+d<a.height&&(T.current.style.height=d+"px"),V.current=e.pageX,Z.current=e.pageY,b.onResize&&b.onResize(e)}},Ie=function(e){Y.current&&(Y.current=!1,u.DomHandler.removeClass(document.body,"p-unselectable-text"),b.onResizeEnd&&b.onResizeEnd(e))},je=function(){T.current.style.position="",T.current.style.left="",T.current.style.top="",T.current.style.margin=""},Ce=function(){T.current.setAttribute(F.current,"")},Re=function(){var e;b.onShow&&b.onShow(),b.focusOnShow&&!((e=document.activeElement)&&T.current&&T.current.contains(e))&&b.closable&&b.showHeader&&q.current&&q.current.focus(),Me()},He=function(){b.modal&&u.DomHandler.addClass(B.current,"p-component-overlay-leave")},Ne=function(){L.current=!1,u.ZIndexUtils.clear(B.current),D(!1),Te(),u.DomHandler.focus(W.current),W.current=null},Me=function(){Ue()},Te=function(){_e()},Be=function(e){if(e&&I){var t={id:E,hasBlockScroll:K};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex((function(e){return e.id===E}));document.primeDialogParams=-1===n?[].concat(v(r=document.primeDialogParams)||h(r)||x(r)||w(),[t]):document.primeDialogParams.toSpliced(n,1,t)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==E}));var r;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?u.DomHandler.blockBodyScroll():u.DomHandler.unblockBodyScroll()},Ue=function(){b.draggable&&(me(),be()),b.resizable&&(le(),ue()),oe()},_e=function(){ge(),ye(),ce(),pe(),ie()},Xe=function(){J.current=u.DomHandler.createInlineStyle(d&&d.nonce||g.default.nonce,d&&d.styleContainer);var e="";for(var t in b.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(F.current,"] {\n width: ").concat(b.breakpoints[t]," !important;\n }\n }\n ");J.current.innerHTML=e};o.useMountEffect((function(){Be(!0),b.visible&&D(!0)})),m.useEffect((function(){return b.breakpoints&&Xe(),function(){J.current=u.DomHandler.removeInlineStyle(J.current)}}),[b.breakpoints]),o.useUpdateEffect((function(){b.visible&&!S&&D(!0),b.visible!==I&&S&&j(b.visible),b.visible&&(W.current=document.activeElement)}),[b.visible,S]),o.useUpdateEffect((function(){S&&(u.ZIndexUtils.set("modal",B.current,d&&d.autoZIndex||g.default.autoZIndex,b.baseZIndex||d&&d.zIndex.modal||g.default.zIndex.modal),j(!0))}),[S]),o.useUpdateEffect((function(){Be(!0)}),[K,I]),o.useUnmountEffect((function(){Te(),Be(!1),u.DomHandler.removeInlineStyle(J.current),u.ZIndexUtils.clear(B.current)})),m.useImperativeHandle(p,(function(){return{props:b,resetPosition:je,getElement:function(){return T.current},getMask:function(){return B.current},getContent:function(){return _.current},getHeader:function(){return X.current},getFooter:function(){return A.current},getCloseButton:function(){return q.current}}}));var Ae=function(){if(b.closable){var e=b.ariaCloseIconLabel||t.localeOption("close"),n=u.mergeProps({className:te("closeButtonIcon"),"aria-hidden":!0},ee("closeButtonIcon")),r=u.IconUtils.getJSXIcon(b.closeIcon||m.createElement(i.TimesIcon,n),H({},n),{props:b}),o=u.mergeProps({ref:q,type:"button",className:te("closeButton"),"aria-label":e,onClick:ve},ee("closeButton"));return m.createElement("button",o,r,m.createElement(s.Ripple,null))}return null},qe=function(){var e=u.mergeProps({className:te("maximizableIcon")},ee("maximizableIcon")),t=u.IconUtils.getJSXIcon(G?b.minimizeIcon||m.createElement(l.WindowMinimizeIcon,e):b.maximizeIcon||m.createElement(a.WindowMaximizeIcon,e),e,{props:b});if(b.maximizable){var n=u.mergeProps({type:"button",className:te("maximizableButton"),onClick:we},ee("maximizableButton"));return m.createElement("button",n,t,m.createElement(s.Ripple,null))}return null},Le=function(){if(b.showHeader){var e=Ae(),t=qe(),n=u.ObjectUtils.getJSXElement(b.icons,b),r=u.ObjectUtils.getJSXElement(b.header,b),o=E+"_header",i=u.mergeProps({ref:X,style:b.headerStyle,className:te("header"),onMouseDown:Ee},ee("header")),a=u.mergeProps({id:o,className:te("headerTitle")},ee("headerTitle")),l=u.mergeProps({className:te("headerIcons")},ee("headerIcons"));return m.createElement("div",i,m.createElement("div",a,r),m.createElement("div",l,n,t,e))}return null},Ye=function(){var e=u.ObjectUtils.getJSXElement(b.footer,b),t=u.mergeProps({ref:A,className:te("footer")},ee("footer"));return e&&m.createElement("div",t,e)},Ve=function(t){var n,o=t.rootProps,i={header:b.header,content:b.message,message:null==b||null===(n=b.children)||void 0===n||null===(n=n[1])||void 0===n||null===(n=n.props)||void 0===n?void 0:n.children},a={headerRef:X,contentRef:_,footerRef:A,closeRef:q,hide:ve,message:i};return m.createElement("div",t.maskProps,m.createElement(r.CSSTransition,f({nodeRef:T},t.transitionProps),m.createElement("div",o,u.ObjectUtils.getJSXElement(e.content,a))))},Ze=function(e){var t,n=e.maskProps,o=e.rootProps,i=e.transitionProps,a=Le(),l=(t=u.mergeProps({id:E+"_content",ref:_,style:b.contentStyle,className:te("content")},ee("content")),m.createElement("div",t,b.children)),c=Ye(),s=b.resizable?m.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:De}):null;return m.createElement("div",n,m.createElement(r.CSSTransition,f({nodeRef:T},i),m.createElement("div",o,a,l,c,s)))};return S&&function(){var t=E+"_header",n=E+"_content",r={enter:"center"===b.position?150:300,exit:"center"===b.position?150:300},o=u.mergeProps({ref:B,style:ne("mask"),className:te("mask"),onPointerUp:xe},ee("mask")),i=u.mergeProps({ref:T,id:E,className:te("root",{props:b,maximized:G,context:d}),style:b.style,onClick:b.onClick,role:"dialog","aria-labelledby":t,"aria-describedby":n,"aria-modal":b.modal,onPointerDown:he},C.getOtherProps(b),ee("root")),a=u.mergeProps({classNames:te("transition"),timeout:r,in:I,options:b.transitionOptions,unmountOnExit:!0,onEnter:Ce,onEntered:Re,onExiting:He,onExited:Ne},ee("transition"));if(null!=e&&e.content){var l=Ve({maskProps:o,rootProps:i,transitionProps:a});return m.createElement(c.Portal,{element:l,appendTo:b.appendTo,visible:!0})}var s=Ze({maskProps:o,rootProps:i,transitionProps:a});return m.createElement(c.Portal,{element:s,appendTo:b.appendTo,visible:!0})}()}));N.displayName="Dialog",exports.Dialog=N;
|
package/dialog/dialog.d.ts
CHANGED
|
@@ -128,6 +128,59 @@ interface DialogMaximizeEvent {
|
|
|
128
128
|
maximized: boolean;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Defines current content values and refs for headless development.
|
|
133
|
+
* @see {@link DialogProps.content}
|
|
134
|
+
*/
|
|
135
|
+
interface ContentProps {
|
|
136
|
+
/**
|
|
137
|
+
* Allows you to specify the header of the content.
|
|
138
|
+
*/
|
|
139
|
+
headerRef: React.RefObject<HTMLElement>;
|
|
140
|
+
/**
|
|
141
|
+
* Allows you to specify the content.
|
|
142
|
+
*/
|
|
143
|
+
contentRef: React.RefObject<HTMLElement>;
|
|
144
|
+
/**
|
|
145
|
+
* Allows you to specify the footer of the content.
|
|
146
|
+
*/
|
|
147
|
+
footerRef: React.RefObject<HTMLElement>;
|
|
148
|
+
/**
|
|
149
|
+
* Allows you to specify the close button of the dialog.
|
|
150
|
+
*/
|
|
151
|
+
closeRef: React.RefObject<HTMLButtonElement | HTMLElement>;
|
|
152
|
+
/**
|
|
153
|
+
* Callback for hiding the dialog.
|
|
154
|
+
*/
|
|
155
|
+
hide(e: React.SyntheticEvent): void;
|
|
156
|
+
/**
|
|
157
|
+
* Dialog's props values.
|
|
158
|
+
*/
|
|
159
|
+
message: ContentPropsMessage;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Defines current content values and refs for headless development.
|
|
164
|
+
* @see {@link ContentProps.message}
|
|
165
|
+
*/
|
|
166
|
+
interface ContentPropsMessage {
|
|
167
|
+
/**
|
|
168
|
+
* Header of the dialog.
|
|
169
|
+
* @readonly
|
|
170
|
+
*/
|
|
171
|
+
header: string;
|
|
172
|
+
/**
|
|
173
|
+
* Content of the dialog.
|
|
174
|
+
* @readonly
|
|
175
|
+
*/
|
|
176
|
+
content: string;
|
|
177
|
+
/**
|
|
178
|
+
* Message of the dialog.
|
|
179
|
+
* @readonly
|
|
180
|
+
*/
|
|
181
|
+
message: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
131
184
|
/**
|
|
132
185
|
* Defines valid properties in Dialog component.
|
|
133
186
|
* @group Properties
|
|
@@ -137,7 +190,7 @@ export interface DialogProps {
|
|
|
137
190
|
* 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.
|
|
138
191
|
* @defaultValue document.body
|
|
139
192
|
*/
|
|
140
|
-
appendTo?: 'self' | HTMLElement | undefined | null;
|
|
193
|
+
appendTo?: 'self' | HTMLElement | undefined | null | (() => HTMLElement);
|
|
141
194
|
/**
|
|
142
195
|
* Defines a string that labels the close icon.
|
|
143
196
|
*/
|
|
@@ -373,6 +426,12 @@ export interface DialogProps {
|
|
|
373
426
|
* Callback to invoke when dialog is showed.
|
|
374
427
|
*/
|
|
375
428
|
onShow?(): void;
|
|
429
|
+
/**
|
|
430
|
+
* Specifies a custom content for the dialog. For more complex markup, use the "content" slot instead.
|
|
431
|
+
* @param {ContentProps} props - The values of dialog.
|
|
432
|
+
* @return {React.ReactNode}
|
|
433
|
+
*/
|
|
434
|
+
content?: React.ReactNode | ((props: ContentProps) => React.ReactNode);
|
|
376
435
|
}
|
|
377
436
|
|
|
378
437
|
/**
|