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
package/listbox/listbox.esm.mjs
DELETED
|
@@ -1,809 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { PrimeReactContext, FilterService, localeOption } from 'primereact/api';
|
|
4
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
-
import { useMountEffect } from 'primereact/hooks';
|
|
6
|
-
import { Tooltip } from 'primereact/tooltip';
|
|
7
|
-
import { classNames, mergeProps, IconUtils, ObjectUtils, DomHandler } from 'primereact/utils';
|
|
8
|
-
import { VirtualScroller } from 'primereact/virtualscroller';
|
|
9
|
-
import { SearchIcon } from 'primereact/icons/search';
|
|
10
|
-
import { InputText } from 'primereact/inputtext';
|
|
11
|
-
import { Ripple } from 'primereact/ripple';
|
|
12
|
-
|
|
13
|
-
function _extends() {
|
|
14
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
15
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
16
|
-
var source = arguments[i];
|
|
17
|
-
for (var key in source) {
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19
|
-
target[key] = source[key];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return target;
|
|
24
|
-
};
|
|
25
|
-
return _extends.apply(this, arguments);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function _typeof(o) {
|
|
29
|
-
"@babel/helpers - typeof";
|
|
30
|
-
|
|
31
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
32
|
-
return typeof o;
|
|
33
|
-
} : function (o) {
|
|
34
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
35
|
-
}, _typeof(o);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _toPrimitive(input, hint) {
|
|
39
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
40
|
-
var prim = input[Symbol.toPrimitive];
|
|
41
|
-
if (prim !== undefined) {
|
|
42
|
-
var res = prim.call(input, hint || "default");
|
|
43
|
-
if (_typeof(res) !== "object") return res;
|
|
44
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
45
|
-
}
|
|
46
|
-
return (hint === "string" ? String : Number)(input);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function _toPropertyKey(arg) {
|
|
50
|
-
var key = _toPrimitive(arg, "string");
|
|
51
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _defineProperty(obj, key, value) {
|
|
55
|
-
key = _toPropertyKey(key);
|
|
56
|
-
if (key in obj) {
|
|
57
|
-
Object.defineProperty(obj, key, {
|
|
58
|
-
value: value,
|
|
59
|
-
enumerable: true,
|
|
60
|
-
configurable: true,
|
|
61
|
-
writable: true
|
|
62
|
-
});
|
|
63
|
-
} else {
|
|
64
|
-
obj[key] = value;
|
|
65
|
-
}
|
|
66
|
-
return obj;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function _arrayLikeToArray$1(arr, len) {
|
|
70
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
71
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
72
|
-
return arr2;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function _arrayWithoutHoles(arr) {
|
|
76
|
-
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function _iterableToArray(iter) {
|
|
80
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function _unsupportedIterableToArray$1(o, minLen) {
|
|
84
|
-
if (!o) return;
|
|
85
|
-
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
86
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
87
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
88
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
89
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _nonIterableSpread() {
|
|
93
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function _toConsumableArray(arr) {
|
|
97
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _arrayWithHoles(arr) {
|
|
101
|
-
if (Array.isArray(arr)) return arr;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _iterableToArrayLimit(r, l) {
|
|
105
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
106
|
-
if (null != t) {
|
|
107
|
-
var e,
|
|
108
|
-
n,
|
|
109
|
-
i,
|
|
110
|
-
u,
|
|
111
|
-
a = [],
|
|
112
|
-
f = !0,
|
|
113
|
-
o = !1;
|
|
114
|
-
try {
|
|
115
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
116
|
-
if (Object(t) !== t) return;
|
|
117
|
-
f = !1;
|
|
118
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
119
|
-
} catch (r) {
|
|
120
|
-
o = !0, n = r;
|
|
121
|
-
} finally {
|
|
122
|
-
try {
|
|
123
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
124
|
-
} finally {
|
|
125
|
-
if (o) throw n;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return a;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function _nonIterableRest() {
|
|
133
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function _slicedToArray(arr, i) {
|
|
137
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
var classes = {
|
|
141
|
-
itemGroup: 'p-listbox-item-group',
|
|
142
|
-
emptyMessage: 'p-listbox-empty-message',
|
|
143
|
-
list: function list(_ref) {
|
|
144
|
-
var props = _ref.props,
|
|
145
|
-
options = _ref.options;
|
|
146
|
-
return props.virtualScrollerOptions ? classNames('p-listbox-list', options.className) : 'p-listbox-list';
|
|
147
|
-
},
|
|
148
|
-
wrapper: function wrapper(_ref2) {
|
|
149
|
-
var props = _ref2.props;
|
|
150
|
-
return classNames('p-listbox-list-wrapper', props.listClassName);
|
|
151
|
-
},
|
|
152
|
-
root: function root(_ref3) {
|
|
153
|
-
var props = _ref3.props;
|
|
154
|
-
return classNames('p-listbox p-component', {
|
|
155
|
-
'p-disabled': props.disabled
|
|
156
|
-
}, props.className);
|
|
157
|
-
},
|
|
158
|
-
item: function item(_ref4) {
|
|
159
|
-
var props = _ref4.props;
|
|
160
|
-
return classNames('p-listbox-item', {
|
|
161
|
-
'p-highlight': props.selected,
|
|
162
|
-
'p-disabled': props.disabled
|
|
163
|
-
}, props.option.className);
|
|
164
|
-
},
|
|
165
|
-
filterContainer: 'p-listbox-filter-container',
|
|
166
|
-
filterIcon: 'p-listbox-filter-icon',
|
|
167
|
-
filterInput: 'p-listbox-filter',
|
|
168
|
-
header: 'p-listbox-header'
|
|
169
|
-
};
|
|
170
|
-
var styles = "\n@layer primereact {\n .p-listbox-list-wrapper {\n overflow: auto;\n }\n \n .p-listbox-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n \n .p-listbox-item {\n cursor: pointer;\n position: relative;\n overflow: hidden;\n }\n \n .p-listbox-filter-container {\n position: relative;\n }\n \n .p-listbox-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-listbox-filter {\n width: 100%;\n }\n}\n";
|
|
171
|
-
var inlineStyles = {
|
|
172
|
-
itemGroup: function itemGroup(_ref5) {
|
|
173
|
-
var scrollerOptions = _ref5.scrollerOptions;
|
|
174
|
-
return {
|
|
175
|
-
height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
|
|
176
|
-
};
|
|
177
|
-
},
|
|
178
|
-
list: function list(_ref6) {
|
|
179
|
-
var options = _ref6.options,
|
|
180
|
-
props = _ref6.props;
|
|
181
|
-
return props.virtualScrollerOptions ? options.style : undefined;
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
var ListBoxBase = ComponentBase.extend({
|
|
185
|
-
defaultProps: {
|
|
186
|
-
__TYPE: 'ListBox',
|
|
187
|
-
className: null,
|
|
188
|
-
dataKey: null,
|
|
189
|
-
disabled: null,
|
|
190
|
-
emptyFilterMessage: null,
|
|
191
|
-
emptyMessage: null,
|
|
192
|
-
filter: false,
|
|
193
|
-
filterIcon: null,
|
|
194
|
-
filterBy: null,
|
|
195
|
-
filterInputProps: null,
|
|
196
|
-
filterLocale: undefined,
|
|
197
|
-
filterMatchMode: 'contains',
|
|
198
|
-
filterPlaceholder: null,
|
|
199
|
-
filterTemplate: null,
|
|
200
|
-
filterValue: null,
|
|
201
|
-
id: null,
|
|
202
|
-
itemTemplate: null,
|
|
203
|
-
listClassName: null,
|
|
204
|
-
listStyle: null,
|
|
205
|
-
metaKeySelection: false,
|
|
206
|
-
multiple: false,
|
|
207
|
-
onChange: null,
|
|
208
|
-
onFilterValueChange: null,
|
|
209
|
-
optionDisabled: null,
|
|
210
|
-
optionGroupChildren: null,
|
|
211
|
-
optionGroupLabel: null,
|
|
212
|
-
optionGroupTemplate: null,
|
|
213
|
-
optionLabel: null,
|
|
214
|
-
optionValue: null,
|
|
215
|
-
options: null,
|
|
216
|
-
style: null,
|
|
217
|
-
tabIndex: 0,
|
|
218
|
-
tooltip: null,
|
|
219
|
-
tooltipOptions: null,
|
|
220
|
-
value: null,
|
|
221
|
-
virtualScrollerOptions: null,
|
|
222
|
-
children: undefined
|
|
223
|
-
},
|
|
224
|
-
css: {
|
|
225
|
-
classes: classes,
|
|
226
|
-
styles: styles,
|
|
227
|
-
inlineStyles: inlineStyles
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
232
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
233
|
-
var ListBoxHeader = /*#__PURE__*/React.memo(function (props) {
|
|
234
|
-
var _props$ptCallbacks = props.ptCallbacks,
|
|
235
|
-
ptm = _props$ptCallbacks.ptm,
|
|
236
|
-
cx = _props$ptCallbacks.cx;
|
|
237
|
-
var getPTOptions = function getPTOptions(key, options) {
|
|
238
|
-
return ptm(key, _objectSpread$1({
|
|
239
|
-
hostName: props.hostName
|
|
240
|
-
}, options));
|
|
241
|
-
};
|
|
242
|
-
var filterOptions = {
|
|
243
|
-
filter: function filter(e) {
|
|
244
|
-
return onFilter(e);
|
|
245
|
-
},
|
|
246
|
-
reset: function reset() {
|
|
247
|
-
return props.resetFilter();
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
var onFilter = function onFilter(event) {
|
|
251
|
-
if (props.onFilter) {
|
|
252
|
-
props.onFilter({
|
|
253
|
-
originalEvent: event,
|
|
254
|
-
value: event.target.value
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
var createHeader = function createHeader() {
|
|
259
|
-
var filterIconProps = mergeProps({
|
|
260
|
-
className: cx('filterIcon')
|
|
261
|
-
}, getPTOptions('filterIcon'));
|
|
262
|
-
var icon = props.filterIcon || /*#__PURE__*/React.createElement(SearchIcon, filterIconProps);
|
|
263
|
-
var filterIcon = IconUtils.getJSXIcon(icon, _objectSpread$1({}, filterIconProps), {
|
|
264
|
-
props: props
|
|
265
|
-
});
|
|
266
|
-
var headerProps = mergeProps({
|
|
267
|
-
className: cx('header')
|
|
268
|
-
}, getPTOptions('header'));
|
|
269
|
-
var filterContainerProps = mergeProps({
|
|
270
|
-
className: cx('filterContainer')
|
|
271
|
-
}, getPTOptions('filterContainer'));
|
|
272
|
-
var content = /*#__PURE__*/React.createElement("div", filterContainerProps, /*#__PURE__*/React.createElement(InputText, _extends({
|
|
273
|
-
type: "text",
|
|
274
|
-
value: props.filter,
|
|
275
|
-
onChange: onFilter,
|
|
276
|
-
className: cx('filterInput'),
|
|
277
|
-
disabled: props.disabled,
|
|
278
|
-
placeholder: props.filterPlaceholder
|
|
279
|
-
}, props.filterInputProps, {
|
|
280
|
-
pt: ptm('filterInput'),
|
|
281
|
-
unstyled: props.unstyled,
|
|
282
|
-
__parentMetadata: {
|
|
283
|
-
parent: props.metaData
|
|
284
|
-
}
|
|
285
|
-
})), filterIcon);
|
|
286
|
-
if (props.filterTemplate) {
|
|
287
|
-
var defaultContentOptions = {
|
|
288
|
-
className: 'p-listbox-filter-container',
|
|
289
|
-
element: content,
|
|
290
|
-
filterOptions: filterOptions,
|
|
291
|
-
filterInputChange: onFilter,
|
|
292
|
-
filterIconClassName: 'p-dropdown-filter-icon',
|
|
293
|
-
props: props
|
|
294
|
-
};
|
|
295
|
-
content = ObjectUtils.getJSXElement(props.filterTemplate, defaultContentOptions);
|
|
296
|
-
}
|
|
297
|
-
return /*#__PURE__*/React.createElement("div", headerProps, content);
|
|
298
|
-
};
|
|
299
|
-
var content = createHeader();
|
|
300
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, content);
|
|
301
|
-
});
|
|
302
|
-
ListBoxHeader.displayName = 'ListBoxHeader';
|
|
303
|
-
|
|
304
|
-
var ListBoxItem = /*#__PURE__*/React.memo(function (props) {
|
|
305
|
-
var _props$ptCallbacks = props.ptCallbacks,
|
|
306
|
-
ptm = _props$ptCallbacks.ptm,
|
|
307
|
-
cx = _props$ptCallbacks.cx;
|
|
308
|
-
var getPTOptions = function getPTOptions(key) {
|
|
309
|
-
return ptm(key, {
|
|
310
|
-
hostName: props.hostName,
|
|
311
|
-
context: {
|
|
312
|
-
selected: props.selected,
|
|
313
|
-
disabled: props.disabled
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
};
|
|
317
|
-
var onClick = function onClick(event) {
|
|
318
|
-
if (props.onClick) {
|
|
319
|
-
props.onClick({
|
|
320
|
-
originalEvent: event,
|
|
321
|
-
option: props.option
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
event.preventDefault();
|
|
325
|
-
};
|
|
326
|
-
var onTouchEnd = function onTouchEnd(event) {
|
|
327
|
-
if (props.onTouchEnd) {
|
|
328
|
-
props.onTouchEnd({
|
|
329
|
-
originalEvent: event,
|
|
330
|
-
option: props.option
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
var onKeyDown = function onKeyDown(event) {
|
|
335
|
-
var item = event.currentTarget;
|
|
336
|
-
switch (event.which) {
|
|
337
|
-
//down
|
|
338
|
-
case 40:
|
|
339
|
-
var nextItem = findNextItem(item);
|
|
340
|
-
nextItem && nextItem.focus();
|
|
341
|
-
event.preventDefault();
|
|
342
|
-
break;
|
|
343
|
-
|
|
344
|
-
//up
|
|
345
|
-
case 38:
|
|
346
|
-
var prevItem = findPrevItem(item);
|
|
347
|
-
prevItem && prevItem.focus();
|
|
348
|
-
event.preventDefault();
|
|
349
|
-
break;
|
|
350
|
-
|
|
351
|
-
//enter
|
|
352
|
-
case 13:
|
|
353
|
-
onClick(event);
|
|
354
|
-
event.preventDefault();
|
|
355
|
-
break;
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
var findNextItem = function findNextItem(item) {
|
|
359
|
-
var nextItem = item.nextElementSibling;
|
|
360
|
-
return nextItem ? DomHandler.hasClass(nextItem, 'p-disabled') || DomHandler.hasClass(nextItem, 'p-listbox-item-group') ? findNextItem(nextItem) : nextItem : null;
|
|
361
|
-
};
|
|
362
|
-
var findPrevItem = function findPrevItem(item) {
|
|
363
|
-
var prevItem = item.previousElementSibling;
|
|
364
|
-
return prevItem ? DomHandler.hasClass(prevItem, 'p-disabled') || DomHandler.hasClass(prevItem, 'p-listbox-item-group') ? findPrevItem(prevItem) : prevItem : null;
|
|
365
|
-
};
|
|
366
|
-
var content = props.template ? ObjectUtils.getJSXElement(props.template, props.option) : props.label;
|
|
367
|
-
var itemProps = mergeProps({
|
|
368
|
-
className: cx('item', {
|
|
369
|
-
props: props
|
|
370
|
-
}),
|
|
371
|
-
style: props.style,
|
|
372
|
-
onClick: onClick,
|
|
373
|
-
onTouchEnd: onTouchEnd,
|
|
374
|
-
onKeyDown: onKeyDown,
|
|
375
|
-
tabIndex: '-1',
|
|
376
|
-
'aria-label': props.label,
|
|
377
|
-
key: props.label,
|
|
378
|
-
role: 'option',
|
|
379
|
-
'aria-selected': props.selected,
|
|
380
|
-
'aria-disabled': props.disabled
|
|
381
|
-
}, getPTOptions('item'));
|
|
382
|
-
return /*#__PURE__*/React.createElement("li", itemProps, content, /*#__PURE__*/React.createElement(Ripple, null));
|
|
383
|
-
});
|
|
384
|
-
ListBoxItem.displayName = 'ListBoxItem';
|
|
385
|
-
|
|
386
|
-
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; }
|
|
387
|
-
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; }
|
|
388
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
389
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
390
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
391
|
-
var ListBox = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
392
|
-
var context = React.useContext(PrimeReactContext);
|
|
393
|
-
var props = ListBoxBase.getProps(inProps, context);
|
|
394
|
-
var _React$useState = React.useState(''),
|
|
395
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
396
|
-
filterValueState = _React$useState2[0],
|
|
397
|
-
setFilterValueState = _React$useState2[1];
|
|
398
|
-
var elementRef = React.useRef(null);
|
|
399
|
-
var virtualScrollerRef = React.useRef(null);
|
|
400
|
-
var optionTouched = React.useRef(false);
|
|
401
|
-
var filteredValue = (props.onFilterValueChange ? props.filterValue : filterValueState) || '';
|
|
402
|
-
var hasFilter = filteredValue && filteredValue.trim().length > 0;
|
|
403
|
-
var metaData = {
|
|
404
|
-
props: props,
|
|
405
|
-
state: {
|
|
406
|
-
filterValue: filteredValue
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
var ptCallbacks = ListBoxBase.setMetaData(metaData);
|
|
410
|
-
useHandleStyle(ListBoxBase.css.styles, ptCallbacks.isUnstyled, {
|
|
411
|
-
name: 'listbox'
|
|
412
|
-
});
|
|
413
|
-
var onOptionSelect = function onOptionSelect(event) {
|
|
414
|
-
var option = event.option;
|
|
415
|
-
if (props.disabled || isOptionDisabled(option)) {
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
props.multiple ? onOptionSelectMultiple(event.originalEvent, option) : onOptionSelectSingle(event.originalEvent, option);
|
|
419
|
-
optionTouched.current = false;
|
|
420
|
-
};
|
|
421
|
-
var onOptionTouchEnd = function onOptionTouchEnd() {
|
|
422
|
-
if (props.disabled) {
|
|
423
|
-
return;
|
|
424
|
-
}
|
|
425
|
-
optionTouched.current = true;
|
|
426
|
-
};
|
|
427
|
-
var onOptionSelectSingle = function onOptionSelectSingle(event, option) {
|
|
428
|
-
var selected = isSelected(option);
|
|
429
|
-
var valueChanged = false;
|
|
430
|
-
var value = null;
|
|
431
|
-
var metaSelection = optionTouched.current ? false : props.metaKeySelection;
|
|
432
|
-
if (metaSelection) {
|
|
433
|
-
var metaKey = event.metaKey || event.ctrlKey;
|
|
434
|
-
if (selected) {
|
|
435
|
-
if (metaKey) {
|
|
436
|
-
value = null;
|
|
437
|
-
valueChanged = true;
|
|
438
|
-
}
|
|
439
|
-
} else {
|
|
440
|
-
value = getOptionValue(option);
|
|
441
|
-
valueChanged = true;
|
|
442
|
-
}
|
|
443
|
-
} else {
|
|
444
|
-
value = selected ? null : getOptionValue(option);
|
|
445
|
-
valueChanged = true;
|
|
446
|
-
}
|
|
447
|
-
if (valueChanged) {
|
|
448
|
-
updateModel(event, value);
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
var onOptionSelectMultiple = function onOptionSelectMultiple(event, option) {
|
|
452
|
-
var selected = isSelected(option);
|
|
453
|
-
var valueChanged = false;
|
|
454
|
-
var value = null;
|
|
455
|
-
var metaSelection = optionTouched ? false : props.metaKeySelection;
|
|
456
|
-
if (metaSelection) {
|
|
457
|
-
var metaKey = event.metaKey || event.ctrlKey;
|
|
458
|
-
if (selected) {
|
|
459
|
-
if (metaKey) value = removeOption(option);else value = [getOptionValue(option)];
|
|
460
|
-
valueChanged = true;
|
|
461
|
-
} else {
|
|
462
|
-
value = metaKey ? props.value || [] : [];
|
|
463
|
-
value = [].concat(_toConsumableArray(value), [getOptionValue(option)]);
|
|
464
|
-
valueChanged = true;
|
|
465
|
-
}
|
|
466
|
-
} else {
|
|
467
|
-
if (selected) value = removeOption(option);else value = [].concat(_toConsumableArray(props.value || []), [getOptionValue(option)]);
|
|
468
|
-
valueChanged = true;
|
|
469
|
-
}
|
|
470
|
-
if (valueChanged) {
|
|
471
|
-
props.onChange({
|
|
472
|
-
originalEvent: event,
|
|
473
|
-
value: value,
|
|
474
|
-
stopPropagation: function stopPropagation() {
|
|
475
|
-
event.stopPropagation();
|
|
476
|
-
},
|
|
477
|
-
preventDefault: function preventDefault() {
|
|
478
|
-
event.preventDefault();
|
|
479
|
-
},
|
|
480
|
-
target: {
|
|
481
|
-
name: props.name,
|
|
482
|
-
id: props.id,
|
|
483
|
-
value: value
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
var onFilter = function onFilter(event) {
|
|
489
|
-
virtualScrollerRef.current && virtualScrollerRef.current.scrollToIndex(0);
|
|
490
|
-
var originalEvent = event.originalEvent,
|
|
491
|
-
value = event.value;
|
|
492
|
-
if (props.onFilterValueChange) {
|
|
493
|
-
props.onFilterValueChange({
|
|
494
|
-
originalEvent: originalEvent,
|
|
495
|
-
value: value
|
|
496
|
-
});
|
|
497
|
-
} else {
|
|
498
|
-
setFilterValueState(value);
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
var resetFilter = function resetFilter() {
|
|
502
|
-
setFilterValueState('');
|
|
503
|
-
props.onFilter && props.onFilter({
|
|
504
|
-
filter: ''
|
|
505
|
-
});
|
|
506
|
-
};
|
|
507
|
-
var updateModel = function updateModel(event, value) {
|
|
508
|
-
if (props.onChange) {
|
|
509
|
-
props.onChange({
|
|
510
|
-
originalEvent: event,
|
|
511
|
-
value: value,
|
|
512
|
-
stopPropagation: function stopPropagation() {
|
|
513
|
-
event.stopPropagation();
|
|
514
|
-
},
|
|
515
|
-
preventDefault: function preventDefault() {
|
|
516
|
-
event.preventDefault();
|
|
517
|
-
},
|
|
518
|
-
target: {
|
|
519
|
-
name: props.name,
|
|
520
|
-
id: props.id,
|
|
521
|
-
value: value
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
var removeOption = function removeOption(option) {
|
|
527
|
-
return props.value.filter(function (val) {
|
|
528
|
-
return !ObjectUtils.equals(val, getOptionValue(option), props.dataKey);
|
|
529
|
-
});
|
|
530
|
-
};
|
|
531
|
-
var getSelectedOptionIndex = function getSelectedOptionIndex() {
|
|
532
|
-
if (props.value != null && visibleOptions) {
|
|
533
|
-
if (props.optionGroupLabel) {
|
|
534
|
-
for (var i = 0; i < visibleOptions.length; i++) {
|
|
535
|
-
var selectedOptionIndex = findOptionIndexInList(props.value, getOptionGroupChildren(visibleOptions[i]));
|
|
536
|
-
if (selectedOptionIndex !== -1) {
|
|
537
|
-
return {
|
|
538
|
-
group: i,
|
|
539
|
-
option: selectedOptionIndex
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
} else {
|
|
544
|
-
return findOptionIndexInList(props.value, visibleOptions);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
return -1;
|
|
548
|
-
};
|
|
549
|
-
var equalityKey = function equalityKey() {
|
|
550
|
-
return props.optionValue ? null : props.dataKey;
|
|
551
|
-
};
|
|
552
|
-
var findOptionIndexInList = function findOptionIndexInList(value, list) {
|
|
553
|
-
var key = equalityKey();
|
|
554
|
-
return list.findIndex(function (item) {
|
|
555
|
-
return ObjectUtils.equals(value, getOptionValue(item), key);
|
|
556
|
-
});
|
|
557
|
-
};
|
|
558
|
-
var isSelected = function isSelected(option) {
|
|
559
|
-
var optionValue = getOptionValue(option);
|
|
560
|
-
var key = equalityKey();
|
|
561
|
-
return props.multiple && props.value ? props.value.some(function (val) {
|
|
562
|
-
return ObjectUtils.equals(val, optionValue, key);
|
|
563
|
-
}) : ObjectUtils.equals(props.value, optionValue, key);
|
|
564
|
-
};
|
|
565
|
-
var getOptionLabel = function getOptionLabel(option) {
|
|
566
|
-
return props.optionLabel ? ObjectUtils.resolveFieldData(option, props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
|
|
567
|
-
};
|
|
568
|
-
var getOptionValue = function getOptionValue(option) {
|
|
569
|
-
return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option && option['value'] !== undefined ? option['value'] : option;
|
|
570
|
-
};
|
|
571
|
-
var getOptionRenderKey = function getOptionRenderKey(option) {
|
|
572
|
-
return props.dataKey ? ObjectUtils.resolveFieldData(option, props.dataKey) : getOptionLabel(option);
|
|
573
|
-
};
|
|
574
|
-
var isOptionDisabled = function isOptionDisabled(option) {
|
|
575
|
-
if (props.optionDisabled) {
|
|
576
|
-
return ObjectUtils.isFunction(props.optionDisabled) ? props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, props.optionDisabled);
|
|
577
|
-
}
|
|
578
|
-
return option && option['disabled'] !== undefined ? option['disabled'] : false;
|
|
579
|
-
};
|
|
580
|
-
var getOptionGroupRenderKey = function getOptionGroupRenderKey(optionGroup) {
|
|
581
|
-
return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
|
|
582
|
-
};
|
|
583
|
-
var getOptionGroupLabel = function getOptionGroupLabel(optionGroup) {
|
|
584
|
-
return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
|
|
585
|
-
};
|
|
586
|
-
var getOptionGroupChildren = function getOptionGroupChildren(optionGroup) {
|
|
587
|
-
return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupChildren);
|
|
588
|
-
};
|
|
589
|
-
var getVisibleOptions = function getVisibleOptions() {
|
|
590
|
-
if (hasFilter) {
|
|
591
|
-
var filterValue = filteredValue.trim().toLocaleLowerCase(props.filterLocale);
|
|
592
|
-
var searchFields = props.filterBy ? props.filterBy.split(',') : [props.optionLabel || 'label'];
|
|
593
|
-
if (props.optionGroupLabel) {
|
|
594
|
-
var filteredGroups = [];
|
|
595
|
-
var _iterator = _createForOfIteratorHelper(props.options),
|
|
596
|
-
_step;
|
|
597
|
-
try {
|
|
598
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
599
|
-
var optgroup = _step.value;
|
|
600
|
-
var filteredSubOptions = FilterService.filter(getOptionGroupChildren(optgroup), searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
601
|
-
if (filteredSubOptions && filteredSubOptions.length) {
|
|
602
|
-
filteredGroups.push(_objectSpread(_objectSpread({}, optgroup), {
|
|
603
|
-
items: filteredSubOptions
|
|
604
|
-
}));
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
} catch (err) {
|
|
608
|
-
_iterator.e(err);
|
|
609
|
-
} finally {
|
|
610
|
-
_iterator.f();
|
|
611
|
-
}
|
|
612
|
-
return filteredGroups;
|
|
613
|
-
} else {
|
|
614
|
-
return FilterService.filter(props.options, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
615
|
-
}
|
|
616
|
-
} else {
|
|
617
|
-
return props.options;
|
|
618
|
-
}
|
|
619
|
-
};
|
|
620
|
-
var scrollToSelectedIndex = function scrollToSelectedIndex() {
|
|
621
|
-
if (virtualScrollerRef.current) {
|
|
622
|
-
var selectedIndex = getSelectedOptionIndex();
|
|
623
|
-
if (selectedIndex !== -1) {
|
|
624
|
-
setTimeout(function () {
|
|
625
|
-
return virtualScrollerRef.current.scrollToIndex(selectedIndex);
|
|
626
|
-
}, 0);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
};
|
|
630
|
-
React.useImperativeHandle(ref, function () {
|
|
631
|
-
return {
|
|
632
|
-
props: props,
|
|
633
|
-
focus: function focus() {
|
|
634
|
-
return DomHandler.focusFirstElement(elementRef.current);
|
|
635
|
-
},
|
|
636
|
-
getElement: function getElement() {
|
|
637
|
-
return elementRef.current;
|
|
638
|
-
},
|
|
639
|
-
getVirtualScroller: function getVirtualScroller() {
|
|
640
|
-
return virtualScrollerRef.current;
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
});
|
|
644
|
-
useMountEffect(function () {
|
|
645
|
-
scrollToSelectedIndex();
|
|
646
|
-
});
|
|
647
|
-
var createHeader = function createHeader() {
|
|
648
|
-
return props.filter ? /*#__PURE__*/React.createElement(ListBoxHeader, {
|
|
649
|
-
hostName: "ListBox",
|
|
650
|
-
filter: filteredValue,
|
|
651
|
-
filterIcon: props.filterIcon,
|
|
652
|
-
onFilter: onFilter,
|
|
653
|
-
resetFilter: resetFilter,
|
|
654
|
-
filterTemplate: props.filterTemplate,
|
|
655
|
-
disabled: props.disabled,
|
|
656
|
-
filterPlaceholder: props.filterPlaceholder,
|
|
657
|
-
filterInputProps: props.filterInputProps,
|
|
658
|
-
ptCallbacks: ptCallbacks,
|
|
659
|
-
metaData: metaData
|
|
660
|
-
}) : null;
|
|
661
|
-
};
|
|
662
|
-
var createGroupChildren = function createGroupChildren(optionGroup, style) {
|
|
663
|
-
var groupChildren = getOptionGroupChildren(optionGroup);
|
|
664
|
-
return groupChildren.map(function (option, j) {
|
|
665
|
-
var optionLabel = getOptionLabel(option);
|
|
666
|
-
var optionKey = j + '_' + getOptionRenderKey(option);
|
|
667
|
-
var disabled = isOptionDisabled(option);
|
|
668
|
-
var tabIndex = disabled ? null : props.tabIndex || 0;
|
|
669
|
-
return /*#__PURE__*/React.createElement(ListBoxItem, {
|
|
670
|
-
hostName: "ListBox",
|
|
671
|
-
key: optionKey,
|
|
672
|
-
label: optionLabel,
|
|
673
|
-
option: option,
|
|
674
|
-
style: style,
|
|
675
|
-
template: props.itemTemplate,
|
|
676
|
-
selected: isSelected(option),
|
|
677
|
-
onClick: onOptionSelect,
|
|
678
|
-
onTouchEnd: onOptionTouchEnd,
|
|
679
|
-
tabIndex: tabIndex,
|
|
680
|
-
disabled: disabled,
|
|
681
|
-
ptCallbacks: ptCallbacks,
|
|
682
|
-
metaData: metaData
|
|
683
|
-
});
|
|
684
|
-
});
|
|
685
|
-
};
|
|
686
|
-
var createItem = function createItem(option, index) {
|
|
687
|
-
var scrollerOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
688
|
-
var style = {
|
|
689
|
-
height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
|
|
690
|
-
};
|
|
691
|
-
if (props.optionGroupLabel) {
|
|
692
|
-
var groupContent = props.optionGroupTemplate ? ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : getOptionGroupLabel(option);
|
|
693
|
-
var groupChildrenContent = createGroupChildren(option, style);
|
|
694
|
-
var key = index + '_' + getOptionGroupRenderKey(option);
|
|
695
|
-
var itemGroupProps = mergeProps({
|
|
696
|
-
className: ptCallbacks.cx('itemGroup'),
|
|
697
|
-
style: ptCallbacks.sx('itemGroup', {
|
|
698
|
-
scrollerOptions: scrollerOptions
|
|
699
|
-
}),
|
|
700
|
-
role: 'group'
|
|
701
|
-
}, ptCallbacks.ptm('itemGroup'));
|
|
702
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
703
|
-
key: key
|
|
704
|
-
}, /*#__PURE__*/React.createElement("li", itemGroupProps, groupContent), groupChildrenContent);
|
|
705
|
-
} else {
|
|
706
|
-
var optionLabel = getOptionLabel(option);
|
|
707
|
-
var optionKey = index + '_' + getOptionRenderKey(option);
|
|
708
|
-
var disabled = isOptionDisabled(option);
|
|
709
|
-
var tabIndex = disabled ? null : props.tabIndex || 0;
|
|
710
|
-
return /*#__PURE__*/React.createElement(ListBoxItem, {
|
|
711
|
-
hostName: "ListBox",
|
|
712
|
-
key: optionKey,
|
|
713
|
-
label: optionLabel,
|
|
714
|
-
option: option,
|
|
715
|
-
style: style,
|
|
716
|
-
template: props.itemTemplate,
|
|
717
|
-
selected: isSelected(option),
|
|
718
|
-
onClick: onOptionSelect,
|
|
719
|
-
onTouchEnd: onOptionTouchEnd,
|
|
720
|
-
tabIndex: tabIndex,
|
|
721
|
-
disabled: disabled,
|
|
722
|
-
ptCallbacks: ptCallbacks,
|
|
723
|
-
metaData: metaData
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
};
|
|
727
|
-
var createItems = function createItems() {
|
|
728
|
-
if (ObjectUtils.isNotEmpty(visibleOptions)) {
|
|
729
|
-
return visibleOptions.map(createItem);
|
|
730
|
-
} else if (hasFilter) {
|
|
731
|
-
return createEmptyMessage(props.emptyFilterMessage, true);
|
|
732
|
-
}
|
|
733
|
-
return createEmptyMessage(props.emptyMessage);
|
|
734
|
-
};
|
|
735
|
-
var createEmptyMessage = function createEmptyMessage(emptyMessage, isFilter) {
|
|
736
|
-
var emptyMessageProps = mergeProps({
|
|
737
|
-
className: ptCallbacks.cx('emptyMessage')
|
|
738
|
-
}, ptCallbacks.ptm('emptyMessage'));
|
|
739
|
-
var message = ObjectUtils.getJSXElement(emptyMessage, props) || localeOption(isFilter ? 'emptyFilterMessage' : 'emptyMessage');
|
|
740
|
-
return /*#__PURE__*/React.createElement("li", emptyMessageProps, message);
|
|
741
|
-
};
|
|
742
|
-
var createList = function createList() {
|
|
743
|
-
if (props.virtualScrollerOptions) {
|
|
744
|
-
var virtualScrollerProps = _objectSpread(_objectSpread({}, props.virtualScrollerOptions), {
|
|
745
|
-
items: visibleOptions,
|
|
746
|
-
onLazyLoad: function onLazyLoad(event) {
|
|
747
|
-
return props.virtualScrollerOptions.onLazyLoad(_objectSpread(_objectSpread({}, event), {
|
|
748
|
-
filter: visibleOptions
|
|
749
|
-
}));
|
|
750
|
-
},
|
|
751
|
-
itemTemplate: function itemTemplate(item, options) {
|
|
752
|
-
return item && createItem(item, options.index, options);
|
|
753
|
-
},
|
|
754
|
-
contentTemplate: function contentTemplate(options) {
|
|
755
|
-
var listProps = mergeProps(_objectSpread({
|
|
756
|
-
ref: options.contentRef,
|
|
757
|
-
style: ptCallbacks.sx('list', {
|
|
758
|
-
options: options
|
|
759
|
-
}),
|
|
760
|
-
className: ptCallbacks.cx('list', {
|
|
761
|
-
options: options
|
|
762
|
-
}),
|
|
763
|
-
role: 'listbox',
|
|
764
|
-
'aria-multiselectable': props.multiple
|
|
765
|
-
}, ariaProps), ptCallbacks.ptm('list'));
|
|
766
|
-
return /*#__PURE__*/React.createElement("ul", listProps, options.children);
|
|
767
|
-
}
|
|
768
|
-
});
|
|
769
|
-
return /*#__PURE__*/React.createElement(VirtualScroller, _extends({
|
|
770
|
-
ref: virtualScrollerRef
|
|
771
|
-
}, virtualScrollerProps, {
|
|
772
|
-
pt: ptCallbacks.ptm('virtualScroller')
|
|
773
|
-
}));
|
|
774
|
-
} else {
|
|
775
|
-
var items = createItems();
|
|
776
|
-
var listProps = mergeProps(_objectSpread({
|
|
777
|
-
className: ptCallbacks.cx('list'),
|
|
778
|
-
role: 'listbox',
|
|
779
|
-
'aria-multiselectable': props.multiple
|
|
780
|
-
}, ariaProps), ptCallbacks.ptm('list'));
|
|
781
|
-
return /*#__PURE__*/React.createElement("ul", listProps, items);
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
var visibleOptions = getVisibleOptions();
|
|
785
|
-
var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
|
|
786
|
-
var otherProps = ListBoxBase.getOtherProps(props);
|
|
787
|
-
var ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
|
|
788
|
-
var list = createList();
|
|
789
|
-
var header = createHeader();
|
|
790
|
-
var wrapperProps = mergeProps({
|
|
791
|
-
className: ptCallbacks.cx('wrapper'),
|
|
792
|
-
style: props.listStyle
|
|
793
|
-
}, ptCallbacks.ptm('wrapper'));
|
|
794
|
-
var rootProps = mergeProps({
|
|
795
|
-
ref: elementRef,
|
|
796
|
-
id: props.id,
|
|
797
|
-
className: ptCallbacks.cx('root'),
|
|
798
|
-
style: props.style
|
|
799
|
-
}, ListBoxBase.getOtherProps(props), ptCallbacks.ptm('root'));
|
|
800
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, header, /*#__PURE__*/React.createElement("div", wrapperProps, list)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
801
|
-
target: elementRef,
|
|
802
|
-
content: props.tooltip
|
|
803
|
-
}, props.tooltipOptions, {
|
|
804
|
-
pt: ptCallbacks.ptm('tooltip')
|
|
805
|
-
})));
|
|
806
|
-
}));
|
|
807
|
-
ListBox.displayName = 'ListBox';
|
|
808
|
-
|
|
809
|
-
export { ListBox };
|