primereact 10.3.0 → 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 +11 -8
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +36 -1
- package/accordion/accordion.esm.js +11 -8
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +9 -6
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +39 -33
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +13 -2
- package/api/api.esm.js +39 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +39 -33
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +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/calendar/calendar.cjs.js +80 -43
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -5
- package/calendar/calendar.esm.js +80 -43
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +80 -43
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +42 -20
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +27 -4
- package/cascadeselect/cascadeselect.esm.js +43 -21
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +43 -21
- 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 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +17 -2
- package/chip/chip.esm.js +5 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +5 -1
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +2 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +2 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +2 -1
- package/chips/chips.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 +21 -18
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +19 -3
- package/confirmdialog/confirmdialog.esm.js +21 -18
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +21 -18
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +32 -120
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +12 -2
- package/confirmpopup/confirmpopup.esm.js +35 -123
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +32 -120
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +1 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +1 -1
- package/contextmenu/contextmenu.esm.js +1 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +725 -458
- package/core/core.min.js +40 -40
- package/datatable/datatable.cjs.js +31 -24
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +4 -3
- package/datatable/datatable.esm.js +31 -24
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +31 -24
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +1 -1
- package/dialog/dialog.cjs.js +27 -118
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -2
- package/dialog/dialog.esm.js +34 -125
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +28 -119
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +5 -3
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +5 -3
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +6 -4
- package/dropdown/dropdown.min.js +1 -1
- package/galleria/galleria.cjs.js +1 -1
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +1 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +1 -1
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +215 -76
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +8 -4
- package/hooks/hooks.esm.js +215 -78
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +215 -76
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +1 -1
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +1 -1
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +1 -1
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +1 -1
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +1 -1
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +1 -1
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +1 -1
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +1 -1
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +1 -1
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +1 -1
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +1 -1
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +1 -1
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +1 -1
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +1 -1
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +1 -1
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +1 -1
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +1 -1
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +1 -1
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +1 -1
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +1 -1
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +1 -1
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +1 -1
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +1 -1
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +1 -1
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +1 -1
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +1 -1
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +1 -1
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +1 -1
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +1 -1
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +1 -1
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +1 -1
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +1 -1
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +1 -1
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +1 -1
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +1 -1
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +1 -1
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +1 -1
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +1 -1
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +1 -1
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +1 -1
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +1 -1
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +1 -1
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +1 -1
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +1 -1
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +1 -1
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +1 -1
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +1 -1
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +1 -1
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +1 -1
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +1 -1
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +1 -1
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +1 -1
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +1 -1
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +1 -1
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +1 -1
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +1 -1
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +1 -1
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +1 -1
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +1 -1
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +1 -1
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +1 -1
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +1 -1
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +1 -1
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +1 -1
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +1 -1
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +1 -1
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +1 -1
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +1 -1
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +1 -1
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +1 -1
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +1 -1
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +1 -1
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +1 -1
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +1 -1
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +1 -1
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +1 -1
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +1 -1
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +1 -1
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +1 -1
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +1 -1
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +1 -1
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +1 -1
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +1 -1
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +1 -1
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +20 -109
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +22 -111
- package/image/image.esm.min.js +1 -1
- package/image/image.js +21 -110
- 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 +67 -66
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +69 -68
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +67 -66
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +0 -3
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +1 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +0 -3
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +7 -102
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.esm.js +10 -105
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +7 -102
- package/menu/menu.min.js +1 -1
- package/messages/messages.cjs.js +1 -1
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +1 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +1 -1
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +47 -30
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -1
- package/multiselect/multiselect.esm.js +47 -30
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +47 -30
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +1 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +10 -0
- package/orderlist/orderlist.esm.js +1 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +1 -1
- 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 -104
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +11 -106
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +10 -105
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/panelmenu/panelmenu.cjs.js +1 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +158 -155
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +158 -155
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +158 -155
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +8 -3
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +9 -4
- package/password/password.esm.min.js +1 -1
- package/password/password.js +8 -3
- 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 +3391 -2429
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +3390 -2430
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3391 -2429
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +26 -26
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +26 -26
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +27 -27
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +18 -9
- package/resources/themes/arya-green/theme.css +18 -9
- package/resources/themes/arya-orange/theme.css +18 -9
- package/resources/themes/arya-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-light-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-light-purple/theme.css +18 -9
- package/resources/themes/fluent-light/theme.css +18 -9
- package/resources/themes/lara-dark-amber/theme.css +18 -9
- package/resources/themes/lara-dark-blue/theme.css +18 -9
- package/resources/themes/lara-dark-cyan/theme.css +18 -9
- package/resources/themes/lara-dark-green/theme.css +18 -9
- package/resources/themes/lara-dark-indigo/theme.css +18 -9
- package/resources/themes/lara-dark-pink/theme.css +18 -9
- package/resources/themes/lara-dark-purple/theme.css +18 -9
- package/resources/themes/lara-dark-teal/theme.css +18 -9
- package/resources/themes/lara-light-amber/theme.css +18 -9
- package/resources/themes/lara-light-blue/theme.css +18 -9
- package/resources/themes/lara-light-cyan/theme.css +18 -9
- package/resources/themes/lara-light-green/theme.css +18 -9
- package/resources/themes/lara-light-indigo/theme.css +18 -9
- package/resources/themes/lara-light-pink/theme.css +18 -9
- package/resources/themes/lara-light-purple/theme.css +18 -9
- package/resources/themes/lara-light-teal/theme.css +18 -9
- package/resources/themes/luna-amber/theme.css +18 -9
- package/resources/themes/luna-blue/theme.css +18 -9
- package/resources/themes/luna-green/theme.css +18 -9
- package/resources/themes/luna-pink/theme.css +18 -9
- package/resources/themes/md-dark-deeppurple/theme.css +18 -9
- package/resources/themes/md-dark-indigo/theme.css +18 -9
- package/resources/themes/md-light-deeppurple/theme.css +18 -9
- package/resources/themes/md-light-indigo/theme.css +18 -9
- package/resources/themes/mdc-dark-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-dark-indigo/theme.css +18 -9
- package/resources/themes/mdc-light-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-light-indigo/theme.css +18 -9
- package/resources/themes/mira/theme.css +18 -9
- package/resources/themes/nano/theme.css +18 -9
- package/resources/themes/nova/theme.css +18 -9
- package/resources/themes/nova-accent/theme.css +18 -9
- package/resources/themes/nova-alt/theme.css +18 -9
- package/resources/themes/rhea/theme.css +18 -9
- package/resources/themes/saga-blue/theme.css +18 -9
- package/resources/themes/saga-green/theme.css +18 -9
- package/resources/themes/saga-orange/theme.css +18 -9
- package/resources/themes/saga-purple/theme.css +18 -9
- package/resources/themes/soho-dark/theme.css +18 -9
- package/resources/themes/soho-light/theme.css +18 -9
- package/resources/themes/tailwind-light/theme.css +18 -9
- package/resources/themes/vela-blue/theme.css +18 -9
- package/resources/themes/vela-green/theme.css +18 -9
- package/resources/themes/vela-orange/theme.css +18 -9
- package/resources/themes/vela-purple/theme.css +18 -9
- package/resources/themes/viva-dark/theme.css +18 -9
- package/resources/themes/viva-light/theme.css +18 -9
- package/ripple/ripple.cjs.js +6 -3
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +6 -3
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +6 -3
- package/ripple/ripple.min.js +1 -1
- package/sidebar/sidebar.cjs.js +8 -105
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +3 -3
- package/sidebar/sidebar.esm.js +11 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +9 -106
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +7 -102
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +1 -1
- package/slidemenu/slidemenu.esm.js +10 -105
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +7 -102
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +1 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +1 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -1
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +11 -3
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +12 -4
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +11 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +89 -81
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +1 -1
- package/splitbutton/splitbutton.esm.js +90 -82
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +89 -81
- package/splitbutton/splitbutton.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +9 -7
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +9 -7
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +9 -7
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +22 -8
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +35 -0
- package/tabview/tabview.esm.js +22 -8
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +22 -8
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.d.ts +2 -2
- 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 +244 -131
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -0
- package/tree/tree.esm.js +245 -132
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +244 -131
- 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 +67 -44
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +67 -44
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +67 -44
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +7 -4
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +7 -4
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +7 -4
- package/utils/utils.min.js +1 -1
- package/web-types.json +136 -29
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
|
|
|
@@ -165,106 +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 prevListener = usePrevious(listener);
|
|
196
|
-
var prevOptions = usePrevious(options);
|
|
197
|
-
var bind = function bind() {
|
|
198
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
199
|
-
if (utils.ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
200
|
-
unbind();
|
|
201
|
-
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(bindOptions.target));
|
|
202
|
-
}
|
|
203
|
-
if (!listenerRef.current && targetRef.current) {
|
|
204
|
-
listenerRef.current = function (event) {
|
|
205
|
-
return listener && listener(event);
|
|
206
|
-
};
|
|
207
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
var unbind = function unbind() {
|
|
211
|
-
if (listenerRef.current) {
|
|
212
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
213
|
-
listenerRef.current = null;
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
React__namespace.useEffect(function () {
|
|
217
|
-
if (when) {
|
|
218
|
-
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
219
|
-
} else {
|
|
220
|
-
unbind();
|
|
221
|
-
targetRef.current = null;
|
|
222
|
-
}
|
|
223
|
-
}, [target, when]);
|
|
224
|
-
React__namespace.useEffect(function () {
|
|
225
|
-
// to properly compare functions we can implicitly converting the function to it's body's text as a String
|
|
226
|
-
if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
|
|
227
|
-
unbind();
|
|
228
|
-
when && bind();
|
|
229
|
-
}
|
|
230
|
-
}, [listener, options, when]);
|
|
231
|
-
useUnmountEffect(function () {
|
|
232
|
-
unbind();
|
|
233
|
-
});
|
|
234
|
-
return [bind, unbind];
|
|
235
|
-
};
|
|
236
|
-
/* eslint-enable */
|
|
237
|
-
|
|
238
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
239
|
-
var handleEsc = function handleEsc(event) {
|
|
240
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
241
|
-
event.stopImmediatePropagation();
|
|
242
|
-
callback(event);
|
|
243
|
-
}
|
|
244
|
-
return;
|
|
245
|
-
};
|
|
246
|
-
var _useEventListener = useEventListener({
|
|
247
|
-
type: 'keydown',
|
|
248
|
-
listener: handleEsc
|
|
249
|
-
}),
|
|
250
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
251
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
252
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
253
|
-
React__namespace.useEffect(function () {
|
|
254
|
-
if (!condition) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
if (!ref.current) {
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
bindKeyDownListener();
|
|
261
|
-
return function () {
|
|
262
|
-
unbindKeyDownListener();
|
|
263
|
-
};
|
|
264
|
-
});
|
|
265
|
-
return [ref, callback];
|
|
266
|
-
};
|
|
267
|
-
|
|
268
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; }
|
|
269
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; }
|
|
270
170
|
var classes = {
|
|
@@ -431,6 +331,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
431
331
|
var focusElementOnHide = React__namespace.useRef(null);
|
|
432
332
|
var maximized = props.onMaximize ? props.maximized : maximizedState;
|
|
433
333
|
var shouldBlockScroll = visibleState && (props.blockScroll || props.maximizable && maximized);
|
|
334
|
+
var displayOrder = hooks.useDisplayOrder('dialog', visibleState);
|
|
434
335
|
var _DialogBase$setMetaDa = DialogBase.setMetaData(_objectSpread(_objectSpread({
|
|
435
336
|
props: props
|
|
436
337
|
}, props.__parentMetadata), {}, {
|
|
@@ -447,15 +348,14 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
447
348
|
componentbase.useHandleStyle(DialogBase.css.styles, isUnstyled, {
|
|
448
349
|
name: 'dialog'
|
|
449
350
|
});
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
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]
|
|
459
359
|
});
|
|
460
360
|
var _useEventListener = hooks.useEventListener({
|
|
461
361
|
type: 'keydown',
|
|
@@ -715,11 +615,9 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
715
615
|
};
|
|
716
616
|
var enableDocumentSettings = function enableDocumentSettings() {
|
|
717
617
|
bindGlobalListeners();
|
|
718
|
-
updateGlobalDialogsRegistry(true);
|
|
719
618
|
};
|
|
720
619
|
var disableDocumentSettings = function disableDocumentSettings() {
|
|
721
620
|
unbindGlobalListeners();
|
|
722
|
-
updateGlobalDialogsRegistry(false);
|
|
723
621
|
};
|
|
724
622
|
var updateScrollBlocker = function updateScrollBlocker() {
|
|
725
623
|
// Scroll should be unblocked if there is at least one dialog that blocks scrolling:
|
|
@@ -733,7 +631,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
733
631
|
}
|
|
734
632
|
};
|
|
735
633
|
var updateGlobalDialogsRegistry = function updateGlobalDialogsRegistry(isMounted) {
|
|
736
|
-
// Update current dialog info in global registry if it is mounted :
|
|
634
|
+
// Update current dialog info in global registry if it is mounted and visible:
|
|
737
635
|
if (isMounted && visibleState) {
|
|
738
636
|
var newParam = {
|
|
739
637
|
id: idState,
|
|
@@ -753,7 +651,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
753
651
|
document.primeDialogParams = document.primeDialogParams.toSpliced(currentDialogIndexInRegistry, 1, newParam);
|
|
754
652
|
}
|
|
755
653
|
}
|
|
756
|
-
// Or remove it from global registry if unmounted:
|
|
654
|
+
// Or remove it from global registry if unmounted or invisible:
|
|
757
655
|
else {
|
|
758
656
|
document.primeDialogParams = document.primeDialogParams && document.primeDialogParams.filter(function (param) {
|
|
759
657
|
return param.id !== idState;
|
|
@@ -783,21 +681,31 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
783
681
|
unbindDocumentKeyDownListener();
|
|
784
682
|
};
|
|
785
683
|
var createStyle = function createStyle() {
|
|
786
|
-
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);
|
|
787
685
|
var innerHTML = '';
|
|
788
686
|
for (var breakpoint in props.breakpoints) {
|
|
789
|
-
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 ");
|
|
790
688
|
}
|
|
791
689
|
styleElement.current.innerHTML = innerHTML;
|
|
792
690
|
};
|
|
691
|
+
var destroyStyle = function destroyStyle() {
|
|
692
|
+
styleElement.current = utils.DomHandler.removeInlineStyle(styleElement.current);
|
|
693
|
+
};
|
|
793
694
|
hooks.useMountEffect(function () {
|
|
695
|
+
updateGlobalDialogsRegistry(true);
|
|
794
696
|
if (props.visible) {
|
|
795
697
|
setMaskVisibleState(true);
|
|
796
698
|
}
|
|
699
|
+
});
|
|
700
|
+
React__namespace.useEffect(function () {
|
|
797
701
|
if (props.breakpoints) {
|
|
798
702
|
createStyle();
|
|
799
703
|
}
|
|
800
|
-
|
|
704
|
+
return function () {
|
|
705
|
+
destroyStyle();
|
|
706
|
+
};
|
|
707
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
708
|
+
}, [props.breakpoints]);
|
|
801
709
|
hooks.useUpdateEffect(function () {
|
|
802
710
|
if (props.visible && !maskVisibleState) {
|
|
803
711
|
setMaskVisibleState(true);
|
|
@@ -819,9 +727,10 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
819
727
|
}, [maskVisibleState]);
|
|
820
728
|
hooks.useUpdateEffect(function () {
|
|
821
729
|
updateGlobalDialogsRegistry(true);
|
|
822
|
-
}, [shouldBlockScroll]);
|
|
730
|
+
}, [shouldBlockScroll, visibleState]);
|
|
823
731
|
hooks.useUnmountEffect(function () {
|
|
824
732
|
disableDocumentSettings();
|
|
733
|
+
updateGlobalDialogsRegistry(false);
|
|
825
734
|
utils.DomHandler.removeInlineStyle(styleElement.current);
|
|
826
735
|
utils.ZIndexUtils.clear(maskRef.current);
|
|
827
736
|
});
|
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"),s=require("primereact/portal"),u=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),f=p(n);function g(){return g=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},g.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 v(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 v(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 v(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)?v(e,t):void 0}}function E(){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,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 P(e){var t=w(e,"string");return"symbol"===b(t)?t:String(t)}function O(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){if(Array.isArray(e))return e}function S(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 k(){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 z(e,t){return D(e)||S(e,t)||x(e,t)||k()}var I=function(e){var t=m.useRef(void 0);return m.useEffect((function(){t.current=e})),t.current},j=function(e,n,r){var o,i,a,l,c,s,u,p,d,f,g,b,v,y,h,x=(l=void 0===(a=(o={type:"keydown",listener:function(e){"Esc"!==e.key&&"Escape"!==e.key||(e.stopImmediatePropagation(),r(e))}}).target)?"document":a,c=o.type,s=o.listener,u=o.options,d=void 0===(p=o.when)||p,f=m.useRef(null),g=m.useRef(null),b=I(s),v=I(u),y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.ObjectUtils.isNotEmpty(e.target)&&(h(),(e.when||d)&&(f.current=t.DomHandler.getTargetElement(e.target))),!g.current&&f.current&&(g.current=function(e){return s&&s(e)},f.current.addEventListener(c,g.current,u))},h=function(){g.current&&(f.current.removeEventListener(c,g.current,u),g.current=null)},m.useEffect((function(){d?f.current=t.DomHandler.getTargetElement(l):(h(),f.current=null)}),[l,d]),m.useEffect((function(){!g.current||""+b==""+s&&v===u||(h(),d&&y())}),[s,u,d]),i=function(){h()},m.useEffect((function(){return i}),[]),[y,h]),E=z(x,2),w=E[0],P=E[1];return m.useEffect((function(){if(n&&e.current)return w(),function(){P()}})),[e,r]};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 C(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 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,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 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:function(e){return t.classNames("p-dialog-footer",e.props.footerClassName)},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"===f.default.inputStyle,"p-ripple-disabled":o&&!1===o.ripple||!1===f.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 C({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 T(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){O(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 M=m.forwardRef((function(e,p){var d=m.useContext(n.PrimeReactContext),b=H.getProps(e,d),v=b.id?b.id:t.UniqueComponentId(),w=z(m.useState(v),2),P=w[0],O=z(m.useState(!1),2),D=O[0],S=O[1],k=z(m.useState(!1),2),I=k[0],R=k[1],C=z(m.useState(b.maximized),2),N=C[0],M=C[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),J=m.useRef(null),F=m.useRef(null),W=m.useRef(v),$=m.useRef(null),K=b.onMaximize?b.maximized:N,G=I&&(b.blockScroll||b.maximizable&&K),Q=H.setMetaData(T(T({props:b},b.__parentMetadata),{},{state:{id:P,maximized:K,containerVisible:D}})),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;ye(e),n.splice(r-1,1)}}));var re=z(i.useEventListener({type:"keydown",listener:function(e){return we(e)}}),2),oe=re[0],ie=re[1],ae=z(i.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return ze(e)}}),2),le=ae[0],ce=ae[1],se=z(i.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Ie(e)}}),2),ue=se[0],pe=se[1],de=z(i.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return Oe(e)}}),2),me=de[0],fe=de[1],ge=z(i.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return De(e)}}),2),be=ge[0],ve=ge[1],ye=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&&ye(e),b.onMaskClick&&b.onMaskClick(e),X.current=null},Ee=function(e){b.onMaximize?b.onMaximize({originalEvent:e,maximized:!K}):M((function(e){return!e})),e.preventDefault()},we=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===P){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()}}}},Pe=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,J.current=e.pageY,B.current.style.margin="0",t.DomHandler.addClass(document.body,"p-unselectable-text"),b.onDragStart&&b.onDragStart(e))},Oe=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-J.current,a=B.current.getBoundingClientRect(),l=a.left+o,c=a.top+i,s=t.DomHandler.getViewport(),u=getComputedStyle(B.current),p=parseFloat(u.marginLeft),d=parseFloat(u.marginTop);B.current.style.position="fixed",b.keepInViewport?(l>=b.minX&&l+n<s.width&&(Z.current=e.pageX,B.current.style.left=l-p+"px"),c>=b.minY&&c+r<s.height&&(J.current=e.pageY,B.current.style.top=c-d+"px")):(Z.current=e.pageX,B.current.style.left=l-p+"px",J.current=e.pageY,B.current.style.top=c-d+"px"),b.onDrag&&b.onDrag(e)}},De=function(e){Y.current&&(Y.current=!1,t.DomHandler.removeClass(document.body,"p-unselectable-text"),b.onDragEnd&&b.onDragEnd(e))},Se=function(e){b.resizable&&(V.current=!0,Z.current=e.pageX,J.current=e.pageY,t.DomHandler.addClass(document.body,"p-unselectable-text"),b.onResizeStart&&b.onResizeStart(e))},ke=function(e,n,r){!r&&(r=t.DomHandler.getViewport());var o=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?o*(r[n]/100):o},ze=function(e){if(V.current){var n=e.pageX-Z.current,r=e.pageY-J.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),s=ke(B.current.style.minWidth,"width",l),u=ke(B.current.style.minHeight,"height",l),p=o+n,d=i+r;c&&(p+=n,d+=r),(!s||p>s)&&a.left+p<l.width&&(B.current.style.width=p+"px"),(!u||d>u)&&a.top+d<l.height&&(B.current.style.height=d+"px"),Z.current=e.pageX,J.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=""},Re=function(){B.current.setAttribute(W.current,"")},Ce=function(){var e;b.onShow&&b.onShow(),b.focusOnShow&&!((e=document.activeElement)&&B.current&&B.current.contains(e))&&b.closable&&b.showHeader&&A.current&&A.current.focus(),Te()},He=function(){b.modal&&t.DomHandler.addClass(U.current,"p-component-overlay-leave")},Ne=function(){Y.current=!1,t.ZIndexUtils.clear(U.current),S(!1),Me(),t.DomHandler.focus($.current),$.current=null},Te=function(){Ue(),Be(!0)},Me=function(){Xe(),Be(!1)},Be=function(e){if(e&&I){var n={id:P,hasBlockScroll:G};document.primeDialogParams||(document.primeDialogParams=[]);var r=document.primeDialogParams.findIndex((function(e){return e.id===P}));document.primeDialogParams=-1===r?[].concat(y(o=document.primeDialogParams)||h(o)||x(o)||E(),[n]):document.primeDialogParams.toSpliced(r,1,n)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==P}));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(),ue()),oe()},Xe=function(){fe(),ve(),ce(),pe(),ie()},_e=function(){F.current=t.DomHandler.createInlineStyle(d&&d.nonce||f.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 ");F.current.innerHTML=e};i.useMountEffect((function(){b.visible&&S(!0),b.breakpoints&&_e()})),i.useUpdateEffect((function(){b.visible&&!D&&S(!0),b.visible!==I&&D&&R(b.visible),b.visible&&($.current=document.activeElement)}),[b.visible,D]),i.useUpdateEffect((function(){D&&(t.ZIndexUtils.set("modal",U.current,d&&d.autoZIndex||f.default.autoZIndex,b.baseZIndex||d&&d.zIndex.modal||f.default.zIndex.modal),R(!0))}),[D]),i.useUpdateEffect((function(){Be(!0)}),[G]),i.useUnmountEffect((function(){Me(),t.DomHandler.removeInlineStyle(F.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=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),T({},r),{props:b}),i=t.mergeProps({ref:A,type:"button",className:te("closeButton"),"aria-label":e,onClick:ye},ee("closeButton"));return m.createElement("button",i,o,m.createElement(u.Ripple,null))}return null},Le=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:Ee},ee("maximizableButton"));return m.createElement("button",r,n,m.createElement(u.Ripple,null))}return null},Ae=function(){if(b.showHeader){var e=qe(),n=Le(),r=t.ObjectUtils.getJSXElement(b.icons,b),o=t.ObjectUtils.getJSXElement(b.header,b),i=P+"_header",a=t.mergeProps({ref:q,style:b.headerStyle,className:te("header"),onMouseDown:Pe},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},Ye=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)},Ve=function(n){var r,i=n.rootProps,a={header:b.header,content:b.message,message:null==b||null===(r=b.children)||void 0===r||null===(r=r[1])||void 0===r||null===(r=r.props)||void 0===r?void 0:r.children},l={headerRef:q,contentRef:_,footerRef:L,closeRef:A,hide:ye,message:a};return m.createElement("div",n.maskProps,m.createElement(o.CSSTransition,g({nodeRef:B},n.transitionProps),m.createElement("div",i,t.ObjectUtils.getJSXElement(e.content,l))))},Ze=function(e){var n,r=e.maskProps,i=e.rootProps,a=e.transitionProps,l=Ae(),c=(n=t.mergeProps({id:P+"_content",ref:_,style:b.contentStyle,className:te("content")},ee("content")),m.createElement("div",n,b.children)),s=Ye(),u=b.resizable?m.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Se}):null;return m.createElement("div",r,m.createElement(o.CSSTransition,g({nodeRef:B},a),m.createElement("div",i,l,c,s,u)))};return D&&function(){var n=P+"_header",r=P+"_content",o={enter:"center"===b.position?150:300,exit:"center"===b.position?150:300},i=t.mergeProps({ref:U,style:ne("mask"),className:te("mask"),onPointerUp:xe},ee("mask")),a=t.mergeProps({ref:B,id:P,className:te("root",{props:b,maximized:K,context:d}),style:b.style,onClick:b.onClick,role:"dialog","aria-labelledby":n,"aria-describedby":r,"aria-modal":b.modal,onPointerDown:he},H.getOtherProps(b),ee("root")),l=t.mergeProps({classNames:te("transition"),timeout:o,in:I,options:b.transitionOptions,unmountOnExit:!0,onEnter:Re,onEntered:Ce,onExiting:He,onExited:Ne},ee("transition"));if(null!=e&&e.content){var c=Ve({maskProps:i,rootProps:a,transitionProps:l});return m.createElement(s.Portal,{element:c,appendTo:b.appendTo,visible:!0})}var u=Ze({maskProps:i,rootProps:a,transitionProps:l});return m.createElement(s.Portal,{element:u,appendTo:b.appendTo,visible:!0})}()}));M.displayName="Dialog",exports.Dialog=M;
|
|
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
|
@@ -190,7 +190,7 @@ export interface DialogProps {
|
|
|
190
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.
|
|
191
191
|
* @defaultValue document.body
|
|
192
192
|
*/
|
|
193
|
-
appendTo?: 'self' | HTMLElement | undefined | null;
|
|
193
|
+
appendTo?: 'self' | HTMLElement | undefined | null | (() => HTMLElement);
|
|
194
194
|
/**
|
|
195
195
|
* Defines a string that labels the close icon.
|
|
196
196
|
*/
|
|
@@ -431,7 +431,7 @@ export interface DialogProps {
|
|
|
431
431
|
* @param {ContentProps} props - The values of dialog.
|
|
432
432
|
* @return {React.ReactNode}
|
|
433
433
|
*/
|
|
434
|
-
content
|
|
434
|
+
content?: React.ReactNode | ((props: ContentProps) => React.ReactNode);
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
/**
|
package/dialog/dialog.esm.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { DomHandler, ObjectUtils, classNames, UniqueComponentId, ZIndexUtils, mergeProps, IconUtils } from 'primereact/utils';
|
|
4
3
|
import PrimeReact, { PrimeReactContext, localeOption } from 'primereact/api';
|
|
5
4
|
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
5
|
import { CSSTransition } from 'primereact/csstransition';
|
|
7
|
-
import {
|
|
6
|
+
import { useDisplayOrder, useGlobalOnEscapeKey, ESC_KEY_HANDLING_PRIORITIES, useEventListener, useMountEffect, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
8
7
|
import { TimesIcon } from 'primereact/icons/times';
|
|
9
8
|
import { WindowMaximizeIcon } from 'primereact/icons/windowmaximize';
|
|
10
9
|
import { WindowMinimizeIcon } from 'primereact/icons/windowminimize';
|
|
11
10
|
import { Portal } from 'primereact/portal';
|
|
12
11
|
import { Ripple } from 'primereact/ripple';
|
|
12
|
+
import { classNames, UniqueComponentId, DomHandler, ZIndexUtils, mergeProps, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
13
13
|
|
|
14
14
|
function _extends() {
|
|
15
15
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -138,106 +138,6 @@ function _slicedToArray(arr, i) {
|
|
|
138
138
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
var usePrevious = function usePrevious(newValue) {
|
|
142
|
-
var ref = React.useRef(undefined);
|
|
143
|
-
React.useEffect(function () {
|
|
144
|
-
ref.current = newValue;
|
|
145
|
-
});
|
|
146
|
-
return ref.current;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/* eslint-disable */
|
|
150
|
-
var useUnmountEffect = function useUnmountEffect(fn) {
|
|
151
|
-
return React.useEffect(function () {
|
|
152
|
-
return fn;
|
|
153
|
-
}, []);
|
|
154
|
-
};
|
|
155
|
-
/* eslint-enable */
|
|
156
|
-
|
|
157
|
-
/* eslint-disable */
|
|
158
|
-
var useEventListener = function useEventListener(_ref) {
|
|
159
|
-
var _ref$target = _ref.target,
|
|
160
|
-
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
161
|
-
type = _ref.type,
|
|
162
|
-
listener = _ref.listener,
|
|
163
|
-
options = _ref.options,
|
|
164
|
-
_ref$when = _ref.when,
|
|
165
|
-
when = _ref$when === void 0 ? true : _ref$when;
|
|
166
|
-
var targetRef = React.useRef(null);
|
|
167
|
-
var listenerRef = React.useRef(null);
|
|
168
|
-
var prevListener = usePrevious(listener);
|
|
169
|
-
var prevOptions = usePrevious(options);
|
|
170
|
-
var bind = function bind() {
|
|
171
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
172
|
-
if (ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
173
|
-
unbind();
|
|
174
|
-
(bindOptions.when || when) && (targetRef.current = DomHandler.getTargetElement(bindOptions.target));
|
|
175
|
-
}
|
|
176
|
-
if (!listenerRef.current && targetRef.current) {
|
|
177
|
-
listenerRef.current = function (event) {
|
|
178
|
-
return listener && listener(event);
|
|
179
|
-
};
|
|
180
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
var unbind = function unbind() {
|
|
184
|
-
if (listenerRef.current) {
|
|
185
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
186
|
-
listenerRef.current = null;
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
React.useEffect(function () {
|
|
190
|
-
if (when) {
|
|
191
|
-
targetRef.current = DomHandler.getTargetElement(target);
|
|
192
|
-
} else {
|
|
193
|
-
unbind();
|
|
194
|
-
targetRef.current = null;
|
|
195
|
-
}
|
|
196
|
-
}, [target, when]);
|
|
197
|
-
React.useEffect(function () {
|
|
198
|
-
// to properly compare functions we can implicitly converting the function to it's body's text as a String
|
|
199
|
-
if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
|
|
200
|
-
unbind();
|
|
201
|
-
when && bind();
|
|
202
|
-
}
|
|
203
|
-
}, [listener, options, when]);
|
|
204
|
-
useUnmountEffect(function () {
|
|
205
|
-
unbind();
|
|
206
|
-
});
|
|
207
|
-
return [bind, unbind];
|
|
208
|
-
};
|
|
209
|
-
/* eslint-enable */
|
|
210
|
-
|
|
211
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
212
|
-
var handleEsc = function handleEsc(event) {
|
|
213
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
214
|
-
event.stopImmediatePropagation();
|
|
215
|
-
callback(event);
|
|
216
|
-
}
|
|
217
|
-
return;
|
|
218
|
-
};
|
|
219
|
-
var _useEventListener = useEventListener({
|
|
220
|
-
type: 'keydown',
|
|
221
|
-
listener: handleEsc
|
|
222
|
-
}),
|
|
223
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
224
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
225
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
226
|
-
React.useEffect(function () {
|
|
227
|
-
if (!condition) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
if (!ref.current) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
bindKeyDownListener();
|
|
234
|
-
return function () {
|
|
235
|
-
unbindKeyDownListener();
|
|
236
|
-
};
|
|
237
|
-
});
|
|
238
|
-
return [ref, callback];
|
|
239
|
-
};
|
|
240
|
-
|
|
241
141
|
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; }
|
|
242
142
|
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; }
|
|
243
143
|
var classes = {
|
|
@@ -404,6 +304,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
404
304
|
var focusElementOnHide = React.useRef(null);
|
|
405
305
|
var maximized = props.onMaximize ? props.maximized : maximizedState;
|
|
406
306
|
var shouldBlockScroll = visibleState && (props.blockScroll || props.maximizable && maximized);
|
|
307
|
+
var displayOrder = useDisplayOrder('dialog', visibleState);
|
|
407
308
|
var _DialogBase$setMetaDa = DialogBase.setMetaData(_objectSpread(_objectSpread({
|
|
408
309
|
props: props
|
|
409
310
|
}, props.__parentMetadata), {}, {
|
|
@@ -420,17 +321,16 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
420
321
|
useHandleStyle(DialogBase.css.styles, isUnstyled, {
|
|
421
322
|
name: 'dialog'
|
|
422
323
|
});
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
params.splice(paramLength - 1, 1);
|
|
324
|
+
useGlobalOnEscapeKey({
|
|
325
|
+
callback: function callback(event) {
|
|
326
|
+
if (props.closable && props.closeOnEscape) {
|
|
327
|
+
onClose(event);
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
when: visibleState,
|
|
331
|
+
priority: [ESC_KEY_HANDLING_PRIORITIES.DIALOG, displayOrder]
|
|
432
332
|
});
|
|
433
|
-
var _useEventListener = useEventListener
|
|
333
|
+
var _useEventListener = useEventListener({
|
|
434
334
|
type: 'keydown',
|
|
435
335
|
listener: function listener(event) {
|
|
436
336
|
return onKeyDown(event);
|
|
@@ -439,7 +339,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
439
339
|
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
440
340
|
bindDocumentKeyDownListener = _useEventListener2[0],
|
|
441
341
|
unbindDocumentKeyDownListener = _useEventListener2[1];
|
|
442
|
-
var _useEventListener3 = useEventListener
|
|
342
|
+
var _useEventListener3 = useEventListener({
|
|
443
343
|
type: 'mousemove',
|
|
444
344
|
target: function target() {
|
|
445
345
|
return window.document;
|
|
@@ -451,7 +351,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
451
351
|
_useEventListener4 = _slicedToArray(_useEventListener3, 2),
|
|
452
352
|
bindDocumentResizeListener = _useEventListener4[0],
|
|
453
353
|
unbindDocumentResizeListener = _useEventListener4[1];
|
|
454
|
-
var _useEventListener5 = useEventListener
|
|
354
|
+
var _useEventListener5 = useEventListener({
|
|
455
355
|
type: 'mouseup',
|
|
456
356
|
target: function target() {
|
|
457
357
|
return window.document;
|
|
@@ -463,7 +363,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
463
363
|
_useEventListener6 = _slicedToArray(_useEventListener5, 2),
|
|
464
364
|
bindDocumentResizeEndListener = _useEventListener6[0],
|
|
465
365
|
unbindDocumentResizEndListener = _useEventListener6[1];
|
|
466
|
-
var _useEventListener7 = useEventListener
|
|
366
|
+
var _useEventListener7 = useEventListener({
|
|
467
367
|
type: 'mousemove',
|
|
468
368
|
target: function target() {
|
|
469
369
|
return window.document;
|
|
@@ -475,7 +375,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
475
375
|
_useEventListener8 = _slicedToArray(_useEventListener7, 2),
|
|
476
376
|
bindDocumentDragListener = _useEventListener8[0],
|
|
477
377
|
unbindDocumentDragListener = _useEventListener8[1];
|
|
478
|
-
var _useEventListener9 = useEventListener
|
|
378
|
+
var _useEventListener9 = useEventListener({
|
|
479
379
|
type: 'mouseup',
|
|
480
380
|
target: function target() {
|
|
481
381
|
return window.document;
|
|
@@ -688,11 +588,9 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
688
588
|
};
|
|
689
589
|
var enableDocumentSettings = function enableDocumentSettings() {
|
|
690
590
|
bindGlobalListeners();
|
|
691
|
-
updateGlobalDialogsRegistry(true);
|
|
692
591
|
};
|
|
693
592
|
var disableDocumentSettings = function disableDocumentSettings() {
|
|
694
593
|
unbindGlobalListeners();
|
|
695
|
-
updateGlobalDialogsRegistry(false);
|
|
696
594
|
};
|
|
697
595
|
var updateScrollBlocker = function updateScrollBlocker() {
|
|
698
596
|
// Scroll should be unblocked if there is at least one dialog that blocks scrolling:
|
|
@@ -706,7 +604,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
706
604
|
}
|
|
707
605
|
};
|
|
708
606
|
var updateGlobalDialogsRegistry = function updateGlobalDialogsRegistry(isMounted) {
|
|
709
|
-
// Update current dialog info in global registry if it is mounted :
|
|
607
|
+
// Update current dialog info in global registry if it is mounted and visible:
|
|
710
608
|
if (isMounted && visibleState) {
|
|
711
609
|
var newParam = {
|
|
712
610
|
id: idState,
|
|
@@ -726,7 +624,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
726
624
|
document.primeDialogParams = document.primeDialogParams.toSpliced(currentDialogIndexInRegistry, 1, newParam);
|
|
727
625
|
}
|
|
728
626
|
}
|
|
729
|
-
// Or remove it from global registry if unmounted:
|
|
627
|
+
// Or remove it from global registry if unmounted or invisible:
|
|
730
628
|
else {
|
|
731
629
|
document.primeDialogParams = document.primeDialogParams && document.primeDialogParams.filter(function (param) {
|
|
732
630
|
return param.id !== idState;
|
|
@@ -756,21 +654,31 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
756
654
|
unbindDocumentKeyDownListener();
|
|
757
655
|
};
|
|
758
656
|
var createStyle = function createStyle() {
|
|
759
|
-
styleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce);
|
|
657
|
+
styleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce, context && context.styleContainer);
|
|
760
658
|
var innerHTML = '';
|
|
761
659
|
for (var breakpoint in props.breakpoints) {
|
|
762
|
-
innerHTML += "\n @media screen and (max-width: ".concat(breakpoint, ") {\n
|
|
660
|
+
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 ");
|
|
763
661
|
}
|
|
764
662
|
styleElement.current.innerHTML = innerHTML;
|
|
765
663
|
};
|
|
664
|
+
var destroyStyle = function destroyStyle() {
|
|
665
|
+
styleElement.current = DomHandler.removeInlineStyle(styleElement.current);
|
|
666
|
+
};
|
|
766
667
|
useMountEffect(function () {
|
|
668
|
+
updateGlobalDialogsRegistry(true);
|
|
767
669
|
if (props.visible) {
|
|
768
670
|
setMaskVisibleState(true);
|
|
769
671
|
}
|
|
672
|
+
});
|
|
673
|
+
React.useEffect(function () {
|
|
770
674
|
if (props.breakpoints) {
|
|
771
675
|
createStyle();
|
|
772
676
|
}
|
|
773
|
-
|
|
677
|
+
return function () {
|
|
678
|
+
destroyStyle();
|
|
679
|
+
};
|
|
680
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
681
|
+
}, [props.breakpoints]);
|
|
774
682
|
useUpdateEffect(function () {
|
|
775
683
|
if (props.visible && !maskVisibleState) {
|
|
776
684
|
setMaskVisibleState(true);
|
|
@@ -792,9 +700,10 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
792
700
|
}, [maskVisibleState]);
|
|
793
701
|
useUpdateEffect(function () {
|
|
794
702
|
updateGlobalDialogsRegistry(true);
|
|
795
|
-
}, [shouldBlockScroll]);
|
|
796
|
-
useUnmountEffect
|
|
703
|
+
}, [shouldBlockScroll, visibleState]);
|
|
704
|
+
useUnmountEffect(function () {
|
|
797
705
|
disableDocumentSettings();
|
|
706
|
+
updateGlobalDialogsRegistry(false);
|
|
798
707
|
DomHandler.removeInlineStyle(styleElement.current);
|
|
799
708
|
ZIndexUtils.clear(maskRef.current);
|
|
800
709
|
});
|