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,715 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PrimeReact, { PrimeReactContext } from 'primereact/api';
|
|
4
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
-
import { useMatchMedia, useEventListener, useResizeListener, useMountEffect, useUpdateEffect } from 'primereact/hooks';
|
|
6
|
-
import { AngleDownIcon } from 'primereact/icons/angledown';
|
|
7
|
-
import { AngleRightIcon } from 'primereact/icons/angleright';
|
|
8
|
-
import { BarsIcon } from 'primereact/icons/bars';
|
|
9
|
-
import { Ripple } from 'primereact/ripple';
|
|
10
|
-
import { classNames, UniqueComponentId, DomHandler, ZIndexUtils, mergeProps, ObjectUtils, 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 _typeof(o) {
|
|
28
|
-
"@babel/helpers - typeof";
|
|
29
|
-
|
|
30
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
31
|
-
return typeof o;
|
|
32
|
-
} : function (o) {
|
|
33
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
34
|
-
}, _typeof(o);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function _toPrimitive(input, hint) {
|
|
38
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
39
|
-
var prim = input[Symbol.toPrimitive];
|
|
40
|
-
if (prim !== undefined) {
|
|
41
|
-
var res = prim.call(input, hint || "default");
|
|
42
|
-
if (_typeof(res) !== "object") return res;
|
|
43
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
44
|
-
}
|
|
45
|
-
return (hint === "string" ? String : Number)(input);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _toPropertyKey(arg) {
|
|
49
|
-
var key = _toPrimitive(arg, "string");
|
|
50
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function _defineProperty(obj, key, value) {
|
|
54
|
-
key = _toPropertyKey(key);
|
|
55
|
-
if (key in obj) {
|
|
56
|
-
Object.defineProperty(obj, key, {
|
|
57
|
-
value: value,
|
|
58
|
-
enumerable: true,
|
|
59
|
-
configurable: true,
|
|
60
|
-
writable: true
|
|
61
|
-
});
|
|
62
|
-
} else {
|
|
63
|
-
obj[key] = value;
|
|
64
|
-
}
|
|
65
|
-
return obj;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _arrayWithHoles(arr) {
|
|
69
|
-
if (Array.isArray(arr)) return arr;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _iterableToArrayLimit(r, l) {
|
|
73
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
74
|
-
if (null != t) {
|
|
75
|
-
var e,
|
|
76
|
-
n,
|
|
77
|
-
i,
|
|
78
|
-
u,
|
|
79
|
-
a = [],
|
|
80
|
-
f = !0,
|
|
81
|
-
o = !1;
|
|
82
|
-
try {
|
|
83
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
84
|
-
if (Object(t) !== t) return;
|
|
85
|
-
f = !1;
|
|
86
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
87
|
-
} catch (r) {
|
|
88
|
-
o = !0, n = r;
|
|
89
|
-
} finally {
|
|
90
|
-
try {
|
|
91
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
92
|
-
} finally {
|
|
93
|
-
if (o) throw n;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return a;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _arrayLikeToArray(arr, len) {
|
|
101
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
102
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
103
|
-
return arr2;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
107
|
-
if (!o) return;
|
|
108
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
109
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
110
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
111
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
112
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function _nonIterableRest() {
|
|
116
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _slicedToArray(arr, i) {
|
|
120
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
var classes = {
|
|
124
|
-
root: function root(_ref) {
|
|
125
|
-
var props = _ref.props,
|
|
126
|
-
mobileActiveState = _ref.mobileActiveState;
|
|
127
|
-
return classNames('p-megamenu p-component', {
|
|
128
|
-
'p-megamenu-horizontal': props.orientation === 'horizontal',
|
|
129
|
-
'p-megamenu-vertical': props.orientation === 'vertical',
|
|
130
|
-
'p-megamenu-mobile-active': mobileActiveState
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
separator: 'p-menu-separator',
|
|
134
|
-
submenuIcon: 'p-submenu-icon',
|
|
135
|
-
action: function action(_ref2) {
|
|
136
|
-
var item = _ref2.item;
|
|
137
|
-
return classNames('p-menuitem-link', {
|
|
138
|
-
'p-disabled': item.disabled
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
submenuItem: 'p-menuitem',
|
|
142
|
-
submenuHeader: function submenuHeader(_ref3) {
|
|
143
|
-
var submenu = _ref3.submenu;
|
|
144
|
-
return classNames('p-megamenu-submenu-header', {
|
|
145
|
-
'p-disabled': submenu.disabled
|
|
146
|
-
});
|
|
147
|
-
},
|
|
148
|
-
submenu: 'p-megamenu-submenu',
|
|
149
|
-
panel: 'p-megamenu-panel',
|
|
150
|
-
grid: 'p-megamenu-grid',
|
|
151
|
-
icon: 'p-menuitem-icon',
|
|
152
|
-
label: 'p-menuitem-text',
|
|
153
|
-
column: function column(_ref4) {
|
|
154
|
-
var category = _ref4.category;
|
|
155
|
-
var length = category.items ? category.items.length : 0;
|
|
156
|
-
var columnClass;
|
|
157
|
-
switch (length) {
|
|
158
|
-
case 2:
|
|
159
|
-
columnClass = 'p-megamenu-col-6';
|
|
160
|
-
break;
|
|
161
|
-
case 3:
|
|
162
|
-
columnClass = 'p-megamenu-col-4';
|
|
163
|
-
break;
|
|
164
|
-
case 4:
|
|
165
|
-
columnClass = 'p-megamenu-col-3';
|
|
166
|
-
break;
|
|
167
|
-
case 6:
|
|
168
|
-
columnClass = 'p-megamenu-col-2';
|
|
169
|
-
break;
|
|
170
|
-
default:
|
|
171
|
-
columnClass = 'p-megamenu-col-12';
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
return columnClass;
|
|
175
|
-
},
|
|
176
|
-
headerAction: function headerAction(_ref5) {
|
|
177
|
-
var category = _ref5.category;
|
|
178
|
-
return classNames('p-menuitem-link', {
|
|
179
|
-
'p-disabled': category.disabled
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
menuButton: 'p-megamenu-button',
|
|
183
|
-
menuitem: function menuitem(_ref6) {
|
|
184
|
-
var category = _ref6.category,
|
|
185
|
-
activeItemState = _ref6.activeItemState;
|
|
186
|
-
return classNames('p-menuitem', {
|
|
187
|
-
'p-menuitem-active': category === activeItemState
|
|
188
|
-
});
|
|
189
|
-
},
|
|
190
|
-
menubar: 'p-megamenu-root-list',
|
|
191
|
-
menu: 'p-megamenu-root-list',
|
|
192
|
-
start: 'p-megamenu-start',
|
|
193
|
-
end: 'p-megamenu-end'
|
|
194
|
-
};
|
|
195
|
-
var styles = "\n@layer primereact {\n .p-megamenu {\n display: flex;\n }\n \n .p-megamenu-root-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n .p-megamenu-root-list > .p-menuitem {\n position: relative;\n }\n \n .p-megamenu .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-megamenu .p-menuitem-text {\n line-height: 1;\n }\n \n .p-megamenu-panel {\n display: none;\n position: absolute;\n width: auto;\n z-index: 1;\n }\n \n .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n display: block;\n }\n \n .p-megamenu-submenu {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n /* Horizontal */\n .p-megamenu-horizontal {\n align-items: center;\n }\n \n .p-megamenu-horizontal .p-megamenu-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-megamenu-horizontal .p-megamenu-custom,\n .p-megamenu-horizontal .p-megamenu-end {\n margin-left: auto;\n align-self: center;\n }\n \n /* Vertical */\n .p-megamenu-vertical {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n left: 100%;\n top: 0;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-link > .p-submenu-icon {\n margin-left: auto;\n }\n \n .p-megamenu-grid {\n display: flex;\n }\n \n .p-megamenu-col-2,\n .p-megamenu-col-3,\n .p-megamenu-col-4,\n .p-megamenu-col-6,\n .p-megamenu-col-12 {\n flex: 0 0 auto;\n padding: 0.5rem;\n }\n \n .p-megamenu-col-2 {\n width: 16.6667%;\n }\n \n .p-megamenu-col-3 {\n width: 25%;\n }\n \n .p-megamenu-col-4 {\n width: 33.3333%;\n }\n \n .p-megamenu-col-6 {\n width: 50%;\n }\n \n .p-megamenu-col-12 {\n width: 100%;\n }\n \n .p-megamenu-button {\n display: none;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n }\n}\n";
|
|
196
|
-
var MegaMenuBase = ComponentBase.extend({
|
|
197
|
-
defaultProps: {
|
|
198
|
-
__TYPE: 'MegaMenu',
|
|
199
|
-
id: null,
|
|
200
|
-
model: null,
|
|
201
|
-
style: null,
|
|
202
|
-
className: null,
|
|
203
|
-
orientation: 'horizontal',
|
|
204
|
-
breakpoint: undefined,
|
|
205
|
-
scrollHeight: '400px',
|
|
206
|
-
start: null,
|
|
207
|
-
submenuIcon: null,
|
|
208
|
-
menuIcon: null,
|
|
209
|
-
end: null,
|
|
210
|
-
children: undefined
|
|
211
|
-
},
|
|
212
|
-
css: {
|
|
213
|
-
classes: classes,
|
|
214
|
-
styles: styles
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
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; }
|
|
219
|
-
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; }
|
|
220
|
-
var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
221
|
-
var context = React.useContext(PrimeReactContext);
|
|
222
|
-
var props = MegaMenuBase.getProps(inProps, context);
|
|
223
|
-
var _React$useState = React.useState(props.id),
|
|
224
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
225
|
-
idState = _React$useState2[0],
|
|
226
|
-
setIdState = _React$useState2[1];
|
|
227
|
-
var _React$useState3 = React.useState(null),
|
|
228
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
229
|
-
activeItemState = _React$useState4[0],
|
|
230
|
-
setActiveItemState = _React$useState4[1];
|
|
231
|
-
var _React$useState5 = React.useState(null),
|
|
232
|
-
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
233
|
-
attributeSelectorState = _React$useState6[0],
|
|
234
|
-
setAttributeSelectorState = _React$useState6[1];
|
|
235
|
-
var _React$useState7 = React.useState(false),
|
|
236
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
237
|
-
mobileActiveState = _React$useState8[0],
|
|
238
|
-
setMobileActiveState = _React$useState8[1];
|
|
239
|
-
var elementRef = React.useRef(null);
|
|
240
|
-
var styleElementRef = React.useRef(null);
|
|
241
|
-
var menuButtonRef = React.useRef(null);
|
|
242
|
-
var horizontal = props.orientation === 'horizontal';
|
|
243
|
-
var vertical = props.orientation === 'vertical';
|
|
244
|
-
var isMobileMode = useMatchMedia("screen and (max-width: ".concat(props.breakpoint, ")"), !!props.breakpoint);
|
|
245
|
-
var _MegaMenuBase$setMeta = MegaMenuBase.setMetaData({
|
|
246
|
-
props: props,
|
|
247
|
-
state: {
|
|
248
|
-
id: idState,
|
|
249
|
-
activeItem: activeItemState,
|
|
250
|
-
attributeSelector: attributeSelectorState,
|
|
251
|
-
mobileActive: mobileActiveState
|
|
252
|
-
}
|
|
253
|
-
}),
|
|
254
|
-
ptm = _MegaMenuBase$setMeta.ptm,
|
|
255
|
-
cx = _MegaMenuBase$setMeta.cx,
|
|
256
|
-
isUnstyled = _MegaMenuBase$setMeta.isUnstyled;
|
|
257
|
-
useHandleStyle(MegaMenuBase.css.styles, isUnstyled, {
|
|
258
|
-
name: 'megamenu'
|
|
259
|
-
});
|
|
260
|
-
var getPTOptions = function getPTOptions(item, key, index) {
|
|
261
|
-
return ptm(key, {
|
|
262
|
-
context: {
|
|
263
|
-
active: activeItemState === item,
|
|
264
|
-
item: item,
|
|
265
|
-
index: index
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
};
|
|
269
|
-
var _useEventListener = useEventListener({
|
|
270
|
-
type: 'click',
|
|
271
|
-
listener: function listener(event) {
|
|
272
|
-
if ((!isMobileMode || mobileActiveState) && isOutsideClicked(event)) {
|
|
273
|
-
setActiveItemState(null);
|
|
274
|
-
setMobileActiveState(false);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}),
|
|
278
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 1),
|
|
279
|
-
bindDocumentClickListener = _useEventListener2[0];
|
|
280
|
-
var _useResizeListener = useResizeListener({
|
|
281
|
-
listener: function listener() {
|
|
282
|
-
if (!isMobileMode || mobileActiveState) {
|
|
283
|
-
setActiveItemState(null);
|
|
284
|
-
setMobileActiveState(false);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}),
|
|
288
|
-
_useResizeListener2 = _slicedToArray(_useResizeListener, 1),
|
|
289
|
-
bindDocumentResizeListener = _useResizeListener2[0];
|
|
290
|
-
var onLeafClick = function onLeafClick(event, item) {
|
|
291
|
-
if (item.disabled) {
|
|
292
|
-
event.preventDefault();
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
if (!item.url) {
|
|
296
|
-
event.preventDefault();
|
|
297
|
-
}
|
|
298
|
-
if (item.command) {
|
|
299
|
-
item.command({
|
|
300
|
-
originalEvent: event,
|
|
301
|
-
item: item
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
setActiveItemState(null);
|
|
305
|
-
setMobileActiveState(false);
|
|
306
|
-
};
|
|
307
|
-
var onCategoryMouseEnter = function onCategoryMouseEnter(event, item) {
|
|
308
|
-
if (item.disabled || isMobileMode) {
|
|
309
|
-
event.preventDefault();
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
if (activeItemState) {
|
|
313
|
-
setActiveItemState(item);
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
var onCategoryClick = function onCategoryClick(event, item) {
|
|
317
|
-
if (item.disabled) {
|
|
318
|
-
event.preventDefault();
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
if (!item.url) {
|
|
322
|
-
event.preventDefault();
|
|
323
|
-
}
|
|
324
|
-
if (item.command) {
|
|
325
|
-
item.command({
|
|
326
|
-
originalEvent: event,
|
|
327
|
-
item: props.item
|
|
328
|
-
});
|
|
329
|
-
event.preventDefault();
|
|
330
|
-
}
|
|
331
|
-
if (item.items) {
|
|
332
|
-
activeItemState && activeItemState === item ? setActiveItemState(null) : setActiveItemState(item);
|
|
333
|
-
event.preventDefault();
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
var onCategoryKeyDown = function onCategoryKeyDown(event, item) {
|
|
337
|
-
var listItem = event.currentTarget.parentElement;
|
|
338
|
-
switch (event.which) {
|
|
339
|
-
//down
|
|
340
|
-
case 40:
|
|
341
|
-
horizontal ? expandMenu(item) : navigateToNextItem(listItem);
|
|
342
|
-
event.preventDefault();
|
|
343
|
-
break;
|
|
344
|
-
|
|
345
|
-
//up
|
|
346
|
-
case 38:
|
|
347
|
-
vertical ? navigateToPrevItem(listItem) : item.items && item === activeItemState && collapseMenu();
|
|
348
|
-
event.preventDefault();
|
|
349
|
-
break;
|
|
350
|
-
|
|
351
|
-
//right
|
|
352
|
-
case 39:
|
|
353
|
-
horizontal ? navigateToNextItem(listItem) : expandMenu(item);
|
|
354
|
-
event.preventDefault();
|
|
355
|
-
break;
|
|
356
|
-
|
|
357
|
-
//left
|
|
358
|
-
case 37:
|
|
359
|
-
horizontal ? navigateToPrevItem(listItem) : item.items && item === activeItemState && collapseMenu();
|
|
360
|
-
event.preventDefault();
|
|
361
|
-
break;
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
var expandMenu = function expandMenu(item) {
|
|
365
|
-
if (item.items) {
|
|
366
|
-
setActiveItemState(item);
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
var collapseMenu = function collapseMenu(item) {
|
|
370
|
-
setActiveItemState(null);
|
|
371
|
-
};
|
|
372
|
-
var toggle = function toggle(event) {
|
|
373
|
-
event.preventDefault();
|
|
374
|
-
setMobileActiveState(function (prevMobileActive) {
|
|
375
|
-
return !prevMobileActive;
|
|
376
|
-
});
|
|
377
|
-
setActiveItemState(null);
|
|
378
|
-
};
|
|
379
|
-
var findNextItem = function findNextItem(item) {
|
|
380
|
-
var nextItem = item.nextElementSibling;
|
|
381
|
-
return nextItem ? DomHandler.getAttribute(nextItem, '[data-p-disabled="true"]') || !DomHandler.getAttribute(nextItem, '[data-pc-section="menuitem"]') ? findNextItem(nextItem) : nextItem : null;
|
|
382
|
-
};
|
|
383
|
-
var findPrevItem = function findPrevItem(item) {
|
|
384
|
-
var prevItem = item.previousElementSibling;
|
|
385
|
-
return prevItem ? DomHandler.getAttribute(prevItem, '[data-p-disabled="true"]') || !DomHandler.getAttribute(prevItem, '[data-pc-section="menuitem"]') ? findPrevItem(prevItem) : prevItem : null;
|
|
386
|
-
};
|
|
387
|
-
var navigateToNextItem = function navigateToNextItem(listItem) {
|
|
388
|
-
var nextItem = findNextItem(listItem);
|
|
389
|
-
nextItem && nextItem.children[0].focus();
|
|
390
|
-
};
|
|
391
|
-
var navigateToPrevItem = function navigateToPrevItem(listItem) {
|
|
392
|
-
var prevItem = findPrevItem(listItem);
|
|
393
|
-
prevItem && prevItem.children[0].focus();
|
|
394
|
-
};
|
|
395
|
-
var isOutsideClicked = function isOutsideClicked(event) {
|
|
396
|
-
return elementRef.current && !(elementRef.current.isSameNode(event.target) || elementRef.current.contains(event.target) || menuButtonRef.current && menuButtonRef.current.contains(event.target));
|
|
397
|
-
};
|
|
398
|
-
React.useImperativeHandle(ref, function () {
|
|
399
|
-
return {
|
|
400
|
-
props: props,
|
|
401
|
-
getElement: function getElement() {
|
|
402
|
-
return elementRef.current;
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
});
|
|
406
|
-
useMountEffect(function () {
|
|
407
|
-
var uniqueId = UniqueComponentId();
|
|
408
|
-
!idState && setIdState(uniqueId);
|
|
409
|
-
if (props.breakpoint) {
|
|
410
|
-
!attributeSelectorState && setAttributeSelectorState(uniqueId);
|
|
411
|
-
}
|
|
412
|
-
bindDocumentClickListener();
|
|
413
|
-
bindDocumentResizeListener();
|
|
414
|
-
});
|
|
415
|
-
useUpdateEffect(function () {
|
|
416
|
-
var currentPanel = DomHandler.findSingle(elementRef.current, '.p-menuitem-active > .p-megamenu-panel');
|
|
417
|
-
if (activeItemState && !isMobileMode) {
|
|
418
|
-
ZIndexUtils.set('menu', currentPanel, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['menu'] || PrimeReact.zIndex['menu']);
|
|
419
|
-
}
|
|
420
|
-
if (isMobileMode) {
|
|
421
|
-
currentPanel && currentPanel.previousElementSibling.scrollIntoView({
|
|
422
|
-
block: 'nearest',
|
|
423
|
-
inline: 'nearest'
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
return function () {
|
|
427
|
-
ZIndexUtils.clear(currentPanel);
|
|
428
|
-
};
|
|
429
|
-
}, [activeItemState]);
|
|
430
|
-
var createSeparator = function createSeparator(index) {
|
|
431
|
-
var key = idState + '_separator__' + index;
|
|
432
|
-
var separatorProps = mergeProps({
|
|
433
|
-
id: key,
|
|
434
|
-
key: key,
|
|
435
|
-
className: cx('separator'),
|
|
436
|
-
role: 'separator'
|
|
437
|
-
}, ptm('separator'));
|
|
438
|
-
return /*#__PURE__*/React.createElement("li", separatorProps);
|
|
439
|
-
};
|
|
440
|
-
var createSubmenuIcon = function createSubmenuIcon(item) {
|
|
441
|
-
if (item.items) {
|
|
442
|
-
var submenuIconProps = mergeProps({
|
|
443
|
-
className: cx('submenuIcon')
|
|
444
|
-
}, ptm('submenuIcon'));
|
|
445
|
-
var icon = vertical ? props.submenuIcon || /*#__PURE__*/React.createElement(AngleRightIcon, submenuIconProps) : props.submenuIcon || /*#__PURE__*/React.createElement(AngleDownIcon, submenuIconProps);
|
|
446
|
-
var submenuIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, submenuIconProps), {
|
|
447
|
-
props: props
|
|
448
|
-
});
|
|
449
|
-
return submenuIcon;
|
|
450
|
-
}
|
|
451
|
-
return null;
|
|
452
|
-
};
|
|
453
|
-
var createSubmenuItem = function createSubmenuItem(item, index) {
|
|
454
|
-
if (item.visible === false) {
|
|
455
|
-
return null;
|
|
456
|
-
}
|
|
457
|
-
if (item.separator) {
|
|
458
|
-
return createSeparator(index);
|
|
459
|
-
} else {
|
|
460
|
-
var key = item.id || idState + '_' + index;
|
|
461
|
-
var linkClassName = classNames('p-menuitem-link', {
|
|
462
|
-
'p-disabled': item.disabled
|
|
463
|
-
});
|
|
464
|
-
var iconProps = mergeProps({
|
|
465
|
-
className: classNames(item.icon, cx('icon'))
|
|
466
|
-
}, ptm('icon'));
|
|
467
|
-
var labelProps = mergeProps({
|
|
468
|
-
className: cx('label')
|
|
469
|
-
}, ptm('label'));
|
|
470
|
-
var iconClassName = classNames(item.icon, 'p-menuitem-icon');
|
|
471
|
-
var icon = IconUtils.getJSXIcon(item.icon, _objectSpread({}, iconProps), {
|
|
472
|
-
props: props
|
|
473
|
-
});
|
|
474
|
-
var label = item.label && /*#__PURE__*/React.createElement("span", labelProps, item.label);
|
|
475
|
-
var actionProps = mergeProps({
|
|
476
|
-
href: item.url || '#',
|
|
477
|
-
className: cx('action', {
|
|
478
|
-
item: item
|
|
479
|
-
}),
|
|
480
|
-
target: item.target,
|
|
481
|
-
onClick: function onClick(event) {
|
|
482
|
-
return onLeafClick(event, item);
|
|
483
|
-
},
|
|
484
|
-
role: 'menuitem',
|
|
485
|
-
'aria-disabled': item.disabled
|
|
486
|
-
}, getPTOptions(item, 'action', index));
|
|
487
|
-
var submenuItemProps = mergeProps({
|
|
488
|
-
key: key,
|
|
489
|
-
id: key,
|
|
490
|
-
className: classNames(item.className, cx('submenuItem')),
|
|
491
|
-
style: item.style,
|
|
492
|
-
role: 'none'
|
|
493
|
-
}, getPTOptions(item, 'submenuItem', index));
|
|
494
|
-
var content = /*#__PURE__*/React.createElement("a", actionProps, icon, label, /*#__PURE__*/React.createElement(Ripple, null));
|
|
495
|
-
if (item.template) {
|
|
496
|
-
var defaultContentOptions = {
|
|
497
|
-
onClick: function onClick(event) {
|
|
498
|
-
return onLeafClick(event, item);
|
|
499
|
-
},
|
|
500
|
-
className: linkClassName,
|
|
501
|
-
labelClassName: 'p-menuitem-text',
|
|
502
|
-
iconClassName: iconClassName,
|
|
503
|
-
element: content,
|
|
504
|
-
props: props
|
|
505
|
-
};
|
|
506
|
-
content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);
|
|
507
|
-
}
|
|
508
|
-
return /*#__PURE__*/React.createElement("li", submenuItemProps, content);
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
var createSubmenu = function createSubmenu(submenu, index) {
|
|
512
|
-
if (submenu.visible === false) {
|
|
513
|
-
return null;
|
|
514
|
-
}
|
|
515
|
-
var items = submenu.items.map(createSubmenuItem);
|
|
516
|
-
var key = submenu.id || idState + '_sub_' + index;
|
|
517
|
-
var submenuHeaderProps = mergeProps({
|
|
518
|
-
id: key,
|
|
519
|
-
key: key,
|
|
520
|
-
className: classNames(submenu.className, cx('submenuHeader', {
|
|
521
|
-
submenu: submenu
|
|
522
|
-
})),
|
|
523
|
-
style: submenu.style,
|
|
524
|
-
role: 'presentation',
|
|
525
|
-
'data-p-disabled': submenu.disabled
|
|
526
|
-
}, ptm('submenuHeader'));
|
|
527
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
528
|
-
key: key
|
|
529
|
-
}, /*#__PURE__*/React.createElement("li", submenuHeaderProps, submenu.label), items);
|
|
530
|
-
};
|
|
531
|
-
var createSubmenus = function createSubmenus(column) {
|
|
532
|
-
return column.map(createSubmenu);
|
|
533
|
-
};
|
|
534
|
-
var createColumn = function createColumn(category, column, index) {
|
|
535
|
-
var key = category.label + '_column_' + index;
|
|
536
|
-
var submenus = createSubmenus(column);
|
|
537
|
-
var columnProps = mergeProps({
|
|
538
|
-
key: key,
|
|
539
|
-
className: cx('column', {
|
|
540
|
-
category: category
|
|
541
|
-
})
|
|
542
|
-
}, ptm('column'));
|
|
543
|
-
var submenuProps = mergeProps({
|
|
544
|
-
className: cx('submenu'),
|
|
545
|
-
style: {
|
|
546
|
-
display: activeItemState === category ? 'block' : 'none'
|
|
547
|
-
},
|
|
548
|
-
role: 'menu'
|
|
549
|
-
}, ptm('submenu'));
|
|
550
|
-
return /*#__PURE__*/React.createElement("div", columnProps, /*#__PURE__*/React.createElement("ul", submenuProps, submenus));
|
|
551
|
-
};
|
|
552
|
-
var createColumns = function createColumns(category) {
|
|
553
|
-
if (category.items) {
|
|
554
|
-
return category.items.map(function (column, index) {
|
|
555
|
-
return createColumn(category, column, index);
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
return null;
|
|
559
|
-
};
|
|
560
|
-
var createCategoryPanel = function createCategoryPanel(category) {
|
|
561
|
-
if (category.items) {
|
|
562
|
-
var columns = createColumns(category);
|
|
563
|
-
var panelProps = mergeProps({
|
|
564
|
-
className: cx('panel')
|
|
565
|
-
}, ptm('panel'));
|
|
566
|
-
var gridProps = mergeProps({
|
|
567
|
-
className: cx('grid')
|
|
568
|
-
}, ptm('grid'));
|
|
569
|
-
return /*#__PURE__*/React.createElement("div", panelProps, /*#__PURE__*/React.createElement("div", gridProps, columns));
|
|
570
|
-
}
|
|
571
|
-
return null;
|
|
572
|
-
};
|
|
573
|
-
var createStyle = function createStyle() {
|
|
574
|
-
if (!styleElementRef.current) {
|
|
575
|
-
styleElementRef.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce);
|
|
576
|
-
var selector = "".concat(attributeSelectorState);
|
|
577
|
-
var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-megamenu[").concat(selector, "] > .p-megamenu-root-list .p-menuitem-active .p-megamenu-panel {\n position: relative;\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n background: inherit;\n }\n\n .p-megamenu[").concat(selector, "] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-megamenu[").concat(selector, "] .p-megamenu-grid {\n flex-wrap: wrap;\n }\n\n ").concat(horizontal ? "\n.p-megamenu[".concat(selector, "] .p-megamenu-button {\n display: flex;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-horizontal {\n position: relative;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-horizontal .p-megamenu-root-list {\n display: none;\n}\n\n.p-megamenu-horizontal[").concat(selector, "] div[class*=\"p-megamenu-col-\"] {\n width: auto;\n flex: 1;\n padding: 0;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-mobile-active .p-megamenu-root-list {\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n ") : '', "\n\n ").concat(vertical ? "\n.p-megamenu-vertical[".concat(selector, "] {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-megamenu-root-list {\n max-height: ").concat(props.scrollHeight, ";\n overflow: ").concat(props.scrollHeight ? 'auto' : '', ";\n}\n.p-megamenu-vertical[").concat(selector, "] div[class*=\"p-megamenu-col-\"] {\n width: 100%;\n padding: 0;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-megamenu-submenu {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(selector, "] div[class*=\"p-megamenu-col-\"] .p-megamenu-submenu-header {\n background: inherit;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-submenu-icon:before {\n content: \"\\e930\";\n}\n ") : '', "\n}\n");
|
|
578
|
-
styleElementRef.current.innerHTML = innerHTML;
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
var destroyStyle = function destroyStyle() {
|
|
582
|
-
styleElementRef.current = DomHandler.removeInlineStyle(styleElementRef.current);
|
|
583
|
-
};
|
|
584
|
-
useUpdateEffect(function () {
|
|
585
|
-
if (attributeSelectorState && elementRef.current) {
|
|
586
|
-
elementRef.current.setAttribute(attributeSelectorState, '');
|
|
587
|
-
createStyle();
|
|
588
|
-
}
|
|
589
|
-
return function () {
|
|
590
|
-
destroyStyle();
|
|
591
|
-
};
|
|
592
|
-
}, [attributeSelectorState, props.breakpoint]);
|
|
593
|
-
var createCategory = function createCategory(category, index) {
|
|
594
|
-
var iconProps = mergeProps({
|
|
595
|
-
className: cx('icon')
|
|
596
|
-
}, getPTOptions(category, 'icon', index));
|
|
597
|
-
var icon = IconUtils.getJSXIcon(category.icon, _objectSpread({}, iconProps), {
|
|
598
|
-
props: props
|
|
599
|
-
});
|
|
600
|
-
var labelProps = mergeProps({
|
|
601
|
-
className: cx('label')
|
|
602
|
-
}, getPTOptions(category, 'label', index));
|
|
603
|
-
var label = category.label && /*#__PURE__*/React.createElement("span", labelProps, category.label);
|
|
604
|
-
var itemContent = category.template ? ObjectUtils.getJSXElement(category.template, category) : null;
|
|
605
|
-
var submenuIcon = createSubmenuIcon(category);
|
|
606
|
-
var panel = createCategoryPanel(category);
|
|
607
|
-
var headerActionProps = mergeProps({
|
|
608
|
-
href: category.url || '#',
|
|
609
|
-
className: cx('headerAction', {
|
|
610
|
-
category: category
|
|
611
|
-
}),
|
|
612
|
-
target: category.target,
|
|
613
|
-
onClick: function onClick(e) {
|
|
614
|
-
return onCategoryClick(e, category);
|
|
615
|
-
},
|
|
616
|
-
onKeyDown: function onKeyDown(e) {
|
|
617
|
-
return onCategoryKeyDown(e, category);
|
|
618
|
-
},
|
|
619
|
-
role: 'menuitem',
|
|
620
|
-
'aria-haspopup': category.items != null,
|
|
621
|
-
'data-p-disabled': category.disabled
|
|
622
|
-
}, getPTOptions(category, 'headerAction', index));
|
|
623
|
-
var key = category.id || idState + '_cat_' + index;
|
|
624
|
-
var menuItemProps = mergeProps({
|
|
625
|
-
key: key,
|
|
626
|
-
id: key,
|
|
627
|
-
className: classNames(category.className, cx('menuitem', {
|
|
628
|
-
category: category,
|
|
629
|
-
activeItemState: activeItemState
|
|
630
|
-
})),
|
|
631
|
-
style: category.style,
|
|
632
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
633
|
-
return onCategoryMouseEnter(e, category);
|
|
634
|
-
},
|
|
635
|
-
role: 'none',
|
|
636
|
-
'data-p-disabled': category.disabled || false
|
|
637
|
-
}, getPTOptions(category, 'menuitem', index));
|
|
638
|
-
return /*#__PURE__*/React.createElement("li", menuItemProps, /*#__PURE__*/React.createElement("a", headerActionProps, icon, label, itemContent, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null)), panel);
|
|
639
|
-
};
|
|
640
|
-
var createMenu = function createMenu() {
|
|
641
|
-
var menuProps = mergeProps({
|
|
642
|
-
className: cx('menu'),
|
|
643
|
-
role: 'menubar'
|
|
644
|
-
}, ptm('menu'));
|
|
645
|
-
if (props.model) {
|
|
646
|
-
return /*#__PURE__*/React.createElement("ul", menuProps, props.model.map(function (item, index) {
|
|
647
|
-
return createCategory(item, index);
|
|
648
|
-
}));
|
|
649
|
-
}
|
|
650
|
-
return null;
|
|
651
|
-
};
|
|
652
|
-
var createStartContent = function createStartContent() {
|
|
653
|
-
var startProps = mergeProps({
|
|
654
|
-
className: cx('start')
|
|
655
|
-
}, ptm('start'));
|
|
656
|
-
if (props.start) {
|
|
657
|
-
var _start = ObjectUtils.getJSXElement(props.start, props);
|
|
658
|
-
return /*#__PURE__*/React.createElement("div", startProps, _start);
|
|
659
|
-
}
|
|
660
|
-
return null;
|
|
661
|
-
};
|
|
662
|
-
var createEndContent = function createEndContent() {
|
|
663
|
-
var endProps = mergeProps({
|
|
664
|
-
className: cx('end')
|
|
665
|
-
}, ptm('end'));
|
|
666
|
-
if (props.end) {
|
|
667
|
-
var _end = ObjectUtils.getJSXElement(props.end, props);
|
|
668
|
-
return /*#__PURE__*/React.createElement("div", endProps, _end);
|
|
669
|
-
}
|
|
670
|
-
return null;
|
|
671
|
-
};
|
|
672
|
-
var createMenuButton = function createMenuButton() {
|
|
673
|
-
if (props.orientation === 'vertical' || props.model && props.model.length < 1) {
|
|
674
|
-
return null;
|
|
675
|
-
}
|
|
676
|
-
var menuButtonProps = mergeProps({
|
|
677
|
-
className: cx('menuButton'),
|
|
678
|
-
href: '#',
|
|
679
|
-
role: 'button',
|
|
680
|
-
tabIndex: 0,
|
|
681
|
-
onClick: function onClick(e) {
|
|
682
|
-
return toggle(e);
|
|
683
|
-
}
|
|
684
|
-
}, ptm('menuButton'));
|
|
685
|
-
var menuButtonIconProps = mergeProps(ptm('menuButtonIcon'));
|
|
686
|
-
var icon = props.menuIcon || /*#__PURE__*/React.createElement(BarsIcon, menuButtonIconProps);
|
|
687
|
-
var menuIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, menuButtonIconProps), {
|
|
688
|
-
props: props
|
|
689
|
-
});
|
|
690
|
-
/* eslint-disable */
|
|
691
|
-
var button = /*#__PURE__*/React.createElement("a", _extends({
|
|
692
|
-
ref: menuButtonRef
|
|
693
|
-
}, menuButtonProps), menuIcon);
|
|
694
|
-
/* eslint-enable */
|
|
695
|
-
|
|
696
|
-
return button;
|
|
697
|
-
};
|
|
698
|
-
var rootProps = mergeProps({
|
|
699
|
-
className: classNames(props.className, cx('root', {
|
|
700
|
-
mobileActiveState: mobileActiveState
|
|
701
|
-
})),
|
|
702
|
-
style: props.style
|
|
703
|
-
}, MegaMenuBase.getOtherProps(props), ptm('root'));
|
|
704
|
-
var menu = createMenu();
|
|
705
|
-
var start = createStartContent();
|
|
706
|
-
var end = createEndContent();
|
|
707
|
-
var menuButton = createMenuButton();
|
|
708
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
709
|
-
id: props.id,
|
|
710
|
-
ref: elementRef
|
|
711
|
-
}, rootProps), start, menuButton, menu, end);
|
|
712
|
-
}));
|
|
713
|
-
MegaMenu.displayName = 'MegaMenu';
|
|
714
|
-
|
|
715
|
-
export { MegaMenu };
|