primereact 10.8.2 → 10.8.4
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 +8 -8
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +8 -8
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +8 -8
- package/accordion/accordion.min.js +1 -1
- package/api/api.d.ts +10 -0
- package/autocomplete/autocomplete.cjs.js +19 -14
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +19 -14
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +19 -14
- package/autocomplete/autocomplete.min.js +1 -1
- package/badge/badge.cjs.js +1 -1
- package/badge/badge.d.ts +1 -1
- package/badge/badge.esm.js +1 -1
- package/badge/badge.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +26 -8
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +26 -8
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +26 -8
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +2 -2
- package/button/button.esm.js +2 -2
- package/button/button.js +2 -2
- package/buttongroup/buttongroup.cjs.js +1 -1
- package/buttongroup/buttongroup.esm.js +1 -1
- package/buttongroup/buttongroup.js +1 -1
- package/calendar/calendar.cjs.js +65 -33
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -6
- package/calendar/calendar.esm.js +66 -34
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +65 -33
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +4 -3
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +4 -3
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +11 -10
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +3 -4
- package/cascadeselect/cascadeselect.esm.js +11 -10
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +11 -10
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +1 -1
- package/chart/chart.esm.js +1 -1
- package/chart/chart.js +1 -1
- package/checkbox/checkbox.cjs.js +1 -1
- package/checkbox/checkbox.esm.js +1 -1
- package/checkbox/checkbox.js +1 -1
- package/chip/chip.cjs.js +8 -8
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +9 -9
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +8 -8
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +4 -3
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +4 -3
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +4 -3
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.js +1 -1
- package/componentbase/componentbase.cjs.js +14 -14
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +14 -14
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +14 -14
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +3 -3
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +6 -5
- package/confirmdialog/confirmdialog.esm.js +3 -3
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +3 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +4 -5
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +4 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +4 -5
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +5 -2
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +5 -2
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +5 -2
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +200 -158
- package/core/core.min.js +11 -11
- package/csstransition/csstransition.cjs.js +1 -0
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +1 -0
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +1 -0
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +20 -5
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +20 -5
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +20 -5
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +64 -59
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +64 -59
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +64 -59
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +1 -1
- package/dataview/dataview.d.ts +4 -3
- package/dataview/dataview.esm.js +1 -1
- package/dataview/dataview.js +1 -1
- package/dialog/dialog.cjs.js +3 -3
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +4 -4
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +3 -3
- package/dialog/dialog.min.js +1 -1
- package/dock/dock.cjs.js +4 -3
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +4 -3
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +4 -3
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +46 -21
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +8 -0
- package/dropdown/dropdown.esm.js +46 -21
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +47 -23
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +5 -5
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +5 -5
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +5 -5
- package/editor/editor.min.js +1 -1
- package/fileupload/fileupload.cjs.js +2 -2
- package/fileupload/fileupload.d.ts +17 -12
- package/fileupload/fileupload.esm.js +2 -2
- package/fileupload/fileupload.js +2 -2
- package/floatlabel/floatlabel.cjs.js +1 -1
- package/floatlabel/floatlabel.d.ts +1 -1
- package/floatlabel/floatlabel.esm.js +1 -1
- package/floatlabel/floatlabel.js +1 -1
- package/focustrap/focustrap.cjs.js +1 -1
- package/focustrap/focustrap.esm.js +1 -1
- package/focustrap/focustrap.js +1 -1
- package/galleria/galleria.cjs.js +9 -7
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +9 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +9 -7
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +0 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +0 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +0 -3
- package/hooks/hooks.min.js +1 -1
- package/iconfield/iconfield.cjs.js +6 -2
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +7 -3
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +6 -2
- package/iconfield/iconfield.min.js +1 -1
- package/icons/angledoubledown/index.cjs.js +1 -1
- package/icons/angledoubledown/index.esm.js +1 -1
- package/icons/angledoubledown/index.js +1 -1
- package/icons/angledoubleleft/index.cjs.js +1 -1
- package/icons/angledoubleleft/index.esm.js +1 -1
- package/icons/angledoubleleft/index.js +1 -1
- package/icons/angledoubleright/index.cjs.js +1 -1
- package/icons/angledoubleright/index.esm.js +1 -1
- package/icons/angledoubleright/index.js +1 -1
- package/icons/angledoubleup/index.cjs.js +1 -1
- package/icons/angledoubleup/index.esm.js +1 -1
- package/icons/angledoubleup/index.js +1 -1
- package/icons/angledown/index.cjs.js +1 -1
- package/icons/angledown/index.esm.js +1 -1
- package/icons/angledown/index.js +1 -1
- package/icons/angleleft/index.cjs.js +1 -1
- package/icons/angleleft/index.esm.js +1 -1
- package/icons/angleleft/index.js +1 -1
- package/icons/angleright/index.cjs.js +1 -1
- package/icons/angleright/index.esm.js +1 -1
- package/icons/angleright/index.js +1 -1
- package/icons/angleup/index.cjs.js +1 -1
- package/icons/angleup/index.esm.js +1 -1
- package/icons/angleup/index.js +1 -1
- package/icons/arrowdown/index.cjs.js +1 -1
- package/icons/arrowdown/index.esm.js +1 -1
- package/icons/arrowdown/index.js +1 -1
- package/icons/arrowup/index.cjs.js +1 -1
- package/icons/arrowup/index.esm.js +1 -1
- package/icons/arrowup/index.js +1 -1
- package/icons/ban/index.cjs.js +1 -1
- package/icons/ban/index.esm.js +1 -1
- package/icons/ban/index.js +1 -1
- package/icons/bars/index.cjs.js +1 -1
- package/icons/bars/index.esm.js +1 -1
- package/icons/bars/index.js +1 -1
- package/icons/blank/index.cjs.js +1 -1
- package/icons/blank/index.esm.js +1 -1
- package/icons/blank/index.js +1 -1
- package/icons/calendar/index.cjs.js +1 -1
- package/icons/calendar/index.esm.js +1 -1
- package/icons/calendar/index.js +1 -1
- package/icons/check/index.cjs.js +1 -1
- package/icons/check/index.esm.js +1 -1
- package/icons/check/index.js +1 -1
- package/icons/chevrondown/index.cjs.js +1 -1
- package/icons/chevrondown/index.esm.js +1 -1
- package/icons/chevrondown/index.js +1 -1
- package/icons/chevronleft/index.cjs.js +1 -1
- package/icons/chevronleft/index.esm.js +1 -1
- package/icons/chevronleft/index.js +1 -1
- package/icons/chevronright/index.cjs.js +1 -1
- package/icons/chevronright/index.esm.js +1 -1
- package/icons/chevronright/index.js +1 -1
- package/icons/chevronup/index.cjs.js +1 -1
- package/icons/chevronup/index.esm.js +1 -1
- package/icons/chevronup/index.js +1 -1
- package/icons/download/index.cjs.js +1 -1
- package/icons/download/index.esm.js +1 -1
- package/icons/download/index.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +1 -1
- package/icons/exclamationtriangle/index.js +1 -1
- package/icons/eye/index.cjs.js +1 -1
- package/icons/eye/index.esm.js +1 -1
- package/icons/eye/index.js +1 -1
- package/icons/eyeslash/index.cjs.js +1 -1
- package/icons/eyeslash/index.esm.js +1 -1
- package/icons/eyeslash/index.js +1 -1
- package/icons/filter/index.cjs.js +1 -1
- package/icons/filter/index.esm.js +1 -1
- package/icons/filter/index.js +1 -1
- package/icons/filterslash/index.cjs.js +1 -1
- package/icons/filterslash/index.esm.js +1 -1
- package/icons/filterslash/index.js +1 -1
- package/icons/infocircle/index.cjs.js +1 -1
- package/icons/infocircle/index.esm.js +1 -1
- package/icons/infocircle/index.js +1 -1
- package/icons/minus/index.cjs.js +1 -1
- package/icons/minus/index.esm.js +1 -1
- package/icons/minus/index.js +1 -1
- package/icons/pencil/index.cjs.js +1 -1
- package/icons/pencil/index.esm.js +1 -1
- package/icons/pencil/index.js +1 -1
- package/icons/plus/index.cjs.js +1 -1
- package/icons/plus/index.esm.js +1 -1
- package/icons/plus/index.js +1 -1
- package/icons/refresh/index.cjs.js +1 -1
- package/icons/refresh/index.esm.js +1 -1
- package/icons/refresh/index.js +1 -1
- package/icons/search/index.cjs.js +1 -1
- package/icons/search/index.esm.js +1 -1
- package/icons/search/index.js +1 -1
- package/icons/searchminus/index.cjs.js +1 -1
- package/icons/searchminus/index.esm.js +1 -1
- package/icons/searchminus/index.js +1 -1
- package/icons/searchplus/index.cjs.js +1 -1
- package/icons/searchplus/index.esm.js +1 -1
- package/icons/searchplus/index.js +1 -1
- package/icons/sortalt/index.cjs.js +1 -1
- package/icons/sortalt/index.esm.js +1 -1
- package/icons/sortalt/index.js +1 -1
- package/icons/sortamountdown/index.cjs.js +1 -1
- package/icons/sortamountdown/index.esm.js +1 -1
- package/icons/sortamountdown/index.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +1 -1
- package/icons/sortamountupalt/index.esm.js +1 -1
- package/icons/sortamountupalt/index.js +1 -1
- package/icons/spinner/index.cjs.js +1 -1
- package/icons/spinner/index.esm.js +1 -1
- package/icons/spinner/index.js +1 -1
- package/icons/star/index.cjs.js +1 -1
- package/icons/star/index.esm.js +1 -1
- package/icons/star/index.js +1 -1
- package/icons/starfill/index.cjs.js +1 -1
- package/icons/starfill/index.esm.js +1 -1
- package/icons/starfill/index.js +1 -1
- package/icons/thlarge/index.cjs.js +1 -1
- package/icons/thlarge/index.esm.js +1 -1
- package/icons/thlarge/index.js +1 -1
- package/icons/times/index.cjs.js +1 -1
- package/icons/times/index.esm.js +1 -1
- package/icons/times/index.js +1 -1
- package/icons/timescircle/index.cjs.js +1 -1
- package/icons/timescircle/index.esm.js +1 -1
- package/icons/timescircle/index.js +1 -1
- package/icons/trash/index.cjs.js +1 -1
- package/icons/trash/index.esm.js +1 -1
- package/icons/trash/index.js +1 -1
- package/icons/undo/index.cjs.js +1 -1
- package/icons/undo/index.esm.js +1 -1
- package/icons/undo/index.js +1 -1
- package/icons/upload/index.cjs.js +1 -1
- package/icons/upload/index.esm.js +1 -1
- package/icons/upload/index.js +1 -1
- package/icons/windowmaximize/index.cjs.js +1 -1
- package/icons/windowmaximize/index.esm.js +1 -1
- package/icons/windowmaximize/index.js +1 -1
- package/icons/windowminimize/index.cjs.js +1 -1
- package/icons/windowminimize/index.esm.js +1 -1
- package/icons/windowminimize/index.js +1 -1
- package/image/image.cjs.js +2 -2
- package/image/image.esm.js +2 -2
- package/image/image.js +2 -2
- package/inputicon/inputicon.cjs.js +9 -4
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +9 -4
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +9 -4
- package/inputicon/inputicon.min.js +1 -1
- package/inputmask/inputmask.cjs.js +2 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +2 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +2 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +25 -14
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +25 -14
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +25 -14
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +14 -13
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.d.ts +1 -4
- package/inputotp/inputotp.esm.js +14 -13
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +14 -13
- package/inputotp/inputotp.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +1 -1
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputtext/inputtext.cjs.js +5 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -0
- package/inputtext/inputtext.esm.js +5 -3
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +5 -3
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +1 -1
- package/inputtextarea/inputtextarea.js +1 -1
- package/knob/knob.cjs.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.js +1 -1
- package/listbox/listbox.cjs.js +7 -6
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +7 -6
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +7 -6
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +5 -5
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +5 -5
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +5 -5
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +7 -5
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +8 -0
- package/mention/mention.esm.js +7 -5
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +7 -5
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +28 -25
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +14 -0
- package/menu/menu.esm.js +28 -25
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +28 -25
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +35 -14
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +35 -14
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +35 -14
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.js +1 -1
- package/messages/messages.cjs.js +3 -3
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +3 -3
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +3 -3
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +35 -20
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +35 -20
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +35 -20
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +2 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +2 -2
- package/multistatecheckbox/multistatecheckbox.js +2 -2
- package/orderlist/orderlist.cjs.js +3 -3
- package/orderlist/orderlist.esm.js +3 -3
- package/orderlist/orderlist.js +3 -3
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -1
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +1 -1
- package/paginator/paginator.esm.js +1 -1
- package/paginator/paginator.js +1 -1
- package/panelmenu/panelmenu.cjs.js +39 -36
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +12 -4
- package/panelmenu/panelmenu.esm.js +39 -36
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +39 -36
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +464 -363
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +464 -363
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +464 -363
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +23 -10
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +24 -11
- package/password/password.esm.min.js +1 -1
- package/password/password.js +23 -10
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +2 -2
- package/picklist/picklist.esm.js +2 -2
- package/picklist/picklist.js +2 -2
- package/primereact.all.cjs.js +1470 -1239
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1471 -1240
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1470 -1239
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.js +1 -1
- package/progressspinner/progressspinner.cjs.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/radiobutton/radiobutton.cjs.js +1 -1
- package/radiobutton/radiobutton.esm.js +1 -1
- package/radiobutton/radiobutton.js +1 -1
- package/rating/rating.cjs.js +3 -4
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +3 -4
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +3 -4
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +15 -8
- package/resources/themes/arya-green/theme.css +15 -8
- package/resources/themes/arya-orange/theme.css +15 -8
- package/resources/themes/arya-purple/theme.css +1143 -233
- package/resources/themes/bootstrap4-dark-blue/theme.css +15 -8
- package/resources/themes/bootstrap4-dark-purple/theme.css +15 -8
- package/resources/themes/bootstrap4-light-blue/theme.css +15 -8
- package/resources/themes/bootstrap4-light-purple/theme.css +15 -8
- package/resources/themes/fluent-light/theme.css +15 -8
- package/resources/themes/lara-dark-amber/theme.css +15 -6
- package/resources/themes/lara-dark-blue/theme.css +15 -6
- package/resources/themes/lara-dark-cyan/theme.css +15 -6
- package/resources/themes/lara-dark-green/theme.css +15 -6
- package/resources/themes/lara-dark-indigo/theme.css +15 -6
- package/resources/themes/lara-dark-pink/theme.css +15 -6
- package/resources/themes/lara-dark-purple/theme.css +79 -17
- package/resources/themes/lara-dark-teal/theme.css +15 -6
- package/resources/themes/lara-light-amber/theme.css +15 -6
- package/resources/themes/lara-light-blue/theme.css +15 -6
- package/resources/themes/lara-light-cyan/theme.css +15 -6
- package/resources/themes/lara-light-green/theme.css +15 -6
- package/resources/themes/lara-light-indigo/theme.css +15 -6
- package/resources/themes/lara-light-pink/theme.css +15 -6
- package/resources/themes/lara-light-purple/theme.css +79 -17
- package/resources/themes/lara-light-teal/theme.css +15 -6
- package/resources/themes/luna-amber/theme.css +15 -8
- package/resources/themes/luna-blue/theme.css +15 -8
- package/resources/themes/luna-green/theme.css +15 -8
- package/resources/themes/luna-pink/theme.css +15 -8
- package/resources/themes/md-dark-deeppurple/theme.css +15 -7
- package/resources/themes/md-dark-indigo/theme.css +15 -7
- package/resources/themes/md-light-deeppurple/theme.css +15 -7
- package/resources/themes/md-light-indigo/theme.css +15 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +15 -7
- package/resources/themes/mdc-dark-indigo/theme.css +15 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +15 -7
- package/resources/themes/mdc-light-indigo/theme.css +15 -7
- package/resources/themes/mira/theme.css +15 -6
- package/resources/themes/nano/theme.css +15 -8
- package/resources/themes/nova/theme.css +15 -8
- package/resources/themes/nova-accent/theme.css +15 -8
- package/resources/themes/nova-alt/theme.css +15 -8
- package/resources/themes/rhea/theme.css +15 -8
- package/resources/themes/saga-blue/theme.css +15 -8
- package/resources/themes/saga-green/theme.css +15 -8
- package/resources/themes/saga-orange/theme.css +15 -8
- package/resources/themes/saga-purple/theme.css +1143 -233
- package/resources/themes/soho-dark/theme.css +14 -5
- package/resources/themes/soho-light/theme.css +14 -5
- package/resources/themes/tailwind-light/theme.css +15 -6
- package/resources/themes/vela-blue/theme.css +15 -8
- package/resources/themes/vela-green/theme.css +15 -8
- package/resources/themes/vela-orange/theme.css +15 -8
- package/resources/themes/vela-purple/theme.css +1143 -233
- package/resources/themes/viva-dark/theme.css +14 -5
- package/resources/themes/viva-light/theme.css +14 -5
- package/ripple/ripple.cjs.js +1 -1
- package/ripple/ripple.esm.js +1 -1
- package/ripple/ripple.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +14 -6
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +14 -6
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +14 -6
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +1 -1
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- package/selectbutton/selectbutton.cjs.js +1 -1
- package/selectbutton/selectbutton.esm.js +1 -1
- package/selectbutton/selectbutton.js +1 -1
- package/sidebar/sidebar.d.ts +2 -1
- package/skeleton/skeleton.cjs.js +1 -1
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/slidemenu/slidemenu.cjs.js +4 -1
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +4 -1
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +4 -1
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +3 -2
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +3 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +3 -2
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +12 -5
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +12 -5
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +12 -5
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +23 -14
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +23 -14
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +23 -14
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +7 -6
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +7 -6
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +7 -6
- package/splitter/splitter.min.js +1 -1
- package/stepper/stepper.cjs.js +69 -49
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.d.ts +22 -0
- package/stepper/stepper.esm.js +70 -50
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +69 -49
- package/stepper/stepper.min.js +1 -1
- package/stepperpanel/stepperpanel.cjs.js +1 -1
- package/stepperpanel/stepperpanel.esm.js +1 -1
- package/stepperpanel/stepperpanel.js +1 -1
- package/steps/steps.cjs.js +58 -13
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +48 -4
- package/steps/steps.esm.js +59 -14
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +58 -13
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +25 -9
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +25 -9
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +25 -9
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +8 -8
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +8 -8
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +8 -8
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.d.ts +1 -1
- package/terminal/terminal.cjs.js +1 -1
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +16 -10
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +16 -10
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +16 -10
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +1 -1
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.js +1 -1
- package/toast/toast.cjs.js +3 -3
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +1 -1
- package/toast/toast.esm.js +3 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +3 -3
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +1 -1
- package/togglebutton/togglebutton.esm.js +1 -1
- package/togglebutton/togglebutton.js +1 -1
- package/toolbar/toolbar.cjs.js +1 -1
- package/toolbar/toolbar.esm.js +1 -1
- package/toolbar/toolbar.js +1 -1
- package/tooltip/tooltip.cjs.js +8 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +8 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +8 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +31 -30
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +2 -6
- package/tree/tree.esm.js +31 -30
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +31 -30
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +9 -9
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +9 -9
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +9 -9
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +37 -35
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +17 -2
- package/treetable/treetable.esm.js +37 -35
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +37 -35
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +79 -13
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +80 -13
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +79 -13
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +11 -11
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +2 -2
- package/utils/utils.esm.js +11 -11
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +11 -11
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +1 -1
- package/virtualscroller/virtualscroller.js +1 -1
- package/web-types.json +71 -7
package/dataview/dataview.cjs.js
CHANGED
|
@@ -309,7 +309,7 @@ var DataViewLayoutOptions = /*#__PURE__*/React__namespace.memo(function (inProps
|
|
|
309
309
|
var DataViewItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
310
310
|
return props.template(props.item, props.layout);
|
|
311
311
|
});
|
|
312
|
-
var DataView = /*#__PURE__*/React__namespace.memo(
|
|
312
|
+
var DataView = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
313
313
|
var mergeProps = hooks.useMergeProps();
|
|
314
314
|
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
315
315
|
var props = DataViewBase.getProps(inProps, context);
|
package/dataview/dataview.d.ts
CHANGED
|
@@ -339,10 +339,11 @@ export interface DataViewProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
|
|
|
339
339
|
itemTemplate?(item: any, layout?: 'list' | 'grid' | (string & Record<string, unknown>)): React.ReactNode | undefined;
|
|
340
340
|
/**
|
|
341
341
|
* Function that gets the options along with the layout mode and returns the content.
|
|
342
|
-
* @param {*}
|
|
343
|
-
* @param {'list' | 'grid' | (string & Record<string, unknown>)} layout - Current layout.
|
|
342
|
+
* @param {*} items - Array of items to be rendered.
|
|
343
|
+
* @param {'list' | 'grid' | (string & Record<string, unknown>)} [layout] - Current layout mode.
|
|
344
|
+
* @returns {React.ReactNode | React.ReactNode[] | undefined} The content to be rendered.
|
|
344
345
|
*/
|
|
345
|
-
listTemplate?(items: any[], layout?: 'list' | 'grid' | (string & Record<string, unknown>)): React.ReactNode[] | undefined;
|
|
346
|
+
listTemplate?(items: any[], layout?: 'list' | 'grid' | (string & Record<string, unknown>)): React.ReactNode | React.ReactNode[] | undefined;
|
|
346
347
|
/**
|
|
347
348
|
* Used to get the child elements of the component.
|
|
348
349
|
* @readonly
|
package/dataview/dataview.esm.js
CHANGED
|
@@ -282,7 +282,7 @@ var DataViewLayoutOptions = /*#__PURE__*/React.memo(function (inProps) {
|
|
|
282
282
|
var DataViewItem = /*#__PURE__*/React.memo(function (props) {
|
|
283
283
|
return props.template(props.item, props.layout);
|
|
284
284
|
});
|
|
285
|
-
var DataView = /*#__PURE__*/React.memo(
|
|
285
|
+
var DataView = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
286
286
|
var mergeProps = useMergeProps();
|
|
287
287
|
var context = React.useContext(PrimeReactContext);
|
|
288
288
|
var props = DataViewBase.getProps(inProps, context);
|
package/dataview/dataview.js
CHANGED
|
@@ -297,7 +297,7 @@ this.primereact.dataview = (function (exports, React, PrimeReact, componentbase,
|
|
|
297
297
|
var DataViewItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
298
298
|
return props.template(props.item, props.layout);
|
|
299
299
|
});
|
|
300
|
-
var DataView = /*#__PURE__*/React__namespace.memo(
|
|
300
|
+
var DataView = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
301
301
|
var mergeProps = hooks.useMergeProps();
|
|
302
302
|
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
303
303
|
var props = DataViewBase.getProps(inProps, context);
|
package/dialog/dialog.cjs.js
CHANGED
|
@@ -185,7 +185,7 @@ var FocusTrapBase = componentbase.ComponentBase.extend({
|
|
|
185
185
|
|
|
186
186
|
function ownKeys$2(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; }
|
|
187
187
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
188
|
-
var FocusTrap = /*#__PURE__*/React__default["default"].memo(
|
|
188
|
+
var FocusTrap = /*#__PURE__*/React__default["default"].memo(/*#__PURE__*/React__default["default"].forwardRef(function (inProps, ref) {
|
|
189
189
|
var targetRef = React__default["default"].useRef(null);
|
|
190
190
|
var firstFocusableElementRef = React__default["default"].useRef(null);
|
|
191
191
|
var lastFocusableElementRef = React__default["default"].useRef(null);
|
|
@@ -844,7 +844,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
844
844
|
});
|
|
845
845
|
var createCloseIcon = function createCloseIcon() {
|
|
846
846
|
if (props.closable) {
|
|
847
|
-
var
|
|
847
|
+
var labelAria = props.ariaCloseIconLabel || PrimeReact.ariaLabel('close');
|
|
848
848
|
var closeButtonIconProps = mergeProps({
|
|
849
849
|
className: cx('closeButtonIcon'),
|
|
850
850
|
'aria-hidden': true
|
|
@@ -857,7 +857,7 @@ var Dialog = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
|
857
857
|
ref: closeRef,
|
|
858
858
|
type: 'button',
|
|
859
859
|
className: cx('closeButton'),
|
|
860
|
-
'aria-label':
|
|
860
|
+
'aria-label': labelAria,
|
|
861
861
|
onClick: onClose,
|
|
862
862
|
onKeyDown: function onKeyDown(ev) {
|
|
863
863
|
if (ev.key !== 'Escape') {
|
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/api"),n=require("primereact/componentbase"),r=require("primereact/csstransition"),o=require("primereact/hooks"),i=require("primereact/utils"),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=p(e),f=d(e),g=p(t);function b(){return b=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},b.apply(this,arguments)}function y(e){return y="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},y(e)}function h(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 h(e)}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e,t){if(e){if("string"==typeof e)return h(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)?h(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 E(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function D(e){var t=E(e,"string");return"symbol"===y(t)?t:String(t)}function S(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){if(Array.isArray(e))return e}function j(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 I(e,t){return P(e)||j(e,t)||O(e,t)||z()}var k=n.ComponentBase.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return i.ObjectUtils.getMergedProps(e,k.defaultProps)},getOtherProps:function(e){return i.ObjectUtils.getDiffProps(e,k.defaultProps)}});function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=m.default.memo(m.default.forwardRef((function(e,n){var r=m.default.useRef(null),a=m.default.useRef(null),l=m.default.useRef(null),c=m.default.useContext(t.PrimeReactContext),s=k.getProps(e,c),u={props:s};o.useStyle(k.css.styles,{name:"focustrap"});k.setMetaData(R({},u));m.default.useImperativeHandle(n,(function(){return{props:s,getInk:function(){return a.current},getTarget:function(){return r.current}}})),o.useMountEffect((function(){s.disabled||(r.current=y(),h(r.current))}));var p,d,f,g,b,y=function(){return a.current&&a.current.parentElement},h=function(e){var t=s||{},n=t.autoFocusSelector,r=t.firstFocusableSelector,o=void 0===r?"":r,a=t.autoFocus,l=void 0!==a&&a,c="".concat(v(void 0===n?"":n)),u="[autofocus]".concat(c,", [data-pc-autofocus='true']").concat(c),p=i.DomHandler.getFirstFocusableElement(e,u);l&&!p&&(p=i.DomHandler.getFirstFocusableElement(e,v(o))),i.DomHandler.focus(p)},v=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},x=function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_firsthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_firsthiddenfocusableelement:i.DomHandler.getLastFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)};return d=void 0===(p=(s||{}).tabIndex)?0:p,g=(f=function(e,t){return m.default.createElement("span",{ref:"firstfocusableelement"===t?a:l,className:"p-hidden-accessible p-hidden-focusable",tabIndex:d,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e,"data-pc-section":t})})((function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_lasthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_lasthiddenfocusableelement:i.DomHandler.getFirstFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)}),"firstfocusableelement"),b=f(x,"lastfocusableelement"),g.ref.current&&b.ref.current&&(g.ref.current.$_pfocustrap_lasthiddenfocusableelement=b.ref.current,b.ref.current.$_pfocustrap_firsthiddenfocusableelement=g.ref.current),m.default.createElement(m.default.Fragment,null,g,s.children,b)})));function _(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 N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=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,content:null,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 i.classNames("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return i.classNames("p-dialog-content",e.props.contentClassName)},footer:function(e){return i.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 i.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.maximized,n=e.context;return i.classNames("p-dialog p-component",{"p-dialog-rtl":e.props.rtl,"p-dialog-maximized":t,"p-dialog-default":!t,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===g.default.inputStyle,"p-ripple-disabled":n&&!1===n.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 N({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 T(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 B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F=f.forwardRef((function(e,p){var d=o.useMergeProps(),m=f.useContext(t.PrimeReactContext),y=M.getProps(e,m),h=y.id?y.id:i.UniqueComponentId(),E=I(f.useState(h),2),D=E[0],S=I(f.useState(!1),2),P=S[0],j=S[1],z=I(f.useState(!1),2),k=z[0],C=z[1],R=I(f.useState(y.maximized),2),_=R[0],N=R[1],T=f.useRef(null),F=f.useRef(null),U=f.useRef(null),X=f.useRef(null),A=f.useRef(null),q=f.useRef(null),L=f.useRef(null),Y=f.useRef(!1),$=f.useRef(!1),V=f.useRef(null),Z=f.useRef(null),J=f.useRef(null),W=f.useRef(h),G=f.useRef(null),K=y.onMaximize?y.maximized:_,Q=k&&(y.blockScroll||y.maximizable&&K),ee=y.closable&&y.closeOnEscape&&k,te=o.useDisplayOrder("dialog",ee),ne=M.setMetaData(B(B({props:y},y.__parentMetadata),{},{state:{id:D,maximized:K,containerVisible:P}})),re=ne.ptm,oe=ne.cx,ie=ne.sx,ae=ne.isUnstyled;n.useHandleStyle(M.css.styles,ae,{name:"dialog"}),o.useGlobalOnEscapeKey({callback:function(e){ve(e)},when:ee&&te,priority:[o.ESC_KEY_HANDLING_PRIORITIES.DIALOG,te]});var le=I(o.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return ze(e)}}),2),ce=le[0],se=le[1],ue=I(o.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Ie(e)}}),2),pe=ue[0],de=ue[1],me=I(o.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return De(e)}}),2),fe=me[0],ge=me[1],be=I(o.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Se(e)}}),2),ye=be[0],he=be[1],ve=function(e){y.onHide(),e.preventDefault()},xe=function(e){U.current=e.target,y.onPointerDown&&y.onPointerDown(e)},Oe=function(e){y.dismissableMask&&y.modal&&F.current===e.target&&!U.current&&ve(e),y.onMaskClick&&y.onMaskClick(e),U.current=null},we=function(e){y.onMaximize?y.onMaximize({originalEvent:e,maximized:!K}):N((function(e){return!e})),e.preventDefault()},Ee=function(e){i.DomHandler.hasClass(e.target,"p-dialog-header-icon")||i.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||y.draggable&&(Y.current=!0,V.current=e.pageX,Z.current=e.pageY,T.current.style.margin="0",i.DomHandler.addClass(document.body,"p-unselectable-text"),y.onDragStart&&y.onDragStart(e))},De=function(e){if(Y.current){var t=i.DomHandler.getOuterWidth(T.current),n=i.DomHandler.getOuterHeight(T.current),r=e.pageX-V.current,o=e.pageY-Z.current,a=T.current.getBoundingClientRect(),l=a.left+r,c=a.top+o,s=i.DomHandler.getViewport(),u=getComputedStyle(T.current),p=parseFloat(u.marginLeft),d=parseFloat(u.marginTop);T.current.style.position="fixed",y.keepInViewport?(l>=y.minX&&l+t<s.width&&(V.current=e.pageX,T.current.style.left=l-p+"px"),c>=y.minY&&c+n<s.height&&(Z.current=e.pageY,T.current.style.top=c-d+"px")):(V.current=e.pageX,T.current.style.left=l-p+"px",Z.current=e.pageY,T.current.style.top=c-d+"px"),y.onDrag&&y.onDrag(e)}},Se=function(e){Y.current&&(Y.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),y.onDragEnd&&y.onDragEnd(e))},Pe=function(e){y.resizable&&($.current=!0,V.current=e.pageX,Z.current=e.pageY,i.DomHandler.addClass(document.body,"p-unselectable-text"),y.onResizeStart&&y.onResizeStart(e))},je=function(e,t,n){!n&&(n=i.DomHandler.getViewport());var r=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?r*(n[t]/100):r},ze=function(e){if($.current){var t=e.pageX-V.current,n=e.pageY-Z.current,r=i.DomHandler.getOuterWidth(T.current),o=i.DomHandler.getOuterHeight(T.current),a=T.current.getBoundingClientRect(),l=i.DomHandler.getViewport(),c=!parseInt(T.current.style.top)||!parseInt(T.current.style.left),s=je(T.current.style.minWidth,"width",l),u=je(T.current.style.minHeight,"height",l),p=r+t,d=o+n;c&&(p+=t,d+=n),(!s||p>s)&&a.left+p<l.width&&(T.current.style.width=p+"px"),(!u||d>u)&&a.top+d<l.height&&(T.current.style.height=d+"px"),V.current=e.pageX,Z.current=e.pageY,y.onResize&&y.onResize(e)}},Ie=function(e){$.current&&($.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),y.onResizeEnd&&y.onResizeEnd(e))},ke=function(){T.current.style.position="",T.current.style.left="",T.current.style.top="",T.current.style.margin=""},Ce=function(){T.current.setAttribute(W.current,"")},Re=function(){var e;y.onShow&&y.onShow(),y.focusOnShow&&!((e=document.activeElement)&&T.current&&T.current.contains(e))&&y.closable&&y.showHeader&&L.current&&L.current.focus(),Ne()},He=function(){y.modal&&!ae()&&i.DomHandler.addClass(F.current,"p-component-overlay-leave")},_e=function(){Y.current=!1,i.ZIndexUtils.clear(F.current),j(!1),Me(),i.DomHandler.focus(G.current),G.current=null},Ne=function(){Be()},Me=function(){Fe()},Te=function(e){if(e&&k){var t={id:D,hasBlockScroll:Q};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex((function(e){return e.id===D}));document.primeDialogParams=-1===n?[].concat(v(r=document.primeDialogParams)||x(r)||O(r)||w(),[t]):document.primeDialogParams.toSpliced(n,1,t)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==D}));var r;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?i.DomHandler.blockBodyScroll():i.DomHandler.unblockBodyScroll()},Be=function(){y.draggable&&(fe(),ye()),y.resizable&&(ce(),pe())},Fe=function(){ge(),he(),se(),de()},Ue=function(){J.current=i.DomHandler.createInlineStyle(m&&m.nonce||g.default.nonce,m&&m.styleContainer);var e="";for(var t in y.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(W.current,"] {\n width: ").concat(y.breakpoints[t]," !important;\n }\n }\n ");J.current.innerHTML=e};o.useMountEffect((function(){Te(!0),y.visible&&j(!0)})),f.useEffect((function(){return y.breakpoints&&Ue(),function(){J.current=i.DomHandler.removeInlineStyle(J.current)}}),[y.breakpoints]),o.useUpdateEffect((function(){y.visible&&!P&&j(!0),y.visible!==k&&P&&C(y.visible),y.visible&&(G.current=document.activeElement)}),[y.visible,P]),o.useUpdateEffect((function(){P&&(i.ZIndexUtils.set("modal",F.current,m&&m.autoZIndex||g.default.autoZIndex,y.baseZIndex||m&&m.zIndex.modal||g.default.zIndex.modal),C(!0))}),[P]),o.useUpdateEffect((function(){Te(!0)}),[Q,k]),o.useUnmountEffect((function(){Me(),Te(!1),i.DomHandler.removeInlineStyle(J.current),i.ZIndexUtils.clear(F.current)})),f.useImperativeHandle(p,(function(){return{props:y,resetPosition:ke,getElement:function(){return T.current},getMask:function(){return F.current},getContent:function(){return X.current},getHeader:function(){return A.current},getFooter:function(){return q.current},getCloseButton:function(){return L.current}}}));var Xe=function(){if(y.closable){var e=y.ariaCloseIconLabel||t.localeOption("close"),n=d({className:oe("closeButtonIcon"),"aria-hidden":!0},re("closeButtonIcon")),r=i.IconUtils.getJSXIcon(y.closeIcon||f.createElement(a.TimesIcon,n),B({},n),{props:y}),o=d({ref:L,type:"button",className:oe("closeButton"),"aria-label":e,onClick:ve,onKeyDown:function(e){"Escape"!==e.key&&e.stopPropagation()}},re("closeButton"));return f.createElement("button",o,r,f.createElement(u.Ripple,null))}return null},Ae=function(){var e=d({className:oe("maximizableIcon")},re("maximizableIcon")),t=i.IconUtils.getJSXIcon(K?y.minimizeIcon||f.createElement(c.WindowMinimizeIcon,e):y.maximizeIcon||f.createElement(l.WindowMaximizeIcon,e),e,{props:y});if(y.maximizable){var n=d({type:"button",className:oe("maximizableButton"),onClick:we},re("maximizableButton"));return f.createElement("button",n,t,f.createElement(u.Ripple,null))}return null},qe=function(){if(y.showHeader){var e=Xe(),t=Ae(),n=i.ObjectUtils.getJSXElement(y.icons,y),r=i.ObjectUtils.getJSXElement(y.header,y),o=D+"_header",a=d({ref:A,style:y.headerStyle,className:oe("header"),onMouseDown:Ee},re("header")),l=d({id:o,className:oe("headerTitle")},re("headerTitle")),c=d({className:oe("headerIcons")},re("headerIcons"));return f.createElement("div",a,f.createElement("div",l,r),f.createElement("div",c,n,t,e))}return null},Le=function(){var e=i.ObjectUtils.getJSXElement(y.footer,y),t=d({ref:q,className:oe("footer")},re("footer"));return e&&f.createElement("div",t,e)};return P&&function(){var t,n,o,a,l,c,u=D+"_header",p=D+"_content",g={enter:"center"===y.position?150:300,exit:"center"===y.position?150:300},h=d({ref:F,style:ie("mask"),className:oe("mask"),onPointerUp:Oe},re("mask")),v=d({ref:T,id:D,className:i.classNames(y.className,oe("root",{props:y,maximized:K,context:m})),style:y.style,onClick:y.onClick,role:"dialog","aria-labelledby":u,"aria-describedby":p,"aria-modal":y.modal,onPointerDown:xe},M.getOtherProps(y),re("root")),x=d({classNames:oe("transition"),timeout:g,in:k,options:y.transitionOptions,unmountOnExit:!0,onEnter:Ce,onEntered:Re,onExiting:He,onExited:_e},re("transition")),O=null;null!=e&&e.content?(c={header:y.header,content:y.message,message:null==y||null===(l=y.children)||void 0===l||null===(l=l[1])||void 0===l||null===(l=l.props)||void 0===l?void 0:l.children},O=i.ObjectUtils.getJSXElement(e.content,{headerRef:A,contentRef:X,footerRef:q,closeRef:L,hide:ve,message:c})):(n=qe(),t=d({id:D+"_content",ref:X,style:y.contentStyle,className:oe("content")},re("content")),o=f.createElement("div",t,y.children),a=Le(),O=f.createElement(f.Fragment,null,n,o,a,y.resizable?f.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Pe}):null));var w=f.createElement("div",h,f.createElement(r.CSSTransition,b({nodeRef:T},x),f.createElement("div",v,f.createElement(H,{autoFocus:y.focusOnShow},O))));return f.createElement(s.Portal,{element:w,appendTo:y.appendTo,visible:!0})}()}));F.displayName="Dialog",exports.Dialog=F;
|
|
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/utils"),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=p(e),f=d(e),g=p(t);function b(){return b=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},b.apply(this,arguments)}function y(e){return y="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},y(e)}function h(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 h(e)}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e,t){if(e){if("string"==typeof e)return h(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)?h(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 E(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function D(e){var t=E(e,"string");return"symbol"===y(t)?t:String(t)}function S(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){if(Array.isArray(e))return e}function j(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 I(e,t){return P(e)||j(e,t)||O(e,t)||z()}var k=n.ComponentBase.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return i.ObjectUtils.getMergedProps(e,k.defaultProps)},getOtherProps:function(e){return i.ObjectUtils.getDiffProps(e,k.defaultProps)}});function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=m.default.memo(m.default.forwardRef((function(e,n){var r=m.default.useRef(null),a=m.default.useRef(null),l=m.default.useRef(null),c=m.default.useContext(t.PrimeReactContext),s=k.getProps(e,c),u={props:s};o.useStyle(k.css.styles,{name:"focustrap"});k.setMetaData(R({},u));m.default.useImperativeHandle(n,(function(){return{props:s,getInk:function(){return a.current},getTarget:function(){return r.current}}})),o.useMountEffect((function(){s.disabled||(r.current=y(),h(r.current))}));var p,d,f,g,b,y=function(){return a.current&&a.current.parentElement},h=function(e){var t=s||{},n=t.autoFocusSelector,r=t.firstFocusableSelector,o=void 0===r?"":r,a=t.autoFocus,l=void 0!==a&&a,c="".concat(v(void 0===n?"":n)),u="[autofocus]".concat(c,", [data-pc-autofocus='true']").concat(c),p=i.DomHandler.getFirstFocusableElement(e,u);l&&!p&&(p=i.DomHandler.getFirstFocusableElement(e,v(o))),i.DomHandler.focus(p)},v=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},x=function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_firsthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_firsthiddenfocusableelement:i.DomHandler.getLastFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)};return d=void 0===(p=(s||{}).tabIndex)?0:p,g=(f=function(e,t){return m.default.createElement("span",{ref:"firstfocusableelement"===t?a:l,className:"p-hidden-accessible p-hidden-focusable",tabIndex:d,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e,"data-pc-section":t})})((function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_lasthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_lasthiddenfocusableelement:i.DomHandler.getFirstFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)}),"firstfocusableelement"),b=f(x,"lastfocusableelement"),g.ref.current&&b.ref.current&&(g.ref.current.$_pfocustrap_lasthiddenfocusableelement=b.ref.current,b.ref.current.$_pfocustrap_firsthiddenfocusableelement=g.ref.current),m.default.createElement(m.default.Fragment,null,g,s.children,b)})));function _(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 N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=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,content:null,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 i.classNames("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return i.classNames("p-dialog-content",e.props.contentClassName)},footer:function(e){return i.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 i.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.maximized,n=e.context;return i.classNames("p-dialog p-component",{"p-dialog-rtl":e.props.rtl,"p-dialog-maximized":t,"p-dialog-default":!t,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===g.default.inputStyle,"p-ripple-disabled":n&&!1===n.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 N({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 T(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 B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F=f.forwardRef((function(e,p){var d=o.useMergeProps(),m=f.useContext(t.PrimeReactContext),y=M.getProps(e,m),h=y.id?y.id:i.UniqueComponentId(),E=I(f.useState(h),2),D=E[0],S=I(f.useState(!1),2),P=S[0],j=S[1],z=I(f.useState(!1),2),k=z[0],C=z[1],R=I(f.useState(y.maximized),2),_=R[0],N=R[1],T=f.useRef(null),F=f.useRef(null),U=f.useRef(null),X=f.useRef(null),A=f.useRef(null),L=f.useRef(null),q=f.useRef(null),Y=f.useRef(!1),$=f.useRef(!1),V=f.useRef(null),Z=f.useRef(null),J=f.useRef(null),W=f.useRef(h),G=f.useRef(null),K=y.onMaximize?y.maximized:_,Q=k&&(y.blockScroll||y.maximizable&&K),ee=y.closable&&y.closeOnEscape&&k,te=o.useDisplayOrder("dialog",ee),ne=M.setMetaData(B(B({props:y},y.__parentMetadata),{},{state:{id:D,maximized:K,containerVisible:P}})),re=ne.ptm,oe=ne.cx,ie=ne.sx,ae=ne.isUnstyled;n.useHandleStyle(M.css.styles,ae,{name:"dialog"}),o.useGlobalOnEscapeKey({callback:function(e){ve(e)},when:ee&&te,priority:[o.ESC_KEY_HANDLING_PRIORITIES.DIALOG,te]});var le=I(o.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return ze(e)}}),2),ce=le[0],se=le[1],ue=I(o.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Ie(e)}}),2),pe=ue[0],de=ue[1],me=I(o.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return De(e)}}),2),fe=me[0],ge=me[1],be=I(o.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Se(e)}}),2),ye=be[0],he=be[1],ve=function(e){y.onHide(),e.preventDefault()},xe=function(e){U.current=e.target,y.onPointerDown&&y.onPointerDown(e)},Oe=function(e){y.dismissableMask&&y.modal&&F.current===e.target&&!U.current&&ve(e),y.onMaskClick&&y.onMaskClick(e),U.current=null},we=function(e){y.onMaximize?y.onMaximize({originalEvent:e,maximized:!K}):N((function(e){return!e})),e.preventDefault()},Ee=function(e){i.DomHandler.hasClass(e.target,"p-dialog-header-icon")||i.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||y.draggable&&(Y.current=!0,V.current=e.pageX,Z.current=e.pageY,T.current.style.margin="0",i.DomHandler.addClass(document.body,"p-unselectable-text"),y.onDragStart&&y.onDragStart(e))},De=function(e){if(Y.current){var t=i.DomHandler.getOuterWidth(T.current),n=i.DomHandler.getOuterHeight(T.current),r=e.pageX-V.current,o=e.pageY-Z.current,a=T.current.getBoundingClientRect(),l=a.left+r,c=a.top+o,s=i.DomHandler.getViewport(),u=getComputedStyle(T.current),p=parseFloat(u.marginLeft),d=parseFloat(u.marginTop);T.current.style.position="fixed",y.keepInViewport?(l>=y.minX&&l+t<s.width&&(V.current=e.pageX,T.current.style.left=l-p+"px"),c>=y.minY&&c+n<s.height&&(Z.current=e.pageY,T.current.style.top=c-d+"px")):(V.current=e.pageX,T.current.style.left=l-p+"px",Z.current=e.pageY,T.current.style.top=c-d+"px"),y.onDrag&&y.onDrag(e)}},Se=function(e){Y.current&&(Y.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),y.onDragEnd&&y.onDragEnd(e))},Pe=function(e){y.resizable&&($.current=!0,V.current=e.pageX,Z.current=e.pageY,i.DomHandler.addClass(document.body,"p-unselectable-text"),y.onResizeStart&&y.onResizeStart(e))},je=function(e,t,n){!n&&(n=i.DomHandler.getViewport());var r=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?r*(n[t]/100):r},ze=function(e){if($.current){var t=e.pageX-V.current,n=e.pageY-Z.current,r=i.DomHandler.getOuterWidth(T.current),o=i.DomHandler.getOuterHeight(T.current),a=T.current.getBoundingClientRect(),l=i.DomHandler.getViewport(),c=!parseInt(T.current.style.top)||!parseInt(T.current.style.left),s=je(T.current.style.minWidth,"width",l),u=je(T.current.style.minHeight,"height",l),p=r+t,d=o+n;c&&(p+=t,d+=n),(!s||p>s)&&a.left+p<l.width&&(T.current.style.width=p+"px"),(!u||d>u)&&a.top+d<l.height&&(T.current.style.height=d+"px"),V.current=e.pageX,Z.current=e.pageY,y.onResize&&y.onResize(e)}},Ie=function(e){$.current&&($.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),y.onResizeEnd&&y.onResizeEnd(e))},ke=function(){T.current.style.position="",T.current.style.left="",T.current.style.top="",T.current.style.margin=""},Ce=function(){T.current.setAttribute(W.current,"")},Re=function(){var e;y.onShow&&y.onShow(),y.focusOnShow&&!((e=document.activeElement)&&T.current&&T.current.contains(e))&&y.closable&&y.showHeader&&q.current&&q.current.focus(),Ne()},He=function(){y.modal&&!ae()&&i.DomHandler.addClass(F.current,"p-component-overlay-leave")},_e=function(){Y.current=!1,i.ZIndexUtils.clear(F.current),j(!1),Me(),i.DomHandler.focus(G.current),G.current=null},Ne=function(){Be()},Me=function(){Fe()},Te=function(e){if(e&&k){var t={id:D,hasBlockScroll:Q};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex((function(e){return e.id===D}));document.primeDialogParams=-1===n?[].concat(v(r=document.primeDialogParams)||x(r)||O(r)||w(),[t]):document.primeDialogParams.toSpliced(n,1,t)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==D}));var r;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?i.DomHandler.blockBodyScroll():i.DomHandler.unblockBodyScroll()},Be=function(){y.draggable&&(fe(),ye()),y.resizable&&(ce(),pe())},Fe=function(){ge(),he(),se(),de()},Ue=function(){J.current=i.DomHandler.createInlineStyle(m&&m.nonce||g.default.nonce,m&&m.styleContainer);var e="";for(var t in y.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(W.current,"] {\n width: ").concat(y.breakpoints[t]," !important;\n }\n }\n ");J.current.innerHTML=e};o.useMountEffect((function(){Te(!0),y.visible&&j(!0)})),f.useEffect((function(){return y.breakpoints&&Ue(),function(){J.current=i.DomHandler.removeInlineStyle(J.current)}}),[y.breakpoints]),o.useUpdateEffect((function(){y.visible&&!P&&j(!0),y.visible!==k&&P&&C(y.visible),y.visible&&(G.current=document.activeElement)}),[y.visible,P]),o.useUpdateEffect((function(){P&&(i.ZIndexUtils.set("modal",F.current,m&&m.autoZIndex||g.default.autoZIndex,y.baseZIndex||m&&m.zIndex.modal||g.default.zIndex.modal),C(!0))}),[P]),o.useUpdateEffect((function(){Te(!0)}),[Q,k]),o.useUnmountEffect((function(){Me(),Te(!1),i.DomHandler.removeInlineStyle(J.current),i.ZIndexUtils.clear(F.current)})),f.useImperativeHandle(p,(function(){return{props:y,resetPosition:ke,getElement:function(){return T.current},getMask:function(){return F.current},getContent:function(){return X.current},getHeader:function(){return A.current},getFooter:function(){return L.current},getCloseButton:function(){return q.current}}}));var Xe=function(){if(y.closable){var e=y.ariaCloseIconLabel||t.ariaLabel("close"),n=d({className:oe("closeButtonIcon"),"aria-hidden":!0},re("closeButtonIcon")),r=i.IconUtils.getJSXIcon(y.closeIcon||f.createElement(a.TimesIcon,n),B({},n),{props:y}),o=d({ref:q,type:"button",className:oe("closeButton"),"aria-label":e,onClick:ve,onKeyDown:function(e){"Escape"!==e.key&&e.stopPropagation()}},re("closeButton"));return f.createElement("button",o,r,f.createElement(u.Ripple,null))}return null},Ae=function(){var e=d({className:oe("maximizableIcon")},re("maximizableIcon")),t=i.IconUtils.getJSXIcon(K?y.minimizeIcon||f.createElement(c.WindowMinimizeIcon,e):y.maximizeIcon||f.createElement(l.WindowMaximizeIcon,e),e,{props:y});if(y.maximizable){var n=d({type:"button",className:oe("maximizableButton"),onClick:we},re("maximizableButton"));return f.createElement("button",n,t,f.createElement(u.Ripple,null))}return null},Le=function(){if(y.showHeader){var e=Xe(),t=Ae(),n=i.ObjectUtils.getJSXElement(y.icons,y),r=i.ObjectUtils.getJSXElement(y.header,y),o=D+"_header",a=d({ref:A,style:y.headerStyle,className:oe("header"),onMouseDown:Ee},re("header")),l=d({id:o,className:oe("headerTitle")},re("headerTitle")),c=d({className:oe("headerIcons")},re("headerIcons"));return f.createElement("div",a,f.createElement("div",l,r),f.createElement("div",c,n,t,e))}return null},qe=function(){var e=i.ObjectUtils.getJSXElement(y.footer,y),t=d({ref:L,className:oe("footer")},re("footer"));return e&&f.createElement("div",t,e)};return P&&function(){var t,n,o,a,l,c,u=D+"_header",p=D+"_content",g={enter:"center"===y.position?150:300,exit:"center"===y.position?150:300},h=d({ref:F,style:ie("mask"),className:oe("mask"),onPointerUp:Oe},re("mask")),v=d({ref:T,id:D,className:i.classNames(y.className,oe("root",{props:y,maximized:K,context:m})),style:y.style,onClick:y.onClick,role:"dialog","aria-labelledby":u,"aria-describedby":p,"aria-modal":y.modal,onPointerDown:xe},M.getOtherProps(y),re("root")),x=d({classNames:oe("transition"),timeout:g,in:k,options:y.transitionOptions,unmountOnExit:!0,onEnter:Ce,onEntered:Re,onExiting:He,onExited:_e},re("transition")),O=null;null!=e&&e.content?(c={header:y.header,content:y.message,message:null==y||null===(l=y.children)||void 0===l||null===(l=l[1])||void 0===l||null===(l=l.props)||void 0===l?void 0:l.children},O=i.ObjectUtils.getJSXElement(e.content,{headerRef:A,contentRef:X,footerRef:L,closeRef:q,hide:ve,message:c})):(n=Le(),t=d({id:D+"_content",ref:X,style:y.contentStyle,className:oe("content")},re("content")),o=f.createElement("div",t,y.children),a=qe(),O=f.createElement(f.Fragment,null,n,o,a,y.resizable?f.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Pe}):null));var w=f.createElement("div",h,f.createElement(r.CSSTransition,b({nodeRef:T},x),f.createElement("div",v,f.createElement(H,{autoFocus:y.focusOnShow},O))));return f.createElement(s.Portal,{element:w,appendTo:y.appendTo,visible:!0})}()}));F.displayName="Dialog",exports.Dialog=F;
|
package/dialog/dialog.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import PrimeReact, { PrimeReactContext,
|
|
4
|
+
import PrimeReact, { PrimeReactContext, ariaLabel } from 'primereact/api';
|
|
5
5
|
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
6
|
import { CSSTransition } from 'primereact/csstransition';
|
|
7
7
|
import { useStyle, useMountEffect, useMergeProps, useDisplayOrder, useGlobalOnEscapeKey, ESC_KEY_HANDLING_PRIORITIES, useEventListener, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
@@ -158,7 +158,7 @@ var FocusTrapBase = ComponentBase.extend({
|
|
|
158
158
|
|
|
159
159
|
function ownKeys$2(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; }
|
|
160
160
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
161
|
-
var FocusTrap = /*#__PURE__*/React__default.memo(
|
|
161
|
+
var FocusTrap = /*#__PURE__*/React__default.memo(/*#__PURE__*/React__default.forwardRef(function (inProps, ref) {
|
|
162
162
|
var targetRef = React__default.useRef(null);
|
|
163
163
|
var firstFocusableElementRef = React__default.useRef(null);
|
|
164
164
|
var lastFocusableElementRef = React__default.useRef(null);
|
|
@@ -817,7 +817,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
817
817
|
});
|
|
818
818
|
var createCloseIcon = function createCloseIcon() {
|
|
819
819
|
if (props.closable) {
|
|
820
|
-
var
|
|
820
|
+
var labelAria = props.ariaCloseIconLabel || ariaLabel('close');
|
|
821
821
|
var closeButtonIconProps = mergeProps({
|
|
822
822
|
className: cx('closeButtonIcon'),
|
|
823
823
|
'aria-hidden': true
|
|
@@ -830,7 +830,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
830
830
|
ref: closeRef,
|
|
831
831
|
type: 'button',
|
|
832
832
|
className: cx('closeButton'),
|
|
833
|
-
'aria-label':
|
|
833
|
+
'aria-label': labelAria,
|
|
834
834
|
onClick: onClose,
|
|
835
835
|
onKeyDown: function onKeyDown(ev) {
|
|
836
836
|
if (ev.key !== 'Escape') {
|
package/dialog/dialog.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t from"react";import n,{PrimeReactContext as r,localeOption as o}from"primereact/api";import{ComponentBase as i,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as l}from"primereact/csstransition";import{useStyle as c,useMountEffect as s,useMergeProps as u,useDisplayOrder as p,useGlobalOnEscapeKey as d,ESC_KEY_HANDLING_PRIORITIES as m,useEventListener as f,useUpdateEffect as g,useUnmountEffect as b}from"primereact/hooks";import{ObjectUtils as h,DomHandler as y,classNames as v,UniqueComponentId as x,ZIndexUtils as w,IconUtils as O}from"primereact/utils";import{TimesIcon as S}from"primereact/icons/times";import{WindowMaximizeIcon as E}from"primereact/icons/windowmaximize";import{WindowMinimizeIcon as P}from"primereact/icons/windowminimize";import{Portal as z}from"primereact/portal";import{Ripple as k}from"primereact/ripple";function j(){return j=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},j.apply(this,arguments)}function I(e){return I="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},I(e)}function D(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 R(e){if(Array.isArray(e))return D(e)}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}function N(){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 T(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M(e){var t=T(e,"string");return"symbol"===I(t)?t:String(t)}function F(e,t,n){return(t=M(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e){if(Array.isArray(e))return e}function X(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 A(){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 H(e,t){return B(e)||X(e,t)||_(e,t)||A()}var Y=i.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return h.getMergedProps(e,Y.defaultProps)},getOtherProps:function(e){return h.getDiffProps(e,Y.defaultProps)}});function $(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 L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=t.memo(t.forwardRef((function(e,n){var o=t.useRef(null),i=t.useRef(null),a=t.useRef(null),l=t.useContext(r),u=Y.getProps(e,l),p={props:u};c(Y.css.styles,{name:"focustrap"});Y.setMetaData(L({},p));t.useImperativeHandle(n,(function(){return{props:u,getInk:function(){return i.current},getTarget:function(){return o.current}}})),s((function(){u.disabled||(o.current=h(),v(o.current))}));var d,m,f,g,b,h=function(){return i.current&&i.current.parentElement},v=function(e){var t=u||{},n=t.autoFocusSelector,r=t.firstFocusableSelector,o=void 0===r?"":r,i=t.autoFocus,a=void 0!==i&&i,l="".concat(x(void 0===n?"":n)),c="[autofocus]".concat(l,", [data-pc-autofocus='true']").concat(l),s=y.getFirstFocusableElement(e,c);a&&!s&&(s=y.getFirstFocusableElement(e,x(o))),y.focus(s)},x=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},w=function(e){var t,n=e.currentTarget,r=e.relatedTarget,i=r!==n.$_pfocustrap_firsthiddenfocusableelement&&null!==(t=o.current)&&void 0!==t&&t.contains(r)?n.$_pfocustrap_firsthiddenfocusableelement:y.getLastFocusableElement(n.parentElement,x(n.$_pfocustrap_focusableselector));y.focus(i)};return m=void 0===(d=(u||{}).tabIndex)?0:d,g=(f=function(e,n){return t.createElement("span",{ref:"firstfocusableelement"===n?i:a,className:"p-hidden-accessible p-hidden-focusable",tabIndex:m,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e,"data-pc-section":n})})((function(e){var t,n=e.currentTarget,r=e.relatedTarget,i=r!==n.$_pfocustrap_lasthiddenfocusableelement&&null!==(t=o.current)&&void 0!==t&&t.contains(r)?n.$_pfocustrap_lasthiddenfocusableelement:y.getFirstFocusableElement(n.parentElement,x(n.$_pfocustrap_focusableselector));y.focus(i)}),"firstfocusableelement"),b=f(w,"lastfocusableelement"),g.ref.current&&b.ref.current&&(g.ref.current.$_pfocustrap_lasthiddenfocusableelement=b.ref.current,b.ref.current.$_pfocustrap_firsthiddenfocusableelement=g.ref.current),t.createElement(t.Fragment,null,g,u.children,b)})));function J(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=i.extend({defaultProps:{__TYPE:"Dialog",__parentMetadata:null,appendTo:null,ariaCloseIconLabel:null,baseZIndex:0,blockScroll:!1,breakpoints:null,className:null,closable:!0,closeIcon:null,closeOnEscape:!0,content:null,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 v("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return v("p-dialog-content",e.props.contentClassName)},footer:function(e){return v("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 v("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.maximized,r=e.context;return v("p-dialog p-component",{"p-dialog-rtl":e.props.rtl,"p-dialog-maximized":t,"p-dialog-default":!t,"p-input-filled":r&&"filled"===r.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":r&&!1===r.ripple||!1===n.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 Z({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 W(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 G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=e.forwardRef((function(t,i){var c=u(),I=e.useContext(r),D=U.getProps(t,I),T=D.id?D.id:x(),M=H(e.useState(T),2),F=M[0],B=H(e.useState(!1),2),X=B[0],A=B[1],Y=H(e.useState(!1),2),$=Y[0],L=Y[1],J=H(e.useState(D.maximized),2),Z=J[0],W=J[1],K=e.useRef(null),q=e.useRef(null),Q=e.useRef(null),ee=e.useRef(null),te=e.useRef(null),ne=e.useRef(null),re=e.useRef(null),oe=e.useRef(!1),ie=e.useRef(!1),ae=e.useRef(null),le=e.useRef(null),ce=e.useRef(null),se=e.useRef(T),ue=e.useRef(null),pe=D.onMaximize?D.maximized:Z,de=$&&(D.blockScroll||D.maximizable&&pe),me=D.closable&&D.closeOnEscape&&$,fe=p("dialog",me),ge=U.setMetaData(G(G({props:D},D.__parentMetadata),{},{state:{id:F,maximized:pe,containerVisible:X}})),be=ge.ptm,he=ge.cx,ye=ge.sx,ve=ge.isUnstyled;a(U.css.styles,ve,{name:"dialog"}),d({callback:function(e){Ce(e)},when:me&&fe,priority:[m.DIALOG,fe]});var xe=H(f({type:"mousemove",target:function(){return window.document},listener:function(e){return He(e)}}),2),we=xe[0],Oe=xe[1],Se=H(f({type:"mouseup",target:function(){return window.document},listener:function(e){return Ye(e)}}),2),Ee=Se[0],Pe=Se[1],ze=H(f({type:"mousemove",target:function(){return window.document},listener:function(e){return Fe(e)}}),2),ke=ze[0],je=ze[1],Ie=H(f({type:"mouseup",target:function(){return window.document},listener:function(e){return Be(e)}}),2),De=Ie[0],Re=Ie[1],Ce=function(e){D.onHide(),e.preventDefault()},_e=function(e){Q.current=e.target,D.onPointerDown&&D.onPointerDown(e)},Ne=function(e){D.dismissableMask&&D.modal&&q.current===e.target&&!Q.current&&Ce(e),D.onMaskClick&&D.onMaskClick(e),Q.current=null},Te=function(e){D.onMaximize?D.onMaximize({originalEvent:e,maximized:!pe}):W((function(e){return!e})),e.preventDefault()},Me=function(e){y.hasClass(e.target,"p-dialog-header-icon")||y.hasClass(e.target.parentElement,"p-dialog-header-icon")||D.draggable&&(oe.current=!0,ae.current=e.pageX,le.current=e.pageY,K.current.style.margin="0",y.addClass(document.body,"p-unselectable-text"),D.onDragStart&&D.onDragStart(e))},Fe=function(e){if(oe.current){var t=y.getOuterWidth(K.current),n=y.getOuterHeight(K.current),r=e.pageX-ae.current,o=e.pageY-le.current,i=K.current.getBoundingClientRect(),a=i.left+r,l=i.top+o,c=y.getViewport(),s=getComputedStyle(K.current),u=parseFloat(s.marginLeft),p=parseFloat(s.marginTop);K.current.style.position="fixed",D.keepInViewport?(a>=D.minX&&a+t<c.width&&(ae.current=e.pageX,K.current.style.left=a-u+"px"),l>=D.minY&&l+n<c.height&&(le.current=e.pageY,K.current.style.top=l-p+"px")):(ae.current=e.pageX,K.current.style.left=a-u+"px",le.current=e.pageY,K.current.style.top=l-p+"px"),D.onDrag&&D.onDrag(e)}},Be=function(e){oe.current&&(oe.current=!1,y.removeClass(document.body,"p-unselectable-text"),D.onDragEnd&&D.onDragEnd(e))},Xe=function(e){D.resizable&&(ie.current=!0,ae.current=e.pageX,le.current=e.pageY,y.addClass(document.body,"p-unselectable-text"),D.onResizeStart&&D.onResizeStart(e))},Ae=function(e,t,n){!n&&(n=y.getViewport());var r=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?r*(n[t]/100):r},He=function(e){if(ie.current){var t=e.pageX-ae.current,n=e.pageY-le.current,r=y.getOuterWidth(K.current),o=y.getOuterHeight(K.current),i=K.current.getBoundingClientRect(),a=y.getViewport(),l=!parseInt(K.current.style.top)||!parseInt(K.current.style.left),c=Ae(K.current.style.minWidth,"width",a),s=Ae(K.current.style.minHeight,"height",a),u=r+t,p=o+n;l&&(u+=t,p+=n),(!c||u>c)&&i.left+u<a.width&&(K.current.style.width=u+"px"),(!s||p>s)&&i.top+p<a.height&&(K.current.style.height=p+"px"),ae.current=e.pageX,le.current=e.pageY,D.onResize&&D.onResize(e)}},Ye=function(e){ie.current&&(ie.current=!1,y.removeClass(document.body,"p-unselectable-text"),D.onResizeEnd&&D.onResizeEnd(e))},$e=function(){K.current.style.position="",K.current.style.left="",K.current.style.top="",K.current.style.margin=""},Le=function(){K.current.setAttribute(se.current,"")},Ve=function(){var e;D.onShow&&D.onShow(),D.focusOnShow&&!((e=document.activeElement)&&K.current&&K.current.contains(e))&&D.closable&&D.showHeader&&re.current&&re.current.focus(),Ue()},Je=function(){D.modal&&!ve()&&y.addClass(q.current,"p-component-overlay-leave")},Ze=function(){oe.current=!1,w.clear(q.current),A(!1),We(),y.focus(ue.current),ue.current=null},Ue=function(){Ke()},We=function(){qe()},Ge=function(e){if(e&&$){var t={id:F,hasBlockScroll:de};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex((function(e){return e.id===F}));document.primeDialogParams=-1===n?[].concat(R(r=document.primeDialogParams)||C(r)||_(r)||N(),[t]):document.primeDialogParams.toSpliced(n,1,t)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==F}));var r;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?y.blockBodyScroll():y.unblockBodyScroll()},Ke=function(){D.draggable&&(ke(),De()),D.resizable&&(we(),Ee())},qe=function(){je(),Re(),Oe(),Pe()},Qe=function(){ce.current=y.createInlineStyle(I&&I.nonce||n.nonce,I&&I.styleContainer);var e="";for(var t in D.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(se.current,"] {\n width: ").concat(D.breakpoints[t]," !important;\n }\n }\n ");ce.current.innerHTML=e};s((function(){Ge(!0),D.visible&&A(!0)})),e.useEffect((function(){return D.breakpoints&&Qe(),function(){ce.current=y.removeInlineStyle(ce.current)}}),[D.breakpoints]),g((function(){D.visible&&!X&&A(!0),D.visible!==$&&X&&L(D.visible),D.visible&&(ue.current=document.activeElement)}),[D.visible,X]),g((function(){X&&(w.set("modal",q.current,I&&I.autoZIndex||n.autoZIndex,D.baseZIndex||I&&I.zIndex.modal||n.zIndex.modal),L(!0))}),[X]),g((function(){Ge(!0)}),[de,$]),b((function(){We(),Ge(!1),y.removeInlineStyle(ce.current),w.clear(q.current)})),e.useImperativeHandle(i,(function(){return{props:D,resetPosition:$e,getElement:function(){return K.current},getMask:function(){return q.current},getContent:function(){return ee.current},getHeader:function(){return te.current},getFooter:function(){return ne.current},getCloseButton:function(){return re.current}}}));var et=function(){if(D.closable){var t=D.ariaCloseIconLabel||o("close"),n=c({className:he("closeButtonIcon"),"aria-hidden":!0},be("closeButtonIcon")),r=O.getJSXIcon(D.closeIcon||e.createElement(S,n),G({},n),{props:D}),i=c({ref:re,type:"button",className:he("closeButton"),"aria-label":t,onClick:Ce,onKeyDown:function(e){"Escape"!==e.key&&e.stopPropagation()}},be("closeButton"));return e.createElement("button",i,r,e.createElement(k,null))}return null},tt=function(){var t=c({className:he("maximizableIcon")},be("maximizableIcon")),n=O.getJSXIcon(pe?D.minimizeIcon||e.createElement(P,t):D.maximizeIcon||e.createElement(E,t),t,{props:D});if(D.maximizable){var r=c({type:"button",className:he("maximizableButton"),onClick:Te},be("maximizableButton"));return e.createElement("button",r,n,e.createElement(k,null))}return null},nt=function(){if(D.showHeader){var t=et(),n=tt(),r=h.getJSXElement(D.icons,D),o=h.getJSXElement(D.header,D),i=F+"_header",a=c({ref:te,style:D.headerStyle,className:he("header"),onMouseDown:Me},be("header")),l=c({id:i,className:he("headerTitle")},be("headerTitle")),s=c({className:he("headerIcons")},be("headerIcons"));return e.createElement("div",a,e.createElement("div",l,o),e.createElement("div",s,r,n,t))}return null},rt=function(){var t=h.getJSXElement(D.footer,D),n=c({ref:ne,className:he("footer")},be("footer"));return t&&e.createElement("div",n,t)};return X&&function(){var n,r,o,i,a,s,u=F+"_header",p=F+"_content",d={enter:"center"===D.position?150:300,exit:"center"===D.position?150:300},m=c({ref:q,style:ye("mask"),className:he("mask"),onPointerUp:Ne},be("mask")),f=c({ref:K,id:F,className:v(D.className,he("root",{props:D,maximized:pe,context:I})),style:D.style,onClick:D.onClick,role:"dialog","aria-labelledby":u,"aria-describedby":p,"aria-modal":D.modal,onPointerDown:_e},U.getOtherProps(D),be("root")),g=c({classNames:he("transition"),timeout:d,in:$,options:D.transitionOptions,unmountOnExit:!0,onEnter:Le,onEntered:Ve,onExiting:Je,onExited:Ze},be("transition")),b=null;null!=t&&t.content?(s={header:D.header,content:D.message,message:null==D||null===(a=D.children)||void 0===a||null===(a=a[1])||void 0===a||null===(a=a.props)||void 0===a?void 0:a.children},b=h.getJSXElement(t.content,{headerRef:te,contentRef:ee,footerRef:ne,closeRef:re,hide:Ce,message:s})):(r=nt(),n=c({id:F+"_content",ref:ee,style:D.contentStyle,className:he("content")},be("content")),o=e.createElement("div",n,D.children),i=rt(),b=e.createElement(e.Fragment,null,r,o,i,D.resizable?e.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Xe}):null));var y=e.createElement("div",m,e.createElement(l,j({nodeRef:K},g),e.createElement("div",f,e.createElement(V,{autoFocus:D.focusOnShow},b))));return e.createElement(z,{element:y,appendTo:D.appendTo,visible:!0})}()}));K.displayName="Dialog";export{K as Dialog};
|
|
1
|
+
import*as e from"react";import t from"react";import n,{PrimeReactContext as r,ariaLabel as o}from"primereact/api";import{ComponentBase as i,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as l}from"primereact/csstransition";import{useStyle as c,useMountEffect as s,useMergeProps as u,useDisplayOrder as p,useGlobalOnEscapeKey as d,ESC_KEY_HANDLING_PRIORITIES as m,useEventListener as f,useUpdateEffect as g,useUnmountEffect as b}from"primereact/hooks";import{ObjectUtils as h,DomHandler as y,classNames as v,UniqueComponentId as x,ZIndexUtils as w,IconUtils as O}from"primereact/utils";import{TimesIcon as S}from"primereact/icons/times";import{WindowMaximizeIcon as E}from"primereact/icons/windowmaximize";import{WindowMinimizeIcon as P}from"primereact/icons/windowminimize";import{Portal as z}from"primereact/portal";import{Ripple as k}from"primereact/ripple";function j(){return j=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},j.apply(this,arguments)}function I(e){return I="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},I(e)}function D(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 R(e){if(Array.isArray(e))return D(e)}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}function N(){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 T(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M(e){var t=T(e,"string");return"symbol"===I(t)?t:String(t)}function F(e,t,n){return(t=M(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e){if(Array.isArray(e))return e}function X(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 A(){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 H(e,t){return B(e)||X(e,t)||_(e,t)||A()}var Y=i.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return h.getMergedProps(e,Y.defaultProps)},getOtherProps:function(e){return h.getDiffProps(e,Y.defaultProps)}});function $(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 L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=t.memo(t.forwardRef((function(e,n){var o=t.useRef(null),i=t.useRef(null),a=t.useRef(null),l=t.useContext(r),u=Y.getProps(e,l),p={props:u};c(Y.css.styles,{name:"focustrap"});Y.setMetaData(L({},p));t.useImperativeHandle(n,(function(){return{props:u,getInk:function(){return i.current},getTarget:function(){return o.current}}})),s((function(){u.disabled||(o.current=h(),v(o.current))}));var d,m,f,g,b,h=function(){return i.current&&i.current.parentElement},v=function(e){var t=u||{},n=t.autoFocusSelector,r=t.firstFocusableSelector,o=void 0===r?"":r,i=t.autoFocus,a=void 0!==i&&i,l="".concat(x(void 0===n?"":n)),c="[autofocus]".concat(l,", [data-pc-autofocus='true']").concat(l),s=y.getFirstFocusableElement(e,c);a&&!s&&(s=y.getFirstFocusableElement(e,x(o))),y.focus(s)},x=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},w=function(e){var t,n=e.currentTarget,r=e.relatedTarget,i=r!==n.$_pfocustrap_firsthiddenfocusableelement&&null!==(t=o.current)&&void 0!==t&&t.contains(r)?n.$_pfocustrap_firsthiddenfocusableelement:y.getLastFocusableElement(n.parentElement,x(n.$_pfocustrap_focusableselector));y.focus(i)};return m=void 0===(d=(u||{}).tabIndex)?0:d,g=(f=function(e,n){return t.createElement("span",{ref:"firstfocusableelement"===n?i:a,className:"p-hidden-accessible p-hidden-focusable",tabIndex:m,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e,"data-pc-section":n})})((function(e){var t,n=e.currentTarget,r=e.relatedTarget,i=r!==n.$_pfocustrap_lasthiddenfocusableelement&&null!==(t=o.current)&&void 0!==t&&t.contains(r)?n.$_pfocustrap_lasthiddenfocusableelement:y.getFirstFocusableElement(n.parentElement,x(n.$_pfocustrap_focusableselector));y.focus(i)}),"firstfocusableelement"),b=f(w,"lastfocusableelement"),g.ref.current&&b.ref.current&&(g.ref.current.$_pfocustrap_lasthiddenfocusableelement=b.ref.current,b.ref.current.$_pfocustrap_firsthiddenfocusableelement=g.ref.current),t.createElement(t.Fragment,null,g,u.children,b)})));function J(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=i.extend({defaultProps:{__TYPE:"Dialog",__parentMetadata:null,appendTo:null,ariaCloseIconLabel:null,baseZIndex:0,blockScroll:!1,breakpoints:null,className:null,closable:!0,closeIcon:null,closeOnEscape:!0,content:null,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 v("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return v("p-dialog-content",e.props.contentClassName)},footer:function(e){return v("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 v("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.maximized,r=e.context;return v("p-dialog p-component",{"p-dialog-rtl":e.props.rtl,"p-dialog-maximized":t,"p-dialog-default":!t,"p-input-filled":r&&"filled"===r.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":r&&!1===r.ripple||!1===n.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 Z({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 W(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 G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=e.forwardRef((function(t,i){var c=u(),I=e.useContext(r),D=U.getProps(t,I),T=D.id?D.id:x(),M=H(e.useState(T),2),F=M[0],B=H(e.useState(!1),2),X=B[0],A=B[1],Y=H(e.useState(!1),2),$=Y[0],L=Y[1],J=H(e.useState(D.maximized),2),Z=J[0],W=J[1],K=e.useRef(null),q=e.useRef(null),Q=e.useRef(null),ee=e.useRef(null),te=e.useRef(null),ne=e.useRef(null),re=e.useRef(null),oe=e.useRef(!1),ie=e.useRef(!1),ae=e.useRef(null),le=e.useRef(null),ce=e.useRef(null),se=e.useRef(T),ue=e.useRef(null),pe=D.onMaximize?D.maximized:Z,de=$&&(D.blockScroll||D.maximizable&&pe),me=D.closable&&D.closeOnEscape&&$,fe=p("dialog",me),ge=U.setMetaData(G(G({props:D},D.__parentMetadata),{},{state:{id:F,maximized:pe,containerVisible:X}})),be=ge.ptm,he=ge.cx,ye=ge.sx,ve=ge.isUnstyled;a(U.css.styles,ve,{name:"dialog"}),d({callback:function(e){Ce(e)},when:me&&fe,priority:[m.DIALOG,fe]});var xe=H(f({type:"mousemove",target:function(){return window.document},listener:function(e){return He(e)}}),2),we=xe[0],Oe=xe[1],Se=H(f({type:"mouseup",target:function(){return window.document},listener:function(e){return Ye(e)}}),2),Ee=Se[0],Pe=Se[1],ze=H(f({type:"mousemove",target:function(){return window.document},listener:function(e){return Fe(e)}}),2),ke=ze[0],je=ze[1],Ie=H(f({type:"mouseup",target:function(){return window.document},listener:function(e){return Be(e)}}),2),De=Ie[0],Re=Ie[1],Ce=function(e){D.onHide(),e.preventDefault()},_e=function(e){Q.current=e.target,D.onPointerDown&&D.onPointerDown(e)},Ne=function(e){D.dismissableMask&&D.modal&&q.current===e.target&&!Q.current&&Ce(e),D.onMaskClick&&D.onMaskClick(e),Q.current=null},Te=function(e){D.onMaximize?D.onMaximize({originalEvent:e,maximized:!pe}):W((function(e){return!e})),e.preventDefault()},Me=function(e){y.hasClass(e.target,"p-dialog-header-icon")||y.hasClass(e.target.parentElement,"p-dialog-header-icon")||D.draggable&&(oe.current=!0,ae.current=e.pageX,le.current=e.pageY,K.current.style.margin="0",y.addClass(document.body,"p-unselectable-text"),D.onDragStart&&D.onDragStart(e))},Fe=function(e){if(oe.current){var t=y.getOuterWidth(K.current),n=y.getOuterHeight(K.current),r=e.pageX-ae.current,o=e.pageY-le.current,i=K.current.getBoundingClientRect(),a=i.left+r,l=i.top+o,c=y.getViewport(),s=getComputedStyle(K.current),u=parseFloat(s.marginLeft),p=parseFloat(s.marginTop);K.current.style.position="fixed",D.keepInViewport?(a>=D.minX&&a+t<c.width&&(ae.current=e.pageX,K.current.style.left=a-u+"px"),l>=D.minY&&l+n<c.height&&(le.current=e.pageY,K.current.style.top=l-p+"px")):(ae.current=e.pageX,K.current.style.left=a-u+"px",le.current=e.pageY,K.current.style.top=l-p+"px"),D.onDrag&&D.onDrag(e)}},Be=function(e){oe.current&&(oe.current=!1,y.removeClass(document.body,"p-unselectable-text"),D.onDragEnd&&D.onDragEnd(e))},Xe=function(e){D.resizable&&(ie.current=!0,ae.current=e.pageX,le.current=e.pageY,y.addClass(document.body,"p-unselectable-text"),D.onResizeStart&&D.onResizeStart(e))},Ae=function(e,t,n){!n&&(n=y.getViewport());var r=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?r*(n[t]/100):r},He=function(e){if(ie.current){var t=e.pageX-ae.current,n=e.pageY-le.current,r=y.getOuterWidth(K.current),o=y.getOuterHeight(K.current),i=K.current.getBoundingClientRect(),a=y.getViewport(),l=!parseInt(K.current.style.top)||!parseInt(K.current.style.left),c=Ae(K.current.style.minWidth,"width",a),s=Ae(K.current.style.minHeight,"height",a),u=r+t,p=o+n;l&&(u+=t,p+=n),(!c||u>c)&&i.left+u<a.width&&(K.current.style.width=u+"px"),(!s||p>s)&&i.top+p<a.height&&(K.current.style.height=p+"px"),ae.current=e.pageX,le.current=e.pageY,D.onResize&&D.onResize(e)}},Ye=function(e){ie.current&&(ie.current=!1,y.removeClass(document.body,"p-unselectable-text"),D.onResizeEnd&&D.onResizeEnd(e))},$e=function(){K.current.style.position="",K.current.style.left="",K.current.style.top="",K.current.style.margin=""},Le=function(){K.current.setAttribute(se.current,"")},Ve=function(){var e;D.onShow&&D.onShow(),D.focusOnShow&&!((e=document.activeElement)&&K.current&&K.current.contains(e))&&D.closable&&D.showHeader&&re.current&&re.current.focus(),Ue()},Je=function(){D.modal&&!ve()&&y.addClass(q.current,"p-component-overlay-leave")},Ze=function(){oe.current=!1,w.clear(q.current),A(!1),We(),y.focus(ue.current),ue.current=null},Ue=function(){Ke()},We=function(){qe()},Ge=function(e){if(e&&$){var t={id:F,hasBlockScroll:de};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex((function(e){return e.id===F}));document.primeDialogParams=-1===n?[].concat(R(r=document.primeDialogParams)||C(r)||_(r)||N(),[t]):document.primeDialogParams.toSpliced(n,1,t)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==F}));var r;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?y.blockBodyScroll():y.unblockBodyScroll()},Ke=function(){D.draggable&&(ke(),De()),D.resizable&&(we(),Ee())},qe=function(){je(),Re(),Oe(),Pe()},Qe=function(){ce.current=y.createInlineStyle(I&&I.nonce||n.nonce,I&&I.styleContainer);var e="";for(var t in D.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(se.current,"] {\n width: ").concat(D.breakpoints[t]," !important;\n }\n }\n ");ce.current.innerHTML=e};s((function(){Ge(!0),D.visible&&A(!0)})),e.useEffect((function(){return D.breakpoints&&Qe(),function(){ce.current=y.removeInlineStyle(ce.current)}}),[D.breakpoints]),g((function(){D.visible&&!X&&A(!0),D.visible!==$&&X&&L(D.visible),D.visible&&(ue.current=document.activeElement)}),[D.visible,X]),g((function(){X&&(w.set("modal",q.current,I&&I.autoZIndex||n.autoZIndex,D.baseZIndex||I&&I.zIndex.modal||n.zIndex.modal),L(!0))}),[X]),g((function(){Ge(!0)}),[de,$]),b((function(){We(),Ge(!1),y.removeInlineStyle(ce.current),w.clear(q.current)})),e.useImperativeHandle(i,(function(){return{props:D,resetPosition:$e,getElement:function(){return K.current},getMask:function(){return q.current},getContent:function(){return ee.current},getHeader:function(){return te.current},getFooter:function(){return ne.current},getCloseButton:function(){return re.current}}}));var et=function(){if(D.closable){var t=D.ariaCloseIconLabel||o("close"),n=c({className:he("closeButtonIcon"),"aria-hidden":!0},be("closeButtonIcon")),r=O.getJSXIcon(D.closeIcon||e.createElement(S,n),G({},n),{props:D}),i=c({ref:re,type:"button",className:he("closeButton"),"aria-label":t,onClick:Ce,onKeyDown:function(e){"Escape"!==e.key&&e.stopPropagation()}},be("closeButton"));return e.createElement("button",i,r,e.createElement(k,null))}return null},tt=function(){var t=c({className:he("maximizableIcon")},be("maximizableIcon")),n=O.getJSXIcon(pe?D.minimizeIcon||e.createElement(P,t):D.maximizeIcon||e.createElement(E,t),t,{props:D});if(D.maximizable){var r=c({type:"button",className:he("maximizableButton"),onClick:Te},be("maximizableButton"));return e.createElement("button",r,n,e.createElement(k,null))}return null},nt=function(){if(D.showHeader){var t=et(),n=tt(),r=h.getJSXElement(D.icons,D),o=h.getJSXElement(D.header,D),i=F+"_header",a=c({ref:te,style:D.headerStyle,className:he("header"),onMouseDown:Me},be("header")),l=c({id:i,className:he("headerTitle")},be("headerTitle")),s=c({className:he("headerIcons")},be("headerIcons"));return e.createElement("div",a,e.createElement("div",l,o),e.createElement("div",s,r,n,t))}return null},rt=function(){var t=h.getJSXElement(D.footer,D),n=c({ref:ne,className:he("footer")},be("footer"));return t&&e.createElement("div",n,t)};return X&&function(){var n,r,o,i,a,s,u=F+"_header",p=F+"_content",d={enter:"center"===D.position?150:300,exit:"center"===D.position?150:300},m=c({ref:q,style:ye("mask"),className:he("mask"),onPointerUp:Ne},be("mask")),f=c({ref:K,id:F,className:v(D.className,he("root",{props:D,maximized:pe,context:I})),style:D.style,onClick:D.onClick,role:"dialog","aria-labelledby":u,"aria-describedby":p,"aria-modal":D.modal,onPointerDown:_e},U.getOtherProps(D),be("root")),g=c({classNames:he("transition"),timeout:d,in:$,options:D.transitionOptions,unmountOnExit:!0,onEnter:Le,onEntered:Ve,onExiting:Je,onExited:Ze},be("transition")),b=null;null!=t&&t.content?(s={header:D.header,content:D.message,message:null==D||null===(a=D.children)||void 0===a||null===(a=a[1])||void 0===a||null===(a=a.props)||void 0===a?void 0:a.children},b=h.getJSXElement(t.content,{headerRef:te,contentRef:ee,footerRef:ne,closeRef:re,hide:Ce,message:s})):(r=nt(),n=c({id:F+"_content",ref:ee,style:D.contentStyle,className:he("content")},be("content")),o=e.createElement("div",n,D.children),i=rt(),b=e.createElement(e.Fragment,null,r,o,i,D.resizable?e.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Xe}):null));var y=e.createElement("div",m,e.createElement(l,j({nodeRef:K},g),e.createElement("div",f,e.createElement(V,{autoFocus:D.focusOnShow},b))));return e.createElement(z,{element:y,appendTo:D.appendTo,visible:!0})}()}));K.displayName="Dialog";export{K as Dialog};
|
package/dialog/dialog.js
CHANGED
|
@@ -172,7 +172,7 @@ this.primereact.dialog = (function (exports, React, PrimeReact, componentbase, c
|
|
|
172
172
|
|
|
173
173
|
function ownKeys$2(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; }
|
|
174
174
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
175
|
-
var FocusTrap = /*#__PURE__*/React__default["default"].memo(
|
|
175
|
+
var FocusTrap = /*#__PURE__*/React__default["default"].memo(/*#__PURE__*/React__default["default"].forwardRef(function (inProps, ref) {
|
|
176
176
|
var targetRef = React__default["default"].useRef(null);
|
|
177
177
|
var firstFocusableElementRef = React__default["default"].useRef(null);
|
|
178
178
|
var lastFocusableElementRef = React__default["default"].useRef(null);
|
|
@@ -831,7 +831,7 @@ this.primereact.dialog = (function (exports, React, PrimeReact, componentbase, c
|
|
|
831
831
|
});
|
|
832
832
|
var createCloseIcon = function createCloseIcon() {
|
|
833
833
|
if (props.closable) {
|
|
834
|
-
var
|
|
834
|
+
var labelAria = props.ariaCloseIconLabel || PrimeReact.ariaLabel('close');
|
|
835
835
|
var closeButtonIconProps = mergeProps({
|
|
836
836
|
className: cx('closeButtonIcon'),
|
|
837
837
|
'aria-hidden': true
|
|
@@ -844,7 +844,7 @@ this.primereact.dialog = (function (exports, React, PrimeReact, componentbase, c
|
|
|
844
844
|
ref: closeRef,
|
|
845
845
|
type: 'button',
|
|
846
846
|
className: cx('closeButton'),
|
|
847
|
-
'aria-label':
|
|
847
|
+
'aria-label': labelAria,
|
|
848
848
|
onClick: onClose,
|
|
849
849
|
onKeyDown: function onKeyDown(ev) {
|
|
850
850
|
if (ev.key !== 'Escape') {
|
package/dialog/dialog.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.dialog=function(e,t,n,r,o,a,i,l,c,s,u,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(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 f=d(t),g=m(t),b=d(n);function h(){return h=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},h.apply(this,arguments)}function y(e){return y="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},y(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 x(e){if(Array.isArray(e))return v(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function w(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 D(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e){var t=D(e,"string");return"symbol"===y(t)?t:String(t)}function P(e,t,n){return(t=S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){if(Array.isArray(e))return e}function z(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function I(){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 j(e)||z(e,t)||w(e,t)||I()}var R=r.ComponentBase.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return i.ObjectUtils.getMergedProps(e,R.defaultProps)},getOtherProps:function(e){return i.ObjectUtils.getDiffProps(e,R.defaultProps)}});function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=f.default.memo(f.default.forwardRef((function(e,t){var r=f.default.useRef(null),o=f.default.useRef(null),l=f.default.useRef(null),c=f.default.useContext(n.PrimeReactContext),s=R.getProps(e,c),u={props:s};a.useStyle(R.css.styles,{name:"focustrap"});R.setMetaData(H({},u));f.default.useImperativeHandle(t,(function(){return{props:s,getInk:function(){return o.current},getTarget:function(){return r.current}}})),a.useMountEffect((function(){s.disabled||(r.current=h(),y(r.current))}));var p,d,m,g,b,h=function(){return o.current&&o.current.parentElement},y=function(e){var t=s||{},n=t.autoFocusSelector,r=t.firstFocusableSelector,o=void 0===r?"":r,a=t.autoFocus,l=void 0!==a&&a,c="".concat(v(void 0===n?"":n)),u="[autofocus]".concat(c,", [data-pc-autofocus='true']").concat(c),p=i.DomHandler.getFirstFocusableElement(e,u);l&&!p&&(p=i.DomHandler.getFirstFocusableElement(e,v(o))),i.DomHandler.focus(p)},v=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},x=function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_firsthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_firsthiddenfocusableelement:i.DomHandler.getLastFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)};return d=void 0===(p=(s||{}).tabIndex)?0:p,g=(m=function(e,t){return f.default.createElement("span",{ref:"firstfocusableelement"===t?o:l,className:"p-hidden-accessible p-hidden-focusable",tabIndex:d,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e,"data-pc-section":t})})((function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_lasthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_lasthiddenfocusableelement:i.DomHandler.getFirstFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)}),"firstfocusableelement"),b=m(x,"lastfocusableelement"),g.ref.current&&b.ref.current&&(g.ref.current.$_pfocustrap_lasthiddenfocusableelement=b.ref.current,b.ref.current.$_pfocustrap_firsthiddenfocusableelement=g.ref.current),f.default.createElement(f.default.Fragment,null,g,s.children,b)})));function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=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,content:null,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 i.classNames("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return i.classNames("p-dialog-content",e.props.contentClassName)},footer:function(e){return i.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 i.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.maximized,n=e.context;return i.classNames("p-dialog p-component",{"p-dialog-rtl":e.props.rtl,"p-dialog-maximized":t,"p-dialog-default":!t,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===b.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===b.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 M({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 B(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 F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=g.forwardRef((function(e,t){var d=a.useMergeProps(),m=g.useContext(n.PrimeReactContext),f=T.getProps(e,m),y=f.id?f.id:i.UniqueComponentId(),v=k(g.useState(y),2),D=v[0],S=k(g.useState(!1),2),P=S[0],j=S[1],z=k(g.useState(!1),2),I=z[0],R=z[1],C=k(g.useState(f.maximized),2),H=C[0],N=C[1],M=g.useRef(null),B=g.useRef(null),U=g.useRef(null),X=g.useRef(null),A=g.useRef(null),L=g.useRef(null),Y=g.useRef(null),$=g.useRef(!1),V=g.useRef(!1),Z=g.useRef(null),J=g.useRef(null),W=g.useRef(null),G=g.useRef(y),K=g.useRef(null),q=f.onMaximize?f.maximized:H,Q=I&&(f.blockScroll||f.maximizable&&q),ee=f.closable&&f.closeOnEscape&&I,te=a.useDisplayOrder("dialog",ee),ne=T.setMetaData(F(F({props:f},f.__parentMetadata),{},{state:{id:D,maximized:q,containerVisible:P}})),re=ne.ptm,oe=ne.cx,ae=ne.sx,ie=ne.isUnstyled;r.useHandleStyle(T.css.styles,ie,{name:"dialog"}),a.useGlobalOnEscapeKey({callback:function(e){ve(e)},when:ee&&te,priority:[a.ESC_KEY_HANDLING_PRIORITIES.DIALOG,te]});var le=k(a.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return ze(e)}}),2),ce=le[0],se=le[1],ue=k(a.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Ie(e)}}),2),pe=ue[0],de=ue[1],me=k(a.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return De(e)}}),2),fe=me[0],ge=me[1],be=k(a.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Se(e)}}),2),he=be[0],ye=be[1],ve=function(e){f.onHide(),e.preventDefault()},xe=function(e){U.current=e.target,f.onPointerDown&&f.onPointerDown(e)},Oe=function(e){f.dismissableMask&&f.modal&&B.current===e.target&&!U.current&&ve(e),f.onMaskClick&&f.onMaskClick(e),U.current=null},we=function(e){f.onMaximize?f.onMaximize({originalEvent:e,maximized:!q}):N((function(e){return!e})),e.preventDefault()},Ee=function(e){i.DomHandler.hasClass(e.target,"p-dialog-header-icon")||i.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||f.draggable&&($.current=!0,Z.current=e.pageX,J.current=e.pageY,M.current.style.margin="0",i.DomHandler.addClass(document.body,"p-unselectable-text"),f.onDragStart&&f.onDragStart(e))},De=function(e){if($.current){var t=i.DomHandler.getOuterWidth(M.current),n=i.DomHandler.getOuterHeight(M.current),r=e.pageX-Z.current,o=e.pageY-J.current,a=M.current.getBoundingClientRect(),l=a.left+r,c=a.top+o,s=i.DomHandler.getViewport(),u=getComputedStyle(M.current),p=parseFloat(u.marginLeft),d=parseFloat(u.marginTop);M.current.style.position="fixed",f.keepInViewport?(l>=f.minX&&l+t<s.width&&(Z.current=e.pageX,M.current.style.left=l-p+"px"),c>=f.minY&&c+n<s.height&&(J.current=e.pageY,M.current.style.top=c-d+"px")):(Z.current=e.pageX,M.current.style.left=l-p+"px",J.current=e.pageY,M.current.style.top=c-d+"px"),f.onDrag&&f.onDrag(e)}},Se=function(e){$.current&&($.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),f.onDragEnd&&f.onDragEnd(e))},Pe=function(e){f.resizable&&(V.current=!0,Z.current=e.pageX,J.current=e.pageY,i.DomHandler.addClass(document.body,"p-unselectable-text"),f.onResizeStart&&f.onResizeStart(e))},je=function(e,t,n){!n&&(n=i.DomHandler.getViewport());var r=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?r*(n[t]/100):r},ze=function(e){if(V.current){var t=e.pageX-Z.current,n=e.pageY-J.current,r=i.DomHandler.getOuterWidth(M.current),o=i.DomHandler.getOuterHeight(M.current),a=M.current.getBoundingClientRect(),l=i.DomHandler.getViewport(),c=!parseInt(M.current.style.top)||!parseInt(M.current.style.left),s=je(M.current.style.minWidth,"width",l),u=je(M.current.style.minHeight,"height",l),p=r+t,d=o+n;c&&(p+=t,d+=n),(!s||p>s)&&a.left+p<l.width&&(M.current.style.width=p+"px"),(!u||d>u)&&a.top+d<l.height&&(M.current.style.height=d+"px"),Z.current=e.pageX,J.current=e.pageY,f.onResize&&f.onResize(e)}},Ie=function(e){V.current&&(V.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),f.onResizeEnd&&f.onResizeEnd(e))},ke=function(){M.current.style.position="",M.current.style.left="",M.current.style.top="",M.current.style.margin=""},Re=function(){M.current.setAttribute(G.current,"")},Ce=function(){var e;f.onShow&&f.onShow(),f.focusOnShow&&!((e=document.activeElement)&&M.current&&M.current.contains(e))&&f.closable&&f.showHeader&&Y.current&&Y.current.focus(),Ne()},He=function(){f.modal&&!ie()&&i.DomHandler.addClass(B.current,"p-component-overlay-leave")},_e=function(){$.current=!1,i.ZIndexUtils.clear(B.current),j(!1),Me(),i.DomHandler.focus(K.current),K.current=null},Ne=function(){Be()},Me=function(){Fe()},Te=function(e){if(e&&I){var t={id:D,hasBlockScroll:Q};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex((function(e){return e.id===D}));document.primeDialogParams=-1===n?[].concat(x(r=document.primeDialogParams)||O(r)||w(r)||E(),[t]):document.primeDialogParams.toSpliced(n,1,t)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==D}));var r;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?i.DomHandler.blockBodyScroll():i.DomHandler.unblockBodyScroll()},Be=function(){f.draggable&&(fe(),he()),f.resizable&&(ce(),pe())},Fe=function(){ge(),ye(),se(),de()},Ue=function(){W.current=i.DomHandler.createInlineStyle(m&&m.nonce||b.default.nonce,m&&m.styleContainer);var e="";for(var t in f.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(G.current,"] {\n width: ").concat(f.breakpoints[t]," !important;\n }\n }\n ");W.current.innerHTML=e};a.useMountEffect((function(){Te(!0),f.visible&&j(!0)})),g.useEffect((function(){return f.breakpoints&&Ue(),function(){W.current=i.DomHandler.removeInlineStyle(W.current)}}),[f.breakpoints]),a.useUpdateEffect((function(){f.visible&&!P&&j(!0),f.visible!==I&&P&&R(f.visible),f.visible&&(K.current=document.activeElement)}),[f.visible,P]),a.useUpdateEffect((function(){P&&(i.ZIndexUtils.set("modal",B.current,m&&m.autoZIndex||b.default.autoZIndex,f.baseZIndex||m&&m.zIndex.modal||b.default.zIndex.modal),R(!0))}),[P]),a.useUpdateEffect((function(){Te(!0)}),[Q,I]),a.useUnmountEffect((function(){Me(),Te(!1),i.DomHandler.removeInlineStyle(W.current),i.ZIndexUtils.clear(B.current)})),g.useImperativeHandle(t,(function(){return{props:f,resetPosition:ke,getElement:function(){return M.current},getMask:function(){return B.current},getContent:function(){return X.current},getHeader:function(){return A.current},getFooter:function(){return L.current},getCloseButton:function(){return Y.current}}}));var Xe=function(){if(f.closable){var e=f.ariaCloseIconLabel||n.localeOption("close"),t=d({className:oe("closeButtonIcon"),"aria-hidden":!0},re("closeButtonIcon")),r=i.IconUtils.getJSXIcon(f.closeIcon||g.createElement(l.TimesIcon,t),F({},t),{props:f}),o=d({ref:Y,type:"button",className:oe("closeButton"),"aria-label":e,onClick:ve,onKeyDown:function(e){"Escape"!==e.key&&e.stopPropagation()}},re("closeButton"));return g.createElement("button",o,r,g.createElement(p.Ripple,null))}return null},Ae=function(){var e=d({className:oe("maximizableIcon")},re("maximizableIcon")),t=i.IconUtils.getJSXIcon(q?f.minimizeIcon||g.createElement(s.WindowMinimizeIcon,e):f.maximizeIcon||g.createElement(c.WindowMaximizeIcon,e),e,{props:f});if(f.maximizable){var n=d({type:"button",className:oe("maximizableButton"),onClick:we},re("maximizableButton"));return g.createElement("button",n,t,g.createElement(p.Ripple,null))}return null},Le=function(){if(f.showHeader){var e=Xe(),t=Ae(),n=i.ObjectUtils.getJSXElement(f.icons,f),r=i.ObjectUtils.getJSXElement(f.header,f),o=D+"_header",a=d({ref:A,style:f.headerStyle,className:oe("header"),onMouseDown:Ee},re("header")),l=d({id:o,className:oe("headerTitle")},re("headerTitle")),c=d({className:oe("headerIcons")},re("headerIcons"));return g.createElement("div",a,g.createElement("div",l,r),g.createElement("div",c,n,t,e))}return null},Ye=function(){var e=i.ObjectUtils.getJSXElement(f.footer,f),t=d({ref:L,className:oe("footer")},re("footer"));return e&&g.createElement("div",t,e)};return P&&function(){var t,n,r,a,l,c,s=D+"_header",p=D+"_content",b={enter:"center"===f.position?150:300,exit:"center"===f.position?150:300},y=d({ref:B,style:ae("mask"),className:oe("mask"),onPointerUp:Oe},re("mask")),v=d({ref:M,id:D,className:i.classNames(f.className,oe("root",{props:f,maximized:q,context:m})),style:f.style,onClick:f.onClick,role:"dialog","aria-labelledby":s,"aria-describedby":p,"aria-modal":f.modal,onPointerDown:xe},T.getOtherProps(f),re("root")),x=d({classNames:oe("transition"),timeout:b,in:I,options:f.transitionOptions,unmountOnExit:!0,onEnter:Re,onEntered:Ce,onExiting:He,onExited:_e},re("transition")),O=null;null!=e&&e.content?(c={header:f.header,content:f.message,message:null==f||null===(l=f.children)||void 0===l||null===(l=l[1])||void 0===l||null===(l=l.props)||void 0===l?void 0:l.children},O=i.ObjectUtils.getJSXElement(e.content,{headerRef:A,contentRef:X,footerRef:L,closeRef:Y,hide:ve,message:c})):(n=Le(),t=d({id:D+"_content",ref:X,style:f.contentStyle,className:oe("content")},re("content")),r=g.createElement("div",t,f.children),a=Ye(),O=g.createElement(g.Fragment,null,n,r,a,f.resizable?g.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Pe}):null));var w=g.createElement("div",y,g.createElement(o.CSSTransition,h({nodeRef:M},x),g.createElement("div",v,g.createElement(_,{autoFocus:f.focusOnShow},O))));return g.createElement(u.Portal,{element:w,appendTo:f.appendTo,visible:!0})}()}));return U.displayName="Dialog",e.Dialog=U,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.utils,primereact.icons.times,primereact.icons.windowmaximize,primereact.icons.windowminimize,primereact.portal,primereact.ripple);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.dialog=function(e,t,n,r,o,a,i,l,c,s,u,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(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 f=d(t),g=m(t),b=d(n);function h(){return h=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},h.apply(this,arguments)}function y(e){return y="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},y(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 x(e){if(Array.isArray(e))return v(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function w(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 D(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function S(e){var t=D(e,"string");return"symbol"===y(t)?t:String(t)}function P(e,t,n){return(t=S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){if(Array.isArray(e))return e}function z(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function I(){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 j(e)||z(e,t)||w(e,t)||I()}var R=r.ComponentBase.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return i.ObjectUtils.getMergedProps(e,R.defaultProps)},getOtherProps:function(e){return i.ObjectUtils.getDiffProps(e,R.defaultProps)}});function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=f.default.memo(f.default.forwardRef((function(e,t){var r=f.default.useRef(null),o=f.default.useRef(null),l=f.default.useRef(null),c=f.default.useContext(n.PrimeReactContext),s=R.getProps(e,c),u={props:s};a.useStyle(R.css.styles,{name:"focustrap"});R.setMetaData(H({},u));f.default.useImperativeHandle(t,(function(){return{props:s,getInk:function(){return o.current},getTarget:function(){return r.current}}})),a.useMountEffect((function(){s.disabled||(r.current=h(),y(r.current))}));var p,d,m,g,b,h=function(){return o.current&&o.current.parentElement},y=function(e){var t=s||{},n=t.autoFocusSelector,r=t.firstFocusableSelector,o=void 0===r?"":r,a=t.autoFocus,l=void 0!==a&&a,c="".concat(v(void 0===n?"":n)),u="[autofocus]".concat(c,", [data-pc-autofocus='true']").concat(c),p=i.DomHandler.getFirstFocusableElement(e,u);l&&!p&&(p=i.DomHandler.getFirstFocusableElement(e,v(o))),i.DomHandler.focus(p)},v=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},x=function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_firsthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_firsthiddenfocusableelement:i.DomHandler.getLastFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)};return d=void 0===(p=(s||{}).tabIndex)?0:p,g=(m=function(e,t){return f.default.createElement("span",{ref:"firstfocusableelement"===t?o:l,className:"p-hidden-accessible p-hidden-focusable",tabIndex:d,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e,"data-pc-section":t})})((function(e){var t,n=e.currentTarget,o=e.relatedTarget,a=o!==n.$_pfocustrap_lasthiddenfocusableelement&&null!==(t=r.current)&&void 0!==t&&t.contains(o)?n.$_pfocustrap_lasthiddenfocusableelement:i.DomHandler.getFirstFocusableElement(n.parentElement,v(n.$_pfocustrap_focusableselector));i.DomHandler.focus(a)}),"firstfocusableelement"),b=m(x,"lastfocusableelement"),g.ref.current&&b.ref.current&&(g.ref.current.$_pfocustrap_lasthiddenfocusableelement=b.ref.current,b.ref.current.$_pfocustrap_firsthiddenfocusableelement=g.ref.current),f.default.createElement(f.default.Fragment,null,g,s.children,b)})));function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=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,content:null,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 i.classNames("p-dialog-header",e.props.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){return i.classNames("p-dialog-content",e.props.contentClassName)},footer:function(e){return i.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 i.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.maximized,n=e.context;return i.classNames("p-dialog p-component",{"p-dialog-rtl":e.props.rtl,"p-dialog-maximized":t,"p-dialog-default":!t,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===b.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===b.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 M({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 B(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 F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=g.forwardRef((function(e,t){var d=a.useMergeProps(),m=g.useContext(n.PrimeReactContext),f=T.getProps(e,m),y=f.id?f.id:i.UniqueComponentId(),v=k(g.useState(y),2),D=v[0],S=k(g.useState(!1),2),P=S[0],j=S[1],z=k(g.useState(!1),2),I=z[0],R=z[1],C=k(g.useState(f.maximized),2),H=C[0],N=C[1],M=g.useRef(null),B=g.useRef(null),U=g.useRef(null),X=g.useRef(null),A=g.useRef(null),L=g.useRef(null),Y=g.useRef(null),$=g.useRef(!1),V=g.useRef(!1),Z=g.useRef(null),J=g.useRef(null),W=g.useRef(null),G=g.useRef(y),K=g.useRef(null),q=f.onMaximize?f.maximized:H,Q=I&&(f.blockScroll||f.maximizable&&q),ee=f.closable&&f.closeOnEscape&&I,te=a.useDisplayOrder("dialog",ee),ne=T.setMetaData(F(F({props:f},f.__parentMetadata),{},{state:{id:D,maximized:q,containerVisible:P}})),re=ne.ptm,oe=ne.cx,ae=ne.sx,ie=ne.isUnstyled;r.useHandleStyle(T.css.styles,ie,{name:"dialog"}),a.useGlobalOnEscapeKey({callback:function(e){ve(e)},when:ee&&te,priority:[a.ESC_KEY_HANDLING_PRIORITIES.DIALOG,te]});var le=k(a.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return ze(e)}}),2),ce=le[0],se=le[1],ue=k(a.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Ie(e)}}),2),pe=ue[0],de=ue[1],me=k(a.useEventListener({type:"mousemove",target:function(){return window.document},listener:function(e){return De(e)}}),2),fe=me[0],ge=me[1],be=k(a.useEventListener({type:"mouseup",target:function(){return window.document},listener:function(e){return Se(e)}}),2),he=be[0],ye=be[1],ve=function(e){f.onHide(),e.preventDefault()},xe=function(e){U.current=e.target,f.onPointerDown&&f.onPointerDown(e)},Oe=function(e){f.dismissableMask&&f.modal&&B.current===e.target&&!U.current&&ve(e),f.onMaskClick&&f.onMaskClick(e),U.current=null},we=function(e){f.onMaximize?f.onMaximize({originalEvent:e,maximized:!q}):N((function(e){return!e})),e.preventDefault()},Ee=function(e){i.DomHandler.hasClass(e.target,"p-dialog-header-icon")||i.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||f.draggable&&($.current=!0,Z.current=e.pageX,J.current=e.pageY,M.current.style.margin="0",i.DomHandler.addClass(document.body,"p-unselectable-text"),f.onDragStart&&f.onDragStart(e))},De=function(e){if($.current){var t=i.DomHandler.getOuterWidth(M.current),n=i.DomHandler.getOuterHeight(M.current),r=e.pageX-Z.current,o=e.pageY-J.current,a=M.current.getBoundingClientRect(),l=a.left+r,c=a.top+o,s=i.DomHandler.getViewport(),u=getComputedStyle(M.current),p=parseFloat(u.marginLeft),d=parseFloat(u.marginTop);M.current.style.position="fixed",f.keepInViewport?(l>=f.minX&&l+t<s.width&&(Z.current=e.pageX,M.current.style.left=l-p+"px"),c>=f.minY&&c+n<s.height&&(J.current=e.pageY,M.current.style.top=c-d+"px")):(Z.current=e.pageX,M.current.style.left=l-p+"px",J.current=e.pageY,M.current.style.top=c-d+"px"),f.onDrag&&f.onDrag(e)}},Se=function(e){$.current&&($.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),f.onDragEnd&&f.onDragEnd(e))},Pe=function(e){f.resizable&&(V.current=!0,Z.current=e.pageX,J.current=e.pageY,i.DomHandler.addClass(document.body,"p-unselectable-text"),f.onResizeStart&&f.onResizeStart(e))},je=function(e,t,n){!n&&(n=i.DomHandler.getViewport());var r=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?r*(n[t]/100):r},ze=function(e){if(V.current){var t=e.pageX-Z.current,n=e.pageY-J.current,r=i.DomHandler.getOuterWidth(M.current),o=i.DomHandler.getOuterHeight(M.current),a=M.current.getBoundingClientRect(),l=i.DomHandler.getViewport(),c=!parseInt(M.current.style.top)||!parseInt(M.current.style.left),s=je(M.current.style.minWidth,"width",l),u=je(M.current.style.minHeight,"height",l),p=r+t,d=o+n;c&&(p+=t,d+=n),(!s||p>s)&&a.left+p<l.width&&(M.current.style.width=p+"px"),(!u||d>u)&&a.top+d<l.height&&(M.current.style.height=d+"px"),Z.current=e.pageX,J.current=e.pageY,f.onResize&&f.onResize(e)}},Ie=function(e){V.current&&(V.current=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),f.onResizeEnd&&f.onResizeEnd(e))},ke=function(){M.current.style.position="",M.current.style.left="",M.current.style.top="",M.current.style.margin=""},Re=function(){M.current.setAttribute(G.current,"")},Ce=function(){var e;f.onShow&&f.onShow(),f.focusOnShow&&!((e=document.activeElement)&&M.current&&M.current.contains(e))&&f.closable&&f.showHeader&&Y.current&&Y.current.focus(),Ne()},He=function(){f.modal&&!ie()&&i.DomHandler.addClass(B.current,"p-component-overlay-leave")},_e=function(){$.current=!1,i.ZIndexUtils.clear(B.current),j(!1),Me(),i.DomHandler.focus(K.current),K.current=null},Ne=function(){Be()},Me=function(){Fe()},Te=function(e){if(e&&I){var t={id:D,hasBlockScroll:Q};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex((function(e){return e.id===D}));document.primeDialogParams=-1===n?[].concat(x(r=document.primeDialogParams)||O(r)||w(r)||E(),[t]):document.primeDialogParams.toSpliced(n,1,t)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter((function(e){return e.id!==D}));var r;document.primeDialogParams&&document.primeDialogParams.some((function(e){return e.hasBlockScroll}))?i.DomHandler.blockBodyScroll():i.DomHandler.unblockBodyScroll()},Be=function(){f.draggable&&(fe(),he()),f.resizable&&(ce(),pe())},Fe=function(){ge(),ye(),se(),de()},Ue=function(){W.current=i.DomHandler.createInlineStyle(m&&m.nonce||b.default.nonce,m&&m.styleContainer);var e="";for(var t in f.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(G.current,"] {\n width: ").concat(f.breakpoints[t]," !important;\n }\n }\n ");W.current.innerHTML=e};a.useMountEffect((function(){Te(!0),f.visible&&j(!0)})),g.useEffect((function(){return f.breakpoints&&Ue(),function(){W.current=i.DomHandler.removeInlineStyle(W.current)}}),[f.breakpoints]),a.useUpdateEffect((function(){f.visible&&!P&&j(!0),f.visible!==I&&P&&R(f.visible),f.visible&&(K.current=document.activeElement)}),[f.visible,P]),a.useUpdateEffect((function(){P&&(i.ZIndexUtils.set("modal",B.current,m&&m.autoZIndex||b.default.autoZIndex,f.baseZIndex||m&&m.zIndex.modal||b.default.zIndex.modal),R(!0))}),[P]),a.useUpdateEffect((function(){Te(!0)}),[Q,I]),a.useUnmountEffect((function(){Me(),Te(!1),i.DomHandler.removeInlineStyle(W.current),i.ZIndexUtils.clear(B.current)})),g.useImperativeHandle(t,(function(){return{props:f,resetPosition:ke,getElement:function(){return M.current},getMask:function(){return B.current},getContent:function(){return X.current},getHeader:function(){return A.current},getFooter:function(){return L.current},getCloseButton:function(){return Y.current}}}));var Xe=function(){if(f.closable){var e=f.ariaCloseIconLabel||n.ariaLabel("close"),t=d({className:oe("closeButtonIcon"),"aria-hidden":!0},re("closeButtonIcon")),r=i.IconUtils.getJSXIcon(f.closeIcon||g.createElement(l.TimesIcon,t),F({},t),{props:f}),o=d({ref:Y,type:"button",className:oe("closeButton"),"aria-label":e,onClick:ve,onKeyDown:function(e){"Escape"!==e.key&&e.stopPropagation()}},re("closeButton"));return g.createElement("button",o,r,g.createElement(p.Ripple,null))}return null},Ae=function(){var e=d({className:oe("maximizableIcon")},re("maximizableIcon")),t=i.IconUtils.getJSXIcon(q?f.minimizeIcon||g.createElement(s.WindowMinimizeIcon,e):f.maximizeIcon||g.createElement(c.WindowMaximizeIcon,e),e,{props:f});if(f.maximizable){var n=d({type:"button",className:oe("maximizableButton"),onClick:we},re("maximizableButton"));return g.createElement("button",n,t,g.createElement(p.Ripple,null))}return null},Le=function(){if(f.showHeader){var e=Xe(),t=Ae(),n=i.ObjectUtils.getJSXElement(f.icons,f),r=i.ObjectUtils.getJSXElement(f.header,f),o=D+"_header",a=d({ref:A,style:f.headerStyle,className:oe("header"),onMouseDown:Ee},re("header")),l=d({id:o,className:oe("headerTitle")},re("headerTitle")),c=d({className:oe("headerIcons")},re("headerIcons"));return g.createElement("div",a,g.createElement("div",l,r),g.createElement("div",c,n,t,e))}return null},Ye=function(){var e=i.ObjectUtils.getJSXElement(f.footer,f),t=d({ref:L,className:oe("footer")},re("footer"));return e&&g.createElement("div",t,e)};return P&&function(){var t,n,r,a,l,c,s=D+"_header",p=D+"_content",b={enter:"center"===f.position?150:300,exit:"center"===f.position?150:300},y=d({ref:B,style:ae("mask"),className:oe("mask"),onPointerUp:Oe},re("mask")),v=d({ref:M,id:D,className:i.classNames(f.className,oe("root",{props:f,maximized:q,context:m})),style:f.style,onClick:f.onClick,role:"dialog","aria-labelledby":s,"aria-describedby":p,"aria-modal":f.modal,onPointerDown:xe},T.getOtherProps(f),re("root")),x=d({classNames:oe("transition"),timeout:b,in:I,options:f.transitionOptions,unmountOnExit:!0,onEnter:Re,onEntered:Ce,onExiting:He,onExited:_e},re("transition")),O=null;null!=e&&e.content?(c={header:f.header,content:f.message,message:null==f||null===(l=f.children)||void 0===l||null===(l=l[1])||void 0===l||null===(l=l.props)||void 0===l?void 0:l.children},O=i.ObjectUtils.getJSXElement(e.content,{headerRef:A,contentRef:X,footerRef:L,closeRef:Y,hide:ve,message:c})):(n=Le(),t=d({id:D+"_content",ref:X,style:f.contentStyle,className:oe("content")},re("content")),r=g.createElement("div",t,f.children),a=Ye(),O=g.createElement(g.Fragment,null,n,r,a,f.resizable?g.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:Pe}):null));var w=g.createElement("div",y,g.createElement(o.CSSTransition,h({nodeRef:M},x),g.createElement("div",v,g.createElement(_,{autoFocus:f.focusOnShow},O))));return g.createElement(u.Portal,{element:w,appendTo:f.appendTo,visible:!0})}()}));return U.displayName="Dialog",e.Dialog=U,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.utils,primereact.icons.times,primereact.icons.windowmaximize,primereact.icons.windowminimize,primereact.portal,primereact.ripple);
|
package/dock/dock.cjs.js
CHANGED
|
@@ -215,7 +215,7 @@ var DockBase = componentbase.ComponentBase.extend({
|
|
|
215
215
|
|
|
216
216
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
217
217
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
218
|
-
var Dock = /*#__PURE__*/React__namespace.memo(
|
|
218
|
+
var Dock = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
219
219
|
var _React$useState = React__namespace.useState(-3),
|
|
220
220
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
221
221
|
currentIndexState = _React$useState2[0],
|
|
@@ -426,7 +426,6 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
426
426
|
var menuitemProps = mergeProps(_defineProperty(_defineProperty({
|
|
427
427
|
id: key,
|
|
428
428
|
role: 'menuitem',
|
|
429
|
-
key: key,
|
|
430
429
|
'aria-label': label,
|
|
431
430
|
'aria-disabled': disabled,
|
|
432
431
|
'data-p-focused': active,
|
|
@@ -439,7 +438,9 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
439
438
|
}, "role", 'none'), "onMouseEnter", function onMouseEnter() {
|
|
440
439
|
return onItemMouseEnter(index);
|
|
441
440
|
}), getPTOptions('menuitem', item, index));
|
|
442
|
-
return /*#__PURE__*/React__namespace.createElement("li",
|
|
441
|
+
return /*#__PURE__*/React__namespace.createElement("li", _extends({}, menuitemProps, {
|
|
442
|
+
key: key
|
|
443
|
+
}), /*#__PURE__*/React__namespace.createElement("div", contentProps, content));
|
|
443
444
|
};
|
|
444
445
|
var createItems = function createItems() {
|
|
445
446
|
return props.model ? props.model.map(createItem) : null;
|