primereact 10.0.0 → 10.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/accordion/accordion.esm.js +0 -1
- package/api/api.esm.js +0 -1
- package/autocomplete/autocomplete.esm.js +8 -7
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/avatar/avatar.esm.js +0 -1
- package/avatargroup/avatargroup.esm.js +0 -1
- package/badge/badge.esm.js +0 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +0 -1
- package/button/button.esm.js +0 -1
- package/calendar/calendar.esm.js +2 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/card/card.esm.js +0 -1
- package/carousel/carousel.esm.js +7 -8
- package/carousel/carousel.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +0 -1
- package/chart/chart.esm.js +0 -1
- package/checkbox/checkbox.esm.js +0 -1
- package/chip/chip.esm.js +0 -1
- package/chips/chips.esm.js +0 -1
- package/colorpicker/colorpicker.esm.js +0 -1
- package/column/column.esm.js +0 -1
- package/columngroup/columngroup.esm.js +0 -1
- package/componentbase/componentbase.cjs.js +12 -7
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +23 -13
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +12 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +0 -1
- package/confirmpopup/confirmpopup.esm.js +0 -1
- package/contextmenu/contextmenu.esm.js +0 -1
- package/core/core.js +12 -7
- package/core/core.min.js +1 -1
- package/csstransition/csstransition.esm.js +0 -1
- package/datascroller/datascroller.esm.js +0 -1
- package/datatable/datatable.esm.js +0 -1
- package/dataview/dataview.esm.js +0 -1
- package/deferredcontent/deferredcontent.esm.js +0 -1
- package/dialog/dialog.esm.js +2 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/divider/divider.esm.js +0 -1
- package/dock/dock.esm.js +0 -1
- package/dropdown/dropdown.esm.js +0 -1
- package/editor/editor.esm.js +0 -1
- package/fieldset/fieldset.esm.js +0 -1
- package/fileupload/fileupload.esm.js +0 -1
- package/galleria/galleria.esm.js +11 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/hooks/hooks.esm.js +0 -6
- package/iconbase/iconbase.esm.js +0 -1
- package/icons/angledoubledown/index.esm.js +0 -1
- package/icons/angledoubleleft/index.esm.js +0 -1
- package/icons/angledoubleright/index.esm.js +0 -1
- package/icons/angledoubleup/index.esm.js +0 -1
- package/icons/angledown/index.esm.js +0 -1
- package/icons/angleleft/index.esm.js +0 -1
- package/icons/angleright/index.esm.js +0 -1
- package/icons/angleup/index.esm.js +0 -1
- package/icons/arrowdown/index.esm.js +0 -1
- package/icons/arrowup/index.esm.js +0 -1
- package/icons/ban/index.esm.js +0 -1
- package/icons/bars/index.esm.js +0 -1
- package/icons/calendar/index.esm.js +0 -1
- package/icons/check/index.esm.js +0 -1
- package/icons/chevrondown/index.esm.js +0 -1
- package/icons/chevronleft/index.esm.js +0 -1
- package/icons/chevronright/index.esm.js +0 -1
- package/icons/chevronup/index.esm.js +0 -1
- package/icons/download/index.esm.js +0 -1
- package/icons/exclamationtriangle/index.esm.js +0 -1
- package/icons/eye/index.esm.js +0 -1
- package/icons/eyeslash/index.esm.js +0 -1
- package/icons/filter/index.esm.js +0 -1
- package/icons/filterslash/index.esm.js +0 -1
- package/icons/infocircle/index.esm.js +0 -1
- package/icons/minus/index.esm.js +0 -1
- package/icons/pencil/index.esm.js +0 -1
- package/icons/plus/index.esm.js +0 -1
- package/icons/refresh/index.esm.js +0 -1
- package/icons/search/index.esm.js +0 -1
- package/icons/searchminus/index.esm.js +0 -1
- package/icons/searchplus/index.esm.js +0 -1
- package/icons/sortalt/index.esm.js +0 -1
- package/icons/sortamountdown/index.esm.js +0 -1
- package/icons/sortamountupalt/index.esm.js +0 -1
- package/icons/spinner/index.esm.js +0 -1
- package/icons/star/index.esm.js +0 -1
- package/icons/starfill/index.esm.js +0 -1
- package/icons/thlarge/index.esm.js +0 -1
- package/icons/times/index.esm.js +0 -1
- package/icons/timescircle/index.esm.js +0 -1
- package/icons/trash/index.esm.js +0 -1
- package/icons/undo/index.esm.js +0 -1
- package/icons/upload/index.esm.js +0 -1
- package/icons/windowmaximize/index.esm.js +0 -1
- package/icons/windowminimize/index.esm.js +0 -1
- package/image/image.esm.js +2 -1
- package/image/image.esm.min.js +1 -1
- package/inplace/inplace.esm.js +0 -1
- package/inputmask/inputmask.esm.js +0 -1
- package/inputnumber/inputnumber.esm.js +0 -1
- package/inputswitch/inputswitch.esm.js +0 -1
- package/inputtext/inputtext.esm.js +0 -1
- package/inputtextarea/inputtextarea.esm.js +0 -1
- package/keyfilter/keyfilter.esm.js +0 -1
- package/knob/knob.esm.js +0 -1
- package/listbox/listbox.esm.js +0 -1
- package/megamenu/megamenu.esm.js +0 -1
- package/mention/mention.esm.js +0 -1
- package/menu/menu.esm.js +0 -1
- package/menubar/menubar.esm.js +0 -1
- package/message/message.esm.js +0 -1
- package/messages/messages.esm.js +1 -2
- package/messages/messages.esm.min.js +1 -1
- package/multiselect/multiselect.esm.js +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +0 -1
- package/orderlist/orderlist.esm.js +9 -5
- package/orderlist/orderlist.esm.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +0 -1
- package/overlaypanel/overlaypanel.esm.js +0 -1
- package/overlayservice/overlayservice.esm.js +0 -1
- package/package.json +2 -2
- package/paginator/paginator.esm.js +0 -1
- package/panel/panel.esm.js +0 -1
- package/panelmenu/panelmenu.esm.js +0 -1
- package/passthrough/index.esm.js +0 -1
- package/passthrough/tailwind/index.cjs.js +2 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +149 -148
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +2 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.esm.js +0 -1
- package/picklist/picklist.esm.js +0 -1
- package/portal/portal.esm.js +0 -1
- package/primereact.all.cjs.js +12 -7
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +70 -42
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +12 -7
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.esm.js +0 -1
- package/progressspinner/progressspinner.esm.js +0 -1
- package/radiobutton/radiobutton.esm.js +0 -1
- package/rating/rating.esm.js +0 -1
- package/ripple/ripple.esm.js +0 -1
- package/row/row.esm.js +0 -1
- package/scrollpanel/scrollpanel.esm.js +0 -1
- package/scrolltop/scrolltop.esm.js +0 -1
- package/selectbutton/selectbutton.esm.js +0 -1
- package/sidebar/sidebar.esm.js +2 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/skeleton/skeleton.esm.js +0 -1
- package/slidemenu/slidemenu.esm.js +0 -1
- package/slider/slider.esm.js +0 -1
- package/speeddial/speeddial.esm.js +0 -1
- package/splitbutton/splitbutton.esm.js +0 -1
- package/splitter/splitter.esm.js +0 -1
- package/steps/steps.esm.js +0 -1
- package/styleclass/styleclass.esm.js +0 -1
- package/tabmenu/tabmenu.esm.js +0 -1
- package/tabview/tabview.esm.js +0 -1
- package/tag/tag.esm.js +0 -1
- package/terminal/terminal.esm.js +0 -1
- package/terminalservice/terminalservice.esm.js +0 -1
- package/tieredmenu/tieredmenu.esm.js +0 -1
- package/timeline/timeline.esm.js +0 -1
- package/toast/toast.esm.js +0 -1
- package/togglebutton/togglebutton.esm.js +0 -1
- package/toolbar/toolbar.esm.js +0 -1
- package/tooltip/tooltip.esm.js +0 -1
- package/tree/tree.esm.js +0 -1
- package/treeselect/treeselect.esm.js +0 -1
- package/treetable/treetable.esm.js +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +0 -1
- package/utils/utils.esm.js +0 -1
- package/virtualscroller/virtualscroller.esm.js +0 -1
- package/web-types.json +1 -1
- package/accordion/accordion.esm.min.mjs +0 -1
- package/accordion/accordion.esm.mjs +0 -420
- package/api/api.esm.min.mjs +0 -1
- package/api/api.esm.mjs +0 -943
- package/autocomplete/autocomplete.esm.min.mjs +0 -1
- package/autocomplete/autocomplete.esm.mjs +0 -1128
- package/avatar/avatar.esm.min.mjs +0 -1
- package/avatar/avatar.esm.mjs +0 -244
- package/avatargroup/avatargroup.esm.min.mjs +0 -1
- package/avatargroup/avatargroup.esm.mjs +0 -54
- package/badge/badge.esm.min.mjs +0 -1
- package/badge/badge.esm.mjs +0 -109
- package/blockui/blockui.esm.min.mjs +0 -1
- package/blockui/blockui.esm.mjs +0 -267
- package/breadcrumb/breadcrumb.esm.min.mjs +0 -1
- package/breadcrumb/breadcrumb.esm.mjs +0 -350
- package/button/button.esm.min.mjs +0 -1
- package/button/button.esm.mjs +0 -294
- package/calendar/calendar.esm.min.mjs +0 -1
- package/calendar/calendar.esm.mjs +0 -3474
- package/card/card.esm.min.mjs +0 -1
- package/card/card.esm.mjs +0 -97
- package/carousel/carousel.esm.min.mjs +0 -1
- package/carousel/carousel.esm.mjs +0 -800
- package/cascadeselect/cascadeselect.esm.min.mjs +0 -1
- package/cascadeselect/cascadeselect.esm.mjs +0 -818
- package/chart/chart.esm.min.mjs +0 -1
- package/chart/chart.esm.mjs +0 -154
- package/checkbox/checkbox.esm.min.mjs +0 -1
- package/checkbox/checkbox.esm.mjs +0 -356
- package/chip/chip.esm.min.mjs +0 -1
- package/chip/chip.esm.mjs +0 -247
- package/chips/chips.esm.min.mjs +0 -1
- package/chips/chips.esm.mjs +0 -500
- package/colorpicker/colorpicker.esm.min.mjs +0 -1
- package/colorpicker/colorpicker.esm.mjs +0 -787
- package/column/column.esm.min.mjs +0 -1
- package/column/column.esm.mjs +0 -7
- package/columngroup/columngroup.esm.min.mjs +0 -1
- package/columngroup/columngroup.esm.mjs +0 -5
- package/componentbase/componentbase.esm.min.mjs +0 -1
- package/componentbase/componentbase.esm.mjs +0 -328
- package/confirmdialog/confirmdialog.esm.min.mjs +0 -1
- package/confirmdialog/confirmdialog.esm.mjs +0 -375
- package/confirmpopup/confirmpopup.esm.min.mjs +0 -1
- package/confirmpopup/confirmpopup.esm.mjs +0 -609
- package/contextmenu/contextmenu.esm.min.mjs +0 -1
- package/contextmenu/contextmenu.esm.mjs +0 -663
- package/csstransition/csstransition.esm.min.mjs +0 -1
- package/csstransition/csstransition.esm.mjs +0 -137
- package/datascroller/datascroller.esm.min.mjs +0 -1
- package/datascroller/datascroller.esm.mjs +0 -319
- package/datatable/datatable.esm.min.mjs +0 -1
- package/datatable/datatable.esm.mjs +0 -6635
- package/dataview/dataview.esm.min.mjs +0 -1
- package/dataview/dataview.esm.mjs +0 -505
- package/deferredcontent/deferredcontent.esm.min.mjs +0 -1
- package/deferredcontent/deferredcontent.esm.mjs +0 -132
- package/dialog/dialog.esm.min.mjs +0 -1
- package/dialog/dialog.esm.mjs +0 -984
- package/divider/divider.esm.min.mjs +0 -1
- package/divider/divider.esm.mjs +0 -78
- package/dock/dock.esm.min.mjs +0 -1
- package/dock/dock.esm.mjs +0 -347
- package/dropdown/dropdown.esm.min.mjs +0 -1
- package/dropdown/dropdown.esm.mjs +0 -1379
- package/editor/editor.esm.min.mjs +0 -1
- package/editor/editor.esm.mjs +0 -337
- package/fieldset/fieldset.esm.min.mjs +0 -1
- package/fieldset/fieldset.esm.mjs +0 -269
- package/fileupload/fileupload.esm.min.mjs +0 -1
- package/fileupload/fileupload.esm.mjs +0 -1004
- package/galleria/galleria.esm.min.mjs +0 -1
- package/galleria/galleria.esm.mjs +0 -1094
- package/hooks/hooks.esm.min.mjs +0 -1
- package/hooks/hooks.esm.mjs +0 -1036
- package/iconbase/iconbase.esm.min.mjs +0 -1
- package/iconbase/iconbase.esm.mjs +0 -32
- package/icons/angledoubledown/index.esm.min.mjs +0 -1
- package/icons/angledoubledown/index.esm.mjs +0 -38
- package/icons/angledoubleleft/index.esm.min.mjs +0 -1
- package/icons/angledoubleleft/index.esm.mjs +0 -38
- package/icons/angledoubleright/index.esm.min.mjs +0 -1
- package/icons/angledoubleright/index.esm.mjs +0 -38
- package/icons/angledoubleup/index.esm.min.mjs +0 -1
- package/icons/angledoubleup/index.esm.mjs +0 -38
- package/icons/angledown/index.esm.min.mjs +0 -1
- package/icons/angledown/index.esm.mjs +0 -36
- package/icons/angleleft/index.esm.min.mjs +0 -1
- package/icons/angleleft/index.esm.mjs +0 -36
- package/icons/angleright/index.esm.min.mjs +0 -1
- package/icons/angleright/index.esm.mjs +0 -36
- package/icons/angleup/index.esm.min.mjs +0 -1
- package/icons/angleup/index.esm.mjs +0 -36
- package/icons/arrowdown/index.esm.min.mjs +0 -1
- package/icons/arrowdown/index.esm.mjs +0 -660
- package/icons/arrowup/index.esm.min.mjs +0 -1
- package/icons/arrowup/index.esm.mjs +0 -660
- package/icons/ban/index.esm.min.mjs +0 -1
- package/icons/ban/index.esm.mjs +0 -658
- package/icons/bars/index.esm.min.mjs +0 -1
- package/icons/bars/index.esm.mjs +0 -38
- package/icons/calendar/index.esm.min.mjs +0 -1
- package/icons/calendar/index.esm.mjs +0 -36
- package/icons/check/index.esm.min.mjs +0 -1
- package/icons/check/index.esm.mjs +0 -36
- package/icons/chevrondown/index.esm.min.mjs +0 -1
- package/icons/chevrondown/index.esm.mjs +0 -36
- package/icons/chevronleft/index.esm.min.mjs +0 -1
- package/icons/chevronleft/index.esm.mjs +0 -36
- package/icons/chevronright/index.esm.min.mjs +0 -1
- package/icons/chevronright/index.esm.mjs +0 -36
- package/icons/chevronup/index.esm.min.mjs +0 -1
- package/icons/chevronup/index.esm.mjs +0 -36
- package/icons/download/index.esm.min.mjs +0 -1
- package/icons/download/index.esm.mjs +0 -660
- package/icons/exclamationtriangle/index.esm.min.mjs +0 -1
- package/icons/exclamationtriangle/index.esm.mjs +0 -664
- package/icons/eye/index.esm.min.mjs +0 -1
- package/icons/eye/index.esm.mjs +0 -38
- package/icons/eyeslash/index.esm.min.mjs +0 -1
- package/icons/eyeslash/index.esm.mjs +0 -660
- package/icons/filter/index.esm.min.mjs +0 -1
- package/icons/filter/index.esm.mjs +0 -658
- package/icons/filterslash/index.esm.min.mjs +0 -1
- package/icons/filterslash/index.esm.mjs +0 -660
- package/icons/infocircle/index.esm.min.mjs +0 -1
- package/icons/infocircle/index.esm.mjs +0 -660
- package/icons/minus/index.esm.min.mjs +0 -1
- package/icons/minus/index.esm.mjs +0 -36
- package/icons/pencil/index.esm.min.mjs +0 -1
- package/icons/pencil/index.esm.mjs +0 -658
- package/icons/plus/index.esm.min.mjs +0 -1
- package/icons/plus/index.esm.mjs +0 -658
- package/icons/refresh/index.esm.min.mjs +0 -1
- package/icons/refresh/index.esm.mjs +0 -660
- package/icons/search/index.esm.min.mjs +0 -1
- package/icons/search/index.esm.mjs +0 -660
- package/icons/searchminus/index.esm.min.mjs +0 -1
- package/icons/searchminus/index.esm.mjs +0 -660
- package/icons/searchplus/index.esm.min.mjs +0 -1
- package/icons/searchplus/index.esm.mjs +0 -660
- package/icons/sortalt/index.esm.min.mjs +0 -1
- package/icons/sortalt/index.esm.mjs +0 -667
- package/icons/sortamountdown/index.esm.min.mjs +0 -1
- package/icons/sortamountdown/index.esm.mjs +0 -673
- package/icons/sortamountupalt/index.esm.min.mjs +0 -1
- package/icons/sortamountupalt/index.esm.mjs +0 -673
- package/icons/spinner/index.esm.min.mjs +0 -1
- package/icons/spinner/index.esm.mjs +0 -658
- package/icons/star/index.esm.min.mjs +0 -1
- package/icons/star/index.esm.mjs +0 -658
- package/icons/starfill/index.esm.min.mjs +0 -1
- package/icons/starfill/index.esm.mjs +0 -658
- package/icons/thlarge/index.esm.min.mjs +0 -1
- package/icons/thlarge/index.esm.mjs +0 -660
- package/icons/times/index.esm.min.mjs +0 -1
- package/icons/times/index.esm.mjs +0 -36
- package/icons/timescircle/index.esm.min.mjs +0 -1
- package/icons/timescircle/index.esm.mjs +0 -660
- package/icons/trash/index.esm.min.mjs +0 -1
- package/icons/trash/index.esm.mjs +0 -660
- package/icons/undo/index.esm.min.mjs +0 -1
- package/icons/undo/index.esm.mjs +0 -660
- package/icons/upload/index.esm.min.mjs +0 -1
- package/icons/upload/index.esm.mjs +0 -660
- package/icons/windowmaximize/index.esm.min.mjs +0 -1
- package/icons/windowmaximize/index.esm.mjs +0 -660
- package/icons/windowminimize/index.esm.min.mjs +0 -1
- package/icons/windowminimize/index.esm.mjs +0 -660
- package/image/image.esm.min.mjs +0 -1
- package/image/image.esm.mjs +0 -1163
- package/inplace/inplace.esm.min.mjs +0 -1
- package/inplace/inplace.esm.mjs +0 -242
- package/inputmask/inputmask.esm.min.mjs +0 -1
- package/inputmask/inputmask.esm.mjs +0 -559
- package/inputnumber/inputnumber.esm.min.mjs +0 -1
- package/inputnumber/inputnumber.esm.mjs +0 -1208
- package/inputswitch/inputswitch.esm.min.mjs +0 -1
- package/inputswitch/inputswitch.esm.mjs +0 -290
- package/inputtext/inputtext.esm.min.mjs +0 -1
- package/inputtext/inputtext.esm.mjs +0 -170
- package/inputtextarea/inputtextarea.esm.min.mjs +0 -1
- package/inputtextarea/inputtextarea.esm.mjs +0 -219
- package/keyfilter/keyfilter.esm.min.mjs +0 -1
- package/keyfilter/keyfilter.esm.mjs +0 -107
- package/knob/knob.esm.min.mjs +0 -1
- package/knob/knob.esm.mjs +0 -317
- package/listbox/listbox.esm.min.mjs +0 -1
- package/listbox/listbox.esm.mjs +0 -809
- package/megamenu/megamenu.esm.min.mjs +0 -1
- package/megamenu/megamenu.esm.mjs +0 -715
- package/mention/mention.esm.min.mjs +0 -1
- package/mention/mention.esm.mjs +0 -770
- package/menu/menu.esm.min.mjs +0 -1
- package/menu/menu.esm.mjs +0 -484
- package/menubar/menubar.esm.min.mjs +0 -1
- package/menubar/menubar.esm.mjs +0 -583
- package/message/message.esm.min.mjs +0 -1
- package/message/message.esm.mjs +0 -168
- package/messages/messages.esm.min.mjs +0 -1
- package/messages/messages.esm.mjs +0 -438
- package/multiselect/multiselect.esm.min.mjs +0 -1
- package/multiselect/multiselect.esm.mjs +0 -1723
- package/multistatecheckbox/multistatecheckbox.esm.min.mjs +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.mjs +0 -351
- package/orderlist/orderlist.esm.min.mjs +0 -1
- package/orderlist/orderlist.esm.mjs +0 -820
- package/organizationchart/organizationchart.esm.min.mjs +0 -1
- package/organizationchart/organizationchart.esm.mjs +0 -479
- package/overlaypanel/overlaypanel.esm.min.mjs +0 -1
- package/overlaypanel/overlaypanel.esm.mjs +0 -515
- package/overlayservice/overlayservice.esm.min.mjs +0 -1
- package/overlayservice/overlayservice.esm.mjs +0 -6
- package/paginator/paginator.esm.min.mjs +0 -1
- package/paginator/paginator.esm.mjs +0 -932
- package/panel/panel.esm.min.mjs +0 -1
- package/panel/panel.esm.mjs +0 -315
- package/panelmenu/panelmenu.esm.min.mjs +0 -1
- package/panelmenu/panelmenu.esm.mjs +0 -644
- package/passthrough/index.esm.min.mjs +0 -1
- package/passthrough/index.esm.mjs +0 -70
- package/passthrough/tailwind/index.esm.min.mjs +0 -1
- package/passthrough/tailwind/index.esm.mjs +0 -3513
- package/password/password.esm.min.mjs +0 -1
- package/password/password.esm.mjs +0 -566
- package/picklist/picklist.esm.min.mjs +0 -1
- package/picklist/picklist.esm.mjs +0 -1118
- package/portal/portal.esm.min.mjs +0 -1
- package/portal/portal.esm.mjs +0 -109
- package/primereact.all.esm.min.mjs +0 -1
- package/primereact.all.esm.mjs +0 -51669
- package/progressbar/progressbar.esm.min.mjs +0 -1
- package/progressbar/progressbar.esm.mjs +0 -189
- package/progressspinner/progressspinner.esm.min.mjs +0 -1
- package/progressspinner/progressspinner.esm.mjs +0 -87
- package/radiobutton/radiobutton.esm.min.mjs +0 -1
- package/radiobutton/radiobutton.esm.mjs +0 -328
- package/rating/rating.esm.min.mjs +0 -1
- package/rating/rating.esm.mjs +0 -272
- package/ripple/ripple.esm.min.mjs +0 -1
- package/ripple/ripple.esm.mjs +0 -99
- package/row/row.esm.min.mjs +0 -1
- package/row/row.esm.mjs +0 -35
- package/scrollpanel/scrollpanel.esm.min.mjs +0 -1
- package/scrollpanel/scrollpanel.esm.mjs +0 -209
- package/scrolltop/scrolltop.esm.min.mjs +0 -1
- package/scrolltop/scrolltop.esm.mjs +0 -268
- package/selectbutton/selectbutton.esm.min.mjs +0 -1
- package/selectbutton/selectbutton.esm.mjs +0 -326
- package/sidebar/sidebar.esm.min.mjs +0 -1
- package/sidebar/sidebar.esm.mjs +0 -544
- package/skeleton/skeleton.esm.min.mjs +0 -1
- package/skeleton/skeleton.esm.mjs +0 -124
- package/slidemenu/slidemenu.esm.min.mjs +0 -1
- package/slidemenu/slidemenu.esm.mjs +0 -688
- package/slider/slider.esm.min.mjs +0 -1
- package/slider/slider.esm.mjs +0 -477
- package/speeddial/speeddial.esm.min.mjs +0 -1
- package/speeddial/speeddial.esm.mjs +0 -520
- package/splitbutton/splitbutton.esm.min.mjs +0 -1
- package/splitbutton/splitbutton.esm.mjs +0 -544
- package/splitter/splitter.esm.min.mjs +0 -1
- package/splitter/splitter.esm.mjs +0 -465
- package/steps/steps.esm.min.mjs +0 -1
- package/steps/steps.esm.mjs +0 -293
- package/styleclass/styleclass.esm.min.mjs +0 -1
- package/styleclass/styleclass.esm.mjs +0 -268
- package/tabmenu/tabmenu.esm.min.mjs +0 -1
- package/tabmenu/tabmenu.esm.mjs +0 -331
- package/tabview/tabview.esm.min.mjs +0 -1
- package/tabview/tabview.esm.mjs +0 -677
- package/tag/tag.esm.min.mjs +0 -1
- package/tag/tag.esm.mjs +0 -116
- package/terminal/terminal.esm.min.mjs +0 -1
- package/terminal/terminal.esm.mjs +0 -279
- package/terminalservice/terminalservice.esm.min.mjs +0 -1
- package/terminalservice/terminalservice.esm.mjs +0 -6
- package/tieredmenu/tieredmenu.esm.min.mjs +0 -1
- package/tieredmenu/tieredmenu.esm.mjs +0 -698
- package/timeline/timeline.esm.min.mjs +0 -1
- package/timeline/timeline.esm.mjs +0 -163
- package/toast/toast.esm.min.mjs +0 -1
- package/toast/toast.esm.mjs +0 -738
- package/togglebutton/togglebutton.esm.min.mjs +0 -1
- package/togglebutton/togglebutton.esm.mjs +0 -216
- package/toolbar/toolbar.esm.min.mjs +0 -1
- package/toolbar/toolbar.esm.mjs +0 -78
- package/tooltip/tooltip.esm.min.mjs +0 -1
- package/tooltip/tooltip.esm.mjs +0 -695
- package/tree/tree.esm.min.mjs +0 -1
- package/tree/tree.esm.mjs +0 -1402
- package/treeselect/treeselect.esm.min.mjs +0 -1
- package/treeselect/treeselect.esm.mjs +0 -929
- package/treetable/treetable.esm.min.mjs +0 -1
- package/treetable/treetable.esm.mjs +0 -3093
- package/tristatecheckbox/tristatecheckbox.esm.min.mjs +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.mjs +0 -291
- package/utils/utils.esm.min.mjs +0 -1
- package/utils/utils.esm.mjs +0 -2382
- package/virtualscroller/virtualscroller.esm.min.mjs +0 -1
- package/virtualscroller/virtualscroller.esm.mjs +0 -971
|
@@ -1,609 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PrimeReact, { PrimeReactContext, localeOption } from 'primereact/api';
|
|
4
|
-
import { Button } from 'primereact/button';
|
|
5
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
|
-
import { CSSTransition } from 'primereact/csstransition';
|
|
7
|
-
import { useOverlayListener, useUpdateEffect, useUnmountEffect as useUnmountEffect$1 } from 'primereact/hooks';
|
|
8
|
-
import { OverlayService } from 'primereact/overlayservice';
|
|
9
|
-
import { Portal } from 'primereact/portal';
|
|
10
|
-
import { classNames, DomHandler, ObjectUtils, ZIndexUtils, mergeProps, IconUtils } from 'primereact/utils';
|
|
11
|
-
|
|
12
|
-
function _extends() {
|
|
13
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
14
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
15
|
-
var source = arguments[i];
|
|
16
|
-
for (var key in source) {
|
|
17
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
18
|
-
target[key] = source[key];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return target;
|
|
23
|
-
};
|
|
24
|
-
return _extends.apply(this, arguments);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function _arrayWithHoles(arr) {
|
|
28
|
-
if (Array.isArray(arr)) return arr;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function _iterableToArrayLimit(r, l) {
|
|
32
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
33
|
-
if (null != t) {
|
|
34
|
-
var e,
|
|
35
|
-
n,
|
|
36
|
-
i,
|
|
37
|
-
u,
|
|
38
|
-
a = [],
|
|
39
|
-
f = !0,
|
|
40
|
-
o = !1;
|
|
41
|
-
try {
|
|
42
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
43
|
-
if (Object(t) !== t) return;
|
|
44
|
-
f = !1;
|
|
45
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
46
|
-
} catch (r) {
|
|
47
|
-
o = !0, n = r;
|
|
48
|
-
} finally {
|
|
49
|
-
try {
|
|
50
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
51
|
-
} finally {
|
|
52
|
-
if (o) throw n;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return a;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function _arrayLikeToArray(arr, len) {
|
|
60
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
61
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
62
|
-
return arr2;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
66
|
-
if (!o) return;
|
|
67
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
68
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
69
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
70
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
71
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function _nonIterableRest() {
|
|
75
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _slicedToArray(arr, i) {
|
|
79
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function _typeof(o) {
|
|
83
|
-
"@babel/helpers - typeof";
|
|
84
|
-
|
|
85
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
86
|
-
return typeof o;
|
|
87
|
-
} : function (o) {
|
|
88
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
89
|
-
}, _typeof(o);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _toPrimitive(input, hint) {
|
|
93
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
94
|
-
var prim = input[Symbol.toPrimitive];
|
|
95
|
-
if (prim !== undefined) {
|
|
96
|
-
var res = prim.call(input, hint || "default");
|
|
97
|
-
if (_typeof(res) !== "object") return res;
|
|
98
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
99
|
-
}
|
|
100
|
-
return (hint === "string" ? String : Number)(input);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function _toPropertyKey(arg) {
|
|
104
|
-
var key = _toPrimitive(arg, "string");
|
|
105
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _defineProperty(obj, key, value) {
|
|
109
|
-
key = _toPropertyKey(key);
|
|
110
|
-
if (key in obj) {
|
|
111
|
-
Object.defineProperty(obj, key, {
|
|
112
|
-
value: value,
|
|
113
|
-
enumerable: true,
|
|
114
|
-
configurable: true,
|
|
115
|
-
writable: true
|
|
116
|
-
});
|
|
117
|
-
} else {
|
|
118
|
-
obj[key] = value;
|
|
119
|
-
}
|
|
120
|
-
return obj;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
var styles = "\n@layer primereact {\n .p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-confirm-popup:after, .p-confirm-popup:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-confirm-popup:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-confirm-popup:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n }\n \n .p-confirm-popup .p-confirm-popup-content {\n display: flex;\n align-items: center;\n }\n}\n";
|
|
124
|
-
var classes = {
|
|
125
|
-
root: function root(_ref) {
|
|
126
|
-
var context = _ref.context,
|
|
127
|
-
getPropValue = _ref.getPropValue;
|
|
128
|
-
return classNames('p-confirm-popup p-component', getPropValue('className'), {
|
|
129
|
-
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact.inputStyle === 'filled',
|
|
130
|
-
'p-ripple-disabled': context && context.ripple === false || PrimeReact.ripple === false
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
acceptButton: function acceptButton(_ref2) {
|
|
134
|
-
var getPropValue = _ref2.getPropValue;
|
|
135
|
-
return classNames('p-confirm-popup-accept p-button-sm', getPropValue('acceptClassName'));
|
|
136
|
-
},
|
|
137
|
-
rejectButton: function rejectButton(_ref3) {
|
|
138
|
-
var getPropValue = _ref3.getPropValue;
|
|
139
|
-
return classNames('p-confirm-popup-reject p-button-sm', {
|
|
140
|
-
'p-button-text': !getPropValue('rejectClassName')
|
|
141
|
-
}, getPropValue('rejectClassName'));
|
|
142
|
-
},
|
|
143
|
-
content: 'p-confirm-popup-content',
|
|
144
|
-
icon: 'p-confirm-popup-icon',
|
|
145
|
-
message: 'p-confirm-popup-message',
|
|
146
|
-
footer: 'p-confirm-popup-footer',
|
|
147
|
-
transition: 'p-connected-overlay'
|
|
148
|
-
};
|
|
149
|
-
var ConfirmPopupBase = ComponentBase.extend({
|
|
150
|
-
defaultProps: {
|
|
151
|
-
__TYPE: 'ConfirmPopup',
|
|
152
|
-
tagKey: undefined,
|
|
153
|
-
target: null,
|
|
154
|
-
visible: false,
|
|
155
|
-
message: null,
|
|
156
|
-
rejectLabel: null,
|
|
157
|
-
acceptLabel: null,
|
|
158
|
-
icon: null,
|
|
159
|
-
rejectIcon: null,
|
|
160
|
-
acceptIcon: null,
|
|
161
|
-
rejectClassName: null,
|
|
162
|
-
acceptClassName: null,
|
|
163
|
-
className: null,
|
|
164
|
-
style: null,
|
|
165
|
-
appendTo: null,
|
|
166
|
-
dismissable: true,
|
|
167
|
-
footer: null,
|
|
168
|
-
onShow: null,
|
|
169
|
-
onHide: null,
|
|
170
|
-
accept: null,
|
|
171
|
-
reject: null,
|
|
172
|
-
transitionOptions: null,
|
|
173
|
-
children: undefined,
|
|
174
|
-
closeOnEscape: true
|
|
175
|
-
},
|
|
176
|
-
css: {
|
|
177
|
-
classes: classes,
|
|
178
|
-
styles: styles
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
var usePrevious = function usePrevious(newValue) {
|
|
183
|
-
var ref = React.useRef(undefined);
|
|
184
|
-
React.useEffect(function () {
|
|
185
|
-
ref.current = newValue;
|
|
186
|
-
});
|
|
187
|
-
return ref.current;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
/* eslint-disable */
|
|
191
|
-
var useUnmountEffect = function useUnmountEffect(fn) {
|
|
192
|
-
return React.useEffect(function () {
|
|
193
|
-
return fn;
|
|
194
|
-
}, []);
|
|
195
|
-
};
|
|
196
|
-
/* eslint-enable */
|
|
197
|
-
|
|
198
|
-
/* eslint-disable */
|
|
199
|
-
var useEventListener = function useEventListener(_ref) {
|
|
200
|
-
var _ref$target = _ref.target,
|
|
201
|
-
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
202
|
-
type = _ref.type,
|
|
203
|
-
listener = _ref.listener,
|
|
204
|
-
options = _ref.options,
|
|
205
|
-
_ref$when = _ref.when,
|
|
206
|
-
when = _ref$when === void 0 ? true : _ref$when;
|
|
207
|
-
var targetRef = React.useRef(null);
|
|
208
|
-
var listenerRef = React.useRef(null);
|
|
209
|
-
var prevListener = usePrevious(listener);
|
|
210
|
-
var prevOptions = usePrevious(options);
|
|
211
|
-
var bind = function bind() {
|
|
212
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
213
|
-
if (ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
214
|
-
unbind();
|
|
215
|
-
(bindOptions.when || when) && (targetRef.current = DomHandler.getTargetElement(bindOptions.target));
|
|
216
|
-
}
|
|
217
|
-
if (!listenerRef.current && targetRef.current) {
|
|
218
|
-
listenerRef.current = function (event) {
|
|
219
|
-
return listener && listener(event);
|
|
220
|
-
};
|
|
221
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
var unbind = function unbind() {
|
|
225
|
-
if (listenerRef.current) {
|
|
226
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
227
|
-
listenerRef.current = null;
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
React.useEffect(function () {
|
|
231
|
-
if (when) {
|
|
232
|
-
targetRef.current = DomHandler.getTargetElement(target);
|
|
233
|
-
} else {
|
|
234
|
-
unbind();
|
|
235
|
-
targetRef.current = null;
|
|
236
|
-
}
|
|
237
|
-
}, [target, when]);
|
|
238
|
-
React.useEffect(function () {
|
|
239
|
-
// to properly compare functions we can implicitly converting the function to it's body's text as a String
|
|
240
|
-
if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
|
|
241
|
-
unbind();
|
|
242
|
-
when && bind();
|
|
243
|
-
}
|
|
244
|
-
}, [listener, options, when]);
|
|
245
|
-
useUnmountEffect(function () {
|
|
246
|
-
unbind();
|
|
247
|
-
});
|
|
248
|
-
return [bind, unbind];
|
|
249
|
-
};
|
|
250
|
-
/* eslint-enable */
|
|
251
|
-
|
|
252
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
253
|
-
var handleEsc = function handleEsc(event) {
|
|
254
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
255
|
-
event.stopImmediatePropagation();
|
|
256
|
-
callback(event);
|
|
257
|
-
}
|
|
258
|
-
return;
|
|
259
|
-
};
|
|
260
|
-
var _useEventListener = useEventListener({
|
|
261
|
-
type: 'keydown',
|
|
262
|
-
listener: handleEsc
|
|
263
|
-
}),
|
|
264
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
265
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
266
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
267
|
-
React.useEffect(function () {
|
|
268
|
-
if (!condition) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
if (!ref.current) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
bindKeyDownListener();
|
|
275
|
-
return function () {
|
|
276
|
-
unbindKeyDownListener();
|
|
277
|
-
};
|
|
278
|
-
});
|
|
279
|
-
return [ref, callback];
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
283
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
284
|
-
var confirmPopup = function confirmPopup() {
|
|
285
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
286
|
-
props = _objectSpread(_objectSpread({}, props), {
|
|
287
|
-
visible: props.visible === undefined ? true : props.visible
|
|
288
|
-
});
|
|
289
|
-
props.visible && OverlayService.emit('confirm-popup', props);
|
|
290
|
-
var show = function show() {
|
|
291
|
-
var updatedProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
292
|
-
OverlayService.emit('confirm-popup', _objectSpread(_objectSpread(_objectSpread({}, props), updatedProps), {
|
|
293
|
-
visible: true
|
|
294
|
-
}));
|
|
295
|
-
};
|
|
296
|
-
var hide = function hide() {
|
|
297
|
-
OverlayService.emit('confirm-popup', {
|
|
298
|
-
visible: false
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
|
-
return {
|
|
302
|
-
show: show,
|
|
303
|
-
hide: hide
|
|
304
|
-
};
|
|
305
|
-
};
|
|
306
|
-
var ConfirmPopup = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
307
|
-
var context = React.useContext(PrimeReactContext);
|
|
308
|
-
var props = ConfirmPopupBase.getProps(inProps, context);
|
|
309
|
-
var _React$useState = React.useState(props.visible),
|
|
310
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
311
|
-
visibleState = _React$useState2[0],
|
|
312
|
-
setVisibleState = _React$useState2[1];
|
|
313
|
-
var _React$useState3 = React.useState(false),
|
|
314
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
315
|
-
reshowState = _React$useState4[0],
|
|
316
|
-
setReshowState = _React$useState4[1];
|
|
317
|
-
var metaData = {
|
|
318
|
-
props: props,
|
|
319
|
-
state: {
|
|
320
|
-
visible: visibleState,
|
|
321
|
-
reshow: reshowState
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
var _ConfirmPopupBase$set = ConfirmPopupBase.setMetaData(metaData),
|
|
325
|
-
ptm = _ConfirmPopupBase$set.ptm,
|
|
326
|
-
cx = _ConfirmPopupBase$set.cx,
|
|
327
|
-
isUnstyled = _ConfirmPopupBase$set.isUnstyled;
|
|
328
|
-
useHandleStyle(ConfirmPopupBase.css.styles, isUnstyled, {
|
|
329
|
-
name: 'confirmpopup'
|
|
330
|
-
});
|
|
331
|
-
var overlayRef = React.useRef(null);
|
|
332
|
-
var acceptBtnRef = React.useRef(null);
|
|
333
|
-
var isPanelClicked = React.useRef(false);
|
|
334
|
-
var overlayEventListener = React.useRef(null);
|
|
335
|
-
var confirmProps = React.useRef(null);
|
|
336
|
-
var focusElementOnHide = React.useRef(null);
|
|
337
|
-
var isCallbackExecuting = React.useRef(false);
|
|
338
|
-
var getCurrentProps = function getCurrentProps() {
|
|
339
|
-
return confirmProps.current || props;
|
|
340
|
-
};
|
|
341
|
-
var getPropValue = function getPropValue(key) {
|
|
342
|
-
return (confirmProps.current || props)[key];
|
|
343
|
-
};
|
|
344
|
-
var callbackFromProp = function callbackFromProp(key) {
|
|
345
|
-
for (var _len = arguments.length, param = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
346
|
-
param[_key - 1] = arguments[_key];
|
|
347
|
-
}
|
|
348
|
-
return ObjectUtils.getPropValue(getPropValue(key), param);
|
|
349
|
-
};
|
|
350
|
-
var acceptLabel = getPropValue('acceptLabel') || localeOption('accept');
|
|
351
|
-
var rejectLabel = getPropValue('rejectLabel') || localeOption('reject');
|
|
352
|
-
useOnEscapeKey(overlayRef, props.dismissable && props.closeOnEscape, function (event) {
|
|
353
|
-
hide('hide');
|
|
354
|
-
});
|
|
355
|
-
var _useOverlayListener = useOverlayListener({
|
|
356
|
-
target: getPropValue('target'),
|
|
357
|
-
overlay: overlayRef,
|
|
358
|
-
listener: function listener(event, _ref) {
|
|
359
|
-
var type = _ref.type,
|
|
360
|
-
valid = _ref.valid;
|
|
361
|
-
if (valid) {
|
|
362
|
-
type === 'outside' ? props.dismissable && !isPanelClicked.current && hide('hide') : hide('hide');
|
|
363
|
-
}
|
|
364
|
-
isPanelClicked.current = false;
|
|
365
|
-
},
|
|
366
|
-
when: visibleState
|
|
367
|
-
}),
|
|
368
|
-
_useOverlayListener2 = _slicedToArray(_useOverlayListener, 2),
|
|
369
|
-
bindOverlayListener = _useOverlayListener2[0],
|
|
370
|
-
unbindOverlayListener = _useOverlayListener2[1];
|
|
371
|
-
var onPanelClick = function onPanelClick(event) {
|
|
372
|
-
isPanelClicked.current = true;
|
|
373
|
-
OverlayService.emit('overlay-click', {
|
|
374
|
-
originalEvent: event,
|
|
375
|
-
target: getPropValue('target')
|
|
376
|
-
});
|
|
377
|
-
};
|
|
378
|
-
var accept = function accept() {
|
|
379
|
-
if (!isCallbackExecuting.current) {
|
|
380
|
-
isCallbackExecuting.current = true;
|
|
381
|
-
callbackFromProp('accept');
|
|
382
|
-
hide('accept');
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
var reject = function reject() {
|
|
386
|
-
if (!isCallbackExecuting.current) {
|
|
387
|
-
isCallbackExecuting.current = true;
|
|
388
|
-
callbackFromProp('reject');
|
|
389
|
-
hide('reject');
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
var show = function show() {
|
|
393
|
-
// Remember the focused element before we opened the dialog
|
|
394
|
-
// so we can return focus to it once we close the dialog.
|
|
395
|
-
focusElementOnHide.current = document.activeElement;
|
|
396
|
-
setVisibleState(true);
|
|
397
|
-
setReshowState(false);
|
|
398
|
-
isCallbackExecuting.current = false;
|
|
399
|
-
overlayEventListener.current = function (e) {
|
|
400
|
-
!isOutsideClicked(e.target) && (isPanelClicked.current = true);
|
|
401
|
-
};
|
|
402
|
-
OverlayService.on('overlay-click', overlayEventListener.current);
|
|
403
|
-
};
|
|
404
|
-
var hide = function hide(result) {
|
|
405
|
-
setVisibleState(false);
|
|
406
|
-
OverlayService.off('overlay-click', overlayEventListener.current);
|
|
407
|
-
overlayEventListener.current = null;
|
|
408
|
-
if (result) {
|
|
409
|
-
callbackFromProp('onHide', result);
|
|
410
|
-
}
|
|
411
|
-
DomHandler.focus(focusElementOnHide.current);
|
|
412
|
-
focusElementOnHide.current = null;
|
|
413
|
-
};
|
|
414
|
-
var onEnter = function onEnter() {
|
|
415
|
-
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
416
|
-
DomHandler.addStyles(overlayRef.current, {
|
|
417
|
-
position: 'absolute',
|
|
418
|
-
top: '50%',
|
|
419
|
-
left: '50%',
|
|
420
|
-
marginTop: '10px'
|
|
421
|
-
});
|
|
422
|
-
align();
|
|
423
|
-
};
|
|
424
|
-
var onEntered = function onEntered() {
|
|
425
|
-
bindOverlayListener();
|
|
426
|
-
if (acceptBtnRef.current) {
|
|
427
|
-
acceptBtnRef.current.focus();
|
|
428
|
-
}
|
|
429
|
-
callbackFromProp('onShow');
|
|
430
|
-
};
|
|
431
|
-
var onExit = function onExit() {
|
|
432
|
-
unbindOverlayListener();
|
|
433
|
-
};
|
|
434
|
-
var onExited = function onExited() {
|
|
435
|
-
ZIndexUtils.clear(overlayRef.current);
|
|
436
|
-
isPanelClicked.current = false;
|
|
437
|
-
};
|
|
438
|
-
var align = function align() {
|
|
439
|
-
if (getPropValue('target')) {
|
|
440
|
-
DomHandler.absolutePosition(overlayRef.current, getPropValue('target'));
|
|
441
|
-
var containerOffset = DomHandler.getOffset(overlayRef.current);
|
|
442
|
-
var targetOffset = DomHandler.getOffset(getPropValue('target'));
|
|
443
|
-
var arrowLeft = 0;
|
|
444
|
-
if (containerOffset.left < targetOffset.left) {
|
|
445
|
-
arrowLeft = targetOffset.left - containerOffset.left;
|
|
446
|
-
}
|
|
447
|
-
overlayRef.current.style.setProperty('--overlayArrowLeft', "".concat(arrowLeft, "px"));
|
|
448
|
-
if (containerOffset.top < targetOffset.top) {
|
|
449
|
-
!isUnstyled() && DomHandler.addClass(overlayRef.current, 'p-confirm-popup-flipped');
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
var isOutsideClicked = function isOutsideClicked(target) {
|
|
454
|
-
return overlayRef && overlayRef.current && !(overlayRef.current.isSameNode(target) || overlayRef.current.contains(target));
|
|
455
|
-
};
|
|
456
|
-
var confirm = function confirm(updatedProps) {
|
|
457
|
-
if (updatedProps.tagKey === props.tagKey) {
|
|
458
|
-
var isVisibleChanged = visibleState !== updatedProps.visible;
|
|
459
|
-
var targetChanged = getPropValue('target') !== updatedProps.target;
|
|
460
|
-
if (targetChanged && !props.target) {
|
|
461
|
-
hide();
|
|
462
|
-
confirmProps.current = updatedProps;
|
|
463
|
-
setReshowState(true);
|
|
464
|
-
} else if (isVisibleChanged) {
|
|
465
|
-
confirmProps.current = updatedProps;
|
|
466
|
-
updatedProps.visible ? show() : hide();
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
React.useEffect(function () {
|
|
471
|
-
props.visible ? show() : hide();
|
|
472
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
473
|
-
}, [props.visible]);
|
|
474
|
-
React.useEffect(function () {
|
|
475
|
-
if (!props.target && !props.message) {
|
|
476
|
-
OverlayService.on('confirm-popup', confirm);
|
|
477
|
-
}
|
|
478
|
-
return function () {
|
|
479
|
-
OverlayService.off('confirm-popup', confirm);
|
|
480
|
-
};
|
|
481
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
482
|
-
}, [props.target]);
|
|
483
|
-
useUpdateEffect(function () {
|
|
484
|
-
reshowState && show();
|
|
485
|
-
}, [reshowState]);
|
|
486
|
-
useUnmountEffect$1(function () {
|
|
487
|
-
if (overlayEventListener.current) {
|
|
488
|
-
OverlayService.off('overlay-click', overlayEventListener.current);
|
|
489
|
-
overlayEventListener.current = null;
|
|
490
|
-
}
|
|
491
|
-
OverlayService.off('confirm-popup', confirm);
|
|
492
|
-
ZIndexUtils.clear(overlayRef.current);
|
|
493
|
-
});
|
|
494
|
-
React.useImperativeHandle(ref, function () {
|
|
495
|
-
return {
|
|
496
|
-
props: props,
|
|
497
|
-
confirm: confirm
|
|
498
|
-
};
|
|
499
|
-
});
|
|
500
|
-
var createContent = function createContent() {
|
|
501
|
-
var currentProps = getCurrentProps();
|
|
502
|
-
var message = ObjectUtils.getJSXElement(getPropValue('message'), currentProps);
|
|
503
|
-
var iconProps = mergeProps({
|
|
504
|
-
className: cx('icon')
|
|
505
|
-
}, ptm('icon'));
|
|
506
|
-
var icon = IconUtils.getJSXIcon(getPropValue('icon'), _objectSpread({}, iconProps), {
|
|
507
|
-
props: currentProps
|
|
508
|
-
});
|
|
509
|
-
var messageProps = mergeProps({
|
|
510
|
-
className: cx('message')
|
|
511
|
-
}, ptm('message'));
|
|
512
|
-
var contentProps = mergeProps({
|
|
513
|
-
className: cx('content')
|
|
514
|
-
}, ptm('content'));
|
|
515
|
-
return /*#__PURE__*/React.createElement("div", contentProps, icon, /*#__PURE__*/React.createElement("span", messageProps, message));
|
|
516
|
-
};
|
|
517
|
-
var createFooter = function createFooter() {
|
|
518
|
-
var acceptClassName = classNames('p-confirm-popup-accept p-button-sm', getPropValue('acceptClassName'));
|
|
519
|
-
var rejectClassName = classNames('p-confirm-popup-reject p-button-sm', {
|
|
520
|
-
'p-button-text': !getPropValue('rejectClassName')
|
|
521
|
-
}, getPropValue('rejectClassName'));
|
|
522
|
-
var footerProps = mergeProps({
|
|
523
|
-
className: cx('footer')
|
|
524
|
-
}, ptm('footer'));
|
|
525
|
-
var rejectButtonProps = mergeProps({
|
|
526
|
-
label: rejectLabel,
|
|
527
|
-
icon: getPropValue('rejectIcon'),
|
|
528
|
-
className: cx('rejectButton', {
|
|
529
|
-
getPropValue: getPropValue
|
|
530
|
-
}),
|
|
531
|
-
onClick: reject,
|
|
532
|
-
pt: ptm('rejectButton'),
|
|
533
|
-
unstyled: props.unstyled,
|
|
534
|
-
__parentMetadata: {
|
|
535
|
-
parent: metaData
|
|
536
|
-
}
|
|
537
|
-
});
|
|
538
|
-
var acceptButtonProps = mergeProps({
|
|
539
|
-
ref: acceptBtnRef,
|
|
540
|
-
label: acceptLabel,
|
|
541
|
-
icon: getPropValue('acceptIcon'),
|
|
542
|
-
className: cx('acceptButton', {
|
|
543
|
-
getPropValue: getPropValue
|
|
544
|
-
}),
|
|
545
|
-
onClick: accept,
|
|
546
|
-
pt: ptm('acceptButton'),
|
|
547
|
-
unstyled: props.unstyled,
|
|
548
|
-
__parentMetadata: {
|
|
549
|
-
parent: metaData
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
var content = /*#__PURE__*/React.createElement("div", footerProps, /*#__PURE__*/React.createElement(Button, rejectButtonProps), /*#__PURE__*/React.createElement(Button, acceptButtonProps));
|
|
553
|
-
if (getPropValue('footer')) {
|
|
554
|
-
var defaultContentOptions = {
|
|
555
|
-
accept: accept,
|
|
556
|
-
reject: reject,
|
|
557
|
-
className: 'p-confirm-popup-footer',
|
|
558
|
-
acceptClassName: acceptClassName,
|
|
559
|
-
rejectClassName: rejectClassName,
|
|
560
|
-
acceptLabel: acceptLabel,
|
|
561
|
-
rejectLabel: rejectLabel,
|
|
562
|
-
element: content,
|
|
563
|
-
props: getCurrentProps()
|
|
564
|
-
};
|
|
565
|
-
return ObjectUtils.getJSXElement(getPropValue('footer'), defaultContentOptions);
|
|
566
|
-
}
|
|
567
|
-
return content;
|
|
568
|
-
};
|
|
569
|
-
var createElement = function createElement() {
|
|
570
|
-
var content = createContent();
|
|
571
|
-
var footer = createFooter();
|
|
572
|
-
var rootProps = mergeProps({
|
|
573
|
-
ref: overlayRef,
|
|
574
|
-
id: getPropValue('id'),
|
|
575
|
-
className: cx('root', {
|
|
576
|
-
context: context,
|
|
577
|
-
getPropValue: getPropValue
|
|
578
|
-
}),
|
|
579
|
-
style: getPropValue('style'),
|
|
580
|
-
onClick: onPanelClick
|
|
581
|
-
}, ConfirmPopupBase.getOtherProps(props), ptm('root'));
|
|
582
|
-
var transitionProps = mergeProps({
|
|
583
|
-
classNames: cx('transition'),
|
|
584
|
-
"in": visibleState,
|
|
585
|
-
timeout: {
|
|
586
|
-
enter: 120,
|
|
587
|
-
exit: 100
|
|
588
|
-
},
|
|
589
|
-
options: getPropValue('transitionOptions'),
|
|
590
|
-
unmountOnExit: true,
|
|
591
|
-
onEnter: onEnter,
|
|
592
|
-
onEntered: onEntered,
|
|
593
|
-
onExit: onExit,
|
|
594
|
-
onExited: onExited
|
|
595
|
-
}, ptm('transition'));
|
|
596
|
-
return /*#__PURE__*/React.createElement(CSSTransition, _extends({
|
|
597
|
-
nodeRef: overlayRef
|
|
598
|
-
}, transitionProps), /*#__PURE__*/React.createElement("div", rootProps, content, footer));
|
|
599
|
-
};
|
|
600
|
-
var element = createElement();
|
|
601
|
-
return /*#__PURE__*/React.createElement(Portal, {
|
|
602
|
-
element: element,
|
|
603
|
-
appendTo: getPropValue('appendTo'),
|
|
604
|
-
visible: getPropValue('visible')
|
|
605
|
-
});
|
|
606
|
-
}));
|
|
607
|
-
ConfirmPopup.displayName = 'ConfirmPopup';
|
|
608
|
-
|
|
609
|
-
export { ConfirmPopup, confirmPopup };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import t,{PrimeReactContext as n}from"primereact/api";import{ComponentBase as r,useHandleStyle as o}from"primereact/componentbase";import{CSSTransition as i}from"primereact/csstransition";import{useUpdateEffect as u,useMatchMedia as a,useEventListener as c,useResizeListener as l,useMountEffect as s,useUnmountEffect as m}from"primereact/hooks";import{Portal as p}from"primereact/portal";import{classNames as f,mergeProps as d,DomHandler as b,IconUtils as y,ObjectUtils as h,UniqueComponentId as v,ZIndexUtils as g}from"primereact/utils";import{AngleRightIcon as x}from"primereact/icons/angleright";import{Ripple as S}from"primereact/ripple";function O(){return O=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},O.apply(this,arguments)}function E(e){if(Array.isArray(e))return e}function N(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],c=!0,l=!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)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}function w(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 I(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function P(){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 M(e,t){return E(e)||N(e,t)||I(e,t)||P()}var k=r.extend({defaultProps:{__TYPE:"ContextMenu",id:null,model:null,style:null,className:null,global:!1,autoZIndex:!0,baseZIndex:0,breakpoint:void 0,scrollHeight:"400px",appendTo:null,transitionOptions:null,onShow:null,onHide:null,submenuIcon:null,children:void 0},css:{classes:{root:function(e){var n=e.context;return f("p-contextmenu p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===t.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===t.ripple})},menu:function(e){return f({"p-submenu-list":!e.menuProps.root})},menuitem:function(e){return f("p-menuitem",{"p-menuitem-active":e.active},e.item.className)},action:function(e){return f("p-menuitem-link",{"p-disabled":e.item.disabled})},icon:"p-menuitem-icon",submenuIcon:"p-submenu-icon",label:"p-menuitem-text",separator:"p-menu-separator",transition:"p-contextmenu",submenuTransition:"p-contextmenusub"},styles:"\n@layer primereact {\n .p-contextmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n .p-contextmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n }\n \n .p-contextmenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n \n .p-contextmenu .p-menuitem-text {\n line-height: 1;\n }\n \n .p-contextmenu .p-menuitem {\n position: relative;\n }\n \n .p-contextmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n }\n \n .p-contextmenu-enter {\n opacity: 0;\n }\n \n .p-contextmenu-enter-active {\n opacity: 1;\n transition: opacity 250ms;\n }\n}\n"}});function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function C(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function H(e){var t=C(e,"string");return"symbol"===j(t)?t:String(t)}function T(e,t,n){return(t=H(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(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 A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=e.memo((function(t){var n=M(e.useState(null),2),r=n[0],o=n[1],a=e.useRef(null),c=t.root||!t.resetMenu,l=t.ptm,s=t.cx,m=function(e,n){return l(n,{hostName:t.hostName,context:{active:r===e}})};!0===t.resetMenu&&null!==r&&o(null);var p=function(e,n){n.disabled||t.isMobileMode?e.preventDefault():o(n)},f=function(e,n){n.disabled?e.preventDefault():(n.url||e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),t.isMobileMode&&n.items&&o(r&&n===r?null:n),n.items||t.onLeafClick(e))},v=function(){if(!t.isMobileMode){var e=a.current.parentElement,n=b.getOffset(e),r=b.getViewport(),o=a.current.offsetParent?a.current.offsetWidth:b.getHiddenElementOuterWidth(a.current),i=b.getOuterWidth(e.children[0]),u=parseInt(n.top,10)+a.current.offsetHeight-b.getWindowScrollTop();a.current.style.top=u>r.height?r.height-u+"px":"0px",a.current.style.left=parseInt(n.left,10)+i+o>r.width-b.calculateScrollbarWidth()?-1*o+"px":i+"px"}};u((function(){c&&v()}));var g=function(n){var r=t.id+"_separator_"+n,o=d({id:r,key:r,className:s("separator"),role:"separator"},l("separator",{hostName:t.hostName}));return e.createElement("li",o)},E=function(n,o){return n.items?e.createElement(L,{id:t.id+"_"+o,hostName:t.hostName,menuProps:t.menuProps,model:n.items,resetMenu:n!==r,onLeafClick:t.onLeafClick,isMobileMode:t.isMobileMode,submenuIcon:t.submenuIcon,ptm:l,cx:s}):null},N=function(n,o){var i;if(!1===n.visible)return null;var u=r===n,a=n.id||t.id+"_"+o,c=d({className:s("icon")},m(n,"icon")),l=y.getJSXIcon(n.icon,A({},c),{props:t.menuProps}),b=d({className:s("submenuIcon")},m(n,"submenuIcon")),v=d({className:s("label")},m(n,"label")),g=n.items&&y.getJSXIcon(t.submenuIcon||e.createElement(x,b),A({},b),{props:t.menuProps}),O=n.label&&e.createElement("span",v,n.label),N=E(n,o),w=d({href:n.url||"#",className:s("action",{item:n}),target:n.target,onClick:function(e){return f(e,n)},role:"menuitem","aria-haspopup":null!=n.items,"aria-disabled":n.disabled},m(n,"action")),I=e.createElement("a",w,l,O,g,e.createElement(S,null));if(n.template){var P={onClick:function(e){return f(e,n)},className:"p-menuitem-link",labelClassName:"p-menuitem-text",iconClassName:"p-menuitem-icon",submenuIconClassName:submenuIconClassName,element:I,props:t,active:u};I=h.getJSXElement(n.template,n,P)}var M=d((T(i={id:a,key:a,role:"none",className:s("menuitem",{item:n,active:u}),style:n.style},"key",a),T(i,"onMouseEnter",(function(e){return p(e,n)})),i),m(n,"menuitem"));return e.createElement("li",M,I,N)},w=t.model?t.model.map((function(e,t){return e.separator?g(t):N(e,t)})):null,I=d({className:s("menu",{menuProps:t})},l("menu",{hostName:t.hostName})),P=d({classNames:s("submenuTransition"),in:c,timeout:{enter:0,exit:0},unmountOnExit:!0,onEnter:function(){v()}},l("menu.transition",{hostName:t.hostName}));return e.createElement(i,O({nodeRef:a},P),e.createElement("ul",O({ref:a},I),w))}));L.displayName="ContextMenuSub";var R=e.memo(e.forwardRef((function(r,y){var h=e.useContext(n),x=k.getProps(r,h),S=M(e.useState(x.id),2),E=S[0],N=S[1],w=M(e.useState(!1),2),I=w[0],P=w[1],j=M(e.useState(!1),2),C=j[0],H=j[1],T=M(e.useState(!1),2),D=T[0],A=T[1],R=M(e.useState(null),2),W=R[0],Z=R[1],_=k.setMetaData({props:x,state:{id:E,visible:I,reshow:C,resetMenu:D,attributeSelector:W}}),X=_.ptm,z=_.cx;o(k.css.styles,_.isUnstyled,{name:"contextmenu"});var J=e.useRef(null),U=e.useRef(null),V=e.useRef(null),Y=a("screen and (max-width: ".concat(x.breakpoint,")"),!!x.breakpoint),$=M(c({type:"click",listener:function(e){se(e)&&2!==e.button&&(re(e),A(!0))}}),2),q=$[0],B=$[1],F=M(c({type:"contextmenu",when:x.global,listener:function(e){ne(e)}}),1)[0],G=M(l({listener:function(e){I&&!b.isTouchDevice()&&re(e)}}),2),K=G[0],Q=G[1],ee=function(){if(!V.current){V.current=b.createInlineStyle(h&&h.nonce||t.nonce);var e="".concat(W),n="\n@media screen and (max-width: ".concat(x.breakpoint,") {\n .p-contextmenu[").concat(e,"] > ul {\n max-height: ").concat(x.scrollHeight,";\n overflow: ").concat(x.scrollHeight?"auto":"",";\n }\n\n .p-contextmenu[").concat(e,"] .p-submenu-list {\n position: relative;\n }\n\n .p-contextmenu[").concat(e,"] .p-menuitem-active > .p-submenu-list {\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n padding: 0 0 0 calc(var(--inline-spacing) * 2); /* @todo */\n }\n\n .p-contextmenu[").concat(e,"] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-contextmenu[").concat(e,'] .p-submenu-icon:before {\n content: "\\e930";\n }\n}\n');V.current.innerHTML=n}},te=function(){V.current=b.removeInlineStyle(V.current)},ne=function(e){e.stopPropagation(),e.preventDefault(),U.current=e,I?H(!0):(P(!0),x.onShow&&x.onShow(U.current))},re=function(e){U.current=e,P(!1),H(!1),x.onHide&&x.onHide(U.current)},oe=function(){b.addStyles(J.current,{position:"absolute"}),x.autoZIndex&&g.set("menu",J.current,h&&h.autoZIndex||t.autoZIndex,x.baseZIndex||h&&h.zIndex.menu||t.zIndex.menu),ce(U.current),W&&x.breakpoint&&(J.current.setAttribute(W,""),ee())},ie=function(){me()},ue=function(){pe(),g.clear(J.current)},ae=function(){g.clear(J.current),te()},ce=function(e){if(e){var t=e.pageX+1,n=e.pageY+1,r=J.current.offsetParent?J.current.offsetWidth:b.getHiddenElementOuterWidth(J.current),o=J.current.offsetParent?J.current.offsetHeight:b.getHiddenElementOuterHeight(J.current),i=b.getViewport();t+r-document.body.scrollLeft>i.width&&(t-=r),n+o-document.body.scrollTop>i.height&&(n-=o),t<document.body.scrollLeft&&(t=document.body.scrollLeft),n<document.body.scrollTop&&(n=document.body.scrollTop),J.current.style.left=t+"px",J.current.style.top=n+"px"}},le=function(e){A(!0),re(e),e.stopPropagation()},se=function(e){return J&&J.current&&!(J.current.isSameNode(e.target)||J.current.contains(e.target))},me=function(){K(),q()},pe=function(){Q(),B()};s((function(){var e=v();!E&&N(e),x.breakpoint&&!W&&Z(e)})),u((function(){x.global&&F()}),[x.global]),u((function(){return W&&J.current&&(J.current.setAttribute(W,""),ee()),function(){te()}}),[W,x.breakpoint]),u((function(){I?(P(!1),H(!1),A(!0)):C||I||!D||ne(U.current)}),[C]),m((function(){g.clear(J.current)})),e.useImperativeHandle(y,(function(){return{props:x,show:ne,hide:re,getElement:function(){return J.current}}}));var fe,de,be=(fe=d({id:x.id,className:f(x.className,z("root",{context:h})),style:x.style,onClick:function(e){A(!1)},onMouseEnter:function(e){A(!1)}},k.getOtherProps(x),X("root")),de=d({classNames:z("transition"),in:I,timeout:{enter:250,exit:0},options:x.transitionOptions,unmountOnExit:!0,onEnter:oe,onEntered:ie,onExit:ue,onExited:ae},X("transition")),e.createElement(i,O({nodeRef:J},de),e.createElement("div",O({ref:J},fe),e.createElement(L,{hostName:"ContextMenu",id:E,menuProps:x,model:x.model,root:!0,resetMenu:D,onLeafClick:le,isMobileMode:Y,submenuIcon:x.submenuIcon,ptm:X,cx:z}))));return e.createElement(p,{element:be,appendTo:x.appendTo})})));R.displayName="ContextMenu";export{R as ContextMenu};
|